@gct-paas/design 0.1.4-dev.1 → 0.1.4-dev.11
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-CeYFqnkk.js +638 -0
- package/dist/index.esm.min.mjs +18089 -0
- package/dist/index.min.cjs +3 -1
- package/dist/index.min.css +1 -0
- package/dist/index.system.min.js +3 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/assets/transform-js.worker-D2HSS5w_.js +270718 -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/field-cascader/index.d.ts +2 -0
- package/es/components/field-cascader/src/FieldCascader.css +69 -0
- package/es/components/field-cascader/src/FieldCascader.vue.d.ts +87 -0
- package/es/components/field-cascader/src/FieldCascader.vue.mjs +129 -0
- package/es/components/field-cascader/src/FieldCascader.vue3.mjs +6 -0
- package/es/components/field-cascader/src/SearchInput.css +9 -0
- package/es/components/field-cascader/src/SearchInput.vue.d.ts +11 -0
- package/es/components/field-cascader/src/SearchInput.vue.mjs +7 -0
- package/es/components/field-cascader/src/SearchInput.vue2.mjs +48 -0
- package/es/components/field-cascader/src/hooks.d.ts +129 -0
- package/es/components/field-cascader/src/hooks.mjs +205 -0
- package/es/components/field-transfer/components/Cascader/FieldCascader.d.ts +25 -0
- package/es/components/field-transfer/components/Cascader/FieldCascader.mjs +250 -0
- package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.d.ts +46 -0
- package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.mjs +56 -0
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.d.ts +39 -0
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +160 -0
- package/es/components/field-transfer/components/Transfer/FieldTransfer.d.ts +83 -0
- package/es/components/field-transfer/components/Transfer/FieldTransfer.mjs +211 -0
- package/es/components/field-transfer/components/Transfer/TransferTree.d.ts +62 -0
- package/es/components/field-transfer/components/Transfer/TransferTree.mjs +117 -0
- package/es/components/field-transfer/components/Transfer/TreeItem.d.ts +17 -0
- package/es/components/field-transfer/components/Transfer/TreeItem.mjs +41 -0
- package/es/components/field-transfer/components/field-transfer-modal.css +5 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue.d.ts +43 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue2.mjs +7 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue3.mjs +230 -0
- package/es/components/field-transfer/components/modal-wrapper.vue.d.ts +19 -0
- package/es/components/field-transfer/components/modal-wrapper.vue.mjs +29 -0
- package/es/components/field-transfer/components/modal-wrapper.vue2.mjs +5 -0
- package/es/components/field-transfer/hooks/useTreeData.d.ts +139 -0
- package/es/components/field-transfer/hooks/useTreeData.mjs +165 -0
- package/es/components/field-transfer/index.d.ts +21 -0
- package/es/components/field-transfer/less/AdvancedTransfer.css +60 -0
- package/es/components/field-transfer/less/FieldCascader.css +57 -0
- package/es/components/field-transfer/less/TransferTree.css +86 -0
- package/es/components/field-transfer/less/TreeItem.css +29 -0
- package/es/components/field-transfer/useFieldTransfer.d.ts +47 -0
- package/es/components/field-transfer/useFieldTransfer.mjs +51 -0
- package/es/components/field-transfer/utils/tree-tool.d.ts +6 -0
- package/es/components/field-transfer/utils/tree-tool.mjs +73 -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 +12 -0
- package/es/components/index.mjs +59 -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/user-occupy/index.d.ts +4 -0
- package/es/components/user-occupy/occupy.const.d.ts +4 -0
- package/es/components/user-occupy/occupy.const.mjs +3 -0
- package/es/components/user-occupy/useUserOccupy.d.ts +38 -0
- package/es/components/user-occupy/useUserOccupy.mjs +218 -0
- package/es/components/user-occupy/user-lock.css +29 -0
- package/es/components/user-occupy/user-lock.vue.d.ts +2 -0
- package/es/components/user-occupy/user-lock.vue.mjs +7 -0
- package/es/components/user-occupy/user-lock.vue3.mjs +35 -0
- package/es/components/user-occupy/user-occupy.css +25 -0
- package/es/components/user-occupy/user-occupy.vue.d.ts +2 -0
- package/es/components/user-occupy/user-occupy.vue.mjs +7 -0
- package/es/components/user-occupy/user-occupy.vue3.mjs +36 -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 +71 -2
- package/es/constant/page-designer.d.ts +75 -0
- package/es/constant/page-designer.mjs +52 -0
- package/es/create-app-vue.d.ts +8 -0
- package/es/create-app-vue.mjs +7 -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/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 +2572 -0
- package/es/hooks/design-view/design-state.mjs +127 -0
- package/es/hooks/design-view/designer/useDesignCache.d.ts +4 -0
- package/es/hooks/design-view/designer/useDesignCache.mjs +90 -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 +3133 -0
- package/es/hooks/design-view/designer/useDesignModal.mjs +98 -0
- package/es/hooks/design-view/designer/useDesignPreview.d.ts +11 -0
- package/es/hooks/design-view/designer/useDesignPreview.mjs +201 -0
- package/es/hooks/design-view/designer/useDesignSave.d.ts +12 -0
- package/es/hooks/design-view/designer/useDesignSave.mjs +302 -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 +1470 -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 +400 -0
- package/es/hooks/design-view/layout/useToolkit.mjs +356 -0
- package/es/hooks/design-view/page/usePage.d.ts +57 -0
- package/es/hooks/design-view/page/usePage.mjs +227 -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 +4259 -0
- package/es/hooks/design-view/useDesigner.mjs +125 -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 +227 -0
- package/es/hooks/design-view/widget/useWidget.d.ts +102 -0
- package/es/hooks/design-view/widget/useWidget.mjs +119 -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 +118 -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 +26 -1
- 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/widgets/useAsyncFields.d.ts +17 -0
- package/es/hooks/widgets/useAsyncFields.mjs +177 -0
- package/es/hooks/widgets/useFileAttrsHooks.d.ts +28 -0
- package/es/hooks/widgets/useFileAttrsHooks.mjs +39 -0
- package/es/index.d.ts +9 -3
- package/es/index.mjs +103 -20
- 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/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 +29 -7
- package/es/interface/page-designer/toolkit.d.ts +12 -0
- package/es/interface/state/i-design-view.state.d.ts +107 -10
- package/es/props/index.d.ts +64 -0
- package/es/props/index.mjs +56 -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 +2 -0
- package/es/register/material/material.register.d.ts +90 -0
- package/es/register/material/material.register.mjs +134 -0
- package/es/schema/common-config/base-button-config.d.ts +1 -43
- package/es/schema/common-config/base-button-config.mjs +0 -1
- package/es/schema/common-config/button-editor-config.d.ts +2 -12
- package/es/schema/common-config/button-editor-config.mjs +66 -2
- package/es/schema/common-config/button-props-func.d.ts +1 -1
- package/es/schema/common-config/button-props-func.mjs +0 -1
- package/es/schema/common-config/common-event-config.d.ts +6 -0
- package/es/schema/common-config/common-event-config.mjs +14 -0
- package/es/schema/common-config/common-field-editor-config.d.ts +17 -0
- package/es/schema/common-config/common-field-editor-config.mjs +213 -0
- package/es/schema/common-config/common-style.d.ts +2 -2
- package/es/schema/common-config/common-style.mjs +2 -3
- package/es/schema/common-config/display-editor-config.d.ts +1 -1
- package/es/schema/common-config/display-editor-config.mjs +27 -5
- package/es/schema/common-config/formItem-editor-config.d.ts +1 -2
- package/es/schema/common-config/formItem-editor-config.mjs +2 -52
- package/es/schema/common-config/permission-editor-config.d.ts +1 -1
- package/es/schema/common-config/permission-editor-config.mjs +8 -1
- package/es/schema/index.d.ts +13 -9
- package/es/schema/modal/modal-body.d.ts +2 -0
- package/es/schema/modal/modal-body.mjs +9 -0
- package/es/schema/modal/modal-footer.d.ts +2 -0
- package/es/schema/modal/modal-footer.mjs +9 -0
- package/es/schema/modal/modal.d.ts +8 -0
- package/es/schema/modal/modal.mjs +182 -0
- package/es/schema/search/BaseDate.d.ts +143 -0
- package/es/schema/search/BaseDate.mjs +123 -0
- package/es/schema/search/BaseSearch.d.ts +141 -0
- package/es/schema/search/BaseSearch.mjs +160 -0
- package/es/setup-app.d.ts +1 -0
- package/es/setup-app.mjs +71 -0
- package/es/types/index.d.ts +10 -24
- package/es/utils/begin-drag/begin-drag.d.ts +13 -0
- package/es/utils/begin-drag/begin-drag.mjs +206 -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/design-view/index.d.ts +9 -0
- package/es/utils/design-view/index.mjs +17 -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/flatten.d.ts +12 -0
- package/es/utils/flatten.mjs +27 -0
- package/es/utils/formula-editor-design/formula-editor-design.d.ts +9 -0
- package/es/utils/formula-editor-design/formula-editor-design.mjs +85 -0
- package/es/utils/index.d.ts +12 -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/schema/index.d.ts +10 -0
- package/es/utils/schema/index.mjs +12 -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/package.json +31 -10
- package/es/constant/variable-type/variable-type.d.ts +0 -12
- package/es/constant/variable-type/variable-type.mjs +0 -13
- 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/controller/i-design-drag.controller.mjs +0 -1
- package/es/interface/controller/i-design-view.controller.mjs +0 -1
- package/es/interface/design-page/design-page.d.ts +0 -141
- package/es/interface/design-page/design-page.mjs +0 -1
- package/es/interface/i-drag-collect/i-drag-collect.mjs +0 -1
- package/es/interface/i-drag-data-item/i-drag-data-item.mjs +0 -1
- package/es/interface/i-drag-item/i-drag-item.mjs +0 -1
- package/es/interface/i-drop-collect/i-drop-collect.mjs +0 -1
- package/es/interface/i-drop-result/i-drop-result.mjs +0 -1
- 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/props/plugin-comp-props.mjs +0 -1
- package/es/interface/state/i-design-drag.state.d.ts +0 -15
- package/es/interface/state/i-design-drag.state.mjs +0 -1
- package/es/interface/state/i-design-view.state.mjs +0 -1
- 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/column-editor-config.d.ts +0 -3
- package/es/schema/common-config/column-editor-config.mjs +0 -29
- 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,99 @@
|
|
|
1
|
+
import { computed, nextTick } from 'vue';
|
|
2
|
+
import { useSelectedWidget } from '../widget/useSelectedWidget.mjs';
|
|
3
|
+
import { isString, isObject } from 'lodash-es';
|
|
4
|
+
import { useDesignCache } from '../designer/useDesignCache.mjs';
|
|
5
|
+
import { regRoot } from '../design-state.mjs';
|
|
6
|
+
|
|
7
|
+
const propEditorProps = {
|
|
8
|
+
propName: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
propConfig: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: {}
|
|
15
|
+
},
|
|
16
|
+
changeCallback: {
|
|
17
|
+
type: Function
|
|
18
|
+
},
|
|
19
|
+
required: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
validate: {
|
|
24
|
+
type: Promise
|
|
25
|
+
},
|
|
26
|
+
widget: {
|
|
27
|
+
type: Object
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function usePropEditor(propName, changeCallback, globData = {}) {
|
|
31
|
+
const { selectedProps, selectedRef } = useSelectedWidget();
|
|
32
|
+
const { emitCache } = useDesignCache();
|
|
33
|
+
function setValue(value, name) {
|
|
34
|
+
if (isString(name)) {
|
|
35
|
+
const widget = regRoot.test(name) ? selectedRef : selectedProps;
|
|
36
|
+
const keyslist = name.replace(regRoot, "").split(".");
|
|
37
|
+
const len = keyslist.length - 1;
|
|
38
|
+
keyslist.reduce(
|
|
39
|
+
(memo, cur, index) => {
|
|
40
|
+
if (index === len) {
|
|
41
|
+
memo[cur] = value;
|
|
42
|
+
}
|
|
43
|
+
return memo[cur];
|
|
44
|
+
},
|
|
45
|
+
widget.value
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
if (isObject(name)) {
|
|
49
|
+
const valueMap = value;
|
|
50
|
+
for (const key in name) {
|
|
51
|
+
const valKey = name[key];
|
|
52
|
+
setValue(valueMap[key], valKey);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function getValue(name) {
|
|
57
|
+
if (isString(name)) {
|
|
58
|
+
const widget = regRoot.test(name) ? selectedRef : selectedProps;
|
|
59
|
+
if (!widget?.value) return;
|
|
60
|
+
const keyslist = name.replace(regRoot, "").split(".");
|
|
61
|
+
try {
|
|
62
|
+
return keyslist.reduce(
|
|
63
|
+
(memo, cur) => memo[cur],
|
|
64
|
+
widget.value
|
|
65
|
+
);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
console.warn(err);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (isObject(name)) {
|
|
71
|
+
const valueMap = {};
|
|
72
|
+
for (const key in name) {
|
|
73
|
+
const valKey = name[key];
|
|
74
|
+
valueMap[key] = getValue(valKey);
|
|
75
|
+
}
|
|
76
|
+
return valueMap;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const propValue = computed({
|
|
80
|
+
get() {
|
|
81
|
+
const baseValue = getValue(propName);
|
|
82
|
+
return baseValue ?? (isString(propName) ? globData[propName] : baseValue);
|
|
83
|
+
},
|
|
84
|
+
set(val) {
|
|
85
|
+
setValue(val, propName);
|
|
86
|
+
if (!!changeCallback && typeof changeCallback === "function") {
|
|
87
|
+
nextTick().then(() => {
|
|
88
|
+
changeCallback(selectedRef.value, val);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
emitCache();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
propValue
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { propEditorProps, usePropEditor };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LowCodeModal, LowCodeWidget } from '@gct-paas/schema';
|
|
2
|
+
export declare function useStyle(widget: LowCodeWidget.BasicSchema | LowCodeModal.Modal): {
|
|
3
|
+
wrapperStyle: import('vue').ComputedRef<IObject>;
|
|
4
|
+
wStyle: import('vue').ComputedRef<IObject>;
|
|
5
|
+
labelFont: import('vue').ComputedRef<IObject>;
|
|
6
|
+
contentFont: import('vue').ComputedRef<IObject>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 将样式对象转换为字体样式
|
|
10
|
+
*
|
|
11
|
+
* @param schema - 样式配置对象
|
|
12
|
+
* @returns 转换后的字体样式对象
|
|
13
|
+
*/
|
|
14
|
+
export declare const schemaToStyle: (schema: IObject) => IObject;
|
|
15
|
+
/**
|
|
16
|
+
* 将样式属性对象转换为 CSS 样式字符串格式
|
|
17
|
+
*
|
|
18
|
+
* @param styleProps - 样式属性对象
|
|
19
|
+
* @returns 转换后的样式对象
|
|
20
|
+
*/
|
|
21
|
+
export declare function propsToStyle(styleProps?: IObject): IObject;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { propsToStyle as propsToStyle$1, extractFontStyle, generateWrapperStyle } from '@gct-paas/schema';
|
|
3
|
+
|
|
4
|
+
function useStyle(widget) {
|
|
5
|
+
const { style = {}, ignoringStyle } = widget;
|
|
6
|
+
const wStyle = computed(() => {
|
|
7
|
+
return propsToStyle$1(style);
|
|
8
|
+
});
|
|
9
|
+
const wrapperStyle = computed(() => {
|
|
10
|
+
return generateWrapperStyle(style, ignoringStyle);
|
|
11
|
+
});
|
|
12
|
+
const labelFont = computed(() => {
|
|
13
|
+
return extractFontStyle(style.labelFont);
|
|
14
|
+
});
|
|
15
|
+
const contentFont = computed(() => {
|
|
16
|
+
return extractFontStyle(style.contentFont);
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
wrapperStyle,
|
|
20
|
+
wStyle,
|
|
21
|
+
labelFont,
|
|
22
|
+
contentFont
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const schemaToStyle = (schema) => extractFontStyle(schema);
|
|
26
|
+
function propsToStyle(styleProps = {}) {
|
|
27
|
+
return propsToStyle$1(styleProps);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { propsToStyle, schemaToStyle, useStyle };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { LowCodeWidget, LowCodeModal } from '@gct-paas/schema';
|
|
3
|
+
import { shadeColor, rgba2hex } from '../utils/color.util';
|
|
4
|
+
import { PRESET_COLOR, BTN_TYPE_COLOR } from '../constants/style-editor.const';
|
|
5
|
+
export { shadeColor, rgba2hex };
|
|
6
|
+
export { PRESET_COLOR as presetColor, BTN_TYPE_COLOR as btnTypeColor };
|
|
7
|
+
export declare const styleEditorProps: {
|
|
8
|
+
editor: {
|
|
9
|
+
type: PropType<LowCodeWidget.StyleEditor>;
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
widget: {
|
|
13
|
+
type: PropType<LowCodeWidget.BasicSchema | LowCodeModal.Modal>;
|
|
14
|
+
};
|
|
15
|
+
propConfig: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 样式编辑器 composable
|
|
22
|
+
* 封装样式属性的读写逻辑,支持链式路径和对象映射
|
|
23
|
+
*
|
|
24
|
+
* @template T 样式值类型
|
|
25
|
+
* @param {IObject} editor 样式编辑器配置
|
|
26
|
+
* @returns {{ styleValue: ComputedRef<T> }}
|
|
27
|
+
*/
|
|
28
|
+
export declare function useStyleEditor<T = IObject>(editor: IObject): {
|
|
29
|
+
styleValue: import('vue').WritableComputedRef<T, T>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { computed, nextTick } from 'vue';
|
|
2
|
+
import { useSelectedWidget } from '../widget/useSelectedWidget.mjs';
|
|
3
|
+
import { isString, isObject } from 'lodash-es';
|
|
4
|
+
import { useDesignCache } from '../designer/useDesignCache.mjs';
|
|
5
|
+
|
|
6
|
+
const styleEditorProps = {
|
|
7
|
+
editor: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: {}
|
|
10
|
+
},
|
|
11
|
+
widget: {
|
|
12
|
+
type: Object
|
|
13
|
+
},
|
|
14
|
+
propConfig: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: {}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function useStyleEditor(editor) {
|
|
20
|
+
const { selectedStyle, selectedRef } = useSelectedWidget();
|
|
21
|
+
const { emitCache } = useDesignCache();
|
|
22
|
+
function setValue(value, name) {
|
|
23
|
+
if (isString(name)) {
|
|
24
|
+
const keyslist = name.split(".");
|
|
25
|
+
const len = keyslist.length - 1;
|
|
26
|
+
keyslist.reduce((memo, cur, index) => {
|
|
27
|
+
if (index === len) {
|
|
28
|
+
memo[cur] = value;
|
|
29
|
+
}
|
|
30
|
+
return memo[cur];
|
|
31
|
+
}, selectedStyle.value);
|
|
32
|
+
}
|
|
33
|
+
if (isObject(name)) {
|
|
34
|
+
const valueMap = value;
|
|
35
|
+
for (const key in name) {
|
|
36
|
+
const valKey = name[key];
|
|
37
|
+
setValue(valueMap[key], valKey);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function getValue(name) {
|
|
42
|
+
if (isString(name)) {
|
|
43
|
+
const keys = name.split(".");
|
|
44
|
+
return keys.reduce(
|
|
45
|
+
(memo, cur) => memo[cur],
|
|
46
|
+
selectedStyle.value
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (isObject(name)) {
|
|
50
|
+
const valueMap = {};
|
|
51
|
+
for (const key in name) {
|
|
52
|
+
const valKey = name[key];
|
|
53
|
+
valueMap[key] = getValue(valKey);
|
|
54
|
+
}
|
|
55
|
+
return valueMap;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const styleValue = computed({
|
|
59
|
+
get() {
|
|
60
|
+
return getValue(editor.name);
|
|
61
|
+
},
|
|
62
|
+
set(val) {
|
|
63
|
+
setValue(val, editor.name);
|
|
64
|
+
if (!!editor.changeCallback && typeof editor.changeCallback === "function") {
|
|
65
|
+
nextTick().then(() => {
|
|
66
|
+
editor.changeCallback(selectedRef.value, val);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
emitCache();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
styleValue
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { styleEditorProps, useStyleEditor };
|