@arquimedes.co/eureka-forms 3.0.19-refactor → 3.0.21-refactor
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.
- package/dist/@Types/FormStep.d.ts +7 -3
- package/dist/@Types/GenericFormSteps.d.ts +1 -0
- package/dist/App/App.css +11 -0
- package/dist/App/App.d.ts +6 -0
- package/dist/App/App.js +3 -1
- package/dist/App/AppFunctions.d.ts +4 -4
- package/dist/App/AppFunctions.test.js +70 -0
- package/dist/App/AppHooks.d.ts +1 -1
- package/dist/App/AppHooks.js +11 -2
- package/dist/Contexts/CustomContext.d.ts +3 -0
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +2 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +4 -10
- package/dist/Form/Form.d.ts +2 -0
- package/dist/Form/FormFunctions.js +4 -0
- package/dist/Form/FormFunctions.test.js +4 -0
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +1 -1
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +1 -1
- package/dist/FormSteps/AYFStepMapper.js +1 -1
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +1 -1
- package/dist/FormSteps/CBRStepMapper.js +5 -5
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +9 -5
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +6 -3
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +7 -4
- package/dist/FormSteps/StepFunctions.d.ts +1 -1
- package/dist/FormSteps/StepFunctions.js +7 -4
- package/dist/FormSteps/StepFunctions.test.js +2 -2
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +27 -16
- package/dist/Services/DraftService.d.ts +23 -0
- package/dist/Services/DraftService.js +30 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +2 -2
- package/dist/Shared/ErkSelect/ErkSelect.js +1 -1
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +1 -1
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.d.ts +1 -0
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.js +2 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.d.ts +12 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.js +20 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.module.css +30 -0
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.d.ts +11 -0
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +58 -0
- package/dist/States/GlobalSlice.d.ts +4 -0
- package/dist/Utils/AxiosAPI.d.ts +10 -0
- package/dist/Utils/AxiosAPI.js +22 -0
- package/dist/Utils/MaterialProviders.d.ts +1 -1
- package/dist/Utils/MaterialProviders.js +1 -1
- package/dist/Utils/StoreContext.d.ts +2 -0
- package/dist/Utils/StoreContext.js +2 -0
- package/dist/Utils/TestUtils.d.ts +8 -2
- package/dist/Utils/TestUtils.js +11 -4
- package/dist/Utils/_api.d.ts +8 -0
- package/dist/Utils/_api.js +15 -0
- package/dist/Utils/store.d.ts +9 -3
- package/dist/Utils/store.js +7 -1
- package/dist/constants/FormStepTypes.d.ts +2 -1
- package/dist/constants/FormStepTypes.js +1 -0
- package/dist/hooks.d.ts +0 -2
- package/dist/hooks.js +1 -2
- package/package.json +17 -17
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { buildCreateApi, coreModule, reactHooksModule } from '@reduxjs/toolkit/query/react';
|
|
2
|
+
import { axiosBaseQuery } from './AxiosAPI';
|
|
3
|
+
import { createDispatchHook, createSelectorHook, createStoreHook } from 'react-redux';
|
|
4
|
+
import { StoreContext } from './StoreContext';
|
|
5
|
+
const customCreateApi = buildCreateApi(coreModule(), reactHooksModule({
|
|
6
|
+
hooks: {
|
|
7
|
+
useDispatch: createDispatchHook(StoreContext),
|
|
8
|
+
useSelector: createSelectorHook(StoreContext),
|
|
9
|
+
useStore: createStoreHook(StoreContext),
|
|
10
|
+
},
|
|
11
|
+
}));
|
|
12
|
+
export const RootApi = customCreateApi({
|
|
13
|
+
baseQuery: axiosBaseQuery(),
|
|
14
|
+
endpoints: () => ({}),
|
|
15
|
+
});
|
package/dist/Utils/store.d.ts
CHANGED
|
@@ -7,11 +7,17 @@ export interface RootState {
|
|
|
7
7
|
site: SiteState;
|
|
8
8
|
widthStats: WidthStats;
|
|
9
9
|
}
|
|
10
|
-
export declare const defaultRootState: RootState;
|
|
11
10
|
export type EurekaFormsState = Record<string, RootState>;
|
|
11
|
+
export declare const defaultRootState: RootState;
|
|
12
12
|
export declare function EurekaFormsReducer(state: EurekaFormsState | undefined, action: AnyAction): EurekaFormsState;
|
|
13
|
-
export declare const store: import("@reduxjs/toolkit").EnhancedStore<
|
|
14
|
-
|
|
13
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
14
|
+
forms: EurekaFormsState;
|
|
15
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
16
|
+
}, import("redux").UnknownAction | AnyAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
17
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
18
|
+
forms: EurekaFormsState;
|
|
19
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
20
|
+
}, undefined, import("redux").UnknownAction>;
|
|
15
21
|
}>, import("redux").StoreEnhancer]>>;
|
|
16
22
|
export type AppDispatch = typeof store.dispatch;
|
|
17
23
|
export type AppStore = typeof store;
|
package/dist/Utils/store.js
CHANGED
|
@@ -2,11 +2,16 @@ import { combineReducers, configureStore, createAsyncThunk } from '@reduxjs/tool
|
|
|
2
2
|
import GlobalSlice from '../States/GlobalSlice';
|
|
3
3
|
import SiteSlice from '../States/SiteSlice';
|
|
4
4
|
import WidthStatsSlice from '../States/WidthStatsSlice';
|
|
5
|
+
import { RootApi } from './_api';
|
|
5
6
|
export const defaultRootState = {
|
|
6
7
|
global: GlobalSlice.getInitialState(),
|
|
7
8
|
site: SiteSlice.getInitialState(),
|
|
8
9
|
widthStats: WidthStatsSlice.getInitialState(),
|
|
9
10
|
};
|
|
11
|
+
const reducer = combineReducers({
|
|
12
|
+
forms: EurekaFormsReducer,
|
|
13
|
+
[RootApi.reducerPath]: RootApi.reducer,
|
|
14
|
+
});
|
|
10
15
|
const FormReducer = combineReducers({
|
|
11
16
|
global: GlobalSlice.reducer,
|
|
12
17
|
site: SiteSlice.reducer,
|
|
@@ -22,7 +27,8 @@ export function EurekaFormsReducer(state = {}, action) {
|
|
|
22
27
|
return { ...state, [idForm]: FormReducer(state[idForm], action) };
|
|
23
28
|
}
|
|
24
29
|
export const store = configureStore({
|
|
25
|
-
reducer:
|
|
30
|
+
reducer: reducer,
|
|
31
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(RootApi.middleware),
|
|
26
32
|
});
|
|
27
33
|
export const getAppState = createAsyncThunk('get/state', ({ idForm }, thunkAPI) => {
|
|
28
34
|
return thunkAPI.getState()[idForm];
|
|
@@ -67,6 +67,7 @@ export var EntityValueDataTypes;
|
|
|
67
67
|
(function (EntityValueDataTypes) {
|
|
68
68
|
EntityValueDataTypes["STEP"] = "STEP";
|
|
69
69
|
EntityValueDataTypes["VALUE"] = "VALUE";
|
|
70
|
+
EntityValueDataTypes["CURRENT_AGENT"] = "CURRENT_AGENT";
|
|
70
71
|
})(EntityValueDataTypes || (EntityValueDataTypes = {}));
|
|
71
72
|
export var ApiSelectorParamTypes;
|
|
72
73
|
(function (ApiSelectorParamTypes) {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { TypedUseSelectorHook } from 'react-redux';
|
|
2
2
|
import { type RootState, type AppDispatch } from './Utils/store';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare const StoreContext: React.Context<any>;
|
|
5
3
|
export declare const useAppDispatch: () => AppDispatch;
|
|
6
4
|
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
7
5
|
export declare const selectBreakPoint: (state: RootState) => number;
|
package/dist/hooks.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createDispatchHook, createSelectorHook } from 'react-redux';
|
|
2
2
|
import { defaultRootState } from './Utils/store';
|
|
3
3
|
import { useContext } from 'react';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
import { IdFormContext } from './Contexts/FormContext';
|
|
6
|
-
|
|
5
|
+
import { StoreContext } from './Utils/StoreContext';
|
|
7
6
|
const useSelector = createSelectorHook(StoreContext);
|
|
8
7
|
const useDispatch = createDispatchHook(StoreContext);
|
|
9
8
|
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
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.
|
|
4
|
+
"version":"3.0.21-refactor",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"watch": "tsc --noEmit --watch --project tsconfig.app.json",
|
|
7
7
|
"start": "vite",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"cypress": "DISPLAY=:0 cypress open"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@reduxjs/toolkit": "^2.
|
|
20
|
-
"axios": "^1.
|
|
19
|
+
"@reduxjs/toolkit": "^2.8.1",
|
|
20
|
+
"axios": "^1.9.0",
|
|
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.
|
|
25
|
-
"logrocket": "^
|
|
26
|
-
"nanoid": "^5.1.
|
|
24
|
+
"libphonenumber-js": "^1.12.8",
|
|
25
|
+
"logrocket": "^10.0.0",
|
|
26
|
+
"nanoid": "^5.1.5",
|
|
27
27
|
"react-draft-wysiwyg": "^1.15.0",
|
|
28
28
|
"react-google-recaptcha": "^3.1.0",
|
|
29
|
-
"react-hook-form": "^7.
|
|
29
|
+
"react-hook-form": "^7.56.3",
|
|
30
30
|
"react-international-phone": "^4.5.0",
|
|
31
31
|
"react-redux": "^9.2.0",
|
|
32
32
|
"typescript": "^5.7.2"
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@eslint/eslintrc": "^3.3.0",
|
|
54
54
|
"@eslint/js": "^9.21.0",
|
|
55
55
|
"@faker-js/faker": "^9.5.1",
|
|
56
|
-
"@mui/material": "^
|
|
57
|
-
"@mui/x-data-grid-pro": "^
|
|
58
|
-
"@mui/x-date-pickers": "^
|
|
59
|
-
"@mui/x-date-pickers-pro": "^
|
|
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
60
|
"@storybook/addon-coverage": "^1.0.5",
|
|
61
61
|
"@storybook/addon-essentials": "^8.6.4",
|
|
62
62
|
"@storybook/addon-interactions": "^8.6.4",
|
|
@@ -79,17 +79,17 @@
|
|
|
79
79
|
"@types/react-google-recaptcha": "^2.1.9",
|
|
80
80
|
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
|
81
81
|
"@typescript-eslint/parser": "^8.26.0",
|
|
82
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
82
|
+
"@vitejs/plugin-react-swc": "^3.9.0",
|
|
83
83
|
"chromatic": "^11.27.0",
|
|
84
84
|
"cypress": "^14.1.0",
|
|
85
85
|
"dotenv-webpack": "^8.1.0",
|
|
86
|
-
"eslint": "^9.
|
|
86
|
+
"eslint": "^9.26.0",
|
|
87
87
|
"eslint-config-prettier": "^10.0.2",
|
|
88
88
|
"eslint-plugin-react": "^7.37.4",
|
|
89
89
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
90
90
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
91
91
|
"eslint-plugin-storybook": "^0.11.4",
|
|
92
|
-
"globals": "^16.
|
|
92
|
+
"globals": "^16.1.0",
|
|
93
93
|
"identity-obj-proxy": "^3.0.0",
|
|
94
94
|
"jsdom": "^26.0.0",
|
|
95
95
|
"prettier": "3.5.3",
|
|
@@ -97,14 +97,14 @@
|
|
|
97
97
|
"react-refresh": "^0.16.0",
|
|
98
98
|
"storybook": "^8.6.4",
|
|
99
99
|
"storybook-mock-date-decorator": "^2.0.6",
|
|
100
|
-
"vite": "^6.
|
|
100
|
+
"vite": "^6.3.5",
|
|
101
101
|
"vite-plugin-svgr": "^4.3.0",
|
|
102
|
-
"vitest": "^3.
|
|
102
|
+
"vitest": "^3.1.3"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"@emotion/react": "^11.x.x",
|
|
106
106
|
"@emotion/styled": "^11.x.x",
|
|
107
|
-
"@mui/material": "^
|
|
107
|
+
"@mui/material": "^7.x.x",
|
|
108
108
|
"@mui/x-date-pickers": "^7.x.x",
|
|
109
109
|
"react": "^18.x.x",
|
|
110
110
|
"react-dom": "^18.x.x"
|