@tmagic/editor 1.3.0-beta.2 → 1.3.0-beta.4

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.
Files changed (78) hide show
  1. package/dist/style.css +52 -60
  2. package/dist/tmagic-editor.js +1634 -1065
  3. package/dist/tmagic-editor.js.map +1 -1
  4. package/dist/tmagic-editor.umd.cjs +1659 -1087
  5. package/dist/tmagic-editor.umd.cjs.map +1 -1
  6. package/package.json +10 -10
  7. package/src/Editor.vue +70 -65
  8. package/src/components/ContentMenu.vue +5 -1
  9. package/src/components/SearchInput.vue +5 -1
  10. package/src/editorProps.ts +51 -129
  11. package/src/fields/Code.vue +9 -3
  12. package/src/fields/DataSourceFieldSelect.vue +28 -16
  13. package/src/fields/DataSourceFields.vue +95 -7
  14. package/src/fields/DataSourceMethodSelect.vue +23 -14
  15. package/src/fields/DataSourceMocks.vue +237 -0
  16. package/src/fields/EventSelect.vue +18 -11
  17. package/src/index.ts +4 -1
  18. package/src/initService.ts +50 -20
  19. package/src/layouts/CodeEditor.vue +20 -4
  20. package/src/layouts/Framework.vue +3 -1
  21. package/src/layouts/PropsPanel.vue +3 -1
  22. package/src/layouts/sidebar/ComponentListPanel.vue +18 -8
  23. package/src/layouts/sidebar/Sidebar.vue +7 -10
  24. package/src/layouts/sidebar/code-block/CodeBlockList.vue +3 -1
  25. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +3 -1
  26. package/src/layouts/sidebar/layer/LayerNode.vue +206 -0
  27. package/src/layouts/sidebar/layer/LayerNodeTool.vue +32 -0
  28. package/src/layouts/sidebar/layer/LayerPanel.vue +85 -0
  29. package/src/layouts/sidebar/layer/use-drag.ts +157 -0
  30. package/src/layouts/sidebar/layer/use-filter.ts +70 -0
  31. package/src/layouts/sidebar/layer/use-keybinding.ts +47 -0
  32. package/src/layouts/sidebar/layer/use-node-status.ts +103 -0
  33. package/src/layouts/workspace/Workspace.vue +3 -1
  34. package/src/layouts/workspace/viewer/NodeListMenu.vue +1 -1
  35. package/src/layouts/workspace/viewer/Stage.vue +19 -17
  36. package/src/services/dataSource.ts +10 -0
  37. package/src/services/editor.ts +45 -5
  38. package/src/theme/common/var.scss +2 -2
  39. package/src/theme/framework.scss +2 -0
  40. package/src/theme/layer-panel.scss +63 -63
  41. package/src/theme/props-panel.scss +8 -0
  42. package/src/theme/sidebar.scss +1 -5
  43. package/src/type.ts +60 -0
  44. package/src/utils/data-source/index.ts +11 -0
  45. package/src/utils/dep.ts +26 -11
  46. package/src/utils/editor.ts +14 -3
  47. package/src/utils/props.ts +3 -0
  48. package/types/editorProps.d.ts +61 -107
  49. package/types/fields/Code.vue.d.ts +10 -6
  50. package/types/fields/DataSourceMocks.vue.d.ts +32 -0
  51. package/types/index.d.ts +2 -1
  52. package/types/initService.d.ts +5 -4
  53. package/types/layouts/CodeEditor.vue.d.ts +5 -0
  54. package/types/layouts/Framework.vue.d.ts +2 -12
  55. package/types/layouts/PropsPanel.vue.d.ts +2 -3
  56. package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +2 -7
  57. package/types/layouts/sidebar/Sidebar.vue.d.ts +2 -17
  58. package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +2 -7
  59. package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +2 -9
  60. package/types/layouts/sidebar/{LayerMenu.vue.d.ts → layer/LayerMenu.vue.d.ts} +1 -1
  61. package/types/layouts/sidebar/layer/LayerNode.vue.d.ts +50 -0
  62. package/types/layouts/sidebar/{LayerNode.vue.d.ts → layer/LayerNodeTool.vue.d.ts} +1 -1
  63. package/types/layouts/sidebar/{LayerPanel.vue.d.ts → layer/LayerPanel.vue.d.ts} +2 -8
  64. package/types/layouts/sidebar/layer/use-drag.d.ts +14 -0
  65. package/types/layouts/sidebar/layer/use-filter.d.ts +8 -0
  66. package/types/layouts/sidebar/layer/use-keybinding.d.ts +4 -0
  67. package/types/layouts/sidebar/layer/use-node-status.d.ts +7 -0
  68. package/types/layouts/workspace/Workspace.vue.d.ts +2 -11
  69. package/types/layouts/workspace/viewer/Stage.vue.d.ts +1 -1
  70. package/types/services/dataSource.d.ts +3 -0
  71. package/types/services/editor.d.ts +1 -0
  72. package/types/type.d.ts +60 -0
  73. package/types/utils/dep.d.ts +1 -1
  74. package/types/utils/editor.d.ts +3 -2
  75. package/src/layouts/sidebar/LayerNode.vue +0 -40
  76. package/src/layouts/sidebar/LayerPanel.vue +0 -369
  77. package/types/Editor.vue.d.ts +0 -233
  78. /package/src/layouts/sidebar/{LayerMenu.vue → layer/LayerMenu.vue} +0 -0
@@ -1,369 +0,0 @@
1
- <template>
2
- <TMagicScrollbar class="magic-editor-layer-panel">
3
- <slot name="layer-panel-header"></slot>
4
-
5
- <SearchInput @search="filterTextChangeHandler"></SearchInput>
6
-
7
- <TMagicTree
8
- v-if="values.length"
9
- class="magic-editor-layer-tree"
10
- ref="tree"
11
- node-key="id"
12
- empty-text="页面空荡荡的"
13
- tabindex="-1"
14
- draggable
15
- :default-expanded-keys="expandedKeys"
16
- :default-checked-keys="checkedKeys"
17
- :current-node-key="currentNodeKey"
18
- :data="values"
19
- :expand-on-click-node="false"
20
- :highlight-current="!isMultiSelect"
21
- :check-on-click-node="true"
22
- :props="treeProps"
23
- :filter-node-method="filterNode"
24
- :allow-drop="allowDrop"
25
- :show-checkbox="isMultiSelect"
26
- @node-click="clickHandler"
27
- @node-contextmenu="contextmenu"
28
- @node-drag-end="handleDragEnd"
29
- @node-collapse="handleCollapse"
30
- @node-expand="handleExpand"
31
- @check="checkHandler"
32
- @mousedown="toggleClickFlag"
33
- @mouseup="toggleClickFlag"
34
- >
35
- <template #default="{ node, data }">
36
- <div class="cus-tree-node" :id="data.id" @mouseenter="highlightHandler(data)">
37
- <slot name="layer-node-content" :node="node" :data="data">
38
- <LayerNode :data="data"></LayerNode>
39
- </slot>
40
- </div>
41
- </template>
42
- </TMagicTree>
43
-
44
- <Teleport to="body">
45
- <LayerMenu ref="menu" :layer-content-menu="layerContentMenu" @collapse-all="collapseAllHandler"></LayerMenu>
46
- </Teleport>
47
- </TMagicScrollbar>
48
- </template>
49
-
50
- <script lang="ts" setup>
51
- import { computed, inject, onBeforeUnmount, onMounted, onUnmounted, ref, watch } from 'vue';
52
- import { difference, throttle, union } from 'lodash-es';
53
-
54
- import { TMagicScrollbar, TMagicTree } from '@tmagic/design';
55
- import type { Id, MNode, MPage } from '@tmagic/schema';
56
- import { MContainer, NodeType } from '@tmagic/schema';
57
- import { getNodePath, isPage } from '@tmagic/utils';
58
-
59
- import SearchInput from '@editor/components/SearchInput.vue';
60
- import type { MenuButton, MenuComponent, Services } from '@editor/type';
61
- import { Layout } from '@editor/type';
62
-
63
- import LayerMenu from './LayerMenu.vue';
64
- import LayerNode from './LayerNode.vue';
65
-
66
- defineOptions({
67
- name: 'MEditorLayerPanel',
68
- });
69
-
70
- defineProps<{
71
- layerContentMenu: (MenuButton | MenuComponent)[];
72
- }>();
73
-
74
- const throttleTime = 150;
75
- const services = inject<Services>('services');
76
- const editorService = services?.editorService;
77
- const keybindingService = services?.keybindingService;
78
-
79
- const tree = ref<InstanceType<typeof TMagicTree>>();
80
- const menu = ref<InstanceType<typeof LayerMenu>>();
81
-
82
- // 多选选中的组件id数组
83
- const checkedKeys = ref<Id[]>([]);
84
- // 是否多选
85
- const isCtrlKeyDown = ref(false);
86
- // 默认展开节点
87
- const expandedKeys = ref<Id[]>([]);
88
- const currentNodeKey = ref<Id>();
89
- // 鼠标是否按下标志,用于高亮状态互斥
90
- const clicked = ref(false);
91
-
92
- const treeProps = {
93
- children: 'items',
94
- label: 'name',
95
- value: 'id',
96
- disabled: (data: MNode) => Boolean(data.items?.length),
97
- class: (data: MNode) => {
98
- if (clicked.value || isPage(data)) return '';
99
- if (data.id === highlightNode?.value?.id && !checkedKeys.value.includes(data.id)) {
100
- return 'cus-tree-node-hover';
101
- }
102
- },
103
- };
104
-
105
- const isMultiSelect = computed(() => isCtrlKeyDown.value || checkedKeys.value.length > 1);
106
-
107
- const nodes = computed(() => editorService?.get('nodes') || []);
108
- const page = computed(() => editorService?.get('page'));
109
- const values = computed(() => (page.value ? [page.value] : []));
110
- // 高亮的节点
111
- const highlightNode = computed(() => editorService?.get('highlightNode'));
112
-
113
- // 触发画布单选
114
- const select = async (data: MNode) => {
115
- if (!data.id) {
116
- throw new Error('没有id');
117
- }
118
-
119
- await editorService?.select(data);
120
- editorService?.get('stage')?.select(data.id);
121
- };
122
-
123
- // 触发画布多选
124
- const multiSelect = async (data: Id[]) => {
125
- await editorService?.multiSelect(data);
126
- editorService?.get('stage')?.multiSelect(data);
127
- };
128
-
129
- // 触发画布高亮
130
- const highlight = (data: MNode) => {
131
- if (!data?.id) {
132
- throw new Error('没有id');
133
- }
134
- editorService?.highlight(data);
135
- editorService?.get('stage')?.highlight(data.id);
136
- };
137
-
138
- // tree方法:拖拽时判定目标节点能否成为拖动目标位置
139
- const allowDrop = (draggingNode: any, dropNode: any, type: string): boolean => {
140
- const { data } = dropNode || {};
141
- const { data: ingData } = draggingNode;
142
-
143
- const { type: ingType } = ingData;
144
-
145
- if (ingType !== NodeType.PAGE && data.type === NodeType.PAGE) return false;
146
- if (ingType === NodeType.PAGE && data.type !== NodeType.PAGE) return false;
147
- if (!data?.type) return false;
148
- if (['prev', 'next'].includes(type)) return true;
149
- if (data.items || data.type === 'container') return true;
150
-
151
- return false;
152
- };
153
-
154
- // tree事件:拖拽结束时(可能未成功)触发的事件
155
- const handleDragEnd = async (e: any) => {
156
- if (!tree.value) return;
157
- const { data: node } = e;
158
- const parent = editorService?.getParentById(node.id, false) as MContainer;
159
- const layout = await editorService?.getLayout(parent, node);
160
- node.style.position = layout;
161
- if (layout === Layout.RELATIVE) {
162
- node.style.top = 0;
163
- node.style.left = 0;
164
- }
165
- const data = tree.value.getData();
166
- const [page] = data as [MPage];
167
- editorService?.update(page);
168
- };
169
-
170
- // tree事件:节点被关闭时触发的事件
171
- const handleCollapse = (data: MNode) => {
172
- expandedKeys.value = expandedKeys.value.filter((id) => id !== data.id);
173
- };
174
-
175
- // tree事件:节点被展开时触发的事件
176
- const handleExpand = (data: MNode) => {
177
- if (!page.value) {
178
- expandedKeys.value = [];
179
- return;
180
- }
181
-
182
- expandedKeys.value = union(
183
- expandedKeys.value,
184
- getNodePath(data.id, [page.value]).map((node) => node.id),
185
- );
186
- };
187
-
188
- // tree方法:对树节点进行筛选时执行的方法
189
- const filterNode = (value: string, data: MNode): boolean => {
190
- if (!value) {
191
- return true;
192
- }
193
- let name = '';
194
- if (data.name) {
195
- name = data.name;
196
- } else if (data.items) {
197
- name = 'container';
198
- }
199
- return `${data.id}${name}${data.type}`.indexOf(value) !== -1;
200
- };
201
-
202
- // 过滤关键字
203
- const filterTextChangeHandler = (val: string) => {
204
- tree.value?.filter(val);
205
- };
206
-
207
- watch(nodes, (nodes) => {
208
- const ids = nodes?.map((node) => node.id) || [];
209
-
210
- const idsLength = ids.length;
211
- const checkedKeysLength = checkedKeys.value.length;
212
-
213
- if (
214
- difference(
215
- idsLength > checkedKeysLength ? ids : checkedKeys.value,
216
- idsLength > checkedKeysLength ? checkedKeys.value : ids,
217
- ).length
218
- ) {
219
- tree.value?.setCheckedKeys([], false);
220
-
221
- checkedKeys.value = ids.filter((id) => id !== page.value?.id);
222
- expandedKeys.value = union(expandedKeys.value, ids);
223
- }
224
-
225
- [currentNodeKey.value] = ids;
226
-
227
- setTimeout(() => {
228
- tree.value?.setCurrentKey(currentNodeKey.value);
229
- });
230
- });
231
-
232
- watch(isMultiSelect, (isMultiSelect) => {
233
- if (!isMultiSelect) {
234
- currentNodeKey.value = editorService?.get('node')?.id;
235
- tree.value?.setCurrentKey(currentNodeKey.value);
236
- }
237
- });
238
-
239
- const editorServiceRemoveHandler = () => {
240
- setTimeout(() => {
241
- tree.value?.getNode(editorService?.get('node')?.id)?.updateChildren();
242
- }, 0);
243
- };
244
-
245
- const windowBlurHandler = () => {
246
- isCtrlKeyDown.value = false;
247
- };
248
-
249
- keybindingService?.registeCommand('layer-panel-not-ctrl-keydown', (e) => {
250
- if (e.key !== keybindingService.ctrlKey) {
251
- isCtrlKeyDown.value = false;
252
- }
253
- });
254
-
255
- keybindingService?.registeCommand('layer-panel-ctrl-keydown', () => {
256
- isCtrlKeyDown.value = true;
257
- });
258
-
259
- keybindingService?.registeCommand('layer-panel-ctrl-keyup', () => {
260
- isCtrlKeyDown.value = false;
261
- });
262
-
263
- keybindingService?.registeCommand('layer-panel-global-keydwon', () => {
264
- if (!tree.value?.$el.contains(document.activeElement)) {
265
- isCtrlKeyDown.value = false;
266
- }
267
- });
268
-
269
- keybindingService?.registe([
270
- {
271
- command: 'layer-panel-not-ctrl-keydown',
272
- when: [['layer-panel', 'keydown']],
273
- },
274
- {
275
- command: 'layer-panel-ctrl-keydown',
276
- keybinding: 'ctrl',
277
- when: [['layer-panel', 'keydown']],
278
- },
279
- {
280
- command: 'layer-panel-ctrl-keyup',
281
- keybinding: 'ctrl',
282
- when: [['layer-panel', 'keyup']],
283
- },
284
- {
285
- command: 'layer-panel-global-keydwon',
286
- keybinding: 'ctrl',
287
- when: [['global', 'keydown']],
288
- },
289
- ]);
290
-
291
- watch(tree, () => {
292
- if (tree.value?.$el) {
293
- keybindingService?.registeEl('layer-panel', tree.value.$el);
294
-
295
- tree.value.$el.addEventListener('blur', windowBlurHandler);
296
- } else {
297
- keybindingService?.unregisteEl('layer-panel');
298
- }
299
- });
300
-
301
- onMounted(() => {
302
- editorService?.on('remove', editorServiceRemoveHandler);
303
-
304
- globalThis.addEventListener('blur', windowBlurHandler);
305
- });
306
-
307
- onBeforeUnmount(() => {
308
- tree.value?.$el.removeEventListener('blur', windowBlurHandler);
309
- });
310
-
311
- onUnmounted(() => {
312
- editorService?.off('remove', editorServiceRemoveHandler);
313
- globalThis.removeEventListener('blur', windowBlurHandler);
314
- });
315
-
316
- // 鼠标在组件树移动触发高亮
317
- const highlightHandler = throttle((data: MNode) => {
318
- highlight(data);
319
- }, throttleTime);
320
-
321
- const toggleClickFlag = () => {
322
- clicked.value = !clicked.value;
323
- };
324
-
325
- // 选择节点多选框
326
- const checkHandler = (data: MNode, { checkedNodes }: any): void => {
327
- if (!isCtrlKeyDown.value && nodes.value.length < 2) {
328
- return;
329
- }
330
- if (checkedNodes.length > 0) {
331
- multiSelect(checkedNodes.map((node: MNode) => node.id));
332
- } else {
333
- multiSelect(nodes.value.map((node: MNode) => node.id));
334
- }
335
- };
336
-
337
- // 点击节点
338
- const clickHandler = (data: MNode): void => {
339
- if (isCtrlKeyDown.value) {
340
- return;
341
- }
342
- if (services?.uiService.get('uiSelectMode')) {
343
- document.dispatchEvent(new CustomEvent('ui-select', { detail: data }));
344
- return;
345
- }
346
- select(data);
347
- };
348
-
349
- // 右键菜单
350
- const contextmenu = async (event: MouseEvent, data: MNode): Promise<void> => {
351
- event.preventDefault();
352
-
353
- if (nodes.value.length < 2) {
354
- await select(data);
355
- }
356
-
357
- menu.value?.show(event);
358
- };
359
-
360
- const collapseAllHandler = () => {
361
- const page = editorService?.get('page');
362
- if (!tree.value || !page) return;
363
- const rootNode = tree.value.getNode(page.id);
364
- rootNode.childNodes.forEach((node: any) => {
365
- node.collapse();
366
- handleCollapse(node.data);
367
- });
368
- };
369
- </script>
@@ -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;