@tmagic/editor 1.8.0-beta.2 → 1.8.0-beta.21
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 +43 -9
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +22 -98
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +32 -9
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +68 -17
- package/dist/es/components/Icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/Resizer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollBar.js +0 -1
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollViewer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SearchInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SplitView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +7 -7
- 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 +58 -0
- package/dist/es/editorProps.js +9 -1
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +16 -5
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +81 -44
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +10 -3
- 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 +13 -6
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +11 -8
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +39 -12
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +11 -20
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +11 -6
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +30 -14
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +11 -4
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +38 -6
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +156 -155
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +8 -10
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +28 -6
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +50 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +50 -0
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +7 -7
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +6 -3
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +29 -6
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +32 -6
- 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 +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +11 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +17 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +19 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +19 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +37 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +33 -3
- 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 +56 -30
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +35 -26
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +76 -48
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -23
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/es/fields/UISelect.js +0 -1
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/hooks/use-code-block-edit.js +6 -3
- package/dist/es/hooks/use-compare-form.js +119 -0
- package/dist/es/hooks/use-data-source-edit.js +5 -2
- package/dist/es/hooks/use-stage.js +9 -4
- 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 +17 -0
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/index.js +24 -10
- package/dist/es/initService.js +19 -13
- 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 +24 -12
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +25 -18
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +4 -4
- 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 +25 -38
- package/dist/es/layouts/history-list/BucketTab.js +5 -0
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +177 -88
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +139 -37
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +164 -107
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +44 -9
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +49 -53
- package/dist/es/layouts/history-list/composables.js +138 -108
- package/dist/es/layouts/history-list/useHistoryList.js +56 -0
- package/dist/es/layouts/history-list/useHistoryRevert.js +317 -0
- 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 +5 -3
- 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 -7
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +33 -13
- 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 +26 -38
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +4 -4
- 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 +23 -6
- 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 +27 -5
- 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 +8 -8
- 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 +2 -2
- package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
- 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 +2 -2
- 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 +16 -16
- package/dist/es/plugin.js +5 -2
- package/dist/es/services/codeBlock.js +137 -56
- package/dist/es/services/dataSource.js +122 -52
- package/dist/es/services/dep.js +162 -41
- package/dist/es/services/editor.js +613 -179
- package/dist/es/services/events.js +2 -2
- package/dist/es/services/history.js +350 -386
- package/dist/es/services/keybinding.js +6 -6
- package/dist/es/services/props.js +3 -2
- package/dist/es/services/storage.js +2 -2
- package/dist/es/services/ui.js +10 -2
- package/dist/es/style.css +549 -113
- package/dist/es/utils/config.js +4 -1
- package/dist/es/utils/const.js +2 -2
- package/dist/es/utils/content-menu.js +19 -11
- package/dist/es/utils/data-source/index.js +34 -11
- package/dist/es/utils/dep/collect-worker-client.js +114 -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 +103 -49
- package/dist/es/utils/event.js +135 -0
- package/dist/es/utils/history.js +220 -0
- package/dist/es/utils/indexed-db.js +86 -0
- package/dist/es/utils/monaco-editor.js +22 -6
- package/dist/es/utils/operator.js +2 -2
- package/dist/es/utils/props.js +114 -33
- package/dist/es/utils/type-match-rules.js +367 -0
- package/dist/es/utils/undo-redo.js +60 -1
- package/dist/style.css +549 -113
- package/dist/themes/magic-admin.css +3028 -0
- package/dist/tmagic-editor.umd.cjs +14403 -10121
- package/package.json +8 -8
- package/src/Editor.vue +43 -2
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CompareForm.vue +18 -146
- package/src/components/ContentMenu.vue +44 -8
- package/src/components/FloatingBox.vue +84 -9
- package/src/components/ScrollBar.vue +0 -67
- package/src/components/ToolButton.vue +2 -2
- package/src/components/ViewForm.vue +55 -0
- package/src/editorProps.ts +30 -0
- package/src/fields/Code.vue +10 -2
- package/src/fields/CodeLink.vue +2 -5
- package/src/fields/CodeSelect.vue +54 -40
- package/src/fields/CodeSelectCol.vue +8 -1
- package/src/fields/CondOpSelect.vue +2 -24
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +16 -2
- package/src/fields/DataSourceFieldSelect/Index.vue +14 -5
- package/src/fields/DataSourceFields.vue +42 -8
- package/src/fields/DataSourceInput.vue +10 -28
- package/src/fields/DataSourceMethodSelect.vue +9 -4
- package/src/fields/DataSourceMethods.vue +42 -21
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/fields/DisplayConds.vue +18 -1
- package/src/fields/EventSelect.vue +152 -166
- package/src/fields/StyleSetter/Index.vue +3 -12
- package/src/fields/StyleSetter/components/Border.vue +15 -6
- package/src/fields/StyleSetter/icons/align-items/Center.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexEnd.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexStart.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceAround.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
- package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +20 -4
- package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +10 -28
- package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +4 -5
- package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +4 -5
- package/src/fields/StyleSetter/icons/flex-direction/Column.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/Row.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +28 -3
- package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +28 -2
- package/src/fields/StyleSetter/pro/Background.vue +99 -55
- package/src/fields/StyleSetter/pro/Border.vue +9 -11
- package/src/fields/StyleSetter/pro/Font.vue +66 -64
- package/src/fields/StyleSetter/pro/Layout.vue +211 -139
- package/src/fields/StyleSetter/pro/Position.vue +69 -67
- package/src/fields/StyleSetter/pro/Transform.vue +23 -25
- package/src/fields/UISelect.vue +0 -12
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-code-block-edit.ts +4 -3
- package/src/hooks/use-compare-form.ts +187 -0
- package/src/hooks/use-data-source-edit.ts +2 -2
- package/src/hooks/use-stage.ts +5 -3
- package/src/icons/DatasourceIcon.vue +7 -0
- package/src/index.ts +12 -0
- package/src/initService.ts +26 -16
- package/src/layouts/CodeEditor.vue +34 -11
- package/src/layouts/Framework.vue +15 -8
- package/src/layouts/NavMenu.vue +3 -3
- package/src/layouts/history-list/Bucket.vue +33 -41
- package/src/layouts/history-list/BucketTab.vue +72 -0
- package/src/layouts/history-list/GroupRow.vue +190 -93
- package/src/layouts/history-list/HistoryDiffDialog.vue +169 -90
- package/src/layouts/history-list/HistoryListPanel.vue +191 -95
- package/src/layouts/history-list/InitialRow.vue +38 -8
- package/src/layouts/history-list/PageTab.vue +67 -43
- package/src/layouts/history-list/composables.ts +239 -125
- package/src/layouts/history-list/useHistoryList.ts +60 -0
- package/src/layouts/history-list/useHistoryRevert.ts +425 -0
- package/src/layouts/page-bar/PageBar.vue +4 -2
- package/src/layouts/props-panel/FormPanel.vue +72 -6
- package/src/layouts/props-panel/PropsPanel.vue +62 -18
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/ComponentListPanel.vue +10 -6
- package/src/layouts/sidebar/Sidebar.vue +13 -6
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +5 -5
- 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 +34 -2
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +29 -4
- package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/layer/LayerMenu.vue +21 -13
- package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +7 -4
- package/src/layouts/sidebar/layer/LayerPanel.vue +4 -1
- 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 +1 -1
- package/src/layouts/workspace/viewer/ViewerMenu.vue +15 -15
- package/src/plugin.ts +6 -3
- package/src/services/codeBlock.ts +152 -47
- package/src/services/dataSource.ts +120 -41
- package/src/services/dep.ts +292 -47
- package/src/services/editor.ts +820 -224
- package/src/services/events.ts +3 -3
- package/src/services/history.ts +449 -412
- package/src/services/keybinding.ts +6 -6
- package/src/services/ui.ts +33 -5
- package/src/theme/code-block.scss +37 -0
- package/src/theme/common/var.scss +1 -1
- package/src/theme/component-list-panel.scss +2 -2
- package/src/theme/data-source-field.scss +4 -0
- package/src/theme/display-conds.scss +11 -0
- package/src/theme/event.scss +70 -1
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/framework.scss +4 -1
- package/src/theme/history-list-panel.scss +157 -23
- package/src/theme/layer-node-content.scss +14 -0
- package/src/theme/nav-menu.scss +5 -1
- package/src/theme/page-bar.scss +0 -4
- package/src/theme/props-panel.scss +5 -4
- package/src/theme/scroll-bar.scss +64 -0
- package/src/theme/style-setter/border.scss +17 -5
- package/src/theme/theme.scss +4 -0
- package/src/theme/themes/magic-admin/index.scss +214 -0
- package/src/theme/ui-select.scss +9 -0
- package/src/type.ts +668 -124
- package/src/utils/config.ts +9 -1
- package/src/utils/const.ts +3 -2
- package/src/utils/content-menu.ts +20 -11
- package/src/utils/data-source/index.ts +32 -12
- package/src/utils/dep/collect-worker-client.ts +149 -0
- package/src/utils/dep/idle-task.ts +104 -35
- package/src/utils/dep/worker.ts +113 -9
- package/src/utils/editor.ts +166 -60
- package/src/utils/event.ts +237 -0
- package/src/utils/history.ts +286 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/indexed-db.ts +122 -0
- package/src/utils/monaco-editor.ts +27 -0
- package/src/utils/operator.ts +2 -2
- package/src/utils/props.ts +114 -11
- package/src/utils/type-match-rules.ts +684 -0
- package/src/utils/undo-redo.ts +88 -0
- package/types/index.d.ts +1990 -517
- package/dist/es/layouts/history-list/CodeBlockTab.js +0 -5
- package/dist/es/layouts/history-list/CodeBlockTab.vue_vue_type_script_setup_true_lang.js +0 -62
- package/dist/es/layouts/history-list/DataSourceTab.js +0 -5
- package/dist/es/layouts/history-list/DataSourceTab.vue_vue_type_script_setup_true_lang.js +0 -62
- package/src/layouts/history-list/CodeBlockTab.vue +0 -61
- package/src/layouts/history-list/DataSourceTab.vue +0 -61
package/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig, FormInstallOptions, FormState, FormValue, KeyValueConfig, MForm, PageFragmentSelectConfig, TabPaneConfig, TableColumnConfig, TypeFunction } from "@tmagic/form";
|
|
1
|
+
import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig, FormInstallOptions, FormState, FormValue, KeyValueConfig, MForm, PageFragmentSelectConfig, TabPaneConfig, TableColumnConfig, TypeFunction, TypeMatchValidateContext, TypeMatchValidator } 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, 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";
|
|
@@ -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;
|
|
@@ -62,13 +62,23 @@ declare class BaseService extends EventEmitter$1 {
|
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region temp/packages/editor/src/services/codeBlock.d.ts
|
|
65
|
-
declare const canUsePluginMethods$
|
|
65
|
+
declare const canUsePluginMethods$8: {
|
|
66
66
|
async: readonly ["setCodeDslById", "setEditStatus", "setCombineIds", "setUndeleteableList", "deleteCodeDslByIds"];
|
|
67
67
|
sync: string[];
|
|
68
68
|
};
|
|
69
|
-
type AsyncMethodName$4 = Writable<(typeof canUsePluginMethods$
|
|
69
|
+
type AsyncMethodName$4 = Writable<(typeof canUsePluginMethods$8)['async']>;
|
|
70
70
|
declare class CodeBlock extends BaseService {
|
|
71
71
|
private state;
|
|
72
|
+
/**
|
|
73
|
+
* 最近一次写入历史栈的代码块历史记录 uuid(单条写入场景:新增 / 更新)。
|
|
74
|
+
* 供 setCodeDslById(Sync)AndGetHistoryId 取回,普通方法不读取它。
|
|
75
|
+
*/
|
|
76
|
+
private lastPushedHistoryId;
|
|
77
|
+
/**
|
|
78
|
+
* deleteCodeDslByIds 一次删除多个代码块时,按写入顺序收集的历史记录 uuid 列表。
|
|
79
|
+
* 在 deleteCodeDslByIds 入口处重置,供 deleteCodeDslByIdsAndGetHistoryId 取回。
|
|
80
|
+
*/
|
|
81
|
+
private lastDeletedHistoryIds;
|
|
72
82
|
constructor();
|
|
73
83
|
/**
|
|
74
84
|
* 设置活动的代码块dsl数据源
|
|
@@ -100,7 +110,9 @@ declare class CodeBlock extends BaseService {
|
|
|
100
110
|
*/
|
|
101
111
|
setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, {
|
|
102
112
|
changeRecords,
|
|
103
|
-
doNotPushHistory
|
|
113
|
+
doNotPushHistory,
|
|
114
|
+
historyDescription,
|
|
115
|
+
historySource
|
|
104
116
|
}?: HistoryOpOptionsWithChangeRecords): Promise<void>;
|
|
105
117
|
/**
|
|
106
118
|
* 为了兼容历史原因
|
|
@@ -117,7 +129,8 @@ declare class CodeBlock extends BaseService {
|
|
|
117
129
|
setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, {
|
|
118
130
|
changeRecords,
|
|
119
131
|
doNotPushHistory,
|
|
120
|
-
historyDescription
|
|
132
|
+
historyDescription,
|
|
133
|
+
historySource
|
|
121
134
|
}?: HistoryOpOptionsWithChangeRecords): void;
|
|
122
135
|
/**
|
|
123
136
|
* 根据代码块id数组获取代码dsl
|
|
@@ -178,8 +191,25 @@ declare class CodeBlock extends BaseService {
|
|
|
178
191
|
*/
|
|
179
192
|
deleteCodeDslByIds(codeIds: Id[], {
|
|
180
193
|
doNotPushHistory,
|
|
181
|
-
historyDescription
|
|
194
|
+
historyDescription,
|
|
195
|
+
historySource
|
|
182
196
|
}?: HistoryOpOptions): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
|
|
199
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
|
|
200
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
201
|
+
*
|
|
202
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
|
|
203
|
+
*/
|
|
204
|
+
/** 等价于 {@link setCodeDslById},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
205
|
+
setCodeDslByIdAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, options?: HistoryOpOptionsWithChangeRecords): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
206
|
+
/** 等价于 {@link setCodeDslByIdSync},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
207
|
+
setCodeDslByIdSyncAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<void>;
|
|
208
|
+
/**
|
|
209
|
+
* 等价于 {@link deleteCodeDslByIds},并额外返回本次写入的全部历史记录 uuid(按删除顺序)。
|
|
210
|
+
* 一次删除多个代码块会产生多条历史记录;未写入任何历史时 historyIds 为 `[]`。
|
|
211
|
+
*/
|
|
212
|
+
deleteCodeDslByIdsAndGetHistoryId(codeIds: Id[], options?: HistoryOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
183
213
|
setParamsColConfig(config: TableColumnConfig): void;
|
|
184
214
|
getParamsColConfig(): TableColumnConfig | undefined;
|
|
185
215
|
/**
|
|
@@ -223,6 +253,14 @@ declare class CodeBlock extends BaseService {
|
|
|
223
253
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
224
254
|
*/
|
|
225
255
|
revert(id: Id, index: number): Promise<CodeBlockStepValue | null>;
|
|
256
|
+
/**
|
|
257
|
+
* 通过历史记录 uuid 回滚代码块历史步骤,语义同 {@link revert},
|
|
258
|
+
* 仅无需调用方再传 codeBlockId 与 index:内部会按 uuid 在全部代码块栈中定位对应步骤后再回滚。
|
|
259
|
+
* 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
260
|
+
*
|
|
261
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 {@link setCodeDslByIdAndGetHistoryId} 等方法返回的 `historyIds`
|
|
262
|
+
*/
|
|
263
|
+
revertById(uuids: string[]): Promise<(CodeBlockStepValue | null)[]>;
|
|
226
264
|
/**
|
|
227
265
|
* 生成代码块唯一id
|
|
228
266
|
* @returns {Id} 代码块唯一id
|
|
@@ -264,7 +302,7 @@ declare class CodeBlock extends BaseService {
|
|
|
264
302
|
private applyHistoryStep;
|
|
265
303
|
}
|
|
266
304
|
type CodeBlockService = CodeBlock;
|
|
267
|
-
declare const _default$
|
|
305
|
+
declare const _default$40: CodeBlock;
|
|
268
306
|
//#endregion
|
|
269
307
|
//#region temp/packages/editor/src/services/componentList.d.ts
|
|
270
308
|
declare class ComponentList extends BaseService {
|
|
@@ -279,6 +317,7 @@ declare class ComponentList extends BaseService {
|
|
|
279
317
|
destroy(): void;
|
|
280
318
|
}
|
|
281
319
|
type ComponentListService = ComponentList;
|
|
320
|
+
declare const _default$41: ComponentList;
|
|
282
321
|
//#endregion
|
|
283
322
|
//#region temp/packages/editor/src/services/dataSource.d.ts
|
|
284
323
|
interface State$2 {
|
|
@@ -291,13 +330,19 @@ interface State$2 {
|
|
|
291
330
|
methods: Record<string, EventOption[]>;
|
|
292
331
|
}
|
|
293
332
|
type StateKey$1 = keyof State$2;
|
|
294
|
-
declare const canUsePluginMethods$
|
|
333
|
+
declare const canUsePluginMethods$7: {
|
|
295
334
|
async: never[];
|
|
296
335
|
sync: readonly ["getFormConfig", "setFormConfig", "getFormValue", "setFormValue", "getFormEvent", "setFormEvent", "getFormMethod", "setFormMethod", "add", "update", "remove", "createId"];
|
|
297
336
|
};
|
|
298
|
-
type SyncMethodName$
|
|
337
|
+
type SyncMethodName$5 = Writable<(typeof canUsePluginMethods$7)['sync']>;
|
|
299
338
|
declare class DataSource extends BaseService {
|
|
300
339
|
private state;
|
|
340
|
+
/**
|
|
341
|
+
* 最近一次写入历史栈的数据源历史记录 uuid。
|
|
342
|
+
* 供 *AndGetHistoryId 系列方法在调用 add / update / remove 后取回本次产生的历史记录 id;
|
|
343
|
+
* 普通方法不读取它,调用前由 *AndGetHistoryId 重置为 null。
|
|
344
|
+
*/
|
|
345
|
+
private lastPushedHistoryId;
|
|
301
346
|
constructor();
|
|
302
347
|
set<K extends StateKey$1, T extends State$2[K]>(name: K, value: T): void;
|
|
303
348
|
get<K extends StateKey$1>(name: K): State$2[K];
|
|
@@ -318,7 +363,8 @@ declare class DataSource extends BaseService {
|
|
|
318
363
|
*/
|
|
319
364
|
add(config: DataSourceSchema, {
|
|
320
365
|
doNotPushHistory,
|
|
321
|
-
historyDescription
|
|
366
|
+
historyDescription,
|
|
367
|
+
historySource
|
|
322
368
|
}?: HistoryOpOptions): {
|
|
323
369
|
id: string;
|
|
324
370
|
type: string;
|
|
@@ -341,7 +387,8 @@ declare class DataSource extends BaseService {
|
|
|
341
387
|
update(config: DataSourceSchema, {
|
|
342
388
|
changeRecords,
|
|
343
389
|
doNotPushHistory,
|
|
344
|
-
historyDescription
|
|
390
|
+
historyDescription,
|
|
391
|
+
historySource
|
|
345
392
|
}?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
|
|
346
393
|
/**
|
|
347
394
|
* 删除数据源
|
|
@@ -352,8 +399,22 @@ declare class DataSource extends BaseService {
|
|
|
352
399
|
*/
|
|
353
400
|
remove(id: string, {
|
|
354
401
|
doNotPushHistory,
|
|
355
|
-
historyDescription
|
|
402
|
+
historyDescription,
|
|
403
|
+
historySource
|
|
356
404
|
}?: HistoryOpOptions): void;
|
|
405
|
+
/**
|
|
406
|
+
* 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
|
|
407
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
|
|
408
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
409
|
+
*
|
|
410
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
|
|
411
|
+
*/
|
|
412
|
+
/** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
413
|
+
addAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<DataSourceSchema>;
|
|
414
|
+
/** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
415
|
+
updateAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<DataSourceSchema>;
|
|
416
|
+
/** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
417
|
+
removeAndGetHistoryId(id: string, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<void>;
|
|
357
418
|
/**
|
|
358
419
|
* 撤销指定数据源的最近一次变更。
|
|
359
420
|
*
|
|
@@ -394,11 +455,19 @@ declare class DataSource extends BaseService {
|
|
|
394
455
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
395
456
|
*/
|
|
396
457
|
revert(id: Id, index: number): DataSourceStepValue | null;
|
|
458
|
+
/**
|
|
459
|
+
* 通过历史记录 uuid 回滚数据源历史步骤,语义同 {@link revert},
|
|
460
|
+
* 仅无需调用方再传 dataSourceId 与 index:内部会按 uuid 在全部数据源栈中定位对应步骤后再回滚。
|
|
461
|
+
* 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
462
|
+
*
|
|
463
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 {@link addAndGetHistoryId} 等方法返回的 `historyIds`
|
|
464
|
+
*/
|
|
465
|
+
revertById(uuids: string[]): (DataSourceStepValue | null)[];
|
|
397
466
|
createId(): string;
|
|
398
467
|
getDataSourceById(id: string): DataSourceSchema | undefined;
|
|
399
468
|
resetState(): void;
|
|
400
469
|
destroy(): void;
|
|
401
|
-
usePlugin(options: SyncHookPlugin<SyncMethodName$
|
|
470
|
+
usePlugin(options: SyncHookPlugin<SyncMethodName$5, DataSource>): void;
|
|
402
471
|
/**
|
|
403
472
|
* 复制时会带上组件关联的数据源
|
|
404
473
|
* @param config 组件节点配置
|
|
@@ -432,7 +501,10 @@ declare class DataSource extends BaseService {
|
|
|
432
501
|
private applyHistoryStep;
|
|
433
502
|
}
|
|
434
503
|
type DataSourceService = DataSource;
|
|
435
|
-
declare const _default$
|
|
504
|
+
declare const _default$42: DataSource;
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region temp/packages/editor/src/utils/dep/worker.d.ts
|
|
507
|
+
type DepsData = Record<string, Record<Id, DepData>>;
|
|
436
508
|
//#endregion
|
|
437
509
|
//#region temp/packages/editor/src/services/dep.d.ts
|
|
438
510
|
interface DepEvents {
|
|
@@ -449,8 +521,12 @@ type StateKey = keyof State$1;
|
|
|
449
521
|
declare class Dep extends BaseService {
|
|
450
522
|
private state;
|
|
451
523
|
private idleTask;
|
|
524
|
+
private collectWorker;
|
|
452
525
|
private watcher;
|
|
453
526
|
private waitingWorker?;
|
|
527
|
+
private resolveWaitingWorker?;
|
|
528
|
+
private workerGeneration;
|
|
529
|
+
private activeBatches;
|
|
454
530
|
constructor();
|
|
455
531
|
set<K extends StateKey, T extends State$1[K]>(name: K, value: T): void;
|
|
456
532
|
get<K extends StateKey>(name: K): State$1[K];
|
|
@@ -464,8 +540,16 @@ declare class Dep extends BaseService {
|
|
|
464
540
|
removeTarget(id: Id, type?: string): void;
|
|
465
541
|
clearTargets(): void;
|
|
466
542
|
collect(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): void;
|
|
467
|
-
|
|
468
|
-
|
|
543
|
+
/**
|
|
544
|
+
* 空闲收集依赖
|
|
545
|
+
*
|
|
546
|
+
* 遍历匹配是整个收集过程中最耗时的部分(要深度遍历节点树并对每个属性做 target 匹配),
|
|
547
|
+
* 节点/数据源多时在主线程执行会长时间卡死页面,因此优先交给 worker 执行,主线程只负责把结果写回 target。
|
|
548
|
+
* 自定义 target 的 isTarget 是无法跨线程传递的闭包函数(没有 descriptor),仍走主线程空闲队列;
|
|
549
|
+
* worker 不可用(如 SSR)或执行失败时也会回退到主线程空闲队列。
|
|
550
|
+
*/
|
|
551
|
+
collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<boolean>;
|
|
552
|
+
collectByWorker(dsl: MApp): Promise<DepsData>;
|
|
469
553
|
collectNode(node: MNode, target: Target, depExtendedData?: DepExtendedData, deep?: boolean): void;
|
|
470
554
|
clear(nodes?: MNode[]): void;
|
|
471
555
|
clearByType(type: DepTargetType$1, nodes?: MNode[]): void;
|
|
@@ -482,25 +566,59 @@ declare class Dep extends BaseService {
|
|
|
482
566
|
* 按 pageId 匹配,可清掉页面内已被删除节点的残留依赖
|
|
483
567
|
*/
|
|
484
568
|
private removePageDep;
|
|
569
|
+
/**
|
|
570
|
+
* 把遍历匹配交给 worker,结果回来后按 target 分片写回主线程
|
|
571
|
+
*/
|
|
572
|
+
private collectByCollectWorker;
|
|
573
|
+
/**
|
|
574
|
+
* 用 worker 的收集结果替换 target 上这批节点的依赖
|
|
575
|
+
*/
|
|
576
|
+
private enqueueApplyTask;
|
|
577
|
+
private enqueueTasks;
|
|
485
578
|
private enqueueTask;
|
|
579
|
+
private beginBatchTask;
|
|
580
|
+
private onBatchTaskDone;
|
|
581
|
+
private settleBatchDs;
|
|
582
|
+
private finishBatch;
|
|
583
|
+
/**
|
|
584
|
+
* idleTask 被清空时,在途批次的任务不会再执行,必须主动结算,
|
|
585
|
+
* 否则对应的 collectIdle Promise 永远不会 resolve(collecting 卡在 true、once 监听器泄漏)。
|
|
586
|
+
* 收集被中断(通常紧跟一次全量重新收集),因此不再 emit collected/ds-collected,仅结算 Promise。
|
|
587
|
+
*/
|
|
588
|
+
private abortActiveBatches;
|
|
589
|
+
private updateCollectingState;
|
|
486
590
|
}
|
|
487
591
|
type DepService = Dep;
|
|
488
|
-
declare const _default$
|
|
592
|
+
declare const _default$44: Dep;
|
|
489
593
|
//#endregion
|
|
490
594
|
//#region temp/packages/editor/src/services/editor.d.ts
|
|
491
595
|
declare class Editor extends BaseService {
|
|
492
596
|
state: StoreState;
|
|
493
597
|
private selectionBeforeOp;
|
|
598
|
+
/**
|
|
599
|
+
* 操作前的节点校验错误快照,与 selectionBeforeOp 同时在 captureSelectionBeforeOp 中捕获,
|
|
600
|
+
* 供 pushOpHistory 写入 step.extra.invalidNodeIdsBefore,用于撤销时还原到「操作前」的错误状态。
|
|
601
|
+
*/
|
|
602
|
+
private invalidNodeIdsBeforeOp;
|
|
603
|
+
/**
|
|
604
|
+
* 最近一次 pushOpHistory 写入的历史记录 uuid。
|
|
605
|
+
* 供 *AndGetHistoryId 系列方法在调用普通操作后取回本次产生的历史记录 id;
|
|
606
|
+
* 普通操作不会读取它,调用前由 *AndGetHistoryId 重置为 null。
|
|
607
|
+
*/
|
|
608
|
+
private lastPushedHistoryId;
|
|
494
609
|
constructor();
|
|
495
610
|
/**
|
|
496
611
|
* 设置当前指点节点配置
|
|
497
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
612
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
498
613
|
* @param value MNode
|
|
614
|
+
* @param options.historySource 设置 root 时,本次变更写入历史记录的「操作来源」(仅 name === 'root' 时生效)
|
|
499
615
|
*/
|
|
500
|
-
set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T
|
|
616
|
+
set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T, options?: {
|
|
617
|
+
historySource?: HistoryOpSource;
|
|
618
|
+
}): void;
|
|
501
619
|
/**
|
|
502
620
|
* 获取当前指点节点配置
|
|
503
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
621
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
504
622
|
* @returns MNode
|
|
505
623
|
*/
|
|
506
624
|
get<K extends StoreStateKey>(name: K): StoreState[K];
|
|
@@ -571,7 +689,8 @@ declare class Editor extends BaseService {
|
|
|
571
689
|
doNotSelect,
|
|
572
690
|
doNotSwitchPage,
|
|
573
691
|
doNotPushHistory,
|
|
574
|
-
historyDescription
|
|
692
|
+
historyDescription,
|
|
693
|
+
historySource
|
|
575
694
|
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
576
695
|
doRemove(node: MNode, {
|
|
577
696
|
doNotSelect,
|
|
@@ -589,12 +708,15 @@ declare class Editor extends BaseService {
|
|
|
589
708
|
doNotSelect,
|
|
590
709
|
doNotSwitchPage,
|
|
591
710
|
doNotPushHistory,
|
|
592
|
-
historyDescription
|
|
711
|
+
historyDescription,
|
|
712
|
+
historySource
|
|
593
713
|
}?: DslOpOptions): Promise<void>;
|
|
594
714
|
doUpdate(config: MNode, {
|
|
595
|
-
changeRecords
|
|
715
|
+
changeRecords,
|
|
716
|
+
historySource
|
|
596
717
|
}?: {
|
|
597
718
|
changeRecords?: ChangeRecord[];
|
|
719
|
+
historySource?: HistoryOpSource;
|
|
598
720
|
}): Promise<{
|
|
599
721
|
newNode: MNode;
|
|
600
722
|
oldNode: MNode;
|
|
@@ -616,6 +738,16 @@ declare class Editor extends BaseService {
|
|
|
616
738
|
changeRecordList?: ChangeRecord[][];
|
|
617
739
|
doNotPushHistory?: boolean;
|
|
618
740
|
historyDescription?: string;
|
|
741
|
+
historySource?: HistoryOpSource;
|
|
742
|
+
/**
|
|
743
|
+
* 属性面板提交时携带的校验错误信息,在写入历史记录之前落库,
|
|
744
|
+
* 使历史快照与本次变更对齐,从而 undo/redo 能正确还原错误标记。
|
|
745
|
+
*/
|
|
746
|
+
invalidInfo?: {
|
|
747
|
+
id: Id;
|
|
748
|
+
source: NodeInvalidSource;
|
|
749
|
+
error?: string;
|
|
750
|
+
};
|
|
619
751
|
}): Promise<MNode | MNode[]>;
|
|
620
752
|
/**
|
|
621
753
|
* 将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]
|
|
@@ -629,7 +761,8 @@ declare class Editor extends BaseService {
|
|
|
629
761
|
*/
|
|
630
762
|
sort(id1: Id, id2: Id, {
|
|
631
763
|
doNotSelect,
|
|
632
|
-
doNotPushHistory
|
|
764
|
+
doNotPushHistory,
|
|
765
|
+
historySource
|
|
633
766
|
}?: DslOpOptions): Promise<void>;
|
|
634
767
|
/**
|
|
635
768
|
* 将组件节点配置存储到localStorage中
|
|
@@ -656,7 +789,9 @@ declare class Editor extends BaseService {
|
|
|
656
789
|
paste(position?: PastePosition, collectorOptions?: TargetOptions, {
|
|
657
790
|
doNotSelect,
|
|
658
791
|
doNotSwitchPage,
|
|
659
|
-
doNotPushHistory
|
|
792
|
+
doNotPushHistory,
|
|
793
|
+
historyDescription,
|
|
794
|
+
historySource
|
|
660
795
|
}?: DslOpOptions): Promise<MNode | MNode[] | void>;
|
|
661
796
|
doPaste(config: MNode[], position?: PastePosition): Promise<MNode[]>;
|
|
662
797
|
doAlignCenter(config: MNode): Promise<MNode>;
|
|
@@ -671,7 +806,9 @@ declare class Editor extends BaseService {
|
|
|
671
806
|
*/
|
|
672
807
|
alignCenter(config: MNode | MNode[], {
|
|
673
808
|
doNotSelect,
|
|
674
|
-
doNotPushHistory
|
|
809
|
+
doNotPushHistory,
|
|
810
|
+
historyDescription,
|
|
811
|
+
historySource
|
|
675
812
|
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
676
813
|
/**
|
|
677
814
|
* 移动当前选中节点位置
|
|
@@ -680,7 +817,9 @@ declare class Editor extends BaseService {
|
|
|
680
817
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
681
818
|
*/
|
|
682
819
|
moveLayer(offset: number | LayerOffset, {
|
|
683
|
-
doNotPushHistory
|
|
820
|
+
doNotPushHistory,
|
|
821
|
+
historyDescription,
|
|
822
|
+
historySource
|
|
684
823
|
}?: DslOpOptions): Promise<void>;
|
|
685
824
|
/**
|
|
686
825
|
* 移动一个或多个节点到指定容器中。
|
|
@@ -699,11 +838,40 @@ declare class Editor extends BaseService {
|
|
|
699
838
|
moveToContainer(config: MNode | MNode[], targetId: Id, {
|
|
700
839
|
doNotSelect,
|
|
701
840
|
doNotSwitchPage,
|
|
702
|
-
doNotPushHistory
|
|
841
|
+
doNotPushHistory,
|
|
842
|
+
historyDescription,
|
|
843
|
+
historySource
|
|
703
844
|
}?: DslOpOptions): Promise<MNode | MNode[]>;
|
|
704
845
|
dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, {
|
|
705
|
-
doNotPushHistory
|
|
846
|
+
doNotPushHistory,
|
|
847
|
+
historyDescription,
|
|
848
|
+
historySource
|
|
706
849
|
}?: DslOpOptions): Promise<void>;
|
|
850
|
+
/**
|
|
851
|
+
* 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
|
|
852
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
|
|
853
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
854
|
+
*
|
|
855
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或操作无实际变更 / 提前返回)时 historyIds 为 `[]`。
|
|
856
|
+
*/
|
|
857
|
+
/** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
858
|
+
addAndGetHistoryId(addNode: AddMNode | MNode[], parent?: MContainer | null, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
859
|
+
/** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
860
|
+
removeAndGetHistoryId(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
861
|
+
/** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
862
|
+
updateAndGetHistoryId(config: MNode | MNode[], data?: {
|
|
863
|
+
changeRecords?: ChangeRecord[];
|
|
864
|
+
changeRecordList?: ChangeRecord[][];
|
|
865
|
+
doNotPushHistory?: boolean;
|
|
866
|
+
historyDescription?: string;
|
|
867
|
+
historySource?: HistoryOpSource;
|
|
868
|
+
}): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
869
|
+
/** 等价于 {@link moveLayer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
870
|
+
moveLayerAndGetHistoryId(offset: number | LayerOffset, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
871
|
+
/** 等价于 {@link moveToContainer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
872
|
+
moveToContainerAndGetHistoryId(config: MNode | MNode[], targetId: Id, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
873
|
+
/** 等价于 {@link dragTo},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
874
|
+
dragToAndGetHistoryId(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
707
875
|
/**
|
|
708
876
|
* 撤销当前操作
|
|
709
877
|
* @returns 被撤销的操作
|
|
@@ -731,6 +899,14 @@ declare class Editor extends BaseService {
|
|
|
731
899
|
* @returns 反向后产生的新 step;目标不存在 / 未应用 / 反向失败时返回 null
|
|
732
900
|
*/
|
|
733
901
|
revertPageStep(index: number): Promise<StepValue | null>;
|
|
902
|
+
/**
|
|
903
|
+
* 通过历史记录 uuid 回滚当前页面的历史步骤,语义与 {@link revertPageStep} 完全一致,
|
|
904
|
+
* 仅入参从 index 改为 uuid 列表({@link StepValue.uuid})。按数组顺序依次回滚,
|
|
905
|
+
* 返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
906
|
+
*
|
|
907
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 *AndGetHistoryId 方法返回的 `historyIds`
|
|
908
|
+
*/
|
|
909
|
+
revertPageStepById(uuids: string[]): Promise<(StepValue | null)[]>;
|
|
734
910
|
/**
|
|
735
911
|
* 跳转当前页面历史栈到指定游标位置。
|
|
736
912
|
*
|
|
@@ -742,25 +918,84 @@ declare class Editor extends BaseService {
|
|
|
742
918
|
*/
|
|
743
919
|
gotoPageStep(targetCursor: number): Promise<number>;
|
|
744
920
|
move(left: number, top: number, {
|
|
745
|
-
doNotPushHistory
|
|
921
|
+
doNotPushHistory,
|
|
922
|
+
historyDescription,
|
|
923
|
+
historySource
|
|
746
924
|
}?: DslOpOptions): Promise<void>;
|
|
747
925
|
resetState(): void;
|
|
748
926
|
destroy(): void;
|
|
749
927
|
resetModifiedNodeId(): void;
|
|
928
|
+
/**
|
|
929
|
+
* 记录(或覆盖)某个节点在指定来源(属性表单 / 样式表单)上的校验错误信息。
|
|
930
|
+
* @param id 节点 id
|
|
931
|
+
* @param source 错误来源:'props'(属性表单)| 'style'(样式表单)
|
|
932
|
+
* @param message 错误文案(可能是包含 <br> 的 HTML)
|
|
933
|
+
*/
|
|
934
|
+
setInvalidNode(id: Id, source: NodeInvalidSource, message: string): void;
|
|
935
|
+
/**
|
|
936
|
+
* 删除节点的校验错误记录。
|
|
937
|
+
* @param id 节点 id
|
|
938
|
+
* @param source 指定来源则仅删除该来源;不传则删除该节点全部来源的错误
|
|
939
|
+
*/
|
|
940
|
+
deleteInvalidNode(id: Id, source?: NodeInvalidSource): void;
|
|
941
|
+
/** 获取当前存在校验错误的节点错误 Map(key 为节点 id) */
|
|
942
|
+
getInvalidNodeIds(): Map<Id, NodeInvalidInfo>;
|
|
943
|
+
/** 获取指定节点的校验错误信息 */
|
|
944
|
+
getInvalidNodeInfo(id: Id): NodeInvalidInfo | undefined;
|
|
945
|
+
/** 清空全部校验错误记录 */
|
|
946
|
+
resetInvalidNodeId(): void;
|
|
750
947
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName, Editor>): void;
|
|
751
948
|
on<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
752
949
|
once<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
753
950
|
emit<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
951
|
+
/**
|
|
952
|
+
* 应用一次属性面板提交携带的校验错误信息(在写入历史记录之前调用,使历史快照与本次变更对齐)。
|
|
953
|
+
* - invalidInfo 为空(调用方未携带):认为本次更新对应的节点已无校验错误,清除其全部来源的错误;
|
|
954
|
+
* - error 非空则记录错误,为空则清除对应来源的错误。
|
|
955
|
+
*/
|
|
956
|
+
private applyInvalidInfo;
|
|
957
|
+
/** 删除被移除节点(含其子树)的校验错误记录,避免残留误报 */
|
|
958
|
+
private removeInvalidNodesBySubtree;
|
|
959
|
+
/** 清理不在当前 DSL 中的失效节点错误记录(用于整体替换 root 后) */
|
|
960
|
+
private pruneInvalidNodeIds;
|
|
754
961
|
private addModifiedNodeId;
|
|
962
|
+
/**
|
|
963
|
+
* 获取指定节点所属的页面 / 页面片:
|
|
964
|
+
* - 普通节点返回其所在的 page;
|
|
965
|
+
* - 节点本身就是 page / pageFragment 时返回它自己;
|
|
966
|
+
* - 找不到时返回 null。
|
|
967
|
+
* 供 `change` 事件携带「变更节点对应的 page」(而非编辑器当前选中页)。
|
|
968
|
+
*/
|
|
969
|
+
private getPageOfNode;
|
|
755
970
|
private captureSelectionBeforeOp;
|
|
971
|
+
/**
|
|
972
|
+
* 比较「上一次 root」与「新 root」的页面 / 页面片,按页面粒度把整体替换拆成历史记录:
|
|
973
|
+
* - 新旧都存在且内容变化的页面 → 一条 `update`(整页快照替换,无 changeRecords);
|
|
974
|
+
* - 仅新 root 存在的页面 → 一条 `add`;
|
|
975
|
+
* - 仅旧 root 存在的页面 → 一条 `remove`。
|
|
976
|
+
*
|
|
977
|
+
* 每条记录落到对应页面自己的历史栈(与普通节点操作一致),并标记来源 `source`。
|
|
978
|
+
* 内容未变化的页面不产生记录,避免重复设置相同 DSL 时产生噪声。
|
|
979
|
+
*/
|
|
980
|
+
private pushRootDiffHistory;
|
|
981
|
+
/**
|
|
982
|
+
* 构造一条页面级「set root」历史记录(不携带选区 / modifiedNodeIds 上下文)并落到该页面自己的栈。
|
|
983
|
+
*
|
|
984
|
+
* 连续 set root 替换:若该页栈最新一条已是**同来源**的 set root 记录({@link StepValue.rootStep} 且 `source` 相同),
|
|
985
|
+
* 则用本次记录**替换**它而非新增,避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录;
|
|
986
|
+
* 来源不同则照常新增(initial 基线不是 rootStep,不在此列)。
|
|
987
|
+
*/
|
|
988
|
+
private pushPageDiffStep;
|
|
756
989
|
private pushOpHistory;
|
|
757
990
|
/**
|
|
758
991
|
* 应用历史操作(撤销 / 重做)
|
|
759
992
|
*
|
|
760
|
-
*
|
|
761
|
-
* `doNotSelect / doNotSwitchPage`
|
|
993
|
+
* 删除 / 更新类修改走 `editor.remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
|
|
994
|
+
* `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底;
|
|
995
|
+
* 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
|
|
996
|
+
* 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
|
|
762
997
|
*
|
|
763
|
-
*
|
|
998
|
+
* 注意:这些路径都会发出 add / remove / update / change 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
|
|
764
999
|
* 请监听 `history-change` 事件配合判断。
|
|
765
1000
|
*
|
|
766
1001
|
* @param step 操作记录
|
|
@@ -768,38 +1003,74 @@ declare class Editor extends BaseService {
|
|
|
768
1003
|
*/
|
|
769
1004
|
private applyHistoryOp;
|
|
770
1005
|
private selectedConfigExceptionHandler;
|
|
1006
|
+
/**
|
|
1007
|
+
* 撤销 remove / 重做 add 通过手工 splice 按 step 记录的 parentId / index 精确还原节点(不走 this.add,原因见调用处注释),
|
|
1008
|
+
* 这里补齐与 this.add 等价的 add / change 事件,保证撤销/重做路径的事件行为与正向操作一致。
|
|
1009
|
+
*/
|
|
1010
|
+
private emitHistoryInsertEvents;
|
|
771
1011
|
}
|
|
772
1012
|
type EditorService = Editor;
|
|
773
|
-
declare const _default$
|
|
1013
|
+
declare const _default$45: Editor;
|
|
774
1014
|
//#endregion
|
|
775
1015
|
//#region temp/packages/editor/src/services/events.d.ts
|
|
776
|
-
declare const canUsePluginMethods$
|
|
1016
|
+
declare const canUsePluginMethods$6: {
|
|
777
1017
|
async: readonly [];
|
|
778
1018
|
sync: readonly ["setEvent", "getEvent", "setMethod", "getMethod"];
|
|
779
1019
|
};
|
|
780
|
-
type AsyncMethodName$3 = Writable<(typeof canUsePluginMethods$
|
|
781
|
-
type SyncMethodName$
|
|
1020
|
+
type AsyncMethodName$3 = Writable<(typeof canUsePluginMethods$6)['async']>;
|
|
1021
|
+
type SyncMethodName$4 = Writable<(typeof canUsePluginMethods$6)['sync']>;
|
|
782
1022
|
declare class Events extends BaseService {
|
|
783
1023
|
constructor();
|
|
784
1024
|
setEvents(events: Record<string, EventOption[]>): void;
|
|
785
1025
|
setEvent(type: string, events: EventOption[]): void;
|
|
786
|
-
getEvent(type: string
|
|
1026
|
+
getEvent(type: string, _data?: {
|
|
1027
|
+
node?: MNode | null;
|
|
1028
|
+
}): EventOption[];
|
|
787
1029
|
setMethods(methods: Record<string, EventOption[]>): void;
|
|
788
1030
|
setMethod(type: string, method: EventOption[]): void;
|
|
789
|
-
getMethod(type: string,
|
|
1031
|
+
getMethod(type: string, _data?: {
|
|
1032
|
+
node?: MNode | null;
|
|
1033
|
+
targetId?: Id;
|
|
1034
|
+
}): EventOption[];
|
|
790
1035
|
resetState(): void;
|
|
791
1036
|
destroy(): void;
|
|
792
|
-
usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$
|
|
1037
|
+
usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$4, Events>): void;
|
|
793
1038
|
}
|
|
794
1039
|
type EventsService = Events;
|
|
795
|
-
declare const _default$
|
|
1040
|
+
declare const _default$46: Events;
|
|
796
1041
|
//#endregion
|
|
797
1042
|
//#region temp/packages/editor/src/utils/undo-redo.d.ts
|
|
1043
|
+
/**
|
|
1044
|
+
* UndoRedo 栈的可序列化快照,用于持久化(如写入 IndexedDB)后再还原。
|
|
1045
|
+
*/
|
|
1046
|
+
interface SerializedUndoRedo<T = any> {
|
|
1047
|
+
/** 栈内全部元素(按时间正序,索引 0 为最早一步)。 */
|
|
1048
|
+
elementList: T[];
|
|
1049
|
+
/** 游标位置(已应用步骤数量)。 */
|
|
1050
|
+
listCursor: number;
|
|
1051
|
+
/** 栈容量上限。 */
|
|
1052
|
+
listMaxSize: number;
|
|
1053
|
+
}
|
|
798
1054
|
declare class UndoRedo<T = any> {
|
|
1055
|
+
/**
|
|
1056
|
+
* 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
|
|
1057
|
+
* 游标会被夹紧到 [0, length] 区间,避免脏数据导致越界。
|
|
1058
|
+
*
|
|
1059
|
+
* @param options.isSavedStep 可选谓词:若提供,则把游标定位到「最近一条满足该谓词的记录」之后
|
|
1060
|
+
* (即恢复到最近一个已保存点);找不到匹配记录时退回快照中的原游标。
|
|
1061
|
+
*/
|
|
1062
|
+
static fromSerialized<T = any>(data: SerializedUndoRedo<T>, options?: {
|
|
1063
|
+
isSavedStep?: (element: T) => boolean;
|
|
1064
|
+
}): UndoRedo<T>;
|
|
799
1065
|
private elementList;
|
|
800
1066
|
private listCursor;
|
|
801
1067
|
private listMaxSize;
|
|
802
1068
|
constructor(listMaxSize?: number);
|
|
1069
|
+
/**
|
|
1070
|
+
* 导出当前栈的可序列化快照(深克隆,避免外部改动污染内部状态)。
|
|
1071
|
+
* 配合 {@link UndoRedo.fromSerialized} 可在持久化后完整还原撤销/重做栈。
|
|
1072
|
+
*/
|
|
1073
|
+
serialize(): SerializedUndoRedo<T>;
|
|
803
1074
|
pushElement(element: T): void;
|
|
804
1075
|
canUndo(): boolean;
|
|
805
1076
|
/** 返回被撤销的操作 */
|
|
@@ -808,6 +1079,19 @@ declare class UndoRedo<T = any> {
|
|
|
808
1079
|
/** 返回被重做的操作 */
|
|
809
1080
|
redo(): T | null;
|
|
810
1081
|
getCurrentElement(): T | null;
|
|
1082
|
+
/**
|
|
1083
|
+
* 用 `element` 替换当前游标所在元素(cursor - 1),并丢弃其后的重做尾部(与 {@link pushElement} 的丢尾一致),
|
|
1084
|
+
* 游标位置保持不变(元素数量不增)。cursor 为 0(无已应用元素)时不做任何操作并返回 false。
|
|
1085
|
+
* 用于「连续同类记录合并」等就地替换最新一条的场景。
|
|
1086
|
+
*/
|
|
1087
|
+
replaceCurrentElement(element: T): boolean;
|
|
1088
|
+
/**
|
|
1089
|
+
* 对当前游标所在元素(cursor - 1)做就地更新;cursor 为 0(全部已撤销)时不做任何操作。
|
|
1090
|
+
* 用于给「当前步骤」打标记(如标记为已保存)等元数据写入场景。
|
|
1091
|
+
*/
|
|
1092
|
+
updateCurrentElement(updater: (element: T) => void): void;
|
|
1093
|
+
/** 对栈内全部元素做就地更新。用于批量清理元数据(如清空所有元素的已保存标记)。 */
|
|
1094
|
+
updateElements(updater: (element: T, index: number) => void): void;
|
|
811
1095
|
/**
|
|
812
1096
|
* 返回栈内全部元素的浅克隆数组(按时间顺序,索引 0 为最早一步)。
|
|
813
1097
|
* 仅用于历史面板等只读展示场景,不应直接修改返回值。
|
|
@@ -825,166 +1109,267 @@ declare class UndoRedo<T = any> {
|
|
|
825
1109
|
}
|
|
826
1110
|
//#endregion
|
|
827
1111
|
//#region temp/packages/editor/src/services/history.d.ts
|
|
1112
|
+
declare const canUsePluginMethods$5: {
|
|
1113
|
+
sync: readonly ["push", "undo", "redo"];
|
|
1114
|
+
};
|
|
1115
|
+
type SyncMethodName$3 = Writable<(typeof canUsePluginMethods$5)['sync']>;
|
|
828
1116
|
declare class History extends BaseService {
|
|
1117
|
+
state: {
|
|
1118
|
+
steps: {
|
|
1119
|
+
[x: string]: Record<Id, UndoRedo<any>>;
|
|
1120
|
+
page: Record<Id, UndoRedo<StepValue>>;
|
|
1121
|
+
codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
|
|
1122
|
+
dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
|
|
1123
|
+
};
|
|
1124
|
+
stepNames: Record<string, string>;
|
|
1125
|
+
};
|
|
1126
|
+
constructor();
|
|
829
1127
|
/**
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
*
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
/**
|
|
837
|
-
* 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
|
|
1128
|
+
* 注册一个扩展历史类型,使其可与内置 `page` / `codeBlock` / `dataSource` 一样走统一的
|
|
1129
|
+
* {@link push} / {@link undo} / {@link redo}(按 id 分栈、独立 undo/redo)。
|
|
1130
|
+
*
|
|
1131
|
+
* @param stepType 自定义历史类型标识(勿与内置类型重名)
|
|
1132
|
+
* @param options.event push/undo/redo 后派发的事件名,缺省为 `${stepType}-history-change`
|
|
1133
|
+
* @param options.name 历史面板中的展示名称(tab / 分组标题等),缺省回退到 stepType 本身
|
|
838
1134
|
*/
|
|
839
|
-
|
|
1135
|
+
registerStepType(stepType: string, options?: {
|
|
1136
|
+
event?: string;
|
|
1137
|
+
name?: string;
|
|
1138
|
+
}): void;
|
|
840
1139
|
/**
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单节点修改组);
|
|
844
|
-
* - 多节点 'update'(如批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
1140
|
+
* 读取指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
|
|
1141
|
+
* 未登记名称时回退到 stepType 本身。
|
|
845
1142
|
*/
|
|
846
|
-
|
|
1143
|
+
getStepName(stepType: HistoryStepType): string;
|
|
847
1144
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
* - 其它情形(多节点 update / add / remove):返回 undefined,表示不参与合并。
|
|
1145
|
+
* 设置指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
|
|
1146
|
+
* 内置 `page` / `codeBlock` / `dataSource` 也可在此覆盖默认中文名。
|
|
851
1147
|
*/
|
|
852
|
-
|
|
853
|
-
/** 解析 StepValue 中的目标节点可读名(用于 UI 展示)。 */
|
|
854
|
-
private static detectPageTargetName;
|
|
855
|
-
state: {
|
|
856
|
-
pageId?: Id | undefined;
|
|
857
|
-
pageSteps: Record<Id, UndoRedo<StepValue>>;
|
|
858
|
-
canRedo: boolean;
|
|
859
|
-
canUndo: boolean;
|
|
860
|
-
codeBlockState: Record<Id, UndoRedo<CodeBlockStepValue>>;
|
|
861
|
-
dataSourceState: Record<Id, UndoRedo<DataSourceStepValue>>;
|
|
862
|
-
};
|
|
863
|
-
constructor();
|
|
1148
|
+
setStepName(stepType: HistoryStepType, name: string): void;
|
|
864
1149
|
reset(): void;
|
|
865
|
-
resetPage(): void;
|
|
866
|
-
changePage(page: MPage | MPageFragment): void;
|
|
867
1150
|
resetState(): void;
|
|
868
1151
|
/**
|
|
869
|
-
*
|
|
1152
|
+
* 为指定历史栈(默认 `page`,也适用于 codeBlock / dataSource / 扩展类型)种入一条「初始基线」记录。
|
|
1153
|
+
*
|
|
1154
|
+
* 该记录是一条 `opType: 'initial'` 的 step,作为对应栈 **index 0 的固定底线**:
|
|
1155
|
+
* - 它是一条真实入栈的 step(随栈一起持久化),但被钉为撤销/回滚的下限——cursor 永不低于它,
|
|
1156
|
+
* 因此不会被 undo / goto / revert 触达(详见 {@link undo} / {@link undoFloor});
|
|
1157
|
+
* - 历史面板把它过滤出分组列表(见 {@link getHistoryGroups}),改由底部「初始」行展示。
|
|
870
1158
|
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
1159
|
+
* 仅当目标栈为空时种入(保证 initial 一定位于 index 0);已存在 initial 底线时不重复种入。
|
|
1160
|
+
*
|
|
1161
|
+
* @param stepType 历史类型
|
|
1162
|
+
* @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id)
|
|
1163
|
+
* @param options 基线展示信息(名称 / 描述 / 来源)
|
|
1164
|
+
*/
|
|
1165
|
+
setMarker(stepType: HistoryStepType, id: Id, options?: {
|
|
1166
|
+
name?: string;
|
|
1167
|
+
description?: string;
|
|
1168
|
+
source?: HistoryOpSource;
|
|
1169
|
+
extra?: Record<string, any>;
|
|
1170
|
+
}): StepValue | null;
|
|
1171
|
+
/**
|
|
1172
|
+
* 读取指定历史栈的初始基线 step(栈 index 0 且 `opType: 'initial'`);
|
|
1173
|
+
* 不存在或 id 缺省时返回 undefined。
|
|
873
1174
|
*/
|
|
874
|
-
|
|
1175
|
+
getMarker(stepType: HistoryStepType, id?: Id): StepValue | undefined;
|
|
875
1176
|
/**
|
|
876
|
-
*
|
|
1177
|
+
* 把一条步骤推入指定历史栈。统一入口,所有类型(page / codeBlock / dataSource / 扩展)行为完全一致:
|
|
1178
|
+
* 按 `stepType` 选择目标栈类型,按 `id`(必填)选择具体栈,按需建栈后入栈,并派发对应的历史变更事件
|
|
1179
|
+
* (`page` 为 `change`,其余见 {@link registerStepType}),回调签名统一为 `(id, step)`。
|
|
877
1180
|
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
}): CodeBlockStepValue | null;
|
|
1181
|
+
* 跨页 / 跨资源操作(如 `moveToContainer` 把节点搬到其它页)必须显式传入目标 id,
|
|
1182
|
+
* 否则无法落到正确的栈。step 可由 `createStackStep` 等构造后传入。
|
|
1183
|
+
*
|
|
1184
|
+
* @param stepType 历史类型
|
|
1185
|
+
* @param step 已构造好的历史记录(缺省自动补全 uuid / timestamp)
|
|
1186
|
+
* @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
|
|
1187
|
+
*/
|
|
1188
|
+
push(stepType: 'page', step: StepValue, id: Id): StepValue | null;
|
|
1189
|
+
push(stepType: 'codeBlock', step: CodeBlockStepValue, id: Id): CodeBlockStepValue | null;
|
|
1190
|
+
push(stepType: 'dataSource', step: DataSourceStepValue, id: Id): DataSourceStepValue | null;
|
|
1191
|
+
push<T extends BaseStepValue>(stepType: string, step: T, id: Id): T | null;
|
|
890
1192
|
/**
|
|
891
|
-
*
|
|
892
|
-
*
|
|
1193
|
+
* 撤销指定历史栈的最近一次变更。统一入口,所有类型行为一致:
|
|
1194
|
+
* 按 `id`(必填)+ `stepType` 定位栈,不会越过 index 0 的 initial 基线(所有类型同等适用),
|
|
1195
|
+
* 仅在确有可撤销 step 时派发对应的历史变更事件(`page` 为 `change`,回调签名 `(id, step)`)。
|
|
1196
|
+
*
|
|
1197
|
+
* @param stepType 历史类型
|
|
1198
|
+
* @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
|
|
893
1199
|
*/
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1200
|
+
undo(stepType: 'page', id: Id): StepValue | null;
|
|
1201
|
+
undo(stepType: 'codeBlock', id: Id): CodeBlockStepValue | null;
|
|
1202
|
+
undo(stepType: 'dataSource', id: Id): DataSourceStepValue | null;
|
|
1203
|
+
undo<T extends BaseStepValue>(stepType: string, id: Id): T | null;
|
|
1204
|
+
/**
|
|
1205
|
+
* 重做指定历史栈的下一次变更。语义与 {@link undo} 对称,详见其说明。
|
|
1206
|
+
*
|
|
1207
|
+
* @param stepType 历史类型
|
|
1208
|
+
* @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
|
|
1209
|
+
*/
|
|
1210
|
+
redo(stepType: 'page', id: Id): StepValue | null;
|
|
1211
|
+
redo(stepType: 'codeBlock', id: Id): CodeBlockStepValue | null;
|
|
1212
|
+
redo(stepType: 'dataSource', id: Id): DataSourceStepValue | null;
|
|
1213
|
+
redo<T extends BaseStepValue>(stepType: string, id: Id): T | null;
|
|
1214
|
+
/**
|
|
1215
|
+
* 是否可对指定历史栈撤销(cursor 高于 initial 基线底线)。
|
|
1216
|
+
* @param stepType 历史类型
|
|
1217
|
+
* @param id 目标栈 id;缺省 / 无效时返回 false
|
|
1218
|
+
*/
|
|
1219
|
+
canUndo(stepType: HistoryStepType, id?: Id): boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* 是否可对指定历史栈重做。
|
|
1222
|
+
* @param stepType 历史类型
|
|
1223
|
+
* @param id 目标栈 id;缺省 / 无效时返回 false
|
|
1224
|
+
*/
|
|
1225
|
+
canRedo(stepType: HistoryStepType, id?: Id): boolean;
|
|
1226
|
+
/** 读取指定页面历史栈当前游标所在的 step(cursor - 1);无则返回 null。 */
|
|
1227
|
+
getCurrentPageStep(pageId: Id): StepValue | null;
|
|
1228
|
+
/**
|
|
1229
|
+
* 用 `state` 替换指定页面栈当前游标所在的 step(并丢弃其后的重做尾部),游标不变。
|
|
1230
|
+
* 用于「连续 set root 记录合并」等就地替换最新一条的场景;替换成功后派发 `change`。
|
|
1231
|
+
*/
|
|
1232
|
+
replaceCurrentStep(stepType: HistoryStepType, state: StepValue, id: Id): StepValue | null;
|
|
918
1233
|
destroy(): void;
|
|
919
1234
|
/**
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
*
|
|
1235
|
+
* 清空历史记录栈。统一入口,所有类型(page / codeBlock / dataSource / 扩展)行为一致:
|
|
1236
|
+
* - 传入 `id`:仅清空 `stepType` 下该 id 对应的栈;
|
|
1237
|
+
* - 缺省 `id`:清空 `stepType` 下的全部栈。
|
|
1238
|
+
*
|
|
1239
|
+
* 仅删除撤销/重做记录,不会改动 DSL / 代码块 / 数据源本身。清空时会**保留各栈原有的
|
|
1240
|
+
* initial 基线**(文案 / 来源),无基线时清空成空栈。清空后派发 `clear`(签名 `(id, stepType)`)。
|
|
1241
|
+
*
|
|
1242
|
+
* @param stepType 历史类型
|
|
1243
|
+
* @param id 目标栈 id;缺省表示清空该类型下全部栈
|
|
923
1244
|
*/
|
|
924
|
-
|
|
1245
|
+
clear(stepType: HistoryStepType, id?: Id): void;
|
|
925
1246
|
/**
|
|
926
|
-
*
|
|
927
|
-
* -
|
|
928
|
-
* -
|
|
929
|
-
*
|
|
1247
|
+
* 标记历史记录为「已保存」(把对应栈当前游标所在的记录标为 `saved`)。统一入口:
|
|
1248
|
+
* - 缺省 `id`:标记**全部类型、全部栈**(整份 DSL 落库场景),派发 `mark-saved` 且 `kind: 'all'`;
|
|
1249
|
+
* - 传入 `id`:仅标记 `stepType` 下该 id 对应的栈,派发 `mark-saved` 且 `kind` 为 `stepType`。
|
|
1250
|
+
*
|
|
1251
|
+
* 同一栈内任意时刻最多只有一条记录为 `saved`;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
|
|
1252
|
+
*
|
|
1253
|
+
* @param stepType 历史类型
|
|
1254
|
+
* @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
|
|
930
1255
|
*/
|
|
931
|
-
|
|
1256
|
+
markSaved(stepType: HistoryStepType, id?: Id): void;
|
|
932
1257
|
/**
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
*
|
|
937
|
-
*
|
|
1258
|
+
* 派发「页面 / 页面片结构变更」事件(`page-structure-change`)。
|
|
1259
|
+
*
|
|
1260
|
+
* 常规 `editorService.add` / `remove` 页面节点不会写入 `page` 历史栈(见 editor.add / remove 中
|
|
1261
|
+
* 对 isPageOrFragment 的分支),因此不会产生任何 historyService 事件。该方法用于在这些
|
|
1262
|
+
* 场景(以及 setRoot 整体替换 DSL 增删页面)下,向外统一通知页面结构的增删变化,供业务方感知。
|
|
1263
|
+
*
|
|
1264
|
+
* 一次操作涉及多个页面时,调用方应把本次增删的页面**合并为一个 change 一次性传入**,
|
|
1265
|
+
* 使一次操作只派发一个事件;`add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
|
|
1266
|
+
*
|
|
1267
|
+
* @param change 本次结构变更:{ add: 新增的页面列表, remove: 删除的页面列表 }
|
|
938
1268
|
*/
|
|
939
|
-
|
|
1269
|
+
notifyPageStructureChange(change: {
|
|
1270
|
+
add: (MPage | MPageFragment)[];
|
|
1271
|
+
remove: (MPage | MPageFragment)[];
|
|
1272
|
+
}): void;
|
|
940
1273
|
/**
|
|
941
|
-
*
|
|
942
|
-
*
|
|
1274
|
+
* 把当前内存中的全部历史栈(页面 / 代码块 / 数据源 / 扩展类型)序列化后写入本地 IndexedDB。
|
|
1275
|
+
*
|
|
1276
|
+
* - 每个 UndoRedo 栈连同其游标、容量一并保存,恢复后可继续 undo/redo;
|
|
1277
|
+
* - `key` 用于区分不同活动页 / 项目(同一 store 下可保存多份快照),缺省为 `default`;
|
|
1278
|
+
* - 返回写入成功的快照对象,便于调用方记录 savedAt 等信息;
|
|
1279
|
+
* - 不支持 IndexedDB 的环境(如 SSR)会 reject。
|
|
943
1280
|
*/
|
|
944
|
-
|
|
945
|
-
/** 读取指定代码块历史栈的当前游标。 */
|
|
946
|
-
getCodeBlockCursor(codeBlockId: Id): number;
|
|
947
|
-
/** 读取指定数据源历史栈的当前游标。 */
|
|
948
|
-
getDataSourceCursor(dataSourceId: Id): number;
|
|
1281
|
+
saveToIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState>;
|
|
949
1282
|
/**
|
|
950
|
-
*
|
|
1283
|
+
* 从本地 IndexedDB 读取此前保存的历史快照并重建全部撤销/重做栈。
|
|
1284
|
+
*
|
|
1285
|
+
* - 读取到的每个栈都会经 {@link UndoRedo.fromSerialized} 还原(含游标),随后可直接 undo/redo;
|
|
1286
|
+
* - 会整体覆盖当前内存中的历史状态(活动页由 editorService 维护,不在此恢复);
|
|
1287
|
+
* - 找不到对应记录时返回 null,且不改动当前状态;
|
|
1288
|
+
* - 不支持 IndexedDB 的环境(如 SSR)会 reject。
|
|
951
1289
|
*/
|
|
952
|
-
|
|
953
|
-
step: CodeBlockStepValue;
|
|
954
|
-
index: number;
|
|
955
|
-
applied: boolean;
|
|
956
|
-
}[];
|
|
1290
|
+
restoreFromIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState | null>;
|
|
957
1291
|
/**
|
|
958
|
-
*
|
|
1292
|
+
* 取出指定历史类型(页面 / 代码块 / 数据源 / 扩展类型)某个栈的平铺步骤列表(含 applied 标记)。
|
|
1293
|
+
* 统一入口,替代旧的 `getPageStepList` / `getCodeBlockStepList` / `getDataSourceStepList`。
|
|
1294
|
+
*
|
|
1295
|
+
* 列表按时间正序,最早一步在最前面;`applied` 表示该步骤处于栈游标之前(已应用)。
|
|
1296
|
+
* 供 revert / goto 等按 index 索引步骤的场景使用。通常 UI 应使用
|
|
1297
|
+
* {@link getHistoryGroups} 取已合并分组的版本;本方法仅为兼容/调试保留。
|
|
1298
|
+
*
|
|
1299
|
+
* @param stepType 历史类型
|
|
1300
|
+
* @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id);缺省 / 无效时返回空数组
|
|
959
1301
|
*/
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}[];
|
|
1302
|
+
getStepList(stepType: 'page', id?: Id): HistoryStepEntry<StepValue>[];
|
|
1303
|
+
getStepList(stepType: 'codeBlock', id: Id): HistoryStepEntry<CodeBlockStepValue>[];
|
|
1304
|
+
getStepList(stepType: 'dataSource', id: Id): HistoryStepEntry<DataSourceStepValue>[];
|
|
1305
|
+
getStepList<T extends BaseStepValue>(stepType: HistoryStepType, id?: Id): HistoryStepEntry<T>[];
|
|
965
1306
|
/**
|
|
966
|
-
*
|
|
1307
|
+
* 取出指定历史类型的历史分组(页面 / 代码块 / 数据源 / 扩展类型统一入口)。
|
|
1308
|
+
*
|
|
1309
|
+
* 把目标栈的步骤列表按"目标"做相邻合并(连续修改同一目标的 update 合并为一组,组内可展开查看每步;
|
|
1310
|
+
* add / remove / 多实体 update 始终独立成组),并过滤掉 index 0 的 initial 基线(底部「初始」行由
|
|
1311
|
+
* {@link getMarker} 驱动)。各类型行为完全一致,仅 `kind` 与 step 快照类型不同。
|
|
1312
|
+
*
|
|
1313
|
+
* 作用域:
|
|
1314
|
+
* - 传入 `id`:仅取该 id 对应的单个栈(页面历史按活动页查看,传入 pageId);
|
|
1315
|
+
* - 缺省 `id`:遍历该类型下全部栈并汇总(代码块 / 数据源按全部资源分桶展示)。
|
|
1316
|
+
*
|
|
1317
|
+
* @param stepType 历史类型,缺省 `page`
|
|
1318
|
+
* @param id 目标栈 id;缺省表示遍历该类型下全部栈
|
|
967
1319
|
*/
|
|
968
|
-
|
|
1320
|
+
getHistoryGroups(stepType: 'page', id?: Id): HistoryGroup<StepValue>[];
|
|
1321
|
+
getHistoryGroups(stepType: 'codeBlock', id?: Id): HistoryGroup<CodeBlockStepValue>[];
|
|
1322
|
+
getHistoryGroups(stepType: 'dataSource', id?: Id): HistoryGroup<DataSourceStepValue>[];
|
|
1323
|
+
getHistoryGroups<T extends BaseStepValue>(stepType: HistoryStepType, id?: Id): HistoryGroup<T>[];
|
|
969
1324
|
/**
|
|
970
|
-
*
|
|
1325
|
+
* 读取指定历史栈的当前游标(已应用步骤数量)。统一入口,替代旧的
|
|
1326
|
+
* `getPageCursor` / `getCodeBlockCursor` / `getDataSourceCursor`。
|
|
1327
|
+
* - `id` 缺省或非法、或对应栈不存在时返回 0;
|
|
1328
|
+
* - `stepType` 支持 `page` / `codeBlock` / `dataSource` / 扩展类型。
|
|
1329
|
+
*/
|
|
1330
|
+
getCursor(stepType: HistoryStepType, id?: Id): number;
|
|
1331
|
+
/**
|
|
1332
|
+
* 按历史记录 uuid 在指定历史类型的栈中查找其所属 id 与索引,统一入口,替代旧的
|
|
1333
|
+
* `getPageStepIndexByUuid` / `findCodeBlockStepLocationByUuid` / `findDataSourceStepLocationByUuid`。
|
|
1334
|
+
*
|
|
1335
|
+
* - 传入 `id`:仅在该 id 对应的单个栈中查找(如页面历史按活动页查看,传入 pageId);
|
|
1336
|
+
* - 缺省 `id`:遍历该类型下全部栈查找(代码块 / 数据源等按全部资源分桶的场景)。
|
|
1337
|
+
*
|
|
1338
|
+
* 找不到时返回 null。供「按 uuid 回滚」等需要把 uuid 映射回 (id, index) 的场景使用。
|
|
971
1339
|
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
1340
|
+
* @param stepType 历史类型
|
|
1341
|
+
* @param uuid 目标历史记录的 uuid
|
|
1342
|
+
* @param id 目标栈 id;缺省表示遍历该类型下全部栈
|
|
974
1343
|
*/
|
|
975
|
-
|
|
976
|
-
|
|
1344
|
+
findStepLocationByUuid(stepType: HistoryStepType, uuid: string, id?: Id): {
|
|
1345
|
+
id: Id;
|
|
1346
|
+
index: number;
|
|
1347
|
+
} | null;
|
|
1348
|
+
usePlugin(options: SyncHookPlugin<SyncMethodName$3, History>): void;
|
|
1349
|
+
emit<Name extends keyof HistoryEvents, Param extends HistoryEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
977
1350
|
/**
|
|
978
|
-
*
|
|
1351
|
+
* 取出指定历史类型的栈桶(`Record<id, UndoRedo>`);不存在时按需创建空桶,
|
|
1352
|
+
* 从而支持通过 {@link registerStepType} 或首次 push 动态扩展历史类型。
|
|
979
1353
|
*/
|
|
980
|
-
private
|
|
1354
|
+
private getStepBucket;
|
|
981
1355
|
/**
|
|
982
|
-
*
|
|
1356
|
+
* 清空单个历史栈并按需重建其 initial 基线(保留原基线的文案 / 来源)。
|
|
983
1357
|
*/
|
|
984
|
-
private
|
|
1358
|
+
private clearStack;
|
|
1359
|
+
/** 入栈前补全 step 的 uuid / timestamp(调用方未指定时)。 */
|
|
1360
|
+
private fillStepMeta;
|
|
1361
|
+
/** 校验「按 id 分栈」类型(codeBlock / dataSource / 扩展)的 id 是否有效。 */
|
|
1362
|
+
private isValidStackId;
|
|
1363
|
+
/** 清空全部历史栈内容(保留已注册的类型键,使扩展类型在 reset 后仍可用)。 */
|
|
1364
|
+
private clearAllSteps;
|
|
1365
|
+
/**
|
|
1366
|
+
* 把基础 dbName 与当前 DSL(root app)的 id 拼成最终库名,实现不同应用历史隔离。
|
|
1367
|
+
* 取不到 app id(如尚未加载 DSL)时退回基础 dbName。
|
|
1368
|
+
*/
|
|
1369
|
+
private resolveDbName;
|
|
985
1370
|
}
|
|
986
1371
|
type HistoryService = History;
|
|
987
|
-
declare const _default$
|
|
1372
|
+
declare const _default$47: History;
|
|
988
1373
|
//#endregion
|
|
989
1374
|
//#region temp/packages/editor/src/services/keybinding.d.ts
|
|
990
1375
|
declare class Keybinding extends BaseService {
|
|
@@ -1023,6 +1408,7 @@ declare class Keybinding extends BaseService {
|
|
|
1023
1408
|
private getKeyconKeys;
|
|
1024
1409
|
}
|
|
1025
1410
|
type KeybindingService = Keybinding;
|
|
1411
|
+
declare const _default$48: Keybinding;
|
|
1026
1412
|
//#endregion
|
|
1027
1413
|
//#region temp/packages/editor/src/services/props.d.ts
|
|
1028
1414
|
declare const canUsePluginMethods$4: {
|
|
@@ -1122,7 +1508,7 @@ declare class Props extends BaseService {
|
|
|
1122
1508
|
private setRelateId;
|
|
1123
1509
|
}
|
|
1124
1510
|
type PropsService = Props;
|
|
1125
|
-
declare const _default$
|
|
1511
|
+
declare const _default$50: Props;
|
|
1126
1512
|
//#endregion
|
|
1127
1513
|
//#region temp/packages/editor/src/services/stageOverlay.d.ts
|
|
1128
1514
|
declare const canUsePluginMethods$3: {
|
|
@@ -1149,7 +1535,7 @@ declare class StageOverlay extends BaseService {
|
|
|
1149
1535
|
private updateSelectStatus;
|
|
1150
1536
|
}
|
|
1151
1537
|
type StageOverlayService = StageOverlay;
|
|
1152
|
-
declare const _default$
|
|
1538
|
+
declare const _default$51: StageOverlay;
|
|
1153
1539
|
//#endregion
|
|
1154
1540
|
//#region temp/packages/editor/src/services/storage.d.ts
|
|
1155
1541
|
interface Options$1 {
|
|
@@ -1212,7 +1598,7 @@ declare class WebStorage extends BaseService {
|
|
|
1212
1598
|
private getValueAndProtocol;
|
|
1213
1599
|
}
|
|
1214
1600
|
type StorageService = WebStorage;
|
|
1215
|
-
declare const _default$
|
|
1601
|
+
declare const _default$52: WebStorage;
|
|
1216
1602
|
//#endregion
|
|
1217
1603
|
//#region temp/packages/editor/src/services/ui.d.ts
|
|
1218
1604
|
declare const canUsePluginMethods$1: {
|
|
@@ -1232,7 +1618,7 @@ declare class Ui extends BaseService {
|
|
|
1232
1618
|
private setStageRect;
|
|
1233
1619
|
}
|
|
1234
1620
|
type UiService = Ui;
|
|
1235
|
-
declare const _default$
|
|
1621
|
+
declare const _default$53: Ui;
|
|
1236
1622
|
//#endregion
|
|
1237
1623
|
//#region temp/packages/editor/src/type.d.ts
|
|
1238
1624
|
type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
|
|
@@ -1253,7 +1639,7 @@ interface FrameworkSlots {
|
|
|
1253
1639
|
empty(props: {}): any;
|
|
1254
1640
|
workspace(props: {}): any;
|
|
1255
1641
|
'props-panel'(props: {}): any;
|
|
1256
|
-
|
|
1642
|
+
footer(props: {}): any;
|
|
1257
1643
|
'page-bar'(props: {}): any;
|
|
1258
1644
|
'page-bar-add-button'(props: {}): any;
|
|
1259
1645
|
'page-bar-title'(props: {
|
|
@@ -1324,6 +1710,7 @@ type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPan
|
|
|
1324
1710
|
type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
|
|
1325
1711
|
type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
|
|
1326
1712
|
interface EditorInstallOptions {
|
|
1713
|
+
flat?: boolean;
|
|
1327
1714
|
parseDSL: <T = any>(dsl: string) => T;
|
|
1328
1715
|
customCreateMonacoEditor: (monaco: typeof import('monaco-editor'), codeEditorEl: HTMLElement, options: Monaco.editor.IStandaloneEditorConstructionOptions & {
|
|
1329
1716
|
editorCustomType?: string;
|
|
@@ -1353,6 +1740,11 @@ interface StageOptions {
|
|
|
1353
1740
|
containerHighlightClassName?: string;
|
|
1354
1741
|
containerHighlightDuration?: number;
|
|
1355
1742
|
containerHighlightType?: ContainerHighlightType;
|
|
1743
|
+
/**
|
|
1744
|
+
* 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
|
|
1745
|
+
* 开启后在画布中拖动已有组件不会识别容器,默认 false
|
|
1746
|
+
*/
|
|
1747
|
+
containerHighlightAddOnly?: boolean;
|
|
1356
1748
|
disabledDragStart?: boolean;
|
|
1357
1749
|
render?: (stage: StageCore$1) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
1358
1750
|
moveableOptions?: CustomizeMoveableOptions;
|
|
@@ -1376,10 +1768,29 @@ interface StageOptions {
|
|
|
1376
1768
|
*/
|
|
1377
1769
|
alwaysMultiSelect?: boolean;
|
|
1378
1770
|
disabledRule?: boolean;
|
|
1771
|
+
/**
|
|
1772
|
+
* 禁用「非点击画布选中组件时(如从图层树、面包屑等外部选中),对选中区域做高亮闪烁提示」,
|
|
1773
|
+
* 默认 false(即默认开启闪烁)
|
|
1774
|
+
*/
|
|
1775
|
+
disabledFlashTip?: boolean;
|
|
1379
1776
|
zoom?: number;
|
|
1380
1777
|
/** 画布双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
1381
1778
|
beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
|
|
1382
1779
|
}
|
|
1780
|
+
/**
|
|
1781
|
+
* 节点校验错误信息,按来源(属性表单 / 样式表单)分别保存错误文案。
|
|
1782
|
+
* 属性表单与样式表单是两个独立的 FormPanel,均指向同一节点,故以来源为键,
|
|
1783
|
+
* 避免某个面板校验通过时误清另一个面板记录的错误。
|
|
1784
|
+
* 节点视为存在错误当且仅当任一来源存在非空文本。
|
|
1785
|
+
*/
|
|
1786
|
+
interface NodeInvalidInfo {
|
|
1787
|
+
/** 属性表单校验错误文案(可能为包含 <br> 的 HTML) */
|
|
1788
|
+
props?: string;
|
|
1789
|
+
/** 样式表单校验错误文案(可能为包含 <br> 的 HTML) */
|
|
1790
|
+
style?: string;
|
|
1791
|
+
}
|
|
1792
|
+
/** 节点校验错误来源 */
|
|
1793
|
+
type NodeInvalidSource = keyof NodeInvalidInfo;
|
|
1383
1794
|
interface StoreState {
|
|
1384
1795
|
root: MApp | null;
|
|
1385
1796
|
page: MPage | MPageFragment | null;
|
|
@@ -1390,6 +1801,8 @@ interface StoreState {
|
|
|
1390
1801
|
stage: StageCore$1 | null;
|
|
1391
1802
|
stageLoading: boolean;
|
|
1392
1803
|
modifiedNodeIds: Map<Id, Id>;
|
|
1804
|
+
/** 校验失败的节点错误信息,按节点 id 存储,供组件树标记与保存拦截读取 */
|
|
1805
|
+
invalidNodeIds: Map<Id, NodeInvalidInfo>;
|
|
1393
1806
|
pageLength: number;
|
|
1394
1807
|
pageFragmentLength: number;
|
|
1395
1808
|
disabledMultiSelect: boolean;
|
|
@@ -1456,6 +1869,12 @@ interface UiState {
|
|
|
1456
1869
|
stageRect: StageRect;
|
|
1457
1870
|
/** 编辑器列布局每一列的宽度,分为左中右三列 */
|
|
1458
1871
|
columnWidth: GetColumnWidth;
|
|
1872
|
+
/** 编辑器列布局左侧列最小宽度 */
|
|
1873
|
+
minLeftColumnWidth: number;
|
|
1874
|
+
/** 编辑器列布局中间列最小宽度 */
|
|
1875
|
+
minCenterColumnWidth: number;
|
|
1876
|
+
/** 编辑器列布局右侧列最小宽度 */
|
|
1877
|
+
minRightColumnWidth: number;
|
|
1459
1878
|
/** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
|
|
1460
1879
|
showGuides: boolean;
|
|
1461
1880
|
/** 画布上是否存在参考线 */
|
|
@@ -1472,6 +1891,8 @@ interface UiState {
|
|
|
1472
1891
|
hideSlideBar: boolean;
|
|
1473
1892
|
/** 侧边栏面板配置 */
|
|
1474
1893
|
sideBarItems: SideComponent[];
|
|
1894
|
+
/** 当前激活的侧边栏面板 */
|
|
1895
|
+
sideBarActiveTabName: string;
|
|
1475
1896
|
navMenuRect: {
|
|
1476
1897
|
left: number;
|
|
1477
1898
|
top: number;
|
|
@@ -1489,6 +1910,7 @@ interface EditorNodeInfo {
|
|
|
1489
1910
|
node: MNode | null;
|
|
1490
1911
|
parent: MContainer | null;
|
|
1491
1912
|
page: MPage | MPageFragment | null;
|
|
1913
|
+
path: MNode[];
|
|
1492
1914
|
}
|
|
1493
1915
|
interface AddMNode {
|
|
1494
1916
|
type: string;
|
|
@@ -1539,6 +1961,9 @@ interface MenuButton {
|
|
|
1539
1961
|
items?: MenuButton[];
|
|
1540
1962
|
/** 唯一标识,用于高亮 */
|
|
1541
1963
|
id?: string | number;
|
|
1964
|
+
buttonProps?: {
|
|
1965
|
+
type?: string;
|
|
1966
|
+
};
|
|
1542
1967
|
}
|
|
1543
1968
|
interface MenuComponent {
|
|
1544
1969
|
type: 'component';
|
|
@@ -1597,6 +2022,106 @@ interface SideComponent extends MenuComponent {
|
|
|
1597
2022
|
props?: Record<string, any>;
|
|
1598
2023
|
};
|
|
1599
2024
|
}
|
|
2025
|
+
/**
|
|
2026
|
+
* 历史记录面板(HistoryListPanel)的自定义扩展 tab。
|
|
2027
|
+
*
|
|
2028
|
+
* 业务方可通过 Editor 的 `historyListExtraTabs` 注入额外的历史记录 tab,
|
|
2029
|
+
* 例如某个自定义模块维护自己的操作历史时,可以在历史记录面板中增加一个
|
|
2030
|
+
* 独立的 tab 来展示与回滚。内置的「页面 / 数据源 / 代码块」三个 tab 之后
|
|
2031
|
+
* 会依次追加这些扩展 tab。
|
|
2032
|
+
*/
|
|
2033
|
+
interface HistoryListExtraTab {
|
|
2034
|
+
/** tab 唯一标识,作为 TMagicTabs 的 name */
|
|
2035
|
+
name: string;
|
|
2036
|
+
/** tab 显示文案,支持传入函数以展示动态内容(如记录数量) */
|
|
2037
|
+
label: string | (() => string);
|
|
2038
|
+
/** tab 内容区渲染的组件(Vue 组件或字符串标签) */
|
|
2039
|
+
component: any;
|
|
2040
|
+
/** 传入内容组件的 props */
|
|
2041
|
+
props?: Record<string, any>;
|
|
2042
|
+
/** 内容组件的事件监听 */
|
|
2043
|
+
listeners?: Record<string, (..._args: any[]) => any>;
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* 对比表单(CompareForm)的对比类型:
|
|
2047
|
+
* - node: 节点组件,按 `type` 从 propsService 获取属性表单配置
|
|
2048
|
+
* - data-source: 数据源,按 `type`(base/http/...) 从 dataSourceService 获取数据源表单配置
|
|
2049
|
+
* - code-block: 数据源代码块,使用内置的代码块表单配置
|
|
2050
|
+
*/
|
|
2051
|
+
type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
|
|
2052
|
+
/**
|
|
2053
|
+
* 自定义 `loadConfig` 时回传的上下文,聚合了组件当前的对比入参,
|
|
2054
|
+
* 方便调用方在外部按需拼装 FormConfig。
|
|
2055
|
+
*/
|
|
2056
|
+
interface CompareFormLoadConfigContext {
|
|
2057
|
+
/** 对比类型,见 CompareCategory */
|
|
2058
|
+
category: string;
|
|
2059
|
+
/** 节点 / 数据源类型 */
|
|
2060
|
+
type?: string;
|
|
2061
|
+
/** 数据源代码块场景下的数据源类型 */
|
|
2062
|
+
dataSourceType?: string;
|
|
2063
|
+
/**
|
|
2064
|
+
* 内置的默认 FormConfig 加载逻辑(按 `category` 从 propsService / dataSourceService /
|
|
2065
|
+
* 代码块工具取配置)。自定义 `loadConfig` 可调用它复用默认结果,再做二次加工。
|
|
2066
|
+
*/
|
|
2067
|
+
defaultLoadConfig: () => Promise<FormConfig>;
|
|
2068
|
+
}
|
|
2069
|
+
/**
|
|
2070
|
+
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category` 取配置逻辑,
|
|
2071
|
+
* 可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
2072
|
+
*/
|
|
2073
|
+
type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
|
|
2074
|
+
/**
|
|
2075
|
+
* CompareForm / ViewForm 共用的基础 props。
|
|
2076
|
+
* 两者都基于同一套「按 category 加载 FormConfig + 注入 services/stage」的逻辑(见 useCompareForm),
|
|
2077
|
+
* 差异仅在于是否做新旧值对比。这里抽出公共字段避免重复定义。
|
|
2078
|
+
*/
|
|
2079
|
+
interface CompareFormBaseProps {
|
|
2080
|
+
/** 当前值(对比场景下为修改后的值) */
|
|
2081
|
+
value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
|
|
2082
|
+
/**
|
|
2083
|
+
* 类型说明:
|
|
2084
|
+
* - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
|
|
2085
|
+
* - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
|
|
2086
|
+
* - `category` 为 `code-block` 时,`type` 可不传
|
|
2087
|
+
*/
|
|
2088
|
+
type?: string;
|
|
2089
|
+
/** 表单配置类别,决定从哪里取 FormConfig */
|
|
2090
|
+
category?: CompareCategory;
|
|
2091
|
+
/** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
|
|
2092
|
+
dataSourceType?: string;
|
|
2093
|
+
labelWidth?: string;
|
|
2094
|
+
/**
|
|
2095
|
+
* 外层容器高度。设置后表单内容超出时会在组件内部出现滚动条,
|
|
2096
|
+
* 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
|
|
2097
|
+
*/
|
|
2098
|
+
height?: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* 用户自定义注入到 MForm.formState 的扩展字段,与 Editor 顶层的 `extendFormState`、
|
|
2101
|
+
* PropsPanel 的 `extend-state` 语义一致。表单 item 的 `display` / `disabled` 等
|
|
2102
|
+
* filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
|
|
2103
|
+
* 因此在对比 / 展示场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
|
|
2104
|
+
*/
|
|
2105
|
+
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2106
|
+
/**
|
|
2107
|
+
* 外部透传的基础 formState(通常来自 PropsPanel 主属性表单)。
|
|
2108
|
+
* 组件会提取其中的扩展字段覆盖到自己的 formState,保证 filterFunction 上下文一致。
|
|
2109
|
+
*/
|
|
2110
|
+
baseFormState?: FormState;
|
|
2111
|
+
/**
|
|
2112
|
+
* 表单内组件的尺寸(透传给 MForm 的 `size`),可选 'large' | 'default' | 'small'。
|
|
2113
|
+
* 缺省时使用 MForm 内置默认尺寸。
|
|
2114
|
+
*/
|
|
2115
|
+
size?: FieldSize;
|
|
2116
|
+
/**
|
|
2117
|
+
* 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
|
|
2118
|
+
* 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
|
|
2119
|
+
* `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
2120
|
+
*/
|
|
2121
|
+
loadConfig?: CompareFormLoadConfig;
|
|
2122
|
+
/** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
|
|
2123
|
+
services?: Services;
|
|
2124
|
+
}
|
|
1600
2125
|
declare enum SideItemKey {
|
|
1601
2126
|
COMPONENT_LIST = "component-list",
|
|
1602
2127
|
LAYER = "layer",
|
|
@@ -1704,112 +2229,236 @@ interface CodeParamStatement {
|
|
|
1704
2229
|
type?: string | TypeFunction<string>;
|
|
1705
2230
|
[key: string]: any;
|
|
1706
2231
|
}
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2232
|
+
/**
|
|
2233
|
+
* 历史记录操作类型:
|
|
2234
|
+
* - `add` / `remove` / `update`:普通可撤销/重做的节点变更;
|
|
2235
|
+
* - `initial`:页面「未修改的初始状态」基线(设置 root 时生成),作为页面栈 index 0 的固定底线 step。
|
|
2236
|
+
* 该 step 不可被撤销/回滚(cursor 不会低于它),仅用于历史面板底部的初始行展示。
|
|
2237
|
+
*/
|
|
2238
|
+
type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
|
|
2239
|
+
/**
|
|
2240
|
+
* 历史记录的「操作途径」——标记本次变更由哪条交互入口触发,仅用于历史面板展示 / 业务埋点,
|
|
2241
|
+
* 不影响 undo/redo 行为。缺省(未传)时 UI 视为「未知」。
|
|
2242
|
+
*
|
|
2243
|
+
* - `stage`:画布(拖拽 / 缩放 / 排序等舞台直接操作)
|
|
2244
|
+
* - `tree`:树形面板(图层 / 数据源 / 代码块等树形结构里的拖拽 / 菜单操作)
|
|
2245
|
+
* - `component-panel`:组件面板(左侧组件列表点击 / 拖拽新增组件)
|
|
2246
|
+
* - `props`:配置面板表单(属性表单字段编辑)
|
|
2247
|
+
* - `code`:源码编辑器(配置面板「源码」面板里直接编辑 JSON/代码后保存)
|
|
2248
|
+
* - `stage-contextmenu`:画布右键菜单(舞台上节点的右键上下文菜单)
|
|
2249
|
+
* - `tree-contextmenu`:树面板右键菜单(图层 / 数据源 / 代码块等树形列表上的右键上下文菜单)
|
|
2250
|
+
* - `toolbar`:工具栏菜单(顶部导航工具栏按钮)
|
|
2251
|
+
* - `shortcut`:键盘快捷键
|
|
2252
|
+
* - `rollback`:历史回滚(历史面板里对某条历史「回滚」,反向应用为一条新记录,类 git revert)
|
|
2253
|
+
* - `api`:代码 / 接口调用(程序化触发)
|
|
2254
|
+
* - `ai`:AI 生成 / 智能助手触发的变更
|
|
2255
|
+
* - `unknown`:未知来源
|
|
2256
|
+
*
|
|
2257
|
+
* 通过 `(string & {})` 允许业务侧扩展自定义途径字符串,同时保留内置值的自动补全。
|
|
2258
|
+
*/
|
|
2259
|
+
type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
|
|
2260
|
+
/** *AndGetHistoryId 系列方法返回值:原操作结果 + 本次写入历史记录的 uuid 列表(未入栈时为 `[]`)。 */
|
|
2261
|
+
type DslOpWithHistoryIdsResult<T> = {
|
|
2262
|
+
result: T;
|
|
2263
|
+
historyIds: string[];
|
|
2264
|
+
};
|
|
2265
|
+
/**
|
|
2266
|
+
* 单条变更的 diff 描述,统一表达「页面节点 / 代码块 / 数据源」的变化内容,
|
|
2267
|
+
* 被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 的 `diff` 复用。
|
|
2268
|
+
*
|
|
2269
|
+
* 按 `opType` 区分携带的字段:
|
|
2270
|
+
* - `add`:仅 `newSchema`(页面节点还带 `parentId` / `index`);
|
|
2271
|
+
* - `remove`:仅 `oldSchema`(页面节点还带 `parentId` / `index`);
|
|
2272
|
+
* - `update`:`oldSchema` + `newSchema`,并可带 `changeRecords` 做局部更新。
|
|
2273
|
+
*
|
|
2274
|
+
* 泛型 `T` 为变化内容的快照类型:页面节点为 `MNode`,代码块为 `CodeBlockContent`,数据源为 `DataSourceSchema`。
|
|
2275
|
+
*/
|
|
2276
|
+
interface StepDiffItem<T = unknown> {
|
|
2277
|
+
/** 变更后的内容快照。`opType` 为 `add` / `update` 时有,`remove` 时无。 */
|
|
2278
|
+
newSchema?: T;
|
|
2279
|
+
/** 变更前的内容快照。`opType` 为 `remove` / `update` 时有,`add` 时无。 */
|
|
2280
|
+
oldSchema?: T;
|
|
2281
|
+
/** 父节点 id。仅页面节点有(数据源 / 代码块没有父节点)。 */
|
|
2282
|
+
parentId?: Id;
|
|
2283
|
+
/** 在父节点 items 数组中的索引。仅页面节点有(数据源 / 代码块无需排序)。 */
|
|
2284
|
+
index?: number;
|
|
2285
|
+
/**
|
|
2286
|
+
* form 端 propPath/value 变更列表,仅 `opType` 为 `update` 时有;
|
|
2287
|
+
* 撤销/重做时若有则按 propPath 局部更新,缺省才退化为整内容替换。
|
|
2288
|
+
*/
|
|
2289
|
+
changeRecords?: ChangeRecord[];
|
|
2290
|
+
}
|
|
2291
|
+
/**
|
|
2292
|
+
* 历史记录条目公共字段,被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 复用。
|
|
2293
|
+
*
|
|
2294
|
+
* 泛型 `T` 为 `diff` 中变化内容的快照类型(页面节点 `MNode` / 代码块 `CodeBlockContent` / 数据源 `DataSourceSchema`)。
|
|
2295
|
+
*/
|
|
2296
|
+
interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
|
|
2297
|
+
/**
|
|
2298
|
+
* 历史记录唯一标识(uuid)。入栈时自动写入(若调用方未指定),
|
|
2299
|
+
* 用于精确定位 / 引用某一条历史记录(如 revert、埋点、跨端同步等)。
|
|
2300
|
+
* 注意与 `data.id`(关联的页面 / 代码块 / 数据源 id)区分。
|
|
2301
|
+
*/
|
|
2302
|
+
uuid: string;
|
|
2303
|
+
/**
|
|
2304
|
+
* 关联目标信息:`id` 为关联的页面 / 代码块 / 数据源等资源 id(也是历史栈的分组 key),
|
|
2305
|
+
* `name` 为展示名。所有历史类型统一携带。
|
|
2306
|
+
*/
|
|
1710
2307
|
data: {
|
|
1711
2308
|
name: string;
|
|
1712
2309
|
id: Id;
|
|
1713
2310
|
};
|
|
2311
|
+
/** 操作类型:新增 / 删除 / 更新(三类历史记录统一携带)。 */
|
|
1714
2312
|
opType: HistoryOpType;
|
|
1715
|
-
/** 操作前选中的节点 ID,用于撤销后恢复选择状态 */
|
|
1716
|
-
selectedBefore: Id[];
|
|
1717
|
-
/** 操作后选中的节点 ID,用于重做后恢复选择状态 */
|
|
1718
|
-
selectedAfter: Id[];
|
|
1719
|
-
modifiedNodeIds: Map<Id, Id>;
|
|
1720
|
-
/** opType 'add': 新增的节点 */
|
|
1721
|
-
nodes?: MNode[];
|
|
1722
|
-
/** opType 'add': 父节点 ID */
|
|
1723
|
-
parentId?: Id;
|
|
1724
|
-
/** opType 'add': 每个新增节点在父节点 items 中的索引 */
|
|
1725
|
-
indexMap?: Record<string, number>;
|
|
1726
|
-
/** opType 'remove': 被删除的节点及其位置信息 */
|
|
1727
|
-
removedItems?: {
|
|
1728
|
-
node: MNode;
|
|
1729
|
-
parentId: Id;
|
|
1730
|
-
index: number;
|
|
1731
|
-
}[];
|
|
1732
2313
|
/**
|
|
1733
|
-
*
|
|
1734
|
-
*
|
|
1735
|
-
* `changeRecords` 来自 form 端的 propPath/value 列表,撤销/重做时只对这些 propPath 做局部更新;
|
|
1736
|
-
* 缺省(未传 / 空数组)才退化为整节点替换。
|
|
2314
|
+
* 本次变更的内容(统一 diff 表达),每项见 {@link StepDiffItem}。
|
|
2315
|
+
* 页面节点(add/remove 多节点、update 多节点)会有多项,代码块 / 数据源通常只有一项。
|
|
1737
2316
|
*/
|
|
1738
|
-
|
|
1739
|
-
oldNode: MNode;
|
|
1740
|
-
newNode: MNode;
|
|
1741
|
-
changeRecords?: ChangeRecord[];
|
|
1742
|
-
}[];
|
|
2317
|
+
diff: StepDiffItem<T>[];
|
|
1743
2318
|
/**
|
|
1744
2319
|
* 调用方可选传入的人类可读描述(如「调整按钮颜色」),用于历史面板展示。
|
|
1745
2320
|
* 不影响 undo/redo 行为;缺省时面板会根据节点 / propPath 自动生成描述。
|
|
1746
2321
|
*/
|
|
1747
2322
|
historyDescription?: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* 操作途径:标记本次变更由哪条交互入口触发,取值见 {@link HistoryOpSource}
|
|
2325
|
+
* (画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等)。
|
|
2326
|
+
* 仅用于历史面板展示与业务埋点,不影响 undo/redo 行为;缺省时面板视为「未知」。
|
|
2327
|
+
*/
|
|
2328
|
+
source?: HistoryOpSource;
|
|
2329
|
+
/**
|
|
2330
|
+
* 入栈时间戳(毫秒)。入栈时自动写入(若调用方未指定),仅用于历史面板展示。
|
|
2331
|
+
*/
|
|
2332
|
+
timestamp?: number;
|
|
2333
|
+
/**
|
|
2334
|
+
* 是否为「已保存」记录:DSL 落库(如保存到后端 / 本地)时由 historyService.markSaved 标记。
|
|
2335
|
+
* 同一栈内任意时刻最多只有一条记录为 true;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
|
|
2336
|
+
*/
|
|
2337
|
+
saved?: boolean;
|
|
2338
|
+
/**
|
|
2339
|
+
* 是否为「整体设置 root」(set root)产生的记录(由 {@link Editor.pushRootDiffHistory} 写入)。
|
|
2340
|
+
* 用于「连续 set root 合并」:当某页栈最新一条已是 root 记录时,下一条 set root 会替换它而非新增,
|
|
2341
|
+
* 避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录。
|
|
2342
|
+
*/
|
|
2343
|
+
rootStep?: boolean;
|
|
2344
|
+
/** 操作人 */
|
|
2345
|
+
operator?: string;
|
|
2346
|
+
/** 扩展信息 */
|
|
2347
|
+
extra?: U;
|
|
1748
2348
|
}
|
|
1749
2349
|
/**
|
|
1750
|
-
*
|
|
1751
|
-
*
|
|
1752
|
-
* - 更新:oldContent / newContent 都为对应内容
|
|
1753
|
-
* - 删除:newContent = null,oldContent = 删除前内容
|
|
2350
|
+
* 历史记录的扩展上下文({@link BaseStepValue.extra})。
|
|
2351
|
+
* 内置字段供 `page` 类型在撤销 / 重做时恢复选区与受影响节点;扩展类型可自由附加其它键。
|
|
1754
2352
|
*/
|
|
1755
|
-
interface
|
|
1756
|
-
/**
|
|
1757
|
-
|
|
1758
|
-
/**
|
|
1759
|
-
|
|
1760
|
-
/**
|
|
1761
|
-
|
|
1762
|
-
/**
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
/** 调用方可选传入的人类可读描述,用于历史面板展示;不影响 undo/redo 行为。 */
|
|
1768
|
-
historyDescription?: string;
|
|
2353
|
+
interface StepExtra {
|
|
2354
|
+
/** 操作前选中的节点 ID,用于撤销后恢复选择状态(page 类型) */
|
|
2355
|
+
selectedBefore?: Id[];
|
|
2356
|
+
/** 操作后选中的节点 ID,用于重做后恢复选择状态(page 类型) */
|
|
2357
|
+
selectedAfter?: Id[];
|
|
2358
|
+
/** 本次操作涉及的节点 id 集合(page 类型) */
|
|
2359
|
+
modifiedNodeIds?: Map<Id, Id>;
|
|
2360
|
+
/** 操作前的节点校验错误快照,撤销后还原(使撤销一个「校验失败」的改动后错误消失) */
|
|
2361
|
+
invalidNodeIdsBefore?: Map<Id, NodeInvalidInfo>;
|
|
2362
|
+
/** 操作后的节点校验错误快照,重做后还原(使重做后错误恢复) */
|
|
2363
|
+
invalidNodeIdsAfter?: Map<Id, NodeInvalidInfo>;
|
|
2364
|
+
[key: string]: any;
|
|
1769
2365
|
}
|
|
1770
2366
|
/**
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
* - 更新:oldSchema / newSchema 都为对应 schema
|
|
1774
|
-
* - 删除:newSchema = null,oldSchema = 删除前 schema
|
|
2367
|
+
* 页面节点历史记录条目(`diff` 内容为 {@link MNode})。结构已与代码块 / 数据源统一收敛到
|
|
2368
|
+
* {@link BaseStepValue}:关联 id 见 `data.id`,选区等上下文见 `extra`。
|
|
1775
2369
|
*/
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
2370
|
+
type StepValue = BaseStepValue<MNode, StepExtra>;
|
|
2371
|
+
/**
|
|
2372
|
+
* 代码块历史记录条目(`diff` 内容为 {@link CodeBlockContent}),按 `data.id`(codeBlock.id)
|
|
2373
|
+
* 分组保存到 historyState.steps.codeBlock。结构与 {@link StepValue} / {@link DataSourceStepValue}
|
|
2374
|
+
* 一致,仅 `diff` 快照类型不同。
|
|
2375
|
+
*/
|
|
2376
|
+
type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
|
|
2377
|
+
/**
|
|
2378
|
+
* 数据源历史记录条目(`diff` 内容为 {@link DataSourceSchema}),按 `data.id`(dataSource.id)
|
|
2379
|
+
* 分组保存到 historyState.steps.dataSource。结构与 {@link StepValue} / {@link CodeBlockStepValue}
|
|
2380
|
+
* 一致,仅 `diff` 快照类型不同。
|
|
2381
|
+
*/
|
|
2382
|
+
type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
|
|
2383
|
+
/**
|
|
2384
|
+
* 历史记录类型标识:内置 `page` / `codeBlock` / `dataSource`,并允许业务扩展自定义类型。
|
|
2385
|
+
* `(string & {})` 保留对内置字面量的智能提示,同时不限制扩展取值。
|
|
2386
|
+
*/
|
|
2387
|
+
type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
|
|
2388
|
+
/**
|
|
2389
|
+
* 全部历史栈的统一容器,按「类型 -> id -> UndoRedo 栈」两级分组。
|
|
2390
|
+
*
|
|
2391
|
+
* - `page`:页面历史栈,按 page.id 分组(每页一份 UndoRedo);
|
|
2392
|
+
* - `codeBlock`:代码块历史栈,按 codeBlock.id 分组;
|
|
2393
|
+
* - `dataSource`:数据源历史栈,按 dataSource.id 分组;
|
|
2394
|
+
* - 其余键:业务通过 {@link HistoryService.registerStepType} 注册的自定义历史类型。
|
|
2395
|
+
*
|
|
2396
|
+
* 所有类型(含扩展类型)一视同仁:均按 id 独立分栈、独立 undo/redo,且都可通过
|
|
2397
|
+
* {@link HistoryService.setMarker} 在 index 0 种入 `initial` 基线(撤销 / 回滚不会越过该基线)。
|
|
2398
|
+
*/
|
|
2399
|
+
interface HistorySteps {
|
|
2400
|
+
page: Record<Id, UndoRedo<StepValue>>;
|
|
2401
|
+
codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
|
|
2402
|
+
dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
|
|
2403
|
+
/** 扩展历史类型:按 id 分组的 UndoRedo 栈。 */
|
|
2404
|
+
[stepType: string]: Record<Id, UndoRedo<any>>;
|
|
2405
|
+
}
|
|
2406
|
+
interface HistoryState {
|
|
1783
2407
|
/**
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
2408
|
+
* 全部历史栈的统一容器(页面 / 代码块 / 数据源 / 扩展类型),见 {@link HistorySteps}。
|
|
2409
|
+
* 各类型互不影响,支持按 id 独立 undo/redo;是否可撤销 / 重做改用 {@link HistoryService.canUndo} /
|
|
2410
|
+
* {@link HistoryService.canRedo}(按 stepType + id 查询)替代旧的全局 canUndo / canRedo 字段。
|
|
1786
2411
|
*/
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
|
|
2412
|
+
steps: HistorySteps;
|
|
2413
|
+
/**
|
|
2414
|
+
* 各历史类型的展示名称,用于历史面板({@link HistorySteps} 的 tab / 分组标题等)。
|
|
2415
|
+
* 内置 `page` / `codeBlock` / `dataSource` 有默认中文名(页面 / 代码块 / 数据源),
|
|
2416
|
+
* 扩展类型可通过 {@link HistoryService.registerStepType} 的 `name` 选项或
|
|
2417
|
+
* {@link HistoryService.setStepName} 登记;读取请用 {@link HistoryService.getStepName}。
|
|
2418
|
+
*/
|
|
2419
|
+
stepNames: Record<string, string>;
|
|
1790
2420
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
2421
|
+
/**
|
|
2422
|
+
* 历史记录的可持久化快照。由 historyService.saveToIndexedDB 写入 IndexedDB,
|
|
2423
|
+
* 再由 historyService.restoreFromIndexedDB 读出并重建各 UndoRedo 栈。
|
|
2424
|
+
*/
|
|
2425
|
+
interface PersistedHistoryState {
|
|
2426
|
+
/** 快照结构版本号,便于后续兼容升级。 */
|
|
2427
|
+
version: number;
|
|
1796
2428
|
/**
|
|
1797
|
-
*
|
|
1798
|
-
*
|
|
2429
|
+
* 全部历史栈的序列化快照,按「类型 -> id」两级分组,与 {@link HistorySteps} 对应。
|
|
2430
|
+
* 内置 `page` / `codeBlock` / `dataSource`,并包含业务注册的扩展类型。
|
|
1799
2431
|
*/
|
|
1800
|
-
|
|
2432
|
+
steps: {
|
|
2433
|
+
page: Record<Id, SerializedUndoRedo<StepValue>>;
|
|
2434
|
+
codeBlock: Record<Id, SerializedUndoRedo<CodeBlockStepValue>>;
|
|
2435
|
+
dataSource: Record<Id, SerializedUndoRedo<DataSourceStepValue>>;
|
|
2436
|
+
[stepType: string]: Record<Id, SerializedUndoRedo<any>>;
|
|
2437
|
+
};
|
|
2438
|
+
/** 保存时间戳(毫秒)。 */
|
|
2439
|
+
savedAt: number;
|
|
2440
|
+
}
|
|
2441
|
+
/** historyService 持久化相关 API 的可选配置。 */
|
|
2442
|
+
interface HistoryPersistOptions {
|
|
2443
|
+
/** IndexedDB 数据库名,默认 `tmagic-editor`(最终库名会拼上当前 DSL app id)。 */
|
|
2444
|
+
dbName?: string;
|
|
2445
|
+
/** objectStore 名,默认 `history`。 */
|
|
2446
|
+
storeName?: string;
|
|
2447
|
+
/** 记录 key,用于区分不同活动页 / 项目,默认 `default`。 */
|
|
2448
|
+
key?: IDBValidKey;
|
|
1801
2449
|
/**
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
2450
|
+
* 显式指定用于库名隔离的 DSL app id。
|
|
2451
|
+
* 缺省时回退到当前 editorService 的 `root.id`;在「先恢复历史再 set root」场景下 root 尚未设置,
|
|
2452
|
+
* 需由调用方(如从待加载 DSL 取 id)显式传入,否则会读 / 写到未按 app 隔离的默认库。
|
|
1804
2453
|
*/
|
|
1805
|
-
|
|
2454
|
+
appId?: Id;
|
|
1806
2455
|
}
|
|
1807
2456
|
/**
|
|
1808
2457
|
* 历史面板用:当前页面的一条历史步骤(包含位置和是否已应用)。
|
|
1809
2458
|
*/
|
|
1810
|
-
interface
|
|
2459
|
+
interface HistoryStepEntry<T> {
|
|
1811
2460
|
/** 步骤内容 */
|
|
1812
|
-
step:
|
|
2461
|
+
step: T;
|
|
1813
2462
|
/** 在所属栈中的索引(0 为最早) */
|
|
1814
2463
|
index: number;
|
|
1815
2464
|
/** 是否处于"已应用"段(即位于栈游标之前)。撤销后变为 false。 */
|
|
@@ -1818,69 +2467,42 @@ interface PageHistoryStepEntry {
|
|
|
1818
2467
|
isCurrent?: boolean;
|
|
1819
2468
|
}
|
|
1820
2469
|
/**
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1823
|
-
*
|
|
1824
|
-
* - targetId
|
|
2470
|
+
* 历史面板分组(页面 / 数据源 / 代码块 / 扩展类型统一结构)。
|
|
2471
|
+
*
|
|
2472
|
+
* 把指定历史栈的步骤列表按"目标"做相邻合并:
|
|
2473
|
+
* - 连续修改同一目标(单实体 update,targetId 一致)的多步合并成一组,组内可展开查看每步;
|
|
2474
|
+
* - add / remove / 多实体 update 始终独立成组(无法明确归属单一目标);
|
|
2475
|
+
* - targetId 为 undefined 表示"无明确目标",不参与合并。
|
|
2476
|
+
*
|
|
2477
|
+
* 各类型仅 `kind` 与 step 快照类型不同,统一由泛型描述:
|
|
2478
|
+
* - 页面:`HistoryGroup<StepValue>`,`kind: 'page'`,`id` 为 pageId,`targetId` 为被改节点 id;
|
|
2479
|
+
* - 数据源:`HistoryGroup<DataSourceStepValue>`,`kind: 'data-source'`,`id` 为 dataSource.id;
|
|
2480
|
+
* - 代码块:`HistoryGroup<CodeBlockStepValue>`,`kind: 'code-block'`,`id` 为 codeBlock.id。
|
|
1825
2481
|
*/
|
|
1826
|
-
interface
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
pageId
|
|
1830
|
-
|
|
2482
|
+
interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
|
|
2483
|
+
/** 历史类型标识:page / code-block / data-source(扩展类型同理)。 */
|
|
2484
|
+
kind: string;
|
|
2485
|
+
/** 所属栈 id(page 为 pageId,代码块 / 数据源为对应资源 id)。 */
|
|
2486
|
+
id: Id;
|
|
2487
|
+
/** 该分组的操作类型。 */
|
|
1831
2488
|
opType: HistoryOpType;
|
|
1832
2489
|
/**
|
|
1833
|
-
*
|
|
1834
|
-
* undefined 表示该分组不可被合并(add / remove /
|
|
2490
|
+
* 合并的目标 id:仅"单实体 update"有值,并按此与相邻同 id 的 update 合并。
|
|
2491
|
+
* undefined 表示该分组不可被合并(add / remove / 多实体 update)。
|
|
1835
2492
|
*/
|
|
1836
2493
|
targetId?: Id;
|
|
1837
|
-
/**
|
|
2494
|
+
/** 目标可读名(取最后一步快照的 name/type/id)。 */
|
|
1838
2495
|
targetName?: string;
|
|
1839
|
-
/**
|
|
1840
|
-
steps: PageHistoryStepEntry[];
|
|
1841
|
-
/** 组内最后一步是否已应用 */
|
|
1842
|
-
applied: boolean;
|
|
1843
|
-
/** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
|
|
1844
|
-
isCurrent?: boolean;
|
|
1845
|
-
}
|
|
1846
|
-
/**
|
|
1847
|
-
* 代码块历史面板分组。
|
|
1848
|
-
* - 同一 codeBlockId 的栈内,相邻的 'update' 操作会合并成一个 group;
|
|
1849
|
-
* - 'add' / 'remove' 始终独立成组(语义上是一次性事件)。
|
|
1850
|
-
*/
|
|
1851
|
-
interface CodeBlockHistoryGroup {
|
|
1852
|
-
kind: 'code-block';
|
|
1853
|
-
/** 关联的 codeBlock id */
|
|
1854
|
-
id: Id;
|
|
1855
|
-
/** 该分组的操作类型 */
|
|
1856
|
-
opType: HistoryOpType;
|
|
1857
|
-
/** 组内所有步骤,按时间正序 */
|
|
2496
|
+
/** 组内所有步骤,按时间正序。 */
|
|
1858
2497
|
steps: {
|
|
1859
|
-
step:
|
|
2498
|
+
step: T;
|
|
1860
2499
|
index: number;
|
|
1861
2500
|
applied: boolean;
|
|
1862
2501
|
isCurrent?: boolean;
|
|
1863
2502
|
}[];
|
|
1864
|
-
/**
|
|
2503
|
+
/** 组内最后一步是否已应用。 */
|
|
1865
2504
|
applied: boolean;
|
|
1866
|
-
/**
|
|
1867
|
-
isCurrent?: boolean;
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
|
-
* 数据源历史面板分组,结构同 CodeBlockHistoryGroup。
|
|
1871
|
-
*/
|
|
1872
|
-
interface DataSourceHistoryGroup {
|
|
1873
|
-
kind: 'data-source';
|
|
1874
|
-
id: Id;
|
|
1875
|
-
opType: HistoryOpType;
|
|
1876
|
-
steps: {
|
|
1877
|
-
step: DataSourceStepValue;
|
|
1878
|
-
index: number;
|
|
1879
|
-
applied: boolean;
|
|
1880
|
-
isCurrent?: boolean;
|
|
1881
|
-
}[];
|
|
1882
|
-
applied: boolean;
|
|
1883
|
-
/** 是否为当前所在的分组(包含该栈最近一次已应用步骤的那一组)。 */
|
|
2505
|
+
/** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
|
|
1884
2506
|
isCurrent?: boolean;
|
|
1885
2507
|
}
|
|
1886
2508
|
declare enum KeyBindingCommand {
|
|
@@ -1997,10 +2619,12 @@ type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...ar
|
|
|
1997
2619
|
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'>;
|
|
1998
2620
|
interface EventBusEvent {
|
|
1999
2621
|
'edit-data-source': [id: string];
|
|
2622
|
+
'edit-data-source-method': [id: string, methodName: string];
|
|
2623
|
+
'edit-data-source-field': [id: string, fieldPath: string[]];
|
|
2000
2624
|
'remove-data-source': [id: string];
|
|
2001
2625
|
'edit-code': [id: string];
|
|
2002
2626
|
}
|
|
2003
|
-
interface EventBus extends EventEmitter {
|
|
2627
|
+
interface EventBus extends EventEmitter$1 {
|
|
2004
2628
|
on<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, listener: (...args: Param) => void): this;
|
|
2005
2629
|
emit<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, ...args: Param): boolean;
|
|
2006
2630
|
}
|
|
@@ -2017,9 +2641,24 @@ interface PageBarSortOptions extends PartSortableOptions {
|
|
|
2017
2641
|
/** 在onStart之前调用 */
|
|
2018
2642
|
beforeStart?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
|
|
2019
2643
|
}
|
|
2020
|
-
|
|
2644
|
+
/**
|
|
2645
|
+
* 右键菜单当前目标(侧栏树节点等)。
|
|
2646
|
+
* 数据源 / 代码块面板通过 `customContentMenu` 的 `getTarget` 暴露,业务在 handler 内自行读取。
|
|
2647
|
+
*/
|
|
2648
|
+
interface ContentMenuTarget {
|
|
2649
|
+
/** 目标 ID */
|
|
2650
|
+
id: string;
|
|
2651
|
+
/** 原始节点数据(树节点等) */
|
|
2652
|
+
data?: TreeNodeData;
|
|
2653
|
+
}
|
|
2654
|
+
type ContentMenuType = 'layer' | 'data-source' | 'viewer' | 'code-block';
|
|
2655
|
+
type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType, /** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
|
|
2656
|
+
|
|
2657
|
+
getTarget?: () => ContentMenuTarget | null) => (MenuButton | MenuComponent)[];
|
|
2021
2658
|
interface EditorEvents {
|
|
2022
|
-
'root-change': [value: StoreState['root'], preValue?: StoreState['root']
|
|
2659
|
+
'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
|
|
2660
|
+
historySource?: HistoryOpSource;
|
|
2661
|
+
}];
|
|
2023
2662
|
select: [node: MNode | null];
|
|
2024
2663
|
add: [nodes: MNode[]];
|
|
2025
2664
|
remove: [nodes: MNode[]];
|
|
@@ -2035,6 +2674,96 @@ interface EditorEvents {
|
|
|
2035
2674
|
targetParent: MContainer;
|
|
2036
2675
|
}];
|
|
2037
2676
|
'history-change': [data: MPage | MPageFragment];
|
|
2677
|
+
/**
|
|
2678
|
+
* DSL 发生变更后统一触发,免去分别监听 add / remove / update / move-layer / drag-to。
|
|
2679
|
+
* 回调参数为 {@link EditorChangeEvent},按 `type` 区分操作类型并携带各自的操作内容(payload)
|
|
2680
|
+
* 以及变更所在的当前 page(可能为 null)。撤销 / 重做内部同样会经由
|
|
2681
|
+
* add / remove / update 触发本事件;如需区分「用户操作」与「撤销重做」请配合 `history-change`。
|
|
2682
|
+
*/
|
|
2683
|
+
change: [event: EditorChangeEvent];
|
|
2684
|
+
/** 节点校验错误状态发生变化时触发,携带当前完整的错误 Map(供非响应式消费方订阅) */
|
|
2685
|
+
'invalid-node-change': [invalidNodeIds: Map<Id, NodeInvalidInfo>];
|
|
2686
|
+
}
|
|
2687
|
+
/** `change` 事件中单个变更项:变更的 node 及其所属的 page(可能为 null)。 */
|
|
2688
|
+
interface EditorChangeItem {
|
|
2689
|
+
node: MNode;
|
|
2690
|
+
page: StoreState['page'];
|
|
2691
|
+
}
|
|
2692
|
+
/** `update` 类型变更项:node 为前后快照及 form 端变更记录,page 为其所属页面。 */
|
|
2693
|
+
interface EditorUpdateChangeItem {
|
|
2694
|
+
node: {
|
|
2695
|
+
newNode: MNode;
|
|
2696
|
+
oldNode: MNode;
|
|
2697
|
+
changeRecords?: ChangeRecord[];
|
|
2698
|
+
};
|
|
2699
|
+
page: StoreState['page'];
|
|
2700
|
+
}
|
|
2701
|
+
/** {@link EditorEvents.change} 各操作类型共有的历史相关字段。 */
|
|
2702
|
+
interface EditorChangeEventHistoryMeta {
|
|
2703
|
+
/**
|
|
2704
|
+
* 本次变更的「历史来源」(调用 DSL 操作时传入的 {@link HistoryOpOptions.historySource},
|
|
2705
|
+
* 撤销 / 重做时则为被应用 step 上记录的 `source`),未携带时为 undefined。
|
|
2706
|
+
*/
|
|
2707
|
+
historySource?: HistoryOpSource;
|
|
2708
|
+
/**
|
|
2709
|
+
* 本次操作是否未写入历史记录(即调用时传入的 {@link HistoryOpOptions.doNotPushHistory},缺省为 false);
|
|
2710
|
+
* 撤销 / 重做路径补发的事件恒为 true(撤销/重做本身不再入栈)。
|
|
2711
|
+
*/
|
|
2712
|
+
doNotPushHistory?: boolean;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* {@link EditorEvents.change} 的回调参数:以 `type` 区分操作类型,并携带对应的操作内容。
|
|
2716
|
+
* `data` 为本次变更的节点列表,每项包含 node 及其所属的 page(可能为 null);
|
|
2717
|
+
* `move-layer` 额外带层级偏移 `offset`,`drag-to` 额外带目标位置 `targetIndex` / `targetParent`;
|
|
2718
|
+
* 历史相关字段(historySource / doNotPushHistory)见 {@link EditorChangeEventHistoryMeta}。
|
|
2719
|
+
*/
|
|
2720
|
+
type EditorChangeEvent = ({
|
|
2721
|
+
type: 'add';
|
|
2722
|
+
data: EditorChangeItem[];
|
|
2723
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2724
|
+
type: 'remove';
|
|
2725
|
+
data: EditorChangeItem[];
|
|
2726
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2727
|
+
type: 'update';
|
|
2728
|
+
data: EditorUpdateChangeItem[];
|
|
2729
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2730
|
+
type: 'move-layer';
|
|
2731
|
+
data: EditorChangeItem[];
|
|
2732
|
+
offset: number | LayerOffset;
|
|
2733
|
+
} & EditorChangeEventHistoryMeta) | ({
|
|
2734
|
+
type: 'drag-to';
|
|
2735
|
+
data: EditorChangeItem[];
|
|
2736
|
+
targetIndex: number;
|
|
2737
|
+
targetParent: MContainer;
|
|
2738
|
+
} & EditorChangeEventHistoryMeta);
|
|
2739
|
+
interface HistoryEvents {
|
|
2740
|
+
change: [state: BaseStepValue | StepValue | CodeBlockStepValue | DataSourceStepValue, stepType: HistoryStepType, id: Id];
|
|
2741
|
+
'code-block-history-change': [id: Id, state: CodeBlockStepValue];
|
|
2742
|
+
'data-source-history-change': [id: Id, state: DataSourceStepValue];
|
|
2743
|
+
'restore-from-indexed-db': [snapshot: PersistedHistoryState | null];
|
|
2744
|
+
'save-to-indexed-db': [snapshot: PersistedHistoryState];
|
|
2745
|
+
'mark-saved': [{
|
|
2746
|
+
kind: HistoryStepType;
|
|
2747
|
+
id?: Id;
|
|
2748
|
+
}];
|
|
2749
|
+
clear: [{
|
|
2750
|
+
id: Id;
|
|
2751
|
+
stepType: HistoryStepType;
|
|
2752
|
+
}];
|
|
2753
|
+
'marker-change': [{
|
|
2754
|
+
id: Id;
|
|
2755
|
+
marker: StepValue;
|
|
2756
|
+
stepType: HistoryStepType;
|
|
2757
|
+
}];
|
|
2758
|
+
/**
|
|
2759
|
+
* 页面 / 页面片结构变更(新增 / 删除)时派发,见 {@link HistoryService.notifyPageStructureChange}。
|
|
2760
|
+
* 一次操作(add / remove / setRoot 整体替换)涉及多个页面时合并为**一个**事件;
|
|
2761
|
+
* `add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
|
|
2762
|
+
*/
|
|
2763
|
+
'page-structure-change': [change: {
|
|
2764
|
+
add: (MPage | MPageFragment)[];
|
|
2765
|
+
remove: (MPage | MPageFragment)[];
|
|
2766
|
+
}];
|
|
2038
2767
|
}
|
|
2039
2768
|
declare const canUsePluginMethods: {
|
|
2040
2769
|
async: readonly ["getLayout", "highlight", "select", "multiSelect", "doAdd", "add", "doRemove", "remove", "doUpdate", "update", "sort", "copy", "paste", "doPaste", "doAlignCenter", "alignCenter", "moveLayer", "moveToContainer", "dragTo", "undo", "redo", "move"];
|
|
@@ -2045,26 +2774,159 @@ type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
|
|
|
2045
2774
|
* 历史记录写入相关的通用配置(codeBlock / dataSource / editor 共用)
|
|
2046
2775
|
* - doNotPushHistory: 操作完成后是否不要将本次操作压入历史栈(撤销/重做记录),默认 false
|
|
2047
2776
|
* - historyDescription: 入栈时附带的人类可读描述,用于历史面板展示;不影响 undo/redo 行为,缺省时面板会自动生成描述
|
|
2777
|
+
* - historySource: 操作途径,取值见 {@link HistoryOpSource}(画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等),用于历史面板展示与埋点;不影响 undo/redo 行为
|
|
2048
2778
|
*/
|
|
2049
2779
|
interface HistoryOpOptions {
|
|
2050
2780
|
doNotPushHistory?: boolean;
|
|
2051
2781
|
historyDescription?: string;
|
|
2782
|
+
historySource?: HistoryOpSource;
|
|
2783
|
+
}
|
|
2784
|
+
/**
|
|
2785
|
+
* 在 HistoryOpOptions 基础上携带 form 端 propPath/value 变更记录,
|
|
2786
|
+
* 用于历史记录的精细化撤销/重做(按 propPath 局部 patch)。
|
|
2787
|
+
*/
|
|
2788
|
+
interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
|
|
2789
|
+
changeRecords?: ChangeRecord[];
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* DSL 修改类操作的通用配置
|
|
2793
|
+
* - doNotSelect: 操作后是否不要自动触发选中(不调用 this.select / this.multiSelect / stage.select / stage.multiSelect)
|
|
2794
|
+
* - doNotSwitchPage: 操作若会引发当前页面切换(如新增 / 删除 / 跨页移动),是否跳过这次切换
|
|
2795
|
+
*/
|
|
2796
|
+
interface DslOpOptions extends HistoryOpOptions {
|
|
2797
|
+
doNotSelect?: boolean;
|
|
2798
|
+
doNotSwitchPage?: boolean;
|
|
2799
|
+
}
|
|
2800
|
+
/** 差异对话框的入参 */
|
|
2801
|
+
interface DiffDialogPayload {
|
|
2802
|
+
/** 表单类别 */
|
|
2803
|
+
category?: CompareCategory;
|
|
2804
|
+
/** 节点类型 / 数据源类型 */
|
|
2805
|
+
type?: string;
|
|
2806
|
+
/** 代码块场景下的数据源类型 */
|
|
2807
|
+
dataSourceType?: string;
|
|
2808
|
+
/** 该 step 修改前的值(oldNode / oldSchema / oldContent) */
|
|
2809
|
+
lastValue: Record<string, any>;
|
|
2810
|
+
/** 该 step 修改后的值(newNode / newSchema / newContent) */
|
|
2811
|
+
value: Record<string, any>;
|
|
2812
|
+
/** 当前编辑器中实际的最新值;不传或为 null 时禁用「与当前对比」 */
|
|
2813
|
+
currentValue?: Record<string, any> | null;
|
|
2814
|
+
/** 用于标题展示的目标名称 */
|
|
2815
|
+
targetLabel?: string;
|
|
2816
|
+
/** 用于标题展示的目标 id */
|
|
2817
|
+
id?: string | number;
|
|
2818
|
+
/**
|
|
2819
|
+
* 指定打开时的初始对比模式:
|
|
2820
|
+
* - before:该步骤修改前 vs 修改后
|
|
2821
|
+
* - current:该步骤修改后 vs 当前最新值
|
|
2822
|
+
* 不传时按是否存在「修改后的值」/「当前值」自动推断。
|
|
2823
|
+
* 若指定的模式当前不可用(对应数据缺失),将回退到自动推断结果。
|
|
2824
|
+
*/
|
|
2825
|
+
mode?: 'before' | 'current';
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* 一组「描述 + 可操作性」的判定函数集合。页面 / 数据源 / 代码块及业务自定义历史
|
|
2829
|
+
* 各自实现一份,作为整体注入,避免把 describe* / isStep* 拆成多个独立 props 反复透传。
|
|
2830
|
+
*/
|
|
2831
|
+
interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
|
|
2832
|
+
/**
|
|
2833
|
+
* 组级描述文案生成器,接收一个 group,返回展示文本。
|
|
2834
|
+
* 不传时回退到对组内最后一步调用 {@link describeStep}(适用于不做相邻合并、每组恒为单步的历史,如数据源/代码块)。
|
|
2835
|
+
*/
|
|
2836
|
+
describeGroup?: (_group: any) => string;
|
|
2837
|
+
/** 单步描述文案生成器,接收一个 step,返回展示文本(合并组展开后的子步列表用)。 */
|
|
2838
|
+
describeStep: (_step: T) => string;
|
|
2839
|
+
/** 判断某个 step 是否可查看差异(前后值都存在)。不传则一律不展示差异入口。 */
|
|
2840
|
+
isStepDiffable?: (_step: T) => boolean;
|
|
2841
|
+
/** 判断某个 step 是否支持回滚(如更新需带 changeRecords)。不传则已应用即可回滚。 */
|
|
2842
|
+
isStepRevertable?: (_step: T) => boolean;
|
|
2843
|
+
}
|
|
2844
|
+
/**
|
|
2845
|
+
* 通用 bucket(数据源 / 代码块 / 业务自定义历史)的整体渲染配置。
|
|
2846
|
+
* 把原先散落在 Bucket / BucketTab 上的 title / prefix / describe* / isStep* / showInitial / gotoEnabled
|
|
2847
|
+
* 收敛成一个对象作为单一 prop 传递,调用方一次配齐、组件内部按需读取。
|
|
2848
|
+
*/
|
|
2849
|
+
interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
|
|
2850
|
+
/** bucket 头部标题,例如 "数据源" / "代码块"。 */
|
|
2851
|
+
title: string;
|
|
2852
|
+
/** 子项 key 的命名空间前缀(`ds` 数据源 / `cb` 代码块 / 业务自定义如 `mod`)。 */
|
|
2853
|
+
prefix: string;
|
|
2854
|
+
/** 是否展示底部「回到初始状态」入口,默认 true。无 undo cursor 语义的自定义历史可传 false。 */
|
|
2855
|
+
showInitial?: boolean;
|
|
2856
|
+
/** 是否支持「跳转到该记录」(goto),默认 true。 */
|
|
2857
|
+
gotoEnabled?: boolean;
|
|
2858
|
+
/** 是否展示顶部「清空」按钮,默认 true。无需提供清空能力的自定义历史可传 false。 */
|
|
2859
|
+
showClear?: boolean;
|
|
2860
|
+
}
|
|
2861
|
+
interface UseHistoryRevertOptions {
|
|
2862
|
+
/**
|
|
2863
|
+
* 父级应用上下文,用于让动态挂载的「差异确认弹窗」继承全局组件 / 指令 / provide / 插件
|
|
2864
|
+
* (Element Plus、@tmagic/form 字段组件等)。未显式传入时,会自动取调用方所在组件的 appContext
|
|
2865
|
+
* (`getCurrentInstance()?.appContext`)。业务方若在组件 setup 之外调用,需手动传入(如 `editorApp._context`)。
|
|
2866
|
+
*/
|
|
2867
|
+
appContext?: AppContext | null;
|
|
2868
|
+
/**
|
|
2869
|
+
* 透传给差异确认弹窗的 `extendState`(即 Editor 的 `extendFormState`),
|
|
2870
|
+
* 使对比表单中依赖业务上下文的 `display` / `disabled` 等 filterFunction 正常工作。
|
|
2871
|
+
*/
|
|
2872
|
+
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2873
|
+
/**
|
|
2874
|
+
* 返回 PropsPanel 主属性表单(FormPanel -> MForm)的 formState。
|
|
2875
|
+
* 仅页面历史「查看差异 / 回滚确认」场景会使用该 formState 覆盖 CompareForm 中同名扩展字段,
|
|
2876
|
+
* 以保证两处 filterFunction 读取到一致的运行态上下文。
|
|
2877
|
+
*/
|
|
2878
|
+
getPropsPanelFormState?: () => FormState | undefined;
|
|
2879
|
+
/**
|
|
2880
|
+
* 内置页面 / 数据源 / 代码块的差异 / 回滚确认弹窗默认宽度(透传给 TMagicDialog 的 `width`),
|
|
2881
|
+
* 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
|
|
2882
|
+
* 业务自有历史(`viewDiff` / `confirmAndRevert`)可在调用时通过各自入参的 `width` 单独覆盖。
|
|
2883
|
+
*/
|
|
2884
|
+
dialogWidth?: string;
|
|
2052
2885
|
}
|
|
2053
2886
|
/**
|
|
2054
|
-
*
|
|
2055
|
-
*
|
|
2887
|
+
* 业务自有历史(如管理台「模块」)做差异对比时所需的额外渲染入参。
|
|
2888
|
+
* 内置的页面 / 数据源 / 代码块按 `category` 自动取表单配置,无需传这些;
|
|
2889
|
+
* 业务自有类别可通过 `loadConfig` 注入自定义表单配置加载逻辑。
|
|
2056
2890
|
*/
|
|
2057
|
-
interface
|
|
2058
|
-
|
|
2891
|
+
interface CustomDiffFormOptions {
|
|
2892
|
+
/**
|
|
2893
|
+
* 自定义差异表单配置加载逻辑(如「模块」按 c_type 重建表单配置),
|
|
2894
|
+
* 透传给弹窗内部的 CompareForm;缺省时按 `category` 走内置加载。
|
|
2895
|
+
*/
|
|
2896
|
+
loadConfig?: CompareFormLoadConfig;
|
|
2897
|
+
/** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
|
|
2898
|
+
selfDiffFieldTypes?: string[];
|
|
2899
|
+
/**
|
|
2900
|
+
* 可选:外部提供的 formState(通常来自 PropsPanel 主表单),
|
|
2901
|
+
* 对比弹窗会用它覆盖 CompareForm 中同名扩展字段,避免上下文不一致。
|
|
2902
|
+
*/
|
|
2903
|
+
compareFormState?: FormState;
|
|
2904
|
+
/**
|
|
2905
|
+
* 差异 / 确认回滚弹窗宽度(透传给 HistoryDiffDialog 的 TMagicDialog `width`),
|
|
2906
|
+
* 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
|
|
2907
|
+
*/
|
|
2908
|
+
width?: string;
|
|
2909
|
+
/**
|
|
2910
|
+
* 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
|
|
2911
|
+
* 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
|
|
2912
|
+
*/
|
|
2913
|
+
size?: FieldSize;
|
|
2059
2914
|
}
|
|
2060
2915
|
/**
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2063
|
-
*
|
|
2916
|
+
* 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
|
|
2917
|
+
* 与内置页面 / 数据源 / 代码块回滚共用「目标校验 → 差异/二次确认弹窗 → 反向回滚」流程,
|
|
2918
|
+
* 业务方只需提供:差异弹窗入参(可选)、表单配置加载(可选)、实际回滚执行函数。
|
|
2064
2919
|
*/
|
|
2065
|
-
interface
|
|
2066
|
-
|
|
2067
|
-
|
|
2920
|
+
interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
|
|
2921
|
+
/**
|
|
2922
|
+
* 差异确认弹窗入参;可对比的步骤(单实体 update)传入后弹差异确认弹窗,
|
|
2923
|
+
* 传 null / 省略则退化为普通二次确认框(add / remove / 不可对比)。
|
|
2924
|
+
*/
|
|
2925
|
+
diffPayload?: DiffDialogPayload | null;
|
|
2926
|
+
/** 回滚前置校验:返回 true 表示目标数据已删除等不可回滚,给出统一提示并中止。 */
|
|
2927
|
+
isTargetMissing?: () => boolean;
|
|
2928
|
+
/** 用户确认后执行的实际回滚逻辑。 */
|
|
2929
|
+
revert: () => T | Promise<T>;
|
|
2068
2930
|
}
|
|
2069
2931
|
//#endregion
|
|
2070
2932
|
//#region temp/packages/editor/src/hooks/use-code-block-edit.d.ts
|
|
@@ -2089,8 +2951,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2089
2951
|
onClose?: (() => any) | undefined;
|
|
2090
2952
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
2091
2953
|
onOpen?: (() => any) | undefined;
|
|
2092
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2093
2954
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2955
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2094
2956
|
}>, {
|
|
2095
2957
|
show(): Promise<void>;
|
|
2096
2958
|
hide(): Promise<void>;
|
|
@@ -2098,8 +2960,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2098
2960
|
close: () => any;
|
|
2099
2961
|
submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
|
|
2100
2962
|
open: () => any;
|
|
2101
|
-
"update:width": (value: number) => any;
|
|
2102
2963
|
"update:visible": (value: boolean) => any;
|
|
2964
|
+
"update:width": (value: number) => any;
|
|
2103
2965
|
}, import("@vue/runtime-core").PublicProps, {}, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
|
|
2104
2966
|
P: {};
|
|
2105
2967
|
B: {};
|
|
@@ -2121,18 +2983,43 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2121
2983
|
onClose?: (() => any) | undefined;
|
|
2122
2984
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
2123
2985
|
onOpen?: (() => any) | undefined;
|
|
2124
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2125
2986
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2987
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2126
2988
|
}>, {
|
|
2127
2989
|
show(): Promise<void>;
|
|
2128
2990
|
hide(): Promise<void>;
|
|
2129
2991
|
}, {}, {}, {}, {}> | null>>;
|
|
2130
2992
|
createCodeBlock: () => Promise<void>;
|
|
2131
2993
|
editCode: (id: string) => Promise<void>;
|
|
2132
|
-
deleteCode: (key: string
|
|
2994
|
+
deleteCode: (key: string, {
|
|
2995
|
+
historySource
|
|
2996
|
+
}?: {
|
|
2997
|
+
historySource?: HistoryOpSource;
|
|
2998
|
+
}) => Promise<void>;
|
|
2133
2999
|
submitCodeBlockHandler: (values: CodeBlockContent, eventData?: ContainerChangeEventData) => Promise<void>;
|
|
2134
3000
|
};
|
|
2135
3001
|
//#endregion
|
|
3002
|
+
//#region temp/packages/editor/src/hooks/use-compare-form.d.ts
|
|
3003
|
+
interface UseCompareFormReturn {
|
|
3004
|
+
config: Ref<FormConfig>;
|
|
3005
|
+
currentValues: ComputedRef<FormValue>;
|
|
3006
|
+
wrapperStyle: ComputedRef<Record<string, string> | undefined>;
|
|
3007
|
+
mergedExtendState: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3008
|
+
loadConfig: () => Promise<void>;
|
|
3009
|
+
formRef: Readonly<Ref<InstanceType<typeof MForm> | null>>;
|
|
3010
|
+
normalizeCodeBlockValue: (v: Partial<CodeBlockContent> | Record<string, any> | undefined) => Record<string, any>;
|
|
3011
|
+
}
|
|
3012
|
+
/**
|
|
3013
|
+
* CompareForm / ViewForm 共用逻辑:
|
|
3014
|
+
* - 按 `category`(node / data-source / code-block) 加载 FormConfig(支持自定义 `loadConfig`);
|
|
3015
|
+
* - 代码块 `content` 归一化为字符串;
|
|
3016
|
+
* - 外层容器固定高度 + 内部滚动的 `wrapperStyle`;
|
|
3017
|
+
* - 将 services / stage 注入 MForm.formState,保证 filterFunction 上下文一致。
|
|
3018
|
+
*
|
|
3019
|
+
* 两个组件的差异仅在于是否做新旧值对比,这部分逻辑保留在各自组件中。
|
|
3020
|
+
*/
|
|
3021
|
+
declare const useCompareForm: (props: CompareFormBaseProps) => UseCompareFormReturn;
|
|
3022
|
+
//#endregion
|
|
2136
3023
|
//#region temp/packages/editor/src/hooks/use-stage.d.ts
|
|
2137
3024
|
declare const useStage: (stageOptions: StageOptions) => StageCore$1;
|
|
2138
3025
|
//#endregion
|
|
@@ -2211,6 +3098,7 @@ declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
|
|
|
2211
3098
|
declare const useServices: () => Services;
|
|
2212
3099
|
//#endregion
|
|
2213
3100
|
//#region temp/packages/editor/src/utils/config.d.ts
|
|
3101
|
+
declare const isGlobalFlat: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
2214
3102
|
declare const setEditorConfig: (option: EditorInstallOptions) => void;
|
|
2215
3103
|
declare const getEditorConfig: <K extends keyof EditorInstallOptions>(key: K) => EditorInstallOptions[K];
|
|
2216
3104
|
//#endregion
|
|
@@ -2227,6 +3115,15 @@ declare const numberOptions: {
|
|
|
2227
3115
|
text: string;
|
|
2228
3116
|
value: string;
|
|
2229
3117
|
}[];
|
|
3118
|
+
declare const booleanOptions: {
|
|
3119
|
+
text: string;
|
|
3120
|
+
value: string;
|
|
3121
|
+
}[];
|
|
3122
|
+
/** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
|
|
3123
|
+
declare const getCondOpOptionsByFieldType: (type: string) => {
|
|
3124
|
+
text: string;
|
|
3125
|
+
value: string;
|
|
3126
|
+
}[];
|
|
2230
3127
|
declare const styleTabConfig: TabPaneConfig;
|
|
2231
3128
|
declare const eventTabConfig: TabPaneConfig;
|
|
2232
3129
|
declare const advancedTabConfig: TabPaneConfig;
|
|
@@ -2245,6 +3142,18 @@ declare const fillConfig: (config?: FormConfig, {
|
|
|
2245
3142
|
disabledDataSource?: boolean;
|
|
2246
3143
|
disabledCodeBlock?: boolean;
|
|
2247
3144
|
}) => FormConfig;
|
|
3145
|
+
/**
|
|
3146
|
+
* 将属性表单配置中「样式」tab-pane 的 `display` 强制置为 `true`。
|
|
3147
|
+
*
|
|
3148
|
+
* `propsService.getPropsConfig` 返回的样式 tab 默认带有
|
|
3149
|
+
* `display: ({ services }) => !(services?.uiService?.get('showStylePanel') ?? true)`,
|
|
3150
|
+
* 在对比 / 只读展示场景(CompareForm / ViewForm)下并不需要跟随 uiService 状态隐藏,
|
|
3151
|
+
* 这里统一放开,保证样式 tab 始终可见。
|
|
3152
|
+
*
|
|
3153
|
+
* @param formConfig 组件属性表单配置
|
|
3154
|
+
* @returns 处理后的表单配置(不修改入参,返回浅拷贝)
|
|
3155
|
+
*/
|
|
3156
|
+
declare const removeStyleDisplayConfig: (formConfig: FormConfig) => FormConfig;
|
|
2248
3157
|
//#endregion
|
|
2249
3158
|
//#region temp/packages/editor/src/utils/code-block.d.ts
|
|
2250
3159
|
/**
|
|
@@ -2330,10 +3239,10 @@ declare const getRelativeStyle: (style?: Record<string, any>) => Record<string,
|
|
|
2330
3239
|
declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
|
|
2331
3240
|
declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
|
|
2332
3241
|
declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
|
|
2333
|
-
declare const change2Fixed: (node: MNode,
|
|
3242
|
+
declare const change2Fixed: (node: MNode, path: MNode[]) => {
|
|
2334
3243
|
[key: string]: any;
|
|
2335
3244
|
};
|
|
2336
|
-
declare const Fixed2Other: (node: MNode,
|
|
3245
|
+
declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
|
|
2337
3246
|
declare const getGuideLineFromCache: (key: string) => number[];
|
|
2338
3247
|
declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
|
|
2339
3248
|
declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
|
|
@@ -2361,7 +3270,7 @@ declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id)
|
|
|
2361
3270
|
* @param getLayoutFn 获取父节点布局方式的回调函数
|
|
2362
3271
|
* @returns 处理后的节点配置(深拷贝)
|
|
2363
3272
|
*/
|
|
2364
|
-
declare const toggleFixedPosition: (dist: MNode, src: MNode,
|
|
3273
|
+
declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
|
|
2365
3274
|
/**
|
|
2366
3275
|
* 根据键盘移动的偏移量计算节点的新样式
|
|
2367
3276
|
* 仅对 absolute 或 fixed 定位的节点生效;优先修改 top/left,若未设置则修改 bottom/right
|
|
@@ -2422,6 +3331,11 @@ interface DragClassification {
|
|
|
2422
3331
|
* @returns 分类结果,包含同容器索引列表和跨容器节点列表
|
|
2423
3332
|
*/
|
|
2424
3333
|
declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
|
|
3334
|
+
/**
|
|
3335
|
+
* 给「回滚」生成的新 step 用的简短描述生成器。
|
|
3336
|
+
* 与 UI 层 `describePageStep` 同义,但避免 service 反向依赖 layouts/,故放在此工具函数中。
|
|
3337
|
+
*/
|
|
3338
|
+
declare const describeStepForRevert: (step: StepValue) => string;
|
|
2425
3339
|
//#endregion
|
|
2426
3340
|
//#region temp/packages/editor/src/utils/operator.d.ts
|
|
2427
3341
|
/**
|
|
@@ -2452,7 +3366,19 @@ declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) =>
|
|
|
2452
3366
|
type: "var" | "text";
|
|
2453
3367
|
}[];
|
|
2454
3368
|
declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
|
|
2455
|
-
|
|
3369
|
+
/**
|
|
3370
|
+
* 按字段名路径下钻 DataSchema。
|
|
3371
|
+
* @param skipNumberIndices 为 true 时跳过数字段(模板路径中的数组下标,如 arr[0].x)
|
|
3372
|
+
*/
|
|
3373
|
+
declare const resolveFieldByPath: (fields: DataSchema[] | undefined, fieldNames: string[], options?: {
|
|
3374
|
+
skipNumberIndices?: boolean;
|
|
3375
|
+
}) => {
|
|
3376
|
+
ok: boolean;
|
|
3377
|
+
field?: DataSchema;
|
|
3378
|
+
fields: DataSchema[];
|
|
3379
|
+
failedName?: string;
|
|
3380
|
+
};
|
|
3381
|
+
declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: string[]) => "" | DataSourceFieldType;
|
|
2456
3382
|
//#endregion
|
|
2457
3383
|
//#region temp/packages/editor/src/utils/dep/idle-task.d.ts
|
|
2458
3384
|
interface IdleTaskEvents {
|
|
@@ -2463,7 +3389,7 @@ interface IdleTaskEvents {
|
|
|
2463
3389
|
hightLevelLength: number;
|
|
2464
3390
|
}];
|
|
2465
3391
|
}
|
|
2466
|
-
declare class IdleTask<T = any> extends EventEmitter
|
|
3392
|
+
declare class IdleTask<T = any> extends EventEmitter {
|
|
2467
3393
|
private taskList;
|
|
2468
3394
|
private hightLevelTaskList;
|
|
2469
3395
|
private taskHandle;
|
|
@@ -2474,6 +3400,17 @@ declare class IdleTask<T = any> extends EventEmitter$1 {
|
|
|
2474
3400
|
once<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
|
|
2475
3401
|
emit<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
2476
3402
|
private runTaskQueue;
|
|
3403
|
+
/**
|
|
3404
|
+
* 执行一批任务,队列被清空时提前结束
|
|
3405
|
+
*/
|
|
3406
|
+
private runTaskBatch;
|
|
3407
|
+
/**
|
|
3408
|
+
* 单个任务失败不能中断整个队列,否则后续任务永远不会被执行,
|
|
3409
|
+
* 依赖收集会停在半路(收集中状态与剩余任务数都不再变化)
|
|
3410
|
+
*/
|
|
3411
|
+
private runTask;
|
|
3412
|
+
private finishRun;
|
|
3413
|
+
private getTaskLength;
|
|
2477
3414
|
}
|
|
2478
3415
|
//#endregion
|
|
2479
3416
|
//#region temp/packages/editor/src/utils/scroll-viewer.d.ts
|
|
@@ -2486,7 +3423,7 @@ interface ScrollViewerOptions {
|
|
|
2486
3423
|
height: number;
|
|
2487
3424
|
};
|
|
2488
3425
|
}
|
|
2489
|
-
declare class ScrollViewer extends EventEmitter
|
|
3426
|
+
declare class ScrollViewer extends EventEmitter {
|
|
2490
3427
|
private container;
|
|
2491
3428
|
private target;
|
|
2492
3429
|
private zoom;
|
|
@@ -2521,22 +3458,179 @@ declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, st
|
|
|
2521
3458
|
/** 默认的组件树节点是否可展开的判断函数:当节点的子项中至少存在一个可见节点时认为可展开 */
|
|
2522
3459
|
declare const defaultIsExpandable: IsExpandableFunction;
|
|
2523
3460
|
//#endregion
|
|
3461
|
+
//#region temp/packages/editor/src/utils/indexed-db.d.ts
|
|
3462
|
+
/**
|
|
3463
|
+
* 一组极简的、基于原生 IndexedDB 的 Promise KV 工具,避免引入额外依赖。
|
|
3464
|
+
* 仅用于浏览器环境;在不支持 IndexedDB 的环境(如 SSR / 部分测试环境)下会 reject。
|
|
3465
|
+
*/
|
|
3466
|
+
/** 是否处于支持 IndexedDB 的环境。 */
|
|
3467
|
+
declare const isIndexedDBSupported: () => boolean;
|
|
3468
|
+
/**
|
|
3469
|
+
* 打开(必要时升级)数据库,确保目标 objectStore 存在后返回连接。
|
|
3470
|
+
*
|
|
3471
|
+
* 由于 objectStore 只能在 `onupgradeneeded` 内创建,这里先以当前版本打开,
|
|
3472
|
+
* 若发现 store 不存在则关闭连接、以更高版本重开来按需创建,兼容动态 storeName。
|
|
3473
|
+
*/
|
|
3474
|
+
declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
|
|
3475
|
+
/** 写入(覆盖)一条记录。value 通过结构化克隆存储,支持 Map / Set 等结构。 */
|
|
3476
|
+
declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
|
|
3477
|
+
/** 读取一条记录,不存在时返回 undefined。 */
|
|
3478
|
+
declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
|
|
3479
|
+
/** 删除一条记录。 */
|
|
3480
|
+
declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
|
|
3481
|
+
//#endregion
|
|
3482
|
+
//#region temp/packages/editor/src/utils/history.d.ts
|
|
3483
|
+
/**
|
|
3484
|
+
* 「回滚」生成的新 step 简短描述。代码块 / 数据源共用。
|
|
3485
|
+
* 二者逻辑一致,仅展示名取值字段不同(代码块取 `name`,数据源取 `title`),
|
|
3486
|
+
* 因此通过 `getLabel` 注入取值方式。
|
|
3487
|
+
*
|
|
3488
|
+
* @param id 关联的代码块 / 数据源 id
|
|
3489
|
+
* @param diff 单条变更 diff(缺省视为空)
|
|
3490
|
+
* @param getLabel 从快照取展示名
|
|
3491
|
+
*/
|
|
3492
|
+
declare const describeRevertStep: <T extends object>(id: Id, {
|
|
3493
|
+
oldSchema,
|
|
3494
|
+
newSchema,
|
|
3495
|
+
changeRecords
|
|
3496
|
+
}: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
|
|
3497
|
+
/**
|
|
3498
|
+
* 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
|
|
3499
|
+
*/
|
|
3500
|
+
declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
|
|
3501
|
+
/**
|
|
3502
|
+
* 构造一条代码块 / 数据源「按 id 分栈」的历史记录:两者除 payload 字段命名外完全一致。
|
|
3503
|
+
*
|
|
3504
|
+
* - `add`:oldValue = null;`remove`:newValue = null;`update`:两者都有,可带 changeRecords 做局部更新。
|
|
3505
|
+
* - 内容会做 cloneDeep 防止后续被外部引用篡改;opType 依据 old/new 是否为 null 推断。
|
|
3506
|
+
* - 仅负责构造 step 并返回,入栈与事件 emit 由统一的 history.push(stepType, step, id) 处理。
|
|
3507
|
+
* - 不直接驱动业务 service,调用方负责实际写回。
|
|
3508
|
+
*/
|
|
3509
|
+
declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
|
|
3510
|
+
oldValue: T | null;
|
|
3511
|
+
newValue: T | null;
|
|
3512
|
+
changeRecords?: ChangeRecord[]; /** 展示名(缺省时从快照 name / title 推断)。 */
|
|
3513
|
+
name?: string;
|
|
3514
|
+
}) => S | null;
|
|
3515
|
+
declare const markStackSaved: <S extends {
|
|
3516
|
+
saved?: boolean;
|
|
3517
|
+
}>(undoRedo?: UndoRedo<S>) => void;
|
|
3518
|
+
/**
|
|
3519
|
+
* 把单个历史栈(页面 / 代码块 / 数据源 / 扩展类型)的步骤列表按"目标"做相邻合并:
|
|
3520
|
+
* - 单实体的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group,组内可展开查看每步;
|
|
3521
|
+
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单实体修改组);
|
|
3522
|
+
* - 多实体 'update'(如页面批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
3523
|
+
*
|
|
3524
|
+
* 各类型行为完全一致,仅 `kind` 与 step 快照类型不同,统一由本方法处理。
|
|
3525
|
+
*/
|
|
3526
|
+
declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
|
|
3527
|
+
/**
|
|
3528
|
+
* 解析 step 中的"目标 id"用于合并:
|
|
3529
|
+
* - 单实体 update:取唯一一项 diff 的快照 id;快照无 id 时(如 CodeBlockContent)回退到 `step.data.id`
|
|
3530
|
+
* (即资源 id),使代码块 / 数据源同样能按资源合并相邻 update;
|
|
3531
|
+
* - 其它情形(多实体 update / add / remove):返回 undefined,表示不参与合并。
|
|
3532
|
+
*/
|
|
3533
|
+
declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
|
|
3534
|
+
/** 解析 step 中的目标可读名(用于 UI 展示)。 */
|
|
3535
|
+
declare const detectTargetName: (step: BaseStepValue) => string | undefined;
|
|
3536
|
+
/**
|
|
3537
|
+
* 把 `Record<Id, UndoRedo>` 整体序列化为 `Record<Id, SerializedUndoRedo>`。
|
|
3538
|
+
*
|
|
3539
|
+
* 序列化(深克隆)的同一趟里,只把每条 step 中可能含函数的 `diff` 用 serialize-javascript 序列化成字符串,
|
|
3540
|
+
* 其余字段(uuid / opType / timestamp / `modifiedNodeIds` Map 等)原样保留,交给 IndexedDB 结构化克隆。
|
|
3541
|
+
* 这样既能写入函数,又避免序列化整份快照的开销;读取时再由 {@link parseStacksStepDiff} 还原 diff。
|
|
3542
|
+
* 不含 `diff` 的元素(如通用栈)原样透传。
|
|
3543
|
+
*/
|
|
3544
|
+
declare const serializeStacks: <T extends {
|
|
3545
|
+
diff?: unknown;
|
|
3546
|
+
}>(stacks: Record<Id, UndoRedo<T>>) => Record<Id, SerializedUndoRedo<T>>;
|
|
3547
|
+
/**
|
|
3548
|
+
* 把 `Record<Id, SerializedUndoRedo>` 整体还原为 `Record<Id, UndoRedo>`。
|
|
3549
|
+
* 还原时把每个栈的游标定位到最近一条已保存(`saved === true`)记录之后。
|
|
3550
|
+
*
|
|
3551
|
+
* 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
|
|
3552
|
+
* 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
|
|
3553
|
+
*/
|
|
3554
|
+
declare const deserializeStacks: <T extends {
|
|
3555
|
+
saved?: boolean;
|
|
3556
|
+
}>(stacks?: Record<Id, ReturnType<UndoRedo<T>["serialize"]>>, parse?: (serialized: string) => unknown) => Record<Id, UndoRedo<T>>;
|
|
3557
|
+
/**
|
|
3558
|
+
* 按 id 从「按 id 分栈」的记录表(代码块 / 数据源)中获取(或创建)对应的 UndoRedo 栈。
|
|
3559
|
+
*/
|
|
3560
|
+
declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
|
|
3561
|
+
/**
|
|
3562
|
+
* 撤销下限:当栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
|
|
3563
|
+
* 适用于所有历史类型(page / codeBlock / dataSource / 扩展),把 cursor 钉在基线之上,
|
|
3564
|
+
* 保证 undo / canUndo / goto 都不会越过初始基线。
|
|
3565
|
+
*/
|
|
3566
|
+
declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
|
|
3567
|
+
/** 将单次 push 产生的 history uuid(或 null)转为 *AndGetHistoryId 返回用的 uuid 列表。 */
|
|
3568
|
+
declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
|
|
3569
|
+
//#endregion
|
|
2524
3570
|
//#region temp/packages/editor/src/utils/const.d.ts
|
|
2525
3571
|
/** 当uiService.get('uiSelectMode')为true,点击组件(包括任何形式,组件树/画布)时触发的事件名 */
|
|
2526
3572
|
declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
|
|
2527
3573
|
declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
2528
3574
|
declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
2529
3575
|
declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
2530
|
-
declare const DEFAULT_LEFT_COLUMN_WIDTH =
|
|
3576
|
+
declare const DEFAULT_LEFT_COLUMN_WIDTH = 345;
|
|
2531
3577
|
declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
2532
|
-
declare const MIN_LEFT_COLUMN_WIDTH =
|
|
3578
|
+
declare const MIN_LEFT_COLUMN_WIDTH = 345;
|
|
2533
3579
|
declare const MIN_CENTER_COLUMN_WIDTH = 400;
|
|
2534
3580
|
declare const MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
2535
3581
|
declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
2536
3582
|
declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
2537
3583
|
//#endregion
|
|
3584
|
+
//#region temp/packages/editor/src/utils/type-match-rules.d.ts
|
|
3585
|
+
declare const ALL_COND_OPS: Set<string>;
|
|
3586
|
+
declare const editorTypeMatchRules: Record<string, TypeMatchValidator>;
|
|
3587
|
+
//#endregion
|
|
3588
|
+
//#region temp/packages/editor/src/utils/event.d.ts
|
|
3589
|
+
declare const EVENT_NAME_VALUE_SEPARATOR = ".";
|
|
3590
|
+
type EventNameSelectOption = {
|
|
3591
|
+
text: string;
|
|
3592
|
+
value: string;
|
|
3593
|
+
};
|
|
3594
|
+
type EventNameOption = EventOption | CascaderOption | EventNameSelectOption;
|
|
3595
|
+
/** 与 EventSelect 中 checkStrictly 一致:component 为 false,其余为 true */
|
|
3596
|
+
declare const isEventNameCheckStrictly: (src?: string) => boolean;
|
|
3597
|
+
/** 将动作 method 值规范为与 collectEventNameOptionValues 一致的字符串(cascader 无 valueSeparator 时存数组) */
|
|
3598
|
+
declare const normalizeCompActionValue: (value: unknown) => string;
|
|
3599
|
+
/**
|
|
3600
|
+
* 组装事件名称下拉/级联 options,与 EventSelect 默认 eventNameConfig.options 逻辑一致。
|
|
3601
|
+
*/
|
|
3602
|
+
declare const getEventNameOptions: (src: string | undefined, formValue?: Record<string, any>) => EventNameOption[];
|
|
3603
|
+
/** 将 select / cascader options 展平为最终写入 name 的字符串集合(cascader 用 `.` 拼接) */
|
|
3604
|
+
declare const collectEventNameOptionValues: (options: EventNameOption[], checkStrictly: boolean, prefix?: any[], result?: Set<string>) => Set<string>;
|
|
3605
|
+
/**
|
|
3606
|
+
* 解析 event-select 允许的 name 集合。
|
|
3607
|
+
* 自定义 eventNameConfig.options 时返回 null(跳过枚举校验)。
|
|
3608
|
+
*/
|
|
3609
|
+
declare const getEventNameAllowedValues: (config?: {
|
|
3610
|
+
src?: string;
|
|
3611
|
+
eventNameConfig?: {
|
|
3612
|
+
options?: unknown;
|
|
3613
|
+
};
|
|
3614
|
+
}, formValue?: Record<string, any>) => Set<string> | null;
|
|
3615
|
+
/**
|
|
3616
|
+
* 组装联动组件动作下拉/级联 options,与 EventSelect 默认 compActionConfig.options 逻辑一致。
|
|
3617
|
+
*/
|
|
3618
|
+
declare const getCompActionOptions: (toId?: Id) => EventNameOption[];
|
|
3619
|
+
/**
|
|
3620
|
+
* 解析 event-select 联动组件动作允许的 method 集合。
|
|
3621
|
+
* 自定义 compActionConfig.options 时返回 null(跳过枚举校验)。
|
|
3622
|
+
*/
|
|
3623
|
+
declare const getCompActionAllowedValues: (config?: {
|
|
3624
|
+
src?: string;
|
|
3625
|
+
compActionConfig?: {
|
|
3626
|
+
options?: unknown;
|
|
3627
|
+
};
|
|
3628
|
+
}, model?: {
|
|
3629
|
+
to?: Id;
|
|
3630
|
+
}) => Set<string> | null;
|
|
3631
|
+
//#endregion
|
|
2538
3632
|
//#region temp/packages/editor/src/utils/monaco-editor.d.ts
|
|
2539
|
-
declare const _default$
|
|
3633
|
+
declare const _default$49: () => Promise<typeof import("monaco-editor")>;
|
|
2540
3634
|
//#endregion
|
|
2541
3635
|
//#region temp/packages/form/src/schema.d.ts
|
|
2542
3636
|
interface ChangeRecord$1 {
|
|
@@ -2567,6 +3661,9 @@ interface FormSlots {
|
|
|
2567
3661
|
//#endregion
|
|
2568
3662
|
//#region temp/packages/editor/src/editorProps.d.ts
|
|
2569
3663
|
interface EditorProps {
|
|
3664
|
+
/** 是否是大屏模拟器容器,大屏容器时,左侧属性面板会扩展为两列(正常3列),颜色表单不扩展两列等 */
|
|
3665
|
+
isLargeStageContainer?: boolean;
|
|
3666
|
+
theme?: string;
|
|
2570
3667
|
/** 页面初始值 */
|
|
2571
3668
|
modelValue?: MApp;
|
|
2572
3669
|
/** 左侧面板中的组件类型列表 */
|
|
@@ -2616,6 +3713,11 @@ interface EditorProps {
|
|
|
2616
3713
|
containerHighlightDuration?: number;
|
|
2617
3714
|
/** 拖入画布中容器时,识别容器的操作类型 */
|
|
2618
3715
|
containerHighlightType?: ContainerHighlightType;
|
|
3716
|
+
/**
|
|
3717
|
+
* 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
|
|
3718
|
+
* 开启后在画布中拖动已有组件不会识别容器,默认 false
|
|
3719
|
+
*/
|
|
3720
|
+
containerHighlightAddOnly?: boolean;
|
|
2619
3721
|
/** 画布大小 */
|
|
2620
3722
|
stageRect?: StageRect;
|
|
2621
3723
|
/** monaco editor 的配置 */
|
|
@@ -2635,8 +3737,15 @@ interface EditorProps {
|
|
|
2635
3737
|
alwaysMultiSelect?: boolean;
|
|
2636
3738
|
/** 禁用页面片 */
|
|
2637
3739
|
disabledPageFragment?: boolean;
|
|
3740
|
+
/** 禁用「非点击画布选中组件时(如从图层树、面包屑等外部选中),对选中区域做高亮闪烁提示」,默认 false(即默认开启闪烁) */
|
|
3741
|
+
disabledFlashTip?: boolean;
|
|
2638
3742
|
/** 禁用双击在浮层中单独编辑选中组件 */
|
|
2639
3743
|
disabledStageOverlay?: boolean;
|
|
3744
|
+
/**
|
|
3745
|
+
* 是否启用「属性配置表单校验」联动能力:开启后属性/样式表单校验失败时仍更新节点,
|
|
3746
|
+
* 并把错误信息集中记录到 editorService,用于组件树标红提示与保存拦截;默认 false(关闭)。
|
|
3747
|
+
*/
|
|
3748
|
+
enablePropsFormValidate?: boolean;
|
|
2640
3749
|
/** 禁用属性配置面板右下角显示源码的按钮 */
|
|
2641
3750
|
disabledShowSrc?: boolean;
|
|
2642
3751
|
/** 禁用数据源 */
|
|
@@ -2674,6 +3783,8 @@ interface EditorProps {
|
|
|
2674
3783
|
/** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
2675
3784
|
beforeLayerNodeDblclick?: (event: MouseEvent, data: TreeNodeData) => Promise<boolean | void> | boolean | void;
|
|
2676
3785
|
extendFormState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3786
|
+
/** 历史记录面板的自定义扩展 tab,追加在内置的页面/数据源/代码块 tab 之后 */
|
|
3787
|
+
historyListExtraTabs?: HistoryListExtraTab[];
|
|
2677
3788
|
/** 页面顺序拖拽配置参数 */
|
|
2678
3789
|
pageBarSortOptions?: PageBarSortOptions;
|
|
2679
3790
|
/** 页面搜索函数 */
|
|
@@ -2696,9 +3807,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2696
3807
|
readonly codeValueKey?: string | undefined;
|
|
2697
3808
|
readonly labelPosition?: string | undefined;
|
|
2698
3809
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
3810
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
2699
3811
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
2700
3812
|
readonly onUnmounted?: (() => any) | undefined;
|
|
2701
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
2702
3813
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
2703
3814
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
2704
3815
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -2712,7 +3823,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2712
3823
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
2713
3824
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
2714
3825
|
$host: Element | null;
|
|
2715
|
-
$emit: ((event: "
|
|
3826
|
+
$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);
|
|
2716
3827
|
$el: any;
|
|
2717
3828
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
2718
3829
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -2723,9 +3834,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2723
3834
|
labelPosition?: string;
|
|
2724
3835
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2725
3836
|
}> & Readonly<{
|
|
3837
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
2726
3838
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
2727
3839
|
onUnmounted?: (() => any) | undefined;
|
|
2728
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
2729
3840
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
2730
3841
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
2731
3842
|
}>, {
|
|
@@ -2739,6 +3850,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2739
3850
|
readonly isCompare?: boolean | undefined;
|
|
2740
3851
|
readonly parentValues?: Record<string, any> | undefined;
|
|
2741
3852
|
readonly labelWidth?: string | undefined;
|
|
3853
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
3854
|
+
readonly validateOnInit?: boolean | undefined;
|
|
2742
3855
|
readonly disabled?: boolean | undefined;
|
|
2743
3856
|
readonly height?: string | undefined;
|
|
2744
3857
|
readonly stepActive?: string | number | undefined;
|
|
@@ -2748,6 +3861,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2748
3861
|
readonly keyProp?: string | undefined;
|
|
2749
3862
|
readonly popperClass?: string | undefined;
|
|
2750
3863
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
3864
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
2751
3865
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
2752
3866
|
readonly showDiff?: ((_data: {
|
|
2753
3867
|
curValue: any;
|
|
@@ -2755,6 +3869,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2755
3869
|
config: any;
|
|
2756
3870
|
}) => boolean) | undefined;
|
|
2757
3871
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
3872
|
+
readonly theme?: string | undefined;
|
|
2758
3873
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
2759
3874
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
2760
3875
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2780,6 +3895,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2780
3895
|
isCompare?: boolean;
|
|
2781
3896
|
parentValues?: Record<string, any>;
|
|
2782
3897
|
labelWidth?: string;
|
|
3898
|
+
typeMatchValid?: boolean;
|
|
3899
|
+
validateOnInit?: boolean;
|
|
2783
3900
|
disabled?: boolean;
|
|
2784
3901
|
height?: string;
|
|
2785
3902
|
stepActive?: string | number;
|
|
@@ -2789,6 +3906,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2789
3906
|
keyProp?: string;
|
|
2790
3907
|
popperClass?: string;
|
|
2791
3908
|
preventSubmitDefault?: boolean;
|
|
3909
|
+
useFieldTextInError?: boolean;
|
|
2792
3910
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2793
3911
|
showDiff?: (_data: {
|
|
2794
3912
|
curValue: any;
|
|
@@ -2796,6 +3914,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2796
3914
|
config: any;
|
|
2797
3915
|
}) => boolean;
|
|
2798
3916
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
3917
|
+
theme?: string;
|
|
2799
3918
|
}> & Readonly<{
|
|
2800
3919
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2801
3920
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2811,6 +3930,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2811
3930
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
2812
3931
|
resetForm: () => void;
|
|
2813
3932
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3933
|
+
validate: () => Promise<string>;
|
|
2814
3934
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
2815
3935
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
2816
3936
|
error: (...args: any[]) => void;
|
|
@@ -2831,6 +3951,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2831
3951
|
keyProp: string;
|
|
2832
3952
|
parentValues: Record<string, any>;
|
|
2833
3953
|
stepActive: string | number;
|
|
3954
|
+
validateOnInit: boolean;
|
|
3955
|
+
useFieldTextInError: boolean;
|
|
2834
3956
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
2835
3957
|
beforeCreate?: (() => void) | (() => void)[];
|
|
2836
3958
|
created?: (() => void) | (() => void)[];
|
|
@@ -2864,6 +3986,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2864
3986
|
keyProp: string;
|
|
2865
3987
|
parentValues: Record<string, any>;
|
|
2866
3988
|
stepActive: string | number;
|
|
3989
|
+
validateOnInit: boolean;
|
|
3990
|
+
useFieldTextInError: boolean;
|
|
2867
3991
|
}> & Omit<Readonly<{
|
|
2868
3992
|
config: import("@tmagic/form-schema").FormConfig;
|
|
2869
3993
|
initValues: Record<string, any>;
|
|
@@ -2871,6 +3995,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2871
3995
|
isCompare?: boolean;
|
|
2872
3996
|
parentValues?: Record<string, any>;
|
|
2873
3997
|
labelWidth?: string;
|
|
3998
|
+
typeMatchValid?: boolean;
|
|
3999
|
+
validateOnInit?: boolean;
|
|
2874
4000
|
disabled?: boolean;
|
|
2875
4001
|
height?: string;
|
|
2876
4002
|
stepActive?: string | number;
|
|
@@ -2880,6 +4006,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2880
4006
|
keyProp?: string;
|
|
2881
4007
|
popperClass?: string;
|
|
2882
4008
|
preventSubmitDefault?: boolean;
|
|
4009
|
+
useFieldTextInError?: boolean;
|
|
2883
4010
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2884
4011
|
showDiff?: (_data: {
|
|
2885
4012
|
curValue: any;
|
|
@@ -2887,13 +4014,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2887
4014
|
config: any;
|
|
2888
4015
|
}) => boolean;
|
|
2889
4016
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4017
|
+
theme?: string;
|
|
2890
4018
|
}> & Readonly<{
|
|
2891
4019
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2892
4020
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
2893
4021
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
2894
4022
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2895
4023
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2896
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
4024
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
2897
4025
|
values: import("@tmagic/form-schema").FormValue;
|
|
2898
4026
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
2899
4027
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -2902,15 +4030,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2902
4030
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
2903
4031
|
resetForm: () => void;
|
|
2904
4032
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4033
|
+
validate: () => Promise<string>;
|
|
2905
4034
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
2906
4035
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
2907
4036
|
$slots: FormSlots;
|
|
2908
4037
|
}) | null>>;
|
|
2909
4038
|
submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
|
|
2910
4039
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4040
|
+
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
|
|
2911
4041
|
mounted: (internalInstance: any) => any;
|
|
2912
4042
|
unmounted: () => any;
|
|
2913
|
-
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
|
|
2914
4043
|
"submit-error": (e: any) => any;
|
|
2915
4044
|
"form-error": (e: any) => any;
|
|
2916
4045
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -2942,9 +4071,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2942
4071
|
labelPosition?: string;
|
|
2943
4072
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2944
4073
|
}> & Readonly<{
|
|
4074
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
2945
4075
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
2946
4076
|
onUnmounted?: (() => any) | undefined;
|
|
2947
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
2948
4077
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
2949
4078
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
2950
4079
|
}>, "submit" | "configForm"> & {
|
|
@@ -2958,6 +4087,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2958
4087
|
readonly isCompare?: boolean | undefined;
|
|
2959
4088
|
readonly parentValues?: Record<string, any> | undefined;
|
|
2960
4089
|
readonly labelWidth?: string | undefined;
|
|
4090
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
4091
|
+
readonly validateOnInit?: boolean | undefined;
|
|
2961
4092
|
readonly disabled?: boolean | undefined;
|
|
2962
4093
|
readonly height?: string | undefined;
|
|
2963
4094
|
readonly stepActive?: string | number | undefined;
|
|
@@ -2967,6 +4098,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2967
4098
|
readonly keyProp?: string | undefined;
|
|
2968
4099
|
readonly popperClass?: string | undefined;
|
|
2969
4100
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4101
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
2970
4102
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
2971
4103
|
readonly showDiff?: ((_data: {
|
|
2972
4104
|
curValue: any;
|
|
@@ -2974,6 +4106,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2974
4106
|
config: any;
|
|
2975
4107
|
}) => boolean) | undefined;
|
|
2976
4108
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
4109
|
+
readonly theme?: string | undefined;
|
|
2977
4110
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
2978
4111
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
2979
4112
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2999,6 +4132,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
2999
4132
|
isCompare?: boolean;
|
|
3000
4133
|
parentValues?: Record<string, any>;
|
|
3001
4134
|
labelWidth?: string;
|
|
4135
|
+
typeMatchValid?: boolean;
|
|
4136
|
+
validateOnInit?: boolean;
|
|
3002
4137
|
disabled?: boolean;
|
|
3003
4138
|
height?: string;
|
|
3004
4139
|
stepActive?: string | number;
|
|
@@ -3008,6 +4143,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3008
4143
|
keyProp?: string;
|
|
3009
4144
|
popperClass?: string;
|
|
3010
4145
|
preventSubmitDefault?: boolean;
|
|
4146
|
+
useFieldTextInError?: boolean;
|
|
3011
4147
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3012
4148
|
showDiff?: (_data: {
|
|
3013
4149
|
curValue: any;
|
|
@@ -3015,6 +4151,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3015
4151
|
config: any;
|
|
3016
4152
|
}) => boolean;
|
|
3017
4153
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4154
|
+
theme?: string;
|
|
3018
4155
|
}> & Readonly<{
|
|
3019
4156
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3020
4157
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3030,6 +4167,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3030
4167
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3031
4168
|
resetForm: () => void;
|
|
3032
4169
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4170
|
+
validate: () => Promise<string>;
|
|
3033
4171
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3034
4172
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3035
4173
|
error: (...args: any[]) => void;
|
|
@@ -3050,6 +4188,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3050
4188
|
keyProp: string;
|
|
3051
4189
|
parentValues: Record<string, any>;
|
|
3052
4190
|
stepActive: string | number;
|
|
4191
|
+
validateOnInit: boolean;
|
|
4192
|
+
useFieldTextInError: boolean;
|
|
3053
4193
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3054
4194
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3055
4195
|
created?: (() => void) | (() => void)[];
|
|
@@ -3083,6 +4223,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3083
4223
|
keyProp: string;
|
|
3084
4224
|
parentValues: Record<string, any>;
|
|
3085
4225
|
stepActive: string | number;
|
|
4226
|
+
validateOnInit: boolean;
|
|
4227
|
+
useFieldTextInError: boolean;
|
|
3086
4228
|
}> & Omit<Readonly<{
|
|
3087
4229
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3088
4230
|
initValues: Record<string, any>;
|
|
@@ -3090,6 +4232,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3090
4232
|
isCompare?: boolean;
|
|
3091
4233
|
parentValues?: Record<string, any>;
|
|
3092
4234
|
labelWidth?: string;
|
|
4235
|
+
typeMatchValid?: boolean;
|
|
4236
|
+
validateOnInit?: boolean;
|
|
3093
4237
|
disabled?: boolean;
|
|
3094
4238
|
height?: string;
|
|
3095
4239
|
stepActive?: string | number;
|
|
@@ -3099,6 +4243,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3099
4243
|
keyProp?: string;
|
|
3100
4244
|
popperClass?: string;
|
|
3101
4245
|
preventSubmitDefault?: boolean;
|
|
4246
|
+
useFieldTextInError?: boolean;
|
|
3102
4247
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3103
4248
|
showDiff?: (_data: {
|
|
3104
4249
|
curValue: any;
|
|
@@ -3106,13 +4251,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3106
4251
|
config: any;
|
|
3107
4252
|
}) => boolean;
|
|
3108
4253
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4254
|
+
theme?: string;
|
|
3109
4255
|
}> & Readonly<{
|
|
3110
4256
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3111
4257
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3112
4258
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
3113
4259
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3114
4260
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3115
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
4261
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
3116
4262
|
values: import("@tmagic/form-schema").FormValue;
|
|
3117
4263
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
3118
4264
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -3121,6 +4267,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3121
4267
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3122
4268
|
resetForm: () => void;
|
|
3123
4269
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4270
|
+
validate: () => Promise<string>;
|
|
3124
4271
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3125
4272
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
3126
4273
|
$slots: FormSlots;
|
|
@@ -3148,9 +4295,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3148
4295
|
readonly codeValueKey?: string | undefined;
|
|
3149
4296
|
readonly labelPosition?: string | undefined;
|
|
3150
4297
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4298
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3151
4299
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3152
4300
|
readonly onUnmounted?: (() => any) | undefined;
|
|
3153
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3154
4301
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3155
4302
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
3156
4303
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -3164,7 +4311,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3164
4311
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3165
4312
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3166
4313
|
$host: Element | null;
|
|
3167
|
-
$emit: ((event: "
|
|
4314
|
+
$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);
|
|
3168
4315
|
$el: any;
|
|
3169
4316
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
3170
4317
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -3175,9 +4322,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3175
4322
|
labelPosition?: string;
|
|
3176
4323
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3177
4324
|
}> & Readonly<{
|
|
4325
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3178
4326
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3179
4327
|
onUnmounted?: (() => any) | undefined;
|
|
3180
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3181
4328
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3182
4329
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3183
4330
|
}>, {
|
|
@@ -3191,6 +4338,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3191
4338
|
readonly isCompare?: boolean | undefined;
|
|
3192
4339
|
readonly parentValues?: Record<string, any> | undefined;
|
|
3193
4340
|
readonly labelWidth?: string | undefined;
|
|
4341
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
4342
|
+
readonly validateOnInit?: boolean | undefined;
|
|
3194
4343
|
readonly disabled?: boolean | undefined;
|
|
3195
4344
|
readonly height?: string | undefined;
|
|
3196
4345
|
readonly stepActive?: string | number | undefined;
|
|
@@ -3200,6 +4349,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3200
4349
|
readonly keyProp?: string | undefined;
|
|
3201
4350
|
readonly popperClass?: string | undefined;
|
|
3202
4351
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4352
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
3203
4353
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
3204
4354
|
readonly showDiff?: ((_data: {
|
|
3205
4355
|
curValue: any;
|
|
@@ -3207,6 +4357,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3207
4357
|
config: any;
|
|
3208
4358
|
}) => boolean) | undefined;
|
|
3209
4359
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
4360
|
+
readonly theme?: string | undefined;
|
|
3210
4361
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
3211
4362
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
3212
4363
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3232,6 +4383,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3232
4383
|
isCompare?: boolean;
|
|
3233
4384
|
parentValues?: Record<string, any>;
|
|
3234
4385
|
labelWidth?: string;
|
|
4386
|
+
typeMatchValid?: boolean;
|
|
4387
|
+
validateOnInit?: boolean;
|
|
3235
4388
|
disabled?: boolean;
|
|
3236
4389
|
height?: string;
|
|
3237
4390
|
stepActive?: string | number;
|
|
@@ -3241,6 +4394,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3241
4394
|
keyProp?: string;
|
|
3242
4395
|
popperClass?: string;
|
|
3243
4396
|
preventSubmitDefault?: boolean;
|
|
4397
|
+
useFieldTextInError?: boolean;
|
|
3244
4398
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3245
4399
|
showDiff?: (_data: {
|
|
3246
4400
|
curValue: any;
|
|
@@ -3248,6 +4402,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3248
4402
|
config: any;
|
|
3249
4403
|
}) => boolean;
|
|
3250
4404
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4405
|
+
theme?: string;
|
|
3251
4406
|
}> & Readonly<{
|
|
3252
4407
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3253
4408
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3263,6 +4418,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3263
4418
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3264
4419
|
resetForm: () => void;
|
|
3265
4420
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4421
|
+
validate: () => Promise<string>;
|
|
3266
4422
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3267
4423
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3268
4424
|
error: (...args: any[]) => void;
|
|
@@ -3283,6 +4439,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3283
4439
|
keyProp: string;
|
|
3284
4440
|
parentValues: Record<string, any>;
|
|
3285
4441
|
stepActive: string | number;
|
|
4442
|
+
validateOnInit: boolean;
|
|
4443
|
+
useFieldTextInError: boolean;
|
|
3286
4444
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3287
4445
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3288
4446
|
created?: (() => void) | (() => void)[];
|
|
@@ -3316,6 +4474,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3316
4474
|
keyProp: string;
|
|
3317
4475
|
parentValues: Record<string, any>;
|
|
3318
4476
|
stepActive: string | number;
|
|
4477
|
+
validateOnInit: boolean;
|
|
4478
|
+
useFieldTextInError: boolean;
|
|
3319
4479
|
}> & Omit<Readonly<{
|
|
3320
4480
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3321
4481
|
initValues: Record<string, any>;
|
|
@@ -3323,6 +4483,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3323
4483
|
isCompare?: boolean;
|
|
3324
4484
|
parentValues?: Record<string, any>;
|
|
3325
4485
|
labelWidth?: string;
|
|
4486
|
+
typeMatchValid?: boolean;
|
|
4487
|
+
validateOnInit?: boolean;
|
|
3326
4488
|
disabled?: boolean;
|
|
3327
4489
|
height?: string;
|
|
3328
4490
|
stepActive?: string | number;
|
|
@@ -3332,6 +4494,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3332
4494
|
keyProp?: string;
|
|
3333
4495
|
popperClass?: string;
|
|
3334
4496
|
preventSubmitDefault?: boolean;
|
|
4497
|
+
useFieldTextInError?: boolean;
|
|
3335
4498
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3336
4499
|
showDiff?: (_data: {
|
|
3337
4500
|
curValue: any;
|
|
@@ -3339,13 +4502,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3339
4502
|
config: any;
|
|
3340
4503
|
}) => boolean;
|
|
3341
4504
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4505
|
+
theme?: string;
|
|
3342
4506
|
}> & Readonly<{
|
|
3343
4507
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3344
4508
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3345
4509
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
3346
4510
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3347
4511
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3348
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
4512
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
3349
4513
|
values: import("@tmagic/form-schema").FormValue;
|
|
3350
4514
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
3351
4515
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -3354,15 +4518,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3354
4518
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3355
4519
|
resetForm: () => void;
|
|
3356
4520
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4521
|
+
validate: () => Promise<string>;
|
|
3357
4522
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3358
4523
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
3359
4524
|
$slots: FormSlots;
|
|
3360
4525
|
}) | null>>;
|
|
3361
4526
|
submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
|
|
3362
4527
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4528
|
+
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
|
|
3363
4529
|
mounted: (internalInstance: any) => any;
|
|
3364
4530
|
unmounted: () => any;
|
|
3365
|
-
submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
|
|
3366
4531
|
"submit-error": (e: any) => any;
|
|
3367
4532
|
"form-error": (e: any) => any;
|
|
3368
4533
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -3394,9 +4559,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3394
4559
|
labelPosition?: string;
|
|
3395
4560
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3396
4561
|
}> & Readonly<{
|
|
4562
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
|
|
3397
4563
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3398
4564
|
onUnmounted?: (() => any) | undefined;
|
|
3399
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
|
|
3400
4565
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3401
4566
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3402
4567
|
}>, "submit" | "configForm"> & {
|
|
@@ -3410,6 +4575,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3410
4575
|
readonly isCompare?: boolean | undefined;
|
|
3411
4576
|
readonly parentValues?: Record<string, any> | undefined;
|
|
3412
4577
|
readonly labelWidth?: string | undefined;
|
|
4578
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
4579
|
+
readonly validateOnInit?: boolean | undefined;
|
|
3413
4580
|
readonly disabled?: boolean | undefined;
|
|
3414
4581
|
readonly height?: string | undefined;
|
|
3415
4582
|
readonly stepActive?: string | number | undefined;
|
|
@@ -3419,6 +4586,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3419
4586
|
readonly keyProp?: string | undefined;
|
|
3420
4587
|
readonly popperClass?: string | undefined;
|
|
3421
4588
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
4589
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
3422
4590
|
readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
3423
4591
|
readonly showDiff?: ((_data: {
|
|
3424
4592
|
curValue: any;
|
|
@@ -3426,6 +4594,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3426
4594
|
config: any;
|
|
3427
4595
|
}) => boolean) | undefined;
|
|
3428
4596
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
4597
|
+
readonly theme?: string | undefined;
|
|
3429
4598
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
3430
4599
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
3431
4600
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3451,6 +4620,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3451
4620
|
isCompare?: boolean;
|
|
3452
4621
|
parentValues?: Record<string, any>;
|
|
3453
4622
|
labelWidth?: string;
|
|
4623
|
+
typeMatchValid?: boolean;
|
|
4624
|
+
validateOnInit?: boolean;
|
|
3454
4625
|
disabled?: boolean;
|
|
3455
4626
|
height?: string;
|
|
3456
4627
|
stepActive?: string | number;
|
|
@@ -3460,6 +4631,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3460
4631
|
keyProp?: string;
|
|
3461
4632
|
popperClass?: string;
|
|
3462
4633
|
preventSubmitDefault?: boolean;
|
|
4634
|
+
useFieldTextInError?: boolean;
|
|
3463
4635
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3464
4636
|
showDiff?: (_data: {
|
|
3465
4637
|
curValue: any;
|
|
@@ -3467,6 +4639,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3467
4639
|
config: any;
|
|
3468
4640
|
}) => boolean;
|
|
3469
4641
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4642
|
+
theme?: string;
|
|
3470
4643
|
}> & Readonly<{
|
|
3471
4644
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3472
4645
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3482,6 +4655,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3482
4655
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3483
4656
|
resetForm: () => void;
|
|
3484
4657
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4658
|
+
validate: () => Promise<string>;
|
|
3485
4659
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3486
4660
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3487
4661
|
error: (...args: any[]) => void;
|
|
@@ -3502,6 +4676,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3502
4676
|
keyProp: string;
|
|
3503
4677
|
parentValues: Record<string, any>;
|
|
3504
4678
|
stepActive: string | number;
|
|
4679
|
+
validateOnInit: boolean;
|
|
4680
|
+
useFieldTextInError: boolean;
|
|
3505
4681
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
3506
4682
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3507
4683
|
created?: (() => void) | (() => void)[];
|
|
@@ -3535,6 +4711,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3535
4711
|
keyProp: string;
|
|
3536
4712
|
parentValues: Record<string, any>;
|
|
3537
4713
|
stepActive: string | number;
|
|
4714
|
+
validateOnInit: boolean;
|
|
4715
|
+
useFieldTextInError: boolean;
|
|
3538
4716
|
}> & Omit<Readonly<{
|
|
3539
4717
|
config: import("@tmagic/form-schema").FormConfig;
|
|
3540
4718
|
initValues: Record<string, any>;
|
|
@@ -3542,6 +4720,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3542
4720
|
isCompare?: boolean;
|
|
3543
4721
|
parentValues?: Record<string, any>;
|
|
3544
4722
|
labelWidth?: string;
|
|
4723
|
+
typeMatchValid?: boolean;
|
|
4724
|
+
validateOnInit?: boolean;
|
|
3545
4725
|
disabled?: boolean;
|
|
3546
4726
|
height?: string;
|
|
3547
4727
|
stepActive?: string | number;
|
|
@@ -3551,6 +4731,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3551
4731
|
keyProp?: string;
|
|
3552
4732
|
popperClass?: string;
|
|
3553
4733
|
preventSubmitDefault?: boolean;
|
|
4734
|
+
useFieldTextInError?: boolean;
|
|
3554
4735
|
extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3555
4736
|
showDiff?: (_data: {
|
|
3556
4737
|
curValue: any;
|
|
@@ -3558,13 +4739,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3558
4739
|
config: any;
|
|
3559
4740
|
}) => boolean;
|
|
3560
4741
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
4742
|
+
theme?: string;
|
|
3561
4743
|
}> & Readonly<{
|
|
3562
4744
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3563
4745
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3564
4746
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
3565
4747
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3566
4748
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3567
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
4749
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
3568
4750
|
values: import("@tmagic/form-schema").FormValue;
|
|
3569
4751
|
lastValuesProcessed: import("@tmagic/form-schema").FormValue;
|
|
3570
4752
|
formState: import("@tmagic/form-schema").FormState;
|
|
@@ -3573,6 +4755,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3573
4755
|
changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
|
|
3574
4756
|
resetForm: () => void;
|
|
3575
4757
|
submitForm: (native?: boolean) => Promise<any>;
|
|
4758
|
+
validate: () => Promise<string>;
|
|
3576
4759
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
3577
4760
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
3578
4761
|
$slots: FormSlots;
|
|
@@ -3596,7 +4779,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3596
4779
|
disabledCodeBlock: boolean;
|
|
3597
4780
|
disabledMultiSelect: boolean;
|
|
3598
4781
|
alwaysMultiSelect: boolean;
|
|
4782
|
+
disabledFlashTip: boolean;
|
|
3599
4783
|
disabledPageFragment: boolean;
|
|
4784
|
+
historyListExtraTabs: HistoryListExtraTab[];
|
|
3600
4785
|
disabledShowSrc: boolean;
|
|
3601
4786
|
customContentMenu: CustomContentMenuFunction;
|
|
3602
4787
|
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
@@ -3616,10 +4801,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3616
4801
|
datasourceConfigs: Record<string, import("@tmagic/form-schema").FormConfig>;
|
|
3617
4802
|
containerHighlightDuration: number;
|
|
3618
4803
|
containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
|
|
4804
|
+
containerHighlightAddOnly: boolean;
|
|
3619
4805
|
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
3620
4806
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3621
|
-
declare const __VLS_export$
|
|
3622
|
-
declare const _default$
|
|
4807
|
+
declare const __VLS_export$39: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
|
|
4808
|
+
declare const _default$35: typeof __VLS_export$39;
|
|
3623
4809
|
type __VLS_WithSlots$12<T, S> = T & {
|
|
3624
4810
|
new (): {
|
|
3625
4811
|
$slots: S;
|
|
@@ -3627,7 +4813,7 @@ type __VLS_WithSlots$12<T, S> = T & {
|
|
|
3627
4813
|
};
|
|
3628
4814
|
//#endregion
|
|
3629
4815
|
//#region temp/packages/editor/src/layouts/CodeEditor.vue.d.ts
|
|
3630
|
-
type __VLS_Props$
|
|
4816
|
+
type __VLS_Props$34 = {
|
|
3631
4817
|
initValues?: any;
|
|
3632
4818
|
modifiedValues?: any;
|
|
3633
4819
|
type?: 'diff';
|
|
@@ -3643,7 +4829,7 @@ type __VLS_Props$31 = {
|
|
|
3643
4829
|
};
|
|
3644
4830
|
editorCustomType?: string;
|
|
3645
4831
|
};
|
|
3646
|
-
declare const __VLS_export$
|
|
4832
|
+
declare const __VLS_export$38: import("@vue/runtime-core").DefineComponent<__VLS_Props$34, {
|
|
3647
4833
|
values: import("@vue/reactivity").Ref<string, string>;
|
|
3648
4834
|
getEditor(): Monaco.editor.IStandaloneCodeEditor | Monaco.editor.IStandaloneDiffEditor | null;
|
|
3649
4835
|
getVsEditor(): Monaco.editor.IStandaloneCodeEditor | null;
|
|
@@ -3654,7 +4840,7 @@ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
3654
4840
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3655
4841
|
save: (...args: any[]) => void;
|
|
3656
4842
|
initd: (...args: any[]) => void;
|
|
3657
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4843
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$34> & Readonly<{
|
|
3658
4844
|
onSave?: ((...args: any[]) => any) | undefined;
|
|
3659
4845
|
onInitd?: ((...args: any[]) => any) | undefined;
|
|
3660
4846
|
}>, {
|
|
@@ -3665,13 +4851,13 @@ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
3665
4851
|
autoSave: boolean;
|
|
3666
4852
|
disabledFullScreen: boolean;
|
|
3667
4853
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3668
|
-
declare const _default$
|
|
4854
|
+
declare const _default$34: typeof __VLS_export$38;
|
|
3669
4855
|
//#endregion
|
|
3670
4856
|
//#region temp/packages/editor/src/layouts/sidebar/ComponentListPanel.vue.d.ts
|
|
3671
4857
|
type __VLS_Slots$11 = ComponentListPanelSlots;
|
|
3672
4858
|
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>;
|
|
3673
|
-
declare const __VLS_export$
|
|
3674
|
-
declare const _default$6: typeof __VLS_export$
|
|
4859
|
+
declare const __VLS_export$37: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
|
|
4860
|
+
declare const _default$6: typeof __VLS_export$37;
|
|
3675
4861
|
type __VLS_WithSlots$11<T, S> = T & {
|
|
3676
4862
|
new (): {
|
|
3677
4863
|
$slots: S;
|
|
@@ -3680,7 +4866,7 @@ type __VLS_WithSlots$11<T, S> = T & {
|
|
|
3680
4866
|
//#endregion
|
|
3681
4867
|
//#region temp/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue.d.ts
|
|
3682
4868
|
type __VLS_Slots$10 = LayerPanelSlots;
|
|
3683
|
-
type __VLS_Props$
|
|
4869
|
+
type __VLS_Props$33 = {
|
|
3684
4870
|
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
3685
4871
|
indent?: number;
|
|
3686
4872
|
nextLevelIndentIncrement?: number;
|
|
@@ -3689,165 +4875,170 @@ type __VLS_Props$30 = {
|
|
|
3689
4875
|
canDropIn?: CanDropInFunction; /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
3690
4876
|
beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
|
|
3691
4877
|
};
|
|
3692
|
-
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4878
|
+
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$33, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3693
4879
|
"node-dblclick": (event: MouseEvent, data: TreeNodeData) => any;
|
|
3694
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4880
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$33> & Readonly<{
|
|
3695
4881
|
"onNode-dblclick"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
3696
4882
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3697
|
-
declare const __VLS_export$
|
|
3698
|
-
declare const _default$
|
|
4883
|
+
declare const __VLS_export$36: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
|
|
4884
|
+
declare const _default$27: typeof __VLS_export$36;
|
|
3699
4885
|
type __VLS_WithSlots$10<T, S> = T & {
|
|
3700
4886
|
new (): {
|
|
3701
4887
|
$slots: S;
|
|
3702
4888
|
};
|
|
3703
4889
|
};
|
|
3704
4890
|
//#endregion
|
|
4891
|
+
//#region temp/packages/editor/src/layouts/sidebar/layer/LayerNodeContent.vue.d.ts
|
|
4892
|
+
type __VLS_Props$32 = {
|
|
4893
|
+
data: TreeNodeData;
|
|
4894
|
+
};
|
|
4895
|
+
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>;
|
|
4896
|
+
declare const _default$26: typeof __VLS_export$35;
|
|
4897
|
+
//#endregion
|
|
3705
4898
|
//#region temp/packages/editor/src/fields/CodeSelect.vue.d.ts
|
|
3706
|
-
type __VLS_Props$
|
|
3707
|
-
declare const __VLS_export$
|
|
4899
|
+
type __VLS_Props$31 = FieldProps<CodeSelectConfig>;
|
|
4900
|
+
declare const __VLS_export$34: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3708
4901
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
3709
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4902
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
|
|
3710
4903
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
3711
4904
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3712
|
-
declare const _default$3: typeof __VLS_export$
|
|
4905
|
+
declare const _default$3: typeof __VLS_export$34;
|
|
3713
4906
|
//#endregion
|
|
3714
4907
|
//#region temp/packages/editor/src/fields/CodeSelectCol.vue.d.ts
|
|
3715
|
-
type __VLS_Props$
|
|
3716
|
-
declare const __VLS_export$
|
|
4908
|
+
type __VLS_Props$30 = FieldProps<CodeSelectColConfig>;
|
|
4909
|
+
declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3717
4910
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
3718
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4911
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
|
|
3719
4912
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
3720
4913
|
}>, {
|
|
3721
4914
|
disabled: boolean;
|
|
3722
4915
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3723
|
-
declare const _default$4: typeof __VLS_export$
|
|
4916
|
+
declare const _default$4: typeof __VLS_export$33;
|
|
3724
4917
|
//#endregion
|
|
3725
4918
|
//#region temp/packages/editor/src/fields/DataSourceFields.vue.d.ts
|
|
3726
|
-
type __VLS_Props$
|
|
4919
|
+
type __VLS_Props$29 = FieldProps<DataSourceFieldsConfig>;
|
|
3727
4920
|
type __VLS_ModelProps$4 = {
|
|
3728
4921
|
'width'?: number;
|
|
3729
4922
|
'visible'?: boolean;
|
|
3730
4923
|
'visible1'?: boolean;
|
|
3731
4924
|
};
|
|
3732
|
-
type __VLS_PublicProps$4 = __VLS_Props$
|
|
3733
|
-
declare const __VLS_export$
|
|
4925
|
+
type __VLS_PublicProps$4 = __VLS_Props$29 & __VLS_ModelProps$4;
|
|
4926
|
+
declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3734
4927
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
3735
|
-
"update:width": (value: number) => any;
|
|
3736
4928
|
"update:visible": (value: boolean) => any;
|
|
4929
|
+
"update:width": (value: number) => any;
|
|
3737
4930
|
"update:visible1": (value: boolean) => any;
|
|
3738
4931
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$4> & Readonly<{
|
|
3739
4932
|
onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3740
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3741
4933
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4934
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3742
4935
|
"onUpdate:visible1"?: ((value: boolean) => any) | undefined;
|
|
3743
4936
|
}>, {
|
|
3744
4937
|
disabled: boolean;
|
|
3745
4938
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3746
|
-
declare const _default$12: typeof __VLS_export$
|
|
4939
|
+
declare const _default$12: typeof __VLS_export$32;
|
|
3747
4940
|
//#endregion
|
|
3748
4941
|
//#region temp/packages/editor/src/fields/DataSourceMocks.vue.d.ts
|
|
3749
|
-
type __VLS_Props$
|
|
4942
|
+
type __VLS_Props$28 = FieldProps<DataSourceMocksConfig>;
|
|
3750
4943
|
type __VLS_ModelProps$3 = {
|
|
3751
4944
|
'width'?: number;
|
|
3752
4945
|
'visible'?: boolean;
|
|
3753
4946
|
};
|
|
3754
|
-
type __VLS_PublicProps$3 = __VLS_Props$
|
|
3755
|
-
declare const __VLS_export$
|
|
3756
|
-
|
|
3757
|
-
"update:width": (value: number) =>
|
|
3758
|
-
"update:visible": (value: boolean) => void;
|
|
4947
|
+
type __VLS_PublicProps$3 = __VLS_Props$28 & __VLS_ModelProps$3;
|
|
4948
|
+
declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4949
|
+
"update:visible": (value: boolean) => any;
|
|
4950
|
+
"update:width": (value: number) => any;
|
|
3759
4951
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$3> & Readonly<{
|
|
3760
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3761
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3762
4952
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4953
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3763
4954
|
}>, {
|
|
3764
4955
|
disabled: boolean;
|
|
3765
4956
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3766
|
-
declare const _default$16: typeof __VLS_export$
|
|
4957
|
+
declare const _default$16: typeof __VLS_export$31;
|
|
3767
4958
|
//#endregion
|
|
3768
4959
|
//#region temp/packages/editor/src/fields/DataSourceMethods.vue.d.ts
|
|
3769
|
-
type __VLS_Props$
|
|
3770
|
-
declare const __VLS_export$
|
|
4960
|
+
type __VLS_Props$27 = FieldProps<DataSourceMethodsConfig>;
|
|
4961
|
+
declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3771
4962
|
change: (...args: any[]) => void;
|
|
3772
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4963
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$27> & Readonly<{
|
|
3773
4964
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3774
4965
|
}>, {
|
|
3775
4966
|
disabled: boolean;
|
|
3776
4967
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3777
|
-
declare const _default$15: typeof __VLS_export$
|
|
4968
|
+
declare const _default$15: typeof __VLS_export$30;
|
|
3778
4969
|
//#endregion
|
|
3779
4970
|
//#region temp/packages/editor/src/fields/DataSourceInput.vue.d.ts
|
|
3780
|
-
type __VLS_Props$
|
|
3781
|
-
declare const __VLS_export$
|
|
4971
|
+
type __VLS_Props$26 = FieldProps<DataSourceInputConfig>;
|
|
4972
|
+
declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3782
4973
|
change: (value: string) => any;
|
|
3783
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4974
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
|
|
3784
4975
|
onChange?: ((value: string) => any) | undefined;
|
|
3785
4976
|
}>, {
|
|
3786
4977
|
disabled: boolean;
|
|
3787
4978
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3788
|
-
declare const _default$13: typeof __VLS_export$
|
|
4979
|
+
declare const _default$13: typeof __VLS_export$29;
|
|
3789
4980
|
//#endregion
|
|
3790
4981
|
//#region temp/packages/editor/src/fields/DataSourceSelect.vue.d.ts
|
|
3791
|
-
type __VLS_Props$
|
|
3792
|
-
declare const __VLS_export$
|
|
4982
|
+
type __VLS_Props$25 = FieldProps<DataSourceSelect>;
|
|
4983
|
+
declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3793
4984
|
change: (...args: any[]) => void;
|
|
3794
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4985
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
|
|
3795
4986
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3796
4987
|
}>, {
|
|
3797
4988
|
disabled: boolean;
|
|
3798
4989
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3799
|
-
declare const _default$17: typeof __VLS_export$
|
|
4990
|
+
declare const _default$17: typeof __VLS_export$28;
|
|
3800
4991
|
//#endregion
|
|
3801
4992
|
//#region temp/packages/editor/src/fields/DataSourceMethodSelect.vue.d.ts
|
|
3802
|
-
type __VLS_Props$
|
|
3803
|
-
declare const __VLS_export$
|
|
4993
|
+
type __VLS_Props$24 = FieldProps<DataSourceMethodSelectConfig>;
|
|
4994
|
+
declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3804
4995
|
change: (...args: any[]) => void;
|
|
3805
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4996
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
|
|
3806
4997
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3807
4998
|
}>, {
|
|
3808
4999
|
disabled: boolean;
|
|
3809
5000
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3810
|
-
declare const _default$14: typeof __VLS_export$
|
|
5001
|
+
declare const _default$14: typeof __VLS_export$27;
|
|
3811
5002
|
//#endregion
|
|
3812
5003
|
//#region temp/packages/editor/src/fields/DataSourceFieldSelect/Index.vue.d.ts
|
|
3813
|
-
type __VLS_Props$
|
|
3814
|
-
declare const __VLS_export$
|
|
5004
|
+
type __VLS_Props$23 = FieldProps<DataSourceFieldSelectConfig>;
|
|
5005
|
+
declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3815
5006
|
change: (...args: any[]) => void;
|
|
3816
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5007
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
|
|
3817
5008
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3818
5009
|
}>, {
|
|
3819
5010
|
disabled: boolean;
|
|
3820
5011
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3821
|
-
declare const _default$11: typeof __VLS_export$
|
|
5012
|
+
declare const _default$11: typeof __VLS_export$26;
|
|
3822
5013
|
//#endregion
|
|
3823
5014
|
//#region temp/packages/editor/src/fields/EventSelect.vue.d.ts
|
|
3824
|
-
type __VLS_Props$
|
|
3825
|
-
declare const __VLS_export$
|
|
5015
|
+
type __VLS_Props$22 = FieldProps<EventSelectConfig>;
|
|
5016
|
+
declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3826
5017
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
3827
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5018
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
|
|
3828
5019
|
onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3829
5020
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3830
|
-
declare const _default$19: typeof __VLS_export$
|
|
5021
|
+
declare const _default$19: typeof __VLS_export$25;
|
|
3831
5022
|
//#endregion
|
|
3832
5023
|
//#region temp/packages/editor/src/fields/KeyValue.vue.d.ts
|
|
3833
|
-
type __VLS_Props$
|
|
3834
|
-
declare const __VLS_export$
|
|
5024
|
+
type __VLS_Props$21 = FieldProps<KeyValueConfig>;
|
|
5025
|
+
declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3835
5026
|
change: (value: Record<string, any>) => any;
|
|
3836
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5027
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
|
|
3837
5028
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
3838
5029
|
}>, {
|
|
3839
5030
|
disabled: boolean;
|
|
3840
5031
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3841
|
-
declare const _default$
|
|
5032
|
+
declare const _default$25: typeof __VLS_export$24;
|
|
3842
5033
|
//#endregion
|
|
3843
5034
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue.d.ts
|
|
3844
5035
|
type __VLS_Slots$9 = CodeBlockListSlots;
|
|
3845
|
-
type __VLS_Props$
|
|
5036
|
+
type __VLS_Props$20 = {
|
|
3846
5037
|
indent?: number;
|
|
3847
5038
|
nextLevelIndentIncrement?: number;
|
|
3848
5039
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
3849
5040
|
};
|
|
3850
|
-
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
5041
|
+
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {
|
|
3851
5042
|
nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
|
|
3852
5043
|
visible: boolean;
|
|
3853
5044
|
expand: boolean;
|
|
@@ -3860,18 +5051,26 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
3860
5051
|
draggable: boolean;
|
|
3861
5052
|
}> & Omit<Map<Id, LayerNodeStatus>, keyof Map<any, any>>)>;
|
|
3862
5053
|
filter: (text: string | string[]) => void;
|
|
3863
|
-
deleteCode: (id: string
|
|
5054
|
+
deleteCode: (id: string, {
|
|
5055
|
+
historySource
|
|
5056
|
+
}?: {
|
|
5057
|
+
historySource?: HistoryOpSource;
|
|
5058
|
+
}) => Promise<void>;
|
|
3864
5059
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3865
|
-
remove: (id: string
|
|
5060
|
+
remove: (id: string, args_1: {
|
|
5061
|
+
historySource?: HistoryOpSource;
|
|
5062
|
+
}) => any;
|
|
3866
5063
|
edit: (id: string) => any;
|
|
3867
5064
|
"node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
|
|
3868
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
3869
|
-
onRemove?: ((id: string
|
|
5065
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
|
|
5066
|
+
onRemove?: ((id: string, args_1: {
|
|
5067
|
+
historySource?: HistoryOpSource;
|
|
5068
|
+
}) => any) | undefined;
|
|
3870
5069
|
onEdit?: ((id: string) => any) | undefined;
|
|
3871
5070
|
"onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
3872
5071
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3873
|
-
declare const __VLS_export$
|
|
3874
|
-
declare const _default$1: typeof __VLS_export$
|
|
5072
|
+
declare const __VLS_export$23: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
|
|
5073
|
+
declare const _default$1: typeof __VLS_export$23;
|
|
3875
5074
|
type __VLS_WithSlots$9<T, S> = T & {
|
|
3876
5075
|
new (): {
|
|
3877
5076
|
$slots: S;
|
|
@@ -3880,15 +5079,15 @@ type __VLS_WithSlots$9<T, S> = T & {
|
|
|
3880
5079
|
//#endregion
|
|
3881
5080
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts
|
|
3882
5081
|
type __VLS_Slots$8 = CodeBlockListPanelSlots;
|
|
3883
|
-
type __VLS_Props$
|
|
5082
|
+
type __VLS_Props$19 = {
|
|
3884
5083
|
indent?: number;
|
|
3885
5084
|
nextLevelIndentIncrement?: number;
|
|
3886
5085
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
3887
5086
|
customContentMenu: CustomContentMenuFunction;
|
|
3888
5087
|
};
|
|
3889
|
-
declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
3890
|
-
declare const __VLS_export$
|
|
3891
|
-
declare const _default$2: typeof __VLS_export$
|
|
5088
|
+
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>;
|
|
5089
|
+
declare const __VLS_export$22: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
|
|
5090
|
+
declare const _default$2: typeof __VLS_export$22;
|
|
3892
5091
|
type __VLS_WithSlots$8<T, S> = T & {
|
|
3893
5092
|
new (): {
|
|
3894
5093
|
$slots: S;
|
|
@@ -3896,36 +5095,38 @@ type __VLS_WithSlots$8<T, S> = T & {
|
|
|
3896
5095
|
};
|
|
3897
5096
|
//#endregion
|
|
3898
5097
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts
|
|
3899
|
-
type __VLS_Props$
|
|
5098
|
+
type __VLS_Props$18 = {
|
|
3900
5099
|
title?: string;
|
|
3901
5100
|
values: any;
|
|
3902
|
-
disabled: boolean;
|
|
5101
|
+
disabled: boolean; /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
|
|
5102
|
+
editMethodName?: string; /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
|
|
5103
|
+
editFieldPath?: string[];
|
|
3903
5104
|
};
|
|
3904
5105
|
type __VLS_ModelProps$2 = {
|
|
3905
5106
|
'visible'?: boolean;
|
|
3906
5107
|
'width'?: number;
|
|
3907
5108
|
};
|
|
3908
|
-
type __VLS_PublicProps$2 = __VLS_Props$
|
|
3909
|
-
declare const __VLS_export$
|
|
5109
|
+
type __VLS_PublicProps$2 = __VLS_Props$18 & __VLS_ModelProps$2;
|
|
5110
|
+
declare const __VLS_export$21: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
|
|
3910
5111
|
show(): void;
|
|
3911
5112
|
hide(): void;
|
|
3912
5113
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3913
5114
|
close: () => any;
|
|
3914
5115
|
submit: (v: any, eventData: ContainerChangeEventData) => any;
|
|
3915
5116
|
open: (id: string) => any;
|
|
3916
|
-
"update:width": (value: number) => any;
|
|
3917
5117
|
"update:visible": (value: boolean) => any;
|
|
5118
|
+
"update:width": (value: number) => any;
|
|
3918
5119
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$2> & Readonly<{
|
|
3919
5120
|
onClose?: (() => any) | undefined;
|
|
3920
5121
|
onSubmit?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
3921
5122
|
onOpen?: ((id: string) => any) | undefined;
|
|
3922
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3923
5123
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5124
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3924
5125
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3925
|
-
declare const _default$10: typeof __VLS_export$
|
|
5126
|
+
declare const _default$10: typeof __VLS_export$21;
|
|
3926
5127
|
//#endregion
|
|
3927
5128
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceAddButton.vue.d.ts
|
|
3928
|
-
type __VLS_Props$
|
|
5129
|
+
type __VLS_Props$17 = {
|
|
3929
5130
|
datasourceTypeList: {
|
|
3930
5131
|
text: string;
|
|
3931
5132
|
type: string;
|
|
@@ -3933,22 +5134,22 @@ type __VLS_Props$15 = {
|
|
|
3933
5134
|
addButtonConfig?: ButtonProps;
|
|
3934
5135
|
addButtonText?: string;
|
|
3935
5136
|
};
|
|
3936
|
-
declare const __VLS_export$
|
|
5137
|
+
declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_Props$17, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3937
5138
|
add: (type: string) => any;
|
|
3938
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5139
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$17> & Readonly<{
|
|
3939
5140
|
onAdd?: ((type: string) => any) | undefined;
|
|
3940
5141
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3941
|
-
declare const _default$9: typeof __VLS_export$
|
|
5142
|
+
declare const _default$9: typeof __VLS_export$20;
|
|
3942
5143
|
//#endregion
|
|
3943
5144
|
//#region temp/packages/editor/src/layouts/props-panel/PropsPanel.vue.d.ts
|
|
3944
5145
|
type __VLS_Slots$7 = PropsPanelSlots;
|
|
3945
|
-
type __VLS_Props$
|
|
5146
|
+
type __VLS_Props$16 = {
|
|
3946
5147
|
disabledShowSrc?: boolean;
|
|
3947
5148
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3948
5149
|
};
|
|
3949
|
-
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
5150
|
+
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {
|
|
3950
5151
|
getFormState(): FormState | undefined;
|
|
3951
|
-
submit: (v: MNode, eventData?: ContainerChangeEventData) => Promise<void>;
|
|
5152
|
+
submit: (v: MNode, eventData?: ContainerChangeEventData, error?: any, source?: NodeInvalidSource) => Promise<void>;
|
|
3952
5153
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3953
5154
|
mounted: (internalInstance: {
|
|
3954
5155
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
@@ -3961,9 +5162,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
3961
5162
|
readonly codeValueKey?: string | undefined;
|
|
3962
5163
|
readonly labelPosition?: string | undefined;
|
|
3963
5164
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
5165
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
3964
5166
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3965
5167
|
readonly onUnmounted?: (() => any) | undefined;
|
|
3966
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3967
5168
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3968
5169
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
3969
5170
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -3977,7 +5178,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
3977
5178
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3978
5179
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
3979
5180
|
$host: Element | null;
|
|
3980
|
-
$emit: ((event: "
|
|
5181
|
+
$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);
|
|
3981
5182
|
$el: any;
|
|
3982
5183
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
3983
5184
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -3988,9 +5189,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
3988
5189
|
labelPosition?: string;
|
|
3989
5190
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3990
5191
|
}> & Readonly<{
|
|
5192
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
3991
5193
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
3992
5194
|
onUnmounted?: (() => any) | undefined;
|
|
3993
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3994
5195
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
3995
5196
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
3996
5197
|
}>, {
|
|
@@ -4004,6 +5205,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4004
5205
|
readonly isCompare?: boolean | undefined;
|
|
4005
5206
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4006
5207
|
readonly labelWidth?: string | undefined;
|
|
5208
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5209
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4007
5210
|
readonly disabled?: boolean | undefined;
|
|
4008
5211
|
readonly height?: string | undefined;
|
|
4009
5212
|
readonly stepActive?: string | number | undefined;
|
|
@@ -4013,6 +5216,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4013
5216
|
readonly keyProp?: string | undefined;
|
|
4014
5217
|
readonly popperClass?: string | undefined;
|
|
4015
5218
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5219
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4016
5220
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4017
5221
|
readonly showDiff?: ((_data: {
|
|
4018
5222
|
curValue: any;
|
|
@@ -4020,6 +5224,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4020
5224
|
config: any;
|
|
4021
5225
|
}) => boolean) | undefined;
|
|
4022
5226
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
5227
|
+
readonly theme?: string | undefined;
|
|
4023
5228
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
4024
5229
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
4025
5230
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -4045,6 +5250,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4045
5250
|
isCompare?: boolean;
|
|
4046
5251
|
parentValues?: Record<string, any>;
|
|
4047
5252
|
labelWidth?: string;
|
|
5253
|
+
typeMatchValid?: boolean;
|
|
5254
|
+
validateOnInit?: boolean;
|
|
4048
5255
|
disabled?: boolean;
|
|
4049
5256
|
height?: string;
|
|
4050
5257
|
stepActive?: string | number;
|
|
@@ -4054,6 +5261,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4054
5261
|
keyProp?: string;
|
|
4055
5262
|
popperClass?: string;
|
|
4056
5263
|
preventSubmitDefault?: boolean;
|
|
5264
|
+
useFieldTextInError?: boolean;
|
|
4057
5265
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4058
5266
|
showDiff?: (_data: {
|
|
4059
5267
|
curValue: any;
|
|
@@ -4061,6 +5269,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4061
5269
|
config: any;
|
|
4062
5270
|
}) => boolean;
|
|
4063
5271
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5272
|
+
theme?: string;
|
|
4064
5273
|
}> & Readonly<{
|
|
4065
5274
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4066
5275
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4076,6 +5285,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4076
5285
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4077
5286
|
resetForm: () => void;
|
|
4078
5287
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5288
|
+
validate: () => Promise<string>;
|
|
4079
5289
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4080
5290
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4081
5291
|
error: (...args: any[]) => void;
|
|
@@ -4096,6 +5306,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4096
5306
|
keyProp: string;
|
|
4097
5307
|
parentValues: Record<string, any>;
|
|
4098
5308
|
stepActive: string | number;
|
|
5309
|
+
validateOnInit: boolean;
|
|
5310
|
+
useFieldTextInError: boolean;
|
|
4099
5311
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4100
5312
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4101
5313
|
created?: (() => void) | (() => void)[];
|
|
@@ -4129,6 +5341,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4129
5341
|
keyProp: string;
|
|
4130
5342
|
parentValues: Record<string, any>;
|
|
4131
5343
|
stepActive: string | number;
|
|
5344
|
+
validateOnInit: boolean;
|
|
5345
|
+
useFieldTextInError: boolean;
|
|
4132
5346
|
}> & Omit<Readonly<{
|
|
4133
5347
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4134
5348
|
initValues: Record<string, any>;
|
|
@@ -4136,6 +5350,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4136
5350
|
isCompare?: boolean;
|
|
4137
5351
|
parentValues?: Record<string, any>;
|
|
4138
5352
|
labelWidth?: string;
|
|
5353
|
+
typeMatchValid?: boolean;
|
|
5354
|
+
validateOnInit?: boolean;
|
|
4139
5355
|
disabled?: boolean;
|
|
4140
5356
|
height?: string;
|
|
4141
5357
|
stepActive?: string | number;
|
|
@@ -4145,6 +5361,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4145
5361
|
keyProp?: string;
|
|
4146
5362
|
popperClass?: string;
|
|
4147
5363
|
preventSubmitDefault?: boolean;
|
|
5364
|
+
useFieldTextInError?: boolean;
|
|
4148
5365
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4149
5366
|
showDiff?: (_data: {
|
|
4150
5367
|
curValue: any;
|
|
@@ -4152,13 +5369,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4152
5369
|
config: any;
|
|
4153
5370
|
}) => boolean;
|
|
4154
5371
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5372
|
+
theme?: string;
|
|
4155
5373
|
}> & Readonly<{
|
|
4156
5374
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4157
5375
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4158
5376
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4159
5377
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4160
5378
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4161
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
5379
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
4162
5380
|
values: FormValue;
|
|
4163
5381
|
lastValuesProcessed: FormValue;
|
|
4164
5382
|
formState: FormState;
|
|
@@ -4167,15 +5385,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4167
5385
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4168
5386
|
resetForm: () => void;
|
|
4169
5387
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5388
|
+
validate: () => Promise<string>;
|
|
4170
5389
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4171
5390
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4172
5391
|
$slots: FormSlots;
|
|
4173
5392
|
}) | null>>;
|
|
4174
5393
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
4175
5394
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5395
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
4176
5396
|
mounted: (internalInstance: any) => any;
|
|
4177
5397
|
unmounted: () => any;
|
|
4178
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
4179
5398
|
"submit-error": (e: any) => any;
|
|
4180
5399
|
"form-error": (e: any) => any;
|
|
4181
5400
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -4207,9 +5426,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4207
5426
|
labelPosition?: string;
|
|
4208
5427
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4209
5428
|
}> & Readonly<{
|
|
5429
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4210
5430
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4211
5431
|
onUnmounted?: (() => any) | undefined;
|
|
4212
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4213
5432
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4214
5433
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4215
5434
|
}>, "submit" | "configForm"> & {
|
|
@@ -4223,6 +5442,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4223
5442
|
readonly isCompare?: boolean | undefined;
|
|
4224
5443
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4225
5444
|
readonly labelWidth?: string | undefined;
|
|
5445
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5446
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4226
5447
|
readonly disabled?: boolean | undefined;
|
|
4227
5448
|
readonly height?: string | undefined;
|
|
4228
5449
|
readonly stepActive?: string | number | undefined;
|
|
@@ -4232,6 +5453,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4232
5453
|
readonly keyProp?: string | undefined;
|
|
4233
5454
|
readonly popperClass?: string | undefined;
|
|
4234
5455
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5456
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4235
5457
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4236
5458
|
readonly showDiff?: ((_data: {
|
|
4237
5459
|
curValue: any;
|
|
@@ -4239,6 +5461,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4239
5461
|
config: any;
|
|
4240
5462
|
}) => boolean) | undefined;
|
|
4241
5463
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
5464
|
+
readonly theme?: string | undefined;
|
|
4242
5465
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
4243
5466
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
4244
5467
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -4264,6 +5487,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4264
5487
|
isCompare?: boolean;
|
|
4265
5488
|
parentValues?: Record<string, any>;
|
|
4266
5489
|
labelWidth?: string;
|
|
5490
|
+
typeMatchValid?: boolean;
|
|
5491
|
+
validateOnInit?: boolean;
|
|
4267
5492
|
disabled?: boolean;
|
|
4268
5493
|
height?: string;
|
|
4269
5494
|
stepActive?: string | number;
|
|
@@ -4273,6 +5498,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4273
5498
|
keyProp?: string;
|
|
4274
5499
|
popperClass?: string;
|
|
4275
5500
|
preventSubmitDefault?: boolean;
|
|
5501
|
+
useFieldTextInError?: boolean;
|
|
4276
5502
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4277
5503
|
showDiff?: (_data: {
|
|
4278
5504
|
curValue: any;
|
|
@@ -4280,6 +5506,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4280
5506
|
config: any;
|
|
4281
5507
|
}) => boolean;
|
|
4282
5508
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5509
|
+
theme?: string;
|
|
4283
5510
|
}> & Readonly<{
|
|
4284
5511
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4285
5512
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4295,6 +5522,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4295
5522
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4296
5523
|
resetForm: () => void;
|
|
4297
5524
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5525
|
+
validate: () => Promise<string>;
|
|
4298
5526
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4299
5527
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4300
5528
|
error: (...args: any[]) => void;
|
|
@@ -4315,6 +5543,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4315
5543
|
keyProp: string;
|
|
4316
5544
|
parentValues: Record<string, any>;
|
|
4317
5545
|
stepActive: string | number;
|
|
5546
|
+
validateOnInit: boolean;
|
|
5547
|
+
useFieldTextInError: boolean;
|
|
4318
5548
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4319
5549
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4320
5550
|
created?: (() => void) | (() => void)[];
|
|
@@ -4348,6 +5578,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4348
5578
|
keyProp: string;
|
|
4349
5579
|
parentValues: Record<string, any>;
|
|
4350
5580
|
stepActive: string | number;
|
|
5581
|
+
validateOnInit: boolean;
|
|
5582
|
+
useFieldTextInError: boolean;
|
|
4351
5583
|
}> & Omit<Readonly<{
|
|
4352
5584
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4353
5585
|
initValues: Record<string, any>;
|
|
@@ -4355,6 +5587,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4355
5587
|
isCompare?: boolean;
|
|
4356
5588
|
parentValues?: Record<string, any>;
|
|
4357
5589
|
labelWidth?: string;
|
|
5590
|
+
typeMatchValid?: boolean;
|
|
5591
|
+
validateOnInit?: boolean;
|
|
4358
5592
|
disabled?: boolean;
|
|
4359
5593
|
height?: string;
|
|
4360
5594
|
stepActive?: string | number;
|
|
@@ -4364,6 +5598,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4364
5598
|
keyProp?: string;
|
|
4365
5599
|
popperClass?: string;
|
|
4366
5600
|
preventSubmitDefault?: boolean;
|
|
5601
|
+
useFieldTextInError?: boolean;
|
|
4367
5602
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4368
5603
|
showDiff?: (_data: {
|
|
4369
5604
|
curValue: any;
|
|
@@ -4371,13 +5606,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4371
5606
|
config: any;
|
|
4372
5607
|
}) => boolean;
|
|
4373
5608
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5609
|
+
theme?: string;
|
|
4374
5610
|
}> & Readonly<{
|
|
4375
5611
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4376
5612
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4377
5613
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4378
5614
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4379
5615
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4380
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
5616
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
4381
5617
|
values: FormValue;
|
|
4382
5618
|
lastValuesProcessed: FormValue;
|
|
4383
5619
|
formState: FormState;
|
|
@@ -4386,6 +5622,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4386
5622
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4387
5623
|
resetForm: () => void;
|
|
4388
5624
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5625
|
+
validate: () => Promise<string>;
|
|
4389
5626
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4390
5627
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4391
5628
|
$slots: FormSlots;
|
|
@@ -4399,7 +5636,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4399
5636
|
unmounted: () => any;
|
|
4400
5637
|
"submit-error": (e: any) => any;
|
|
4401
5638
|
"form-error": (e: any) => any;
|
|
4402
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5639
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
|
|
4403
5640
|
onMounted?: ((internalInstance: {
|
|
4404
5641
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
4405
5642
|
$data: {};
|
|
@@ -4411,9 +5648,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4411
5648
|
readonly codeValueKey?: string | undefined;
|
|
4412
5649
|
readonly labelPosition?: string | undefined;
|
|
4413
5650
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
5651
|
+
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4414
5652
|
readonly onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4415
5653
|
readonly onUnmounted?: (() => any) | undefined;
|
|
4416
|
-
readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4417
5654
|
readonly "onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4418
5655
|
readonly "onForm-error"?: ((e: any) => any) | undefined;
|
|
4419
5656
|
} & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
|
|
@@ -4427,7 +5664,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4427
5664
|
$root: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
4428
5665
|
$parent: import("@vue/runtime-core").ComponentPublicInstance | null;
|
|
4429
5666
|
$host: Element | null;
|
|
4430
|
-
$emit: ((event: "
|
|
5667
|
+
$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);
|
|
4431
5668
|
$el: any;
|
|
4432
5669
|
$options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
|
|
4433
5670
|
config: import("@tmagic/form-schema").FormConfig;
|
|
@@ -4438,9 +5675,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4438
5675
|
labelPosition?: string;
|
|
4439
5676
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4440
5677
|
}> & Readonly<{
|
|
5678
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4441
5679
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4442
5680
|
onUnmounted?: (() => any) | undefined;
|
|
4443
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4444
5681
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4445
5682
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4446
5683
|
}>, {
|
|
@@ -4454,6 +5691,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4454
5691
|
readonly isCompare?: boolean | undefined;
|
|
4455
5692
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4456
5693
|
readonly labelWidth?: string | undefined;
|
|
5694
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5695
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4457
5696
|
readonly disabled?: boolean | undefined;
|
|
4458
5697
|
readonly height?: string | undefined;
|
|
4459
5698
|
readonly stepActive?: string | number | undefined;
|
|
@@ -4463,6 +5702,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4463
5702
|
readonly keyProp?: string | undefined;
|
|
4464
5703
|
readonly popperClass?: string | undefined;
|
|
4465
5704
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5705
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4466
5706
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4467
5707
|
readonly showDiff?: ((_data: {
|
|
4468
5708
|
curValue: any;
|
|
@@ -4470,6 +5710,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4470
5710
|
config: any;
|
|
4471
5711
|
}) => boolean) | undefined;
|
|
4472
5712
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
5713
|
+
readonly theme?: string | undefined;
|
|
4473
5714
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
4474
5715
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
4475
5716
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -4495,6 +5736,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4495
5736
|
isCompare?: boolean;
|
|
4496
5737
|
parentValues?: Record<string, any>;
|
|
4497
5738
|
labelWidth?: string;
|
|
5739
|
+
typeMatchValid?: boolean;
|
|
5740
|
+
validateOnInit?: boolean;
|
|
4498
5741
|
disabled?: boolean;
|
|
4499
5742
|
height?: string;
|
|
4500
5743
|
stepActive?: string | number;
|
|
@@ -4504,6 +5747,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4504
5747
|
keyProp?: string;
|
|
4505
5748
|
popperClass?: string;
|
|
4506
5749
|
preventSubmitDefault?: boolean;
|
|
5750
|
+
useFieldTextInError?: boolean;
|
|
4507
5751
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4508
5752
|
showDiff?: (_data: {
|
|
4509
5753
|
curValue: any;
|
|
@@ -4511,6 +5755,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4511
5755
|
config: any;
|
|
4512
5756
|
}) => boolean;
|
|
4513
5757
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5758
|
+
theme?: string;
|
|
4514
5759
|
}> & Readonly<{
|
|
4515
5760
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4516
5761
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4526,6 +5771,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4526
5771
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4527
5772
|
resetForm: () => void;
|
|
4528
5773
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5774
|
+
validate: () => Promise<string>;
|
|
4529
5775
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4530
5776
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4531
5777
|
error: (...args: any[]) => void;
|
|
@@ -4546,6 +5792,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4546
5792
|
keyProp: string;
|
|
4547
5793
|
parentValues: Record<string, any>;
|
|
4548
5794
|
stepActive: string | number;
|
|
5795
|
+
validateOnInit: boolean;
|
|
5796
|
+
useFieldTextInError: boolean;
|
|
4549
5797
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4550
5798
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4551
5799
|
created?: (() => void) | (() => void)[];
|
|
@@ -4579,6 +5827,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4579
5827
|
keyProp: string;
|
|
4580
5828
|
parentValues: Record<string, any>;
|
|
4581
5829
|
stepActive: string | number;
|
|
5830
|
+
validateOnInit: boolean;
|
|
5831
|
+
useFieldTextInError: boolean;
|
|
4582
5832
|
}> & Omit<Readonly<{
|
|
4583
5833
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4584
5834
|
initValues: Record<string, any>;
|
|
@@ -4586,6 +5836,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4586
5836
|
isCompare?: boolean;
|
|
4587
5837
|
parentValues?: Record<string, any>;
|
|
4588
5838
|
labelWidth?: string;
|
|
5839
|
+
typeMatchValid?: boolean;
|
|
5840
|
+
validateOnInit?: boolean;
|
|
4589
5841
|
disabled?: boolean;
|
|
4590
5842
|
height?: string;
|
|
4591
5843
|
stepActive?: string | number;
|
|
@@ -4595,6 +5847,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4595
5847
|
keyProp?: string;
|
|
4596
5848
|
popperClass?: string;
|
|
4597
5849
|
preventSubmitDefault?: boolean;
|
|
5850
|
+
useFieldTextInError?: boolean;
|
|
4598
5851
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4599
5852
|
showDiff?: (_data: {
|
|
4600
5853
|
curValue: any;
|
|
@@ -4602,13 +5855,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4602
5855
|
config: any;
|
|
4603
5856
|
}) => boolean;
|
|
4604
5857
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5858
|
+
theme?: string;
|
|
4605
5859
|
}> & Readonly<{
|
|
4606
5860
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4607
5861
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4608
5862
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4609
5863
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4610
5864
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4611
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
5865
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
4612
5866
|
values: FormValue;
|
|
4613
5867
|
lastValuesProcessed: FormValue;
|
|
4614
5868
|
formState: FormState;
|
|
@@ -4617,15 +5871,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4617
5871
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4618
5872
|
resetForm: () => void;
|
|
4619
5873
|
submitForm: (native?: boolean) => Promise<any>;
|
|
5874
|
+
validate: () => Promise<string>;
|
|
4620
5875
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4621
5876
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4622
5877
|
$slots: FormSlots;
|
|
4623
5878
|
}) | null>>;
|
|
4624
5879
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
4625
5880
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5881
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
4626
5882
|
mounted: (internalInstance: any) => any;
|
|
4627
5883
|
unmounted: () => any;
|
|
4628
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
4629
5884
|
"submit-error": (e: any) => any;
|
|
4630
5885
|
"form-error": (e: any) => any;
|
|
4631
5886
|
}, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
@@ -4657,9 +5912,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4657
5912
|
labelPosition?: string;
|
|
4658
5913
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4659
5914
|
}> & Readonly<{
|
|
5915
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
4660
5916
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
4661
5917
|
onUnmounted?: (() => any) | undefined;
|
|
4662
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
4663
5918
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4664
5919
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4665
5920
|
}>, "submit" | "configForm"> & {
|
|
@@ -4673,6 +5928,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4673
5928
|
readonly isCompare?: boolean | undefined;
|
|
4674
5929
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4675
5930
|
readonly labelWidth?: string | undefined;
|
|
5931
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
5932
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4676
5933
|
readonly disabled?: boolean | undefined;
|
|
4677
5934
|
readonly height?: string | undefined;
|
|
4678
5935
|
readonly stepActive?: string | number | undefined;
|
|
@@ -4682,6 +5939,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4682
5939
|
readonly keyProp?: string | undefined;
|
|
4683
5940
|
readonly popperClass?: string | undefined;
|
|
4684
5941
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
5942
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4685
5943
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4686
5944
|
readonly showDiff?: ((_data: {
|
|
4687
5945
|
curValue: any;
|
|
@@ -4689,6 +5947,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4689
5947
|
config: any;
|
|
4690
5948
|
}) => boolean) | undefined;
|
|
4691
5949
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
5950
|
+
readonly theme?: string | undefined;
|
|
4692
5951
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
4693
5952
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
4694
5953
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -4714,6 +5973,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4714
5973
|
isCompare?: boolean;
|
|
4715
5974
|
parentValues?: Record<string, any>;
|
|
4716
5975
|
labelWidth?: string;
|
|
5976
|
+
typeMatchValid?: boolean;
|
|
5977
|
+
validateOnInit?: boolean;
|
|
4717
5978
|
disabled?: boolean;
|
|
4718
5979
|
height?: string;
|
|
4719
5980
|
stepActive?: string | number;
|
|
@@ -4723,6 +5984,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4723
5984
|
keyProp?: string;
|
|
4724
5985
|
popperClass?: string;
|
|
4725
5986
|
preventSubmitDefault?: boolean;
|
|
5987
|
+
useFieldTextInError?: boolean;
|
|
4726
5988
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4727
5989
|
showDiff?: (_data: {
|
|
4728
5990
|
curValue: any;
|
|
@@ -4730,6 +5992,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4730
5992
|
config: any;
|
|
4731
5993
|
}) => boolean;
|
|
4732
5994
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
5995
|
+
theme?: string;
|
|
4733
5996
|
}> & Readonly<{
|
|
4734
5997
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4735
5998
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4745,6 +6008,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4745
6008
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4746
6009
|
resetForm: () => void;
|
|
4747
6010
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6011
|
+
validate: () => Promise<string>;
|
|
4748
6012
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4749
6013
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4750
6014
|
error: (...args: any[]) => void;
|
|
@@ -4765,6 +6029,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4765
6029
|
keyProp: string;
|
|
4766
6030
|
parentValues: Record<string, any>;
|
|
4767
6031
|
stepActive: string | number;
|
|
6032
|
+
validateOnInit: boolean;
|
|
6033
|
+
useFieldTextInError: boolean;
|
|
4768
6034
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4769
6035
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4770
6036
|
created?: (() => void) | (() => void)[];
|
|
@@ -4798,6 +6064,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4798
6064
|
keyProp: string;
|
|
4799
6065
|
parentValues: Record<string, any>;
|
|
4800
6066
|
stepActive: string | number;
|
|
6067
|
+
validateOnInit: boolean;
|
|
6068
|
+
useFieldTextInError: boolean;
|
|
4801
6069
|
}> & Omit<Readonly<{
|
|
4802
6070
|
config: import("@tmagic/form-schema").FormConfig;
|
|
4803
6071
|
initValues: Record<string, any>;
|
|
@@ -4805,6 +6073,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4805
6073
|
isCompare?: boolean;
|
|
4806
6074
|
parentValues?: Record<string, any>;
|
|
4807
6075
|
labelWidth?: string;
|
|
6076
|
+
typeMatchValid?: boolean;
|
|
6077
|
+
validateOnInit?: boolean;
|
|
4808
6078
|
disabled?: boolean;
|
|
4809
6079
|
height?: string;
|
|
4810
6080
|
stepActive?: string | number;
|
|
@@ -4814,6 +6084,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4814
6084
|
keyProp?: string;
|
|
4815
6085
|
popperClass?: string;
|
|
4816
6086
|
preventSubmitDefault?: boolean;
|
|
6087
|
+
useFieldTextInError?: boolean;
|
|
4817
6088
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4818
6089
|
showDiff?: (_data: {
|
|
4819
6090
|
curValue: any;
|
|
@@ -4821,13 +6092,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4821
6092
|
config: any;
|
|
4822
6093
|
}) => boolean;
|
|
4823
6094
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
6095
|
+
theme?: string;
|
|
4824
6096
|
}> & Readonly<{
|
|
4825
6097
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4826
6098
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
4827
6099
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
4828
6100
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
4829
6101
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
4830
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
6102
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
4831
6103
|
values: FormValue;
|
|
4832
6104
|
lastValuesProcessed: FormValue;
|
|
4833
6105
|
formState: FormState;
|
|
@@ -4836,6 +6108,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4836
6108
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4837
6109
|
resetForm: () => void;
|
|
4838
6110
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6111
|
+
validate: () => Promise<string>;
|
|
4839
6112
|
getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
|
|
4840
6113
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
4841
6114
|
$slots: FormSlots;
|
|
@@ -4850,8 +6123,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4850
6123
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
4851
6124
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
4852
6125
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4853
|
-
declare const __VLS_export$
|
|
4854
|
-
declare const _default$
|
|
6126
|
+
declare const __VLS_export$19: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
|
|
6127
|
+
declare const _default$31: typeof __VLS_export$19;
|
|
4855
6128
|
type __VLS_WithSlots$7<T, S> = T & {
|
|
4856
6129
|
new (): {
|
|
4857
6130
|
$slots: S;
|
|
@@ -4862,7 +6135,7 @@ type __VLS_WithSlots$7<T, S> = T & {
|
|
|
4862
6135
|
type __VLS_Slots$6 = {
|
|
4863
6136
|
'props-form-panel-header'(_props: {}): any;
|
|
4864
6137
|
};
|
|
4865
|
-
type __VLS_Props$
|
|
6138
|
+
type __VLS_Props$15 = {
|
|
4866
6139
|
config: FormConfig;
|
|
4867
6140
|
values: FormValue;
|
|
4868
6141
|
disabledShowSrc?: boolean;
|
|
@@ -4871,7 +6144,7 @@ type __VLS_Props$13 = {
|
|
|
4871
6144
|
labelPosition?: string;
|
|
4872
6145
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4873
6146
|
};
|
|
4874
|
-
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6147
|
+
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
|
|
4875
6148
|
configForm: Readonly<import("@vue/reactivity").ShallowRef<({
|
|
4876
6149
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
4877
6150
|
$data: {};
|
|
@@ -4882,6 +6155,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4882
6155
|
readonly isCompare?: boolean | undefined;
|
|
4883
6156
|
readonly parentValues?: Record<string, any> | undefined;
|
|
4884
6157
|
readonly labelWidth?: string | undefined;
|
|
6158
|
+
readonly typeMatchValid?: boolean | undefined;
|
|
6159
|
+
readonly validateOnInit?: boolean | undefined;
|
|
4885
6160
|
readonly disabled?: boolean | undefined;
|
|
4886
6161
|
readonly height?: string | undefined;
|
|
4887
6162
|
readonly stepActive?: string | number | undefined;
|
|
@@ -4891,6 +6166,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4891
6166
|
readonly keyProp?: string | undefined;
|
|
4892
6167
|
readonly popperClass?: string | undefined;
|
|
4893
6168
|
readonly preventSubmitDefault?: boolean | undefined;
|
|
6169
|
+
readonly useFieldTextInError?: boolean | undefined;
|
|
4894
6170
|
readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
4895
6171
|
readonly showDiff?: ((_data: {
|
|
4896
6172
|
curValue: any;
|
|
@@ -4898,6 +6174,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4898
6174
|
config: any;
|
|
4899
6175
|
}) => boolean) | undefined;
|
|
4900
6176
|
readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
|
|
6177
|
+
readonly theme?: string | undefined;
|
|
4901
6178
|
readonly onError?: ((...args: any[]) => any) | undefined;
|
|
4902
6179
|
readonly onChange?: ((...args: any[]) => any) | undefined;
|
|
4903
6180
|
readonly "onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -4923,6 +6200,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4923
6200
|
isCompare?: boolean;
|
|
4924
6201
|
parentValues?: Record<string, any>;
|
|
4925
6202
|
labelWidth?: string;
|
|
6203
|
+
typeMatchValid?: boolean;
|
|
6204
|
+
validateOnInit?: boolean;
|
|
4926
6205
|
disabled?: boolean;
|
|
4927
6206
|
height?: string;
|
|
4928
6207
|
stepActive?: string | number;
|
|
@@ -4932,6 +6211,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4932
6211
|
keyProp?: string;
|
|
4933
6212
|
popperClass?: string;
|
|
4934
6213
|
preventSubmitDefault?: boolean;
|
|
6214
|
+
useFieldTextInError?: boolean;
|
|
4935
6215
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4936
6216
|
showDiff?: (_data: {
|
|
4937
6217
|
curValue: any;
|
|
@@ -4939,6 +6219,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4939
6219
|
config: any;
|
|
4940
6220
|
}) => boolean;
|
|
4941
6221
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
6222
|
+
theme?: string;
|
|
4942
6223
|
}> & Readonly<{
|
|
4943
6224
|
onError?: ((...args: any[]) => any) | undefined;
|
|
4944
6225
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4954,6 +6235,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4954
6235
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
4955
6236
|
resetForm: () => void;
|
|
4956
6237
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6238
|
+
validate: () => Promise<string>;
|
|
4957
6239
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
4958
6240
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4959
6241
|
error: (...args: any[]) => void;
|
|
@@ -4974,6 +6256,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4974
6256
|
keyProp: string;
|
|
4975
6257
|
parentValues: Record<string, any>;
|
|
4976
6258
|
stepActive: string | number;
|
|
6259
|
+
validateOnInit: boolean;
|
|
6260
|
+
useFieldTextInError: boolean;
|
|
4977
6261
|
}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
|
|
4978
6262
|
beforeCreate?: (() => void) | (() => void)[];
|
|
4979
6263
|
created?: (() => void) | (() => void)[];
|
|
@@ -5007,6 +6291,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5007
6291
|
keyProp: string;
|
|
5008
6292
|
parentValues: Record<string, any>;
|
|
5009
6293
|
stepActive: string | number;
|
|
6294
|
+
validateOnInit: boolean;
|
|
6295
|
+
useFieldTextInError: boolean;
|
|
5010
6296
|
}> & Omit<Readonly<{
|
|
5011
6297
|
config: FormConfig;
|
|
5012
6298
|
initValues: Record<string, any>;
|
|
@@ -5014,6 +6300,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5014
6300
|
isCompare?: boolean;
|
|
5015
6301
|
parentValues?: Record<string, any>;
|
|
5016
6302
|
labelWidth?: string;
|
|
6303
|
+
typeMatchValid?: boolean;
|
|
6304
|
+
validateOnInit?: boolean;
|
|
5017
6305
|
disabled?: boolean;
|
|
5018
6306
|
height?: string;
|
|
5019
6307
|
stepActive?: string | number;
|
|
@@ -5023,6 +6311,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5023
6311
|
keyProp?: string;
|
|
5024
6312
|
popperClass?: string;
|
|
5025
6313
|
preventSubmitDefault?: boolean;
|
|
6314
|
+
useFieldTextInError?: boolean;
|
|
5026
6315
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5027
6316
|
showDiff?: (_data: {
|
|
5028
6317
|
curValue: any;
|
|
@@ -5030,13 +6319,14 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5030
6319
|
config: any;
|
|
5031
6320
|
}) => boolean;
|
|
5032
6321
|
selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
|
|
6322
|
+
theme?: string;
|
|
5033
6323
|
}> & Readonly<{
|
|
5034
6324
|
onError?: ((...args: any[]) => any) | undefined;
|
|
5035
6325
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
5036
6326
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
5037
6327
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
5038
6328
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
5039
|
-
}>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
|
|
6329
|
+
}>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
|
|
5040
6330
|
values: FormValue;
|
|
5041
6331
|
lastValuesProcessed: FormValue;
|
|
5042
6332
|
formState: FormState;
|
|
@@ -5045,26 +6335,27 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5045
6335
|
changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
|
|
5046
6336
|
resetForm: () => void;
|
|
5047
6337
|
submitForm: (native?: boolean) => Promise<any>;
|
|
6338
|
+
validate: () => Promise<string>;
|
|
5048
6339
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
5049
6340
|
} & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
|
|
5050
6341
|
$slots: FormSlots;
|
|
5051
6342
|
}) | null>>;
|
|
5052
6343
|
submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
|
|
5053
6344
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6345
|
+
submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
|
|
5054
6346
|
mounted: (internalInstance: any) => any;
|
|
5055
6347
|
unmounted: () => any;
|
|
5056
|
-
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
5057
6348
|
"submit-error": (e: any) => any;
|
|
5058
6349
|
"form-error": (e: any) => any;
|
|
5059
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6350
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
|
|
6351
|
+
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
|
|
5060
6352
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5061
6353
|
onUnmounted?: (() => any) | undefined;
|
|
5062
|
-
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5063
6354
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5064
6355
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5065
6356
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5066
|
-
declare const __VLS_export$
|
|
5067
|
-
declare const _default$
|
|
6357
|
+
declare const __VLS_export$18: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
6358
|
+
declare const _default$30: typeof __VLS_export$18;
|
|
5068
6359
|
type __VLS_WithSlots$6<T, S> = T & {
|
|
5069
6360
|
new (): {
|
|
5070
6361
|
$slots: S;
|
|
@@ -5072,20 +6363,20 @@ type __VLS_WithSlots$6<T, S> = T & {
|
|
|
5072
6363
|
};
|
|
5073
6364
|
//#endregion
|
|
5074
6365
|
//#region temp/packages/editor/src/components/ToolButton.vue.d.ts
|
|
5075
|
-
type __VLS_Props$
|
|
6366
|
+
type __VLS_Props$14 = {
|
|
5076
6367
|
data?: MenuButton | MenuComponent;
|
|
5077
6368
|
eventType?: 'mousedown' | 'mouseup' | 'click';
|
|
5078
6369
|
};
|
|
5079
|
-
declare const __VLS_export$
|
|
6370
|
+
declare const __VLS_export$17: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
|
|
5080
6371
|
getElRef: () => Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5081
|
-
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6372
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{}>, {
|
|
5082
6373
|
data: MenuButton | MenuComponent;
|
|
5083
6374
|
eventType: "mousedown" | "mouseup" | "click";
|
|
5084
6375
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5085
|
-
declare const _default$
|
|
6376
|
+
declare const _default$36: typeof __VLS_export$17;
|
|
5086
6377
|
//#endregion
|
|
5087
6378
|
//#region temp/packages/editor/src/components/ContentMenu.vue.d.ts
|
|
5088
|
-
type __VLS_Props$
|
|
6379
|
+
type __VLS_Props$13 = {
|
|
5089
6380
|
menuData?: (MenuButton | MenuComponent)[];
|
|
5090
6381
|
isSubMenu?: boolean;
|
|
5091
6382
|
active?: string | number;
|
|
@@ -5095,7 +6386,7 @@ declare var __VLS_7$1: {};
|
|
|
5095
6386
|
type __VLS_Slots$5 = {} & {
|
|
5096
6387
|
title?: (props: typeof __VLS_7$1) => any;
|
|
5097
6388
|
};
|
|
5098
|
-
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6389
|
+
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
|
|
5099
6390
|
menu: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5100
6391
|
menuPosition: Ref<{
|
|
5101
6392
|
left: number;
|
|
@@ -5121,7 +6412,7 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5121
6412
|
mouseenter: () => any;
|
|
5122
6413
|
show: () => any;
|
|
5123
6414
|
hide: () => any;
|
|
5124
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6415
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{
|
|
5125
6416
|
onMouseenter?: (() => any) | undefined;
|
|
5126
6417
|
onShow?: (() => any) | undefined;
|
|
5127
6418
|
onHide?: (() => any) | undefined;
|
|
@@ -5130,8 +6421,8 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5130
6421
|
isSubMenu: boolean;
|
|
5131
6422
|
autoHide: boolean;
|
|
5132
6423
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5133
|
-
declare const __VLS_export$
|
|
5134
|
-
declare const _default$8: typeof __VLS_export$
|
|
6424
|
+
declare const __VLS_export$16: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
6425
|
+
declare const _default$8: typeof __VLS_export$16;
|
|
5135
6426
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
5136
6427
|
new (): {
|
|
5137
6428
|
$slots: S;
|
|
@@ -5139,14 +6430,14 @@ type __VLS_WithSlots$5<T, S> = T & {
|
|
|
5139
6430
|
};
|
|
5140
6431
|
//#endregion
|
|
5141
6432
|
//#region temp/packages/editor/src/components/Icon.vue.d.ts
|
|
5142
|
-
type __VLS_Props$
|
|
6433
|
+
type __VLS_Props$12 = {
|
|
5143
6434
|
icon?: any;
|
|
5144
6435
|
};
|
|
5145
|
-
declare const __VLS_export$
|
|
5146
|
-
declare const _default$
|
|
6436
|
+
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>;
|
|
6437
|
+
declare const _default$24: typeof __VLS_export$15;
|
|
5147
6438
|
//#endregion
|
|
5148
6439
|
//#region temp/packages/editor/src/components/SplitView.vue.d.ts
|
|
5149
|
-
type __VLS_Props$
|
|
6440
|
+
type __VLS_Props$11 = {
|
|
5150
6441
|
width?: number;
|
|
5151
6442
|
left?: number;
|
|
5152
6443
|
right?: number;
|
|
@@ -5165,13 +6456,13 @@ type __VLS_Slots$4 = {} & {
|
|
|
5165
6456
|
} & {
|
|
5166
6457
|
right?: (props: typeof __VLS_19) => any;
|
|
5167
6458
|
};
|
|
5168
|
-
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
6459
|
+
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {
|
|
5169
6460
|
updateWidth(): void;
|
|
5170
6461
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5171
6462
|
change: (...args: any[]) => void;
|
|
5172
6463
|
"update:left": (...args: any[]) => void;
|
|
5173
6464
|
"update:right": (...args: any[]) => void;
|
|
5174
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
6465
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
|
|
5175
6466
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
5176
6467
|
"onUpdate:left"?: ((...args: any[]) => any) | undefined;
|
|
5177
6468
|
"onUpdate:right"?: ((...args: any[]) => any) | undefined;
|
|
@@ -5180,8 +6471,8 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5180
6471
|
minRight: number;
|
|
5181
6472
|
minCenter: number;
|
|
5182
6473
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5183
|
-
declare const __VLS_export$
|
|
5184
|
-
declare const _default$
|
|
6474
|
+
declare const __VLS_export$14: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
6475
|
+
declare const _default$28: typeof __VLS_export$14;
|
|
5185
6476
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
5186
6477
|
new (): {
|
|
5187
6478
|
$slots: S;
|
|
@@ -5198,8 +6489,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<{}, {},
|
|
|
5198
6489
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
|
|
5199
6490
|
onChange?: ((e: OnDrag$1<import("gesto").default>) => any) | undefined;
|
|
5200
6491
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
5201
|
-
declare const __VLS_export$
|
|
5202
|
-
declare const _default$
|
|
6492
|
+
declare const __VLS_export$13: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
6493
|
+
declare const _default$32: typeof __VLS_export$13;
|
|
5203
6494
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
5204
6495
|
new (): {
|
|
5205
6496
|
$slots: S;
|
|
@@ -5207,7 +6498,7 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
5207
6498
|
};
|
|
5208
6499
|
//#endregion
|
|
5209
6500
|
//#region temp/packages/editor/src/components/CodeBlockEditor.vue.d.ts
|
|
5210
|
-
type __VLS_Props$
|
|
6501
|
+
type __VLS_Props$10 = {
|
|
5211
6502
|
content: Omit<CodeBlockContent, 'content'> & {
|
|
5212
6503
|
content: string;
|
|
5213
6504
|
};
|
|
@@ -5219,68 +6510,245 @@ type __VLS_ModelProps$1 = {
|
|
|
5219
6510
|
'width'?: number;
|
|
5220
6511
|
'visible'?: boolean;
|
|
5221
6512
|
};
|
|
5222
|
-
type __VLS_PublicProps$1 = __VLS_Props$
|
|
5223
|
-
declare const __VLS_export$
|
|
6513
|
+
type __VLS_PublicProps$1 = __VLS_Props$10 & __VLS_ModelProps$1;
|
|
6514
|
+
declare const __VLS_export$12: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
|
|
5224
6515
|
show(): Promise<void>;
|
|
5225
6516
|
hide(): Promise<void>;
|
|
5226
6517
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5227
6518
|
close: () => any;
|
|
5228
6519
|
submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
|
|
5229
6520
|
open: () => any;
|
|
5230
|
-
"update:width": (value: number) => any;
|
|
5231
6521
|
"update:visible": (value: boolean) => any;
|
|
6522
|
+
"update:width": (value: number) => any;
|
|
5232
6523
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$1> & Readonly<{
|
|
5233
6524
|
onClose?: (() => any) | undefined;
|
|
5234
6525
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
5235
6526
|
onOpen?: (() => any) | undefined;
|
|
5236
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5237
6527
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
6528
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5238
6529
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5239
|
-
declare const _default: typeof __VLS_export$
|
|
6530
|
+
declare const _default: typeof __VLS_export$12;
|
|
5240
6531
|
//#endregion
|
|
5241
6532
|
//#region temp/packages/editor/src/components/CompareForm.vue.d.ts
|
|
6533
|
+
type __VLS_Props$9 = CompareFormBaseProps & {
|
|
6534
|
+
/** 用于对比的旧值(修改前的值) */lastValue?: CompareFormBaseProps['value']; /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
|
|
6535
|
+
selfDiffFieldTypes?: string[];
|
|
6536
|
+
};
|
|
6537
|
+
declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
|
|
6538
|
+
form: ShallowRef<InstanceType<typeof MForm> | null>;
|
|
6539
|
+
config: Ref<FormConfig>;
|
|
6540
|
+
reload: () => Promise<void>;
|
|
6541
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
|
|
6542
|
+
labelWidth: string;
|
|
6543
|
+
category: CompareCategory;
|
|
6544
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6545
|
+
declare const _default$5: typeof __VLS_export$11;
|
|
6546
|
+
//#endregion
|
|
6547
|
+
//#region temp/packages/editor/src/components/ViewForm.vue.d.ts
|
|
6548
|
+
type __VLS_Props$8 = CompareFormBaseProps & {
|
|
6549
|
+
/** 是否禁用表单(默认只读展示)。 */disabled?: boolean;
|
|
6550
|
+
};
|
|
6551
|
+
declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
|
|
6552
|
+
form: ShallowRef<InstanceType<typeof MForm> | null>;
|
|
6553
|
+
config: Ref<FormConfig>;
|
|
6554
|
+
reload: () => Promise<void>;
|
|
6555
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
|
|
6556
|
+
disabled: boolean;
|
|
6557
|
+
labelWidth: string;
|
|
6558
|
+
category: CompareCategory;
|
|
6559
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
6560
|
+
declare const _default$39: typeof __VLS_export$10;
|
|
6561
|
+
//#endregion
|
|
6562
|
+
//#region temp/packages/editor/src/layouts/history-list/composables.d.ts
|
|
5242
6563
|
/**
|
|
5243
|
-
*
|
|
5244
|
-
*
|
|
5245
|
-
|
|
5246
|
-
|
|
6564
|
+
* 通用 bucket 分组(数据源 / 代码块及业务自定义历史)在面板中的展示结构。
|
|
6565
|
+
* 由 Bucket / BucketTab 复用,step 类型通过泛型 T 收窄(约束为 {@link BaseStepValue})。
|
|
6566
|
+
*/
|
|
6567
|
+
interface HistoryBucketGroup<T extends BaseStepValue = BaseStepValue> {
|
|
6568
|
+
/** 组内最后一步是否已应用 */
|
|
6569
|
+
applied: boolean;
|
|
6570
|
+
/** 是否为当前所在的分组 */
|
|
6571
|
+
isCurrent?: boolean;
|
|
6572
|
+
/** 该分组的操作类型 */
|
|
6573
|
+
opType: HistoryOpType;
|
|
6574
|
+
/** 组内所有步骤 */
|
|
6575
|
+
steps: {
|
|
6576
|
+
index: number;
|
|
6577
|
+
applied: boolean;
|
|
6578
|
+
isCurrent?: boolean;
|
|
6579
|
+
step: T;
|
|
6580
|
+
}[];
|
|
6581
|
+
}
|
|
6582
|
+
/**
|
|
6583
|
+
* 通用二次确认弹窗:清空历史 / 无法差异对比的回滚等会改变状态的操作,先弹出确认框,
|
|
6584
|
+
* 用户点击「确定」返回 true,取消(confirm reject)时返回 false 并静默忽略。
|
|
5247
6585
|
*/
|
|
5248
|
-
|
|
6586
|
+
declare const confirmHistoryAction: (message: string) => Promise<boolean>;
|
|
6587
|
+
//#endregion
|
|
6588
|
+
//#region temp/packages/editor/src/layouts/history-list/Bucket.vue.d.ts
|
|
6589
|
+
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<{
|
|
6590
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$1<{
|
|
6591
|
+
/**
|
|
6592
|
+
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
|
|
6593
|
+
* 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
|
|
6594
|
+
*/
|
|
6595
|
+
config: HistoryBucketConfig<T>; /** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
|
|
6596
|
+
bucketId: string | number; /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
|
|
6597
|
+
groups: HistoryBucketGroup<T>[]; /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
|
|
6598
|
+
expanded: Record<string, boolean>;
|
|
6599
|
+
} & {
|
|
6600
|
+
onToggle?: ((_key: string) => any) | undefined;
|
|
6601
|
+
onGoto?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
6602
|
+
"onDiff-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
6603
|
+
"onRevert-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
6604
|
+
"onGoto-initial"?: ((_bucketId: string | number) => any) | undefined;
|
|
6605
|
+
}> & (typeof globalThis extends {
|
|
6606
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6607
|
+
} ? P : {});
|
|
6608
|
+
expose: (exposed: {}) => void;
|
|
6609
|
+
attrs: any;
|
|
6610
|
+
slots: {};
|
|
6611
|
+
emit: {
|
|
6612
|
+
(_e: "toggle", _key: string): void;
|
|
6613
|
+
(_e: "goto", _bucketId: string | number, _index: number): void;
|
|
6614
|
+
(_e: "goto-initial", _bucketId: string | number): void;
|
|
6615
|
+
(_e: "diff-step", _bucketId: string | number, _index: number): void;
|
|
6616
|
+
(_e: "revert-step", _bucketId: string | number, _index: number): void;
|
|
6617
|
+
};
|
|
6618
|
+
}>) => import("vue").VNode & {
|
|
6619
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
6620
|
+
};
|
|
6621
|
+
declare const _default$22: typeof __VLS_export$9;
|
|
6622
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
6623
|
+
//#endregion
|
|
6624
|
+
//#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
|
|
6625
|
+
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<{
|
|
6626
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
6627
|
+
/**
|
|
6628
|
+
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled / showClear),
|
|
6629
|
+
* 由父组件按业务类型注入并整体透传给 Bucket,避免逐项透传多个 props。
|
|
6630
|
+
*/
|
|
6631
|
+
config: HistoryBucketConfig<T>;
|
|
6632
|
+
/**
|
|
6633
|
+
* 已按目标 id 聚拢成的 bucket 列表,每个 bucket 内部的 groups 已按时间倒序排好。
|
|
6634
|
+
* 空数组时显示空态。
|
|
6635
|
+
*/
|
|
6636
|
+
buckets: {
|
|
6637
|
+
id: string | number;
|
|
6638
|
+
groups: HistoryBucketGroup<T>[];
|
|
6639
|
+
}[];
|
|
6640
|
+
/**
|
|
6641
|
+
* 共享的折叠状态表(key -> 是否展开),由顶层 panel 统一维护。
|
|
6642
|
+
* key 形如 `${prefix}-${id}-${组内首步 index}`——以稳定的 step 索引而非展示位置标识分组,
|
|
6643
|
+
* 这样历史数据更新后已展开的分组状态仍能正确保持。
|
|
6644
|
+
*/
|
|
6645
|
+
expanded: Record<string, boolean>;
|
|
6646
|
+
} & {
|
|
6647
|
+
onClear?: (() => any) | undefined;
|
|
6648
|
+
onToggle?: ((_key: string) => any) | undefined;
|
|
6649
|
+
onGoto?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
6650
|
+
"onDiff-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
6651
|
+
"onRevert-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
6652
|
+
"onGoto-initial"?: ((_targetId: string | number) => any) | undefined;
|
|
6653
|
+
}> & (typeof globalThis extends {
|
|
6654
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6655
|
+
} ? P : {});
|
|
6656
|
+
expose: (exposed: {}) => void;
|
|
6657
|
+
attrs: any;
|
|
6658
|
+
slots: {};
|
|
6659
|
+
emit: {
|
|
6660
|
+
(_e: "toggle", _key: string): void;
|
|
6661
|
+
(_e: "goto", _targetId: string | number, _index: number): void;
|
|
6662
|
+
(_e: "goto-initial", _targetId: string | number): void;
|
|
6663
|
+
(_e: "diff-step", _targetId: string | number, _index: number): void;
|
|
6664
|
+
(_e: "revert-step", _targetId: string | number, _index: number): void;
|
|
6665
|
+
(_e: "clear"): void;
|
|
6666
|
+
};
|
|
6667
|
+
}>) => import("vue").VNode & {
|
|
6668
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
6669
|
+
};
|
|
6670
|
+
declare const _default$23: typeof __VLS_export$8;
|
|
6671
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
6672
|
+
//#endregion
|
|
6673
|
+
//#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
|
|
5249
6674
|
type __VLS_Props$7 = {
|
|
5250
|
-
/**
|
|
5251
|
-
lastValue?: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
|
|
5252
|
-
/**
|
|
5253
|
-
* 类型说明:
|
|
5254
|
-
* - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
|
|
5255
|
-
* - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
|
|
5256
|
-
* - `category` 为 `code-block` 时,`type` 可不传
|
|
5257
|
-
*/
|
|
5258
|
-
type?: string; /** 表单配置类别,决定从哪里取 FormConfig */
|
|
5259
|
-
category?: CompareCategory; /** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
|
|
5260
|
-
dataSourceType?: string;
|
|
5261
|
-
labelWidth?: string;
|
|
6675
|
+
/** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */services?: Services;
|
|
5262
6676
|
/**
|
|
5263
|
-
*
|
|
5264
|
-
*
|
|
6677
|
+
* 来自 Editor 顶层的 `extendFormState`,用于扩展 MForm.formState。
|
|
6678
|
+
* 透传给 CompareForm,从而让差异对比时表单 item 中依赖业务上下文的
|
|
6679
|
+
* `display` / `disabled` 等 filterFunction 正常工作。
|
|
5265
6680
|
*/
|
|
5266
|
-
|
|
6681
|
+
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5267
6682
|
/**
|
|
5268
|
-
*
|
|
5269
|
-
*
|
|
5270
|
-
* filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
|
|
5271
|
-
* 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
|
|
6683
|
+
* 自定义 FormConfig 加载逻辑,透传给 CompareForm。传入后将接管内置的按 `category`
|
|
6684
|
+
* 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
|
|
5272
6685
|
*/
|
|
5273
|
-
|
|
6686
|
+
loadConfig?: CompareFormLoadConfig;
|
|
6687
|
+
width?: string; /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
|
|
6688
|
+
size?: FieldSize;
|
|
6689
|
+
isConfirm?: boolean;
|
|
6690
|
+
onConfirm?: () => void;
|
|
6691
|
+
selfDiffFieldTypes?: string[];
|
|
6692
|
+
compareFormState?: FormState;
|
|
5274
6693
|
};
|
|
5275
6694
|
declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$7, {
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5280
|
-
|
|
5281
|
-
|
|
6695
|
+
open: (p: DiffDialogPayload) => void;
|
|
6696
|
+
confirm: (p: DiffDialogPayload) => Promise<boolean>;
|
|
6697
|
+
close: () => void;
|
|
6698
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6699
|
+
close: (...args: any[]) => void;
|
|
6700
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$7> & Readonly<{
|
|
6701
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
6702
|
+
}>, {
|
|
6703
|
+
width: string;
|
|
5282
6704
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5283
|
-
declare const _default$
|
|
6705
|
+
declare const _default$21: typeof __VLS_export$7;
|
|
6706
|
+
//#endregion
|
|
6707
|
+
//#region temp/packages/editor/src/layouts/history-list/useHistoryRevert.d.ts
|
|
6708
|
+
/**
|
|
6709
|
+
* 历史记录「单步回滚」与「查看差异」的完整交互流程,供历史面板与业务方共用。
|
|
6710
|
+
*
|
|
6711
|
+
* 单步回滚(类 git revert):
|
|
6712
|
+
* 1. 前置校验:目标数据已被删除(update 写回目标 / 页面 remove 的原父容器缺失)时给出「回滚失败」提示并中止;
|
|
6713
|
+
* 2. 二次确认:可差异对比的步骤(单实体 update)弹出差异确认弹窗,其余步骤弹普通二次确认框;
|
|
6714
|
+
* 3. 用户确认后执行对应 service 的 revert(页面 / 数据源 / 代码块)。
|
|
6715
|
+
*
|
|
6716
|
+
* 查看差异:可差异对比的步骤动态挂载只读 HistoryDiffDialog 展示前后值差异。
|
|
6717
|
+
*
|
|
6718
|
+
* 上述弹窗均按需动态挂载 HistoryDiffDialog 实现,业务方无需自行挂载任何弹窗。
|
|
6719
|
+
*
|
|
6720
|
+
* 返回的能力分三组:
|
|
6721
|
+
* - 内置三类(页面 / 数据源 / 代码块):`onPageRevert` / `onDataSourceRevert` / `onCodeBlockRevert` 单步回滚,
|
|
6722
|
+
* `onPageDiff` / `onDataSourceDiff` / `onCodeBlockDiff` 查看差异,及配套的 `buildXxxDiffPayload` / `isXxxRevertTargetMissing`;
|
|
6723
|
+
* - 业务自有历史(如管理台「模块」):`confirmAndRevert` / `viewDiff` 复用同一套交互流程,由业务方自行构造差异入参;
|
|
6724
|
+
* 即上述内置三类本质上是它们各自预置好 payload 构造与 service.revert 的特例。
|
|
6725
|
+
*
|
|
6726
|
+
* 业务方可在拿到 Editor 实例暴露的 `services` 后直接 import 调用:
|
|
6727
|
+
*
|
|
6728
|
+
* ```ts
|
|
6729
|
+
* import { useHistoryRevert } from '@tmagic/editor';
|
|
6730
|
+
*
|
|
6731
|
+
* const { onPageRevert, onPageDiff } = useHistoryRevert({}, editorRef.value); // editorRef.value 即 Editor 暴露的 services
|
|
6732
|
+
* await onPageRevert(index); // 弹出差异 / 二次确认弹窗后回滚
|
|
6733
|
+
* onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
|
|
6734
|
+
* ```
|
|
6735
|
+
*/
|
|
6736
|
+
declare const useHistoryRevert: (options?: UseHistoryRevertOptions, services?: Services) => {
|
|
6737
|
+
onPageRevert: (index: number) => Promise<StepValue | null | undefined>;
|
|
6738
|
+
onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null | undefined>;
|
|
6739
|
+
onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null | undefined>;
|
|
6740
|
+
onPageDiff: (index: number) => Promise<void> | void;
|
|
6741
|
+
onDataSourceDiff: (id: string | number, index: number) => Promise<void> | void;
|
|
6742
|
+
onCodeBlockDiff: (id: string | number, index: number) => Promise<void> | void;
|
|
6743
|
+
buildPageDiffPayload: (index: number) => DiffDialogPayload | null;
|
|
6744
|
+
buildDataSourceDiffPayload: (id: string | number, index: number) => DiffDialogPayload | null;
|
|
6745
|
+
buildCodeBlockDiffPayload: (id: string | number, index: number) => DiffDialogPayload | null;
|
|
6746
|
+
isPageRevertTargetMissing: (index: number) => boolean;
|
|
6747
|
+
isDataSourceRevertTargetMissing: (id: string | number, index: number) => boolean;
|
|
6748
|
+
isCodeBlockRevertTargetMissing: (id: string | number, index: number) => boolean;
|
|
6749
|
+
confirmAndRevert: <T = unknown>(revertOptions: ConfirmAndRevertOptions<T>) => Promise<T | null>;
|
|
6750
|
+
viewDiff: (payload: DiffDialogPayload | null, extra?: CustomDiffFormOptions) => Promise<void> | void;
|
|
6751
|
+
};
|
|
5284
6752
|
//#endregion
|
|
5285
6753
|
//#region temp/packages/editor/src/components/FloatingBox.vue.d.ts
|
|
5286
6754
|
interface Position {
|
|
@@ -5290,6 +6758,9 @@ interface Position {
|
|
|
5290
6758
|
type __VLS_Props$6 = {
|
|
5291
6759
|
position?: Position;
|
|
5292
6760
|
title?: string;
|
|
6761
|
+
bodyStyle?: CSSProperties; /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
|
|
6762
|
+
initialStyle?: CSSProperties; /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
|
|
6763
|
+
frameworkWidth?: number;
|
|
5293
6764
|
beforeClose?: (_done: (_cancel?: boolean) => void) => void;
|
|
5294
6765
|
};
|
|
5295
6766
|
type __VLS_ModelProps = {
|
|
@@ -5309,16 +6780,18 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
|
|
|
5309
6780
|
target: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5310
6781
|
titleEl: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5311
6782
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6783
|
+
"update:visible": (value: boolean) => any;
|
|
5312
6784
|
"update:width": (value: number) => any;
|
|
5313
6785
|
"update:height": (value: number) => any;
|
|
5314
|
-
"update:visible": (value: boolean) => any;
|
|
5315
6786
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
6787
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5316
6788
|
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5317
6789
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
|
5318
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5319
6790
|
}>, {
|
|
5320
6791
|
title: string;
|
|
5321
6792
|
position: Position;
|
|
6793
|
+
initialStyle: CSSProperties;
|
|
6794
|
+
frameworkWidth: number;
|
|
5322
6795
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5323
6796
|
declare const __VLS_export$6: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
5324
6797
|
declare const _default$20: typeof __VLS_export$6;
|
|
@@ -5371,7 +6844,7 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5371
6844
|
indent: number;
|
|
5372
6845
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5373
6846
|
declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
5374
|
-
declare const _default$
|
|
6847
|
+
declare const _default$37: typeof __VLS_export$5;
|
|
5375
6848
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
5376
6849
|
new (): {
|
|
5377
6850
|
$slots: S;
|
|
@@ -5422,7 +6895,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Prop
|
|
|
5422
6895
|
isExpandable: IsExpandableFunction;
|
|
5423
6896
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5424
6897
|
declare const __VLS_export$4: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5425
|
-
declare const _default$
|
|
6898
|
+
declare const _default$38: typeof __VLS_export$4;
|
|
5426
6899
|
type __VLS_WithSlots<T, S> = T & {
|
|
5427
6900
|
new (): {
|
|
5428
6901
|
$slots: S;
|
|
@@ -5438,7 +6911,7 @@ declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_
|
|
|
5438
6911
|
}>, {
|
|
5439
6912
|
disabled: boolean;
|
|
5440
6913
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5441
|
-
declare const _default$
|
|
6914
|
+
declare const _default$29: typeof __VLS_export$3;
|
|
5442
6915
|
//#endregion
|
|
5443
6916
|
//#region temp/packages/editor/src/fields/DisplayConds.vue.d.ts
|
|
5444
6917
|
type __VLS_Props$2 = FieldProps<DisplayCondsConfig>;
|
|
@@ -5469,11 +6942,11 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5469
6942
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
5470
6943
|
onAddDiffCount?: (() => any) | undefined;
|
|
5471
6944
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5472
|
-
declare const _default$
|
|
6945
|
+
declare const _default$33: typeof __VLS_export;
|
|
5473
6946
|
//#endregion
|
|
5474
6947
|
//#region temp/packages/editor/src/plugin.d.ts
|
|
5475
|
-
declare const _default$
|
|
6948
|
+
declare const _default$43: {
|
|
5476
6949
|
install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
|
|
5477
6950
|
};
|
|
5478
6951
|
//#endregion
|
|
5479
|
-
export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor,
|
|
6952
|
+
export { ALL_COND_OPS, AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormBaseProps, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, ContentMenuTarget, ContentMenuType, CustomContentMenuFunction, CustomDiffFormOptions, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EVENT_NAME_VALUE_SEPARATOR, EditorChangeEvent, EditorChangeEventHistoryMeta, EditorChangeItem, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EditorUpdateChangeItem, EventBus, EventBusEvent, EventNameOption, EventNameSelectOption, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, HistoryEvents, HistoryGroup, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, HistoryStepEntry, HistoryStepType, HistorySteps, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, _default$26 as LayerNodeContent, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$27 as LayerPanel, LayerPanelSlots, Layout, _default$28 as LayoutContainer, _default$28 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, NodeInvalidInfo, NodeInvalidSource, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$29 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$30 as PropsFormPanel, PropsFormValueFunction, _default$31 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$32 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$33 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$34 as TMagicCodeEditor, _default$35 as TMagicEditor, _default$36 as ToolButton, _default$37 as Tree, _default$38 as TreeNode, TreeNodeData, type TypeMatchValidateContext, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseCompareFormReturn, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, _default$39 as ViewForm, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, booleanOptions, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$40 as codeBlockService, collectEventNameOptionValues, collectRelatedNodes, _default$41 as componentListService, confirmHistoryAction, createStackStep, _default$42 as dataSourceService, debug, _default$43 as default, defaultIsExpandable, _default$44 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$45 as editorService, editorTypeMatchRules, eqOptions, error, eventTabConfig, _default$46 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getCompActionAllowedValues, getCompActionOptions, getCondOpOptionsByFieldType, getDefaultConfig, getDisplayField, getEditorConfig, getEventNameAllowedValues, getEventNameOptions, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$47 as historyService, idbDelete, idbGet, idbSet, info, isEventNameCheckStrictly, isGlobalFlat, isIncludeDataSource, isIndexedDBSupported, _default$48 as keybindingService, _default$49 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, normalizeCompActionValue, numberOptions, openIndexedDB, _default$50 as propsService, removeStyleDisplayConfig, resolveFieldByPath, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$51 as stageOverlayService, _default$52 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$53 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useCompareForm, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
|