@ws-ui/store 1.11.1 → 1.11.3-rc1
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/hooks/store.d.ts +1 -1
- package/dist/index.cjs.js +48 -48
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9094 -9706
- package/dist/index.es.js.map +1 -1
- package/dist/modules/catalog/thunks.d.ts +1 -1
- package/dist/modules/debugger/thunks.d.ts +2 -2
- package/dist/modules/explorer/thunks.d.ts +19 -20
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/modals/thunks.d.ts +1 -9
- package/dist/modules/model/thunks.d.ts +4 -4
- package/dist/modules/roles/adapter.d.ts +1 -180
- package/dist/modules/roles/index.d.ts +1 -2
- package/dist/modules/roles/reducer.d.ts +7 -1
- package/dist/modules/roles/thunks.d.ts +4 -5
- package/dist/modules/root/reducer.d.ts +1 -1
- package/dist/modules/root/thunks.d.ts +13 -13
- package/dist/modules/settings/thunks.d.ts +1 -1
- package/dist/modules/shared-app-events/reducer.d.ts +9 -1
- package/dist/modules/shared-app-events/thunks.d.ts +2 -2
- package/dist/modules/shared-conditions/thunks.d.ts +1 -1
- package/dist/modules/shared-css/thunks.d.ts +1 -1
- package/dist/modules/shared-datasources/thunks.d.ts +5 -5
- package/dist/modules/tasks/selectors.d.ts +1 -1
- package/dist/modules/webforms/datasources.adapter.d.ts +1 -1
- package/dist/modules/webforms/thunks.d.ts +2 -2
- package/dist/selectors/catalog.d.ts +13 -13
- package/dist/selectors/common.d.ts +4 -4
- package/dist/selectors/components.d.ts +3 -3
- package/dist/selectors/datasources.d.ts +10 -10
- package/dist/selectors/debugger.d.ts +28 -28
- package/dist/selectors/explorer.d.ts +26 -26
- package/dist/selectors/modals.d.ts +1 -1
- package/dist/selectors/roles.d.ts +24 -24
- package/dist/selectors/settings.d.ts +10 -10
- package/dist/selectors/states.d.ts +6 -6
- package/dist/selectors/styles.d.ts +5 -5
- package/dist/selectors/tabs.d.ts +5 -5
- package/dist/selectors/webforms.d.ts +16 -14
- package/package.json +3 -3
- package/dist/modules/roles/types.d.ts +0 -102
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const fetchCatalog: import('@reduxjs/toolkit').AsyncThunk<datasources.IEnhancedCatalog, void, {
|
|
2
2
|
rejectValue: string;
|
|
3
3
|
state?: unknown;
|
|
4
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
5
4
|
extra?: unknown;
|
|
5
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
6
6
|
serializedErrorType?: unknown;
|
|
7
7
|
pendingMeta?: unknown;
|
|
8
8
|
fulfilledMeta?: unknown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AppState } from '..';
|
|
2
2
|
export declare const wipeDebuggerSessions: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
3
3
|
state: AppState;
|
|
4
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
5
4
|
extra?: unknown;
|
|
5
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
6
6
|
rejectValue?: unknown;
|
|
7
7
|
serializedErrorType?: unknown;
|
|
8
8
|
pendingMeta?: unknown;
|
|
@@ -15,8 +15,8 @@ export declare const removeDebuggerSessionsNotIn: import('@reduxjs/toolkit').Asy
|
|
|
15
15
|
threadIds: number[];
|
|
16
16
|
}, {
|
|
17
17
|
state: AppState;
|
|
18
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
19
18
|
extra?: unknown;
|
|
19
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
20
20
|
rejectValue?: unknown;
|
|
21
21
|
serializedErrorType?: unknown;
|
|
22
22
|
pendingMeta?: unknown;
|
|
@@ -68,7 +68,6 @@ export declare function getDefaultContent(root: FileFolderType, projectSettings:
|
|
|
68
68
|
};
|
|
69
69
|
}[];
|
|
70
70
|
};
|
|
71
|
-
export declare function getFilenameFromType(fileName: string, type: FileFolderType, qodly?: boolean): string;
|
|
72
71
|
export declare function castToFileFolder(type: string): FileFolderType;
|
|
73
72
|
export declare function getFileType(root: FileFolderType): FileFolderType;
|
|
74
73
|
export declare const tryEditMethod: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
|
|
@@ -91,8 +90,8 @@ export declare const tryEditMethod: import('@reduxjs/toolkit').AsyncThunk<ITab<a
|
|
|
91
90
|
method: catalog.IMethod;
|
|
92
91
|
}, {
|
|
93
92
|
state: AppState;
|
|
94
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
95
93
|
extra?: unknown;
|
|
94
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
96
95
|
rejectValue?: unknown;
|
|
97
96
|
serializedErrorType?: unknown;
|
|
98
97
|
pendingMeta?: unknown;
|
|
@@ -111,8 +110,8 @@ export type TCreateModelFilesPayload = TCreateModelFilesPayloadDataclass | {
|
|
|
111
110
|
};
|
|
112
111
|
export declare const createModelFiles: import('@reduxjs/toolkit').AsyncThunk<void, TCreateModelFilesPayload, {
|
|
113
112
|
state: AppState;
|
|
114
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
115
113
|
extra?: unknown;
|
|
114
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
116
115
|
rejectValue?: unknown;
|
|
117
116
|
serializedErrorType?: unknown;
|
|
118
117
|
pendingMeta?: unknown;
|
|
@@ -124,8 +123,8 @@ export declare const fetchFolderContent: import('@reduxjs/toolkit').AsyncThunk<I
|
|
|
124
123
|
expandDataclass?: string;
|
|
125
124
|
}, {
|
|
126
125
|
state: AppState;
|
|
127
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
128
126
|
extra?: unknown;
|
|
127
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
129
128
|
rejectValue?: unknown;
|
|
130
129
|
serializedErrorType?: unknown;
|
|
131
130
|
pendingMeta?: unknown;
|
|
@@ -147,8 +146,8 @@ export declare const fetchFolderContentWithoutExpanding: import('@reduxjs/toolki
|
|
|
147
146
|
collapseIfExpanded?: boolean;
|
|
148
147
|
}, {
|
|
149
148
|
state: AppState;
|
|
150
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
151
149
|
extra?: unknown;
|
|
150
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
152
151
|
rejectValue?: unknown;
|
|
153
152
|
serializedErrorType?: unknown;
|
|
154
153
|
pendingMeta?: unknown;
|
|
@@ -177,8 +176,8 @@ export declare const uploadFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
177
176
|
parentNode: ITreeItem;
|
|
178
177
|
}, {
|
|
179
178
|
state: AppState;
|
|
180
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
181
179
|
extra?: unknown;
|
|
180
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
182
181
|
rejectValue?: unknown;
|
|
183
182
|
serializedErrorType?: unknown;
|
|
184
183
|
pendingMeta?: unknown;
|
|
@@ -192,8 +191,8 @@ export declare const createNewFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
192
191
|
}, ICreateNewFilePayload, {
|
|
193
192
|
state: AppState;
|
|
194
193
|
rejectValue: string;
|
|
195
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
196
194
|
extra?: unknown;
|
|
195
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
197
196
|
serializedErrorType?: unknown;
|
|
198
197
|
pendingMeta?: unknown;
|
|
199
198
|
fulfilledMeta?: unknown;
|
|
@@ -214,8 +213,8 @@ export declare function getFilePath(file: ISaveFileResponse, options?: Partial<{
|
|
|
214
213
|
}>): string;
|
|
215
214
|
export declare const createNewFileAndOpen: import('@reduxjs/toolkit').AsyncThunk<void, ICreateNewFilePayload, {
|
|
216
215
|
state: AppState;
|
|
217
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
218
216
|
extra?: unknown;
|
|
217
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
219
218
|
rejectValue?: unknown;
|
|
220
219
|
serializedErrorType?: unknown;
|
|
221
220
|
pendingMeta?: unknown;
|
|
@@ -243,8 +242,8 @@ export declare const createNewNode: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
243
242
|
export declare const fetchHTTPHandlers: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
244
243
|
state: AppState;
|
|
245
244
|
rejectValue: string;
|
|
246
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
247
245
|
extra?: unknown;
|
|
246
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
248
247
|
serializedErrorType?: unknown;
|
|
249
248
|
pendingMeta?: unknown;
|
|
250
249
|
fulfilledMeta?: unknown;
|
|
@@ -252,8 +251,8 @@ export declare const fetchHTTPHandlers: import('@reduxjs/toolkit').AsyncThunk<vo
|
|
|
252
251
|
}>;
|
|
253
252
|
export declare const openFileFromLocation: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
254
253
|
state: AppState;
|
|
255
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
256
254
|
extra?: unknown;
|
|
255
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
257
256
|
rejectValue?: unknown;
|
|
258
257
|
serializedErrorType?: unknown;
|
|
259
258
|
pendingMeta?: unknown;
|
|
@@ -262,8 +261,8 @@ export declare const openFileFromLocation: import('@reduxjs/toolkit').AsyncThunk
|
|
|
262
261
|
}>;
|
|
263
262
|
export declare const switchEditor: import('@reduxjs/toolkit').AsyncThunk<void, ISwitchEditorPayload, {
|
|
264
263
|
state: AppState;
|
|
265
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
266
264
|
extra?: unknown;
|
|
265
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
267
266
|
rejectValue?: unknown;
|
|
268
267
|
serializedErrorType?: unknown;
|
|
269
268
|
pendingMeta?: unknown;
|
|
@@ -288,8 +287,8 @@ export declare const openFile: import('@reduxjs/toolkit').AsyncThunk<ITab<any, P
|
|
|
288
287
|
kind: string;
|
|
289
288
|
}>> | null, IOpenFilePayload, {
|
|
290
289
|
state: AppState;
|
|
291
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
292
290
|
extra?: unknown;
|
|
291
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
293
292
|
rejectValue?: unknown;
|
|
294
293
|
serializedErrorType?: unknown;
|
|
295
294
|
pendingMeta?: unknown;
|
|
@@ -318,8 +317,8 @@ export declare const openFileAtLine: import('@reduxjs/toolkit').AsyncThunk<ITab<
|
|
|
318
317
|
offset?: number;
|
|
319
318
|
}, {
|
|
320
319
|
state: AppState;
|
|
321
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
322
320
|
extra?: unknown;
|
|
321
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
323
322
|
rejectValue?: unknown;
|
|
324
323
|
serializedErrorType?: unknown;
|
|
325
324
|
pendingMeta?: unknown;
|
|
@@ -366,8 +365,8 @@ export declare const openFileAtSelection: import('@reduxjs/toolkit').AsyncThunk<
|
|
|
366
365
|
kind: string;
|
|
367
366
|
}>>, IOpenFileAtSelectionPayload, {
|
|
368
367
|
state: AppState;
|
|
369
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
370
368
|
extra?: unknown;
|
|
369
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
371
370
|
rejectValue?: unknown;
|
|
372
371
|
serializedErrorType?: unknown;
|
|
373
372
|
pendingMeta?: unknown;
|
|
@@ -379,8 +378,8 @@ export declare const deleteFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
379
378
|
node: ITreeItem;
|
|
380
379
|
}, ITreeItem, {
|
|
381
380
|
state: AppState;
|
|
382
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
383
381
|
extra?: unknown;
|
|
382
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
384
383
|
rejectValue?: unknown;
|
|
385
384
|
serializedErrorType?: unknown;
|
|
386
385
|
pendingMeta?: unknown;
|
|
@@ -392,8 +391,8 @@ export declare const deleteFolder: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
392
391
|
node: ITreeItem;
|
|
393
392
|
}, ITreeItem, {
|
|
394
393
|
state: AppState;
|
|
395
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
396
394
|
extra?: unknown;
|
|
395
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
397
396
|
rejectValue?: unknown;
|
|
398
397
|
serializedErrorType?: unknown;
|
|
399
398
|
pendingMeta?: unknown;
|
|
@@ -405,8 +404,8 @@ export declare const removeFileNode: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
405
404
|
node: ITreeItem;
|
|
406
405
|
}, ITreeItem, {
|
|
407
406
|
state: AppState;
|
|
408
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
409
407
|
extra?: unknown;
|
|
408
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
410
409
|
rejectValue?: unknown;
|
|
411
410
|
serializedErrorType?: unknown;
|
|
412
411
|
pendingMeta?: unknown;
|
|
@@ -421,8 +420,8 @@ export declare const renameFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
421
420
|
newname: string;
|
|
422
421
|
}, {
|
|
423
422
|
state: AppState;
|
|
424
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
425
423
|
extra?: unknown;
|
|
424
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
426
425
|
rejectValue?: unknown;
|
|
427
426
|
serializedErrorType?: unknown;
|
|
428
427
|
pendingMeta?: unknown;
|
|
@@ -434,8 +433,8 @@ export declare const relocateNode: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
|
434
433
|
newLocation: ITreeItem;
|
|
435
434
|
}, {
|
|
436
435
|
state: AppState;
|
|
437
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
438
436
|
extra?: unknown;
|
|
437
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
439
438
|
rejectValue?: unknown;
|
|
440
439
|
serializedErrorType?: unknown;
|
|
441
440
|
pendingMeta?: unknown;
|
|
@@ -444,8 +443,8 @@ export declare const relocateNode: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
|
444
443
|
}>;
|
|
445
444
|
export declare const duplicateNode: import('@reduxjs/toolkit').AsyncThunk<any, any, {
|
|
446
445
|
state: AppState;
|
|
447
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
448
446
|
extra?: unknown;
|
|
447
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
449
448
|
rejectValue?: unknown;
|
|
450
449
|
serializedErrorType?: unknown;
|
|
451
450
|
pendingMeta?: unknown;
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const stateReducer: import('redux').Reducer<import('redux').Combi
|
|
|
13
13
|
state: "error";
|
|
14
14
|
error: string;
|
|
15
15
|
};
|
|
16
|
-
roles: import('
|
|
16
|
+
roles: import('@ws-ui/shared').IRolesState;
|
|
17
17
|
sharedDatasources: import('./shared-datasources').ISharedDatasourcesState;
|
|
18
18
|
sharedAppEvents: import('./shared-app-events').ISharedAppEventsState;
|
|
19
19
|
savedConditions: import('./shared-conditions').ISavedConditionsState;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface IOpenModalPayload extends Omit<IModal, 'id' | 'isOpen' | 'type'> {
|
|
3
|
-
type?: ModalType;
|
|
4
|
-
}
|
|
5
|
-
interface IOpenModalReturnValue {
|
|
6
|
-
confirmed?: boolean;
|
|
7
|
-
options?: Record<string, boolean>;
|
|
8
|
-
}
|
|
1
|
+
import { IOpenModalPayload, IOpenModalReturnValue } from '@ws-ui/shared';
|
|
9
2
|
export declare const openModal: import('@reduxjs/toolkit').AsyncThunk<IOpenModalReturnValue, IOpenModalPayload, {
|
|
10
3
|
state?: unknown;
|
|
11
4
|
dispatch?: import('redux').Dispatch;
|
|
@@ -16,4 +9,3 @@ export declare const openModal: import('@reduxjs/toolkit').AsyncThunk<IOpenModal
|
|
|
16
9
|
fulfilledMeta?: unknown;
|
|
17
10
|
rejectedMeta?: unknown;
|
|
18
11
|
}>;
|
|
19
|
-
export {};
|
|
@@ -4,8 +4,8 @@ import { AppState } from '..';
|
|
|
4
4
|
export declare const fetchModel: import('@reduxjs/toolkit').AsyncThunk<ServerModel, void, {
|
|
5
5
|
state: AppState;
|
|
6
6
|
rejectValue: string;
|
|
7
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
8
7
|
extra?: unknown;
|
|
8
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
9
9
|
serializedErrorType?: unknown;
|
|
10
10
|
pendingMeta?: unknown;
|
|
11
11
|
fulfilledMeta?: unknown;
|
|
@@ -39,8 +39,8 @@ export declare const saveModel: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
39
39
|
}>>, {
|
|
40
40
|
state: AppState;
|
|
41
41
|
rejectValue: string;
|
|
42
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
43
42
|
extra?: unknown;
|
|
43
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
44
44
|
serializedErrorType?: unknown;
|
|
45
45
|
pendingMeta?: unknown;
|
|
46
46
|
fulfilledMeta?: unknown;
|
|
@@ -65,8 +65,8 @@ export declare const openModel: import('@reduxjs/toolkit').AsyncThunk<void | ITa
|
|
|
65
65
|
}>>, {}, {
|
|
66
66
|
state: AppState;
|
|
67
67
|
rejectValue: string;
|
|
68
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
69
68
|
extra?: unknown;
|
|
69
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
70
70
|
serializedErrorType?: unknown;
|
|
71
71
|
pendingMeta?: unknown;
|
|
72
72
|
fulfilledMeta?: unknown;
|
|
@@ -79,8 +79,8 @@ export declare const tryRenameDataclass: import('@reduxjs/toolkit').AsyncThunk<v
|
|
|
79
79
|
}, {
|
|
80
80
|
state: AppState;
|
|
81
81
|
rejectValue: string;
|
|
82
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
83
82
|
extra?: unknown;
|
|
83
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
84
84
|
serializedErrorType?: unknown;
|
|
85
85
|
pendingMeta?: unknown;
|
|
86
86
|
fulfilledMeta?: unknown;
|
|
@@ -1,184 +1,5 @@
|
|
|
1
|
-
import { EPermissionType,
|
|
2
|
-
/**
|
|
3
|
-
* pushes uniquely list of items
|
|
4
|
-
* @param array input array
|
|
5
|
-
* @param args list of elements to add to the array
|
|
6
|
-
* @returns an array containing unique fields
|
|
7
|
-
*/
|
|
8
|
-
export declare function uniquePush<T = string>(array: T[], ...args: T[]): T[];
|
|
9
|
-
/**
|
|
10
|
-
* Sanitize a privileges array
|
|
11
|
-
* @param data unsanitized data
|
|
12
|
-
* @returns sanitized data
|
|
13
|
-
*/
|
|
14
|
-
export declare function sanitizePrivileges(data: IPrivilege[]): TById;
|
|
15
|
-
/**
|
|
16
|
-
* sort list of sanitized pivileges
|
|
17
|
-
* @param dict sanitized data
|
|
18
|
-
* @returns sorted privileges
|
|
19
|
-
*/
|
|
20
|
-
export declare function sort(dict: TById): TSanitizedPrivilege[];
|
|
21
|
-
/**
|
|
22
|
-
* Lists the parents of a specific element
|
|
23
|
-
* @param id identifier of the current element
|
|
24
|
-
* @param dict sanitized privileges
|
|
25
|
-
* @returns parents of the current element
|
|
26
|
-
*/
|
|
27
|
-
export declare function parents(id: string, dict: TById): string[];
|
|
28
|
-
/**
|
|
29
|
-
* Lists the children of a specific element
|
|
30
|
-
* @param id identifier of the current element
|
|
31
|
-
* @param dict sanitized privileges
|
|
32
|
-
* @returns children of the current element
|
|
33
|
-
*/
|
|
34
|
-
export declare function children(id: string, dict: TById): string[];
|
|
35
|
-
/**
|
|
36
|
-
* Calculates from a sanitized privileges dictionary the list of allowed to include children
|
|
37
|
-
* @param id identifier of the current element
|
|
38
|
-
* @param dict sanitized privileges
|
|
39
|
-
* @returns allowed to include privileges
|
|
40
|
-
*/
|
|
41
|
-
export declare function allowed(id: string, dict: TById): string[];
|
|
42
|
-
/**
|
|
43
|
-
* Removes an element from a sanitized dictionary
|
|
44
|
-
* @param id identifier of the current element
|
|
45
|
-
* @param dict sanitized privileges
|
|
46
|
-
* @returns new dictionary containing the initialone except the one with "id"
|
|
47
|
-
*/
|
|
48
|
-
export declare function remove(id: string, dict: TById): TById;
|
|
49
|
-
/**
|
|
50
|
-
* Adds an existing node as a child of another node
|
|
51
|
-
* @param parentId the parent identifier
|
|
52
|
-
* @param childId the child identifer
|
|
53
|
-
* @param dict sanitized privileges dictionary
|
|
54
|
-
* @returns the new dictionary
|
|
55
|
-
*/
|
|
56
|
-
export declare function addIn(parentId: string, childId: string, dict: TById): TById;
|
|
57
|
-
/**
|
|
58
|
-
* Removes an existing node from its (specified) parent
|
|
59
|
-
* @param parentId the parent identifier
|
|
60
|
-
* @param childId the child identifer
|
|
61
|
-
* @param dict sanitized privileges dictionary
|
|
62
|
-
* @returns the new dictionary
|
|
63
|
-
*/
|
|
64
|
-
export declare function removeFrom(parentId: string, childId: string, dict: TById): TById;
|
|
65
|
-
/**
|
|
66
|
-
* Create a new privilege
|
|
67
|
-
* @param name the privilege name
|
|
68
|
-
* @param dict sanitized privileges dictionary
|
|
69
|
-
* @returns the new dictionary
|
|
70
|
-
*/
|
|
71
|
-
export declare function create(name: string, dict: TById): TById;
|
|
1
|
+
import { EPermissionType, IResourcePermission, TRole, TRolesDict, TById } from '@ws-ui/shared';
|
|
72
2
|
export declare function createWithResource(name: string, resource: string, type: EPermissionType, action: IResourcePermission['name'], dict: TById): TById;
|
|
73
|
-
/**
|
|
74
|
-
* Renames an existing node
|
|
75
|
-
* @param name the new name
|
|
76
|
-
* @param id the node identifier
|
|
77
|
-
* @param dict sanitized privileges dictionary
|
|
78
|
-
* @returns the new dictionary
|
|
79
|
-
*/
|
|
80
|
-
export declare function rename(name: string, id: string, dict: TById): TById;
|
|
81
|
-
/**
|
|
82
|
-
* Populates a list privileges IDs
|
|
83
|
-
* @param ids the identifiers of privileges to populate
|
|
84
|
-
* @param dict sanitized privileges dictionary
|
|
85
|
-
* @returns populated privileges
|
|
86
|
-
*/
|
|
87
|
-
export declare function populateShallow(ids: string[], dict: TById): (IPrivilege | null)[];
|
|
88
|
-
/**
|
|
89
|
-
* Get the privilege object from its identifier
|
|
90
|
-
* @param id the identifier of the node
|
|
91
|
-
* @param dict sanitized privileges dictionary
|
|
92
|
-
* @returns populated privilege
|
|
93
|
-
*/
|
|
94
|
-
export declare function getPrivilegeById(id: string, dict: TById): TSanitizedPrivilege | null;
|
|
95
|
-
/**
|
|
96
|
-
* Maps the privileges to their permissions
|
|
97
|
-
* @param param0 the raw permission object
|
|
98
|
-
* @returns an object mapping the privilege to its permission
|
|
99
|
-
*/
|
|
100
|
-
export declare function actionsToPrivs({ applyTo: _, type, ...actions }: IPermission): {
|
|
101
|
-
[privName: string]: string[];
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* Converts a raw permission to a resource
|
|
105
|
-
* @param item a permission
|
|
106
|
-
* @returns the resource object
|
|
107
|
-
*/
|
|
108
|
-
export declare function getResourceFromType(item: IPermission): IResource;
|
|
109
|
-
/**
|
|
110
|
-
* Sanitizes the raw permissions
|
|
111
|
-
* @param data list of raw permissions
|
|
112
|
-
* @param byKey dictionary
|
|
113
|
-
* @returns a new dictionary containing the sanitized permissions
|
|
114
|
-
*/
|
|
115
|
-
export declare function sanitizePermissions(data: IPermission[], byKey: TById): TById;
|
|
116
|
-
/**
|
|
117
|
-
* Converts a dictionary indexed by id to a new one indexed by name
|
|
118
|
-
* @param dict dictioanry
|
|
119
|
-
* @returns a new dictionary indexed by privilege name
|
|
120
|
-
*/
|
|
121
|
-
export declare function getDictByName(dict: TById): TById;
|
|
122
|
-
/**
|
|
123
|
-
* Sanitizes the content of roles.json file
|
|
124
|
-
* @param data raw data
|
|
125
|
-
* @returns sanitized data
|
|
126
|
-
*/
|
|
127
|
-
export declare function sanitize(data: TRawData): ISanitized;
|
|
128
|
-
/**
|
|
129
|
-
* Converts sanitized data to a valid API payload
|
|
130
|
-
* @param data sanitized dictionary
|
|
131
|
-
* @returns raw data
|
|
132
|
-
*/
|
|
133
|
-
export declare function toAPI(data: ISanitized): TRawData;
|
|
134
|
-
export declare function getGraphData(id: string, dict: TById): IGraphData;
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* @param id privilege id
|
|
138
|
-
* @param permission
|
|
139
|
-
* @param dict
|
|
140
|
-
*/
|
|
141
|
-
export declare function addPermission(id: string, permission: IPermission, dict: TById): TById;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* @param id
|
|
145
|
-
* @param permission
|
|
146
|
-
* @param dict
|
|
147
|
-
*/
|
|
148
|
-
export declare function removePermission(id: string, permission: IPermission, dict: TById): TById;
|
|
149
|
-
/**
|
|
150
|
-
* @param resourcesByPermission
|
|
151
|
-
* @param dict
|
|
152
|
-
*/
|
|
153
|
-
export declare function removeMultiplePermissions(resourcesByPermission: IResourcesByPermission, dict: TById): TById;
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* @param id
|
|
157
|
-
* @param permission
|
|
158
|
-
* @param dict
|
|
159
|
-
*/
|
|
160
|
-
export declare function resetResources(id: string, dict: TById): TById;
|
|
161
|
-
/**
|
|
162
|
-
*
|
|
163
|
-
* @param id privilege id
|
|
164
|
-
* @param resource resource name
|
|
165
|
-
* @param type resource type
|
|
166
|
-
* @param permission permission name
|
|
167
|
-
* @param dict privileges dictionary
|
|
168
|
-
* @returns
|
|
169
|
-
*/
|
|
170
3
|
export declare function togglePrivilegePermission(id: string, resource: string, type: EPermissionType, permission: IResourcePermission['name'], dict: TById): TById;
|
|
171
|
-
/**
|
|
172
|
-
*
|
|
173
|
-
* @param id
|
|
174
|
-
* @param permission
|
|
175
|
-
* @param dict
|
|
176
|
-
*/
|
|
177
|
-
export declare function togglePermission(id: string, resource: IResource, permission: IResourcePermission, dict: TById): TById;
|
|
178
|
-
export declare function getPromotions(id: string, dict: TById): Record<string, string[]>;
|
|
179
|
-
export declare function getInheritedResources(id: string, dict: TById): IResource[];
|
|
180
4
|
export declare const toState: (rolesArray: TRole[]) => TRolesDict;
|
|
181
|
-
export declare const removeRole: (id: string, roles: TRolesDict) => TRolesDict;
|
|
182
5
|
export declare const editRole: (id: string, newName: string, roles: TRolesDict) => TRolesDict;
|
|
183
|
-
export declare const createRole: (id: string, name: string, roles: TRolesDict) => TRolesDict;
|
|
184
|
-
export declare const saveRole: (role: TRole, roles: TRolesDict) => TRolesDict;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
declare const _default: import('redux').Reducer<import('
|
|
1
|
+
declare const _default: import('redux').Reducer<import('@ws-ui/shared').IRolesState>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export * from './reducer';
|
|
4
4
|
export * from './thunks';
|
|
5
|
-
export * from './types';
|
|
6
5
|
export * from './adapter';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { IRolesState, TById, TRawData, TRolesDict } from '
|
|
2
|
+
import { IRolesState, TById, TRawData, TRolesDict } from '@ws-ui/shared';
|
|
3
3
|
declare const stateSlice: import('@reduxjs/toolkit').Slice<IRolesState, {
|
|
4
4
|
updatePrivileges: (state: import('immer/dist/internal').WritableDraft<IRolesState>, action: PayloadAction<TById>) => void;
|
|
5
5
|
updateRoles: (state: import('immer/dist/internal').WritableDraft<IRolesState>, action: PayloadAction<TRolesDict>) => void;
|
|
@@ -31,6 +31,12 @@ declare const stateSlice: import('@reduxjs/toolkit').Slice<IRolesState, {
|
|
|
31
31
|
forceLogin?: boolean;
|
|
32
32
|
restrictedByDefault?: boolean;
|
|
33
33
|
selectedTab: "privileges" | "roles";
|
|
34
|
+
initialState?: import('immer/dist/internal').WritableDraft<{
|
|
35
|
+
roles: TRolesDict;
|
|
36
|
+
privileges: TById;
|
|
37
|
+
forceLogin?: boolean;
|
|
38
|
+
restrictedByDefault?: boolean;
|
|
39
|
+
}> | undefined;
|
|
34
40
|
};
|
|
35
41
|
}, "roles">;
|
|
36
42
|
export declare const updatePrivileges: import('@reduxjs/toolkit').ActionCreatorWithPayload<TById, "roles/updatePrivileges">, updateRoles: import('@reduxjs/toolkit').ActionCreatorWithPayload<TRolesDict, "roles/updateRoles">, setRolesContent: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ITabFlags, IFileContentResponse, ISetFileContentResponse } from '@ws-ui/shared';
|
|
1
|
+
import { ITabFlags, IFileContentResponse, ISetFileContentResponse, ISanitized } from '@ws-ui/shared';
|
|
2
2
|
import { AppState } from '..';
|
|
3
|
-
import { ISanitized } from './types';
|
|
4
3
|
export declare const fetchRoles: import('@reduxjs/toolkit').AsyncThunk<IFileContentResponse<ISanitized>, void, {
|
|
5
4
|
state: AppState;
|
|
6
5
|
rejectValue: string;
|
|
7
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
8
6
|
extra?: unknown;
|
|
7
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
9
8
|
serializedErrorType?: unknown;
|
|
10
9
|
pendingMeta?: unknown;
|
|
11
10
|
fulfilledMeta?: unknown;
|
|
@@ -22,8 +21,8 @@ export declare const fetchRolesChanges: import('@reduxjs/toolkit').AsyncThunk<Pa
|
|
|
22
21
|
inactive: boolean;
|
|
23
22
|
}>, void, {
|
|
24
23
|
state: AppState;
|
|
25
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
26
24
|
extra?: unknown;
|
|
25
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
27
26
|
rejectValue?: unknown;
|
|
28
27
|
serializedErrorType?: unknown;
|
|
29
28
|
pendingMeta?: unknown;
|
|
@@ -34,8 +33,8 @@ export declare const isRolesOutdated: (date: string | undefined) => Promise<bool
|
|
|
34
33
|
export declare const saveRoles: import('@reduxjs/toolkit').AsyncThunk<ISetFileContentResponse, ISanitized, {
|
|
35
34
|
state: AppState;
|
|
36
35
|
rejectValue: string | ITabFlags;
|
|
37
|
-
dispatch?: import('redux').Dispatch | undefined;
|
|
38
36
|
extra?: unknown;
|
|
37
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
39
38
|
serializedErrorType?: unknown;
|
|
40
39
|
pendingMeta?: unknown;
|
|
41
40
|
fulfilledMeta?: unknown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { ITab, ITabExtra, ITabFlags, IWebFormStyleClass, WebformState } from '@ws-ui/shared';
|
|
3
3
|
import { IRootState, TActionAddDataSource, TActionAddDefaultWebformState, TActionAddWebformState, TActionEditWebformState, TActionRemoveDataSource, TActionRemoveDefaultWebformState, TActionRemoveWebformState, TActionSetDataSources, TActionSetDefaultWebformStates, TActionUpdateStateConditionDs, TResetComponentState, TUnsetCustomComponentProp } from './types';
|
|
4
4
|
export declare const stateSlice: import('@reduxjs/toolkit').Slice<IRootState, {
|
|
5
5
|
setWebformState(state: import('immer/dist/internal').WritableDraft<IRootState>, action: PayloadAction<{
|
|
@@ -55,8 +55,8 @@ export declare const editDataSource: import('@reduxjs/toolkit').AsyncThunk<(data
|
|
|
55
55
|
}>;
|
|
56
56
|
export declare const fetchChanges: import('@reduxjs/toolkit').AsyncThunk<IFileInfoResponse, void, {
|
|
57
57
|
state: AppState;
|
|
58
|
-
dispatch?: Dispatch | undefined;
|
|
59
58
|
extra?: unknown;
|
|
59
|
+
dispatch?: Dispatch | undefined;
|
|
60
60
|
rejectValue?: unknown;
|
|
61
61
|
serializedErrorType?: unknown;
|
|
62
62
|
pendingMeta?: unknown;
|
|
@@ -65,8 +65,8 @@ export declare const fetchChanges: import('@reduxjs/toolkit').AsyncThunk<IFileIn
|
|
|
65
65
|
}>;
|
|
66
66
|
export declare const saveAll: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
67
67
|
state: AppState;
|
|
68
|
-
dispatch?: Dispatch | undefined;
|
|
69
68
|
extra?: unknown;
|
|
69
|
+
dispatch?: Dispatch | undefined;
|
|
70
70
|
rejectValue?: unknown;
|
|
71
71
|
serializedErrorType?: unknown;
|
|
72
72
|
pendingMeta?: unknown;
|
|
@@ -75,8 +75,8 @@ export declare const saveAll: import('@reduxjs/toolkit').AsyncThunk<void, void,
|
|
|
75
75
|
}>;
|
|
76
76
|
export declare const tryCloseTab: import('@reduxjs/toolkit').AsyncThunk<boolean, string, {
|
|
77
77
|
state: AppState;
|
|
78
|
-
dispatch?: Dispatch | undefined;
|
|
79
78
|
extra?: unknown;
|
|
79
|
+
dispatch?: Dispatch | undefined;
|
|
80
80
|
rejectValue?: unknown;
|
|
81
81
|
serializedErrorType?: unknown;
|
|
82
82
|
pendingMeta?: unknown;
|
|
@@ -85,8 +85,8 @@ export declare const tryCloseTab: import('@reduxjs/toolkit').AsyncThunk<boolean,
|
|
|
85
85
|
}>;
|
|
86
86
|
export declare const tryCloseOtherTabs: import('@reduxjs/toolkit').AsyncThunk<void, string, {
|
|
87
87
|
state: AppState;
|
|
88
|
-
dispatch?: Dispatch | undefined;
|
|
89
88
|
extra?: unknown;
|
|
89
|
+
dispatch?: Dispatch | undefined;
|
|
90
90
|
rejectValue?: unknown;
|
|
91
91
|
serializedErrorType?: unknown;
|
|
92
92
|
pendingMeta?: unknown;
|
|
@@ -95,8 +95,8 @@ export declare const tryCloseOtherTabs: import('@reduxjs/toolkit').AsyncThunk<vo
|
|
|
95
95
|
}>;
|
|
96
96
|
export declare const tryCloseAllTabs: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
97
97
|
state: AppState;
|
|
98
|
-
dispatch?: Dispatch | undefined;
|
|
99
98
|
extra?: unknown;
|
|
99
|
+
dispatch?: Dispatch | undefined;
|
|
100
100
|
rejectValue?: unknown;
|
|
101
101
|
serializedErrorType?: unknown;
|
|
102
102
|
pendingMeta?: unknown;
|
|
@@ -105,8 +105,8 @@ export declare const tryCloseAllTabs: import('@reduxjs/toolkit').AsyncThunk<void
|
|
|
105
105
|
}>;
|
|
106
106
|
export declare const tryCloseRightTabs: import('@reduxjs/toolkit').AsyncThunk<void, number, {
|
|
107
107
|
state: AppState;
|
|
108
|
-
dispatch?: Dispatch | undefined;
|
|
109
108
|
extra?: unknown;
|
|
109
|
+
dispatch?: Dispatch | undefined;
|
|
110
110
|
rejectValue?: unknown;
|
|
111
111
|
serializedErrorType?: unknown;
|
|
112
112
|
pendingMeta?: unknown;
|
|
@@ -115,8 +115,8 @@ export declare const tryCloseRightTabs: import('@reduxjs/toolkit').AsyncThunk<vo
|
|
|
115
115
|
}>;
|
|
116
116
|
export declare const tryCloseLeftTabs: import('@reduxjs/toolkit').AsyncThunk<void, number, {
|
|
117
117
|
state: AppState;
|
|
118
|
-
dispatch?: Dispatch | undefined;
|
|
119
118
|
extra?: unknown;
|
|
119
|
+
dispatch?: Dispatch | undefined;
|
|
120
120
|
rejectValue?: unknown;
|
|
121
121
|
serializedErrorType?: unknown;
|
|
122
122
|
pendingMeta?: unknown;
|
|
@@ -141,8 +141,8 @@ export declare const reloadTab: import('@reduxjs/toolkit').AsyncThunk<void | INo
|
|
|
141
141
|
kind: string;
|
|
142
142
|
}>>, {
|
|
143
143
|
state: AppState;
|
|
144
|
-
dispatch?: Dispatch | undefined;
|
|
145
144
|
extra?: unknown;
|
|
145
|
+
dispatch?: Dispatch | undefined;
|
|
146
146
|
rejectValue?: unknown;
|
|
147
147
|
serializedErrorType?: unknown;
|
|
148
148
|
pendingMeta?: unknown;
|
|
@@ -156,8 +156,8 @@ export declare const saveTab: import('@reduxjs/toolkit').AsyncThunk<SaveTabRetur
|
|
|
156
156
|
tab: ITab;
|
|
157
157
|
}, {
|
|
158
158
|
state: AppState;
|
|
159
|
-
dispatch?: Dispatch | undefined;
|
|
160
159
|
extra?: unknown;
|
|
160
|
+
dispatch?: Dispatch | undefined;
|
|
161
161
|
rejectValue?: unknown;
|
|
162
162
|
serializedErrorType?: unknown;
|
|
163
163
|
pendingMeta?: unknown;
|
|
@@ -171,8 +171,8 @@ export declare const setTabContent: import('@reduxjs/toolkit').AsyncThunk<void,
|
|
|
171
171
|
date?: string | undefined;
|
|
172
172
|
}, {
|
|
173
173
|
state: AppState;
|
|
174
|
-
dispatch?: Dispatch | undefined;
|
|
175
174
|
extra?: unknown;
|
|
175
|
+
dispatch?: Dispatch | undefined;
|
|
176
176
|
rejectValue?: unknown;
|
|
177
177
|
serializedErrorType?: unknown;
|
|
178
178
|
pendingMeta?: unknown;
|
|
@@ -185,8 +185,8 @@ export declare const setCurrentWebformState: import('@reduxjs/toolkit').AsyncThu
|
|
|
185
185
|
contentPath?: string;
|
|
186
186
|
}, {
|
|
187
187
|
state: AppState;
|
|
188
|
-
dispatch?: Dispatch | undefined;
|
|
189
188
|
extra?: unknown;
|
|
189
|
+
dispatch?: Dispatch | undefined;
|
|
190
190
|
rejectValue?: unknown;
|
|
191
191
|
serializedErrorType?: unknown;
|
|
192
192
|
pendingMeta?: unknown;
|
|
@@ -216,8 +216,8 @@ export declare const tryInjectMethod: import('@reduxjs/toolkit').AsyncThunk<ITab
|
|
|
216
216
|
expand?: boolean;
|
|
217
217
|
}, {
|
|
218
218
|
state: AppState;
|
|
219
|
-
dispatch?: Dispatch | undefined;
|
|
220
219
|
extra?: unknown;
|
|
220
|
+
dispatch?: Dispatch | undefined;
|
|
221
221
|
rejectValue?: unknown;
|
|
222
222
|
serializedErrorType?: unknown;
|
|
223
223
|
pendingMeta?: unknown;
|
|
@@ -243,8 +243,8 @@ export declare const openRoles: import('@reduxjs/toolkit').AsyncThunk<void | ITa
|
|
|
243
243
|
}>>, {}, {
|
|
244
244
|
state: AppState;
|
|
245
245
|
rejectValue: string;
|
|
246
|
-
dispatch?: Dispatch | undefined;
|
|
247
246
|
extra?: unknown;
|
|
247
|
+
dispatch?: Dispatch | undefined;
|
|
248
248
|
serializedErrorType?: unknown;
|
|
249
249
|
pendingMeta?: unknown;
|
|
250
250
|
fulfilledMeta?: unknown;
|