epic-designer-gold 0.0.3 → 0.0.4
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/.eslintrc.js +10 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/settings.json +6 -0
- package/README.md +3 -6
- package/docs/.vitepress/config.ts +163 -0
- package/docs/.vitepress/theme/custom.css +38 -0
- package/docs/.vitepress/theme/index.ts +7 -0
- package/docs/.vitepress/theme/style.css +44 -0
- package/docs/guide/about/about.md +24 -0
- package/docs/guide/action/customFunctions.md +560 -0
- package/docs/guide/components/EBuilder.md +546 -0
- package/docs/guide/components/EDesigner.md +120 -0
- package/docs/guide/copyright/copyright.md +38 -0
- package/docs/guide/extensions/actionBar.md +55 -0
- package/docs/guide/extensions/component.md +115 -0
- package/docs/guide/extensions/icon.md +111 -0
- package/docs/guide/extensions/publicMethods.md +52 -0
- package/docs/guide/extensions/rightSidebar.md +57 -0
- package/docs/guide/start/dark-mode.md +149 -0
- package/docs/guide/start/i18n-cn.md +39 -0
- package/docs/guide/start/index.md +59 -0
- package/docs/guide/start/layoutGuide.md +0 -0
- package/docs/guide/start/quick-start.md +194 -0
- package/docs/guide/start/theme.md +125 -0
- package/docs/guide/utils/pageManager.md +97 -0
- package/docs/guide/utils/pluginManager.md +227 -0
- package/docs/index.md +41 -0
- package/docs/package.json +15 -0
- package/docs/public/certificate.jpg +0 -0
- package/docs/public/dark.png +0 -0
- package/docs/public/favicon.ico +0 -0
- package/docs/public/icons/demo.css +539 -0
- package/docs/public/icons/demo_index.html +589 -0
- package/docs/public/icons/iconfont.css +379 -0
- package/docs/public/icons/iconfont.js +1 -0
- package/docs/public/icons/iconfont.json +646 -0
- package/docs/public/icons/iconfont.ttf +0 -0
- package/docs/public/icons/iconfont.woff +0 -0
- package/docs/public/icons/iconfont.woff2 +0 -0
- package/docs/public/icons/iconify.css +271 -0
- package/docs/public/icons/iconify.html +333 -0
- package/docs/public/layout.jpg +0 -0
- package/docs/public/logo.png +0 -0
- package/docs/public/theme.jpg +0 -0
- package/docs/updateLog.md +461 -0
- package/docs/vite.config.ts +18 -0
- package/docs//345/210/235/345/247/213/345/214/226/345/270/203/345/261/200.jpg +0 -0
- package/docs//350/256/276/350/256/241/345/231/250/344/273/213/347/273/215.md +21 -0
- package/docs//350/256/276/350/256/241/345/231/250/345/270/203/345/261/200.jpg +0 -0
- package/examples/README.md +18 -0
- package/examples/index.html +14 -0
- package/examples/package.json +28 -0
- package/examples/public/favicon.ico +0 -0
- package/examples/src/App.vue +5 -0
- package/examples/src/assets/logo.png +0 -0
- package/examples/src/layout/baseLayout.vue +3 -0
- package/examples/src/layout/components/Header/index.vue +104 -0
- package/examples/src/layout/components/Main/Maximize.vue +77 -0
- package/examples/src/layout/components/Main/index.vue +16 -0
- package/examples/src/layout/components/Menu/index.vue +49 -0
- package/examples/src/layout/index.vue +26 -0
- package/examples/src/main.ts +6 -0
- package/examples/src/router/index.ts +122 -0
- package/examples/src/style/reset.css +253 -0
- package/examples/src/style.less +44 -0
- package/examples/src/views/builder/basic/index.vue +300 -0
- package/examples/src/views/builder/customForm/index.vue +227 -0
- package/examples/src/views/builder/disableDisplay/index.vue +153 -0
- package/examples/src/views/builder/disableDisplay copy/index.vue +111 -0
- package/examples/src/views/builder/loadData/index.vue +69 -0
- package/examples/src/views/builder/loadFormData/index.vue +195 -0
- package/examples/src/views/builder/sum/index.vue +127 -0
- package/examples/src/views/designer/basic/index.vue +62 -0
- package/examples/src/views/designer/formMode/index.vue +22 -0
- package/examples/src/views/designer/loadData/index.vue +63 -0
- package/examples/src/vite-env.d.ts +1 -0
- package/examples/tsconfig.json +27 -0
- package/examples/tsconfig.node.json +10 -0
- package/examples/uno.config.ts +2 -0
- package/examples/vite.config.ts +35 -0
- package/package.json +49 -75
- package/packages/core/LICENSE +21 -0
- package/packages/core/components/asyncLoader/index.less +92 -0
- package/packages/core/components/asyncLoader/index.vue +7 -0
- package/packages/core/components/builder/hooks/useBuilder.ts +132 -0
- package/packages/core/components/builder/index.ts +3 -0
- package/packages/core/components/builder/src/builder.vue +131 -0
- package/packages/core/components/builder/src/types.ts +4 -0
- package/packages/core/components/designer/index.ts +3 -0
- package/packages/core/components/designer/src/designer.vue +337 -0
- package/packages/core/components/designer/src/index.less +81 -0
- package/packages/core/components/designer/src/modules/actionBar/index.less +80 -0
- package/packages/core/components/designer/src/modules/actionBar/index.vue +50 -0
- package/packages/core/components/designer/src/modules/attributeView/attributeView.vue +124 -0
- package/packages/core/components/designer/src/modules/attributeView/eventView.vue +77 -0
- package/packages/core/components/designer/src/modules/attributeView/index.less +36 -0
- package/packages/core/components/designer/src/modules/attributeView/styleView.vue +117 -0
- package/packages/core/components/designer/src/modules/componentView/index.less +61 -0
- package/packages/core/components/designer/src/modules/componentView/index.vue +127 -0
- package/packages/core/components/designer/src/modules/editContainer/editNodeItem.vue +87 -0
- package/packages/core/components/designer/src/modules/editContainer/editScreenContainer.vue +227 -0
- package/packages/core/components/designer/src/modules/editContainer/index.less +159 -0
- package/packages/core/components/designer/src/modules/editContainer/index.vue +36 -0
- package/packages/core/components/designer/src/modules/editContainer/nodeItem.vue +93 -0
- package/packages/core/components/designer/src/modules/editContainer/previewJson.vue +60 -0
- package/packages/core/components/designer/src/modules/editContainer/previewWidgets.vue +390 -0
- package/packages/core/components/designer/src/modules/editContainer/toolbar.vue +258 -0
- package/packages/core/components/designer/src/modules/header/index.less +16 -0
- package/packages/core/components/designer/src/modules/header/index.vue +72 -0
- package/packages/core/components/designer/src/modules/outline/index.less +7 -0
- package/packages/core/components/designer/src/modules/outline/outline.vue +56 -0
- package/packages/core/components/designer/src/modules/preview/index.less +0 -0
- package/packages/core/components/designer/src/modules/preview/index.vue +103 -0
- package/packages/core/components/designer/src/modules/rightSidebar/breadcrumb.vue +30 -0
- package/packages/core/components/designer/src/modules/rightSidebar/index.less +74 -0
- package/packages/core/components/designer/src/modules/rightSidebar/index.vue +67 -0
- package/packages/core/components/designer/src/modules/sourceCode/index.less +7 -0
- package/packages/core/components/designer/src/modules/sourceCode/index.vue +37 -0
- package/packages/core/components/designer/src/types.ts +51 -0
- package/packages/core/components/icon/index.ts +2 -0
- package/packages/core/components/icon/src/icon.vue +28 -0
- package/packages/core/components/node/index.ts +2 -0
- package/packages/core/components/node/src/dynamicFormItem.vue +38 -0
- package/packages/core/components/node/src/node.vue +400 -0
- package/packages/core/components/tree/index.ts +2 -0
- package/packages/core/components/tree/src/index.less +117 -0
- package/packages/core/components/tree/src/tree.vue +113 -0
- package/packages/core/components/tree/src/treeNodeItem.vue +120 -0
- package/packages/core/components/tree/src/treeNodes.vue +70 -0
- package/packages/core/extensions/EActionEditor/index.less +177 -0
- package/packages/core/extensions/EActionEditor/index.vue +160 -0
- package/packages/core/extensions/EActionEditor/src/EActionEditorItem.vue +133 -0
- package/packages/core/extensions/EActionEditor/src/EActionModal.vue +258 -0
- package/packages/core/extensions/EActionEditor/src/EArgsEditor.vue +61 -0
- package/packages/core/extensions/EActionEditor/src/EScriptEdit.vue +26 -0
- package/packages/core/extensions/EColEditor/index.less +24 -0
- package/packages/core/extensions/EColEditor/index.vue +65 -0
- package/packages/core/extensions/EDataSource/index.less +170 -0
- package/packages/core/extensions/EDataSource/index.vue +437 -0
- package/packages/core/extensions/EInputSize/index.vue +59 -0
- package/packages/core/extensions/EOptionsEditor/index.vue +195 -0
- package/packages/core/extensions/EOptionsEditor/optionItem.vue +72 -0
- package/packages/core/extensions/ERuleEditor/ERuleItem.vue +136 -0
- package/packages/core/extensions/ERuleEditor/data.ts +24 -0
- package/packages/core/extensions/ERuleEditor/index.less +17 -0
- package/packages/core/extensions/ERuleEditor/index.vue +157 -0
- package/packages/core/extensions/ERuleEditor/types.ts +17 -0
- package/packages/core/extensions/MonacoEditor/index.ts +31 -0
- package/packages/core/extensions/MonacoEditor/index.vue +150 -0
- package/packages/core/extensions/Page/index.ts +23 -0
- package/packages/core/extensions/Page/index.vue +27 -0
- package/packages/core/extensions/index.ts +58 -0
- package/packages/core/index.less +24 -0
- package/packages/core/index.ts +35 -0
- package/packages/core/package.json +59 -0
- package/packages/core/static/icons/iconify.css +271 -0
- package/packages/core/static/logo.png +0 -0
- package/packages/core/tsconfig.json +19 -0
- package/packages/core/types/epic-designer.ts +75 -0
- package/packages/epic-designer/LICENSE +21 -0
- package/packages/epic-designer/README.md +239 -0
- package/packages/epic-designer/package.json +75 -0
- package/packages/hooks/LICENSE +21 -0
- package/packages/hooks/common/element.ts +170 -0
- package/packages/hooks/common/index.ts +2 -0
- package/packages/hooks/common/theme.ts +84 -0
- package/packages/hooks/index.ts +2 -0
- package/packages/hooks/package.json +7 -0
- package/packages/hooks/store/index.ts +30 -0
- package/packages/hooks/tsconfig.json +19 -0
- package/packages/script/package.json +17 -0
- package/packages/script/src/check-compiled.ts +22 -0
- package/packages/script/tsconfig.json +10 -0
- package/packages/ui/LICENSE +21 -0
- package/packages/ui/antd/button/button.vue +16 -0
- package/packages/ui/antd/button/index.ts +203 -0
- package/packages/ui/antd/card/card.ts +31 -0
- package/packages/ui/antd/card/index.ts +64 -0
- package/packages/ui/antd/cascader/cascader.vue +23 -0
- package/packages/ui/antd/cascader/index.ts +200 -0
- package/packages/ui/antd/checkbox/index.ts +100 -0
- package/packages/ui/antd/col/col.ts +31 -0
- package/packages/ui/antd/col/index.ts +22 -0
- package/packages/ui/antd/color-picker/index.ts +108 -0
- package/packages/ui/antd/date-picker/datePicker.ts +47 -0
- package/packages/ui/antd/date-picker/index.ts +304 -0
- package/packages/ui/antd/form/form.vue +115 -0
- package/packages/ui/antd/form/index.ts +196 -0
- package/packages/ui/antd/form-item/formItem.vue +15 -0
- package/packages/ui/antd/form-item/index.ts +11 -0
- package/packages/ui/antd/index.less +33 -0
- package/packages/ui/antd/index.ts +306 -0
- package/packages/ui/antd/input/index.ts +170 -0
- package/packages/ui/antd/input-number/index.ts +182 -0
- package/packages/ui/antd/input-password/index.ts +153 -0
- package/packages/ui/antd/modal/index.ts +19 -0
- package/packages/ui/antd/modal/modal.vue +82 -0
- package/packages/ui/antd/radio/index.ts +106 -0
- package/packages/ui/antd/row/index.ts +115 -0
- package/packages/ui/antd/row/row.ts +31 -0
- package/packages/ui/antd/select/index.ts +230 -0
- package/packages/ui/antd/slider/index.ts +148 -0
- package/packages/ui/antd/switch/index.ts +142 -0
- package/packages/ui/antd/textarea/index.ts +163 -0
- package/packages/ui/antd/time-picker/index.ts +191 -0
- package/packages/ui/antd/upload-file/index.ts +89 -0
- package/packages/ui/antd/upload-file/uploadFile.ts +119 -0
- package/packages/ui/antd/upload-image/index.ts +70 -0
- package/packages/ui/antd/upload-image/uploadImage.vue +148 -0
- package/packages/ui/elementPlus/button/button.ts +24 -0
- package/packages/ui/elementPlus/button/index.ts +129 -0
- package/packages/ui/elementPlus/card/card.ts +36 -0
- package/packages/ui/elementPlus/card/index.ts +51 -0
- package/packages/ui/elementPlus/cascader/index.ts +222 -0
- package/packages/ui/elementPlus/checkbox/checkbox.ts +26 -0
- package/packages/ui/elementPlus/checkbox/index.ts +148 -0
- package/packages/ui/elementPlus/col/col.ts +31 -0
- package/packages/ui/elementPlus/col/index.ts +21 -0
- package/packages/ui/elementPlus/collapse/collapse.ts +32 -0
- package/packages/ui/elementPlus/collapse/index.ts +41 -0
- package/packages/ui/elementPlus/collapse-item/collapseItem.ts +31 -0
- package/packages/ui/elementPlus/collapse-item/index.ts +12 -0
- package/packages/ui/elementPlus/color-picker/index.ts +111 -0
- package/packages/ui/elementPlus/date-picker/index.ts +219 -0
- package/packages/ui/elementPlus/form/form.vue +110 -0
- package/packages/ui/elementPlus/form/index.ts +150 -0
- package/packages/ui/elementPlus/formItem/formItem.vue +15 -0
- package/packages/ui/elementPlus/formItem/index.ts +11 -0
- package/packages/ui/elementPlus/index.less +79 -0
- package/packages/ui/elementPlus/index.ts +91 -0
- package/packages/ui/elementPlus/input/index.ts +180 -0
- package/packages/ui/elementPlus/input-number/index.ts +146 -0
- package/packages/ui/elementPlus/modal/index.ts +18 -0
- package/packages/ui/elementPlus/modal/modal.ts +68 -0
- package/packages/ui/elementPlus/radio/index.ts +129 -0
- package/packages/ui/elementPlus/radio/radio.ts +32 -0
- package/packages/ui/elementPlus/row/index.ts +106 -0
- package/packages/ui/elementPlus/row/row.ts +32 -0
- package/packages/ui/elementPlus/select/index.ts +291 -0
- package/packages/ui/elementPlus/select/select.ts +29 -0
- package/packages/ui/elementPlus/sign/index.ts +97 -0
- package/packages/ui/elementPlus/sign/sign.vue +207 -0
- package/packages/ui/elementPlus/slider/index.ts +238 -0
- package/packages/ui/elementPlus/switch/index.ts +160 -0
- package/packages/ui/elementPlus/textarea/index.ts +155 -0
- package/packages/ui/elementPlus/upload-file/index.ts +87 -0
- package/packages/ui/elementPlus/upload-file/uploadFile.ts +114 -0
- package/packages/ui/elementPlus/upload-image/index.ts +87 -0
- package/packages/ui/elementPlus/upload-image/uploadImage.ts +150 -0
- package/packages/ui/index.ts +22 -0
- package/packages/ui/naiveUi/button/button.ts +25 -0
- package/packages/ui/naiveUi/button/index.ts +148 -0
- package/packages/ui/naiveUi/card/card.ts +32 -0
- package/packages/ui/naiveUi/card/index.ts +26 -0
- package/packages/ui/naiveUi/cascader/index.ts +222 -0
- package/packages/ui/naiveUi/checkbox/checkbox.ts +27 -0
- package/packages/ui/naiveUi/checkbox/index.ts +117 -0
- package/packages/ui/naiveUi/col/col.ts +30 -0
- package/packages/ui/naiveUi/col/index.ts +21 -0
- package/packages/ui/naiveUi/collapse/collapse.ts +31 -0
- package/packages/ui/naiveUi/collapse/index.ts +40 -0
- package/packages/ui/naiveUi/collapse-item/collapseItem.ts +31 -0
- package/packages/ui/naiveUi/collapse-item/index.ts +12 -0
- package/packages/ui/naiveUi/color-picker/index.ts +182 -0
- package/packages/ui/naiveUi/date-picker/index.ts +213 -0
- package/packages/ui/naiveUi/form/form.vue +98 -0
- package/packages/ui/naiveUi/form/index.ts +147 -0
- package/packages/ui/naiveUi/form-item/formItem.vue +15 -0
- package/packages/ui/naiveUi/form-item/index.ts +10 -0
- package/packages/ui/naiveUi/index.less +33 -0
- package/packages/ui/naiveUi/index.ts +68 -0
- package/packages/ui/naiveUi/input/index.ts +221 -0
- package/packages/ui/naiveUi/input-number/index.ts +145 -0
- package/packages/ui/naiveUi/modal/index.ts +18 -0
- package/packages/ui/naiveUi/modal/modal.ts +83 -0
- package/packages/ui/naiveUi/radio/index.ts +97 -0
- package/packages/ui/naiveUi/radio/radio.ts +27 -0
- package/packages/ui/naiveUi/row/index.ts +106 -0
- package/packages/ui/naiveUi/row/row.ts +31 -0
- package/packages/ui/naiveUi/select/index.ts +197 -0
- package/packages/ui/naiveUi/slider/index.ts +182 -0
- package/packages/ui/naiveUi/switch/index.ts +136 -0
- package/packages/ui/naiveUi/upload-file/index.ts +83 -0
- package/packages/ui/naiveUi/upload-file/uploadFile.ts +78 -0
- package/packages/ui/naiveUi/upload-image/index.ts +83 -0
- package/packages/ui/naiveUi/upload-image/uploadImage.ts +151 -0
- package/packages/ui/package.json +17 -0
- package/packages/ui/tsconfig.json +19 -0
- package/packages/utils/LICENSE +21 -0
- package/packages/utils/__test__/common/debounce.test.ts +44 -0
- package/packages/utils/__test__/common/deepClone.test.ts +42 -0
- package/packages/utils/__test__/common/deepCompareAndModify.test.ts +84 -0
- package/packages/utils/__test__/common/deepEqual.test.ts +105 -0
- package/packages/utils/__test__/common/findSchemaById.test.ts +80 -0
- package/packages/utils/__test__/common/findSchemas.test.ts +98 -0
- package/packages/utils/__test__/common/getFormSchemas.test.ts +124 -0
- package/packages/utils/__test__/common/getMatchedById.test.ts +79 -0
- package/packages/utils/__test__/common/getUUID.test.ts +30 -0
- package/packages/utils/__test__/common/getValueByPath.test.ts +54 -0
- package/packages/utils/__test__/common/mapSchemas.test.ts +98 -0
- package/packages/utils/__test__/common/setValueByPath.test.ts +69 -0
- package/packages/utils/__test__/manager/pageManager.test.ts +75 -0
- package/packages/utils/__test__/manager/revoke.test.ts +103 -0
- package/packages/utils/common/common.ts +18 -0
- package/packages/utils/common/component.ts +22 -0
- package/packages/utils/common/data.ts +662 -0
- package/packages/utils/common/eventBus.ts +4 -0
- package/packages/utils/common/index.ts +5 -0
- package/packages/utils/common/string.ts +24 -0
- package/packages/utils/index.ts +2 -0
- package/{dist/utils/manager/index.d.ts → packages/utils/manager/index.ts} +3 -3
- package/packages/utils/manager/pageManager.ts +238 -0
- package/packages/utils/manager/pluginManager.ts +633 -0
- package/packages/utils/manager/revoke.ts +124 -0
- package/packages/utils/package.json +7 -0
- package/packages/utils/tsconfig.json +19 -0
- package/pnpm-lock.yaml +14558 -0
- package/pnpm-workspace.yaml +5 -0
- package/turbo.json +20 -0
- package/vitest.config.ts +7 -0
- package/dist/_commonjsHelpers-BVfed4GL.js +0 -28
- package/dist/_commonjsHelpers-DwTZ_eVU.cjs +0 -1
- package/dist/_dayjs_commonjs-external-D9ZbEWhj.js +0 -6
- package/dist/_dayjs_commonjs-external-DWlrxCld.cjs +0 -1
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/_vue_commonjs-external-BbihI59z.cjs +0 -1
- package/dist/_vue_commonjs-external-NwvjgbHK.js +0 -6
- package/dist/attributeView-DZw_yBnS.cjs +0 -1
- package/dist/attributeView-oQIE06uw.js +0 -105
- package/dist/axios-CXDYiOMX.js +0 -1704
- package/dist/axios-tuVKNgv9.cjs +0 -6
- package/dist/az-C4lqmLYp.js +0 -22
- package/dist/az-CJXcaytS.cjs +0 -1
- package/dist/be--_CkdeMD.cjs +0 -1
- package/dist/be-DJzFjqtL.js +0 -22
- package/dist/bg-BOlG8Um1.js +0 -25
- package/dist/bg-DCT06eJE.cjs +0 -1
- package/dist/bn-bd-B1E6-oJQ.js +0 -33
- package/dist/bn-bd-DaKs5QkR.cjs +0 -1
- package/dist/button-BKT6NVeB.cjs +0 -1
- package/dist/button-BbHi0DmU.js +0 -31
- package/dist/button-Bj-ntCA2.js +0 -27
- package/dist/button-BvmCwtR3.js +0 -27
- package/dist/button-C48gWpMn.cjs +0 -1
- package/dist/button-Cc4KYk3v.cjs +0 -1
- package/dist/ca-BTQUSb29.cjs +0 -1
- package/dist/ca-DCcDFeSK.js +0 -22
- package/dist/card-BOMT_SwB.cjs +0 -1
- package/dist/card-BQ_K3Q8i.js +0 -33
- package/dist/card-BowzD9vN.cjs +0 -1
- package/dist/card-CNGNDzPp.js +0 -31
- package/dist/card-Cdove1KC.js +0 -32
- package/dist/card-hriyYYMn.cjs +0 -1
- package/dist/checkbox-CMr5pERY.cjs +0 -1
- package/dist/checkbox-D8eqzQDX.cjs +0 -1
- package/dist/checkbox-Dp36upb2.js +0 -30
- package/dist/checkbox-LVKgMSjI.js +0 -28
- package/dist/col-0rmM8on4.js +0 -33
- package/dist/col-B1GUMkMK.cjs +0 -1
- package/dist/col-B4lx76O5.cjs +0 -1
- package/dist/col-C_cbW1SI.js +0 -33
- package/dist/col-DXjfnmpf.cjs +0 -1
- package/dist/col-LQvh8U5y.js +0 -30
- package/dist/collapse-B2AXU6Jz.cjs +0 -1
- package/dist/collapse-BSFa_xwh.cjs +0 -1
- package/dist/collapse-CxLG5oyO.js +0 -32
- package/dist/collapse-I4H1VTFf.js +0 -35
- package/dist/collapseItem-CAGqWjGg.cjs +0 -1
- package/dist/collapseItem-CW_HTWvE.js +0 -33
- package/dist/collapseItem-DmnJXvsZ.js +0 -30
- package/dist/collapseItem-FF5A59WT.cjs +0 -1
- package/dist/core/components/asyncLoader/index.vue.d.ts +0 -2
- package/dist/core/components/builder/hooks/useBuilder.d.ts +0 -29
- package/dist/core/components/builder/index.d.ts +0 -2
- package/dist/core/components/builder/src/builder.vue.d.ts +0 -41
- package/dist/core/components/builder/src/types.d.ts +0 -4
- package/dist/core/components/designer/index.d.ts +0 -2
- package/dist/core/components/designer/src/designer.vue.d.ts +0 -98
- package/dist/core/components/designer/src/modules/actionBar/index.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/attributeView/attributeView.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/attributeView/styleView.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/componentView/index.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/editContainer/editNodeItem.vue.d.ts +0 -11
- package/dist/core/components/designer/src/modules/editContainer/editScreenContainer.vue.d.ts +0 -20
- package/dist/core/components/designer/src/modules/editContainer/index.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/editContainer/nodeItem.vue.d.ts +0 -9
- package/dist/core/components/designer/src/modules/editContainer/previewJson.vue.d.ts +0 -5
- package/dist/core/components/designer/src/modules/editContainer/previewWidgets.vue.d.ts +0 -5
- package/dist/core/components/designer/src/modules/editContainer/toolbar.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/header/index.vue.d.ts +0 -28
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/preview/index.vue.d.ts +0 -5
- package/dist/core/components/designer/src/modules/rightSidebar/breadcrumb.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/rightSidebar/index.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/sourceCode/index.vue.d.ts +0 -2
- package/dist/core/components/designer/src/types.d.ts +0 -46
- package/dist/core/components/icon/index.d.ts +0 -2
- package/dist/core/components/icon/src/icon.vue.d.ts +0 -10
- package/dist/core/components/node/index.d.ts +0 -2
- package/dist/core/components/node/src/dynamicFormItem.vue.d.ts +0 -30
- package/dist/core/components/node/src/node.vue.d.ts +0 -48
- package/dist/core/components/tree/index.d.ts +0 -2
- package/dist/core/components/tree/src/tree.vue.d.ts +0 -49
- package/dist/core/components/tree/src/treeNodeItem.vue.d.ts +0 -7
- package/dist/core/components/tree/src/treeNodes.vue.d.ts +0 -13
- package/dist/core/extensions/EActionEditor/index.vue.d.ts +0 -25
- package/dist/core/extensions/EActionEditor/src/EActionEditorItem.vue.d.ts +0 -50
- package/dist/core/extensions/EActionEditor/src/EActionModal.vue.d.ts +0 -13
- package/dist/core/extensions/EActionEditor/src/EArgsEditor.vue.d.ts +0 -13
- package/dist/core/extensions/EActionEditor/src/EScriptEdit.vue.d.ts +0 -2
- package/dist/core/extensions/EColEditor/index.vue.d.ts +0 -20
- package/dist/core/extensions/EDataSource/index.vue.d.ts +0 -8
- package/dist/core/extensions/EInputSize/index.vue.d.ts +0 -10
- package/dist/core/extensions/EOptionsEditor/index.vue.d.ts +0 -23
- package/dist/core/extensions/EOptionsEditor/optionItem.vue.d.ts +0 -15
- package/dist/core/extensions/ERuleEditor/ERuleItem.vue.d.ts +0 -15
- package/dist/core/extensions/ERuleEditor/data.d.ts +0 -9
- package/dist/core/extensions/ERuleEditor/index.vue.d.ts +0 -29
- package/dist/core/extensions/ERuleEditor/types.d.ts +0 -17
- package/dist/core/extensions/MonacoEditor/index.d.ts +0 -3
- package/dist/core/extensions/MonacoEditor/index.vue.d.ts +0 -45
- package/dist/core/extensions/Page/index.d.ts +0 -3
- package/dist/core/extensions/Page/index.vue.d.ts +0 -24
- package/dist/core/extensions/index.d.ts +0 -2
- package/dist/core/index.d.ts +0 -6
- package/dist/core/types/epic-designer.d.ts +0 -55
- package/dist/cs-CisRL5gQ.js +0 -53
- package/dist/cs-D_hyDJBU.cjs +0 -1
- package/dist/da-DHmiHyZA.cjs +0 -1
- package/dist/da-DhyERRsC.js +0 -22
- package/dist/datePicker-2Df6yfYg.js +0 -40
- package/dist/datePicker-DCH40VJR.cjs +0 -1
- package/dist/de-2hHpT7Ze.cjs +0 -1
- package/dist/de-CjumkRE8.js +0 -27
- package/dist/el-BCec0wpC.cjs +0 -1
- package/dist/el-DyUHskgW.js +0 -22
- package/dist/en-C1ESb179.cjs +0 -1
- package/dist/en-C2YS2Qnb.js +0 -18
- package/dist/en-gb-C8f1Enek.js +0 -23
- package/dist/en-gb-py_kegyw.cjs +0 -1
- package/dist/epic-designer/index.d.ts +0 -3
- package/dist/epic-designer/uno.config.d.ts +0 -2
- package/dist/es-BFLRglxD.cjs +0 -1
- package/dist/es-DP04S73E.js +0 -22
- package/dist/et-DKRhU9OP.cjs +0 -1
- package/dist/et-ipLqjCDG.js +0 -27
- package/dist/eventView-BQ5e-Rco.cjs +0 -1
- package/dist/eventView-BuTYx7tM.js +0 -64
- package/dist/fa-DUcAIQzU.cjs +0 -1
- package/dist/fa-DXE6u9is.js +0 -22
- package/dist/fade-in-scale-up.cssr-BXjoIAAA.js +0 -39
- package/dist/fade-in-scale-up.cssr-C_UMnGtI.cjs +0 -1
- package/dist/fi-Cpkq8dP2.js +0 -27
- package/dist/fi-CyT899pV.cjs +0 -1
- package/dist/form-6cUK-Ari.js +0 -72
- package/dist/form-BPH0cDFl.js +0 -75
- package/dist/form-ChuxpD-f.cjs +0 -1
- package/dist/form-Cr7tBgLQ.js +0 -66
- package/dist/form-CthzLIgs.cjs +0 -1
- package/dist/form-D2qj0Dvr.cjs +0 -1
- package/dist/formItem-0oXWwtrG.cjs +0 -1
- package/dist/formItem-BVnNs1Q9.cjs +0 -1
- package/dist/formItem-D10Om12T.js +0 -22
- package/dist/formItem-DPnbV4m-.js +0 -22
- package/dist/formItem-Do31LPIz.cjs +0 -1
- package/dist/formItem-cj8JQT2r.js +0 -22
- package/dist/fr-D1kezmpm.cjs +0 -1
- package/dist/fr-DoLP2lvG.js +0 -22
- package/dist/fr-ca-D872_l2Z.cjs +0 -1
- package/dist/fr-ca-EPfCD7sc.js +0 -22
- package/dist/ga-B7Rd2JIZ.cjs +0 -1
- package/dist/ga-BcnAx7jm.js +0 -22
- package/dist/gl-CBMDu4db.js +0 -22
- package/dist/gl-DI-aVaAh.cjs +0 -1
- package/dist/he-O14-JKYm.cjs +0 -1
- package/dist/he-VbXQT3dj.js +0 -26
- package/dist/hi-BSHDLwY4.cjs +0 -1
- package/dist/hi-nXeMgLvO.js +0 -22
- package/dist/hooks/common/element.d.ts +0 -42
- package/dist/hooks/common/index.d.ts +0 -2
- package/dist/hooks/common/theme.d.ts +0 -12
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/store/index.d.ts +0 -12
- package/dist/hr-BuVBNZ4z.cjs +0 -1
- package/dist/hr-C3DFfYc9.js +0 -26
- package/dist/hu-Bs3B-9e3.js +0 -44
- package/dist/hu-CXrkHTYq.cjs +0 -1
- package/dist/hy-am-BLnv1pCz.cjs +0 -1
- package/dist/hy-am-CvHDFapi.js +0 -22
- package/dist/icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js +0 -25
- package/dist/icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs +0 -1
- package/dist/id-CO78nlWo.js +0 -22
- package/dist/id-DG0GoH6p.cjs +0 -1
- package/dist/index-3fW_aWMH.js +0 -1357
- package/dist/index-4PPmJYKt.cjs +0 -51
- package/dist/index-8hE8gNZo.cjs +0 -1
- package/dist/index-B6BQyTQZ.js +0 -104
- package/dist/index-B72l3XQl.js +0 -453
- package/dist/index-B8lWNEk-.cjs +0 -1
- package/dist/index-BB9rZNCd.cjs +0 -181
- package/dist/index-BCk0LJsg.cjs +0 -347
- package/dist/index-BVLGR2QA.cjs +0 -1
- package/dist/index-BVUz9lFN.cjs +0 -325
- package/dist/index-BZf3IisW.cjs +0 -1
- package/dist/index-BccuJTEJ.cjs +0 -1
- package/dist/index-Bhu7a5V1.cjs +0 -10
- package/dist/index-Bj0HJWQW.cjs +0 -1
- package/dist/index-Bo1Sw1k6.js +0 -1509
- package/dist/index-BqD_ySXV.cjs +0 -1
- package/dist/index-BsXm6fLD.js +0 -1493
- package/dist/index-Bu0xFQA6.js +0 -204
- package/dist/index-C78D4bvx.js +0 -682
- package/dist/index-CCeXsiaV.js +0 -581
- package/dist/index-CEPcVhC6.cjs +0 -1
- package/dist/index-CNOUPCih.js +0 -698
- package/dist/index-COyKmK8p.js +0 -1160
- package/dist/index-CR_tJiJv.js +0 -653
- package/dist/index-CUE1ALKr.js +0 -432
- package/dist/index-CWE_REOU.cjs +0 -1
- package/dist/index-Cap7FkuS.cjs +0 -1
- package/dist/index-CgZH_WDO.js +0 -270
- package/dist/index-Ch9jeYmj.cjs +0 -1
- package/dist/index-CjcjqKkB.js +0 -571
- package/dist/index-Cphndmia.cjs +0 -214
- package/dist/index-CsBTnVvp.js +0 -83
- package/dist/index-CuxnFxdY.cjs +0 -1
- package/dist/index-D14r6xyt.cjs +0 -1
- package/dist/index-D1ZL6feZ.js +0 -50484
- package/dist/index-D1f110me.js +0 -71
- package/dist/index-D5WpEOUO.cjs +0 -351
- package/dist/index-DBQ-tc2k.cjs +0 -1
- package/dist/index-DMszow96.cjs +0 -110
- package/dist/index-DQ9Vb0QH.js +0 -759
- package/dist/index-DTzB2pWI.cjs +0 -159
- package/dist/index-DWCSzZfR.cjs +0 -80
- package/dist/index-DWjMyXtP.cjs +0 -1
- package/dist/index-DaRhLTx9.js +0 -1876
- package/dist/index-DcPL6st2.cjs +0 -1
- package/dist/index-DgcFxYFp.js +0 -14
- package/dist/index-DiDIFoTk.js +0 -18
- package/dist/index-DyWFUxn5.js +0 -11674
- package/dist/index-HM72iSCq.js +0 -64
- package/dist/index-Hdc_C4Xg.js +0 -389
- package/dist/index-HkPkpZp-.js +0 -88
- package/dist/index-LpGkgW2u.js +0 -41
- package/dist/index-M-hTLR0c.js +0 -44
- package/dist/index-RdEhd65J.cjs +0 -65
- package/dist/index-XU85x6vz.cjs +0 -9
- package/dist/index-g5ZjtbqH.cjs +0 -102
- package/dist/index-gA02bxwJ.js +0 -5947
- package/dist/index-jx5A2kt8.cjs +0 -850
- package/dist/index-kDCMxtRw.js +0 -4
- package/dist/index-tSmvj7CR.js +0 -1742
- package/dist/index-uaq_HmHi.js +0 -87
- package/dist/index-zYoSB4fa.cjs +0 -9
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -40
- package/dist/is-Bip0ggci.js +0 -30
- package/dist/is-C40R_fdL.cjs +0 -1
- package/dist/it-BFF7WzRR.js +0 -22
- package/dist/it-D7K-0U_k.cjs +0 -1
- package/dist/ja-4CWMghxy.js +0 -24
- package/dist/ja-CAXCMb11.cjs +0 -1
- package/dist/ka-DrA_EMLP.js +0 -22
- package/dist/ka-JF7_8awE.cjs +0 -1
- package/dist/kk-Bv8yYeRk.cjs +0 -1
- package/dist/kk-QVPqpI2b.js +0 -22
- package/dist/km-BmycjYfj.cjs +0 -1
- package/dist/km-CBMnSWv_.js +0 -22
- package/dist/kn-CFiXt5hu.cjs +0 -1
- package/dist/kn-TECqDIit.js +0 -22
- package/dist/ko-DlQtUQ6r.cjs +0 -1
- package/dist/ko-MjoD8l4E.js +0 -24
- package/dist/ku-5MauiT2q.cjs +0 -1
- package/dist/ku-BfqBpklm.js +0 -32
- package/dist/lt-CkWoaAYB.cjs +0 -1
- package/dist/lt-D0cq_0yM.js +0 -26
- package/dist/lv-CVdYvxq8.js +0 -22
- package/dist/lv-CoTNe47-.cjs +0 -1
- package/dist/mk-DDuk7A3P.js +0 -22
- package/dist/mk-DVN6iYK_.cjs +0 -1
- package/dist/ml-CPI3tJe8.js +0 -22
- package/dist/ml-DnXJOqZ0.cjs +0 -1
- package/dist/mn-CNbMEx0y.js +0 -22
- package/dist/mn-DMIrWGkN.cjs +0 -1
- package/dist/modal-3Iw7tqyx.js +0 -85
- package/dist/modal-BPJM1Muh.js +0 -59
- package/dist/modal-BYw2WLwG.cjs +0 -1
- package/dist/modal-D4cRUUVN.js +0 -74
- package/dist/modal-DZRJyZfk.cjs +0 -1
- package/dist/modal-_fid8E1T.cjs +0 -1
- package/dist/ms-my-BcgYEtml.js +0 -22
- package/dist/ms-my-BoMZ8Hzl.cjs +0 -1
- package/dist/nb-BL5QmNEa.js +0 -22
- package/dist/nb-BdFW_T0n.cjs +0 -1
- package/dist/ne-9klrwaIE.js +0 -24
- package/dist/ne-VNPqdWFn.cjs +0 -1
- package/dist/nl-DBFNL8wC.cjs +0 -1
- package/dist/nl-DxyA21TA.js +0 -22
- package/dist/nl-be-Bo6vnbHY.cjs +0 -1
- package/dist/nl-be-Di_N4z2D.js +0 -22
- package/dist/outline-UAdT8ap6.cjs +0 -1
- package/dist/outline-utbOTCBV.js +0 -54
- package/dist/pl-BbDu9Cfd.js +0 -47
- package/dist/pl-De2Dm_kD.cjs +0 -1
- package/dist/pluginManager-D8PM7ICc.js +0 -383
- package/dist/pluginManager-itCTrGag.cjs +0 -1
- package/dist/pt-BaTZB0XW.cjs +0 -1
- package/dist/pt-CKDbEzZ-.js +0 -22
- package/dist/pt-br-B_N58uu_.cjs +0 -1
- package/dist/pt-br-C1mqj5qX.js +0 -22
- package/dist/radio-ChBAvqeY.js +0 -32
- package/dist/radio-D3AHEMXb.cjs +0 -1
- package/dist/radio-DAOm4xuJ.js +0 -30
- package/dist/radio-J90E17Sb.cjs +0 -1
- package/dist/ro-Cnuhxb40.cjs +0 -1
- package/dist/ro-V1i-UrkP.js +0 -22
- package/dist/row-B28N4Nao.cjs +0 -1
- package/dist/row-BC69rVQW.js +0 -32
- package/dist/row-BX4lrSir.js +0 -33
- package/dist/row-BpXp0tC3.cjs +0 -1
- package/dist/row-CkyJ9pQh.js +0 -35
- package/dist/row-NNlPGZRG.cjs +0 -1
- package/dist/ru-CCbLARi0.js +0 -37
- package/dist/ru-_du5Xwu3.cjs +0 -1
- package/dist/script/src/check-compiled.d.ts +0 -1
- package/dist/select-B8HCbraJ.js +0 -29
- package/dist/select-D6bRz5G2.cjs +0 -1
- package/dist/sign-CdhDIjlg.js +0 -138
- package/dist/sign-Dx0d5kWo.cjs +0 -1
- package/dist/sk-DD18bemk.js +0 -53
- package/dist/sk-DRjgEzVO.cjs +0 -1
- package/dist/sl-CL8MnX8D.js +0 -56
- package/dist/sl-nqW7xzZa.cjs +0 -1
- package/dist/sr-BiP5qrT7.js +0 -29
- package/dist/sr-BnjILg54.cjs +0 -1
- package/dist/style.css +0 -1
- package/dist/styleView-BrdzlBZA.cjs +0 -1
- package/dist/styleView-CeqIxdNC.js +0 -105
- package/dist/sv-6b7oq_fA.cjs +0 -1
- package/dist/sv-DxlAeqP5.js +0 -23
- package/dist/ta-CsfYqZQU.js +0 -22
- package/dist/ta-HTr6IFsZ.cjs +0 -1
- package/dist/th-C-CGWPlT.cjs +0 -1
- package/dist/th-CC5sx7mS.js +0 -22
- package/dist/tr-CCMwF27-.js +0 -22
- package/dist/tr-z7Blusoy.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BVopU0uv.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-Bnl1CGxG.js +0 -242
- package/dist/ui/antd/button/button.vue.d.ts +0 -30
- package/dist/ui/antd/button/index.d.ts +0 -3
- package/dist/ui/antd/card/card.d.ts +0 -20
- package/dist/ui/antd/card/index.d.ts +0 -3
- package/dist/ui/antd/cascader/index.d.ts +0 -3
- package/dist/ui/antd/checkbox/index.d.ts +0 -3
- package/dist/ui/antd/col/col.d.ts +0 -20
- package/dist/ui/antd/col/index.d.ts +0 -3
- package/dist/ui/antd/color-picker/index.d.ts +0 -3
- package/dist/ui/antd/date-picker/datePicker.d.ts +0 -29
- package/dist/ui/antd/date-picker/index.d.ts +0 -3
- package/dist/ui/antd/form/form.vue.d.ts +0 -64
- package/dist/ui/antd/form/index.d.ts +0 -3
- package/dist/ui/antd/form-item/formItem.vue.d.ts +0 -18
- package/dist/ui/antd/form-item/index.d.ts +0 -3
- package/dist/ui/antd/index.cjs +0 -10
- package/dist/ui/antd/index.d.ts +0 -7
- package/dist/ui/antd/index.js +0 -3117
- package/dist/ui/antd/input/index.d.ts +0 -3
- package/dist/ui/antd/input-number/index.d.ts +0 -3
- package/dist/ui/antd/input-password/index.d.ts +0 -3
- package/dist/ui/antd/modal/index.d.ts +0 -3
- package/dist/ui/antd/modal/modal.vue.d.ts +0 -42
- package/dist/ui/antd/radio/index.d.ts +0 -3
- package/dist/ui/antd/row/index.d.ts +0 -3
- package/dist/ui/antd/row/row.d.ts +0 -20
- package/dist/ui/antd/select/index.d.ts +0 -3
- package/dist/ui/antd/slider/index.d.ts +0 -3
- package/dist/ui/antd/switch/index.d.ts +0 -3
- package/dist/ui/antd/textarea/index.d.ts +0 -3
- package/dist/ui/antd/time-picker/index.d.ts +0 -3
- package/dist/ui/antd/upload-file/index.d.ts +0 -3
- package/dist/ui/antd/upload-file/uploadFile.d.ts +0 -21
- package/dist/ui/antd/upload-image/index.d.ts +0 -3
- package/dist/ui/antd/upload-image/uploadImage.vue.d.ts +0 -28
- package/dist/ui/elementPlus/button/button.d.ts +0 -18
- package/dist/ui/elementPlus/button/index.d.ts +0 -3
- package/dist/ui/elementPlus/card/card.d.ts +0 -20
- package/dist/ui/elementPlus/card/index.d.ts +0 -3
- package/dist/ui/elementPlus/cascader/index.d.ts +0 -3
- package/dist/ui/elementPlus/checkbox/checkbox.d.ts +0 -6
- package/dist/ui/elementPlus/checkbox/index.d.ts +0 -3
- package/dist/ui/elementPlus/col/col.d.ts +0 -20
- package/dist/ui/elementPlus/col/index.d.ts +0 -3
- package/dist/ui/elementPlus/collapse/collapse.d.ts +0 -20
- package/dist/ui/elementPlus/collapse/index.d.ts +0 -3
- package/dist/ui/elementPlus/collapse-item/collapseItem.d.ts +0 -20
- package/dist/ui/elementPlus/collapse-item/index.d.ts +0 -3
- package/dist/ui/elementPlus/color-picker/index.d.ts +0 -3
- package/dist/ui/elementPlus/date-picker/index.d.ts +0 -3
- package/dist/ui/elementPlus/form/form.vue.d.ts +0 -62
- package/dist/ui/elementPlus/form/index.d.ts +0 -3
- package/dist/ui/elementPlus/formItem/formItem.vue.d.ts +0 -18
- package/dist/ui/elementPlus/formItem/index.d.ts +0 -3
- package/dist/ui/elementPlus/index.cjs +0 -1
- package/dist/ui/elementPlus/index.d.ts +0 -6
- package/dist/ui/elementPlus/index.js +0 -2721
- package/dist/ui/elementPlus/input/index.d.ts +0 -3
- package/dist/ui/elementPlus/input-number/index.d.ts +0 -3
- package/dist/ui/elementPlus/modal/index.d.ts +0 -3
- package/dist/ui/elementPlus/modal/modal.d.ts +0 -22
- package/dist/ui/elementPlus/radio/index.d.ts +0 -3
- package/dist/ui/elementPlus/radio/radio.d.ts +0 -6
- package/dist/ui/elementPlus/row/index.d.ts +0 -3
- package/dist/ui/elementPlus/row/row.d.ts +0 -20
- package/dist/ui/elementPlus/select/index.d.ts +0 -3
- package/dist/ui/elementPlus/select/select.d.ts +0 -6
- package/dist/ui/elementPlus/sign/index.d.ts +0 -3
- package/dist/ui/elementPlus/slider/index.d.ts +0 -3
- package/dist/ui/elementPlus/switch/index.d.ts +0 -3
- package/dist/ui/elementPlus/textarea/index.d.ts +0 -3
- package/dist/ui/elementPlus/upload-file/index.d.ts +0 -3
- package/dist/ui/elementPlus/upload-file/uploadFile.d.ts +0 -20
- package/dist/ui/elementPlus/upload-image/index.d.ts +0 -3
- package/dist/ui/elementPlus/upload-image/uploadImage.d.ts +0 -20
- package/dist/ui/index.d.ts +0 -3
- package/dist/ui/naiveUi/button/button.d.ts +0 -18
- package/dist/ui/naiveUi/button/index.d.ts +0 -3
- package/dist/ui/naiveUi/card/card.d.ts +0 -20
- package/dist/ui/naiveUi/card/index.d.ts +0 -3
- package/dist/ui/naiveUi/cascader/index.d.ts +0 -3
- package/dist/ui/naiveUi/checkbox/checkbox.d.ts +0 -6
- package/dist/ui/naiveUi/checkbox/index.d.ts +0 -3
- package/dist/ui/naiveUi/col/col.d.ts +0 -20
- package/dist/ui/naiveUi/col/index.d.ts +0 -3
- package/dist/ui/naiveUi/collapse/collapse.d.ts +0 -20
- package/dist/ui/naiveUi/collapse/index.d.ts +0 -3
- package/dist/ui/naiveUi/collapse-item/collapseItem.d.ts +0 -20
- package/dist/ui/naiveUi/collapse-item/index.d.ts +0 -3
- package/dist/ui/naiveUi/color-picker/index.d.ts +0 -3
- package/dist/ui/naiveUi/date-picker/index.d.ts +0 -3
- package/dist/ui/naiveUi/form/index.d.ts +0 -3
- package/dist/ui/naiveUi/form-item/formItem.vue.d.ts +0 -18
- package/dist/ui/naiveUi/form-item/index.d.ts +0 -3
- package/dist/ui/naiveUi/index.cjs +0 -1
- package/dist/ui/naiveUi/index.d.ts +0 -2
- package/dist/ui/naiveUi/index.js +0 -2349
- package/dist/ui/naiveUi/input/index.d.ts +0 -3
- package/dist/ui/naiveUi/input-number/index.d.ts +0 -3
- package/dist/ui/naiveUi/modal/index.d.ts +0 -3
- package/dist/ui/naiveUi/modal/modal.d.ts +0 -22
- package/dist/ui/naiveUi/radio/index.d.ts +0 -3
- package/dist/ui/naiveUi/radio/radio.d.ts +0 -6
- package/dist/ui/naiveUi/row/index.d.ts +0 -3
- package/dist/ui/naiveUi/row/row.d.ts +0 -20
- package/dist/ui/naiveUi/select/index.d.ts +0 -3
- package/dist/ui/naiveUi/slider/index.d.ts +0 -3
- package/dist/ui/naiveUi/switch/index.d.ts +0 -3
- package/dist/ui/naiveUi/upload-file/index.d.ts +0 -3
- package/dist/ui/naiveUi/upload-file/uploadFile.d.ts +0 -20
- package/dist/ui/naiveUi/upload-image/index.d.ts +0 -3
- package/dist/ui/naiveUi/upload-image/uploadImage.d.ts +0 -20
- package/dist/uk-Ba9IHfoi.js +0 -31
- package/dist/uk-Cc6k-QUE.cjs +0 -1
- package/dist/uploadFile-BU5cBhab.js +0 -67
- package/dist/uploadFile-C3HY1r-N.js +0 -78
- package/dist/uploadFile-COrVkbrU.js +0 -70
- package/dist/uploadFile-Dv3Rsw56.cjs +0 -1
- package/dist/uploadFile-LCUznBf2.cjs +0 -1
- package/dist/uploadFile-z7Ko58XG.cjs +0 -1
- package/dist/uploadImage-BQhv5ymq.cjs +0 -1
- package/dist/uploadImage-CYV7X1sG.js +0 -88
- package/dist/uploadImage-CnNnAISs.js +0 -84
- package/dist/uploadImage-Db_66X3C.js +0 -93
- package/dist/uploadImage-nwjqcVFU.cjs +0 -1
- package/dist/uploadImage-xU0He_aO.cjs +0 -1
- package/dist/ur-C0tmW1hr.js +0 -22
- package/dist/ur-CPEUOWqh.cjs +0 -1
- package/dist/utils/__test__/common/debounce.test.d.ts +0 -1
- package/dist/utils/__test__/common/deepClone.test.d.ts +0 -1
- package/dist/utils/__test__/common/deepCompareAndModify.test.d.ts +0 -1
- package/dist/utils/__test__/common/deepEqual.test.d.ts +0 -1
- package/dist/utils/__test__/common/findSchemaById.test.d.ts +0 -1
- package/dist/utils/__test__/common/findSchemas.test.d.ts +0 -1
- package/dist/utils/__test__/common/getFormSchemas.test.d.ts +0 -1
- package/dist/utils/__test__/common/getMatchedById.test.d.ts +0 -1
- package/dist/utils/__test__/common/getUUID.test.d.ts +0 -1
- package/dist/utils/__test__/common/getValueByPath.test.d.ts +0 -1
- package/dist/utils/__test__/common/mapSchemas.test.d.ts +0 -1
- package/dist/utils/__test__/common/setValueByPath.test.d.ts +0 -1
- package/dist/utils/__test__/manager/pageManager.test.d.ts +0 -1
- package/dist/utils/__test__/manager/revoke.test.d.ts +0 -1
- package/dist/utils/common/common.d.ts +0 -7
- package/dist/utils/common/component.d.ts +0 -7
- package/dist/utils/common/data.d.ts +0 -119
- package/dist/utils/common/eventBus.d.ts +0 -2
- package/dist/utils/common/index.d.ts +0 -5
- package/dist/utils/common/string.d.ts +0 -11
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/manager/pageManager.d.ts +0 -26
- package/dist/utils/manager/pluginManager.d.ts +0 -379
- package/dist/utils/manager/revoke.d.ts +0 -40
- package/dist/utils-BM69FtWE.js +0 -66
- package/dist/utils-zEcOzoWV.cjs +0 -1
- package/dist/vi-Dyfq5Qgz.cjs +0 -1
- package/dist/vi-j1PGHz1o.js +0 -22
- package/dist/vuedraggable.umd-BqhSJIAi.cjs +0 -10
- package/dist/vuedraggable.umd-D2S7Eo7p.js +0 -4425
- package/dist/zh-cn-BKQHxHe9.cjs +0 -1
- package/dist/zh-cn-BYui8_WB.js +0 -25
- package/dist/zh-hk-QZ4a6JLR.js +0 -25
- package/dist/zh-hk-hNFRxlrX.cjs +0 -1
- package/dist/zh-tw-BT16WIrT.js +0 -25
- package/dist/zh-tw-SGOlw9Wo.cjs +0 -1
- /package/{dist → packages/core}/theme/var.less +0 -0
- /package/{shims-vue.d.ts → packages/epic-designer/shims-vue.d.ts} +0 -0
- /package/{tsconfig.json → packages/epic-designer/tsconfig.json} +0 -0
package/dist/index-BVLGR2QA.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Bhu7a5V1.cjs");exports.default=e._sfc_main;
|
package/dist/index-BVUz9lFN.cjs
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("./_commonjsHelpers-DwTZ_eVU.cjs"),se=require("./_vue_commonjs-external-BbihI59z.cjs"),S=require("./index-4PPmJYKt.cjs"),Ne=require("./index-jx5A2kt8.cjs");function zo(t,s){for(var v=0;v<s.length;v++){const h=s[v];if(typeof h!="string"&&!Array.isArray(h)){for(const p in h)if(p!=="default"&&!(p in t)){const r=Object.getOwnPropertyDescriptor(h,p);r&&Object.defineProperty(t,p,r.get?r:{enumerable:!0,get:()=>h[p]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Fe={},Ue={},je={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isFirefox=t.isChrome=void 0;const s=S.isBrowser;t.isChrome=s.isBrowser&&"chrome"in window,t.isFirefox=s.isBrowser&&navigator.userAgent.includes("Firefox"),t.isSafari=s.isBrowser&&navigator.userAgent.includes("Safari")&&!t.isChrome})(je);var ye={},De={},we={};Object.defineProperty(we,"__esModule",{value:!0});we.default={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};var Mo=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(De,"__esModule",{value:!0});const ee=S.require$$1,Ro=S.common,Fo=Mo(we),jo={name:"Input",common:Ro.commonDark,self(t){const{textColor2:s,textColor3:v,textColorDisabled:h,primaryColor:p,primaryColorHover:r,inputColor:x,inputColorDisabled:u,warningColor:b,warningColorHover:C,errorColor:B,errorColorHover:D,borderRadius:I,lineHeight:z,fontSizeTiny:F,fontSizeSmall:f,fontSizeMedium:H,fontSizeLarge:N,heightTiny:W,heightSmall:V,heightMedium:k,heightLarge:n,clearColor:g,clearColorHover:l,clearColorPressed:j,placeholderColor:T,placeholderColorDisabled:A,iconColor:M,iconColorDisabled:E,iconColorHover:w,iconColorPressed:c}=t;return Object.assign(Object.assign({},Fo.default),{countTextColorDisabled:h,countTextColor:v,heightTiny:W,heightSmall:V,heightMedium:k,heightLarge:n,fontSizeTiny:F,fontSizeSmall:f,fontSizeMedium:H,fontSizeLarge:N,lineHeight:z,lineHeightTextarea:z,borderRadius:I,iconSize:"16px",groupLabelColor:x,textColor:s,textColorDisabled:h,textDecorationColor:s,groupLabelTextColor:s,caretColor:p,placeholderColor:T,placeholderColorDisabled:A,color:x,colorDisabled:u,colorFocus:(0,ee.changeColor)(p,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${r}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${r}`,boxShadowFocus:`0 0 8px 0 ${(0,ee.changeColor)(p,{alpha:.3})}`,loadingColor:p,loadingColorWarning:b,borderWarning:`1px solid ${b}`,borderHoverWarning:`1px solid ${C}`,colorFocusWarning:(0,ee.changeColor)(b,{alpha:.1}),borderFocusWarning:`1px solid ${C}`,boxShadowFocusWarning:`0 0 8px 0 ${(0,ee.changeColor)(b,{alpha:.3})}`,caretColorWarning:b,loadingColorError:B,borderError:`1px solid ${B}`,borderHoverError:`1px solid ${D}`,colorFocusError:(0,ee.changeColor)(B,{alpha:.1}),borderFocusError:`1px solid ${D}`,boxShadowFocusError:`0 0 8px 0 ${(0,ee.changeColor)(B,{alpha:.3})}`,caretColorError:B,clearColor:g,clearColorHover:l,clearColorPressed:j,iconColor:M,iconColorDisabled:E,iconColorHover:w,iconColorPressed:c,suffixTextColor:s})}};De.default=jo;var Ie={},Do=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});const Re=S.require$$1,Io=S.common,To=Do(we);function Ao(t){const{textColor2:s,textColor3:v,textColorDisabled:h,primaryColor:p,primaryColorHover:r,inputColor:x,inputColorDisabled:u,borderColor:b,warningColor:C,warningColorHover:B,errorColor:D,errorColorHover:I,borderRadius:z,lineHeight:F,fontSizeTiny:f,fontSizeSmall:H,fontSizeMedium:N,fontSizeLarge:W,heightTiny:V,heightSmall:k,heightMedium:n,heightLarge:g,actionColor:l,clearColor:j,clearColorHover:T,clearColorPressed:A,placeholderColor:M,placeholderColorDisabled:E,iconColor:w,iconColorDisabled:c,iconColorHover:d,iconColorPressed:R}=t;return Object.assign(Object.assign({},To.default),{countTextColorDisabled:h,countTextColor:v,heightTiny:V,heightSmall:k,heightMedium:n,heightLarge:g,fontSizeTiny:f,fontSizeSmall:H,fontSizeMedium:N,fontSizeLarge:W,lineHeight:F,lineHeightTextarea:F,borderRadius:z,iconSize:"16px",groupLabelColor:l,groupLabelTextColor:s,textColor:s,textColorDisabled:h,textDecorationColor:s,caretColor:p,placeholderColor:M,placeholderColorDisabled:E,color:x,colorDisabled:u,colorFocus:x,groupLabelBorder:`1px solid ${b}`,border:`1px solid ${b}`,borderHover:`1px solid ${r}`,borderDisabled:`1px solid ${b}`,borderFocus:`1px solid ${r}`,boxShadowFocus:`0 0 0 2px ${(0,Re.changeColor)(p,{alpha:.2})}`,loadingColor:p,loadingColorWarning:C,borderWarning:`1px solid ${C}`,borderHoverWarning:`1px solid ${B}`,colorFocusWarning:x,borderFocusWarning:`1px solid ${B}`,boxShadowFocusWarning:`0 0 0 2px ${(0,Re.changeColor)(C,{alpha:.2})}`,caretColorWarning:C,loadingColorError:D,borderError:`1px solid ${D}`,borderHoverError:`1px solid ${I}`,colorFocusError:x,borderFocusError:`1px solid ${I}`,boxShadowFocusError:`0 0 0 2px ${(0,Re.changeColor)(D,{alpha:.2})}`,caretColorError:D,clearColor:j,clearColorHover:T,clearColorPressed:A,iconColor:w,iconColorDisabled:c,iconColorHover:d,iconColorPressed:R,suffixTextColor:s})}const Oo={name:"Input",common:Io.commonLight,self:Ao};Ie.default=Oo;var ue={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});const Y=S.cssr;Te.default=(0,Y.cB)("input",[(0,Y.cM)("rtl",`
|
|
2
|
-
direction: rtl;
|
|
3
|
-
`,[(0,Y.cE)("prefix",{marginRight:0,marginLeft:"4px"}),(0,Y.cE)("suffix",{marginRight:"4px",marginLeft:0}),(0,Y.cM)("textarea","width: 100%;",[(0,Y.cB)("input-word-count",`
|
|
4
|
-
left: var(--n-padding-right);
|
|
5
|
-
right: unset;
|
|
6
|
-
`)]),(0,Y.cB)("input-word-count",`
|
|
7
|
-
margin-left: 0;
|
|
8
|
-
margin-right: 4px;
|
|
9
|
-
`)])]);var Wo=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ue,"__esModule",{value:!0});ue.inputRtl=void 0;const Go=Wo(Te);ue.inputRtl={name:"Input",style:Go.default};(function(t){var s=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(t,"__esModule",{value:!0}),t.inputRtl=t.inputLight=t.inputDark=void 0;var v=De;Object.defineProperty(t,"inputDark",{enumerable:!0,get:function(){return s(v).default}});var h=Ie;Object.defineProperty(t,"inputLight",{enumerable:!0,get:function(){return s(h).default}});var p=ue;Object.defineProperty(t,"inputRtl",{enumerable:!0,get:function(){return p.inputRtl}})})(ye);var ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.inputInjectionKey=void 0;const Vo=S._utils;ce.inputInjectionKey=(0,Vo.createInjectionKey)("n-input");var re={};Object.defineProperty(re,"__esModule",{value:!0});re.len=ko;re.isEmptyInputValue=Lo;re.useCursor=Ho;const Ke=se.require$$0;function ko(t){let s=0;for(const v of t)s++;return s}function Lo(t){return t===""||t==null}function Ho(t){const s=(0,Ke.ref)(null);function v(){const{value:r}=t;if(!(r!=null&&r.focus)){p();return}const{selectionStart:x,selectionEnd:u,value:b}=r;if(x==null||u==null){p();return}s.value={start:x,end:u,beforeText:b.slice(0,x),afterText:b.slice(u)}}function h(){var r;const{value:x}=s,{value:u}=t;if(!x||!u)return;const{value:b}=u,{start:C,beforeText:B,afterText:D}=x;let I=b.length;if(b.endsWith(D))I=b.length-D.length;else if(b.startsWith(B))I=B.length;else{const z=B[C-1],F=b.indexOf(z,C-1);F!==-1&&(I=F+1)}(r=u.setSelectionRange)===null||r===void 0||r.call(u,I,I)}function p(){s.value=null}return(0,Ke.watch)(t,p),{recordCursor:v,restoreCursor:h}}var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0});const _e=se.require$$0,No=S._utils,Ko=ce,qo=re;Ae.default=(0,_e.defineComponent)({name:"InputWordCount",setup(t,{slots:s}){const{mergedValueRef:v,maxlengthRef:h,mergedClsPrefixRef:p,countGraphemesRef:r}=(0,_e.inject)(Ko.inputInjectionKey),x=(0,_e.computed)(()=>{const{value:u}=v;return u===null||Array.isArray(u)?0:(r.value||qo.len)(u)});return()=>{const{value:u}=h,{value:b}=v;return(0,_e.h)("span",{class:`${p.value}-input-word-count`},(0,No.resolveSlotWithProps)(s.default,{value:b===null||Array.isArray(b)?"":b},()=>[u===void 0?x.value:`${x.value} / ${u}`]))}}});var de={};Object.defineProperty(de,"__esModule",{value:!0});de.safariStyle=void 0;const i=S.cssr;de.default=(0,i.cB)("input",`
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
cursor: text;
|
|
12
|
-
line-height: 1.5;
|
|
13
|
-
z-index: auto;
|
|
14
|
-
outline: none;
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
position: relative;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
border-radius: var(--n-border-radius);
|
|
19
|
-
background-color: var(--n-color);
|
|
20
|
-
transition: background-color .3s var(--n-bezier);
|
|
21
|
-
font-size: var(--n-font-size);
|
|
22
|
-
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
23
|
-
`,[(0,i.cE)("input, textarea",`
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
flex-grow: 1;
|
|
26
|
-
position: relative;
|
|
27
|
-
`),(0,i.cE)("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
font-size: inherit;
|
|
30
|
-
line-height: 1.5;
|
|
31
|
-
font-family: inherit;
|
|
32
|
-
border: none;
|
|
33
|
-
outline: none;
|
|
34
|
-
background-color: #0000;
|
|
35
|
-
text-align: inherit;
|
|
36
|
-
transition:
|
|
37
|
-
-webkit-text-fill-color .3s var(--n-bezier),
|
|
38
|
-
caret-color .3s var(--n-bezier),
|
|
39
|
-
color .3s var(--n-bezier),
|
|
40
|
-
text-decoration-color .3s var(--n-bezier);
|
|
41
|
-
`),(0,i.cE)("input-el, textarea-el",`
|
|
42
|
-
-webkit-appearance: none;
|
|
43
|
-
scrollbar-width: none;
|
|
44
|
-
width: 100%;
|
|
45
|
-
min-width: 0;
|
|
46
|
-
text-decoration-color: var(--n-text-decoration-color);
|
|
47
|
-
color: var(--n-text-color);
|
|
48
|
-
caret-color: var(--n-caret-color);
|
|
49
|
-
background-color: transparent;
|
|
50
|
-
`,[(0,i.c)("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
|
|
51
|
-
width: 0;
|
|
52
|
-
height: 0;
|
|
53
|
-
display: none;
|
|
54
|
-
`),(0,i.c)("&::placeholder",`
|
|
55
|
-
color: #0000;
|
|
56
|
-
-webkit-text-fill-color: transparent !important;
|
|
57
|
-
`),(0,i.c)("&:-webkit-autofill ~",[(0,i.cE)("placeholder","display: none;")])]),(0,i.cM)("round",[(0,i.cNotM)("textarea","border-radius: calc(var(--n-height) / 2);")]),(0,i.cE)("placeholder",`
|
|
58
|
-
pointer-events: none;
|
|
59
|
-
position: absolute;
|
|
60
|
-
left: 0;
|
|
61
|
-
right: 0;
|
|
62
|
-
top: 0;
|
|
63
|
-
bottom: 0;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
color: var(--n-placeholder-color);
|
|
66
|
-
`,[(0,i.c)("span",`
|
|
67
|
-
width: 100%;
|
|
68
|
-
display: inline-block;
|
|
69
|
-
`)]),(0,i.cM)("textarea",[(0,i.cE)("placeholder","overflow: visible;")]),(0,i.cNotM)("autosize","width: 100%;"),(0,i.cM)("autosize",[(0,i.cE)("textarea-el, input-el",`
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
height: 100%;
|
|
74
|
-
`)]),(0,i.cB)("input-wrapper",`
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
display: inline-flex;
|
|
77
|
-
flex-grow: 1;
|
|
78
|
-
position: relative;
|
|
79
|
-
padding-left: var(--n-padding-left);
|
|
80
|
-
padding-right: var(--n-padding-right);
|
|
81
|
-
`),(0,i.cE)("input-mirror",`
|
|
82
|
-
padding: 0;
|
|
83
|
-
height: var(--n-height);
|
|
84
|
-
line-height: var(--n-height);
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
visibility: hidden;
|
|
87
|
-
position: static;
|
|
88
|
-
white-space: pre;
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
`),(0,i.cE)("input-el",`
|
|
91
|
-
padding: 0;
|
|
92
|
-
height: var(--n-height);
|
|
93
|
-
line-height: var(--n-height);
|
|
94
|
-
`,[(0,i.c)("&[type=password]::-ms-reveal","display: none;"),(0,i.c)("+",[(0,i.cE)("placeholder",`
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
`)])]),(0,i.cNotM)("textarea",[(0,i.cE)("placeholder","white-space: nowrap;")]),(0,i.cE)("eye",`
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
transition: color .3s var(--n-bezier);
|
|
102
|
-
`),(0,i.cM)("textarea","width: 100%;",[(0,i.cB)("input-word-count",`
|
|
103
|
-
position: absolute;
|
|
104
|
-
right: var(--n-padding-right);
|
|
105
|
-
bottom: var(--n-padding-vertical);
|
|
106
|
-
`),(0,i.cM)("resizable",[(0,i.cB)("input-wrapper",`
|
|
107
|
-
resize: vertical;
|
|
108
|
-
min-height: var(--n-height);
|
|
109
|
-
`)]),(0,i.cE)("textarea-el, textarea-mirror, placeholder",`
|
|
110
|
-
height: 100%;
|
|
111
|
-
padding-left: 0;
|
|
112
|
-
padding-right: 0;
|
|
113
|
-
padding-top: var(--n-padding-vertical);
|
|
114
|
-
padding-bottom: var(--n-padding-vertical);
|
|
115
|
-
word-break: break-word;
|
|
116
|
-
display: inline-block;
|
|
117
|
-
vertical-align: bottom;
|
|
118
|
-
box-sizing: border-box;
|
|
119
|
-
line-height: var(--n-line-height-textarea);
|
|
120
|
-
margin: 0;
|
|
121
|
-
resize: none;
|
|
122
|
-
white-space: pre-wrap;
|
|
123
|
-
scroll-padding-block-end: var(--n-padding-vertical);
|
|
124
|
-
`),(0,i.cE)("textarea-mirror",`
|
|
125
|
-
width: 100%;
|
|
126
|
-
pointer-events: none;
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
visibility: hidden;
|
|
129
|
-
position: static;
|
|
130
|
-
white-space: pre-wrap;
|
|
131
|
-
overflow-wrap: break-word;
|
|
132
|
-
`)]),(0,i.cM)("pair",[(0,i.cE)("input-el, placeholder","text-align: center;"),(0,i.cE)("separator",`
|
|
133
|
-
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
|
-
transition: color .3s var(--n-bezier);
|
|
136
|
-
color: var(--n-text-color);
|
|
137
|
-
white-space: nowrap;
|
|
138
|
-
`,[(0,i.cB)("icon",`
|
|
139
|
-
color: var(--n-icon-color);
|
|
140
|
-
`),(0,i.cB)("base-icon",`
|
|
141
|
-
color: var(--n-icon-color);
|
|
142
|
-
`)])]),(0,i.cM)("disabled",`
|
|
143
|
-
cursor: not-allowed;
|
|
144
|
-
background-color: var(--n-color-disabled);
|
|
145
|
-
`,[(0,i.cE)("border","border: var(--n-border-disabled);"),(0,i.cE)("input-el, textarea-el",`
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
color: var(--n-text-color-disabled);
|
|
148
|
-
text-decoration-color: var(--n-text-color-disabled);
|
|
149
|
-
`),(0,i.cE)("placeholder","color: var(--n-placeholder-color-disabled);"),(0,i.cE)("separator","color: var(--n-text-color-disabled);",[(0,i.cB)("icon",`
|
|
150
|
-
color: var(--n-icon-color-disabled);
|
|
151
|
-
`),(0,i.cB)("base-icon",`
|
|
152
|
-
color: var(--n-icon-color-disabled);
|
|
153
|
-
`)]),(0,i.cB)("input-word-count",`
|
|
154
|
-
color: var(--n-count-text-color-disabled);
|
|
155
|
-
`),(0,i.cE)("suffix, prefix","color: var(--n-text-color-disabled);",[(0,i.cB)("icon",`
|
|
156
|
-
color: var(--n-icon-color-disabled);
|
|
157
|
-
`),(0,i.cB)("internal-icon",`
|
|
158
|
-
color: var(--n-icon-color-disabled);
|
|
159
|
-
`)])]),(0,i.cNotM)("disabled",[(0,i.cE)("eye",`
|
|
160
|
-
color: var(--n-icon-color);
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
`,[(0,i.c)("&:hover",`
|
|
163
|
-
color: var(--n-icon-color-hover);
|
|
164
|
-
`),(0,i.c)("&:active",`
|
|
165
|
-
color: var(--n-icon-color-pressed);
|
|
166
|
-
`)]),(0,i.c)("&:hover",[(0,i.cE)("state-border","border: var(--n-border-hover);")]),(0,i.cM)("focus","background-color: var(--n-color-focus);",[(0,i.cE)("state-border",`
|
|
167
|
-
border: var(--n-border-focus);
|
|
168
|
-
box-shadow: var(--n-box-shadow-focus);
|
|
169
|
-
`)])]),(0,i.cE)("border, state-border",`
|
|
170
|
-
box-sizing: border-box;
|
|
171
|
-
position: absolute;
|
|
172
|
-
left: 0;
|
|
173
|
-
right: 0;
|
|
174
|
-
top: 0;
|
|
175
|
-
bottom: 0;
|
|
176
|
-
pointer-events: none;
|
|
177
|
-
border-radius: inherit;
|
|
178
|
-
border: var(--n-border);
|
|
179
|
-
transition:
|
|
180
|
-
box-shadow .3s var(--n-bezier),
|
|
181
|
-
border-color .3s var(--n-bezier);
|
|
182
|
-
`),(0,i.cE)("state-border",`
|
|
183
|
-
border-color: #0000;
|
|
184
|
-
z-index: 1;
|
|
185
|
-
`),(0,i.cE)("prefix","margin-right: 4px;"),(0,i.cE)("suffix",`
|
|
186
|
-
margin-left: 4px;
|
|
187
|
-
`),(0,i.cE)("suffix, prefix",`
|
|
188
|
-
transition: color .3s var(--n-bezier);
|
|
189
|
-
flex-wrap: nowrap;
|
|
190
|
-
flex-shrink: 0;
|
|
191
|
-
line-height: var(--n-height);
|
|
192
|
-
white-space: nowrap;
|
|
193
|
-
display: inline-flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
justify-content: center;
|
|
196
|
-
color: var(--n-suffix-text-color);
|
|
197
|
-
`,[(0,i.cB)("base-loading",`
|
|
198
|
-
font-size: var(--n-icon-size);
|
|
199
|
-
margin: 0 2px;
|
|
200
|
-
color: var(--n-loading-color);
|
|
201
|
-
`),(0,i.cB)("base-clear",`
|
|
202
|
-
font-size: var(--n-icon-size);
|
|
203
|
-
`,[(0,i.cE)("placeholder",[(0,i.cB)("base-icon",`
|
|
204
|
-
transition: color .3s var(--n-bezier);
|
|
205
|
-
color: var(--n-icon-color);
|
|
206
|
-
font-size: var(--n-icon-size);
|
|
207
|
-
`)])]),(0,i.c)(">",[(0,i.cB)("icon",`
|
|
208
|
-
transition: color .3s var(--n-bezier);
|
|
209
|
-
color: var(--n-icon-color);
|
|
210
|
-
font-size: var(--n-icon-size);
|
|
211
|
-
`)]),(0,i.cB)("base-icon",`
|
|
212
|
-
font-size: var(--n-icon-size);
|
|
213
|
-
`)]),(0,i.cB)("input-word-count",`
|
|
214
|
-
pointer-events: none;
|
|
215
|
-
line-height: 1.5;
|
|
216
|
-
font-size: .85em;
|
|
217
|
-
color: var(--n-count-text-color);
|
|
218
|
-
transition: color .3s var(--n-bezier);
|
|
219
|
-
margin-left: 4px;
|
|
220
|
-
font-variant: tabular-nums;
|
|
221
|
-
`),["warning","error"].map(t=>(0,i.cM)(`${t}-status`,[(0,i.cNotM)("disabled",[(0,i.cB)("base-loading",`
|
|
222
|
-
color: var(--n-loading-color-${t})
|
|
223
|
-
`),(0,i.cE)("input-el, textarea-el",`
|
|
224
|
-
caret-color: var(--n-caret-color-${t});
|
|
225
|
-
`),(0,i.cE)("state-border",`
|
|
226
|
-
border: var(--n-border-${t});
|
|
227
|
-
`),(0,i.c)("&:hover",[(0,i.cE)("state-border",`
|
|
228
|
-
border: var(--n-border-hover-${t});
|
|
229
|
-
`)]),(0,i.c)("&:focus",`
|
|
230
|
-
background-color: var(--n-color-focus-${t});
|
|
231
|
-
`,[(0,i.cE)("state-border",`
|
|
232
|
-
box-shadow: var(--n-box-shadow-focus-${t});
|
|
233
|
-
border: var(--n-border-focus-${t});
|
|
234
|
-
`)]),(0,i.cM)("focus",`
|
|
235
|
-
background-color: var(--n-color-focus-${t});
|
|
236
|
-
`,[(0,i.cE)("state-border",`
|
|
237
|
-
box-shadow: var(--n-box-shadow-focus-${t});
|
|
238
|
-
border: var(--n-border-focus-${t});
|
|
239
|
-
`)])])]))]);de.safariStyle=(0,i.cB)("input",[(0,i.cM)("disabled",[(0,i.cE)("input-el, textarea-el",`
|
|
240
|
-
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
241
|
-
`)])]);(function(t){var s=P.commonjsGlobal&&P.commonjsGlobal.__createBinding||(Object.create?function(n,g,l,j){j===void 0&&(j=l);var T=Object.getOwnPropertyDescriptor(g,l);(!T||("get"in T?!g.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return g[l]}}),Object.defineProperty(n,j,T)}:function(n,g,l,j){j===void 0&&(j=l),n[j]=g[l]}),v=P.commonjsGlobal&&P.commonjsGlobal.__setModuleDefault||(Object.create?function(n,g){Object.defineProperty(n,"default",{enumerable:!0,value:g})}:function(n,g){n.default=g}),h=P.commonjsGlobal&&P.commonjsGlobal.__importStar||function(n){if(n&&n.__esModule)return n;var g={};if(n!=null)for(var l in n)l!=="default"&&Object.prototype.hasOwnProperty.call(n,l)&&s(g,n,l);return v(g,n),g},p=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.inputProps=void 0;const r=se.require$$0,x=S.require$$2,u=S.require$$1,b=S.require$$1$1,C=S.require$$3,B=je,D=Ne.icons,I=S.useRtl,z=Ne._internal,F=S._mixins,f=S._utils,H=ye,N=ce,W=re,V=p(Ae),k=h(de);t.inputProps=Object.assign(Object.assign({},F.useTheme.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),t.default=(0,r.defineComponent)({name:"Input",props:t.inputProps,setup(n){process.env.NODE_ENV!=="production"&&(0,r.watchEffect)(()=>{n.showPasswordToggle&&(0,f.warnOnce)("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:g,mergedBorderedRef:l,inlineThemeDisabled:j,mergedRtlRef:T}=(0,F.useConfig)(n),A=(0,F.useTheme)("Input","-input",k.default,H.inputLight,n,g);B.isSafari&&(0,F.useStyle)("-input-safari",k.safariStyle,g);const M=(0,r.ref)(null),E=(0,r.ref)(null),w=(0,r.ref)(null),c=(0,r.ref)(null),d=(0,r.ref)(null),R=(0,r.ref)(null),O=(0,r.ref)(null),fe=(0,W.useCursor)(O),K=(0,r.ref)(null),{localeRef:Je}=(0,F.useLocale)("Input"),pe=(0,r.ref)(n.defaultValue),Qe=(0,r.toRef)(n,"value"),G=(0,x.useMergedState)(Qe,pe),oe=(0,F.useFormItem)(n),{mergedSizeRef:Ce,mergedDisabledRef:J,mergedStatusRef:Ze}=oe,Q=(0,r.ref)(!1),te=(0,r.ref)(!1),L=(0,r.ref)(!1),ne=(0,r.ref)(!1);let Ee=null;const $e=(0,r.computed)(()=>{const{placeholder:e,pair:o}=n;return o?Array.isArray(e)?e:e===void 0?["",""]:[e,e]:e===void 0?[Je.value.placeholder]:[e]}),er=(0,r.computed)(()=>{const{value:e}=L,{value:o}=G,{value:a}=$e;return!e&&((0,W.isEmptyInputValue)(o)||Array.isArray(o)&&(0,W.isEmptyInputValue)(o[0]))&&a[0]}),rr=(0,r.computed)(()=>{const{value:e}=L,{value:o}=G,{value:a}=$e;return!e&&a[1]&&((0,W.isEmptyInputValue)(o)||Array.isArray(o)&&(0,W.isEmptyInputValue)(o[1]))}),Pe=(0,x.useMemo)(()=>n.internalForceFocus||Q.value),or=(0,x.useMemo)(()=>{if(J.value||n.readonly||!n.clearable||!Pe.value&&!te.value)return!1;const{value:e}=G,{value:o}=Pe;return n.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(te.value||o):!!e&&(te.value||o)}),Se=(0,r.computed)(()=>{const{showPasswordOn:e}=n;if(e)return e;if(n.showPasswordToggle)return"click"}),ie=(0,r.ref)(!1),tr=(0,r.computed)(()=>{const{textDecoration:e}=n;return e?Array.isArray(e)?e.map(o=>({textDecoration:o})):[{textDecoration:e}]:["",""]}),Ge=(0,r.ref)(void 0),nr=()=>{var e,o;if(n.type==="textarea"){const{autosize:a}=n;if(a&&(Ge.value=(o=(e=K.value)===null||e===void 0?void 0:e.$el)===null||o===void 0?void 0:o.offsetWidth),!E.value||typeof a=="boolean")return;const{paddingTop:_,paddingBottom:$,lineHeight:m}=window.getComputedStyle(E.value),q=Number(_.slice(0,-2)),U=Number($.slice(0,-2)),X=Number(m.slice(0,-2)),{value:le}=w;if(!le)return;if(a.minRows){const ae=Math.max(a.minRows,1),Me=`${q+U+X*ae}px`;le.style.minHeight=Me}if(a.maxRows){const ae=`${q+U+X*a.maxRows}px`;le.style.maxHeight=ae}}},ir=(0,r.computed)(()=>{const{maxlength:e}=n;return e===void 0?void 0:Number(e)});(0,r.onMounted)(()=>{const{value:e}=G;Array.isArray(e)||ze(e)});const lr=(0,r.getCurrentInstance)().proxy;function he(e,o){const{onUpdateValue:a,"onUpdate:value":_,onInput:$}=n,{nTriggerFormInput:m}=oe;a&&(0,f.call)(a,e,o),_&&(0,f.call)(_,e,o),$&&(0,f.call)($,e,o),pe.value=e,m()}function ve(e,o){const{onChange:a}=n,{nTriggerFormChange:_}=oe;a&&(0,f.call)(a,e,o),pe.value=e,_()}function ar(e){const{onBlur:o}=n,{nTriggerFormBlur:a}=oe;o&&(0,f.call)(o,e),a()}function sr(e){const{onFocus:o}=n,{nTriggerFormFocus:a}=oe;o&&(0,f.call)(o,e),a()}function ur(e){const{onClear:o}=n;o&&(0,f.call)(o,e)}function cr(e){const{onInputBlur:o}=n;o&&(0,f.call)(o,e)}function dr(e){const{onInputFocus:o}=n;o&&(0,f.call)(o,e)}function fr(){const{onDeactivate:e}=n;e&&(0,f.call)(e)}function pr(){const{onActivate:e}=n;e&&(0,f.call)(e)}function hr(e){const{onClick:o}=n;o&&(0,f.call)(o,e)}function vr(e){const{onWrapperFocus:o}=n;o&&(0,f.call)(o,e)}function br(e){const{onWrapperBlur:o}=n;o&&(0,f.call)(o,e)}function gr(){L.value=!0}function mr(e){L.value=!1,e.target===R.value?be(e,1):be(e,0)}function be(e,o=0,a="input"){const _=e.target.value;if(ze(_),e instanceof InputEvent&&!e.isComposing&&(L.value=!1),n.type==="textarea"){const{value:m}=K;m&&m.syncUnifiedContainer()}if(Ee=_,L.value)return;fe.recordCursor();const $=xr(_);if($)if(!n.pair)a==="input"?he(_,{source:o}):ve(_,{source:o});else{let{value:m}=G;Array.isArray(m)?m=[m[0],m[1]]:m=["",""],m[o]=_,a==="input"?he(m,{source:o}):ve(m,{source:o})}lr.$forceUpdate(),$||(0,r.nextTick)(fe.restoreCursor)}function xr(e){const{countGraphemes:o,maxlength:a,minlength:_}=n;if(o){let m;if(a!==void 0&&(m===void 0&&(m=o(e)),m>Number(a))||_!==void 0&&(m===void 0&&(m=o(e)),m<Number(a)))return!1}const{allowInput:$}=n;return typeof $=="function"?$(e):!0}function _r(e){cr(e),e.relatedTarget===M.value&&fr(),e.relatedTarget!==null&&(e.relatedTarget===d.value||e.relatedTarget===R.value||e.relatedTarget===E.value)||(ne.value=!1),ge(e,"blur"),O.value=null}function yr(e,o){dr(e),Q.value=!0,ne.value=!0,pr(),ge(e,"focus"),o===0?O.value=d.value:o===1?O.value=R.value:o===2&&(O.value=E.value)}function wr(e){n.passivelyActivated&&(br(e),ge(e,"blur"))}function Cr(e){n.passivelyActivated&&(Q.value=!0,vr(e),ge(e,"focus"))}function ge(e,o){e.relatedTarget!==null&&(e.relatedTarget===d.value||e.relatedTarget===R.value||e.relatedTarget===E.value||e.relatedTarget===M.value)||(o==="focus"?(sr(e),Q.value=!0):o==="blur"&&(ar(e),Q.value=!1))}function Er(e,o){be(e,o,"change")}function $r(e){hr(e)}function Pr(e){ur(e),Ve()}function Ve(){n.pair?(he(["",""],{source:"clear"}),ve(["",""],{source:"clear"})):(he("",{source:"clear"}),ve("",{source:"clear"}))}function Sr(e){const{onMousedown:o}=n;o&&o(e);const{tagName:a}=e.target;if(a!=="INPUT"&&a!=="TEXTAREA"){if(n.resizable){const{value:_}=M;if(_){const{left:$,top:m,width:q,height:U}=_.getBoundingClientRect(),X=14;if($+q-X<e.clientX&&e.clientX<$+q&&m+U-X<e.clientY&&e.clientY<m+U)return}}e.preventDefault(),Q.value||ke()}}function Br(){var e;te.value=!0,n.type==="textarea"&&((e=K.value)===null||e===void 0||e.handleMouseEnterWrapper())}function zr(){var e;te.value=!1,n.type==="textarea"&&((e=K.value)===null||e===void 0||e.handleMouseLeaveWrapper())}function Mr(){J.value||Se.value==="click"&&(ie.value=!ie.value)}function Rr(e){if(J.value)return;e.preventDefault();const o=_=>{_.preventDefault(),(0,C.off)("mouseup",document,o)};if((0,C.on)("mouseup",document,o),Se.value!=="mousedown")return;ie.value=!0;const a=()=>{ie.value=!1,(0,C.off)("mouseup",document,a)};(0,C.on)("mouseup",document,a)}function Fr(e){n.onKeyup&&(0,f.call)(n.onKeyup,e)}function jr(e){switch(n.onKeydown&&(0,f.call)(n.onKeydown,e),e.key){case"Escape":Be();break;case"Enter":Dr(e);break}}function Dr(e){var o,a;if(n.passivelyActivated){const{value:_}=ne;if(_){n.internalDeactivateOnEnter&&Be();return}e.preventDefault(),n.type==="textarea"?(o=E.value)===null||o===void 0||o.focus():(a=d.value)===null||a===void 0||a.focus()}}function Be(){n.passivelyActivated&&(ne.value=!1,(0,r.nextTick)(()=>{var e;(e=M.value)===null||e===void 0||e.focus()}))}function ke(){var e,o,a;J.value||(n.passivelyActivated?(e=M.value)===null||e===void 0||e.focus():((o=E.value)===null||o===void 0||o.focus(),(a=d.value)===null||a===void 0||a.focus()))}function Ir(){var e;!((e=M.value)===null||e===void 0)&&e.contains(document.activeElement)&&document.activeElement.blur()}function Tr(){var e,o;(e=E.value)===null||e===void 0||e.select(),(o=d.value)===null||o===void 0||o.select()}function Ar(){J.value||(E.value?E.value.focus():d.value&&d.value.focus())}function Or(){const{value:e}=M;e!=null&&e.contains(document.activeElement)&&e!==document.activeElement&&Be()}function Wr(e){if(n.type==="textarea"){const{value:o}=E;o==null||o.scrollTo(e)}else{const{value:o}=d;o==null||o.scrollTo(e)}}function ze(e){const{type:o,pair:a,autosize:_}=n;if(!a&&_)if(o==="textarea"){const{value:$}=w;$&&($.textContent=`${e??""}\r
|
|
242
|
-
`)}else{const{value:$}=c;$&&(e?$.textContent=e:$.innerHTML=" ")}}function Gr(){nr()}const Le=(0,r.ref)({top:"0"});function Vr(e){var o;const{scrollTop:a}=e.target;Le.value.top=`${-a}px`,(o=K.value)===null||o===void 0||o.syncUnifiedContainer()}let me=null;(0,r.watchEffect)(()=>{const{autosize:e,type:o}=n;e&&o==="textarea"?me=(0,r.watch)(G,a=>{!Array.isArray(a)&&a!==Ee&&ze(a)}):me==null||me()});let xe=null;(0,r.watchEffect)(()=>{n.type==="textarea"?xe=(0,r.watch)(G,e=>{var o;!Array.isArray(e)&&e!==Ee&&((o=K.value)===null||o===void 0||o.syncUnifiedContainer())}):xe==null||xe()}),(0,r.provide)(N.inputInjectionKey,{mergedValueRef:G,maxlengthRef:ir,mergedClsPrefixRef:g,countGraphemesRef:(0,r.toRef)(n,"countGraphemes")});const kr={wrapperElRef:M,inputElRef:d,textareaElRef:E,isCompositing:L,clear:Ve,focus:ke,blur:Ir,select:Tr,deactivate:Or,activate:Ar,scrollTo:Wr},Lr=(0,I.useRtl)("Input",T,g),He=(0,r.computed)(()=>{const{value:e}=Ce,{common:{cubicBezierEaseInOut:o},self:{color:a,borderRadius:_,textColor:$,caretColor:m,caretColorError:q,caretColorWarning:U,textDecorationColor:X,border:le,borderDisabled:ae,borderHover:Me,borderFocus:Hr,placeholderColor:Nr,placeholderColorDisabled:Kr,lineHeightTextarea:qr,colorDisabled:Ur,colorFocus:Xr,textColorDisabled:Yr,boxShadowFocus:Jr,iconSize:Qr,colorFocusWarning:Zr,boxShadowFocusWarning:eo,borderWarning:ro,borderFocusWarning:oo,borderHoverWarning:to,colorFocusError:no,boxShadowFocusError:io,borderError:lo,borderFocusError:ao,borderHoverError:so,clearSize:uo,clearColor:co,clearColorHover:fo,clearColorPressed:po,iconColor:ho,iconColorDisabled:vo,suffixTextColor:bo,countTextColor:go,countTextColorDisabled:mo,iconColorHover:xo,iconColorPressed:_o,loadingColor:yo,loadingColorError:wo,loadingColorWarning:Co,[(0,f.createKey)("padding",e)]:Eo,[(0,f.createKey)("fontSize",e)]:$o,[(0,f.createKey)("height",e)]:Po}}=A.value,{left:So,right:Bo}=(0,u.getPadding)(Eo);return{"--n-bezier":o,"--n-count-text-color":go,"--n-count-text-color-disabled":mo,"--n-color":a,"--n-font-size":$o,"--n-border-radius":_,"--n-height":Po,"--n-padding-left":So,"--n-padding-right":Bo,"--n-text-color":$,"--n-caret-color":m,"--n-text-decoration-color":X,"--n-border":le,"--n-border-disabled":ae,"--n-border-hover":Me,"--n-border-focus":Hr,"--n-placeholder-color":Nr,"--n-placeholder-color-disabled":Kr,"--n-icon-size":Qr,"--n-line-height-textarea":qr,"--n-color-disabled":Ur,"--n-color-focus":Xr,"--n-text-color-disabled":Yr,"--n-box-shadow-focus":Jr,"--n-loading-color":yo,"--n-caret-color-warning":U,"--n-color-focus-warning":Zr,"--n-box-shadow-focus-warning":eo,"--n-border-warning":ro,"--n-border-focus-warning":oo,"--n-border-hover-warning":to,"--n-loading-color-warning":Co,"--n-caret-color-error":q,"--n-color-focus-error":no,"--n-box-shadow-focus-error":io,"--n-border-error":lo,"--n-border-focus-error":ao,"--n-border-hover-error":so,"--n-loading-color-error":wo,"--n-clear-color":co,"--n-clear-size":uo,"--n-clear-color-hover":fo,"--n-clear-color-pressed":po,"--n-icon-color":ho,"--n-icon-color-hover":xo,"--n-icon-color-pressed":_o,"--n-icon-color-disabled":vo,"--n-suffix-text-color":bo}}),Z=j?(0,F.useThemeClass)("input",(0,r.computed)(()=>{const{value:e}=Ce;return e[0]}),He,n):void 0;return Object.assign(Object.assign({},kr),{wrapperElRef:M,inputElRef:d,inputMirrorElRef:c,inputEl2Ref:R,textareaElRef:E,textareaMirrorElRef:w,textareaScrollbarInstRef:K,rtlEnabled:Lr,uncontrolledValue:pe,mergedValue:G,passwordVisible:ie,mergedPlaceholder:$e,showPlaceholder1:er,showPlaceholder2:rr,mergedFocus:Pe,isComposing:L,activated:ne,showClearButton:or,mergedSize:Ce,mergedDisabled:J,textDecorationStyle:tr,mergedClsPrefix:g,mergedBordered:l,mergedShowPasswordOn:Se,placeholderStyle:Le,mergedStatus:Ze,textAreaScrollContainerWidth:Ge,handleTextAreaScroll:Vr,handleCompositionStart:gr,handleCompositionEnd:mr,handleInput:be,handleInputBlur:_r,handleInputFocus:yr,handleWrapperBlur:wr,handleWrapperFocus:Cr,handleMouseEnter:Br,handleMouseLeave:zr,handleMouseDown:Sr,handleChange:Er,handleClick:$r,handleClear:Pr,handlePasswordToggleClick:Mr,handlePasswordToggleMousedown:Rr,handleWrapperKeydown:jr,handleWrapperKeyup:Fr,handleTextAreaMirrorResize:Gr,getTextareaScrollContainer:()=>E.value,mergedTheme:A,cssVars:j?void 0:He,themeClass:Z==null?void 0:Z.themeClass,onRender:Z==null?void 0:Z.onRender})},render(){var n,g;const{mergedClsPrefix:l,mergedStatus:j,themeClass:T,type:A,countGraphemes:M,onRender:E}=this,w=this.$slots;return E==null||E(),(0,r.h)("div",{ref:"wrapperElRef",class:[`${l}-input`,T,j&&`${l}-input--${j}-status`,{[`${l}-input--rtl`]:this.rtlEnabled,[`${l}-input--disabled`]:this.mergedDisabled,[`${l}-input--textarea`]:A==="textarea",[`${l}-input--resizable`]:this.resizable&&!this.autosize,[`${l}-input--autosize`]:this.autosize,[`${l}-input--round`]:this.round&&A!=="textarea",[`${l}-input--pair`]:this.pair,[`${l}-input--focus`]:this.mergedFocus,[`${l}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},(0,r.h)("div",{class:`${l}-input-wrapper`},(0,f.resolveWrappedSlot)(w.prefix,c=>c&&(0,r.h)("div",{class:`${l}-input__prefix`},c)),A==="textarea"?(0,r.h)(z.NScrollbar,{ref:"textareaScrollbarInstRef",class:`${l}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var c,d;const{textAreaScrollContainerWidth:R}=this,O={width:this.autosize&&R&&`${R}px`};return(0,r.h)(r.Fragment,null,(0,r.h)("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${l}-input__textarea-el`,(c=this.inputProps)===null||c===void 0?void 0:c.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:M?void 0:this.maxlength,minlength:M?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(d=this.inputProps)===null||d===void 0?void 0:d.style,O],onBlur:this.handleInputBlur,onFocus:fe=>{this.handleInputFocus(fe,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?(0,r.h)("div",{class:`${l}-input__placeholder`,style:[this.placeholderStyle,O],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?(0,r.h)(b.VResizeObserver,{onResize:this.handleTextAreaMirrorResize},{default:()=>(0,r.h)("div",{ref:"textareaMirrorElRef",class:`${l}-input__textarea-mirror`,key:"mirror"})}):null)}}):(0,r.h)("div",{class:`${l}-input__input`},(0,r.h)("input",Object.assign({type:A==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":A},this.inputProps,{ref:"inputElRef",class:[`${l}-input__input-el`,(n=this.inputProps)===null||n===void 0?void 0:n.class],style:[this.textDecorationStyle[0],(g=this.inputProps)===null||g===void 0?void 0:g.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:M?void 0:this.maxlength,minlength:M?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,0)},onInput:c=>{this.handleInput(c,0)},onChange:c=>{this.handleChange(c,0)}})),this.showPlaceholder1?(0,r.h)("div",{class:`${l}-input__placeholder`},(0,r.h)("span",null,this.mergedPlaceholder[0])):null,this.autosize?(0,r.h)("div",{class:`${l}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&(0,f.resolveWrappedSlot)(w.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?(0,r.h)("div",{class:`${l}-input__suffix`},[(0,f.resolveWrappedSlot)(w["clear-icon-placeholder"],d=>(this.clearable||d)&&(0,r.h)(z.NBaseClear,{clsPrefix:l,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>d,icon:()=>{var R,O;return(O=(R=this.$slots)["clear-icon"])===null||O===void 0?void 0:O.call(R)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?(0,r.h)(z.NBaseSuffix,{clsPrefix:l,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?(0,r.h)(V.default,null,{default:d=>{var R;return(R=w.count)===null||R===void 0?void 0:R.call(w,d)}}):null,this.mergedShowPasswordOn&&this.type==="password"?(0,r.h)("div",{class:`${l}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?(0,f.resolveSlot)(w["password-visible-icon"],()=>[(0,r.h)(z.NBaseIcon,{clsPrefix:l},{default:()=>(0,r.h)(D.EyeIcon,null)})]):(0,f.resolveSlot)(w["password-invisible-icon"],()=>[(0,r.h)(z.NBaseIcon,{clsPrefix:l},{default:()=>(0,r.h)(D.EyeOffIcon,null)})])):null]):null)),this.pair?(0,r.h)("span",{class:`${l}-input__separator`},(0,f.resolveSlot)(w.separator,()=>[this.separator])):null,this.pair?(0,r.h)("div",{class:`${l}-input-wrapper`},(0,r.h)("div",{class:`${l}-input__input`},(0,r.h)("input",{ref:"inputEl2Ref",type:this.type,class:`${l}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:M?void 0:this.maxlength,minlength:M?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,1)},onInput:c=>{this.handleInput(c,1)},onChange:c=>{this.handleChange(c,1)}}),this.showPlaceholder2?(0,r.h)("div",{class:`${l}-input__placeholder`},(0,r.h)("span",null,this.mergedPlaceholder[1])):null),(0,f.resolveWrappedSlot)(w.suffix,c=>(this.clearable||c)&&(0,r.h)("div",{class:`${l}-input__suffix`},[this.clearable&&(0,r.h)(z.NBaseClear,{clsPrefix:l,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var d;return(d=w["clear-icon"])===null||d===void 0?void 0:d.call(w)},placeholder:()=>{var d;return(d=w["clear-icon-placeholder"])===null||d===void 0?void 0:d.call(w)}}),c]))):null,this.mergedBordered?(0,r.h)("div",{class:`${l}-input__border`}):null,this.mergedBordered?(0,r.h)("div",{class:`${l}-input__state-border`}):null,this.showCount&&A==="textarea"?(0,r.h)(V.default,null,{default:c=>{var d;const{renderCount:R}=this;return R?R(c):(d=w.count)===null||d===void 0?void 0:d.call(w,c)}}):null)}})})(Ue);var Xe={},Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});const y=S.cssr;Oe.default=(0,y.cB)("input-group",`
|
|
243
|
-
display: inline-flex;
|
|
244
|
-
width: 100%;
|
|
245
|
-
flex-wrap: nowrap;
|
|
246
|
-
vertical-align: bottom;
|
|
247
|
-
`,[(0,y.c)(">",[(0,y.cB)("input",[(0,y.c)("&:not(:last-child)",`
|
|
248
|
-
border-top-right-radius: 0!important;
|
|
249
|
-
border-bottom-right-radius: 0!important;
|
|
250
|
-
`),(0,y.c)("&:not(:first-child)",`
|
|
251
|
-
border-top-left-radius: 0!important;
|
|
252
|
-
border-bottom-left-radius: 0!important;
|
|
253
|
-
margin-left: -1px!important;
|
|
254
|
-
`)]),(0,y.cB)("button",[(0,y.c)("&:not(:last-child)",`
|
|
255
|
-
border-top-right-radius: 0!important;
|
|
256
|
-
border-bottom-right-radius: 0!important;
|
|
257
|
-
`,[(0,y.cE)("state-border, border",`
|
|
258
|
-
border-top-right-radius: 0!important;
|
|
259
|
-
border-bottom-right-radius: 0!important;
|
|
260
|
-
`)]),(0,y.c)("&:not(:first-child)",`
|
|
261
|
-
border-top-left-radius: 0!important;
|
|
262
|
-
border-bottom-left-radius: 0!important;
|
|
263
|
-
`,[(0,y.cE)("state-border, border",`
|
|
264
|
-
border-top-left-radius: 0!important;
|
|
265
|
-
border-bottom-left-radius: 0!important;
|
|
266
|
-
`)])]),(0,y.c)("*",[(0,y.c)("&:not(:last-child)",`
|
|
267
|
-
border-top-right-radius: 0!important;
|
|
268
|
-
border-bottom-right-radius: 0!important;
|
|
269
|
-
`,[(0,y.c)(">",[(0,y.cB)("input",`
|
|
270
|
-
border-top-right-radius: 0!important;
|
|
271
|
-
border-bottom-right-radius: 0!important;
|
|
272
|
-
`),(0,y.cB)("base-selection",[(0,y.cB)("base-selection-label",`
|
|
273
|
-
border-top-right-radius: 0!important;
|
|
274
|
-
border-bottom-right-radius: 0!important;
|
|
275
|
-
`),(0,y.cB)("base-selection-tags",`
|
|
276
|
-
border-top-right-radius: 0!important;
|
|
277
|
-
border-bottom-right-radius: 0!important;
|
|
278
|
-
`),(0,y.cE)("box-shadow, border, state-border",`
|
|
279
|
-
border-top-right-radius: 0!important;
|
|
280
|
-
border-bottom-right-radius: 0!important;
|
|
281
|
-
`)])])]),(0,y.c)("&:not(:first-child)",`
|
|
282
|
-
margin-left: -1px!important;
|
|
283
|
-
border-top-left-radius: 0!important;
|
|
284
|
-
border-bottom-left-radius: 0!important;
|
|
285
|
-
`,[(0,y.c)(">",[(0,y.cB)("input",`
|
|
286
|
-
border-top-left-radius: 0!important;
|
|
287
|
-
border-bottom-left-radius: 0!important;
|
|
288
|
-
`),(0,y.cB)("base-selection",[(0,y.cB)("base-selection-label",`
|
|
289
|
-
border-top-left-radius: 0!important;
|
|
290
|
-
border-bottom-left-radius: 0!important;
|
|
291
|
-
`),(0,y.cB)("base-selection-tags",`
|
|
292
|
-
border-top-left-radius: 0!important;
|
|
293
|
-
border-bottom-left-radius: 0!important;
|
|
294
|
-
`),(0,y.cE)("box-shadow, border, state-border",`
|
|
295
|
-
border-top-left-radius: 0!important;
|
|
296
|
-
border-bottom-left-radius: 0!important;
|
|
297
|
-
`)])])])])])]);(function(t){var s=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(t,"__esModule",{value:!0}),t.inputGroupProps=void 0;const v=se.require$$0,h=S._mixins,p=s(Oe);t.inputGroupProps={},t.default=(0,v.defineComponent)({name:"InputGroup",props:t.inputGroupProps,setup(r){const{mergedClsPrefixRef:x}=(0,h.useConfig)(r);return(0,h.useStyle)("-input-group",p.default,x),{mergedClsPrefix:x}},render(){const{mergedClsPrefix:r}=this;return(0,v.h)("div",{class:`${r}-input-group`},this.$slots)}})})(Xe);var Ye={},We={};Object.defineProperty(We,"__esModule",{value:!0});const qe=S.cssr;We.default=(0,qe.cB)("input-group-label",`
|
|
298
|
-
position: relative;
|
|
299
|
-
user-select: none;
|
|
300
|
-
-webkit-user-select: none;
|
|
301
|
-
box-sizing: border-box;
|
|
302
|
-
padding: 0 12px;
|
|
303
|
-
display: inline-block;
|
|
304
|
-
border-radius: var(--n-border-radius);
|
|
305
|
-
background-color: var(--n-group-label-color);
|
|
306
|
-
color: var(--n-group-label-text-color);
|
|
307
|
-
font-size: var(--n-font-size);
|
|
308
|
-
line-height: var(--n-height);
|
|
309
|
-
height: var(--n-height);
|
|
310
|
-
flex-shrink: 0;
|
|
311
|
-
white-space: nowrap;
|
|
312
|
-
transition:
|
|
313
|
-
color .3s var(--n-bezier),
|
|
314
|
-
background-color .3s var(--n-bezier),
|
|
315
|
-
box-shadow .3s var(--n-bezier);
|
|
316
|
-
`,[(0,qe.cE)("border",`
|
|
317
|
-
position: absolute;
|
|
318
|
-
left: 0;
|
|
319
|
-
right: 0;
|
|
320
|
-
top: 0;
|
|
321
|
-
bottom: 0;
|
|
322
|
-
border-radius: inherit;
|
|
323
|
-
border: var(--n-group-label-border);
|
|
324
|
-
transition: border-color .3s var(--n-bezier);
|
|
325
|
-
`)]);(function(t){var s=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.inputGroupLabelProps=void 0;const v=se.require$$0,h=S._mixins,p=S._utils,r=ye,x=s(We);t.inputGroupLabelProps=Object.assign(Object.assign({},h.useTheme.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),t.default=(0,v.defineComponent)({name:"InputGroupLabel",props:t.inputGroupLabelProps,setup(u){const{mergedBorderedRef:b,mergedClsPrefixRef:C,inlineThemeDisabled:B}=(0,h.useConfig)(u),D=(0,h.useTheme)("Input","-input-group-label",x.default,r.inputLight,u,C),I=(0,v.computed)(()=>{const{size:F}=u,{common:{cubicBezierEaseInOut:f},self:{groupLabelColor:H,borderRadius:N,groupLabelTextColor:W,lineHeight:V,groupLabelBorder:k,[(0,p.createKey)("fontSize",F)]:n,[(0,p.createKey)("height",F)]:g}}=D.value;return{"--n-bezier":f,"--n-group-label-color":H,"--n-group-label-border":k,"--n-border-radius":N,"--n-group-label-text-color":W,"--n-font-size":n,"--n-line-height":V,"--n-height":g}}),z=B?(0,h.useThemeClass)("input-group-label",(0,v.computed)(()=>u.size[0]),I,u):void 0;return{mergedClsPrefix:C,mergedBordered:b,cssVars:B?void 0:I,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){var u,b,C;const{mergedClsPrefix:B}=this;return(u=this.onRender)===null||u===void 0||u.call(this),(0,v.h)("div",{class:[`${B}-input-group-label`,this.themeClass],style:this.cssVars},(C=(b=this.$slots).default)===null||C===void 0?void 0:C.call(b),this.mergedBordered?(0,v.h)("div",{class:`${B}-input-group-label__border`}):null)}})})(Ye);(function(t){var s=P.commonjsGlobal&&P.commonjsGlobal.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(t,"__esModule",{value:!0}),t.inputGroupLabelProps=t.NInputGroupLabel=t.inputGroupProps=t.NInputGroup=t.inputProps=t.NInput=void 0;var v=Ue;Object.defineProperty(t,"NInput",{enumerable:!0,get:function(){return s(v).default}}),Object.defineProperty(t,"inputProps",{enumerable:!0,get:function(){return v.inputProps}});var h=Xe;Object.defineProperty(t,"NInputGroup",{enumerable:!0,get:function(){return s(h).default}}),Object.defineProperty(t,"inputGroupProps",{enumerable:!0,get:function(){return h.inputGroupProps}});var p=Ye;Object.defineProperty(t,"NInputGroupLabel",{enumerable:!0,get:function(){return s(p).default}}),Object.defineProperty(t,"inputGroupLabelProps",{enumerable:!0,get:function(){return p.inputGroupLabelProps}})})(Fe);const Uo=zo({__proto__:null},[Fe]);exports.browser=je;exports.index=Uo;exports.input=Fe;exports.rtl=ue;exports.styles=ye;
|
package/dist/index-BZf3IisW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./index-Bhu7a5V1.cjs"),x=require("./pluginManager-itCTrGag.cjs"),b=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),S=require("./vuedraggable.umd-BqhSJIAi.cjs"),$=require("./tree.vue_vue_type_script_setup_true_lang-BVopU0uv.cjs"),w={class:"epic-event-info"},M=["title"],O={class:"epic-event-btn text-lg flex items-center text-$epic-text-secondary"},A={class:"epic-action-editor-main"},U={class:"epic-editor-item rounded"},D={class:"w-36px flex items-center text-lg"},j={class:"flex-1"},L={key:0},K={key:1},R={key:2},T={class:"epic-action-box text-lg text-$epic-text-medium"},q=["onClick"],F=["onClick"],z=e.defineComponent({__name:"EActionEditorItem",props:{itemEvents:{type:Array,default:()=>[]},allEvents:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>[]},events:{type:Object,default:()=>({})}},emits:["add","edit","update:modelValue"],setup(E,{emit:V}){const m=E,h=V,v=e.inject("pageSchema");function y(p){h("add",p)}function f(p){return C.findSchemaById(v.schemas,p).label}function u(p,i){var t;const a=o(i);a[i]=m.events[i].filter((k,N)=>p!==N),(t=a[i])!=null&&t.length||delete a[i],h("update:modelValue",a)}function r(p,i,a){h("edit",p,i,a)}function o(p){const i={};return m.allEvents.forEach(a=>{if(!m.events[a.type].length||a.type===p)return!1;i[a.type]=m.events[a.type]}),i}return(p,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.itemEvents,a=>(e.openBlock(),e.createElementBlock("div",{key:a.type,class:"epic-event-item"},[e.createElementVNode("div",w,[e.createElementVNode("div",{class:"epic-event-label",title:a.describe},e.toDisplayString(a.describe),9,M),e.createElementVNode("div",O,[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--add-rounded",onClick:t=>y(a.type)},null,8,["onClick"])])]),e.createElementVNode("div",A,[e.createVNode(e.unref(S.draggable),{modelValue:m.events[a.type],"onUpdate:modelValue":t=>m.events[a.type]=t,"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:t,index:k})=>[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createVNode(e.unref(b._sfc_main),{class:"mr-2 text-lg cursor-move handle text-$epic-text-medium",name:"icon--epic--drag"})]),e.createElementVNode("div",j,[t.type==="component"?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(f(t.componentId)),1)):t.type==="custom"?(e.openBlock(),e.createElementBlock("div",K," 自定义函数 ")):t.type==="public"?(e.openBlock(),e.createElementBlock("div",R," 公共函数 ")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.methodName),1)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"epic-edit-btn",onClick:N=>r(k,a.type,t)},[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--page-info-outline-rounded"})],8,q),e.createElementVNode("div",{class:"epic-del-btn",onClick:N=>u(k,a.type)},[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,F)])])]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128))}}),J={class:"h-full flex flex-col"},P=e.defineComponent({__name:"EScriptEdit",setup(E){const V=x.pluginManager.getComponent("monacoEditor"),m={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1}},h=e.ref(null),v=e.inject("pageSchema");return(y,f)=>(e.openBlock(),e.createElementBlock("div",J,[f[1]||(f[1]=e.createElementVNode("div",{class:"pb-2"}," 自定义函数编辑 ",-1)),e.createVNode(e.unref(V),{ref_key:"monacoEditorRef",ref:h,autoToggleTheme:"",modelValue:e.unref(v).script,"onUpdate:modelValue":f[0]||(f[0]=u=>e.unref(v).script=u),class:"epic-editor flex-1",config:m,language:"javascript"},null,8,["modelValue"])]))}}),G={class:"epic-attribute-view"},H=["title"],Q={class:"epic-attr-input"},W=e.defineComponent({__name:"EArgsEditor",props:{modelValue:{},actionArgsConfigs:{}},emits:["update:modelValue"],setup(E,{emit:V}){const m=E,h=V,v=e.computed(()=>m.modelValue?JSON.parse(m.modelValue):[]);function y(u){var r;return typeof u.show=="boolean"?u.show:typeof u.show=="function"?(r=u.show)==null?void 0:r.call(u,{values:v.value}):!0}function f(u,r){const o=[...JSON.parse(m.modelValue??"[]")];o[r]=u,h("update:modelValue",JSON.stringify(o))}return(u,r)=>(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.actionArgsConfigs,o=>(e.openBlock(),e.createElementBlock("div",{key:o.field+o.type},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-item",o.layout])},[e.createElementVNode("div",{class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,H),e.createElementVNode("div",Q,[e.createVNode(e.unref(C._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":v.value[o.field],"onUpdate:modelValue":p=>f(p,o.field)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2),[[e.vShow,y(o)]])]))),128))]))}}),X={class:"rounded epic-modal-action-main"},Y={class:"epic-modal-left-panel h-full flex flex-col"},Z={class:"flex flex-1 h-0 flex-col"},ee={class:"flex-1 h-0"},te={class:"epic-action-select h-30/100 flex flex-col"},ne={class:"flex-1 overflow-auto pr-8px"},oe=["onClick"],le={class:"text-center pt-42px text-gray-400"},ae={class:"epic-modal-right-panel"},ce={key:1,class:"text-center pt-42px text-gray-400"},se=e.defineComponent({__name:"EActionModal",emits:["add","edit"],setup(E,{expose:V,emit:m}){const h=x.pluginManager.getComponent("modal"),v=e.ref(!0),y=e.inject("pageSchema"),f=e.inject("pageManager",{}),u=e.ref(!1),r=e.ref([]),o=e.ref(null),p=m,i=e.computed(()=>{var l;return t.actionItem.type==="component"?o.value?(l=x.pluginManager.getComponentConfings()[o.value.type].config.action)==null?void 0:l.map(n=>({label:n.describe,value:n.type})):[]:t.actionItem.type==="custom"?Object.entries(f.funcs.value).filter(([n,_])=>typeof _=="function").map(([n])=>({label:n,value:n})):t.actionItem.type==="public"?Object.entries(x.pluginManager.publicMethods).map(([n])=>({label:n,value:n})):[]}),a=e.computed(()=>{if(t.actionItem.type==="component"&&o.value){const l=x.pluginManager.getComponentConfings()[o.value.type].config.action,n=l==null?void 0:l.find(_=>_.type===t.actionItem.methodName);if(n!=null&&n.argsConfigs){const _=n.argsConfigs.findIndex(g=>g.label==="设置数据");_!==-1&&(n.argsConfigs[_]={...o.value,label:"设置数据",field:"0",id:C.getUUID()})}return(n==null?void 0:n.argsConfigs)??[]}return[]}),t=e.reactive({actionItem:{type:"custom",methodName:"test",componentId:null},cacheData:{}});function k(){var l;u.value=!0,v.value=!0,t.actionItem.type="custom",t.actionItem.componentId=null,(l=i.value)!=null&&l.length&&d(i.value[0].value)}function N(l){if(u.value=!0,v.value=!1,o.value=null,l.componentId){const n=C.findSchemaById(y.schemas,l.componentId);o.value=n,r.value=[l.componentId]}e.nextTick(()=>{t.actionItem.componentId=l.componentId,t.actionItem.methodName=l.methodName,t.actionItem.type=l.type,t.actionItem.args=l.args})}function B(){if(!t.actionItem.methodName){alert("请先选择动作方法");return}p(v.value?"add":"edit",C.deepClone(e.toRaw(t.actionItem))),I()}function I(){u.value=!1,r.value=[],t.cacheData={}}function s(l){var n;t.actionItem.componentId=null,t.actionItem.type=l,o.value=null,t.actionItem.methodName=null,r.value=[],(n=i.value)!=null&&n.length&&d(i.value[0].value)}function c(l){var n;t.actionItem.args&&(t.cacheData[t.actionItem.componentId+t.actionItem.methodName]=t.actionItem.args),t.actionItem.componentId=l.id,t.actionItem.type="component",t.actionItem.methodName=null,o.value=l.componentSchema,(n=i.value)!=null&&n.length&&d(i.value[0].value)}function d(l){t.actionItem.methodName=l,t.actionItem.args=t.cacheData[t.actionItem.componentId+t.actionItem.methodName]}return V({handleOpen:k,handleOpenEdit:N}),(l,n)=>(e.openBlock(),e.createBlock(e.unref(h),{modelValue:u.value,"onUpdate:modelValue":n[4]||(n[4]=_=>u.value=_),class:"w-1200px",width:"1200px",onClose:I,onOk:B,title:"动作配置"},{default:e.withCtx(()=>{var _;return[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="custom"}]),onClick:n[0]||(n[0]=g=>s("custom"))}," 自定义函数 ",2),e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="public"}]),onClick:n[1]||(n[1]=g=>s("public"))}," 公共函数 ",2),n[5]||(n[5]=e.createTextVNode(" 组件 ")),e.createElementVNode("div",ee,[e.createVNode(e.unref($._sfc_main),{selectedKeys:r.value,"onUpdate:selectedKeys":n[2]||(n[2]=g=>r.value=g),options:e.unref(y).schemas,onNodeClick:c},null,8,["selectedKeys","options"])])]),e.createElementVNode("div",te,[n[6]||(n[6]=e.createElementVNode("div",{class:"mb-2"},"动作选择",-1)),e.createElementVNode("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,g=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{checked:g.value===t.actionItem.methodName},"epic-action-item"]),onClick:de=>d(g.value),key:g.value},[e.createElementVNode("span",null,e.toDisplayString(g.label),1)],10,oe))),128)),e.withDirectives(e.createElementVNode("div",le," 当前组件暂无动作 ",512),[[e.vShow,!((_=i.value)!=null&&_.length)]])])])]),e.createElementVNode("div",ae,[t.actionItem.type==="custom"?(e.openBlock(),e.createBlock(P,{key:0})):a.value.length===0?(e.openBlock(),e.createElementBlock("div",ce," 暂无配置 ")):(e.openBlock(),e.createBlock(W,{key:2,modelValue:t.actionItem.args,"onUpdate:modelValue":n[3]||(n[3]=g=>t.actionItem.args=g),actionArgsConfigs:a.value},null,8,["modelValue","actionArgsConfigs"]))])])]}),_:1},8,["modelValue"]))}}),ie=e.defineComponent({__name:"index",props:{eventList:{type:Array,default:()=>[]},modelValue:{type:Object}},emits:["update:modelValue"],setup(E,{emit:V}){const m=x.pluginManager.getComponent("Collapse"),h=x.pluginManager.getComponent("CollapseItem"),v=e.ref(null);let y=0;const f=E,u=V,r=e.computed({get(){return f.modelValue},set(s){u("update:modelValue",s)}}),o=e.ref([]),p=e.computed(()=>f.eventList.filter(s=>s.events.length)),i=e.computed(()=>f.eventList.map(s=>s.events).flat()),a=e.ref({});i.value.forEach(s=>{a.value[s.type]=e.computed({get(){var c;return((c=r.value)==null?void 0:c[s.type])??[]},set(c){c&&c.length?r.value[s.type]=c.map(d=>e.toRaw(d)):delete r.value[s.type]}})}),e.watch(()=>p.value,s=>{s.length&&(o.value=s.filter(c=>{for(let d=0;d<c.events.length;d++){const l=c.events[d].type;if(a.value[l].length)return!0}return!1}).map(c=>c.title))},{immediate:!0});let t="";function k(s){var c;(c=v.value)==null||c.handleOpen(),t=s}function N(s,c,d){var l;(l=v.value)==null||l.handleOpenEdit(d),y=s,t=c}function B(s){a.value[t][y]=s,r.value[t]=[...a.value[t]??[]]}function I(s){if(!r.value){r.value={[t]:[...a.value[t]??[],s]};return}r.value[t]=[...a.value[t]??[],s]}return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m),{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=d=>o.value=d),activeKey:o.value,"onUpdate:activeKey":c[2]||(c[2]=d=>o.value=d),"expanded-names":o.value,"onUpdate:expandedNames":c[3]||(c[3]=d=>o.value=d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,d=>(e.openBlock(),e.createBlock(e.unref(h),{key:d.title,title:d.title,header:d.title,name:d.title},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=l=>r.value=l),"item-events":d.events,"all-events":i.value,events:a.value,onAdd:k,onEdit:N},null,8,["modelValue","item-events","all-events","events"])]),_:2},1032,["title","header","name"]))),128))]),_:1},8,["modelValue","activeKey","expanded-names"]),e.createVNode(se,{ref_key:"EActionModalRef",ref:v,onAdd:I,onEdit:B},null,512)],64))}});exports.default=ie;
|
package/dist/index-BccuJTEJ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("./pluginManager-itCTrGag.cjs"),C=require("./index-Bhu7a5V1.cjs"),J=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),G=require("./vuedraggable.umd-BqhSJIAi.cjs"),ee={class:"epic-widget-action-item whitespace-nowrap"},te={key:0,class:"flex items-center"},ne=e.defineComponent({__name:"previewWidgets",setup(F,{expose:M}){const f=e.inject("pageManager",{}),k=e.inject("pageSchema"),s=e.inject("designer"),g=e.inject("designerProps"),c=e.inject("revoke"),p=e.ref(null),S=e.ref(null),x=e.ref(null),R=e.ref(!1),l=e.ref(!1),a=e.ref(!0),i=e.ref("top"),{canvasScale:r,disabledZoom:b}=C.useStore();let n=null;const L=e.computed(()=>{const t=s.state.checkedNode;return!(!(t!=null&&t.id)||g.value.lockDefaultSchemaEdit&&f.defaultComponentIds.value.includes(t==null?void 0:t.id))}),T=e.computed(()=>{var B,V,$,m,O,D;const t=f.componentInstances.value,u=(B=s.state.checkedNode)==null?void 0:B.id;if(($=(V=s.state.checkedNode)==null?void 0:V.componentProps)!=null&&$.hidden)return null;const _=H.pluginManager.getComponentConfingByType((m=s.state.checkedNode)==null?void 0:m.type)??null;if(!u||!(t!=null&&t[u]))return null;if(_!=null&&_.defaultSchema.input&&((O=s.state.checkedNode)==null?void 0:O.noFormItem)!==!0)return(D=t[u+"formItem"])==null?void 0:D.$el;const o=t[u];return!(o!=null&&o.$el)||(o==null?void 0:o.$el.nodeName)==="#text"||!(o!=null&&o.$el.getBoundingClientRect)?null:o==null?void 0:o.$el}),E=e.computed(()=>{var B,V,$,m;const t=f.componentInstances.value,u=(B=s.state.hoverNode)==null?void 0:B.id,_=H.pluginManager.getComponentConfingByType((V=s.state.hoverNode)==null?void 0:V.type)??null;if(!u||!(t!=null&&t[u]))return null;if(_!=null&&_.defaultSchema.input&&(($=s.state.hoverNode)==null?void 0:$.noFormItem)!==!0)return(m=t[u+"formItem"])==null?void 0:m.$el;const o=t[u];return(o==null?void 0:o.$el.nodeName)==="#text"?null:o==null?void 0:o.$el}),{mutationObserver:P,observerConfig:W}=Z(j),{startTimedQuery:d,stopTimedQuery:y}=C.useTimedQuery(j);e.watch(()=>T.value,t=>{if(t){R.value=!0,P.observe(t,W);const u=t.parentNode;u&&(u.ondragstart=()=>{a.value=!1,d()},u.ondragend=()=>{a.value=!0,y()}),j()}else R.value=!1});const{mutationObserver:v,observerConfig:w}=Z(q);e.watch(()=>E.value,t=>{t&&(v.observe(t,w),q())});let h=0;e.watch(()=>{var t;return(t=s.state.hoverNode)==null?void 0:t.id},t=>{if(t){l.value=!0,clearTimeout(h);return}h=setTimeout(()=>{l.value=!1},300)});let N=0,z=0;function j(){const t=T.value;if(!t||!n)return;const{top:u,left:_}=n==null?void 0:n.getBoundingClientRect(),{top:o,left:B,width:V,height:$}=t.getBoundingClientRect(),m=b.value?1:r.value,O=o-u+((n==null?void 0:n.scrollTop)??0)*m,D=B-_+((n==null?void 0:n.scrollLeft)??0)*m,I=$/m;p.value&&(p.value.style.width=`${V/m}px`,p.value.style.height=`${I}px`,p.value.style.top=`${O/m}px`,p.value.style.left=`${D/m}px`,A(O,D)),x.value&&(O<45&&I<100?(x.value.style.top="",x.value.style.bottom="-30px",x.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):O<45?(x.value.style.top="0px",x.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(x.value.style.top="-30px",x.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function A(t,u){const _=T.value;if(!n||!_)return;const o=n.getBoundingClientRect(),{width:B}=_.getBoundingClientRect(),V=b.value?1:r.value,$=t/V-o.top;let m=u/V-o.left+B/V;m<o.width&&(m=0);const O=n.scrollTop-o.height/3+60,D=n.scrollTop+o.height/3*2,I=n.scrollLeft-o.width+200,U=n.scrollLeft+o.width-200;Math.abs($-N)<10&&Math.abs(m-z)<10||(N=$,z=m,!($>O&&$<D&&m>I&&m<U)&&(n.scrollTop=$,n.scrollLeft=m))}function q(){var I,U;const t=E.value;if(!t)return;const{top:u,left:_}=(n==null?void 0:n.getBoundingClientRect())??{top:0,left:0},{top:o,left:B,width:V,height:$}=((I=t.getBoundingClientRect)==null?void 0:I.call(t))??((U=t.nextElementSibling)==null?void 0:U.getBoundingClientRect()),m=b.value?1:r.value,O=o-u+((n==null?void 0:n.scrollTop)??0)*m,D=B-_+((n==null?void 0:n.scrollLeft)??0)*m;S.value&&(S.value.style.width=`${V/m}px`,S.value.style.height=`${$/m}px`,S.value.style.top=`${O/m}px`,S.value.style.left=`${D/m}px`)}function Z(t){const u=window.MutationObserver,_={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new u(t),observerConfig:_}}function K(){var V;const t=C.findSchemaInfoById(k.schemas,((V=s.state.checkedNode)==null?void 0:V.id)??"root");if(!t)return!1;const{list:u,schema:_,index:o}=t,B=C.generateNewSchema(_);u.splice(o+1,0,B),s.setCheckedNode(B),c.push(k.schemas,"复制组件")}function X(){var B;const t=C.findSchemaInfoById(k.schemas,((B=s.state.checkedNode)==null?void 0:B.id)??"root");if(!t)return!1;let{list:u,schema:_,index:o}=t;u.splice(o,1),o===u.length&&o--,s.setCheckedNode(u[o]),c.push(k.schemas,"删除组件")}function Y(t){n=t,n==null||n.addEventListener("scroll",()=>{j()}),C.useResizeObserver(T,j),C.useResizeObserver(E,q)}return M({handleInit:Y}),(t,u)=>{var _,o,B,V,$;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:p,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(a.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:x},[e.createElementVNode("div",ee,e.toDisplayString((o=e.unref(H.pluginManager).getComponentConfingByType(((_=e.unref(s).state.checkedNode)==null?void 0:_.type)??""))==null?void 0:o.defaultSchema.label),1),L.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",{title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:K},[e.createVNode(e.unref(J._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})]),e.createElementVNode("div",{title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:X},[e.createVNode(e.unref(J._sfc_main),{name:"icon--epic--delete-outline-rounded"})])])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,R.value&&((B=e.unref(s).state.checkedNode)==null?void 0:B.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:S,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,l.value&&((V=e.unref(s).state.checkedNode)==null?void 0:V.id)!==(($=e.unref(s).state.hoverNode)==null?void 0:$.id)]])],64)}}}),oe=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:M}){const f=e.inject("designer"),k=e.inject("pageSchema"),s=e.inject("revoke"),g=F,c=M,p=e.computed({get(){return g.schemas},set(a){c("update:schemas",a)}});function S(a){f.setCheckedNode(p.value[a]),f.setDisableHover(!0)}function x(){f.setDisableHover(),s.push(k.schemas,"拖拽组件")}function R(){s.push(k.schemas,"插入组件")}function l(a){var i,r,b;return a.id===((i=k.schemas[0])==null?void 0:i.id)||(b=(r=H.pluginManager.getComponentConfingByType(a.type))==null?void 0:r.editConstraints)!=null&&b.immovable?"unmover-item":"draggable-item"}return(a,i)=>(e.openBlock(),e.createBlock(e.unref(G.draggable),e.mergeProps({modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=r=>p.value=r),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=r=>S(r.oldIndex)),onEnd:i[2]||(i[2]=r=>x()),onAdd:i[3]||(i[3]=r=>{S(r.newIndex),R()})}),{item:e.withCtx(({element:r,index:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",l(r)]),key:b},[e.createVNode(Q,{schema:r},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),Q=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const M=e.useAttrs(),f=e.inject("designer"),k=e.inject("pageManager",{}),s=e.inject("pageSchema",{}),g=e.ref(null);e.provide("nodeAttrs",M);const c=F,p=e.computed(()=>{var b,n,L,T,E;const l=k.componentInstances.value,a=(b=c.schema)==null?void 0:b.id,i=H.pluginManager.getComponentConfingByType((n=c.schema)==null?void 0:n.type)??null;if(!a||!(l!=null&&l[a]))return null;if(i!=null&&i.defaultSchema.input&&((L=c.schema)==null?void 0:L.noFormItem)!==!0)return(T=l[a+"formItem"])==null?void 0:T.$el;const r=l[a];return((E=r==null?void 0:r.$el)==null?void 0:E.nodeName)==="#text"?null:r==null?void 0:r.$el});e.watch(()=>p.value,l=>{l==null||l.addEventListener("click",S,!1),l==null||l.addEventListener("mouseover",x,!1),l==null||l.addEventListener("mouseout",R,!1)}),e.onUnmounted(()=>{var l,a,i;(l=p.value)==null||l.removeEventListener("click",S,!1),(a=p.value)==null||a.removeEventListener("mouseover",x,!1),(i=p.value)==null||i.removeEventListener("mouseout",R,!1)});function S(l){l.stopPropagation(),f.setCheckedNode(c.schema)}function x(l){var a;c.schema.id!==((a=s.schemas[0])==null?void 0:a.id)&&(l.stopPropagation(),f.setHoverNode(c.schema))}function R(l){l.stopPropagation(),f.setHoverNode(null)}return(l,a)=>{var r,b;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(C._sfc_main),{ref_key:"nodeRef",ref:g,componentSchema:c.schema},e.createSlots({_:2},[(b=(r=e.unref(H.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:r.editConstraints)!=null&&b.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,n=>(e.openBlock(),e.createBlock(i,{key:n.id,schema:n},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(oe,{key:0,schemas:c.schema.children,"onUpdate:schemas":a[0]||(a[0]=n=>c.schema.children=n)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),le={class:"min-w-750px rounded h-full"},ae=e.defineComponent({__name:"previewJson",setup(F,{expose:M}){const f=H.pluginManager.getComponent("modal"),k=H.pluginManager.getComponent("monacoEditor"),s={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},g=e.ref(null),c=e.ref(!1),p=e.inject("pageSchema");function S(){c.value=!1}function x(){c.value=!0,g.value?g.value.setValue(JSON.stringify(p,null,2)):setTimeout(()=>{x()},300)}function R(l="epic-data.json"){const a=JSON.stringify(p,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(a)}`,r=document.createElement("a");r.setAttribute("href",i),r.setAttribute("download",l),r.click()}return M({handleOpen:x}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(f),{modelValue:c.value,"onUpdate:modelValue":a[0]||(a[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:S,onOk:R,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",le,[e.createVNode(e.unref(k),{ref_key:"monacoEditorRef",ref:g,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:s,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),re={class:"epic-edit-toolbar flex items-center justify-between px-2"},se={class:"flex-1 h-full flex items-center"},ie={key:0,class:"epic-divider"},ce=["title","onClick"],de={class:"flex-1 h-full flex items-center justify-end"},ue={key:0,class:"flex items-center ml-12px"},fe={class:"pr-8px w-82px cursor-pointer"},pe={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},me=["title","onClick"],ve=e.defineComponent({__name:"toolbar",setup(F){const M=H.pluginManager.getComponent("select"),{canvasScale:f,disabledZoom:k}=C.useStore(),s=e.ref("pc"),g=e.inject("pageSchema"),c=e.inject("designer"),p=e.inject("revoke"),S=e.ref(null),x=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],R=e.computed(()=>[{icon:"icon--epic--code",title:"查看数据",on:()=>L()},{icon:"icon--epic--exit-to-app-rounded",title:"导入数据",on:T},{icon:"icon--epic--trash",title:"清空",on:n},{icon:"icon--epic--undo",title:"撤销",on:r,disabled:!p.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:b,disabled:!p.undoList.value.length}]),l=e.ref(null),a=e.computed({get(){return`${(f.value*100).toFixed(0)}%`},set(d){const y=parseFloat(d);f.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function r(){const d=p.undo();d&&(C.deepCompareAndModify(g.schemas,d),c.setCheckedNode(g.schemas[0]))}function b(){const d=p.redo();d&&(C.deepCompareAndModify(g.schemas,d),c.setCheckedNode(g.schemas[0]))}function n(){c.reset()}function L(){S.value.handleOpen()}function T(){var d;(d=l.value)==null||d.click()}function E(d){var w;const y=(w=d.target.files)==null?void 0:w[0];if(!y)return;d.target.value=null;const v=new FileReader;v.readAsText(y),v.onload=h=>{var N;P((N=h.target)==null?void 0:N.result)}}function P(d){try{let y=JSON.parse(d??"");y.schemas||(y=C.convertKFormData(y)),C.deepCompareAndModify(g,y)}catch(y){console.error(y)}}function W(d){c.handleToggleDeviceMode(d),s.value=d;const y={pc:{},pad:{width:"780px",mode:d},mobile:{width:"390px",mode:d}};g.canvas=y[d]}return(d,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(v,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:w},[v.divider?(e.openBlock(),e.createElementBlock("div",ie)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:v.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:v.disabled}]),onClick:v.on},[e.createVNode(e.unref(J._sfc_main),{name:v.icon},null,8,["name"])],10,ce)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:l,accept:".json,.txt",onChange:E},null,544),[[e.vShow,!1]]),e.createElementVNode("div",de,[e.unref(k)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",fe,[e.createVNode(e.unref(M),{value:a.value,"onUpdate:value":y[0]||(y[0]=v=>a.value=v),modelValue:a.value,"onUpdate:modelValue":y[1]||(y[1]=v=>a.value=v),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",pe,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(x,v=>e.createElementVNode("div",{key:v.key,title:v.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:v.key===s.value}]),onClick:w=>W(v.key)},[e.createVNode(e.unref(J._sfc_main),{name:v.icon},null,8,["name"])],10,me)),64))])])]),e.createVNode(ae,{ref_key:"previewJson",ref:S},null,512)],64))}}),he={class:"h-full flex flex-col relative"},ge=["draggable"],xe=e.defineComponent({__name:"editScreenContainer",setup(F){const M=e.inject("pageSchema"),f=e.ref(null),k=e.ref(null),s=e.ref(null),{pressSpace:g,disabledZoom:c}=C.useStore(),{handleElementDragStart:p,handleElementDrag:S,handleElementDragEnd:x}=C.useElementDrag(f),{width:R,height:l}=C.useElementSize(f),{canvasScale:a,handleZoom:i}=C.useElementZoom(k);let r=0,b=0;const n=e.ref({}),L=e.ref({}),T=e.ref({}),E=e.shallowRef({width:0,height:0});e.watchEffect(W),e.watch(T,()=>{e.nextTick(P)});function P(){s.value&&(E.value={width:s.value.clientWidth,height:s.value.clientHeight})}function W(){var w,h;T.value={width:((w=M.canvas)==null?void 0:w.width)??"0",height:((h=M.canvas)==null?void 0:h.height)??"0"}}C.watchOnce(R,d),e.watch(E,d);function d(){let w=E.value.width||r,h=E.value.height||b;n.value={width:R.value+w+"px",height:l.value+h+"px"},L.value={width:w+"px",height:h+"px"},y()}function y(){e.nextTick(()=>{var j;let w=E.value.width||r;const N=(E.value.height||b)/2,z=w/2;(j=f.value)==null||j.scrollTo(z,N)})}C.useResizeObserver(f,v),C.useResizeObserver(k,v);function v(){var h;if(!f.value)return;const w=f.value.getBoundingClientRect();if(r=w.width-60,b=w.height-80,!c.value)if(E.value.width===0)a.value=1;else{const N=(r-20)/E.value.width,z=b/(E.value.height||((h=k.value)==null?void 0:h.clientHeight)||1),j=Math.abs(N-1)<Math.abs(z-1);let A=1;j?A=N:A=z,(N<1||z<1)&&(A=Math.min(N,z)),A<1.4&&A>.5&&(a.value=A)}C.debounce(d,50)()}return(w,h)=>(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(ve),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:f,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(g)}]),draggable:e.unref(g),onWheel:h[0]||(h[0]=(...N)=>e.unref(i)&&e.unref(i)(...N)),onDragstart:h[1]||(h[1]=(...N)=>e.unref(p)&&e.unref(p)(...N)),onDragend:h[2]||(h[2]=(...N)=>e.unref(x)&&e.unref(x)(...N)),onDrag:h[3]||(h[3]=(...N)=>e.unref(S)&&e.unref(S)(...N))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:k,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(g)}),style:e.normalizeStyle(L.value)},[e.renderSlot(w.$slots,"default")],6)],512)],4)],42,ge),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:s,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(T.value)},null,4)]))}}),ye={class:"epic-edit-canvas"},_e=e.defineComponent({__name:"index",setup(F){const M=e.ref(null),f=e.ref(null),k=e.inject("pageSchema"),s=e.computed(()=>k.schemas[0]),g=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=f.value)==null||c.handleInit(M.value)}),(c,p)=>(e.openBlock(),e.createElementBlock("section",ye,[e.createVNode(xe,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:M,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(g.value)},[e.createVNode(Q,{schema:s.value},null,8,["schema"]),e.createVNode(ne,{ref_key:"ePreviewWidgetsRef",ref:f},null,512)],4)]),_:1})]))}});exports.default=_e;
|
package/dist/index-Bhu7a5V1.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),E=require("./pluginManager-itCTrGag.cjs");function T(t=10){const a="abcdefghijklmnopqrstuvwxyz0123456789";let o="";for(let r=0;r<t;r++){const n=Math.floor(Math.random()*a.length);o+=a[n]}return o}function G(t){return t.charAt(0).toUpperCase()+t.slice(1)}function V(t,a=new WeakMap){if(typeof t!="object"||t===null)return t;if(a.has(t))return a.get(t);if(Array.isArray(t)){const r=t.map(n=>V(n,a));return a.set(t,r),r}const o={};return a.set(t,o),Object.keys(t).forEach(r=>{o[r]=V(t[r],a)}),o}function ue(t){const[a]=j([V(t)],o=>{var n,s;const r={...o,id:`${o.type}_${T(8)}`};return(r.field||r.input)&&!((s=(n=E.pluginManager.getComponentConfingByType(r.type))==null?void 0:n.editConstraints)!=null&&s.fixedField)&&(r.field=r.id),r});return a}function M(t,a,o=!0){for(const[r,n]of Object.entries(a)){let s=t==null?void 0:t[r];s&&n&&typeof s=="object"&&typeof n=="object"?(Array.isArray(s)&&!Array.isArray(n)?s=t[r]={}:!Array.isArray(s)&&Array.isArray(n)&&(s=t[r]=[]),M(s,n,o)):t[r]=n}o&&Object.keys(t).reverse().forEach(r=>{a.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function K(t,a,o=[],r=new WeakMap){const n=s=>{if(Array.isArray(s))return s.map(n);if(typeof s=="object"&&s!==null){if(r.has(s))return"[Circular]";r.set(s,!0);const l=Object.keys(s).sort(),c={};return l.forEach(u=>{o.includes(u)||(c[u]=n(s[u]))}),r.delete(s),c}else return s};return JSON.stringify(n(t))===JSON.stringify(n(a))}function Y(t,a){const o=[];let r=!1;function n(s){if(o.push(s),s.id===a&&(r=!0),!r&&s.children!=null&&s.children.length>0)for(let l=0;l<s.children.length&&(n(s.children[l]),!r);l++);if(!r&&s.slots)for(let l in s.slots)for(let c=0;c<s.slots[l].length&&(n(s.slots[l][c]),!r);c++);r||o.pop()}return t.forEach(n),r||console.error(`没有查询到id为${a}的节点`),o}function de(t,a,o){const r=a.split(".");let n=t;for(let s=0;s<r.length;s++){if(n==null)return o;n=n[r[s]]}return n===void 0?o:n}function fe(t,a,o){const r=a.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let n=t;for(let s=0;s<r.length-1;s++){const l=r[s];n[l]==null&&(n[l]=isNaN(Number(r[s+1]))?{}:[]),n=n[l]}return n[r[r.length-1]]=o,t}function pe(t,a="default"){return X(t,a).map(r=>r.field)}function X(t,a="default"){const o=O(t,n=>{var s;return n.type==="form"&&(((s=n.componentProps)==null?void 0:s.name)??n.name===a)},!0);return O((o==null?void 0:o.children)??[],n=>!!n.input,!1,n=>n.type!=="subform")}function O(t,a,o=!1,r){const n=[],s=[...t];for(;s.length;){const l=s.pop();if(l!=null&&l.children&&(!r||r(l))&&s.push(...l.children),l!=null&&l.slots&&(!r||r(l)))for(let c in l.slots)s.push(...l.slots[c]);if(a(l)&&(n.push(l),o))return l}return o?!1:n}function j(t,a,o){const r=[...t];for(;r.length;){const n=r.pop();if(n!=null&&n.children&&(!o||o(n))&&r.push(...n.children),n!=null&&n.slots&&(!o||o(n)))for(let s in n.slots)r.push(...n.slots[s]);M(n,a(n))}return t}function me(t,a){const o=O(t,r=>r.id===a,!0);if(!o)throw new Error(`没有查询到id为${a}的节点`);return o}function he(t,a){const o=[{type:"",children:t}];let r=0,n=null;if(O(o,s=>{if(n=s.children??null,!n){if(s!=null&&s.slots)for(let l in s.slots){n=s.slots[l];for(let c=0;c<n.length;c++)if(n[c].id===a)return r=c,!0}return!1}for(let l=0;l<n.length;l++)if(n[l].id===a)return r=l,!0;return!1},!0),!n)throw new Error(`没有查询到id为${a}的节点`);return{list:n,schema:n[r],index:r}}function ve(t){const a={schemas:[{type:"page",id:"root",label:"页面",children:[{label:"表单",type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+T()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return a.schemas[0].children[0].children=R(t.list),a}function R(t,a){return t.map(o=>{var u,S,h;let r=o.type??"";const n=o.options??{},s=(i,v)=>{r===i&&(r=v,n.defaultValue&&(n.defaultValue=JSON.parse(n.defaultValue)))};if(s("uploadImg","upload-image"),s("uploadFile","upload-file"),r==="date"&&n.range&&(n.type="daterange",delete n.range),(r==="date"||r==="time")&&(n.valueFormat=n.format),r==="textarea"){const{minRows:i,maxRows:v}=n;n.autoSize={minRows:i,maxRows:v},delete n.minRows,delete n.maxRows}r==="number"&&!n.precision&&delete n.precision,n.width&&(n.style={width:n.width},delete n.width),r==="grid"&&(r="row"),a&&a.type==="grid"&&(r="col",n.span=o.span,o.key=T());const l={label:o.label,type:r,icon:o.icon||"",field:o.model,componentProps:n,id:o.key};return(n.noFormItem||!n.showLabel)&&(l.noFormItem=!0,delete n.noFormItem,delete n.showLabel),n.clearable&&(n.allowClear=!0,delete n.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(l.input=!0,((S=(u=o.rules)==null?void 0:u[0])==null?void 0:S.required)===!1&&o.rules.shift(),((h=o.rules)==null?void 0:h.length)>0&&(l.rules=o.rules)),o.list&&(l.children=R(o.list,o)),o.columns&&(l.children=R(o.columns,o)),o.trs&&(l.children=R(o.trs,o)),o.tds&&(l.children=R(o.tds,o)),l})}function ge(t,a){let o=null;return(...r)=>{o&&clearTimeout(o),o=setTimeout(()=>{t(...r)},a)}}function Z(){const t=e.ref({}),a=e.ref({}),o=e.ref(!1),r=e.ref([]),n=e.reactive({});function s(p){return t.value[p]}function l(p,y){t.value[p]=y}function c(p){delete t.value[p]}function u(p,y=!1){const w=Object.entries(E.pluginManager.publicMethods).reduce((C,[I,B])=>(C[I]=B.handler,C),{});try{new Function(`const epic = this;${p}`).bind({...w,getComponent:s,find:s,defineExpose:S,publicMethods:w,pluginManager:E.pluginManager})()}catch(C){y&&console.error("[epic:自定义函数]异常:",C)}}function S(p){p!=null&&(a.value=p)}function h(p,...y){if(!p||p.length===0){console.warn("未提供任何动作");return}p.forEach(w=>{const C=w.args?JSON.parse(w.args):y;switch(w.type){case"public":i(w,C);break;case"custom":v(w,C);break;case"component":d(w,C);break;default:console.warn(`未知的动作类型: ${w.type}`);break}})}function i(p,y){var w;try{(w=E.pluginManager.publicMethods[p.methodName])==null||w.handler(...y)}catch(C){console.error(`[Epic:公共函数(${p.methodName})]执行异常:`,C)}}function v(p,y){var w,C;try{(C=(w=a.value)[p.methodName])==null||C.call(w,...y)}catch(I){console.error(`[Epic:自定义函数(${p.methodName})]执行异常:`,I)}}function d(p,y){const w=p.componentId!=null&&s(p.componentId);if(!w){console.warn(`[Epic:组件${p.componentId}]未找到`);return}try{w[p.methodName](...y)}catch(C){console.error(`[Epic:组件${p.componentId}函数(${p.methodName})]执行异常:`,C)}}function m(p=!0){o.value=p}function f(p){const y=O(p,()=>!0);r.value=y.map(w=>w.id)}function k(p,y="default"){if(n[y]){const w=n[y];M(p,w)}n[y]=p}function D(p,y="default"){if(n[y]){M(n[y],p,!1);return}n[y]=p}return{componentInstances:t,funcs:a,isDesignMode:o,defaultComponentIds:r,forms:n,addFormData:k,setFormData:D,getComponentInstance:s,find:s,addComponentInstance:l,removeComponentInstance:c,setMethods:u,doActions:h,setDesignMode:m,setDefaultComponentIds:f}}function ee(){const t=e.ref([]),a=e.ref([]),o=e.ref(null);let r=0;function n(u,S="插入组件"){const h=Date.now();r+150>h||(r=h,o.value!=null&&(t.value.push(o.value),a.value.splice(0,a.value.length)),o.value={type:S,componentSchema:JSON.stringify(u)},t.value.length>60&&t.value.unshift())}function s(){if(t.value.length===0)return!1;const u=t.value.pop();return o.value!=null&&a.value.push(o.value),o.value=u,JSON.parse(u.componentSchema)}function l(){if(a.value.length===0)return!1;const u=a.value.pop();return o.value!=null&&t.value.push(o.value),o.value=u,JSON.parse(u.componentSchema)}function c(){t.value=[],a.value=[],o.value=null}return{recordList:t,undoList:a,currentRecord:o,push:n,undo:s,redo:l,reset:c}}const ye=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:a}){const o=E.pluginManager.getComponent("form-item"),r=t,n=a,s=e.ref(),l=()=>{n("updateFormItemRef",s.value)};return(c,u)=>r.hasFormItem?(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({key:0,ref_key:"formItemRef",ref:s,onVnodeMounted:l},r.formItemProps),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(c.$slots,"default",{key:1})}}),te=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{}},emits:["update:modelValue","change","update:dynamicId"],setup(t,{emit:a}){const{proxy:o}=e.getCurrentInstance(),r=t,n=e.ref(null);let s=e.inject("formData",e.reactive({}));const l=e.inject("slots",{}),c=e.inject("pageManager",{}),u=e.inject("disabled",{value:!1}),S=e.inject("ruleFieldPrefix",null),h=e.inject("resetFormData",!1);let i=e.reactive(V(r.componentSchema));v(),e.watch(()=>r.componentSchema,g=>{K(i,g,["children"])||(M(i,V(g)),v())},{deep:!0});function v(){c.isDesignMode.value&&typeof i.field=="string"&&(i.field+="-design-mode")}(r.resetFormData||h)&&(s={});const d=a,m=e.ref(),f=e.ref(),k=g=>{f.value=g},D=e.useAttrs();Object.keys(D).length&&e.provide("nodeAttrs",D);const p=e.shallowRef(null),y=e.computed(()=>{var g,A;return(g=i.componentProps)!=null&&g.hidden?!1:typeof i.show=="boolean"?i.show:((A=i.show)==null?void 0:A.call(i,{values:s}))??!0}),w=e.computed(()=>{var P;const g=y.value&&((P=i.rules)==null?void 0:P.map(x=>({...x,validator:x.validator&&c.funcs.value[x.validator]})));let A=i.field;r.ruleField?A=r.ruleField:S&&i.field&&(A=V(S),A.push(i.field));const _={...i,rules:g,rule:g,field:A};return _.children&&delete _.children,_}),C=e.computed(()=>{var _,P;const g=((_=I.value)==null?void 0:_.bindModel)??"modelValue",A={};return i.on&&Object.keys(i.on).forEach(x=>{A[`on${G(x)}`]=(...ce)=>c.doActions(i.on[x],...ce)}),{...r,...i.componentProps,disabled:(u==null?void 0:u.value)||((P=i.componentProps)==null?void 0:P.disabled),bindModel:g,...A}}),I=e.computed(()=>E.pluginManager.getComponentConfingByType(i.type)??null);e.watchEffect(()=>{n.value=r.modelValue??s[i.field??""]}),e.watch(()=>n.value,()=>{n.value!==(r.modelValue??s[i.field??""])&&N(n.value)}),e.watch(()=>m.value,()=>{B()},{immediate:!0});function B(){var A;const g=m.value||o;i.id&&g&&(i.input&&(g.setValue=N,g.getValue=()=>s[i.field]||r.modelValue),g.setAttr=(_,P)=>(i.componentProps||(i.componentProps={}),i.componentProps[_]=P),g.getAttr=_=>i.componentProps[_],c.addComponentInstance(i.id,g),(A=I.value)!=null&&A.defaultSchema.input&&i.noFormItem!==!0&&f.value&&c.addComponentInstance(i.id+"formItem",f.value))}function L(){var g;i.id&&(c.removeComponentInstance(i.id),(g=I.value)!=null&&g.defaultSchema.input&&i.noFormItem!==!0&&c.removeComponentInstance(i.id+"formItem"))}async function J(){var A,_,P;if(typeof((A=i.componentProps)==null?void 0:A.defaultValue)<"u"){const x=c.isDesignMode.value?(_=i.componentProps)==null?void 0:_.defaultValue:s[i.field]??((P=i.componentProps)==null?void 0:P.defaultValue);N(V(x))}if(i.type==="slot"){const x=i.slotName;if(!x)return;p.value=e.defineComponent({setup(){return()=>e.renderSlot(l,x,{componentSchema:i,model:s})}});return}const g=E.pluginManager.getComponent(i.type);if(!g){console.error(`组件${i.type}未注册`);return}if(typeof g=="function"){const x=await g();p.value=x.default??x}else p.value=g}function N(g){d("update:modelValue",g),d("change",g),i.field&&(s[i.field]=g)}function U(g){d("update:dynamicId",g)}let b=null;return e.watch(()=>i,g=>{const A=JSON.stringify({...g,children:void 0});if(A===b)return!1;b=A,J()},{immediate:!0,deep:!0}),e.onUnmounted(L),(g,A)=>{var P;const _=e.resolveComponent("ENode");return p.value&&y.value?(e.openBlock(),e.createBlock(ye,{key:0,hasFormItem:e.unref(i).noFormItem!==!0&&((P=I.value)==null?void 0:P.defaultSchema.input),formItemProps:w.value,onUpdateFormItemRef:k},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value),e.mergeProps({ref_key:"componentInstance",ref:m,onVnodeMounted:B,model:e.unref(s)},{...C.value},{[C.value.bindModel]:n.value,["onUpdate:"+C.value.bindModel]:A[0]||(A[0]=x=>n.value=x),[`onUpdate:${C.value.bindModel}`||""]:N,"onUpdate:dynamicId":U}),{node:e.withCtx(x=>[e.createVNode(_,e.normalizeProps(e.guardReactiveProps(x)),null,16)]),"edit-node":e.withCtx(()=>[e.renderSlot(g.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function we(){const t=e.ref(!1),a=Z(),o=e.ref({});function r(){return new Promise(d=>{if(t.value)d();else{const m=e.watch(t,()=>{m(),d()})}})}async function n(d="default"){var f;await r();const m=(f=o.value)==null?void 0:f[d];if(!m)throw new Error(`表单 [name=${d}] 不存在`);return m}async function s(d,m){const f=await n(d);return V(await m(f))}async function l(d="default"){return await s(d,m=>m.getData())}function c(d,m="default"){var k;a.setFormData(d,m);const f=(k=o.value)==null?void 0:k[m];f==null||f.clearValidate()}async function u(d="default"){return await s(d,async m=>(await m.validate(),await m.getData()))}async function S(d){await r();const m={};for(const f in o.value){const k=o.value[f];k&&(m[f]=V(await d(k)))}return m}async function h(){return await S(d=>d.getData())}function i(d){for(const m in d)c(d[m],m)}async function v(){return await S(async d=>(await d.validate(),await d.getData()))}return{ready:t,pageManager:a,forms:o,getData:l,setData:c,validate:u,getForms:h,setForms:i,validateAll:v,getFormInstance:n}}const Se={key:0,class:"epic-loading-box"},be={class:"epic-builder-main"},Ce={class:"epic-loading-box"},ne=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean}},emits:["ready"],setup(t,{expose:a,emit:o}){const r=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),n=o,{ready:s,pageManager:l,forms:c,getData:u,setData:S,validate:h,getForms:i,setForms:v,validateAll:d,getFormInstance:m}=we(),f=t,k=e.reactive({schemas:[]});e.watch(()=>f.pageSchema,w=>{M(k,w)},{immediate:!0,deep:!0}),e.watch(()=>f.formData,w=>{w&&S(w)},{immediate:!0,deep:!0}),e.watch(()=>k.script,w=>{w&&l.setMethods(w,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",l),e.provide("forms",c),e.provide("pageSchema",k),e.provide("disabled",e.computed(()=>f.disabled));const D=e.getCurrentInstance(),p=D==null?void 0:D.proxy;function y(){e.nextTick(()=>{s.value=!0,n("ready",l),p&&l.addComponentInstance("builder",p)})}return a({ready:s,pageManager:l,getData:u,setData:S,validate:h,getForms:i,setForms:v,validateAll:d,getFormInstance:m}),(w,C)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:y},{default:e.withCtx(()=>[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.schemas,(I,B)=>(e.openBlock(),e.createBlock(e.unref(te),{key:B,componentSchema:I},null,8,["componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createVNode(e.unref(r))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Se))}});function Q(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ke(t){let a=0,o,r;const n=()=>{a-=1,r&&a<=0&&(r.stop(),o=void 0,r=void 0)};return(...s)=>(a+=1,r||(r=e.effectScope(!0),o=r.run(()=>t(...s))),Q(n),o)}function $(t){return typeof t=="function"?t():e.unref(t)}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ae=t=>typeof t<"u",xe=Object.prototype.toString,De=t=>xe.call(t)==="[object Object]",Ie=()=>{};function _e(t){return e.getCurrentInstance()}function Pe(t,a=!0,o){_e()?e.onMounted(t,o):a?t():e.nextTick(t)}function Ve(t=!1,a={}){const{truthyValue:o=!0,falsyValue:r=!1}=a,n=e.isRef(t),s=e.ref(t);function l(c){if(arguments.length)return s.value=c,s.value;{const u=$(o);return s.value=s.value===u?$(r):u,s.value}}return n?l:[s,l]}function Me(t,a,o){const r=e.watch(t,(...n)=>(e.nextTick(()=>r()),a(...n)),o);return r}const z=Ee?window:void 0;function F(t){var a;const o=$(t);return(a=o==null?void 0:o.$el)!=null?a:o}function Be(...t){let a,o,r,n;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,r,n]=t,a=z):[a,o,r,n]=t,!a)return Ie;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const s=[],l=()=>{s.forEach(h=>h()),s.length=0},c=(h,i,v,d)=>(h.addEventListener(i,v,d),()=>h.removeEventListener(i,v,d)),u=e.watch(()=>[F(a),$(n)],([h,i])=>{if(l(),!h)return;const v=De(i)?{...i}:i;s.push(...o.flatMap(d=>r.map(m=>c(h,d,m,v))))},{immediate:!0,flush:"post"}),S=()=>{u(),l()};return Q(S),S}function Fe(t){return typeof t=="function"?t:typeof t=="string"?a=>a.key===t:Array.isArray(t)?a=>t.includes(a.key):()=>!0}function oe(...t){let a,o,r={};t.length===3?(a=t[0],o=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(a=!0,o=t[0],r=t[1]):(a=t[0],o=t[1]):(a=!0,o=t[0]);const{target:n=z,eventName:s="keydown",passive:l=!1,dedupe:c=!1}=r,u=Fe(a);return Be(n,s,h=>{h.repeat&&$(c)||u(h)&&o(h)},l)}function W(t,a,o={}){return oe(t,a,{...o,eventName:"keydown"})}function H(t,a,o={}){return oe(t,a,{...o,eventName:"keyup"})}function Ne(){const t=e.ref(!1),a=e.getCurrentInstance();return a&&e.onMounted(()=>{t.value=!0},a),t}function Re(t){const a=Ne();return e.computed(()=>(a.value,!!t()))}function Oe(t){return JSON.parse(JSON.stringify(t))}function re(t,a,o={}){const{window:r=z,...n}=o;let s;const l=Re(()=>r&&"ResizeObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},u=e.computed(()=>{const i=$(t);return Array.isArray(i)?i.map(v=>F(v)):[F(i)]}),S=e.watch(u,i=>{if(c(),l.value&&r){s=new ResizeObserver(a);for(const v of i)v&&s.observe(v,n)}},{immediate:!0,flush:"post"}),h=()=>{c(),S()};return Q(h),{isSupported:l,stop:h}}function $e(t,a={width:0,height:0},o={}){const{window:r=z,box:n="content-box"}=o,s=e.computed(()=>{var i,v;return(v=(i=F(t))==null?void 0:i.namespaceURI)==null?void 0:v.includes("svg")}),l=e.ref(a.width),c=e.ref(a.height),{stop:u}=re(t,([i])=>{const v=n==="border-box"?i.borderBoxSize:n==="content-box"?i.contentBoxSize:i.devicePixelContentBoxSize;if(r&&s.value){const d=F(t);if(d){const m=d.getBoundingClientRect();l.value=m.width,c.value=m.height}}else if(v){const d=Array.isArray(v)?v:[v];l.value=d.reduce((m,{inlineSize:f})=>m+f,0),c.value=d.reduce((m,{blockSize:f})=>m+f,0)}else l.value=i.contentRect.width,c.value=i.contentRect.height},o);Pe(()=>{const i=F(t);i&&(l.value="offsetWidth"in i?i.offsetWidth:a.width,c.value="offsetHeight"in i?i.offsetHeight:a.height)});const S=e.watch(()=>F(t),i=>{l.value=i?a.width:0,c.value=i?a.height:0});function h(){u(),S()}return{width:l,height:c,stop:h}}function Te(t,a,o,r={}){var n,s,l;const{clone:c=!1,passive:u=!1,eventName:S,deep:h=!1,defaultValue:i,shouldEmit:v}=r,d=e.getCurrentInstance(),m=o||(d==null?void 0:d.emit)||((n=d==null?void 0:d.$emit)==null?void 0:n.bind(d))||((l=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:l.bind(d==null?void 0:d.proxy));let f=S;a||(a="modelValue"),f=f||`update:${a.toString()}`;const k=y=>c?typeof c=="function"?c(y):Oe(y):y,D=()=>Ae(t[a])?k(t[a]):i,p=y=>{v?v(y)&&m(f,y):m(f,y)};if(u){const y=D(),w=e.ref(y);let C=!1;return e.watch(()=>t[a],I=>{C||(C=!0,w.value=k(I),e.nextTick(()=>C=!1))}),e.watch(w,I=>{!C&&(I!==t[a]||h)&&p(I)},{deep:h}),w}else return e.computed({get(){return D()},set(y){p(y)}})}function qe(){const{isDark:t}=q(),a=Ve(t);return{isDark:t,toggleDark:a}}function ae(){const t=e.ref(!1);return e.onMounted(()=>{se(t),Le(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function se(t){var a=document.documentElement;a&&(a.classList.contains("dark")?t.value=!0:t.value=!1)}function Le(t){var a=document.querySelector("html"),o=new MutationObserver(function(r){for(var n of r)if(n.type==="attributes"&&n.attributeName==="class"){const s=n.target;new Array(...s.classList).includes("dark")?t.value=!0:t.value=!1}});o.observe(a,{attributes:!0,attributeFilter:["class"]}),e.onUnmounted(()=>{o.disconnect()})}function ie(){const t=e.ref(1),a=e.ref(!1),{isDark:o}=ae(),{pressSpace:r,pressShift:n,pressCtrl:s}=le();return{canvasScale:t,pressSpace:r,pressShift:n,pressCtrl:s,disabledZoom:a,isDark:o}}const q=ke(ie);function le(){const t=e.ref(!1),a=e.ref(!1),o=e.ref(!1);return W(" ",()=>{t.value=!0}),H(" ",()=>{t.value=!1}),W("Shift",r=>{r.preventDefault(),a.value=!0}),H("Shift",()=>{a.value=!1}),W("Control",r=>{r.preventDefault(),o.value=!0}),H("Control",()=>{o.value=!1}),{pressSpace:t,pressShift:a,pressCtrl:o}}function Ue(t){const{pressSpace:a}=q(),o=new Image(1,1);o.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let r=0,n=0;function s(u){var S;a.value&&(r=u.x,n=u.y,(S=u.dataTransfer)==null||S.setDragImage(document.createElement("div"),0,0))}function l(u){if(u.preventDefault(),!u.x||!u.y||!a.value)return;const S=u.x-r,h=u.y-n;r=u.x,n=u.y,t.value&&(t.value.scrollTop-=h,t.value.scrollLeft-=S)}function c(){a.value=!1}return{handleElementDragStart:s,handleElementDrag:l,handleElementDragEnd:c}}function ze(t){const{pressCtrl:a,canvasScale:o,disabledZoom:r}=q();function n(s){if(!a.value||r.value)return;s.preventDefault();let l=0;s.deltaY<0?l=o.value+.05:l=o.value-.05,!(l>150||l<.5)&&(o.value=l)}return e.watch(()=>o.value,s=>{t.value&&!r.value&&(t.value.style.transform=`scale(${s})`)}),{handleZoom:n,canvasScale:o}}function Je(t,a=16.66){let o;function r(){n(),o=window.setInterval(t,a)}function n(){window.clearInterval(o)}return{startTimedQuery:r,stopTimedQuery:n}}const We={class:"min-w-750px rounded"},He={class:"h-full rounded"},Ke=e.defineComponent({__name:"index",setup(t,{expose:a}){const o=E.pluginManager.getComponent("monacoEditor"),r=E.pluginManager.getComponent("modal"),n=e.ref(null),s=e.ref(!1),l=e.ref(!1),c=e.ref({}),u=e.inject("pageSchema"),S=e.ref(null),h=e.ref("");function i(){l.value=!1}function v(){s.value=!1}function d(){s.value=!0,h.value=T()}async function m(){try{let f=await S.value.validateAll();if(!Object.keys(f).length){alert("请添加表单组件后再尝试!");return}Object.keys(f).length===1&&(f=f.default),c.value=JSON.stringify(f,null,2),e.nextTick(()=>{var k;(k=n.value)==null||k.setValue(c.value)}),l.value=!0}catch(f){console.error(f)}}return a({handleOpen:d}),(f,k)=>(e.openBlock(),e.createBlock(e.unref(r),{modelValue:s.value,"onUpdate:modelValue":k[1]||(k[1]=D=>s.value=D),title:"预览",class:"w-900px",width:"900px",onClose:v,onOk:m,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",We,[(e.openBlock(),e.createBlock(e.unref(ne),{key:h.value,ref_key:"kb",ref:S,"page-schema":e.unref(u)},null,8,["page-schema"])),e.createVNode(e.unref(r),{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=D=>l.value=D),title:"表单数据",class:"w-860px",width:"860px",onClose:i,onOk:i},{default:e.withCtx(()=>[e.createElementVNode("div",He,[e.createVNode(e.unref(o),{ref_key:"monacoEditorRef",ref:n,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":c.value},null,8,["model-value"])])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]))}}),Ze={key:0,class:"epic-loading-box"},Qe={class:"epic-designer-main"},Ge={class:"epic-header-container"},Ye={class:"epic-loading-box"},Xe=e.defineComponent({__name:"designer",props:{disabledZoom:{type:Boolean,default:!1},hiddenHeader:{type:Boolean,default:!1},lockDefaultSchemaEdit:{type:Boolean,default:!1},formMode:{type:Boolean,default:!1},title:{default:"EpicDesigner默认项目"},defaultSchema:{},sourceCodeReadOnly:{type:Boolean},source:{default:[]}},emits:["ready","save","reset","toggleDeviceMode","saveSourceData","deleteSourceData","updateSourceData"],setup(t,{expose:a,emit:o}){const r=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-8hE8gNZo.cjs"))),n=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CuxnFxdY.cjs"))),s=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BccuJTEJ.cjs"))),l=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DBQ-tc2k.cjs"))),c=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),u=Z(),S=ee(),h=t;let i={schemas:[{type:"form",id:"root",label:"页面",children:[],componentProps:{name:"表单",style:{padding:"16px"}}}],script:`const { defineExpose, find } = epic;
|
|
2
|
-
|
|
3
|
-
function test (){
|
|
4
|
-
console.log('test')
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// 通过defineExpose暴露的函数或者属性
|
|
8
|
-
defineExpose({
|
|
9
|
-
test
|
|
10
|
-
})`};e.watchEffect(()=>{if(h.defaultSchema){i=h.defaultSchema;return}h.source&&h.source.length&&E.pluginManager.setSourceData(h.source),h.formMode&&(i.schemas=E.pluginManager.formSchemas)}),u.setDesignMode(),u.setDefaultComponentIds(i.schemas);const v=o,d=e.ref(null),m=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),f=e.reactive({schemas:[],script:i.script}),{disabledZoom:k}=q();e.watchEffect(()=>{k.value=h.disabledZoom}),e.watchEffect(()=>{const b=f.script;b&&b!==""&&u.setMethods(b)}),e.provide("pageSchema",f),e.provide("revoke",S),e.provide("pageManager",u),e.provide("designerProps",e.computed(()=>h)),e.provide("designer",{setCheckedNode:p,setHoverNode:y,setDisableHover:C,handleToggleDeviceMode:N,reset:L,state:m}),E.EventBus.on("saveSourceData",b=>{v("saveSourceData",b)}),E.EventBus.on("deleteSourceData",b=>{v("deleteSourceData",b)}),E.EventBus.on("updateSourceData",b=>{v("updateSourceData",b)});function D(){f.schemas=V(i.schemas),p(f.schemas[0]),S.push(f.schemas,"初始化撤销功能")}async function p(b=f.schemas[0]){m.checkedNode=b,m.matched=Y(f.schemas,b.id)}async function y(b=null){var g;if(!b||m.disableHover)return m.hoverNode=null,!1;if((b==null?void 0:b.id)===((g=m.hoverNode)==null?void 0:g.id))return!1;m.hoverNode=b}function w(){e.nextTick(()=>{v("ready",{pageManager:u})})}async function C(b=!1){m.disableHover=b}function I(b){M(f,V(b))}function B(){return e.toRaw(f)}function L(){K(f.schemas,i.schemas)&&f.script===i.script||(M(f.schemas,i.schemas),f.script=i.script,p(f.schemas[0]),S.push(f.schemas,"重置操作"),v("reset",f))}function J(){v("save",e.toRaw(f))}function N(b){v("toggleDeviceMode",b)}function U(){d.value.handleOpen()}return D(),a({revoke:S,setData:I,getData:B,reset:L,preview:U}),(b,g)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:w},{default:e.withCtx(()=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ge,[e.renderSlot(b.$slots,"header",{},()=>[h.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r),{key:0,onPreview:U,onSave:J},{header:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(b.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":b.hiddenHeader}])},[e.createVNode(e.unref(n)),e.createVNode(e.unref(s)),e.createVNode(e.unref(l))],2),e.createVNode(Ke,{ref_key:"previewRef",ref:d},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(e.unref(c))])]),_:3})):(e.openBlock(),e.createElementBlock("div",Ze))}}),je={component:async()=>await Promise.resolve().then(()=>require("./index-CWE_REOU.cjs")),defaultSchema:{label:"代码编辑器",type:"monacoEditor",field:"monacoEditor",icon:"epic-icon-write",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"monacoEditor",field:"componentProps.defaultValue"}]},bindModel:"model-value"},et={component:async()=>await Promise.resolve().then(()=>require("./index-Ch9jeYmj.cjs")),defaultSchema:{label:"页面",type:"page",componentProps:{},children:[]},config:{attribute:[{label:"页面名称",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.name"}]}};function tt(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-DWjMyXtP.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-B8lWNEk-.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-BZf3IisW.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-D14r6xyt.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-CEPcVhC6.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-BVLGR2QA.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-Bj0HJWQW.cjs"))),t.registerActivitybar({id:"component_view",title:"组件",icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-BqD_ySXV.cjs"))}),t.registerActivitybar({id:"sound_code_view",title:"源码",icon:"icon--epic--sdk-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./index-DcPL6st2.cjs"))}),t.registerActivitybar({id:"outline_view",title:"大纲",icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-UAdT8ap6.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:"属性",component:async()=>await Promise.resolve().then(()=>require("./attributeView-DZw_yBnS.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-BrdzlBZA.cjs"))}),t.registerRightSidebar({id:"event_view",title:"事件",component:async()=>await Promise.resolve().then(()=>require("./eventView-BQ5e-Rco.cjs"))}),[je,et].forEach(o=>{t.registerComponent(o)})}tt(E.pluginManager);exports._sfc_main=te;exports._sfc_main$1=ne;exports._sfc_main$2=Xe;exports.capitalizeFirstLetter=G;exports.convertKFormData=ve;exports.debounce=ge;exports.deepClone=V;exports.deepCompareAndModify=M;exports.deepEqual=K;exports.findSchemaById=me;exports.findSchemaInfoById=he;exports.findSchemas=O;exports.generateNewSchema=ue;exports.getDarkState=se;exports.getFormFields=pe;exports.getFormSchemas=X;exports.getMatchedById=Y;exports.getUUID=T;exports.getValueByPath=de;exports.initStore=ie;exports.mapSchemas=j;exports.recursionConvertedNode=R;exports.setValueByPath=fe;exports.useDark=ae;exports.useElementDrag=Ue;exports.useElementSize=$e;exports.useElementZoom=ze;exports.useKeyPress=le;exports.usePageManager=Z;exports.useResizeObserver=re;exports.useRevoke=ee;exports.useStore=q;exports.useTheme=qe;exports.useTimedQuery=Je;exports.useVModel=Te;exports.watchOnce=Me;
|
package/dist/index-Bj0HJWQW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./pluginManager-itCTrGag.cjs"),g=require("element-plus"),c=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),j=require("./axios-tuVKNgv9.cjs"),G={class:"e-data-source"},z={class:"icon-number"},A={class:"drawer-content"},H={class:"drawer-content-left"},Q=["onClick"],W={class:"source-item-title"},X=["onClick"],Y={class:"drawer-content-right"},Z={class:"content"},ee={key:0,class:"content-empty"},te={key:1,class:"content-form"},ae={class:"form-flex"},le={class:"form-item"},oe={class:"form-item-title"},ne={key:0,class:"form-item-content"},re={class:"form-item"},de={class:"form-item-title"},ue={key:0,class:"form-item-content"},se={class:"form-item"},ie={class:"form-item-title"},ce={key:0,class:"form-item-content"},me={class:"content-right-btn"},pe=e.defineComponent({__name:"index",emits:["update:modelValue","update:sourceData"],setup(fe,{emit:ve}){const i=d.pluginManager.getComponent("button"),w=d.pluginManager.getComponent("Drawer"),y=d.pluginManager.getComponent("input"),f=d.pluginManager.getComponent("FormItem"),x=d.pluginManager.getComponent("Form"),B=d.pluginManager.getComponent("RadioGroup"),b=d.pluginManager.getComponent("RadioButton"),v=d.pluginManager.getComponent("select");d.pluginManager.getComponent("switch");const h=e.ref(),S=e.ref(0),L=e.reactive({apiName:[{required:!0,message:"请输入接口名称",trigger:"blur"}],url:[{required:!0,message:"请输入请求地址",trigger:"blur"}],dataKey:[{required:!0,message:"请输入标签键名",trigger:"blur"}],dataValue:[{required:!0,message:"请输入值键名",trigger:"blur"}]}),_=e.ref(!1),p=e.ref([]),t=e.ref(),V=[{label:"1",value:"1"}];function O(){_.value=!0}function M(){const l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return l.charAt(Math.floor(Math.random()*l.length))}function k(l){let a="";for(let o=0;o<l;o++)a+=M();return a}function U(){t.value={id:`${k(5)}`,url:"",body:{},bodyList:[],apiName:`数据源_${k(5)}`,method:"get",params:{},paramsList:[],dataKey:"name",headers:{},headerList:[],dataPath:"",dataValue:"id"},p.value.push(t.value)}function T(l){var a;p.value=JSON.parse(JSON.stringify(d.pluginManager.getSourceData())),((a=t.value)==null?void 0:a.id)===l?t.value={}:(t.value=p.value.find(o=>o.id===l),t.value.paramsList=Object.keys(JSON.parse(t.value.params)).map(o=>({label:o,value:JSON.parse(t.value.params)[o]})),t.value.bodyList=Object.keys(JSON.parse(t.value.body)).map(o=>({label:o,value:JSON.parse(t.value.body)[o]})),t.value.headerList=Object.keys(JSON.parse(t.value.headers)).map(o=>({label:o,value:JSON.parse(t.value.headers)[o]})))}function D(l){d.EventBus.emit("deleteSourceData",l)}function J(){var l;(l=t.value)==null||l.paramsList.push({label:"",value:""})}function P(l){t.value.paramsList.splice(l,1)}function q(){var l;(l=t.value)==null||l.headerList.push({label:"",value:""})}function F(l){t.value.headerList.splice(l,1)}function R(){var l;(l=t.value)==null||l.bodyList.push({label:"",value:""})}function K(l){t.value.bodyList.splice(l,1)}e.onMounted(()=>{p.value=JSON.parse(JSON.stringify(d.pluginManager.getSourceData()))}),d.EventBus.on("updateSource",l=>{p.value=JSON.parse(JSON.stringify(d.pluginManager.getSourceData()))});async function I(){h.value.validate(async l=>{if(l)try{const a={};t.value.paramsList.forEach(r=>{a[r.label]=r.value});const o={};t.value.bodyList.forEach(r=>{o[r.label]=r.value});const m={};t.value.headerList.forEach(r=>{m[r.label]=r.value});let s=await j.axios({method:t.value.method,url:"http://localhost:3333/users",params:a,data:o,headers:m});t.value.dataPath?s.data[t.value.dataPath]&&s.data[t.value.dataPath].length?g.ElMessage({message:s.data[t.value.dataPath].map(r=>({label:r[t.value.dataKey],value:r[t.value.dataValue]}))}):g.ElMessage.info("配置错误"):s.data&&s.data.length?g.ElMessage({message:s.data.map(r=>({label:r[t.value.dataKey],value:r[t.value.dataValue]}))}):g.ElMessage.info("配置错误")}catch{g.ElMessage.error("请求失败")}finally{}else g.ElMessage.error("请填写必填项")})}async function $(){console.log("%c [ ]-390","font-size:13px; background:pink; color:#bf2c9f;",t.value),t.value.body=t.value.bodyList.reduce((l,a)=>(l[a.label]=a.value,l),{}),t.value.params=t.value.paramsList.reduce((l,a)=>(l[a.label]=a.value,l),{}),t.value.headers=t.value.headerList.reduce((l,a)=>(l[a.label]=a.value,l),{}),h.value.validate(l=>{l&&(t.value.id&&t.value.formID?(d.EventBus.emit("updateSourceData",{...t.value,form_id:1,user_id:"0",body:JSON.stringify(t.value.body),params:JSON.stringify(t.value.params),headers:JSON.stringify(t.value.headers)}),t.value={}):(d.EventBus.emit("saveSourceData",{...t.value,form_id:1,user_id:"0",body:JSON.stringify(t.value.body),params:JSON.stringify(t.value.params),headers:JSON.stringify(t.value.headers)}),t.value={}))})}return(l,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(i),{class:"btn",onClick:O},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--window-outline",class:"mr-4px"}),a[8]||(a[8]=e.createElementVNode("span",null,"配置",-1)),e.createElementVNode("span",z,e.toDisplayString(S.value||p.value.length),1)]),_:1}),e.createVNode(e.unref(w),{size:800,modelValue:_.value,"onUpdate:modelValue":a[7]||(a[7]=o=>_.value=o),"append-to-body":"",title:"数据源"},{default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("div",H,[e.createVNode(e.unref(i),{type:"primary",class:"btn",onClick:U},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--add-rounded",class:"mr-4px"}),a[9]||(a[9]=e.createElementVNode("span",null,"新增数据源",-1))]),_:1}),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,o=>{var m;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["source-item",{active:o.id===((m=t.value)==null?void 0:m.id)}]),key:o.id,onClick:s=>T(o.id)},[e.createElementVNode("div",W,[e.createElementVNode("div",null,e.toDisplayString(o.method.toLocaleUpperCase()),1),e.createElementVNode("div",null,e.toDisplayString(o.apiName),1)]),e.createElementVNode("div",{onClick:s=>D(o.id),class:"source-item-icon"},[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,X)],10,Q)}),128))])]),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[!t.value||!Object.keys(t.value).length?(e.openBlock(),e.createElementBlock("div",ee,"请选择数据源")):(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(x),{ref_key:"ruleFormRef",ref:h,model:t.value,"label-position":"top",rules:L,"label-width":120},{default:e.withCtx(()=>{var o,m,s,r,C,E;return[e.createVNode(e.unref(f),{prop:"apiName",label:"接口名称"},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{clearable:"",modelValue:t.value.apiName,"onUpdate:modelValue":a[0]||(a[0]=n=>t.value.apiName=n)},null,8,["modelValue"])]),_:1}),e.createVNode(e.unref(f),{prop:"url",label:"请求地址"},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{modelValue:t.value.url,"onUpdate:modelValue":a[1]||(a[1]=n=>t.value.url=n)},null,8,["modelValue"])]),_:1}),e.createVNode(e.unref(f),{label:"请求方法",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(B),{modelValue:t.value.method,"onUpdate:modelValue":a[2]||(a[2]=n=>t.value.method=n)},{default:e.withCtx(()=>[e.createVNode(e.unref(b),{label:"GET",value:"get"},{default:e.withCtx(()=>a[10]||(a[10]=[e.createTextVNode("GET")])),_:1}),e.createVNode(e.unref(b),{label:"POST",value:"post"},{default:e.withCtx(()=>a[11]||(a[11]=[e.createTextVNode("POST")])),_:1}),e.createVNode(e.unref(b),{label:"PUT",value:"put"},{default:e.withCtx(()=>a[12]||(a[12]=[e.createTextVNode("PUT")])),_:1}),e.createVNode(e.unref(b),{label:"DELETE",value:"delete"},{default:e.withCtx(()=>a[13]||(a[13]=[e.createTextVNode("DELETE")])),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createElementVNode("div",ae,[e.createVNode(e.unref(f),{prop:"dataKey",style:{width:"30%"},label:"标签键名"},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{modelValue:t.value.dataKey,"onUpdate:modelValue":a[3]||(a[3]=n=>t.value.dataKey=n)},null,8,["modelValue"])]),_:1}),e.createVNode(e.unref(f),{prop:"dataValue",style:{width:"30%"},label:"值键名"},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{modelValue:t.value.dataValue,"onUpdate:modelValue":a[4]||(a[4]=n=>t.value.dataValue=n)},null,8,["modelValue"])]),_:1}),e.createVNode(e.unref(f),{style:{width:"33%"},label:"数据位置"},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{modelValue:t.value.dataPath,"onUpdate:modelValue":a[5]||(a[5]=n=>t.value.dataPath=n)},null,8,["modelValue"])]),_:1})]),e.createElementVNode("div",le,[e.createElementVNode("div",oe,[a[15]||(a[15]=e.createTextVNode(" 请求参数 ")),e.createVNode(e.unref(i),{onClick:J,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--add-rounded"}),a[14]||(a[14]=e.createTextVNode(" 添加 "))]),_:1})]),(o=t.value)!=null&&o.paramsList&&((m=t.value)!=null&&m.paramsList.length)?(e.openBlock(),e.createElementBlock("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.paramsList,(n,N)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:n.value},[e.createVNode(e.unref(v),{modelValue:n.label,"onUpdate:modelValue":u=>n.label=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数名"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(v),{modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数值"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(i),{onClick:u=>P(N),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:2},1032,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",re,[e.createElementVNode("div",de,[a[17]||(a[17]=e.createTextVNode(" 请求头 ")),e.createVNode(e.unref(i),{onClick:q,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--add-rounded"}),a[16]||(a[16]=e.createTextVNode(" 添加 "))]),_:1})]),(s=t.value)!=null&&s.headerList&&((r=t.value)!=null&&r.headerList.length)?(e.openBlock(),e.createElementBlock("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.headerList,(n,N)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:N},[e.createVNode(e.unref(v),{modelValue:n.label,"onUpdate:modelValue":u=>n.label=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数名"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(v),{modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数值"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(i),{onClick:u=>F(N),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:2},1032,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",se,[e.createElementVNode("div",ie,[a[19]||(a[19]=e.createTextVNode(" 请求体 ")),e.createVNode(e.unref(i),{onClick:R,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{name:"icon--epic--add-rounded"}),a[18]||(a[18]=e.createTextVNode(" 添加 "))]),_:1})]),(C=t.value)!=null&&C.bodyList&&((E=t.value)!=null&&E.bodyList.length)?(e.openBlock(),e.createElementBlock("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.bodyList,(n,N)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:N},[e.createVNode(e.unref(v),{modelValue:n.label,"onUpdate:modelValue":u=>n.label=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数名"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(v),{modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,filterable:"","allow-create":"",style:{width:"42%"},options:V,placeholder:"参数值"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(i),{onClick:a[6]||(a[6]=u=>K(l.i)),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:1})]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",me,[e.createVNode(e.unref(i),{type:"info",onClick:I},{default:e.withCtx(()=>a[20]||(a[20]=[e.createTextVNode("请求测试")])),_:1}),e.createVNode(e.unref(i),{type:"primary",onClick:$},{default:e.withCtx(()=>a[21]||(a[21]=[e.createTextVNode("保存")])),_:1})])]}),_:1},8,["model","rules"])]))])])])]),_:1},8,["modelValue"])]))}});exports.default=pe;
|