Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tsedio/tsed-formio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0034f0e8f45fabe9300fbeb590e9e5bd343c2119
Choose a base ref
..
head repository: tsedio/tsed-formio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4a53d61ce5b60c64fd694bd04e51d9cbc3227a5a
Choose a head ref
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/TypedProject/tsed-formio.git"
"url": "https://github.com/tsedio/tsed-formio.git"
},
"bugs": {
"url": "https://github.com/TypedProject/tsed-formio/issues"
"url": "https://github.com/tsedio/tsed-formio/issues"
},
"homepage": "https://github.com/TypedProject/tsed-formio",
"homepage": "https://github.com/tsedio/tsed-formio",
"scripts": {
"configure": "monorepo ci configure",
"test": "lerna run test --stream",
3 changes: 2 additions & 1 deletion packages/react-formio-container/package.json
Original file line number Diff line number Diff line change
@@ -97,5 +97,6 @@
"tooltip.js": {
"optional": false
}
}
},
"dependencies": {}
}
4 changes: 2 additions & 2 deletions packages/react-formio-stores/src/stores/auth/auth.reducers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FormType, RoleType, SubmissionType } from "@tsed/react-formio";
import { FormType, JSON, RoleType, SubmissionType } from "@tsed/react-formio";
import { createReducer } from "@tsed/redux-utils";

import {
@@ -14,7 +14,7 @@ import {
} from "./auth.actions";
import { AUTH } from "./auth.constant";

export interface AuthState<User = any> {
export interface AuthState<User extends { [key: string]: JSON } = any> {
init: boolean;
isActive: boolean;
user: null | SubmissionType<User>;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./ChoicesSelect";

import { Meta, StoryObj } from "@storybook/react";
import { expect, fn, userEvent, within } from "@storybook/test";
import { fn } from "@storybook/test";

import { iconClass } from "../../../../utils/iconClass";
import { useValue } from "../../../__fixtures__/useValue.hook";
@@ -95,24 +95,6 @@ export const Usage: Story = {
value: "option-1",
options,
onChange: fn()
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);

const select = canvas.getByTestId("select_name");

await expect(select).toBeInTheDocument();
await expect(select).toHaveValue("option-1");

await userEvent.selectOptions(select, "option-2");

await expect(select).toHaveValue("option-2");
await expect(args.onChange).toHaveBeenCalledWith("name", "option-2");

const label = canvas.getByTestId("form-group-name");

await expect(label).toBeInTheDocument();
await expect(label).toHaveTextContent("Label");
}
};

@@ -125,19 +107,6 @@ export const WithPlaceholder: Story = {
placeholder: "Select an option",
options,
onChange: fn()
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);

const select = canvas.getByTestId("select_name");

await expect(select).toBeInTheDocument();
await expect(select).toHaveValue("");

await userEvent.selectOptions(select, "option-2");

await expect(select).toHaveValue("option-2");
await expect(args.onChange).toHaveBeenCalledWith("name", "option-2");
}
};
/**
@@ -150,19 +119,6 @@ export const WithPlaceholderAndRequired: Story = {
options,
required: true,
onChange: fn()
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);

const select = canvas.getByTestId("select_name");

await expect(select).toBeInTheDocument();
await expect(select).toHaveValue("");

await userEvent.selectOptions(select, "option-2");

await expect(select).toHaveValue("option-2");
await expect(args.onChange).toHaveBeenCalledWith("name", "option-2");
}
};
/**
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ export function HTMLSelect({ name, id = name, size, value, multiple, onChange, o

return (
<select
{...(props as any)}
data-testid={`select_${name}`}
{...(props as any)}
className={cx("form-control", size && `form-control-${size}`)}
name={name}
id={id}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "../../../molecules/forms/select/all.ts";

import type { Meta, StoryObj } from "@storybook/react";
import { expect, fn, userEvent, within } from "@storybook/test";

3 changes: 2 additions & 1 deletion packages/redux-utils/package.json
Original file line number Diff line number Diff line change
@@ -27,5 +27,6 @@
"peerDependencies": {
"react": "^18.3.1",
"redux": "^4.0.5"
}
},
"dependencies": {}
}
4 changes: 3 additions & 1 deletion packages/tailwind-formio/package.json
Original file line number Diff line number Diff line change
@@ -49,5 +49,7 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"dependencies": {},
"peerDependencies": {}
}
5 changes: 4 additions & 1 deletion tools/typescript/package.json
Original file line number Diff line number Diff line change
@@ -7,5 +7,8 @@
"main": "index.js",
"exports": {
"./tsconfig.web.json": "./tsconfig.web.json"
}
},
"dependencies": {},
"devDependencies": {},
"peerDependencies": {}
}
4 changes: 3 additions & 1 deletion tools/vitest/package.json
Original file line number Diff line number Diff line change
@@ -14,5 +14,7 @@
},
"scripts": {
"generate": "node index.js"
}
},
"dependencies": {},
"peerDependencies": {}
}