@tmagic/editor 1.8.0-beta.8 → 1.8.0-beta.9
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/es/Editor.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +14 -5
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/components/Icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/Resizer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollViewer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SearchInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SplitView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/Tree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/TreeNode.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +1 -1
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/Block.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/Flex.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/Inline.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/InlineBlock.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/None.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/Left.js +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/Right.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/icons/CenterIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/icons/CodeIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/index.js +3 -1
- package/dist/es/layouts/AddPageBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/NavMenuColumn.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +14 -6
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +6 -3
- package/dist/es/layouts/page-bar/AddButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/PageList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/Search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/layouts/sidebar/data-source/DataSourceList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/Workspace.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/StageOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/utils/dep/worker.js +1 -1
- package/dist/tmagic-editor.umd.cjs +3219 -3273
- package/package.json +8 -8
- package/src/Editor.vue +10 -1
- package/src/components/CompareForm.vue +14 -1
- package/src/fields/DataSourceInput.vue +3 -3
- package/src/index.ts +2 -0
- package/src/layouts/history-list/HistoryDiffDialog.vue +2 -0
- package/src/layouts/history-list/HistoryListPanel.vue +16 -6
- package/src/layouts/history-list/useHistoryRevert.ts +17 -11
- package/src/type.ts +11 -0
- package/types/index.d.ts +39 -18
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.8.0-beta.
|
|
2
|
+
"version": "1.8.0-beta.9",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"moveable": "^0.53.0",
|
|
59
59
|
"serialize-javascript": "^7.0.0",
|
|
60
60
|
"sortablejs": "^1.15.6",
|
|
61
|
-
"@tmagic/design": "1.8.0-beta.
|
|
62
|
-
"@tmagic/form": "1.8.0-beta.
|
|
63
|
-
"@tmagic/
|
|
64
|
-
"@tmagic/
|
|
65
|
-
"@tmagic/
|
|
61
|
+
"@tmagic/design": "1.8.0-beta.9",
|
|
62
|
+
"@tmagic/form": "1.8.0-beta.9",
|
|
63
|
+
"@tmagic/stage": "1.8.0-beta.9",
|
|
64
|
+
"@tmagic/table": "1.8.0-beta.9",
|
|
65
|
+
"@tmagic/utils": "1.8.0-beta.9"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/events": "^3.0.3",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"monaco-editor": "^0.55.1 ",
|
|
76
76
|
"type-fest": "^5.2.0",
|
|
77
77
|
"typescript": "^6.0.3",
|
|
78
|
-
"vue": "^3.5.
|
|
79
|
-
"@tmagic/core": "1.8.0-beta.
|
|
78
|
+
"vue": "^3.5.38",
|
|
79
|
+
"@tmagic/core": "1.8.0-beta.9"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"typescript": {
|
package/src/Editor.vue
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<script lang="ts" setup>
|
|
136
136
|
import { EventEmitter } from 'events';
|
|
137
137
|
|
|
138
|
-
import { provide } from 'vue';
|
|
138
|
+
import { provide, ref } from 'vue';
|
|
139
139
|
|
|
140
140
|
import type { MApp } from '@tmagic/core';
|
|
141
141
|
|
|
@@ -227,6 +227,8 @@ const stageOptions: StageOptions = {
|
|
|
227
227
|
|
|
228
228
|
stageOverlayService.set('stageOptions', stageOptions);
|
|
229
229
|
|
|
230
|
+
const propsPanelRef = ref<InstanceType<typeof FormPanel> | null>(null);
|
|
231
|
+
|
|
230
232
|
provide('services', services);
|
|
231
233
|
|
|
232
234
|
provide('codeOptions', props.codeOptions);
|
|
@@ -237,6 +239,11 @@ provide('stageOptions', stageOptions);
|
|
|
237
239
|
* 与 PropsPanel 通过 `:extend-state` 显式传入的方式保持等价。
|
|
238
240
|
*/
|
|
239
241
|
provide('extendFormState', props.extendFormState);
|
|
242
|
+
/**
|
|
243
|
+
* 提供 PropsPanel 主属性表单的 formState getter,供历史差异弹窗复用,
|
|
244
|
+
* 让 CompareForm 与 PropsPanel 的 filterFunction 上下文保持一致。
|
|
245
|
+
*/
|
|
246
|
+
provide('getPropsPanelFormState', () => propsPanelRef.value?.configForm?.formState);
|
|
240
247
|
|
|
241
248
|
/**
|
|
242
249
|
* 把历史记录面板的自定义扩展 tab 提供给深层的 HistoryListPanel(它挂在 NavMenu 中,
|
|
@@ -248,9 +255,11 @@ provide('historyListExtraTabs', props.historyListExtraTabs);
|
|
|
248
255
|
provide<EventBus>('eventBus', new EventEmitter());
|
|
249
256
|
|
|
250
257
|
const propsPanelMountedHandler = (e: InstanceType<typeof FormPanel>) => {
|
|
258
|
+
propsPanelRef.value = e;
|
|
251
259
|
emit('props-panel-mounted', e);
|
|
252
260
|
};
|
|
253
261
|
const propsPanelUnmountedHandler = () => {
|
|
262
|
+
propsPanelRef.value = null;
|
|
254
263
|
emit('props-panel-unmounted');
|
|
255
264
|
};
|
|
256
265
|
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
:is-compare="true"
|
|
11
11
|
:disabled="true"
|
|
12
12
|
:label-width="labelWidth"
|
|
13
|
-
:extend-state="
|
|
13
|
+
:extend-state="mergedExtendState"
|
|
14
14
|
:show-diff="showDiff"
|
|
15
|
+
:self-diff-field-types="selfDiffFieldTypes"
|
|
15
16
|
></MForm>
|
|
16
17
|
</div>
|
|
17
18
|
</template>
|
|
@@ -61,6 +62,13 @@ const props = withDefaults(
|
|
|
61
62
|
* 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
|
|
62
63
|
*/
|
|
63
64
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
65
|
+
/**
|
|
66
|
+
* 外部透传的基础 formState(通常来自 PropsPanel 主属性表单)。
|
|
67
|
+
* CompareForm 会提取其中的扩展字段覆盖到自己的 formState,保证 filterFunction 上下文一致。
|
|
68
|
+
*/
|
|
69
|
+
baseFormState?: FormState;
|
|
70
|
+
/** 需要走 self diff 的字段类型(例如 mod-cond)。 */
|
|
71
|
+
selfDiffFieldTypes?: string[];
|
|
64
72
|
/**
|
|
65
73
|
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
|
|
66
74
|
* 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
|
|
@@ -74,6 +82,7 @@ const props = withDefaults(
|
|
|
74
82
|
category: 'node',
|
|
75
83
|
labelWidth: '120px',
|
|
76
84
|
services: () => useServices(),
|
|
85
|
+
extendState: (state: FormState) => state,
|
|
77
86
|
},
|
|
78
87
|
);
|
|
79
88
|
|
|
@@ -174,6 +183,10 @@ const removeStyleDisplayConfig = (formConfig: FormConfig): FormConfig =>
|
|
|
174
183
|
};
|
|
175
184
|
});
|
|
176
185
|
|
|
186
|
+
const mergedExtendState = (state: FormState) => {
|
|
187
|
+
return props.extendState(props.baseFormState || state);
|
|
188
|
+
};
|
|
189
|
+
|
|
177
190
|
/**
|
|
178
191
|
* 内置的默认 FormConfig 加载逻辑:按 `category` 从对应 service / 工具取配置。
|
|
179
192
|
* 作为 ctx.defaultLoadConfig 透传给自定义 `loadConfig`,方便复用与二次加工。
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
<template #suffix>
|
|
31
31
|
<Icon :icon="Coin" />
|
|
32
32
|
</template>
|
|
33
|
-
<template #default="
|
|
33
|
+
<template #default="slotProps">
|
|
34
34
|
<div style="display: flex; flex-direction: column; line-height: 1.2em">
|
|
35
|
-
<div>{{ item
|
|
36
|
-
<span style="font-size: 10px; color: rgba(0, 0, 0, 0.6)">{{ item
|
|
35
|
+
<div>{{ slotProps?.item?.text || '' }}</div>
|
|
36
|
+
<span style="font-size: 10px; color: rgba(0, 0, 0, 0.6)">{{ slotProps?.item?.value || '' }}</span>
|
|
37
37
|
</div>
|
|
38
38
|
</template>
|
|
39
39
|
</component>
|
package/src/index.ts
CHANGED
|
@@ -44,6 +44,8 @@ export { default as stageOverlayService } from './services/stageOverlay';
|
|
|
44
44
|
export { default as uiService } from './services/ui';
|
|
45
45
|
export { default as codeBlockService } from './services/codeBlock';
|
|
46
46
|
export { default as depService } from './services/dep';
|
|
47
|
+
export { default as componentListService } from './services/componentList';
|
|
48
|
+
export { default as keybindingService } from './services/keybinding';
|
|
47
49
|
export { default as ComponentListPanel } from './layouts/sidebar/ComponentListPanel.vue';
|
|
48
50
|
export { default as LayerPanel } from './layouts/sidebar/layer/LayerPanel.vue';
|
|
49
51
|
export { default as CodeSelect } from './fields/CodeSelect.vue';
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
:data-source-type="payload.dataSourceType"
|
|
44
44
|
:value="rightValue"
|
|
45
45
|
:last-value="leftValue"
|
|
46
|
+
:base-form-state="compareFormState"
|
|
46
47
|
:extend-state="extendState"
|
|
47
48
|
:load-config="loadConfig"
|
|
48
49
|
:self-diff-field-types="selfDiffFieldTypes"
|
|
@@ -107,6 +108,7 @@ const props = withDefaults(
|
|
|
107
108
|
isConfirm?: boolean;
|
|
108
109
|
onConfirm?: () => void;
|
|
109
110
|
selfDiffFieldTypes?: string[];
|
|
111
|
+
compareFormState?: FormState;
|
|
110
112
|
}>(),
|
|
111
113
|
{
|
|
112
114
|
services: () => useServices(),
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
<TMagicTabs v-model="activeTab" class="m-editor-history-list-tabs">
|
|
19
19
|
<component
|
|
20
20
|
:is="tabPaneComponent?.component || 'el-tab-pane'"
|
|
21
|
-
v-bind="
|
|
21
|
+
v-bind="
|
|
22
|
+
tabPaneComponent?.props({ name: 'page', label: `${pageName} (${pageGroups.length})`, lazy: true }) || {}
|
|
23
|
+
"
|
|
22
24
|
>
|
|
23
25
|
<PageTab
|
|
24
26
|
:list="pageGroupsDisplay"
|
|
@@ -38,8 +40,11 @@
|
|
|
38
40
|
v-if="!disabledDataSource"
|
|
39
41
|
:is="tabPaneComponent?.component || 'el-tab-pane'"
|
|
40
42
|
v-bind="
|
|
41
|
-
tabPaneComponent?.props({
|
|
42
|
-
|
|
43
|
+
tabPaneComponent?.props({
|
|
44
|
+
name: 'data-source',
|
|
45
|
+
label: `${dataSourceName} (${dataSourceGroups.length})`,
|
|
46
|
+
lazy: true,
|
|
47
|
+
}) || {}
|
|
43
48
|
"
|
|
44
49
|
>
|
|
45
50
|
<BucketTab
|
|
@@ -59,7 +64,11 @@
|
|
|
59
64
|
v-if="!disabledCodeBlock"
|
|
60
65
|
:is="tabPaneComponent?.component || 'el-tab-pane'"
|
|
61
66
|
v-bind="
|
|
62
|
-
tabPaneComponent?.props({
|
|
67
|
+
tabPaneComponent?.props({
|
|
68
|
+
name: 'code-block',
|
|
69
|
+
label: `${codeBlockName} (${codeBlockGroups.length})`,
|
|
70
|
+
lazy: true,
|
|
71
|
+
}) || {}
|
|
63
72
|
"
|
|
64
73
|
>
|
|
65
74
|
<BucketTab
|
|
@@ -79,7 +88,7 @@
|
|
|
79
88
|
v-for="tab in extraTabs"
|
|
80
89
|
:key="tab.name"
|
|
81
90
|
:is="tabPaneComponent?.component || 'el-tab-pane'"
|
|
82
|
-
v-bind="tabPaneComponent?.props({ name: tab.name, label: resolveTabLabel(tab) }) || {}"
|
|
91
|
+
v-bind="tabPaneComponent?.props({ name: tab.name, label: resolveTabLabel(tab), lazy: true }) || {}"
|
|
83
92
|
>
|
|
84
93
|
<component :is="tab.component" v-bind="tab.props || {}" v-on="tab.listeners || {}" />
|
|
85
94
|
</component>
|
|
@@ -193,6 +202,7 @@ const extendFormState = inject<((_state: FormState) => Record<string, any> | Pro
|
|
|
193
202
|
'extendFormState',
|
|
194
203
|
undefined,
|
|
195
204
|
);
|
|
205
|
+
const getPropsPanelFormState = inject<(() => FormState | undefined) | undefined>('getPropsPanelFormState', undefined);
|
|
196
206
|
|
|
197
207
|
const {
|
|
198
208
|
expanded,
|
|
@@ -306,7 +316,7 @@ const onCodeBlockGotoInitial = (id: string | number) => {
|
|
|
306
316
|
* 业务方亦可直接 import useHistoryRevert(services) 调用,无需自行挂载任何弹窗。
|
|
307
317
|
*/
|
|
308
318
|
const { onPageRevert, onDataSourceRevert, onCodeBlockRevert, onPageDiff, onDataSourceDiff, onCodeBlockDiff } =
|
|
309
|
-
useHistoryRevert(services, { extendState: extendFormState });
|
|
319
|
+
useHistoryRevert(services, { extendState: extendFormState, getPropsPanelFormState });
|
|
310
320
|
|
|
311
321
|
/**
|
|
312
322
|
* 把内存中(已清空对应类别后的)历史状态重新写回 IndexedDB,
|
|
@@ -59,6 +59,7 @@ const buildDiffPayload = (source: DiffPayloadSource, index: number, id?: string
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
interface MountedDiffDialog {
|
|
62
|
+
app: ReturnType<typeof createApp>;
|
|
62
63
|
instance: {
|
|
63
64
|
open: (_payload: DiffDialogPayload) => void;
|
|
64
65
|
confirm: (_payload: DiffDialogPayload) => Promise<boolean>;
|
|
@@ -75,7 +76,7 @@ interface MountedDiffDialog {
|
|
|
75
76
|
const mountHistoryDiffDialog = async (
|
|
76
77
|
options: Pick<UseHistoryRevertOptions, 'appContext' | 'extendState'> &
|
|
77
78
|
CustomDiffFormOptions & {
|
|
78
|
-
services:
|
|
79
|
+
services: Services;
|
|
79
80
|
isConfirm?: boolean;
|
|
80
81
|
onClose?: () => void;
|
|
81
82
|
},
|
|
@@ -92,6 +93,7 @@ const mountHistoryDiffDialog = async (
|
|
|
92
93
|
extendState: options.extendState,
|
|
93
94
|
loadConfig: options.loadConfig,
|
|
94
95
|
selfDiffFieldTypes: options.selfDiffFieldTypes,
|
|
96
|
+
compareFormState: options.compareFormState,
|
|
95
97
|
onClose: options.onClose,
|
|
96
98
|
});
|
|
97
99
|
if (options.appContext) {
|
|
@@ -111,7 +113,7 @@ const mountHistoryDiffDialog = async (
|
|
|
111
113
|
}, 300);
|
|
112
114
|
};
|
|
113
115
|
|
|
114
|
-
return { instance, destroy };
|
|
116
|
+
return { app, instance, destroy };
|
|
115
117
|
};
|
|
116
118
|
|
|
117
119
|
/**
|
|
@@ -123,7 +125,7 @@ const confirmRevertWithDiffDialog = async (
|
|
|
123
125
|
payload: DiffDialogPayload,
|
|
124
126
|
options: Pick<UseHistoryRevertOptions, 'appContext' | 'extendState'> &
|
|
125
127
|
CustomDiffFormOptions & {
|
|
126
|
-
services:
|
|
128
|
+
services: Services;
|
|
127
129
|
},
|
|
128
130
|
): Promise<boolean> => {
|
|
129
131
|
const { instance, destroy } = await mountHistoryDiffDialog({
|
|
@@ -145,7 +147,7 @@ const viewHistoryDiffDialog = async (
|
|
|
145
147
|
payload: DiffDialogPayload,
|
|
146
148
|
options: Pick<UseHistoryRevertOptions, 'appContext' | 'extendState'> &
|
|
147
149
|
CustomDiffFormOptions & {
|
|
148
|
-
services:
|
|
150
|
+
services: Services;
|
|
149
151
|
},
|
|
150
152
|
): Promise<void> => {
|
|
151
153
|
// onClose 在用户关闭弹窗时才触发,此时 handle.destroy 早已赋值。
|
|
@@ -187,14 +189,11 @@ const viewHistoryDiffDialog = async (
|
|
|
187
189
|
* onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
|
|
188
190
|
* ```
|
|
189
191
|
*/
|
|
190
|
-
export const useHistoryRevert = (
|
|
191
|
-
services: Pick<Services, 'editorService' | 'dataSourceService' | 'codeBlockService' | 'historyService'>,
|
|
192
|
-
options: UseHistoryRevertOptions = {},
|
|
193
|
-
) => {
|
|
192
|
+
export const useHistoryRevert = (services: Services, options: UseHistoryRevertOptions = {}) => {
|
|
194
193
|
const { editorService, dataSourceService, codeBlockService, historyService } = services;
|
|
195
194
|
// 自动捕获调用方所在组件的 appContext(在 setup 中调用时),业务方亦可显式覆盖。
|
|
196
195
|
const appContext = options.appContext ?? getCurrentInstance()?.appContext ?? null;
|
|
197
|
-
const { extendState } = options;
|
|
196
|
+
const { extendState, getPropsPanelFormState } = options;
|
|
198
197
|
|
|
199
198
|
/** 目标数据已被删除、无法回滚时的统一提示。 */
|
|
200
199
|
const showRevertTargetMissing = () => {
|
|
@@ -300,7 +299,7 @@ export const useHistoryRevert = (
|
|
|
300
299
|
showRevertTargetMissing();
|
|
301
300
|
return Promise.resolve(null);
|
|
302
301
|
}
|
|
303
|
-
return runRevert(buildPageDiffPayload(index)).then((result) =>
|
|
302
|
+
return runRevert(buildPageDiffPayload(index), { compareFormState: getPropsPanelFormState?.() }).then((result) =>
|
|
304
303
|
result ? editorService.revertPageStep(index) : null,
|
|
305
304
|
);
|
|
306
305
|
};
|
|
@@ -331,7 +330,14 @@ export const useHistoryRevert = (
|
|
|
331
330
|
*/
|
|
332
331
|
const onPageDiff = (index: number): Promise<void> | void => {
|
|
333
332
|
const payload = buildPageDiffPayload(index);
|
|
334
|
-
if (payload)
|
|
333
|
+
if (payload) {
|
|
334
|
+
return viewHistoryDiffDialog(payload, {
|
|
335
|
+
appContext,
|
|
336
|
+
extendState,
|
|
337
|
+
services,
|
|
338
|
+
compareFormState: getPropsPanelFormState?.(),
|
|
339
|
+
});
|
|
340
|
+
}
|
|
335
341
|
};
|
|
336
342
|
|
|
337
343
|
const onDataSourceDiff = (id: string | number, index: number): Promise<void> | void => {
|
package/src/type.ts
CHANGED
|
@@ -1367,6 +1367,12 @@ export interface UseHistoryRevertOptions {
|
|
|
1367
1367
|
* 使对比表单中依赖业务上下文的 `display` / `disabled` 等 filterFunction 正常工作。
|
|
1368
1368
|
*/
|
|
1369
1369
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1370
|
+
/**
|
|
1371
|
+
* 返回 PropsPanel 主属性表单(FormPanel -> MForm)的 formState。
|
|
1372
|
+
* 仅页面历史「查看差异 / 回滚确认」场景会使用该 formState 覆盖 CompareForm 中同名扩展字段,
|
|
1373
|
+
* 以保证两处 filterFunction 读取到一致的运行态上下文。
|
|
1374
|
+
*/
|
|
1375
|
+
getPropsPanelFormState?: () => FormState | undefined;
|
|
1370
1376
|
}
|
|
1371
1377
|
|
|
1372
1378
|
/**
|
|
@@ -1382,6 +1388,11 @@ export interface CustomDiffFormOptions {
|
|
|
1382
1388
|
loadConfig?: CompareFormLoadConfig;
|
|
1383
1389
|
/** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
|
|
1384
1390
|
selfDiffFieldTypes?: string[];
|
|
1391
|
+
/**
|
|
1392
|
+
* 可选:外部提供的 formState(通常来自 PropsPanel 主表单),
|
|
1393
|
+
* 对比弹窗会用它覆盖 CompareForm 中同名扩展字段,避免上下文不一致。
|
|
1394
|
+
*/
|
|
1395
|
+
compareFormState?: FormState;
|
|
1385
1396
|
}
|
|
1386
1397
|
|
|
1387
1398
|
/**
|
package/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import designPlugin, { ButtonProps, DesignPluginOptions } from "@tmagic/design";
|
|
|
5
5
|
import Gesto, { OnDrag, OnDrag as OnDrag$1 } from "gesto";
|
|
6
6
|
import { CodeBlockContent, CodeBlockDSL, DataSchema, DataSourceFieldType, DataSourceSchema, DepData, DepExtendedData, DepTargetType, DepTargetType as DepTargetType$1, DisplayCond, EventOption, Id, MApp, MContainer, MNode, MPage, MPageFragment, NodeType, Target, TargetOptions } from "@tmagic/core";
|
|
7
7
|
import { App, AppContext, Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
8
|
-
import EventEmitter, { EventEmitter
|
|
8
|
+
import EventEmitter$1, { EventEmitter } from "events";
|
|
9
9
|
import * as Monaco from "monaco-editor";
|
|
10
10
|
import Sortable, { Options, SortableEvent } from "sortablejs";
|
|
11
11
|
import { PascalCasedProperties, Writable } from "type-fest";
|
|
@@ -47,7 +47,7 @@ export * from "@tmagic/utils";
|
|
|
47
47
|
* 调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数,after第一个参数则是原方法的return值;
|
|
48
48
|
* 如需终止后续方法调用可以return new Error();
|
|
49
49
|
*/
|
|
50
|
-
declare class BaseService extends EventEmitter
|
|
50
|
+
declare class BaseService extends EventEmitter {
|
|
51
51
|
private pluginOptionsList;
|
|
52
52
|
private taskList;
|
|
53
53
|
private doingTask;
|
|
@@ -317,6 +317,7 @@ declare class ComponentList extends BaseService {
|
|
|
317
317
|
destroy(): void;
|
|
318
318
|
}
|
|
319
319
|
type ComponentListService = ComponentList;
|
|
320
|
+
declare const _default$39: ComponentList;
|
|
320
321
|
//#endregion
|
|
321
322
|
//#region temp/packages/editor/src/services/dataSource.d.ts
|
|
322
323
|
interface State$2 {
|
|
@@ -500,7 +501,7 @@ declare class DataSource extends BaseService {
|
|
|
500
501
|
private applyHistoryStep;
|
|
501
502
|
}
|
|
502
503
|
type DataSourceService = DataSource;
|
|
503
|
-
declare const _default$
|
|
504
|
+
declare const _default$40: DataSource;
|
|
504
505
|
//#endregion
|
|
505
506
|
//#region temp/packages/editor/src/services/dep.d.ts
|
|
506
507
|
interface DepEvents {
|
|
@@ -553,7 +554,7 @@ declare class Dep extends BaseService {
|
|
|
553
554
|
private enqueueTask;
|
|
554
555
|
}
|
|
555
556
|
type DepService = Dep;
|
|
556
|
-
declare const _default$
|
|
557
|
+
declare const _default$42: Dep;
|
|
557
558
|
//#endregion
|
|
558
559
|
//#region temp/packages/editor/src/services/editor.d.ts
|
|
559
560
|
declare class Editor extends BaseService {
|
|
@@ -916,7 +917,7 @@ declare class Editor extends BaseService {
|
|
|
916
917
|
private selectedConfigExceptionHandler;
|
|
917
918
|
}
|
|
918
919
|
type EditorService = Editor;
|
|
919
|
-
declare const _default$
|
|
920
|
+
declare const _default$43: Editor;
|
|
920
921
|
//#endregion
|
|
921
922
|
//#region temp/packages/editor/src/services/events.d.ts
|
|
922
923
|
declare const canUsePluginMethods$6: {
|
|
@@ -938,7 +939,7 @@ declare class Events extends BaseService {
|
|
|
938
939
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$4, Events>): void;
|
|
939
940
|
}
|
|
940
941
|
type EventsService = Events;
|
|
941
|
-
declare const _default$
|
|
942
|
+
declare const _default$44: Events;
|
|
942
943
|
//#endregion
|
|
943
944
|
//#region temp/packages/editor/src/utils/undo-redo.d.ts
|
|
944
945
|
/**
|
|
@@ -1254,7 +1255,7 @@ declare class History extends BaseService {
|
|
|
1254
1255
|
private resolveDbName;
|
|
1255
1256
|
}
|
|
1256
1257
|
type HistoryService = History;
|
|
1257
|
-
declare const _default$
|
|
1258
|
+
declare const _default$45: History;
|
|
1258
1259
|
//#endregion
|
|
1259
1260
|
//#region temp/packages/editor/src/services/keybinding.d.ts
|
|
1260
1261
|
declare class Keybinding extends BaseService {
|
|
@@ -1293,6 +1294,7 @@ declare class Keybinding extends BaseService {
|
|
|
1293
1294
|
private getKeyconKeys;
|
|
1294
1295
|
}
|
|
1295
1296
|
type KeybindingService = Keybinding;
|
|
1297
|
+
declare const _default$46: Keybinding;
|
|
1296
1298
|
//#endregion
|
|
1297
1299
|
//#region temp/packages/editor/src/services/props.d.ts
|
|
1298
1300
|
declare const canUsePluginMethods$4: {
|
|
@@ -1392,7 +1394,7 @@ declare class Props extends BaseService {
|
|
|
1392
1394
|
private setRelateId;
|
|
1393
1395
|
}
|
|
1394
1396
|
type PropsService = Props;
|
|
1395
|
-
declare const _default$
|
|
1397
|
+
declare const _default$48: Props;
|
|
1396
1398
|
//#endregion
|
|
1397
1399
|
//#region temp/packages/editor/src/services/stageOverlay.d.ts
|
|
1398
1400
|
declare const canUsePluginMethods$3: {
|
|
@@ -1419,7 +1421,7 @@ declare class StageOverlay extends BaseService {
|
|
|
1419
1421
|
private updateSelectStatus;
|
|
1420
1422
|
}
|
|
1421
1423
|
type StageOverlayService = StageOverlay;
|
|
1422
|
-
declare const _default$
|
|
1424
|
+
declare const _default$49: StageOverlay;
|
|
1423
1425
|
//#endregion
|
|
1424
1426
|
//#region temp/packages/editor/src/services/storage.d.ts
|
|
1425
1427
|
interface Options$1 {
|
|
@@ -1482,7 +1484,7 @@ declare class WebStorage extends BaseService {
|
|
|
1482
1484
|
private getValueAndProtocol;
|
|
1483
1485
|
}
|
|
1484
1486
|
type StorageService = WebStorage;
|
|
1485
|
-
declare const _default$
|
|
1487
|
+
declare const _default$50: WebStorage;
|
|
1486
1488
|
//#endregion
|
|
1487
1489
|
//#region temp/packages/editor/src/services/ui.d.ts
|
|
1488
1490
|
declare const canUsePluginMethods$1: {
|
|
@@ -1502,7 +1504,7 @@ declare class Ui extends BaseService {
|
|
|
1502
1504
|
private setStageRect;
|
|
1503
1505
|
}
|
|
1504
1506
|
type UiService = Ui;
|
|
1505
|
-
declare const _default$
|
|
1507
|
+
declare const _default$51: Ui;
|
|
1506
1508
|
//#endregion
|
|
1507
1509
|
//#region temp/packages/editor/src/type.d.ts
|
|
1508
1510
|
type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
|
|
@@ -2425,7 +2427,7 @@ interface EventBusEvent {
|
|
|
2425
2427
|
'remove-data-source': [id: string];
|
|
2426
2428
|
'edit-code': [id: string];
|
|
2427
2429
|
}
|
|
2428
|
-
interface EventBus extends EventEmitter {
|
|
2430
|
+
interface EventBus extends EventEmitter$1 {
|
|
2429
2431
|
on<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, listener: (...args: Param) => void): this;
|
|
2430
2432
|
emit<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, ...args: Param): boolean;
|
|
2431
2433
|
}
|
|
@@ -2578,6 +2580,12 @@ interface UseHistoryRevertOptions {
|
|
|
2578
2580
|
* 使对比表单中依赖业务上下文的 `display` / `disabled` 等 filterFunction 正常工作。
|
|
2579
2581
|
*/
|
|
2580
2582
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2583
|
+
/**
|
|
2584
|
+
* 返回 PropsPanel 主属性表单(FormPanel -> MForm)的 formState。
|
|
2585
|
+
* 仅页面历史「查看差异 / 回滚确认」场景会使用该 formState 覆盖 CompareForm 中同名扩展字段,
|
|
2586
|
+
* 以保证两处 filterFunction 读取到一致的运行态上下文。
|
|
2587
|
+
*/
|
|
2588
|
+
getPropsPanelFormState?: () => FormState | undefined;
|
|
2581
2589
|
}
|
|
2582
2590
|
/**
|
|
2583
2591
|
* 业务自有历史(如管理台「模块」)做差异对比时所需的额外渲染入参。
|
|
@@ -2592,6 +2600,11 @@ interface CustomDiffFormOptions {
|
|
|
2592
2600
|
loadConfig?: CompareFormLoadConfig;
|
|
2593
2601
|
/** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
|
|
2594
2602
|
selfDiffFieldTypes?: string[];
|
|
2603
|
+
/**
|
|
2604
|
+
* 可选:外部提供的 formState(通常来自 PropsPanel 主表单),
|
|
2605
|
+
* 对比弹窗会用它覆盖 CompareForm 中同名扩展字段,避免上下文不一致。
|
|
2606
|
+
*/
|
|
2607
|
+
compareFormState?: FormState;
|
|
2595
2608
|
}
|
|
2596
2609
|
/**
|
|
2597
2610
|
* 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
|
|
@@ -3015,7 +3028,7 @@ interface IdleTaskEvents {
|
|
|
3015
3028
|
hightLevelLength: number;
|
|
3016
3029
|
}];
|
|
3017
3030
|
}
|
|
3018
|
-
declare class IdleTask<T = any> extends EventEmitter
|
|
3031
|
+
declare class IdleTask<T = any> extends EventEmitter {
|
|
3019
3032
|
private taskList;
|
|
3020
3033
|
private hightLevelTaskList;
|
|
3021
3034
|
private taskHandle;
|
|
@@ -3038,7 +3051,7 @@ interface ScrollViewerOptions {
|
|
|
3038
3051
|
height: number;
|
|
3039
3052
|
};
|
|
3040
3053
|
}
|
|
3041
|
-
declare class ScrollViewer extends EventEmitter
|
|
3054
|
+
declare class ScrollViewer extends EventEmitter {
|
|
3042
3055
|
private container;
|
|
3043
3056
|
private target;
|
|
3044
3057
|
private zoom;
|
|
@@ -3197,7 +3210,7 @@ declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
|
3197
3210
|
declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
3198
3211
|
//#endregion
|
|
3199
3212
|
//#region temp/packages/editor/src/utils/monaco-editor.d.ts
|
|
3200
|
-
declare const _default$
|
|
3213
|
+
declare const _default$47: () => Promise<typeof import("monaco-editor")>;
|
|
3201
3214
|
//#endregion
|
|
3202
3215
|
//#region temp/packages/form/src/schema.d.ts
|
|
3203
3216
|
interface ChangeRecord$1 {
|
|
@@ -5941,6 +5954,12 @@ type __VLS_Props$8 = {
|
|
|
5941
5954
|
* 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
|
|
5942
5955
|
*/
|
|
5943
5956
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5957
|
+
/**
|
|
5958
|
+
* 外部透传的基础 formState(通常来自 PropsPanel 主属性表单)。
|
|
5959
|
+
* CompareForm 会提取其中的扩展字段覆盖到自己的 formState,保证 filterFunction 上下文一致。
|
|
5960
|
+
*/
|
|
5961
|
+
baseFormState?: FormState; /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
|
|
5962
|
+
selfDiffFieldTypes?: string[];
|
|
5944
5963
|
/**
|
|
5945
5964
|
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
|
|
5946
5965
|
* 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
|
|
@@ -5955,6 +5974,7 @@ declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
5955
5974
|
reload: () => Promise<void>;
|
|
5956
5975
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
|
|
5957
5976
|
labelWidth: string;
|
|
5977
|
+
extendState: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5958
5978
|
services: Services;
|
|
5959
5979
|
category: CompareCategory;
|
|
5960
5980
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6089,6 +6109,7 @@ type __VLS_Props$7 = {
|
|
|
6089
6109
|
isConfirm?: boolean;
|
|
6090
6110
|
onConfirm?: () => void;
|
|
6091
6111
|
selfDiffFieldTypes?: string[];
|
|
6112
|
+
compareFormState?: FormState;
|
|
6092
6113
|
};
|
|
6093
6114
|
declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$7, {
|
|
6094
6115
|
open: (p: DiffDialogPayload) => void;
|
|
@@ -6133,7 +6154,7 @@ declare const _default$21: typeof __VLS_export$7;
|
|
|
6133
6154
|
* onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
|
|
6134
6155
|
* ```
|
|
6135
6156
|
*/
|
|
6136
|
-
declare const useHistoryRevert: (services:
|
|
6157
|
+
declare const useHistoryRevert: (services: Services, options?: UseHistoryRevertOptions) => {
|
|
6137
6158
|
onPageRevert: (index: number) => Promise<StepValue | null>;
|
|
6138
6159
|
onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null>;
|
|
6139
6160
|
onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null>;
|
|
@@ -6340,8 +6361,8 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
6340
6361
|
declare const _default$32: typeof __VLS_export;
|
|
6341
6362
|
//#endregion
|
|
6342
6363
|
//#region temp/packages/editor/src/plugin.d.ts
|
|
6343
|
-
declare const _default$
|
|
6364
|
+
declare const _default$41: {
|
|
6344
6365
|
install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
|
|
6345
6366
|
};
|
|
6346
6367
|
//#endregion
|
|
6347
|
-
export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, CustomContentMenuFunction, CustomDiffFormOptions, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, HistoryEvents, HistoryGroup, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, HistoryStepEntry, HistoryStepType, HistorySteps, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$26 as LayerPanel, LayerPanelSlots, Layout, _default$27 as LayoutContainer, _default$27 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$28 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$29 as PropsFormPanel, PropsFormValueFunction, _default$30 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$31 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$32 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$33 as TMagicCodeEditor, _default$34 as TMagicEditor, _default$35 as ToolButton, _default$36 as Tree, _default$37 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$38 as codeBlockService, collectRelatedNodes, confirmHistoryAction, createStackStep, _default$
|
|
6368
|
+
export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, CustomContentMenuFunction, CustomDiffFormOptions, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, HistoryEvents, HistoryGroup, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, HistoryStepEntry, HistoryStepType, HistorySteps, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$26 as LayerPanel, LayerPanelSlots, Layout, _default$27 as LayoutContainer, _default$27 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$28 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$29 as PropsFormPanel, PropsFormValueFunction, _default$30 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$31 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$32 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$33 as TMagicCodeEditor, _default$34 as TMagicEditor, _default$35 as ToolButton, _default$36 as Tree, _default$37 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$38 as codeBlockService, collectRelatedNodes, _default$39 as componentListService, confirmHistoryAction, createStackStep, _default$40 as dataSourceService, debug, _default$41 as default, defaultIsExpandable, _default$42 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$43 as editorService, eqOptions, error, eventTabConfig, _default$44 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$45 as historyService, idbDelete, idbGet, idbSet, info, isIncludeDataSource, isIndexedDBSupported, _default$46 as keybindingService, _default$47 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, _default$48 as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$49 as stageOverlayService, _default$50 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$51 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
|