@ws-ui/store 0.1.27 → 0.1.28
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 +35 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2193 -2132
- package/dist/index.es.js.map +1 -1
- package/dist/modules/roles/types.d.ts +3 -1
- package/dist/modules/root/reducer.d.ts +9 -1
- package/dist/modules/root/types.d.ts +8 -0
- package/dist/selectors/catalog.d.ts +41 -0
- package/dist/selectors/states.d.ts +49 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +3 -3
|
@@ -32,7 +32,9 @@ export declare enum EPermissionType {
|
|
|
32
32
|
DATACLASS = "dataclass",
|
|
33
33
|
METHOD = "method",
|
|
34
34
|
ATTRIBUTE = "attribute",
|
|
35
|
-
DATASTORE = "datastore"
|
|
35
|
+
DATASTORE = "datastore",
|
|
36
|
+
SINGLTON = "singleton",
|
|
37
|
+
SINGLTON_METHOD = "singletonMethod"
|
|
36
38
|
}
|
|
37
39
|
export interface IPermission {
|
|
38
40
|
applyTo: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { IWebFormStyleClass } from '@ws-ui/shared';
|
|
3
3
|
import { ITab, ITabExtra, ITabFlags, WebformState } from '@ws-ui/shared';
|
|
4
|
-
import { IRootState, TActionAddDataSource, TActionAddWebformState, TActionEditWebformState, TActionRemoveDataSource, TActionRemoveWebformState, TActionSetDataSources, TActionSetDefaultWebformStates, TResetComponentState } from './types';
|
|
4
|
+
import { IRootState, TActionAddDataSource, TActionAddDefaultWebformState, TActionAddWebformState, TActionEditWebformState, TActionRemoveDataSource, TActionRemoveDefaultWebformState, TActionRemoveWebformState, TActionSetDataSources, TActionSetDefaultWebformStates, TResetComponentState } from './types';
|
|
5
5
|
export declare const stateSlice: import("@reduxjs/toolkit").Slice<import("immer/dist/internal.js").WritableDraft<IRootState>, {
|
|
6
6
|
setPanelState(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: PayloadAction<Partial<ITab['view']['panel']> & {
|
|
7
7
|
path: string;
|
|
@@ -13,6 +13,8 @@ export declare const stateSlice: import("@reduxjs/toolkit").Slice<import("immer/
|
|
|
13
13
|
editWebformState(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionEditWebformState): void;
|
|
14
14
|
resetComponentState(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TResetComponentState): void;
|
|
15
15
|
setDefaultWebformStates(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionSetDefaultWebformStates): void;
|
|
16
|
+
addDefaultWebformState(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionAddDefaultWebformState): void;
|
|
17
|
+
removeDefaultWebformState(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionRemoveDefaultWebformState): void;
|
|
16
18
|
removeDataSource(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionRemoveDataSource): void;
|
|
17
19
|
setDataSources(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: TActionSetDataSources): void;
|
|
18
20
|
setTabs(state: import("immer/dist/internal.js").WritableDraft<IRootState>, action: PayloadAction<ITab[]>): void;
|
|
@@ -172,6 +174,12 @@ export declare const setTabs: import("@reduxjs/toolkit").ActionCreatorWithPayloa
|
|
|
172
174
|
path: string;
|
|
173
175
|
id: string;
|
|
174
176
|
state: WebformState;
|
|
177
|
+
}, string>, addDefaultWebformState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
178
|
+
path: string;
|
|
179
|
+
state: WebformState;
|
|
180
|
+
}, string>, removeDefaultWebformState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
181
|
+
path: string;
|
|
182
|
+
state: WebformState;
|
|
175
183
|
}, string>, setDefaultWebformStates: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
176
184
|
path: string;
|
|
177
185
|
states: WebformState[];
|
|
@@ -32,6 +32,14 @@ export type TActionSetDefaultWebformStates = PayloadAction<{
|
|
|
32
32
|
path: string;
|
|
33
33
|
states: WebformState[];
|
|
34
34
|
}>;
|
|
35
|
+
export type TActionAddDefaultWebformState = PayloadAction<{
|
|
36
|
+
path: string;
|
|
37
|
+
state: WebformState;
|
|
38
|
+
}>;
|
|
39
|
+
export type TActionRemoveDefaultWebformState = PayloadAction<{
|
|
40
|
+
path: string;
|
|
41
|
+
state: WebformState;
|
|
42
|
+
}>;
|
|
35
43
|
export type TActionEditDataSource = PayloadAction<{
|
|
36
44
|
path: string;
|
|
37
45
|
datasourceId: string;
|
|
@@ -195,6 +195,47 @@ export declare const selectDataclasses: ((state: import("redux").EmptyObject & {
|
|
|
195
195
|
}> & {
|
|
196
196
|
clearCache: () => void;
|
|
197
197
|
};
|
|
198
|
+
export declare const selectSingletons: ((state: import("redux").EmptyObject & {
|
|
199
|
+
root: import("immer/dist/internal.js").WritableDraft<import('../modules').IRootState>;
|
|
200
|
+
explorer: import("immer/dist/internal.js").WritableDraft<import('../modules').ITreeItem>[];
|
|
201
|
+
debugger: import('../modules').IDebuggerState;
|
|
202
|
+
settings: import('../modules').ISettingsState;
|
|
203
|
+
catalog: {
|
|
204
|
+
state: "loading";
|
|
205
|
+
} | {
|
|
206
|
+
state: "loaded";
|
|
207
|
+
model: datasources.IEnhancedCatalog;
|
|
208
|
+
} | {
|
|
209
|
+
state: "error";
|
|
210
|
+
error: string;
|
|
211
|
+
};
|
|
212
|
+
roles: {
|
|
213
|
+
flags: {
|
|
214
|
+
touched?: boolean | undefined;
|
|
215
|
+
removed?: boolean | undefined;
|
|
216
|
+
pinned?: boolean | undefined;
|
|
217
|
+
loading?: boolean | undefined;
|
|
218
|
+
old?: boolean | undefined;
|
|
219
|
+
enabled?: boolean | undefined;
|
|
220
|
+
confirmed?: boolean | undefined;
|
|
221
|
+
};
|
|
222
|
+
date?: string | undefined;
|
|
223
|
+
privileges: import('../modules').TById;
|
|
224
|
+
roles: import('../modules').TRolesDict;
|
|
225
|
+
forceLogin?: boolean | undefined;
|
|
226
|
+
selectedTab: "roles" | "privileges";
|
|
227
|
+
};
|
|
228
|
+
sharedDatasources: import('../modules').ISharedDatasourcesState;
|
|
229
|
+
savedConditions: import("immer/dist/internal.js").WritableDraft<import('../modules').ISavedConditionsState>;
|
|
230
|
+
webforms: import('../modules').IWebformEditorState;
|
|
231
|
+
modals: import('../modules').IModalsState;
|
|
232
|
+
sharedCSS: import("immer/dist/internal.js").WritableDraft<import('../modules').ISharedCSSState>;
|
|
233
|
+
model: import('../modules').IModelState;
|
|
234
|
+
}) => never[] | datasources.ISingletons) & import("reselect").OutputSelectorFields<(args_0: datasources.IEnhancedCatalog | null) => never[] | datasources.ISingletons, {
|
|
235
|
+
clearCache: () => void;
|
|
236
|
+
}> & {
|
|
237
|
+
clearCache: () => void;
|
|
238
|
+
};
|
|
198
239
|
export declare const selectVirtualDataClasses: ((state: import("redux").EmptyObject & {
|
|
199
240
|
root: import("immer/dist/internal.js").WritableDraft<import('../modules').IRootState>;
|
|
200
241
|
explorer: import("immer/dist/internal.js").WritableDraft<import('../modules').ITreeItem>[];
|
|
@@ -7,9 +7,10 @@ export declare const ROOT_WEBFORM_STATE: {
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns the list of declared states in the current tab.
|
|
9
9
|
* @param tabPath the current tab path.
|
|
10
|
+
* @param exclude states to exclude (by id)
|
|
10
11
|
* @returns states or an empty array if not found.
|
|
11
12
|
*/
|
|
12
|
-
export declare const selectWebformStatesByPath: (tabPath: string) => ((state: import("redux").EmptyObject & {
|
|
13
|
+
export declare const selectWebformStatesByPath: (tabPath: string, exclude?: string[]) => ((state: import("redux").EmptyObject & {
|
|
13
14
|
root: import("immer/dist/internal.js").WritableDraft<import('../modules').IRootState>;
|
|
14
15
|
explorer: import("immer/dist/internal.js").WritableDraft<import('../modules').ITreeItem>[];
|
|
15
16
|
debugger: import('../modules').IDebuggerState;
|
|
@@ -65,6 +66,53 @@ export declare const selectWebformStatesByPath: (tabPath: string) => ((state: im
|
|
|
65
66
|
}> & {
|
|
66
67
|
clearCache: () => void;
|
|
67
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Returns the list of states labels in the current tab.
|
|
71
|
+
* @param tabPath the current tab path.
|
|
72
|
+
* @param exclude states to exclude (by id)
|
|
73
|
+
* @returns states labels or an empty array if not found.
|
|
74
|
+
*/
|
|
75
|
+
export declare const selectWebformStatesLabelsByPath: (tabPath: string, exclude?: string[]) => ((state: import("redux").EmptyObject & {
|
|
76
|
+
root: import("immer/dist/internal.js").WritableDraft<import('../modules').IRootState>;
|
|
77
|
+
explorer: import("immer/dist/internal.js").WritableDraft<import('../modules').ITreeItem>[];
|
|
78
|
+
debugger: import('../modules').IDebuggerState;
|
|
79
|
+
settings: import('../modules').ISettingsState;
|
|
80
|
+
catalog: {
|
|
81
|
+
state: "loading";
|
|
82
|
+
} | {
|
|
83
|
+
state: "loaded";
|
|
84
|
+
model: datasources.IEnhancedCatalog;
|
|
85
|
+
} | {
|
|
86
|
+
state: "error";
|
|
87
|
+
error: string;
|
|
88
|
+
};
|
|
89
|
+
roles: {
|
|
90
|
+
flags: {
|
|
91
|
+
touched?: boolean | undefined;
|
|
92
|
+
removed?: boolean | undefined;
|
|
93
|
+
pinned?: boolean | undefined;
|
|
94
|
+
loading?: boolean | undefined;
|
|
95
|
+
old?: boolean | undefined;
|
|
96
|
+
enabled?: boolean | undefined;
|
|
97
|
+
confirmed?: boolean | undefined;
|
|
98
|
+
};
|
|
99
|
+
date?: string | undefined;
|
|
100
|
+
privileges: import('../modules').TById;
|
|
101
|
+
roles: import('../modules').TRolesDict;
|
|
102
|
+
forceLogin?: boolean | undefined;
|
|
103
|
+
selectedTab: "roles" | "privileges";
|
|
104
|
+
};
|
|
105
|
+
sharedDatasources: import('../modules').ISharedDatasourcesState;
|
|
106
|
+
savedConditions: import("immer/dist/internal.js").WritableDraft<import('../modules').ISavedConditionsState>;
|
|
107
|
+
webforms: import('../modules').IWebformEditorState;
|
|
108
|
+
modals: import('../modules').IModalsState;
|
|
109
|
+
sharedCSS: import("immer/dist/internal.js").WritableDraft<import('../modules').ISharedCSSState>;
|
|
110
|
+
model: import('../modules').IModelState;
|
|
111
|
+
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: WebformState[]) => string[], {
|
|
112
|
+
clearCache: () => void;
|
|
113
|
+
}> & {
|
|
114
|
+
clearCache: () => void;
|
|
115
|
+
};
|
|
68
116
|
/**
|
|
69
117
|
* Returns the list of default states in the current tab.
|
|
70
118
|
* @param tabPath the current tab path.
|
package/dist/utils.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare function getModalTitle(tab: ITab): string;
|
|
|
15
15
|
export declare const deserializeModel: (data: ServerModel | undefined) => ModelNode[];
|
|
16
16
|
export declare function isJSON(extension?: string): boolean;
|
|
17
17
|
export declare function refactorWebform(content: ITab['content'], id: string): any;
|
|
18
|
+
export declare const selectorEqualityFn: (left: unknown, right: unknown) => boolean;
|
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.28",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@reduxjs/toolkit": "^1.7.1",
|
|
27
|
+
"@ws-ui/shared": "^0.1.22",
|
|
27
28
|
"react-redux": "^7.2.6"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
|
-
"@ws-ui/icons": "^0.0.
|
|
31
|
-
"@ws-ui/shared": "^0.1.21",
|
|
31
|
+
"@ws-ui/icons": "^0.0.17",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"minimatch": "^5.1.0",
|
|
34
34
|
"react": "^17.0.2",
|