@ws-ui/store 0.1.28-feat.2737 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +47 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6802 -7040
- package/dist/index.es.js.map +1 -1
- package/dist/modules/explorer/reducer.d.ts +1 -3
- package/dist/modules/explorer/thunks.d.ts +22 -13
- package/dist/modules/explorer/types.d.ts +1 -13
- package/dist/modules/explorer/utils.d.ts +0 -23
- package/package.json +2 -2
|
@@ -2,8 +2,6 @@ import { PayloadAction } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { ITreeItem } from './types';
|
|
3
3
|
export declare const findNodeByPath: (tree: ITreeItem[], path: string) => ITreeItem | null;
|
|
4
4
|
declare const stateSlice: import("@reduxjs/toolkit").Slice<import("immer/dist/internal.js").WritableDraft<ITreeItem>[], {
|
|
5
|
-
removeClassesFolder: (state: import("immer/dist/internal.js").WritableDraft<ITreeItem>[], action: PayloadAction<string[]>) => import("immer/dist/internal.js").WritableDraft<ITreeItem>[];
|
|
6
|
-
addClassesFolder: (state: import("immer/dist/internal.js").WritableDraft<ITreeItem>[], action: PayloadAction<ITreeItem[]>) => import("immer/dist/internal.js").WritableDraft<ITreeItem>[];
|
|
7
5
|
toggleExpandFolder: (state: import("immer/dist/internal.js").WritableDraft<ITreeItem>[], action: PayloadAction<ITreeItem>) => import("immer/dist/internal.js").WritableDraft<ITreeItem>[];
|
|
8
6
|
expandFolder: (state: import("immer/dist/internal.js").WritableDraft<ITreeItem>[], action: PayloadAction<ITreeItem>) => import("immer/dist/internal.js").WritableDraft<ITreeItem>[];
|
|
9
7
|
openAddFileInput: (state: import("immer/dist/internal.js").WritableDraft<ITreeItem>[], action: PayloadAction<ITreeItem>) => ITreeItem[];
|
|
@@ -36,5 +34,5 @@ export declare const toggleExpandFolder: import("@reduxjs/toolkit").ActionCreato
|
|
|
36
34
|
}, string>, setFolderChildren: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
37
35
|
parentPath: string;
|
|
38
36
|
children: ITreeItem[];
|
|
39
|
-
}, string
|
|
37
|
+
}, string>;
|
|
40
38
|
export default stateSlice;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="@ws-ui/shared/dist/declarations/datasources/interfaces/catalog" />
|
|
2
2
|
/// <reference types="@ws-ui/shared/dist/declarations/datasources/interfaces/dataclass-attribute" />
|
|
3
|
+
import { Action, ThunkDispatch } from '@reduxjs/toolkit';
|
|
3
4
|
import { FileFolderType, IFileInfo, ISaveFileResponse, ISetFileContentResponse, ITextEditorSelection } from '@ws-ui/shared';
|
|
4
5
|
import { ITab } from '@ws-ui/shared';
|
|
5
6
|
import { ClassFileTypes } from '../../modules/root/types';
|
|
6
7
|
import { AppState } from '..';
|
|
7
8
|
import { ISettingsState } from '../settings';
|
|
8
|
-
import {
|
|
9
|
+
import { ITreeItem } from './types';
|
|
9
10
|
interface ICreateNewFilePayload {
|
|
10
11
|
fileName: string;
|
|
11
12
|
type: FileFolderType;
|
|
@@ -64,20 +65,17 @@ export declare const tryEditMethod: import("@reduxjs/toolkit").AsyncThunk<ITab<a
|
|
|
64
65
|
}, {
|
|
65
66
|
state: AppState;
|
|
66
67
|
}>;
|
|
67
|
-
export
|
|
68
|
+
export declare const createModelFiles: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
68
69
|
type: 'dataclass';
|
|
69
70
|
className: string;
|
|
70
71
|
collectionName: string;
|
|
71
|
-
toCreate?: ClassFileTypes;
|
|
72
|
+
toCreate?: ClassFileTypes | undefined;
|
|
72
73
|
} | {
|
|
73
74
|
type: 'model';
|
|
74
|
-
}
|
|
75
|
-
export declare const createModelFiles: import("@reduxjs/toolkit").AsyncThunk<void, TCreateModelFilesPayload, {
|
|
76
|
-
state: AppState;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const fetchFolderContent: import("@reduxjs/toolkit").AsyncThunk<ITreeItem[], string, {
|
|
75
|
+
}, {
|
|
79
76
|
state: AppState;
|
|
80
77
|
}>;
|
|
78
|
+
export declare const fetchFolderContent: import("@reduxjs/toolkit").AsyncThunk<ITreeItem[], string, {}>;
|
|
81
79
|
export declare const fetchFolderContentWithoutExpanding: import("@reduxjs/toolkit").AsyncThunk<ITreeItem[], string, {}>;
|
|
82
80
|
export declare const uploadFileAndGetResponse: import("@reduxjs/toolkit").AsyncThunk<{
|
|
83
81
|
status: number;
|
|
@@ -90,9 +88,7 @@ export declare const uploadFile: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
90
88
|
file: File;
|
|
91
89
|
path: string;
|
|
92
90
|
parentNode: ITreeItem;
|
|
93
|
-
}, {
|
|
94
|
-
state: AppState;
|
|
95
|
-
}>;
|
|
91
|
+
}, {}>;
|
|
96
92
|
export declare const createNewFile: import("@reduxjs/toolkit").AsyncThunk<{
|
|
97
93
|
qodly: boolean;
|
|
98
94
|
file: ISetFileContentResponse;
|
|
@@ -115,7 +111,7 @@ export declare function getFilePath(file: ISaveFileResponse, options?: Partial<{
|
|
|
115
111
|
qodly: boolean;
|
|
116
112
|
}>): string;
|
|
117
113
|
export declare const createNewFileAndOpen: import("@reduxjs/toolkit").AsyncThunk<void, ICreateNewFilePayload, {
|
|
118
|
-
|
|
114
|
+
dispatch: ThunkDispatch<any, void, Action>;
|
|
119
115
|
}>;
|
|
120
116
|
export declare const createNewNode: import("@reduxjs/toolkit").AsyncThunk<{
|
|
121
117
|
file: import("@ws-ui/shared").IAddFolderResponse;
|
|
@@ -141,7 +137,20 @@ export declare const openFile: import("@reduxjs/toolkit").AsyncThunk<ITab<any, P
|
|
|
141
137
|
source: import("@ws-ui/shared").ISource;
|
|
142
138
|
editor: import("@ws-ui/shared").IEditor;
|
|
143
139
|
ext: import("@ws-ui/shared").DebuggerFileExtension;
|
|
144
|
-
}>> | null,
|
|
140
|
+
}>> | null, {
|
|
141
|
+
file: IFileInfo;
|
|
142
|
+
inactive?: boolean | undefined;
|
|
143
|
+
isNew?: boolean | undefined;
|
|
144
|
+
flags?: Pick<Partial<{
|
|
145
|
+
touched: boolean;
|
|
146
|
+
removed: boolean;
|
|
147
|
+
pinned: boolean;
|
|
148
|
+
loading: boolean;
|
|
149
|
+
old: boolean;
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
confirmed: boolean;
|
|
152
|
+
}>, "pinned" | "loading" | "enabled" | "confirmed"> | undefined;
|
|
153
|
+
}, {
|
|
145
154
|
state: AppState;
|
|
146
155
|
}>;
|
|
147
156
|
export declare const openFileAtLine: import("@reduxjs/toolkit").AsyncThunk<ITab<any, Partial<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileFolderType, IEditor
|
|
1
|
+
import { FileFolderType, IEditor } from '@ws-ui/shared';
|
|
2
2
|
export interface ITreeItem {
|
|
3
3
|
name: string;
|
|
4
4
|
path: string;
|
|
@@ -19,9 +19,6 @@ export interface ITreeItem {
|
|
|
19
19
|
supportedEditors?: IEditor[];
|
|
20
20
|
};
|
|
21
21
|
isRoot?: boolean;
|
|
22
|
-
info?: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
22
|
}
|
|
26
23
|
export interface INodePermissions {
|
|
27
24
|
canRemove: boolean;
|
|
@@ -52,15 +49,6 @@ export interface IEditors {
|
|
|
52
49
|
editor: IEditor;
|
|
53
50
|
supportedEditors?: IEditor[];
|
|
54
51
|
}
|
|
55
|
-
export interface IOpenFilePayload {
|
|
56
|
-
file: IFileInfo;
|
|
57
|
-
inactive?: boolean;
|
|
58
|
-
isNew?: boolean;
|
|
59
|
-
flags?: Pick<ITabFlags, 'enabled' | 'loading' | 'pinned' | 'confirmed'>;
|
|
60
|
-
info?: {
|
|
61
|
-
[key: string]: string;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
52
|
export declare const editors: IEditors[];
|
|
65
53
|
export declare const extensions: {
|
|
66
54
|
pattern: string;
|
|
@@ -2,26 +2,3 @@ import { IEditors } from './types';
|
|
|
2
2
|
export declare function getNodeRelativePath(nodePath: string): string;
|
|
3
3
|
export declare function getEditors(path: string): IEditors;
|
|
4
4
|
export declare function getExtension(path: string): "json" | "text";
|
|
5
|
-
type TgetContent = {
|
|
6
|
-
name: string;
|
|
7
|
-
qodly: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare const getContent: () => {
|
|
10
|
-
dataclass: ({ name, qodly }: TgetContent) => {
|
|
11
|
-
name: string;
|
|
12
|
-
content: string;
|
|
13
|
-
};
|
|
14
|
-
collection: ({ name, qodly }: TgetContent) => {
|
|
15
|
-
name: string;
|
|
16
|
-
content: string;
|
|
17
|
-
};
|
|
18
|
-
entity: ({ name, qodly }: TgetContent) => {
|
|
19
|
-
name: string;
|
|
20
|
-
content: string;
|
|
21
|
-
};
|
|
22
|
-
model: ({ name, qodly }: TgetContent) => {
|
|
23
|
-
name: string;
|
|
24
|
-
content: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/store",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.28
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@reduxjs/toolkit": "^1.7.1",
|
|
27
|
-
"@ws-ui/shared": "^0.1.
|
|
27
|
+
"@ws-ui/shared": "^0.1.22",
|
|
28
28
|
"react-redux": "^7.2.6"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|