@tmagic/editor 1.8.0-manmanyu.9 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +22 -13
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +10 -5
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +21 -122
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +21 -5
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +62 -16
- 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 +3 -2
- package/dist/es/components/ScrollBar.js +0 -1
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +5 -4
- 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/components/ViewForm.js +5 -0
- package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/es/editorProps.js +7 -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 +30 -113
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +7 -19
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +8 -9
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +12 -4
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +9 -20
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +2 -2
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +10 -110
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +52 -363
- 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 +3 -6
- 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 +4 -35
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/fields/StyleSetter/configs.js +663 -0
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.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 +29 -106
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +8 -11
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +30 -89
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +29 -297
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -82
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +8 -24
- package/dist/es/fields/UISelect.js +0 -1
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/configs/codeSelect.js +98 -0
- package/dist/es/fields/configs/displayConds.js +155 -0
- package/dist/es/fields/configs/eventSelect.js +225 -0
- package/dist/es/fields/configs/stickyAddButton.js +21 -0
- package/dist/es/fields/headless-validation.js +139 -0
- package/dist/es/headless.js +2 -0
- package/dist/es/hooks/use-code-block-edit.js +4 -2
- package/dist/es/hooks/use-compare-form.js +101 -0
- package/dist/es/hooks/use-form-context.js +29 -0
- package/dist/es/hooks/use-stage.js +1 -0
- 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/DatasourceIcon.js +1 -1
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/index.js +16 -8
- package/dist/es/initService.js +52 -16
- 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 +26 -10
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +11 -8
- 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 +8 -5
- 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 +26 -10
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +11 -13
- 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/composables.js +1 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +38 -33
- 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 +50 -20
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
- package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +21 -36
- 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 +4 -4
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +19 -4
- 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 +9 -4
- 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 +4 -4
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +19 -4
- package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.js +5 -0
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.vue_vue_type_script_setup_true_lang.js +46 -0
- 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 +6 -4
- package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
- package/dist/es/layouts/sidebar/layer/use-drag.js +11 -10
- package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
- 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 +9 -3
- package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +55 -9
- 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 +8 -8
- package/dist/es/plugin.js +35 -23
- package/dist/es/services/codeBlock.js +8 -3
- package/dist/es/services/dataSource.js +3 -0
- package/dist/es/services/dep.js +162 -41
- package/dist/es/services/editor.js +344 -113
- package/dist/es/services/events.js +4 -4
- package/dist/es/services/history.js +17 -1
- package/dist/es/services/keybinding.js +3 -3
- package/dist/es/services/props.js +2 -1
- package/dist/es/services/storage.js +2 -2
- package/dist/es/services/ui.js +7 -2
- package/dist/es/style.css +277 -114
- package/dist/es/utils/code-block.js +14 -7
- package/dist/es/utils/config.js +4 -1
- package/dist/es/utils/const.js +2 -2
- package/dist/es/utils/content-menu.js +2 -2
- package/dist/es/utils/data-source/index.js +69 -13
- package/dist/es/utils/dep/collect-worker-client.js +154 -0
- package/dist/es/utils/dep/idle-task.js +70 -22
- package/dist/es/utils/dep/worker.js +1 -1
- package/dist/es/utils/editor.js +4 -2
- package/dist/es/utils/event.js +135 -0
- package/dist/es/utils/monaco-editor.js +22 -6
- package/dist/es/utils/operator.js +2 -2
- package/dist/es/utils/props.js +50 -106
- package/dist/es/utils/type-match-rules.js +364 -0
- package/dist/style.css +277 -114
- package/dist/themes/magic-admin.css +978 -175
- package/dist/tmagic-editor-headless.umd.cjs +10919 -0
- package/dist/tmagic-editor.umd.cjs +12507 -10673
- package/package.json +18 -13
- package/src/Editor.vue +23 -6
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CodeParams.vue +10 -4
- package/src/components/CompareForm.vue +20 -190
- package/src/components/ContentMenu.vue +34 -6
- package/src/components/FloatingBox.vue +71 -7
- package/src/components/ScrollBar.vue +0 -67
- package/src/components/ViewForm.vue +54 -0
- package/src/editorProps.ts +23 -10
- package/src/fields/Code.vue +1 -1
- package/src/fields/CodeSelect.vue +20 -113
- package/src/fields/CodeSelectCol.vue +1 -1
- package/src/fields/CondOpSelect.vue +5 -26
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +2 -2
- package/src/fields/DataSourceFieldSelect/Index.vue +15 -12
- package/src/fields/DataSourceFields.vue +5 -1
- package/src/fields/DataSourceInput.vue +10 -28
- package/src/fields/DataSourceMethodSelect.vue +1 -1
- package/src/fields/DataSourceMethods.vue +6 -2
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/fields/DataSourceSelect.vue +1 -1
- package/src/fields/DisplayConds.vue +17 -139
- package/src/fields/EventSelect.vue +29 -416
- package/src/fields/KeyValue.vue +1 -1
- package/src/fields/StyleSetter/Index.vue +2 -8
- package/src/fields/StyleSetter/components/Border.vue +4 -38
- package/src/fields/StyleSetter/components/Box.vue +1 -1
- package/src/fields/StyleSetter/components/Position.vue +1 -1
- package/src/fields/StyleSetter/configs.ts +690 -0
- package/src/fields/StyleSetter/pro/Background.vue +9 -64
- package/src/fields/StyleSetter/pro/Border.vue +5 -16
- package/src/fields/StyleSetter/pro/Font.vue +11 -71
- package/src/fields/StyleSetter/pro/Layout.vue +10 -230
- package/src/fields/StyleSetter/pro/Position.vue +11 -82
- package/src/fields/StyleSetter/pro/Transform.vue +6 -34
- package/src/fields/UISelect.vue +0 -12
- package/src/fields/configs/codeSelect.ts +127 -0
- package/src/fields/configs/displayConds.ts +184 -0
- package/src/fields/configs/eventSelect.ts +309 -0
- package/src/fields/configs/stickyAddButton.ts +32 -0
- package/src/fields/headless-validation.ts +177 -0
- package/src/headless.ts +33 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-compare-form.ts +166 -0
- package/src/hooks/use-form-context.ts +56 -0
- package/src/hooks/use-stage.ts +1 -0
- package/src/index.ts +9 -0
- package/src/initService.ts +73 -18
- package/src/layouts/CodeEditor.vue +32 -6
- package/src/layouts/Framework.vue +7 -6
- package/src/layouts/history-list/BucketTab.vue +2 -2
- package/src/layouts/history-list/HistoryDiffDialog.vue +33 -15
- package/src/layouts/history-list/HistoryListPanel.vue +16 -18
- package/src/layouts/history-list/useHistoryRevert.ts +57 -41
- package/src/layouts/props-panel/FormPanel.vue +75 -20
- package/src/layouts/props-panel/PropsPanel.vue +81 -30
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/ComponentListPanel.vue +6 -2
- package/src/layouts/sidebar/Sidebar.vue +5 -3
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +5 -2
- package/src/layouts/sidebar/code-block/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +3 -3
- package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/layer/LayerMenu.vue +2 -2
- package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
- package/src/layouts/sidebar/layer/LayerPanel.vue +5 -2
- package/src/layouts/sidebar/layer/use-click.ts +3 -3
- package/src/layouts/sidebar/layer/use-node-status.ts +2 -2
- package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
- package/src/layouts/workspace/viewer/Stage.vue +80 -10
- package/src/layouts/workspace/viewer/ViewerMenu.vue +7 -7
- package/src/plugin.ts +35 -25
- package/src/services/codeBlock.ts +4 -0
- package/src/services/dataSource.ts +3 -0
- package/src/services/dep.ts +292 -47
- package/src/services/editor.ts +383 -120
- package/src/services/events.ts +8 -7
- package/src/services/history.ts +22 -1
- package/src/services/keybinding.ts +3 -3
- package/src/services/ui.ts +26 -5
- package/src/theme/code-block.scss +0 -37
- package/src/theme/display-conds.scss +4 -0
- package/src/theme/event.scss +25 -33
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/framework.scss +4 -1
- package/src/theme/layer-node-content.scss +14 -0
- package/src/theme/nav-menu.scss +5 -1
- package/src/theme/props-panel.scss +17 -3
- package/src/theme/scroll-bar.scss +64 -0
- package/src/theme/theme.scss +3 -0
- package/src/theme/themes/magic-admin/index.scss +109 -9
- package/src/theme/ui-select.scss +9 -0
- package/src/type.ts +216 -6
- package/src/utils/code-block.ts +1 -0
- package/src/utils/config.ts +9 -1
- package/src/utils/const.ts +3 -3
- package/src/utils/content-menu.ts +2 -2
- package/src/utils/data-source/index.ts +82 -11
- package/src/utils/dep/collect-worker-client.ts +215 -0
- package/src/utils/dep/idle-task.ts +104 -35
- package/src/utils/dep/worker.ts +113 -9
- package/src/utils/event.ts +237 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/monaco-editor.ts +27 -0
- package/src/utils/operator.ts +2 -2
- package/src/utils/props.ts +61 -122
- package/src/utils/type-match-rules.ts +733 -0
- package/types/headless.d.ts +17 -0
- package/types/index.d.ts +1207 -724
- package/src/fields/StyleSetter/icons/align-items/index copy.ts +0 -5
package/types/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig,
|
|
1
|
+
import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig, FormContext, FormInstallOptions, FormValue, KeyValueConfig, MForm, PageFragmentSelectConfig, TabPaneConfig, TableColumnConfig, TypeFunction } from "@tmagic/form";
|
|
2
2
|
import tablePlugin from "@tmagic/table";
|
|
3
3
|
import StageCore, { CanDropIn, ContainerHighlightType, CustomizeMoveableOptions, GuidesOptions, RenderType, UpdateDragEl, default as StageCore$1 } from "@tmagic/stage";
|
|
4
|
-
import designPlugin, { ButtonProps, DesignPluginOptions } from "@tmagic/design";
|
|
4
|
+
import designPlugin, { ButtonProps, DesignPluginOptions, FieldSize } 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
|
-
import { App, AppContext, Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
8
|
-
import EventEmitter, { EventEmitter
|
|
7
|
+
import { App, AppContext, CSSProperties, Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
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";
|
|
12
|
+
import { HeadlessFieldOptions, TypeMatchValidateContext, TypeMatchValidator } from "@tmagic/form/headless";
|
|
12
13
|
import { FormItemConfig } from "@tmagic/form-schema";
|
|
13
14
|
import { StyleSchema } from "@tmagic/schema";
|
|
14
15
|
export * from "@tmagic/form";
|
|
@@ -16,7 +17,6 @@ export * from "@tmagic/table";
|
|
|
16
17
|
export * from "@tmagic/stage";
|
|
17
18
|
export * from "@tmagic/design";
|
|
18
19
|
export * from "@tmagic/utils";
|
|
19
|
-
|
|
20
20
|
//#region temp/packages/editor/src/services/BaseService.d.ts
|
|
21
21
|
/**
|
|
22
22
|
* 对Class进行扩展
|
|
@@ -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;
|
|
@@ -108,12 +108,7 @@ declare class CodeBlock extends BaseService {
|
|
|
108
108
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
109
109
|
* @returns {void}
|
|
110
110
|
*/
|
|
111
|
-
setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, {
|
|
112
|
-
changeRecords,
|
|
113
|
-
doNotPushHistory,
|
|
114
|
-
historyDescription,
|
|
115
|
-
historySource
|
|
116
|
-
}?: HistoryOpOptionsWithChangeRecords): Promise<void>;
|
|
111
|
+
setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
|
|
117
112
|
/**
|
|
118
113
|
* 为了兼容历史原因
|
|
119
114
|
* 设置代码块ID和代码内容到源dsl
|
|
@@ -126,12 +121,7 @@ declare class CodeBlock extends BaseService {
|
|
|
126
121
|
* @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
|
|
127
122
|
* @returns {void}
|
|
128
123
|
*/
|
|
129
|
-
setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, {
|
|
130
|
-
changeRecords,
|
|
131
|
-
doNotPushHistory,
|
|
132
|
-
historyDescription,
|
|
133
|
-
historySource
|
|
134
|
-
}?: HistoryOpOptionsWithChangeRecords): void;
|
|
124
|
+
setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): void;
|
|
135
125
|
/**
|
|
136
126
|
* 根据代码块id数组获取代码dsl
|
|
137
127
|
* @param {string[]} ids 代码块id数组
|
|
@@ -189,11 +179,7 @@ declare class CodeBlock extends BaseService {
|
|
|
189
179
|
* @param options 可选配置
|
|
190
180
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
191
181
|
*/
|
|
192
|
-
deleteCodeDslByIds(codeIds: Id[], {
|
|
193
|
-
doNotPushHistory,
|
|
194
|
-
historyDescription,
|
|
195
|
-
historySource
|
|
196
|
-
}?: HistoryOpOptions): Promise<void>;
|
|
182
|
+
deleteCodeDslByIds(codeIds: Id[], { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): Promise<void>;
|
|
197
183
|
/**
|
|
198
184
|
* 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
|
|
199
185
|
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
|
|
@@ -302,7 +288,7 @@ declare class CodeBlock extends BaseService {
|
|
|
302
288
|
private applyHistoryStep;
|
|
303
289
|
}
|
|
304
290
|
type CodeBlockService = CodeBlock;
|
|
305
|
-
declare const _default$
|
|
291
|
+
declare const _default$40: CodeBlock;
|
|
306
292
|
//#endregion
|
|
307
293
|
//#region temp/packages/editor/src/services/componentList.d.ts
|
|
308
294
|
declare class ComponentList extends BaseService {
|
|
@@ -317,6 +303,7 @@ declare class ComponentList extends BaseService {
|
|
|
317
303
|
destroy(): void;
|
|
318
304
|
}
|
|
319
305
|
type ComponentListService = ComponentList;
|
|
306
|
+
declare const _default$41: ComponentList;
|
|
320
307
|
//#endregion
|
|
321
308
|
//#region temp/packages/editor/src/services/dataSource.d.ts
|
|
322
309
|
interface State$2 {
|
|
@@ -360,11 +347,7 @@ declare class DataSource extends BaseService {
|
|
|
360
347
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
361
348
|
* @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
|
|
362
349
|
*/
|
|
363
|
-
add(config: DataSourceSchema, {
|
|
364
|
-
doNotPushHistory,
|
|
365
|
-
historyDescription,
|
|
366
|
-
historySource
|
|
367
|
-
}?: HistoryOpOptions): {
|
|
350
|
+
add(config: DataSourceSchema, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): {
|
|
368
351
|
id: string;
|
|
369
352
|
type: string;
|
|
370
353
|
title?: string;
|
|
@@ -383,12 +366,7 @@ declare class DataSource extends BaseService {
|
|
|
383
366
|
* @param data.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
384
367
|
* @param data.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
|
|
385
368
|
*/
|
|
386
|
-
update(config: DataSourceSchema, {
|
|
387
|
-
changeRecords,
|
|
388
|
-
doNotPushHistory,
|
|
389
|
-
historyDescription,
|
|
390
|
-
historySource
|
|
391
|
-
}?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
|
|
369
|
+
update(config: DataSourceSchema, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
|
|
392
370
|
/**
|
|
393
371
|
* 删除数据源
|
|
394
372
|
* @param id 数据源 id
|
|
@@ -396,11 +374,7 @@ declare class DataSource extends BaseService {
|
|
|
396
374
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
397
375
|
* @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
|
|
398
376
|
*/
|
|
399
|
-
remove(id: string, {
|
|
400
|
-
doNotPushHistory,
|
|
401
|
-
historyDescription,
|
|
402
|
-
historySource
|
|
403
|
-
}?: HistoryOpOptions): void;
|
|
377
|
+
remove(id: string, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): void;
|
|
404
378
|
/**
|
|
405
379
|
* 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
|
|
406
380
|
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
|
|
@@ -500,7 +474,10 @@ declare class DataSource extends BaseService {
|
|
|
500
474
|
private applyHistoryStep;
|
|
501
475
|
}
|
|
502
476
|
type DataSourceService = DataSource;
|
|
503
|
-
declare const _default$
|
|
477
|
+
declare const _default$42: DataSource;
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region temp/packages/editor/src/utils/dep/worker.d.ts
|
|
480
|
+
type DepsData = Record<string, Record<Id, DepData>>;
|
|
504
481
|
//#endregion
|
|
505
482
|
//#region temp/packages/editor/src/services/dep.d.ts
|
|
506
483
|
interface DepEvents {
|
|
@@ -517,8 +494,12 @@ type StateKey = keyof State$1;
|
|
|
517
494
|
declare class Dep extends BaseService {
|
|
518
495
|
private state;
|
|
519
496
|
private idleTask;
|
|
497
|
+
private collectWorker;
|
|
520
498
|
private watcher;
|
|
521
499
|
private waitingWorker?;
|
|
500
|
+
private resolveWaitingWorker?;
|
|
501
|
+
private workerGeneration;
|
|
502
|
+
private activeBatches;
|
|
522
503
|
constructor();
|
|
523
504
|
set<K extends StateKey, T extends State$1[K]>(name: K, value: T): void;
|
|
524
505
|
get<K extends StateKey>(name: K): State$1[K];
|
|
@@ -532,8 +513,16 @@ declare class Dep extends BaseService {
|
|
|
532
513
|
removeTarget(id: Id, type?: string): void;
|
|
533
514
|
clearTargets(): void;
|
|
534
515
|
collect(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): void;
|
|
535
|
-
|
|
536
|
-
|
|
516
|
+
/**
|
|
517
|
+
* 空闲收集依赖
|
|
518
|
+
*
|
|
519
|
+
* 遍历匹配是整个收集过程中最耗时的部分(要深度遍历节点树并对每个属性做 target 匹配),
|
|
520
|
+
* 节点/数据源多时在主线程执行会长时间卡死页面,因此优先交给 worker 执行,主线程只负责把结果写回 target。
|
|
521
|
+
* 自定义 target 的 isTarget 是无法跨线程传递的闭包函数(没有 descriptor),仍走主线程空闲队列;
|
|
522
|
+
* worker 不可用(如 SSR)或执行失败时也会回退到主线程空闲队列。
|
|
523
|
+
*/
|
|
524
|
+
collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<boolean>;
|
|
525
|
+
collectByWorker(dsl: MApp): Promise<DepsData>;
|
|
537
526
|
collectNode(node: MNode, target: Target, depExtendedData?: DepExtendedData, deep?: boolean): void;
|
|
538
527
|
clear(nodes?: MNode[]): void;
|
|
539
528
|
clearByType(type: DepTargetType$1, nodes?: MNode[]): void;
|
|
@@ -550,25 +539,55 @@ declare class Dep extends BaseService {
|
|
|
550
539
|
* 按 pageId 匹配,可清掉页面内已被删除节点的残留依赖
|
|
551
540
|
*/
|
|
552
541
|
private removePageDep;
|
|
542
|
+
/**
|
|
543
|
+
* 把遍历匹配交给 worker,结果回来后按 target 分片写回主线程
|
|
544
|
+
*/
|
|
545
|
+
private collectByCollectWorker;
|
|
546
|
+
/**
|
|
547
|
+
* 用 worker 的收集结果替换 target 上这批节点的依赖
|
|
548
|
+
*/
|
|
549
|
+
private enqueueApplyTask;
|
|
550
|
+
private enqueueTasks;
|
|
553
551
|
private enqueueTask;
|
|
552
|
+
private beginBatchTask;
|
|
553
|
+
private onBatchTaskDone;
|
|
554
|
+
private settleBatchDs;
|
|
555
|
+
private finishBatch;
|
|
556
|
+
/**
|
|
557
|
+
* idleTask 被清空时,在途批次的任务不会再执行,必须主动结算,
|
|
558
|
+
* 否则对应的 collectIdle Promise 永远不会 resolve(collecting 卡在 true、once 监听器泄漏)。
|
|
559
|
+
* 收集被中断(通常紧跟一次全量重新收集),因此不再 emit collected/ds-collected,仅结算 Promise。
|
|
560
|
+
*/
|
|
561
|
+
private abortActiveBatches;
|
|
562
|
+
private updateCollectingState;
|
|
554
563
|
}
|
|
555
564
|
type DepService = Dep;
|
|
556
|
-
declare const _default$
|
|
565
|
+
declare const _default$44: Dep;
|
|
557
566
|
//#endregion
|
|
558
567
|
//#region temp/packages/editor/src/services/editor.d.ts
|
|
559
568
|
declare class Editor extends BaseService {
|
|
560
569
|
state: StoreState;
|
|
561
570
|
private selectionBeforeOp;
|
|
571
|
+
/**
|
|
572
|
+
* 操作前的节点校验错误快照,与 selectionBeforeOp 同时在 captureSelectionBeforeOp 中捕获,
|
|
573
|
+
* 供 pushOpHistory 写入 step.extra.invalidNodeIdsBefore,用于撤销时还原到「操作前」的错误状态。
|
|
574
|
+
*/
|
|
575
|
+
private invalidNodeIdsBeforeOp;
|
|
562
576
|
/**
|
|
563
577
|
* 最近一次 pushOpHistory 写入的历史记录 uuid。
|
|
564
578
|
* 供 *AndGetHistoryId 系列方法在调用普通操作后取回本次产生的历史记录 id;
|
|
565
579
|
* 普通操作不会读取它,调用前由 *AndGetHistoryId 重置为 null。
|
|
566
580
|
*/
|
|
567
581
|
private lastPushedHistoryId;
|
|
582
|
+
/**
|
|
583
|
+
* 上一次 doAdd 的插入记忆:nodeId 为插入的节点,selectedId 为当时的选中节点。
|
|
584
|
+
* 仅在选中节点未变化时复用(连续 add / doNotSelect / 批量粘贴),选中变化后自动失效,无需手动清理。
|
|
585
|
+
*/
|
|
586
|
+
private lastAdded;
|
|
568
587
|
constructor();
|
|
569
588
|
/**
|
|
570
589
|
* 设置当前指点节点配置
|
|
571
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
590
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
572
591
|
* @param value MNode
|
|
573
592
|
* @param options.historySource 设置 root 时,本次变更写入历史记录的「操作来源」(仅 name === 'root' 时生效)
|
|
574
593
|
*/
|
|
@@ -577,7 +596,7 @@ declare class Editor extends BaseService {
|
|
|
577
596
|
}): void;
|
|
578
597
|
/**
|
|
579
598
|
* 获取当前指点节点配置
|
|
580
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
599
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
581
600
|
* @returns MNode
|
|
582
601
|
*/
|
|
583
602
|
get<K extends StoreStateKey>(name: K): StoreState[K];
|
|
@@ -633,28 +652,16 @@ declare class Editor extends BaseService {
|
|
|
633
652
|
*/
|
|
634
653
|
multiSelect(ids: Id[]): void;
|
|
635
654
|
selectRoot(): void;
|
|
636
|
-
doAdd(node: MNode, parent: MContainer): Promise<MNode>;
|
|
655
|
+
doAdd(node: MNode, parent: MContainer, _options?: DslOpOptions): Promise<MNode>;
|
|
637
656
|
/**
|
|
638
657
|
* 向指点容器添加组件节点
|
|
639
658
|
* @param addConfig 将要添加的组件节点配置
|
|
640
659
|
* @param parent 要添加到的容器组件节点配置,如果不设置,默认为当前选中的组件的父节点
|
|
641
|
-
* @param options
|
|
642
|
-
* @param options.doNotSelect 添加后是否不更新当前选中节点(默认 false,添加后会选中新增的节点)
|
|
643
|
-
* @param options.doNotSwitchPage 添加后是否不切换当前页面(默认 false;新增页面 / 跨页新增时为 true 会跳过会引发页面切换的选中操作)
|
|
644
|
-
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
660
|
+
* @param options 可选配置,见 {@link DslOpOptions}
|
|
645
661
|
* @returns 添加后的节点
|
|
646
662
|
*/
|
|
647
|
-
add(addNode: AddMNode | MNode[], parent?: MContainer | null,
|
|
648
|
-
|
|
649
|
-
doNotSwitchPage,
|
|
650
|
-
doNotPushHistory,
|
|
651
|
-
historyDescription,
|
|
652
|
-
historySource
|
|
653
|
-
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
654
|
-
doRemove(node: MNode, {
|
|
655
|
-
doNotSelect,
|
|
656
|
-
doNotSwitchPage
|
|
657
|
-
}?: DslOpOptions): Promise<void>;
|
|
663
|
+
add(addNode: AddMNode | MNode[], parent?: MContainer | null, options?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
664
|
+
doRemove(node: MNode, { doNotSelect, doNotSwitchPage }?: DslOpOptions): Promise<void>;
|
|
658
665
|
/**
|
|
659
666
|
* 删除组件
|
|
660
667
|
* @param {Object} node 要删除的节点或节点集合
|
|
@@ -663,20 +670,8 @@ declare class Editor extends BaseService {
|
|
|
663
670
|
* @param options.doNotSwitchPage 删除后是否不切换当前页面(默认 false;删除页面 / 页面片段时为 true 会跳过自动切换到首个剩余页面)
|
|
664
671
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
665
672
|
*/
|
|
666
|
-
remove(nodeOrNodeList: MNode | MNode[],
|
|
667
|
-
|
|
668
|
-
doNotSwitchPage,
|
|
669
|
-
doNotPushHistory,
|
|
670
|
-
historyDescription,
|
|
671
|
-
historySource
|
|
672
|
-
}?: DslOpOptions): Promise<void>;
|
|
673
|
-
doUpdate(config: MNode, {
|
|
674
|
-
changeRecords,
|
|
675
|
-
historySource
|
|
676
|
-
}?: {
|
|
677
|
-
changeRecords?: ChangeRecord[];
|
|
678
|
-
historySource?: HistoryOpSource;
|
|
679
|
-
}): Promise<{
|
|
673
|
+
remove(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<void>;
|
|
674
|
+
doUpdate(config: MNode, data?: UpdateOptions): Promise<{
|
|
680
675
|
newNode: MNode;
|
|
681
676
|
oldNode: MNode;
|
|
682
677
|
changeRecords?: ChangeRecord[];
|
|
@@ -685,20 +680,10 @@ declare class Editor extends BaseService {
|
|
|
685
680
|
* 更新节点
|
|
686
681
|
* update后会触发依赖收集,收集完后会掉stage.update方法
|
|
687
682
|
* @param config 新的节点配置,配置中需要有id信息
|
|
688
|
-
* @param data
|
|
689
|
-
* @param data.changeRecords 单节点 form 端变更记录(多节点场景下被忽略,使用 changeRecordList)
|
|
690
|
-
* @param data.changeRecordList 多节点 form 端变更记录列表,按 config 数组同序对应每个节点;优先级高于 changeRecords
|
|
691
|
-
* @param data.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
692
|
-
* @param data.historyDescription 入栈时附带的人类可读描述,用于历史面板展示(不影响 undo/redo 行为)
|
|
683
|
+
* @param data 额外数据,见 {@link UpdateOptions}
|
|
693
684
|
* @returns 更新后的节点配置
|
|
694
685
|
*/
|
|
695
|
-
update(config: MNode | MNode[], data?:
|
|
696
|
-
changeRecords?: ChangeRecord[];
|
|
697
|
-
changeRecordList?: ChangeRecord[][];
|
|
698
|
-
doNotPushHistory?: boolean;
|
|
699
|
-
historyDescription?: string;
|
|
700
|
-
historySource?: HistoryOpSource;
|
|
701
|
-
}): Promise<MNode | MNode[]>;
|
|
686
|
+
update(config: MNode | MNode[], data?: UpdateOptions): Promise<MNode | MNode[]>;
|
|
702
687
|
/**
|
|
703
688
|
* 将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]
|
|
704
689
|
* @param id1 组件ID
|
|
@@ -709,11 +694,7 @@ declare class Editor extends BaseService {
|
|
|
709
694
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
710
695
|
* @returns void
|
|
711
696
|
*/
|
|
712
|
-
sort(id1: Id, id2: Id, {
|
|
713
|
-
doNotSelect,
|
|
714
|
-
doNotPushHistory,
|
|
715
|
-
historySource
|
|
716
|
-
}?: DslOpOptions): Promise<void>;
|
|
697
|
+
sort(id1: Id, id2: Id, { doNotSelect, doNotPushHistory, historySource }?: DslOpOptions): Promise<void>;
|
|
717
698
|
/**
|
|
718
699
|
* 将组件节点配置存储到localStorage中
|
|
719
700
|
* @param config 组件节点配置
|
|
@@ -736,13 +717,7 @@ declare class Editor extends BaseService {
|
|
|
736
717
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
737
718
|
* @returns 添加后的组件节点配置
|
|
738
719
|
*/
|
|
739
|
-
paste(position?: PastePosition, collectorOptions?: TargetOptions, {
|
|
740
|
-
doNotSelect,
|
|
741
|
-
doNotSwitchPage,
|
|
742
|
-
doNotPushHistory,
|
|
743
|
-
historyDescription,
|
|
744
|
-
historySource
|
|
745
|
-
}?: DslOpOptions): Promise<MNode | MNode[] | void>;
|
|
720
|
+
paste(position?: PastePosition, collectorOptions?: TargetOptions, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[] | void>;
|
|
746
721
|
doPaste(config: MNode[], position?: PastePosition): Promise<MNode[]>;
|
|
747
722
|
doAlignCenter(config: MNode): Promise<MNode>;
|
|
748
723
|
/**
|
|
@@ -754,23 +729,14 @@ declare class Editor extends BaseService {
|
|
|
754
729
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
755
730
|
* @returns 当前组件节点配置
|
|
756
731
|
*/
|
|
757
|
-
alignCenter(config: MNode | MNode[], {
|
|
758
|
-
doNotSelect,
|
|
759
|
-
doNotPushHistory,
|
|
760
|
-
historyDescription,
|
|
761
|
-
historySource
|
|
762
|
-
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
732
|
+
alignCenter(config: MNode | MNode[], { doNotSelect, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
763
733
|
/**
|
|
764
734
|
* 移动当前选中节点位置
|
|
765
735
|
* @param offset 偏移量
|
|
766
736
|
* @param options 可选配置
|
|
767
737
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
768
738
|
*/
|
|
769
|
-
moveLayer(offset: number | LayerOffset, {
|
|
770
|
-
doNotPushHistory,
|
|
771
|
-
historyDescription,
|
|
772
|
-
historySource
|
|
773
|
-
}?: DslOpOptions): Promise<void>;
|
|
739
|
+
moveLayer(offset: number | LayerOffset, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
|
|
774
740
|
/**
|
|
775
741
|
* 移动一个或多个节点到指定容器中。
|
|
776
742
|
*
|
|
@@ -785,18 +751,8 @@ declare class Editor extends BaseService {
|
|
|
785
751
|
* @param options.doNotSwitchPage 移动后是否不切换当前页面(默认 false;目标容器位于其它页面时为 true 会跳过自动选中以避免页面切换)
|
|
786
752
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
787
753
|
*/
|
|
788
|
-
moveToContainer(config: MNode | MNode[], targetId: Id, {
|
|
789
|
-
|
|
790
|
-
doNotSwitchPage,
|
|
791
|
-
doNotPushHistory,
|
|
792
|
-
historyDescription,
|
|
793
|
-
historySource
|
|
794
|
-
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
795
|
-
dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, {
|
|
796
|
-
doNotPushHistory,
|
|
797
|
-
historyDescription,
|
|
798
|
-
historySource
|
|
799
|
-
}?: DslOpOptions): Promise<void>;
|
|
754
|
+
moveToContainer(config: MNode | MNode[], targetId: Id, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
755
|
+
dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
|
|
800
756
|
/**
|
|
801
757
|
* 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
|
|
802
758
|
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
|
|
@@ -809,13 +765,7 @@ declare class Editor extends BaseService {
|
|
|
809
765
|
/** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
810
766
|
removeAndGetHistoryId(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
811
767
|
/** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
812
|
-
updateAndGetHistoryId(config: MNode | MNode[], data?:
|
|
813
|
-
changeRecords?: ChangeRecord[];
|
|
814
|
-
changeRecordList?: ChangeRecord[][];
|
|
815
|
-
doNotPushHistory?: boolean;
|
|
816
|
-
historyDescription?: string;
|
|
817
|
-
historySource?: HistoryOpSource;
|
|
818
|
-
}): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
768
|
+
updateAndGetHistoryId(config: MNode | MNode[], data?: UpdateOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
819
769
|
/** 等价于 {@link moveLayer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
820
770
|
moveLayerAndGetHistoryId(offset: number | LayerOffset, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
821
771
|
/** 等价于 {@link moveToContainer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
@@ -867,19 +817,52 @@ declare class Editor extends BaseService {
|
|
|
867
817
|
* @returns 实际移动到的最终游标位置
|
|
868
818
|
*/
|
|
869
819
|
gotoPageStep(targetCursor: number): Promise<number>;
|
|
870
|
-
move(left: number, top: number, {
|
|
871
|
-
doNotPushHistory,
|
|
872
|
-
historyDescription,
|
|
873
|
-
historySource
|
|
874
|
-
}?: DslOpOptions): Promise<void>;
|
|
820
|
+
move(left: number, top: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
|
|
875
821
|
resetState(): void;
|
|
876
822
|
destroy(): void;
|
|
877
823
|
resetModifiedNodeId(): void;
|
|
824
|
+
/**
|
|
825
|
+
* 记录(或覆盖)某个节点在指定来源(属性表单 / 样式表单)上的校验错误信息。
|
|
826
|
+
* @param id 节点 id
|
|
827
|
+
* @param source 错误来源:'props'(属性表单)| 'style'(样式表单)
|
|
828
|
+
* @param message 错误文案(可能是包含 <br> 的 HTML)
|
|
829
|
+
*/
|
|
830
|
+
setInvalidNode(id: Id, source: NodeInvalidSource, message: string): void;
|
|
831
|
+
/**
|
|
832
|
+
* 删除节点的校验错误记录。
|
|
833
|
+
* @param id 节点 id
|
|
834
|
+
* @param source 指定来源则仅删除该来源;不传则删除该节点全部来源的错误
|
|
835
|
+
*/
|
|
836
|
+
deleteInvalidNode(id: Id, source?: NodeInvalidSource): void;
|
|
837
|
+
/** 获取当前存在校验错误的节点错误 Map(key 为节点 id) */
|
|
838
|
+
getInvalidNodeIds(): Map<Id, NodeInvalidInfo>;
|
|
839
|
+
/** 获取指定节点的校验错误信息 */
|
|
840
|
+
getInvalidNodeInfo(id: Id): NodeInvalidInfo | undefined;
|
|
841
|
+
/** 清空全部校验错误记录 */
|
|
842
|
+
resetInvalidNodeId(): void;
|
|
878
843
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName, Editor>): void;
|
|
879
844
|
on<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
880
845
|
once<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
881
846
|
emit<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
847
|
+
/**
|
|
848
|
+
* 应用一次属性面板提交携带的校验错误信息(在写入历史记录之前调用,使历史快照与本次变更对齐)。
|
|
849
|
+
* - invalidInfo 为空(调用方未携带):认为本次更新对应的节点已无校验错误,清除其全部来源的错误;
|
|
850
|
+
* - error 非空则记录错误,为空则清除对应来源的错误。
|
|
851
|
+
*/
|
|
852
|
+
private applyInvalidInfo;
|
|
853
|
+
/** 删除被移除节点(含其子树)的校验错误记录,避免残留误报 */
|
|
854
|
+
private removeInvalidNodesBySubtree;
|
|
855
|
+
/** 清理不在当前 DSL 中的失效节点错误记录(用于整体替换 root 后) */
|
|
856
|
+
private pruneInvalidNodeIds;
|
|
882
857
|
private addModifiedNodeId;
|
|
858
|
+
/**
|
|
859
|
+
* 获取指定节点所属的页面 / 页面片:
|
|
860
|
+
* - 普通节点返回其所在的 page;
|
|
861
|
+
* - 节点本身就是 page / pageFragment 时返回它自己;
|
|
862
|
+
* - 找不到时返回 null。
|
|
863
|
+
* 供 `change` 事件携带「变更节点对应的 page」(而非编辑器当前选中页)。
|
|
864
|
+
*/
|
|
865
|
+
private getPageOfNode;
|
|
883
866
|
private captureSelectionBeforeOp;
|
|
884
867
|
/**
|
|
885
868
|
* 比较「上一次 root」与「新 root」的页面 / 页面片,按页面粒度把整体替换拆成历史记录:
|
|
@@ -903,10 +886,12 @@ declare class Editor extends BaseService {
|
|
|
903
886
|
/**
|
|
904
887
|
* 应用历史操作(撤销 / 重做)
|
|
905
888
|
*
|
|
906
|
-
*
|
|
907
|
-
* `doNotSelect / doNotSwitchPage`
|
|
889
|
+
* 删除 / 更新类修改走 `editor.remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
|
|
890
|
+
* `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底;
|
|
891
|
+
* 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
|
|
892
|
+
* 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
|
|
908
893
|
*
|
|
909
|
-
*
|
|
894
|
+
* 注意:这些路径都会发出 add / remove / update / change 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
|
|
910
895
|
* 请监听 `history-change` 事件配合判断。
|
|
911
896
|
*
|
|
912
897
|
* @param step 操作记录
|
|
@@ -914,9 +899,14 @@ declare class Editor extends BaseService {
|
|
|
914
899
|
*/
|
|
915
900
|
private applyHistoryOp;
|
|
916
901
|
private selectedConfigExceptionHandler;
|
|
902
|
+
/**
|
|
903
|
+
* 撤销 remove / 重做 add 通过手工 splice 按 step 记录的 parentId / index 精确还原节点(不走 this.add,原因见调用处注释),
|
|
904
|
+
* 这里补齐与 this.add 等价的 add / change 事件,保证撤销/重做路径的事件行为与正向操作一致。
|
|
905
|
+
*/
|
|
906
|
+
private emitHistoryInsertEvents;
|
|
917
907
|
}
|
|
918
908
|
type EditorService = Editor;
|
|
919
|
-
declare const _default$
|
|
909
|
+
declare const _default$45: Editor;
|
|
920
910
|
//#endregion
|
|
921
911
|
//#region temp/packages/editor/src/services/events.d.ts
|
|
922
912
|
declare const canUsePluginMethods$6: {
|
|
@@ -929,22 +919,27 @@ declare class Events extends BaseService {
|
|
|
929
919
|
constructor();
|
|
930
920
|
setEvents(events: Record<string, EventOption[]>): void;
|
|
931
921
|
setEvent(type: string, events: EventOption[]): void;
|
|
932
|
-
getEvent(type: string
|
|
922
|
+
getEvent(type: string, _data?: {
|
|
923
|
+
node?: MNode | null;
|
|
924
|
+
}): EventOption[];
|
|
933
925
|
setMethods(methods: Record<string, EventOption[]>): void;
|
|
934
926
|
setMethod(type: string, method: EventOption[]): void;
|
|
935
|
-
getMethod(type: string,
|
|
927
|
+
getMethod(type: string, _data?: {
|
|
928
|
+
node?: MNode | null;
|
|
929
|
+
targetId?: Id;
|
|
930
|
+
}): EventOption[];
|
|
936
931
|
resetState(): void;
|
|
937
932
|
destroy(): void;
|
|
938
933
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$4, Events>): void;
|
|
939
934
|
}
|
|
940
935
|
type EventsService = Events;
|
|
941
|
-
declare const _default$
|
|
936
|
+
declare const _default$46: Events;
|
|
942
937
|
//#endregion
|
|
943
938
|
//#region temp/packages/editor/src/utils/undo-redo.d.ts
|
|
944
939
|
/**
|
|
945
940
|
* UndoRedo 栈的可序列化快照,用于持久化(如写入 IndexedDB)后再还原。
|
|
946
941
|
*/
|
|
947
|
-
interface SerializedUndoRedo<T = any> {
|
|
942
|
+
export interface SerializedUndoRedo<T = any> {
|
|
948
943
|
/** 栈内全部元素(按时间正序,索引 0 为最早一步)。 */
|
|
949
944
|
elementList: T[];
|
|
950
945
|
/** 游标位置(已应用步骤数量)。 */
|
|
@@ -952,7 +947,7 @@ interface SerializedUndoRedo<T = any> {
|
|
|
952
947
|
/** 栈容量上限。 */
|
|
953
948
|
listMaxSize: number;
|
|
954
949
|
}
|
|
955
|
-
declare class UndoRedo<T = any> {
|
|
950
|
+
export declare class UndoRedo<T = any> {
|
|
956
951
|
/**
|
|
957
952
|
* 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
|
|
958
953
|
* 游标会被夹紧到 [0, length] 区间,避免脏数据导致越界。
|
|
@@ -1155,6 +1150,22 @@ declare class History extends BaseService {
|
|
|
1155
1150
|
* @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
|
|
1156
1151
|
*/
|
|
1157
1152
|
markSaved(stepType: HistoryStepType, id?: Id): void;
|
|
1153
|
+
/**
|
|
1154
|
+
* 派发「页面 / 页面片结构变更」事件(`page-structure-change`)。
|
|
1155
|
+
*
|
|
1156
|
+
* 常规 `editorService.add` / `remove` 页面节点不会写入 `page` 历史栈(见 editor.add / remove 中
|
|
1157
|
+
* 对 isPageOrFragment 的分支),因此不会产生任何 historyService 事件。该方法用于在这些
|
|
1158
|
+
* 场景(以及 setRoot 整体替换 DSL 增删页面)下,向外统一通知页面结构的增删变化,供业务方感知。
|
|
1159
|
+
*
|
|
1160
|
+
* 一次操作涉及多个页面时,调用方应把本次增删的页面**合并为一个 change 一次性传入**,
|
|
1161
|
+
* 使一次操作只派发一个事件;`add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
|
|
1162
|
+
*
|
|
1163
|
+
* @param change 本次结构变更:{ add: 新增的页面列表, remove: 删除的页面列表 }
|
|
1164
|
+
*/
|
|
1165
|
+
notifyPageStructureChange(change: {
|
|
1166
|
+
add: (MPage | MPageFragment)[];
|
|
1167
|
+
remove: (MPage | MPageFragment)[];
|
|
1168
|
+
}): void;
|
|
1158
1169
|
/**
|
|
1159
1170
|
* 把当前内存中的全部历史栈(页面 / 代码块 / 数据源 / 扩展类型)序列化后写入本地 IndexedDB。
|
|
1160
1171
|
*
|
|
@@ -1254,7 +1265,7 @@ declare class History extends BaseService {
|
|
|
1254
1265
|
private resolveDbName;
|
|
1255
1266
|
}
|
|
1256
1267
|
type HistoryService = History;
|
|
1257
|
-
declare const _default$
|
|
1268
|
+
declare const _default$47: History;
|
|
1258
1269
|
//#endregion
|
|
1259
1270
|
//#region temp/packages/editor/src/services/keybinding.d.ts
|
|
1260
1271
|
declare class Keybinding extends BaseService {
|
|
@@ -1293,6 +1304,7 @@ declare class Keybinding extends BaseService {
|
|
|
1293
1304
|
private getKeyconKeys;
|
|
1294
1305
|
}
|
|
1295
1306
|
type KeybindingService = Keybinding;
|
|
1307
|
+
declare const _default$48: Keybinding;
|
|
1296
1308
|
//#endregion
|
|
1297
1309
|
//#region temp/packages/editor/src/services/props.d.ts
|
|
1298
1310
|
declare const canUsePluginMethods$4: {
|
|
@@ -1334,10 +1346,7 @@ declare class Props extends BaseService {
|
|
|
1334
1346
|
* @param type 组件类型
|
|
1335
1347
|
* @returns 组件初始值
|
|
1336
1348
|
*/
|
|
1337
|
-
getPropsValue(componentType: string, {
|
|
1338
|
-
inputEvent,
|
|
1339
|
-
...defaultValue
|
|
1340
|
-
}?: Record<string, any>): Promise<any>;
|
|
1349
|
+
getPropsValue(componentType: string, { inputEvent, ...defaultValue }?: Record<string, any>): Promise<any>;
|
|
1341
1350
|
hasPropsValue(type: string): boolean;
|
|
1342
1351
|
createId(type: string | number): string;
|
|
1343
1352
|
/**
|
|
@@ -1392,7 +1401,7 @@ declare class Props extends BaseService {
|
|
|
1392
1401
|
private setRelateId;
|
|
1393
1402
|
}
|
|
1394
1403
|
type PropsService = Props;
|
|
1395
|
-
declare const _default$
|
|
1404
|
+
declare const _default$50: Props;
|
|
1396
1405
|
//#endregion
|
|
1397
1406
|
//#region temp/packages/editor/src/services/stageOverlay.d.ts
|
|
1398
1407
|
declare const canUsePluginMethods$3: {
|
|
@@ -1419,7 +1428,7 @@ declare class StageOverlay extends BaseService {
|
|
|
1419
1428
|
private updateSelectStatus;
|
|
1420
1429
|
}
|
|
1421
1430
|
type StageOverlayService = StageOverlay;
|
|
1422
|
-
declare const _default$
|
|
1431
|
+
declare const _default$51: StageOverlay;
|
|
1423
1432
|
//#endregion
|
|
1424
1433
|
//#region temp/packages/editor/src/services/storage.d.ts
|
|
1425
1434
|
interface Options$1 {
|
|
@@ -1482,7 +1491,7 @@ declare class WebStorage extends BaseService {
|
|
|
1482
1491
|
private getValueAndProtocol;
|
|
1483
1492
|
}
|
|
1484
1493
|
type StorageService = WebStorage;
|
|
1485
|
-
declare const _default$
|
|
1494
|
+
declare const _default$52: WebStorage;
|
|
1486
1495
|
//#endregion
|
|
1487
1496
|
//#region temp/packages/editor/src/services/ui.d.ts
|
|
1488
1497
|
declare const canUsePluginMethods$1: {
|
|
@@ -1502,10 +1511,10 @@ declare class Ui extends BaseService {
|
|
|
1502
1511
|
private setStageRect;
|
|
1503
1512
|
}
|
|
1504
1513
|
type UiService = Ui;
|
|
1505
|
-
declare const _default$
|
|
1514
|
+
declare const _default$53: Ui;
|
|
1506
1515
|
//#endregion
|
|
1507
1516
|
//#region temp/packages/editor/src/type.d.ts
|
|
1508
|
-
type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
|
|
1517
|
+
export type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
|
|
1509
1518
|
workspace(props: {
|
|
1510
1519
|
editorService: EditorService;
|
|
1511
1520
|
}): any;
|
|
@@ -1513,7 +1522,7 @@ type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSl
|
|
|
1513
1522
|
editorService: EditorService;
|
|
1514
1523
|
}): any;
|
|
1515
1524
|
};
|
|
1516
|
-
interface FrameworkSlots {
|
|
1525
|
+
export interface FrameworkSlots {
|
|
1517
1526
|
header(props: {}): any;
|
|
1518
1527
|
nav(props: {}): any;
|
|
1519
1528
|
'content-before'(props: {}): any;
|
|
@@ -1523,7 +1532,7 @@ interface FrameworkSlots {
|
|
|
1523
1532
|
empty(props: {}): any;
|
|
1524
1533
|
workspace(props: {}): any;
|
|
1525
1534
|
'props-panel'(props: {}): any;
|
|
1526
|
-
|
|
1535
|
+
footer(props: {}): any;
|
|
1527
1536
|
'page-bar'(props: {}): any;
|
|
1528
1537
|
'page-bar-add-button'(props: {}): any;
|
|
1529
1538
|
'page-bar-title'(props: {
|
|
@@ -1536,19 +1545,19 @@ interface FrameworkSlots {
|
|
|
1536
1545
|
list: (MPage | MPageFragment)[];
|
|
1537
1546
|
}): any;
|
|
1538
1547
|
}
|
|
1539
|
-
interface ScrollViewerSlots {
|
|
1548
|
+
export interface ScrollViewerSlots {
|
|
1540
1549
|
before(props: {}): any;
|
|
1541
1550
|
content(props: {}): any;
|
|
1542
1551
|
default(props: {}): any;
|
|
1543
1552
|
}
|
|
1544
|
-
interface StageSlots extends ScrollViewerSlots {
|
|
1553
|
+
export interface StageSlots extends ScrollViewerSlots {
|
|
1545
1554
|
'stage-top'(props: {}): any;
|
|
1546
1555
|
}
|
|
1547
|
-
interface WorkspaceSlots extends StageSlots {
|
|
1556
|
+
export interface WorkspaceSlots extends StageSlots {
|
|
1548
1557
|
stage(props: {}): any;
|
|
1549
1558
|
'workspace-content'(props: {}): any;
|
|
1550
1559
|
}
|
|
1551
|
-
interface ComponentListPanelSlots {
|
|
1560
|
+
export interface ComponentListPanelSlots {
|
|
1552
1561
|
'component-list-panel-header'(props: {}): any;
|
|
1553
1562
|
'component-list'(props: {
|
|
1554
1563
|
componentGroupList: ComponentGroup[];
|
|
@@ -1557,23 +1566,23 @@ interface ComponentListPanelSlots {
|
|
|
1557
1566
|
component: ComponentItem;
|
|
1558
1567
|
}): any;
|
|
1559
1568
|
}
|
|
1560
|
-
interface CodeBlockListPanelSlots extends CodeBlockListSlots {
|
|
1569
|
+
export interface CodeBlockListPanelSlots extends CodeBlockListSlots {
|
|
1561
1570
|
'code-block-panel-search'(props: {}): any;
|
|
1562
1571
|
'code-block-panel-header'(props: {}): any;
|
|
1563
1572
|
}
|
|
1564
|
-
interface CodeBlockListSlots {
|
|
1573
|
+
export interface CodeBlockListSlots {
|
|
1565
1574
|
'code-block-panel-tool'(props: {
|
|
1566
1575
|
id: Id;
|
|
1567
1576
|
data: any;
|
|
1568
1577
|
}): any;
|
|
1569
1578
|
}
|
|
1570
|
-
interface DataSourceListSlots {
|
|
1579
|
+
export interface DataSourceListSlots {
|
|
1571
1580
|
'data-source-panel-tool'(props: {
|
|
1572
1581
|
data: any;
|
|
1573
1582
|
}): any;
|
|
1574
1583
|
'data-source-panel-search'(props: {}): any;
|
|
1575
1584
|
}
|
|
1576
|
-
interface LayerNodeSlots {
|
|
1585
|
+
export interface LayerNodeSlots {
|
|
1577
1586
|
'layer-node-content'(props: {
|
|
1578
1587
|
data: MNode;
|
|
1579
1588
|
}): any;
|
|
@@ -1584,16 +1593,17 @@ interface LayerNodeSlots {
|
|
|
1584
1593
|
data: MNode;
|
|
1585
1594
|
}): any;
|
|
1586
1595
|
}
|
|
1587
|
-
interface LayerPanelSlots extends LayerNodeSlots {
|
|
1596
|
+
export interface LayerPanelSlots extends LayerNodeSlots {
|
|
1588
1597
|
'layer-panel-header'(props: {}): any;
|
|
1589
1598
|
}
|
|
1590
|
-
interface PropsPanelSlots {
|
|
1599
|
+
export interface PropsPanelSlots {
|
|
1591
1600
|
'props-panel-header'(props: {}): any;
|
|
1592
1601
|
}
|
|
1593
|
-
type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPanelSlots & DataSourceListSlots;
|
|
1594
|
-
type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
|
|
1595
|
-
type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
|
|
1596
|
-
interface EditorInstallOptions {
|
|
1602
|
+
export type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPanelSlots & DataSourceListSlots;
|
|
1603
|
+
export type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
|
|
1604
|
+
export type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
|
|
1605
|
+
export interface EditorInstallOptions {
|
|
1606
|
+
flat?: boolean;
|
|
1597
1607
|
parseDSL: <T = any>(dsl: string) => T;
|
|
1598
1608
|
customCreateMonacoEditor: (monaco: typeof import('monaco-editor'), codeEditorEl: HTMLElement, options: Monaco.editor.IStandaloneEditorConstructionOptions & {
|
|
1599
1609
|
editorCustomType?: string;
|
|
@@ -1603,7 +1613,7 @@ interface EditorInstallOptions {
|
|
|
1603
1613
|
}) => Promise<Monaco.editor.IStandaloneDiffEditor> | Monaco.editor.IStandaloneDiffEditor;
|
|
1604
1614
|
[key: string]: any;
|
|
1605
1615
|
}
|
|
1606
|
-
interface Services {
|
|
1616
|
+
export interface Services {
|
|
1607
1617
|
editorService: EditorService;
|
|
1608
1618
|
historyService: HistoryService;
|
|
1609
1619
|
storageService: StorageService;
|
|
@@ -1617,12 +1627,25 @@ interface Services {
|
|
|
1617
1627
|
keybindingService: KeybindingService;
|
|
1618
1628
|
stageOverlayService: StageOverlayService;
|
|
1619
1629
|
}
|
|
1620
|
-
|
|
1630
|
+
declare module '@tmagic/form-schema' {
|
|
1631
|
+
interface FormContext {
|
|
1632
|
+
/** 编辑器服务集合(由 Editor / FormPanel provide) */
|
|
1633
|
+
services?: Services;
|
|
1634
|
+
/** 当前画布 Stage 实例(由 Editor / FormPanel provide) */
|
|
1635
|
+
stage?: any;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
export interface StageOptions {
|
|
1621
1639
|
runtimeUrl?: string;
|
|
1622
1640
|
autoScrollIntoView?: boolean;
|
|
1623
1641
|
containerHighlightClassName?: string;
|
|
1624
1642
|
containerHighlightDuration?: number;
|
|
1625
1643
|
containerHighlightType?: ContainerHighlightType;
|
|
1644
|
+
/**
|
|
1645
|
+
* 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
|
|
1646
|
+
* 开启后在画布中拖动已有组件不会识别容器,默认 false
|
|
1647
|
+
*/
|
|
1648
|
+
containerHighlightAddOnly?: boolean;
|
|
1626
1649
|
disabledDragStart?: boolean;
|
|
1627
1650
|
render?: (stage: StageCore$1) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
1628
1651
|
moveableOptions?: CustomizeMoveableOptions;
|
|
@@ -1655,7 +1678,21 @@ interface StageOptions {
|
|
|
1655
1678
|
/** 画布双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
1656
1679
|
beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
|
|
1657
1680
|
}
|
|
1658
|
-
|
|
1681
|
+
/**
|
|
1682
|
+
* 节点校验错误信息,按来源(属性表单 / 样式表单)分别保存错误文案。
|
|
1683
|
+
* 属性表单与样式表单是两个独立的 FormPanel,均指向同一节点,故以来源为键,
|
|
1684
|
+
* 避免某个面板校验通过时误清另一个面板记录的错误。
|
|
1685
|
+
* 节点视为存在错误当且仅当任一来源存在非空文本。
|
|
1686
|
+
*/
|
|
1687
|
+
export interface NodeInvalidInfo {
|
|
1688
|
+
/** 属性表单校验错误文案(可能为包含 <br> 的 HTML) */
|
|
1689
|
+
props?: string;
|
|
1690
|
+
/** 样式表单校验错误文案(可能为包含 <br> 的 HTML) */
|
|
1691
|
+
style?: string;
|
|
1692
|
+
}
|
|
1693
|
+
/** 节点校验错误来源 */
|
|
1694
|
+
export type NodeInvalidSource = keyof NodeInvalidInfo;
|
|
1695
|
+
export interface StoreState {
|
|
1659
1696
|
root: MApp | null;
|
|
1660
1697
|
page: MPage | MPageFragment | null;
|
|
1661
1698
|
parent: MContainer | null;
|
|
@@ -1665,14 +1702,16 @@ interface StoreState {
|
|
|
1665
1702
|
stage: StageCore$1 | null;
|
|
1666
1703
|
stageLoading: boolean;
|
|
1667
1704
|
modifiedNodeIds: Map<Id, Id>;
|
|
1705
|
+
/** 校验失败的节点错误信息,按节点 id 存储,供组件树标记与保存拦截读取 */
|
|
1706
|
+
invalidNodeIds: Map<Id, NodeInvalidInfo>;
|
|
1668
1707
|
pageLength: number;
|
|
1669
1708
|
pageFragmentLength: number;
|
|
1670
1709
|
disabledMultiSelect: boolean;
|
|
1671
1710
|
/** 是否始终启用多选模式(无需按住 Ctrl/Meta) */
|
|
1672
1711
|
alwaysMultiSelect: boolean;
|
|
1673
1712
|
}
|
|
1674
|
-
type StoreStateKey = keyof StoreState;
|
|
1675
|
-
interface PropsState {
|
|
1713
|
+
export type StoreStateKey = keyof StoreState;
|
|
1714
|
+
export interface PropsState {
|
|
1676
1715
|
propsConfigMap: Record<string, FormConfig>;
|
|
1677
1716
|
propsValueMap: Record<string, Partial<MNode>>;
|
|
1678
1717
|
relateIdMap: Record<Id, Id>;
|
|
@@ -1681,7 +1720,7 @@ interface PropsState {
|
|
|
1681
1720
|
/** 禁用代码块 */
|
|
1682
1721
|
disabledCodeBlock: boolean;
|
|
1683
1722
|
}
|
|
1684
|
-
interface StageOverlayState {
|
|
1723
|
+
export interface StageOverlayState {
|
|
1685
1724
|
wrapDiv: HTMLDivElement;
|
|
1686
1725
|
sourceEl: HTMLElement | null;
|
|
1687
1726
|
contentEl: HTMLElement | null;
|
|
@@ -1691,29 +1730,29 @@ interface StageOverlayState {
|
|
|
1691
1730
|
wrapHeight: number;
|
|
1692
1731
|
stageOverlayVisible: boolean;
|
|
1693
1732
|
}
|
|
1694
|
-
interface ComponentGroupState {
|
|
1733
|
+
export interface ComponentGroupState {
|
|
1695
1734
|
list: ComponentGroup[];
|
|
1696
1735
|
}
|
|
1697
|
-
declare enum ColumnLayout {
|
|
1736
|
+
export declare enum ColumnLayout {
|
|
1698
1737
|
LEFT = "left",
|
|
1699
1738
|
CENTER = "center",
|
|
1700
1739
|
RIGHT = "right"
|
|
1701
1740
|
}
|
|
1702
|
-
interface SetColumnWidth {
|
|
1741
|
+
export interface SetColumnWidth {
|
|
1703
1742
|
[ColumnLayout.LEFT]?: number;
|
|
1704
1743
|
[ColumnLayout.CENTER]?: number | 'auto';
|
|
1705
1744
|
[ColumnLayout.RIGHT]?: number;
|
|
1706
1745
|
}
|
|
1707
|
-
interface GetColumnWidth {
|
|
1746
|
+
export interface GetColumnWidth {
|
|
1708
1747
|
[ColumnLayout.LEFT]: number;
|
|
1709
1748
|
[ColumnLayout.CENTER]: number;
|
|
1710
1749
|
[ColumnLayout.RIGHT]: number;
|
|
1711
1750
|
}
|
|
1712
|
-
interface StageRect {
|
|
1751
|
+
export interface StageRect {
|
|
1713
1752
|
width: number | string;
|
|
1714
1753
|
height: number | string;
|
|
1715
1754
|
}
|
|
1716
|
-
interface UiState {
|
|
1755
|
+
export interface UiState {
|
|
1717
1756
|
/** 当前点击画布是否触发选中,true: 不触发,false: 触发,默认为false */
|
|
1718
1757
|
uiSelectMode: boolean;
|
|
1719
1758
|
/** 是否显示整个配置源码, true: 显示, false: 不显示,默认为false */
|
|
@@ -1731,6 +1770,12 @@ interface UiState {
|
|
|
1731
1770
|
stageRect: StageRect;
|
|
1732
1771
|
/** 编辑器列布局每一列的宽度,分为左中右三列 */
|
|
1733
1772
|
columnWidth: GetColumnWidth;
|
|
1773
|
+
/** 编辑器列布局左侧列最小宽度 */
|
|
1774
|
+
minLeftColumnWidth: number;
|
|
1775
|
+
/** 编辑器列布局中间列最小宽度 */
|
|
1776
|
+
minCenterColumnWidth: number;
|
|
1777
|
+
/** 编辑器列布局右侧列最小宽度 */
|
|
1778
|
+
minRightColumnWidth: number;
|
|
1734
1779
|
/** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
|
|
1735
1780
|
showGuides: boolean;
|
|
1736
1781
|
/** 画布上是否存在参考线 */
|
|
@@ -1762,19 +1807,19 @@ interface UiState {
|
|
|
1762
1807
|
height: number;
|
|
1763
1808
|
};
|
|
1764
1809
|
}
|
|
1765
|
-
interface EditorNodeInfo {
|
|
1810
|
+
export interface EditorNodeInfo {
|
|
1766
1811
|
node: MNode | null;
|
|
1767
1812
|
parent: MContainer | null;
|
|
1768
1813
|
page: MPage | MPageFragment | null;
|
|
1769
1814
|
path: MNode[];
|
|
1770
1815
|
}
|
|
1771
|
-
interface AddMNode {
|
|
1816
|
+
export interface AddMNode {
|
|
1772
1817
|
type: string;
|
|
1773
1818
|
name?: string;
|
|
1774
1819
|
inputEvent?: DragEvent;
|
|
1775
1820
|
[key: string]: any;
|
|
1776
1821
|
}
|
|
1777
|
-
interface PastePosition {
|
|
1822
|
+
export interface PastePosition {
|
|
1778
1823
|
left?: number;
|
|
1779
1824
|
top?: number;
|
|
1780
1825
|
/**
|
|
@@ -1789,7 +1834,7 @@ interface PastePosition {
|
|
|
1789
1834
|
/**
|
|
1790
1835
|
* 菜单按钮
|
|
1791
1836
|
*/
|
|
1792
|
-
interface MenuButton {
|
|
1837
|
+
export interface MenuButton {
|
|
1793
1838
|
/**
|
|
1794
1839
|
* 按钮类型
|
|
1795
1840
|
* button: 只有文字不带边框的按钮
|
|
@@ -1821,7 +1866,7 @@ interface MenuButton {
|
|
|
1821
1866
|
type?: string;
|
|
1822
1867
|
};
|
|
1823
1868
|
}
|
|
1824
|
-
interface MenuComponent {
|
|
1869
|
+
export interface MenuComponent {
|
|
1825
1870
|
type: 'component';
|
|
1826
1871
|
/** Vue3组件 */
|
|
1827
1872
|
component: any;
|
|
@@ -1849,9 +1894,9 @@ interface MenuComponent {
|
|
|
1849
1894
|
* 'scale-to-fit': 缩放以适应
|
|
1850
1895
|
* 'history-list': 历史记录面板(按 页面 / 数据源 / 代码块 三个 tab 展示,相邻同目标修改自动合并)
|
|
1851
1896
|
*/
|
|
1852
|
-
type MenuItem = '/' | 'delete' | 'undo' | 'redo' | 'zoom' | 'zoom-in' | 'zoom-out' | 'guides' | 'rule' | 'scale-to-original' | 'scale-to-fit' | 'history-list' | MenuButton | MenuComponent | string;
|
|
1897
|
+
export type MenuItem = '/' | 'delete' | 'undo' | 'redo' | 'zoom' | 'zoom-in' | 'zoom-out' | 'guides' | 'rule' | 'scale-to-original' | 'scale-to-fit' | 'history-list' | MenuButton | MenuComponent | string;
|
|
1853
1898
|
/** 工具栏 */
|
|
1854
|
-
interface MenuBarData {
|
|
1899
|
+
export interface MenuBarData {
|
|
1855
1900
|
/** 顶部工具栏左边项 */
|
|
1856
1901
|
[ColumnLayout.LEFT]?: MenuItem[];
|
|
1857
1902
|
/** 顶部工具栏中间项 */
|
|
@@ -1859,7 +1904,7 @@ interface MenuBarData {
|
|
|
1859
1904
|
/** 顶部工具栏右边项 */
|
|
1860
1905
|
[ColumnLayout.RIGHT]?: MenuItem[];
|
|
1861
1906
|
}
|
|
1862
|
-
interface SideComponent extends MenuComponent {
|
|
1907
|
+
export interface SideComponent extends MenuComponent {
|
|
1863
1908
|
/** 显示文案 */
|
|
1864
1909
|
text: string;
|
|
1865
1910
|
/** tab样式 */
|
|
@@ -1874,7 +1919,9 @@ interface SideComponent extends MenuComponent {
|
|
|
1874
1919
|
beforeClick?: (config: SideComponent) => boolean | Promise<boolean>;
|
|
1875
1920
|
/** 组件扩展参数 */
|
|
1876
1921
|
boxComponentConfig?: {
|
|
1877
|
-
/** Vue3组件 */
|
|
1922
|
+
/** Vue3组件 */
|
|
1923
|
+
component?: any;
|
|
1924
|
+
/** 传入组件的props对象 */
|
|
1878
1925
|
props?: Record<string, any>;
|
|
1879
1926
|
};
|
|
1880
1927
|
}
|
|
@@ -1886,7 +1933,7 @@ interface SideComponent extends MenuComponent {
|
|
|
1886
1933
|
* 独立的 tab 来展示与回滚。内置的「页面 / 数据源 / 代码块」三个 tab 之后
|
|
1887
1934
|
* 会依次追加这些扩展 tab。
|
|
1888
1935
|
*/
|
|
1889
|
-
interface HistoryListExtraTab {
|
|
1936
|
+
export interface HistoryListExtraTab {
|
|
1890
1937
|
/** tab 唯一标识,作为 TMagicTabs 的 name */
|
|
1891
1938
|
name: string;
|
|
1892
1939
|
/** tab 显示文案,支持传入函数以展示动态内容(如记录数量) */
|
|
@@ -1904,12 +1951,12 @@ interface HistoryListExtraTab {
|
|
|
1904
1951
|
* - data-source: 数据源,按 `type`(base/http/...) 从 dataSourceService 获取数据源表单配置
|
|
1905
1952
|
* - code-block: 数据源代码块,使用内置的代码块表单配置
|
|
1906
1953
|
*/
|
|
1907
|
-
type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
|
|
1954
|
+
export type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
|
|
1908
1955
|
/**
|
|
1909
1956
|
* 自定义 `loadConfig` 时回传的上下文,聚合了组件当前的对比入参,
|
|
1910
1957
|
* 方便调用方在外部按需拼装 FormConfig。
|
|
1911
1958
|
*/
|
|
1912
|
-
interface CompareFormLoadConfigContext {
|
|
1959
|
+
export interface CompareFormLoadConfigContext {
|
|
1913
1960
|
/** 对比类型,见 CompareCategory */
|
|
1914
1961
|
category: string;
|
|
1915
1962
|
/** 节点 / 数据源类型 */
|
|
@@ -1926,8 +1973,47 @@ interface CompareFormLoadConfigContext {
|
|
|
1926
1973
|
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category` 取配置逻辑,
|
|
1927
1974
|
* 可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
1928
1975
|
*/
|
|
1929
|
-
type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
|
|
1930
|
-
|
|
1976
|
+
export type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
|
|
1977
|
+
/**
|
|
1978
|
+
* CompareForm / ViewForm 共用的基础 props。
|
|
1979
|
+
* 两者都基于同一套「按 category 加载 FormConfig + 注入 services/stage」的逻辑(见 useCompareForm),
|
|
1980
|
+
* 差异仅在于是否做新旧值对比。这里抽出公共字段避免重复定义。
|
|
1981
|
+
*/
|
|
1982
|
+
export interface CompareFormBaseProps {
|
|
1983
|
+
/** 当前值(对比场景下为修改后的值) */
|
|
1984
|
+
value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
|
|
1985
|
+
/**
|
|
1986
|
+
* 类型说明:
|
|
1987
|
+
* - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
|
|
1988
|
+
* - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
|
|
1989
|
+
* - `category` 为 `code-block` 时,`type` 可不传
|
|
1990
|
+
*/
|
|
1991
|
+
type?: string;
|
|
1992
|
+
/** 表单配置类别,决定从哪里取 FormConfig */
|
|
1993
|
+
category?: CompareCategory;
|
|
1994
|
+
/** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
|
|
1995
|
+
dataSourceType?: string;
|
|
1996
|
+
labelWidth?: string;
|
|
1997
|
+
/**
|
|
1998
|
+
* 外层容器高度。设置后表单内容超出时会在组件内部出现滚动条,
|
|
1999
|
+
* 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
|
|
2000
|
+
*/
|
|
2001
|
+
height?: string;
|
|
2002
|
+
/**
|
|
2003
|
+
* 表单内组件的尺寸(透传给 MForm 的 `size`),可选 'large' | 'default' | 'small'。
|
|
2004
|
+
* 缺省时使用 MForm 内置默认尺寸。
|
|
2005
|
+
*/
|
|
2006
|
+
size?: FieldSize;
|
|
2007
|
+
/**
|
|
2008
|
+
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
|
|
2009
|
+
* 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
|
|
2010
|
+
* `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
2011
|
+
*/
|
|
2012
|
+
loadConfig?: CompareFormLoadConfig;
|
|
2013
|
+
/** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
|
|
2014
|
+
services?: Services;
|
|
2015
|
+
}
|
|
2016
|
+
export declare enum SideItemKey {
|
|
1931
2017
|
COMPONENT_LIST = "component-list",
|
|
1932
2018
|
LAYER = "layer",
|
|
1933
2019
|
CODE_BLOCK = "code-block",
|
|
@@ -1938,9 +2024,9 @@ declare enum SideItemKey {
|
|
|
1938
2024
|
* layer: 已选组件树
|
|
1939
2025
|
* code-block: 代码块
|
|
1940
2026
|
*/
|
|
1941
|
-
type SideItem = `${SideItemKey}` | SideComponent;
|
|
2027
|
+
export type SideItem = `${SideItemKey}` | SideComponent;
|
|
1942
2028
|
/** 工具栏 */
|
|
1943
|
-
interface SideBarData {
|
|
2029
|
+
export interface SideBarData {
|
|
1944
2030
|
/** 容器类型 */
|
|
1945
2031
|
type: 'tabs';
|
|
1946
2032
|
/** 默认激活的内容 */
|
|
@@ -1948,7 +2034,7 @@ interface SideBarData {
|
|
|
1948
2034
|
/** panel列表 */
|
|
1949
2035
|
items: SideItem[];
|
|
1950
2036
|
}
|
|
1951
|
-
interface ComponentItem {
|
|
2037
|
+
export interface ComponentItem {
|
|
1952
2038
|
/** 显示文案 */
|
|
1953
2039
|
text: string;
|
|
1954
2040
|
/** 详情,用于tooltip */
|
|
@@ -1962,43 +2048,48 @@ interface ComponentItem {
|
|
|
1962
2048
|
[key: string]: any;
|
|
1963
2049
|
};
|
|
1964
2050
|
}
|
|
1965
|
-
interface ComponentGroup {
|
|
2051
|
+
export interface ComponentGroup {
|
|
1966
2052
|
/** 显示文案 */
|
|
1967
2053
|
title: string;
|
|
1968
2054
|
/** 组内列表 */
|
|
1969
2055
|
items: ComponentItem[];
|
|
1970
2056
|
}
|
|
1971
|
-
declare enum LayerOffset {
|
|
2057
|
+
export declare enum LayerOffset {
|
|
1972
2058
|
TOP = "top",
|
|
1973
2059
|
BOTTOM = "bottom"
|
|
1974
2060
|
}
|
|
1975
2061
|
/** 容器布局 */
|
|
1976
|
-
declare enum Layout {
|
|
2062
|
+
export declare enum Layout {
|
|
1977
2063
|
FLEX = "flex",
|
|
1978
2064
|
FIXED = "fixed",
|
|
1979
2065
|
RELATIVE = "relative",
|
|
1980
2066
|
ABSOLUTE = "absolute"
|
|
1981
2067
|
}
|
|
1982
|
-
declare enum Keys {
|
|
2068
|
+
export declare enum Keys {
|
|
1983
2069
|
ESCAPE = "Space"
|
|
1984
2070
|
}
|
|
1985
|
-
interface ScrollViewerEvent {
|
|
2071
|
+
export interface ScrollViewerEvent {
|
|
1986
2072
|
scrollLeft: number;
|
|
1987
2073
|
scrollTop: number;
|
|
1988
2074
|
scrollHeight: number;
|
|
1989
2075
|
scrollWidth: number;
|
|
1990
2076
|
}
|
|
1991
|
-
type CodeState = {
|
|
1992
|
-
/** 代码块DSL数据源 */
|
|
1993
|
-
|
|
1994
|
-
|
|
2077
|
+
export type CodeState = {
|
|
2078
|
+
/** 代码块DSL数据源 */
|
|
2079
|
+
codeDsl: CodeBlockDSL | null;
|
|
2080
|
+
/** 代码块是否可编辑 */
|
|
2081
|
+
editable: boolean;
|
|
2082
|
+
/** list模式下左侧展示的代码列表 */
|
|
2083
|
+
combineIds: string[];
|
|
2084
|
+
/** 为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除) */
|
|
1995
2085
|
undeletableList: Id[];
|
|
1996
2086
|
paramsColConfig?: TableColumnConfig;
|
|
1997
2087
|
};
|
|
1998
|
-
type CodeRelation = {
|
|
1999
|
-
/** 组件id:[代码id1,代码id2] */
|
|
2088
|
+
export type CodeRelation = {
|
|
2089
|
+
/** 组件id:[代码id1,代码id2] */
|
|
2090
|
+
[compId: Id]: Id[];
|
|
2000
2091
|
};
|
|
2001
|
-
interface CodeDslItem {
|
|
2092
|
+
export interface CodeDslItem {
|
|
2002
2093
|
/** 代码块id */
|
|
2003
2094
|
id: Id;
|
|
2004
2095
|
/** 代码块名称 */
|
|
@@ -2010,24 +2101,24 @@ interface CodeDslItem {
|
|
|
2010
2101
|
/** 代码块对应绑定的组件信息 */
|
|
2011
2102
|
combineInfo?: CombineInfo[];
|
|
2012
2103
|
}
|
|
2013
|
-
interface CombineInfo {
|
|
2104
|
+
export interface CombineInfo {
|
|
2014
2105
|
/** 组件id */
|
|
2015
2106
|
compId: Id;
|
|
2016
2107
|
/** 组件名称 */
|
|
2017
2108
|
compName: string;
|
|
2018
2109
|
}
|
|
2019
|
-
interface ListState {
|
|
2110
|
+
export interface ListState {
|
|
2020
2111
|
/** 代码块列表 */
|
|
2021
2112
|
codeList: CodeDslItem[];
|
|
2022
2113
|
}
|
|
2023
|
-
declare enum CodeDeleteErrorType {
|
|
2114
|
+
export declare enum CodeDeleteErrorType {
|
|
2024
2115
|
/** 代码块存在于不可删除列表中 */
|
|
2025
2116
|
UNDELETEABLE = "undeleteable",
|
|
2026
2117
|
/** 代码块存在绑定关系 */
|
|
2027
2118
|
BIND = "bind"
|
|
2028
2119
|
}
|
|
2029
|
-
declare const CODE_DRAFT_STORAGE_KEY = "magicCodeDraft";
|
|
2030
|
-
interface CodeParamStatement {
|
|
2120
|
+
export declare const CODE_DRAFT_STORAGE_KEY = "magicCodeDraft";
|
|
2121
|
+
export interface CodeParamStatement {
|
|
2031
2122
|
/** 参数名称 */
|
|
2032
2123
|
name: string;
|
|
2033
2124
|
/** 参数类型 */
|
|
@@ -2040,7 +2131,7 @@ interface CodeParamStatement {
|
|
|
2040
2131
|
* - `initial`:页面「未修改的初始状态」基线(设置 root 时生成),作为页面栈 index 0 的固定底线 step。
|
|
2041
2132
|
* 该 step 不可被撤销/回滚(cursor 不会低于它),仅用于历史面板底部的初始行展示。
|
|
2042
2133
|
*/
|
|
2043
|
-
type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
|
|
2134
|
+
export type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
|
|
2044
2135
|
/**
|
|
2045
2136
|
* 历史记录的「操作途径」——标记本次变更由哪条交互入口触发,仅用于历史面板展示 / 业务埋点,
|
|
2046
2137
|
* 不影响 undo/redo 行为。缺省(未传)时 UI 视为「未知」。
|
|
@@ -2061,9 +2152,9 @@ type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
|
|
|
2061
2152
|
*
|
|
2062
2153
|
* 通过 `(string & {})` 允许业务侧扩展自定义途径字符串,同时保留内置值的自动补全。
|
|
2063
2154
|
*/
|
|
2064
|
-
type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
|
|
2155
|
+
export type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
|
|
2065
2156
|
/** *AndGetHistoryId 系列方法返回值:原操作结果 + 本次写入历史记录的 uuid 列表(未入栈时为 `[]`)。 */
|
|
2066
|
-
type DslOpWithHistoryIdsResult<T> = {
|
|
2157
|
+
export type DslOpWithHistoryIdsResult<T> = {
|
|
2067
2158
|
result: T;
|
|
2068
2159
|
historyIds: string[];
|
|
2069
2160
|
};
|
|
@@ -2078,7 +2169,7 @@ type DslOpWithHistoryIdsResult<T> = {
|
|
|
2078
2169
|
*
|
|
2079
2170
|
* 泛型 `T` 为变化内容的快照类型:页面节点为 `MNode`,代码块为 `CodeBlockContent`,数据源为 `DataSourceSchema`。
|
|
2080
2171
|
*/
|
|
2081
|
-
interface StepDiffItem<T = unknown> {
|
|
2172
|
+
export interface StepDiffItem<T = unknown> {
|
|
2082
2173
|
/** 变更后的内容快照。`opType` 为 `add` / `update` 时有,`remove` 时无。 */
|
|
2083
2174
|
newSchema?: T;
|
|
2084
2175
|
/** 变更前的内容快照。`opType` 为 `remove` / `update` 时有,`add` 时无。 */
|
|
@@ -2098,7 +2189,7 @@ interface StepDiffItem<T = unknown> {
|
|
|
2098
2189
|
*
|
|
2099
2190
|
* 泛型 `T` 为 `diff` 中变化内容的快照类型(页面节点 `MNode` / 代码块 `CodeBlockContent` / 数据源 `DataSourceSchema`)。
|
|
2100
2191
|
*/
|
|
2101
|
-
interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
|
|
2192
|
+
export interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
|
|
2102
2193
|
/**
|
|
2103
2194
|
* 历史记录唯一标识(uuid)。入栈时自动写入(若调用方未指定),
|
|
2104
2195
|
* 用于精确定位 / 引用某一条历史记录(如 revert、埋点、跨端同步等)。
|
|
@@ -2155,37 +2246,41 @@ interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
|
|
|
2155
2246
|
* 历史记录的扩展上下文({@link BaseStepValue.extra})。
|
|
2156
2247
|
* 内置字段供 `page` 类型在撤销 / 重做时恢复选区与受影响节点;扩展类型可自由附加其它键。
|
|
2157
2248
|
*/
|
|
2158
|
-
interface StepExtra {
|
|
2249
|
+
export interface StepExtra {
|
|
2159
2250
|
/** 操作前选中的节点 ID,用于撤销后恢复选择状态(page 类型) */
|
|
2160
2251
|
selectedBefore?: Id[];
|
|
2161
2252
|
/** 操作后选中的节点 ID,用于重做后恢复选择状态(page 类型) */
|
|
2162
2253
|
selectedAfter?: Id[];
|
|
2163
2254
|
/** 本次操作涉及的节点 id 集合(page 类型) */
|
|
2164
2255
|
modifiedNodeIds?: Map<Id, Id>;
|
|
2256
|
+
/** 操作前的节点校验错误快照,撤销后还原(使撤销一个「校验失败」的改动后错误消失) */
|
|
2257
|
+
invalidNodeIdsBefore?: Map<Id, NodeInvalidInfo>;
|
|
2258
|
+
/** 操作后的节点校验错误快照,重做后还原(使重做后错误恢复) */
|
|
2259
|
+
invalidNodeIdsAfter?: Map<Id, NodeInvalidInfo>;
|
|
2165
2260
|
[key: string]: any;
|
|
2166
2261
|
}
|
|
2167
2262
|
/**
|
|
2168
2263
|
* 页面节点历史记录条目(`diff` 内容为 {@link MNode})。结构已与代码块 / 数据源统一收敛到
|
|
2169
2264
|
* {@link BaseStepValue}:关联 id 见 `data.id`,选区等上下文见 `extra`。
|
|
2170
2265
|
*/
|
|
2171
|
-
type StepValue = BaseStepValue<MNode, StepExtra>;
|
|
2266
|
+
export type StepValue = BaseStepValue<MNode, StepExtra>;
|
|
2172
2267
|
/**
|
|
2173
2268
|
* 代码块历史记录条目(`diff` 内容为 {@link CodeBlockContent}),按 `data.id`(codeBlock.id)
|
|
2174
2269
|
* 分组保存到 historyState.steps.codeBlock。结构与 {@link StepValue} / {@link DataSourceStepValue}
|
|
2175
2270
|
* 一致,仅 `diff` 快照类型不同。
|
|
2176
2271
|
*/
|
|
2177
|
-
type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
|
|
2272
|
+
export type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
|
|
2178
2273
|
/**
|
|
2179
2274
|
* 数据源历史记录条目(`diff` 内容为 {@link DataSourceSchema}),按 `data.id`(dataSource.id)
|
|
2180
2275
|
* 分组保存到 historyState.steps.dataSource。结构与 {@link StepValue} / {@link CodeBlockStepValue}
|
|
2181
2276
|
* 一致,仅 `diff` 快照类型不同。
|
|
2182
2277
|
*/
|
|
2183
|
-
type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
|
|
2278
|
+
export type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
|
|
2184
2279
|
/**
|
|
2185
2280
|
* 历史记录类型标识:内置 `page` / `codeBlock` / `dataSource`,并允许业务扩展自定义类型。
|
|
2186
2281
|
* `(string & {})` 保留对内置字面量的智能提示,同时不限制扩展取值。
|
|
2187
2282
|
*/
|
|
2188
|
-
type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
|
|
2283
|
+
export type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
|
|
2189
2284
|
/**
|
|
2190
2285
|
* 全部历史栈的统一容器,按「类型 -> id -> UndoRedo 栈」两级分组。
|
|
2191
2286
|
*
|
|
@@ -2197,14 +2292,14 @@ type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
|
|
|
2197
2292
|
* 所有类型(含扩展类型)一视同仁:均按 id 独立分栈、独立 undo/redo,且都可通过
|
|
2198
2293
|
* {@link HistoryService.setMarker} 在 index 0 种入 `initial` 基线(撤销 / 回滚不会越过该基线)。
|
|
2199
2294
|
*/
|
|
2200
|
-
interface HistorySteps {
|
|
2295
|
+
export interface HistorySteps {
|
|
2201
2296
|
page: Record<Id, UndoRedo<StepValue>>;
|
|
2202
2297
|
codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
|
|
2203
2298
|
dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
|
|
2204
2299
|
/** 扩展历史类型:按 id 分组的 UndoRedo 栈。 */
|
|
2205
2300
|
[stepType: string]: Record<Id, UndoRedo<any>>;
|
|
2206
2301
|
}
|
|
2207
|
-
interface HistoryState {
|
|
2302
|
+
export interface HistoryState {
|
|
2208
2303
|
/**
|
|
2209
2304
|
* 全部历史栈的统一容器(页面 / 代码块 / 数据源 / 扩展类型),见 {@link HistorySteps}。
|
|
2210
2305
|
* 各类型互不影响,支持按 id 独立 undo/redo;是否可撤销 / 重做改用 {@link HistoryService.canUndo} /
|
|
@@ -2223,7 +2318,7 @@ interface HistoryState {
|
|
|
2223
2318
|
* 历史记录的可持久化快照。由 historyService.saveToIndexedDB 写入 IndexedDB,
|
|
2224
2319
|
* 再由 historyService.restoreFromIndexedDB 读出并重建各 UndoRedo 栈。
|
|
2225
2320
|
*/
|
|
2226
|
-
interface PersistedHistoryState {
|
|
2321
|
+
export interface PersistedHistoryState {
|
|
2227
2322
|
/** 快照结构版本号,便于后续兼容升级。 */
|
|
2228
2323
|
version: number;
|
|
2229
2324
|
/**
|
|
@@ -2240,7 +2335,7 @@ interface PersistedHistoryState {
|
|
|
2240
2335
|
savedAt: number;
|
|
2241
2336
|
}
|
|
2242
2337
|
/** historyService 持久化相关 API 的可选配置。 */
|
|
2243
|
-
interface HistoryPersistOptions {
|
|
2338
|
+
export interface HistoryPersistOptions {
|
|
2244
2339
|
/** IndexedDB 数据库名,默认 `tmagic-editor`(最终库名会拼上当前 DSL app id)。 */
|
|
2245
2340
|
dbName?: string;
|
|
2246
2341
|
/** objectStore 名,默认 `history`。 */
|
|
@@ -2257,7 +2352,7 @@ interface HistoryPersistOptions {
|
|
|
2257
2352
|
/**
|
|
2258
2353
|
* 历史面板用:当前页面的一条历史步骤(包含位置和是否已应用)。
|
|
2259
2354
|
*/
|
|
2260
|
-
interface HistoryStepEntry<T> {
|
|
2355
|
+
export interface HistoryStepEntry<T> {
|
|
2261
2356
|
/** 步骤内容 */
|
|
2262
2357
|
step: T;
|
|
2263
2358
|
/** 在所属栈中的索引(0 为最早) */
|
|
@@ -2280,7 +2375,7 @@ interface HistoryStepEntry<T> {
|
|
|
2280
2375
|
* - 数据源:`HistoryGroup<DataSourceStepValue>`,`kind: 'data-source'`,`id` 为 dataSource.id;
|
|
2281
2376
|
* - 代码块:`HistoryGroup<CodeBlockStepValue>`,`kind: 'code-block'`,`id` 为 codeBlock.id。
|
|
2282
2377
|
*/
|
|
2283
|
-
interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
|
|
2378
|
+
export interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
|
|
2284
2379
|
/** 历史类型标识:page / code-block / data-source(扩展类型同理)。 */
|
|
2285
2380
|
kind: string;
|
|
2286
2381
|
/** 所属栈 id(page 为 pageId,代码块 / 数据源为对应资源 id)。 */
|
|
@@ -2306,7 +2401,7 @@ interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
|
|
|
2306
2401
|
/** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
|
|
2307
2402
|
isCurrent?: boolean;
|
|
2308
2403
|
}
|
|
2309
|
-
declare enum KeyBindingCommand {
|
|
2404
|
+
export declare enum KeyBindingCommand {
|
|
2310
2405
|
/** 复制 */
|
|
2311
2406
|
COPY_NODE = "tmagic-system-copy-node",
|
|
2312
2407
|
/** 粘贴 */
|
|
@@ -2346,12 +2441,12 @@ declare enum KeyBindingCommand {
|
|
|
2346
2441
|
/** 切换组件 */
|
|
2347
2442
|
SWITCH_NODE = "tmagic-system-switch-node"
|
|
2348
2443
|
}
|
|
2349
|
-
interface KeyBindingItem {
|
|
2444
|
+
export interface KeyBindingItem {
|
|
2350
2445
|
command: KeyBindingCommand | string;
|
|
2351
2446
|
keybinding?: string | string[];
|
|
2352
2447
|
when: [string, 'keyup' | 'keydown'][];
|
|
2353
2448
|
}
|
|
2354
|
-
interface KeyBindingCacheItem {
|
|
2449
|
+
export interface KeyBindingCacheItem {
|
|
2355
2450
|
type: string;
|
|
2356
2451
|
command: KeyBindingCommand | string;
|
|
2357
2452
|
keybinding?: string | string[];
|
|
@@ -2359,14 +2454,14 @@ interface KeyBindingCacheItem {
|
|
|
2359
2454
|
bound: boolean;
|
|
2360
2455
|
}
|
|
2361
2456
|
/** 可新增的数据源类型选项 */
|
|
2362
|
-
interface DatasourceTypeOption {
|
|
2457
|
+
export interface DatasourceTypeOption {
|
|
2363
2458
|
/** 数据源类型 */
|
|
2364
2459
|
type: string;
|
|
2365
2460
|
/** 数据源名称 */
|
|
2366
2461
|
text: string;
|
|
2367
2462
|
}
|
|
2368
2463
|
/** 组件树节点状态 */
|
|
2369
|
-
interface LayerNodeStatus {
|
|
2464
|
+
export interface LayerNodeStatus {
|
|
2370
2465
|
/** 显隐 */
|
|
2371
2466
|
visible: boolean;
|
|
2372
2467
|
/** 展开子节点 */
|
|
@@ -2377,22 +2472,28 @@ interface LayerNodeStatus {
|
|
|
2377
2472
|
draggable: boolean;
|
|
2378
2473
|
}
|
|
2379
2474
|
/** 拖拽类型 */
|
|
2380
|
-
declare enum DragType {
|
|
2475
|
+
export declare enum DragType {
|
|
2381
2476
|
/** 从组件列表拖到画布 */
|
|
2382
2477
|
COMPONENT_LIST = "component-list",
|
|
2383
2478
|
/** 拖动组件树节点 */
|
|
2384
2479
|
LAYER_TREE = "layer-tree"
|
|
2385
2480
|
}
|
|
2386
|
-
interface TreeNodeData {
|
|
2481
|
+
export interface TreeNodeData {
|
|
2387
2482
|
id: Id;
|
|
2388
2483
|
name?: string;
|
|
2389
2484
|
items?: TreeNodeData[];
|
|
2390
2485
|
[key: string]: any;
|
|
2391
2486
|
}
|
|
2392
2487
|
/** 判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
|
|
2393
|
-
type IsExpandableFunction = (_data: TreeNodeData, _nodeStatusMap: Map<Id, LayerNodeStatus>) => boolean;
|
|
2488
|
+
export type IsExpandableFunction = (_data: TreeNodeData, _nodeStatusMap: Map<Id, LayerNodeStatus>) => boolean;
|
|
2394
2489
|
/** canDropIn 的调用场景 */
|
|
2395
|
-
type CanDropInScene =
|
|
2490
|
+
export type CanDropInScene =
|
|
2491
|
+
/** 在"已选组件"面板的组件树中拖动节点 */
|
|
2492
|
+
'layer' |
|
|
2493
|
+
/** 在画布上拖动已有组件(被拖动组件本身已经存在于画布中,sourceIds 包含其 id) */
|
|
2494
|
+
'stage-drag' |
|
|
2495
|
+
/** 从组件列表拖入新组件到画布(被拖入的组件尚不存在,sourceIds 为空数组) */
|
|
2496
|
+
'stage-add';
|
|
2396
2497
|
/**
|
|
2397
2498
|
* 判断当前正在拖动的源节点是否可以拖入目标节点内部的函数
|
|
2398
2499
|
* @param _sourceIds 当前正在拖动的源节点 id 列表
|
|
@@ -2410,40 +2511,53 @@ type CanDropInScene = /** 在"已选组件"面板的组件树中拖动节点 */'
|
|
|
2410
2511
|
* (例如把命中的"卡片外壳"节点重定向到其内层"卡片内容"容器节点)
|
|
2411
2512
|
* - 其他(`true` / `void` / `undefined`):按原 targetId 正常拖入
|
|
2412
2513
|
*/
|
|
2413
|
-
type CanDropInFunction = (_sourceIds: Id[], _targetId: Id, _scene: CanDropInScene) => Id | boolean | void;
|
|
2414
|
-
type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]
|
|
2415
|
-
type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]
|
|
2416
|
-
type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]
|
|
2417
|
-
type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]
|
|
2418
|
-
type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K] };
|
|
2419
|
-
type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<AsyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<AsyncAfterHook<T, C>>, 'after'>;
|
|
2420
|
-
type SyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<SyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<SyncAfterHook<T, C>>, 'after'>;
|
|
2421
|
-
interface EventBusEvent {
|
|
2514
|
+
export type CanDropInFunction = (_sourceIds: Id[], _targetId: Id, _scene: CanDropInScene) => Id | boolean | void;
|
|
2515
|
+
export type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]>; };
|
|
2516
|
+
export type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]>>; };
|
|
2517
|
+
export type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]>; };
|
|
2518
|
+
export type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]>; };
|
|
2519
|
+
export type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K]; };
|
|
2520
|
+
export type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<AsyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<AsyncAfterHook<T, C>>, 'after'>;
|
|
2521
|
+
export type SyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<SyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<SyncAfterHook<T, C>>, 'after'>;
|
|
2522
|
+
export interface EventBusEvent {
|
|
2422
2523
|
'edit-data-source': [id: string];
|
|
2423
2524
|
'edit-data-source-method': [id: string, methodName: string];
|
|
2424
2525
|
'edit-data-source-field': [id: string, fieldPath: string[]];
|
|
2425
2526
|
'remove-data-source': [id: string];
|
|
2426
2527
|
'edit-code': [id: string];
|
|
2427
2528
|
}
|
|
2428
|
-
interface EventBus extends EventEmitter {
|
|
2529
|
+
export interface EventBus extends EventEmitter$1 {
|
|
2429
2530
|
on<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, listener: (...args: Param) => void): this;
|
|
2430
2531
|
emit<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, ...args: Param): boolean;
|
|
2431
2532
|
}
|
|
2432
|
-
type PropsFormConfigFunction = (data: {
|
|
2533
|
+
export type PropsFormConfigFunction = (data: {
|
|
2433
2534
|
editorService: EditorService;
|
|
2434
2535
|
}) => FormConfig;
|
|
2435
|
-
type PropsFormValueFunction = (data: {
|
|
2536
|
+
export type PropsFormValueFunction = (data: {
|
|
2436
2537
|
editorService: EditorService;
|
|
2437
2538
|
}) => Partial<MNode>;
|
|
2438
|
-
type PartSortableOptions = Omit<Options, 'onStart' | 'onUpdate'>;
|
|
2439
|
-
interface PageBarSortOptions extends PartSortableOptions {
|
|
2539
|
+
export type PartSortableOptions = Omit<Options, 'onStart' | 'onUpdate'>;
|
|
2540
|
+
export interface PageBarSortOptions extends PartSortableOptions {
|
|
2440
2541
|
/** 在onUpdate之后调用 */
|
|
2441
2542
|
afterUpdate?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
|
|
2442
2543
|
/** 在onStart之前调用 */
|
|
2443
2544
|
beforeStart?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
|
|
2444
2545
|
}
|
|
2445
|
-
|
|
2446
|
-
|
|
2546
|
+
/**
|
|
2547
|
+
* 右键菜单当前目标(侧栏树节点等)。
|
|
2548
|
+
* 数据源 / 代码块面板通过 `customContentMenu` 的 `getTarget` 暴露,业务在 handler 内自行读取。
|
|
2549
|
+
*/
|
|
2550
|
+
export interface ContentMenuTarget {
|
|
2551
|
+
/** 目标 ID */
|
|
2552
|
+
id: string;
|
|
2553
|
+
/** 原始节点数据(树节点等) */
|
|
2554
|
+
data?: TreeNodeData;
|
|
2555
|
+
}
|
|
2556
|
+
export type ContentMenuType = 'layer' | 'data-source' | 'viewer' | 'code-block';
|
|
2557
|
+
export type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType,
|
|
2558
|
+
/** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
|
|
2559
|
+
getTarget?: () => ContentMenuTarget | null) => (MenuButton | MenuComponent)[];
|
|
2560
|
+
export interface EditorEvents {
|
|
2447
2561
|
'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
|
|
2448
2562
|
historySource?: HistoryOpSource;
|
|
2449
2563
|
}];
|
|
@@ -2462,8 +2576,69 @@ interface EditorEvents {
|
|
|
2462
2576
|
targetParent: MContainer;
|
|
2463
2577
|
}];
|
|
2464
2578
|
'history-change': [data: MPage | MPageFragment];
|
|
2579
|
+
/**
|
|
2580
|
+
* DSL 发生变更后统一触发,免去分别监听 add / remove / update / move-layer / drag-to。
|
|
2581
|
+
* 回调参数为 {@link EditorChangeEvent},按 `type` 区分操作类型并携带各自的操作内容(payload)
|
|
2582
|
+
* 以及变更所在的当前 page(可能为 null)。撤销 / 重做内部同样会经由
|
|
2583
|
+
* add / remove / update 触发本事件;如需区分「用户操作」与「撤销重做」请配合 `history-change`。
|
|
2584
|
+
*/
|
|
2585
|
+
change: [event: EditorChangeEvent];
|
|
2586
|
+
/** 节点校验错误状态发生变化时触发,携带当前完整的错误 Map(供非响应式消费方订阅) */
|
|
2587
|
+
'invalid-node-change': [invalidNodeIds: Map<Id, NodeInvalidInfo>];
|
|
2588
|
+
}
|
|
2589
|
+
/** `change` 事件中单个变更项:变更的 node 及其所属的 page(可能为 null)。 */
|
|
2590
|
+
export interface EditorChangeItem {
|
|
2591
|
+
node: MNode;
|
|
2592
|
+
page: StoreState['page'];
|
|
2465
2593
|
}
|
|
2466
|
-
|
|
2594
|
+
/** `update` 类型变更项:node 为前后快照及 form 端变更记录,page 为其所属页面。 */
|
|
2595
|
+
export interface EditorUpdateChangeItem {
|
|
2596
|
+
node: {
|
|
2597
|
+
newNode: MNode;
|
|
2598
|
+
oldNode: MNode;
|
|
2599
|
+
changeRecords?: ChangeRecord[];
|
|
2600
|
+
};
|
|
2601
|
+
page: StoreState['page'];
|
|
2602
|
+
}
|
|
2603
|
+
/** {@link EditorEvents.change} 各操作类型共有的历史相关字段。 */
|
|
2604
|
+
export interface EditorChangeEventHistoryMeta {
|
|
2605
|
+
/**
|
|
2606
|
+
* 本次变更的「历史来源」(调用 DSL 操作时传入的 {@link HistoryOpOptions.historySource},
|
|
2607
|
+
* 撤销 / 重做时则为被应用 step 上记录的 `source`),未携带时为 undefined。
|
|
2608
|
+
*/
|
|
2609
|
+
historySource?: HistoryOpSource;
|
|
2610
|
+
/**
|
|
2611
|
+
* 本次操作是否未写入历史记录(即调用时传入的 {@link HistoryOpOptions.doNotPushHistory},缺省为 false);
|
|
2612
|
+
* 撤销 / 重做路径补发的事件恒为 true(撤销/重做本身不再入栈)。
|
|
2613
|
+
*/
|
|
2614
|
+
doNotPushHistory?: boolean;
|
|
2615
|
+
}
|
|
2616
|
+
/**
|
|
2617
|
+
* {@link EditorEvents.change} 的回调参数:以 `type` 区分操作类型,并携带对应的操作内容。
|
|
2618
|
+
* `data` 为本次变更的节点列表,每项包含 node 及其所属的 page(可能为 null);
|
|
2619
|
+
* `move-layer` 额外带层级偏移 `offset`,`drag-to` 额外带目标位置 `targetIndex` / `targetParent`;
|
|
2620
|
+
* 历史相关字段(historySource / doNotPushHistory)见 {@link EditorChangeEventHistoryMeta}。
|
|
2621
|
+
*/
|
|
2622
|
+
export type EditorChangeEvent = ({
|
|
2623
|
+
type: 'add';
|
|
2624
|
+
data: EditorChangeItem[];
|
|
2625
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2626
|
+
type: 'remove';
|
|
2627
|
+
data: EditorChangeItem[];
|
|
2628
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2629
|
+
type: 'update';
|
|
2630
|
+
data: EditorUpdateChangeItem[];
|
|
2631
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2632
|
+
type: 'move-layer';
|
|
2633
|
+
data: EditorChangeItem[];
|
|
2634
|
+
offset: number | LayerOffset;
|
|
2635
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2636
|
+
type: 'drag-to';
|
|
2637
|
+
data: EditorChangeItem[];
|
|
2638
|
+
targetIndex: number;
|
|
2639
|
+
targetParent: MContainer;
|
|
2640
|
+
} & EditorChangeEventHistoryMeta);
|
|
2641
|
+
export interface HistoryEvents {
|
|
2467
2642
|
change: [state: BaseStepValue | StepValue | CodeBlockStepValue | DataSourceStepValue, stepType: HistoryStepType, id: Id];
|
|
2468
2643
|
'code-block-history-change': [id: Id, state: CodeBlockStepValue];
|
|
2469
2644
|
'data-source-history-change': [id: Id, state: DataSourceStepValue];
|
|
@@ -2482,19 +2657,28 @@ interface HistoryEvents {
|
|
|
2482
2657
|
marker: StepValue;
|
|
2483
2658
|
stepType: HistoryStepType;
|
|
2484
2659
|
}];
|
|
2660
|
+
/**
|
|
2661
|
+
* 页面 / 页面片结构变更(新增 / 删除)时派发,见 {@link HistoryService.notifyPageStructureChange}。
|
|
2662
|
+
* 一次操作(add / remove / setRoot 整体替换)涉及多个页面时合并为**一个**事件;
|
|
2663
|
+
* `add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
|
|
2664
|
+
*/
|
|
2665
|
+
'page-structure-change': [change: {
|
|
2666
|
+
add: (MPage | MPageFragment)[];
|
|
2667
|
+
remove: (MPage | MPageFragment)[];
|
|
2668
|
+
}];
|
|
2485
2669
|
}
|
|
2486
|
-
declare const canUsePluginMethods: {
|
|
2670
|
+
export declare const canUsePluginMethods: {
|
|
2487
2671
|
async: readonly ["getLayout", "highlight", "select", "multiSelect", "doAdd", "add", "doRemove", "remove", "doUpdate", "update", "sort", "copy", "paste", "doPaste", "doAlignCenter", "alignCenter", "moveLayer", "moveToContainer", "dragTo", "undo", "redo", "move"];
|
|
2488
2672
|
sync: never[];
|
|
2489
2673
|
};
|
|
2490
|
-
type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
|
|
2674
|
+
export type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
|
|
2491
2675
|
/**
|
|
2492
2676
|
* 历史记录写入相关的通用配置(codeBlock / dataSource / editor 共用)
|
|
2493
2677
|
* - doNotPushHistory: 操作完成后是否不要将本次操作压入历史栈(撤销/重做记录),默认 false
|
|
2494
2678
|
* - historyDescription: 入栈时附带的人类可读描述,用于历史面板展示;不影响 undo/redo 行为,缺省时面板会自动生成描述
|
|
2495
2679
|
* - historySource: 操作途径,取值见 {@link HistoryOpSource}(画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等),用于历史面板展示与埋点;不影响 undo/redo 行为
|
|
2496
2680
|
*/
|
|
2497
|
-
interface HistoryOpOptions {
|
|
2681
|
+
export interface HistoryOpOptions {
|
|
2498
2682
|
doNotPushHistory?: boolean;
|
|
2499
2683
|
historyDescription?: string;
|
|
2500
2684
|
historySource?: HistoryOpSource;
|
|
@@ -2503,7 +2687,7 @@ interface HistoryOpOptions {
|
|
|
2503
2687
|
* 在 HistoryOpOptions 基础上携带 form 端 propPath/value 变更记录,
|
|
2504
2688
|
* 用于历史记录的精细化撤销/重做(按 propPath 局部 patch)。
|
|
2505
2689
|
*/
|
|
2506
|
-
interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
|
|
2690
|
+
export interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
|
|
2507
2691
|
changeRecords?: ChangeRecord[];
|
|
2508
2692
|
}
|
|
2509
2693
|
/**
|
|
@@ -2511,12 +2695,36 @@ interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
|
|
|
2511
2695
|
* - doNotSelect: 操作后是否不要自动触发选中(不调用 this.select / this.multiSelect / stage.select / stage.multiSelect)
|
|
2512
2696
|
* - doNotSwitchPage: 操作若会引发当前页面切换(如新增 / 删除 / 跨页移动),是否跳过这次切换
|
|
2513
2697
|
*/
|
|
2514
|
-
interface DslOpOptions extends HistoryOpOptions {
|
|
2698
|
+
export interface DslOpOptions extends HistoryOpOptions {
|
|
2515
2699
|
doNotSelect?: boolean;
|
|
2516
2700
|
doNotSwitchPage?: boolean;
|
|
2517
2701
|
}
|
|
2702
|
+
/**
|
|
2703
|
+
* {@link EditorService.update} / {@link EditorService.doUpdate} 的额外数据
|
|
2704
|
+
* - changeRecords: 单节点 form 端变更记录(多节点场景下被忽略,使用 changeRecordList)
|
|
2705
|
+
* - changeRecordList: 多节点 form 端变更记录列表,按 config 数组同序对应每个节点;优先级高于 changeRecords
|
|
2706
|
+
* - replace: 为 true 时跳过 mergeWith / toggleFixedPosition / setChildrenLayout,直接用传入配置整节点替换
|
|
2707
|
+
* - invalidInfo: 属性面板提交时携带的校验错误信息,在写入历史记录之前落库
|
|
2708
|
+
*/
|
|
2709
|
+
export interface UpdateOptions extends HistoryOpOptionsWithChangeRecords {
|
|
2710
|
+
changeRecordList?: ChangeRecord[][];
|
|
2711
|
+
/**
|
|
2712
|
+
* 为 true 时不做深合并等变换,直接用传入配置整节点替换现有节点。
|
|
2713
|
+
* 适用于源码编辑、历史整节点快照回放等「完整 DSL」场景;默认 false(局部属性更新走 merge)。
|
|
2714
|
+
*/
|
|
2715
|
+
replace?: boolean;
|
|
2716
|
+
/**
|
|
2717
|
+
* 属性面板提交时携带的校验错误信息,在写入历史记录之前落库,
|
|
2718
|
+
* 使历史快照与本次变更对齐,从而 undo/redo 能正确还原错误标记。
|
|
2719
|
+
*/
|
|
2720
|
+
invalidInfo?: {
|
|
2721
|
+
id: Id;
|
|
2722
|
+
source: NodeInvalidSource;
|
|
2723
|
+
error?: string;
|
|
2724
|
+
};
|
|
2725
|
+
}
|
|
2518
2726
|
/** 差异对话框的入参 */
|
|
2519
|
-
interface DiffDialogPayload {
|
|
2727
|
+
export interface DiffDialogPayload {
|
|
2520
2728
|
/** 表单类别 */
|
|
2521
2729
|
category?: CompareCategory;
|
|
2522
2730
|
/** 节点类型 / 数据源类型 */
|
|
@@ -2533,12 +2741,20 @@ interface DiffDialogPayload {
|
|
|
2533
2741
|
targetLabel?: string;
|
|
2534
2742
|
/** 用于标题展示的目标 id */
|
|
2535
2743
|
id?: string | number;
|
|
2744
|
+
/**
|
|
2745
|
+
* 指定打开时的初始对比模式:
|
|
2746
|
+
* - before:该步骤修改前 vs 修改后
|
|
2747
|
+
* - current:该步骤修改后 vs 当前最新值
|
|
2748
|
+
* 不传时按是否存在「修改后的值」/「当前值」自动推断。
|
|
2749
|
+
* 若指定的模式当前不可用(对应数据缺失),将回退到自动推断结果。
|
|
2750
|
+
*/
|
|
2751
|
+
mode?: 'before' | 'current';
|
|
2536
2752
|
}
|
|
2537
2753
|
/**
|
|
2538
2754
|
* 一组「描述 + 可操作性」的判定函数集合。页面 / 数据源 / 代码块及业务自定义历史
|
|
2539
2755
|
* 各自实现一份,作为整体注入,避免把 describe* / isStep* 拆成多个独立 props 反复透传。
|
|
2540
2756
|
*/
|
|
2541
|
-
interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
|
|
2757
|
+
export interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
|
|
2542
2758
|
/**
|
|
2543
2759
|
* 组级描述文案生成器,接收一个 group,返回展示文本。
|
|
2544
2760
|
* 不传时回退到对组内最后一步调用 {@link describeStep}(适用于不做相邻合并、每组恒为单步的历史,如数据源/代码块)。
|
|
@@ -2556,7 +2772,7 @@ interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
|
|
|
2556
2772
|
* 把原先散落在 Bucket / BucketTab 上的 title / prefix / describe* / isStep* / showInitial / gotoEnabled
|
|
2557
2773
|
* 收敛成一个对象作为单一 prop 传递,调用方一次配齐、组件内部按需读取。
|
|
2558
2774
|
*/
|
|
2559
|
-
interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
|
|
2775
|
+
export interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
|
|
2560
2776
|
/** bucket 头部标题,例如 "数据源" / "代码块"。 */
|
|
2561
2777
|
title: string;
|
|
2562
2778
|
/** 子项 key 的命名空间前缀(`ds` 数据源 / `cb` 代码块 / 业务自定义如 `mod`)。 */
|
|
@@ -2565,8 +2781,10 @@ interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends H
|
|
|
2565
2781
|
showInitial?: boolean;
|
|
2566
2782
|
/** 是否支持「跳转到该记录」(goto),默认 true。 */
|
|
2567
2783
|
gotoEnabled?: boolean;
|
|
2784
|
+
/** 是否展示顶部「清空」按钮,默认 true。无需提供清空能力的自定义历史可传 false。 */
|
|
2785
|
+
showClear?: boolean;
|
|
2568
2786
|
}
|
|
2569
|
-
interface UseHistoryRevertOptions {
|
|
2787
|
+
export interface UseHistoryRevertOptions {
|
|
2570
2788
|
/**
|
|
2571
2789
|
* 父级应用上下文,用于让动态挂载的「差异确认弹窗」继承全局组件 / 指令 / provide / 插件
|
|
2572
2790
|
* (Element Plus、@tmagic/form 字段组件等)。未显式传入时,会自动取调用方所在组件的 appContext
|
|
@@ -2574,17 +2792,18 @@ interface UseHistoryRevertOptions {
|
|
|
2574
2792
|
*/
|
|
2575
2793
|
appContext?: AppContext | null;
|
|
2576
2794
|
/**
|
|
2577
|
-
*
|
|
2578
|
-
*
|
|
2795
|
+
* 内置页面 / 数据源 / 代码块的差异 / 回滚确认弹窗默认宽度(透传给 TMagicDialog 的 `width`),
|
|
2796
|
+
* 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
|
|
2797
|
+
* 业务自有历史(`viewDiff` / `confirmAndRevert`)可在调用时通过各自入参的 `width` 单独覆盖。
|
|
2579
2798
|
*/
|
|
2580
|
-
|
|
2799
|
+
dialogWidth?: string;
|
|
2581
2800
|
}
|
|
2582
2801
|
/**
|
|
2583
2802
|
* 业务自有历史(如管理台「模块」)做差异对比时所需的额外渲染入参。
|
|
2584
2803
|
* 内置的页面 / 数据源 / 代码块按 `category` 自动取表单配置,无需传这些;
|
|
2585
2804
|
* 业务自有类别可通过 `loadConfig` 注入自定义表单配置加载逻辑。
|
|
2586
2805
|
*/
|
|
2587
|
-
interface CustomDiffFormOptions {
|
|
2806
|
+
export interface CustomDiffFormOptions {
|
|
2588
2807
|
/**
|
|
2589
2808
|
* 自定义差异表单配置加载逻辑(如「模块」按 c_type 重建表单配置),
|
|
2590
2809
|
* 透传给弹窗内部的 CompareForm;缺省时按 `category` 走内置加载。
|
|
@@ -2592,13 +2811,23 @@ interface CustomDiffFormOptions {
|
|
|
2592
2811
|
loadConfig?: CompareFormLoadConfig;
|
|
2593
2812
|
/** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
|
|
2594
2813
|
selfDiffFieldTypes?: string[];
|
|
2814
|
+
/**
|
|
2815
|
+
* 差异 / 确认回滚弹窗宽度(透传给 HistoryDiffDialog 的 TMagicDialog `width`),
|
|
2816
|
+
* 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
|
|
2817
|
+
*/
|
|
2818
|
+
width?: string;
|
|
2819
|
+
/**
|
|
2820
|
+
* 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
|
|
2821
|
+
* 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
|
|
2822
|
+
*/
|
|
2823
|
+
size?: FieldSize;
|
|
2595
2824
|
}
|
|
2596
2825
|
/**
|
|
2597
2826
|
* 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
|
|
2598
2827
|
* 与内置页面 / 数据源 / 代码块回滚共用「目标校验 → 差异/二次确认弹窗 → 反向回滚」流程,
|
|
2599
2828
|
* 业务方只需提供:差异弹窗入参(可选)、表单配置加载(可选)、实际回滚执行函数。
|
|
2600
2829
|
*/
|
|
2601
|
-
interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
|
|
2830
|
+
export interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
|
|
2602
2831
|
/**
|
|
2603
2832
|
* 差异确认弹窗入参;可对比的步骤(单实体 update)传入后弹差异确认弹窗,
|
|
2604
2833
|
* 传 null / 省略则退化为普通二次确认框(add / remove / 不可对比)。
|
|
@@ -2611,7 +2840,7 @@ interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
|
|
|
2611
2840
|
}
|
|
2612
2841
|
//#endregion
|
|
2613
2842
|
//#region temp/packages/editor/src/hooks/use-code-block-edit.d.ts
|
|
2614
|
-
declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"]) => {
|
|
2843
|
+
export declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"]) => {
|
|
2615
2844
|
codeId: import("@vue/reactivity").Ref<string | undefined, string | undefined>;
|
|
2616
2845
|
codeConfig: import("@vue/reactivity").Ref<(Omit<CodeBlockContent, "content"> & {
|
|
2617
2846
|
content: string;
|
|
@@ -2672,16 +2901,35 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2672
2901
|
}, {}, {}, {}, {}> | null>>;
|
|
2673
2902
|
createCodeBlock: () => Promise<void>;
|
|
2674
2903
|
editCode: (id: string) => Promise<void>;
|
|
2675
|
-
deleteCode: (key: string, {
|
|
2676
|
-
historySource
|
|
2677
|
-
}?: {
|
|
2904
|
+
deleteCode: (key: string, { historySource }?: {
|
|
2678
2905
|
historySource?: HistoryOpSource;
|
|
2679
2906
|
}) => Promise<void>;
|
|
2680
2907
|
submitCodeBlockHandler: (values: CodeBlockContent, eventData?: ContainerChangeEventData) => Promise<void>;
|
|
2681
2908
|
};
|
|
2682
2909
|
//#endregion
|
|
2910
|
+
//#region temp/packages/editor/src/hooks/use-compare-form.d.ts
|
|
2911
|
+
export interface UseCompareFormReturn {
|
|
2912
|
+
config: Ref<FormConfig>;
|
|
2913
|
+
currentValues: ComputedRef<FormValue>;
|
|
2914
|
+
wrapperStyle: ComputedRef<Record<string, string> | undefined>;
|
|
2915
|
+
formContext: ComputedRef<FormContext>;
|
|
2916
|
+
loadConfig: () => Promise<void>;
|
|
2917
|
+
formRef: Readonly<Ref<InstanceType<typeof MForm> | null>>;
|
|
2918
|
+
normalizeCodeBlockValue: (v: Partial<CodeBlockContent> | Record<string, any> | undefined) => Record<string, any>;
|
|
2919
|
+
}
|
|
2920
|
+
/**
|
|
2921
|
+
* CompareForm / ViewForm 共用逻辑:
|
|
2922
|
+
* - 按 `category`(node / data-source / code-block) 加载 FormConfig(支持自定义 `loadConfig`);
|
|
2923
|
+
* - 代码块 `content` 归一化为字符串;
|
|
2924
|
+
* - 外层容器固定高度 + 内部滚动的 `wrapperStyle`;
|
|
2925
|
+
* - 将 services / stage 作为 form context 传给 MForm,保证 filterFunction 上下文一致。
|
|
2926
|
+
*
|
|
2927
|
+
* 两个组件的差异仅在于是否做新旧值对比,这部分逻辑保留在各自组件中。
|
|
2928
|
+
*/
|
|
2929
|
+
export declare const useCompareForm: (props: CompareFormBaseProps) => UseCompareFormReturn;
|
|
2930
|
+
//#endregion
|
|
2683
2931
|
//#region temp/packages/editor/src/hooks/use-stage.d.ts
|
|
2684
|
-
declare const useStage: (stageOptions: StageOptions) => StageCore$1;
|
|
2932
|
+
export declare const useStage: (stageOptions: StageOptions) => StageCore$1;
|
|
2685
2933
|
//#endregion
|
|
2686
2934
|
//#region temp/packages/editor/src/hooks/use-float-box.d.ts
|
|
2687
2935
|
interface State {
|
|
@@ -2689,7 +2937,7 @@ interface State {
|
|
|
2689
2937
|
top: number;
|
|
2690
2938
|
left: number;
|
|
2691
2939
|
}
|
|
2692
|
-
declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
|
|
2940
|
+
export declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
|
|
2693
2941
|
dragstartHandler: (e: DragEvent) => void;
|
|
2694
2942
|
dragendHandler: (key: string, e: DragEvent) => void;
|
|
2695
2943
|
floatBoxStates: import("@vue/reactivity").Ref<{
|
|
@@ -2701,7 +2949,7 @@ declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
|
|
|
2701
2949
|
};
|
|
2702
2950
|
//#endregion
|
|
2703
2951
|
//#region temp/packages/editor/src/hooks/use-window-rect.d.ts
|
|
2704
|
-
declare const useWindowRect: () => {
|
|
2952
|
+
export declare const useWindowRect: () => {
|
|
2705
2953
|
rect: {
|
|
2706
2954
|
width: number;
|
|
2707
2955
|
height: number;
|
|
@@ -2709,23 +2957,23 @@ declare const useWindowRect: () => {
|
|
|
2709
2957
|
};
|
|
2710
2958
|
//#endregion
|
|
2711
2959
|
//#region temp/packages/editor/src/hooks/use-editor-content-height.d.ts
|
|
2712
|
-
declare const useEditorContentHeight: () => {
|
|
2960
|
+
export declare const useEditorContentHeight: () => {
|
|
2713
2961
|
height: import("@vue/reactivity").Ref<number, number>;
|
|
2714
2962
|
};
|
|
2715
2963
|
//#endregion
|
|
2716
2964
|
//#region temp/packages/editor/src/hooks/use-filter.d.ts
|
|
2717
|
-
declare const useFilter: (nodeData: Ref<TreeNodeData[]>, nodeStatusMap: Ref<Map<Id, LayerNodeStatus> | undefined>, filterNodeMethod: (value: string, data: MNode) => boolean) => {
|
|
2965
|
+
export declare const useFilter: (nodeData: Ref<TreeNodeData[]>, nodeStatusMap: Ref<Map<Id, LayerNodeStatus> | undefined>, filterNodeMethod: (value: string, data: MNode) => boolean) => {
|
|
2718
2966
|
filterText: Ref<string, string>;
|
|
2719
2967
|
filterTextChangeHandler(text: string | string[]): void;
|
|
2720
2968
|
};
|
|
2721
2969
|
//#endregion
|
|
2722
2970
|
//#region temp/packages/editor/src/hooks/use-getso.d.ts
|
|
2723
|
-
declare const useGetSo: (target: ShallowRef<HTMLElement | null>, emit: (evt: "change", e: OnDrag$1<Gesto>) => void) => {
|
|
2971
|
+
export declare const useGetSo: (target: ShallowRef<HTMLElement | null>, emit: (evt: "change", e: OnDrag$1<Gesto>) => void) => {
|
|
2724
2972
|
isDragging: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
2725
2973
|
};
|
|
2726
2974
|
//#endregion
|
|
2727
2975
|
//#region temp/packages/editor/src/hooks/use-next-float-box-position.d.ts
|
|
2728
|
-
declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent?: Ref<HTMLDivElement | null>) => {
|
|
2976
|
+
export declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent?: Ref<HTMLDivElement | null>) => {
|
|
2729
2977
|
boxPosition: Ref<{
|
|
2730
2978
|
left: number;
|
|
2731
2979
|
top: number;
|
|
@@ -2740,7 +2988,7 @@ declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent
|
|
|
2740
2988
|
};
|
|
2741
2989
|
//#endregion
|
|
2742
2990
|
//#region temp/packages/editor/src/hooks/use-node-status.d.ts
|
|
2743
|
-
declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
|
|
2991
|
+
export declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
|
|
2744
2992
|
nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
|
|
2745
2993
|
visible: boolean;
|
|
2746
2994
|
expand: boolean;
|
|
@@ -2755,39 +3003,45 @@ declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
|
|
|
2755
3003
|
};
|
|
2756
3004
|
//#endregion
|
|
2757
3005
|
//#region temp/packages/editor/src/hooks/use-services.d.ts
|
|
2758
|
-
declare const useServices: () => Services;
|
|
3006
|
+
export declare const useServices: () => Services;
|
|
2759
3007
|
//#endregion
|
|
2760
3008
|
//#region temp/packages/editor/src/utils/config.d.ts
|
|
3009
|
+
declare const isGlobalFlat: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
2761
3010
|
declare const setEditorConfig: (option: EditorInstallOptions) => void;
|
|
2762
3011
|
declare const getEditorConfig: <K extends keyof EditorInstallOptions>(key: K) => EditorInstallOptions[K];
|
|
2763
3012
|
//#endregion
|
|
2764
3013
|
//#region temp/packages/editor/src/utils/props.d.ts
|
|
2765
|
-
declare const arrayOptions: {
|
|
3014
|
+
export declare const arrayOptions: {
|
|
2766
3015
|
text: string;
|
|
2767
3016
|
value: string;
|
|
2768
3017
|
}[];
|
|
2769
|
-
declare const eqOptions: {
|
|
3018
|
+
export declare const eqOptions: {
|
|
2770
3019
|
text: string;
|
|
2771
3020
|
value: string;
|
|
2772
3021
|
}[];
|
|
2773
|
-
declare const numberOptions: {
|
|
3022
|
+
export declare const numberOptions: {
|
|
2774
3023
|
text: string;
|
|
2775
3024
|
value: string;
|
|
2776
3025
|
}[];
|
|
2777
|
-
declare const
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
3026
|
+
export declare const booleanOptions: {
|
|
3027
|
+
text: string;
|
|
3028
|
+
value: string;
|
|
3029
|
+
}[];
|
|
3030
|
+
/** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
|
|
3031
|
+
export declare const getCondOpOptionsByFieldType: (type: string) => {
|
|
3032
|
+
text: string;
|
|
3033
|
+
value: string;
|
|
3034
|
+
}[];
|
|
3035
|
+
export declare const styleTabConfig: TabPaneConfig;
|
|
3036
|
+
export declare const eventTabConfig: TabPaneConfig;
|
|
3037
|
+
export declare const advancedTabConfig: TabPaneConfig;
|
|
3038
|
+
export declare const displayTabConfig: TabPaneConfig<DisplayCondsConfig>;
|
|
2781
3039
|
/**
|
|
2782
3040
|
* 统一为组件属性表单加上事件、高级、样式配置
|
|
2783
3041
|
* @param config 组件属性配置
|
|
2784
3042
|
* @returns Object
|
|
2785
3043
|
*/
|
|
2786
|
-
declare const fillConfig: (config?: FormConfig, {
|
|
2787
|
-
labelWidth,
|
|
2788
|
-
disabledDataSource,
|
|
2789
|
-
disabledCodeBlock
|
|
2790
|
-
}?: {
|
|
3044
|
+
export declare const fillConfig: (config?: FormConfig, { labelWidth, disabledDataSource, disabledCodeBlock }?: {
|
|
2791
3045
|
labelWidth?: string;
|
|
2792
3046
|
disabledDataSource?: boolean;
|
|
2793
3047
|
disabledCodeBlock?: boolean;
|
|
@@ -2804,7 +3058,7 @@ declare const fillConfig: (config?: FormConfig, {
|
|
|
2804
3058
|
* 通过参数控制两端的细微差异(是否启用必填校验 / vs-code onChange 校验 / dataSource 相关字段显示规则等),
|
|
2805
3059
|
* 避免两边同步两份相同的 schema 而造成漂移。
|
|
2806
3060
|
*/
|
|
2807
|
-
interface GetCodeBlockFormConfigOptions {
|
|
3061
|
+
export interface GetCodeBlockFormConfigOptions {
|
|
2808
3062
|
/**
|
|
2809
3063
|
* 自定义 `params` 表格的"参数类型"列配置。优先级高于内置默认值;
|
|
2810
3064
|
* 通常由 `codeBlockService.getParamsColConfig()` 注入业务侧的扩展。
|
|
@@ -2834,60 +3088,60 @@ interface GetCodeBlockFormConfigOptions {
|
|
|
2834
3088
|
* 生成代码块表单配置。返回的是普通对象数组,可直接传给 `<MForm :config>`;
|
|
2835
3089
|
* 如需响应式的 props 变化(如切换 dataSourceType),调用方在 `computed` 中再次调用本函数即可。
|
|
2836
3090
|
*/
|
|
2837
|
-
declare const getCodeBlockFormConfig: (options?: GetCodeBlockFormConfigOptions) => FormConfig;
|
|
3091
|
+
export declare const getCodeBlockFormConfig: (options?: GetCodeBlockFormConfigOptions) => FormConfig;
|
|
2838
3092
|
//#endregion
|
|
2839
3093
|
//#region temp/packages/editor/src/utils/logger.d.ts
|
|
2840
|
-
declare const log: (...args: any[]) => void;
|
|
2841
|
-
declare const info: (...args: any[]) => void;
|
|
2842
|
-
declare const warn: (...args: any[]) => void;
|
|
2843
|
-
declare const debug: (...args: any[]) => void;
|
|
2844
|
-
declare const error: (...args: any[]) => void;
|
|
3094
|
+
export declare const log: (...args: any[]) => void;
|
|
3095
|
+
export declare const info: (...args: any[]) => void;
|
|
3096
|
+
export declare const warn: (...args: any[]) => void;
|
|
3097
|
+
export declare const debug: (...args: any[]) => void;
|
|
3098
|
+
export declare const error: (...args: any[]) => void;
|
|
2845
3099
|
//#endregion
|
|
2846
3100
|
//#region temp/packages/editor/src/utils/editor.d.ts
|
|
2847
|
-
declare const COPY_STORAGE_KEY = "$MagicEditorCopyData";
|
|
2848
|
-
declare const COPY_CODE_STORAGE_KEY = "$MagicEditorCopyCode";
|
|
2849
|
-
declare const COPY_DS_STORAGE_KEY = "$MagicEditorCopyDataSource";
|
|
3101
|
+
export declare const COPY_STORAGE_KEY = "$MagicEditorCopyData";
|
|
3102
|
+
export declare const COPY_CODE_STORAGE_KEY = "$MagicEditorCopyCode";
|
|
3103
|
+
export declare const COPY_DS_STORAGE_KEY = "$MagicEditorCopyDataSource";
|
|
2850
3104
|
/**
|
|
2851
3105
|
* 获取所有页面配置
|
|
2852
3106
|
* @param root DSL跟节点
|
|
2853
3107
|
* @returns 所有页面配置
|
|
2854
3108
|
*/
|
|
2855
|
-
declare const getPageList: (root?: MApp | null) => MPage[];
|
|
2856
|
-
declare const getPageFragmentList: (root?: MApp | null) => MPageFragment[];
|
|
3109
|
+
export declare const getPageList: (root?: MApp | null) => MPage[];
|
|
3110
|
+
export declare const getPageFragmentList: (root?: MApp | null) => MPageFragment[];
|
|
2857
3111
|
/**
|
|
2858
3112
|
* 获取所有页面名称
|
|
2859
3113
|
* @param pages 所有页面配置
|
|
2860
3114
|
* @returns 所有页面名称
|
|
2861
3115
|
*/
|
|
2862
|
-
declare const getPageNameList: (pages: (MPage | MPageFragment)[]) => string[];
|
|
3116
|
+
export declare const getPageNameList: (pages: (MPage | MPageFragment)[]) => string[];
|
|
2863
3117
|
/**
|
|
2864
3118
|
* 新增页面时,生成页面名称
|
|
2865
3119
|
* @param {Object} pageNameList 所有页面名称
|
|
2866
3120
|
* @returns {string}
|
|
2867
3121
|
*/
|
|
2868
|
-
declare const generatePageName: (pageNameList: string[], type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
3122
|
+
export declare const generatePageName: (pageNameList: string[], type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
2869
3123
|
/**
|
|
2870
3124
|
* 新增页面时,生成页面名称
|
|
2871
3125
|
* @param {Object} app 所有页面配置
|
|
2872
3126
|
* @returns {string}
|
|
2873
3127
|
*/
|
|
2874
|
-
declare const generatePageNameByApp: (app: MApp, type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
2875
|
-
declare const getNodeIndex: (id: Id, parent: MContainer | MApp) => number;
|
|
2876
|
-
declare const getRelativeStyle: (style?: Record<string, any>) => Record<string, any>;
|
|
2877
|
-
declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
|
|
2878
|
-
declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
|
|
2879
|
-
declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
|
|
2880
|
-
declare const change2Fixed: (node: MNode, path: MNode[]) => {
|
|
3128
|
+
export declare const generatePageNameByApp: (app: MApp, type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
3129
|
+
export declare const getNodeIndex: (id: Id, parent: MContainer | MApp) => number;
|
|
3130
|
+
export declare const getRelativeStyle: (style?: Record<string, any>) => Record<string, any>;
|
|
3131
|
+
export declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
|
|
3132
|
+
export declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
|
|
3133
|
+
export declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
|
|
3134
|
+
export declare const change2Fixed: (node: MNode, path: MNode[]) => {
|
|
2881
3135
|
[key: string]: any;
|
|
2882
3136
|
};
|
|
2883
|
-
declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
|
|
2884
|
-
declare const getGuideLineFromCache: (key: string) => number[];
|
|
2885
|
-
declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
|
|
2886
|
-
declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
|
|
2887
|
-
declare const serializeConfig: (config: any) => string;
|
|
2888
|
-
declare const moveItemsInContainer: (sourceIndices: number[], parent: MContainer, targetIndex: number) => void;
|
|
2889
|
-
declare const isIncludeDataSource: (node: MNode, oldNode: MNode) => boolean;
|
|
2890
|
-
declare const buildChangeRecords: (value: any, basePath: string) => {
|
|
3137
|
+
export declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
|
|
3138
|
+
export declare const getGuideLineFromCache: (key: string) => number[];
|
|
3139
|
+
export declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
|
|
3140
|
+
export declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
|
|
3141
|
+
export declare const serializeConfig: (config: any) => string;
|
|
3142
|
+
export declare const moveItemsInContainer: (sourceIndices: number[], parent: MContainer, targetIndex: number) => void;
|
|
3143
|
+
export declare const isIncludeDataSource: (node: MNode, oldNode: MNode) => boolean;
|
|
3144
|
+
export declare const buildChangeRecords: (value: any, basePath: string) => {
|
|
2891
3145
|
propPath: string;
|
|
2892
3146
|
value: any;
|
|
2893
3147
|
}[];
|
|
@@ -2898,7 +3152,7 @@ declare const buildChangeRecords: (value: any, basePath: string) => {
|
|
|
2898
3152
|
* @param rootId 根节点ID,用于排除根节点被选中
|
|
2899
3153
|
* @returns 选中节点的完整信息(node、parent、page)
|
|
2900
3154
|
*/
|
|
2901
|
-
declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id) => EditorNodeInfo, rootId?: Id) => EditorNodeInfo;
|
|
3155
|
+
export declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id) => EditorNodeInfo, rootId?: Id) => EditorNodeInfo;
|
|
2902
3156
|
/**
|
|
2903
3157
|
* 处理节点在 fixed 定位与其他定位之间的切换
|
|
2904
3158
|
* 当节点从非 fixed 变为 fixed 时,根据节点路径累加偏移量;反之则还原偏移量
|
|
@@ -2908,7 +3162,7 @@ declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id)
|
|
|
2908
3162
|
* @param getLayoutFn 获取父节点布局方式的回调函数
|
|
2909
3163
|
* @returns 处理后的节点配置(深拷贝)
|
|
2910
3164
|
*/
|
|
2911
|
-
declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
|
|
3165
|
+
export declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
|
|
2912
3166
|
/**
|
|
2913
3167
|
* 根据键盘移动的偏移量计算节点的新样式
|
|
2914
3168
|
* 仅对 absolute 或 fixed 定位的节点生效;优先修改 top/left,若未设置则修改 bottom/right
|
|
@@ -2917,7 +3171,7 @@ declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getL
|
|
|
2917
3171
|
* @param top 垂直方向偏移量(正值向下,负值向上)
|
|
2918
3172
|
* @returns 计算后的新样式对象,若节点不支持移动则返回 null
|
|
2919
3173
|
*/
|
|
2920
|
-
declare const calcMoveStyle: (style: Record<string, any>, left: number, top: number) => Record<string, any> | null;
|
|
3174
|
+
export declare const calcMoveStyle: (style: Record<string, any>, left: number, top: number) => Record<string, any> | null;
|
|
2921
3175
|
/**
|
|
2922
3176
|
* 计算节点水平居中对齐后的样式
|
|
2923
3177
|
* 流式布局(relative)下不做处理;优先通过 DOM 元素实际宽度计算,回退到配置中的 width 值
|
|
@@ -2927,7 +3181,7 @@ declare const calcMoveStyle: (style: Record<string, any>, left: number, top: num
|
|
|
2927
3181
|
* @param doc 画布 document 对象,用于获取 DOM 元素实际宽度
|
|
2928
3182
|
* @returns 计算后的新样式对象,若不支持居中则返回 null
|
|
2929
3183
|
*/
|
|
2930
|
-
declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: Layout, doc?: Document) => Record<string, any> | null;
|
|
3184
|
+
export declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: Layout, doc?: Document) => Record<string, any> | null;
|
|
2931
3185
|
/**
|
|
2932
3186
|
* 计算图层移动后的目标索引
|
|
2933
3187
|
* 流式布局与绝对定位布局的移动方向相反:流式布局中"上移"对应索引减小,绝对定位中"上移"对应索引增大
|
|
@@ -2937,22 +3191,22 @@ declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: La
|
|
|
2937
3191
|
* @param isRelative 是否为流式布局
|
|
2938
3192
|
* @returns 目标索引位置
|
|
2939
3193
|
*/
|
|
2940
|
-
declare const calcLayerTargetIndex: (currentIndex: number, offset: number | LayerOffset, brothersLength: number, isRelative: boolean) => number;
|
|
3194
|
+
export declare const calcLayerTargetIndex: (currentIndex: number, offset: number | LayerOffset, brothersLength: number, isRelative: boolean) => number;
|
|
2941
3195
|
/**
|
|
2942
3196
|
* 节点配置合并策略:用于 mergeWith 的自定义回调
|
|
2943
3197
|
* - undefined 且 source 拥有该 key 时返回空字符串
|
|
2944
3198
|
* - 原来是数组而新值是对象时,使用新值
|
|
2945
3199
|
* - 新值是数组时,直接替换而非逐元素合并
|
|
2946
3200
|
*/
|
|
2947
|
-
declare const editorNodeMergeCustomizer: (objValue: any, srcValue: any, key: string, _object: any, source: any) => object | "" | undefined;
|
|
3201
|
+
export declare const editorNodeMergeCustomizer: (objValue: any, srcValue: any, key: string, _object: any, source: any) => object | "" | undefined;
|
|
2948
3202
|
/**
|
|
2949
3203
|
* 收集复制节点关联的依赖节点,将关联节点追加到 copyNodes 数组中
|
|
2950
3204
|
* @param copyNodes 待复制的节点列表(会被就地修改)
|
|
2951
3205
|
* @param collectorOptions 依赖收集器配置
|
|
2952
3206
|
* @param getNodeById 根据 ID 获取节点的回调函数
|
|
2953
3207
|
*/
|
|
2954
|
-
declare const collectRelatedNodes: (copyNodes: MNode[], collectorOptions: TargetOptions, getNodeById: (id: Id) => MNode | null) => void;
|
|
2955
|
-
interface DragClassification {
|
|
3208
|
+
export declare const collectRelatedNodes: (copyNodes: MNode[], collectorOptions: TargetOptions, getNodeById: (id: Id) => MNode | null) => void;
|
|
3209
|
+
export interface DragClassification {
|
|
2956
3210
|
sameParentIndices: number[];
|
|
2957
3211
|
crossParentConfigs: {
|
|
2958
3212
|
config: MNode;
|
|
@@ -2968,12 +3222,12 @@ interface DragClassification {
|
|
|
2968
3222
|
* @param getNodeInfo 获取节点信息的回调
|
|
2969
3223
|
* @returns 分类结果,包含同容器索引列表和跨容器节点列表
|
|
2970
3224
|
*/
|
|
2971
|
-
declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
|
|
3225
|
+
export declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
|
|
2972
3226
|
/**
|
|
2973
3227
|
* 给「回滚」生成的新 step 用的简短描述生成器。
|
|
2974
3228
|
* 与 UI 层 `describePageStep` 同义,但避免 service 反向依赖 layouts/,故放在此工具函数中。
|
|
2975
3229
|
*/
|
|
2976
|
-
declare const describeStepForRevert: (step: StepValue) => string;
|
|
3230
|
+
export declare const describeStepForRevert: (step: StepValue) => string;
|
|
2977
3231
|
//#endregion
|
|
2978
3232
|
//#region temp/packages/editor/src/utils/operator.d.ts
|
|
2979
3233
|
/**
|
|
@@ -2982,32 +3236,52 @@ declare const describeStepForRevert: (step: StepValue) => string;
|
|
|
2982
3236
|
* @param config 待粘贴的元素配置(复制时保存的那份配置)
|
|
2983
3237
|
* @returns
|
|
2984
3238
|
*/
|
|
2985
|
-
declare const beforePaste: (position: PastePosition, config: MNode[], doc?: Document) => MNode[];
|
|
3239
|
+
export declare const beforePaste: (position: PastePosition, config: MNode[], doc?: Document) => MNode[];
|
|
2986
3240
|
/**
|
|
2987
3241
|
* 将元素粘贴到容器内时,将相对于画布坐标转换为相对于容器的坐标
|
|
2988
3242
|
* @param position PastePosition 粘贴时相对于画布的坐标
|
|
2989
3243
|
* @param id 元素id
|
|
2990
3244
|
* @returns PastePosition 转换后的坐标
|
|
2991
3245
|
*/
|
|
2992
|
-
declare const getPositionInContainer: (position: PastePosition | undefined, id: Id, doc?: Document) => {
|
|
3246
|
+
export declare const getPositionInContainer: (position: PastePosition | undefined, id: Id, doc?: Document) => {
|
|
2993
3247
|
left: number;
|
|
2994
3248
|
top: number;
|
|
2995
3249
|
};
|
|
2996
|
-
declare const getAddParent: (node: MNode) => MContainer | null | undefined;
|
|
2997
|
-
declare const getDefaultConfig: (addNode: AddMNode, parentNode: MContainer) => Promise<any>;
|
|
3250
|
+
export declare const getAddParent: (node: MNode) => MContainer | null | undefined;
|
|
3251
|
+
export declare const getDefaultConfig: (addNode: AddMNode, parentNode: MContainer) => Promise<any>;
|
|
2998
3252
|
//#endregion
|
|
2999
3253
|
//#region temp/packages/editor/src/utils/data-source/index.d.ts
|
|
3000
|
-
declare const getFormConfig: (type: string, configs: Record<string, FormConfig>) => FormConfig;
|
|
3001
|
-
declare const getFormValue: (type: string, values: Partial<DataSourceSchema>) => Partial<DataSourceSchema>;
|
|
3002
|
-
declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) => {
|
|
3254
|
+
export declare const getFormConfig: (type: string, configs: Record<string, FormConfig>) => FormConfig;
|
|
3255
|
+
export declare const getFormValue: (type: string, values: Partial<DataSourceSchema>) => Partial<DataSourceSchema>;
|
|
3256
|
+
export declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) => {
|
|
3003
3257
|
value: string;
|
|
3004
3258
|
type: "var" | "text";
|
|
3005
3259
|
}[];
|
|
3006
|
-
declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
|
|
3007
|
-
|
|
3260
|
+
export declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
|
|
3261
|
+
/**
|
|
3262
|
+
* 按字段名路径下钻 DataSchema。
|
|
3263
|
+
* @param skipNumberIndices 为 true 时跳过数字段(模板路径中的数组下标,如 arr[0].x)
|
|
3264
|
+
* @param allowArrayIndex 为 true 时识别数组下标。`number` 只能是下标;数字字符串先按当前层字段名匹配,没有同名字段时才当中下标
|
|
3265
|
+
*/
|
|
3266
|
+
export declare const resolveFieldByPath: (fields: DataSchema[] | undefined, fieldNames: Array<string | number>, options?: {
|
|
3267
|
+
skipNumberIndices?: boolean;
|
|
3268
|
+
allowArrayIndex?: boolean;
|
|
3269
|
+
}) => {
|
|
3270
|
+
ok: boolean;
|
|
3271
|
+
field?: DataSchema;
|
|
3272
|
+
fields: DataSchema[];
|
|
3273
|
+
failedName?: string;
|
|
3274
|
+
/** number 下标没有紧跟在数组字段后面 */
|
|
3275
|
+
invalidArrayIndex?: boolean;
|
|
3276
|
+
/** 路径停在数组下标上,当前值是数组元素 */
|
|
3277
|
+
arrayElement?: boolean;
|
|
3278
|
+
/** 数组没有子字段,元素类型未知 */
|
|
3279
|
+
untypedArrayElement?: boolean;
|
|
3280
|
+
};
|
|
3281
|
+
export declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: Array<string | number>) => "" | DataSourceFieldType;
|
|
3008
3282
|
//#endregion
|
|
3009
3283
|
//#region temp/packages/editor/src/utils/dep/idle-task.d.ts
|
|
3010
|
-
interface IdleTaskEvents {
|
|
3284
|
+
export interface IdleTaskEvents {
|
|
3011
3285
|
finish: [];
|
|
3012
3286
|
'hight-level-finish': [];
|
|
3013
3287
|
'update-task-length': [{
|
|
@@ -3015,7 +3289,7 @@ interface IdleTaskEvents {
|
|
|
3015
3289
|
hightLevelLength: number;
|
|
3016
3290
|
}];
|
|
3017
3291
|
}
|
|
3018
|
-
declare class IdleTask<T = any> extends EventEmitter
|
|
3292
|
+
export declare class IdleTask<T = any> extends EventEmitter {
|
|
3019
3293
|
private taskList;
|
|
3020
3294
|
private hightLevelTaskList;
|
|
3021
3295
|
private taskHandle;
|
|
@@ -3026,6 +3300,17 @@ declare class IdleTask<T = any> extends EventEmitter$1 {
|
|
|
3026
3300
|
once<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
3027
3301
|
emit<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
3028
3302
|
private runTaskQueue;
|
|
3303
|
+
/**
|
|
3304
|
+
* 执行一批任务,队列被清空时提前结束
|
|
3305
|
+
*/
|
|
3306
|
+
private runTaskBatch;
|
|
3307
|
+
/**
|
|
3308
|
+
* 单个任务失败不能中断整个队列,否则后续任务永远不会被执行,
|
|
3309
|
+
* 依赖收集会停在半路(收集中状态与剩余任务数都不再变化)
|
|
3310
|
+
*/
|
|
3311
|
+
private runTask;
|
|
3312
|
+
private finishRun;
|
|
3313
|
+
private getTaskLength;
|
|
3029
3314
|
}
|
|
3030
3315
|
//#endregion
|
|
3031
3316
|
//#region temp/packages/editor/src/utils/scroll-viewer.d.ts
|
|
@@ -3038,7 +3323,7 @@ interface ScrollViewerOptions {
|
|
|
3038
3323
|
height: number;
|
|
3039
3324
|
};
|
|
3040
3325
|
}
|
|
3041
|
-
declare class ScrollViewer extends EventEmitter
|
|
3326
|
+
export declare class ScrollViewer extends EventEmitter {
|
|
3042
3327
|
private container;
|
|
3043
3328
|
private target;
|
|
3044
3329
|
private zoom;
|
|
@@ -3055,10 +3340,7 @@ declare class ScrollViewer extends EventEmitter$1 {
|
|
|
3055
3340
|
constructor(options: ScrollViewerOptions);
|
|
3056
3341
|
destroy(): void;
|
|
3057
3342
|
setZoom(zoom: number): void;
|
|
3058
|
-
scrollTo({
|
|
3059
|
-
left,
|
|
3060
|
-
top
|
|
3061
|
-
}: {
|
|
3343
|
+
scrollTo({ left, top }: {
|
|
3062
3344
|
left?: number;
|
|
3063
3345
|
top?: number;
|
|
3064
3346
|
}): void;
|
|
@@ -3069,9 +3351,9 @@ declare class ScrollViewer extends EventEmitter$1 {
|
|
|
3069
3351
|
}
|
|
3070
3352
|
//#endregion
|
|
3071
3353
|
//#region temp/packages/editor/src/utils/tree.d.ts
|
|
3072
|
-
declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, status: Partial<LayerNodeStatus>) => void;
|
|
3354
|
+
export declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, status: Partial<LayerNodeStatus>) => void;
|
|
3073
3355
|
/** 默认的组件树节点是否可展开的判断函数:当节点的子项中至少存在一个可见节点时认为可展开 */
|
|
3074
|
-
declare const defaultIsExpandable: IsExpandableFunction;
|
|
3356
|
+
export declare const defaultIsExpandable: IsExpandableFunction;
|
|
3075
3357
|
//#endregion
|
|
3076
3358
|
//#region temp/packages/editor/src/utils/indexed-db.d.ts
|
|
3077
3359
|
/**
|
|
@@ -3079,20 +3361,20 @@ declare const defaultIsExpandable: IsExpandableFunction;
|
|
|
3079
3361
|
* 仅用于浏览器环境;在不支持 IndexedDB 的环境(如 SSR / 部分测试环境)下会 reject。
|
|
3080
3362
|
*/
|
|
3081
3363
|
/** 是否处于支持 IndexedDB 的环境。 */
|
|
3082
|
-
declare const isIndexedDBSupported: () => boolean;
|
|
3364
|
+
export declare const isIndexedDBSupported: () => boolean;
|
|
3083
3365
|
/**
|
|
3084
3366
|
* 打开(必要时升级)数据库,确保目标 objectStore 存在后返回连接。
|
|
3085
3367
|
*
|
|
3086
3368
|
* 由于 objectStore 只能在 `onupgradeneeded` 内创建,这里先以当前版本打开,
|
|
3087
3369
|
* 若发现 store 不存在则关闭连接、以更高版本重开来按需创建,兼容动态 storeName。
|
|
3088
3370
|
*/
|
|
3089
|
-
declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
|
|
3371
|
+
export declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
|
|
3090
3372
|
/** 写入(覆盖)一条记录。value 通过结构化克隆存储,支持 Map / Set 等结构。 */
|
|
3091
|
-
declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
|
|
3373
|
+
export declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
|
|
3092
3374
|
/** 读取一条记录,不存在时返回 undefined。 */
|
|
3093
|
-
declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
|
|
3375
|
+
export declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
|
|
3094
3376
|
/** 删除一条记录。 */
|
|
3095
|
-
declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
|
|
3377
|
+
export declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
|
|
3096
3378
|
//#endregion
|
|
3097
3379
|
//#region temp/packages/editor/src/utils/history.d.ts
|
|
3098
3380
|
/**
|
|
@@ -3104,15 +3386,11 @@ declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) =
|
|
|
3104
3386
|
* @param diff 单条变更 diff(缺省视为空)
|
|
3105
3387
|
* @param getLabel 从快照取展示名
|
|
3106
3388
|
*/
|
|
3107
|
-
declare const describeRevertStep: <T extends object>(id: Id, {
|
|
3108
|
-
oldSchema,
|
|
3109
|
-
newSchema,
|
|
3110
|
-
changeRecords
|
|
3111
|
-
}: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
|
|
3389
|
+
export declare const describeRevertStep: <T extends object>(id: Id, { oldSchema, newSchema, changeRecords }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
|
|
3112
3390
|
/**
|
|
3113
3391
|
* 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
|
|
3114
3392
|
*/
|
|
3115
|
-
declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
|
|
3393
|
+
export declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
|
|
3116
3394
|
/**
|
|
3117
3395
|
* 构造一条代码块 / 数据源「按 id 分栈」的历史记录:两者除 payload 字段命名外完全一致。
|
|
3118
3396
|
*
|
|
@@ -3121,13 +3399,14 @@ declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "
|
|
|
3121
3399
|
* - 仅负责构造 step 并返回,入栈与事件 emit 由统一的 history.push(stepType, step, id) 处理。
|
|
3122
3400
|
* - 不直接驱动业务 service,调用方负责实际写回。
|
|
3123
3401
|
*/
|
|
3124
|
-
declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
|
|
3402
|
+
export declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
|
|
3125
3403
|
oldValue: T | null;
|
|
3126
3404
|
newValue: T | null;
|
|
3127
|
-
changeRecords?: ChangeRecord[];
|
|
3405
|
+
changeRecords?: ChangeRecord[];
|
|
3406
|
+
/** 展示名(缺省时从快照 name / title 推断)。 */
|
|
3128
3407
|
name?: string;
|
|
3129
3408
|
}) => S | null;
|
|
3130
|
-
declare const markStackSaved: <S extends {
|
|
3409
|
+
export declare const markStackSaved: <S extends {
|
|
3131
3410
|
saved?: boolean;
|
|
3132
3411
|
}>(undoRedo?: UndoRedo<S>) => void;
|
|
3133
3412
|
/**
|
|
@@ -3138,16 +3417,16 @@ declare const markStackSaved: <S extends {
|
|
|
3138
3417
|
*
|
|
3139
3418
|
* 各类型行为完全一致,仅 `kind` 与 step 快照类型不同,统一由本方法处理。
|
|
3140
3419
|
*/
|
|
3141
|
-
declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
|
|
3420
|
+
export declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
|
|
3142
3421
|
/**
|
|
3143
3422
|
* 解析 step 中的"目标 id"用于合并:
|
|
3144
3423
|
* - 单实体 update:取唯一一项 diff 的快照 id;快照无 id 时(如 CodeBlockContent)回退到 `step.data.id`
|
|
3145
3424
|
* (即资源 id),使代码块 / 数据源同样能按资源合并相邻 update;
|
|
3146
3425
|
* - 其它情形(多实体 update / add / remove):返回 undefined,表示不参与合并。
|
|
3147
3426
|
*/
|
|
3148
|
-
declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
|
|
3427
|
+
export declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
|
|
3149
3428
|
/** 解析 step 中的目标可读名(用于 UI 展示)。 */
|
|
3150
|
-
declare const detectTargetName: (step: BaseStepValue) => string | undefined;
|
|
3429
|
+
export declare const detectTargetName: (step: BaseStepValue) => string | undefined;
|
|
3151
3430
|
/**
|
|
3152
3431
|
* 把 `Record<Id, UndoRedo>` 整体序列化为 `Record<Id, SerializedUndoRedo>`。
|
|
3153
3432
|
*
|
|
@@ -3156,7 +3435,7 @@ declare const detectTargetName: (step: BaseStepValue) => string | undefined;
|
|
|
3156
3435
|
* 这样既能写入函数,又避免序列化整份快照的开销;读取时再由 {@link parseStacksStepDiff} 还原 diff。
|
|
3157
3436
|
* 不含 `diff` 的元素(如通用栈)原样透传。
|
|
3158
3437
|
*/
|
|
3159
|
-
declare const serializeStacks: <T extends {
|
|
3438
|
+
export declare const serializeStacks: <T extends {
|
|
3160
3439
|
diff?: unknown;
|
|
3161
3440
|
}>(stacks: Record<Id, UndoRedo<T>>) => Record<Id, SerializedUndoRedo<T>>;
|
|
3162
3441
|
/**
|
|
@@ -3166,38 +3445,97 @@ declare const serializeStacks: <T extends {
|
|
|
3166
3445
|
* 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
|
|
3167
3446
|
* 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
|
|
3168
3447
|
*/
|
|
3169
|
-
declare const deserializeStacks: <T extends {
|
|
3448
|
+
export declare const deserializeStacks: <T extends {
|
|
3170
3449
|
saved?: boolean;
|
|
3171
3450
|
}>(stacks?: Record<Id, ReturnType<UndoRedo<T>["serialize"]>>, parse?: (serialized: string) => unknown) => Record<Id, UndoRedo<T>>;
|
|
3172
3451
|
/**
|
|
3173
3452
|
* 按 id 从「按 id 分栈」的记录表(代码块 / 数据源)中获取(或创建)对应的 UndoRedo 栈。
|
|
3174
3453
|
*/
|
|
3175
|
-
declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
|
|
3454
|
+
export declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
|
|
3176
3455
|
/**
|
|
3177
3456
|
* 撤销下限:当栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
|
|
3178
3457
|
* 适用于所有历史类型(page / codeBlock / dataSource / 扩展),把 cursor 钉在基线之上,
|
|
3179
3458
|
* 保证 undo / canUndo / goto 都不会越过初始基线。
|
|
3180
3459
|
*/
|
|
3181
|
-
declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
|
|
3460
|
+
export declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
|
|
3182
3461
|
/** 将单次 push 产生的 history uuid(或 null)转为 *AndGetHistoryId 返回用的 uuid 列表。 */
|
|
3183
|
-
declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
|
|
3462
|
+
export declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
|
|
3184
3463
|
//#endregion
|
|
3185
3464
|
//#region temp/packages/editor/src/utils/const.d.ts
|
|
3186
3465
|
/** 当uiService.get('uiSelectMode')为true,点击组件(包括任何形式,组件树/画布)时触发的事件名 */
|
|
3187
|
-
declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
|
|
3188
|
-
declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
3189
|
-
declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
3190
|
-
declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
3191
|
-
declare const DEFAULT_LEFT_COLUMN_WIDTH =
|
|
3192
|
-
declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
3193
|
-
declare const MIN_LEFT_COLUMN_WIDTH =
|
|
3194
|
-
declare const MIN_CENTER_COLUMN_WIDTH = 400;
|
|
3195
|
-
declare const MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
3196
|
-
declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
3197
|
-
declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
3466
|
+
export declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
|
|
3467
|
+
export declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
3468
|
+
export declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
3469
|
+
export declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
3470
|
+
export declare const DEFAULT_LEFT_COLUMN_WIDTH = 345;
|
|
3471
|
+
export declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
3472
|
+
export declare const MIN_LEFT_COLUMN_WIDTH = 345;
|
|
3473
|
+
export declare const MIN_CENTER_COLUMN_WIDTH = 400;
|
|
3474
|
+
export declare const MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
3475
|
+
export declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
3476
|
+
export declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
3477
|
+
//#endregion
|
|
3478
|
+
//#region temp/packages/editor/src/utils/type-match-rules.d.ts
|
|
3479
|
+
export declare const ALL_COND_OPS: Set<string>;
|
|
3480
|
+
export type ValidateDataSourceFieldSelectOptions = {
|
|
3481
|
+
/**
|
|
3482
|
+
* 覆盖「非数据源字段路径」时的校验。
|
|
3483
|
+
* 不传则按 fieldConfig 走内置 typeMatch(与表单项自身 typeMatch 行为一致)。
|
|
3484
|
+
*/
|
|
3485
|
+
validatePlainValue?: (value: any, context: TypeMatchValidateContext) => string | undefined | Promise<string | undefined>;
|
|
3486
|
+
};
|
|
3487
|
+
/**
|
|
3488
|
+
* data-source-field-select 的 typeMatch 校验逻辑,可供自定义 rules.validator 复用。
|
|
3489
|
+
*/
|
|
3490
|
+
export declare const validateDataSourceFieldSelect: (value: any, context: TypeMatchValidateContext, options?: ValidateDataSourceFieldSelectOptions) => string | undefined | Promise<string | undefined>;
|
|
3491
|
+
export declare const editorTypeMatchRules: Record<string, TypeMatchValidator>;
|
|
3492
|
+
//#endregion
|
|
3493
|
+
//#region temp/packages/editor/src/utils/event.d.ts
|
|
3494
|
+
export declare const EVENT_NAME_VALUE_SEPARATOR = ".";
|
|
3495
|
+
export type EventNameSelectOption = {
|
|
3496
|
+
text: string;
|
|
3497
|
+
value: string;
|
|
3498
|
+
};
|
|
3499
|
+
export type EventNameOption = EventOption | CascaderOption | EventNameSelectOption;
|
|
3500
|
+
/** 与 EventSelect 中 checkStrictly 一致:component 为 false,其余为 true */
|
|
3501
|
+
export declare const isEventNameCheckStrictly: (src?: string) => boolean;
|
|
3502
|
+
/** 将动作 method 值规范为与 collectEventNameOptionValues 一致的字符串(cascader 无 valueSeparator 时存数组) */
|
|
3503
|
+
export declare const normalizeCompActionValue: (value: unknown) => string;
|
|
3504
|
+
/**
|
|
3505
|
+
* 组装事件名称下拉/级联 options,与 EventSelect 默认 eventNameConfig.options 逻辑一致。
|
|
3506
|
+
*/
|
|
3507
|
+
export declare const getEventNameOptions: (src: string | undefined, formValue?: Record<string, any>) => EventNameOption[];
|
|
3508
|
+
/** 将 select / cascader options 展平为最终写入 name 的字符串集合(cascader 用 `.` 拼接) */
|
|
3509
|
+
export declare const collectEventNameOptionValues: (options: EventNameOption[], checkStrictly: boolean, prefix?: any[], result?: Set<string>) => Set<string>;
|
|
3510
|
+
/**
|
|
3511
|
+
* 解析 event-select 允许的 name 集合。
|
|
3512
|
+
* 自定义 eventNameConfig.options 时返回 null(跳过枚举校验)。
|
|
3513
|
+
*/
|
|
3514
|
+
export declare const getEventNameAllowedValues: (config?: {
|
|
3515
|
+
src?: string;
|
|
3516
|
+
eventNameConfig?: {
|
|
3517
|
+
options?: unknown;
|
|
3518
|
+
};
|
|
3519
|
+
}, formValue?: Record<string, any>) => Set<string> | null;
|
|
3520
|
+
/**
|
|
3521
|
+
* 组装联动组件动作下拉/级联 options,与 EventSelect 默认 compActionConfig.options 逻辑一致。
|
|
3522
|
+
*/
|
|
3523
|
+
export declare const getCompActionOptions: (toId?: Id) => EventNameOption[];
|
|
3524
|
+
/**
|
|
3525
|
+
* 解析 event-select 联动组件动作允许的 method 集合。
|
|
3526
|
+
* 自定义 compActionConfig.options 时返回 null(跳过枚举校验)。
|
|
3527
|
+
*/
|
|
3528
|
+
export declare const getCompActionAllowedValues: (config?: {
|
|
3529
|
+
src?: string;
|
|
3530
|
+
compActionConfig?: {
|
|
3531
|
+
options?: unknown;
|
|
3532
|
+
};
|
|
3533
|
+
}, model?: {
|
|
3534
|
+
to?: Id;
|
|
3535
|
+
}) => Set<string> | null;
|
|
3198
3536
|
//#endregion
|
|
3199
3537
|
//#region temp/packages/editor/src/utils/monaco-editor.d.ts
|
|
3200
|
-
declare const _default$
|
|
3538
|
+
declare const _default$49: () => Promise<typeof import("monaco-editor")>;
|
|
3201
3539
|
//#endregion
|
|
3202
3540
|
//#region temp/packages/form/src/schema.d.ts
|
|
3203
3541
|
interface ChangeRecord$1 {
|
|
@@ -3228,14 +3566,8 @@ interface FormSlots {
|
|
|
3228
3566
|
//#endregion
|
|
3229
3567
|
//#region temp/packages/editor/src/editorProps.d.ts
|
|
3230
3568
|
interface EditorProps {
|
|
3231
|
-
/**
|
|
3232
|
-
|
|
3233
|
-
*
|
|
3234
|
-
* 设置后会在编辑器根元素上追加 `m-editor--<theme>` 修饰类,配合按需引入
|
|
3235
|
-
* `@tmagic/editor/dist/themes/<theme>.css` 即可启用主题样式。
|
|
3236
|
-
*
|
|
3237
|
-
* 例如:`<MEditor theme="magic-admin" />` + `import '@tmagic/editor/dist/themes/magic-admin.css'`。
|
|
3238
|
-
*/
|
|
3569
|
+
/** 是否是大屏模拟器容器,大屏容器时,左侧属性面板会扩展为两列(正常3列),颜色表单不扩展两列等 */
|
|
3570
|
+
isLargeStageContainer?: boolean;
|
|
3239
3571
|
theme?: string;
|
|
3240
3572
|
/** 页面初始值 */
|
|
3241
3573
|
modelValue?: MApp;
|
|
@@ -3286,6 +3618,11 @@ interface EditorProps {
|
|
|
3286
3618
|
containerHighlightDuration?: number;
|
|
3287
3619
|
/** 拖入画布中容器时,识别容器的操作类型 */
|
|
3288
3620
|
containerHighlightType?: ContainerHighlightType;
|
|
3621
|
+
/**
|
|
3622
|
+
* 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
|
|
3623
|
+
* 开启后在画布中拖动已有组件不会识别容器,默认 false
|
|
3624
|
+
*/
|
|
3625
|
+
containerHighlightAddOnly?: boolean;
|
|
3289
3626
|
/** 画布大小 */
|
|
3290
3627
|
stageRect?: StageRect;
|
|
3291
3628
|
/** monaco editor 的配置 */
|
|
@@ -3309,6 +3646,11 @@ interface EditorProps {
|
|
|
3309
3646
|
disabledFlashTip?: boolean;
|
|
3310
3647
|
/** 禁用双击在浮层中单独编辑选中组件 */
|
|
3311
3648
|
disabledStageOverlay?: boolean;
|
|
3649
|
+
/**
|
|
3650
|
+
* 是否启用「属性配置表单校验」联动能力:开启后属性/样式表单校验失败时仍更新节点,
|
|
3651
|
+
* 并把错误信息集中记录到 editorService,用于组件树标红提示与保存拦截;默认 false(关闭)。
|
|
3652
|
+
*/
|
|
3653
|
+
enablePropsFormValidate?: boolean;
|
|
3312
3654
|
/** 禁用属性配置面板右下角显示源码的按钮 */
|
|
3313
3655
|
disabledShowSrc?: boolean;
|
|
3314
3656
|
/** 禁用数据源 */
|
|
@@ -3345,7 +3687,6 @@ interface EditorProps {
|
|
|
3345
3687
|
beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
|
|
3346
3688
|
/** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
3347
3689
|
beforeLayerNodeDblclick?: (event: MouseEvent, data: TreeNodeData) => Promise<boolean | void> | boolean | void;
|
|
3348
|
-
extendFormState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3349
3690
|
/** 历史记录面板的自定义扩展 tab,追加在内置的页面/数据源/代码块 tab 之后 */
|
|
3350
3691
|
historyListExtraTabs?: HistoryListExtraTab[];
|
|
3351
3692
|
/** 页面顺序拖拽配置参数 */
|
|
@@ -3368,11 +3709,10 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3368
3709
|
readonly disabledShowSrc?: boolean | undefined;
|
|
3369
3710
|
readonly labelWidth?: string | undefined;
|
|
3370
3711
|
readonly codeValueKey?: string | undefined;
|
|
3371
|
-
readonly labelPosition?:
|
|
3372
|
-
readonly
|
|
3712
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
3713
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3373
3714
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3374
3715
|
readonly onUnmounted?: (() => any) | undefined;
|
|
3375
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3376
3716
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3377
3717
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
3378
3718
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -3386,7 +3726,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3386
3726
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3387
3727
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3388
3728
|
$host: Element | null;
|
|
3389
|
-
$emit: ((event: "
|
|
3729
|
+
$emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
|
|
3390
3730
|
$el: any;
|
|
3391
3731
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
3392
3732
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -3394,12 +3734,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3394
3734
|
disabledShowSrc?: boolean;
|
|
3395
3735
|
labelWidth?: string;
|
|
3396
3736
|
codeValueKey?: string;
|
|
3397
|
-
labelPosition?:
|
|
3398
|
-
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3737
|
+
labelPosition?: "top" | "left" | "right";
|
|
3399
3738
|
}> & Readonly<{
|
|
3739
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3400
3740
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3401
3741
|
onUnmounted?: (() => any) | undefined;
|
|
3402
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3403
3742
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3404
3743
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3405
3744
|
}>, {
|
|
@@ -3413,16 +3752,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3413
3752
|
readonly isCompare?: boolean | undefined;
|
|
3414
3753
|
readonly parentValues?: Record<string, any> | undefined;
|
|
3415
3754
|
readonly labelWidth?: string | undefined;
|
|
3755
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
3756
|
+
readonly validateOnInit?: boolean | undefined;
|
|
3416
3757
|
readonly disabled?: boolean | undefined;
|
|
3417
3758
|
readonly height?: string | undefined;
|
|
3418
3759
|
readonly stepActive?: string | number | undefined;
|
|
3419
3760
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
3420
3761
|
readonly inline?: boolean | undefined;
|
|
3421
|
-
readonly labelPosition?:
|
|
3762
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
3422
3763
|
readonly keyProp?: string | undefined;
|
|
3423
3764
|
readonly popperClass?: string | undefined;
|
|
3424
3765
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
3425
|
-
readonly
|
|
3766
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
3767
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
3426
3768
|
readonly showDiff?: ((_data: {
|
|
3427
3769
|
curValue: any;
|
|
3428
3770
|
lastValue: any;
|
|
@@ -3455,16 +3797,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3455
3797
|
isCompare?: boolean;
|
|
3456
3798
|
parentValues?: Record<string, any>;
|
|
3457
3799
|
labelWidth?: string;
|
|
3800
|
+
typeMatchValid?: boolean;
|
|
3801
|
+
validateOnInit?: boolean;
|
|
3458
3802
|
disabled?: boolean;
|
|
3459
3803
|
height?: string;
|
|
3460
3804
|
stepActive?: string | number;
|
|
3461
3805
|
size?: "small" | "default" | "large";
|
|
3462
3806
|
inline?: boolean;
|
|
3463
|
-
labelPosition?:
|
|
3807
|
+
labelPosition?: "top" | "left" | "right";
|
|
3464
3808
|
keyProp?: string;
|
|
3465
3809
|
popperClass?: string;
|
|
3466
3810
|
preventSubmitDefault?: boolean;
|
|
3467
|
-
|
|
3811
|
+
useFieldTextInError?: boolean;
|
|
3812
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
3468
3813
|
showDiff?: (_data: {
|
|
3469
3814
|
curValue: any;
|
|
3470
3815
|
lastValue: any;
|
|
@@ -3487,6 +3832,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3487
3832
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3488
3833
|
resetForm: () => void;
|
|
3489
3834
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3835
|
+
validate: () => Promise<string>;
|
|
3490
3836
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3491
3837
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3492
3838
|
error: (...args: any[]) => void;
|
|
@@ -3498,7 +3844,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3498
3844
|
disabled: boolean;
|
|
3499
3845
|
labelWidth: string;
|
|
3500
3846
|
inline: boolean;
|
|
3501
|
-
labelPosition:
|
|
3847
|
+
labelPosition: "top" | "left" | "right";
|
|
3502
3848
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3503
3849
|
height: string;
|
|
3504
3850
|
initValues: Record<string, any>;
|
|
@@ -3506,7 +3852,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3506
3852
|
isCompare: boolean;
|
|
3507
3853
|
keyProp: string;
|
|
3508
3854
|
parentValues: Record<string, any>;
|
|
3855
|
+
useFieldTextInError: boolean;
|
|
3509
3856
|
stepActive: string | number;
|
|
3857
|
+
validateOnInit: boolean;
|
|
3510
3858
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3511
3859
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3512
3860
|
created?: (() => void) | (() => void)[];
|
|
@@ -3531,7 +3879,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3531
3879
|
disabled: boolean;
|
|
3532
3880
|
labelWidth: string;
|
|
3533
3881
|
inline: boolean;
|
|
3534
|
-
labelPosition:
|
|
3882
|
+
labelPosition: "top" | "left" | "right";
|
|
3535
3883
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3536
3884
|
height: string;
|
|
3537
3885
|
initValues: Record<string, any>;
|
|
@@ -3539,7 +3887,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3539
3887
|
isCompare: boolean;
|
|
3540
3888
|
keyProp: string;
|
|
3541
3889
|
parentValues: Record<string, any>;
|
|
3890
|
+
useFieldTextInError: boolean;
|
|
3542
3891
|
stepActive: string | number;
|
|
3892
|
+
validateOnInit: boolean;
|
|
3543
3893
|
}> & Omit<Readonly<{
|
|
3544
3894
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3545
3895
|
initValues: Record<string, any>;
|
|
@@ -3547,16 +3897,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3547
3897
|
isCompare?: boolean;
|
|
3548
3898
|
parentValues?: Record<string, any>;
|
|
3549
3899
|
labelWidth?: string;
|
|
3900
|
+
typeMatchValid?: boolean;
|
|
3901
|
+
validateOnInit?: boolean;
|
|
3550
3902
|
disabled?: boolean;
|
|
3551
3903
|
height?: string;
|
|
3552
3904
|
stepActive?: string | number;
|
|
3553
3905
|
size?: "small" | "default" | "large";
|
|
3554
3906
|
inline?: boolean;
|
|
3555
|
-
labelPosition?:
|
|
3907
|
+
labelPosition?: "top" | "left" | "right";
|
|
3556
3908
|
keyProp?: string;
|
|
3557
3909
|
popperClass?: string;
|
|
3558
3910
|
preventSubmitDefault?: boolean;
|
|
3559
|
-
|
|
3911
|
+
useFieldTextInError?: boolean;
|
|
3912
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
3560
3913
|
showDiff?: (_data: {
|
|
3561
3914
|
curValue: any;
|
|
3562
3915
|
lastValue: any;
|
|
@@ -3570,7 +3923,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3570
3923
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
3571
3924
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3572
3925
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3573
|
-
}>, "values" | "changeHandler" | "
|
|
3926
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
3574
3927
|
values: import("@tmagic/form-schema").FormValue;
|
|
3575
3928
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
3576
3929
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -3579,15 +3932,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3579
3932
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3580
3933
|
resetForm: () => void;
|
|
3581
3934
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3935
|
+
validate: () => Promise<string>;
|
|
3582
3936
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3583
3937
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
3584
3938
|
$slots: FormSlots;
|
|
3585
3939
|
}) | null>>;
|
|
3586
3940
|
submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
|
|
3587
3941
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3942
|
+
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
|
|
3588
3943
|
mounted: (internalInstance: any) => any;
|
|
3589
3944
|
unmounted: () => any;
|
|
3590
|
-
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
|
|
3591
3945
|
"submit-error": (e: any) => any;
|
|
3592
3946
|
"form-error": (e: any) => any;
|
|
3593
3947
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -3616,12 +3970,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3616
3970
|
disabledShowSrc?: boolean;
|
|
3617
3971
|
labelWidth?: string;
|
|
3618
3972
|
codeValueKey?: string;
|
|
3619
|
-
labelPosition?:
|
|
3620
|
-
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3973
|
+
labelPosition?: "top" | "left" | "right";
|
|
3621
3974
|
}> & Readonly<{
|
|
3975
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3622
3976
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3623
3977
|
onUnmounted?: (() => any) | undefined;
|
|
3624
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3625
3978
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3626
3979
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3627
3980
|
}>, "submit" | "configForm"> & {
|
|
@@ -3635,16 +3988,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3635
3988
|
readonly isCompare?: boolean | undefined;
|
|
3636
3989
|
readonly parentValues?: Record<string, any> | undefined;
|
|
3637
3990
|
readonly labelWidth?: string | undefined;
|
|
3991
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
3992
|
+
readonly validateOnInit?: boolean | undefined;
|
|
3638
3993
|
readonly disabled?: boolean | undefined;
|
|
3639
3994
|
readonly height?: string | undefined;
|
|
3640
3995
|
readonly stepActive?: string | number | undefined;
|
|
3641
3996
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
3642
3997
|
readonly inline?: boolean | undefined;
|
|
3643
|
-
readonly labelPosition?:
|
|
3998
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
3644
3999
|
readonly keyProp?: string | undefined;
|
|
3645
4000
|
readonly popperClass?: string | undefined;
|
|
3646
4001
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
3647
|
-
readonly
|
|
4002
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4003
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
3648
4004
|
readonly showDiff?: ((_data: {
|
|
3649
4005
|
curValue: any;
|
|
3650
4006
|
lastValue: any;
|
|
@@ -3677,16 +4033,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3677
4033
|
isCompare?: boolean;
|
|
3678
4034
|
parentValues?: Record<string, any>;
|
|
3679
4035
|
labelWidth?: string;
|
|
4036
|
+
typeMatchValid?: boolean;
|
|
4037
|
+
validateOnInit?: boolean;
|
|
3680
4038
|
disabled?: boolean;
|
|
3681
4039
|
height?: string;
|
|
3682
4040
|
stepActive?: string | number;
|
|
3683
4041
|
size?: "small" | "default" | "large";
|
|
3684
4042
|
inline?: boolean;
|
|
3685
|
-
labelPosition?:
|
|
4043
|
+
labelPosition?: "top" | "left" | "right";
|
|
3686
4044
|
keyProp?: string;
|
|
3687
4045
|
popperClass?: string;
|
|
3688
4046
|
preventSubmitDefault?: boolean;
|
|
3689
|
-
|
|
4047
|
+
useFieldTextInError?: boolean;
|
|
4048
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
3690
4049
|
showDiff?: (_data: {
|
|
3691
4050
|
curValue: any;
|
|
3692
4051
|
lastValue: any;
|
|
@@ -3709,6 +4068,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3709
4068
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3710
4069
|
resetForm: () => void;
|
|
3711
4070
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4071
|
+
validate: () => Promise<string>;
|
|
3712
4072
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3713
4073
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3714
4074
|
error: (...args: any[]) => void;
|
|
@@ -3720,7 +4080,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3720
4080
|
disabled: boolean;
|
|
3721
4081
|
labelWidth: string;
|
|
3722
4082
|
inline: boolean;
|
|
3723
|
-
labelPosition:
|
|
4083
|
+
labelPosition: "top" | "left" | "right";
|
|
3724
4084
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3725
4085
|
height: string;
|
|
3726
4086
|
initValues: Record<string, any>;
|
|
@@ -3728,7 +4088,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3728
4088
|
isCompare: boolean;
|
|
3729
4089
|
keyProp: string;
|
|
3730
4090
|
parentValues: Record<string, any>;
|
|
4091
|
+
useFieldTextInError: boolean;
|
|
3731
4092
|
stepActive: string | number;
|
|
4093
|
+
validateOnInit: boolean;
|
|
3732
4094
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3733
4095
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3734
4096
|
created?: (() => void) | (() => void)[];
|
|
@@ -3753,7 +4115,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3753
4115
|
disabled: boolean;
|
|
3754
4116
|
labelWidth: string;
|
|
3755
4117
|
inline: boolean;
|
|
3756
|
-
labelPosition:
|
|
4118
|
+
labelPosition: "top" | "left" | "right";
|
|
3757
4119
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3758
4120
|
height: string;
|
|
3759
4121
|
initValues: Record<string, any>;
|
|
@@ -3761,7 +4123,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3761
4123
|
isCompare: boolean;
|
|
3762
4124
|
keyProp: string;
|
|
3763
4125
|
parentValues: Record<string, any>;
|
|
4126
|
+
useFieldTextInError: boolean;
|
|
3764
4127
|
stepActive: string | number;
|
|
4128
|
+
validateOnInit: boolean;
|
|
3765
4129
|
}> & Omit<Readonly<{
|
|
3766
4130
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3767
4131
|
initValues: Record<string, any>;
|
|
@@ -3769,16 +4133,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3769
4133
|
isCompare?: boolean;
|
|
3770
4134
|
parentValues?: Record<string, any>;
|
|
3771
4135
|
labelWidth?: string;
|
|
4136
|
+
typeMatchValid?: boolean;
|
|
4137
|
+
validateOnInit?: boolean;
|
|
3772
4138
|
disabled?: boolean;
|
|
3773
4139
|
height?: string;
|
|
3774
4140
|
stepActive?: string | number;
|
|
3775
4141
|
size?: "small" | "default" | "large";
|
|
3776
4142
|
inline?: boolean;
|
|
3777
|
-
labelPosition?:
|
|
4143
|
+
labelPosition?: "top" | "left" | "right";
|
|
3778
4144
|
keyProp?: string;
|
|
3779
4145
|
popperClass?: string;
|
|
3780
4146
|
preventSubmitDefault?: boolean;
|
|
3781
|
-
|
|
4147
|
+
useFieldTextInError?: boolean;
|
|
4148
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
3782
4149
|
showDiff?: (_data: {
|
|
3783
4150
|
curValue: any;
|
|
3784
4151
|
lastValue: any;
|
|
@@ -3792,7 +4159,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3792
4159
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
3793
4160
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3794
4161
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3795
|
-
}>, "values" | "changeHandler" | "
|
|
4162
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
3796
4163
|
values: import("@tmagic/form-schema").FormValue;
|
|
3797
4164
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
3798
4165
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -3801,6 +4168,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3801
4168
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3802
4169
|
resetForm: () => void;
|
|
3803
4170
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4171
|
+
validate: () => Promise<string>;
|
|
3804
4172
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3805
4173
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
3806
4174
|
$slots: FormSlots;
|
|
@@ -3826,11 +4194,10 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3826
4194
|
readonly disabledShowSrc?: boolean | undefined;
|
|
3827
4195
|
readonly labelWidth?: string | undefined;
|
|
3828
4196
|
readonly codeValueKey?: string | undefined;
|
|
3829
|
-
readonly labelPosition?:
|
|
3830
|
-
readonly
|
|
4197
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
4198
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3831
4199
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3832
4200
|
readonly onUnmounted?: (() => any) | undefined;
|
|
3833
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3834
4201
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3835
4202
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
3836
4203
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -3844,7 +4211,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3844
4211
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3845
4212
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3846
4213
|
$host: Element | null;
|
|
3847
|
-
$emit: ((event: "
|
|
4214
|
+
$emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
|
|
3848
4215
|
$el: any;
|
|
3849
4216
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
3850
4217
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -3852,12 +4219,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3852
4219
|
disabledShowSrc?: boolean;
|
|
3853
4220
|
labelWidth?: string;
|
|
3854
4221
|
codeValueKey?: string;
|
|
3855
|
-
labelPosition?:
|
|
3856
|
-
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4222
|
+
labelPosition?: "top" | "left" | "right";
|
|
3857
4223
|
}> & Readonly<{
|
|
4224
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3858
4225
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3859
4226
|
onUnmounted?: (() => any) | undefined;
|
|
3860
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3861
4227
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3862
4228
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3863
4229
|
}>, {
|
|
@@ -3871,16 +4237,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3871
4237
|
readonly isCompare?: boolean | undefined;
|
|
3872
4238
|
readonly parentValues?: Record<string, any> | undefined;
|
|
3873
4239
|
readonly labelWidth?: string | undefined;
|
|
4240
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
4241
|
+
readonly validateOnInit?: boolean | undefined;
|
|
3874
4242
|
readonly disabled?: boolean | undefined;
|
|
3875
4243
|
readonly height?: string | undefined;
|
|
3876
4244
|
readonly stepActive?: string | number | undefined;
|
|
3877
4245
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
3878
4246
|
readonly inline?: boolean | undefined;
|
|
3879
|
-
readonly labelPosition?:
|
|
4247
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
3880
4248
|
readonly keyProp?: string | undefined;
|
|
3881
4249
|
readonly popperClass?: string | undefined;
|
|
3882
4250
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
3883
|
-
readonly
|
|
4251
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4252
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
3884
4253
|
readonly showDiff?: ((_data: {
|
|
3885
4254
|
curValue: any;
|
|
3886
4255
|
lastValue: any;
|
|
@@ -3913,16 +4282,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3913
4282
|
isCompare?: boolean;
|
|
3914
4283
|
parentValues?: Record<string, any>;
|
|
3915
4284
|
labelWidth?: string;
|
|
4285
|
+
typeMatchValid?: boolean;
|
|
4286
|
+
validateOnInit?: boolean;
|
|
3916
4287
|
disabled?: boolean;
|
|
3917
4288
|
height?: string;
|
|
3918
4289
|
stepActive?: string | number;
|
|
3919
4290
|
size?: "small" | "default" | "large";
|
|
3920
4291
|
inline?: boolean;
|
|
3921
|
-
labelPosition?:
|
|
4292
|
+
labelPosition?: "top" | "left" | "right";
|
|
3922
4293
|
keyProp?: string;
|
|
3923
4294
|
popperClass?: string;
|
|
3924
4295
|
preventSubmitDefault?: boolean;
|
|
3925
|
-
|
|
4296
|
+
useFieldTextInError?: boolean;
|
|
4297
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
3926
4298
|
showDiff?: (_data: {
|
|
3927
4299
|
curValue: any;
|
|
3928
4300
|
lastValue: any;
|
|
@@ -3945,6 +4317,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3945
4317
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3946
4318
|
resetForm: () => void;
|
|
3947
4319
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4320
|
+
validate: () => Promise<string>;
|
|
3948
4321
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3949
4322
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3950
4323
|
error: (...args: any[]) => void;
|
|
@@ -3956,7 +4329,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3956
4329
|
disabled: boolean;
|
|
3957
4330
|
labelWidth: string;
|
|
3958
4331
|
inline: boolean;
|
|
3959
|
-
labelPosition:
|
|
4332
|
+
labelPosition: "top" | "left" | "right";
|
|
3960
4333
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3961
4334
|
height: string;
|
|
3962
4335
|
initValues: Record<string, any>;
|
|
@@ -3964,7 +4337,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3964
4337
|
isCompare: boolean;
|
|
3965
4338
|
keyProp: string;
|
|
3966
4339
|
parentValues: Record<string, any>;
|
|
4340
|
+
useFieldTextInError: boolean;
|
|
3967
4341
|
stepActive: string | number;
|
|
4342
|
+
validateOnInit: boolean;
|
|
3968
4343
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3969
4344
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3970
4345
|
created?: (() => void) | (() => void)[];
|
|
@@ -3989,7 +4364,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3989
4364
|
disabled: boolean;
|
|
3990
4365
|
labelWidth: string;
|
|
3991
4366
|
inline: boolean;
|
|
3992
|
-
labelPosition:
|
|
4367
|
+
labelPosition: "top" | "left" | "right";
|
|
3993
4368
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3994
4369
|
height: string;
|
|
3995
4370
|
initValues: Record<string, any>;
|
|
@@ -3997,7 +4372,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3997
4372
|
isCompare: boolean;
|
|
3998
4373
|
keyProp: string;
|
|
3999
4374
|
parentValues: Record<string, any>;
|
|
4375
|
+
useFieldTextInError: boolean;
|
|
4000
4376
|
stepActive: string | number;
|
|
4377
|
+
validateOnInit: boolean;
|
|
4001
4378
|
}> & Omit<Readonly<{
|
|
4002
4379
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4003
4380
|
initValues: Record<string, any>;
|
|
@@ -4005,16 +4382,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4005
4382
|
isCompare?: boolean;
|
|
4006
4383
|
parentValues?: Record<string, any>;
|
|
4007
4384
|
labelWidth?: string;
|
|
4385
|
+
typeMatchValid?: boolean;
|
|
4386
|
+
validateOnInit?: boolean;
|
|
4008
4387
|
disabled?: boolean;
|
|
4009
4388
|
height?: string;
|
|
4010
4389
|
stepActive?: string | number;
|
|
4011
4390
|
size?: "small" | "default" | "large";
|
|
4012
4391
|
inline?: boolean;
|
|
4013
|
-
labelPosition?:
|
|
4392
|
+
labelPosition?: "top" | "left" | "right";
|
|
4014
4393
|
keyProp?: string;
|
|
4015
4394
|
popperClass?: string;
|
|
4016
4395
|
preventSubmitDefault?: boolean;
|
|
4017
|
-
|
|
4396
|
+
useFieldTextInError?: boolean;
|
|
4397
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4018
4398
|
showDiff?: (_data: {
|
|
4019
4399
|
curValue: any;
|
|
4020
4400
|
lastValue: any;
|
|
@@ -4028,7 +4408,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4028
4408
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4029
4409
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4030
4410
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4031
|
-
}>, "values" | "changeHandler" | "
|
|
4411
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
4032
4412
|
values: import("@tmagic/form-schema").FormValue;
|
|
4033
4413
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
4034
4414
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -4037,15 +4417,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4037
4417
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
4038
4418
|
resetForm: () => void;
|
|
4039
4419
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4420
|
+
validate: () => Promise<string>;
|
|
4040
4421
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4041
4422
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4042
4423
|
$slots: FormSlots;
|
|
4043
4424
|
}) | null>>;
|
|
4044
4425
|
submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
|
|
4045
4426
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4427
|
+
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
|
|
4046
4428
|
mounted: (internalInstance: any) => any;
|
|
4047
4429
|
unmounted: () => any;
|
|
4048
|
-
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
|
|
4049
4430
|
"submit-error": (e: any) => any;
|
|
4050
4431
|
"form-error": (e: any) => any;
|
|
4051
4432
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -4074,12 +4455,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4074
4455
|
disabledShowSrc?: boolean;
|
|
4075
4456
|
labelWidth?: string;
|
|
4076
4457
|
codeValueKey?: string;
|
|
4077
|
-
labelPosition?:
|
|
4078
|
-
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4458
|
+
labelPosition?: "top" | "left" | "right";
|
|
4079
4459
|
}> & Readonly<{
|
|
4460
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
4080
4461
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4081
4462
|
onUnmounted?: (() => any) | undefined;
|
|
4082
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
4083
4463
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4084
4464
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4085
4465
|
}>, "submit" | "configForm"> & {
|
|
@@ -4093,16 +4473,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4093
4473
|
readonly isCompare?: boolean | undefined;
|
|
4094
4474
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4095
4475
|
readonly labelWidth?: string | undefined;
|
|
4476
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
4477
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4096
4478
|
readonly disabled?: boolean | undefined;
|
|
4097
4479
|
readonly height?: string | undefined;
|
|
4098
4480
|
readonly stepActive?: string | number | undefined;
|
|
4099
4481
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
4100
4482
|
readonly inline?: boolean | undefined;
|
|
4101
|
-
readonly labelPosition?:
|
|
4483
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
4102
4484
|
readonly keyProp?: string | undefined;
|
|
4103
4485
|
readonly popperClass?: string | undefined;
|
|
4104
4486
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4105
|
-
readonly
|
|
4487
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4488
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
4106
4489
|
readonly showDiff?: ((_data: {
|
|
4107
4490
|
curValue: any;
|
|
4108
4491
|
lastValue: any;
|
|
@@ -4135,16 +4518,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4135
4518
|
isCompare?: boolean;
|
|
4136
4519
|
parentValues?: Record<string, any>;
|
|
4137
4520
|
labelWidth?: string;
|
|
4521
|
+
typeMatchValid?: boolean;
|
|
4522
|
+
validateOnInit?: boolean;
|
|
4138
4523
|
disabled?: boolean;
|
|
4139
4524
|
height?: string;
|
|
4140
4525
|
stepActive?: string | number;
|
|
4141
4526
|
size?: "small" | "default" | "large";
|
|
4142
4527
|
inline?: boolean;
|
|
4143
|
-
labelPosition?:
|
|
4528
|
+
labelPosition?: "top" | "left" | "right";
|
|
4144
4529
|
keyProp?: string;
|
|
4145
4530
|
popperClass?: string;
|
|
4146
4531
|
preventSubmitDefault?: boolean;
|
|
4147
|
-
|
|
4532
|
+
useFieldTextInError?: boolean;
|
|
4533
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4148
4534
|
showDiff?: (_data: {
|
|
4149
4535
|
curValue: any;
|
|
4150
4536
|
lastValue: any;
|
|
@@ -4167,6 +4553,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4167
4553
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
4168
4554
|
resetForm: () => void;
|
|
4169
4555
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4556
|
+
validate: () => Promise<string>;
|
|
4170
4557
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4171
4558
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4172
4559
|
error: (...args: any[]) => void;
|
|
@@ -4178,7 +4565,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4178
4565
|
disabled: boolean;
|
|
4179
4566
|
labelWidth: string;
|
|
4180
4567
|
inline: boolean;
|
|
4181
|
-
labelPosition:
|
|
4568
|
+
labelPosition: "top" | "left" | "right";
|
|
4182
4569
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4183
4570
|
height: string;
|
|
4184
4571
|
initValues: Record<string, any>;
|
|
@@ -4186,7 +4573,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4186
4573
|
isCompare: boolean;
|
|
4187
4574
|
keyProp: string;
|
|
4188
4575
|
parentValues: Record<string, any>;
|
|
4576
|
+
useFieldTextInError: boolean;
|
|
4189
4577
|
stepActive: string | number;
|
|
4578
|
+
validateOnInit: boolean;
|
|
4190
4579
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4191
4580
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4192
4581
|
created?: (() => void) | (() => void)[];
|
|
@@ -4211,7 +4600,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4211
4600
|
disabled: boolean;
|
|
4212
4601
|
labelWidth: string;
|
|
4213
4602
|
inline: boolean;
|
|
4214
|
-
labelPosition:
|
|
4603
|
+
labelPosition: "top" | "left" | "right";
|
|
4215
4604
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4216
4605
|
height: string;
|
|
4217
4606
|
initValues: Record<string, any>;
|
|
@@ -4219,7 +4608,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4219
4608
|
isCompare: boolean;
|
|
4220
4609
|
keyProp: string;
|
|
4221
4610
|
parentValues: Record<string, any>;
|
|
4611
|
+
useFieldTextInError: boolean;
|
|
4222
4612
|
stepActive: string | number;
|
|
4613
|
+
validateOnInit: boolean;
|
|
4223
4614
|
}> & Omit<Readonly<{
|
|
4224
4615
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4225
4616
|
initValues: Record<string, any>;
|
|
@@ -4227,16 +4618,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4227
4618
|
isCompare?: boolean;
|
|
4228
4619
|
parentValues?: Record<string, any>;
|
|
4229
4620
|
labelWidth?: string;
|
|
4621
|
+
typeMatchValid?: boolean;
|
|
4622
|
+
validateOnInit?: boolean;
|
|
4230
4623
|
disabled?: boolean;
|
|
4231
4624
|
height?: string;
|
|
4232
4625
|
stepActive?: string | number;
|
|
4233
4626
|
size?: "small" | "default" | "large";
|
|
4234
4627
|
inline?: boolean;
|
|
4235
|
-
labelPosition?:
|
|
4628
|
+
labelPosition?: "top" | "left" | "right";
|
|
4236
4629
|
keyProp?: string;
|
|
4237
4630
|
popperClass?: string;
|
|
4238
4631
|
preventSubmitDefault?: boolean;
|
|
4239
|
-
|
|
4632
|
+
useFieldTextInError?: boolean;
|
|
4633
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4240
4634
|
showDiff?: (_data: {
|
|
4241
4635
|
curValue: any;
|
|
4242
4636
|
lastValue: any;
|
|
@@ -4250,7 +4644,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4250
4644
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4251
4645
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4252
4646
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4253
|
-
}>, "values" | "changeHandler" | "
|
|
4647
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
4254
4648
|
values: import("@tmagic/form-schema").FormValue;
|
|
4255
4649
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
4256
4650
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -4259,6 +4653,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4259
4653
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
4260
4654
|
resetForm: () => void;
|
|
4261
4655
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4656
|
+
validate: () => Promise<string>;
|
|
4262
4657
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4263
4658
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4264
4659
|
$slots: FormSlots;
|
|
@@ -4304,10 +4699,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
4304
4699
|
datasourceConfigs: Record<string, import("@tmagic/form-schema").FormConfig>;
|
|
4305
4700
|
containerHighlightDuration: number;
|
|
4306
4701
|
containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
|
|
4702
|
+
containerHighlightAddOnly: boolean;
|
|
4307
4703
|
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
4308
4704
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4309
|
-
declare const __VLS_export$
|
|
4310
|
-
declare const _default$
|
|
4705
|
+
declare const __VLS_export$39: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
|
|
4706
|
+
declare const _default$35: typeof __VLS_export$39;
|
|
4311
4707
|
type __VLS_WithSlots$12<T, S> = T & {
|
|
4312
4708
|
new (): {
|
|
4313
4709
|
$slots: S;
|
|
@@ -4315,7 +4711,7 @@ type __VLS_WithSlots$12<T, S> = T & {
|
|
|
4315
4711
|
};
|
|
4316
4712
|
//#endregion
|
|
4317
4713
|
//#region temp/packages/editor/src/layouts/CodeEditor.vue.d.ts
|
|
4318
|
-
type __VLS_Props$
|
|
4714
|
+
type __VLS_Props$34 = {
|
|
4319
4715
|
initValues?: any;
|
|
4320
4716
|
modifiedValues?: any;
|
|
4321
4717
|
type?: 'diff';
|
|
@@ -4331,7 +4727,7 @@ type __VLS_Props$32 = {
|
|
|
4331
4727
|
};
|
|
4332
4728
|
editorCustomType?: string;
|
|
4333
4729
|
};
|
|
4334
|
-
declare const __VLS_export$
|
|
4730
|
+
declare const __VLS_export$38: import("@vue/runtime-core").DefineComponent<__VLS_Props$34, {
|
|
4335
4731
|
values: import("@vue/reactivity").Ref<string, string>;
|
|
4336
4732
|
getEditor(): Monaco.editor.IStandaloneCodeEditor | Monaco.editor.IStandaloneDiffEditor | null;
|
|
4337
4733
|
getVsEditor(): Monaco.editor.IStandaloneCodeEditor | null;
|
|
@@ -4342,7 +4738,7 @@ declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
4342
4738
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4343
4739
|
save: (...args: any[]) => void;
|
|
4344
4740
|
initd: (...args: any[]) => void;
|
|
4345
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4741
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$34> & Readonly<{
|
|
4346
4742
|
onSave?: ((...args: any[]) => any) | undefined;
|
|
4347
4743
|
onInitd?: ((...args: any[]) => any) | undefined;
|
|
4348
4744
|
}>, {
|
|
@@ -4353,13 +4749,13 @@ declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
4353
4749
|
autoSave: boolean;
|
|
4354
4750
|
disabledFullScreen: boolean;
|
|
4355
4751
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4356
|
-
declare const _default$
|
|
4752
|
+
declare const _default$34: typeof __VLS_export$38;
|
|
4357
4753
|
//#endregion
|
|
4358
4754
|
//#region temp/packages/editor/src/layouts/sidebar/ComponentListPanel.vue.d.ts
|
|
4359
4755
|
type __VLS_Slots$11 = ComponentListPanelSlots;
|
|
4360
4756
|
declare const __VLS_base$11: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
4361
|
-
declare const __VLS_export$
|
|
4362
|
-
declare const _default$6: typeof __VLS_export$
|
|
4757
|
+
declare const __VLS_export$37: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
|
|
4758
|
+
declare const _default$6: typeof __VLS_export$37;
|
|
4363
4759
|
type __VLS_WithSlots$11<T, S> = T & {
|
|
4364
4760
|
new (): {
|
|
4365
4761
|
$slots: S;
|
|
@@ -4368,57 +4764,67 @@ type __VLS_WithSlots$11<T, S> = T & {
|
|
|
4368
4764
|
//#endregion
|
|
4369
4765
|
//#region temp/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue.d.ts
|
|
4370
4766
|
type __VLS_Slots$10 = LayerPanelSlots;
|
|
4371
|
-
type __VLS_Props$
|
|
4767
|
+
type __VLS_Props$33 = {
|
|
4372
4768
|
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
4373
4769
|
indent?: number;
|
|
4374
4770
|
nextLevelIndentIncrement?: number;
|
|
4375
|
-
customContentMenu: CustomContentMenuFunction;
|
|
4376
|
-
|
|
4377
|
-
|
|
4771
|
+
customContentMenu: CustomContentMenuFunction;
|
|
4772
|
+
/** 自定义判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
|
|
4773
|
+
isExpandable?: IsExpandableFunction;
|
|
4774
|
+
/** 自定义判断当前拖动节点是否可以拖入目标节点内部的函数,返回 false 则禁止拖入 */
|
|
4775
|
+
canDropIn?: CanDropInFunction;
|
|
4776
|
+
/** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
4378
4777
|
beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
|
|
4379
4778
|
};
|
|
4380
|
-
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4779
|
+
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$33, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4381
4780
|
"node-dblclick": (event: MouseEvent, data: TreeNodeData) => any;
|
|
4382
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4781
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$33> & Readonly<{
|
|
4383
4782
|
"onNode-dblclick"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
4384
4783
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4385
|
-
declare const __VLS_export$
|
|
4386
|
-
declare const _default$
|
|
4784
|
+
declare const __VLS_export$36: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
|
|
4785
|
+
declare const _default$27: typeof __VLS_export$36;
|
|
4387
4786
|
type __VLS_WithSlots$10<T, S> = T & {
|
|
4388
4787
|
new (): {
|
|
4389
4788
|
$slots: S;
|
|
4390
4789
|
};
|
|
4391
4790
|
};
|
|
4392
4791
|
//#endregion
|
|
4792
|
+
//#region temp/packages/editor/src/layouts/sidebar/layer/LayerNodeContent.vue.d.ts
|
|
4793
|
+
type __VLS_Props$32 = {
|
|
4794
|
+
data: TreeNodeData;
|
|
4795
|
+
};
|
|
4796
|
+
declare const __VLS_export$35: import("@vue/runtime-core").DefineComponent<__VLS_Props$32, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$32> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4797
|
+
declare const _default$26: typeof __VLS_export$35;
|
|
4798
|
+
//#endregion
|
|
4393
4799
|
//#region temp/packages/editor/src/fields/CodeSelect.vue.d.ts
|
|
4394
|
-
type __VLS_Props$
|
|
4395
|
-
declare const __VLS_export$
|
|
4800
|
+
type __VLS_Props$31 = FieldProps<CodeSelectConfig>;
|
|
4801
|
+
declare const __VLS_export$34: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4396
4802
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
4397
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4803
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
|
|
4398
4804
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
4399
4805
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4400
|
-
declare const _default$3: typeof __VLS_export$
|
|
4806
|
+
declare const _default$3: typeof __VLS_export$34;
|
|
4401
4807
|
//#endregion
|
|
4402
4808
|
//#region temp/packages/editor/src/fields/CodeSelectCol.vue.d.ts
|
|
4403
|
-
type __VLS_Props$
|
|
4404
|
-
declare const __VLS_export$
|
|
4809
|
+
type __VLS_Props$30 = FieldProps<CodeSelectColConfig>;
|
|
4810
|
+
declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4405
4811
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
4406
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4812
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
|
|
4407
4813
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
4408
4814
|
}>, {
|
|
4409
4815
|
disabled: boolean;
|
|
4410
4816
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4411
|
-
declare const _default$4: typeof __VLS_export$
|
|
4817
|
+
declare const _default$4: typeof __VLS_export$33;
|
|
4412
4818
|
//#endregion
|
|
4413
4819
|
//#region temp/packages/editor/src/fields/DataSourceFields.vue.d.ts
|
|
4414
|
-
type __VLS_Props$
|
|
4820
|
+
type __VLS_Props$29 = FieldProps<DataSourceFieldsConfig>;
|
|
4415
4821
|
type __VLS_ModelProps$4 = {
|
|
4416
4822
|
'width'?: number;
|
|
4417
4823
|
'visible'?: boolean;
|
|
4418
4824
|
'visible1'?: boolean;
|
|
4419
4825
|
};
|
|
4420
|
-
type __VLS_PublicProps$4 = __VLS_Props$
|
|
4421
|
-
declare const __VLS_export$
|
|
4826
|
+
type __VLS_PublicProps$4 = __VLS_Props$29 & __VLS_ModelProps$4;
|
|
4827
|
+
declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4422
4828
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
4423
4829
|
"update:visible": (value: boolean) => any;
|
|
4424
4830
|
"update:width": (value: number) => any;
|
|
@@ -4431,111 +4837,109 @@ declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
4431
4837
|
}>, {
|
|
4432
4838
|
disabled: boolean;
|
|
4433
4839
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4434
|
-
declare const _default$12: typeof __VLS_export$
|
|
4840
|
+
declare const _default$12: typeof __VLS_export$32;
|
|
4435
4841
|
//#endregion
|
|
4436
4842
|
//#region temp/packages/editor/src/fields/DataSourceMocks.vue.d.ts
|
|
4437
|
-
type __VLS_Props$
|
|
4843
|
+
type __VLS_Props$28 = FieldProps<DataSourceMocksConfig>;
|
|
4438
4844
|
type __VLS_ModelProps$3 = {
|
|
4439
4845
|
'width'?: number;
|
|
4440
4846
|
'visible'?: boolean;
|
|
4441
4847
|
};
|
|
4442
|
-
type __VLS_PublicProps$3 = __VLS_Props$
|
|
4443
|
-
declare const __VLS_export$
|
|
4444
|
-
|
|
4445
|
-
"update:
|
|
4446
|
-
"update:width": (value: number) => void;
|
|
4848
|
+
type __VLS_PublicProps$3 = __VLS_Props$28 & __VLS_ModelProps$3;
|
|
4849
|
+
declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4850
|
+
"update:visible": (value: boolean) => any;
|
|
4851
|
+
"update:width": (value: number) => any;
|
|
4447
4852
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$3> & Readonly<{
|
|
4448
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
4449
4853
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4450
4854
|
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
4451
4855
|
}>, {
|
|
4452
4856
|
disabled: boolean;
|
|
4453
4857
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4454
|
-
declare const _default$16: typeof __VLS_export$
|
|
4858
|
+
declare const _default$16: typeof __VLS_export$31;
|
|
4455
4859
|
//#endregion
|
|
4456
4860
|
//#region temp/packages/editor/src/fields/DataSourceMethods.vue.d.ts
|
|
4457
|
-
type __VLS_Props$
|
|
4458
|
-
declare const __VLS_export$
|
|
4861
|
+
type __VLS_Props$27 = FieldProps<DataSourceMethodsConfig>;
|
|
4862
|
+
declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4459
4863
|
change: (...args: any[]) => void;
|
|
4460
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4864
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$27> & Readonly<{
|
|
4461
4865
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4462
4866
|
}>, {
|
|
4463
4867
|
disabled: boolean;
|
|
4464
4868
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4465
|
-
declare const _default$15: typeof __VLS_export$
|
|
4869
|
+
declare const _default$15: typeof __VLS_export$30;
|
|
4466
4870
|
//#endregion
|
|
4467
4871
|
//#region temp/packages/editor/src/fields/DataSourceInput.vue.d.ts
|
|
4468
|
-
type __VLS_Props$
|
|
4469
|
-
declare const __VLS_export$
|
|
4872
|
+
type __VLS_Props$26 = FieldProps<DataSourceInputConfig>;
|
|
4873
|
+
declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4470
4874
|
change: (value: string) => any;
|
|
4471
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4875
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
|
|
4472
4876
|
onChange?: ((value: string) => any) | undefined;
|
|
4473
4877
|
}>, {
|
|
4474
4878
|
disabled: boolean;
|
|
4475
4879
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4476
|
-
declare const _default$13: typeof __VLS_export$
|
|
4880
|
+
declare const _default$13: typeof __VLS_export$29;
|
|
4477
4881
|
//#endregion
|
|
4478
4882
|
//#region temp/packages/editor/src/fields/DataSourceSelect.vue.d.ts
|
|
4479
|
-
type __VLS_Props$
|
|
4480
|
-
declare const __VLS_export$
|
|
4883
|
+
type __VLS_Props$25 = FieldProps<DataSourceSelect>;
|
|
4884
|
+
declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4481
4885
|
change: (...args: any[]) => void;
|
|
4482
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4886
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
|
|
4483
4887
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4484
4888
|
}>, {
|
|
4485
4889
|
disabled: boolean;
|
|
4486
4890
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4487
|
-
declare const _default$17: typeof __VLS_export$
|
|
4891
|
+
declare const _default$17: typeof __VLS_export$28;
|
|
4488
4892
|
//#endregion
|
|
4489
4893
|
//#region temp/packages/editor/src/fields/DataSourceMethodSelect.vue.d.ts
|
|
4490
|
-
type __VLS_Props$
|
|
4491
|
-
declare const __VLS_export$
|
|
4894
|
+
type __VLS_Props$24 = FieldProps<DataSourceMethodSelectConfig>;
|
|
4895
|
+
declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4492
4896
|
change: (...args: any[]) => void;
|
|
4493
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4897
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
|
|
4494
4898
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4495
4899
|
}>, {
|
|
4496
4900
|
disabled: boolean;
|
|
4497
4901
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4498
|
-
declare const _default$14: typeof __VLS_export$
|
|
4902
|
+
declare const _default$14: typeof __VLS_export$27;
|
|
4499
4903
|
//#endregion
|
|
4500
4904
|
//#region temp/packages/editor/src/fields/DataSourceFieldSelect/Index.vue.d.ts
|
|
4501
|
-
type __VLS_Props$
|
|
4502
|
-
declare const __VLS_export$
|
|
4905
|
+
type __VLS_Props$23 = FieldProps<DataSourceFieldSelectConfig>;
|
|
4906
|
+
declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4503
4907
|
change: (...args: any[]) => void;
|
|
4504
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4908
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
|
|
4505
4909
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4506
4910
|
}>, {
|
|
4507
4911
|
disabled: boolean;
|
|
4508
4912
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4509
|
-
declare const _default$11: typeof __VLS_export$
|
|
4913
|
+
declare const _default$11: typeof __VLS_export$26;
|
|
4510
4914
|
//#endregion
|
|
4511
4915
|
//#region temp/packages/editor/src/fields/EventSelect.vue.d.ts
|
|
4512
|
-
type __VLS_Props$
|
|
4513
|
-
declare const __VLS_export$
|
|
4916
|
+
type __VLS_Props$22 = FieldProps<EventSelectConfig>;
|
|
4917
|
+
declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4514
4918
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
4515
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4919
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
|
|
4516
4920
|
onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4517
4921
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4518
|
-
declare const _default$19: typeof __VLS_export$
|
|
4922
|
+
declare const _default$19: typeof __VLS_export$25;
|
|
4519
4923
|
//#endregion
|
|
4520
4924
|
//#region temp/packages/editor/src/fields/KeyValue.vue.d.ts
|
|
4521
|
-
type __VLS_Props$
|
|
4522
|
-
declare const __VLS_export$
|
|
4925
|
+
type __VLS_Props$21 = FieldProps<KeyValueConfig>;
|
|
4926
|
+
declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4523
4927
|
change: (value: Record<string, any>) => any;
|
|
4524
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4928
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
|
|
4525
4929
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
4526
4930
|
}>, {
|
|
4527
4931
|
disabled: boolean;
|
|
4528
4932
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4529
|
-
declare const _default$25: typeof __VLS_export$
|
|
4933
|
+
declare const _default$25: typeof __VLS_export$24;
|
|
4530
4934
|
//#endregion
|
|
4531
4935
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue.d.ts
|
|
4532
4936
|
type __VLS_Slots$9 = CodeBlockListSlots;
|
|
4533
|
-
type __VLS_Props$
|
|
4937
|
+
type __VLS_Props$20 = {
|
|
4534
4938
|
indent?: number;
|
|
4535
4939
|
nextLevelIndentIncrement?: number;
|
|
4536
4940
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
4537
4941
|
};
|
|
4538
|
-
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4942
|
+
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {
|
|
4539
4943
|
nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
|
|
4540
4944
|
visible: boolean;
|
|
4541
4945
|
expand: boolean;
|
|
@@ -4548,9 +4952,7 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4548
4952
|
draggable: boolean;
|
|
4549
4953
|
}> & Omit<Map<Id, LayerNodeStatus>, keyof Map<any, any>>)>;
|
|
4550
4954
|
filter: (text: string | string[]) => void;
|
|
4551
|
-
deleteCode: (id: string, {
|
|
4552
|
-
historySource
|
|
4553
|
-
}?: {
|
|
4955
|
+
deleteCode: (id: string, { historySource }?: {
|
|
4554
4956
|
historySource?: HistoryOpSource;
|
|
4555
4957
|
}) => Promise<void>;
|
|
4556
4958
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -4559,15 +4961,15 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4559
4961
|
}) => any;
|
|
4560
4962
|
edit: (id: string) => any;
|
|
4561
4963
|
"node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
|
|
4562
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4964
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
|
|
4563
4965
|
onRemove?: ((id: string, args_1: {
|
|
4564
4966
|
historySource?: HistoryOpSource;
|
|
4565
4967
|
}) => any) | undefined;
|
|
4566
4968
|
onEdit?: ((id: string) => any) | undefined;
|
|
4567
4969
|
"onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
4568
4970
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4569
|
-
declare const __VLS_export$
|
|
4570
|
-
declare const _default$1: typeof __VLS_export$
|
|
4971
|
+
declare const __VLS_export$23: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
|
|
4972
|
+
declare const _default$1: typeof __VLS_export$23;
|
|
4571
4973
|
type __VLS_WithSlots$9<T, S> = T & {
|
|
4572
4974
|
new (): {
|
|
4573
4975
|
$slots: S;
|
|
@@ -4576,15 +4978,15 @@ type __VLS_WithSlots$9<T, S> = T & {
|
|
|
4576
4978
|
//#endregion
|
|
4577
4979
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts
|
|
4578
4980
|
type __VLS_Slots$8 = CodeBlockListPanelSlots;
|
|
4579
|
-
type __VLS_Props$
|
|
4981
|
+
type __VLS_Props$19 = {
|
|
4580
4982
|
indent?: number;
|
|
4581
4983
|
nextLevelIndentIncrement?: number;
|
|
4582
4984
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
4583
4985
|
customContentMenu: CustomContentMenuFunction;
|
|
4584
4986
|
};
|
|
4585
|
-
declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4586
|
-
declare const __VLS_export$
|
|
4587
|
-
declare const _default$2: typeof __VLS_export$
|
|
4987
|
+
declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$19, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$19> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4988
|
+
declare const __VLS_export$22: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
|
|
4989
|
+
declare const _default$2: typeof __VLS_export$22;
|
|
4588
4990
|
type __VLS_WithSlots$8<T, S> = T & {
|
|
4589
4991
|
new (): {
|
|
4590
4992
|
$slots: S;
|
|
@@ -4592,19 +4994,21 @@ type __VLS_WithSlots$8<T, S> = T & {
|
|
|
4592
4994
|
};
|
|
4593
4995
|
//#endregion
|
|
4594
4996
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts
|
|
4595
|
-
type __VLS_Props$
|
|
4997
|
+
type __VLS_Props$18 = {
|
|
4596
4998
|
title?: string;
|
|
4597
4999
|
values: any;
|
|
4598
|
-
disabled: boolean;
|
|
4599
|
-
|
|
5000
|
+
disabled: boolean;
|
|
5001
|
+
/** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
|
|
5002
|
+
editMethodName?: string;
|
|
5003
|
+
/** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
|
|
4600
5004
|
editFieldPath?: string[];
|
|
4601
5005
|
};
|
|
4602
5006
|
type __VLS_ModelProps$2 = {
|
|
4603
5007
|
'visible'?: boolean;
|
|
4604
5008
|
'width'?: number;
|
|
4605
5009
|
};
|
|
4606
|
-
type __VLS_PublicProps$2 = __VLS_Props$
|
|
4607
|
-
declare const __VLS_export$
|
|
5010
|
+
type __VLS_PublicProps$2 = __VLS_Props$18 & __VLS_ModelProps$2;
|
|
5011
|
+
declare const __VLS_export$21: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
|
|
4608
5012
|
show(): void;
|
|
4609
5013
|
hide(): void;
|
|
4610
5014
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -4620,10 +5024,10 @@ declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
4620
5024
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4621
5025
|
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
4622
5026
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4623
|
-
declare const _default$10: typeof __VLS_export$
|
|
5027
|
+
declare const _default$10: typeof __VLS_export$21;
|
|
4624
5028
|
//#endregion
|
|
4625
5029
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceAddButton.vue.d.ts
|
|
4626
|
-
type __VLS_Props$
|
|
5030
|
+
type __VLS_Props$17 = {
|
|
4627
5031
|
datasourceTypeList: {
|
|
4628
5032
|
text: string;
|
|
4629
5033
|
type: string;
|
|
@@ -4631,22 +5035,21 @@ type __VLS_Props$16 = {
|
|
|
4631
5035
|
addButtonConfig?: ButtonProps;
|
|
4632
5036
|
addButtonText?: string;
|
|
4633
5037
|
};
|
|
4634
|
-
declare const __VLS_export$
|
|
5038
|
+
declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_Props$17, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4635
5039
|
add: (type: string) => any;
|
|
4636
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5040
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$17> & Readonly<{
|
|
4637
5041
|
onAdd?: ((type: string) => any) | undefined;
|
|
4638
5042
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4639
|
-
declare const _default$9: typeof __VLS_export$
|
|
5043
|
+
declare const _default$9: typeof __VLS_export$20;
|
|
4640
5044
|
//#endregion
|
|
4641
5045
|
//#region temp/packages/editor/src/layouts/props-panel/PropsPanel.vue.d.ts
|
|
4642
5046
|
type __VLS_Slots$7 = PropsPanelSlots;
|
|
4643
|
-
type __VLS_Props$
|
|
5047
|
+
type __VLS_Props$16 = {
|
|
4644
5048
|
disabledShowSrc?: boolean;
|
|
4645
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4646
5049
|
};
|
|
4647
|
-
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4648
|
-
getFormState(): FormState | undefined;
|
|
4649
|
-
submit: (v: MNode, eventData?: ContainerChangeEventData) => Promise<void>;
|
|
5050
|
+
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {
|
|
5051
|
+
getFormState(): import("@tmagic/form-schema").FormState | undefined;
|
|
5052
|
+
submit: (v: MNode, eventData?: ContainerChangeEventData, error?: any, source?: NodeInvalidSource) => Promise<void>;
|
|
4650
5053
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4651
5054
|
mounted: (internalInstance: {
|
|
4652
5055
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
@@ -4657,11 +5060,10 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4657
5060
|
readonly disabledShowSrc?: boolean | undefined;
|
|
4658
5061
|
readonly labelWidth?: string | undefined;
|
|
4659
5062
|
readonly codeValueKey?: string | undefined;
|
|
4660
|
-
readonly labelPosition?:
|
|
4661
|
-
readonly
|
|
5063
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
5064
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4662
5065
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4663
5066
|
readonly onUnmounted?: (() => any) | undefined;
|
|
4664
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4665
5067
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4666
5068
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
4667
5069
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -4675,7 +5077,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4675
5077
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
4676
5078
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
4677
5079
|
$host: Element | null;
|
|
4678
|
-
$emit: ((event: "
|
|
5080
|
+
$emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
|
|
4679
5081
|
$el: any;
|
|
4680
5082
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
4681
5083
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -4683,12 +5085,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4683
5085
|
disabledShowSrc?: boolean;
|
|
4684
5086
|
labelWidth?: string;
|
|
4685
5087
|
codeValueKey?: string;
|
|
4686
|
-
labelPosition?:
|
|
4687
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5088
|
+
labelPosition?: "top" | "left" | "right";
|
|
4688
5089
|
}> & Readonly<{
|
|
5090
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4689
5091
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4690
5092
|
onUnmounted?: (() => any) | undefined;
|
|
4691
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4692
5093
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4693
5094
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4694
5095
|
}>, {
|
|
@@ -4702,16 +5103,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4702
5103
|
readonly isCompare?: boolean | undefined;
|
|
4703
5104
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4704
5105
|
readonly labelWidth?: string | undefined;
|
|
5106
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5107
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4705
5108
|
readonly disabled?: boolean | undefined;
|
|
4706
5109
|
readonly height?: string | undefined;
|
|
4707
5110
|
readonly stepActive?: string | number | undefined;
|
|
4708
5111
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
4709
5112
|
readonly inline?: boolean | undefined;
|
|
4710
|
-
readonly labelPosition?:
|
|
5113
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
4711
5114
|
readonly keyProp?: string | undefined;
|
|
4712
5115
|
readonly popperClass?: string | undefined;
|
|
4713
5116
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4714
|
-
readonly
|
|
5117
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
5118
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
4715
5119
|
readonly showDiff?: ((_data: {
|
|
4716
5120
|
curValue: any;
|
|
4717
5121
|
lastValue: any;
|
|
@@ -4744,16 +5148,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4744
5148
|
isCompare?: boolean;
|
|
4745
5149
|
parentValues?: Record<string, any>;
|
|
4746
5150
|
labelWidth?: string;
|
|
5151
|
+
typeMatchValid?: boolean;
|
|
5152
|
+
validateOnInit?: boolean;
|
|
4747
5153
|
disabled?: boolean;
|
|
4748
5154
|
height?: string;
|
|
4749
5155
|
stepActive?: string | number;
|
|
4750
5156
|
size?: "small" | "default" | "large";
|
|
4751
5157
|
inline?: boolean;
|
|
4752
|
-
labelPosition?:
|
|
5158
|
+
labelPosition?: "top" | "left" | "right";
|
|
4753
5159
|
keyProp?: string;
|
|
4754
5160
|
popperClass?: string;
|
|
4755
5161
|
preventSubmitDefault?: boolean;
|
|
4756
|
-
|
|
5162
|
+
useFieldTextInError?: boolean;
|
|
5163
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4757
5164
|
showDiff?: (_data: {
|
|
4758
5165
|
curValue: any;
|
|
4759
5166
|
lastValue: any;
|
|
@@ -4770,12 +5177,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4770
5177
|
}>, {
|
|
4771
5178
|
values: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
4772
5179
|
lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
4773
|
-
formState: FormState;
|
|
5180
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
4774
5181
|
initialized: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
4775
5182
|
changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
|
|
4776
5183
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4777
5184
|
resetForm: () => void;
|
|
4778
5185
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5186
|
+
validate: () => Promise<string>;
|
|
4779
5187
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4780
5188
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4781
5189
|
error: (...args: any[]) => void;
|
|
@@ -4787,7 +5195,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4787
5195
|
disabled: boolean;
|
|
4788
5196
|
labelWidth: string;
|
|
4789
5197
|
inline: boolean;
|
|
4790
|
-
labelPosition:
|
|
5198
|
+
labelPosition: "top" | "left" | "right";
|
|
4791
5199
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4792
5200
|
height: string;
|
|
4793
5201
|
initValues: Record<string, any>;
|
|
@@ -4795,7 +5203,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4795
5203
|
isCompare: boolean;
|
|
4796
5204
|
keyProp: string;
|
|
4797
5205
|
parentValues: Record<string, any>;
|
|
5206
|
+
useFieldTextInError: boolean;
|
|
4798
5207
|
stepActive: string | number;
|
|
5208
|
+
validateOnInit: boolean;
|
|
4799
5209
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4800
5210
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4801
5211
|
created?: (() => void) | (() => void)[];
|
|
@@ -4820,7 +5230,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4820
5230
|
disabled: boolean;
|
|
4821
5231
|
labelWidth: string;
|
|
4822
5232
|
inline: boolean;
|
|
4823
|
-
labelPosition:
|
|
5233
|
+
labelPosition: "top" | "left" | "right";
|
|
4824
5234
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4825
5235
|
height: string;
|
|
4826
5236
|
initValues: Record<string, any>;
|
|
@@ -4828,7 +5238,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4828
5238
|
isCompare: boolean;
|
|
4829
5239
|
keyProp: string;
|
|
4830
5240
|
parentValues: Record<string, any>;
|
|
5241
|
+
useFieldTextInError: boolean;
|
|
4831
5242
|
stepActive: string | number;
|
|
5243
|
+
validateOnInit: boolean;
|
|
4832
5244
|
}> & Omit<Readonly<{
|
|
4833
5245
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4834
5246
|
initValues: Record<string, any>;
|
|
@@ -4836,16 +5248,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4836
5248
|
isCompare?: boolean;
|
|
4837
5249
|
parentValues?: Record<string, any>;
|
|
4838
5250
|
labelWidth?: string;
|
|
5251
|
+
typeMatchValid?: boolean;
|
|
5252
|
+
validateOnInit?: boolean;
|
|
4839
5253
|
disabled?: boolean;
|
|
4840
5254
|
height?: string;
|
|
4841
5255
|
stepActive?: string | number;
|
|
4842
5256
|
size?: "small" | "default" | "large";
|
|
4843
5257
|
inline?: boolean;
|
|
4844
|
-
labelPosition?:
|
|
5258
|
+
labelPosition?: "top" | "left" | "right";
|
|
4845
5259
|
keyProp?: string;
|
|
4846
5260
|
popperClass?: string;
|
|
4847
5261
|
preventSubmitDefault?: boolean;
|
|
4848
|
-
|
|
5262
|
+
useFieldTextInError?: boolean;
|
|
5263
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4849
5264
|
showDiff?: (_data: {
|
|
4850
5265
|
curValue: any;
|
|
4851
5266
|
lastValue: any;
|
|
@@ -4859,24 +5274,25 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4859
5274
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4860
5275
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4861
5276
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4862
|
-
}>, "values" | "changeHandler" | "
|
|
5277
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
4863
5278
|
values: FormValue;
|
|
4864
5279
|
lastValuesProcessed: FormValue;
|
|
4865
|
-
formState: FormState;
|
|
5280
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
4866
5281
|
initialized: boolean;
|
|
4867
5282
|
changeRecords: ChangeRecord$1[];
|
|
4868
5283
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4869
5284
|
resetForm: () => void;
|
|
4870
5285
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5286
|
+
validate: () => Promise<string>;
|
|
4871
5287
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4872
5288
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4873
5289
|
$slots: FormSlots;
|
|
4874
5290
|
}) | null>>;
|
|
4875
5291
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
4876
5292
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5293
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
4877
5294
|
mounted: (internalInstance: any) => any;
|
|
4878
5295
|
unmounted: () => any;
|
|
4879
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
4880
5296
|
"submit-error": (e: any) => any;
|
|
4881
5297
|
"form-error": (e: any) => any;
|
|
4882
5298
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -4905,12 +5321,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4905
5321
|
disabledShowSrc?: boolean;
|
|
4906
5322
|
labelWidth?: string;
|
|
4907
5323
|
codeValueKey?: string;
|
|
4908
|
-
labelPosition?:
|
|
4909
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5324
|
+
labelPosition?: "top" | "left" | "right";
|
|
4910
5325
|
}> & Readonly<{
|
|
5326
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4911
5327
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4912
5328
|
onUnmounted?: (() => any) | undefined;
|
|
4913
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4914
5329
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4915
5330
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4916
5331
|
}>, "submit" | "configForm"> & {
|
|
@@ -4924,16 +5339,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4924
5339
|
readonly isCompare?: boolean | undefined;
|
|
4925
5340
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4926
5341
|
readonly labelWidth?: string | undefined;
|
|
5342
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5343
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4927
5344
|
readonly disabled?: boolean | undefined;
|
|
4928
5345
|
readonly height?: string | undefined;
|
|
4929
5346
|
readonly stepActive?: string | number | undefined;
|
|
4930
5347
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
4931
5348
|
readonly inline?: boolean | undefined;
|
|
4932
|
-
readonly labelPosition?:
|
|
5349
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
4933
5350
|
readonly keyProp?: string | undefined;
|
|
4934
5351
|
readonly popperClass?: string | undefined;
|
|
4935
5352
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4936
|
-
readonly
|
|
5353
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
5354
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
4937
5355
|
readonly showDiff?: ((_data: {
|
|
4938
5356
|
curValue: any;
|
|
4939
5357
|
lastValue: any;
|
|
@@ -4966,16 +5384,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4966
5384
|
isCompare?: boolean;
|
|
4967
5385
|
parentValues?: Record<string, any>;
|
|
4968
5386
|
labelWidth?: string;
|
|
5387
|
+
typeMatchValid?: boolean;
|
|
5388
|
+
validateOnInit?: boolean;
|
|
4969
5389
|
disabled?: boolean;
|
|
4970
5390
|
height?: string;
|
|
4971
5391
|
stepActive?: string | number;
|
|
4972
5392
|
size?: "small" | "default" | "large";
|
|
4973
5393
|
inline?: boolean;
|
|
4974
|
-
labelPosition?:
|
|
5394
|
+
labelPosition?: "top" | "left" | "right";
|
|
4975
5395
|
keyProp?: string;
|
|
4976
5396
|
popperClass?: string;
|
|
4977
5397
|
preventSubmitDefault?: boolean;
|
|
4978
|
-
|
|
5398
|
+
useFieldTextInError?: boolean;
|
|
5399
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
4979
5400
|
showDiff?: (_data: {
|
|
4980
5401
|
curValue: any;
|
|
4981
5402
|
lastValue: any;
|
|
@@ -4992,12 +5413,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4992
5413
|
}>, {
|
|
4993
5414
|
values: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
4994
5415
|
lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
4995
|
-
formState: FormState;
|
|
5416
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
4996
5417
|
initialized: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
4997
5418
|
changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
|
|
4998
5419
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4999
5420
|
resetForm: () => void;
|
|
5000
5421
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5422
|
+
validate: () => Promise<string>;
|
|
5001
5423
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5002
5424
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5003
5425
|
error: (...args: any[]) => void;
|
|
@@ -5009,7 +5431,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5009
5431
|
disabled: boolean;
|
|
5010
5432
|
labelWidth: string;
|
|
5011
5433
|
inline: boolean;
|
|
5012
|
-
labelPosition:
|
|
5434
|
+
labelPosition: "top" | "left" | "right";
|
|
5013
5435
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5014
5436
|
height: string;
|
|
5015
5437
|
initValues: Record<string, any>;
|
|
@@ -5017,7 +5439,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5017
5439
|
isCompare: boolean;
|
|
5018
5440
|
keyProp: string;
|
|
5019
5441
|
parentValues: Record<string, any>;
|
|
5442
|
+
useFieldTextInError: boolean;
|
|
5020
5443
|
stepActive: string | number;
|
|
5444
|
+
validateOnInit: boolean;
|
|
5021
5445
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
5022
5446
|
beforeCreate?: (() => void) | (() => void)[];
|
|
5023
5447
|
created?: (() => void) | (() => void)[];
|
|
@@ -5042,7 +5466,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5042
5466
|
disabled: boolean;
|
|
5043
5467
|
labelWidth: string;
|
|
5044
5468
|
inline: boolean;
|
|
5045
|
-
labelPosition:
|
|
5469
|
+
labelPosition: "top" | "left" | "right";
|
|
5046
5470
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5047
5471
|
height: string;
|
|
5048
5472
|
initValues: Record<string, any>;
|
|
@@ -5050,7 +5474,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5050
5474
|
isCompare: boolean;
|
|
5051
5475
|
keyProp: string;
|
|
5052
5476
|
parentValues: Record<string, any>;
|
|
5477
|
+
useFieldTextInError: boolean;
|
|
5053
5478
|
stepActive: string | number;
|
|
5479
|
+
validateOnInit: boolean;
|
|
5054
5480
|
}> & Omit<Readonly<{
|
|
5055
5481
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5056
5482
|
initValues: Record<string, any>;
|
|
@@ -5058,16 +5484,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5058
5484
|
isCompare?: boolean;
|
|
5059
5485
|
parentValues?: Record<string, any>;
|
|
5060
5486
|
labelWidth?: string;
|
|
5487
|
+
typeMatchValid?: boolean;
|
|
5488
|
+
validateOnInit?: boolean;
|
|
5061
5489
|
disabled?: boolean;
|
|
5062
5490
|
height?: string;
|
|
5063
5491
|
stepActive?: string | number;
|
|
5064
5492
|
size?: "small" | "default" | "large";
|
|
5065
5493
|
inline?: boolean;
|
|
5066
|
-
labelPosition?:
|
|
5494
|
+
labelPosition?: "top" | "left" | "right";
|
|
5067
5495
|
keyProp?: string;
|
|
5068
5496
|
popperClass?: string;
|
|
5069
5497
|
preventSubmitDefault?: boolean;
|
|
5070
|
-
|
|
5498
|
+
useFieldTextInError?: boolean;
|
|
5499
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5071
5500
|
showDiff?: (_data: {
|
|
5072
5501
|
curValue: any;
|
|
5073
5502
|
lastValue: any;
|
|
@@ -5081,15 +5510,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5081
5510
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
5082
5511
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
5083
5512
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
5084
|
-
}>, "values" | "changeHandler" | "
|
|
5513
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
5085
5514
|
values: FormValue;
|
|
5086
5515
|
lastValuesProcessed: FormValue;
|
|
5087
|
-
formState: FormState;
|
|
5516
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5088
5517
|
initialized: boolean;
|
|
5089
5518
|
changeRecords: ChangeRecord$1[];
|
|
5090
5519
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5091
5520
|
resetForm: () => void;
|
|
5092
5521
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5522
|
+
validate: () => Promise<string>;
|
|
5093
5523
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5094
5524
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
5095
5525
|
$slots: FormSlots;
|
|
@@ -5103,7 +5533,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5103
5533
|
unmounted: () => any;
|
|
5104
5534
|
"submit-error": (e: any) => any;
|
|
5105
5535
|
"form-error": (e: any) => any;
|
|
5106
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5536
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
|
|
5107
5537
|
onMounted?: ((internalInstance: {
|
|
5108
5538
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
5109
5539
|
$data: {};
|
|
@@ -5113,11 +5543,10 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5113
5543
|
readonly disabledShowSrc?: boolean | undefined;
|
|
5114
5544
|
readonly labelWidth?: string | undefined;
|
|
5115
5545
|
readonly codeValueKey?: string | undefined;
|
|
5116
|
-
readonly labelPosition?:
|
|
5117
|
-
readonly
|
|
5546
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
5547
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
5118
5548
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5119
5549
|
readonly onUnmounted?: (() => any) | undefined;
|
|
5120
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5121
5550
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5122
5551
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
5123
5552
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -5131,7 +5560,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5131
5560
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
5132
5561
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
5133
5562
|
$host: Element | null;
|
|
5134
|
-
$emit: ((event: "
|
|
5563
|
+
$emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
|
|
5135
5564
|
$el: any;
|
|
5136
5565
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
5137
5566
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -5139,12 +5568,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5139
5568
|
disabledShowSrc?: boolean;
|
|
5140
5569
|
labelWidth?: string;
|
|
5141
5570
|
codeValueKey?: string;
|
|
5142
|
-
labelPosition?:
|
|
5143
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5571
|
+
labelPosition?: "top" | "left" | "right";
|
|
5144
5572
|
}> & Readonly<{
|
|
5573
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
5145
5574
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5146
5575
|
onUnmounted?: (() => any) | undefined;
|
|
5147
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5148
5576
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5149
5577
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5150
5578
|
}>, {
|
|
@@ -5158,16 +5586,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5158
5586
|
readonly isCompare?: boolean | undefined;
|
|
5159
5587
|
readonly parentValues?: Record<string, any> | undefined;
|
|
5160
5588
|
readonly labelWidth?: string | undefined;
|
|
5589
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5590
|
+
readonly validateOnInit?: boolean | undefined;
|
|
5161
5591
|
readonly disabled?: boolean | undefined;
|
|
5162
5592
|
readonly height?: string | undefined;
|
|
5163
5593
|
readonly stepActive?: string | number | undefined;
|
|
5164
5594
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
5165
5595
|
readonly inline?: boolean | undefined;
|
|
5166
|
-
readonly labelPosition?:
|
|
5596
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
5167
5597
|
readonly keyProp?: string | undefined;
|
|
5168
5598
|
readonly popperClass?: string | undefined;
|
|
5169
5599
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5170
|
-
readonly
|
|
5600
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
5601
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
5171
5602
|
readonly showDiff?: ((_data: {
|
|
5172
5603
|
curValue: any;
|
|
5173
5604
|
lastValue: any;
|
|
@@ -5200,16 +5631,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5200
5631
|
isCompare?: boolean;
|
|
5201
5632
|
parentValues?: Record<string, any>;
|
|
5202
5633
|
labelWidth?: string;
|
|
5634
|
+
typeMatchValid?: boolean;
|
|
5635
|
+
validateOnInit?: boolean;
|
|
5203
5636
|
disabled?: boolean;
|
|
5204
5637
|
height?: string;
|
|
5205
5638
|
stepActive?: string | number;
|
|
5206
5639
|
size?: "small" | "default" | "large";
|
|
5207
5640
|
inline?: boolean;
|
|
5208
|
-
labelPosition?:
|
|
5641
|
+
labelPosition?: "top" | "left" | "right";
|
|
5209
5642
|
keyProp?: string;
|
|
5210
5643
|
popperClass?: string;
|
|
5211
5644
|
preventSubmitDefault?: boolean;
|
|
5212
|
-
|
|
5645
|
+
useFieldTextInError?: boolean;
|
|
5646
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5213
5647
|
showDiff?: (_data: {
|
|
5214
5648
|
curValue: any;
|
|
5215
5649
|
lastValue: any;
|
|
@@ -5226,12 +5660,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5226
5660
|
}>, {
|
|
5227
5661
|
values: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5228
5662
|
lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5229
|
-
formState: FormState;
|
|
5663
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5230
5664
|
initialized: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
5231
5665
|
changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
|
|
5232
5666
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5233
5667
|
resetForm: () => void;
|
|
5234
5668
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5669
|
+
validate: () => Promise<string>;
|
|
5235
5670
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5236
5671
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5237
5672
|
error: (...args: any[]) => void;
|
|
@@ -5243,7 +5678,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5243
5678
|
disabled: boolean;
|
|
5244
5679
|
labelWidth: string;
|
|
5245
5680
|
inline: boolean;
|
|
5246
|
-
labelPosition:
|
|
5681
|
+
labelPosition: "top" | "left" | "right";
|
|
5247
5682
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5248
5683
|
height: string;
|
|
5249
5684
|
initValues: Record<string, any>;
|
|
@@ -5251,7 +5686,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5251
5686
|
isCompare: boolean;
|
|
5252
5687
|
keyProp: string;
|
|
5253
5688
|
parentValues: Record<string, any>;
|
|
5689
|
+
useFieldTextInError: boolean;
|
|
5254
5690
|
stepActive: string | number;
|
|
5691
|
+
validateOnInit: boolean;
|
|
5255
5692
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
5256
5693
|
beforeCreate?: (() => void) | (() => void)[];
|
|
5257
5694
|
created?: (() => void) | (() => void)[];
|
|
@@ -5276,7 +5713,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5276
5713
|
disabled: boolean;
|
|
5277
5714
|
labelWidth: string;
|
|
5278
5715
|
inline: boolean;
|
|
5279
|
-
labelPosition:
|
|
5716
|
+
labelPosition: "top" | "left" | "right";
|
|
5280
5717
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5281
5718
|
height: string;
|
|
5282
5719
|
initValues: Record<string, any>;
|
|
@@ -5284,7 +5721,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5284
5721
|
isCompare: boolean;
|
|
5285
5722
|
keyProp: string;
|
|
5286
5723
|
parentValues: Record<string, any>;
|
|
5724
|
+
useFieldTextInError: boolean;
|
|
5287
5725
|
stepActive: string | number;
|
|
5726
|
+
validateOnInit: boolean;
|
|
5288
5727
|
}> & Omit<Readonly<{
|
|
5289
5728
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5290
5729
|
initValues: Record<string, any>;
|
|
@@ -5292,16 +5731,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5292
5731
|
isCompare?: boolean;
|
|
5293
5732
|
parentValues?: Record<string, any>;
|
|
5294
5733
|
labelWidth?: string;
|
|
5734
|
+
typeMatchValid?: boolean;
|
|
5735
|
+
validateOnInit?: boolean;
|
|
5295
5736
|
disabled?: boolean;
|
|
5296
5737
|
height?: string;
|
|
5297
5738
|
stepActive?: string | number;
|
|
5298
5739
|
size?: "small" | "default" | "large";
|
|
5299
5740
|
inline?: boolean;
|
|
5300
|
-
labelPosition?:
|
|
5741
|
+
labelPosition?: "top" | "left" | "right";
|
|
5301
5742
|
keyProp?: string;
|
|
5302
5743
|
popperClass?: string;
|
|
5303
5744
|
preventSubmitDefault?: boolean;
|
|
5304
|
-
|
|
5745
|
+
useFieldTextInError?: boolean;
|
|
5746
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5305
5747
|
showDiff?: (_data: {
|
|
5306
5748
|
curValue: any;
|
|
5307
5749
|
lastValue: any;
|
|
@@ -5315,24 +5757,25 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5315
5757
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
5316
5758
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
5317
5759
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
5318
|
-
}>, "values" | "changeHandler" | "
|
|
5760
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
5319
5761
|
values: FormValue;
|
|
5320
5762
|
lastValuesProcessed: FormValue;
|
|
5321
|
-
formState: FormState;
|
|
5763
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5322
5764
|
initialized: boolean;
|
|
5323
5765
|
changeRecords: ChangeRecord$1[];
|
|
5324
5766
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5325
5767
|
resetForm: () => void;
|
|
5326
5768
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5769
|
+
validate: () => Promise<string>;
|
|
5327
5770
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5328
5771
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
5329
5772
|
$slots: FormSlots;
|
|
5330
5773
|
}) | null>>;
|
|
5331
5774
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
5332
5775
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5776
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
5333
5777
|
mounted: (internalInstance: any) => any;
|
|
5334
5778
|
unmounted: () => any;
|
|
5335
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
5336
5779
|
"submit-error": (e: any) => any;
|
|
5337
5780
|
"form-error": (e: any) => any;
|
|
5338
5781
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -5361,12 +5804,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5361
5804
|
disabledShowSrc?: boolean;
|
|
5362
5805
|
labelWidth?: string;
|
|
5363
5806
|
codeValueKey?: string;
|
|
5364
|
-
labelPosition?:
|
|
5365
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5807
|
+
labelPosition?: "top" | "left" | "right";
|
|
5366
5808
|
}> & Readonly<{
|
|
5809
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
5367
5810
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5368
5811
|
onUnmounted?: (() => any) | undefined;
|
|
5369
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5370
5812
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5371
5813
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5372
5814
|
}>, "submit" | "configForm"> & {
|
|
@@ -5380,16 +5822,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5380
5822
|
readonly isCompare?: boolean | undefined;
|
|
5381
5823
|
readonly parentValues?: Record<string, any> | undefined;
|
|
5382
5824
|
readonly labelWidth?: string | undefined;
|
|
5825
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5826
|
+
readonly validateOnInit?: boolean | undefined;
|
|
5383
5827
|
readonly disabled?: boolean | undefined;
|
|
5384
5828
|
readonly height?: string | undefined;
|
|
5385
5829
|
readonly stepActive?: string | number | undefined;
|
|
5386
5830
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
5387
5831
|
readonly inline?: boolean | undefined;
|
|
5388
|
-
readonly labelPosition?:
|
|
5832
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
5389
5833
|
readonly keyProp?: string | undefined;
|
|
5390
5834
|
readonly popperClass?: string | undefined;
|
|
5391
5835
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5392
|
-
readonly
|
|
5836
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
5837
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
5393
5838
|
readonly showDiff?: ((_data: {
|
|
5394
5839
|
curValue: any;
|
|
5395
5840
|
lastValue: any;
|
|
@@ -5422,16 +5867,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5422
5867
|
isCompare?: boolean;
|
|
5423
5868
|
parentValues?: Record<string, any>;
|
|
5424
5869
|
labelWidth?: string;
|
|
5870
|
+
typeMatchValid?: boolean;
|
|
5871
|
+
validateOnInit?: boolean;
|
|
5425
5872
|
disabled?: boolean;
|
|
5426
5873
|
height?: string;
|
|
5427
5874
|
stepActive?: string | number;
|
|
5428
5875
|
size?: "small" | "default" | "large";
|
|
5429
5876
|
inline?: boolean;
|
|
5430
|
-
labelPosition?:
|
|
5877
|
+
labelPosition?: "top" | "left" | "right";
|
|
5431
5878
|
keyProp?: string;
|
|
5432
5879
|
popperClass?: string;
|
|
5433
5880
|
preventSubmitDefault?: boolean;
|
|
5434
|
-
|
|
5881
|
+
useFieldTextInError?: boolean;
|
|
5882
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5435
5883
|
showDiff?: (_data: {
|
|
5436
5884
|
curValue: any;
|
|
5437
5885
|
lastValue: any;
|
|
@@ -5448,12 +5896,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5448
5896
|
}>, {
|
|
5449
5897
|
values: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5450
5898
|
lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5451
|
-
formState: FormState;
|
|
5899
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5452
5900
|
initialized: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
5453
5901
|
changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
|
|
5454
5902
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5455
5903
|
resetForm: () => void;
|
|
5456
5904
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5905
|
+
validate: () => Promise<string>;
|
|
5457
5906
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5458
5907
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5459
5908
|
error: (...args: any[]) => void;
|
|
@@ -5465,7 +5914,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5465
5914
|
disabled: boolean;
|
|
5466
5915
|
labelWidth: string;
|
|
5467
5916
|
inline: boolean;
|
|
5468
|
-
labelPosition:
|
|
5917
|
+
labelPosition: "top" | "left" | "right";
|
|
5469
5918
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5470
5919
|
height: string;
|
|
5471
5920
|
initValues: Record<string, any>;
|
|
@@ -5473,7 +5922,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5473
5922
|
isCompare: boolean;
|
|
5474
5923
|
keyProp: string;
|
|
5475
5924
|
parentValues: Record<string, any>;
|
|
5925
|
+
useFieldTextInError: boolean;
|
|
5476
5926
|
stepActive: string | number;
|
|
5927
|
+
validateOnInit: boolean;
|
|
5477
5928
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
5478
5929
|
beforeCreate?: (() => void) | (() => void)[];
|
|
5479
5930
|
created?: (() => void) | (() => void)[];
|
|
@@ -5498,7 +5949,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5498
5949
|
disabled: boolean;
|
|
5499
5950
|
labelWidth: string;
|
|
5500
5951
|
inline: boolean;
|
|
5501
|
-
labelPosition:
|
|
5952
|
+
labelPosition: "top" | "left" | "right";
|
|
5502
5953
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5503
5954
|
height: string;
|
|
5504
5955
|
initValues: Record<string, any>;
|
|
@@ -5506,7 +5957,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5506
5957
|
isCompare: boolean;
|
|
5507
5958
|
keyProp: string;
|
|
5508
5959
|
parentValues: Record<string, any>;
|
|
5960
|
+
useFieldTextInError: boolean;
|
|
5509
5961
|
stepActive: string | number;
|
|
5962
|
+
validateOnInit: boolean;
|
|
5510
5963
|
}> & Omit<Readonly<{
|
|
5511
5964
|
config: import("@tmagic/form-schema").FormConfig;
|
|
5512
5965
|
initValues: Record<string, any>;
|
|
@@ -5514,16 +5967,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5514
5967
|
isCompare?: boolean;
|
|
5515
5968
|
parentValues?: Record<string, any>;
|
|
5516
5969
|
labelWidth?: string;
|
|
5970
|
+
typeMatchValid?: boolean;
|
|
5971
|
+
validateOnInit?: boolean;
|
|
5517
5972
|
disabled?: boolean;
|
|
5518
5973
|
height?: string;
|
|
5519
5974
|
stepActive?: string | number;
|
|
5520
5975
|
size?: "small" | "default" | "large";
|
|
5521
5976
|
inline?: boolean;
|
|
5522
|
-
labelPosition?:
|
|
5977
|
+
labelPosition?: "top" | "left" | "right";
|
|
5523
5978
|
keyProp?: string;
|
|
5524
5979
|
popperClass?: string;
|
|
5525
5980
|
preventSubmitDefault?: boolean;
|
|
5526
|
-
|
|
5981
|
+
useFieldTextInError?: boolean;
|
|
5982
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5527
5983
|
showDiff?: (_data: {
|
|
5528
5984
|
curValue: any;
|
|
5529
5985
|
lastValue: any;
|
|
@@ -5537,15 +5993,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5537
5993
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
5538
5994
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
5539
5995
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
5540
|
-
}>, "values" | "changeHandler" | "
|
|
5996
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
5541
5997
|
values: FormValue;
|
|
5542
5998
|
lastValuesProcessed: FormValue;
|
|
5543
|
-
formState: FormState;
|
|
5999
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5544
6000
|
initialized: boolean;
|
|
5545
6001
|
changeRecords: ChangeRecord$1[];
|
|
5546
6002
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5547
6003
|
resetForm: () => void;
|
|
5548
6004
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6005
|
+
validate: () => Promise<string>;
|
|
5549
6006
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
5550
6007
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
5551
6008
|
$slots: FormSlots;
|
|
@@ -5560,8 +6017,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5560
6017
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5561
6018
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5562
6019
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5563
|
-
declare const __VLS_export$
|
|
5564
|
-
declare const _default$
|
|
6020
|
+
declare const __VLS_export$19: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
|
|
6021
|
+
declare const _default$31: typeof __VLS_export$19;
|
|
5565
6022
|
type __VLS_WithSlots$7<T, S> = T & {
|
|
5566
6023
|
new (): {
|
|
5567
6024
|
$slots: S;
|
|
@@ -5572,16 +6029,15 @@ type __VLS_WithSlots$7<T, S> = T & {
|
|
|
5572
6029
|
type __VLS_Slots$6 = {
|
|
5573
6030
|
'props-form-panel-header'(_props: {}): any;
|
|
5574
6031
|
};
|
|
5575
|
-
type __VLS_Props$
|
|
6032
|
+
type __VLS_Props$15 = {
|
|
5576
6033
|
config: FormConfig;
|
|
5577
6034
|
values: FormValue;
|
|
5578
6035
|
disabledShowSrc?: boolean;
|
|
5579
6036
|
labelWidth?: string;
|
|
5580
6037
|
codeValueKey?: string;
|
|
5581
|
-
labelPosition?:
|
|
5582
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
6038
|
+
labelPosition?: 'top' | 'left' | 'right';
|
|
5583
6039
|
};
|
|
5584
|
-
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6040
|
+
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
|
|
5585
6041
|
configForm: Readonly<import("@vue/reactivity").ShallowRef<({
|
|
5586
6042
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
5587
6043
|
$data: {};
|
|
@@ -5592,16 +6048,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5592
6048
|
readonly isCompare?: boolean | undefined;
|
|
5593
6049
|
readonly parentValues?: Record<string, any> | undefined;
|
|
5594
6050
|
readonly labelWidth?: string | undefined;
|
|
6051
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
6052
|
+
readonly validateOnInit?: boolean | undefined;
|
|
5595
6053
|
readonly disabled?: boolean | undefined;
|
|
5596
6054
|
readonly height?: string | undefined;
|
|
5597
6055
|
readonly stepActive?: string | number | undefined;
|
|
5598
6056
|
readonly size?: "small" | "default" | "large" | undefined;
|
|
5599
6057
|
readonly inline?: boolean | undefined;
|
|
5600
|
-
readonly labelPosition?:
|
|
6058
|
+
readonly labelPosition?: "top" | "left" | "right" | undefined;
|
|
5601
6059
|
readonly keyProp?: string | undefined;
|
|
5602
6060
|
readonly popperClass?: string | undefined;
|
|
5603
6061
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5604
|
-
readonly
|
|
6062
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
6063
|
+
readonly context?: import("@tmagic/form-schema").FormContext | undefined;
|
|
5605
6064
|
readonly showDiff?: ((_data: {
|
|
5606
6065
|
curValue: any;
|
|
5607
6066
|
lastValue: any;
|
|
@@ -5634,16 +6093,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5634
6093
|
isCompare?: boolean;
|
|
5635
6094
|
parentValues?: Record<string, any>;
|
|
5636
6095
|
labelWidth?: string;
|
|
6096
|
+
typeMatchValid?: boolean;
|
|
6097
|
+
validateOnInit?: boolean;
|
|
5637
6098
|
disabled?: boolean;
|
|
5638
6099
|
height?: string;
|
|
5639
6100
|
stepActive?: string | number;
|
|
5640
6101
|
size?: "small" | "default" | "large";
|
|
5641
6102
|
inline?: boolean;
|
|
5642
|
-
labelPosition?:
|
|
6103
|
+
labelPosition?: "top" | "left" | "right";
|
|
5643
6104
|
keyProp?: string;
|
|
5644
6105
|
popperClass?: string;
|
|
5645
6106
|
preventSubmitDefault?: boolean;
|
|
5646
|
-
|
|
6107
|
+
useFieldTextInError?: boolean;
|
|
6108
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5647
6109
|
showDiff?: (_data: {
|
|
5648
6110
|
curValue: any;
|
|
5649
6111
|
lastValue: any;
|
|
@@ -5660,12 +6122,13 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5660
6122
|
}>, {
|
|
5661
6123
|
values: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5662
6124
|
lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
|
|
5663
|
-
formState: FormState;
|
|
6125
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5664
6126
|
initialized: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
5665
6127
|
changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
|
|
5666
6128
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5667
6129
|
resetForm: () => void;
|
|
5668
6130
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6131
|
+
validate: () => Promise<string>;
|
|
5669
6132
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
5670
6133
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5671
6134
|
error: (...args: any[]) => void;
|
|
@@ -5677,7 +6140,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5677
6140
|
disabled: boolean;
|
|
5678
6141
|
labelWidth: string;
|
|
5679
6142
|
inline: boolean;
|
|
5680
|
-
labelPosition:
|
|
6143
|
+
labelPosition: "top" | "left" | "right";
|
|
5681
6144
|
config: FormConfig;
|
|
5682
6145
|
height: string;
|
|
5683
6146
|
initValues: Record<string, any>;
|
|
@@ -5685,7 +6148,9 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5685
6148
|
isCompare: boolean;
|
|
5686
6149
|
keyProp: string;
|
|
5687
6150
|
parentValues: Record<string, any>;
|
|
6151
|
+
useFieldTextInError: boolean;
|
|
5688
6152
|
stepActive: string | number;
|
|
6153
|
+
validateOnInit: boolean;
|
|
5689
6154
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
5690
6155
|
beforeCreate?: (() => void) | (() => void)[];
|
|
5691
6156
|
created?: (() => void) | (() => void)[];
|
|
@@ -5710,7 +6175,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5710
6175
|
disabled: boolean;
|
|
5711
6176
|
labelWidth: string;
|
|
5712
6177
|
inline: boolean;
|
|
5713
|
-
labelPosition:
|
|
6178
|
+
labelPosition: "top" | "left" | "right";
|
|
5714
6179
|
config: FormConfig;
|
|
5715
6180
|
height: string;
|
|
5716
6181
|
initValues: Record<string, any>;
|
|
@@ -5718,7 +6183,9 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5718
6183
|
isCompare: boolean;
|
|
5719
6184
|
keyProp: string;
|
|
5720
6185
|
parentValues: Record<string, any>;
|
|
6186
|
+
useFieldTextInError: boolean;
|
|
5721
6187
|
stepActive: string | number;
|
|
6188
|
+
validateOnInit: boolean;
|
|
5722
6189
|
}> & Omit<Readonly<{
|
|
5723
6190
|
config: FormConfig;
|
|
5724
6191
|
initValues: Record<string, any>;
|
|
@@ -5726,16 +6193,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5726
6193
|
isCompare?: boolean;
|
|
5727
6194
|
parentValues?: Record<string, any>;
|
|
5728
6195
|
labelWidth?: string;
|
|
6196
|
+
typeMatchValid?: boolean;
|
|
6197
|
+
validateOnInit?: boolean;
|
|
5729
6198
|
disabled?: boolean;
|
|
5730
6199
|
height?: string;
|
|
5731
6200
|
stepActive?: string | number;
|
|
5732
6201
|
size?: "small" | "default" | "large";
|
|
5733
6202
|
inline?: boolean;
|
|
5734
|
-
labelPosition?:
|
|
6203
|
+
labelPosition?: "top" | "left" | "right";
|
|
5735
6204
|
keyProp?: string;
|
|
5736
6205
|
popperClass?: string;
|
|
5737
6206
|
preventSubmitDefault?: boolean;
|
|
5738
|
-
|
|
6207
|
+
useFieldTextInError?: boolean;
|
|
6208
|
+
context?: import("@tmagic/form-schema").FormContext;
|
|
5739
6209
|
showDiff?: (_data: {
|
|
5740
6210
|
curValue: any;
|
|
5741
6211
|
lastValue: any;
|
|
@@ -5749,35 +6219,36 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5749
6219
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
5750
6220
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
5751
6221
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
5752
|
-
}>, "values" | "changeHandler" | "
|
|
6222
|
+
}>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
|
|
5753
6223
|
values: FormValue;
|
|
5754
6224
|
lastValuesProcessed: FormValue;
|
|
5755
|
-
formState: FormState;
|
|
6225
|
+
formState: import("@tmagic/form-schema").FormState;
|
|
5756
6226
|
initialized: boolean;
|
|
5757
6227
|
changeRecords: ChangeRecord$1[];
|
|
5758
6228
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5759
6229
|
resetForm: () => void;
|
|
5760
6230
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6231
|
+
validate: () => Promise<string>;
|
|
5761
6232
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
5762
6233
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
5763
6234
|
$slots: FormSlots;
|
|
5764
6235
|
}) | null>>;
|
|
5765
6236
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
5766
6237
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6238
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
5767
6239
|
mounted: (internalInstance: any) => any;
|
|
5768
6240
|
unmounted: () => any;
|
|
5769
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
5770
6241
|
"submit-error": (e: any) => any;
|
|
5771
6242
|
"form-error": (e: any) => any;
|
|
5772
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6243
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
|
|
6244
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
5773
6245
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5774
6246
|
onUnmounted?: (() => any) | undefined;
|
|
5775
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5776
6247
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5777
6248
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5778
6249
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5779
|
-
declare const __VLS_export$
|
|
5780
|
-
declare const _default$
|
|
6250
|
+
declare const __VLS_export$18: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
6251
|
+
declare const _default$30: typeof __VLS_export$18;
|
|
5781
6252
|
type __VLS_WithSlots$6<T, S> = T & {
|
|
5782
6253
|
new (): {
|
|
5783
6254
|
$slots: S;
|
|
@@ -5785,20 +6256,20 @@ type __VLS_WithSlots$6<T, S> = T & {
|
|
|
5785
6256
|
};
|
|
5786
6257
|
//#endregion
|
|
5787
6258
|
//#region temp/packages/editor/src/components/ToolButton.vue.d.ts
|
|
5788
|
-
type __VLS_Props$
|
|
6259
|
+
type __VLS_Props$14 = {
|
|
5789
6260
|
data?: MenuButton | MenuComponent;
|
|
5790
6261
|
eventType?: 'mousedown' | 'mouseup' | 'click';
|
|
5791
6262
|
};
|
|
5792
|
-
declare const __VLS_export$
|
|
6263
|
+
declare const __VLS_export$17: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
|
|
5793
6264
|
getElRef: () => Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5794
|
-
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6265
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{}>, {
|
|
5795
6266
|
data: MenuButton | MenuComponent;
|
|
5796
6267
|
eventType: "mousedown" | "mouseup" | "click";
|
|
5797
6268
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5798
|
-
declare const _default$
|
|
6269
|
+
declare const _default$36: typeof __VLS_export$17;
|
|
5799
6270
|
//#endregion
|
|
5800
6271
|
//#region temp/packages/editor/src/components/ContentMenu.vue.d.ts
|
|
5801
|
-
type __VLS_Props$
|
|
6272
|
+
type __VLS_Props$13 = {
|
|
5802
6273
|
menuData?: (MenuButton | MenuComponent)[];
|
|
5803
6274
|
isSubMenu?: boolean;
|
|
5804
6275
|
active?: string | number;
|
|
@@ -5808,7 +6279,7 @@ declare var __VLS_7$1: {};
|
|
|
5808
6279
|
type __VLS_Slots$5 = {} & {
|
|
5809
6280
|
title?: (props: typeof __VLS_7$1) => any;
|
|
5810
6281
|
};
|
|
5811
|
-
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6282
|
+
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
|
|
5812
6283
|
menu: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5813
6284
|
menuPosition: Ref<{
|
|
5814
6285
|
left: number;
|
|
@@ -5834,7 +6305,7 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5834
6305
|
mouseenter: () => any;
|
|
5835
6306
|
show: () => any;
|
|
5836
6307
|
hide: () => any;
|
|
5837
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6308
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{
|
|
5838
6309
|
onMouseenter?: (() => any) | undefined;
|
|
5839
6310
|
onShow?: (() => any) | undefined;
|
|
5840
6311
|
onHide?: (() => any) | undefined;
|
|
@@ -5843,8 +6314,8 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5843
6314
|
isSubMenu: boolean;
|
|
5844
6315
|
autoHide: boolean;
|
|
5845
6316
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5846
|
-
declare const __VLS_export$
|
|
5847
|
-
declare const _default$8: typeof __VLS_export$
|
|
6317
|
+
declare const __VLS_export$16: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
6318
|
+
declare const _default$8: typeof __VLS_export$16;
|
|
5848
6319
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
5849
6320
|
new (): {
|
|
5850
6321
|
$slots: S;
|
|
@@ -5852,14 +6323,14 @@ type __VLS_WithSlots$5<T, S> = T & {
|
|
|
5852
6323
|
};
|
|
5853
6324
|
//#endregion
|
|
5854
6325
|
//#region temp/packages/editor/src/components/Icon.vue.d.ts
|
|
5855
|
-
type __VLS_Props$
|
|
6326
|
+
type __VLS_Props$12 = {
|
|
5856
6327
|
icon?: any;
|
|
5857
6328
|
};
|
|
5858
|
-
declare const __VLS_export$
|
|
5859
|
-
declare const _default$24: typeof __VLS_export$
|
|
6329
|
+
declare const __VLS_export$15: import("@vue/runtime-core").DefineComponent<__VLS_Props$12, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$12> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6330
|
+
declare const _default$24: typeof __VLS_export$15;
|
|
5860
6331
|
//#endregion
|
|
5861
6332
|
//#region temp/packages/editor/src/components/SplitView.vue.d.ts
|
|
5862
|
-
type __VLS_Props$
|
|
6333
|
+
type __VLS_Props$11 = {
|
|
5863
6334
|
width?: number;
|
|
5864
6335
|
left?: number;
|
|
5865
6336
|
right?: number;
|
|
@@ -5878,13 +6349,13 @@ type __VLS_Slots$4 = {} & {
|
|
|
5878
6349
|
} & {
|
|
5879
6350
|
right?: (props: typeof __VLS_19) => any;
|
|
5880
6351
|
};
|
|
5881
|
-
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6352
|
+
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {
|
|
5882
6353
|
updateWidth(): void;
|
|
5883
6354
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5884
6355
|
change: (...args: any[]) => void;
|
|
5885
6356
|
"update:left": (...args: any[]) => void;
|
|
5886
6357
|
"update:right": (...args: any[]) => void;
|
|
5887
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6358
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
|
|
5888
6359
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
5889
6360
|
"onUpdate:left"?: ((...args: any[]) => any) | undefined;
|
|
5890
6361
|
"onUpdate:right"?: ((...args: any[]) => any) | undefined;
|
|
@@ -5893,8 +6364,8 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5893
6364
|
minRight: number;
|
|
5894
6365
|
minCenter: number;
|
|
5895
6366
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5896
|
-
declare const __VLS_export$
|
|
5897
|
-
declare const _default$
|
|
6367
|
+
declare const __VLS_export$14: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
6368
|
+
declare const _default$28: typeof __VLS_export$14;
|
|
5898
6369
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
5899
6370
|
new (): {
|
|
5900
6371
|
$slots: S;
|
|
@@ -5911,8 +6382,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<{}, {},
|
|
|
5911
6382
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
|
|
5912
6383
|
onChange?: ((e: OnDrag$1<import("gesto").default>) => any) | undefined;
|
|
5913
6384
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
5914
|
-
declare const __VLS_export$
|
|
5915
|
-
declare const _default$
|
|
6385
|
+
declare const __VLS_export$13: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
6386
|
+
declare const _default$32: typeof __VLS_export$13;
|
|
5916
6387
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
5917
6388
|
new (): {
|
|
5918
6389
|
$slots: S;
|
|
@@ -5920,7 +6391,7 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
5920
6391
|
};
|
|
5921
6392
|
//#endregion
|
|
5922
6393
|
//#region temp/packages/editor/src/components/CodeBlockEditor.vue.d.ts
|
|
5923
|
-
type __VLS_Props$
|
|
6394
|
+
type __VLS_Props$10 = {
|
|
5924
6395
|
content: Omit<CodeBlockContent, 'content'> & {
|
|
5925
6396
|
content: string;
|
|
5926
6397
|
};
|
|
@@ -5932,8 +6403,8 @@ type __VLS_ModelProps$1 = {
|
|
|
5932
6403
|
'width'?: number;
|
|
5933
6404
|
'visible'?: boolean;
|
|
5934
6405
|
};
|
|
5935
|
-
type __VLS_PublicProps$1 = __VLS_Props$
|
|
5936
|
-
declare const __VLS_export$
|
|
6406
|
+
type __VLS_PublicProps$1 = __VLS_Props$10 & __VLS_ModelProps$1;
|
|
6407
|
+
declare const __VLS_export$12: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
|
|
5937
6408
|
show(): Promise<void>;
|
|
5938
6409
|
hide(): Promise<void>;
|
|
5939
6410
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -5949,52 +6420,40 @@ declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
5949
6420
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5950
6421
|
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5951
6422
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5952
|
-
declare const _default: typeof __VLS_export$
|
|
6423
|
+
declare const _default: typeof __VLS_export$12;
|
|
5953
6424
|
//#endregion
|
|
5954
6425
|
//#region temp/packages/editor/src/components/CompareForm.vue.d.ts
|
|
5955
|
-
type __VLS_Props$
|
|
5956
|
-
/**
|
|
5957
|
-
lastValue?:
|
|
5958
|
-
/**
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
/**
|
|
5974
|
-
|
|
5975
|
-
* PropsPanel 的 `extend-state` 语义一致。表单 item 的 `display` / `disabled` 等
|
|
5976
|
-
* filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
|
|
5977
|
-
* 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
|
|
5978
|
-
*/
|
|
5979
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5980
|
-
/**
|
|
5981
|
-
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
|
|
5982
|
-
* 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
|
|
5983
|
-
* `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。返回的 config 直接用于对比展示。
|
|
5984
|
-
*/
|
|
5985
|
-
loadConfig?: CompareFormLoadConfig; /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
|
|
5986
|
-
services: Services;
|
|
6426
|
+
type __VLS_Props$9 = CompareFormBaseProps & {
|
|
6427
|
+
/** 用于对比的旧值(修改前的值) */
|
|
6428
|
+
lastValue?: CompareFormBaseProps['value'];
|
|
6429
|
+
/** 需要走 self diff 的字段类型(例如 mod-cond)。 */
|
|
6430
|
+
selfDiffFieldTypes?: string[];
|
|
6431
|
+
};
|
|
6432
|
+
declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
|
|
6433
|
+
form: ShallowRef<InstanceType<typeof MForm> | null>;
|
|
6434
|
+
config: Ref<FormConfig>;
|
|
6435
|
+
reload: () => Promise<void>;
|
|
6436
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
|
|
6437
|
+
labelWidth: string;
|
|
6438
|
+
category: CompareCategory;
|
|
6439
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6440
|
+
declare const _default$5: typeof __VLS_export$11;
|
|
6441
|
+
//#endregion
|
|
6442
|
+
//#region temp/packages/editor/src/components/ViewForm.vue.d.ts
|
|
6443
|
+
type __VLS_Props$8 = CompareFormBaseProps & {
|
|
6444
|
+
/** 是否禁用表单(默认只读展示)。 */
|
|
6445
|
+
disabled?: boolean;
|
|
5987
6446
|
};
|
|
5988
6447
|
declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
|
|
5989
6448
|
form: ShallowRef<InstanceType<typeof MForm> | null>;
|
|
5990
6449
|
config: Ref<FormConfig>;
|
|
5991
6450
|
reload: () => Promise<void>;
|
|
5992
6451
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
|
|
6452
|
+
disabled: boolean;
|
|
5993
6453
|
labelWidth: string;
|
|
5994
|
-
services: Services;
|
|
5995
6454
|
category: CompareCategory;
|
|
5996
6455
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5997
|
-
declare const _default$
|
|
6456
|
+
declare const _default$39: typeof __VLS_export$10;
|
|
5998
6457
|
//#endregion
|
|
5999
6458
|
//#region temp/packages/editor/src/layouts/history-list/composables.d.ts
|
|
6000
6459
|
/**
|
|
@@ -6020,7 +6479,7 @@ interface HistoryBucketGroup<T extends BaseStepValue = BaseStepValue> {
|
|
|
6020
6479
|
* 通用二次确认弹窗:清空历史 / 无法差异对比的回滚等会改变状态的操作,先弹出确认框,
|
|
6021
6480
|
* 用户点击「确定」返回 true,取消(confirm reject)时返回 false 并静默忽略。
|
|
6022
6481
|
*/
|
|
6023
|
-
declare const confirmHistoryAction: (message: string) => Promise<boolean>;
|
|
6482
|
+
export declare const confirmHistoryAction: (message: string) => Promise<boolean>;
|
|
6024
6483
|
//#endregion
|
|
6025
6484
|
//#region temp/packages/editor/src/layouts/history-list/Bucket.vue.d.ts
|
|
6026
6485
|
declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
@@ -6029,9 +6488,12 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
|
|
|
6029
6488
|
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
|
|
6030
6489
|
* 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
|
|
6031
6490
|
*/
|
|
6032
|
-
config: HistoryBucketConfig<T>;
|
|
6033
|
-
|
|
6034
|
-
|
|
6491
|
+
config: HistoryBucketConfig<T>;
|
|
6492
|
+
/** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
|
|
6493
|
+
bucketId: string | number;
|
|
6494
|
+
/** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
|
|
6495
|
+
groups: HistoryBucketGroup<T>[];
|
|
6496
|
+
/** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
|
|
6035
6497
|
expanded: Record<string, boolean>;
|
|
6036
6498
|
} & {
|
|
6037
6499
|
onToggle?: ((_key: string) => any) | undefined;
|
|
@@ -6053,16 +6515,16 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
|
|
|
6053
6515
|
(_e: "revert-step", _bucketId: string | number, _index: number): void;
|
|
6054
6516
|
};
|
|
6055
6517
|
}>) => import("vue").VNode & {
|
|
6056
|
-
__ctx?: Awaited<typeof __VLS_setup
|
|
6518
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
6057
6519
|
};
|
|
6058
6520
|
declare const _default$22: typeof __VLS_export$9;
|
|
6059
|
-
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
6521
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
6060
6522
|
//#endregion
|
|
6061
6523
|
//#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
|
|
6062
6524
|
declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6063
6525
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
6064
6526
|
/**
|
|
6065
|
-
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled),
|
|
6527
|
+
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled / showClear),
|
|
6066
6528
|
* 由父组件按业务类型注入并整体透传给 Bucket,避免逐项透传多个 props。
|
|
6067
6529
|
*/
|
|
6068
6530
|
config: HistoryBucketConfig<T>;
|
|
@@ -6102,26 +6564,23 @@ declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
|
|
|
6102
6564
|
(_e: "clear"): void;
|
|
6103
6565
|
};
|
|
6104
6566
|
}>) => import("vue").VNode & {
|
|
6105
|
-
__ctx?: Awaited<typeof __VLS_setup
|
|
6567
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
6106
6568
|
};
|
|
6107
6569
|
declare const _default$23: typeof __VLS_export$8;
|
|
6108
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
6570
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
6109
6571
|
//#endregion
|
|
6110
6572
|
//#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
|
|
6111
6573
|
type __VLS_Props$7 = {
|
|
6112
|
-
/** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
|
|
6113
|
-
|
|
6114
|
-
* 来自 Editor 顶层的 `extendFormState`,用于扩展 MForm.formState。
|
|
6115
|
-
* 透传给 CompareForm,从而让差异对比时表单 item 中依赖业务上下文的
|
|
6116
|
-
* `display` / `disabled` 等 filterFunction 正常工作。
|
|
6117
|
-
*/
|
|
6118
|
-
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
6574
|
+
/** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
|
|
6575
|
+
services?: Services;
|
|
6119
6576
|
/**
|
|
6120
6577
|
* 自定义 FormConfig 加载逻辑,透传给 CompareForm。传入后将接管内置的按 `category`
|
|
6121
6578
|
* 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
6122
6579
|
*/
|
|
6123
6580
|
loadConfig?: CompareFormLoadConfig;
|
|
6124
6581
|
width?: string;
|
|
6582
|
+
/** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
|
|
6583
|
+
size?: FieldSize;
|
|
6125
6584
|
isConfirm?: boolean;
|
|
6126
6585
|
onConfirm?: () => void;
|
|
6127
6586
|
selfDiffFieldTypes?: string[];
|
|
@@ -6136,7 +6595,6 @@ declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_
|
|
|
6136
6595
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
6137
6596
|
}>, {
|
|
6138
6597
|
width: string;
|
|
6139
|
-
services: Services;
|
|
6140
6598
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6141
6599
|
declare const _default$21: typeof __VLS_export$7;
|
|
6142
6600
|
//#endregion
|
|
@@ -6164,15 +6622,15 @@ declare const _default$21: typeof __VLS_export$7;
|
|
|
6164
6622
|
* ```ts
|
|
6165
6623
|
* import { useHistoryRevert } from '@tmagic/editor';
|
|
6166
6624
|
*
|
|
6167
|
-
* const { onPageRevert, onPageDiff } = useHistoryRevert(editorRef.value); // editorRef.value 即 Editor 暴露的 services
|
|
6625
|
+
* const { onPageRevert, onPageDiff } = useHistoryRevert({}, editorRef.value); // editorRef.value 即 Editor 暴露的 services
|
|
6168
6626
|
* await onPageRevert(index); // 弹出差异 / 二次确认弹窗后回滚
|
|
6169
6627
|
* onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
|
|
6170
6628
|
* ```
|
|
6171
6629
|
*/
|
|
6172
|
-
declare const useHistoryRevert: (
|
|
6173
|
-
onPageRevert: (index: number) => Promise<StepValue | null>;
|
|
6174
|
-
onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null>;
|
|
6175
|
-
onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null>;
|
|
6630
|
+
export declare const useHistoryRevert: (options?: UseHistoryRevertOptions, services?: Services) => {
|
|
6631
|
+
onPageRevert: (index: number) => Promise<StepValue | null | undefined>;
|
|
6632
|
+
onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null | undefined>;
|
|
6633
|
+
onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null | undefined>;
|
|
6176
6634
|
onPageDiff: (index: number) => Promise<void> | void;
|
|
6177
6635
|
onDataSourceDiff: (id: string | number, index: number) => Promise<void> | void;
|
|
6178
6636
|
onCodeBlockDiff: (id: string | number, index: number) => Promise<void> | void;
|
|
@@ -6194,6 +6652,11 @@ interface Position {
|
|
|
6194
6652
|
type __VLS_Props$6 = {
|
|
6195
6653
|
position?: Position;
|
|
6196
6654
|
title?: string;
|
|
6655
|
+
bodyStyle?: CSSProperties;
|
|
6656
|
+
/** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
|
|
6657
|
+
initialStyle?: CSSProperties;
|
|
6658
|
+
/** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
|
|
6659
|
+
frameworkWidth?: number;
|
|
6197
6660
|
beforeClose?: (_done: (_cancel?: boolean) => void) => void;
|
|
6198
6661
|
};
|
|
6199
6662
|
type __VLS_ModelProps = {
|
|
@@ -6223,6 +6686,8 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
|
|
|
6223
6686
|
}>, {
|
|
6224
6687
|
title: string;
|
|
6225
6688
|
position: Position;
|
|
6689
|
+
initialStyle: CSSProperties;
|
|
6690
|
+
frameworkWidth: number;
|
|
6226
6691
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6227
6692
|
declare const __VLS_export$6: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
6228
6693
|
declare const _default$20: typeof __VLS_export$6;
|
|
@@ -6249,7 +6714,8 @@ type __VLS_Props$5 = {
|
|
|
6249
6714
|
nodeStatusMap: Map<Id, LayerNodeStatus>;
|
|
6250
6715
|
indent?: number;
|
|
6251
6716
|
nextLevelIndentIncrement?: number;
|
|
6252
|
-
emptyText?: string;
|
|
6717
|
+
emptyText?: string;
|
|
6718
|
+
/** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
|
|
6253
6719
|
isExpandable?: IsExpandableFunction;
|
|
6254
6720
|
};
|
|
6255
6721
|
declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Props$5, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -6275,7 +6741,7 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
6275
6741
|
indent: number;
|
|
6276
6742
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6277
6743
|
declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
6278
|
-
declare const _default$
|
|
6744
|
+
declare const _default$37: typeof __VLS_export$5;
|
|
6279
6745
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
6280
6746
|
new (): {
|
|
6281
6747
|
$slots: S;
|
|
@@ -6300,7 +6766,8 @@ type __VLS_Props$4 = {
|
|
|
6300
6766
|
parentsId?: Id[];
|
|
6301
6767
|
nodeStatusMap: Map<Id, LayerNodeStatus>;
|
|
6302
6768
|
indent?: number;
|
|
6303
|
-
nextLevelIndentIncrement?: number;
|
|
6769
|
+
nextLevelIndentIncrement?: number;
|
|
6770
|
+
/** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
|
|
6304
6771
|
isExpandable?: IsExpandableFunction;
|
|
6305
6772
|
};
|
|
6306
6773
|
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -6326,7 +6793,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Prop
|
|
|
6326
6793
|
isExpandable: IsExpandableFunction;
|
|
6327
6794
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6328
6795
|
declare const __VLS_export$4: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
6329
|
-
declare const _default$
|
|
6796
|
+
declare const _default$38: typeof __VLS_export$4;
|
|
6330
6797
|
type __VLS_WithSlots<T, S> = T & {
|
|
6331
6798
|
new (): {
|
|
6332
6799
|
$slots: S;
|
|
@@ -6342,14 +6809,14 @@ declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_
|
|
|
6342
6809
|
}>, {
|
|
6343
6810
|
disabled: boolean;
|
|
6344
6811
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6345
|
-
declare const _default$
|
|
6812
|
+
declare const _default$29: typeof __VLS_export$3;
|
|
6346
6813
|
//#endregion
|
|
6347
6814
|
//#region temp/packages/editor/src/fields/DisplayConds.vue.d.ts
|
|
6348
6815
|
type __VLS_Props$2 = FieldProps<DisplayCondsConfig>;
|
|
6349
6816
|
declare const __VLS_export$2: import("@vue/runtime-core").DefineComponent<__VLS_Props$2, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6350
|
-
change: (value: DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any;
|
|
6817
|
+
change: (value: DisplayCond | DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any;
|
|
6351
6818
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
6352
|
-
onChange?: ((value: DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
6819
|
+
onChange?: ((value: DisplayCond | DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
6353
6820
|
}>, {
|
|
6354
6821
|
disabled: boolean;
|
|
6355
6822
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6373,11 +6840,27 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
6373
6840
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
6374
6841
|
onAddDiffCount?: (() => any) | undefined;
|
|
6375
6842
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6376
|
-
declare const _default$
|
|
6843
|
+
declare const _default$33: typeof __VLS_export;
|
|
6844
|
+
//#endregion
|
|
6845
|
+
//#region temp/packages/editor/src/fields/headless-validation.d.ts
|
|
6846
|
+
/**
|
|
6847
|
+
* 编辑器字段的无渲染登记表(不含 Vue 组件)。
|
|
6848
|
+
*
|
|
6849
|
+
* Node 里 `registerFields(editorFields)` 即可配合 `validateForm` / `submitForm`。
|
|
6850
|
+
* 安装编辑器时由 plugin 把 `component` 叠上去再传给 `@tmagic/form`。
|
|
6851
|
+
*
|
|
6852
|
+
* - 叶子:内部只渲染叶子 UI,或把子表单渲染在独立的 MForm / MFormBox 实例里
|
|
6853
|
+
* - innerConfig:内部再渲染 MContainer / MPanel / MGroupList,把运行期配置交出来
|
|
6854
|
+
* - typeMatch:该 type 自身的类型匹配校验
|
|
6855
|
+
*
|
|
6856
|
+
* innerConfig 返回的 config / model / prop 与组件模板里传给内部容器的那一组保持一一对应,
|
|
6857
|
+
* 且配置本身与组件共用同一份工厂(`fields/configs/`)。
|
|
6858
|
+
*/
|
|
6859
|
+
export declare const editorFields: Record<string, HeadlessFieldOptions>;
|
|
6377
6860
|
//#endregion
|
|
6378
6861
|
//#region temp/packages/editor/src/plugin.d.ts
|
|
6379
|
-
declare const _default$
|
|
6862
|
+
declare const _default$43: {
|
|
6380
6863
|
install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
|
|
6381
6864
|
};
|
|
6382
6865
|
//#endregion
|
|
6383
|
-
export {
|
|
6866
|
+
export { _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, _default$3 as CodeSelect, _default$4 as CodeSelectCol, _default$5 as CompareForm, _default$6 as ComponentListPanel, _default$7 as CondOpSelect, _default$8 as ContentMenu, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DepTargetType, _default$18 as DisplayConds, _default$19 as EventSelect, _default$20 as FloatingBox, _default$21 as HistoryDiffDialog, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, _default$24 as Icon, _default$25 as KeyValue, _default$26 as LayerNodeContent, _default$27 as LayerPanel, _default$28 as LayoutContainer, _default$28 as SplitView, type OnDrag, _default$29 as PageFragmentSelect, _default$30 as PropsFormPanel, _default$31 as PropsPanel, _default$32 as Resizer, StageCore, _default$33 as StyleSetter, _default$34 as TMagicCodeEditor, _default$35 as TMagicEditor, _default$36 as ToolButton, _default$37 as Tree, _default$38 as TreeNode, type TypeMatchValidateContext, _default$39 as ViewForm, _default$40 as codeBlockService, _default$41 as componentListService, _default$42 as dataSourceService, _default$43 as default, _default$44 as depService, designPlugin, _default$45 as editorService, _default$46 as eventsService, formPlugin, getEditorConfig, _default$47 as historyService, isGlobalFlat, _default$48 as keybindingService, _default$49 as loadMonaco, _default$50 as propsService, setEditorConfig, _default$51 as stageOverlayService, _default$52 as storageService, tablePlugin, _default$53 as uiService };
|