@tsed/react-formio 1.14.0 → 2.0.0
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/coverage.json +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1278 -3685
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +957 -2768
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -5
- package/readme.md +9 -57
- package/src/components/form-edit/useFormEdit.hook.ts +2 -1
- package/src/components/input-tags/inputTags.component.tsx +1 -1
- package/src/components/select/select.component.tsx +1 -1
- package/src/components/table/filters/sliderColumnFilter.component.tsx +2 -2
- package/src/index.ts +3 -2
- package/dist/stores/action/action.actions.d.ts +0 -9
- package/dist/stores/action/action.actions.spec.d.ts +0 -1
- package/dist/stores/action/action.constant.d.ts +0 -1
- package/dist/stores/action/action.reducers.d.ts +0 -7
- package/dist/stores/action/action.reducers.spec.d.ts +0 -1
- package/dist/stores/action/action.selectors.d.ts +0 -2
- package/dist/stores/action/action.selectors.spec.d.ts +0 -1
- package/dist/stores/action/index.d.ts +0 -4
- package/dist/stores/action-info/action-info.actions.d.ts +0 -5
- package/dist/stores/action-info/action-info.actions.spec.d.ts +0 -1
- package/dist/stores/action-info/action-info.constant.d.ts +0 -1
- package/dist/stores/action-info/action-info.reducers.d.ts +0 -7
- package/dist/stores/action-info/action-info.reducers.spec.d.ts +0 -1
- package/dist/stores/action-info/action-info.selectors.d.ts +0 -2
- package/dist/stores/action-info/action-info.selectors.spec.d.ts +0 -1
- package/dist/stores/action-info/index.d.ts +0 -4
- package/dist/stores/actions/actions.actions.d.ts +0 -5
- package/dist/stores/actions/actions.actions.spec.d.ts +0 -1
- package/dist/stores/actions/actions.constant.d.ts +0 -1
- package/dist/stores/actions/actions.reducers.d.ts +0 -8
- package/dist/stores/actions/actions.reducers.spec.d.ts +0 -1
- package/dist/stores/actions/actions.selectors.d.ts +0 -2
- package/dist/stores/actions/actions.selectors.spec.d.ts +0 -1
- package/dist/stores/actions/index.d.ts +0 -4
- package/dist/stores/auth/auth.actions.d.ts +0 -9
- package/dist/stores/auth/auth.constant.d.ts +0 -1
- package/dist/stores/auth/auth.reducers.d.ts +0 -16
- package/dist/stores/auth/auth.reducers.spec.d.ts +0 -1
- package/dist/stores/auth/auth.selectors.d.ts +0 -6
- package/dist/stores/auth/auth.selectors.spec.d.ts +0 -1
- package/dist/stores/auth/auth.utils.d.ts +0 -6
- package/dist/stores/auth/auth.utils.spec.d.ts +0 -1
- package/dist/stores/auth/getAccess.action.d.ts +0 -1
- package/dist/stores/auth/getAccess.action.spec.d.ts +0 -1
- package/dist/stores/auth/getProjectAccess.action.d.ts +0 -1
- package/dist/stores/auth/index.d.ts +0 -10
- package/dist/stores/auth/initAuth.action.d.ts +0 -1
- package/dist/stores/auth/initAuth.action.spec.d.ts +0 -1
- package/dist/stores/auth/logout.action.d.ts +0 -1
- package/dist/stores/auth/logout.action.spec.d.ts +0 -1
- package/dist/stores/auth/setUser.action.d.ts +0 -1
- package/dist/stores/auth/setUser.action.spec.d.ts +0 -1
- package/dist/stores/form/form.actions.d.ts +0 -10
- package/dist/stores/form/form.actions.spec.d.ts +0 -1
- package/dist/stores/form/form.reducers.d.ts +0 -9
- package/dist/stores/form/form.reducers.spec.d.ts +0 -1
- package/dist/stores/form/form.selectors.d.ts +0 -2
- package/dist/stores/form/form.selectors.spec.d.ts +0 -1
- package/dist/stores/form/index.d.ts +0 -3
- package/dist/stores/forms/forms.actions.d.ts +0 -9
- package/dist/stores/forms/forms.actions.spec.d.ts +0 -1
- package/dist/stores/forms/forms.reducers.d.ts +0 -16
- package/dist/stores/forms/forms.reducers.spec.d.ts +0 -1
- package/dist/stores/forms/forms.selectors.d.ts +0 -10
- package/dist/stores/forms/forms.selectors.spec.d.ts +0 -1
- package/dist/stores/forms/index.d.ts +0 -3
- package/dist/stores/index.d.ts +0 -10
- package/dist/stores/index.spec.d.ts +0 -1
- package/dist/stores/root/index.d.ts +0 -1
- package/dist/stores/root/root.selectors.d.ts +0 -5
- package/dist/stores/root/root.selectors.spec.d.ts +0 -1
- package/dist/stores/submission/index.d.ts +0 -3
- package/dist/stores/submission/submission.actions.d.ts +0 -10
- package/dist/stores/submission/submission.actions.spec.d.ts +0 -1
- package/dist/stores/submission/submission.reducers.d.ts +0 -11
- package/dist/stores/submission/submission.reducers.spec.d.ts +0 -1
- package/dist/stores/submission/submission.selectors.d.ts +0 -2
- package/dist/stores/submission/submission.selectors.spec.d.ts +0 -1
- package/dist/stores/submissions/index.d.ts +0 -3
- package/dist/stores/submissions/submissions.actions.d.ts +0 -6
- package/dist/stores/submissions/submissions.actions.spec.d.ts +0 -1
- package/dist/stores/submissions/submissions.reducers.d.ts +0 -17
- package/dist/stores/submissions/submissions.reducers.spec.d.ts +0 -1
- package/dist/stores/submissions/submissions.selectors.d.ts +0 -9
- package/dist/stores/submissions/submissions.selectors.spec.d.ts +0 -1
- package/dist/utils/clean.d.ts +0 -1
- package/dist/utils/clean.test.d.ts +0 -1
- package/dist/utils/mapRequestParams.d.ts +0 -9
- package/dist/utils/mapRequestParams.test.d.ts +0 -1
- package/dist/utils/url.d.ts +0 -3
- package/dist/utils/url.test.d.ts +0 -1
- package/src/stores/action/action.actions.spec.ts +0 -114
- package/src/stores/action/action.actions.ts +0 -82
- package/src/stores/action/action.constant.ts +0 -1
- package/src/stores/action/action.reducers.spec.ts +0 -91
- package/src/stores/action/action.reducers.ts +0 -54
- package/src/stores/action/action.selectors.spec.ts +0 -19
- package/src/stores/action/action.selectors.ts +0 -6
- package/src/stores/action/index.ts +0 -4
- package/src/stores/action-info/action-info.actions.spec.ts +0 -46
- package/src/stores/action-info/action-info.actions.ts +0 -32
- package/src/stores/action-info/action-info.constant.ts +0 -1
- package/src/stores/action-info/action-info.reducers.spec.ts +0 -60
- package/src/stores/action-info/action-info.reducers.ts +0 -44
- package/src/stores/action-info/action-info.selectors.spec.ts +0 -19
- package/src/stores/action-info/action-info.selectors.ts +0 -7
- package/src/stores/action-info/index.ts +0 -4
- package/src/stores/actions/actions.actions.spec.ts +0 -62
- package/src/stores/actions/actions.actions.ts +0 -34
- package/src/stores/actions/actions.constant.ts +0 -1
- package/src/stores/actions/actions.reducers.spec.ts +0 -62
- package/src/stores/actions/actions.reducers.ts +0 -48
- package/src/stores/actions/actions.selectors.spec.ts +0 -34
- package/src/stores/actions/actions.selectors.ts +0 -7
- package/src/stores/actions/index.ts +0 -4
- package/src/stores/auth/auth.actions.ts +0 -13
- package/src/stores/auth/auth.constant.ts +0 -1
- package/src/stores/auth/auth.reducers.spec.ts +0 -376
- package/src/stores/auth/auth.reducers.ts +0 -151
- package/src/stores/auth/auth.selectors.spec.ts +0 -47
- package/src/stores/auth/auth.selectors.ts +0 -14
- package/src/stores/auth/auth.utils.spec.ts +0 -29
- package/src/stores/auth/auth.utils.tsx +0 -37
- package/src/stores/auth/getAccess.action.spec.ts +0 -257
- package/src/stores/auth/getAccess.action.ts +0 -57
- package/src/stores/auth/getProjectAccess.action.ts +0 -25
- package/src/stores/auth/index.ts +0 -10
- package/src/stores/auth/initAuth.action.spec.ts +0 -56
- package/src/stores/auth/initAuth.action.ts +0 -29
- package/src/stores/auth/logout.action.spec.ts +0 -25
- package/src/stores/auth/logout.action.ts +0 -9
- package/src/stores/auth/setUser.action.spec.ts +0 -25
- package/src/stores/auth/setUser.action.ts +0 -9
- package/src/stores/form/form.actions.spec.ts +0 -203
- package/src/stores/form/form.actions.ts +0 -84
- package/src/stores/form/form.reducers.spec.ts +0 -78
- package/src/stores/form/form.reducers.ts +0 -59
- package/src/stores/form/form.selectors.spec.ts +0 -19
- package/src/stores/form/form.selectors.ts +0 -5
- package/src/stores/form/index.ts +0 -3
- package/src/stores/forms/forms.actions.spec.ts +0 -91
- package/src/stores/forms/forms.actions.ts +0 -44
- package/src/stores/forms/forms.reducers.spec.ts +0 -97
- package/src/stores/forms/forms.reducers.ts +0 -77
- package/src/stores/forms/forms.selectors.spec.ts +0 -39
- package/src/stores/forms/forms.selectors.ts +0 -6
- package/src/stores/forms/index.ts +0 -3
- package/src/stores/index.spec.ts +0 -125
- package/src/stores/index.ts +0 -33
- package/src/stores/root/index.ts +0 -1
- package/src/stores/root/root.selectors.spec.ts +0 -94
- package/src/stores/root/root.selectors.ts +0 -23
- package/src/stores/submission/index.ts +0 -3
- package/src/stores/submission/submission.actions.spec.ts +0 -214
- package/src/stores/submission/submission.actions.ts +0 -81
- package/src/stores/submission/submission.reducers.spec.ts +0 -96
- package/src/stores/submission/submission.reducers.ts +0 -70
- package/src/stores/submission/submission.selectors.spec.ts +0 -19
- package/src/stores/submission/submission.selectors.ts +0 -5
- package/src/stores/submissions/index.ts +0 -3
- package/src/stores/submissions/submissions.actions.spec.ts +0 -99
- package/src/stores/submissions/submissions.actions.ts +0 -38
- package/src/stores/submissions/submissions.reducers.spec.ts +0 -98
- package/src/stores/submissions/submissions.reducers.ts +0 -78
- package/src/stores/submissions/submissions.selectors.spec.ts +0 -39
- package/src/stores/submissions/submissions.selectors.ts +0 -6
- package/src/utils/clean.test.ts +0 -7
- package/src/utils/clean.ts +0 -12
- package/src/utils/mapRequestParams.test.ts +0 -81
- package/src/utils/mapRequestParams.ts +0 -36
- package/src/utils/url.test.ts +0 -31
- package/src/utils/url.ts +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/react-formio",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Provide a react formio wrapper. Written in TypeScript.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.modern.js",
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
"watch": "microbundle watch --no-compress --format modern,cjs --jsx React.createElement --jsxFragment React.Fragment --globals react/jsx-runtime=jsx"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@tsed/redux-utils": "1.14.0",
|
|
18
17
|
"eventemitter2": "^6.4.3",
|
|
19
18
|
"prop-types": "^15.7.2"
|
|
20
19
|
},
|
|
21
20
|
"peerDependencies": {
|
|
22
|
-
"choices.js": ">=
|
|
21
|
+
"@formio/choices.js": ">=10.2.0",
|
|
23
22
|
"formiojs": ">=4.0.0",
|
|
24
23
|
"lodash": ">=4.17.20",
|
|
25
24
|
"prop-types": ">=15.7.2",
|
|
@@ -29,8 +28,8 @@
|
|
|
29
28
|
"tooltip.js": ">=1.3.3"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
|
-
"@tsed/tailwind": "
|
|
33
|
-
"@tsed/tailwind-formio": "
|
|
31
|
+
"@tsed/tailwind": "2.0.0",
|
|
32
|
+
"@tsed/tailwind-formio": "2.0.0"
|
|
34
33
|
},
|
|
35
34
|
"repository": "https://github.com/TypedProject/tsed-formio",
|
|
36
35
|
"bugs": {
|
package/readme.md
CHANGED
|
@@ -53,6 +53,15 @@ See our [storybook](https://formio.tsed.io/) to see all available components.
|
|
|
53
53
|
- TypeScript support.
|
|
54
54
|
- Tailwind support.
|
|
55
55
|
|
|
56
|
+
## Migrate from v1
|
|
57
|
+
|
|
58
|
+
If you use redux actions from v1, you have to install `@tsed/redux-formio-stores` and remplace your imports:
|
|
59
|
+
|
|
60
|
+
```diff
|
|
61
|
+
- import { defaultFormioReducer, formsReducer } from "@tsed/react-formio";
|
|
62
|
+
+ import { defaultFormioReducer, formsReducer } from "@tsed/react-formio-stores";
|
|
63
|
+
```
|
|
64
|
+
|
|
56
65
|
## Install
|
|
57
66
|
|
|
58
67
|
`@tsed/react-formio` can be used on the server, or bundled for the client using an
|
|
@@ -262,63 +271,6 @@ The submisison grid will render a list of submissions and allow clicking on one
|
|
|
262
271
|
| `data` | array of submissions | [] | A list of submissions to be rendered in the grid. |
|
|
263
272
|
| `form` | object | {} | The form definition for the submissions. This is used to render the submissions. |
|
|
264
273
|
|
|
265
|
-
## Redux
|
|
266
|
-
|
|
267
|
-
@tsed/react-formio contain Redux actions, reducers and selectors to simplify the API requests made for `form.io` forms.
|
|
268
|
-
reducers, actions and selectors.
|
|
269
|
-
The following reducers have names:
|
|
270
|
-
|
|
271
|
-
- formsReducers: manage the forms,
|
|
272
|
-
- formReducers: manage the current form,
|
|
273
|
-
- submissionsReducers: manage the submissions of a form.
|
|
274
|
-
- submissionReducers: manage the current submission of a form
|
|
275
|
-
|
|
276
|
-
This provides namespaces so the same actions and reducers can be re-used within the same redux state.
|
|
277
|
-
|
|
278
|
-
In addition, the package provides the follwing reducers
|
|
279
|
-
|
|
280
|
-
- actionsReducers: Manage actions of a form.
|
|
281
|
-
- actionReducers: Manage the current action of a form.
|
|
282
|
-
- actionInfoReducers: Manage the available actions for all forms and resources.
|
|
283
|
-
- authReducers: Manage formio authentication.
|
|
284
|
-
|
|
285
|
-
By default, `@tsed/react-formio` provides defaults combined reducers as following:
|
|
286
|
-
|
|
287
|
-
```typescript
|
|
288
|
-
export const defaultFormioReducer = combine(
|
|
289
|
-
authReducer,
|
|
290
|
-
actionsReducer,
|
|
291
|
-
actionReducer,
|
|
292
|
-
actionInfoReducer,
|
|
293
|
-
formReducer("form"),
|
|
294
|
-
formsReducer("forms", { query: { type: "form" } }),
|
|
295
|
-
formReducer("resource"),
|
|
296
|
-
formsReducer("resources", { query: { type: "resource" } }),
|
|
297
|
-
submissionReducer("submission"),
|
|
298
|
-
submissionsReducer("submissions")
|
|
299
|
-
);
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
This `defaultFormioReducer` can be added and configured in your rootReducer as following :
|
|
303
|
-
|
|
304
|
-
```typescript
|
|
305
|
-
import { combine } from "@tsed/redux-utils";
|
|
306
|
-
import { defaultFormioReducer, formsReducer } from "@tsed/react-formio";
|
|
307
|
-
import { connectRouter } from "connected-react-router";
|
|
308
|
-
import { combineReducers } from "redux";
|
|
309
|
-
|
|
310
|
-
export const rootReducers = (history: any) =>
|
|
311
|
-
combineReducers({
|
|
312
|
-
router: connectRouter(history),
|
|
313
|
-
...defaultFormioReducer,
|
|
314
|
-
// override defaultFormioReducer can done as following
|
|
315
|
-
...combine(
|
|
316
|
-
formsReducer("forms", { query: { type: "form", tags: ["common"] } }), // return only forms with the common tags
|
|
317
|
-
formsReducer("resources", { query: { type: "resource", tags: ["common"] } }) // return only resources with the common tags
|
|
318
|
-
)
|
|
319
|
-
});
|
|
320
|
-
```
|
|
321
|
-
|
|
322
274
|
## Contributors
|
|
323
275
|
|
|
324
276
|
Please read [contributing guidelines here](./CONTRIBUTING.md).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
1
2
|
import { useEffect, useReducer } from "react";
|
|
2
3
|
|
|
3
4
|
import { FormSchema } from "../../interfaces/FormSchema";
|
|
@@ -47,7 +48,7 @@ export function useFormEdit(props: UseFormEditHookProps) {
|
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
return {
|
|
50
|
-
form: current,
|
|
51
|
+
form: cloneDeep(current),
|
|
51
52
|
redo,
|
|
52
53
|
undo,
|
|
53
54
|
reset,
|
|
@@ -8,8 +8,8 @@ export function SliderColumnFilter<D extends Record<string, unknown> = {}>({
|
|
|
8
8
|
let min = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
|
|
9
9
|
let max = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
|
|
10
10
|
preFilteredRows.forEach((row) => {
|
|
11
|
-
min = Math.min(row
|
|
12
|
-
max = Math.max(row
|
|
11
|
+
min = Math.min(row?.values[id], min);
|
|
12
|
+
max = Math.max(row?.values[id], max);
|
|
13
13
|
});
|
|
14
14
|
return [min, max];
|
|
15
15
|
}, [id, preFilteredRows]);
|
package/src/index.ts
CHANGED
|
@@ -13,7 +13,8 @@ export {
|
|
|
13
13
|
export * from "./components";
|
|
14
14
|
export * from "./hooks/useTooltip";
|
|
15
15
|
export * from "./interfaces";
|
|
16
|
-
export * from "./
|
|
16
|
+
export * from "./utils/callLast";
|
|
17
17
|
export * from "./utils/iconClass";
|
|
18
|
-
export * from "./utils/
|
|
18
|
+
export * from "./utils/mapPagination";
|
|
19
|
+
export * from "./utils/stopPropagationWrapper";
|
|
19
20
|
export { Components, Formio, Templates, Utils } from "formiojs";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const clearActionError: import("@tsed/redux-utils").ActionReducer<any>;
|
|
2
|
-
export declare const resetAction: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const requestAction: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const receiveAction: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const failAction: import("@tsed/redux-utils").ActionReducer<any>;
|
|
6
|
-
export declare const sendAction: import("@tsed/redux-utils").ActionReducer<any>;
|
|
7
|
-
export declare const getAction: (formId: string, actionId: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
8
|
-
export declare const saveAction: (formId: string, action: any, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
9
|
-
export declare const deleteAction: (formId: string, actionId: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ACTION = "action";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const resetActionInfo: import("@tsed/redux-utils").ActionReducer<any>;
|
|
2
|
-
export declare const requestActionInfo: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const receiveActionInfo: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const failActionInfo: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const getActionInfo: (formId: string, actionType: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ACTION_INFO = "actionInfo";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const resetActions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
2
|
-
export declare const requestActions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const receiveActions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const failActions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const getActions: (id: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ACTIONS = "actions";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionInfoSchema, ActionSchema } from "../../interfaces";
|
|
2
|
-
export interface ActionsState {
|
|
3
|
-
error: null | Error;
|
|
4
|
-
data: ActionSchema[];
|
|
5
|
-
availableActions: ActionInfoSchema[];
|
|
6
|
-
isActive: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const actionsReducer: import("@tsed/redux-utils").ReduceFunction<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const requestUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
2
|
-
export declare const receiveUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const failUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const logoutUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const submissionAccessUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
6
|
-
export declare const formAccessUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
7
|
-
export declare const projectAccessUser: import("@tsed/redux-utils").ActionReducer<any>;
|
|
8
|
-
export declare const userRoles: import("@tsed/redux-utils").ActionReducer<any>;
|
|
9
|
-
export declare const userForms: import("@tsed/redux-utils").ActionReducer<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AUTH = "auth";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FormSchema, Submission } from "../../interfaces";
|
|
2
|
-
import { RoleSchema } from "../../interfaces/RoleSchema";
|
|
3
|
-
export interface AuthState<User = any> {
|
|
4
|
-
init: boolean;
|
|
5
|
-
isActive: boolean;
|
|
6
|
-
user: null | Submission<User>;
|
|
7
|
-
authenticated: boolean;
|
|
8
|
-
projectAccess: Record<string, string[]>;
|
|
9
|
-
formAccess: Record<string, string[]>;
|
|
10
|
-
submissionAccess: Record<string, string[]>;
|
|
11
|
-
roles: Record<string, RoleSchema>;
|
|
12
|
-
forms: Record<string, FormSchema>;
|
|
13
|
-
is: Record<string, boolean>;
|
|
14
|
-
error: null | Error;
|
|
15
|
-
}
|
|
16
|
-
export declare const authReducer: import("@tsed/redux-utils").ReduceFunction<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RoleSchema, Submission } from "../../interfaces";
|
|
2
|
-
import { AuthState } from "./auth.reducers";
|
|
3
|
-
export declare const selectAuth: (state: any) => AuthState<any>;
|
|
4
|
-
export declare const selectUser: <User = any>(state: any) => Submission<User> | null;
|
|
5
|
-
export declare const selectRoles: (state: any) => Record<string, RoleSchema>;
|
|
6
|
-
export declare const selectIsAuthenticated: (state: any) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from "../../interfaces/FormSchema";
|
|
2
|
-
import { AuthState } from "./auth.reducers";
|
|
3
|
-
export declare function hasRole(auth: AuthState, role: string): boolean;
|
|
4
|
-
export declare function hasRoles(auth: AuthState, roles: string[]): boolean;
|
|
5
|
-
export declare function isAuthorized(auth: AuthState, roles?: string[]): boolean;
|
|
6
|
-
export declare function checkRoleFormAccess(auth: AuthState, form?: Partial<FormSchema>, roles?: string[]): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getAccess(dispatch: any): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getProjectAccess(dispatch: any): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./auth.actions";
|
|
2
|
-
export * from "./auth.constant";
|
|
3
|
-
export * from "./auth.reducers";
|
|
4
|
-
export * from "./auth.selectors";
|
|
5
|
-
export * from "./auth.utils";
|
|
6
|
-
export * from "./getAccess.action";
|
|
7
|
-
export * from "./getProjectAccess.action";
|
|
8
|
-
export * from "./initAuth.action";
|
|
9
|
-
export * from "./logout.action";
|
|
10
|
-
export * from "./setUser.action";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const initAuth: (done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const logout: () => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const setUser: (user: any) => (dispatch: any) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from "../../interfaces";
|
|
2
|
-
export declare const clearFormError: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const requestForm: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const receiveForm: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const failForm: import("@tsed/redux-utils").ActionReducer<any>;
|
|
6
|
-
export declare const resetForm: import("@tsed/redux-utils").ActionReducer<any>;
|
|
7
|
-
export declare const sendForm: import("@tsed/redux-utils").ActionReducer<any>;
|
|
8
|
-
export declare const getForm: (name: string, id?: string, done?: (...args: any[]) => void) => (dispatch: any, getState: any) => Promise<void>;
|
|
9
|
-
export declare const saveForm: (name: string, form: Partial<FormSchema>, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
10
|
-
export declare const deleteForm: (name: string, id: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from "../../interfaces";
|
|
2
|
-
export interface FormState {
|
|
3
|
-
error: null | Error;
|
|
4
|
-
data?: Partial<FormSchema>;
|
|
5
|
-
isActive: boolean;
|
|
6
|
-
lastUpdated: number;
|
|
7
|
-
url: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const formReducer: import("@tsed/redux-utils").SandboxReducers<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from "../../interfaces";
|
|
2
|
-
import type { RequestParamsOptions } from "../../utils/mapRequestParams";
|
|
3
|
-
export declare const resetForms: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const requestForms: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const receiveForms: import("@tsed/redux-utils").ActionReducer<any>;
|
|
6
|
-
export declare const failForms: import("@tsed/redux-utils").ActionReducer<any>;
|
|
7
|
-
export declare type GetFormsCB = (err: any, forms?: FormSchema[]) => void;
|
|
8
|
-
export declare const getForms: (name: string, parameters: Partial<RequestParamsOptions>, done?: GetFormsCB) => (dispatch: any, getState: any) => Promise<void>;
|
|
9
|
-
export declare const refreshForms: (name: string, done?: (...args: any[]) => void) => (dispatch: any, getState: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from "../../interfaces";
|
|
2
|
-
export interface FormsState {
|
|
3
|
-
error: null | Error;
|
|
4
|
-
isActive: boolean;
|
|
5
|
-
parameters: {
|
|
6
|
-
pageSize: number;
|
|
7
|
-
pageIndex: number;
|
|
8
|
-
pageCount: number;
|
|
9
|
-
query: any;
|
|
10
|
-
select: any;
|
|
11
|
-
sortBy: any[];
|
|
12
|
-
filters: any[];
|
|
13
|
-
};
|
|
14
|
-
data: FormSchema[];
|
|
15
|
-
}
|
|
16
|
-
export declare const formsReducer: import("@tsed/redux-utils").SandboxReducers<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const selectForms: (name: string, state: any) => import("../..").FormSchema[];
|
|
2
|
-
export declare const selectFormsParameters: (name: string, state: any) => {
|
|
3
|
-
pageSize: number;
|
|
4
|
-
pageIndex: number;
|
|
5
|
-
pageCount: number;
|
|
6
|
-
query: any;
|
|
7
|
-
select: any;
|
|
8
|
-
sortBy: any[];
|
|
9
|
-
filters: any[];
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/stores/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./action";
|
|
2
|
-
export * from "./action-info";
|
|
3
|
-
export * from "./actions";
|
|
4
|
-
export * from "./auth";
|
|
5
|
-
export * from "./form";
|
|
6
|
-
export * from "./forms";
|
|
7
|
-
export * from "./root";
|
|
8
|
-
export * from "./submission";
|
|
9
|
-
export * from "./submissions";
|
|
10
|
-
export declare const defaultFormioReducer: Record<string, import("@tsed/redux-utils").ReduceFunction<any, any>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./root.selectors";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function selectRoot<State = Record<string, any>>(name: string): (state: Record<string, any>) => State;
|
|
2
|
-
export declare function selectRoot<State = Record<string, any>>(name: string, state: Record<string, any>): State;
|
|
3
|
-
export declare const selectError: (name: string, state: Record<string, any>) => null | Error;
|
|
4
|
-
export declare const selectIsActive: (name: string, state: Record<string, any>) => boolean;
|
|
5
|
-
export declare function oneOfIsActive(...names: string[]): (state: any) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Submission } from "../../interfaces";
|
|
2
|
-
export declare const clearSubmissionError: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const requestSubmission: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const sendSubmission: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const receiveSubmission: import("@tsed/redux-utils").ActionReducer<any>;
|
|
6
|
-
export declare const failSubmission: import("@tsed/redux-utils").ActionReducer<any>;
|
|
7
|
-
export declare const resetSubmission: import("@tsed/redux-utils").ActionReducer<any>;
|
|
8
|
-
export declare const getSubmission: (name: string, formId: string, id: string, done?: (...args: any[]) => void) => (dispatch: any, getState: any) => Promise<void>;
|
|
9
|
-
export declare const saveSubmission: (name: string, formId: string, data: Submission, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
10
|
-
export declare const deleteSubmission: (name: string, formId: string, id: string, done?: (...args: any[]) => void) => (dispatch: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Submission } from "../../interfaces";
|
|
2
|
-
export interface SubmissionState {
|
|
3
|
-
formId: string;
|
|
4
|
-
id: string;
|
|
5
|
-
isActive: boolean;
|
|
6
|
-
lastUpdated: number;
|
|
7
|
-
data: Partial<Submission>;
|
|
8
|
-
url: string;
|
|
9
|
-
error: null | Error;
|
|
10
|
-
}
|
|
11
|
-
export declare const submissionReducer: import("@tsed/redux-utils").SandboxReducers<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const resetSubmissions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
2
|
-
export declare const requestSubmissions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
3
|
-
export declare const receiveSubmissions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
4
|
-
export declare const failSubmissions: import("@tsed/redux-utils").ActionReducer<any>;
|
|
5
|
-
export declare const getSubmissions: (name: string, formId: string, parameters?: any, done?: (...args: any[]) => void) => (dispatch: any, getState: any) => Promise<void>;
|
|
6
|
-
export declare const refreshSubmissions: (name: string, formId: string, done?: (...args: any[]) => void) => (dispatch: any, getState: any) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Submission } from "../../interfaces/Submission";
|
|
2
|
-
export interface SubmissionsState {
|
|
3
|
-
error: null | Error;
|
|
4
|
-
formId: string;
|
|
5
|
-
isActive: boolean;
|
|
6
|
-
parameters: {
|
|
7
|
-
pageSize: number;
|
|
8
|
-
pageIndex: number;
|
|
9
|
-
pageCount: number;
|
|
10
|
-
query: any;
|
|
11
|
-
select: any;
|
|
12
|
-
sortBy: any[];
|
|
13
|
-
};
|
|
14
|
-
data: Submission[];
|
|
15
|
-
}
|
|
16
|
-
export declare function createInitialState({ pageIndex, pageSize, query, select, sortBy }?: any): SubmissionsState;
|
|
17
|
-
export declare const submissionsReducer: import("@tsed/redux-utils").SandboxReducers<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const selectSubmissions: (name: string, state: any) => import("../..").Submission<any>[];
|
|
2
|
-
export declare const selectSubmissionsParameters: (name: string, state: any) => {
|
|
3
|
-
pageSize: number;
|
|
4
|
-
pageIndex: number;
|
|
5
|
-
pageCount: number;
|
|
6
|
-
query: any;
|
|
7
|
-
select: any;
|
|
8
|
-
sortBy: any[];
|
|
9
|
-
};
|