@ws-ui/store 0.2.0-beta.20240712.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +35 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3345 -3409
- package/dist/index.es.js.map +1 -1
- package/dist/modules/root/thunks.d.ts +6 -12
- package/dist/modules/settings/reducer.d.ts +5 -5
- package/dist/modules/shared-datasources/reducer.d.ts +1 -8
- package/dist/modules/shared-datasources/thunks.d.ts +7 -37
- package/dist/modules/webforms/datasources.adapter.d.ts +2 -4
- package/dist/modules/webforms/reducer.d.ts +6 -33
- package/dist/modules/webforms/thunks.d.ts +14 -28
- package/dist/modules/webforms/types.d.ts +6 -21
- package/dist/selectors/datasources.d.ts +5 -20
- package/dist/selectors/settings.d.ts +16 -16
- package/dist/selectors/webforms.d.ts +4 -13
- package/dist/utils.d.ts +1 -1
- package/package.json +3 -3
|
@@ -18,19 +18,13 @@ export declare const renameDataSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
18
18
|
path: string | undefined;
|
|
19
19
|
namespace: string;
|
|
20
20
|
datasources: datasources.ICreateDataSource[];
|
|
21
|
-
} | null, {
|
|
22
|
-
datasource: TActionRenameDataSource;
|
|
23
|
-
type: 'report' | 'webform';
|
|
24
|
-
}, {}>;
|
|
21
|
+
} | null, TActionRenameDataSource, {}>;
|
|
25
22
|
export declare const editDataSource: import("@reduxjs/toolkit").AsyncThunk<(datasources.ICreateDataSourceScalar | datasources.ICreateDataSourceEntity | datasources.ICreateDataSourceEntitySelection)[], {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
value: any;
|
|
32
|
-
};
|
|
33
|
-
type: 'report' | 'webform';
|
|
23
|
+
path: string;
|
|
24
|
+
datasourceId: string;
|
|
25
|
+
namespace?: string | undefined;
|
|
26
|
+
propertyKey: string;
|
|
27
|
+
value: any;
|
|
34
28
|
}, {}>;
|
|
35
29
|
export declare const fetchChanges: import("@reduxjs/toolkit").AsyncThunk<IFileInfoResponse, void, {
|
|
36
30
|
state: AppState;
|
|
@@ -3,14 +3,14 @@ import { IAppSettingsResponse } from '@ws-ui/shared';
|
|
|
3
3
|
import { TSetSettingPayload, TSettingPath } from './types';
|
|
4
4
|
export interface ISettingsState {
|
|
5
5
|
session: {
|
|
6
|
-
[key: string]:
|
|
6
|
+
[key: string]: unknown;
|
|
7
7
|
};
|
|
8
8
|
project: {
|
|
9
|
-
[key: string]:
|
|
9
|
+
[key: string]: unknown;
|
|
10
10
|
};
|
|
11
11
|
server: IAppSettingsResponse;
|
|
12
12
|
welcometour: {
|
|
13
|
-
[key: string]:
|
|
13
|
+
[key: string]: unknown;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
declare const stateSlice: import("@reduxjs/toolkit").Slice<ISettingsState, {
|
|
@@ -23,7 +23,7 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<ISettingsState, {
|
|
|
23
23
|
payload: {
|
|
24
24
|
path: TSettingPath;
|
|
25
25
|
settings: {
|
|
26
|
-
[key: string]:
|
|
26
|
+
[key: string]: unknown;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
type: string;
|
|
@@ -39,7 +39,7 @@ export declare const setSetting: import("@reduxjs/toolkit").ActionCreatorWithPay
|
|
|
39
39
|
}, string>, setSettingsAsText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
40
40
|
path: TSettingPath;
|
|
41
41
|
settings: {
|
|
42
|
-
[key: string]:
|
|
42
|
+
[key: string]: unknown;
|
|
43
43
|
};
|
|
44
44
|
}, string>;
|
|
45
45
|
export default stateSlice;
|
|
@@ -3,23 +3,16 @@ import { PayloadAction } from '@reduxjs/toolkit';
|
|
|
3
3
|
export type ISharedDatasourcesState = {
|
|
4
4
|
state: 'loading' | 'loaded' | 'error';
|
|
5
5
|
sources: {
|
|
6
|
-
|
|
7
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
8
|
-
};
|
|
9
|
-
report: {
|
|
10
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
11
|
-
};
|
|
6
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
12
7
|
};
|
|
13
8
|
error?: string;
|
|
14
9
|
};
|
|
15
10
|
declare const stateSlice: import("@reduxjs/toolkit").Slice<ISharedDatasourcesState, {
|
|
16
11
|
addEmptyNamespace(state: import("immer/dist/internal.js").WritableDraft<ISharedDatasourcesState>, action: PayloadAction<{
|
|
17
12
|
name: string;
|
|
18
|
-
type: 'report' | 'webform';
|
|
19
13
|
}>): void;
|
|
20
14
|
}, "shared-datasources">;
|
|
21
15
|
export declare const addEmptyNamespace: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
22
16
|
name: string;
|
|
23
|
-
type: 'report' | 'webform';
|
|
24
17
|
}, string>;
|
|
25
18
|
export default stateSlice;
|
|
@@ -1,53 +1,24 @@
|
|
|
1
|
+
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
1
2
|
import { ISharedDatasourcesResponse } from '@ws-ui/shared';
|
|
2
3
|
import { AppState } from '../../modules';
|
|
3
|
-
export declare const fetchSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
|
-
webform: ISharedDatasourcesResponse;
|
|
5
|
-
report: ISharedDatasourcesResponse;
|
|
6
|
-
}, void, {
|
|
4
|
+
export declare const fetchSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, void, {
|
|
7
5
|
rejectValue: string;
|
|
8
|
-
state: AppState;
|
|
9
6
|
}>;
|
|
10
|
-
export declare const addSharedSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
11
|
-
webform: ISharedDatasourcesResponse;
|
|
12
|
-
report: ISharedDatasourcesResponse;
|
|
13
|
-
}, {
|
|
14
|
-
datasource: datasources.ICreateDataSource;
|
|
15
|
-
type: 'report' | 'webform';
|
|
16
|
-
}, {
|
|
7
|
+
export declare const addSharedSource: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, datasources.ICreateDataSource, {
|
|
17
8
|
rejectValue: string;
|
|
18
9
|
state: AppState;
|
|
19
10
|
}>;
|
|
20
11
|
export declare const editSharedSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
report: {
|
|
25
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
datasource: datasources.ICreateDataSource;
|
|
29
|
-
type: 'report' | 'webform';
|
|
30
|
-
}, {}>;
|
|
31
|
-
export declare const deleteSharedSource: import("@reduxjs/toolkit").AsyncThunk<{
|
|
32
|
-
webform: ISharedDatasourcesResponse;
|
|
33
|
-
report: ISharedDatasourcesResponse;
|
|
34
|
-
}, {
|
|
12
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
13
|
+
}, datasources.ICreateDataSource, {}>;
|
|
14
|
+
export declare const deleteSharedSource: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, {
|
|
35
15
|
id: string;
|
|
36
16
|
namespace: string;
|
|
37
|
-
type: 'report' | 'webform';
|
|
38
17
|
}, {
|
|
39
18
|
rejectValue: string;
|
|
40
19
|
state: AppState;
|
|
41
20
|
}>;
|
|
42
|
-
export declare const updateSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<{
|
|
43
|
-
sources: {
|
|
44
|
-
webform: ISharedDatasourcesResponse;
|
|
45
|
-
report: ISharedDatasourcesResponse;
|
|
46
|
-
};
|
|
47
|
-
}, {
|
|
48
|
-
datasources: datasources.ICreateDataSource[];
|
|
49
|
-
type: 'report' | 'webform';
|
|
50
|
-
}, {
|
|
21
|
+
export declare const updateSharedDatasources: import("@reduxjs/toolkit").AsyncThunk<ISharedDatasourcesResponse, datasources.ICreateDataSource[], {
|
|
51
22
|
rejectValue: string;
|
|
52
23
|
state: AppState;
|
|
53
24
|
}>;
|
|
@@ -56,7 +27,6 @@ export declare const setDatasourceEvents: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
56
27
|
name: string;
|
|
57
28
|
namespace: string;
|
|
58
29
|
events: webforms.WEvent[];
|
|
59
|
-
type: 'report' | 'webform';
|
|
60
30
|
}, {
|
|
61
31
|
state: AppState;
|
|
62
32
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@ws-ui/shared/dist/declarations/datasources/datasource" />
|
|
2
2
|
/// <reference types="lodash" />
|
|
3
|
-
export declare const listDsNamespaces: import("lodash").
|
|
3
|
+
export declare const listDsNamespaces: import("lodash").CurriedFunction2<string, import("redux").CombinedState<{
|
|
4
4
|
root: import("immer/dist/internal.js").WritableDraft<import("..").IRootState>;
|
|
5
5
|
explorer: import("immer/dist/internal.js").WritableDraft<import("..").ITreeItem>[];
|
|
6
6
|
debugger: import("..").IDebuggerState;
|
|
@@ -36,8 +36,6 @@ export declare const listDsNamespaces: import("lodash").CurriedFunction3<string,
|
|
|
36
36
|
modals: import("..").IModalsState;
|
|
37
37
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("..").ISharedCSSState>;
|
|
38
38
|
model: import("..").IModelState;
|
|
39
|
-
}>,
|
|
40
|
-
[x: string]: datasources.ICreateDataSource[];
|
|
41
|
-
} | {
|
|
39
|
+
}>, {
|
|
42
40
|
[x: string]: datasources.ICreateDataSource[];
|
|
43
41
|
}>;
|
|
@@ -11,26 +11,20 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<IWebformEditorState,
|
|
|
11
11
|
editComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: PayloadAction<{
|
|
12
12
|
id: string;
|
|
13
13
|
changes: Partial<IComponentTemplate>;
|
|
14
|
-
type: 'webform' | 'report';
|
|
15
14
|
}>) => void;
|
|
16
15
|
removeComponent: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: TRemoveComponentAction) => void;
|
|
17
16
|
setSelectedGroup: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
18
17
|
payload: {
|
|
19
18
|
selectedGroup: string;
|
|
20
|
-
type: 'webform' | 'report';
|
|
21
19
|
};
|
|
22
20
|
}) => void;
|
|
23
21
|
setTemplatesData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
24
|
-
payload:
|
|
25
|
-
webformTemplates: ITemplatedGroup[];
|
|
26
|
-
reportTemplates: ITemplatedGroup[];
|
|
27
|
-
};
|
|
22
|
+
payload: ITemplatedGroup[];
|
|
28
23
|
}) => void;
|
|
29
24
|
setTemplateData: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
30
25
|
payload: {
|
|
31
26
|
group: string;
|
|
32
27
|
components: ITemplatedGroupItem[];
|
|
33
|
-
type: 'webform' | 'report';
|
|
34
28
|
};
|
|
35
29
|
}) => void;
|
|
36
30
|
setDatasourcesTheme: (state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
@@ -38,43 +32,22 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<IWebformEditorState,
|
|
|
38
32
|
}) => void;
|
|
39
33
|
setWebformsFlag(state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
40
34
|
payload: {
|
|
41
|
-
[key: string]:
|
|
35
|
+
[key: string]: any;
|
|
42
36
|
};
|
|
43
37
|
type: string;
|
|
44
38
|
}): void;
|
|
45
|
-
setCraftedComponentData(state: import("immer/dist/internal.js").WritableDraft<IWebformEditorState>, action: {
|
|
46
|
-
payload: {
|
|
47
|
-
webform: IComponentTemplate[];
|
|
48
|
-
report: IComponentTemplate[];
|
|
49
|
-
};
|
|
50
|
-
}): void;
|
|
51
39
|
}, "webforms">;
|
|
52
40
|
export declare const toggleInspector: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
53
41
|
type: "css" | "datasource";
|
|
54
|
-
}, string>, inspect: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").TToggleInspectorPayload, string>, addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
55
|
-
component: IComponentTemplate;
|
|
56
|
-
type: "report" | "webform";
|
|
57
|
-
}, string>, editComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
42
|
+
}, string>, inspect: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").TToggleInspectorPayload, string>, addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<IComponentTemplate, string>, editComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
58
43
|
id: string;
|
|
59
44
|
changes: Partial<IComponentTemplate>;
|
|
60
|
-
|
|
61
|
-
}, string>, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
62
|
-
id: string;
|
|
63
|
-
type: "report" | "webform";
|
|
64
|
-
}, string>, setSelectedGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
45
|
+
}, string>, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setSelectedGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
65
46
|
selectedGroup: string;
|
|
66
|
-
|
|
67
|
-
}, string>, setTemplatesData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
68
|
-
webformTemplates: ITemplatedGroup[];
|
|
69
|
-
reportTemplates: ITemplatedGroup[];
|
|
70
|
-
}, string>, setTemplateData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
47
|
+
}, string>, setTemplatesData: import("@reduxjs/toolkit").ActionCreatorWithPayload<ITemplatedGroup[], string>, setTemplateData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
71
48
|
group: string;
|
|
72
49
|
components: ITemplatedGroupItem[];
|
|
73
|
-
type: 'webform' | 'report';
|
|
74
50
|
}, string>, setDatasourcesTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | number, string>, setWebformsFlag: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
75
|
-
[key: string]:
|
|
76
|
-
}, string>, setCraftedComponentData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
77
|
-
webform: IComponentTemplate[];
|
|
78
|
-
report: IComponentTemplate[];
|
|
51
|
+
[key: string]: any;
|
|
79
52
|
}, string>;
|
|
80
53
|
export default stateSlice;
|
|
@@ -4,38 +4,21 @@ import { IComponentTemplate, OrNull } from '@ws-ui/shared';
|
|
|
4
4
|
import { AsyncThunkConfig } from '../../hooks/store';
|
|
5
5
|
import { AppState } from '..';
|
|
6
6
|
import { ITemplatedGroup, ITemplatedGroupItem } from './types';
|
|
7
|
-
export declare const fetchTemplates: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
|
-
webform: {
|
|
9
|
-
data: ITemplatedGroup[];
|
|
10
|
-
selectedGroup: string;
|
|
11
|
-
};
|
|
12
|
-
report: {
|
|
13
|
-
data: ITemplatedGroup[];
|
|
14
|
-
selectedGroup: string;
|
|
15
|
-
};
|
|
16
|
-
}, void, {
|
|
7
|
+
export declare const fetchTemplates: import("@reduxjs/toolkit").AsyncThunk<ITemplatedGroup[], void, {
|
|
17
8
|
state: AppState;
|
|
18
9
|
}>;
|
|
19
10
|
export declare const fetchTemplate: import("@reduxjs/toolkit").AsyncThunk<ITemplatedGroupItem[], {
|
|
20
11
|
name: string;
|
|
21
|
-
type: 'webform' | 'report';
|
|
22
12
|
}, {
|
|
23
13
|
state: AppState;
|
|
24
14
|
}>;
|
|
25
|
-
export declare const fetchCraftedComponents: import("@reduxjs/toolkit").AsyncThunk<
|
|
26
|
-
export declare const addCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
27
|
-
component: IComponentTemplate;
|
|
28
|
-
type: 'webform' | 'report';
|
|
29
|
-
}, {}>;
|
|
15
|
+
export declare const fetchCraftedComponents: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
16
|
+
export declare const addCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, IComponentTemplate, {}>;
|
|
30
17
|
export declare const editCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
31
18
|
id: string;
|
|
32
19
|
changes: Partial<IComponentTemplate>;
|
|
33
|
-
type: 'webform' | 'report';
|
|
34
|
-
}, {}>;
|
|
35
|
-
export declare const removeCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, {
|
|
36
|
-
id: string;
|
|
37
|
-
type: 'webform' | 'report';
|
|
38
20
|
}, {}>;
|
|
21
|
+
export declare const removeCraftedComponent: import("@reduxjs/toolkit").AsyncThunk<undefined, string, {}>;
|
|
39
22
|
type TDatasourcesReturnType = {
|
|
40
23
|
path: string;
|
|
41
24
|
namespace: string;
|
|
@@ -44,19 +27,24 @@ type TDatasourcesReturnType = {
|
|
|
44
27
|
type TAddDatasource = {
|
|
45
28
|
datasource: datasources.ICreateDataSource;
|
|
46
29
|
path: string;
|
|
47
|
-
type: 'report' | 'webform';
|
|
48
30
|
};
|
|
49
31
|
export declare const addDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatasourcesReturnType | undefined, TAddDatasource, AsyncThunkConfig>;
|
|
50
|
-
type
|
|
32
|
+
type TEditDatasourceProperty = {
|
|
51
33
|
id: string;
|
|
52
34
|
path: string;
|
|
53
|
-
value:
|
|
35
|
+
value: any;
|
|
54
36
|
property: string;
|
|
55
37
|
namespace: string;
|
|
56
|
-
type: 'webform' | 'report';
|
|
57
38
|
};
|
|
39
|
+
type TEditDatasourceProperties = {
|
|
40
|
+
id: string;
|
|
41
|
+
path: string;
|
|
42
|
+
changes: Record<string, any>;
|
|
43
|
+
namespace: string;
|
|
44
|
+
};
|
|
45
|
+
type TEditDatasource = TEditDatasourceProperty | TEditDatasourceProperties;
|
|
58
46
|
export declare const editDatasource: import("@reduxjs/toolkit").AsyncThunk<TDatasourcesReturnType | undefined, TEditDatasource, AsyncThunkConfig>;
|
|
59
|
-
export declare const isRenameDatasource: (action: PayloadAction<
|
|
47
|
+
export declare const isRenameDatasource: (action: PayloadAction<any>) => action is {
|
|
60
48
|
payload: TRenameDatasource;
|
|
61
49
|
type: string;
|
|
62
50
|
};
|
|
@@ -66,14 +54,12 @@ type TRenameDatasource = {
|
|
|
66
54
|
new_name: string;
|
|
67
55
|
namespace: string;
|
|
68
56
|
updateRefs: boolean;
|
|
69
|
-
type: 'report' | 'webform';
|
|
70
57
|
};
|
|
71
58
|
export declare const renameDatasource: import("@reduxjs/toolkit").AsyncThunk<OrNull<TDatasourcesReturnType>, TRenameDatasource, AsyncThunkConfig>;
|
|
72
59
|
type TDeleteDatasource = {
|
|
73
60
|
path: string;
|
|
74
61
|
id: string;
|
|
75
62
|
namespace: string;
|
|
76
|
-
type: 'report' | 'webform';
|
|
77
63
|
};
|
|
78
64
|
export declare const deleteDatasource: import("@reduxjs/toolkit").AsyncThunk<OrNull<TDatasourcesReturnType>, TDeleteDatasource, AsyncThunkConfig>;
|
|
79
65
|
export {};
|
|
@@ -18,27 +18,18 @@ export type ITemplateList = Record<string, {
|
|
|
18
18
|
hide: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
export interface ITemplatedComponent {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
data: ITemplatedGroup[];
|
|
24
|
-
};
|
|
25
|
-
report: {
|
|
26
|
-
selectedGroup: string;
|
|
27
|
-
data: ITemplatedGroup[];
|
|
28
|
-
};
|
|
21
|
+
selectedGroup: string;
|
|
22
|
+
data: ITemplatedGroup[];
|
|
29
23
|
}
|
|
30
24
|
export interface IWebformEditorState {
|
|
31
25
|
inspector: IInspectorState;
|
|
32
|
-
components:
|
|
33
|
-
webform: IComponentTemplate[];
|
|
34
|
-
report: IComponentTemplate[];
|
|
35
|
-
};
|
|
26
|
+
components: IComponentTemplate[];
|
|
36
27
|
templates: ITemplatedComponent;
|
|
37
28
|
datasources: {
|
|
38
29
|
theme: TDatasourceTheme;
|
|
39
30
|
};
|
|
40
31
|
flags: {
|
|
41
|
-
[key: string]:
|
|
32
|
+
[key: string]: any;
|
|
42
33
|
};
|
|
43
34
|
}
|
|
44
35
|
/**
|
|
@@ -76,11 +67,5 @@ export type TInspectAction = PayloadAction<TToggleInspectorPayload>;
|
|
|
76
67
|
/**
|
|
77
68
|
* Components actions
|
|
78
69
|
*/
|
|
79
|
-
export type TAddComponentAction = PayloadAction<
|
|
80
|
-
|
|
81
|
-
type: 'webform' | 'report';
|
|
82
|
-
}>;
|
|
83
|
-
export type TRemoveComponentAction = PayloadAction<{
|
|
84
|
-
id: string;
|
|
85
|
-
type: 'webform' | 'report';
|
|
86
|
-
}>;
|
|
70
|
+
export type TAddComponentAction = PayloadAction<IComponentTemplate>;
|
|
71
|
+
export type TRemoveComponentAction = PayloadAction<string>;
|
|
@@ -52,7 +52,7 @@ export declare const selectDatasourcesByPath: (tabPath: string) => ((state: impo
|
|
|
52
52
|
* @param tabPath the current tab path.
|
|
53
53
|
* @returns datasource or undefined if not found.
|
|
54
54
|
*/
|
|
55
|
-
export declare const selectDatasource: (id: string, namespace: string, tabPath: string
|
|
55
|
+
export declare const selectDatasource: (id: string, namespace: string, tabPath: string) => ((state: import("redux").EmptyObject & {
|
|
56
56
|
root: import("immer/dist/internal.js").WritableDraft<import("../modules").IRootState>;
|
|
57
57
|
explorer: import("immer/dist/internal.js").WritableDraft<import("../modules").ITreeItem>[];
|
|
58
58
|
debugger: import("../modules").IDebuggerState;
|
|
@@ -169,12 +169,7 @@ export declare const selectSharedDatasources: ((state: import("redux").EmptyObje
|
|
|
169
169
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
170
170
|
model: import("../modules").IModelState;
|
|
171
171
|
}) => {
|
|
172
|
-
|
|
173
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
174
|
-
};
|
|
175
|
-
report: {
|
|
176
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
177
|
-
};
|
|
172
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
178
173
|
}) & import("reselect").OutputSelectorFields<(args_0: import("redux").CombinedState<{
|
|
179
174
|
root: import("immer/dist/internal.js").WritableDraft<import("../modules").IRootState>;
|
|
180
175
|
explorer: import("immer/dist/internal.js").WritableDraft<import("../modules").ITreeItem>[];
|
|
@@ -212,12 +207,7 @@ export declare const selectSharedDatasources: ((state: import("redux").EmptyObje
|
|
|
212
207
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
213
208
|
model: import("../modules").IModelState;
|
|
214
209
|
}>) => {
|
|
215
|
-
|
|
216
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
217
|
-
};
|
|
218
|
-
report: {
|
|
219
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
220
|
-
};
|
|
210
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
221
211
|
}, {
|
|
222
212
|
clearCache: () => void;
|
|
223
213
|
}> & {
|
|
@@ -233,7 +223,7 @@ export type TDatasourcesNotIn = {
|
|
|
233
223
|
* @param tabPath the current tab path.
|
|
234
224
|
* @returns datasource or an empty array if not found.
|
|
235
225
|
*/
|
|
236
|
-
export declare const selectAllDatasourcesByPath: (tabPath: string,
|
|
226
|
+
export declare const selectAllDatasourcesByPath: (tabPath: string, exclude?: 'private' | 'shared', filter?: TDatasourcesFilter | null, notIn?: TDatasourcesNotIn) => ((state: import("redux").EmptyObject & {
|
|
237
227
|
root: import("immer/dist/internal.js").WritableDraft<import("../modules").IRootState>;
|
|
238
228
|
explorer: import("immer/dist/internal.js").WritableDraft<import("../modules").ITreeItem>[];
|
|
239
229
|
debugger: import("../modules").IDebuggerState;
|
|
@@ -270,12 +260,7 @@ export declare const selectAllDatasourcesByPath: (tabPath: string, type: 'webfor
|
|
|
270
260
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
271
261
|
model: import("../modules").IModelState;
|
|
272
262
|
}) => datasources.ICreateDataSource[]) & import("reselect").OutputSelectorFields<(args_0: datasources.ICreateDataSource[], args_1: {
|
|
273
|
-
|
|
274
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
275
|
-
};
|
|
276
|
-
report: {
|
|
277
|
-
[key: string]: datasources.ICreateDataSource[];
|
|
278
|
-
};
|
|
263
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
279
264
|
}) => datasources.ICreateDataSource[], {
|
|
280
265
|
clearCache: () => void;
|
|
281
266
|
}> & {
|
|
@@ -36,9 +36,9 @@ export declare const selectSessionSettings: ((state: import("redux").EmptyObject
|
|
|
36
36
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
37
37
|
model: import("../modules").IModelState;
|
|
38
38
|
}) => {
|
|
39
|
-
[key: string]:
|
|
39
|
+
[key: string]: unknown;
|
|
40
40
|
}) & import("reselect").OutputSelectorFields<(args_0: import("../modules").ISettingsState) => {
|
|
41
|
-
[key: string]:
|
|
41
|
+
[key: string]: unknown;
|
|
42
42
|
}, {
|
|
43
43
|
clearCache: () => void;
|
|
44
44
|
}> & {
|
|
@@ -81,7 +81,7 @@ export declare const selectPartialSessionSettings: <T extends string[]>(...keys:
|
|
|
81
81
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
82
82
|
model: import("../modules").IModelState;
|
|
83
83
|
}) => { [K in T[number]]: unknown; }) & import("reselect").OutputSelectorFields<(args_0: {
|
|
84
|
-
[key: string]:
|
|
84
|
+
[key: string]: unknown;
|
|
85
85
|
}) => { [K in T[number]]: unknown; }, {
|
|
86
86
|
clearCache: () => void;
|
|
87
87
|
}> & {
|
|
@@ -124,7 +124,7 @@ export declare const selectSessionSetting: <T = string>(key: string) => ((state:
|
|
|
124
124
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
125
125
|
model: import("../modules").IModelState;
|
|
126
126
|
}) => T) & import("reselect").OutputSelectorFields<(args_0: {
|
|
127
|
-
[key: string]:
|
|
127
|
+
[key: string]: unknown;
|
|
128
128
|
}) => T, {
|
|
129
129
|
clearCache: () => void;
|
|
130
130
|
}> & {
|
|
@@ -167,7 +167,7 @@ export declare const selectFeatureFlag: (key: string) => ((state: import("redux"
|
|
|
167
167
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
168
168
|
model: import("../modules").IModelState;
|
|
169
169
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: {
|
|
170
|
-
[key: string]:
|
|
170
|
+
[key: string]: unknown;
|
|
171
171
|
}) => boolean, {
|
|
172
172
|
clearCache: () => void;
|
|
173
173
|
}> & {
|
|
@@ -210,9 +210,9 @@ export declare const selectProjectSettings: ((state: import("redux").EmptyObject
|
|
|
210
210
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
211
211
|
model: import("../modules").IModelState;
|
|
212
212
|
}) => {
|
|
213
|
-
[key: string]:
|
|
213
|
+
[key: string]: unknown;
|
|
214
214
|
}) & import("reselect").OutputSelectorFields<(args_0: import("../modules").ISettingsState) => {
|
|
215
|
-
[key: string]:
|
|
215
|
+
[key: string]: unknown;
|
|
216
216
|
}, {
|
|
217
217
|
clearCache: () => void;
|
|
218
218
|
}> & {
|
|
@@ -418,9 +418,9 @@ export declare const selectMonacoZoom: ((state: import("redux").EmptyObject & {
|
|
|
418
418
|
modals: import("../modules").IModalsState;
|
|
419
419
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
420
420
|
model: import("../modules").IModelState;
|
|
421
|
-
}) =>
|
|
422
|
-
[key: string]:
|
|
423
|
-
}) =>
|
|
421
|
+
}) => unknown) & import("reselect").OutputSelectorFields<(args_0: {
|
|
422
|
+
[key: string]: unknown;
|
|
423
|
+
}) => unknown, {
|
|
424
424
|
clearCache: () => void;
|
|
425
425
|
}> & {
|
|
426
426
|
clearCache: () => void;
|
|
@@ -461,9 +461,9 @@ export declare const selectI18nSetting: ((state: import("redux").EmptyObject & {
|
|
|
461
461
|
modals: import("../modules").IModalsState;
|
|
462
462
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
463
463
|
model: import("../modules").IModelState;
|
|
464
|
-
}) =>
|
|
465
|
-
[key: string]:
|
|
466
|
-
}) =>
|
|
464
|
+
}) => unknown) & import("reselect").OutputSelectorFields<(args_0: {
|
|
465
|
+
[key: string]: unknown;
|
|
466
|
+
}) => unknown, {
|
|
467
467
|
clearCache: () => void;
|
|
468
468
|
}> & {
|
|
469
469
|
clearCache: () => void;
|
|
@@ -504,9 +504,9 @@ export declare const selectI18nCurrent: ((state: import("redux").EmptyObject & {
|
|
|
504
504
|
modals: import("../modules").IModalsState;
|
|
505
505
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
506
506
|
model: import("../modules").IModelState;
|
|
507
|
-
}) =>
|
|
508
|
-
[key: string]:
|
|
509
|
-
}) =>
|
|
507
|
+
}) => unknown) & import("reselect").OutputSelectorFields<(args_0: {
|
|
508
|
+
[key: string]: unknown;
|
|
509
|
+
}) => unknown, {
|
|
510
510
|
clearCache: () => void;
|
|
511
511
|
}> & {
|
|
512
512
|
clearCache: () => void;
|
|
@@ -78,13 +78,7 @@ export declare const selectComponents: ((state: import("redux").EmptyObject & {
|
|
|
78
78
|
modals: import("../modules").IModalsState;
|
|
79
79
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
80
80
|
model: import("../modules").IModelState;
|
|
81
|
-
}) => {
|
|
82
|
-
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
83
|
-
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
84
|
-
}) & import("reselect").OutputSelectorFields<(args_0: import("../modules").IWebformEditorState) => {
|
|
85
|
-
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
86
|
-
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
87
|
-
}, {
|
|
81
|
+
}) => import("@ws-ui/shared").IComponentTemplate[]) & import("reselect").OutputSelectorFields<(args_0: import("../modules").IWebformEditorState) => import("@ws-ui/shared").IComponentTemplate[], {
|
|
88
82
|
clearCache: () => void;
|
|
89
83
|
}> & {
|
|
90
84
|
clearCache: () => void;
|
|
@@ -289,12 +283,12 @@ export declare const selectTemplatesData: ((state: import("redux").EmptyObject &
|
|
|
289
283
|
modals: import("../modules").IModalsState;
|
|
290
284
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
291
285
|
model: import("../modules").IModelState;
|
|
292
|
-
}) => import("../modules").
|
|
286
|
+
}) => import("../modules").ITemplatedGroup[]) & import("reselect").OutputSelectorFields<(args_0: import("../modules").ITemplatedComponent) => import("../modules").ITemplatedGroup[], {
|
|
293
287
|
clearCache: () => void;
|
|
294
288
|
}> & {
|
|
295
289
|
clearCache: () => void;
|
|
296
290
|
};
|
|
297
|
-
export declare const selectCraftedComponent: (id: string
|
|
291
|
+
export declare const selectCraftedComponent: (id: string) => ((state: import("redux").EmptyObject & {
|
|
298
292
|
root: import("immer/dist/internal.js").WritableDraft<import("../modules").IRootState>;
|
|
299
293
|
explorer: import("immer/dist/internal.js").WritableDraft<import("../modules").ITreeItem>[];
|
|
300
294
|
debugger: import("../modules").IDebuggerState;
|
|
@@ -330,10 +324,7 @@ export declare const selectCraftedComponent: (id: string, type: 'webform' | 'rep
|
|
|
330
324
|
modals: import("../modules").IModalsState;
|
|
331
325
|
sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
|
|
332
326
|
model: import("../modules").IModelState;
|
|
333
|
-
}) => import("@ws-ui/shared").IComponentTemplate | undefined) & import("reselect").OutputSelectorFields<(args_0: {
|
|
334
|
-
webform: import("@ws-ui/shared").IComponentTemplate[];
|
|
335
|
-
report: import("@ws-ui/shared").IComponentTemplate[];
|
|
336
|
-
}) => import("@ws-ui/shared").IComponentTemplate | undefined, {
|
|
327
|
+
}) => import("@ws-ui/shared").IComponentTemplate | undefined) & import("reselect").OutputSelectorFields<(args_0: import("@ws-ui/shared").IComponentTemplate[]) => import("@ws-ui/shared").IComponentTemplate | undefined, {
|
|
337
328
|
clearCache: () => void;
|
|
338
329
|
}> & {
|
|
339
330
|
clearCache: () => void;
|
package/dist/utils.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const DEFAULT_CACHE: TCachedState;
|
|
|
7
7
|
export type TCachedState = Pick<IRootState, 'tabs' | 'activeTab' | 'recent'> & Pick<AppState, 'roles' | 'debugger' | 'webforms' | 'sharedCSS'>;
|
|
8
8
|
export declare function saveState(state: TCachedState): void;
|
|
9
9
|
export declare function savePrefrences(state: {
|
|
10
|
-
[key: string]:
|
|
10
|
+
[key: string]: any;
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function getCashedPrefrences(): any;
|
|
13
13
|
export declare function getCachedState(): TCachedState;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/store",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@reduxjs/toolkit": "^1.7.1",
|
|
28
|
-
"@ws-ui/shared": "^0.2.0-beta.20240712.1",
|
|
29
28
|
"react-redux": "^7.2.6"
|
|
30
29
|
},
|
|
31
30
|
"peerDependencies": {
|
|
32
|
-
"@ws-ui/icons": "^0.0.
|
|
31
|
+
"@ws-ui/icons": "^0.0.20",
|
|
32
|
+
"@ws-ui/shared": "^0.2.0",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
34
|
"minimatch": "^5.1.0",
|
|
35
35
|
"react": "^17.0.2",
|