@tmagic/editor 1.3.0-beta.1 → 1.3.0-beta.3
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/style.css +67 -75
- package/dist/tmagic-editor.js +1667 -1062
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +1692 -1084
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/Editor.vue +70 -65
- package/src/components/ContentMenu.vue +5 -1
- package/src/components/SearchInput.vue +5 -1
- package/src/components/ToolButton.vue +1 -1
- package/src/editorProps.ts +51 -129
- package/src/fields/Code.vue +9 -3
- package/src/fields/DataSourceFieldSelect.vue +28 -16
- package/src/fields/DataSourceFields.vue +95 -7
- package/src/fields/DataSourceMethodSelect.vue +23 -14
- package/src/fields/DataSourceMocks.vue +237 -0
- package/src/fields/EventSelect.vue +30 -11
- package/src/index.ts +4 -1
- package/src/initService.ts +50 -20
- package/src/layouts/CodeEditor.vue +20 -4
- package/src/layouts/Framework.vue +3 -1
- package/src/layouts/PropsPanel.vue +3 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +18 -8
- package/src/layouts/sidebar/Sidebar.vue +7 -10
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +3 -1
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +3 -1
- package/src/layouts/sidebar/layer/LayerNode.vue +206 -0
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +32 -0
- package/src/layouts/sidebar/layer/LayerPanel.vue +85 -0
- package/src/layouts/sidebar/layer/use-drag.ts +157 -0
- package/src/layouts/sidebar/layer/use-filter.ts +70 -0
- package/src/layouts/sidebar/layer/use-keybinding.ts +47 -0
- package/src/layouts/sidebar/layer/use-node-status.ts +103 -0
- package/src/layouts/workspace/Workspace.vue +3 -1
- package/src/layouts/workspace/viewer/NodeListMenu.vue +16 -9
- package/src/layouts/workspace/viewer/Stage.vue +19 -17
- package/src/layouts/workspace/viewer/ViewerMenu.vue +1 -1
- package/src/services/dataSource.ts +21 -0
- package/src/services/editor.ts +45 -5
- package/src/theme/common/var.scss +2 -2
- package/src/theme/content-menu.scss +22 -20
- package/src/theme/framework.scss +2 -0
- package/src/theme/layer-panel.scss +63 -63
- package/src/theme/props-panel.scss +8 -0
- package/src/theme/sidebar.scss +1 -5
- package/src/type.ts +61 -0
- package/src/utils/data-source/index.ts +23 -0
- package/src/utils/dep.ts +26 -11
- package/src/utils/editor.ts +14 -3
- package/src/utils/props.ts +4 -0
- package/types/editorProps.d.ts +61 -107
- package/types/fields/Code.vue.d.ts +10 -6
- package/types/fields/DataSourceMocks.vue.d.ts +32 -0
- package/types/index.d.ts +2 -1
- package/types/initService.d.ts +5 -4
- package/types/layouts/CodeEditor.vue.d.ts +5 -0
- package/types/layouts/Framework.vue.d.ts +2 -12
- package/types/layouts/PropsPanel.vue.d.ts +2 -3
- package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +2 -7
- package/types/layouts/sidebar/Sidebar.vue.d.ts +2 -17
- package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +2 -7
- package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +2 -9
- package/types/layouts/sidebar/{LayerMenu.vue.d.ts → layer/LayerMenu.vue.d.ts} +1 -1
- package/types/layouts/sidebar/layer/LayerNode.vue.d.ts +50 -0
- package/types/layouts/sidebar/{LayerNode.vue.d.ts → layer/LayerNodeTool.vue.d.ts} +1 -1
- package/types/layouts/sidebar/{LayerPanel.vue.d.ts → layer/LayerPanel.vue.d.ts} +2 -8
- package/types/layouts/sidebar/layer/use-drag.d.ts +14 -0
- package/types/layouts/sidebar/layer/use-filter.d.ts +8 -0
- package/types/layouts/sidebar/layer/use-keybinding.d.ts +4 -0
- package/types/layouts/sidebar/layer/use-node-status.d.ts +7 -0
- package/types/layouts/workspace/Workspace.vue.d.ts +2 -11
- package/types/layouts/workspace/viewer/Stage.vue.d.ts +1 -1
- package/types/services/dataSource.d.ts +7 -0
- package/types/services/editor.d.ts +1 -0
- package/types/type.d.ts +61 -0
- package/types/utils/dep.d.ts +1 -1
- package/types/utils/editor.d.ts +3 -2
- package/src/layouts/sidebar/LayerNode.vue +0 -40
- package/src/layouts/sidebar/LayerPanel.vue +0 -369
- package/types/Editor.vue.d.ts +0 -233
- /package/src/layouts/sidebar/{LayerMenu.vue → layer/LayerMenu.vue} +0 -0
package/types/Editor.vue.d.ts
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import type { Services } from './type';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
modelValue: {
|
|
4
|
-
type: import("vue").PropType<import("@tmagic/schema").MApp>;
|
|
5
|
-
default: () => {};
|
|
6
|
-
require: boolean;
|
|
7
|
-
};
|
|
8
|
-
componentGroupList: {
|
|
9
|
-
type: import("vue").PropType<import("./type").ComponentGroup[]>;
|
|
10
|
-
default: () => never[];
|
|
11
|
-
};
|
|
12
|
-
datasourceList: {
|
|
13
|
-
type: import("vue").PropType<import("./type").DatasourceTypeOption[]>;
|
|
14
|
-
default: () => never[];
|
|
15
|
-
};
|
|
16
|
-
sidebar: {
|
|
17
|
-
type: import("vue").PropType<import("./type").SideBarData>;
|
|
18
|
-
};
|
|
19
|
-
menu: {
|
|
20
|
-
type: import("vue").PropType<import("./type").MenuBarData>;
|
|
21
|
-
default: () => {
|
|
22
|
-
left: never[];
|
|
23
|
-
right: never[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
layerContentMenu: {
|
|
27
|
-
type: import("vue").PropType<(import("./type").MenuButton | import("./type").MenuComponent)[]>;
|
|
28
|
-
default: () => never[];
|
|
29
|
-
};
|
|
30
|
-
stageContentMenu: {
|
|
31
|
-
type: import("vue").PropType<(import("./type").MenuButton | import("./type").MenuComponent)[]>;
|
|
32
|
-
default: () => never[];
|
|
33
|
-
};
|
|
34
|
-
render: {
|
|
35
|
-
type: import("vue").PropType<(stage: import("@tmagic/stage").default) => HTMLDivElement | Promise<HTMLDivElement>>;
|
|
36
|
-
};
|
|
37
|
-
runtimeUrl: StringConstructor;
|
|
38
|
-
autoScrollIntoView: BooleanConstructor;
|
|
39
|
-
propsConfigs: {
|
|
40
|
-
type: import("vue").PropType<Record<string, import("@tmagic/form").FormConfig>>;
|
|
41
|
-
default: () => {};
|
|
42
|
-
};
|
|
43
|
-
propsValues: {
|
|
44
|
-
type: import("vue").PropType<Record<string, Partial<import("@tmagic/schema").MNode>>>;
|
|
45
|
-
default: () => {};
|
|
46
|
-
};
|
|
47
|
-
eventMethodList: {
|
|
48
|
-
type: import("vue").PropType<Record<string, {
|
|
49
|
-
events: import("@tmagic/core").EventOption[];
|
|
50
|
-
methods: import("@tmagic/core").EventOption[];
|
|
51
|
-
}>>;
|
|
52
|
-
default: () => {};
|
|
53
|
-
};
|
|
54
|
-
datasourceValues: {
|
|
55
|
-
type: import("vue").PropType<Record<string, Partial<import("@tmagic/schema").DataSourceSchema>>>;
|
|
56
|
-
default: () => {};
|
|
57
|
-
};
|
|
58
|
-
datasourceConfigs: {
|
|
59
|
-
type: import("vue").PropType<Record<string, import("@tmagic/form").FormConfig>>;
|
|
60
|
-
default: () => {};
|
|
61
|
-
};
|
|
62
|
-
moveableOptions: {
|
|
63
|
-
type: import("vue").PropType<import("@tmagic/stage").MoveableOptions | ((config?: import("@tmagic/stage").CustomizeMoveableOptionsCallbackConfig | undefined) => import("@tmagic/stage").MoveableOptions)>;
|
|
64
|
-
};
|
|
65
|
-
defaultSelected: {
|
|
66
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
67
|
-
};
|
|
68
|
-
canSelect: {
|
|
69
|
-
type: import("vue").PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
70
|
-
default: (el: HTMLElement) => boolean;
|
|
71
|
-
};
|
|
72
|
-
isContainer: {
|
|
73
|
-
type: import("vue").PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
74
|
-
default: (el: HTMLElement) => boolean;
|
|
75
|
-
};
|
|
76
|
-
containerHighlightClassName: {
|
|
77
|
-
type: StringConstructor;
|
|
78
|
-
default: string;
|
|
79
|
-
};
|
|
80
|
-
containerHighlightDuration: {
|
|
81
|
-
type: NumberConstructor;
|
|
82
|
-
default: number;
|
|
83
|
-
};
|
|
84
|
-
containerHighlightType: {
|
|
85
|
-
type: import("vue").PropType<import("@tmagic/stage").ContainerHighlightType>;
|
|
86
|
-
default: import("@tmagic/stage").ContainerHighlightType;
|
|
87
|
-
};
|
|
88
|
-
stageRect: {
|
|
89
|
-
type: import("vue").PropType<import("./type").StageRect>;
|
|
90
|
-
};
|
|
91
|
-
codeOptions: {
|
|
92
|
-
type: ObjectConstructor;
|
|
93
|
-
default: () => {};
|
|
94
|
-
};
|
|
95
|
-
updateDragEl: {
|
|
96
|
-
type: import("vue").PropType<import("@tmagic/stage").UpdateDragEl>;
|
|
97
|
-
};
|
|
98
|
-
disabledDragStart: {
|
|
99
|
-
type: BooleanConstructor;
|
|
100
|
-
};
|
|
101
|
-
extendFormState: {
|
|
102
|
-
type: import("vue").PropType<(state: import("@tmagic/form").FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
103
|
-
};
|
|
104
|
-
}, Services, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "props-panel-mounted")[], "update:modelValue" | "props-panel-mounted", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
105
|
-
modelValue: {
|
|
106
|
-
type: import("vue").PropType<import("@tmagic/schema").MApp>;
|
|
107
|
-
default: () => {};
|
|
108
|
-
require: boolean;
|
|
109
|
-
};
|
|
110
|
-
componentGroupList: {
|
|
111
|
-
type: import("vue").PropType<import("./type").ComponentGroup[]>;
|
|
112
|
-
default: () => never[];
|
|
113
|
-
};
|
|
114
|
-
datasourceList: {
|
|
115
|
-
type: import("vue").PropType<import("./type").DatasourceTypeOption[]>;
|
|
116
|
-
default: () => never[];
|
|
117
|
-
};
|
|
118
|
-
sidebar: {
|
|
119
|
-
type: import("vue").PropType<import("./type").SideBarData>;
|
|
120
|
-
};
|
|
121
|
-
menu: {
|
|
122
|
-
type: import("vue").PropType<import("./type").MenuBarData>;
|
|
123
|
-
default: () => {
|
|
124
|
-
left: never[];
|
|
125
|
-
right: never[];
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
layerContentMenu: {
|
|
129
|
-
type: import("vue").PropType<(import("./type").MenuButton | import("./type").MenuComponent)[]>;
|
|
130
|
-
default: () => never[];
|
|
131
|
-
};
|
|
132
|
-
stageContentMenu: {
|
|
133
|
-
type: import("vue").PropType<(import("./type").MenuButton | import("./type").MenuComponent)[]>;
|
|
134
|
-
default: () => never[];
|
|
135
|
-
};
|
|
136
|
-
render: {
|
|
137
|
-
type: import("vue").PropType<(stage: import("@tmagic/stage").default) => HTMLDivElement | Promise<HTMLDivElement>>;
|
|
138
|
-
};
|
|
139
|
-
runtimeUrl: StringConstructor;
|
|
140
|
-
autoScrollIntoView: BooleanConstructor;
|
|
141
|
-
propsConfigs: {
|
|
142
|
-
type: import("vue").PropType<Record<string, import("@tmagic/form").FormConfig>>;
|
|
143
|
-
default: () => {};
|
|
144
|
-
};
|
|
145
|
-
propsValues: {
|
|
146
|
-
type: import("vue").PropType<Record<string, Partial<import("@tmagic/schema").MNode>>>;
|
|
147
|
-
default: () => {};
|
|
148
|
-
};
|
|
149
|
-
eventMethodList: {
|
|
150
|
-
type: import("vue").PropType<Record<string, {
|
|
151
|
-
events: import("@tmagic/core").EventOption[];
|
|
152
|
-
methods: import("@tmagic/core").EventOption[];
|
|
153
|
-
}>>;
|
|
154
|
-
default: () => {};
|
|
155
|
-
};
|
|
156
|
-
datasourceValues: {
|
|
157
|
-
type: import("vue").PropType<Record<string, Partial<import("@tmagic/schema").DataSourceSchema>>>;
|
|
158
|
-
default: () => {};
|
|
159
|
-
};
|
|
160
|
-
datasourceConfigs: {
|
|
161
|
-
type: import("vue").PropType<Record<string, import("@tmagic/form").FormConfig>>;
|
|
162
|
-
default: () => {};
|
|
163
|
-
};
|
|
164
|
-
moveableOptions: {
|
|
165
|
-
type: import("vue").PropType<import("@tmagic/stage").MoveableOptions | ((config?: import("@tmagic/stage").CustomizeMoveableOptionsCallbackConfig | undefined) => import("@tmagic/stage").MoveableOptions)>;
|
|
166
|
-
};
|
|
167
|
-
defaultSelected: {
|
|
168
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
169
|
-
};
|
|
170
|
-
canSelect: {
|
|
171
|
-
type: import("vue").PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
172
|
-
default: (el: HTMLElement) => boolean;
|
|
173
|
-
};
|
|
174
|
-
isContainer: {
|
|
175
|
-
type: import("vue").PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
176
|
-
default: (el: HTMLElement) => boolean;
|
|
177
|
-
};
|
|
178
|
-
containerHighlightClassName: {
|
|
179
|
-
type: StringConstructor;
|
|
180
|
-
default: string;
|
|
181
|
-
};
|
|
182
|
-
containerHighlightDuration: {
|
|
183
|
-
type: NumberConstructor;
|
|
184
|
-
default: number;
|
|
185
|
-
};
|
|
186
|
-
containerHighlightType: {
|
|
187
|
-
type: import("vue").PropType<import("@tmagic/stage").ContainerHighlightType>;
|
|
188
|
-
default: import("@tmagic/stage").ContainerHighlightType;
|
|
189
|
-
};
|
|
190
|
-
stageRect: {
|
|
191
|
-
type: import("vue").PropType<import("./type").StageRect>;
|
|
192
|
-
};
|
|
193
|
-
codeOptions: {
|
|
194
|
-
type: ObjectConstructor;
|
|
195
|
-
default: () => {};
|
|
196
|
-
};
|
|
197
|
-
updateDragEl: {
|
|
198
|
-
type: import("vue").PropType<import("@tmagic/stage").UpdateDragEl>;
|
|
199
|
-
};
|
|
200
|
-
disabledDragStart: {
|
|
201
|
-
type: BooleanConstructor;
|
|
202
|
-
};
|
|
203
|
-
extendFormState: {
|
|
204
|
-
type: import("vue").PropType<(state: import("@tmagic/form").FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
205
|
-
};
|
|
206
|
-
}>> & {
|
|
207
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
208
|
-
"onProps-panel-mounted"?: ((...args: any[]) => any) | undefined;
|
|
209
|
-
}, {
|
|
210
|
-
menu: import("./type").MenuBarData;
|
|
211
|
-
autoScrollIntoView: boolean;
|
|
212
|
-
codeOptions: Record<string, any>;
|
|
213
|
-
modelValue: import("@tmagic/schema").MApp;
|
|
214
|
-
layerContentMenu: (import("./type").MenuButton | import("./type").MenuComponent)[];
|
|
215
|
-
stageContentMenu: (import("./type").MenuButton | import("./type").MenuComponent)[];
|
|
216
|
-
componentGroupList: import("./type").ComponentGroup[];
|
|
217
|
-
datasourceList: import("./type").DatasourceTypeOption[];
|
|
218
|
-
propsConfigs: Record<string, import("@tmagic/form").FormConfig>;
|
|
219
|
-
propsValues: Record<string, Partial<import("@tmagic/schema").MNode>>;
|
|
220
|
-
eventMethodList: Record<string, {
|
|
221
|
-
events: import("@tmagic/core").EventOption[];
|
|
222
|
-
methods: import("@tmagic/core").EventOption[];
|
|
223
|
-
}>;
|
|
224
|
-
datasourceValues: Record<string, Partial<import("@tmagic/schema").DataSourceSchema>>;
|
|
225
|
-
datasourceConfigs: Record<string, import("@tmagic/form").FormConfig>;
|
|
226
|
-
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
227
|
-
isContainer: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
228
|
-
containerHighlightClassName: string;
|
|
229
|
-
containerHighlightDuration: number;
|
|
230
|
-
containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
|
|
231
|
-
disabledDragStart: boolean;
|
|
232
|
-
}, {}>;
|
|
233
|
-
export default _default;
|
|
File without changes
|