@ws-ui/store 0.1.37 → 0.1.38-20240628
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/index.cjs.js +31 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4174 -4142
- package/dist/index.es.js.map +1 -1
- package/dist/modules/root/thunks.d.ts +2 -2
- package/dist/modules/shared-datasources/thunks.d.ts +1 -0
- package/dist/modules/webforms/reducer.d.ts +33 -6
- package/dist/modules/webforms/thunks.d.ts +23 -6
- package/dist/modules/webforms/types.d.ts +21 -6
- package/dist/selectors/webforms.d.ts +13 -4
- package/dist/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
-
import {
|
|
2
|
+
import { IFileInfoResponse, IMultilineMessage, INodeInfo, ITab } from '@ws-ui/shared';
|
|
3
3
|
import { AppState } from '..';
|
|
4
4
|
import { ClassFileTypes, TActionRenameDataSource } from './types';
|
|
5
5
|
export declare const fetchFiles: import("@reduxjs/toolkit").AsyncThunk<{
|
|
6
6
|
name: string;
|
|
7
|
-
type: FileFolderTypeWithContent;
|
|
7
|
+
type: import("@ws-ui/shared").FileFolderTypeWithContent;
|
|
8
8
|
date: string;
|
|
9
9
|
path: string;
|
|
10
10
|
}[], void, {}>;
|
|
@@ -3,6 +3,7 @@ import { ISharedDatasourcesResponse } from '@ws-ui/shared';
|
|
|
3
3
|
import { AppState } from '../../modules';
|
|
4
4
|
export declare const fetchSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, void, {
|
|
5
5
|
rejectValue: string;
|
|
6
|
+
state: AppState;
|
|
6
7
|
}>;
|
|
7
8
|
export declare const addSharedSource: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, datasources.ICreateDataSource, {
|
|
8
9
|
rejectValue: string;
|
|
@@ -11,20 +11,26 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<IWebformEditorState,
|
|
|
11
11
|
editComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: PayloadAction<{
|
|
12
12
|
id: string;
|
|
13
13
|
changes: Partial<IComponentTemplate>;
|
|
14
|
+
type: 'webform' | 'report';
|
|
14
15
|
}>) => void;
|
|
15
16
|
removeComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TRemoveComponentAction) => void;
|
|
16
17
|
setSelectedGroup: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
17
18
|
payload: {
|
|
18
19
|
selectedGroup: string;
|
|
20
|
+
type: 'webform' | 'report';
|
|
19
21
|
};
|
|
20
22
|
}) => void;
|
|
21
23
|
setTemplatesData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
22
|
-
payload:
|
|
24
|
+
payload: {
|
|
25
|
+
webformTemplates: ITemplatedGroup[];
|
|
26
|
+
reportTemplates: ITemplatedGroup[];
|
|
27
|
+
};
|
|
23
28
|
}) => void;
|
|
24
29
|
setTemplateData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
25
30
|
payload: {
|
|
26
31
|
group: string;
|
|
27
32
|
components: ITemplatedGroupItem[];
|
|
33
|
+
type: 'webform' | 'report';
|
|
28
34
|
};
|
|
29
35
|
}) => void;
|
|
30
36
|
setDatasourcesTheme: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
@@ -32,22 +38,43 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<IWebformEditorState,
|
|
|
32
38
|
}) => void;
|
|
33
39
|
setWebformsFlag(state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
34
40
|
payload: {
|
|
35
|
-
[key: string]:
|
|
41
|
+
[key: string]: boolean;
|
|
36
42
|
};
|
|
37
43
|
type: string;
|
|
38
44
|
}): void;
|
|
45
|
+
setCraftedComponentData(state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
46
|
+
payload: {
|
|
47
|
+
webform: IComponentTemplate[];
|
|
48
|
+
report: IComponentTemplate[];
|
|
49
|
+
};
|
|
50
|
+
}): void;
|
|
39
51
|
}, "webforms">;
|
|
40
52
|
export declare const toggleInspector: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
41
53
|
type: "css" | "datasource";
|
|
42
|
-
}, string>, inspect: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").TToggleInspectorPayload, string>, addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
54
|
+
}, string>, inspect: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").TToggleInspectorPayload, string>, addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
55
|
+
component: IComponentTemplate;
|
|
56
|
+
type: "webform" | "report";
|
|
57
|
+
}, string>, editComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
43
58
|
id: string;
|
|
44
59
|
changes: Partial<IComponentTemplate>;
|
|
45
|
-
|
|
60
|
+
type: 'webform' | 'report';
|
|
61
|
+
}, string>, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
62
|
+
id: string;
|
|
63
|
+
type: "webform" | "report";
|
|
64
|
+
}, string>, setSelectedGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
65
|
selectedGroup: string;
|
|
47
|
-
|
|
66
|
+
type: 'webform' | 'report';
|
|
67
|
+
}, string>, setTemplatesData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
68
|
+
webformTemplates: ITemplatedGroup[];
|
|
69
|
+
reportTemplates: ITemplatedGroup[];
|
|
70
|
+
}, string>, setTemplateData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
48
71
|
group: string;
|
|
49
72
|
components: ITemplatedGroupItem[];
|
|
73
|
+
type: 'webform' | 'report';
|
|
50
74
|
}, string>, setDatasourcesTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | number, string>, setWebformsFlag: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
51
|
-
[key: string]:
|
|
75
|
+
[key: string]: boolean;
|
|
76
|
+
}, string>, setCraftedComponentData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
77
|
+
webform: IComponentTemplate[];
|
|
78
|
+
report: IComponentTemplate[];
|
|
52
79
|
}, string>;
|
|
53
80
|
export default stateSlice;
|
|
@@ -4,21 +4,38 @@ import { IComponentTemplate, OrNull } from '@ws-ui/shared';
|
|
|
4
4
|
import { AsyncThunkConfig } from '../../hooks/store';
|
|
5
5
|
import { AppState } from '..';
|
|
6
6
|
import { ITemplatedGroup, ITemplatedGroupItem } from './types';
|
|
7
|
-
export declare const fetchTemplates: import("@reduxjs/toolkit").AsyncThunk<
|
|
7
|
+
export declare const fetchTemplates: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
|
+
webform: {
|
|
9
|
+
data: ITemplatedGroup[];
|
|
10
|
+
selectedGroup: string;
|
|
11
|
+
};
|
|
12
|
+
report: {
|
|
13
|
+
data: ITemplatedGroup[];
|
|
14
|
+
selectedGroup: string;
|
|
15
|
+
};
|
|
16
|
+
}, void, {
|
|
8
17
|
state: AppState;
|
|
9
18
|
}>;
|
|
10
19
|
export declare const fetchTemplate: import("@reduxjs/toolkit").AsyncThunk<ITemplatedGroupItem[], {
|
|
11
20
|
name: string;
|
|
21
|
+
type: 'webform' | 'report';
|
|
12
22
|
}, {
|
|
13
23
|
state: AppState;
|
|
14
24
|
}>;
|
|
15
|
-
export declare const fetchCraftedComponents: import("@reduxjs/toolkit").AsyncThunk<
|
|
16
|
-
export declare const addCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined,
|
|
25
|
+
export declare const fetchCraftedComponents: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
26
|
+
export declare const addCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
27
|
+
component: IComponentTemplate;
|
|
28
|
+
type: 'webform' | 'report';
|
|
29
|
+
}, {}>;
|
|
17
30
|
export declare const editCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
18
31
|
id: string;
|
|
19
32
|
changes: Partial<IComponentTemplate>;
|
|
33
|
+
type: 'webform' | 'report';
|
|
34
|
+
}, {}>;
|
|
35
|
+
export declare const removeCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
36
|
+
id: string;
|
|
37
|
+
type: 'webform' | 'report';
|
|
20
38
|
}, {}>;
|
|
21
|
-
export declare const removeCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, string, {}>;
|
|
22
39
|
type TDatasourcesReturnType = {
|
|
23
40
|
path: string;
|
|
24
41
|
namespace: string;
|
|
@@ -32,12 +49,12 @@ export declare const addDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatas
|
|
|
32
49
|
type TEditDatasource = {
|
|
33
50
|
id: string;
|
|
34
51
|
path: string;
|
|
35
|
-
value:
|
|
52
|
+
value: unknown;
|
|
36
53
|
property: string;
|
|
37
54
|
namespace: string;
|
|
38
55
|
};
|
|
39
56
|
export declare const editDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatasourcesReturnType | undefined, TEditDatasource, AsyncThunkConfig>;
|
|
40
|
-
export declare const isRenameDatasource: (action: PayloadAction<
|
|
57
|
+
export declare const isRenameDatasource: (action: PayloadAction<unknown>) => action is {
|
|
41
58
|
payload: TRenameDatasource;
|
|
42
59
|
type: string;
|
|
43
60
|
};
|
|
@@ -18,18 +18,27 @@ export type ITemplateList = Record<string, {
|
|
|
18
18
|
hide: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
export interface ITemplatedComponent {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
webform: {
|
|
22
|
+
selectedGroup: string;
|
|
23
|
+
data: ITemplatedGroup[];
|
|
24
|
+
};
|
|
25
|
+
report: {
|
|
26
|
+
selectedGroup: string;
|
|
27
|
+
data: ITemplatedGroup[];
|
|
28
|
+
};
|
|
23
29
|
}
|
|
24
30
|
export interface IWebformEditorState {
|
|
25
31
|
inspector: IInspectorState;
|
|
26
|
-
components:
|
|
32
|
+
components: {
|
|
33
|
+
webform: IComponentTemplate[];
|
|
34
|
+
report: IComponentTemplate[];
|
|
35
|
+
};
|
|
27
36
|
templates: ITemplatedComponent;
|
|
28
37
|
datasources: {
|
|
29
38
|
theme: TDatasourceTheme;
|
|
30
39
|
};
|
|
31
40
|
flags: {
|
|
32
|
-
[key: string]:
|
|
41
|
+
[key: string]: boolean;
|
|
33
42
|
};
|
|
34
43
|
}
|
|
35
44
|
/**
|
|
@@ -67,5 +76,11 @@ export type TInspectAction = PayloadAction<TToggleInspectorPayload>;
|
|
|
67
76
|
/**
|
|
68
77
|
* Components actions
|
|
69
78
|
*/
|
|
70
|
-
export type TAddComponentAction = PayloadAction<
|
|
71
|
-
|
|
79
|
+
export type TAddComponentAction = PayloadAction<{
|
|
80
|
+
component: IComponentTemplate;
|
|
81
|
+
type: 'webform' | 'report';
|
|
82
|
+
}>;
|
|
83
|
+
export type TRemoveComponentAction = PayloadAction<{
|
|
84
|
+
id: string;
|
|
85
|
+
type: 'webform' | 'report';
|
|
86
|
+
}>;
|
|
@@ -77,7 +77,13 @@ export declare const selectComponents: ((state: import("redux").EmptyObject & {
|
|
|
77
77
|
modals: import("../modules").IModalsState;
|
|
78
78
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
79
79
|
model: import("../modules").IModelState;
|
|
80
|
-
}) =>
|
|
80
|
+
}) => {
|
|
81
|
+
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
82
|
+
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
83
|
+
}) & import("reselect").OutputSelectorFields<(args_0: import("../modules").IWebformEditorState) => {
|
|
84
|
+
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
85
|
+
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
86
|
+
}, {
|
|
81
87
|
clearCache: () => void;
|
|
82
88
|
}> & {
|
|
83
89
|
clearCache: () => void;
|
|
@@ -282,12 +288,12 @@ export declare const selectTemplatesData: ((state: import("redux").EmptyObject &
|
|
|
282
288
|
modals: import("../modules").IModalsState;
|
|
283
289
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
284
290
|
model: import("../modules").IModelState;
|
|
285
|
-
}) => import("../modules").
|
|
291
|
+
}) => import("../modules").ITemplatedComponent) & import("reselect").OutputSelectorFields<(args_0: import("../modules").ITemplatedComponent) => import("../modules").ITemplatedComponent, {
|
|
286
292
|
clearCache: () => void;
|
|
287
293
|
}> & {
|
|
288
294
|
clearCache: () => void;
|
|
289
295
|
};
|
|
290
|
-
export declare const selectCraftedComponent: (id: string) => ((state: import("redux").EmptyObject & {
|
|
296
|
+
export declare const selectCraftedComponent: (id: string, type: 'webform' | 'report') => ((state: import("redux").EmptyObject & {
|
|
291
297
|
root: import("immer/dist/internal.js").WritableDraft<import("../modules").IRootState>;
|
|
292
298
|
explorer: import("immer/dist/internal.js").WritableDraft<import("../modules").ITreeItem>[];
|
|
293
299
|
debugger: import("../modules").IDebuggerState;
|
|
@@ -323,7 +329,10 @@ export declare const selectCraftedComponent: (id: string) => ((state: import("re
|
|
|
323
329
|
modals: import("../modules").IModalsState;
|
|
324
330
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
325
331
|
model: import("../modules").IModelState;
|
|
326
|
-
}) => import("@ws-ui/shared").IComponentTemplate | undefined) & import("reselect").OutputSelectorFields<(args_0:
|
|
332
|
+
}) => import("@ws-ui/shared").IComponentTemplate | undefined) & import("reselect").OutputSelectorFields<(args_0: {
|
|
333
|
+
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
334
|
+
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
335
|
+
}) => import("@ws-ui/shared").IComponentTemplate | undefined, {
|
|
327
336
|
clearCache: () => void;
|
|
328
337
|
}> & {
|
|
329
338
|
clearCache: () => void;
|
package/dist/utils.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const DEFAULT_CACHE: TCachedState;
|
|
|
7
7
|
export type TCachedState = Pick<IRootState, 'tabs' | 'activeTab' | 'recent'> & Pick<AppState, 'roles' | 'debugger' | 'webforms' | 'sharedCSS'>;
|
|
8
8
|
export declare function saveState(state: TCachedState): void;
|
|
9
9
|
export declare function savePrefrences(state: {
|
|
10
|
-
[key: string]:
|
|
10
|
+
[key: string]: boolean | number | string;
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function getCashedPrefrences(): any;
|
|
13
13
|
export declare function getCachedState(): TCachedState;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/store",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.38-20240628",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"react-redux": "^7.2.6"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@ws-ui/icons": "^0.0.
|
|
32
|
-
"@ws-ui/shared": "^0.1.
|
|
31
|
+
"@ws-ui/icons": "^0.0.21",
|
|
32
|
+
"@ws-ui/shared": "^0.1.30",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
34
|
"minimatch": "^5.1.0",
|
|
35
35
|
"react": "^17.0.2",
|