@ws-ui/store 0.1.0 → 0.1.2
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 +3 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/store.d.ts +94 -0
- package/dist/index.cjs.js +157 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +6 -86
- package/dist/index.es.js +15729 -0
- package/dist/index.es.js.map +1 -0
- package/dist/modules/catalog/index.d.ts +13 -0
- package/dist/modules/catalog/reducer.d.ts +20 -0
- package/dist/modules/catalog/thunks.d.ts +4 -0
- package/dist/modules/catalog/types.d.ts +1 -0
- package/dist/modules/debugger/index.d.ts +6 -0
- package/dist/modules/debugger/reducer.d.ts +121 -0
- package/dist/modules/debugger/thunks.d.ts +11 -0
- package/dist/modules/debugger/types.d.ts +226 -0
- package/dist/modules/debugger/utils.d.ts +3 -0
- package/dist/modules/explorer/index.d.ts +6 -0
- package/dist/modules/explorer/reducer.d.ts +38 -0
- package/dist/modules/explorer/thunks.d.ts +263 -0
- package/dist/modules/explorer/types.d.ts +56 -0
- package/dist/modules/explorer/utils.d.ts +4 -0
- package/dist/modules/index.d.ts +52 -0
- package/dist/modules/modals/index.d.ts +5 -0
- package/dist/modules/modals/reducer.d.ts +17 -0
- package/dist/modules/modals/thunks.d.ts +12 -0
- package/dist/modules/modals/types.d.ts +69 -0
- package/dist/modules/model/helpers.d.ts +12 -0
- package/dist/modules/model/index.d.ts +8 -0
- package/dist/modules/model/reducer.d.ts +33 -0
- package/dist/modules/model/selectors.d.ts +12 -0
- package/dist/modules/model/subjects.d.ts +6 -0
- package/dist/modules/model/thunks.d.ts +55 -0
- package/dist/modules/model/types.d.ts +97 -0
- package/dist/modules/roles/__tests__/adapter.test.d.ts +1 -0
- package/dist/modules/roles/adapter.d.ts +179 -0
- package/dist/modules/roles/index.d.ts +21 -0
- package/dist/modules/roles/reducer.d.ts +64 -0
- package/dist/modules/roles/thunks.d.ts +24 -0
- package/dist/modules/roles/types.d.ts +86 -0
- package/dist/modules/root/index.d.ts +5 -0
- package/dist/modules/root/reducer.d.ts +153 -0
- package/dist/modules/root/thunks.d.ts +117 -0
- package/dist/modules/root/types.d.ts +59 -0
- package/dist/modules/settings/index.d.ts +5 -0
- package/dist/modules/settings/reducer.d.ts +45 -0
- package/dist/modules/settings/thunks.d.ts +7 -0
- package/dist/modules/settings/types.d.ts +7 -0
- package/dist/modules/settings/utils.d.ts +2 -0
- package/dist/modules/shared-css/index.d.ts +5 -0
- package/dist/modules/shared-css/reducer.d.ts +21 -0
- package/dist/modules/shared-css/thunks.d.ts +6 -0
- package/dist/modules/shared-css/types.d.ts +1 -0
- package/dist/modules/shared-datasources/index.d.ts +5 -0
- package/dist/modules/shared-datasources/reducer.d.ts +18 -0
- package/dist/modules/shared-datasources/thunks.d.ts +32 -0
- package/dist/modules/shared-datasources/types.d.ts +1 -0
- package/dist/modules/tabs/index.d.ts +5 -0
- package/dist/modules/tabs/reducer.d.ts +4 -0
- package/dist/modules/tabs/selectors.d.ts +64 -0
- package/dist/modules/tabs/types.d.ts +1 -0
- package/dist/modules/webforms/datasources.adapter.d.ts +40 -0
- package/dist/modules/webforms/index.d.ts +6 -0
- package/dist/modules/webforms/private.d.ts +3 -0
- package/dist/modules/webforms/reducer.d.ts +53 -0
- package/dist/modules/webforms/thunks.d.ts +58 -0
- package/dist/modules/webforms/types.d.ts +71 -0
- package/dist/provider.d.ts +5 -0
- package/dist/selectors/catalog.d.ts +234 -0
- package/dist/selectors/common.d.ts +146 -0
- package/dist/selectors/components.d.ts +70 -0
- package/dist/selectors/datasources.d.ts +262 -0
- package/dist/selectors/debugger.d.ts +922 -0
- package/dist/selectors/explorer.d.ts +1352 -0
- package/dist/selectors/index.d.ts +12 -0
- package/dist/selectors/modals.d.ts +41 -0
- package/dist/selectors/roles.d.ts +471 -0
- package/dist/selectors/settings.d.ts +337 -0
- package/dist/selectors/styles.d.ts +234 -0
- package/dist/selectors/tabs.d.ts +72 -0
- package/dist/selectors/webforms.d.ts +450 -0
- package/dist/store.d.ts +10 -0
- package/dist/utils.d.ts +16 -0
- package/package.json +46 -20
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -168
- package/dist/index.js.map +0 -1
- package/dist/index.module.js +0 -167
- package/dist/index.module.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
import { FileFolderTypeWithContent, IFileInfoResponse, IMultilineMessage, INodeInfo, ITab } from '@ws-ui/shared';
|
|
3
|
+
import { AppState } from '..';
|
|
4
|
+
import { ClassFileTypes, TActionRenameDataSource } from './types';
|
|
5
|
+
export declare const fetchFiles: import("@reduxjs/toolkit").AsyncThunk<{
|
|
6
|
+
name: string;
|
|
7
|
+
type: FileFolderTypeWithContent;
|
|
8
|
+
date: string;
|
|
9
|
+
path: string;
|
|
10
|
+
}[], void, {}>;
|
|
11
|
+
/**
|
|
12
|
+
* handles the rename of a datasource.
|
|
13
|
+
*
|
|
14
|
+
* - if the datasource is a local datasource, it will rename it along with it's references in component and other datasources.
|
|
15
|
+
* - if the datasource is a shared datasource, it will do the same as above but only for current webform.
|
|
16
|
+
*/
|
|
17
|
+
export declare const renameDataSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
18
|
+
path: string | undefined;
|
|
19
|
+
namespace: string;
|
|
20
|
+
datasources: datasources.ICreateDataSource[];
|
|
21
|
+
} | null, TActionRenameDataSource, {}>;
|
|
22
|
+
export declare const editDataSource: import("@reduxjs/toolkit").AsyncThunk<(datasources.ICreateDataSourceScalar | datasources.ICreateDataSourceEntity | datasources.ICreateDataSourceEntitySelection)[], {
|
|
23
|
+
path: string;
|
|
24
|
+
datasourceId: string;
|
|
25
|
+
namespace?: string | undefined;
|
|
26
|
+
propertyKey: string;
|
|
27
|
+
value: any;
|
|
28
|
+
}, {}>;
|
|
29
|
+
export declare const fetchChanges: import("@reduxjs/toolkit").AsyncThunk<IFileInfoResponse, void, {
|
|
30
|
+
state: AppState;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const saveAll: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
33
|
+
state: AppState;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const tryCloseTab: import("@reduxjs/toolkit").AsyncThunk<boolean, string, {
|
|
36
|
+
state: AppState;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const tryCloseOtherTabs: import("@reduxjs/toolkit").AsyncThunk<void, string, {
|
|
39
|
+
state: AppState;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const tryCloseAllTabs: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
42
|
+
state: AppState;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const tryCloseRightTabs: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
45
|
+
state: AppState;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const tryCloseLeftTabs: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
48
|
+
state: AppState;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const reloadTab: import("@reduxjs/toolkit").AsyncThunk<void | INodeInfo, ITab<any, Partial<{
|
|
51
|
+
initialLineInfo: {
|
|
52
|
+
line: number;
|
|
53
|
+
offset?: number | undefined;
|
|
54
|
+
lastModification: number;
|
|
55
|
+
};
|
|
56
|
+
initialSelectionInfo: {
|
|
57
|
+
selection: import("@ws-ui/shared").ITextEditorSelection;
|
|
58
|
+
lastModification: number;
|
|
59
|
+
};
|
|
60
|
+
diffContent: string;
|
|
61
|
+
attributes: import("@ws-ui/shared").IMethodAttributes;
|
|
62
|
+
source: import("@ws-ui/shared").ISource;
|
|
63
|
+
editor: import("@ws-ui/shared").IEditor;
|
|
64
|
+
ext: import("@ws-ui/shared").DebuggerFileExtension;
|
|
65
|
+
}>>, {
|
|
66
|
+
state: AppState;
|
|
67
|
+
}>;
|
|
68
|
+
type SaveTabReturnType = ITab & {
|
|
69
|
+
errors: IMultilineMessage[];
|
|
70
|
+
};
|
|
71
|
+
export declare const saveTab: import("@reduxjs/toolkit").AsyncThunk<SaveTabReturnType | null, {
|
|
72
|
+
tab: ITab;
|
|
73
|
+
}, {
|
|
74
|
+
state: AppState;
|
|
75
|
+
}>;
|
|
76
|
+
export declare const tryInjectMethod: import("@reduxjs/toolkit").AsyncThunk<ITab<any, Partial<{
|
|
77
|
+
initialLineInfo: {
|
|
78
|
+
line: number;
|
|
79
|
+
offset?: number | undefined;
|
|
80
|
+
lastModification: number;
|
|
81
|
+
};
|
|
82
|
+
initialSelectionInfo: {
|
|
83
|
+
selection: import("@ws-ui/shared").ITextEditorSelection;
|
|
84
|
+
lastModification: number;
|
|
85
|
+
};
|
|
86
|
+
diffContent: string;
|
|
87
|
+
attributes: import("@ws-ui/shared").IMethodAttributes;
|
|
88
|
+
source: import("@ws-ui/shared").ISource;
|
|
89
|
+
editor: import("@ws-ui/shared").IEditor;
|
|
90
|
+
ext: import("@ws-ui/shared").DebuggerFileExtension;
|
|
91
|
+
}>> | null, {
|
|
92
|
+
name: string;
|
|
93
|
+
type?: ClassFileTypes | undefined;
|
|
94
|
+
dataclass?: string | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
state: AppState;
|
|
97
|
+
}>;
|
|
98
|
+
export declare const openRoles: import("@reduxjs/toolkit").AsyncThunk<void | ITab<any, Partial<{
|
|
99
|
+
initialLineInfo: {
|
|
100
|
+
line: number;
|
|
101
|
+
offset?: number | undefined;
|
|
102
|
+
lastModification: number;
|
|
103
|
+
};
|
|
104
|
+
initialSelectionInfo: {
|
|
105
|
+
selection: import("@ws-ui/shared").ITextEditorSelection;
|
|
106
|
+
lastModification: number;
|
|
107
|
+
};
|
|
108
|
+
diffContent: string;
|
|
109
|
+
attributes: import("@ws-ui/shared").IMethodAttributes;
|
|
110
|
+
source: import("@ws-ui/shared").ISource;
|
|
111
|
+
editor: import("@ws-ui/shared").IEditor;
|
|
112
|
+
ext: import("@ws-ui/shared").DebuggerFileExtension;
|
|
113
|
+
}>>, {}, {
|
|
114
|
+
state: AppState;
|
|
115
|
+
rejectValue: string;
|
|
116
|
+
}>;
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
import { ITab } from '@ws-ui/shared';
|
|
4
|
+
export interface IRootState {
|
|
5
|
+
tabs: ITab[];
|
|
6
|
+
filesLoading: boolean;
|
|
7
|
+
activeTab: string;
|
|
8
|
+
recent: ITab[];
|
|
9
|
+
}
|
|
10
|
+
export type TActionAddDataSource = PayloadAction<{
|
|
11
|
+
datasourceDef: datasources.ICreateDataSource;
|
|
12
|
+
path: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type TActionEditDataSource = PayloadAction<{
|
|
15
|
+
path: string;
|
|
16
|
+
datasourceId: string;
|
|
17
|
+
namespace?: string;
|
|
18
|
+
propertyKey: string;
|
|
19
|
+
value: any;
|
|
20
|
+
}>;
|
|
21
|
+
export type TActionRemoveDataSource = PayloadAction<{
|
|
22
|
+
path: string;
|
|
23
|
+
datasourceID: string;
|
|
24
|
+
}>;
|
|
25
|
+
export type TActionSetDataSources = PayloadAction<{
|
|
26
|
+
datasourceArr: datasources.ICreateDataSource[];
|
|
27
|
+
path: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type TActionRenameDataSource = {
|
|
30
|
+
/**
|
|
31
|
+
* id of datasource to be renamed
|
|
32
|
+
*/
|
|
33
|
+
datasourceId: string;
|
|
34
|
+
/**
|
|
35
|
+
* new datasource id
|
|
36
|
+
*/
|
|
37
|
+
value: string;
|
|
38
|
+
/**
|
|
39
|
+
* datasource namespace
|
|
40
|
+
*/
|
|
41
|
+
datasourceNamespace: datasources.ICreateDataSource['namespace'];
|
|
42
|
+
/**
|
|
43
|
+
* option to auto update the references in `components`.
|
|
44
|
+
*/
|
|
45
|
+
autoUpdateReferences: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @optional path of the webform. by default, it's the current webform.
|
|
48
|
+
*/
|
|
49
|
+
path?: string;
|
|
50
|
+
};
|
|
51
|
+
export declare enum ETooltipBehavior {
|
|
52
|
+
SHOW_AFTER_TIMEOUT = "show_after_timeout",
|
|
53
|
+
HIDE_AFTER_TIMEOUT = "hide_after_timeout"
|
|
54
|
+
}
|
|
55
|
+
export declare enum EDisplayMode {
|
|
56
|
+
AIRY = "airy",
|
|
57
|
+
COMPACT = "neutral"
|
|
58
|
+
}
|
|
59
|
+
export type ClassFileTypes = 'entity' | 'collection' | 'dataclass' | 'model';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { IAppSettingsResponse } from '@ws-ui/shared';
|
|
3
|
+
import { TSetSettingPayload, TSettingPath } from './types';
|
|
4
|
+
export interface ISettingsState {
|
|
5
|
+
session: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
project: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
server: IAppSettingsResponse;
|
|
12
|
+
welcometour: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const stateSlice: import("@reduxjs/toolkit").Slice<ISettingsState, {
|
|
17
|
+
setSetting(state: ISettingsState, action: TSetSettingPayload): void;
|
|
18
|
+
setSettings(state: ISettingsState, action: PayloadAction<{
|
|
19
|
+
path: TSettingPath;
|
|
20
|
+
value: any;
|
|
21
|
+
}>): void;
|
|
22
|
+
setSettingsAsText(state: ISettingsState, action: {
|
|
23
|
+
payload: {
|
|
24
|
+
path: TSettingPath;
|
|
25
|
+
settings: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type: string;
|
|
30
|
+
}): void;
|
|
31
|
+
}, "settings">;
|
|
32
|
+
export declare const setSetting: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
33
|
+
path: TSettingPath;
|
|
34
|
+
settingsKey: string;
|
|
35
|
+
value: any;
|
|
36
|
+
}, string>, setSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
37
|
+
path: TSettingPath;
|
|
38
|
+
value: any;
|
|
39
|
+
}, string>, setSettingsAsText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
40
|
+
path: TSettingPath;
|
|
41
|
+
settings: {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
};
|
|
44
|
+
}, string>;
|
|
45
|
+
export default stateSlice;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INodeInfo } from '@ws-ui/shared';
|
|
2
|
+
import { AppState } from '..';
|
|
3
|
+
export declare const fetchSettings: import("@reduxjs/toolkit").AsyncThunk<INodeInfo, void, {
|
|
4
|
+
state: AppState;
|
|
5
|
+
rejectValue: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const fetchAppSettings: import("@reduxjs/toolkit").AsyncThunk<import("@ws-ui/shared").IAppSettingsResponse, void, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { IWebFormStyleClass } from '@ws-ui/shared';
|
|
3
|
+
export type ISharedCSSState = {
|
|
4
|
+
state: 'loading' | 'loaded' | 'error';
|
|
5
|
+
styles: IWebFormStyleClass[];
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const stateSlice: import("@reduxjs/toolkit").Slice<import("immer/dist/internal.js").WritableDraft<ISharedCSSState>, {
|
|
9
|
+
updateSharedCss: (state: import("immer/dist/internal.js").WritableDraft<ISharedCSSState>, action: PayloadAction<{
|
|
10
|
+
classes: IWebFormStyleClass[];
|
|
11
|
+
}>) => import("immer/dist/internal.js").WritableDraft<ISharedCSSState>;
|
|
12
|
+
initSharedCss: (state: import("immer/dist/internal.js").WritableDraft<ISharedCSSState>, action: PayloadAction<{
|
|
13
|
+
classes: IWebFormStyleClass[];
|
|
14
|
+
}>) => import("immer/dist/internal.js").WritableDraft<ISharedCSSState>;
|
|
15
|
+
}, "shared-css">;
|
|
16
|
+
export declare const updateSharedCss: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
+
classes: IWebFormStyleClass[];
|
|
18
|
+
}, string>, initSharedCss: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
classes: IWebFormStyleClass[];
|
|
20
|
+
}, string>;
|
|
21
|
+
export default stateSlice;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
export type ISharedDatasourcesState = {
|
|
4
|
+
state: 'loading' | 'loaded' | 'error';
|
|
5
|
+
sources: {
|
|
6
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
7
|
+
};
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const stateSlice: import("@reduxjs/toolkit").Slice<ISharedDatasourcesState, {
|
|
11
|
+
addEmptyNamespace(state: import("immer/dist/internal.js").WritableDraft<ISharedDatasourcesState>, action: PayloadAction<{
|
|
12
|
+
name: string;
|
|
13
|
+
}>): void;
|
|
14
|
+
}, "shared-datasources">;
|
|
15
|
+
export declare const addEmptyNamespace: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
16
|
+
name: string;
|
|
17
|
+
}, string>;
|
|
18
|
+
export default stateSlice;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
import { ISharedDatasourcesResponse } from '@ws-ui/shared';
|
|
3
|
+
import { AppState } from '../../modules';
|
|
4
|
+
export declare const fetchSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, void, {
|
|
5
|
+
rejectValue: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const addSharedSource: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, datasources.ICreateDataSource, {
|
|
8
|
+
rejectValue: string;
|
|
9
|
+
state: AppState;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const editSharedSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
12
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
13
|
+
}, datasources.ICreateDataSource, {}>;
|
|
14
|
+
export declare const deleteSharedSource: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, {
|
|
15
|
+
id: string;
|
|
16
|
+
namespace: string;
|
|
17
|
+
}, {
|
|
18
|
+
rejectValue: string;
|
|
19
|
+
state: AppState;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const updateSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, datasources.ICreateDataSource[], {
|
|
22
|
+
rejectValue: string;
|
|
23
|
+
state: AppState;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const setDatasourceEvents: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
26
|
+
tabPath: string;
|
|
27
|
+
name: string;
|
|
28
|
+
namespace: string;
|
|
29
|
+
events: webforms.WEvent[];
|
|
30
|
+
}, {
|
|
31
|
+
state: AppState;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
export declare const selectPanelByPath: (path: string) => ((state: import("redux").EmptyObject & {
|
|
3
|
+
root: import("immer/dist/internal.js").WritableDraft<import("..").IRootState>;
|
|
4
|
+
explorer: import("immer/dist/internal.js").WritableDraft<import("..").ITreeItem>[];
|
|
5
|
+
debugger: import("..").IDebuggerState;
|
|
6
|
+
settings: import("..").ISettingsState;
|
|
7
|
+
catalog: {
|
|
8
|
+
state: "loading";
|
|
9
|
+
} | {
|
|
10
|
+
state: "loaded";
|
|
11
|
+
model: datasources.IEnhancedCatalog;
|
|
12
|
+
} | {
|
|
13
|
+
state: "error";
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
roles: {
|
|
17
|
+
flags: {
|
|
18
|
+
touched?: boolean | undefined;
|
|
19
|
+
removed?: boolean | undefined;
|
|
20
|
+
pinned?: boolean | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
old?: boolean | undefined;
|
|
23
|
+
enabled?: boolean | undefined;
|
|
24
|
+
confirmed?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
date?: string | undefined;
|
|
27
|
+
privileges: import("..").TById;
|
|
28
|
+
roles: import("..").TRolesDict;
|
|
29
|
+
forceLogin?: boolean | undefined;
|
|
30
|
+
selectedTab: "roles" | "privileges";
|
|
31
|
+
};
|
|
32
|
+
sharedDatasources: import("..").ISharedDatasourcesState;
|
|
33
|
+
webforms: import("..").IWebformEditorState;
|
|
34
|
+
modals: import("..").IModalsState;
|
|
35
|
+
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("..").ISharedCSSState>;
|
|
36
|
+
model: import("..").IModelState;
|
|
37
|
+
}) => import("immer/dist/internal.js").WritableDraft<{
|
|
38
|
+
isOpen: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
current: string;
|
|
41
|
+
}> | undefined) & import("reselect").OutputSelectorFields<(args_0: import("immer/dist/internal.js").WritableDraft<import("@ws-ui/shared").ITab<any, Partial<{
|
|
42
|
+
initialLineInfo: {
|
|
43
|
+
line: number;
|
|
44
|
+
offset?: number | undefined;
|
|
45
|
+
lastModification: number;
|
|
46
|
+
};
|
|
47
|
+
initialSelectionInfo: {
|
|
48
|
+
selection: import("@ws-ui/shared").ITextEditorSelection;
|
|
49
|
+
lastModification: number;
|
|
50
|
+
};
|
|
51
|
+
diffContent: string;
|
|
52
|
+
attributes: import("@ws-ui/shared").IMethodAttributes;
|
|
53
|
+
source: import("@ws-ui/shared").ISource;
|
|
54
|
+
editor: import("@ws-ui/shared").IEditor;
|
|
55
|
+
ext: import("@ws-ui/shared").DebuggerFileExtension;
|
|
56
|
+
}>>>[]) => import("immer/dist/internal.js").WritableDraft<{
|
|
57
|
+
isOpen: boolean;
|
|
58
|
+
type: string;
|
|
59
|
+
current: string;
|
|
60
|
+
}> | undefined, {
|
|
61
|
+
clearCache: () => void;
|
|
62
|
+
}> & {
|
|
63
|
+
clearCache: () => void;
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
/// <reference types="lodash" />
|
|
3
|
+
export declare const listDsNamespaces: import("lodash").CurriedFunction2<string, import("redux").CombinedState<{
|
|
4
|
+
root: import("immer/dist/internal.js").WritableDraft<import("..").IRootState>;
|
|
5
|
+
explorer: import("immer/dist/internal.js").WritableDraft<import("..").ITreeItem>[];
|
|
6
|
+
debugger: import("..").IDebuggerState;
|
|
7
|
+
settings: import("..").ISettingsState;
|
|
8
|
+
catalog: {
|
|
9
|
+
state: "loading";
|
|
10
|
+
} | {
|
|
11
|
+
state: "loaded";
|
|
12
|
+
model: datasources.IEnhancedCatalog;
|
|
13
|
+
} | {
|
|
14
|
+
state: "error";
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
17
|
+
roles: {
|
|
18
|
+
flags: {
|
|
19
|
+
touched?: boolean | undefined;
|
|
20
|
+
removed?: boolean | undefined;
|
|
21
|
+
pinned?: boolean | undefined;
|
|
22
|
+
loading?: boolean | undefined;
|
|
23
|
+
old?: boolean | undefined;
|
|
24
|
+
enabled?: boolean | undefined;
|
|
25
|
+
confirmed?: boolean | undefined;
|
|
26
|
+
};
|
|
27
|
+
date?: string | undefined;
|
|
28
|
+
privileges: import("..").TById;
|
|
29
|
+
roles: import("..").TRolesDict;
|
|
30
|
+
forceLogin?: boolean | undefined;
|
|
31
|
+
selectedTab: "roles" | "privileges";
|
|
32
|
+
};
|
|
33
|
+
sharedDatasources: import("..").ISharedDatasourcesState;
|
|
34
|
+
webforms: import("./types").IWebformEditorState;
|
|
35
|
+
modals: import("..").IModalsState;
|
|
36
|
+
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("..").ISharedCSSState>;
|
|
37
|
+
model: import("..").IModelState;
|
|
38
|
+
}>, {
|
|
39
|
+
[x: string]: datasources.ICreateDataSource[];
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { ITemplatedGroup, ITemplatedGroupItem, IWebformEditorState, TAddComponentAction, TInspectAction, TRemoveComponentAction, TToggleInspectorAction } from './types';
|
|
3
|
+
import { IComponentTemplate, TDatasourceTheme } from '@ws-ui/shared';
|
|
4
|
+
export declare const FLAGS_INIT_STATE: {
|
|
5
|
+
[x: string]: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const stateSlice: import("@reduxjs/toolkit").Slice<IWebformEditorState, {
|
|
8
|
+
toggleInspector: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TToggleInspectorAction) => void;
|
|
9
|
+
inspect: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TInspectAction) => void;
|
|
10
|
+
addComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TAddComponentAction) => void;
|
|
11
|
+
editComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: PayloadAction<{
|
|
12
|
+
id: string;
|
|
13
|
+
changes: Partial<IComponentTemplate>;
|
|
14
|
+
}>) => void;
|
|
15
|
+
removeComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TRemoveComponentAction) => void;
|
|
16
|
+
setSelectedGroup: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
17
|
+
payload: {
|
|
18
|
+
selectedGroup: string;
|
|
19
|
+
};
|
|
20
|
+
}) => void;
|
|
21
|
+
setTemplatesData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
22
|
+
payload: ITemplatedGroup[];
|
|
23
|
+
}) => void;
|
|
24
|
+
setTemplateData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
25
|
+
payload: {
|
|
26
|
+
group: string;
|
|
27
|
+
components: ITemplatedGroupItem[];
|
|
28
|
+
};
|
|
29
|
+
}) => void;
|
|
30
|
+
setDatasourcesTheme: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
31
|
+
payload: TDatasourceTheme;
|
|
32
|
+
}) => void;
|
|
33
|
+
setWebformsFlag(state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
34
|
+
payload: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
};
|
|
37
|
+
type: string;
|
|
38
|
+
}): void;
|
|
39
|
+
}, "webforms">;
|
|
40
|
+
export declare const toggleInspector: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
41
|
+
type: "css" | "datasource";
|
|
42
|
+
}, string>, inspect: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").TToggleInspectorPayload, string>, addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<IComponentTemplate, string>, editComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
43
|
+
id: string;
|
|
44
|
+
changes: Partial<IComponentTemplate>;
|
|
45
|
+
}, string>, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setSelectedGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
|
+
selectedGroup: string;
|
|
47
|
+
}, string>, setTemplatesData: import("@reduxjs/toolkit").ActionCreatorWithPayload<ITemplatedGroup[], string>, setTemplateData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
48
|
+
group: string;
|
|
49
|
+
components: ITemplatedGroupItem[];
|
|
50
|
+
}, string>, setDatasourcesTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | number, string>, setWebformsFlag: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}, string>;
|
|
53
|
+
export default stateSlice;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
import { IComponentTemplate, OrNull } from '@ws-ui/shared';
|
|
4
|
+
import { AsyncThunkConfig } from '../../hooks/store';
|
|
5
|
+
import { AppState } from '..';
|
|
6
|
+
import { ITemplatedGroup, ITemplatedGroupItem } from './types';
|
|
7
|
+
export declare const fetchTemplates: import("@reduxjs/toolkit").AsyncThunk<ITemplatedGroup[], void, {
|
|
8
|
+
state: AppState;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const fetchTemplate: import("@reduxjs/toolkit").AsyncThunk<ITemplatedGroupItem[], {
|
|
11
|
+
name: string;
|
|
12
|
+
}, {
|
|
13
|
+
state: AppState;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const fetchCraftedComponents: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
16
|
+
export declare const addCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, IComponentTemplate, {}>;
|
|
17
|
+
export declare const editCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
18
|
+
id: string;
|
|
19
|
+
changes: Partial<IComponentTemplate>;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export declare const removeCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, string, {}>;
|
|
22
|
+
type TDatasourcesReturnType = {
|
|
23
|
+
path: string;
|
|
24
|
+
namespace: string;
|
|
25
|
+
list: datasources.ICreateDataSource[];
|
|
26
|
+
};
|
|
27
|
+
type TAddDatasource = {
|
|
28
|
+
datasource: datasources.ICreateDataSource;
|
|
29
|
+
path: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const addDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatasourcesReturnType | undefined, TAddDatasource, AsyncThunkConfig>;
|
|
32
|
+
type TEditDatasource = {
|
|
33
|
+
id: string;
|
|
34
|
+
path: string;
|
|
35
|
+
value: any;
|
|
36
|
+
property: string;
|
|
37
|
+
namespace: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const editDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatasourcesReturnType | undefined, TEditDatasource, AsyncThunkConfig>;
|
|
40
|
+
export declare const isRenameDatasource: (action: PayloadAction<any>) => action is {
|
|
41
|
+
payload: TRenameDatasource;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
type TRenameDatasource = {
|
|
45
|
+
id: string;
|
|
46
|
+
path: string;
|
|
47
|
+
new_name: string;
|
|
48
|
+
namespace: string;
|
|
49
|
+
updateRefs: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare const renameDatasource: import("@reduxjs/toolkit").AsyncThunk<OrNull<TDatasourcesReturnType>, TRenameDatasource, AsyncThunkConfig>;
|
|
52
|
+
type TDeleteDatasource = {
|
|
53
|
+
path: string;
|
|
54
|
+
id: string;
|
|
55
|
+
namespace: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const deleteDatasource: import("@reduxjs/toolkit").AsyncThunk<OrNull<TDatasourcesReturnType>, TDeleteDatasource, AsyncThunkConfig>;
|
|
58
|
+
export {};
|