@arquimedes.co/eureka-forms 3.0.30-test → 3.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/@Types/FormStep.d.ts +4 -1
  2. package/dist/@Types/GenericFormSteps.d.ts +6 -0
  3. package/dist/App/AppHooks.js +13 -12
  4. package/dist/Form/Form.js +2 -6
  5. package/dist/Form/FormHooks.js +0 -1
  6. package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +0 -2
  7. package/dist/Form/FormTypes/StepperForm/StepperForm.js +0 -2
  8. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +0 -1
  9. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +1 -5
  10. package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +1 -3
  11. package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.d.ts +10 -0
  12. package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.js +14 -0
  13. package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.d.ts +3 -0
  14. package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.js +27 -0
  15. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +0 -1
  16. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +0 -1
  17. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +0 -1
  18. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +1 -5
  19. package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +3 -12
  20. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +1 -5
  21. package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +2 -9
  22. package/dist/FormSteps/Step.js +4 -0
  23. package/dist/FormSteps/StepFunctions.js +1 -0
  24. package/dist/FormSteps/StepFunctions.test.js +7 -0
  25. package/dist/FormSteps/StepHooks.js +3 -11
  26. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +2 -2
  27. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +1 -3
  28. package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +0 -1
  29. package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +2 -2
  30. package/dist/Shared/CustomBtn/CustomBtn.js +0 -1
  31. package/dist/Shared/ErkButton/ErkButton.stories.d.ts +2 -1
  32. package/dist/Shared/ErkButton/ErkButton.stories.js +2 -0
  33. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +1 -1
  34. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +1 -1
  35. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +6 -11
  36. package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.d.ts +18 -0
  37. package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.js +160 -0
  38. package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.d.ts +36 -0
  39. package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.js +274 -0
  40. package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +5 -2
  41. package/dist/Shared/ErkSelect/ErkSelect.stories.js +28 -5
  42. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +1 -1
  43. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +10 -18
  44. package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +1 -1
  45. package/dist/Shared/ErkTextField/ErkTextField.stories.js +5 -11
  46. package/dist/Shared/Navbar/Navbar.stories.d.ts +1 -1
  47. package/dist/Shared/Rating/Rating.stories.d.ts +1 -1
  48. package/dist/Shared/Toggle/Toggle.js +1 -1
  49. package/dist/Utils/AxiosAPI.js +1 -1
  50. package/dist/Utils/LocaleUtils.js +1 -1
  51. package/dist/Utils/MaterialProviders.js +2 -2
  52. package/dist/Utils/store.d.ts +1 -10
  53. package/dist/constants/FormStepTypes.d.ts +1 -0
  54. package/dist/constants/FormStepTypes.js +1 -0
  55. package/dist/index.css +1 -0
  56. package/package.json +46 -58
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useArgs } from '@storybook/preview-api';
3
2
  import ErkSmartSelect from './ErkSmartSelect';
4
- import { within, userEvent, screen } from '@storybook/testing-library';
3
+ import { useArgs } from 'storybook/internal/preview-api';
5
4
  const meta = {
6
5
  component: ErkSmartSelect,
7
6
  tags: ['autodocs'],
@@ -26,11 +25,10 @@ export const Default = {
26
25
  },
27
26
  ],
28
27
  },
29
- play: async ({ canvasElement }) => {
30
- const canvas = within(canvasElement);
28
+ play: async ({ canvas, userEvent }) => {
31
29
  const selector = canvas.getByTestId('smart-select');
32
30
  await userEvent.click(selector);
33
- const option = screen.getByTestId('smart-select-option');
31
+ const option = canvas.getByTestId('smart-select-option');
34
32
  await userEvent.click(option);
35
33
  },
36
34
  render: function Component(args) {
@@ -46,11 +44,10 @@ export const Focused = {
46
44
  args: {
47
45
  label: 'Label',
48
46
  },
49
- play: async ({ canvasElement }) => {
50
- const canvas = within(canvasElement);
47
+ play: async ({ canvas, userEvent }) => {
51
48
  const selector = canvas.getByTestId('smart-select');
52
49
  await userEvent.click(selector);
53
- const option = screen.getByTestId('smart-select-empty');
50
+ const option = canvas.getByTestId('smart-select-empty');
54
51
  await userEvent.click(option);
55
52
  },
56
53
  };
@@ -59,8 +56,7 @@ export const FocusedSearchable = {
59
56
  label: 'Label',
60
57
  searchable: true,
61
58
  },
62
- play: async ({ canvasElement }) => {
63
- const canvas = within(canvasElement);
59
+ play: async ({ canvas, userEvent }) => {
64
60
  const selector = canvas.getByTestId('smart-select');
65
61
  await userEvent.click(selector);
66
62
  },
@@ -76,8 +72,7 @@ export const SearchableWithOptions = {
76
72
  },
77
73
  ],
78
74
  },
79
- play: async ({ canvasElement }) => {
80
- const canvas = within(canvasElement);
75
+ play: async ({ canvas, userEvent }) => {
81
76
  const selector = canvas.getByTestId('smart-select');
82
77
  await userEvent.click(selector);
83
78
  },
@@ -94,8 +89,7 @@ export const SearchableWithSearchAndOptions = {
94
89
  },
95
90
  ],
96
91
  },
97
- play: async ({ canvasElement }) => {
98
- const canvas = within(canvasElement);
92
+ play: async ({ canvas, userEvent }) => {
99
93
  const selector = canvas.getByTestId('smart-select');
100
94
  await userEvent.click(selector);
101
95
  },
@@ -111,8 +105,7 @@ export const LoadingOpened = {
111
105
  label: 'Label',
112
106
  loading: true,
113
107
  },
114
- play: async ({ canvasElement }) => {
115
- const canvas = within(canvasElement);
108
+ play: async ({ canvas, userEvent }) => {
116
109
  const selector = canvas.getByTestId('smart-select');
117
110
  await userEvent.click(selector);
118
111
  },
@@ -123,8 +116,7 @@ export const SearchableLoadingOpened = {
123
116
  searchable: true,
124
117
  loading: true,
125
118
  },
126
- play: async ({ canvasElement }) => {
127
- const canvas = within(canvasElement);
119
+ play: async ({ canvas, userEvent }) => {
128
120
  const selector = canvas.getByTestId('smart-select');
129
121
  await userEvent.click(selector);
130
122
  },
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from '@storybook/react';
1
+ import type { StoryObj } from '@storybook/react-vite';
2
2
  import ErkTextField from './ErkTextField';
3
3
  declare const meta: {
4
4
  component: typeof ErkTextField;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useArgs } from '@storybook/preview-api';
3
2
  import ErkTextField from './ErkTextField';
4
- import { within, userEvent } from '@storybook/testing-library';
3
+ import { useArgs } from 'storybook/internal/preview-api';
5
4
  const meta = {
6
5
  component: ErkTextField,
7
6
  tags: ['autodocs'],
@@ -23,13 +22,10 @@ export const Default = {
23
22
  args: {
24
23
  label: 'Label',
25
24
  },
26
- play: async ({ canvasElement }) => {
27
- const canvas = within(canvasElement);
25
+ play: async ({ canvas, userEvent }) => {
28
26
  const emailInput = canvas.getByRole('textbox');
29
27
  await userEvent.click(emailInput);
30
- await userEvent.type(emailInput, 'example-email@email.com', {
31
- delay: 100,
32
- });
28
+ await userEvent.type(emailInput, 'example-email@email.com', { initialSelectionStart: 100 });
33
29
  },
34
30
  render: function Component(args) {
35
31
  const [, setArgs] = useArgs();
@@ -44,16 +40,14 @@ export const Focused = {
44
40
  args: {
45
41
  label: 'Label',
46
42
  },
47
- play: async ({ canvasElement }) => {
48
- const canvas = within(canvasElement);
43
+ play: async ({ canvas, userEvent }) => {
49
44
  const emailInput = canvas.getByRole('textbox');
50
45
  await userEvent.click(emailInput);
51
46
  },
52
47
  };
53
48
  export const FocusedNoLabel = {
54
49
  args: {},
55
- play: async ({ canvasElement }) => {
56
- const canvas = within(canvasElement);
50
+ play: async ({ canvas, userEvent }) => {
57
51
  const emailInput = canvas.getByRole('textbox');
58
52
  await userEvent.click(emailInput);
59
53
  },
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from '@storybook/react';
1
+ import type { StoryObj } from '@storybook/react-vite';
2
2
  import Navbar from './Navbar';
3
3
  declare const meta: {
4
4
  component: typeof Navbar;
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from '@storybook/react';
1
+ import type { StoryObj } from '@storybook/react-vite';
2
2
  import Rating from './Rating';
3
3
  declare const meta: {
4
4
  component: typeof Rating;
@@ -7,7 +7,7 @@ const Styled = styled(MuiSwitch)(({ theme, checked, size }) => ({
7
7
  '& .Erk-MuiSwitch-switchBase': {
8
8
  marginTop: size === 'small' ? -5 : undefined,
9
9
  transform: size === 'small' ? 'translateX(-5px)' : undefined,
10
- color: 'var(--outlineGrey)',
10
+ color: '#b8b8b8',
11
11
  '&.Mui-checked': {
12
12
  transform: size === 'small' ? 'translateX(12px)' : undefined,
13
13
  '& .Erk-MuiSwitch-thumb': {
@@ -23,7 +23,7 @@ export const axiosBaseQuery = () => async ({ url, method, body, params, timeout,
23
23
  return {
24
24
  error: {
25
25
  status: err.response?.status,
26
- data: err.response?.data || err.message,
26
+ data: err.response?.data ?? err.message,
27
27
  },
28
28
  };
29
29
  }
@@ -8,5 +8,5 @@ const localeMap = {
8
8
  export const getLocale = () => {
9
9
  return (localeMap[navigator.languages?.length
10
10
  ? navigator.languages[0]
11
- : navigator.userLanguage || navigator.language || navigator.browserLanguage] ?? localeMap.es);
11
+ : (navigator.userLanguage ?? navigator.language ?? navigator.browserLanguage)] ?? localeMap.es);
12
12
  };
@@ -4,8 +4,8 @@ import { createTheme, ThemeProvider } from '@mui/material';
4
4
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
5
5
  import { LocalizationProvider } from '@mui/x-date-pickers';
6
6
  import { getLocale } from './LocaleUtils';
7
- // stepBackgroundColor: string;
8
- function MaterialProviders({ children, formStyle }) {
7
+ import InternalFormStyle from '../constants/InternalFormStyle';
8
+ function MaterialProviders({ children, formStyle = InternalFormStyle }) {
9
9
  return (_jsx(ThemeProvider, { theme: createTheme({
10
10
  typography: {
11
11
  fontFamily: 'inherit',
@@ -24,13 +24,4 @@ export type AppStore = typeof store;
24
24
  export type AppState = ReturnType<typeof store.getState>;
25
25
  export declare const getAppState: import("@reduxjs/toolkit").AsyncThunk<RootState, {
26
26
  idForm: string;
27
- }, {
28
- state?: unknown;
29
- dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
30
- extra?: unknown;
31
- rejectValue?: unknown;
32
- serializedErrorType?: unknown;
33
- pendingMeta?: unknown;
34
- fulfilledMeta?: unknown;
35
- rejectedMeta?: unknown;
36
- }>;
27
+ }, import("@reduxjs/toolkit").AsyncThunkConfig>;
@@ -12,6 +12,7 @@ export declare enum FormStepTypes {
12
12
  CHECKBOX = "CHECKBOX",
13
13
  TEXTAREA = "TEXTAREA",
14
14
  DATEPICKER = "DATEPICKER",
15
+ DATEPICKER_RANGE = "DATEPICKER_RANGE",
15
16
  FILEUPLOAD = "FILEUPLOAD",
16
17
  TEXTINPUT = "TEXTINPUT",
17
18
  SEPARATOR = "SEPARATOR",
@@ -15,6 +15,7 @@ export var FormStepTypes;
15
15
  FormStepTypes["CHECKBOX"] = "CHECKBOX";
16
16
  FormStepTypes["TEXTAREA"] = "TEXTAREA";
17
17
  FormStepTypes["DATEPICKER"] = "DATEPICKER";
18
+ FormStepTypes["DATEPICKER_RANGE"] = "DATEPICKER_RANGE";
18
19
  FormStepTypes["FILEUPLOAD"] = "FILEUPLOAD";
19
20
  FormStepTypes["TEXTINPUT"] = "TEXTINPUT";
20
21
  FormStepTypes["SEPARATOR"] = "SEPARATOR";
package/dist/index.css CHANGED
@@ -1,6 +1,7 @@
1
1
  body {
2
2
  margin: 0;
3
3
  font-size: 16px;
4
+ font-family: 'Nunito', sans-serif;
4
5
  }
5
6
 
6
7
  .ErkIcon {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"3.0.30-test",
4
+ "version": "3.0.31",
5
5
  "scripts": {
6
6
  "watch": "tsc --noEmit --watch --project tsconfig.app.json",
7
7
  "start": "vite",
@@ -11,25 +11,25 @@
11
11
  "preview": "vite preview",
12
12
  "test": "vitest",
13
13
  "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --declaration true --allowImportingTsExtensions false",
14
+ "cypress": "DISPLAY=:0 cypress open",
14
15
  "storybook": "storybook dev -p 6006",
15
- "build-storybook": "storybook build",
16
- "cypress": "DISPLAY=:0 cypress open"
16
+ "build-storybook": "storybook build"
17
17
  },
18
18
  "dependencies": {
19
- "@reduxjs/toolkit": "^2.8.1",
20
- "axios": "^1.9.0",
19
+ "@reduxjs/toolkit": "^2.9.0",
20
+ "axios": "^1.12.2",
21
21
  "date-fns": "^4.1.0",
22
22
  "draft-js": "^0.11.7",
23
23
  "i18n-iso-countries": "^7.14.0",
24
- "libphonenumber-js": "^1.12.8",
25
- "logrocket": "^10.0.0",
26
- "nanoid": "^5.1.5",
24
+ "libphonenumber-js": "^1.12.23",
25
+ "logrocket": "^10.1.0",
26
+ "nanoid": "^5.1.6",
27
27
  "react-draft-wysiwyg": "^1.15.0",
28
28
  "react-google-recaptcha": "^3.1.0",
29
- "react-hook-form": "^7.56.3",
30
- "react-international-phone": "^4.5.0",
29
+ "react-hook-form": "^7.64.0",
30
+ "react-international-phone": "^4.6.0",
31
31
  "react-redux": "^9.2.0",
32
- "typescript": "^5.7.2"
32
+ "typescript": "^5.9.3"
33
33
  },
34
34
  "eslintConfig": {},
35
35
  "browserslist": {
@@ -45,61 +45,49 @@
45
45
  ]
46
46
  },
47
47
  "devDependencies": {
48
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
49
- "@babel/preset-env": "^7.26.9",
50
- "@babel/preset-react": "^7.26.3",
51
- "@babel/preset-typescript": "^7.26.0",
52
- "@eslint/compat": "^1.2.7",
53
- "@eslint/eslintrc": "^3.3.0",
54
- "@eslint/js": "^9.21.0",
55
- "@faker-js/faker": "^9.5.1",
56
- "@mui/material": "^7.1.0",
57
- "@mui/x-data-grid-pro": "^8.3.0",
58
- "@mui/x-date-pickers": "^8.3.0",
59
- "@mui/x-date-pickers-pro": "^8.3.0",
60
- "@storybook/addon-coverage": "^1.0.5",
61
- "@storybook/addon-essentials": "^8.6.4",
62
- "@storybook/addon-interactions": "^8.6.4",
63
- "@storybook/addon-links": "^8.6.4",
64
- "@storybook/addon-onboarding": "^8.6.4",
65
- "@storybook/addon-themes": "^8.6.4",
66
- "@storybook/blocks": "^8.6.4",
67
- "@storybook/react": "^8.6.4",
68
- "@storybook/react-webpack5": "^8.6.4",
69
- "@storybook/test": "^8.6.4",
70
- "@storybook/testing-library": "^0.2.2",
71
- "@testing-library/dom": "^10.4.0",
72
- "@testing-library/jest-dom": "^6.6.3",
73
- "@testing-library/react": "^16.2.0",
48
+ "@eslint/compat": "^1.4.0",
49
+ "@eslint/eslintrc": "^3.3.1",
50
+ "@eslint/js": "^9.37.0",
51
+ "@faker-js/faker": "^10.0.0",
52
+ "@mui/material": "^7.3.4",
53
+ "@mui/x-data-grid-pro": "^8.13.1",
54
+ "@mui/x-date-pickers": "^8.12.0",
55
+ "@mui/x-date-pickers-pro": "^8.12.0",
56
+ "@storybook/addon-docs": "^9.1.10",
57
+ "@storybook/addon-onboarding": "^9.1.10",
58
+ "@storybook/addon-themes": "^9.1.10",
59
+ "@storybook/react-vite": "^9.1.10",
60
+ "@testing-library/dom": "^10.4.1",
61
+ "@testing-library/jest-dom": "^6.9.1",
62
+ "@testing-library/react": "^16.3.0",
74
63
  "@testing-library/user-event": "^14.6.1",
75
64
  "@types/draft-js": "^0.11.18",
76
65
  "@types/react": "^18.3.18",
77
66
  "@types/react-dom": "^18.3.5",
78
67
  "@types/react-draft-wysiwyg": "^1.13.8",
79
68
  "@types/react-google-recaptcha": "^2.1.9",
80
- "@typescript-eslint/eslint-plugin": "^8.26.0",
69
+ "@typescript-eslint/eslint-plugin": "^8.46.0",
81
70
  "@typescript-eslint/parser": "^8.26.0",
82
- "@vitejs/plugin-react-swc": "^3.9.0",
83
- "chromatic": "^11.27.0",
84
- "cypress": "^14.1.0",
85
- "dotenv-webpack": "^8.1.0",
86
- "eslint": "^9.26.0",
87
- "eslint-config-prettier": "^10.0.2",
88
- "eslint-plugin-react": "^7.37.4",
89
- "eslint-plugin-react-hooks": "^5.2.0",
90
- "eslint-plugin-react-refresh": "^0.4.19",
91
- "eslint-plugin-storybook": "^0.11.4",
92
- "globals": "^16.1.0",
71
+ "@vitejs/plugin-react-swc": "^4.1.0",
72
+ "css-loader": "^7.1.2",
73
+ "cypress": "^15.3.0",
74
+ "dotenv-webpack": "^8.1.1",
75
+ "eslint": "^9.37.0",
76
+ "eslint-config-prettier": "^10.1.8",
77
+ "eslint-plugin-react": "^7.37.5",
78
+ "eslint-plugin-react-hooks": "^6.1.1",
79
+ "eslint-plugin-react-refresh": "^0.4.23",
80
+ "eslint-plugin-storybook": "^9.1.10",
81
+ "globals": "^16.4.0",
93
82
  "identity-obj-proxy": "^3.0.0",
94
- "jsdom": "^26.0.0",
95
- "prettier": "3.5.3",
96
- "react-docgen-typescript": "^2.2.2",
97
- "react-refresh": "^0.16.0",
98
- "storybook": "^8.6.4",
99
- "storybook-mock-date-decorator": "^2.0.6",
100
- "vite": "^6.3.5",
101
- "vite-plugin-svgr": "^4.3.0",
102
- "vitest": "^3.1.3"
83
+ "jsdom": "^27.0.0",
84
+ "prettier": "3.6.2",
85
+ "react-refresh": "^0.18.0",
86
+ "storybook": "^9.1.10",
87
+ "style-loader": "^4.0.0",
88
+ "vite": "^7.1.9",
89
+ "vite-plugin-svgr": "^4.5.0",
90
+ "vitest": "^3.2.4"
103
91
  },
104
92
  "peerDependencies": {
105
93
  "@emotion/react": "^11.x.x",