@tmagic/editor 1.8.5 → 1.8.7
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 → Editor.vue.js} +9 -9
- package/dist/es/{Editor.js → Editor2.vue.js} +1 -1
- package/dist/es/components/{CodeBlockEditor.vue_vue_type_script_setup_true_lang.js → CodeBlockEditor.vue.js} +5 -5
- package/dist/es/components/{CodeBlockEditor.js → CodeBlockEditor2.vue.js} +1 -1
- package/dist/es/components/{CodeParams.js → CodeParams2.vue.js} +1 -1
- package/dist/es/components/{CompareForm.js → CompareForm2.vue.js} +1 -1
- package/dist/es/components/{ContentMenu.vue_vue_type_script_setup_true_lang.js → ContentMenu.vue.js} +2 -2
- package/dist/es/components/{ContentMenu.js → ContentMenu2.vue.js} +1 -1
- package/dist/es/components/{FloatingBox.vue_vue_type_script_setup_true_lang.js → FloatingBox.vue.js} +2 -2
- package/dist/es/components/{FloatingBox.js → FloatingBox2.vue.js} +1 -1
- package/dist/es/components/{Icon.js → Icon2.vue.js} +1 -1
- package/dist/es/components/{Resizer.js → Resizer2.vue.js} +1 -1
- package/dist/es/components/{ScrollBar.js → ScrollBar2.vue.js} +1 -1
- package/dist/es/components/{ScrollViewer.vue_vue_type_script_setup_true_lang.js → ScrollViewer.vue.js} +3 -3
- package/dist/es/components/{ScrollViewer.js → ScrollViewer2.vue.js} +1 -1
- package/dist/es/components/{SearchInput.js → SearchInput2.vue.js} +1 -1
- package/dist/es/components/{SplitView.vue_vue_type_script_setup_true_lang.js → SplitView.vue.js} +1 -1
- package/dist/es/components/{SplitView.js → SplitView2.vue.js} +1 -1
- package/dist/es/components/{ToolButton.vue_vue_type_script_setup_true_lang.js → ToolButton.vue.js} +3 -3
- package/dist/es/components/{ToolButton.js → ToolButton2.vue.js} +1 -1
- package/dist/es/components/{Tree.vue_vue_type_script_setup_true_lang.js → Tree.vue.js} +1 -1
- package/dist/es/components/{Tree.js → Tree2.vue.js} +1 -1
- package/dist/es/components/{TreeNode.vue_vue_type_script_setup_true_lang.js → TreeNode.vue.js} +2 -2
- package/dist/es/components/{TreeNode.js → TreeNode2.vue.js} +1 -1
- package/dist/es/components/{ViewForm.js → ViewForm2.vue.js} +1 -1
- package/dist/es/fields/{Code.vue_vue_type_script_setup_true_lang.js → Code.vue.js} +1 -1
- package/dist/es/fields/{Code.js → Code2.vue.js} +1 -1
- package/dist/es/fields/{CodeLink.js → CodeLink2.vue.js} +1 -1
- package/dist/es/fields/{CodeSelect.js → CodeSelect2.vue.js} +1 -1
- package/dist/es/fields/{CodeSelectCol.vue_vue_type_script_setup_true_lang.js → CodeSelectCol.vue.js} +7 -7
- package/dist/es/fields/{CodeSelectCol.js → CodeSelectCol2.vue.js} +1 -1
- package/dist/es/fields/{CondOpSelect.js → CondOpSelect2.vue.js} +1 -1
- package/dist/es/fields/DataSourceFieldSelect/{FieldSelect.vue_vue_type_script_setup_true_lang.js → FieldSelect.vue.js} +55 -14
- package/dist/es/fields/DataSourceFieldSelect/{FieldSelect.js → FieldSelect2.vue.js} +1 -1
- package/dist/es/fields/DataSourceFieldSelect/{Index.vue_vue_type_script_setup_true_lang.js → Index.vue.js} +7 -7
- package/dist/es/fields/DataSourceFieldSelect/{Index.js → Index2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceFields.vue_vue_type_script_setup_true_lang.js → DataSourceFields.vue.js} +50 -17
- package/dist/es/fields/{DataSourceFields.js → DataSourceFields2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceInput.vue_vue_type_script_setup_true_lang.js → DataSourceInput.vue.js} +5 -5
- package/dist/es/fields/{DataSourceInput.js → DataSourceInput2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js → DataSourceMethodSelect.vue.js} +7 -7
- package/dist/es/fields/{DataSourceMethodSelect.js → DataSourceMethodSelect2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceMethods.vue_vue_type_script_setup_true_lang.js → DataSourceMethods.vue.js} +3 -3
- package/dist/es/fields/{DataSourceMethods.js → DataSourceMethods2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceMocks.vue_vue_type_script_setup_true_lang.js → DataSourceMocks.vue.js} +8 -8
- package/dist/es/fields/{DataSourceMocks.js → DataSourceMocks2.vue.js} +1 -1
- package/dist/es/fields/{DataSourceSelect.vue_vue_type_script_setup_true_lang.js → DataSourceSelect.vue.js} +5 -5
- package/dist/es/fields/{DataSourceSelect.js → DataSourceSelect2.vue.js} +1 -1
- package/dist/es/fields/{DisplayConds.js → DisplayConds2.vue.js} +1 -1
- package/dist/es/fields/{EventSelect.js → EventSelect2.vue.js} +1 -1
- package/dist/es/fields/{KeyValue.vue_vue_type_script_setup_true_lang.js → KeyValue.vue.js} +3 -3
- package/dist/es/fields/{KeyValue.js → KeyValue2.vue.js} +1 -1
- package/dist/es/fields/{PageFragmentSelect.vue_vue_type_script_setup_true_lang.js → PageFragmentSelect.vue.js} +4 -4
- package/dist/es/fields/{PageFragmentSelect.js → PageFragmentSelect2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/{Index.vue_vue_type_script_setup_true_lang.js → Index.vue.js} +7 -7
- package/dist/es/fields/StyleSetter/{Index.js → Index2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/components/{BackgroundPosition.js → BackgroundPosition2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/components/{Border.js → Border2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/components/{Box.js → Box2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/configs.js +43 -43
- package/dist/es/fields/StyleSetter/pro/{Background.js → Background2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Border.vue_vue_type_script_setup_true_lang.js → Border.vue.js} +3 -3
- package/dist/es/fields/StyleSetter/pro/{Border.js → Border2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Font.js → Font2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Layout.vue_vue_type_script_setup_true_lang.js → Layout.vue.js} +4 -4
- package/dist/es/fields/StyleSetter/pro/{Layout.js → Layout2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Position.js → Position2.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Transform.js → Transform2.vue.js} +1 -1
- package/dist/es/fields/{UISelect.js → UISelect2.vue.js} +1 -1
- package/dist/es/fields/configs/codeSelect.js +2 -2
- package/dist/es/fields/configs/displayConds.js +1 -1
- package/dist/es/fields/configs/eventSelect.js +3 -3
- package/dist/es/fields/headless-validation.js +1 -1
- package/dist/es/hooks/use-code-block-edit.js +1 -1
- package/dist/es/hooks/use-compare-form.js +1 -1
- package/dist/es/hooks/use-editor-content-height.js +1 -1
- package/dist/es/hooks/use-filter.js +2 -2
- package/dist/es/hooks/use-float-box.js +1 -1
- package/dist/es/hooks/use-form-context.js +1 -1
- package/dist/es/hooks/use-node-status.js +1 -1
- package/dist/es/hooks/use-stage.js +28 -3
- package/dist/es/icons/{CenterIcon.js → CenterIcon2.vue.js} +1 -1
- package/dist/es/icons/{CodeIcon.js → CodeIcon2.vue.js} +1 -1
- package/dist/es/icons/{FolderMinusIcon.js → FolderMinusIcon2.vue.js} +1 -1
- package/dist/es/index.js +47 -47
- package/dist/es/initService.js +9 -9
- package/dist/es/layouts/{AddPageBox.vue_vue_type_script_setup_true_lang.js → AddPageBox.vue.js} +4 -4
- package/dist/es/layouts/{AddPageBox.js → AddPageBox2.vue.js} +1 -1
- package/dist/es/layouts/{CodeEditor.vue_vue_type_script_setup_true_lang.js → CodeEditor.vue.js} +5 -5
- package/dist/es/layouts/{CodeEditor.js → CodeEditor2.vue.js} +1 -1
- package/dist/es/layouts/{Framework.vue_vue_type_script_setup_true_lang.js → Framework.vue.js} +5 -5
- package/dist/es/layouts/{Framework.js → Framework2.vue.js} +1 -1
- package/dist/es/layouts/{NavMenu.vue_vue_type_script_setup_true_lang.js → NavMenu.vue.js} +5 -5
- package/dist/es/layouts/{NavMenu.js → NavMenu2.vue.js} +1 -1
- package/dist/es/layouts/{NavMenuColumn.vue_vue_type_script_setup_true_lang.js → NavMenuColumn.vue.js} +14 -6
- package/dist/es/layouts/{NavMenuColumn.js → NavMenuColumn2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{Bucket.vue_vue_type_script_setup_true_lang.js → Bucket.vue.js} +23 -7
- package/dist/es/layouts/history-list/{Bucket.js → Bucket2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{BucketTab.vue_vue_type_script_setup_true_lang.js → BucketTab.vue.js} +9 -4
- package/dist/es/layouts/history-list/{BucketTab.js → BucketTab2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{GroupRow.js → GroupRow2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js → HistoryDiffDialog.vue.js} +3 -3
- package/dist/es/layouts/history-list/{HistoryDiffDialog.js → HistoryDiffDialog2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{HistoryListPanel.vue_vue_type_script_setup_true_lang.js → HistoryListPanel.vue.js} +24 -6
- package/dist/es/layouts/history-list/{HistoryListPanel.js → HistoryListPanel2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{InitialRow.vue_vue_type_script_setup_true_lang.js → InitialRow.vue.js} +16 -5
- package/dist/es/layouts/history-list/{InitialRow.js → InitialRow2.vue.js} +1 -1
- package/dist/es/layouts/history-list/{PageTab.vue_vue_type_script_setup_true_lang.js → PageTab.vue.js} +20 -8
- package/dist/es/layouts/history-list/{PageTab.js → PageTab2.vue.js} +1 -1
- package/dist/es/layouts/history-list/composables.js +1 -1
- package/dist/es/layouts/history-list/useHistoryList.js +1 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +3 -3
- package/dist/es/layouts/page-bar/{AddButton.vue_vue_type_script_setup_true_lang.js → AddButton.vue.js} +6 -6
- package/dist/es/layouts/page-bar/{AddButton.js → AddButton2.vue.js} +1 -1
- package/dist/es/layouts/page-bar/{PageBar.vue_vue_type_script_setup_true_lang.js → PageBar.vue.js} +8 -8
- package/dist/es/layouts/page-bar/{PageBar.js → PageBar2.vue.js} +1 -1
- package/dist/es/layouts/page-bar/{PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js → PageBarScrollContainer.vue.js} +2 -2
- package/dist/es/layouts/page-bar/{PageBarScrollContainer.js → PageBarScrollContainer2.vue.js} +1 -1
- package/dist/es/layouts/page-bar/{PageList.vue_vue_type_script_setup_true_lang.js → PageList.vue.js} +3 -3
- package/dist/es/layouts/page-bar/{PageList.js → PageList2.vue.js} +1 -1
- package/dist/es/layouts/page-bar/{Search.vue_vue_type_script_setup_true_lang.js → Search.vue.js} +3 -3
- package/dist/es/layouts/page-bar/{Search.js → Search2.vue.js} +1 -1
- package/dist/es/layouts/props-panel/{FormPanel.vue_vue_type_script_setup_true_lang.js → FormPanel.vue.js} +7 -7
- package/dist/es/layouts/props-panel/{FormPanel.js → FormPanel2.vue.js} +1 -1
- package/dist/es/layouts/props-panel/{PropsPanel.vue_vue_type_script_setup_true_lang.js → PropsPanel.vue.js} +7 -7
- package/dist/es/layouts/props-panel/{PropsPanel.js → PropsPanel2.vue.js} +1 -1
- package/dist/es/layouts/props-panel/use-style-panel.js +1 -1
- package/dist/es/layouts/sidebar/{ComponentListPanel.vue_vue_type_script_setup_true_lang.js → ComponentListPanel.vue.js} +7 -7
- package/dist/es/layouts/sidebar/{ComponentListPanel.js → ComponentListPanel2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/{Sidebar.vue_vue_type_script_setup_true_lang.js → Sidebar.vue.js} +8 -8
- package/dist/es/layouts/sidebar/{Sidebar.js → Sidebar2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/code-block/{CodeBlockList.vue_vue_type_script_setup_true_lang.js → CodeBlockList.vue.js} +5 -5
- package/dist/es/layouts/sidebar/code-block/{CodeBlockList.js → CodeBlockList2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/code-block/{CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js → CodeBlockListPanel.vue.js} +6 -6
- package/dist/es/layouts/sidebar/code-block/{CodeBlockListPanel.js → CodeBlockListPanel2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +1 -1
- package/dist/es/layouts/sidebar/data-source/{DataSourceAddButton.vue_vue_type_script_setup_true_lang.js → DataSourceAddButton.vue.js} +2 -2
- package/dist/es/layouts/sidebar/data-source/{DataSourceAddButton.js → DataSourceAddButton2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/data-source/{DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js → DataSourceConfigPanel.vue.js} +4 -4
- package/dist/es/layouts/sidebar/data-source/{DataSourceConfigPanel.js → DataSourceConfigPanel2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/data-source/{DataSourceList.vue_vue_type_script_setup_true_lang.js → DataSourceList.vue.js} +5 -5
- package/dist/es/layouts/sidebar/data-source/{DataSourceList.js → DataSourceList2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/data-source/{DataSourceListPanel.vue_vue_type_script_setup_true_lang.js → DataSourceListPanel.vue.js} +8 -8
- package/dist/es/layouts/sidebar/data-source/{DataSourceListPanel.js → DataSourceListPanel2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +1 -1
- package/dist/es/layouts/sidebar/layer/{LayerMenu.vue_vue_type_script_setup_true_lang.js → LayerMenu.vue.js} +5 -5
- package/dist/es/layouts/sidebar/layer/{LayerMenu.js → LayerMenu2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/layer/{LayerNodeContent.vue_vue_type_script_setup_true_lang.js → LayerNodeContent.vue.js} +3 -3
- package/dist/es/layouts/sidebar/layer/{LayerNodeContent.js → LayerNodeContent2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/layer/{LayerNodeTool.js → LayerNodeTool2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/layer/{LayerPanel.vue_vue_type_script_setup_true_lang.js → LayerPanel.vue.js} +7 -7
- package/dist/es/layouts/sidebar/layer/{LayerPanel.js → LayerPanel2.vue.js} +1 -1
- package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
- package/dist/es/layouts/sidebar/layer/use-drag.js +1 -1
- package/dist/es/layouts/sidebar/layer/use-keybinding.js +1 -1
- package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
- package/dist/es/layouts/workspace/{Breadcrumb.js → Breadcrumb2.vue.js} +1 -1
- package/dist/es/layouts/workspace/{Workspace.vue_vue_type_script_setup_true_lang.js → Workspace.vue.js} +3 -3
- package/dist/es/layouts/workspace/{Workspace.js → Workspace2.vue.js} +1 -1
- package/dist/es/layouts/workspace/viewer/{NodeListMenu.vue_vue_type_script_setup_true_lang.js → NodeListMenu.vue.js} +5 -5
- package/dist/es/layouts/workspace/viewer/{NodeListMenu.js → NodeListMenu2.vue.js} +1 -1
- package/dist/es/layouts/workspace/viewer/{Stage.vue_vue_type_script_setup_true_lang.js → Stage.vue.js} +70 -55
- package/dist/es/layouts/workspace/viewer/{Stage.js → Stage2.vue.js} +1 -1
- package/dist/es/layouts/workspace/viewer/{StageOverlay.vue_vue_type_script_setup_true_lang.js → StageOverlay.vue.js} +3 -3
- package/dist/es/layouts/workspace/viewer/{StageOverlay.js → StageOverlay2.vue.js} +1 -1
- package/dist/es/layouts/workspace/viewer/{ViewerMenu.vue_vue_type_script_setup_true_lang.js → ViewerMenu.vue.js} +6 -6
- package/dist/es/layouts/workspace/viewer/{ViewerMenu.js → ViewerMenu2.vue.js} +1 -1
- package/dist/es/plugin.js +24 -24
- package/dist/es/sdk/index.js +2 -2
- package/dist/es/sdk/services/CodeBlock.js +18 -18
- package/dist/es/sdk/services/DataSource.js +17 -17
- package/dist/es/sdk/services/Dep.js +3 -3
- package/dist/es/sdk/services/Editor.js +116 -81
- package/dist/es/sdk/services/Events.js +2 -2
- package/dist/es/sdk/services/History.js +45 -7
- package/dist/es/sdk/services/Props.js +6 -6
- package/dist/es/sdk/services/WebStorage.js +1 -1
- package/dist/es/sdk/utils/dep.js +2 -2
- package/dist/es/sdk/utils/operator.js +3 -3
- package/dist/es/sdk/validate/index.js +4 -4
- package/dist/es/sdk/wiring.js +2 -2
- package/dist/es/services/keybinding.js +2 -2
- package/dist/es/services/stageOverlay.js +2 -2
- package/dist/es/services/ui.js +2 -2
- package/dist/es/utils/code-block.js +2 -2
- package/dist/es/utils/content-menu.js +3 -3
- package/dist/es/utils/data-source/index.js +88 -5
- package/dist/es/utils/dep/collect-worker-client.js +1 -1
- package/dist/es/utils/dep/idle-task.js +1 -1
- package/dist/es/utils/editor.js +7 -6
- package/dist/es/utils/event.js +1 -1
- package/dist/es/utils/history.js +29 -10
- package/dist/es/utils/operator.js +1 -1
- package/dist/es/utils/page.js +21 -0
- package/dist/es/utils/props.js +1 -1
- package/dist/es/utils/type-match-rules.js +4 -4
- package/dist/es/utils/undo-redo.js +57 -9
- package/dist/tmagic-editor-headless.umd.cjs +257 -87
- package/dist/tmagic-editor-sdk.umd.cjs +225 -84
- package/dist/tmagic-editor.umd.cjs +814 -241
- package/package.json +8 -8
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +68 -9
- package/src/fields/DataSourceFields.vue +53 -10
- package/src/fields/DataSourceMocks.vue +2 -2
- package/src/hooks/use-stage.ts +26 -1
- package/src/layouts/NavMenuColumn.vue +8 -1
- package/src/layouts/history-list/Bucket.vue +30 -16
- package/src/layouts/history-list/BucketTab.vue +8 -1
- package/src/layouts/history-list/HistoryListPanel.vue +27 -0
- package/src/layouts/history-list/InitialRow.vue +17 -5
- package/src/layouts/history-list/PageTab.vue +32 -18
- package/src/layouts/workspace/viewer/Stage.vue +77 -57
- package/src/sdk/services/Editor.ts +56 -26
- package/src/sdk/services/History.ts +58 -11
- package/src/type.ts +19 -3
- package/src/utils/data-source/index.ts +151 -6
- package/src/utils/editor.ts +4 -0
- package/src/utils/history.ts +35 -10
- package/src/utils/page.ts +32 -0
- package/src/utils/undo-redo.ts +76 -12
- package/types/headless.d.ts +14 -3
- package/types/index.d.ts +234 -314
- package/types/sdk.d.ts +79 -59
- package/dist/es/components/{CodeParams.vue_vue_type_script_setup_true_lang.js → CodeParams.vue.js} +2 -2
- package/dist/es/components/{CompareForm.vue_vue_type_script_setup_true_lang.js → CompareForm.vue.js} +3 -3
- package/dist/es/components/{Icon.vue_vue_type_script_setup_true_lang.js → Icon.vue.js} +1 -1
- package/dist/es/components/{Resizer.vue_vue_type_script_setup_true_lang.js → Resizer.vue.js} +1 -1
- package/dist/es/components/{ScrollBar.vue_vue_type_script_setup_true_lang.js → ScrollBar.vue.js} +0 -0
- package/dist/es/components/{SearchInput.vue_vue_type_script_setup_true_lang.js → SearchInput.vue.js} +1 -1
- package/dist/es/components/{ViewForm.vue_vue_type_script_setup_true_lang.js → ViewForm.vue.js} +2 -2
- package/dist/es/fields/{CodeLink.vue_vue_type_script_setup_true_lang.js → CodeLink.vue.js} +1 -1
- package/dist/es/fields/{CodeSelect.vue_vue_type_script_setup_true_lang.js → CodeSelect.vue.js} +2 -2
- package/dist/es/fields/{CondOpSelect.vue_vue_type_script_setup_true_lang.js → CondOpSelect.vue.js} +3 -3
- package/dist/es/fields/{DisplayConds.vue_vue_type_script_setup_true_lang.js → DisplayConds.vue.js} +2 -2
- package/dist/es/fields/{EventSelect.vue_vue_type_script_setup_true_lang.js → EventSelect.vue.js} +2 -2
- package/dist/es/fields/StyleSetter/components/{BackgroundPosition.vue_vue_type_script_setup_true_lang.js → BackgroundPosition.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/components/{Border.vue_vue_type_script_setup_true_lang.js → Border.vue.js} +2 -2
- package/dist/es/fields/StyleSetter/components/{Box.vue_vue_type_script_setup_true_lang.js → Box.vue.js} +0 -0
- package/dist/es/fields/StyleSetter/icons/align-items/{Baseline.js → Baseline.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{Center.js → Center.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{End.js → End.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{FlexEnd.js → FlexEnd.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{FlexStart.js → FlexStart.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{Normal.js → Normal.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{SpaceAround.js → SpaceAround.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{SpaceBetween.js → SpaceBetween.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{Start.js → Start.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/{Stretch.js → Stretch.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{NoRepeat.js → NoRepeat.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{Repeat.js → Repeat.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{RepeatX.js → RepeatX.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{RepeatY.js → RepeatY.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{Round.js → Round.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/{Space.js → Space.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{Block.js → Block.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{Flex.js → Flex.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{Grid.js → Grid.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{Inline.js → Inline.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{InlineBlock.js → InlineBlock.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{InlineFlex.js → InlineFlex.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{InlineGrid.js → InlineGrid.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/display/{None.js → None.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/{Column.js → Column.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/{ColumnReverse.js → ColumnReverse.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/{Row.js → Row.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/{RowReverse.js → RowReverse.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{Center.js → Center.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{FlexEnd.js → FlexEnd.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{FlexStart.js → FlexStart.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceAround.js → SpaceAround.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceBetween.js → SpaceBetween.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceEvenly.js → SpaceEvenly.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{Center.js → Center.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{End.js → End.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{Justify.js → Justify.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{Left.js → Left.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{MatchParent.js → MatchParent.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{Right.js → Right.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/{Start.js → Start.vue.js} +1 -1
- package/dist/es/fields/StyleSetter/pro/{Background.vue_vue_type_script_setup_true_lang.js → Background.vue.js} +2 -2
- package/dist/es/fields/StyleSetter/pro/{Font.vue_vue_type_script_setup_true_lang.js → Font.vue.js} +2 -2
- package/dist/es/fields/StyleSetter/pro/{Position.vue_vue_type_script_setup_true_lang.js → Position.vue.js} +2 -2
- package/dist/es/fields/StyleSetter/pro/{Transform.vue_vue_type_script_setup_true_lang.js → Transform.vue.js} +2 -2
- package/dist/es/fields/{UISelect.vue_vue_type_script_setup_true_lang.js → UISelect.vue.js} +5 -5
- package/dist/es/icons/{CenterIcon.vue_vue_type_script_setup_true_lang.js → CenterIcon.vue.js} +0 -0
- package/dist/es/icons/{CodeIcon.vue_vue_type_script_setup_true_lang.js → CodeIcon.vue.js} +0 -0
- package/dist/es/icons/{DatasourceIcon.js → DatasourceIcon.vue.js} +1 -1
- package/dist/es/icons/{FolderMinusIcon.vue_vue_type_script_setup_true_lang.js → FolderMinusIcon.vue.js} +0 -0
- package/dist/es/layouts/history-list/{GroupRow.vue_vue_type_script_setup_true_lang.js → GroupRow.vue.js} +1 -1
- package/dist/es/layouts/sidebar/layer/{LayerNodeTool.vue_vue_type_script_setup_true_lang.js → LayerNodeTool.vue.js} +2 -2
- package/dist/es/layouts/workspace/{Breadcrumb.vue_vue_type_script_setup_true_lang.js → Breadcrumb.vue.js} +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@tmagic/form"), require("@tmagic/table"), require("@tmagic/stage"), require("@tmagic/design"), require("@tmagic/utils"), require("@tmagic/core"), require("vue"), require("
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@tmagic/form"), require("@tmagic/table"), require("@tmagic/stage"), require("@tmagic/design"), require("@tmagic/utils"), require("@tmagic/core"), require("vue"), require("events"), require("gesto"), require("serialize-javascript"), require("@element-plus/icons-vue"), require("deep-object-diff"), require("sortablejs"), require("moveable"), require("@tmagic/form/headless"), require("keycon"), require("@tmagic/design/headless")) : typeof define === "function" && define.amd ? define([
|
|
3
3
|
"exports",
|
|
4
4
|
"@tmagic/form",
|
|
5
5
|
"@tmagic/table",
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"@tmagic/utils",
|
|
9
9
|
"@tmagic/core",
|
|
10
10
|
"vue",
|
|
11
|
-
"deep-object-diff",
|
|
12
|
-
"serialize-javascript",
|
|
13
11
|
"events",
|
|
14
|
-
"@tmagic/form/headless",
|
|
15
12
|
"gesto",
|
|
16
|
-
"
|
|
13
|
+
"serialize-javascript",
|
|
17
14
|
"@element-plus/icons-vue",
|
|
15
|
+
"deep-object-diff",
|
|
18
16
|
"sortablejs",
|
|
19
17
|
"moveable",
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
"@tmagic/form/headless",
|
|
19
|
+
"keycon",
|
|
20
|
+
"@tmagic/design/headless"
|
|
21
|
+
], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.TMagicEditor = {}, global._tmagic_form, global._tmagic_table, global._tmagic_stage, global._tmagic_design, global._tmagic_utils, global._tmagic_core, global.Vue, global.events, global.gesto, global.serialize_javascript, global._element_plus_icons_vue, global.deep_object_diff, global.sortablejs, global.moveable, global._tmagic_form_headless, global.keycon, global._tmagic_design_headless));
|
|
22
|
+
})(this, function(exports, _tmagic_form, _tmagic_table, _tmagic_stage, _tmagic_design, _tmagic_utils, _tmagic_core, vue, events, gesto, serialize_javascript, _element_plus_icons_vue, deep_object_diff, sortablejs, moveable, _tmagic_form_headless, keycon, _tmagic_design_headless) {
|
|
23
23
|
Object.defineProperties(exports, {
|
|
24
24
|
__esModule: { value: true },
|
|
25
25
|
[Symbol.toStringTag]: { value: "Module" }
|
|
@@ -39,22 +39,24 @@
|
|
|
39
39
|
throw err = [e], e;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
var __exportAll = (all,
|
|
43
|
-
let target = {};
|
|
42
|
+
var __exportAll = (all, flags) => {
|
|
43
|
+
let target = Object.setPrototypeOf({}, null);
|
|
44
44
|
for (var name in all) __defProp(target, name, {
|
|
45
45
|
get: all[name],
|
|
46
46
|
enumerable: true
|
|
47
47
|
});
|
|
48
|
-
if (!
|
|
49
|
-
return target;
|
|
48
|
+
if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
49
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
50
50
|
};
|
|
51
51
|
var __copyProps = (to, from, except, desc) => {
|
|
52
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
53
|
-
key
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
53
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
54
|
+
desc = __getOwnPropDesc(from, key);
|
|
55
|
+
__defProp(to, key, {
|
|
56
|
+
get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
|
|
57
|
+
enumerable: !desc || desc.enumerable
|
|
58
|
+
});
|
|
59
|
+
}
|
|
58
60
|
}
|
|
59
61
|
return to;
|
|
60
62
|
};
|
|
@@ -66,8 +68,8 @@
|
|
|
66
68
|
_tmagic_table = __toESM(_tmagic_table, 1);
|
|
67
69
|
_tmagic_stage = __toESM(_tmagic_stage, 1);
|
|
68
70
|
_tmagic_design = __toESM(_tmagic_design, 1);
|
|
69
|
-
serialize_javascript = __toESM(serialize_javascript, 1);
|
|
70
71
|
gesto = __toESM(gesto, 1);
|
|
72
|
+
serialize_javascript = __toESM(serialize_javascript, 1);
|
|
71
73
|
sortablejs = __toESM(sortablejs, 1);
|
|
72
74
|
moveable = __toESM(moveable, 1);
|
|
73
75
|
keycon = __toESM(keycon, 1);
|
|
@@ -214,7 +216,7 @@
|
|
|
214
216
|
* @returns {string} Returns the raw `toStringTag`.
|
|
215
217
|
*/
|
|
216
218
|
function getRawTag(value) {
|
|
217
|
-
var isOwn = hasOwnProperty$
|
|
219
|
+
var isOwn = hasOwnProperty$15.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
218
220
|
try {
|
|
219
221
|
value[symToStringTag$1] = void 0;
|
|
220
222
|
var unmasked = true;
|
|
@@ -226,11 +228,11 @@
|
|
|
226
228
|
}
|
|
227
229
|
return result;
|
|
228
230
|
}
|
|
229
|
-
var objectProto$4, hasOwnProperty$
|
|
231
|
+
var objectProto$4, hasOwnProperty$15, nativeObjectToString$1, symToStringTag$1;
|
|
230
232
|
var init__getRawTag = __esmMin((() => {
|
|
231
233
|
init__Symbol();
|
|
232
234
|
objectProto$4 = Object.prototype;
|
|
233
|
-
hasOwnProperty$
|
|
235
|
+
hasOwnProperty$15 = objectProto$4.hasOwnProperty;
|
|
234
236
|
nativeObjectToString$1 = objectProto$4.toString;
|
|
235
237
|
symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
236
238
|
}));
|
|
@@ -433,7 +435,7 @@
|
|
|
433
435
|
* _.isObject(null);
|
|
434
436
|
* // => false
|
|
435
437
|
*/
|
|
436
|
-
function isObject(value) {
|
|
438
|
+
function isObject$1(value) {
|
|
437
439
|
var type = typeof value;
|
|
438
440
|
return value != null && (type == "object" || type == "function");
|
|
439
441
|
}
|
|
@@ -465,9 +467,9 @@
|
|
|
465
467
|
function toNumber(value) {
|
|
466
468
|
if (typeof value == "number") return value;
|
|
467
469
|
if (isSymbol(value)) return NAN;
|
|
468
|
-
if (isObject(value)) {
|
|
470
|
+
if (isObject$1(value)) {
|
|
469
471
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
470
|
-
value = isObject(other) ? other + "" : other;
|
|
472
|
+
value = isObject$1(other) ? other + "" : other;
|
|
471
473
|
}
|
|
472
474
|
if (typeof value != "string") return value === 0 ? value : +value;
|
|
473
475
|
value = baseTrim(value);
|
|
@@ -525,7 +527,7 @@
|
|
|
525
527
|
* // => false
|
|
526
528
|
*/
|
|
527
529
|
function isFunction(value) {
|
|
528
|
-
if (!isObject(value)) return false;
|
|
530
|
+
if (!isObject$1(value)) return false;
|
|
529
531
|
var tag = baseGetTag(value);
|
|
530
532
|
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
531
533
|
}
|
|
@@ -596,10 +598,10 @@
|
|
|
596
598
|
* else `false`.
|
|
597
599
|
*/
|
|
598
600
|
function baseIsNative(value) {
|
|
599
|
-
if (!isObject(value) || isMasked(value)) return false;
|
|
601
|
+
if (!isObject$1(value) || isMasked(value)) return false;
|
|
600
602
|
return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
601
603
|
}
|
|
602
|
-
var reRegExpChar, reIsHostCtor, funcProto$1, objectProto$3, funcToString$1, hasOwnProperty$
|
|
604
|
+
var reRegExpChar, reIsHostCtor, funcProto$1, objectProto$3, funcToString$1, hasOwnProperty$14, reIsNative;
|
|
603
605
|
var init__baseIsNative = __esmMin((() => {
|
|
604
606
|
init_isFunction();
|
|
605
607
|
init__isMasked();
|
|
@@ -610,8 +612,8 @@
|
|
|
610
612
|
funcProto$1 = Function.prototype;
|
|
611
613
|
objectProto$3 = Object.prototype;
|
|
612
614
|
funcToString$1 = funcProto$1.toString;
|
|
613
|
-
hasOwnProperty$
|
|
614
|
-
reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$
|
|
615
|
+
hasOwnProperty$14 = objectProto$3.hasOwnProperty;
|
|
616
|
+
reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$14).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
615
617
|
}));
|
|
616
618
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js
|
|
617
619
|
/**
|
|
@@ -658,7 +660,7 @@
|
|
|
658
660
|
baseCreate = function() {
|
|
659
661
|
function object() {}
|
|
660
662
|
return function(proto) {
|
|
661
|
-
if (!isObject(proto)) return {};
|
|
663
|
+
if (!isObject$1(proto)) return {};
|
|
662
664
|
if (objectCreate) return objectCreate(proto);
|
|
663
665
|
object.prototype = proto;
|
|
664
666
|
var result = new object();
|
|
@@ -919,7 +921,7 @@
|
|
|
919
921
|
}
|
|
920
922
|
var MAX_SAFE_INTEGER$1, reIsUint;
|
|
921
923
|
var init__isIndex = __esmMin((() => {
|
|
922
|
-
MAX_SAFE_INTEGER$1 =
|
|
924
|
+
MAX_SAFE_INTEGER$1 = 0x1fffffffffffff;
|
|
923
925
|
reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
924
926
|
}));
|
|
925
927
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js
|
|
@@ -994,13 +996,13 @@
|
|
|
994
996
|
*/
|
|
995
997
|
function assignValue(object, key, value) {
|
|
996
998
|
var objValue = object[key];
|
|
997
|
-
if (!(hasOwnProperty$
|
|
999
|
+
if (!(hasOwnProperty$13.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
|
|
998
1000
|
}
|
|
999
|
-
var hasOwnProperty$
|
|
1001
|
+
var hasOwnProperty$13;
|
|
1000
1002
|
var init__assignValue = __esmMin((() => {
|
|
1001
1003
|
init__baseAssignValue();
|
|
1002
1004
|
init_eq();
|
|
1003
|
-
hasOwnProperty$
|
|
1005
|
+
hasOwnProperty$13 = Object.prototype.hasOwnProperty;
|
|
1004
1006
|
}));
|
|
1005
1007
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js
|
|
1006
1008
|
/**
|
|
@@ -1106,7 +1108,7 @@
|
|
|
1106
1108
|
}
|
|
1107
1109
|
var MAX_SAFE_INTEGER;
|
|
1108
1110
|
var init_isLength = __esmMin((() => {
|
|
1109
|
-
MAX_SAFE_INTEGER =
|
|
1111
|
+
MAX_SAFE_INTEGER = 0x1fffffffffffff;
|
|
1110
1112
|
}));
|
|
1111
1113
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
|
|
1112
1114
|
/**
|
|
@@ -1153,7 +1155,7 @@
|
|
|
1153
1155
|
* else `false`.
|
|
1154
1156
|
*/
|
|
1155
1157
|
function isIterateeCall(value, index, object) {
|
|
1156
|
-
if (!isObject(object)) return false;
|
|
1158
|
+
if (!isObject$1(object)) return false;
|
|
1157
1159
|
var type = typeof index;
|
|
1158
1160
|
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
|
|
1159
1161
|
return false;
|
|
@@ -1242,17 +1244,17 @@
|
|
|
1242
1244
|
argsTag$3 = "[object Arguments]";
|
|
1243
1245
|
}));
|
|
1244
1246
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js
|
|
1245
|
-
var objectProto$1, hasOwnProperty$
|
|
1247
|
+
var objectProto$1, hasOwnProperty$12, propertyIsEnumerable$1, isArguments;
|
|
1246
1248
|
var init_isArguments = __esmMin((() => {
|
|
1247
1249
|
init__baseIsArguments();
|
|
1248
1250
|
init_isObjectLike();
|
|
1249
1251
|
objectProto$1 = Object.prototype;
|
|
1250
|
-
hasOwnProperty$
|
|
1252
|
+
hasOwnProperty$12 = objectProto$1.hasOwnProperty;
|
|
1251
1253
|
propertyIsEnumerable$1 = objectProto$1.propertyIsEnumerable;
|
|
1252
1254
|
isArguments = baseIsArguments(function() {
|
|
1253
1255
|
return arguments;
|
|
1254
1256
|
}()) ? baseIsArguments : function(value) {
|
|
1255
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
1257
|
+
return isObjectLike(value) && hasOwnProperty$12.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
1256
1258
|
};
|
|
1257
1259
|
}));
|
|
1258
1260
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js
|
|
@@ -1376,10 +1378,10 @@
|
|
|
1376
1378
|
*/
|
|
1377
1379
|
function arrayLikeKeys(value, inherited) {
|
|
1378
1380
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
1379
|
-
for (var key in value) if ((inherited || hasOwnProperty$
|
|
1381
|
+
for (var key in value) if ((inherited || hasOwnProperty$11.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
|
|
1380
1382
|
return result;
|
|
1381
1383
|
}
|
|
1382
|
-
var hasOwnProperty$
|
|
1384
|
+
var hasOwnProperty$11;
|
|
1383
1385
|
var init__arrayLikeKeys = __esmMin((() => {
|
|
1384
1386
|
init__baseTimes();
|
|
1385
1387
|
init_isArguments();
|
|
@@ -1387,7 +1389,7 @@
|
|
|
1387
1389
|
init_isBuffer();
|
|
1388
1390
|
init__isIndex();
|
|
1389
1391
|
init_isTypedArray();
|
|
1390
|
-
hasOwnProperty$
|
|
1392
|
+
hasOwnProperty$11 = Object.prototype.hasOwnProperty;
|
|
1391
1393
|
}));
|
|
1392
1394
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js
|
|
1393
1395
|
/**
|
|
@@ -1421,14 +1423,14 @@
|
|
|
1421
1423
|
function baseKeys(object) {
|
|
1422
1424
|
if (!isPrototype(object)) return nativeKeys(object);
|
|
1423
1425
|
var result = [];
|
|
1424
|
-
for (var key in Object(object)) if (hasOwnProperty$
|
|
1426
|
+
for (var key in Object(object)) if (hasOwnProperty$10.call(object, key) && key != "constructor") result.push(key);
|
|
1425
1427
|
return result;
|
|
1426
1428
|
}
|
|
1427
|
-
var hasOwnProperty$
|
|
1429
|
+
var hasOwnProperty$10;
|
|
1428
1430
|
var init__baseKeys = __esmMin((() => {
|
|
1429
1431
|
init__isPrototype();
|
|
1430
1432
|
init__nativeKeys();
|
|
1431
|
-
hasOwnProperty$
|
|
1433
|
+
hasOwnProperty$10 = Object.prototype.hasOwnProperty;
|
|
1432
1434
|
}));
|
|
1433
1435
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keys.js
|
|
1434
1436
|
/**
|
|
@@ -1492,17 +1494,17 @@
|
|
|
1492
1494
|
* @returns {Array} Returns the array of property names.
|
|
1493
1495
|
*/
|
|
1494
1496
|
function baseKeysIn(object) {
|
|
1495
|
-
if (!isObject(object)) return nativeKeysIn(object);
|
|
1497
|
+
if (!isObject$1(object)) return nativeKeysIn(object);
|
|
1496
1498
|
var isProto = isPrototype(object), result = [];
|
|
1497
|
-
for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$
|
|
1499
|
+
for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$9.call(object, key)))) result.push(key);
|
|
1498
1500
|
return result;
|
|
1499
1501
|
}
|
|
1500
|
-
var hasOwnProperty$
|
|
1502
|
+
var hasOwnProperty$9;
|
|
1501
1503
|
var init__baseKeysIn = __esmMin((() => {
|
|
1502
1504
|
init_isObject();
|
|
1503
1505
|
init__isPrototype();
|
|
1504
1506
|
init__nativeKeysIn();
|
|
1505
|
-
hasOwnProperty$
|
|
1507
|
+
hasOwnProperty$9 = Object.prototype.hasOwnProperty;
|
|
1506
1508
|
}));
|
|
1507
1509
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js
|
|
1508
1510
|
/**
|
|
@@ -1612,13 +1614,13 @@
|
|
|
1612
1614
|
var result = data[key];
|
|
1613
1615
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
1614
1616
|
}
|
|
1615
|
-
return hasOwnProperty$
|
|
1617
|
+
return hasOwnProperty$8.call(data, key) ? data[key] : void 0;
|
|
1616
1618
|
}
|
|
1617
|
-
var HASH_UNDEFINED$2, hasOwnProperty$
|
|
1619
|
+
var HASH_UNDEFINED$2, hasOwnProperty$8;
|
|
1618
1620
|
var init__hashGet = __esmMin((() => {
|
|
1619
1621
|
init__nativeCreate();
|
|
1620
1622
|
HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
1621
|
-
hasOwnProperty$
|
|
1623
|
+
hasOwnProperty$8 = Object.prototype.hasOwnProperty;
|
|
1622
1624
|
}));
|
|
1623
1625
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js
|
|
1624
1626
|
/**
|
|
@@ -1632,12 +1634,12 @@
|
|
|
1632
1634
|
*/
|
|
1633
1635
|
function hashHas(key) {
|
|
1634
1636
|
var data = this.__data__;
|
|
1635
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$
|
|
1637
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$7.call(data, key);
|
|
1636
1638
|
}
|
|
1637
|
-
var hasOwnProperty$
|
|
1639
|
+
var hasOwnProperty$7;
|
|
1638
1640
|
var init__hashHas = __esmMin((() => {
|
|
1639
1641
|
init__nativeCreate();
|
|
1640
|
-
hasOwnProperty$
|
|
1642
|
+
hasOwnProperty$7 = Object.prototype.hasOwnProperty;
|
|
1641
1643
|
}));
|
|
1642
1644
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js
|
|
1643
1645
|
/**
|
|
@@ -2335,10 +2337,10 @@
|
|
|
2335
2337
|
if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) return false;
|
|
2336
2338
|
var proto = getPrototype(value);
|
|
2337
2339
|
if (proto === null) return true;
|
|
2338
|
-
var Ctor = hasOwnProperty$
|
|
2340
|
+
var Ctor = hasOwnProperty$6.call(proto, "constructor") && proto.constructor;
|
|
2339
2341
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
2340
2342
|
}
|
|
2341
|
-
var objectTag$3, funcProto, objectProto, funcToString, hasOwnProperty$
|
|
2343
|
+
var objectTag$3, funcProto, objectProto, funcToString, hasOwnProperty$6, objectCtorString;
|
|
2342
2344
|
var init_isPlainObject = __esmMin((() => {
|
|
2343
2345
|
init__baseGetTag();
|
|
2344
2346
|
init__getPrototype();
|
|
@@ -2347,9 +2349,31 @@
|
|
|
2347
2349
|
funcProto = Function.prototype;
|
|
2348
2350
|
objectProto = Object.prototype;
|
|
2349
2351
|
funcToString = funcProto.toString;
|
|
2350
|
-
hasOwnProperty$
|
|
2352
|
+
hasOwnProperty$6 = objectProto.hasOwnProperty;
|
|
2351
2353
|
objectCtorString = funcToString.call(Object);
|
|
2352
2354
|
}));
|
|
2355
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.js
|
|
2356
|
+
/**
|
|
2357
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
2358
|
+
*
|
|
2359
|
+
* @private
|
|
2360
|
+
* @param {Array} array The array to slice.
|
|
2361
|
+
* @param {number} [start=0] The start position.
|
|
2362
|
+
* @param {number} [end=array.length] The end position.
|
|
2363
|
+
* @returns {Array} Returns the slice of `array`.
|
|
2364
|
+
*/
|
|
2365
|
+
function baseSlice(array, start, end) {
|
|
2366
|
+
var index = -1, length = array.length;
|
|
2367
|
+
if (start < 0) start = -start > length ? 0 : length + start;
|
|
2368
|
+
end = end > length ? length : end;
|
|
2369
|
+
if (end < 0) end += length;
|
|
2370
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
2371
|
+
start >>>= 0;
|
|
2372
|
+
var result = Array(length);
|
|
2373
|
+
while (++index < length) result[index] = array[index + start];
|
|
2374
|
+
return result;
|
|
2375
|
+
}
|
|
2376
|
+
var init__baseSlice = __esmMin((() => {}));
|
|
2353
2377
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js
|
|
2354
2378
|
/**
|
|
2355
2379
|
* Removes all key-value entries from the stack.
|
|
@@ -2748,15 +2772,15 @@
|
|
|
2748
2772
|
*/
|
|
2749
2773
|
function initCloneArray(array) {
|
|
2750
2774
|
var length = array.length, result = new array.constructor(length);
|
|
2751
|
-
if (length && typeof array[0] == "string" && hasOwnProperty$
|
|
2775
|
+
if (length && typeof array[0] == "string" && hasOwnProperty$5.call(array, "index")) {
|
|
2752
2776
|
result.index = array.index;
|
|
2753
2777
|
result.input = array.input;
|
|
2754
2778
|
}
|
|
2755
2779
|
return result;
|
|
2756
2780
|
}
|
|
2757
|
-
var hasOwnProperty$
|
|
2781
|
+
var hasOwnProperty$5;
|
|
2758
2782
|
var init__initCloneArray = __esmMin((() => {
|
|
2759
|
-
hasOwnProperty$
|
|
2783
|
+
hasOwnProperty$5 = Object.prototype.hasOwnProperty;
|
|
2760
2784
|
}));
|
|
2761
2785
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js
|
|
2762
2786
|
var Uint8Array$1;
|
|
@@ -2996,10 +3020,10 @@
|
|
|
2996
3020
|
* @returns {*} Returns the cloned value.
|
|
2997
3021
|
*/
|
|
2998
3022
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
2999
|
-
var result, isDeep = bitmask & CLONE_DEEP_FLAG$
|
|
3023
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
|
|
3000
3024
|
if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
3001
3025
|
if (result !== void 0) return result;
|
|
3002
|
-
if (!isObject(value)) return value;
|
|
3026
|
+
if (!isObject$1(value)) return value;
|
|
3003
3027
|
var isArr = isArray(value);
|
|
3004
3028
|
if (isArr) {
|
|
3005
3029
|
result = initCloneArray(value);
|
|
@@ -3035,7 +3059,7 @@
|
|
|
3035
3059
|
});
|
|
3036
3060
|
return result;
|
|
3037
3061
|
}
|
|
3038
|
-
var CLONE_DEEP_FLAG$
|
|
3062
|
+
var CLONE_DEEP_FLAG$2, CLONE_FLAT_FLAG$1, CLONE_SYMBOLS_FLAG$2, argsTag$1, arrayTag$1, boolTag$1, dateTag$1, errorTag$1, funcTag, genTag, mapTag$2, numberTag$1, objectTag$1, regexpTag$1, setTag$2, stringTag$1, symbolTag$1, weakMapTag, arrayBufferTag$1, dataViewTag$1, float32Tag, float64Tag, int8Tag, int16Tag, int32Tag, uint8Tag, uint8ClampedTag, uint16Tag, uint32Tag, cloneableTags;
|
|
3039
3063
|
var init__baseClone = __esmMin((() => {
|
|
3040
3064
|
init__Stack();
|
|
3041
3065
|
init__arrayEach();
|
|
@@ -3059,9 +3083,9 @@
|
|
|
3059
3083
|
init_isSet();
|
|
3060
3084
|
init_keys();
|
|
3061
3085
|
init_keysIn();
|
|
3062
|
-
CLONE_DEEP_FLAG$
|
|
3063
|
-
CLONE_FLAT_FLAG = 2;
|
|
3064
|
-
CLONE_SYMBOLS_FLAG$
|
|
3086
|
+
CLONE_DEEP_FLAG$2 = 1;
|
|
3087
|
+
CLONE_FLAT_FLAG$1 = 2;
|
|
3088
|
+
CLONE_SYMBOLS_FLAG$2 = 4;
|
|
3065
3089
|
argsTag$1 = "[object Arguments]";
|
|
3066
3090
|
arrayTag$1 = "[object Array]";
|
|
3067
3091
|
boolTag$1 = "[object Boolean]";
|
|
@@ -3112,13 +3136,13 @@
|
|
|
3112
3136
|
* // => false
|
|
3113
3137
|
*/
|
|
3114
3138
|
function cloneDeep$1(value) {
|
|
3115
|
-
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
3139
|
+
return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
|
|
3116
3140
|
}
|
|
3117
|
-
var CLONE_DEEP_FLAG, CLONE_SYMBOLS_FLAG;
|
|
3141
|
+
var CLONE_DEEP_FLAG$1, CLONE_SYMBOLS_FLAG$1;
|
|
3118
3142
|
var init_cloneDeep = __esmMin((() => {
|
|
3119
3143
|
init__baseClone();
|
|
3120
|
-
CLONE_DEEP_FLAG = 1;
|
|
3121
|
-
CLONE_SYMBOLS_FLAG = 4;
|
|
3144
|
+
CLONE_DEEP_FLAG$1 = 1;
|
|
3145
|
+
CLONE_SYMBOLS_FLAG$1 = 4;
|
|
3122
3146
|
}));
|
|
3123
3147
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js
|
|
3124
3148
|
/**
|
|
@@ -3384,7 +3408,7 @@
|
|
|
3384
3408
|
var index = objLength;
|
|
3385
3409
|
while (index--) {
|
|
3386
3410
|
var key = objProps[index];
|
|
3387
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
3411
|
+
if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) return false;
|
|
3388
3412
|
}
|
|
3389
3413
|
var objStacked = stack.get(object);
|
|
3390
3414
|
var othStacked = stack.get(other);
|
|
@@ -3411,11 +3435,11 @@
|
|
|
3411
3435
|
stack["delete"](other);
|
|
3412
3436
|
return result;
|
|
3413
3437
|
}
|
|
3414
|
-
var COMPARE_PARTIAL_FLAG$3, hasOwnProperty$
|
|
3438
|
+
var COMPARE_PARTIAL_FLAG$3, hasOwnProperty$4;
|
|
3415
3439
|
var init__equalObjects = __esmMin((() => {
|
|
3416
3440
|
init__getAllKeys();
|
|
3417
3441
|
COMPARE_PARTIAL_FLAG$3 = 1;
|
|
3418
|
-
hasOwnProperty$
|
|
3442
|
+
hasOwnProperty$4 = Object.prototype.hasOwnProperty;
|
|
3419
3443
|
}));
|
|
3420
3444
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js
|
|
3421
3445
|
/**
|
|
@@ -3447,7 +3471,7 @@
|
|
|
3447
3471
|
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
3448
3472
|
}
|
|
3449
3473
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
3450
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
3474
|
+
var objIsWrapped = objIsObj && hasOwnProperty$3.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$3.call(other, "__wrapped__");
|
|
3451
3475
|
if (objIsWrapped || othIsWrapped) {
|
|
3452
3476
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
3453
3477
|
stack || (stack = new Stack());
|
|
@@ -3458,7 +3482,7 @@
|
|
|
3458
3482
|
stack || (stack = new Stack());
|
|
3459
3483
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
3460
3484
|
}
|
|
3461
|
-
var COMPARE_PARTIAL_FLAG$2, argsTag, arrayTag, objectTag, hasOwnProperty$
|
|
3485
|
+
var COMPARE_PARTIAL_FLAG$2, argsTag, arrayTag, objectTag, hasOwnProperty$3;
|
|
3462
3486
|
var init__baseIsEqualDeep = __esmMin((() => {
|
|
3463
3487
|
init__Stack();
|
|
3464
3488
|
init__equalArrays();
|
|
@@ -3472,7 +3496,7 @@
|
|
|
3472
3496
|
argsTag = "[object Arguments]";
|
|
3473
3497
|
arrayTag = "[object Array]";
|
|
3474
3498
|
objectTag = "[object Object]";
|
|
3475
|
-
hasOwnProperty$
|
|
3499
|
+
hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
|
3476
3500
|
}));
|
|
3477
3501
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js
|
|
3478
3502
|
/**
|
|
@@ -3547,7 +3571,7 @@
|
|
|
3547
3571
|
* equality comparisons, else `false`.
|
|
3548
3572
|
*/
|
|
3549
3573
|
function isStrictComparable(value) {
|
|
3550
|
-
return value === value && !isObject(value);
|
|
3574
|
+
return value === value && !isObject$1(value);
|
|
3551
3575
|
}
|
|
3552
3576
|
var init__isStrictComparable = __esmMin((() => {
|
|
3553
3577
|
init_isObject();
|
|
@@ -3937,7 +3961,7 @@
|
|
|
3937
3961
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
3938
3962
|
if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
3939
3963
|
wait = toNumber(wait) || 0;
|
|
3940
|
-
if (isObject(options)) {
|
|
3964
|
+
if (isObject$1(options)) {
|
|
3941
3965
|
leading = !!options.leading;
|
|
3942
3966
|
maxing = "maxWait" in options;
|
|
3943
3967
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -4148,7 +4172,7 @@
|
|
|
4148
4172
|
} else if (isPlainObject$1(srcValue) || isArguments(srcValue)) {
|
|
4149
4173
|
newValue = objValue;
|
|
4150
4174
|
if (isArguments(objValue)) newValue = toPlainObject(objValue);
|
|
4151
|
-
else if (!isObject(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
|
|
4175
|
+
else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
|
|
4152
4176
|
} else isCommon = false;
|
|
4153
4177
|
}
|
|
4154
4178
|
if (isCommon) {
|
|
@@ -4191,7 +4215,7 @@
|
|
|
4191
4215
|
if (object === source) return;
|
|
4192
4216
|
baseFor(source, function(srcValue, key) {
|
|
4193
4217
|
stack || (stack = new Stack());
|
|
4194
|
-
if (isObject(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
4218
|
+
if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
4195
4219
|
else {
|
|
4196
4220
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
|
|
4197
4221
|
if (newValue === void 0) newValue = srcValue;
|
|
@@ -4233,6 +4257,26 @@
|
|
|
4233
4257
|
return false;
|
|
4234
4258
|
}
|
|
4235
4259
|
var init__arrayIncludesWith = __esmMin((() => {}));
|
|
4260
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/last.js
|
|
4261
|
+
/**
|
|
4262
|
+
* Gets the last element of `array`.
|
|
4263
|
+
*
|
|
4264
|
+
* @static
|
|
4265
|
+
* @memberOf _
|
|
4266
|
+
* @since 0.1.0
|
|
4267
|
+
* @category Array
|
|
4268
|
+
* @param {Array} array The array to query.
|
|
4269
|
+
* @returns {*} Returns the last element of `array`.
|
|
4270
|
+
* @example
|
|
4271
|
+
*
|
|
4272
|
+
* _.last([1, 2, 3]);
|
|
4273
|
+
* // => 3
|
|
4274
|
+
*/
|
|
4275
|
+
function last(array) {
|
|
4276
|
+
var length = array == null ? 0 : array.length;
|
|
4277
|
+
return length ? array[length - 1] : void 0;
|
|
4278
|
+
}
|
|
4279
|
+
var init_last = __esmMin((() => {}));
|
|
4236
4280
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js
|
|
4237
4281
|
/**
|
|
4238
4282
|
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
@@ -4315,11 +4359,11 @@
|
|
|
4315
4359
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
4316
4360
|
*/
|
|
4317
4361
|
function baseHas(object, key) {
|
|
4318
|
-
return object != null && hasOwnProperty$
|
|
4362
|
+
return object != null && hasOwnProperty$2.call(object, key);
|
|
4319
4363
|
}
|
|
4320
|
-
var hasOwnProperty$
|
|
4364
|
+
var hasOwnProperty$2;
|
|
4321
4365
|
var init__baseHas = __esmMin((() => {
|
|
4322
|
-
hasOwnProperty$
|
|
4366
|
+
hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
4323
4367
|
}));
|
|
4324
4368
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/has.js
|
|
4325
4369
|
/**
|
|
@@ -4356,6 +4400,22 @@
|
|
|
4356
4400
|
init__baseHas();
|
|
4357
4401
|
init__hasPath();
|
|
4358
4402
|
}));
|
|
4403
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_parent.js
|
|
4404
|
+
/**
|
|
4405
|
+
* Gets the parent value at `path` of `object`.
|
|
4406
|
+
*
|
|
4407
|
+
* @private
|
|
4408
|
+
* @param {Object} object The object to query.
|
|
4409
|
+
* @param {Array} path The path to get the parent value of.
|
|
4410
|
+
* @returns {*} Returns the parent value.
|
|
4411
|
+
*/
|
|
4412
|
+
function parent(object, path) {
|
|
4413
|
+
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
4414
|
+
}
|
|
4415
|
+
var init__parent = __esmMin((() => {
|
|
4416
|
+
init__baseGet();
|
|
4417
|
+
init__baseSlice();
|
|
4418
|
+
}));
|
|
4359
4419
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js
|
|
4360
4420
|
/**
|
|
4361
4421
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
@@ -4396,10 +4456,10 @@
|
|
|
4396
4456
|
var tag = _getTag_default(value);
|
|
4397
4457
|
if (tag == mapTag || tag == setTag) return !value.size;
|
|
4398
4458
|
if (isPrototype(value)) return !baseKeys(value).length;
|
|
4399
|
-
for (var key in value) if (hasOwnProperty.call(value, key)) return false;
|
|
4459
|
+
for (var key in value) if (hasOwnProperty$1.call(value, key)) return false;
|
|
4400
4460
|
return true;
|
|
4401
4461
|
}
|
|
4402
|
-
var mapTag, setTag, hasOwnProperty;
|
|
4462
|
+
var mapTag, setTag, hasOwnProperty$1;
|
|
4403
4463
|
var init_isEmpty = __esmMin((() => {
|
|
4404
4464
|
init__baseKeys();
|
|
4405
4465
|
init__getTag();
|
|
@@ -4411,7 +4471,7 @@
|
|
|
4411
4471
|
init_isTypedArray();
|
|
4412
4472
|
mapTag = "[object Map]";
|
|
4413
4473
|
setTag = "[object Set]";
|
|
4414
|
-
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4474
|
+
hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
4415
4475
|
}));
|
|
4416
4476
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js
|
|
4417
4477
|
/**
|
|
@@ -4448,6 +4508,81 @@
|
|
|
4448
4508
|
var init_isEqual = __esmMin((() => {
|
|
4449
4509
|
init__baseIsEqual();
|
|
4450
4510
|
}));
|
|
4511
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnset.js
|
|
4512
|
+
/**
|
|
4513
|
+
* The base implementation of `_.unset`.
|
|
4514
|
+
*
|
|
4515
|
+
* @private
|
|
4516
|
+
* @param {Object} object The object to modify.
|
|
4517
|
+
* @param {Array|string} path The property path to unset.
|
|
4518
|
+
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
4519
|
+
*/
|
|
4520
|
+
function baseUnset(object, path) {
|
|
4521
|
+
path = castPath(path, object);
|
|
4522
|
+
var index = -1, length = path.length;
|
|
4523
|
+
if (!length) return true;
|
|
4524
|
+
while (++index < length) {
|
|
4525
|
+
var key = toKey(path[index]);
|
|
4526
|
+
if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) return false;
|
|
4527
|
+
if ((key === "constructor" || key === "prototype") && index < length - 1) return false;
|
|
4528
|
+
}
|
|
4529
|
+
var obj = parent(object, path);
|
|
4530
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
4531
|
+
}
|
|
4532
|
+
var hasOwnProperty;
|
|
4533
|
+
var init__baseUnset = __esmMin((() => {
|
|
4534
|
+
init__castPath();
|
|
4535
|
+
init_last();
|
|
4536
|
+
init__parent();
|
|
4537
|
+
init__toKey();
|
|
4538
|
+
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4539
|
+
}));
|
|
4540
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_customOmitClone.js
|
|
4541
|
+
/**
|
|
4542
|
+
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
|
|
4543
|
+
* objects.
|
|
4544
|
+
*
|
|
4545
|
+
* @private
|
|
4546
|
+
* @param {*} value The value to inspect.
|
|
4547
|
+
* @param {string} key The key of the property to inspect.
|
|
4548
|
+
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
|
|
4549
|
+
*/
|
|
4550
|
+
function customOmitClone(value) {
|
|
4551
|
+
return isPlainObject$1(value) ? void 0 : value;
|
|
4552
|
+
}
|
|
4553
|
+
var init__customOmitClone = __esmMin((() => {
|
|
4554
|
+
init_isPlainObject();
|
|
4555
|
+
}));
|
|
4556
|
+
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/omit.js
|
|
4557
|
+
var CLONE_DEEP_FLAG, CLONE_FLAT_FLAG, CLONE_SYMBOLS_FLAG, omit;
|
|
4558
|
+
var init_omit = __esmMin((() => {
|
|
4559
|
+
init__arrayMap();
|
|
4560
|
+
init__baseClone();
|
|
4561
|
+
init__baseUnset();
|
|
4562
|
+
init__castPath();
|
|
4563
|
+
init__copyObject();
|
|
4564
|
+
init__customOmitClone();
|
|
4565
|
+
init__flatRest();
|
|
4566
|
+
init__getAllKeysIn();
|
|
4567
|
+
CLONE_DEEP_FLAG = 1;
|
|
4568
|
+
CLONE_FLAT_FLAG = 2;
|
|
4569
|
+
CLONE_SYMBOLS_FLAG = 4;
|
|
4570
|
+
omit = flatRest(function(object, paths) {
|
|
4571
|
+
var result = {};
|
|
4572
|
+
if (object == null) return result;
|
|
4573
|
+
var isDeep = false;
|
|
4574
|
+
paths = arrayMap(paths, function(path) {
|
|
4575
|
+
path = castPath(path, object);
|
|
4576
|
+
isDeep || (isDeep = path.length > 1);
|
|
4577
|
+
return path;
|
|
4578
|
+
});
|
|
4579
|
+
copyObject(object, getAllKeysIn(object), result);
|
|
4580
|
+
if (isDeep) result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
4581
|
+
var length = paths.length;
|
|
4582
|
+
while (length--) baseUnset(result, paths[length]);
|
|
4583
|
+
return result;
|
|
4584
|
+
});
|
|
4585
|
+
}));
|
|
4451
4586
|
// node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js
|
|
4452
4587
|
/**
|
|
4453
4588
|
* The base implementation of `_.set`.
|
|
@@ -4460,7 +4595,7 @@
|
|
|
4460
4595
|
* @returns {Object} Returns `object`.
|
|
4461
4596
|
*/
|
|
4462
4597
|
function baseSet(object, path, value, customizer) {
|
|
4463
|
-
if (!isObject(object)) return object;
|
|
4598
|
+
if (!isObject$1(object)) return object;
|
|
4464
4599
|
path = castPath(path, object);
|
|
4465
4600
|
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
4466
4601
|
while (nested != null && ++index < length) {
|
|
@@ -4469,7 +4604,7 @@
|
|
|
4469
4604
|
if (index != lastIndex) {
|
|
4470
4605
|
var objValue = nested[key];
|
|
4471
4606
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
4472
|
-
if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
4607
|
+
if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
4473
4608
|
}
|
|
4474
4609
|
assignValue(nested, key, newValue);
|
|
4475
4610
|
nested = nested[key];
|
|
@@ -4582,7 +4717,7 @@
|
|
|
4582
4717
|
function throttle(func, wait, options) {
|
|
4583
4718
|
var leading = true, trailing = true;
|
|
4584
4719
|
if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
4585
|
-
if (isObject(options)) {
|
|
4720
|
+
if (isObject$1(options)) {
|
|
4586
4721
|
leading = "leading" in options ? !!options.leading : leading;
|
|
4587
4722
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
4588
4723
|
}
|
|
@@ -4715,6 +4850,7 @@
|
|
|
4715
4850
|
init__baseAssignValue();
|
|
4716
4851
|
init__toKey();
|
|
4717
4852
|
init_toString();
|
|
4853
|
+
init__baseSlice();
|
|
4718
4854
|
init__isIterateeCall();
|
|
4719
4855
|
init__baseClone();
|
|
4720
4856
|
init_cloneDeep();
|
|
@@ -4734,6 +4870,7 @@
|
|
|
4734
4870
|
init__baseUnary();
|
|
4735
4871
|
init__cacheHas();
|
|
4736
4872
|
init_isArrayLikeObject();
|
|
4873
|
+
init_last();
|
|
4737
4874
|
init__createBaseFor();
|
|
4738
4875
|
init__createBaseEach();
|
|
4739
4876
|
init__getTag();
|
|
@@ -4749,7 +4886,7 @@
|
|
|
4749
4886
|
init_hasIn();
|
|
4750
4887
|
init__baseIndexOf();
|
|
4751
4888
|
init__castPath();
|
|
4752
|
-
|
|
4889
|
+
init__parent();
|
|
4753
4890
|
init_isArguments();
|
|
4754
4891
|
init__nodeUtil();
|
|
4755
4892
|
init_isBuffer();
|
|
@@ -4772,13 +4909,16 @@
|
|
|
4772
4909
|
init__Symbol();
|
|
4773
4910
|
init__setToArray();
|
|
4774
4911
|
init_now();
|
|
4775
|
-
|
|
4912
|
+
init_omit();
|
|
4776
4913
|
init__basePickBy();
|
|
4914
|
+
init__getAllKeysIn();
|
|
4915
|
+
init__baseGet();
|
|
4777
4916
|
init__baseMap();
|
|
4778
4917
|
init__arraySome();
|
|
4779
4918
|
init__baseProperty();
|
|
4780
4919
|
init_pick();
|
|
4781
4920
|
init_property();
|
|
4921
|
+
init__baseUnset();
|
|
4782
4922
|
init__baseSet();
|
|
4783
4923
|
init__baseKeys();
|
|
4784
4924
|
init_stubArray();
|
|
@@ -5276,6 +5416,7 @@
|
|
|
5276
5416
|
if (el && parentEl) {
|
|
5277
5417
|
const calcParentOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, parentEl.offsetWidth);
|
|
5278
5418
|
const calcElOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, el.offsetWidth);
|
|
5419
|
+
if (calcElOffsetWidth > calcParentOffsetWidth) return config.style.left;
|
|
5279
5420
|
if (calcElOffsetWidth + left > calcParentOffsetWidth) return calcParentOffsetWidth - calcElOffsetWidth;
|
|
5280
5421
|
}
|
|
5281
5422
|
return config.style.left;
|
|
@@ -5305,7 +5446,7 @@
|
|
|
5305
5446
|
isIncludeDataSourceByDiffAddResult = (diffResult) => {
|
|
5306
5447
|
for (const value of Object.values(diffResult)) {
|
|
5307
5448
|
if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
|
|
5308
|
-
if (isObject(value)) return isIncludeDataSourceByDiffAddResult(value);
|
|
5449
|
+
if (isObject$1(value)) return isIncludeDataSourceByDiffAddResult(value);
|
|
5309
5450
|
}
|
|
5310
5451
|
return false;
|
|
5311
5452
|
};
|
|
@@ -5313,7 +5454,7 @@
|
|
|
5313
5454
|
for (const [key, value] of Object.entries(diffResult)) {
|
|
5314
5455
|
if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
|
|
5315
5456
|
if ((0, _tmagic_utils.isValueIncludeDataSource)(oldNode[key])) return true;
|
|
5316
|
-
if (isObject(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
|
|
5457
|
+
if (isObject$1(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
|
|
5317
5458
|
}
|
|
5318
5459
|
return false;
|
|
5319
5460
|
};
|
|
@@ -5420,7 +5561,7 @@
|
|
|
5420
5561
|
};
|
|
5421
5562
|
editorNodeMergeCustomizer = (objValue, srcValue, key, _object, source) => {
|
|
5422
5563
|
if (typeof srcValue === "undefined" && Object.hasOwn(source, key)) return "";
|
|
5423
|
-
if (isObject(srcValue) && Array.isArray(objValue)) return srcValue;
|
|
5564
|
+
if (isObject$1(srcValue) && Array.isArray(objValue)) return srcValue;
|
|
5424
5565
|
if (Array.isArray(srcValue)) return srcValue;
|
|
5425
5566
|
};
|
|
5426
5567
|
collectRelatedNodes = (copyNodes, collectorOptions, getNodeById) => {
|
|
@@ -5499,6 +5640,13 @@
|
|
|
5499
5640
|
}));
|
|
5500
5641
|
// packages/editor/src/utils/undo-redo.ts
|
|
5501
5642
|
init_lodash();
|
|
5643
|
+
/** 各历史栈 index 0 的 initial 是撤销下限(见 utils/history.ts 的 undoFloor),裁剪时不能把它挤掉。 */
|
|
5644
|
+
var isInitialStep = (step) => step?.opType === "initial";
|
|
5645
|
+
/**
|
|
5646
|
+
* 容量按「真实步骤数」计算:index 0 的 initial 基线额外占一个位置,不挤掉真实记录。
|
|
5647
|
+
* 只要真实步骤没超限,最老一条的 oldSchema 仍指向加载时的 DSL,「回到初始」就是可达的。
|
|
5648
|
+
*/
|
|
5649
|
+
var maxLength = (list, listMaxSize) => listMaxSize + (isInitialStep(list[0]) ? 1 : 0);
|
|
5502
5650
|
var UndoRedo = class UndoRedo {
|
|
5503
5651
|
/**
|
|
5504
5652
|
* 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
|
|
@@ -5509,13 +5657,9 @@
|
|
|
5509
5657
|
*/
|
|
5510
5658
|
static fromSerialized(data, options = {}) {
|
|
5511
5659
|
const undoRedo = new UndoRedo(data.listMaxSize);
|
|
5660
|
+
undoRedo.initialReachable = data.initialReachable !== false;
|
|
5512
5661
|
const list = Array.isArray(data.elementList) ? data.elementList.map((item) => cloneDeep$1(item)) : [];
|
|
5513
5662
|
let cursor = Number.isFinite(data.listCursor) ? data.listCursor : list.length;
|
|
5514
|
-
const overflow = list.length - undoRedo.listMaxSize;
|
|
5515
|
-
if (overflow > 0) {
|
|
5516
|
-
list.splice(0, overflow);
|
|
5517
|
-
cursor -= overflow;
|
|
5518
|
-
}
|
|
5519
5663
|
if (options.isSavedStep) {
|
|
5520
5664
|
for (let i = list.length - 1; i >= 0; i--) if (options.isSavedStep(list[i])) {
|
|
5521
5665
|
cursor = i + 1;
|
|
@@ -5529,7 +5673,9 @@
|
|
|
5529
5673
|
elementList;
|
|
5530
5674
|
listCursor;
|
|
5531
5675
|
listMaxSize;
|
|
5532
|
-
|
|
5676
|
+
/** 容量裁剪是否删掉过已应用的真实步骤(撤销链已断,「回到初始」不可达)。 */
|
|
5677
|
+
initialReachable = true;
|
|
5678
|
+
constructor(listMaxSize = 1e3) {
|
|
5533
5679
|
const minListMaxSize = 2;
|
|
5534
5680
|
this.elementList = [];
|
|
5535
5681
|
this.listCursor = 0;
|
|
@@ -5543,16 +5689,55 @@
|
|
|
5543
5689
|
return {
|
|
5544
5690
|
elementList: this.elementList.map((item) => cloneDeep$1(item)),
|
|
5545
5691
|
listCursor: this.listCursor,
|
|
5546
|
-
listMaxSize: this.listMaxSize
|
|
5692
|
+
listMaxSize: this.listMaxSize,
|
|
5693
|
+
initialReachable: this.initialReachable
|
|
5547
5694
|
};
|
|
5548
5695
|
}
|
|
5549
5696
|
pushElement(element) {
|
|
5550
5697
|
this.elementList.splice(this.listCursor, this.elementList.length - this.listCursor, cloneDeep$1(element));
|
|
5551
5698
|
this.listCursor += 1;
|
|
5552
|
-
|
|
5553
|
-
|
|
5699
|
+
}
|
|
5700
|
+
/**
|
|
5701
|
+
* 把栈裁剪到容量上限(`listMaxSize` 条真实步骤,index 0 的 initial 基线额外占一个位置)。
|
|
5702
|
+
*
|
|
5703
|
+
* 只在保存后调用(见 historyService.markSaved):保存前不裁剪,避免用户还没落库就丢掉可撤销的历史。
|
|
5704
|
+
* **永不删除** initial 基线与「整体设置 root」产生的记录(`rootStep`);
|
|
5705
|
+
* 受保护记录本身占满容量时栈保持超限。
|
|
5706
|
+
*
|
|
5707
|
+
* 分两个阶段删除,保证撤销链与重做链各自连续:
|
|
5708
|
+
* 1. 先从最旧的记录开始删**已应用**区(游标之前)的可删记录,撤销链仍然连续;
|
|
5709
|
+
* 2. 已应用区删无可删仍超限时,溢出量落在重做区。重做链必须连续——后一条是按前一条的 DSL 打的补丁,
|
|
5710
|
+
* 只删掉开头几条会让留下的步骤叠在缺失的基线上,因此整段丢弃游标之后的步骤。
|
|
5711
|
+
* (不从重做区末尾往前删:重做区里可能有受保护的 `rootStep`,跳过它去删它前面的步骤同样会留空洞。)
|
|
5712
|
+
*
|
|
5713
|
+
* 「回到初始」是否仍可达,取决于被删的已应用步骤相对最早一条 `rootStep` 的位置:
|
|
5714
|
+
* - 位于其**之后**:撤销链完整——一直撤销会退到这条整页快照,再撤销它即回到加载时的 DSL,仍可达;
|
|
5715
|
+
* - 位于其**之前**(或栈内没有 `rootStep`):撤到底只能停在中途版本,标记为不可达。
|
|
5716
|
+
* 只删掉重做区记录时不影响可达性。
|
|
5717
|
+
*/
|
|
5718
|
+
trim() {
|
|
5719
|
+
let overflow = this.elementList.length - maxLength(this.elementList, this.listMaxSize);
|
|
5720
|
+
if (overflow <= 0) return;
|
|
5721
|
+
let seenRootStep = false;
|
|
5722
|
+
let brokenChain = false;
|
|
5723
|
+
for (let index = 0; index < this.listCursor && overflow > 0;) {
|
|
5724
|
+
const step = this.elementList[index];
|
|
5725
|
+
if (isInitialStep(step)) {
|
|
5726
|
+
index += 1;
|
|
5727
|
+
continue;
|
|
5728
|
+
}
|
|
5729
|
+
if (step?.rootStep === true) {
|
|
5730
|
+
seenRootStep = true;
|
|
5731
|
+
index += 1;
|
|
5732
|
+
continue;
|
|
5733
|
+
}
|
|
5734
|
+
this.elementList.splice(index, 1);
|
|
5735
|
+
overflow -= 1;
|
|
5554
5736
|
this.listCursor -= 1;
|
|
5737
|
+
if (!seenRootStep) brokenChain = true;
|
|
5555
5738
|
}
|
|
5739
|
+
if (overflow > 0 && this.elementList.length > this.listCursor) this.elementList.length = this.listCursor;
|
|
5740
|
+
if (brokenChain) this.initialReachable = false;
|
|
5556
5741
|
}
|
|
5557
5742
|
canUndo() {
|
|
5558
5743
|
return this.listCursor > 0;
|
|
@@ -5619,6 +5804,10 @@
|
|
|
5619
5804
|
getLength() {
|
|
5620
5805
|
return this.elementList.length;
|
|
5621
5806
|
}
|
|
5807
|
+
/** 「回到初始」是否可达:容量裁剪删掉已应用的真实步骤后撤销链断开,返回 false。 */
|
|
5808
|
+
isInitialReachable() {
|
|
5809
|
+
return this.initialReachable;
|
|
5810
|
+
}
|
|
5622
5811
|
};
|
|
5623
5812
|
// packages/editor/src/utils/history.ts
|
|
5624
5813
|
init_lodash();
|
|
@@ -5683,6 +5872,11 @@
|
|
|
5683
5872
|
extra: payload.extra
|
|
5684
5873
|
};
|
|
5685
5874
|
};
|
|
5875
|
+
/**
|
|
5876
|
+
* 把栈当前游标所在的记录标记为「已保存」,随后把栈裁剪到容量上限(见 {@link UndoRedo.trim})。
|
|
5877
|
+
* 入栈与还原都不裁剪,只有保存后才收敛,避免用户在落库前丢掉可撤销的历史;
|
|
5878
|
+
* initial 基线与「整体设置 root」产生的记录(`rootStep`)不会被裁掉。
|
|
5879
|
+
*/
|
|
5686
5880
|
var markStackSaved = (undoRedo) => {
|
|
5687
5881
|
if (!undoRedo) return;
|
|
5688
5882
|
undoRedo.updateElements((element) => {
|
|
@@ -5691,6 +5885,7 @@
|
|
|
5691
5885
|
undoRedo.updateCurrentElement((element) => {
|
|
5692
5886
|
element.saved = true;
|
|
5693
5887
|
});
|
|
5888
|
+
undoRedo.trim();
|
|
5694
5889
|
};
|
|
5695
5890
|
/**
|
|
5696
5891
|
* 把单个历史栈(页面 / 代码块 / 数据源 / 扩展类型)的步骤列表按"目标"做相邻合并:
|
|
@@ -5802,20 +5997,33 @@
|
|
|
5802
5997
|
*
|
|
5803
5998
|
* 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
|
|
5804
5999
|
* 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
|
|
6000
|
+
*
|
|
6001
|
+
* 单个栈解析失败只丢弃该栈,其余栈照常还原:一条损坏的快照不应该让整份本地历史都不可用。
|
|
6002
|
+
* 结构性损坏(`elementList` 不是数组)同样按空栈处理,交给 {@link UndoRedo.fromSerialized} 兜底。
|
|
6003
|
+
* 全部栈都失败时抛出首个错误,避免调用方把「什么都没恢复」当成一次成功的还原。
|
|
5805
6004
|
*/
|
|
5806
6005
|
var deserializeStacks = (stacks = {}, parse) => {
|
|
5807
6006
|
const result = {};
|
|
6007
|
+
let firstError;
|
|
6008
|
+
let failedCount = 0;
|
|
5808
6009
|
Object.entries(stacks).forEach(([id, serialized]) => {
|
|
5809
6010
|
if (!serialized) return;
|
|
5810
|
-
const
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
6011
|
+
const source = Array.isArray(serialized.elementList) ? serialized.elementList : [];
|
|
6012
|
+
try {
|
|
6013
|
+
const elementList = parse ? source.map((step) => {
|
|
6014
|
+
const { diff } = step;
|
|
6015
|
+
return typeof diff === "string" ? Object.assign({}, step, { diff: parse(`(${diff})`) }) : step;
|
|
6016
|
+
}) : source;
|
|
6017
|
+
result[id] = UndoRedo.fromSerialized({
|
|
6018
|
+
...serialized,
|
|
6019
|
+
elementList
|
|
6020
|
+
}, { isSavedStep: (element) => element.saved === true });
|
|
6021
|
+
} catch (error) {
|
|
6022
|
+
failedCount += 1;
|
|
6023
|
+
firstError ??= error;
|
|
6024
|
+
}
|
|
5818
6025
|
});
|
|
6026
|
+
if (failedCount > 0 && Object.keys(result).length === 0) throw firstError;
|
|
5819
6027
|
return result;
|
|
5820
6028
|
};
|
|
5821
6029
|
/**
|
|
@@ -6902,18 +7110,101 @@
|
|
|
6902
7110
|
});
|
|
6903
7111
|
return displayState;
|
|
6904
7112
|
};
|
|
6905
|
-
|
|
7113
|
+
/** 编辑器里这份数据源当前用于展示的数据:优先 useInEditor 的 mock,否则用字段默认值 */
|
|
7114
|
+
var getDataSourceEditorData = (ds) => {
|
|
7115
|
+
const mock = ds.mocks?.find((item) => item.useInEditor)?.data;
|
|
7116
|
+
if (mock && (0, _tmagic_utils.isObject)(mock)) return mock;
|
|
7117
|
+
return (0, _tmagic_utils.getDefaultValueFromFields)(ds.fields || []);
|
|
7118
|
+
};
|
|
7119
|
+
var cloneSchemaOptions = (nodes) => nodes.filter((node) => !node.arrayIndex).map((node) => ({
|
|
7120
|
+
label: node.label,
|
|
7121
|
+
value: node.value,
|
|
7122
|
+
fieldType: node.fieldType,
|
|
7123
|
+
...node.children?.length ? { children: cloneSchemaOptions(node.children) } : {}
|
|
7124
|
+
}));
|
|
7125
|
+
var cloneOptions = (nodes) => nodes.map((node) => ({
|
|
7126
|
+
label: node.label,
|
|
7127
|
+
value: node.value,
|
|
7128
|
+
fieldType: node.fieldType,
|
|
7129
|
+
...node.arrayIndex ? { arrayIndex: true } : {},
|
|
7130
|
+
...node.children?.length ? { children: cloneOptions(node.children) } : {}
|
|
7131
|
+
}));
|
|
7132
|
+
/**
|
|
7133
|
+
* 已选路径对不上选项时补节点,否则级联框输入框是空的。
|
|
7134
|
+
* 数组字段后面缺的下标会补上;只展示下标时,已保存的元素字段路径(`array.xxx`)也会补回。
|
|
7135
|
+
* 对象上的数字字段名仍然按字段处理。
|
|
7136
|
+
*/
|
|
7137
|
+
var ensureSelectedArrayIndices = (options, fieldPath) => {
|
|
7138
|
+
let level = options;
|
|
7139
|
+
let parent;
|
|
7140
|
+
for (let i = 0; i < fieldPath.length; i++) {
|
|
7141
|
+
const segment = `${fieldPath[i]}`;
|
|
7142
|
+
let node = level.find((opt) => `${opt.value}` === segment);
|
|
7143
|
+
if (!node && parent?.fieldType === "array") {
|
|
7144
|
+
if ((0, _tmagic_utils.isArrayIndex)(segment)) {
|
|
7145
|
+
const fromSchema = cloneSchemaOptions(level);
|
|
7146
|
+
const fromIndex = cloneSchemaOptions(level.find((item) => item.arrayIndex)?.children || []);
|
|
7147
|
+
const children = fromSchema.length ? fromSchema : fromIndex;
|
|
7148
|
+
node = {
|
|
7149
|
+
label: `[${segment}]`,
|
|
7150
|
+
value: Number(segment),
|
|
7151
|
+
arrayIndex: true,
|
|
7152
|
+
...children.length ? { children } : {}
|
|
7153
|
+
};
|
|
7154
|
+
level.push(node);
|
|
7155
|
+
} else {
|
|
7156
|
+
node = cloneOptions(level.find((item) => item.arrayIndex)?.children || []).find((item) => !item.arrayIndex && `${item.value}` === segment);
|
|
7157
|
+
if (node) level.push(node);
|
|
7158
|
+
}
|
|
7159
|
+
}
|
|
7160
|
+
if (!node) return;
|
|
7161
|
+
parent = node;
|
|
7162
|
+
if (i === fieldPath.length - 1) return;
|
|
7163
|
+
if (!node.children) node.children = [];
|
|
7164
|
+
level = node.children;
|
|
7165
|
+
}
|
|
7166
|
+
};
|
|
7167
|
+
/** 数组下标固定提供 0–19,不随 mock 或默认值的长度变化 */
|
|
7168
|
+
var ARRAY_INDEX_COUNT = 20;
|
|
7169
|
+
var appendArrayIndexOptions = (field, dataSourceFieldType, typeSet, includesAny, context) => {
|
|
7170
|
+
const elementFields = field.fields;
|
|
7171
|
+
const taken = new Set((elementFields || []).map((item) => item.name));
|
|
7172
|
+
const elementType = elementFields?.length ? "object" : "any";
|
|
7173
|
+
if (!elementFields?.length && !includesAny) return [];
|
|
7174
|
+
const children = getCascaderOptionsFromFields(elementFields, dataSourceFieldType, {}, context);
|
|
7175
|
+
if (!(includesAny || typeSet.has(elementType)) && !children.length) return [];
|
|
7176
|
+
const indexNodes = [];
|
|
7177
|
+
for (let index = 0; index < ARRAY_INDEX_COUNT; index++) {
|
|
7178
|
+
const name = `${index}`;
|
|
7179
|
+
if (taken.has(name)) continue;
|
|
7180
|
+
indexNodes.push({
|
|
7181
|
+
label: `[${index}]`,
|
|
7182
|
+
value: index,
|
|
7183
|
+
arrayIndex: true,
|
|
7184
|
+
...children.length ? { children } : {}
|
|
7185
|
+
});
|
|
7186
|
+
}
|
|
7187
|
+
return indexNodes;
|
|
7188
|
+
};
|
|
7189
|
+
var getCascaderOptionsFromFields = (fields = [], dataSourceFieldType = ["any"], data, context = {}) => {
|
|
6906
7190
|
const typeSet = new Set(dataSourceFieldType.length ? dataSourceFieldType : ["any"]);
|
|
6907
7191
|
const includesAny = typeSet.has("any");
|
|
6908
7192
|
const result = [];
|
|
6909
7193
|
for (const field of fields) {
|
|
6910
7194
|
const fieldType = field.type || "any";
|
|
6911
7195
|
const isContainerType = fieldType === "any" || fieldType === "array" || fieldType === "object";
|
|
6912
|
-
const
|
|
7196
|
+
const showElementFields = fieldType !== "array" || context.directArrayElements !== false;
|
|
7197
|
+
const nestedData = data ? {} : void 0;
|
|
7198
|
+
let children = isContainerType && showElementFields ? getCascaderOptionsFromFields(field.fields, dataSourceFieldType, nestedData, context) : [];
|
|
7199
|
+
if (fieldType === "array" && data) {
|
|
7200
|
+
const indexNodes = appendArrayIndexOptions(field, dataSourceFieldType, typeSet, includesAny, context);
|
|
7201
|
+
children = [...children, ...indexNodes];
|
|
7202
|
+
}
|
|
6913
7203
|
if (includesAny || typeSet.has(fieldType) || isContainerType && children.length) result.push({
|
|
6914
7204
|
label: `${field.title || field.name}(${field.type})`,
|
|
6915
7205
|
value: field.name,
|
|
6916
|
-
children
|
|
7206
|
+
children,
|
|
7207
|
+
fieldType
|
|
6917
7208
|
});
|
|
6918
7209
|
}
|
|
6919
7210
|
return result;
|
|
@@ -7931,6 +8222,14 @@
|
|
|
7931
8222
|
init_type();
|
|
7932
8223
|
init_editor();
|
|
7933
8224
|
init_position();
|
|
8225
|
+
/**
|
|
8226
|
+
* 撤销 / 重做回放的内部标记键:不导出,也不出现在公开的 {@link HistoryOpOptions} 里。
|
|
8227
|
+
* 回放链路用它把 `isHistoryOp` 带进 `change` 事件;外部调用方即使传同名字符串字段也不会被读取,
|
|
8228
|
+
* 避免一次真实编辑被误标成历史回放,从而绕过业务侧的加锁 / 埋点 / 自动保存。
|
|
8229
|
+
*/
|
|
8230
|
+
var HISTORY_OP = Symbol("isHistoryOp");
|
|
8231
|
+
/** 读取仅供编辑器内部使用的回放标记。 */
|
|
8232
|
+
var isReplay = (options) => options[HISTORY_OP] === true;
|
|
7934
8233
|
/** 把插入下标收敛到 [0, length]:非整数取整,非法 / 越界(含未记录)一律追加到末尾 */
|
|
7935
8234
|
var clampIndex = (index, length) => {
|
|
7936
8235
|
const normalized = typeof index === "number" ? Math.trunc(index) : length;
|
|
@@ -8007,7 +8306,7 @@
|
|
|
8007
8306
|
if (name === "nodes" && Array.isArray(value)) this.set("node", value[0]);
|
|
8008
8307
|
if (name === "root") {
|
|
8009
8308
|
if (Array.isArray(value)) throw new Error("root 不能为数组");
|
|
8010
|
-
if (value && isObject(value)) {
|
|
8309
|
+
if (value && isObject$1(value)) {
|
|
8011
8310
|
const app = value;
|
|
8012
8311
|
this.state.pageLength = getPageList(app).length || 0;
|
|
8013
8312
|
this.state.pageFragmentLength = getPageFragmentList(app).length || 0;
|
|
@@ -8221,14 +8520,16 @@
|
|
|
8221
8520
|
root: cloneDeep$1(root),
|
|
8222
8521
|
index: insertIndex
|
|
8223
8522
|
});
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
node.style
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8523
|
+
if (!options.doNotFixPosition) {
|
|
8524
|
+
const newStyle = fixNodePosition(node, parent, stage);
|
|
8525
|
+
if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
|
|
8526
|
+
node.style = newStyle;
|
|
8527
|
+
await stage?.update({
|
|
8528
|
+
config: cloneDeep$1(node),
|
|
8529
|
+
parentId: parent.id,
|
|
8530
|
+
root: cloneDeep$1(root)
|
|
8531
|
+
});
|
|
8532
|
+
}
|
|
8232
8533
|
}
|
|
8233
8534
|
this.addModifiedNodeId(node.id);
|
|
8234
8535
|
return node;
|
|
@@ -8243,6 +8544,7 @@
|
|
|
8243
8544
|
async add(addNode, parent, options = {}) {
|
|
8244
8545
|
this.captureSelectionBeforeOp();
|
|
8245
8546
|
const { doNotSelect = false, doNotSwitchPage = false, doNotPushHistory = false, historyDescription, historySource } = options;
|
|
8547
|
+
const isHistoryOp = isReplay(options);
|
|
8246
8548
|
const stage = this.get("stage");
|
|
8247
8549
|
const addNodes = [];
|
|
8248
8550
|
if (!Array.isArray(addNode)) {
|
|
@@ -8320,7 +8622,8 @@
|
|
|
8320
8622
|
page: this.getPageOfNode(node.id)
|
|
8321
8623
|
})),
|
|
8322
8624
|
historySource,
|
|
8323
|
-
doNotPushHistory
|
|
8625
|
+
doNotPushHistory,
|
|
8626
|
+
isHistoryOp
|
|
8324
8627
|
});
|
|
8325
8628
|
const addedPages = newNodes.filter((node) => (0, _tmagic_utils.isPageOrFragment)(node));
|
|
8326
8629
|
if (addedPages.length) this.ctx.history.notifyPageStructureChange({
|
|
@@ -8391,6 +8694,7 @@
|
|
|
8391
8694
|
*/
|
|
8392
8695
|
async remove(nodeOrNodeList, options = {}) {
|
|
8393
8696
|
const { doNotPushHistory = false, historyDescription, historySource } = options;
|
|
8697
|
+
const isHistoryOp = isReplay(options);
|
|
8394
8698
|
this.captureSelectionBeforeOp();
|
|
8395
8699
|
const nodes = Array.isArray(nodeOrNodeList) ? nodeOrNodeList : [nodeOrNodeList];
|
|
8396
8700
|
const changeItems = nodes.map((node) => ({
|
|
@@ -8430,7 +8734,8 @@
|
|
|
8430
8734
|
type: "remove",
|
|
8431
8735
|
data: changeItems,
|
|
8432
8736
|
historySource,
|
|
8433
|
-
doNotPushHistory
|
|
8737
|
+
doNotPushHistory,
|
|
8738
|
+
isHistoryOp
|
|
8434
8739
|
});
|
|
8435
8740
|
const removedPages = nodes.filter((node) => (0, _tmagic_utils.isPageOrFragment)(node));
|
|
8436
8741
|
if (removedPages.length) this.ctx.history.notifyPageStructureChange({
|
|
@@ -8494,6 +8799,7 @@
|
|
|
8494
8799
|
async update(config, data = {}) {
|
|
8495
8800
|
this.captureSelectionBeforeOp();
|
|
8496
8801
|
const { doNotPushHistory = false, changeRecordList, changeRecords, historyDescription, historySource, invalidInfo } = data;
|
|
8802
|
+
const isHistoryOp = isReplay(data);
|
|
8497
8803
|
const nodes = Array.isArray(config) ? config : [config];
|
|
8498
8804
|
const commitInvalid = await this.runGuard(() => this.ctx.validator.guardUpdate(nodes, { replace: data.replace }));
|
|
8499
8805
|
const updateData = await Promise.all(nodes.map((node, index) => {
|
|
@@ -8533,7 +8839,8 @@
|
|
|
8533
8839
|
page: this.getPageOfNode(node.newNode.id)
|
|
8534
8840
|
})),
|
|
8535
8841
|
historySource,
|
|
8536
|
-
doNotPushHistory
|
|
8842
|
+
doNotPushHistory,
|
|
8843
|
+
isHistoryOp
|
|
8537
8844
|
});
|
|
8538
8845
|
return Array.isArray(config) ? updateData.map((item) => item.newNode) : updateData[0].newNode;
|
|
8539
8846
|
}
|
|
@@ -8663,7 +8970,9 @@
|
|
|
8663
8970
|
* @param options 可选配置
|
|
8664
8971
|
* @param options.doNotPushHistory 是否不写入历史记录(默认 false)
|
|
8665
8972
|
*/
|
|
8666
|
-
async moveLayer(offset,
|
|
8973
|
+
async moveLayer(offset, options = {}) {
|
|
8974
|
+
const { doNotPushHistory = false, historyDescription, historySource } = options;
|
|
8975
|
+
const isHistoryOp = isReplay(options);
|
|
8667
8976
|
this.captureSelectionBeforeOp();
|
|
8668
8977
|
const root = this.get("root");
|
|
8669
8978
|
if (!root) throw new Error("root为空");
|
|
@@ -8710,7 +9019,8 @@
|
|
|
8710
9019
|
}],
|
|
8711
9020
|
offset,
|
|
8712
9021
|
historySource,
|
|
8713
|
-
doNotPushHistory
|
|
9022
|
+
doNotPushHistory,
|
|
9023
|
+
isHistoryOp
|
|
8714
9024
|
});
|
|
8715
9025
|
}
|
|
8716
9026
|
/**
|
|
@@ -8783,7 +9093,9 @@
|
|
|
8783
9093
|
} else this.selectionBeforeOp = null;
|
|
8784
9094
|
return isBatch ? newConfigs : newConfigs[0];
|
|
8785
9095
|
}
|
|
8786
|
-
async dragTo(config, targetParent, targetIndex,
|
|
9096
|
+
async dragTo(config, targetParent, targetIndex, options = {}) {
|
|
9097
|
+
const { doNotPushHistory = false, historyDescription, historySource } = options;
|
|
9098
|
+
const isHistoryOp = isReplay(options);
|
|
8787
9099
|
this.captureSelectionBeforeOp();
|
|
8788
9100
|
if (!targetParent || !Array.isArray(targetParent.items)) return;
|
|
8789
9101
|
const configs = Array.isArray(config) ? config : [config];
|
|
@@ -8850,7 +9162,8 @@
|
|
|
8850
9162
|
targetIndex,
|
|
8851
9163
|
targetParent,
|
|
8852
9164
|
historySource,
|
|
8853
|
-
doNotPushHistory
|
|
9165
|
+
doNotPushHistory,
|
|
9166
|
+
isHistoryOp
|
|
8854
9167
|
});
|
|
8855
9168
|
}
|
|
8856
9169
|
/**
|
|
@@ -8950,7 +9263,8 @@
|
|
|
8950
9263
|
* @returns 反向后产生的新 step;目标不存在 / 未应用 / 反向失败时返回 null
|
|
8951
9264
|
*/
|
|
8952
9265
|
async revertPageStep(index) {
|
|
8953
|
-
const
|
|
9266
|
+
const pageId = this.get("page")?.id;
|
|
9267
|
+
const entry = this.ctx.history.getStepList("page", pageId)[index];
|
|
8954
9268
|
if (!entry?.applied) return null;
|
|
8955
9269
|
const { step } = entry;
|
|
8956
9270
|
if (step.opType === "initial") return null;
|
|
@@ -8960,10 +9274,10 @@
|
|
|
8960
9274
|
if (!items.length || !items.every((item) => item.changeRecords?.length)) return null;
|
|
8961
9275
|
}
|
|
8962
9276
|
let revertedStep = null;
|
|
8963
|
-
const captureRevert = (
|
|
8964
|
-
revertedStep = s;
|
|
9277
|
+
const captureRevert = (s, type, id) => {
|
|
9278
|
+
if (type === "page" && id === pageId && !revertedStep) revertedStep = s;
|
|
8965
9279
|
};
|
|
8966
|
-
this.ctx.history.
|
|
9280
|
+
this.ctx.history.on("change", captureRevert);
|
|
8967
9281
|
const historyDescription = `回滚 #${index + 1}: ${describeStepForRevert(step)}`;
|
|
8968
9282
|
const opts = {
|
|
8969
9283
|
doNotSelect: true,
|
|
@@ -9273,9 +9587,11 @@
|
|
|
9273
9587
|
/**
|
|
9274
9588
|
* 构造一条页面级「set root」历史记录(不携带选区 / modifiedNodeIds 上下文)并落到该页面自己的栈。
|
|
9275
9589
|
*
|
|
9276
|
-
* 连续 set root
|
|
9277
|
-
*
|
|
9278
|
-
*
|
|
9590
|
+
* 连续 set root 替换:若该页栈最新一条已是**同来源、同为整页 update**的 set root 记录
|
|
9591
|
+
* ({@link StepValue.rootStep} 且 `source` 相同),则用本次记录**替换**它而非新增,避免源码反复保存时堆积记录。
|
|
9592
|
+
* 替换时必须把 `oldSchema` 追溯到最早那一跳,并沿用原 uuid:否则只剩「上一版 → 本版」,
|
|
9593
|
+
* 撤销到基线时 DSL 会停在中途版本且无法继续回退,已发出的 historyId 也会失效。
|
|
9594
|
+
* 其余情况(来源不同 / 页面增删)照常新增,保留完整变更链条。
|
|
9279
9595
|
*/
|
|
9280
9596
|
pushPageDiffStep(opType, page, diffItem, source) {
|
|
9281
9597
|
const step = {
|
|
@@ -9295,8 +9611,19 @@
|
|
|
9295
9611
|
};
|
|
9296
9612
|
if (source) step.source = source;
|
|
9297
9613
|
const top = this.ctx.history.getCurrentPageStep(page.id);
|
|
9298
|
-
|
|
9299
|
-
|
|
9614
|
+
const earliestOldSchema = top?.diff?.[0]?.oldSchema;
|
|
9615
|
+
if (top?.rootStep && top.source === source && opType === "update" && top.opType === "update" && earliestOldSchema) {
|
|
9616
|
+
this.ctx.history.replaceCurrentStep("page", {
|
|
9617
|
+
...step,
|
|
9618
|
+
uuid: top.uuid,
|
|
9619
|
+
diff: [{
|
|
9620
|
+
...diffItem,
|
|
9621
|
+
oldSchema: earliestOldSchema
|
|
9622
|
+
}]
|
|
9623
|
+
}, page.id);
|
|
9624
|
+
return;
|
|
9625
|
+
}
|
|
9626
|
+
this.ctx.history.push("page", step, page.id);
|
|
9300
9627
|
}
|
|
9301
9628
|
pushOpHistory(opType, { diff, pageData, historyDescription, source }) {
|
|
9302
9629
|
const step = {
|
|
@@ -9328,8 +9655,8 @@
|
|
|
9328
9655
|
* 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
|
|
9329
9656
|
* 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
|
|
9330
9657
|
*
|
|
9331
|
-
* 注意:这些路径都会发出 add / remove / update / change
|
|
9332
|
-
*
|
|
9658
|
+
* 注意:这些路径都会发出 add / remove / update / change 事件,且 `change` 事件带 `isHistoryOp: true`,
|
|
9659
|
+
* 业务侧可据此跳过仅针对「用户主动编辑」的副作用(加锁 / 埋点 / 自动保存等)。
|
|
9333
9660
|
*
|
|
9334
9661
|
* @param step 操作记录
|
|
9335
9662
|
* @param reverse true = 撤销,false = 重做
|
|
@@ -9343,6 +9670,7 @@
|
|
|
9343
9670
|
doNotSelect: true,
|
|
9344
9671
|
doNotSwitchPage: true,
|
|
9345
9672
|
doNotPushHistory: true,
|
|
9673
|
+
[HISTORY_OP]: true,
|
|
9346
9674
|
historySource: step.source
|
|
9347
9675
|
};
|
|
9348
9676
|
switch (step.opType) {
|
|
@@ -9426,10 +9754,7 @@
|
|
|
9426
9754
|
}
|
|
9427
9755
|
return cloneDeep$1(reverse ? oldNode : newNode);
|
|
9428
9756
|
});
|
|
9429
|
-
if (configs.length) await this.update(configs,
|
|
9430
|
-
doNotPushHistory: true,
|
|
9431
|
-
historySource: step.source
|
|
9432
|
-
});
|
|
9757
|
+
if (configs.length) await this.update(configs, commonOpts);
|
|
9433
9758
|
break;
|
|
9434
9759
|
}
|
|
9435
9760
|
}
|
|
@@ -9467,7 +9792,8 @@
|
|
|
9467
9792
|
page: this.getPageOfNode(node.id)
|
|
9468
9793
|
})),
|
|
9469
9794
|
historySource: source,
|
|
9470
|
-
doNotPushHistory: true
|
|
9795
|
+
doNotPushHistory: true,
|
|
9796
|
+
isHistoryOp: true
|
|
9471
9797
|
});
|
|
9472
9798
|
}
|
|
9473
9799
|
/** 经由 reactivity 注入的 toRaw(默认是 Vue 的 toRaw) */
|
|
@@ -9615,8 +9941,9 @@
|
|
|
9615
9941
|
* 注册一个扩展历史类型,使其可与内置 `page` / `codeBlock` / `dataSource` 一样走统一的
|
|
9616
9942
|
* {@link push} / {@link undo} / {@link redo}(按 id 分栈、独立 undo/redo)。
|
|
9617
9943
|
*
|
|
9944
|
+
* 扩展类型与内置类型一样统一派发 `change` 事件,无需(也不支持)单独指定事件名。
|
|
9945
|
+
*
|
|
9618
9946
|
* @param stepType 自定义历史类型标识(勿与内置类型重名)
|
|
9619
|
-
* @param options.event push/undo/redo 后派发的事件名,缺省为 `${stepType}-history-change`
|
|
9620
9947
|
* @param options.name 历史面板中的展示名称(tab / 分组标题等),缺省回退到 stepType 本身
|
|
9621
9948
|
*/
|
|
9622
9949
|
registerStepType(stepType, options = {}) {
|
|
@@ -9700,11 +10027,20 @@
|
|
|
9700
10027
|
const first = this.state.steps[stepType]?.[id]?.getElementList()[0];
|
|
9701
10028
|
return first?.opType === "initial" ? first : void 0;
|
|
9702
10029
|
}
|
|
10030
|
+
/**
|
|
10031
|
+
* 目标栈「回到初始」是否可达:容量裁剪删掉已应用的真实步骤后撤销链断开,返回 false。
|
|
10032
|
+
* 与是否存在 {@link getMarker} 基线无关——没有基线的栈同样可能因裁剪回不到加载时的 DSL,
|
|
10033
|
+
* 历史面板的各 tab 统一用它判断初始行是否可高亮 / 可点击。
|
|
10034
|
+
*/
|
|
10035
|
+
isInitialReachable(stepType, id) {
|
|
10036
|
+
if (!this.isValidStackId(id)) return true;
|
|
10037
|
+
return this.state.steps[stepType]?.[id]?.isInitialReachable() ?? true;
|
|
10038
|
+
}
|
|
9703
10039
|
push(stepType, step, id) {
|
|
9704
10040
|
if (!this.isValidStackId(id)) return null;
|
|
9705
10041
|
this.fillStepMeta(step);
|
|
9706
10042
|
getOrCreateStack(this.getStepBucket(stepType), id).pushElement(step);
|
|
9707
|
-
this.
|
|
10043
|
+
this.emitStepChange(step, stepType, id);
|
|
9708
10044
|
return step;
|
|
9709
10045
|
}
|
|
9710
10046
|
undo(stepType, id) {
|
|
@@ -9713,7 +10049,7 @@
|
|
|
9713
10049
|
if (!undoRedo) return null;
|
|
9714
10050
|
if (undoRedo.getCursor() <= undoFloor(undoRedo)) return null;
|
|
9715
10051
|
const step = undoRedo.undo();
|
|
9716
|
-
if (step) this.
|
|
10052
|
+
if (step) this.emitStepChange(step, stepType, id, true);
|
|
9717
10053
|
return step;
|
|
9718
10054
|
}
|
|
9719
10055
|
redo(stepType, id) {
|
|
@@ -9721,7 +10057,7 @@
|
|
|
9721
10057
|
const undoRedo = this.state.steps[stepType]?.[id];
|
|
9722
10058
|
if (!undoRedo) return null;
|
|
9723
10059
|
const step = undoRedo.redo();
|
|
9724
|
-
if (step) this.
|
|
10060
|
+
if (step) this.emitStepChange(step, stepType, id, true);
|
|
9725
10061
|
return step;
|
|
9726
10062
|
}
|
|
9727
10063
|
/**
|
|
@@ -9757,7 +10093,7 @@
|
|
|
9757
10093
|
const undoRedo = getOrCreateStack(this.getStepBucket(stepType), id);
|
|
9758
10094
|
this.fillStepMeta(state);
|
|
9759
10095
|
if (!undoRedo.replaceCurrentElement(state)) return null;
|
|
9760
|
-
this.
|
|
10096
|
+
this.emitStepChange(state, stepType, id);
|
|
9761
10097
|
return state;
|
|
9762
10098
|
}
|
|
9763
10099
|
destroy() {
|
|
@@ -9794,6 +10130,9 @@
|
|
|
9794
10130
|
*
|
|
9795
10131
|
* 同一栈内任意时刻最多只有一条记录为 `saved`;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
|
|
9796
10132
|
*
|
|
10133
|
+
* 标记后把对应栈裁剪到容量上限({@link markStackSaved} → {@link UndoRedo.trim}):入栈与还原都不裁剪,
|
|
10134
|
+
* 只有保存后才收敛,避免用户在落库前丢掉可撤销的历史;initial 基线与 set root 产生的记录不会被裁掉。
|
|
10135
|
+
*
|
|
9797
10136
|
* @param stepType 历史类型
|
|
9798
10137
|
* @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
|
|
9799
10138
|
*/
|
|
@@ -9864,6 +10203,10 @@
|
|
|
9864
10203
|
}
|
|
9865
10204
|
/**
|
|
9866
10205
|
* 用 {@link serialize} 导出的快照重建全部撤销/重做栈,会整体覆盖当前内存中的历史状态。
|
|
10206
|
+
*
|
|
10207
|
+
* 单个栈 / 单个类型的快照损坏只丢弃该部分,其余照常还原;
|
|
10208
|
+
* 快照里的栈全部还原失败时抛出首个错误,此时内存中的历史状态保持不变
|
|
10209
|
+
* (不会把「什么都没恢复」当成一次成功的还原)。
|
|
9867
10210
|
*/
|
|
9868
10211
|
restore(snapshot) {
|
|
9869
10212
|
const steps = {
|
|
@@ -9871,9 +10214,20 @@
|
|
|
9871
10214
|
codeBlock: {},
|
|
9872
10215
|
dataSource: {}
|
|
9873
10216
|
};
|
|
10217
|
+
let firstError;
|
|
10218
|
+
let stackCount = 0;
|
|
10219
|
+
let restoredStackCount = 0;
|
|
9874
10220
|
Object.entries(snapshot.steps).forEach(([stepType, bucket]) => {
|
|
9875
|
-
|
|
10221
|
+
try {
|
|
10222
|
+
const restored = deserializeStacks(convertExtraMaps(bucket, true), this.ctx.parseDSL);
|
|
10223
|
+
steps[stepType] = restored;
|
|
10224
|
+
restoredStackCount += Object.keys(restored).length;
|
|
10225
|
+
} catch (error) {
|
|
10226
|
+
firstError ??= error;
|
|
10227
|
+
}
|
|
10228
|
+
stackCount += Object.keys(bucket ?? {}).length;
|
|
9876
10229
|
});
|
|
10230
|
+
if (firstError && stackCount > 0 && restoredStackCount === 0) throw firstError;
|
|
9877
10231
|
this.state.steps = steps;
|
|
9878
10232
|
return snapshot;
|
|
9879
10233
|
}
|
|
@@ -9969,6 +10323,16 @@
|
|
|
9969
10323
|
return super.emit(eventName, ...args);
|
|
9970
10324
|
}
|
|
9971
10325
|
/**
|
|
10326
|
+
* 所有历史类型统一派发 `change`(签名 `(step, stepType, id, isHistoryOp)`);
|
|
10327
|
+
* 代码块 / 数据源额外派发文档约定的同构事件(签名 `(id, step, isHistoryOp)`)。
|
|
10328
|
+
* `isHistoryOp` 仅在 `undo` / `redo` 时为 true,供业务侧跳过历史回放触发的副作用。
|
|
10329
|
+
*/
|
|
10330
|
+
emitStepChange(step, stepType, id, isHistoryOp = false) {
|
|
10331
|
+
this.emit("change", step, stepType, id, isHistoryOp);
|
|
10332
|
+
if (stepType === "codeBlock") this.emit("code-block-history-change", id, step, isHistoryOp);
|
|
10333
|
+
else if (stepType === "dataSource") this.emit("data-source-history-change", id, step, isHistoryOp);
|
|
10334
|
+
}
|
|
10335
|
+
/**
|
|
9972
10336
|
* 取出指定历史类型的栈桶(`Record<id, UndoRedo>`);不存在时按需创建空桶,
|
|
9973
10337
|
* 从而支持通过 {@link registerStepType} 或首次 push 动态扩展历史类型。
|
|
9974
10338
|
*/
|
|
@@ -11604,6 +11968,19 @@
|
|
|
11604
11968
|
var zoom = (0, vue.computed)(() => ui_default.get("zoom") || 1);
|
|
11605
11969
|
var uiSelectMode = (0, vue.computed)(() => ui_default.get("uiSelectMode"));
|
|
11606
11970
|
var getGuideLineKey = (key) => `${key}_${root.value?.id}_${page.value?.id}`;
|
|
11971
|
+
/** 选中节点按原文档顺序整组插到 index 之前。顺序不变时返回 null */
|
|
11972
|
+
var reorderSiblingItems = (items, ids, index) => {
|
|
11973
|
+
const idSet = new Set(ids.map((id) => `${id}`));
|
|
11974
|
+
const selected = items.filter((node) => idSet.has(`${node.id}`));
|
|
11975
|
+
if (!selected.length) return null;
|
|
11976
|
+
const selectedSet = new Set(selected);
|
|
11977
|
+
const boundedIndex = Math.min(Math.max(index, 0), items.length);
|
|
11978
|
+
const insertAt = items.slice(0, boundedIndex).filter((node) => !selectedSet.has(node)).length;
|
|
11979
|
+
const next = items.filter((node) => !selectedSet.has(node));
|
|
11980
|
+
next.splice(insertAt, 0, ...selected);
|
|
11981
|
+
if (next.length === items.length && next.every((node, itemIndex) => node === items[itemIndex])) return null;
|
|
11982
|
+
return next;
|
|
11983
|
+
};
|
|
11607
11984
|
var useStage = (stageOptions) => {
|
|
11608
11985
|
const stage = new _tmagic_stage.default({
|
|
11609
11986
|
render: stageOptions.render,
|
|
@@ -11697,6 +12074,18 @@
|
|
|
11697
12074
|
});
|
|
11698
12075
|
});
|
|
11699
12076
|
stage.on("sort", (ev) => {
|
|
12077
|
+
if (ev.srcIds?.length && typeof ev.index === "number") {
|
|
12078
|
+
const parent = editorService.getParentById(ev.srcIds[0]);
|
|
12079
|
+
const next = parent?.items && reorderSiblingItems(parent.items, ev.srcIds, ev.index);
|
|
12080
|
+
if (parent && next) {
|
|
12081
|
+
editorService.update({
|
|
12082
|
+
...parent,
|
|
12083
|
+
items: next
|
|
12084
|
+
}, { historySource: "stage" });
|
|
12085
|
+
editorService.multiSelect(ev.srcIds);
|
|
12086
|
+
}
|
|
12087
|
+
return;
|
|
12088
|
+
}
|
|
11700
12089
|
editorService.sort(ev.src, ev.dist, { historySource: "stage" });
|
|
11701
12090
|
});
|
|
11702
12091
|
stage.on("remove", (ev) => {
|
|
@@ -14244,6 +14633,10 @@
|
|
|
14244
14633
|
type: Boolean,
|
|
14245
14634
|
default: true
|
|
14246
14635
|
},
|
|
14636
|
+
initialReachable: {
|
|
14637
|
+
type: Boolean,
|
|
14638
|
+
default: true
|
|
14639
|
+
},
|
|
14247
14640
|
marker: { default: void 0 }
|
|
14248
14641
|
},
|
|
14249
14642
|
emits: ["goto-initial"],
|
|
@@ -14256,27 +14649,34 @@
|
|
|
14256
14649
|
* 用标记的文案与时间渲染本行;标记不进入撤销/重做栈,仅作为该页基线展示。
|
|
14257
14650
|
*
|
|
14258
14651
|
* 该行不是真实 step,仅作为 UI 入口;上层负责把"点击"翻译为 `service.goto*(0)`。
|
|
14652
|
+
* 若上层注入 `initialReachable === false`(早期记录已被容量裁剪),
|
|
14653
|
+
* 则如实显示「不可达」并禁用「回到」,避免把撤销下限误报成初始状态。
|
|
14259
14654
|
*/
|
|
14260
14655
|
const props = __props;
|
|
14261
|
-
|
|
14656
|
+
/**
|
|
14657
|
+
* 早期真实步骤被容量裁剪后撤销链已断:撤到底只能停在剩余最老一步的 oldSchema,
|
|
14658
|
+
* 不是加载时的初始 DSL,此时该行需明确标注不可达且不再提供「回到」。
|
|
14659
|
+
*/
|
|
14660
|
+
const desc = (0, vue.computed)(() => props.initialReachable ? props.marker?.historyDescription || "未修改的初始状态" : "初始状态不可达(早期记录已清理)");
|
|
14262
14661
|
/** 基线(初始状态)是否为最近一次保存点:仅页面栈的 `initial` 基线 step 会被 markSaved 标记。 */
|
|
14263
14662
|
const saved = (0, vue.computed)(() => Boolean(props.marker?.saved));
|
|
14264
14663
|
const time = (0, vue.computed)(() => formatHistoryTime(props.marker?.timestamp));
|
|
14265
14664
|
const timeTitle = (0, vue.computed)(() => formatHistoryFullTime(props.marker?.timestamp));
|
|
14266
14665
|
const rowTitle = (0, vue.computed)(() => {
|
|
14666
|
+
if (!props.initialReachable) return "早期历史记录已被容量裁剪,无法回到加载时的初始 DSL";
|
|
14267
14667
|
const base = props.marker?.historyDescription || "未修改的初始状态";
|
|
14268
14668
|
return props.isCurrent ? `当前已回到${base}` : `点击回到${base}`;
|
|
14269
14669
|
});
|
|
14270
14670
|
const emit = __emit;
|
|
14271
14671
|
const onClick = () => {
|
|
14272
|
-
if (props.isCurrent) return;
|
|
14672
|
+
if (props.isCurrent || !props.initialReachable) return;
|
|
14273
14673
|
emit("goto-initial");
|
|
14274
14674
|
};
|
|
14275
14675
|
return (_ctx, _cache) => {
|
|
14276
14676
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
|
14277
14677
|
class: (0, vue.normalizeClass)(["m-editor-history-list-item m-editor-history-list-initial", {
|
|
14278
14678
|
"is-current": __props.isCurrent,
|
|
14279
|
-
"is-clickable": !__props.isCurrent
|
|
14679
|
+
"is-clickable": !__props.isCurrent && __props.initialReachable
|
|
14280
14680
|
}]),
|
|
14281
14681
|
title: rowTitle.value
|
|
14282
14682
|
}, [
|
|
@@ -14287,7 +14687,7 @@
|
|
|
14287
14687
|
_cache[1] || (_cache[1] = (0, vue.createElementVNode)("span", { class: "m-editor-history-list-item-op op-initial" }, "初始", -1)),
|
|
14288
14688
|
(0, vue.createElementVNode)("span", _hoisted_2$24, (0, vue.toDisplayString)(desc.value), 1),
|
|
14289
14689
|
saved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$11, "已保存")) : (0, vue.createCommentVNode)("v-if", true),
|
|
14290
|
-
__props.gotoEnabled && !__props.isCurrent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$7, [(0, vue.createElementVNode)("span", {
|
|
14690
|
+
__props.gotoEnabled && !__props.isCurrent && __props.initialReachable ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$7, [(0, vue.createElementVNode)("span", {
|
|
14291
14691
|
class: "m-editor-history-list-item-goto",
|
|
14292
14692
|
title: "回到该记录",
|
|
14293
14693
|
onClick: (0, vue.withModifiers)(onClick, ["stop"])
|
|
@@ -14315,7 +14715,12 @@
|
|
|
14315
14715
|
config: {},
|
|
14316
14716
|
bucketId: {},
|
|
14317
14717
|
groups: {},
|
|
14318
|
-
expanded: {}
|
|
14718
|
+
expanded: {},
|
|
14719
|
+
marker: {},
|
|
14720
|
+
initialReachable: {
|
|
14721
|
+
type: Boolean,
|
|
14722
|
+
default: true
|
|
14723
|
+
}
|
|
14319
14724
|
},
|
|
14320
14725
|
emits: [
|
|
14321
14726
|
"toggle",
|
|
@@ -14333,8 +14738,12 @@
|
|
|
14333
14738
|
const rowKey = (group) => `${props.config.prefix}-${props.bucketId}-${group.steps[0]?.index}`;
|
|
14334
14739
|
/** 把原始分组派生为 GroupRow 直接消费的视图模型。 */
|
|
14335
14740
|
const toRow = (group) => toRowGroup(group, rowKey(group), props.config);
|
|
14336
|
-
/**
|
|
14337
|
-
|
|
14741
|
+
/**
|
|
14742
|
+
* 该 bucket 是否处于初始状态:全部 group 都未 applied,且撤销链未因容量裁剪断开。
|
|
14743
|
+
* 与 PageTab 使用同一判断条件——空列表 `every` 返回 true,即只有基线、没有任何真实步骤时也视为初始状态;
|
|
14744
|
+
* 没有基线的栈也通过 initialReachable 参与判断。
|
|
14745
|
+
*/
|
|
14746
|
+
const isInitial = (0, vue.computed)(() => props.initialReachable && props.groups.every((g) => !g.applied));
|
|
14338
14747
|
return (_ctx, _cache) => {
|
|
14339
14748
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$82, [(0, vue.createElementVNode)("div", _hoisted_2$23, [
|
|
14340
14749
|
(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.config.title), 1),
|
|
@@ -14361,9 +14770,16 @@
|
|
|
14361
14770
|
__props.config.showInitial !== false ? ((0, vue.openBlock)(), (0, vue.createBlock)(InitialRow_default, {
|
|
14362
14771
|
key: 0,
|
|
14363
14772
|
"is-current": isInitial.value,
|
|
14773
|
+
"initial-reachable": __props.initialReachable,
|
|
14774
|
+
marker: __props.marker,
|
|
14364
14775
|
"goto-enabled": __props.config.gotoEnabled,
|
|
14365
14776
|
onGotoInitial: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("goto-initial", __props.bucketId))
|
|
14366
|
-
}, null, 8, [
|
|
14777
|
+
}, null, 8, [
|
|
14778
|
+
"is-current",
|
|
14779
|
+
"initial-reachable",
|
|
14780
|
+
"marker",
|
|
14781
|
+
"goto-enabled"
|
|
14782
|
+
])) : (0, vue.createCommentVNode)("v-if", true)
|
|
14367
14783
|
])]);
|
|
14368
14784
|
};
|
|
14369
14785
|
}
|
|
@@ -14386,7 +14802,8 @@
|
|
|
14386
14802
|
props: {
|
|
14387
14803
|
config: {},
|
|
14388
14804
|
buckets: {},
|
|
14389
|
-
expanded: {}
|
|
14805
|
+
expanded: {},
|
|
14806
|
+
initialState: {}
|
|
14390
14807
|
},
|
|
14391
14808
|
emits: [
|
|
14392
14809
|
"toggle",
|
|
@@ -14410,6 +14827,8 @@
|
|
|
14410
14827
|
"bucket-id": bucket.id,
|
|
14411
14828
|
groups: bucket.groups,
|
|
14412
14829
|
expanded: __props.expanded,
|
|
14830
|
+
marker: __props.initialState?.[bucket.id]?.marker,
|
|
14831
|
+
"initial-reachable": __props.initialState?.[bucket.id]?.initialReachable,
|
|
14413
14832
|
onToggle: _cache[1] || (_cache[1] = (key) => _ctx.$emit("toggle", key)),
|
|
14414
14833
|
onGoto: _cache[2] || (_cache[2] = (id, index) => _ctx.$emit("goto", id, index)),
|
|
14415
14834
|
onGotoInitial: _cache[3] || (_cache[3] = (id) => _ctx.$emit("goto-initial", id)),
|
|
@@ -14419,7 +14838,9 @@
|
|
|
14419
14838
|
"config",
|
|
14420
14839
|
"bucket-id",
|
|
14421
14840
|
"groups",
|
|
14422
|
-
"expanded"
|
|
14841
|
+
"expanded",
|
|
14842
|
+
"marker",
|
|
14843
|
+
"initial-reachable"
|
|
14423
14844
|
]);
|
|
14424
14845
|
}), 128))]),
|
|
14425
14846
|
_: 1
|
|
@@ -14445,7 +14866,11 @@
|
|
|
14445
14866
|
props: {
|
|
14446
14867
|
list: {},
|
|
14447
14868
|
expanded: {},
|
|
14448
|
-
marker: {}
|
|
14869
|
+
marker: {},
|
|
14870
|
+
initialReachable: {
|
|
14871
|
+
type: Boolean,
|
|
14872
|
+
default: true
|
|
14873
|
+
}
|
|
14449
14874
|
},
|
|
14450
14875
|
emits: [
|
|
14451
14876
|
"toggle",
|
|
@@ -14480,11 +14905,14 @@
|
|
|
14480
14905
|
const rowKey = (group) => `pg-${group.steps[0]?.index}`;
|
|
14481
14906
|
const toRow = (group) => toRowGroup(group, rowKey(group), descriptor);
|
|
14482
14907
|
/**
|
|
14483
|
-
* 是否处于"初始状态"
|
|
14908
|
+
* 是否处于"初始状态"——即对应页面历史栈撤到底:
|
|
14484
14909
|
* 当 list 中所有 group 的 applied 都为 false 时即为该状态(空列表 `every` 返回 true,
|
|
14485
14910
|
* 即仅有 marker、无任何操作记录时也视为处于初始状态)。
|
|
14911
|
+
*
|
|
14912
|
+
* 例外:早期真实步骤被容量裁剪后(initialReachable === false),
|
|
14913
|
+
* 撤到底只能停在剩余最老一步的 oldSchema,并非加载时的初始 DSL,此时不再高亮初始行。
|
|
14486
14914
|
*/
|
|
14487
|
-
const isInitial = (0, vue.computed)(() => props.list.every((g) => !g.applied));
|
|
14915
|
+
const isInitial = (0, vue.computed)(() => props.initialReachable && props.list.every((g) => !g.applied));
|
|
14488
14916
|
return (_ctx, _cache) => {
|
|
14489
14917
|
return !__props.list.length && !__props.marker ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$80, "暂无操作记录")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [__props.list.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$21, [(0, vue.createElementVNode)("span", {
|
|
14490
14918
|
class: "m-editor-history-list-clear",
|
|
@@ -14508,9 +14936,14 @@
|
|
|
14508
14936
|
(0, vue.createCommentVNode)("\n 初始状态项:永远位于列表底部(页面 tab 倒序展示,最底部=最早),\n 作为\"未修改\"零点。当所有 group 都未 applied 时它即为当前位置。\n 设置 root 时生成的「未修改的初始状态」标记(marker)会作为该行的文案与时间来源。\n "),
|
|
14509
14937
|
(0, vue.createVNode)(InitialRow_default, {
|
|
14510
14938
|
"is-current": isInitial.value,
|
|
14939
|
+
"initial-reachable": __props.initialReachable,
|
|
14511
14940
|
marker: __props.marker,
|
|
14512
14941
|
onGotoInitial: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("goto-initial"))
|
|
14513
|
-
}, null, 8, [
|
|
14942
|
+
}, null, 8, [
|
|
14943
|
+
"is-current",
|
|
14944
|
+
"initial-reachable",
|
|
14945
|
+
"marker"
|
|
14946
|
+
])
|
|
14514
14947
|
])]),
|
|
14515
14948
|
_: 1
|
|
14516
14949
|
})], 64));
|
|
@@ -15326,6 +15759,18 @@
|
|
|
15326
15759
|
* 基于 historyService 的 reactive state 派生,活动页切换或标记写入后自动刷新。
|
|
15327
15760
|
*/
|
|
15328
15761
|
const pageMarker = (0, vue.computed)(() => historyService.getMarker("page", editorService.get("page")?.id));
|
|
15762
|
+
/** 当前活动页「回到初始」是否可达(基于栈实例状态,无基线的栈同样适用)。 */
|
|
15763
|
+
const pageInitialReachable = (0, vue.computed)(() => historyService.isInitialReachable("page", editorService.get("page")?.id));
|
|
15764
|
+
/**
|
|
15765
|
+
* 数据源 / 代码块按目标 id 聚合初始基线与可达性,透传给 BucketTab → Bucket,
|
|
15766
|
+
* 让这两类 tab 的初始行与 PageTab 使用同一套高亮 / 不可达判定。
|
|
15767
|
+
*/
|
|
15768
|
+
const bucketInitialState = (stepType) => (0, vue.computed)(() => Object.fromEntries(Object.keys(historyService.state.steps[stepType]).map((id) => [id, {
|
|
15769
|
+
marker: historyService.getMarker(stepType, id),
|
|
15770
|
+
initialReachable: historyService.isInitialReachable(stepType, id)
|
|
15771
|
+
}])));
|
|
15772
|
+
const dataSourceInitialState = bucketInitialState("dataSource");
|
|
15773
|
+
const codeBlockInitialState = bucketInitialState("codeBlock");
|
|
15329
15774
|
/**
|
|
15330
15775
|
* 各历史类型的展示名称(页面 / 数据源 / 代码块),由 historyService.state.stepNames 配置,
|
|
15331
15776
|
* 业务方可通过 historyService.setStepName / registerStepType 覆盖。基于 reactive state 派生,配置变更后自动刷新。
|
|
@@ -15486,6 +15931,7 @@
|
|
|
15486
15931
|
list: (0, vue.unref)(pageGroupsDisplay),
|
|
15487
15932
|
expanded: (0, vue.unref)(expanded),
|
|
15488
15933
|
marker: pageMarker.value,
|
|
15934
|
+
"initial-reachable": pageInitialReachable.value,
|
|
15489
15935
|
onToggle: (0, vue.unref)(toggleGroup),
|
|
15490
15936
|
onGoto: onPageGoto,
|
|
15491
15937
|
onGotoInitial: onPageGotoInitial,
|
|
@@ -15497,6 +15943,7 @@
|
|
|
15497
15943
|
"list",
|
|
15498
15944
|
"expanded",
|
|
15499
15945
|
"marker",
|
|
15946
|
+
"initial-reachable",
|
|
15500
15947
|
"onToggle",
|
|
15501
15948
|
"onDiffStep",
|
|
15502
15949
|
"onRevertStep"
|
|
@@ -15512,6 +15959,7 @@
|
|
|
15512
15959
|
config: dataSourceConfig.value,
|
|
15513
15960
|
buckets: (0, vue.unref)(dataSourceGroupsByTarget),
|
|
15514
15961
|
expanded: (0, vue.unref)(expanded),
|
|
15962
|
+
"initial-state": (0, vue.unref)(dataSourceInitialState),
|
|
15515
15963
|
onToggle: (0, vue.unref)(toggleGroup),
|
|
15516
15964
|
onGoto: onDataSourceGoto,
|
|
15517
15965
|
onGotoInitial: onDataSourceGotoInitial,
|
|
@@ -15522,6 +15970,7 @@
|
|
|
15522
15970
|
"config",
|
|
15523
15971
|
"buckets",
|
|
15524
15972
|
"expanded",
|
|
15973
|
+
"initial-state",
|
|
15525
15974
|
"onToggle",
|
|
15526
15975
|
"onDiffStep",
|
|
15527
15976
|
"onRevertStep"
|
|
@@ -15537,6 +15986,7 @@
|
|
|
15537
15986
|
config: codeBlockConfig.value,
|
|
15538
15987
|
buckets: (0, vue.unref)(codeBlockGroupsByTarget),
|
|
15539
15988
|
expanded: (0, vue.unref)(expanded),
|
|
15989
|
+
"initial-state": (0, vue.unref)(codeBlockInitialState),
|
|
15540
15990
|
onToggle: (0, vue.unref)(toggleGroup),
|
|
15541
15991
|
onGoto: onCodeBlockGoto,
|
|
15542
15992
|
onGotoInitial: onCodeBlockGotoInitial,
|
|
@@ -15547,6 +15997,7 @@
|
|
|
15547
15997
|
"config",
|
|
15548
15998
|
"buckets",
|
|
15549
15999
|
"expanded",
|
|
16000
|
+
"initial-state",
|
|
15550
16001
|
"onToggle",
|
|
15551
16002
|
"onDiffStep",
|
|
15552
16003
|
"onRevertStep"
|
|
@@ -15615,10 +16066,18 @@
|
|
|
15615
16066
|
const hiddenIndexSet = (0, vue.ref)(/* @__PURE__ */ new Set());
|
|
15616
16067
|
const hasOverflow = (0, vue.computed)(() => hiddenIndexSet.value.size > 0);
|
|
15617
16068
|
const overflowItems = (0, vue.computed)(() => {
|
|
15618
|
-
const items = props.items.filter((_, index) => hiddenIndexSet.value.has(index)).map((item) =>
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
16069
|
+
const items = props.items.filter((_, index) => hiddenIndexSet.value.has(index)).map((item) => {
|
|
16070
|
+
if (item.type === "divider") return {
|
|
16071
|
+
...item,
|
|
16072
|
+
direction: "horizontal"
|
|
16073
|
+
};
|
|
16074
|
+
if (item.type === "component") return item;
|
|
16075
|
+
return {
|
|
16076
|
+
...item,
|
|
16077
|
+
text: item.text || item.tooltip,
|
|
16078
|
+
tooltip: void 0
|
|
16079
|
+
};
|
|
16080
|
+
});
|
|
15622
16081
|
let start = 0;
|
|
15623
16082
|
let end = items.length;
|
|
15624
16083
|
while (start < end && items[start].type === "divider") start += 1;
|
|
@@ -19572,6 +20031,26 @@
|
|
|
19572
20031
|
});
|
|
19573
20032
|
// packages/editor/src/components/ScrollViewer.vue
|
|
19574
20033
|
var ScrollViewer_default = ScrollViewer_vue_vue_type_script_setup_true_lang_default;
|
|
20034
|
+
// packages/editor/src/utils/page.ts
|
|
20035
|
+
init_lodash();
|
|
20036
|
+
/**
|
|
20037
|
+
* 页面 id 和页面自身配置都没变,只是 items 换了顺序。
|
|
20038
|
+
* 这种更新来自子节点排序,不是切页,也不是改页面配置。
|
|
20039
|
+
*/
|
|
20040
|
+
var isSamePageItemsReorder = (prev, next) => {
|
|
20041
|
+
if (!prev || !next || `${prev.id}` !== `${next.id}`) return false;
|
|
20042
|
+
if (!isEqual(omit(prev, "items"), omit(next, "items"))) return false;
|
|
20043
|
+
const prevItems = prev.items ?? [];
|
|
20044
|
+
const nextItems = next.items ?? [];
|
|
20045
|
+
if (!prevItems.length || prevItems.length !== nextItems.length) return false;
|
|
20046
|
+
const used = /* @__PURE__ */ new Set();
|
|
20047
|
+
return nextItems.every((item) => {
|
|
20048
|
+
const index = prevItems.findIndex((prevItem, itemIndex) => !used.has(itemIndex) && isEqual(prevItem, item));
|
|
20049
|
+
if (index < 0) return false;
|
|
20050
|
+
used.add(index);
|
|
20051
|
+
return true;
|
|
20052
|
+
});
|
|
20053
|
+
};
|
|
19575
20054
|
// packages/editor/src/layouts/workspace/viewer/NodeListMenu.vue?vue&type=script&setup=true&lang.ts
|
|
19576
20055
|
var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
19577
20056
|
__name: "NodeListMenu",
|
|
@@ -19934,40 +20413,48 @@
|
|
|
19934
20413
|
const zoom = (0, vue.computed)(() => uiService.get("zoom"));
|
|
19935
20414
|
const node = (0, vue.computed)(() => editorService.get("node"));
|
|
19936
20415
|
/**
|
|
19937
|
-
*
|
|
20416
|
+
* 双击选中进度:上次双击选中的节点 id
|
|
20417
|
+
*
|
|
20418
|
+
* 单击先于双击触发,会把当前选中重置到鼠标下最内层元素,
|
|
20419
|
+
* 所以层级的推进不能读当前选中状态,只能由双击自己记录。
|
|
20420
|
+
*/
|
|
20421
|
+
let lastDblclickSelectedId;
|
|
20422
|
+
/**
|
|
20423
|
+
* 遍历鼠标位置下的元素链,找出「有子元素没显示全」的滚动容器
|
|
20424
|
+
*
|
|
20425
|
+
* 被裁掉的子元素不参与 elementsFromPoint 命中,无需找回它们:
|
|
20426
|
+
* 需要定位的是承载这些子元素的容器,交给 openOverlay 展开完整内容。
|
|
20427
|
+
* 可视区域以页面(页面片)为界:容器可视区与页面矩形求交后,
|
|
20428
|
+
* 只要有可选中子元素没完整落在该区域内,或容器内容本身就溢出了,
|
|
20429
|
+
* 这个容器就是需要展开的滚动容器。
|
|
19938
20430
|
*
|
|
19939
|
-
*
|
|
19940
|
-
*
|
|
19941
|
-
*
|
|
20431
|
+
* 轮播等组件靠内部样式完成裁剪,容器自身的 computed overflow 可能是 visible,
|
|
20432
|
+
* 因此不能拿 overflow 当门槛;openOverlay 也是按 scrollWidth/scrollHeight 展开,
|
|
20433
|
+
* 内容溢出本身就是最可靠的信号。
|
|
20434
|
+
* 页面自身是可视区域边界而不是滚动容器;iframe 级容器、以及 swiper-wrapper
|
|
20435
|
+
* 这类没有节点 id 的纯 DOM 包裹层也不参与,否则会抢在真正的容器前面。
|
|
19942
20436
|
*/
|
|
19943
|
-
const
|
|
19944
|
-
const
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
const
|
|
19948
|
-
const
|
|
19949
|
-
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
const
|
|
19953
|
-
|
|
19954
|
-
const
|
|
19955
|
-
if (
|
|
19956
|
-
|
|
19957
|
-
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
"scroll",
|
|
19962
|
-
"hidden"
|
|
19963
|
-
].includes(overflowY) || parent.scrollWidth > parent.clientWidth || parent.scrollHeight > parent.clientHeight) {
|
|
19964
|
-
const elRect = el.getBoundingClientRect();
|
|
19965
|
-
const containerRect = parent.getBoundingClientRect();
|
|
19966
|
-
if (elRect.top < containerRect.top || elRect.left < containerRect.left || elRect.bottom > containerRect.bottom || elRect.right > containerRect.right) return true;
|
|
20437
|
+
const findScrollContainer = (els) => {
|
|
20438
|
+
const doc = stage?.renderer?.contentWindow?.document;
|
|
20439
|
+
const pageEl = stage?.mask?.page ?? doc?.querySelector(".magic-ui-page, .magic-ui-page-fragment");
|
|
20440
|
+
if (!pageEl) return null;
|
|
20441
|
+
const pageRect = pageEl.getBoundingClientRect();
|
|
20442
|
+
for (const el of els) {
|
|
20443
|
+
if (el === pageEl || !pageEl.contains(el) || !(0, _tmagic_utils.getIdFromEl)()(el)) continue;
|
|
20444
|
+
const rect = el.getBoundingClientRect();
|
|
20445
|
+
const visibleLeft = Math.max(rect.left, pageRect.left);
|
|
20446
|
+
const visibleTop = Math.max(rect.top, pageRect.top);
|
|
20447
|
+
const visibleRight = Math.min(rect.right, pageRect.right);
|
|
20448
|
+
const visibleBottom = Math.min(rect.bottom, pageRect.bottom);
|
|
20449
|
+
if (el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight) return el;
|
|
20450
|
+
for (const child of el.querySelectorAll("*")) {
|
|
20451
|
+
if (!(0, _tmagic_utils.getIdFromEl)()(child)) continue;
|
|
20452
|
+
const childRect = child.getBoundingClientRect();
|
|
20453
|
+
if (!childRect.width || !childRect.height) continue;
|
|
20454
|
+
if (childRect.left < visibleLeft || childRect.top < visibleTop || childRect.right > visibleRight || childRect.bottom > visibleBottom) return el;
|
|
19967
20455
|
}
|
|
19968
|
-
parent = parent.parentElement;
|
|
19969
20456
|
}
|
|
19970
|
-
return
|
|
20457
|
+
return null;
|
|
19971
20458
|
};
|
|
19972
20459
|
(0, vue.watchEffect)(() => {
|
|
19973
20460
|
if (stage || !page.value) return;
|
|
@@ -19982,27 +20469,32 @@
|
|
|
19982
20469
|
if (await props.stageOptions.beforeDblclick(event) === false) return;
|
|
19983
20470
|
}
|
|
19984
20471
|
const el = await stage?.actionManager?.getElementFromPoint(event) || null;
|
|
19985
|
-
if (
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19991
|
-
|
|
20472
|
+
if (el) {
|
|
20473
|
+
const id = (0, _tmagic_utils.getIdFromEl)()(el);
|
|
20474
|
+
if (id) {
|
|
20475
|
+
const node = editorService.getNodeById(id);
|
|
20476
|
+
if (node?.type === "page-fragment-container" && node.pageFragmentId) {
|
|
20477
|
+
await editorService.select(node.pageFragmentId);
|
|
20478
|
+
return;
|
|
20479
|
+
}
|
|
19992
20480
|
}
|
|
19993
20481
|
}
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
const nextId = (0, _tmagic_utils.getIdFromEl)()(nextEl);
|
|
20001
|
-
if (nextId) {
|
|
20002
|
-
await editorService.select(nextId);
|
|
20003
|
-
editorService.get("stage")?.select(nextId);
|
|
20482
|
+
const els = stage?.renderer?.getElementsFromPoint(event) ?? [];
|
|
20483
|
+
if (!props.disabledStageOverlay) {
|
|
20484
|
+
const scrollContainer = findScrollContainer(els);
|
|
20485
|
+
if (scrollContainer) {
|
|
20486
|
+
stageOverlayService.openOverlay(scrollContainer);
|
|
20487
|
+
return;
|
|
20004
20488
|
}
|
|
20005
20489
|
}
|
|
20490
|
+
if (!el) return;
|
|
20491
|
+
const ids = els.map((item) => (0, _tmagic_utils.getIdFromEl)()(item)).filter((id) => Boolean(id));
|
|
20492
|
+
const lastIndex = lastDblclickSelectedId ? ids.indexOf(lastDblclickSelectedId) : -1;
|
|
20493
|
+
const nextId = ids[lastIndex >= 0 && lastIndex + 1 < ids.length ? lastIndex + 1 : 1];
|
|
20494
|
+
if (!nextId) return;
|
|
20495
|
+
lastDblclickSelectedId = nextId;
|
|
20496
|
+
await editorService.select(nextId);
|
|
20497
|
+
editorService.get("stage")?.select(nextId);
|
|
20006
20498
|
});
|
|
20007
20499
|
editorService.set("stage", (0, vue.markRaw)(stage));
|
|
20008
20500
|
stage.mount(stageContainerEl.value);
|
|
@@ -20020,7 +20512,8 @@
|
|
|
20020
20512
|
stage.setZoom(zoom);
|
|
20021
20513
|
});
|
|
20022
20514
|
let timeoutId = null;
|
|
20023
|
-
(0, vue.watch)(page, (page) => {
|
|
20515
|
+
(0, vue.watch)(page, (page, prevPage) => {
|
|
20516
|
+
if (isSamePageItemsReorder(prevPage, page)) return;
|
|
20024
20517
|
if (runtime && page) {
|
|
20025
20518
|
editorService.set("stageLoading", true);
|
|
20026
20519
|
if (timeoutId) globalThis.clearTimeout(timeoutId);
|
|
@@ -21746,6 +22239,7 @@
|
|
|
21746
22239
|
// packages/editor/src/fields/CodeSelectCol.vue
|
|
21747
22240
|
var CodeSelectCol_default = CodeSelectCol_vue_vue_type_script_setup_true_lang_default;
|
|
21748
22241
|
// packages/editor/src/fields/DataSourceFields.vue?vue&type=script&setup=true&lang.ts
|
|
22242
|
+
init_lodash();
|
|
21749
22243
|
var _hoisted_1$57 = { class: "m-editor-data-source-fields" };
|
|
21750
22244
|
var _hoisted_2$11 = {
|
|
21751
22245
|
key: 0,
|
|
@@ -21800,6 +22294,21 @@
|
|
|
21800
22294
|
const fieldValues = (0, vue.ref)({});
|
|
21801
22295
|
const fieldTitle = (0, vue.ref)("");
|
|
21802
22296
|
const width = (0, vue.useModel)(__props, "width");
|
|
22297
|
+
/** 数组、对象没填默认值时用的空值。每次新建,避免多个字段共用同一个 [] / {} */
|
|
22298
|
+
const emptyDefaultByType = (type) => {
|
|
22299
|
+
if (type === "array") return [];
|
|
22300
|
+
if (type === "object") return {};
|
|
22301
|
+
};
|
|
22302
|
+
/** 表单没填时是空字符串;切换类型时自动填上的也是 [] / {} */
|
|
22303
|
+
const isPlaceholderDefaultValue = (value) => value === "" || value === void 0 || isEqual(value, []) || isEqual(value, {});
|
|
22304
|
+
const withTypedDefaultValue = (field) => {
|
|
22305
|
+
const next = emptyDefaultByType(field.type);
|
|
22306
|
+
if (next === void 0 || field.defaultValue !== "" && field.defaultValue !== void 0) return field;
|
|
22307
|
+
return {
|
|
22308
|
+
...field,
|
|
22309
|
+
defaultValue: next
|
|
22310
|
+
};
|
|
22311
|
+
};
|
|
21803
22312
|
const newHandler = () => {
|
|
21804
22313
|
fieldValues.value = {};
|
|
21805
22314
|
fieldTitle.value = "新增属性";
|
|
@@ -21807,30 +22316,42 @@
|
|
|
21807
22316
|
addDialogVisible.value = true;
|
|
21808
22317
|
};
|
|
21809
22318
|
const editField = (row, index) => {
|
|
21810
|
-
fieldValues.value = {
|
|
22319
|
+
fieldValues.value = withTypedDefaultValue({
|
|
21811
22320
|
...row,
|
|
21812
22321
|
index
|
|
21813
|
-
};
|
|
22322
|
+
});
|
|
21814
22323
|
fieldTitle.value = `编辑${row.title}`;
|
|
21815
22324
|
calcBoxPosition();
|
|
21816
22325
|
addDialogVisible.value = true;
|
|
21817
22326
|
};
|
|
21818
22327
|
const fieldChange = ({ index, ...value }, data) => {
|
|
21819
22328
|
addDialogVisible.value = false;
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
changeRecords
|
|
22329
|
+
const normalized = withTypedDefaultValue(value);
|
|
22330
|
+
if (index > -1) {
|
|
22331
|
+
const changeRecords = (data.changeRecords || []).map((item) => ({
|
|
21823
22332
|
propPath: `${props.prop}.${index}.${item.propPath}`,
|
|
21824
22333
|
value: item.value
|
|
21825
|
-
}))
|
|
21826
|
-
|
|
21827
|
-
|
|
22334
|
+
}));
|
|
22335
|
+
if (normalized !== value) {
|
|
22336
|
+
const defaultValuePath = `${props.prop}.${index}.defaultValue`;
|
|
22337
|
+
const record = changeRecords.find((item) => item.propPath === defaultValuePath);
|
|
22338
|
+
if (record) record.value = normalized.defaultValue;
|
|
22339
|
+
else changeRecords.push({
|
|
22340
|
+
propPath: defaultValuePath,
|
|
22341
|
+
value: normalized.defaultValue
|
|
22342
|
+
});
|
|
22343
|
+
}
|
|
22344
|
+
emit("change", normalized, {
|
|
22345
|
+
modifyKey: index,
|
|
22346
|
+
changeRecords
|
|
22347
|
+
});
|
|
22348
|
+
} else {
|
|
21828
22349
|
const modifyKey = props.model[props.name].length;
|
|
21829
|
-
emit("change",
|
|
22350
|
+
emit("change", normalized, {
|
|
21830
22351
|
modifyKey,
|
|
21831
22352
|
changeRecords: [{
|
|
21832
22353
|
propPath: `${props.prop}.${modifyKey}`,
|
|
21833
|
-
value
|
|
22354
|
+
value: normalized
|
|
21834
22355
|
}]
|
|
21835
22356
|
});
|
|
21836
22357
|
}
|
|
@@ -21923,12 +22444,17 @@
|
|
|
21923
22444
|
value: "any"
|
|
21924
22445
|
}
|
|
21925
22446
|
],
|
|
21926
|
-
onChange: (_formState, v, { setModel }) => {
|
|
22447
|
+
onChange: (_formState, v, { model, setModel }) => {
|
|
21927
22448
|
if (![
|
|
21928
22449
|
"any",
|
|
21929
22450
|
"array",
|
|
21930
22451
|
"object"
|
|
21931
22452
|
].includes(v)) setModel("fields", []);
|
|
22453
|
+
const current = model?.defaultValue;
|
|
22454
|
+
const next = emptyDefaultByType(v);
|
|
22455
|
+
if (next !== void 0) {
|
|
22456
|
+
if (isPlaceholderDefaultValue(current) && !isEqual(current, next)) setModel("defaultValue", next);
|
|
22457
|
+
} else if (isEqual(current, []) || isEqual(current, {})) setModel("defaultValue", "");
|
|
21932
22458
|
return v;
|
|
21933
22459
|
}
|
|
21934
22460
|
},
|
|
@@ -22342,7 +22868,7 @@
|
|
|
22342
22868
|
const newHandler = () => {
|
|
22343
22869
|
const isFirstRow = props.model[props.name].length === 0;
|
|
22344
22870
|
formValues.value = {
|
|
22345
|
-
data: (0, _tmagic_utils.
|
|
22871
|
+
data: (0, _tmagic_utils.getMockDataFromFields)(props.model.fields || []),
|
|
22346
22872
|
useInEditor: isFirstRow,
|
|
22347
22873
|
enable: isFirstRow
|
|
22348
22874
|
};
|
|
@@ -23178,7 +23704,7 @@
|
|
|
23178
23704
|
const emit = __emit;
|
|
23179
23705
|
const modelValue = (0, vue.useModel)(__props, "modelValue");
|
|
23180
23706
|
const optionComponent = (0, _tmagic_design.getDesignConfig)("components")?.option;
|
|
23181
|
-
const { dataSourceService, uiService } = useServices();
|
|
23707
|
+
const { dataSourceService, uiService, editorService } = useServices();
|
|
23182
23708
|
const mForm = (0, vue.inject)("mForm");
|
|
23183
23709
|
const eventBus = (0, vue.inject)("eventBus", null);
|
|
23184
23710
|
const allDataSources = (0, vue.computed)(() => dataSourceService.get("dataSources") || []);
|
|
@@ -23210,17 +23736,58 @@
|
|
|
23210
23736
|
selectFieldsId.value = [];
|
|
23211
23737
|
}
|
|
23212
23738
|
}, { immediate: true });
|
|
23739
|
+
/**
|
|
23740
|
+
* 与 core `App.iteratorContainerType` 一致:默认包含 `iterator-container`,并包含业务追加的自定义类型。
|
|
23741
|
+
* runtime 还没就绪时只能识别默认类型。stage 是 markRaw,runtime 晚到不会让 computed 重算,
|
|
23742
|
+
* 所以在 runtime-ready 时把类型集合写进 ref。
|
|
23743
|
+
*/
|
|
23744
|
+
const iteratorContainerTypes = (0, vue.ref)(null);
|
|
23745
|
+
const syncIteratorContainerTypes = () => {
|
|
23746
|
+
const types = editorService?.get("stage")?.renderer?.runtime?.getApp?.()?.iteratorContainerType;
|
|
23747
|
+
iteratorContainerTypes.value = typeof types?.has === "function" ? types : null;
|
|
23748
|
+
};
|
|
23749
|
+
(0, vue.watch)(() => editorService?.get("stage") ?? null, (stage, _, onCleanup) => {
|
|
23750
|
+
syncIteratorContainerTypes();
|
|
23751
|
+
if (!stage?.on) return;
|
|
23752
|
+
stage.on("runtime-ready", syncIteratorContainerTypes);
|
|
23753
|
+
onCleanup(() => {
|
|
23754
|
+
stage.off("runtime-ready", syncIteratorContainerTypes);
|
|
23755
|
+
});
|
|
23756
|
+
}, { immediate: true });
|
|
23757
|
+
const isIteratorContainer = (type) => {
|
|
23758
|
+
if (!type) return false;
|
|
23759
|
+
const types = iteratorContainerTypes.value;
|
|
23760
|
+
return types ? types.has(type) : type === "iterator-container";
|
|
23761
|
+
};
|
|
23762
|
+
/** 迭代器容器自身不算子组件,只有放进它里面的节点才同时支持 array.xxx 和下标 */
|
|
23763
|
+
const inIteratorChild = (0, vue.computed)(() => {
|
|
23764
|
+
const nodeId = mForm?.initValues?.id;
|
|
23765
|
+
if (!editorService?.getNodeInfo || nodeId === void 0 || nodeId === null || nodeId === "") return false;
|
|
23766
|
+
const { path } = editorService.getNodeInfo(nodeId);
|
|
23767
|
+
return path.slice(0, -1).some((node) => isIteratorContainer(node.type));
|
|
23768
|
+
});
|
|
23769
|
+
const fieldOptions = (ds) => getCascaderOptionsFromFields(ds.fields, props.dataSourceFieldType, getDataSourceEditorData(ds), { directArrayElements: inIteratorChild.value });
|
|
23213
23770
|
const fieldsOptions = (0, vue.computed)(() => {
|
|
23214
23771
|
const ds = allDataSources.value.find((ds) => ds.id === (0, _tmagic_utils.removeDataSourceFieldPrefix)(selectDataSourceId.value));
|
|
23215
23772
|
if (!ds) return [];
|
|
23216
|
-
|
|
23773
|
+
const options = fieldOptions(ds);
|
|
23774
|
+
ensureSelectedArrayIndices(options, selectFieldsId.value);
|
|
23775
|
+
return options;
|
|
23217
23776
|
});
|
|
23218
23777
|
const cascaderOptions = (0, vue.computed)(() => {
|
|
23219
|
-
|
|
23220
|
-
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23778
|
+
const selected = Array.isArray(modelValue.value) ? modelValue.value : [];
|
|
23779
|
+
const selectedDsId = `${selected[0] ?? ""}`;
|
|
23780
|
+
const selectedFields = selected.slice(1);
|
|
23781
|
+
return (dataSources.value?.map((ds) => {
|
|
23782
|
+
const value = valueIsKey.value ? ds.id : `${_tmagic_utils.DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX}${ds.id}`;
|
|
23783
|
+
const children = fieldOptions(ds);
|
|
23784
|
+
if (value === selectedDsId) ensureSelectedArrayIndices(children, selectedFields);
|
|
23785
|
+
return {
|
|
23786
|
+
label: ds.title || ds.id,
|
|
23787
|
+
value,
|
|
23788
|
+
children
|
|
23789
|
+
};
|
|
23790
|
+
}) || []).filter((option) => option.children.length);
|
|
23224
23791
|
});
|
|
23225
23792
|
const dsChangeHandler = (v) => {
|
|
23226
23793
|
modelValue.value = [v];
|
|
@@ -27205,7 +27772,6 @@
|
|
|
27205
27772
|
init_CodeEditor();
|
|
27206
27773
|
init_Icon();
|
|
27207
27774
|
init_CompareForm();
|
|
27208
|
-
init_type();
|
|
27209
27775
|
init_code_block();
|
|
27210
27776
|
init_use_compare_form();
|
|
27211
27777
|
init_editor();
|
|
@@ -27312,7 +27878,12 @@
|
|
|
27312
27878
|
exports.createStackStep = createStackStep;
|
|
27313
27879
|
exports.dataSourceService = dataSourceService;
|
|
27314
27880
|
exports.debug = debug;
|
|
27315
|
-
exports
|
|
27881
|
+
Object.defineProperty(exports, "default", {
|
|
27882
|
+
enumerable: true,
|
|
27883
|
+
get: function() {
|
|
27884
|
+
return plugin_default;
|
|
27885
|
+
}
|
|
27886
|
+
});
|
|
27316
27887
|
exports.defaultIsExpandable = defaultIsExpandable;
|
|
27317
27888
|
exports.depService = depService;
|
|
27318
27889
|
exports.describeRevertStep = describeRevertStep;
|
|
@@ -27332,6 +27903,7 @@
|
|
|
27332
27903
|
exports.editorNodeMergeCustomizer = editorNodeMergeCustomizer;
|
|
27333
27904
|
exports.editorService = editorService;
|
|
27334
27905
|
exports.editorTypeMatchRules = editorTypeMatchRules;
|
|
27906
|
+
exports.ensureSelectedArrayIndices = ensureSelectedArrayIndices;
|
|
27335
27907
|
exports.eqOptions = eqOptions;
|
|
27336
27908
|
exports.error = error;
|
|
27337
27909
|
exports.eventTabConfig = eventTabConfig;
|
|
@@ -27353,6 +27925,7 @@
|
|
|
27353
27925
|
exports.getCompActionAllowedValues = getCompActionAllowedValues;
|
|
27354
27926
|
exports.getCompActionOptions = getCompActionOptions;
|
|
27355
27927
|
exports.getCondOpOptionsByFieldType = getCondOpOptionsByFieldType;
|
|
27928
|
+
exports.getDataSourceEditorData = getDataSourceEditorData;
|
|
27356
27929
|
exports.getDefaultConfig = getDefaultConfig;
|
|
27357
27930
|
exports.getDisplayField = getDisplayField;
|
|
27358
27931
|
exports.getEditorConfig = getEditorConfig;
|