@ws-ui/store 0.3.9 → 0.3.11
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/README.md +2 -6
- package/dist/hooks/store.d.ts +24 -3
- package/dist/index.cjs.js +86 -115
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +12235 -17422
- package/dist/index.es.js.map +1 -0
- package/dist/modules/catalog/index.d.ts +9 -1
- package/dist/modules/catalog/reducer.d.ts +9 -1
- package/dist/modules/catalog/thunks.d.ts +10 -1
- package/dist/modules/debugger/index.d.ts +1 -1
- package/dist/modules/debugger/reducer.d.ts +118 -3
- package/dist/modules/debugger/thunks.d.ts +26 -2
- package/dist/modules/debugger/types.d.ts +2 -2
- package/dist/modules/explorer/index.d.ts +1 -1
- package/dist/modules/explorer/reducer.d.ts +44 -2
- package/dist/modules/explorer/thunks.d.ts +368 -33
- package/dist/modules/explorer/utils.d.ts +2 -1
- package/dist/modules/index.d.ts +22 -1
- package/dist/modules/modals/index.d.ts +1 -1
- package/dist/modules/modals/reducer.d.ts +13 -2
- package/dist/modules/modals/thunks.d.ts +20 -1
- package/dist/modules/modals/types.d.ts +1 -1
- package/dist/modules/model/helpers.d.ts +2 -2
- package/dist/modules/model/index.d.ts +1 -1
- package/dist/modules/model/reducer.d.ts +10 -2
- package/dist/modules/model/selectors.d.ts +13 -7
- package/dist/modules/model/subjects.d.ts +7 -1
- package/dist/modules/model/thunks.d.ts +89 -4
- package/dist/modules/model/utils.d.ts +5 -5
- package/dist/modules/roles/index.d.ts +1 -1
- package/dist/modules/roles/reducer.d.ts +41 -2
- package/dist/modules/roles/thunks.d.ts +42 -3
- package/dist/modules/root/index.d.ts +1 -1
- package/dist/modules/root/reducer.d.ts +199 -2
- package/dist/modules/root/thunks.d.ts +246 -16
- package/dist/modules/root/types.d.ts +1 -1
- package/dist/modules/settings/index.d.ts +1 -1
- package/dist/modules/settings/reducer.d.ts +28 -2
- package/dist/modules/settings/thunks.d.ts +23 -2
- package/dist/modules/shared-conditions/index.d.ts +1 -1
- package/dist/modules/shared-conditions/reducer.d.ts +35 -3
- package/dist/modules/shared-conditions/thunks.d.ts +13 -1
- package/dist/modules/shared-conditions/utils.d.ts +2 -0
- package/dist/modules/shared-css/index.d.ts +1 -1
- package/dist/modules/shared-css/reducer.d.ts +14 -2
- package/dist/modules/shared-css/thunks.d.ts +13 -1
- package/dist/modules/shared-datasources/index.d.ts +1 -1
- package/dist/modules/shared-datasources/reducer.d.ts +10 -2
- package/dist/modules/shared-datasources/thunks.d.ts +73 -6
- package/dist/modules/tabs/index.d.ts +1 -1
- package/dist/modules/tabs/reducer.d.ts +1 -1
- package/dist/modules/tabs/selectors.d.ts +52 -1
- package/dist/modules/webforms/datasources.adapter.d.ts +24 -2
- package/dist/modules/webforms/index.d.ts +1 -1
- package/dist/modules/webforms/reducer.d.ts +47 -2
- package/dist/modules/webforms/thunks.d.ts +140 -10
- package/dist/modules/webforms/types.d.ts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/selectors/catalog.d.ts +200 -8
- package/dist/selectors/common.d.ts +89 -1
- package/dist/selectors/components.d.ts +50 -1
- package/dist/selectors/datasources.d.ts +152 -4
- package/dist/selectors/debugger.d.ts +612 -26
- package/dist/selectors/explorer.d.ts +1010 -22
- package/dist/selectors/modals.d.ts +26 -1
- package/dist/selectors/roles.d.ts +238 -8
- package/dist/selectors/settings.d.ts +332 -12
- package/dist/selectors/states.d.ts +201 -5
- package/dist/selectors/styles.d.ts +162 -5
- package/dist/selectors/tabs.d.ts +156 -3
- package/dist/selectors/webforms.d.ts +366 -13
- package/dist/store.d.ts +45 -3
- package/dist/utils.d.ts +4 -4
- package/package.json +55 -15
- package/dist/package.json +0 -28
- package/dist/style.css +0 -1
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FileFolderType, IFileInfo, ISaveFileResponse, ISetFileContentResponse, ITextEditorSelection, ITab } from '@ws-ui/shared';
|
|
2
2
|
import { ClassFileTypes } from '../root/types';
|
|
3
|
-
import {
|
|
3
|
+
import { AppState } from '..';
|
|
4
|
+
import { ISettingsState } from '../settings';
|
|
5
|
+
import { IOpenFilePayload, ITreeItem } from './types';
|
|
4
6
|
|
|
7
|
+
interface ICreateNewFilePayload {
|
|
8
|
+
fileName: string;
|
|
9
|
+
type: FileFolderType;
|
|
10
|
+
path: string;
|
|
11
|
+
parentNode: ITreeItem;
|
|
12
|
+
content?: string;
|
|
13
|
+
qodly: boolean;
|
|
14
|
+
}
|
|
5
15
|
export declare function getDefaultContent(root: FileFolderType, projectSettings: ISettingsState['project']): "" | {
|
|
6
16
|
metadata: {
|
|
7
17
|
v: string;
|
|
8
|
-
datasources:
|
|
9
|
-
styles:
|
|
18
|
+
datasources: never[];
|
|
19
|
+
styles: never[];
|
|
10
20
|
};
|
|
11
21
|
components: {
|
|
12
22
|
ROOT: {
|
|
@@ -18,21 +28,21 @@ export declare function getDefaultContent(root: FileFolderType, projectSettings:
|
|
|
18
28
|
props: {
|
|
19
29
|
airyMode: boolean;
|
|
20
30
|
className: string;
|
|
21
|
-
classNames:
|
|
22
|
-
events:
|
|
31
|
+
classNames: never[];
|
|
32
|
+
events: never[];
|
|
23
33
|
};
|
|
24
34
|
displayName: string;
|
|
25
35
|
custom: {};
|
|
26
36
|
hidden: boolean;
|
|
27
|
-
nodes:
|
|
37
|
+
nodes: never[];
|
|
28
38
|
linkedNodes: {};
|
|
29
39
|
};
|
|
30
40
|
};
|
|
31
41
|
} | "//%attributes = {}\n" | {
|
|
32
42
|
metadata: {
|
|
33
43
|
v: string;
|
|
34
|
-
datasources:
|
|
35
|
-
styles:
|
|
44
|
+
datasources: never[];
|
|
45
|
+
styles: never[];
|
|
36
46
|
};
|
|
37
47
|
pages: {
|
|
38
48
|
name: string;
|
|
@@ -44,8 +54,8 @@ export declare function getDefaultContent(root: FileFolderType, projectSettings:
|
|
|
44
54
|
};
|
|
45
55
|
isCanvas: boolean;
|
|
46
56
|
props: {
|
|
47
|
-
classNames:
|
|
48
|
-
events:
|
|
57
|
+
classNames: never[];
|
|
58
|
+
events: never[];
|
|
49
59
|
airyMode: boolean;
|
|
50
60
|
className: string;
|
|
51
61
|
};
|
|
@@ -53,7 +63,7 @@ export declare function getDefaultContent(root: FileFolderType, projectSettings:
|
|
|
53
63
|
custom: {};
|
|
54
64
|
parent: string;
|
|
55
65
|
hidden: boolean;
|
|
56
|
-
nodes:
|
|
66
|
+
nodes: never[];
|
|
57
67
|
linkedNodes: {};
|
|
58
68
|
};
|
|
59
69
|
};
|
|
@@ -62,7 +72,34 @@ export declare function getDefaultContent(root: FileFolderType, projectSettings:
|
|
|
62
72
|
export declare function getFilenameFromType(fileName: string, type: FileFolderType, qodly?: boolean): string;
|
|
63
73
|
export declare function castToFileFolder(type: string): FileFolderType;
|
|
64
74
|
export declare function getFileType(root: FileFolderType): FileFolderType;
|
|
65
|
-
export declare const tryEditMethod: any
|
|
75
|
+
export declare const tryEditMethod: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
|
|
76
|
+
initialLineInfo: {
|
|
77
|
+
line: number;
|
|
78
|
+
offset?: number;
|
|
79
|
+
lastModification: number;
|
|
80
|
+
};
|
|
81
|
+
initialSelectionInfo: {
|
|
82
|
+
selection: ITextEditorSelection;
|
|
83
|
+
lastModification: number;
|
|
84
|
+
};
|
|
85
|
+
diffContent: string;
|
|
86
|
+
attributes: import('@ws-ui/shared').IMethodAttributes;
|
|
87
|
+
source: import('@ws-ui/shared').ISource;
|
|
88
|
+
editor: import('@ws-ui/shared').IEditor;
|
|
89
|
+
ext: import('@ws-ui/shared').DebuggerFileExtension;
|
|
90
|
+
kind: string;
|
|
91
|
+
}>>, {
|
|
92
|
+
method: catalog.IMethod;
|
|
93
|
+
}, {
|
|
94
|
+
state: AppState;
|
|
95
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
96
|
+
extra?: unknown;
|
|
97
|
+
rejectValue?: unknown;
|
|
98
|
+
serializedErrorType?: unknown;
|
|
99
|
+
pendingMeta?: unknown;
|
|
100
|
+
fulfilledMeta?: unknown;
|
|
101
|
+
rejectedMeta?: unknown;
|
|
102
|
+
}>;
|
|
66
103
|
type TCreateModelFilesPayloadDataclass = {
|
|
67
104
|
type: 'dataclass';
|
|
68
105
|
className: string;
|
|
@@ -73,12 +110,83 @@ type TCreateModelFilesPayloadDataclass = {
|
|
|
73
110
|
export type TCreateModelFilesPayload = TCreateModelFilesPayloadDataclass | {
|
|
74
111
|
type: 'model';
|
|
75
112
|
};
|
|
76
|
-
export declare const createModelFiles:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
113
|
+
export declare const createModelFiles: import('@reduxjs/toolkit').AsyncThunk<void, TCreateModelFilesPayload, {
|
|
114
|
+
state: AppState;
|
|
115
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
116
|
+
extra?: unknown;
|
|
117
|
+
rejectValue?: unknown;
|
|
118
|
+
serializedErrorType?: unknown;
|
|
119
|
+
pendingMeta?: unknown;
|
|
120
|
+
fulfilledMeta?: unknown;
|
|
121
|
+
rejectedMeta?: unknown;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const fetchFolderContent: import('@reduxjs/toolkit').AsyncThunk<ITreeItem[], string | {
|
|
124
|
+
nodePath: string;
|
|
125
|
+
expandDataclass?: string;
|
|
126
|
+
}, {
|
|
127
|
+
state: AppState;
|
|
128
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
129
|
+
extra?: unknown;
|
|
130
|
+
rejectValue?: unknown;
|
|
131
|
+
serializedErrorType?: unknown;
|
|
132
|
+
pendingMeta?: unknown;
|
|
133
|
+
fulfilledMeta?: unknown;
|
|
134
|
+
rejectedMeta?: unknown;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const fetchFolderContentWithoutExpanding: import('@reduxjs/toolkit').AsyncThunk<ITreeItem[], string, {
|
|
137
|
+
state?: unknown;
|
|
138
|
+
dispatch?: import('redux').Dispatch;
|
|
139
|
+
extra?: unknown;
|
|
140
|
+
rejectValue?: unknown;
|
|
141
|
+
serializedErrorType?: unknown;
|
|
142
|
+
pendingMeta?: unknown;
|
|
143
|
+
fulfilledMeta?: unknown;
|
|
144
|
+
rejectedMeta?: unknown;
|
|
145
|
+
}>;
|
|
146
|
+
export declare const uploadFileAndGetResponse: import('@reduxjs/toolkit').AsyncThunk<{
|
|
147
|
+
status: number;
|
|
148
|
+
data: unknown;
|
|
149
|
+
}, File, {
|
|
150
|
+
state?: unknown;
|
|
151
|
+
dispatch?: import('redux').Dispatch;
|
|
152
|
+
extra?: unknown;
|
|
153
|
+
rejectValue?: unknown;
|
|
154
|
+
serializedErrorType?: unknown;
|
|
155
|
+
pendingMeta?: unknown;
|
|
156
|
+
fulfilledMeta?: unknown;
|
|
157
|
+
rejectedMeta?: unknown;
|
|
158
|
+
}>;
|
|
159
|
+
export declare const uploadFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
160
|
+
status: number;
|
|
161
|
+
fileName: string;
|
|
162
|
+
}, {
|
|
163
|
+
file: File;
|
|
164
|
+
path: string;
|
|
165
|
+
parentNode: ITreeItem;
|
|
166
|
+
}, {
|
|
167
|
+
state: AppState;
|
|
168
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
169
|
+
extra?: unknown;
|
|
170
|
+
rejectValue?: unknown;
|
|
171
|
+
serializedErrorType?: unknown;
|
|
172
|
+
pendingMeta?: unknown;
|
|
173
|
+
fulfilledMeta?: unknown;
|
|
174
|
+
rejectedMeta?: unknown;
|
|
175
|
+
}>;
|
|
176
|
+
export declare const createNewFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
177
|
+
qodly: boolean;
|
|
178
|
+
file: ISetFileContentResponse;
|
|
179
|
+
parentNode: ITreeItem;
|
|
180
|
+
}, ICreateNewFilePayload, {
|
|
181
|
+
state: AppState;
|
|
182
|
+
rejectValue: string;
|
|
183
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
184
|
+
extra?: unknown;
|
|
185
|
+
serializedErrorType?: unknown;
|
|
186
|
+
pendingMeta?: unknown;
|
|
187
|
+
fulfilledMeta?: unknown;
|
|
188
|
+
rejectedMeta?: unknown;
|
|
189
|
+
}>;
|
|
82
190
|
/**
|
|
83
191
|
* Returns the file path of the given file object based on its type.
|
|
84
192
|
*
|
|
@@ -92,22 +200,249 @@ export declare function getFilePath(file: ISaveFileResponse, options?: Partial<{
|
|
|
92
200
|
withExtension: boolean;
|
|
93
201
|
qodly: boolean;
|
|
94
202
|
}>): string;
|
|
95
|
-
export declare const createNewFileAndOpen:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
203
|
+
export declare const createNewFileAndOpen: import('@reduxjs/toolkit').AsyncThunk<void, ICreateNewFilePayload, {
|
|
204
|
+
state: AppState;
|
|
205
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
206
|
+
extra?: unknown;
|
|
207
|
+
rejectValue?: unknown;
|
|
208
|
+
serializedErrorType?: unknown;
|
|
209
|
+
pendingMeta?: unknown;
|
|
210
|
+
fulfilledMeta?: unknown;
|
|
211
|
+
rejectedMeta?: unknown;
|
|
212
|
+
}>;
|
|
213
|
+
export declare const createNewNode: import('@reduxjs/toolkit').AsyncThunk<{
|
|
214
|
+
file: import('@ws-ui/shared').IAddFolderResponse;
|
|
215
|
+
parentNode: ITreeItem;
|
|
216
|
+
}, {
|
|
217
|
+
fileName: string;
|
|
218
|
+
type: FileFolderType;
|
|
219
|
+
path: string;
|
|
220
|
+
parentNode: ITreeItem;
|
|
221
|
+
}, {
|
|
222
|
+
state?: unknown;
|
|
223
|
+
dispatch?: import('redux').Dispatch;
|
|
224
|
+
extra?: unknown;
|
|
225
|
+
rejectValue?: unknown;
|
|
226
|
+
serializedErrorType?: unknown;
|
|
227
|
+
pendingMeta?: unknown;
|
|
228
|
+
fulfilledMeta?: unknown;
|
|
229
|
+
rejectedMeta?: unknown;
|
|
230
|
+
}>;
|
|
231
|
+
export declare const fetchHTTPHandlers: import('@reduxjs/toolkit').AsyncThunk<void, void, {
|
|
232
|
+
state: AppState;
|
|
233
|
+
rejectValue: string;
|
|
234
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
235
|
+
extra?: unknown;
|
|
236
|
+
serializedErrorType?: unknown;
|
|
237
|
+
pendingMeta?: unknown;
|
|
238
|
+
fulfilledMeta?: unknown;
|
|
239
|
+
rejectedMeta?: unknown;
|
|
240
|
+
}>;
|
|
241
|
+
export declare const openFile: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
|
|
242
|
+
initialLineInfo: {
|
|
243
|
+
line: number;
|
|
244
|
+
offset?: number;
|
|
245
|
+
lastModification: number;
|
|
246
|
+
};
|
|
247
|
+
initialSelectionInfo: {
|
|
248
|
+
selection: ITextEditorSelection;
|
|
249
|
+
lastModification: number;
|
|
250
|
+
};
|
|
251
|
+
diffContent: string;
|
|
252
|
+
attributes: import('@ws-ui/shared').IMethodAttributes;
|
|
253
|
+
source: import('@ws-ui/shared').ISource;
|
|
254
|
+
editor: import('@ws-ui/shared').IEditor;
|
|
255
|
+
ext: import('@ws-ui/shared').DebuggerFileExtension;
|
|
256
|
+
kind: string;
|
|
257
|
+
}>> | null, IOpenFilePayload, {
|
|
258
|
+
state: AppState;
|
|
259
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
260
|
+
extra?: unknown;
|
|
261
|
+
rejectValue?: unknown;
|
|
262
|
+
serializedErrorType?: unknown;
|
|
263
|
+
pendingMeta?: unknown;
|
|
264
|
+
fulfilledMeta?: unknown;
|
|
265
|
+
rejectedMeta?: unknown;
|
|
266
|
+
}>;
|
|
267
|
+
export declare const openFileAtLine: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
|
|
268
|
+
initialLineInfo: {
|
|
269
|
+
line: number;
|
|
270
|
+
offset?: number;
|
|
271
|
+
lastModification: number;
|
|
272
|
+
};
|
|
273
|
+
initialSelectionInfo: {
|
|
274
|
+
selection: ITextEditorSelection;
|
|
275
|
+
lastModification: number;
|
|
276
|
+
};
|
|
277
|
+
diffContent: string;
|
|
278
|
+
attributes: import('@ws-ui/shared').IMethodAttributes;
|
|
279
|
+
source: import('@ws-ui/shared').ISource;
|
|
280
|
+
editor: import('@ws-ui/shared').IEditor;
|
|
281
|
+
ext: import('@ws-ui/shared').DebuggerFileExtension;
|
|
282
|
+
kind: string;
|
|
283
|
+
}>>, {
|
|
284
|
+
file: IFileInfo;
|
|
285
|
+
line: number;
|
|
286
|
+
offset?: number;
|
|
287
|
+
}, {
|
|
288
|
+
state: AppState;
|
|
289
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
290
|
+
extra?: unknown;
|
|
291
|
+
rejectValue?: unknown;
|
|
292
|
+
serializedErrorType?: unknown;
|
|
293
|
+
pendingMeta?: unknown;
|
|
294
|
+
fulfilledMeta?: unknown;
|
|
295
|
+
rejectedMeta?: unknown;
|
|
296
|
+
}>;
|
|
297
|
+
export declare const injectContentAtLine: import('@reduxjs/toolkit').AsyncThunk<{
|
|
298
|
+
path: string;
|
|
299
|
+
content: string;
|
|
300
|
+
line: number;
|
|
301
|
+
}, {
|
|
302
|
+
path: string;
|
|
303
|
+
content: string;
|
|
304
|
+
line: number;
|
|
305
|
+
}, {
|
|
306
|
+
state?: unknown;
|
|
307
|
+
dispatch?: import('redux').Dispatch;
|
|
308
|
+
extra?: unknown;
|
|
309
|
+
rejectValue?: unknown;
|
|
310
|
+
serializedErrorType?: unknown;
|
|
311
|
+
pendingMeta?: unknown;
|
|
312
|
+
fulfilledMeta?: unknown;
|
|
313
|
+
rejectedMeta?: unknown;
|
|
314
|
+
}>;
|
|
101
315
|
export interface IOpenFileAtSelectionPayload {
|
|
102
316
|
file: IFileInfo;
|
|
103
317
|
selection: ITextEditorSelection;
|
|
104
318
|
}
|
|
105
|
-
export declare const openFileAtSelection: any
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
319
|
+
export declare const openFileAtSelection: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
|
|
320
|
+
initialLineInfo: {
|
|
321
|
+
line: number;
|
|
322
|
+
offset?: number;
|
|
323
|
+
lastModification: number;
|
|
324
|
+
};
|
|
325
|
+
initialSelectionInfo: {
|
|
326
|
+
selection: ITextEditorSelection;
|
|
327
|
+
lastModification: number;
|
|
328
|
+
};
|
|
329
|
+
diffContent: string;
|
|
330
|
+
attributes: import('@ws-ui/shared').IMethodAttributes;
|
|
331
|
+
source: import('@ws-ui/shared').ISource;
|
|
332
|
+
editor: import('@ws-ui/shared').IEditor;
|
|
333
|
+
ext: import('@ws-ui/shared').DebuggerFileExtension;
|
|
334
|
+
kind: string;
|
|
335
|
+
}>>, IOpenFileAtSelectionPayload, {
|
|
336
|
+
state: AppState;
|
|
337
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
338
|
+
extra?: unknown;
|
|
339
|
+
rejectValue?: unknown;
|
|
340
|
+
serializedErrorType?: unknown;
|
|
341
|
+
pendingMeta?: unknown;
|
|
342
|
+
fulfilledMeta?: unknown;
|
|
343
|
+
rejectedMeta?: unknown;
|
|
344
|
+
}>;
|
|
345
|
+
export declare const deleteFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
346
|
+
deleted: boolean;
|
|
347
|
+
node: ITreeItem;
|
|
348
|
+
}, ITreeItem, {
|
|
349
|
+
state: AppState;
|
|
350
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
351
|
+
extra?: unknown;
|
|
352
|
+
rejectValue?: unknown;
|
|
353
|
+
serializedErrorType?: unknown;
|
|
354
|
+
pendingMeta?: unknown;
|
|
355
|
+
fulfilledMeta?: unknown;
|
|
356
|
+
rejectedMeta?: unknown;
|
|
357
|
+
}>;
|
|
358
|
+
export declare const deleteFolder: import('@reduxjs/toolkit').AsyncThunk<{
|
|
359
|
+
deleted: boolean;
|
|
360
|
+
node: ITreeItem;
|
|
361
|
+
}, ITreeItem, {
|
|
362
|
+
state: AppState;
|
|
363
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
364
|
+
extra?: unknown;
|
|
365
|
+
rejectValue?: unknown;
|
|
366
|
+
serializedErrorType?: unknown;
|
|
367
|
+
pendingMeta?: unknown;
|
|
368
|
+
fulfilledMeta?: unknown;
|
|
369
|
+
rejectedMeta?: unknown;
|
|
370
|
+
}>;
|
|
371
|
+
export declare const removeFileNode: import('@reduxjs/toolkit').AsyncThunk<{
|
|
372
|
+
deleted: boolean;
|
|
373
|
+
node: ITreeItem;
|
|
374
|
+
}, ITreeItem, {
|
|
375
|
+
state: AppState;
|
|
376
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
377
|
+
extra?: unknown;
|
|
378
|
+
rejectValue?: unknown;
|
|
379
|
+
serializedErrorType?: unknown;
|
|
380
|
+
pendingMeta?: unknown;
|
|
381
|
+
fulfilledMeta?: unknown;
|
|
382
|
+
rejectedMeta?: unknown;
|
|
383
|
+
}>;
|
|
384
|
+
export declare const renameFile: import('@reduxjs/toolkit').AsyncThunk<{
|
|
385
|
+
old: ITreeItem;
|
|
386
|
+
new: ITreeItem;
|
|
387
|
+
}, {
|
|
388
|
+
file: ITreeItem;
|
|
389
|
+
newname: string;
|
|
390
|
+
}, {
|
|
391
|
+
state: AppState;
|
|
392
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
393
|
+
extra?: unknown;
|
|
394
|
+
rejectValue?: unknown;
|
|
395
|
+
serializedErrorType?: unknown;
|
|
396
|
+
pendingMeta?: unknown;
|
|
397
|
+
fulfilledMeta?: unknown;
|
|
398
|
+
rejectedMeta?: unknown;
|
|
399
|
+
}>;
|
|
400
|
+
export declare const relocateNode: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
401
|
+
draggedNode: ITreeItem;
|
|
402
|
+
newLocation: ITreeItem;
|
|
403
|
+
}, {
|
|
404
|
+
state: AppState;
|
|
405
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
406
|
+
extra?: unknown;
|
|
407
|
+
rejectValue?: unknown;
|
|
408
|
+
serializedErrorType?: unknown;
|
|
409
|
+
pendingMeta?: unknown;
|
|
410
|
+
fulfilledMeta?: unknown;
|
|
411
|
+
rejectedMeta?: unknown;
|
|
412
|
+
}>;
|
|
413
|
+
export declare const duplicateNode: import('@reduxjs/toolkit').AsyncThunk<any, any, {
|
|
414
|
+
state: AppState;
|
|
415
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
416
|
+
extra?: unknown;
|
|
417
|
+
rejectValue?: unknown;
|
|
418
|
+
serializedErrorType?: unknown;
|
|
419
|
+
pendingMeta?: unknown;
|
|
420
|
+
fulfilledMeta?: unknown;
|
|
421
|
+
rejectedMeta?: unknown;
|
|
422
|
+
}>;
|
|
423
|
+
export declare const executeMethod: import('@reduxjs/toolkit').AsyncThunk<void | {
|
|
424
|
+
[refName: string]: datasources.IComponentAction;
|
|
425
|
+
}, {
|
|
426
|
+
methodName: string;
|
|
427
|
+
namespace?: string;
|
|
428
|
+
params?: {
|
|
429
|
+
name: string;
|
|
430
|
+
namespace?: string;
|
|
431
|
+
isHardCoded?: boolean;
|
|
432
|
+
type?: "string" | "number" | "object" | "date" | "array" | "bool" | undefined;
|
|
433
|
+
}[];
|
|
434
|
+
resultingDataSource?: {
|
|
435
|
+
id?: string;
|
|
436
|
+
namespace?: string;
|
|
437
|
+
};
|
|
438
|
+
}, {
|
|
439
|
+
state: AppState;
|
|
440
|
+
dispatch?: import('redux').Dispatch | undefined;
|
|
441
|
+
extra?: unknown;
|
|
442
|
+
rejectValue?: unknown;
|
|
443
|
+
serializedErrorType?: unknown;
|
|
444
|
+
pendingMeta?: unknown;
|
|
445
|
+
fulfilledMeta?: unknown;
|
|
446
|
+
rejectedMeta?: unknown;
|
|
447
|
+
}>;
|
|
113
448
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { INodeInfo } from '@ws-ui/shared';
|
|
2
1
|
import { IEditors, ITreeItem } from './types';
|
|
2
|
+
import { AppState } from '..';
|
|
3
|
+
import { INodeInfo } from '@ws-ui/shared';
|
|
3
4
|
|
|
4
5
|
export declare function getNodeRelativePath(nodePath: string): string;
|
|
5
6
|
export declare function getEditors(path: string): IEditors;
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { default as rootReducer } from './root';
|
|
2
2
|
|
|
3
|
-
export declare const stateReducer:
|
|
3
|
+
export declare const stateReducer: import('redux').Reducer<import('redux').CombinedState<{
|
|
4
|
+
root: import('./root').IRootState;
|
|
5
|
+
explorer: import('./explorer').ITreeItem[];
|
|
6
|
+
debugger: import('./debugger').IDebuggerState;
|
|
7
|
+
settings: import('./settings').ISettingsState;
|
|
8
|
+
catalog: {
|
|
9
|
+
state: "loading";
|
|
10
|
+
} | {
|
|
11
|
+
state: "loaded";
|
|
12
|
+
model: datasources.IEnhancedCatalog;
|
|
13
|
+
} | {
|
|
14
|
+
state: "error";
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
17
|
+
roles: import('./roles').IRolesState;
|
|
18
|
+
sharedDatasources: import('./shared-datasources').ISharedDatasourcesState;
|
|
19
|
+
savedConditions: import('./shared-conditions').ISavedConditionsState;
|
|
20
|
+
webforms: import('./webforms').IWebformEditorState;
|
|
21
|
+
modals: import('./modals').IModalsState;
|
|
22
|
+
sharedCSS: import('./shared-css').ISharedCSSState;
|
|
23
|
+
model: import('./model').IModelState;
|
|
24
|
+
}>, import('redux').AnyAction>;
|
|
4
25
|
export { rootReducer };
|
|
5
26
|
export type AppState = ReturnType<typeof stateReducer>;
|
|
6
27
|
export * from './catalog';
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { IModal } from '@ws-ui/shared';
|
|
2
|
+
import { ICloseModalAction, ICreateModalAction, IEditModalAction, IRemoveModalAction } from './types';
|
|
2
3
|
|
|
3
4
|
export interface IModalsState {
|
|
4
5
|
list: IModal[];
|
|
5
6
|
}
|
|
6
|
-
declare const stateSlice:
|
|
7
|
-
|
|
7
|
+
declare const stateSlice: import('@reduxjs/toolkit').Slice<IModalsState, {
|
|
8
|
+
createModal: (state: import('immer/dist/internal.js').WritableDraft<IModalsState>, action: ICreateModalAction) => void;
|
|
9
|
+
editModal: (state: import('immer/dist/internal.js').WritableDraft<IModalsState>, action: IEditModalAction) => void;
|
|
10
|
+
removeModal: (state: import('immer/dist/internal.js').WritableDraft<IModalsState>, action: IRemoveModalAction) => void;
|
|
11
|
+
closeModal: (state: import('immer/dist/internal.js').WritableDraft<IModalsState>, action: ICloseModalAction) => void;
|
|
12
|
+
}, "modals">;
|
|
13
|
+
export declare const createModal: import('@reduxjs/toolkit').ActionCreatorWithPayload<IModal, "modals/createModal">, removeModal: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "modals/removeModal">, closeModal: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
14
|
+
id: string;
|
|
15
|
+
reason?: import('@ws-ui/shared').ModalCloseReason;
|
|
16
|
+
}, "modals/closeModal">, editModal: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
17
|
+
id: string;
|
|
18
|
+
} & Partial<Pick<IModal, "views" | "title">>, "modals/editModal">;
|
|
8
19
|
export default stateSlice;
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { IModal, ModalType } from '@ws-ui/shared';
|
|
2
|
+
|
|
3
|
+
interface IOpenModalPayload extends Omit<IModal, 'id' | 'isOpen' | 'type'> {
|
|
4
|
+
type?: ModalType;
|
|
5
|
+
}
|
|
6
|
+
interface IOpenModalReturnValue {
|
|
7
|
+
confirmed?: boolean;
|
|
8
|
+
options?: Record<string, boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare const openModal: import('@reduxjs/toolkit').AsyncThunk<IOpenModalReturnValue, IOpenModalPayload, {
|
|
11
|
+
state?: unknown;
|
|
12
|
+
dispatch?: import('redux').Dispatch;
|
|
13
|
+
extra?: unknown;
|
|
14
|
+
rejectValue?: unknown;
|
|
15
|
+
serializedErrorType?: unknown;
|
|
16
|
+
pendingMeta?: unknown;
|
|
17
|
+
fulfilledMeta?: unknown;
|
|
18
|
+
rejectedMeta?: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IModal, ModalCloseReason } from '@ws-ui/shared';
|
|
2
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { IModal, ModalCloseReason } from '@ws-ui/shared';
|
|
3
3
|
|
|
4
4
|
export type ICreateModalAction = PayloadAction<IModal>;
|
|
5
5
|
export type IEditModalAction = PayloadAction<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ModelNode } from './types';
|
|
1
|
+
import { ServerModel, ModelNode } from './types';
|
|
2
2
|
|
|
3
3
|
export declare const serializeModel: (nodes: ModelNode[], modelProps: Partial<{
|
|
4
4
|
version: string;
|
|
5
5
|
backgroundColor: string;
|
|
6
6
|
backgroundImage: string;
|
|
7
|
-
backgroundVariant:
|
|
7
|
+
backgroundVariant: "dotted" | "grid" | "none";
|
|
8
8
|
}>) => ServerModel;
|
|
9
9
|
export declare function getDefaultName(prefix: string, _propertyKey: string, items: Record<string, any>): string;
|
|
10
10
|
export declare const isRelatedEntityAttr: (attribute: catalog.IAttribute) => boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
|
|
1
3
|
export type IModelState = {
|
|
2
4
|
model: {
|
|
3
5
|
dataClasses: Record<string, catalog.IDataClass>;
|
|
@@ -18,6 +20,12 @@ export declare const FLAGS_KEYS: {
|
|
|
18
20
|
DATACLASS_DELETE: string;
|
|
19
21
|
DATACLASS_DRAGGABLE: string;
|
|
20
22
|
};
|
|
21
|
-
declare const stateSlice:
|
|
22
|
-
|
|
23
|
+
declare const stateSlice: import('@reduxjs/toolkit').Slice<IModelState, {
|
|
24
|
+
setModelFlag(state: IModelState, action: PayloadAction<{
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>): void;
|
|
27
|
+
}, "Models">;
|
|
28
|
+
export declare const setModelFlag: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}, "Models/setModelFlag">;
|
|
23
31
|
export default stateSlice;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
export declare const useModelSelector: () =>
|
|
2
|
-
export declare const useDataclasses: () =>
|
|
3
|
-
export declare const useCollections: () =>
|
|
4
|
-
export declare const useDataclass: (dataclassId: string) =>
|
|
5
|
-
export declare const useAttribute: (dataclassId: string, attributeId: string) =>
|
|
6
|
-
export declare const useModelViewport: () =>
|
|
1
|
+
export declare const useModelSelector: () => import('./reducer').IModelState;
|
|
2
|
+
export declare const useDataclasses: () => Record<string, catalog.IDataClass>;
|
|
3
|
+
export declare const useCollections: () => Record<string, catalog.IDataClass>;
|
|
4
|
+
export declare const useDataclass: (dataclassId: string) => catalog.IDataClass;
|
|
5
|
+
export declare const useAttribute: (dataclassId: string, attributeId: string) => catalog.IAttribute | undefined;
|
|
6
|
+
export declare const useModelViewport: () => {
|
|
7
|
+
zoom: number;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
} | undefined;
|
|
7
11
|
export declare const useModelFlags: () => {
|
|
8
12
|
deleteDataclass: any;
|
|
9
13
|
draggableDataclass: any;
|
|
10
|
-
flags:
|
|
14
|
+
flags: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
11
17
|
};
|