@gct-paas/design 0.1.4-dev.7 → 0.1.4-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/transform-js.worker-BtVTa-PT.js +666 -0
- package/dist/index.esm.min.mjs +25756 -464
- package/dist/index.min.cjs +70 -1
- package/dist/index.min.css +1 -0
- package/dist/index.system.min.js +70 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/assets/transform-js.worker-DdeZQ5i-.js +296567 -0
- package/es/components/design/design-content/design-content.css +76 -0
- package/es/components/design/design-content/design-content.d.ts +191 -0
- package/es/components/design/design-content/design-content.mjs +363 -0
- package/es/components/design/design-drag-item/design-drag-item.css +179 -0
- package/es/components/design/design-drag-item/design-drag-item.d.ts +55 -0
- package/es/components/design/design-drag-item/design-drag-item.mjs +296 -0
- package/es/components/design/design-drop-container/design-drop-container.css +103 -0
- package/es/components/design/design-drop-container/design-drop-container.d.ts +91 -0
- package/es/components/design/design-drop-container/design-drop-container.mjs +220 -0
- package/es/components/design/design-drop-line/design-drop-line.css +165 -0
- package/es/components/design/design-drop-line/design-drop-line.d.ts +72 -0
- package/es/components/design/design-drop-line/design-drop-line.mjs +178 -0
- package/es/components/design/design-item-actions/design-item-actions.css +97 -0
- package/es/components/design/design-item-actions/design-item-actions.d.ts +42 -0
- package/es/components/design/design-item-actions/design-item-actions.mjs +196 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.css +70 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.d.ts +168 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.mjs +167 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.css +85 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.d.ts +53 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.mjs +224 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.css +12 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.d.ts +60 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.mjs +74 -0
- package/es/components/design/design-item-preview/design-item-preview.css +91 -0
- package/es/components/design/design-item-preview/design-item-preview.d.ts +1 -0
- package/es/components/design/design-item-preview/design-item-preview.mjs +50 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.css +67 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.d.ts +49 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.mjs +87 -0
- package/es/components/design/design-not-found/design-not-found.css +68 -0
- package/es/components/design/design-not-found/design-not-found.d.ts +14 -0
- package/es/components/design/design-not-found/design-not-found.mjs +26 -0
- package/es/components/design/index.d.ts +6 -0
- package/es/components/design/index.mjs +22 -0
- package/es/components/design-icon-button/design-icon-button.css +101 -0
- package/es/components/design-icon-button/design-icon-button.d.ts +104 -0
- package/es/components/design-icon-button/design-icon-button.mjs +150 -0
- package/es/components/design-save-tip/design-save-tip.css +107 -0
- package/es/components/design-save-tip/design-save-tip.d.ts +44 -0
- package/es/components/design-save-tip/design-save-tip.mjs +107 -0
- package/es/components/design-step-check/design-step-check.css +133 -0
- package/es/components/design-step-check/design-step-check.d.ts +30 -0
- package/es/components/design-step-check/design-step-check.mjs +122 -0
- package/es/components/design-view-layout/design-view-layout.css +157 -0
- package/es/components/design-view-layout/design-view-layout.d.ts +1 -0
- package/es/components/design-view-layout/design-view-layout.mjs +209 -0
- package/es/components/editor/index.d.ts +5 -0
- package/es/components/editor/index.mjs +15 -0
- package/es/components/editor/style/border-editor/border-box.css +144 -0
- package/es/components/editor/style/border-editor/border-box.vue.d.ts +10 -0
- package/es/components/editor/style/border-editor/border-box.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-box.vue3.mjs +305 -0
- package/es/components/editor/style/border-editor/border-editor.css +64 -0
- package/es/components/editor/style/border-editor/border-editor.vue.d.ts +13 -0
- package/es/components/editor/style/border-editor/border-editor.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-editor.vue3.mjs +60 -0
- package/es/components/editor/style/border-editor/border-radius.css +102 -0
- package/es/components/editor/style/border-editor/border-radius.vue.d.ts +10 -0
- package/es/components/editor/style/border-editor/border-radius.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-radius.vue3.mjs +212 -0
- package/es/components/editor/style/border-editor/util.d.ts +19 -0
- package/es/components/editor/style/border-editor/util.mjs +77 -0
- package/es/components/editor/style/font-editor/align-group.css +28 -0
- package/es/components/editor/style/font-editor/align-group.vue.d.ts +10 -0
- package/es/components/editor/style/font-editor/align-group.vue2.mjs +7 -0
- package/es/components/editor/style/font-editor/align-group.vue3.mjs +66 -0
- package/es/components/editor/style/font-editor/font-editor.vue.d.ts +10 -0
- package/es/components/editor/style/font-editor/font-editor.vue.mjs +72 -0
- package/es/components/editor/style/font-editor/font-editor.vue2.mjs +5 -0
- package/es/components/editor/style/font-editor/font-style-group.css +29 -0
- package/es/components/editor/style/font-editor/font-style-group.vue.d.ts +11 -0
- package/es/components/editor/style/font-editor/font-style-group.vue2.mjs +7 -0
- package/es/components/editor/style/font-editor/font-style-group.vue3.mjs +105 -0
- package/es/components/editor/style/font-editor/util.d.ts +2 -0
- package/es/components/editor/style/font-editor/util.mjs +12 -0
- package/es/components/editor/style/position-editor/position-editor.css +158 -0
- package/es/components/editor/style/position-editor/position-editor.vue.d.ts +12 -0
- package/es/components/editor/style/position-editor/position-editor.vue2.mjs +7 -0
- package/es/components/editor/style/position-editor/position-editor.vue3.mjs +242 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.css +135 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue.d.ts +16 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue2.mjs +7 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue3.mjs +311 -0
- package/es/components/icon/downleft-icon.vue.d.ts +4 -0
- package/es/components/icon/downleft-icon.vue.mjs +11 -0
- package/es/components/icon/downleft-icon.vue2.mjs +27 -0
- package/es/components/icon/downright-icon.vue.d.ts +4 -0
- package/es/components/icon/downright-icon.vue.mjs +11 -0
- package/es/components/icon/downright-icon.vue2.mjs +27 -0
- package/es/components/icon/upleft-icon.vue.d.ts +4 -0
- package/es/components/icon/upleft-icon.vue.mjs +11 -0
- package/es/components/icon/upleft-icon.vue2.mjs +27 -0
- package/es/components/icon/upright-icon.vue.d.ts +4 -0
- package/es/components/icon/upright-icon.vue.mjs +11 -0
- package/es/components/icon/upright-icon.vue2.mjs +27 -0
- package/es/components/index.d.ts +9 -0
- package/es/components/index.mjs +26 -0
- package/es/components/material/index.d.ts +5 -0
- package/es/components/material/index.mjs +9 -0
- package/es/components/material/material-content/material-content.css +86 -0
- package/es/components/material/material-content/material-content.d.ts +187 -0
- package/es/components/material/material-content/material-content.mjs +59 -0
- package/es/components/material/material-module/material-module.css +104 -0
- package/es/components/material/material-module/material-module.d.ts +72 -0
- package/es/components/material/material-module/material-module.mjs +111 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.css +69 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.d.ts +62 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.mjs +32 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.css +83 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.d.ts +17 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.mjs +103 -0
- package/es/components/material/material-outline-tree/material-outline-tree.css +81 -0
- package/es/components/material/material-outline-tree/material-outline-tree.d.ts +1 -0
- package/es/components/material/material-outline-tree/material-outline-tree.mjs +90 -0
- package/es/components/material/material-tab-pane/material-tab-pane.css +68 -0
- package/es/components/material/material-tab-pane/material-tab-pane.d.ts +13 -0
- package/es/components/material/material-tab-pane/material-tab-pane.mjs +26 -0
- package/es/components/material/material-tabs/material-tabs.css +105 -0
- package/es/components/material/material-tabs/material-tabs.d.ts +103 -0
- package/es/components/material/material-tabs/material-tabs.mjs +69 -0
- package/es/components/mobile-container/mobile-container.css +134 -0
- package/es/components/mobile-container/mobile-container.d.ts +31 -0
- package/es/components/mobile-container/mobile-container.mjs +81 -0
- package/es/components/modal-name-editor/modal-name-editor.css +117 -0
- package/es/components/modal-name-editor/modal-name-editor.d.ts +44 -0
- package/es/components/modal-name-editor/modal-name-editor.mjs +174 -0
- package/es/components/panel/index.d.ts +5 -0
- package/es/components/panel/index.mjs +9 -0
- package/es/components/panel/panel-content/panel-content.css +183 -0
- package/es/components/panel/panel-content/panel-content.d.ts +19 -0
- package/es/components/panel/panel-content/panel-content.mjs +73 -0
- package/es/components/panel/panel-form/panel-form.css +67 -0
- package/es/components/panel/panel-form/panel-form.d.ts +62 -0
- package/es/components/panel/panel-form/panel-form.mjs +76 -0
- package/es/components/panel/panel-path/panel-path.css +89 -0
- package/es/components/panel/panel-path/panel-path.d.ts +35 -0
- package/es/components/panel/panel-path/panel-path.mjs +75 -0
- package/es/constant/design-editor-type.d.ts +50 -0
- package/es/constant/design-editor-type.mjs +15 -0
- package/es/constant/index.d.ts +256 -1
- package/es/constant/index.mjs +72 -0
- package/es/constant/page-designer.d.ts +75 -0
- package/es/constant/page-designer.mjs +52 -0
- package/es/controller/index.d.ts +1 -0
- package/es/controller/view/design-view.controller.d.ts +47 -0
- package/es/controller/view/design-view.controller.mjs +183 -0
- package/es/create-app-vue.d.ts +8 -0
- package/es/create-app-vue.mjs +11 -0
- package/es/data/design-container-node/design-container-node.d.ts +15 -0
- package/es/data/design-container-node/design-container-node.mjs +6 -0
- package/es/data/design-editor-node/design-editor-node.d.ts +16 -0
- package/es/data/design-editor-node/design-editor-node.mjs +8 -0
- package/es/data/design-node/design-node.d.ts +41 -0
- package/es/data/design-node/design-node.mjs +67 -0
- package/es/data/index.d.ts +3 -0
- package/es/dictionary/index.d.ts +1 -0
- package/es/dictionary/tab-type/tab-type.d.ts +5 -0
- package/es/dictionary/tab-type/tab-type.mjs +24 -0
- package/es/editor/child-list-editor/child-list-editor.css +76 -0
- package/es/editor/child-list-editor/child-list-editor.d.ts +163 -0
- package/es/editor/child-list-editor/child-list-editor.mjs +145 -0
- package/es/editor/child-list-editor/child-list-editor.provider.d.ts +13 -0
- package/es/editor/child-list-editor/child-list-editor.provider.mjs +5 -0
- package/es/editor/child-list-editor/components/child-list-item-editor.css +112 -0
- package/es/editor/child-list-editor/components/child-list-item-editor.d.ts +133 -0
- package/es/editor/child-list-editor/components/child-list-item-editor.mjs +238 -0
- package/es/editor/child-list-editor/index.d.ts +4 -0
- package/es/editor/child-list-editor/index.mjs +13 -0
- package/es/editor/content-tag-style/content-tag-style.css +164 -0
- package/es/editor/content-tag-style/content-tag-style.d.ts +112 -0
- package/es/editor/content-tag-style/content-tag-style.mjs +103 -0
- package/es/editor/content-tag-style/index.d.ts +8 -0
- package/es/editor/content-tag-style/index.mjs +15 -0
- package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.css +156 -0
- package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.d.ts +29 -0
- package/es/editor/custom-exp-menu-editor/components/custom-exp-menu-item.mjs +134 -0
- package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.css +76 -0
- package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.d.ts +38 -0
- package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.mjs +163 -0
- package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.provider.d.ts +13 -0
- package/es/editor/custom-exp-menu-editor/custom-exp-menu-editor.provider.mjs +5 -0
- package/es/editor/custom-exp-menu-editor/i-custom-exp-menu-model.d.ts +23 -0
- package/es/editor/custom-exp-menu-editor/index.d.ts +5 -0
- package/es/editor/custom-exp-menu-editor/index.mjs +13 -0
- package/es/editor/custom-exp-menu-editor/modal/exp-menu.modal.d.ts +37 -0
- package/es/editor/field-info-editor/field-info-editor.css +125 -0
- package/es/editor/field-info-editor/field-info-editor.d.ts +111 -0
- package/es/editor/field-info-editor/field-info-editor.mjs +60 -0
- package/es/editor/field-info-editor/index.d.ts +8 -0
- package/es/editor/field-info-editor/index.mjs +13 -0
- package/es/editor/index.d.ts +5 -0
- package/es/editor/index.mjs +27 -0
- package/es/editor/model-field-select/index.d.ts +8 -0
- package/es/editor/model-field-select/index.mjs +13 -0
- package/es/editor/model-field-select/model-field-select.css +141 -0
- package/es/editor/model-field-select/model-field-select.d.ts +42 -0
- package/es/editor/model-field-select/model-field-select.mjs +314 -0
- package/es/editor/style-border/index.d.ts +8 -0
- package/es/editor/style-border/index.mjs +15 -0
- package/es/editor/style-border/style-border.d.ts +38 -0
- package/es/editor/style-border/style-border.mjs +45 -0
- package/es/editor/style-font/index.d.ts +8 -0
- package/es/editor/style-font/index.mjs +15 -0
- package/es/editor/style-font/style-font.css +86 -0
- package/es/editor/style-font/style-font.d.ts +38 -0
- package/es/editor/style-font/style-font.mjs +45 -0
- package/es/editor/style-position/index.d.ts +8 -0
- package/es/editor/style-position/index.mjs +15 -0
- package/es/editor/style-position/style-position.d.ts +38 -0
- package/es/editor/style-position/style-position.mjs +44 -0
- package/es/editor/style-spacing/index.d.ts +8 -0
- package/es/editor/style-spacing/index.mjs +15 -0
- package/es/editor/style-spacing/style-spacing.d.ts +40 -0
- package/es/editor/style-spacing/style-spacing.mjs +69 -0
- package/es/editor/system-page-select/i-system-page-select.d.ts +23 -0
- package/es/editor/system-page-select/index.d.ts +9 -0
- package/es/editor/system-page-select/index.mjs +15 -0
- package/es/editor/system-page-select/system-page-select.css +119 -0
- package/es/editor/system-page-select/system-page-select.d.ts +38 -0
- package/es/editor/system-page-select/system-page-select.mjs +82 -0
- package/es/hooks/design-view/constants/style-editor.const.d.ts +24 -0
- package/es/hooks/design-view/constants/style-editor.const.mjs +53 -0
- package/es/hooks/design-view/design-state.d.ts +2427 -0
- package/es/hooks/design-view/design-state.mjs +86 -0
- package/es/hooks/design-view/designer/useDesignCache.d.ts +4 -0
- package/es/hooks/design-view/designer/useDesignCache.mjs +27 -0
- package/es/hooks/design-view/designer/useDesignHistory.d.ts +16 -0
- package/es/hooks/design-view/designer/useDesignHistory.mjs +102 -0
- package/es/hooks/design-view/designer/useDesignModal.d.ts +1874 -0
- package/es/hooks/design-view/designer/useDesignModal.mjs +80 -0
- package/es/hooks/design-view/designer/useDesignPreview.d.ts +11 -0
- package/es/hooks/design-view/designer/useDesignPreview.mjs +143 -0
- package/es/hooks/design-view/designer/useDesignSave.d.ts +12 -0
- package/es/hooks/design-view/designer/useDesignSave.mjs +239 -0
- package/es/hooks/design-view/editor/usePropEditor.d.ts +33 -0
- package/es/hooks/design-view/editor/usePropEditor.mjs +99 -0
- package/es/hooks/design-view/editor/useStyle.d.ts +21 -0
- package/es/hooks/design-view/editor/useStyle.mjs +30 -0
- package/es/hooks/design-view/editor/useStyleEditor.d.ts +30 -0
- package/es/hooks/design-view/editor/useStyleEditor.mjs +77 -0
- package/es/hooks/design-view/global/useGlobal.d.ts +1392 -0
- package/es/hooks/design-view/global/useGlobal.mjs +74 -0
- package/es/hooks/design-view/layout/useScope.d.ts +12 -0
- package/es/hooks/design-view/layout/useScope.mjs +106 -0
- package/es/hooks/design-view/layout/useToolkit.d.ts +374 -0
- package/es/hooks/design-view/layout/useToolkit.mjs +315 -0
- package/es/hooks/design-view/page/usePage.d.ts +57 -0
- package/es/hooks/design-view/page/usePage.mjs +154 -0
- package/es/hooks/design-view/page/usePageOccupy.d.ts +33 -0
- package/es/hooks/design-view/page/usePageOccupy.mjs +77 -0
- package/es/hooks/design-view/useDesigner.d.ts +2938 -0
- package/es/hooks/design-view/useDesigner.mjs +109 -0
- package/es/hooks/design-view/utils/color.util.d.ts +21 -0
- package/es/hooks/design-view/utils/color.util.mjs +36 -0
- package/es/hooks/design-view/utils/field-schema.util.d.ts +55 -0
- package/es/hooks/design-view/utils/field-schema.util.mjs +96 -0
- package/es/hooks/design-view/widget/useSelectedWidget.d.ts +53 -0
- package/es/hooks/design-view/widget/useSelectedWidget.mjs +219 -0
- package/es/hooks/design-view/widget/useWidget.d.ts +107 -0
- package/es/hooks/design-view/widget/useWidget.mjs +124 -0
- package/es/hooks/design-view/widget/useWidgetQuery.d.ts +13 -0
- package/es/hooks/design-view/widget/useWidgetQuery.mjs +88 -0
- package/es/hooks/design-view/widget/useWidgetRegistry.d.ts +11 -0
- package/es/hooks/design-view/widget/useWidgetRegistry.mjs +59 -0
- package/es/hooks/designer.hooks.d.ts +15 -0
- package/es/hooks/designer.hooks.mjs +12 -0
- package/es/hooks/develop/useCacheHistory.d.ts +67 -0
- package/es/hooks/develop/useCacheHistory.mjs +157 -0
- package/es/hooks/develop/useKeyParser.d.ts +16 -0
- package/es/hooks/develop/useKeyParser.mjs +67 -0
- package/es/hooks/index.d.ts +25 -1
- package/es/hooks/use-design-view-controller/use-design-view-controller.d.ts +11 -0
- package/es/hooks/use-design-view-controller/use-design-view-controller.mjs +26 -0
- package/es/hooks/use-model-field/use-model-field.d.ts +32 -0
- package/es/hooks/use-model-field/use-model-field.mjs +344 -0
- package/es/hooks/web/useUUid.d.ts +41 -0
- package/es/hooks/web/useUUid.mjs +93 -0
- package/es/index.d.ts +12 -4
- package/es/index.mjs +112 -23
- package/es/interface/actions/i-design-view.actions.d.ts +217 -0
- package/es/interface/controller/i-design-view.controller.d.ts +53 -14
- package/es/interface/design/i-design-container-node.d.ts +13 -0
- package/es/interface/design/i-design-data.d.ts +44 -0
- package/es/interface/design/i-design-editor-data.d.ts +20 -0
- package/es/interface/design/i-design-editor-node.d.ts +15 -0
- package/es/interface/design/i-design-node-data.d.ts +19 -0
- package/es/interface/design/i-design-node.d.ts +80 -0
- package/es/interface/design/i-design-page-node-data.d.ts +15 -0
- package/es/interface/design/i-design-tree-item.d.ts +26 -0
- package/es/interface/design/i-model-field-node-data/i-model-field-node-data.d.ts +158 -0
- package/es/interface/design/index.d.ts +9 -0
- package/es/interface/designer/i-designer-hooks.d.ts +26 -0
- package/es/interface/designer/i-designer-provider.d.ts +20 -0
- package/es/interface/designer/i-designer-state.d.ts +41 -0
- package/es/interface/designer/i-designer.controller.d.ts +116 -0
- package/es/interface/designer/index.d.ts +4 -0
- package/es/interface/editor/child-list-editor/child-list-editor.d.ts +114 -0
- package/es/interface/editor/index.d.ts +9 -0
- package/es/interface/editor/style-border/i-style-border.controller.d.ts +11 -0
- package/es/interface/editor/style-border/i-style-border.d.ts +22 -0
- package/es/interface/editor/style-font/i-style-font.controller.d.ts +11 -0
- package/es/interface/editor/style-font/i-style-font.d.ts +13 -0
- package/es/interface/editor/style-position/i-style-position.controller.d.ts +11 -0
- package/es/interface/editor/style-position/i-style-position.d.ts +13 -0
- package/es/interface/editor/style-spacing/i-style-spacing.controller.d.ts +11 -0
- package/es/interface/editor/style-spacing/i-style-spacing.d.ts +22 -0
- package/es/interface/i-design-item-action/i-design-item-action.d.ts +42 -0
- package/es/interface/i-design-view-options/i-design-view-options.d.ts +69 -0
- package/es/interface/i-drag-collect/i-drag-collect.d.ts +6 -0
- package/es/interface/i-drag-data-item/i-drag-data-item.d.ts +13 -2
- package/es/interface/i-drag-item/i-drag-item.d.ts +13 -2
- package/es/interface/i-drop-collect/i-drop-collect.d.ts +8 -0
- package/es/interface/i-drop-result/i-drop-result.d.ts +2 -0
- package/es/interface/i-material-data/i-material-data.d.ts +50 -0
- package/es/interface/i-material-group/i-material-group.d.ts +51 -0
- package/es/interface/i-view-step/i-view-step.d.ts +32 -0
- package/es/interface/i-vue3-dnd-item-options/i-vue3-dnd-item-options.d.ts +323 -0
- package/es/interface/index.d.ts +31 -7
- package/es/interface/page-designer/toolkit.d.ts +12 -0
- package/es/interface/provider/i-node-provider.d.ts +142 -0
- package/es/interface/state/i-design-view.state.d.ts +107 -10
- package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu-component.css +87 -0
- package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu.component.d.ts +9 -0
- package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu.component.mjs +109 -0
- package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.data.d.ts +51 -0
- package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.data.mjs +89 -0
- package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.provider.d.ts +23 -0
- package/es/plugins/design-custom-exp-menu/design-custom-exp-menu.provider.mjs +159 -0
- package/es/plugins/design-editor/index.d.ts +5 -0
- package/es/plugins/design-editor/index.mjs +13 -0
- package/es/plugins/design-editor/upload-file/index.d.ts +4 -0
- package/es/plugins/design-editor/upload-file/index.mjs +15 -0
- package/es/plugins/design-editor/upload-file/upload-file.css +124 -0
- package/es/plugins/design-editor/upload-file/upload-file.d.ts +46 -0
- package/es/plugins/design-editor/upload-file/upload-file.mjs +51 -0
- package/es/plugins/design-editor/upload-image/index.d.ts +4 -0
- package/es/plugins/design-editor/upload-image/index.mjs +15 -0
- package/es/plugins/design-editor/upload-image/upload-image.css +79 -0
- package/es/plugins/design-editor/upload-image/upload-image.d.ts +46 -0
- package/es/plugins/design-editor/upload-image/upload-image.mjs +23 -0
- package/es/plugins/design-editor/user-signature/index.d.ts +4 -0
- package/es/plugins/design-editor/user-signature/index.mjs +15 -0
- package/es/plugins/design-editor/user-signature/user-signature.css +79 -0
- package/es/plugins/design-editor/user-signature/user-signature.d.ts +46 -0
- package/es/plugins/design-editor/user-signature/user-signature.mjs +23 -0
- package/es/plugins/design-grid/components/design-grid.component.css +68 -0
- package/es/plugins/design-grid/components/design-grid.component.d.ts +39 -0
- package/es/plugins/design-grid/components/design-grid.component.mjs +60 -0
- package/es/plugins/design-grid/design-grid.data.d.ts +34 -0
- package/es/plugins/design-grid/design-grid.data.mjs +17 -0
- package/es/plugins/design-grid/design-grid.provider.d.ts +26 -0
- package/es/plugins/design-grid/design-grid.provider.mjs +273 -0
- package/es/plugins/design-grid-item/components/design-grid-item.component.d.ts +38 -0
- package/es/plugins/design-grid-item/components/design-grid-item.component.mjs +39 -0
- package/es/plugins/design-grid-item/design-grid-item.data.d.ts +26 -0
- package/es/plugins/design-grid-item/design-grid-item.data.mjs +17 -0
- package/es/plugins/design-grid-item/design-grid-item.provider.d.ts +25 -0
- package/es/plugins/design-grid-item/design-grid-item.provider.mjs +172 -0
- package/es/plugins/design-menu-list/components/design-menu-list.component.css +131 -0
- package/es/plugins/design-menu-list/components/design-menu-list.component.d.ts +18 -0
- package/es/plugins/design-menu-list/components/design-menu-list.component.mjs +110 -0
- package/es/plugins/design-menu-list/design-menu-list.data.d.ts +62 -0
- package/es/plugins/design-menu-list/design-menu-list.data.mjs +21 -0
- package/es/plugins/design-menu-list/design-menu-list.provider.d.ts +23 -0
- package/es/plugins/design-menu-list/design-menu-list.provider.mjs +265 -0
- package/es/plugins/design-page/design-page.data.d.ts +15 -0
- package/es/plugins/design-page/design-page.data.mjs +17 -0
- package/es/plugins/design-page/design-page.provider.d.ts +23 -0
- package/es/plugins/design-page/design-page.provider.mjs +109 -0
- package/es/plugins/design-panel/components/design-panel-component.css +108 -0
- package/es/plugins/design-panel/components/design-panel.component.d.ts +39 -0
- package/es/plugins/design-panel/components/design-panel.component.mjs +49 -0
- package/es/plugins/design-panel/design-panel.data.d.ts +64 -0
- package/es/plugins/design-panel/design-panel.data.mjs +27 -0
- package/es/plugins/design-panel/design-panel.provider.d.ts +23 -0
- package/es/plugins/design-panel/design-panel.provider.mjs +298 -0
- package/es/plugins/design-personal-center/components/design-personal-center.component.css +48 -0
- package/es/plugins/design-personal-center/components/design-personal-center.component.vue.d.ts +36 -0
- package/es/plugins/design-personal-center/components/design-personal-center.component.vue.mjs +7 -0
- package/es/plugins/design-personal-center/components/design-personal-center.component.vue2.mjs +97 -0
- package/es/plugins/design-personal-center/design-personal-center.data.d.ts +27 -0
- package/es/plugins/design-personal-center/design-personal-center.data.mjs +21 -0
- package/es/plugins/design-personal-center/design-personal-center.provider.d.ts +13 -0
- package/es/plugins/design-personal-center/design-personal-center.provider.mjs +144 -0
- package/es/plugins/design-select-component/components/design-select-component.component.css +107 -0
- package/es/plugins/design-select-component/components/design-select-component.component.d.ts +41 -0
- package/es/plugins/design-select-component/components/design-select-component.component.mjs +57 -0
- package/es/plugins/design-select-component/design-select-component.data.d.ts +57 -0
- package/es/plugins/design-select-component/design-select-component.data.mjs +18 -0
- package/es/plugins/design-select-component/design-select-component.provider.d.ts +23 -0
- package/es/plugins/design-select-component/design-select-component.provider.mjs +207 -0
- package/es/plugins/design-tab-item/components/design-tab-item.component.d.ts +38 -0
- package/es/plugins/design-tab-item/components/design-tab-item.component.mjs +39 -0
- package/es/plugins/design-tab-item/design-tab-item.data.d.ts +35 -0
- package/es/plugins/design-tab-item/design-tab-item.data.mjs +22 -0
- package/es/plugins/design-tab-item/design-tab-item.provider.d.ts +25 -0
- package/es/plugins/design-tab-item/design-tab-item.provider.mjs +185 -0
- package/es/plugins/design-tabs/components/design-tabs.component.css +105 -0
- package/es/plugins/design-tabs/components/design-tabs.component.d.ts +40 -0
- package/es/plugins/design-tabs/components/design-tabs.component.mjs +85 -0
- package/es/plugins/design-tabs/design-tabs.data.d.ts +66 -0
- package/es/plugins/design-tabs/design-tabs.data.mjs +19 -0
- package/es/plugins/design-tabs/design-tabs.provider.d.ts +26 -0
- package/es/plugins/design-tabs/design-tabs.provider.mjs +261 -0
- package/es/plugins/index.d.ts +5 -0
- package/es/plugins/index.mjs +116 -0
- package/es/plugins/install-material.d.ts +8 -0
- package/es/plugins/install-material.mjs +55 -0
- package/es/props/index.d.ts +64 -0
- package/es/props/index.mjs +56 -0
- package/es/provider/design-editor-node/design-editor-node.provider.d.ts +40 -0
- package/es/provider/design-editor-node/design-editor-node.provider.mjs +44 -0
- package/es/provider/index.d.ts +2 -0
- package/es/provider/node-base/node-base.provider.d.ts +25 -0
- package/es/provider/node-base/node-base.provider.mjs +26 -0
- package/es/register/designer-register/designer-register.d.ts +82 -0
- package/es/register/designer-register/designer-register.mjs +102 -0
- package/es/register/index.d.ts +3 -0
- package/es/register/material/material.register.d.ts +90 -0
- package/es/register/material/material.register.mjs +134 -0
- package/es/register/node/node.register.d.ts +113 -0
- package/es/register/node/node.register.mjs +134 -0
- package/es/setup-app.d.ts +1 -0
- package/es/setup-app.mjs +18 -0
- package/es/store/index.d.ts +1 -0
- package/es/store/view/design-view.store.d.ts +5 -0
- package/es/store/view/design-view.store.mjs +412 -0
- package/es/types/index.d.ts +9 -23
- package/es/utils/can-drop/can-drop.d.ts +12 -0
- package/es/utils/can-drop/can-drop.mjs +56 -0
- package/es/utils/design-install/design-install.d.ts +16 -0
- package/es/utils/design-install/design-install.mjs +22 -0
- package/es/utils/design-interceptors/design-interceptors.d.ts +8 -0
- package/es/utils/design-interceptors/design-interceptors.mjs +20 -0
- package/es/utils/field-attrs/basicAttrs.d.ts +25 -0
- package/es/utils/field-attrs/basicAttrs.mjs +724 -0
- package/es/utils/field-attrs/index.d.ts +8 -0
- package/es/utils/field-attrs/index.mjs +8 -0
- package/es/utils/field-filter/index.d.ts +4 -0
- package/es/utils/field-filter/index.mjs +58 -0
- package/es/utils/find-deep-types/find-deep-types.d.ts +9 -0
- package/es/utils/find-deep-types/find-deep-types.mjs +30 -0
- package/es/utils/index.d.ts +9 -1
- package/es/utils/init-widget-info/init-widget-info.d.ts +16 -0
- package/es/utils/init-widget-info/init-widget-info.mjs +40 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +97 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +258 -0
- package/es/utils/transform-js/index.d.ts +1 -0
- package/es/utils/transform-js/transform-js.d.ts +13 -0
- package/es/utils/transform-js/transform-js.mjs +48 -0
- package/es/utils/transform-js/transform-js.worker.d.ts +1 -0
- package/es/views/design-view.css +218 -0
- package/es/views/design-view.d.ts +87 -0
- package/es/views/design-view.mjs +345 -0
- package/es/views/index.d.ts +1 -0
- package/package.json +30 -9
- package/es/constant/variable-type/variable-type.d.ts +0 -12
- package/es/hooks/index.mjs +0 -3
- package/es/hooks/useStyle.d.ts +0 -15
- package/es/hooks/useStyle.mjs +0 -135
- package/es/interface/controller/i-design-drag.controller.d.ts +0 -42
- package/es/interface/design-page/design-page.d.ts +0 -141
- package/es/interface/index.mjs +0 -3
- package/es/interface/props/index.d.ts +0 -1
- package/es/interface/props/index.mjs +0 -1
- package/es/interface/props/plugin-comp-props.d.ts +0 -15
- package/es/interface/state/i-design-drag.state.d.ts +0 -15
- package/es/schema/common-config/autofill-editor-config.d.ts +0 -4
- package/es/schema/common-config/autofill-editor-config.mjs +0 -45
- package/es/schema/common-config/base-button-config.d.ts +0 -45
- package/es/schema/common-config/base-button-config.mjs +0 -85
- package/es/schema/common-config/button-editor-config.d.ts +0 -14
- package/es/schema/common-config/button-editor-config.mjs +0 -142
- package/es/schema/common-config/button-props-func.d.ts +0 -5
- package/es/schema/common-config/button-props-func.mjs +0 -12
- package/es/schema/common-config/column-editor-config.d.ts +0 -3
- package/es/schema/common-config/column-editor-config.mjs +0 -29
- package/es/schema/common-config/common-style.d.ts +0 -3
- package/es/schema/common-config/common-style.mjs +0 -86
- package/es/schema/common-config/display-editor-config.d.ts +0 -3
- package/es/schema/common-config/display-editor-config.mjs +0 -67
- package/es/schema/common-config/formItem-editor-config.d.ts +0 -3
- package/es/schema/common-config/formItem-editor-config.mjs +0 -70
- package/es/schema/common-config/permission-editor-config.d.ts +0 -2
- package/es/schema/common-config/permission-editor-config.mjs +0 -16
- package/es/schema/index.d.ts +0 -9
- package/es/schema/index.mjs +0 -11
- package/es/utils/index.mjs +0 -3
- package/es/utils/message/message.d.ts +0 -14
- package/es/utils/message/message.mjs +0 -35
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import { ToolkitEnum, CategoryTypeEnum, FormComponents, Platform } from '@gct-paas/core';
|
|
3
|
+
import { cloneDeep, clone } from 'lodash-es';
|
|
4
|
+
import { useWidgetRegistry } from '../widget/useWidgetRegistry.mjs';
|
|
5
|
+
import { getWidgetInfo } from '@gct-paas/schema';
|
|
6
|
+
import '../design-state.mjs';
|
|
7
|
+
import './useScope.mjs';
|
|
8
|
+
import '../global/useGlobal.mjs';
|
|
9
|
+
import '@vueuse/core';
|
|
10
|
+
import '../../develop/useCacheHistory.mjs';
|
|
11
|
+
import 'ant-design-vue';
|
|
12
|
+
import '../widget/useSelectedWidget.mjs';
|
|
13
|
+
import '../widget/useWidget.mjs';
|
|
14
|
+
import '../page/usePage.mjs';
|
|
15
|
+
import '../page/usePageOccupy.mjs';
|
|
16
|
+
import '../../../constant/page-designer.mjs';
|
|
17
|
+
import 'async-validator';
|
|
18
|
+
import 'qx-util';
|
|
19
|
+
import 'pinia';
|
|
20
|
+
import '@jsplumb/browser-ui';
|
|
21
|
+
import { useModelField } from '../../use-model-field/use-model-field.mjs';
|
|
22
|
+
|
|
23
|
+
const toolkit = ref(ToolkitEnum.OUTLINE);
|
|
24
|
+
const toolkitWidgets = ref([]);
|
|
25
|
+
const toolkitShow = ref(true);
|
|
26
|
+
const toolkitFixed = ref(false);
|
|
27
|
+
const toolkitPinned = ref(false);
|
|
28
|
+
const { reloadFieldToolkit } = useModelField();
|
|
29
|
+
function useComponents() {
|
|
30
|
+
class ComponentUtils {
|
|
31
|
+
/** 表单 */
|
|
32
|
+
category_form = CategoryTypeEnum.FORM;
|
|
33
|
+
/** 布局 */
|
|
34
|
+
category_layout = CategoryTypeEnum.LAYOUT;
|
|
35
|
+
/** 高级 */
|
|
36
|
+
category_advanced = CategoryTypeEnum.ADVANCED;
|
|
37
|
+
/** 数据展示 */
|
|
38
|
+
category_data = CategoryTypeEnum.DATA;
|
|
39
|
+
/** 按钮 */
|
|
40
|
+
category_button = CategoryTypeEnum.BUTTON;
|
|
41
|
+
/** 套件 */
|
|
42
|
+
category_kit = CategoryTypeEnum.KIT;
|
|
43
|
+
/**流程 */
|
|
44
|
+
category_process = CategoryTypeEnum.PROCESS;
|
|
45
|
+
static instance;
|
|
46
|
+
static SubTableGroup = "SubTableGroup";
|
|
47
|
+
static CardListGroup = "CardListGroup";
|
|
48
|
+
groupType = "";
|
|
49
|
+
static getInstance() {
|
|
50
|
+
if (!this.instance) {
|
|
51
|
+
this.instance = new ComponentUtils();
|
|
52
|
+
}
|
|
53
|
+
return this.instance;
|
|
54
|
+
}
|
|
55
|
+
set setGroupType(type) {
|
|
56
|
+
this.groupType = type;
|
|
57
|
+
}
|
|
58
|
+
get categoryTypes() {
|
|
59
|
+
if (this.groupType === ComponentUtils.SubTableGroup) {
|
|
60
|
+
return [
|
|
61
|
+
this.category_form,
|
|
62
|
+
this.category_layout,
|
|
63
|
+
this.category_advanced
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
return [
|
|
67
|
+
this.category_form,
|
|
68
|
+
this.category_layout,
|
|
69
|
+
this.category_advanced,
|
|
70
|
+
this.category_data,
|
|
71
|
+
this.category_button,
|
|
72
|
+
this.category_kit,
|
|
73
|
+
this.category_process
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
get form2Comps() {
|
|
77
|
+
if (this.groupType === ComponentUtils.SubTableGroup)
|
|
78
|
+
return ["GenRadio", "GenCheckbox", "GenSwitch", "Text", "GenImage"];
|
|
79
|
+
return [
|
|
80
|
+
"GenRadio",
|
|
81
|
+
"GenCheckbox",
|
|
82
|
+
"GenSwitch",
|
|
83
|
+
"Text",
|
|
84
|
+
"GenImage",
|
|
85
|
+
"Form"
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
get layout2Comps() {
|
|
89
|
+
if (this.groupType === ComponentUtils.SubTableGroup)
|
|
90
|
+
return [
|
|
91
|
+
"Collapse",
|
|
92
|
+
"SpaceOccupation",
|
|
93
|
+
"Divider",
|
|
94
|
+
"LayoutContainer",
|
|
95
|
+
"Grid",
|
|
96
|
+
"LeftRightColumns",
|
|
97
|
+
"Tabs"
|
|
98
|
+
];
|
|
99
|
+
return [
|
|
100
|
+
"Collapse",
|
|
101
|
+
"SpaceOccupation",
|
|
102
|
+
"Divider",
|
|
103
|
+
"ButtonContainer",
|
|
104
|
+
"LayoutContainer",
|
|
105
|
+
"Grid",
|
|
106
|
+
"LeftRightColumns",
|
|
107
|
+
"Tabs"
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
get advanced2Comps() {
|
|
111
|
+
if ([ComponentUtils.SubTableGroup].includes(this.groupType))
|
|
112
|
+
return ["Iframe", "CustomCode"];
|
|
113
|
+
return [
|
|
114
|
+
"Search",
|
|
115
|
+
"QuickSearch",
|
|
116
|
+
"SelectSearch",
|
|
117
|
+
"TableSelect",
|
|
118
|
+
"Iframe",
|
|
119
|
+
"CustomCode"
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
get process2Comps() {
|
|
123
|
+
if ([ComponentUtils.SubTableGroup].includes(this.groupType)) return [];
|
|
124
|
+
return [
|
|
125
|
+
"FormProcess",
|
|
126
|
+
"ProcessButton",
|
|
127
|
+
"ButtonProcessContainer",
|
|
128
|
+
"ApprovalHistory",
|
|
129
|
+
"FlowDiagram"
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
get button2Comps() {
|
|
133
|
+
if ([ComponentUtils.SubTableGroup].includes(this.groupType)) return [];
|
|
134
|
+
return [
|
|
135
|
+
"CustomButton",
|
|
136
|
+
// 'CreateButton',
|
|
137
|
+
// 'CopyButton',
|
|
138
|
+
// 'DeleteButton',
|
|
139
|
+
"SubmitButton",
|
|
140
|
+
"RefreshButton",
|
|
141
|
+
"ResetButton",
|
|
142
|
+
// 'ImportButton',
|
|
143
|
+
// 'ExportButton',
|
|
144
|
+
"LabelPrintButton"
|
|
145
|
+
// 'ModelingButton',
|
|
146
|
+
// 'DocumentPrintButton',
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
get data2Comps() {
|
|
150
|
+
if ([ComponentUtils.SubTableGroup].includes(this.groupType)) return [];
|
|
151
|
+
return [
|
|
152
|
+
// 'DataList',
|
|
153
|
+
"CardList",
|
|
154
|
+
"DataTable",
|
|
155
|
+
"DataVTable",
|
|
156
|
+
"TreeTable",
|
|
157
|
+
"RefDataTable",
|
|
158
|
+
"Descriptions"
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
changeGroupType({ data, modalState }) {
|
|
162
|
+
if (data.type === FormComponents.CardList) {
|
|
163
|
+
this.setGroupType = ComponentUtils.CardListGroup;
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (modalState) {
|
|
167
|
+
this.setGroupType = ComponentUtils.SubTableGroup;
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this.setGroupType = "";
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* 根据平台特殊过滤,显示的组件
|
|
174
|
+
*
|
|
175
|
+
* @param platform
|
|
176
|
+
* @param suiteKey
|
|
177
|
+
* @returns
|
|
178
|
+
*/
|
|
179
|
+
_filterWidgets(tag, platform, _suiteKey) {
|
|
180
|
+
if (platform === Platform.PAD) {
|
|
181
|
+
if (tag === FormComponents.DataTable) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
getWidgetsToolkit({
|
|
188
|
+
platform,
|
|
189
|
+
suiteKey
|
|
190
|
+
}) {
|
|
191
|
+
const { pluginConfigs } = useWidgetRegistry();
|
|
192
|
+
const schemas = getWidgetInfo(platform).schema;
|
|
193
|
+
const schemaKeys = Object.values(schemas).filter((i) => !!i && !i.internal).map((schema) => schema.type);
|
|
194
|
+
const configs = this.categoryTypes.map((categoryType) => {
|
|
195
|
+
if (categoryType === CategoryTypeEnum.KIT) {
|
|
196
|
+
const design = platform === Platform.WEB ? _gct.register.designer.web : platform === Platform.PAD ? _gct.register.designer.pad : _gct.register.designer.mobile;
|
|
197
|
+
const list2 = design.getProviders().filter((designer) => {
|
|
198
|
+
if (designer.kit && designer.kit.length) {
|
|
199
|
+
return designer.kit.includes(suiteKey);
|
|
200
|
+
}
|
|
201
|
+
if (designer.kit && designer.kit.length > 0 && !suiteKey) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
return true;
|
|
205
|
+
}).map((designer) => {
|
|
206
|
+
return designer.schema;
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
categoryType,
|
|
210
|
+
categoryName: "sys.pageDesigner.category_" + categoryType,
|
|
211
|
+
list: list2
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
const list = this[`${categoryType}2Comps`].filter(
|
|
215
|
+
(i) => schemaKeys.includes(
|
|
216
|
+
FormComponents[i]
|
|
217
|
+
) && this._filterWidgets(
|
|
218
|
+
FormComponents[i],
|
|
219
|
+
platform,
|
|
220
|
+
suiteKey
|
|
221
|
+
)
|
|
222
|
+
).map(
|
|
223
|
+
(compKey) => cloneDeep(
|
|
224
|
+
schemas[FormComponents[compKey]]
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
return {
|
|
228
|
+
categoryType,
|
|
229
|
+
categoryName: "sys.pageDesigner.category_" + categoryType,
|
|
230
|
+
list
|
|
231
|
+
};
|
|
232
|
+
}).filter((i) => i.list.length);
|
|
233
|
+
if (window._gct && pluginConfigs.value) {
|
|
234
|
+
const register = platform === Platform.WEB ? _gct.register.designer.web : platform === Platform.PAD ? _gct.register.designer.pad : _gct.register.designer.mobile;
|
|
235
|
+
pluginConfigs.value.forEach((pluginConfig) => {
|
|
236
|
+
const { category, plugins } = pluginConfig;
|
|
237
|
+
configs.push({
|
|
238
|
+
categoryType: category.module,
|
|
239
|
+
categoryName: category.name,
|
|
240
|
+
list: plugins.map((plugin) => {
|
|
241
|
+
const provider = register.getProvider(plugin.key);
|
|
242
|
+
if (provider) {
|
|
243
|
+
const obj = clone(provider.schema);
|
|
244
|
+
obj._plugin = clone(plugin);
|
|
245
|
+
return obj;
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
248
|
+
}).filter((item) => {
|
|
249
|
+
return !!item;
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return configs;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
instance: ComponentUtils.getInstance()
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const { instance } = useComponents();
|
|
262
|
+
function useToolkit() {
|
|
263
|
+
function toggleToolkit(payload, force) {
|
|
264
|
+
if (toolkitPinned.value && !force) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
toolkit.value = payload;
|
|
268
|
+
toolkitShow.value = true;
|
|
269
|
+
}
|
|
270
|
+
function initToolkitWidgets() {
|
|
271
|
+
const widgets = instance.getWidgetsToolkit({
|
|
272
|
+
platform: _gct.store.context.platform,
|
|
273
|
+
suiteKey: _gct.store.appInfo.suiteKey
|
|
274
|
+
});
|
|
275
|
+
toolkitWidgets.value = widgets;
|
|
276
|
+
}
|
|
277
|
+
function changeToolkitWidgets({ data, modalState }) {
|
|
278
|
+
const oldGroupType = instance.groupType;
|
|
279
|
+
instance.changeGroupType({ data, modalState });
|
|
280
|
+
if (oldGroupType !== instance.groupType) {
|
|
281
|
+
toolkitWidgets.value = instance.getWidgetsToolkit({
|
|
282
|
+
platform: _gct.store.context.platform,
|
|
283
|
+
suiteKey: _gct.store.appInfo.suiteKey
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async function setFieldToolkit({
|
|
288
|
+
modelKey,
|
|
289
|
+
formId,
|
|
290
|
+
childParentModelKey
|
|
291
|
+
}) {
|
|
292
|
+
await reloadFieldToolkit(modelKey, formId, childParentModelKey);
|
|
293
|
+
}
|
|
294
|
+
function fixedToolkit() {
|
|
295
|
+
toolkitFixed.value = !toolkitFixed.value;
|
|
296
|
+
}
|
|
297
|
+
function pinnedToolkit() {
|
|
298
|
+
toolkitPinned.value = !toolkitPinned.value;
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
toolkit,
|
|
302
|
+
toolkitShow,
|
|
303
|
+
toolkitFixed,
|
|
304
|
+
toolkitPinned,
|
|
305
|
+
toggleToolkit,
|
|
306
|
+
pinnedToolkit,
|
|
307
|
+
toolkitWidgets,
|
|
308
|
+
initToolkitWidgets,
|
|
309
|
+
changeToolkitWidgets,
|
|
310
|
+
fixedToolkit,
|
|
311
|
+
setFieldToolkit
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export { useToolkit };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Ref, App } from 'vue';
|
|
2
|
+
import { PanelEnum } from '@gct-paas/core';
|
|
3
|
+
import { PermissionResponse, WebpageResponse } from '@gct-paas/api/apaas';
|
|
4
|
+
export declare const newKeyTag = "___new___";
|
|
5
|
+
export type PageInfo = WebpageResponse & {
|
|
6
|
+
categoryId?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const pageInfo: Ref<PageInfo>;
|
|
9
|
+
export declare const pagePermissions: Ref<{
|
|
10
|
+
createTime?: string | undefined;
|
|
11
|
+
createUserId?: string | undefined;
|
|
12
|
+
createUserName?: string | undefined;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
key?: string | undefined;
|
|
15
|
+
modifyTime?: string | undefined;
|
|
16
|
+
modifyUserId?: string | undefined;
|
|
17
|
+
modifyUserName?: string | undefined;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
relationId?: string | undefined;
|
|
20
|
+
sysBuiltin?: string | undefined;
|
|
21
|
+
terminalType?: string | undefined;
|
|
22
|
+
}[], PermissionResponse[] | {
|
|
23
|
+
createTime?: string | undefined;
|
|
24
|
+
createUserId?: string | undefined;
|
|
25
|
+
createUserName?: string | undefined;
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
key?: string | undefined;
|
|
28
|
+
modifyTime?: string | undefined;
|
|
29
|
+
modifyUserId?: string | undefined;
|
|
30
|
+
modifyUserName?: string | undefined;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
relationId?: string | undefined;
|
|
33
|
+
sysBuiltin?: string | undefined;
|
|
34
|
+
terminalType?: string | undefined;
|
|
35
|
+
}[]>;
|
|
36
|
+
export declare const unlockAvailable: import('vue').ComputedRef<boolean>;
|
|
37
|
+
export declare const currentPanel: Ref<PanelEnum>;
|
|
38
|
+
/**
|
|
39
|
+
* 加载页面信息
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
export declare function loadPageInfo(_app: App): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* 初始化界面占用信息
|
|
45
|
+
*/
|
|
46
|
+
declare function initLockState(): void;
|
|
47
|
+
/**
|
|
48
|
+
* 更新页面锁定状态
|
|
49
|
+
* @param {boolean} value
|
|
50
|
+
*/
|
|
51
|
+
export declare function lockPage(value?: boolean): Promise<void>;
|
|
52
|
+
export declare function togglePanel(value: PanelEnum): void;
|
|
53
|
+
export declare function usePage(): {
|
|
54
|
+
togglePanel: typeof togglePanel;
|
|
55
|
+
initLockState: typeof initLockState;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { ref, computed, createVNode } from 'vue';
|
|
2
|
+
import { PanelEnum, Platform, FormComponents, t } from '@gct-paas/core';
|
|
3
|
+
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import { useCacheHistory } from '../../develop/useCacheHistory.mjs';
|
|
5
|
+
import { Modal } from 'ant-design-vue';
|
|
6
|
+
import { useDesigner } from '../useDesigner.mjs';
|
|
7
|
+
import { useToolkit } from '../layout/useToolkit.mjs';
|
|
8
|
+
import { isNil, isEmpty } from 'lodash-es';
|
|
9
|
+
import { platform } from '../design-state.mjs';
|
|
10
|
+
|
|
11
|
+
const newKeyTag = "___new___";
|
|
12
|
+
const pageInfo = ref({});
|
|
13
|
+
const pagePermissions = ref([]);
|
|
14
|
+
const unlockAvailable = computed(() => {
|
|
15
|
+
const { userId, username } = _gct.store.userInfo;
|
|
16
|
+
return pageInfo.value.lockUserId === userId || username === "admin";
|
|
17
|
+
});
|
|
18
|
+
const currentPanel = ref(PanelEnum.PAGE);
|
|
19
|
+
async function loadPageInfo(_app) {
|
|
20
|
+
const { initToolkitWidgets } = useToolkit();
|
|
21
|
+
const {
|
|
22
|
+
setPageJson,
|
|
23
|
+
loadPageDesignHistoryList,
|
|
24
|
+
emitCache,
|
|
25
|
+
pageJson,
|
|
26
|
+
// setPluginConfigs,
|
|
27
|
+
savePageJsonSnapshot
|
|
28
|
+
} = useDesigner();
|
|
29
|
+
const { historyUtils } = useCacheHistory();
|
|
30
|
+
platform.value = _gct.store.context.platform || Platform.WEB;
|
|
31
|
+
const pid = _gct.store.context.pid || "";
|
|
32
|
+
if (pid.startsWith(newKeyTag)) {
|
|
33
|
+
const key = pid.replace(`${newKeyTag}:`, "");
|
|
34
|
+
pageInfo.value = {
|
|
35
|
+
id: newKeyTag,
|
|
36
|
+
name: "",
|
|
37
|
+
key,
|
|
38
|
+
designerJson: ""
|
|
39
|
+
};
|
|
40
|
+
} else {
|
|
41
|
+
const pageInfoRes = platform.value === Platform.WEB ? await _api.apaas.webpage.getInfo({
|
|
42
|
+
id: _gct.store.context.pid
|
|
43
|
+
}) : platform.value === Platform.PAD ? await _api.apaas.padPage.getInfo({
|
|
44
|
+
id: _gct.store.context.pid
|
|
45
|
+
}) : await _api.apaas.mobilePage.getInfo({
|
|
46
|
+
id: _gct.store.context.pid
|
|
47
|
+
});
|
|
48
|
+
pageInfo.value = pageInfoRes;
|
|
49
|
+
}
|
|
50
|
+
if (!historyUtils.isHistoryInfoExist(_gct.store.context.pid)) {
|
|
51
|
+
historyUtils.init({ historyId: _gct.store.context.pid ?? "" });
|
|
52
|
+
}
|
|
53
|
+
if (pageInfo.value.designerJson && !isNil(pageInfo.value.designerJson) && !isEmpty(pageInfo.value.designerJson)) {
|
|
54
|
+
const _json = JSON.parse(pageInfo.value.designerJson);
|
|
55
|
+
if (_json && _json.plugins) ;
|
|
56
|
+
if (!_json.pageConfig) {
|
|
57
|
+
_json.pageConfig = {
|
|
58
|
+
title: "",
|
|
59
|
+
i18n: {},
|
|
60
|
+
hasFooter: false
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
setPageJson({ ..._json, id: pageInfo.value.id });
|
|
64
|
+
} else {
|
|
65
|
+
emitCache();
|
|
66
|
+
if (platform.value === Platform.WEB) {
|
|
67
|
+
setPageJson({
|
|
68
|
+
newDesigner: true,
|
|
69
|
+
style: {
|
|
70
|
+
paddingAll: "",
|
|
71
|
+
paddingTop: "",
|
|
72
|
+
paddingRight: "16",
|
|
73
|
+
paddingBottom: "16",
|
|
74
|
+
paddingLeft: "16"
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
} else if (platform.value === Platform.PAD) {
|
|
78
|
+
setPageJson({
|
|
79
|
+
newDesigner: true,
|
|
80
|
+
style: {
|
|
81
|
+
paddingAll: "0",
|
|
82
|
+
paddingTop: "0",
|
|
83
|
+
paddingRight: "0",
|
|
84
|
+
paddingBottom: "0",
|
|
85
|
+
paddingLeft: "0",
|
|
86
|
+
backgroundColor: "#fff"
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
setPageJson({
|
|
91
|
+
newDesigner: true,
|
|
92
|
+
style: {
|
|
93
|
+
paddingAll: "16",
|
|
94
|
+
paddingTop: "16",
|
|
95
|
+
paddingRight: "16",
|
|
96
|
+
paddingBottom: "16",
|
|
97
|
+
paddingLeft: "16",
|
|
98
|
+
backgroundColor: "#fff"
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!pageJson.widgets.some(
|
|
104
|
+
(item) => item.type === FormComponents.BottomButtonContainer
|
|
105
|
+
)) ;
|
|
106
|
+
initToolkitWidgets();
|
|
107
|
+
loadPageDesignHistoryList();
|
|
108
|
+
pagePermissions.value = await _api.apaas.permission.getList({
|
|
109
|
+
relationId: _gct.store.context.pid
|
|
110
|
+
}) || [];
|
|
111
|
+
if (!pid.startsWith(newKeyTag)) ;
|
|
112
|
+
savePageJsonSnapshot();
|
|
113
|
+
}
|
|
114
|
+
function initLockState() {
|
|
115
|
+
}
|
|
116
|
+
const lockPageWithConfirm = (id) => {
|
|
117
|
+
Modal.confirm({
|
|
118
|
+
title: t("sys.sureToLock"),
|
|
119
|
+
icon: createVNode(ExclamationCircleOutlined),
|
|
120
|
+
okText: t("sys.ok"),
|
|
121
|
+
cancelText: t("sys.cancel"),
|
|
122
|
+
async onOk() {
|
|
123
|
+
await _api.apaas.webpage.postLockWebPage({
|
|
124
|
+
id
|
|
125
|
+
});
|
|
126
|
+
pageInfo.value.lockUserId = _gct.store.userInfo.userId;
|
|
127
|
+
pageInfo.value.lockUserName = _gct.store.userInfo.fullname;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
async function lockPage(value = true) {
|
|
132
|
+
const id = _gct.store.context.pid;
|
|
133
|
+
if (value) {
|
|
134
|
+
lockPageWithConfirm(id);
|
|
135
|
+
} else {
|
|
136
|
+
await _api.apaas.webpage.postUnLockWebPage({
|
|
137
|
+
id
|
|
138
|
+
});
|
|
139
|
+
pageInfo.value.lockUserId = "";
|
|
140
|
+
pageInfo.value.lockUserName = "";
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function togglePanel(value) {
|
|
144
|
+
if (currentPanel.value === value) return;
|
|
145
|
+
currentPanel.value = value;
|
|
146
|
+
}
|
|
147
|
+
function usePage() {
|
|
148
|
+
return {
|
|
149
|
+
togglePanel,
|
|
150
|
+
initLockState
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { currentPanel, loadPageInfo, lockPage, newKeyTag, pageInfo, pagePermissions, togglePanel, unlockAvailable, usePage };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { WebPageOccupyResponse } from '@gct-paas/api/apaas';
|
|
3
|
+
/** 页面占用信息 */
|
|
4
|
+
export declare const pageOccupyInfo: Ref<WebPageOccupyResponse>;
|
|
5
|
+
/**
|
|
6
|
+
* 销毁占用轮询定时器
|
|
7
|
+
*/
|
|
8
|
+
export declare function destroyOccupyTimer(): void;
|
|
9
|
+
/**
|
|
10
|
+
* 获取占用信息
|
|
11
|
+
*
|
|
12
|
+
* @returns {Promise<void>}
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadPageOccupyInfo(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* 页面占用或取消占用
|
|
17
|
+
*
|
|
18
|
+
* @param {boolean} value true 为占用,false 为取消占用
|
|
19
|
+
* @returns {Promise<void>}
|
|
20
|
+
*/
|
|
21
|
+
export declare function occupyPage(value?: boolean): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* 页面占用 composable
|
|
24
|
+
* 初始化占用信息监听,根据 occupyId 状态启动或销毁轮询定时器
|
|
25
|
+
*
|
|
26
|
+
* @returns {{ pageOccupyInfo, destroyOccupyTimer, loadPageOccupyInfo, occupyPage }}
|
|
27
|
+
*/
|
|
28
|
+
export declare function usePageOccupy(): {
|
|
29
|
+
pageOccupyInfo: Ref<WebPageOccupyResponse, WebPageOccupyResponse>;
|
|
30
|
+
destroyOccupyTimer: typeof destroyOccupyTimer;
|
|
31
|
+
loadPageOccupyInfo: typeof loadPageOccupyInfo;
|
|
32
|
+
occupyPage: typeof occupyPage;
|
|
33
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ref, computed, watch } from 'vue';
|
|
2
|
+
import { throttle } from 'lodash-es';
|
|
3
|
+
|
|
4
|
+
const pageOccupyInfo = ref({
|
|
5
|
+
querySpanNum: 120,
|
|
6
|
+
// 占用查询间隔
|
|
7
|
+
cacheNum: 500
|
|
8
|
+
// 占用缓存间隔
|
|
9
|
+
});
|
|
10
|
+
const timeout = computed(() => {
|
|
11
|
+
return pageOccupyInfo.value.querySpanNum * 1e3;
|
|
12
|
+
});
|
|
13
|
+
const wait = computed(() => {
|
|
14
|
+
return (pageOccupyInfo.value.cacheNum - 10) / 2 * 1e3;
|
|
15
|
+
});
|
|
16
|
+
let occupyTimer = null;
|
|
17
|
+
function initOccupyTimer() {
|
|
18
|
+
destroyOccupyTimer();
|
|
19
|
+
occupyTimer = window.setInterval(() => {
|
|
20
|
+
console.info("【获取占用】");
|
|
21
|
+
loadPageOccupyInfo();
|
|
22
|
+
}, timeout.value);
|
|
23
|
+
}
|
|
24
|
+
function destroyOccupyTimer() {
|
|
25
|
+
if (!occupyTimer) return;
|
|
26
|
+
console.info("【销毁占用轮询】");
|
|
27
|
+
clearInterval(occupyTimer);
|
|
28
|
+
}
|
|
29
|
+
async function loadPageOccupyInfo() {
|
|
30
|
+
const res = await _api.apaas.webpage.postGetWebPageOccupyMsg({
|
|
31
|
+
id: _gct.store.context.pid
|
|
32
|
+
});
|
|
33
|
+
pageOccupyInfo.value = res;
|
|
34
|
+
}
|
|
35
|
+
async function occupyPageTrue(id) {
|
|
36
|
+
console.info("【页面占用】【节流】", Date.now() / 1e3);
|
|
37
|
+
await _api.apaas.webpage.postOccupyWebPage({
|
|
38
|
+
id
|
|
39
|
+
});
|
|
40
|
+
pageOccupyInfo.value.occupyId = _gct.store.userInfo.userId;
|
|
41
|
+
pageOccupyInfo.value.occupyName = _gct.store.userInfo.fullname;
|
|
42
|
+
}
|
|
43
|
+
const throttledOccupyPageTrue = throttle(occupyPageTrue, wait.value);
|
|
44
|
+
async function occupyPage(value = true) {
|
|
45
|
+
const id = _gct.store.context.pid;
|
|
46
|
+
if (value) {
|
|
47
|
+
console.info("【占用】");
|
|
48
|
+
throttledOccupyPageTrue(id);
|
|
49
|
+
} else {
|
|
50
|
+
console.info("【取消占用】");
|
|
51
|
+
await _api.apaas.webpage.postCancelOccupyWebPage({
|
|
52
|
+
id
|
|
53
|
+
});
|
|
54
|
+
pageOccupyInfo.value.occupyId = "";
|
|
55
|
+
pageOccupyInfo.value.occupyName = "";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function usePageOccupy() {
|
|
59
|
+
watch(
|
|
60
|
+
() => pageOccupyInfo.value.occupyId,
|
|
61
|
+
(value) => {
|
|
62
|
+
if (value) {
|
|
63
|
+
destroyOccupyTimer();
|
|
64
|
+
} else {
|
|
65
|
+
initOccupyTimer();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
return {
|
|
70
|
+
pageOccupyInfo,
|
|
71
|
+
destroyOccupyTimer,
|
|
72
|
+
loadPageOccupyInfo,
|
|
73
|
+
occupyPage
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { destroyOccupyTimer, loadPageOccupyInfo, occupyPage, pageOccupyInfo, usePageOccupy };
|