@epxing/designer 0.0.0-stage → 5.3.0-beta.2
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/API.md +160 -0
- package/README.md +45 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/preload-helper.js +88 -0
- package/dist/assets/default-icon-2193FMjv.png +0 -0
- package/dist/assets/technology_bg-oWIS2awO.jpg +0 -0
- package/dist/assets/theme_black-Ctdygcr4.png +0 -0
- package/dist/assets/theme_technology-DJk-2e7g.png +0 -0
- package/dist/assets/theme_white-uMQ6JYml.png +0 -0
- package/dist/src/assets/images/dashboard/theme_black.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_technology.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_white.png.js +4 -0
- package/dist/src/assets/images/default-icon.png.js +4 -0
- package/dist/src/index.js +53 -0
- package/dist/src/page-designer/PageConfigPreview.js +102 -0
- package/dist/src/page-designer/PageDesigner.js +844 -0
- package/dist/src/page-designer/designer.js +1120 -0
- package/dist/src/page-designer/index.js +52 -0
- package/dist/src/page-designer/mixins/dragSourceMixin.js +95 -0
- package/dist/src/page-designer/page-variable-panel/JsonEditor.js +106 -0
- package/dist/src/page-designer/page-variable-panel/PageVariablePanel.js +939 -0
- package/dist/src/page-designer/page-variable-panel/index.js +7 -0
- package/dist/src/page-designer/page-variable-panel/jsonlint.js +230 -0
- package/dist/src/page-designer/previews/add-form/Preview.js +8 -0
- package/dist/src/page-designer/previews/add-form/Preview.vue.js +328 -0
- package/dist/src/page-designer/previews/add-form-item/Preview.js +194 -0
- package/dist/src/page-designer/previews/button/Preview.js +30 -0
- package/dist/src/page-designer/previews/card/Preview.js +87 -0
- package/dist/src/page-designer/previews/carousel/CarouselItemPreview.js +33 -0
- package/dist/src/page-designer/previews/carousel/Preview.js +61 -0
- package/dist/src/page-designer/previews/collapse/CollapseItemPreview.js +118 -0
- package/dist/src/page-designer/previews/collapse/Preview.js +35 -0
- package/dist/src/page-designer/previews/dropdown/Preview.js +68 -0
- package/dist/src/page-designer/previews/entity-list/Preview.js +522 -0
- package/dist/src/page-designer/previews/entity-sub-list/Preview.js +352 -0
- package/dist/src/page-designer/previews/entity-virtual-list/Preview.js +11 -0
- package/dist/src/page-designer/previews/form-field/preview/Checkbox.js +91 -0
- package/dist/src/page-designer/previews/form-field/preview/Date.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Input.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/InputNumber.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/Object.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Radio.js +146 -0
- package/dist/src/page-designer/previews/form-field/preview/Select.js +78 -0
- package/dist/src/page-designer/previews/form-field/preview/Textarea.js +78 -0
- package/dist/src/page-designer/previews/grid/Preview.js +139 -0
- package/dist/src/page-designer/previews/html/Preview.js +18 -0
- package/dist/src/page-designer/previews/icon/Preview.js +20 -0
- package/dist/src/page-designer/previews/image/Preview.js +36 -0
- package/dist/src/page-designer/previews/index.js +74 -0
- package/dist/src/page-designer/previews/layout/ColumnPreview.js +47 -0
- package/dist/src/page-designer/previews/layout/Preview.js +110 -0
- package/dist/src/page-designer/previews/num/Preview.js +132 -0
- package/dist/src/page-designer/previews/page-tabs/Preview.js +75 -0
- package/dist/src/page-designer/previews/step/Preview.js +207 -0
- package/dist/src/page-designer/previews/tabs/Preview.js +95 -0
- package/dist/src/page-designer/previews/tabs/tab-pane/Preview.js +33 -0
- package/dist/src/page-designer/previews/text/Preview.js +38 -0
- package/dist/src/page-designer/previews/text-editor/Preview.js +23 -0
- package/dist/src/page-designer/previews/video/Preview.js +10 -0
- package/dist/src/page-designer/setting-panel/Advance.js +281 -0
- package/dist/src/page-designer/setting-panel/CodeEditor.js +94 -0
- package/dist/src/page-designer/setting-panel/Property.js +165 -0
- package/dist/src/page-designer/setting-panel/Setting.js +296 -0
- package/dist/src/page-designer/setting-panel/Style.js +1591 -0
- package/dist/src/page-designer/setting-panel/css-editor/CssEditor.js +98 -0
- package/dist/src/page-designer/setting-panel/css-editor/css-hint.js +84 -0
- package/dist/src/page-designer/setting-panel/index.js +11 -0
- package/dist/src/page-designer/template-attribute-panel/TemplateAttributePanel.js +487 -0
- package/dist/src/page-designer/template-attribute-panel/index.js +5 -0
- package/dist/src/page-designer/template-library/Library.js +219 -0
- package/dist/src/page-designer/template-library/index.js +5 -0
- package/dist/src/page-designer/widget-library/Base.js +170 -0
- package/dist/src/page-designer/widget-library/Library.js +213 -0
- package/dist/src/page-designer/widget-library/index.js +7 -0
- package/dist/src/page-designer/widget-preview/Container.js +80 -0
- package/dist/src/page-designer/widget-preview/DragGhost.js +54 -0
- package/dist/src/page-designer/widget-preview/DropZoneOverlay.js +42 -0
- package/dist/src/page-designer/widget-preview/HoverOverlay.js +61 -0
- package/dist/src/page-designer/widget-preview/Mixin.js +260 -0
- package/dist/src/page-designer/widget-preview/Placeholder.js +28 -0
- package/dist/src/page-designer/widget-preview/Preview.js +277 -0
- package/dist/src/page-designer/widget-preview/PreviewItem.js +83 -0
- package/dist/src/page-designer/widget-preview/SelectedOverlay.js +332 -0
- package/dist/src/page-designer/widget-preview/Template.js +66 -0
- package/dist/src/page-designer/widget-preview/WidgetWrapper.js +170 -0
- package/dist/src/page-designer/widget-preview/directive.js +159 -0
- package/dist/src/page-designer/widget-preview/dropPosition.js +50 -0
- package/dist/src/page-designer/widget-preview/index.js +23 -0
- package/dist/src/page-designer/widget-preview/overlayPositionMixin.js +87 -0
- package/dist/src/page-designer/widget-preview/resolvePreviewName.js +32 -0
- package/dist/src/page-designer/widget-tree/Item.js +580 -0
- package/dist/src/page-designer/widget-tree/Tree.js +855 -0
- package/dist/src/page-designer/widget-tree/index.js +7 -0
- package/dist/src/visual/AddForm.js +172 -0
- package/dist/src/visual/AddFormItem.js +480 -0
- package/dist/src/visual/AppIndex.js +243 -0
- package/dist/src/visual/ApplyForm.js +135 -0
- package/dist/src/visual/AttributeList.js +344 -0
- package/dist/src/visual/BasePage.js +77 -0
- package/dist/src/visual/Button.js +5 -0
- package/dist/src/visual/Button.vue.js +89 -0
- package/dist/src/visual/CardNum.js +74 -0
- package/dist/src/visual/CategoryList.js +569 -0
- package/dist/src/visual/Chart.js +27 -0
- package/dist/src/visual/ChartNew.js +5 -0
- package/dist/src/visual/ChartNew.vue.js +54 -0
- package/dist/src/visual/CheckForm.js +110 -0
- package/dist/src/visual/ClientList.js +41 -0
- package/dist/src/visual/CodeManage.js +113 -0
- package/dist/src/visual/Component.js +6 -0
- package/dist/src/visual/Component.vue.js +1332 -0
- package/dist/src/visual/ComponentList.js +280 -0
- package/dist/src/visual/Config.js +8 -0
- package/dist/src/visual/Config.vue.js +862 -0
- package/dist/src/visual/ConfigItem.js +8 -0
- package/dist/src/visual/ConfigItem.vue.js +192 -0
- package/dist/src/visual/ConfigSelectItems.js +8 -0
- package/dist/src/visual/ConfigSelectItems.vue.js +260 -0
- package/dist/src/visual/CreatePage.js +389 -0
- package/dist/src/visual/DashboardDiv.js +58 -0
- package/dist/src/visual/DashboardTabs.js +9 -0
- package/dist/src/visual/DashboardTabs.vue.js +127 -0
- package/dist/src/visual/DashboardWidget.js +5 -0
- package/dist/src/visual/DashboardWidget.vue.js +62 -0
- package/dist/src/visual/DblogList.js +82 -0
- package/dist/src/visual/EntityAddPage.js +49 -0
- package/dist/src/visual/EntityApplyPage.js +54 -0
- package/dist/src/visual/EntityCardList.js +455 -0
- package/dist/src/visual/EntityCheckPage.js +66 -0
- package/dist/src/visual/EntityFindPage.js +45 -0
- package/dist/src/visual/EntityList.js +6 -0
- package/dist/src/visual/EntityList.vue.js +1221 -0
- package/dist/src/visual/EntityListPage.js +43 -0
- package/dist/src/visual/EntityNoSubmitSubList.js +267 -0
- package/dist/src/visual/EntityRightSubList.js +29 -0
- package/dist/src/visual/EntitySubAdd.js +10 -0
- package/dist/src/visual/EntitySubGridItem.js +66 -0
- package/dist/src/visual/EntitySubList.js +434 -0
- package/dist/src/visual/EntityTreeFindPage.js +32 -0
- package/dist/src/visual/EntityTreeManage.js +49 -0
- package/dist/src/visual/EntityTreePage.js +42 -0
- package/dist/src/visual/ExcelPreview.js +10 -0
- package/dist/src/visual/FormField.js +5 -0
- package/dist/src/visual/FormField.vue.js +121 -0
- package/dist/src/visual/HeaderNew.js +161 -0
- package/dist/src/visual/Html.js +8 -0
- package/dist/src/visual/Html.vue.js +109 -0
- package/dist/src/visual/Import.js +53 -0
- package/dist/src/visual/InterfaceSubList.js +21 -0
- package/dist/src/visual/ListFirst.js +704 -0
- package/dist/src/visual/MEntityAddPage.js +66 -0
- package/dist/src/visual/MEntityList.js +485 -0
- package/dist/src/visual/MEntityListPage.js +40 -0
- package/dist/src/visual/MEntitySubList.js +237 -0
- package/dist/src/visual/MetaList.js +23 -0
- package/dist/src/visual/ModuleIndexPage.js +67 -0
- package/dist/src/visual/ModuleList.js +47 -0
- package/dist/src/visual/NavAddForm.js +173 -0
- package/dist/src/visual/NavFormCatalogItem.js +44 -0
- package/dist/src/visual/NumItem.js +70 -0
- package/dist/src/visual/NumStatistic.js +6 -0
- package/dist/src/visual/NumStatistic.vue.js +81 -0
- package/dist/src/visual/OrgChart.js +107 -0
- package/dist/src/visual/PageCatalog.js +27 -0
- package/dist/src/visual/PageConfig.js +223 -0
- package/dist/src/visual/PageTabs.js +49 -0
- package/dist/src/visual/Progress.js +40 -0
- package/dist/src/visual/ProgressItem.js +44 -0
- package/dist/src/visual/SystemManager.js +77 -0
- package/dist/src/visual/Title.js +45 -0
- package/dist/src/visual/TodoList.js +14 -0
- package/dist/src/visual/UserFormItem.js +41 -0
- package/dist/src/visual/UserManage.js +35 -0
- package/dist/src/visual/chart/CircularPie.js +9 -0
- package/dist/src/visual/chart/Column.js +70 -0
- package/dist/src/visual/chart/HoriColumn.js +9 -0
- package/dist/src/visual/chart/Line.js +9 -0
- package/dist/src/visual/chart/Pie.js +9 -0
- package/dist/src/visual/config/Background.js +526 -0
- package/dist/src/visual/config/Chart.js +154 -0
- package/dist/src/visual/config/Checkbox.js +63 -0
- package/dist/src/visual/config/Color.js +41 -0
- package/dist/src/visual/config/DesignReport.js +24 -0
- package/dist/src/visual/config/Event.js +304 -0
- package/dist/src/visual/config/Field.js +520 -0
- package/dist/src/visual/config/Font.js +202 -0
- package/dist/src/visual/config/FormItem.js +23 -0
- package/dist/src/visual/config/Function.js +114 -0
- package/dist/src/visual/config/Html.js +111 -0
- package/dist/src/visual/config/Image.js +102 -0
- package/dist/src/visual/config/Input.js +177 -0
- package/dist/src/visual/config/Input.vue.js +479 -0
- package/dist/src/visual/config/LazyDialog.js +41 -0
- package/dist/src/visual/config/List.js +65 -0
- package/dist/src/visual/config/ListField.js +2080 -0
- package/dist/src/visual/config/MField.js +733 -0
- package/dist/src/visual/config/Number.js +37 -0
- package/dist/src/visual/config/Object.js +168 -0
- package/dist/src/visual/config/Operate.js +1109 -0
- package/dist/src/visual/config/OperateItem.js +1186 -0
- package/dist/src/visual/config/Options.js +8 -0
- package/dist/src/visual/config/Options.vue.js +278 -0
- package/dist/src/visual/config/OrderField.js +505 -0
- package/dist/src/visual/config/Page.js +76 -0
- package/dist/src/visual/config/Params.js +353 -0
- package/dist/src/visual/config/Radio.js +127 -0
- package/dist/src/visual/config/Row.js +104 -0
- package/dist/src/visual/config/Scope.js +350 -0
- package/dist/src/visual/config/Select.js +95 -0
- package/dist/src/visual/config/Switch.js +37 -0
- package/dist/src/visual/config/Textarea.js +175 -0
- package/dist/src/visual/config/Textarea.vue.js +507 -0
- package/dist/src/visual/config/Tree.js +138 -0
- package/dist/src/visual/config/remote-cache.js +30 -0
- package/dist/src/visual/config/show-condition.js +20 -0
- package/dist/src/visual/config/variable-sources.js +27 -0
- package/dist/src/visual/config/wait-ref.js +19 -0
- package/dist/src/visual/config-page/ComponentLibrary.js +170 -0
- package/dist/src/visual/config-page/ComponentLibraryDialog.js +250 -0
- package/dist/src/visual/config-page/ComponentList.js +9 -0
- package/dist/src/visual/config-page/ComponentList.vue.js +292 -0
- package/dist/src/visual/config-page/ComponentPreview.js +8 -0
- package/dist/src/visual/config-page/ComponentPreview.vue.js +151 -0
- package/dist/src/visual/config-page/ConfigOption.js +13 -0
- package/dist/src/visual/config-page/ConfigPanel.js +302 -0
- package/dist/src/visual/config-page/Dashboard.js +2160 -0
- package/dist/src/visual/config-page/DashboardDesign.js +606 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.js +6 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.vue.js +292 -0
- package/dist/src/visual/config-page/DashboardMobile.js +1115 -0
- package/dist/src/visual/config-page/DashboardSetting.js +86 -0
- package/dist/src/visual/config-page/PagePreview.js +8 -0
- package/dist/src/visual/config-page/PagePreview.vue.js +72 -0
- package/dist/src/visual/config-page/StyleConfig.js +979 -0
- package/dist/src/visual/config-page/VisualConfigPage.js +645 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Background.js +180 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Border.js +314 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Font.js +192 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Index.js +545 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Shadow.js +174 -0
- package/dist/src/visual/config-page/index.js +90 -0
- package/dist/src/visual/index.js +151 -0
- package/dist/src/visual/mixins/innerGridMixin.js +122 -0
- package/dist/src/visual/search/Filter.js +49 -0
- package/dist/src/visual/step/Index.js +8 -0
- package/dist/src/visual/step/Index.vue.js +485 -0
- package/dist/src/visual/step/Item.js +139 -0
- package/dist/src/visual/widgets/CardFormItemVisual.js +45 -0
- package/dist/src/visual/widgets/CarouselVisual.js +8 -0
- package/dist/src/visual/widgets/CarouselVisual.vue.js +303 -0
- package/dist/src/visual/widgets/CollapseVisual.js +8 -0
- package/dist/src/visual/widgets/CollapseVisual.vue.js +202 -0
- package/dist/src/visual/widgets/DropdownVisual.js +8 -0
- package/dist/src/visual/widgets/DropdownVisual.vue.js +955 -0
- package/dist/src/visual/widgets/LayoutConfig.js +8 -0
- package/dist/src/visual/widgets/LayoutConfig.vue.js +168 -0
- package/dist/src/visual/widgets/ListVisual.js +349 -0
- package/dist/src/visual/widgets/MEntityListFindVisual.js +76 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.js +5 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.vue.js +45 -0
- package/dist/src/visual/widgets/TabsConfig.js +8 -0
- package/dist/src/visual/widgets/TabsConfig.vue.js +343 -0
- package/dist/style.css +9907 -0
- package/package.json +104 -3
- package/src/index.js +27 -0
- package/src/page-designer/PageConfigPreview.vue +103 -0
- package/src/page-designer/PageDesigner.vue +1017 -0
- package/src/page-designer/designer.js +1299 -0
- package/src/page-designer/index.js +38 -0
- package/src/page-designer/mixins/dragSourceMixin.js +113 -0
- package/src/page-designer/page-variable-panel/JsonEditor.vue +109 -0
- package/src/page-designer/page-variable-panel/PageVariablePanel.vue +781 -0
- package/src/page-designer/page-variable-panel/index.js +6 -0
- package/src/page-designer/page-variable-panel/jsonlint.js +2 -0
- package/src/page-designer/previews/add-form/Preview.vue +331 -0
- package/src/page-designer/previews/add-form-item/Preview.vue +167 -0
- package/src/page-designer/previews/button/Preview.vue +27 -0
- package/src/page-designer/previews/card/Preview.vue +78 -0
- package/src/page-designer/previews/carousel/CarouselItemPreview.vue +32 -0
- package/src/page-designer/previews/carousel/Preview.vue +36 -0
- package/src/page-designer/previews/collapse/CollapseItemPreview.vue +136 -0
- package/src/page-designer/previews/collapse/Preview.vue +28 -0
- package/src/page-designer/previews/dropdown/Preview.vue +21 -0
- package/src/page-designer/previews/entity-list/Preview.vue +382 -0
- package/src/page-designer/previews/entity-sub-list/Preview.vue +283 -0
- package/src/page-designer/previews/entity-virtual-list/Preview.vue +14 -0
- package/src/page-designer/previews/form-field/preview/Checkbox.vue +57 -0
- package/src/page-designer/previews/form-field/preview/Date.vue +56 -0
- package/src/page-designer/previews/form-field/preview/Input.vue +53 -0
- package/src/page-designer/previews/form-field/preview/InputNumber.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Object.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Radio.vue +69 -0
- package/src/page-designer/previews/form-field/preview/Select.vue +55 -0
- package/src/page-designer/previews/form-field/preview/Textarea.vue +57 -0
- package/src/page-designer/previews/grid/Preview.vue +156 -0
- package/src/page-designer/previews/html/Preview.vue +11 -0
- package/src/page-designer/previews/icon/Preview.vue +12 -0
- package/src/page-designer/previews/image/Preview.vue +37 -0
- package/src/page-designer/previews/index.js +74 -0
- package/src/page-designer/previews/layout/ColumnPreview.vue +89 -0
- package/src/page-designer/previews/layout/Preview.vue +96 -0
- package/src/page-designer/previews/num/Preview.vue +100 -0
- package/src/page-designer/previews/page-tabs/Preview.vue +53 -0
- package/src/page-designer/previews/step/Preview.vue +190 -0
- package/src/page-designer/previews/tabs/Preview.vue +66 -0
- package/src/page-designer/previews/tabs/tab-pane/Preview.vue +32 -0
- package/src/page-designer/previews/text/Preview.vue +26 -0
- package/src/page-designer/previews/text-editor/Preview.vue +14 -0
- package/src/page-designer/previews/video/Preview.vue +9 -0
- package/src/page-designer/setting-panel/Advance.vue +175 -0
- package/src/page-designer/setting-panel/CodeEditor.vue +88 -0
- package/src/page-designer/setting-panel/Property.vue +163 -0
- package/src/page-designer/setting-panel/Setting.vue +271 -0
- package/src/page-designer/setting-panel/Style.vue +1096 -0
- package/src/page-designer/setting-panel/css-editor/CssEditor.vue +93 -0
- package/src/page-designer/setting-panel/css-editor/css-hint.js +58 -0
- package/src/page-designer/setting-panel/index.js +10 -0
- package/src/page-designer/template-attribute-panel/TemplateAttributePanel.vue +383 -0
- package/src/page-designer/template-attribute-panel/index.js +2 -0
- package/src/page-designer/template-library/Library.vue +153 -0
- package/src/page-designer/template-library/index.js +4 -0
- package/src/page-designer/widget-library/Base.vue +156 -0
- package/src/page-designer/widget-library/Library.vue +282 -0
- package/src/page-designer/widget-library/index.js +6 -0
- package/src/page-designer/widget-preview/Container.vue +89 -0
- package/src/page-designer/widget-preview/DragGhost.vue +83 -0
- package/src/page-designer/widget-preview/DropZoneOverlay.vue +51 -0
- package/src/page-designer/widget-preview/HoverOverlay.vue +85 -0
- package/src/page-designer/widget-preview/Mixin.js +285 -0
- package/src/page-designer/widget-preview/Placeholder.vue +22 -0
- package/src/page-designer/widget-preview/Preview.vue +322 -0
- package/src/page-designer/widget-preview/PreviewItem.vue +162 -0
- package/src/page-designer/widget-preview/SelectedOverlay.vue +340 -0
- package/src/page-designer/widget-preview/Template.vue +77 -0
- package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -0
- package/src/page-designer/widget-preview/directive.js +258 -0
- package/src/page-designer/widget-preview/dropPosition.js +51 -0
- package/src/page-designer/widget-preview/index.js +23 -0
- package/src/page-designer/widget-preview/overlayPositionMixin.js +88 -0
- package/src/page-designer/widget-preview/resolvePreviewName.js +33 -0
- package/src/page-designer/widget-tree/Item.vue +719 -0
- package/src/page-designer/widget-tree/Tree.vue +995 -0
- package/src/page-designer/widget-tree/index.js +6 -0
- package/src/visual/AddForm.vue +172 -0
- package/src/visual/AddFormItem.vue +482 -0
- package/src/visual/AppIndex.vue +245 -0
- package/src/visual/ApplyForm.vue +140 -0
- package/src/visual/AttributeList.vue +344 -0
- package/src/visual/BasePage.vue +76 -0
- package/src/visual/Button.vue +80 -0
- package/src/visual/CardNum.vue +73 -0
- package/src/visual/CategoryList.vue +563 -0
- package/src/visual/Chart.vue +29 -0
- package/src/visual/ChartNew.vue +49 -0
- package/src/visual/CheckForm.vue +106 -0
- package/src/visual/ClientList.vue +42 -0
- package/src/visual/CodeManage.vue +116 -0
- package/src/visual/Component.vue +1342 -0
- package/src/visual/ComponentList.vue +280 -0
- package/src/visual/Config.vue +881 -0
- package/src/visual/ConfigItem.vue +218 -0
- package/src/visual/ConfigSelectItems.vue +445 -0
- package/src/visual/CreatePage.vue +389 -0
- package/src/visual/DashboardDiv.vue +197 -0
- package/src/visual/DashboardTabs.vue +118 -0
- package/src/visual/DashboardWidget.vue +55 -0
- package/src/visual/DblogList.vue +84 -0
- package/src/visual/EntityAddPage.vue +52 -0
- package/src/visual/EntityApplyPage.vue +57 -0
- package/src/visual/EntityCardList.vue +449 -0
- package/src/visual/EntityCheckPage.vue +69 -0
- package/src/visual/EntityFindPage.vue +55 -0
- package/src/visual/EntityList.vue +838 -0
- package/src/visual/EntityListPage.vue +97 -0
- package/src/visual/EntityNoSubmitSubList.vue +273 -0
- package/src/visual/EntityRightSubList.vue +32 -0
- package/src/visual/EntitySubAdd.vue +11 -0
- package/src/visual/EntitySubGridItem.vue +67 -0
- package/src/visual/EntitySubList.vue +440 -0
- package/src/visual/EntityTreeFindPage.vue +36 -0
- package/src/visual/EntityTreeManage.vue +50 -0
- package/src/visual/EntityTreePage.vue +45 -0
- package/src/visual/ExcelPreview.vue +11 -0
- package/src/visual/FormField.vue +113 -0
- package/src/visual/HeaderNew.vue +176 -0
- package/src/visual/Html.vue +104 -0
- package/src/visual/Import.vue +55 -0
- package/src/visual/InterfaceSubList.vue +23 -0
- package/src/visual/ListFirst.vue +614 -0
- package/src/visual/MEntityAddPage.vue +71 -0
- package/src/visual/MEntityList.vue +488 -0
- package/src/visual/MEntityListPage.vue +46 -0
- package/src/visual/MEntitySubList.vue +237 -0
- package/src/visual/MetaList.vue +24 -0
- package/src/visual/ModuleIndexPage.vue +70 -0
- package/src/visual/ModuleList.vue +46 -0
- package/src/visual/NavAddForm.vue +177 -0
- package/src/visual/NavFormCatalogItem.vue +47 -0
- package/src/visual/NumItem.vue +69 -0
- package/src/visual/NumStatistic.vue +242 -0
- package/src/visual/OrgChart.vue +113 -0
- package/src/visual/PageCatalog.vue +26 -0
- package/src/visual/PageConfig.vue +278 -0
- package/src/visual/PageTabs.vue +55 -0
- package/src/visual/Progress.vue +39 -0
- package/src/visual/ProgressItem.vue +43 -0
- package/src/visual/SystemManager.vue +80 -0
- package/src/visual/Title.vue +44 -0
- package/src/visual/TodoList.vue +18 -0
- package/src/visual/UserFormItem.vue +49 -0
- package/src/visual/UserManage.vue +36 -0
- package/src/visual/chart/CircularPie.vue +7 -0
- package/src/visual/chart/Column.vue +73 -0
- package/src/visual/chart/HoriColumn.vue +7 -0
- package/src/visual/chart/Line.vue +7 -0
- package/src/visual/chart/Pie.vue +7 -0
- package/src/visual/config/Background.vue +398 -0
- package/src/visual/config/Chart.vue +139 -0
- package/src/visual/config/Checkbox.vue +64 -0
- package/src/visual/config/Color.vue +40 -0
- package/src/visual/config/DesignReport.vue +20 -0
- package/src/visual/config/Event.vue +220 -0
- package/src/visual/config/Field.vue +597 -0
- package/src/visual/config/Font.vue +149 -0
- package/src/visual/config/FormItem.vue +25 -0
- package/src/visual/config/Function.vue +78 -0
- package/src/visual/config/Html.vue +98 -0
- package/src/visual/config/Image.vue +132 -0
- package/src/visual/config/Input.vue +712 -0
- package/src/visual/config/LazyDialog.vue +44 -0
- package/src/visual/config/List.vue +68 -0
- package/src/visual/config/ListField.vue +1714 -0
- package/src/visual/config/MField.vue +601 -0
- package/src/visual/config/Number.vue +41 -0
- package/src/visual/config/Object.vue +177 -0
- package/src/visual/config/Operate.vue +1083 -0
- package/src/visual/config/OperateItem.vue +917 -0
- package/src/visual/config/Options.vue +330 -0
- package/src/visual/config/OrderField.vue +587 -0
- package/src/visual/config/Page.vue +45 -0
- package/src/visual/config/Params.vue +228 -0
- package/src/visual/config/Radio.vue +93 -0
- package/src/visual/config/Row.vue +78 -0
- package/src/visual/config/Scope.vue +363 -0
- package/src/visual/config/Select.vue +93 -0
- package/src/visual/config/Switch.vue +36 -0
- package/src/visual/config/Textarea.vue +754 -0
- package/src/visual/config/Tree.vue +135 -0
- package/src/visual/config/remote-cache.js +35 -0
- package/src/visual/config/show-condition.js +21 -0
- package/src/visual/config/variable-sources.js +27 -0
- package/src/visual/config/wait-ref.js +17 -0
- package/src/visual/config-page/ComponentLibrary.vue +220 -0
- package/src/visual/config-page/ComponentLibraryDialog.vue +262 -0
- package/src/visual/config-page/ComponentList.vue +580 -0
- package/src/visual/config-page/ComponentPreview.vue +206 -0
- package/src/visual/config-page/ConfigOption.vue +16 -0
- package/src/visual/config-page/ConfigPanel.vue +301 -0
- package/src/visual/config-page/Dashboard.vue +2331 -0
- package/src/visual/config-page/DashboardDesign.vue +656 -0
- package/src/visual/config-page/DashboardGlobalConfig.vue +158 -0
- package/src/visual/config-page/DashboardMobile.vue +1118 -0
- package/src/visual/config-page/DashboardSetting.vue +47 -0
- package/src/visual/config-page/PagePreview.vue +105 -0
- package/src/visual/config-page/StyleConfig.vue +656 -0
- package/src/visual/config-page/VisualConfigPage.vue +746 -0
- package/src/visual/config-page/dashboard-theme-setting/Background.vue +98 -0
- package/src/visual/config-page/dashboard-theme-setting/Border.vue +185 -0
- package/src/visual/config-page/dashboard-theme-setting/Font.vue +101 -0
- package/src/visual/config-page/dashboard-theme-setting/Index.vue +471 -0
- package/src/visual/config-page/dashboard-theme-setting/Shadow.vue +102 -0
- package/src/visual/config-page/index.js +93 -0
- package/src/visual/index.js +23 -0
- package/src/visual/mixins/innerGridMixin.js +128 -0
- package/src/visual/search/Filter.vue +50 -0
- package/src/visual/step/Index.vue +361 -0
- package/src/visual/step/Item.vue +140 -0
- package/src/visual/widgets/CardFormItemVisual.vue +46 -0
- package/src/visual/widgets/CarouselVisual.vue +291 -0
- package/src/visual/widgets/CollapseVisual.vue +203 -0
- package/src/visual/widgets/DropdownVisual.vue +541 -0
- package/src/visual/widgets/LayoutConfig.vue +186 -0
- package/src/visual/widgets/ListVisual.vue +349 -0
- package/src/visual/widgets/MEntityListFindVisual.vue +77 -0
- package/src/visual/widgets/ProcessFormItemVisual.vue +58 -0
- package/src/visual/widgets/TabsConfig.vue +266 -0
- package/types/index.d.ts +22 -0
- package/types/page-designer.d.ts +3 -0
- package/types/visual-component.d.ts +1 -0
- package/types/visual-entity-list.d.ts +1 -0
- package/types/visual-entity-sub-list.d.ts +1 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { markRaw } from "vue";
|
|
2
|
+
import { loadSystemVariables, loadFunctionTree } from "./variable-sources.js";
|
|
3
|
+
const _sfc_main = {
|
|
4
|
+
name: "epx-visual-config-textarea",
|
|
5
|
+
props: {
|
|
6
|
+
designer: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default() {
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
label: String,
|
|
13
|
+
value: [String, Number],
|
|
14
|
+
i18nValue: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default() {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultValue: String,
|
|
21
|
+
change: Function,
|
|
22
|
+
readonly: Boolean,
|
|
23
|
+
regExp: String,
|
|
24
|
+
isInternational: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
inputVariable: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
inputContent: "",
|
|
36
|
+
computedValue: "",
|
|
37
|
+
showContentMenu: false,
|
|
38
|
+
inputFocused: false,
|
|
39
|
+
templateAttributeProps: {
|
|
40
|
+
children: "children",
|
|
41
|
+
label: "text"
|
|
42
|
+
},
|
|
43
|
+
variableProps: {
|
|
44
|
+
children: "children",
|
|
45
|
+
label: "name"
|
|
46
|
+
},
|
|
47
|
+
systemVariableList: [],
|
|
48
|
+
activeVariableTab: "variable",
|
|
49
|
+
functionLibrary: [],
|
|
50
|
+
variablePos: {},
|
|
51
|
+
componentVariableDialog: false,
|
|
52
|
+
selectedWidget: null,
|
|
53
|
+
componentVariableTreeProps: {
|
|
54
|
+
children: "items",
|
|
55
|
+
label: "title"
|
|
56
|
+
},
|
|
57
|
+
componentVariableValue: ""
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
watch: {
|
|
61
|
+
value(v) {
|
|
62
|
+
},
|
|
63
|
+
// 首次打开变量菜单再拉系统变量与函数树;此前每个输入框挂载都各发两次请求
|
|
64
|
+
showContentMenu(v) {
|
|
65
|
+
if (v) this.ensureVariableSources();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
isInputVariable() {
|
|
70
|
+
return this.inputVariable || this.designer.mode === "template";
|
|
71
|
+
},
|
|
72
|
+
languageList() {
|
|
73
|
+
const {
|
|
74
|
+
LANGUAGES: languages = "",
|
|
75
|
+
"LANGUAGES#": languageNames = "",
|
|
76
|
+
LANGUAGE_DEFAULT: defaultLanguage
|
|
77
|
+
} = this.clientConfig;
|
|
78
|
+
if (!languages) return [];
|
|
79
|
+
const languageIdList = languages.split(",");
|
|
80
|
+
const languageNameList = languageNames.split(",");
|
|
81
|
+
const languageList = languageIdList.map((item, index) => ({
|
|
82
|
+
id: item,
|
|
83
|
+
name: languageNameList[index]
|
|
84
|
+
}));
|
|
85
|
+
return languageList.filter((item) => item.id !== defaultLanguage);
|
|
86
|
+
},
|
|
87
|
+
pageVariableSets() {
|
|
88
|
+
var _a;
|
|
89
|
+
return ((_a = this.designer.pageConfig) == null ? void 0 : _a.variableSets) || [];
|
|
90
|
+
},
|
|
91
|
+
templateAttributeTree() {
|
|
92
|
+
return this.designer.mode === "template" ? this.designer.templateAttributeTree : [];
|
|
93
|
+
},
|
|
94
|
+
fieldConfigs() {
|
|
95
|
+
const fieldConfigs = {
|
|
96
|
+
attriName: "configInput",
|
|
97
|
+
dataType: "text",
|
|
98
|
+
state: "ADD",
|
|
99
|
+
attriLabel: this.label,
|
|
100
|
+
readonly: this.readonly ? "1" : "0",
|
|
101
|
+
attribute: {
|
|
102
|
+
international: "1"
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
if (this.regExp) {
|
|
106
|
+
fieldConfigs.attribute.format = "reg_exp";
|
|
107
|
+
fieldConfigs.attribute.regexp = this.regExp;
|
|
108
|
+
}
|
|
109
|
+
return fieldConfigs;
|
|
110
|
+
},
|
|
111
|
+
widgetList() {
|
|
112
|
+
return this.designer.widgetList || [];
|
|
113
|
+
},
|
|
114
|
+
selectedWidgetInfo() {
|
|
115
|
+
if (this.selectedWidget) {
|
|
116
|
+
return this.designer.getWidgetByType(this.selectedWidget.contentType) || {};
|
|
117
|
+
}
|
|
118
|
+
return {};
|
|
119
|
+
},
|
|
120
|
+
variableList() {
|
|
121
|
+
return [{
|
|
122
|
+
name: "页面变量",
|
|
123
|
+
code: "page",
|
|
124
|
+
children: this.pageVariableSets
|
|
125
|
+
}, {
|
|
126
|
+
name: "系统变量",
|
|
127
|
+
code: "system",
|
|
128
|
+
children: this.systemVariableList
|
|
129
|
+
}, {
|
|
130
|
+
name: "自定义变量",
|
|
131
|
+
code: "customize"
|
|
132
|
+
}];
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
methods: {
|
|
136
|
+
ensureVariableSources() {
|
|
137
|
+
if (this._variableSourcesLoaded) return;
|
|
138
|
+
this._variableSourcesLoaded = true;
|
|
139
|
+
loadSystemVariables(this.$http).then((list) => {
|
|
140
|
+
this.systemVariableList = list;
|
|
141
|
+
});
|
|
142
|
+
loadFunctionTree(this.$http).then((tree) => {
|
|
143
|
+
this.functionLibrary = markRaw(tree);
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
getTemplateAttribute(key) {
|
|
147
|
+
for (const item of this.templateAttributeTree) {
|
|
148
|
+
if (item.entity.data.CODE === key) {
|
|
149
|
+
return item.entity.data;
|
|
150
|
+
} else if (item.children && item.children.length > 0) {
|
|
151
|
+
for (const child of item.children) {
|
|
152
|
+
if (child.entity.data.CODE === key) return child.entity.data;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
highlightFunctionCall(expression) {
|
|
158
|
+
let result = "";
|
|
159
|
+
let i = 0;
|
|
160
|
+
while (i < expression.length) {
|
|
161
|
+
const char = expression[i];
|
|
162
|
+
if (/[a-zA-Z]/.test(char)) {
|
|
163
|
+
let functionName = "";
|
|
164
|
+
while (i < expression.length && /[a-zA-Z]/.test(expression[i])) {
|
|
165
|
+
functionName += expression[i];
|
|
166
|
+
i++;
|
|
167
|
+
}
|
|
168
|
+
if (expression[i] === "(") {
|
|
169
|
+
result += `<span class="function">${functionName}</span>`;
|
|
170
|
+
} else {
|
|
171
|
+
result += `<span class="epx-visual-config-input__variable" contenteditable="false">${functionName}</span>`;
|
|
172
|
+
}
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (char === '"' || char === "'") {
|
|
176
|
+
const quote = char;
|
|
177
|
+
result += `<span class="string">${quote}`;
|
|
178
|
+
i++;
|
|
179
|
+
while (i < expression.length && expression[i] !== quote) {
|
|
180
|
+
result += expression[i];
|
|
181
|
+
i++;
|
|
182
|
+
}
|
|
183
|
+
if (i < expression.length) {
|
|
184
|
+
result += quote + "</span>";
|
|
185
|
+
}
|
|
186
|
+
i++;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (/[0-9]/.test(char)) {
|
|
190
|
+
let number = "";
|
|
191
|
+
while (i < expression.length && /[0-9.]/.test(expression[i])) {
|
|
192
|
+
number += expression[i];
|
|
193
|
+
i++;
|
|
194
|
+
}
|
|
195
|
+
result += `<span class="number">${number}</span>`;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if (char === "(" || char === ")" || char === ",") {
|
|
199
|
+
result += `<span class="parenthesis">${char}</span>`;
|
|
200
|
+
i++;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
result += char;
|
|
204
|
+
i++;
|
|
205
|
+
}
|
|
206
|
+
return result;
|
|
207
|
+
},
|
|
208
|
+
setInputContent(v = "") {
|
|
209
|
+
if (!v) return;
|
|
210
|
+
const html = String(v).replace(/\{\{([\w-.,|$#[\]()"'\s]+)\}\}/g, (match, key) => `<span class="epx-visual-config-input__expression" data-type="expression" contenteditable="false" data-value="{{${key}}}">${this.highlightFunctionCall(key)}</span>`).replace(/\$\[([\w-.|$#]+)\]/g, (match, key) => `<span class="epx-visual-config-input__variable" contenteditable="false" data-value="$[${key}]">${key}</span>`).replace(/@\[([\w-.|$#]+)\]/g, (match, key) => {
|
|
211
|
+
const param = this.getTemplateAttribute(key);
|
|
212
|
+
return `<span class="epx-visual-config-input__params" contenteditable="false" data-value="@[${key}]">${(param == null ? void 0 : param.NAME) || key}</span>`;
|
|
213
|
+
});
|
|
214
|
+
this.inputContent = this.xss.process(html);
|
|
215
|
+
if (this.$refs.input) this.$refs.input.innerHTML = this.inputContent;
|
|
216
|
+
},
|
|
217
|
+
getInputValue(v) {
|
|
218
|
+
const node = document.createElement("div");
|
|
219
|
+
node.innerHTML = v;
|
|
220
|
+
node.querySelectorAll('[data-type="expression"]').forEach((item) => {
|
|
221
|
+
item.innerHTML = `{{${item.innerText}}}`;
|
|
222
|
+
});
|
|
223
|
+
node.querySelectorAll(".epx-visual-config-input__variable").forEach((item) => {
|
|
224
|
+
item.innerText = `$[${item.innerText}]`;
|
|
225
|
+
});
|
|
226
|
+
node.querySelectorAll(".epx-visual-config-input__params").forEach((item) => {
|
|
227
|
+
item.innerText = `${item.getAttribute("data-value")}`;
|
|
228
|
+
});
|
|
229
|
+
node.querySelectorAll("div").forEach((item) => {
|
|
230
|
+
item.parentNode.insertBefore(document.createTextNode("\n"), item);
|
|
231
|
+
});
|
|
232
|
+
return node.innerText;
|
|
233
|
+
},
|
|
234
|
+
clearValue() {
|
|
235
|
+
if (this.inputFocused) {
|
|
236
|
+
this.$refs.input.innerHTML = "";
|
|
237
|
+
this.changeValue("");
|
|
238
|
+
this.$refs.input.focus();
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
changeValue(e) {
|
|
242
|
+
if (e.data === "/") {
|
|
243
|
+
this.showContentMenu = true;
|
|
244
|
+
this.lastEditRange = null;
|
|
245
|
+
const selection = window.getSelection();
|
|
246
|
+
const range = selection.getRangeAt(0);
|
|
247
|
+
const rect = range.getBoundingClientRect();
|
|
248
|
+
const inputRect = this.$refs.configInput.getBoundingClientRect();
|
|
249
|
+
const top = rect.bottom - inputRect.top;
|
|
250
|
+
this.variablePos = {
|
|
251
|
+
x: 0,
|
|
252
|
+
y: top + 20 + "px"
|
|
253
|
+
};
|
|
254
|
+
} else {
|
|
255
|
+
this.showContentMenu = false;
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
insertAtCursor(el, newElement) {
|
|
259
|
+
const range = this.range;
|
|
260
|
+
let selectedNode = range.startContainer;
|
|
261
|
+
if (!this.$refs.input.contains(selectedNode)) {
|
|
262
|
+
selectedNode = this.$refs.input;
|
|
263
|
+
}
|
|
264
|
+
const parent = selectedNode.nodeName === "#text" ? selectedNode.parentNode : selectedNode;
|
|
265
|
+
if (selectedNode.nodeName === "#text") {
|
|
266
|
+
const start = selectedNode.data.substring(0, range.startOffset);
|
|
267
|
+
const end = selectedNode.data.substring(range.startOffset);
|
|
268
|
+
parent.insertBefore(newElement, selectedNode);
|
|
269
|
+
const startNode = document.createTextNode(start.endsWith("/") ? start.slice(0, -1) : start);
|
|
270
|
+
parent.insertBefore(startNode, newElement);
|
|
271
|
+
if (end.length > 0) {
|
|
272
|
+
const endNode = document.createTextNode(end);
|
|
273
|
+
parent.insertBefore(endNode, newElement.nextSibling);
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
parent.insertBefore(newElement, parent.childNodes[range.startOffset]);
|
|
277
|
+
}
|
|
278
|
+
selectedNode.data = "";
|
|
279
|
+
},
|
|
280
|
+
addVariable(variable, e) {
|
|
281
|
+
if (variable.children) return;
|
|
282
|
+
const selection = window.getSelection();
|
|
283
|
+
const range = document.createRange();
|
|
284
|
+
const span = document.createElement("span");
|
|
285
|
+
span.className = "epx-visual-config-input__variable";
|
|
286
|
+
if (variable.code === "customize") {
|
|
287
|
+
const textNode = document.createTextNode(" ");
|
|
288
|
+
span.appendChild(textNode);
|
|
289
|
+
this.insertAtCursor(this.$refs.input, span);
|
|
290
|
+
range.selectNode(span, 0);
|
|
291
|
+
range.setEnd(textNode, 1);
|
|
292
|
+
} else if (variable.code === "component") {
|
|
293
|
+
this.componentVariableDialog = true;
|
|
294
|
+
} else {
|
|
295
|
+
span.innerHTML = variable.code;
|
|
296
|
+
span.contentEditable = "false";
|
|
297
|
+
span.setAttribute("data-value", `$[${variable.code}]`);
|
|
298
|
+
this.insertAtCursor(this.$refs.input, span);
|
|
299
|
+
range.setStart(span.nextSibling, 0);
|
|
300
|
+
range.collapse(true);
|
|
301
|
+
}
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
selection.removeAllRanges();
|
|
304
|
+
selection.addRange(range);
|
|
305
|
+
},
|
|
306
|
+
addComponentVariable(e) {
|
|
307
|
+
const selection = window.getSelection();
|
|
308
|
+
const range = document.createRange();
|
|
309
|
+
const span = document.createElement("span");
|
|
310
|
+
span.className = "epx-visual-config-input__variable";
|
|
311
|
+
span.innerHTML = "";
|
|
312
|
+
span.contentEditable = "false";
|
|
313
|
+
span.setAttribute("data-value", "$[component]");
|
|
314
|
+
this.insertAtCursor(this.$refs.input, span);
|
|
315
|
+
range.setStart(span.nextSibling, 0);
|
|
316
|
+
range.collapse(true);
|
|
317
|
+
selection.removeAllRanges();
|
|
318
|
+
selection.addRange(range);
|
|
319
|
+
this.componentVariableDialog = false;
|
|
320
|
+
this.componentVariableValue = null;
|
|
321
|
+
},
|
|
322
|
+
addFunction(item, e) {
|
|
323
|
+
if (!item.leaf) return;
|
|
324
|
+
const selection = window.getSelection();
|
|
325
|
+
const range = document.createRange();
|
|
326
|
+
const span = document.createElement("span");
|
|
327
|
+
span.className = "epx-visual-config-input__expression";
|
|
328
|
+
span.contentEditable = "false";
|
|
329
|
+
span.innerHTML = item.code + "()";
|
|
330
|
+
span.setAttribute("data-type", "expression");
|
|
331
|
+
span.setAttribute("data-value", `{{${item.code}}}`);
|
|
332
|
+
this.insertAtCursor(this.$refs.input, span);
|
|
333
|
+
range.setStart(span, 1);
|
|
334
|
+
range.collapse(true);
|
|
335
|
+
e.preventDefault();
|
|
336
|
+
selection.removeAllRanges();
|
|
337
|
+
selection.addRange(range);
|
|
338
|
+
},
|
|
339
|
+
addParams(data, e) {
|
|
340
|
+
e.preventDefault();
|
|
341
|
+
if (data.leaf) {
|
|
342
|
+
const param = data.entity.data;
|
|
343
|
+
const span = document.createElement("span");
|
|
344
|
+
span.innerHTML = param.NAME;
|
|
345
|
+
span.className = "epx-visual-config-input__params";
|
|
346
|
+
span.contentEditable = "false";
|
|
347
|
+
span.setAttribute("data-value", `@[${param.CODE}]`);
|
|
348
|
+
this.insertAtCursor(this.$refs.input, span);
|
|
349
|
+
this.$refs.input.focus();
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
inputFocus() {
|
|
353
|
+
this.inputFocused = true;
|
|
354
|
+
},
|
|
355
|
+
paste(e) {
|
|
356
|
+
e.preventDefault();
|
|
357
|
+
const text = e.clipboardData.getData("text/plain");
|
|
358
|
+
document.execCommand("insertText", false, text);
|
|
359
|
+
if (/@\[([\w-.|$#]+)\]/.test(text)) {
|
|
360
|
+
setTimeout(() => {
|
|
361
|
+
this.setInputContent(this.getInputValue(this.$refs.input.innerHTML));
|
|
362
|
+
}, 0);
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
onBlur(e) {
|
|
366
|
+
setTimeout(() => {
|
|
367
|
+
this.inputFocused = false;
|
|
368
|
+
if (document.activeElement !== this.$refs.input) {
|
|
369
|
+
let value = this.getInputValue(this.$refs.input.innerHTML);
|
|
370
|
+
value = value !== this.defaultValue ? value : null;
|
|
371
|
+
this.$emit("change-configs", value);
|
|
372
|
+
if (this.change) this.change(value);
|
|
373
|
+
}
|
|
374
|
+
}, 20);
|
|
375
|
+
},
|
|
376
|
+
onDblclick(e) {
|
|
377
|
+
if (e.target.className === "epx-visual-config-input__variable") {
|
|
378
|
+
e.target.contentEditable = "true";
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
inputClick(e) {
|
|
382
|
+
if (e.target.className === "epx-visual-config-input__variable") {
|
|
383
|
+
if (e.target.contentEditable === "false") {
|
|
384
|
+
e.target.contentEditable = "true";
|
|
385
|
+
const selection = document.getSelection();
|
|
386
|
+
const range = document.createRange();
|
|
387
|
+
range.selectNodeContents(e.target);
|
|
388
|
+
range.collapse();
|
|
389
|
+
selection.removeAllRanges();
|
|
390
|
+
selection.addRange(range);
|
|
391
|
+
}
|
|
392
|
+
} else if (e.target.getAttribute("data-type") === "expression" || e.target.parentNode.getAttribute("data-type") === "expression") {
|
|
393
|
+
const node = e.target.getAttribute("data-type") === "expression" ? e.target : e.target.parentNode;
|
|
394
|
+
if (node.contentEditable === "false") {
|
|
395
|
+
node.contentEditable = "true";
|
|
396
|
+
const selection = document.getSelection();
|
|
397
|
+
const range = document.createRange();
|
|
398
|
+
range.selectNodeContents(node);
|
|
399
|
+
range.collapse();
|
|
400
|
+
selection.removeAllRanges();
|
|
401
|
+
selection.addRange(range);
|
|
402
|
+
}
|
|
403
|
+
} else {
|
|
404
|
+
document.querySelectorAll(".epx-visual-config-input__variable").forEach((span) => {
|
|
405
|
+
span.contentEditable = "false";
|
|
406
|
+
});
|
|
407
|
+
document.querySelectorAll('[data-type="expression"]').forEach((span) => {
|
|
408
|
+
span.contentEditable = "false";
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
changeLanguageValue(id, v) {
|
|
413
|
+
const languageValue = {
|
|
414
|
+
...this.i18nValue,
|
|
415
|
+
[id]: v
|
|
416
|
+
};
|
|
417
|
+
this.$emit("change-language-config", languageValue);
|
|
418
|
+
},
|
|
419
|
+
openContextMenu(e) {
|
|
420
|
+
this.lastEditRange = window.getSelection().getRangeAt(0);
|
|
421
|
+
e.stopPropagation();
|
|
422
|
+
this.showContentMenu = true;
|
|
423
|
+
const inputRect = this.$refs.configInput.getBoundingClientRect();
|
|
424
|
+
this.variablePos = {
|
|
425
|
+
x: 0,
|
|
426
|
+
y: inputRect.height + 20 + "px"
|
|
427
|
+
};
|
|
428
|
+
},
|
|
429
|
+
selectionChange() {
|
|
430
|
+
const selection = window.getSelection();
|
|
431
|
+
if (selection.rangeCount === 0) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const range = selection.getRangeAt(0);
|
|
435
|
+
if (this.$refs.input.contains(range.startContainer)) {
|
|
436
|
+
this.range = range;
|
|
437
|
+
if (selection.focusNode.className !== "epx-visual-config-input__variable" && selection.focusNode.parentNode && selection.focusNode.parentNode.className !== "epx-visual-config-input__variable") {
|
|
438
|
+
document.querySelectorAll(".epx-visual-config-input__variable").forEach((span) => {
|
|
439
|
+
span.contentEditable = "false";
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
mounted() {
|
|
446
|
+
if (this.value === null || this.value === void 0) {
|
|
447
|
+
this.setInputContent(this.defaultValue);
|
|
448
|
+
} else {
|
|
449
|
+
this.setInputContent(this.value);
|
|
450
|
+
}
|
|
451
|
+
this._onWindowClick = () => {
|
|
452
|
+
this.showContentMenu = false;
|
|
453
|
+
};
|
|
454
|
+
window.addEventListener("click", this._onWindowClick);
|
|
455
|
+
document.addEventListener("selectionchange", this.selectionChange);
|
|
456
|
+
this.$refs.input.addEventListener("keydown", (e) => {
|
|
457
|
+
if (e.keyCode === 13) {
|
|
458
|
+
if (this.range && this.range.startContainer) {
|
|
459
|
+
let variableSpan = null;
|
|
460
|
+
if (this.range.startContainer.className === "epx-visual-config-input__variable") {
|
|
461
|
+
variableSpan = this.range.startContainer;
|
|
462
|
+
} else if (this.range.startContainer.parentNode.className === "epx-visual-config-input__variable") {
|
|
463
|
+
variableSpan = this.range.startContainer.parentNode;
|
|
464
|
+
}
|
|
465
|
+
if (variableSpan) {
|
|
466
|
+
e.preventDefault();
|
|
467
|
+
variableSpan.contentEditable = false;
|
|
468
|
+
const nextNode = variableSpan.nextSibling;
|
|
469
|
+
let textNode = null;
|
|
470
|
+
if (!nextNode || nextNode.nodeType !== 3) {
|
|
471
|
+
textNode = document.createTextNode();
|
|
472
|
+
if (!nextNode) {
|
|
473
|
+
variableSpan.parentNode.appendChild(textNode);
|
|
474
|
+
} else {
|
|
475
|
+
variableSpan.parentNode.insertBefore(textNode, nextNode);
|
|
476
|
+
}
|
|
477
|
+
} else {
|
|
478
|
+
textNode = nextNode;
|
|
479
|
+
}
|
|
480
|
+
const selection = window.getSelection();
|
|
481
|
+
const range = selection.getRangeAt(0);
|
|
482
|
+
range.setStart(textNode, 0);
|
|
483
|
+
selection.removeAllRanges();
|
|
484
|
+
selection.addRange(range);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
} else if (e.keyCode === 8) {
|
|
488
|
+
const startContainer = this.range.startContainer;
|
|
489
|
+
setTimeout(() => {
|
|
490
|
+
if (!this.$refs.input.contains(startContainer)) {
|
|
491
|
+
const selection = window.getSelection();
|
|
492
|
+
const range = selection.getRangeAt(0);
|
|
493
|
+
selection.removeAllRanges();
|
|
494
|
+
selection.addRange(range);
|
|
495
|
+
}
|
|
496
|
+
}, 0);
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
},
|
|
500
|
+
unmounted() {
|
|
501
|
+
window.removeEventListener("click", this._onWindowClick);
|
|
502
|
+
document.removeEventListener("selectionchange", this.selectionChange);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
export {
|
|
506
|
+
_sfc_main as default
|
|
507
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
name: "epx-visual-config-tree",
|
|
7
|
+
props: {
|
|
8
|
+
allConfigs: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default() {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
value: [String, Boolean, Number],
|
|
15
|
+
defaultValue: [String, Boolean, Number],
|
|
16
|
+
dataKey: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "value"
|
|
19
|
+
},
|
|
20
|
+
optionList: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default() {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
configItem: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
objectValue: {},
|
|
36
|
+
filterText: ""
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
label() {
|
|
41
|
+
const value = this.value || this.defaultValue;
|
|
42
|
+
if (value) {
|
|
43
|
+
return this.getLabel(this.optionList, value);
|
|
44
|
+
}
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
watch: {
|
|
49
|
+
filterText(val) {
|
|
50
|
+
if (this.$refs.tree) this.$refs.tree.filter(val);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
getLabel(optionList = [], value) {
|
|
55
|
+
for (let i = 0; i < optionList.length; i++) {
|
|
56
|
+
const item = optionList[i];
|
|
57
|
+
if (item[this.dataKey] === value) {
|
|
58
|
+
return item.label;
|
|
59
|
+
} else if (item.children) {
|
|
60
|
+
const label = this.getLabel(item.children, value);
|
|
61
|
+
if (label) return label;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
clear() {
|
|
66
|
+
this.objectValue = {};
|
|
67
|
+
this.$emit("change-configs", null);
|
|
68
|
+
},
|
|
69
|
+
filterNode(value, data) {
|
|
70
|
+
if (!value) return true;
|
|
71
|
+
return (data.name || data.text || data.title || "").indexOf(value) !== -1;
|
|
72
|
+
},
|
|
73
|
+
changeValue(v, item) {
|
|
74
|
+
let value = null;
|
|
75
|
+
if (v) {
|
|
76
|
+
this.objectValue = { ...v };
|
|
77
|
+
value = v[this.dataKey];
|
|
78
|
+
} else {
|
|
79
|
+
this.objectValue = {};
|
|
80
|
+
}
|
|
81
|
+
this.$emit("change-configs", value === this.defaultValue ? null : value);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const _hoisted_1 = { class: "tree" };
|
|
86
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
87
|
+
const _component_el_input = resolveComponent("el-input");
|
|
88
|
+
const _component_el_tree = resolveComponent("el-tree");
|
|
89
|
+
const _component_el_popover = resolveComponent("el-popover");
|
|
90
|
+
return openBlock(), createBlock(_component_el_popover, {
|
|
91
|
+
ref: "popover",
|
|
92
|
+
width: "240",
|
|
93
|
+
trigger: "click",
|
|
94
|
+
tabindex: 1,
|
|
95
|
+
persistent: false
|
|
96
|
+
}, {
|
|
97
|
+
reference: withCtx(() => [
|
|
98
|
+
createVNode(_component_el_input, {
|
|
99
|
+
class: "input",
|
|
100
|
+
ref: "input",
|
|
101
|
+
placeholder: `请选择`,
|
|
102
|
+
"model-value": $data.objectValue.label || $options.label,
|
|
103
|
+
clearable: "",
|
|
104
|
+
size: "default",
|
|
105
|
+
onClear: $options.clear
|
|
106
|
+
}, {
|
|
107
|
+
suffix: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
108
|
+
createElementVNode("i", { class: "el-icon-search" }, null, -1)
|
|
109
|
+
])]),
|
|
110
|
+
_: 1
|
|
111
|
+
}, 8, ["model-value", "onClear"])
|
|
112
|
+
]),
|
|
113
|
+
default: withCtx(() => [
|
|
114
|
+
createElementVNode("div", _hoisted_1, [
|
|
115
|
+
createVNode(_component_el_input, {
|
|
116
|
+
class: "filter",
|
|
117
|
+
size: "default",
|
|
118
|
+
placeholder: _ctx.$t("enter the keyword for filtering"),
|
|
119
|
+
modelValue: $data.filterText,
|
|
120
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.filterText = $event)
|
|
121
|
+
}, null, 8, ["placeholder", "modelValue"]),
|
|
122
|
+
createVNode(_component_el_tree, {
|
|
123
|
+
ref: "tree",
|
|
124
|
+
"filter-node-method": $options.filterNode,
|
|
125
|
+
"expand-on-click-node": false,
|
|
126
|
+
data: $props.optionList,
|
|
127
|
+
props: {},
|
|
128
|
+
onNodeClick: $options.changeValue
|
|
129
|
+
}, null, 8, ["filter-node-method", "data", "onNodeClick"])
|
|
130
|
+
])
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 512);
|
|
134
|
+
}
|
|
135
|
+
const Tree = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5fe8ea48"]]);
|
|
136
|
+
export {
|
|
137
|
+
Tree as default
|
|
138
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
const cache = /* @__PURE__ */ new Map();
|
|
3
|
+
function getCached(key, loader) {
|
|
4
|
+
let entry = cache.get(key);
|
|
5
|
+
if (!entry) {
|
|
6
|
+
entry = Promise.resolve().then(loader).then((data) => JSON.stringify(data === void 0 ? null : data)).catch((err) => {
|
|
7
|
+
cache.delete(key);
|
|
8
|
+
throw err;
|
|
9
|
+
});
|
|
10
|
+
cache.set(key, entry);
|
|
11
|
+
}
|
|
12
|
+
return entry.then((text) => JSON.parse(text));
|
|
13
|
+
}
|
|
14
|
+
function clearRemoteCache(prefix) {
|
|
15
|
+
if (!prefix) {
|
|
16
|
+
cache.clear();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
for (const key of [...cache.keys()]) {
|
|
20
|
+
if (key.startsWith(prefix)) cache.delete(key);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function attributeTreeKey({ entityId, pageId, isTemplate }) {
|
|
24
|
+
return `attr:${entityId}:${isTemplate ? "tpl" : "page"}:${pageId}`;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
attributeTreeKey,
|
|
28
|
+
clearRemoteCache,
|
|
29
|
+
getCached
|
|
30
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
const cache = /* @__PURE__ */ new Map();
|
|
3
|
+
function compileShowCondition(showCondition, onError) {
|
|
4
|
+
if (cache.has(showCondition)) return cache.get(showCondition);
|
|
5
|
+
let compiled;
|
|
6
|
+
try {
|
|
7
|
+
const condition = JSON.parse(showCondition).el || "";
|
|
8
|
+
const el = condition.replace(/^#{(.*)}$/, "$1");
|
|
9
|
+
compiled = el ? new Function("config", "return " + el) : null;
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error(error);
|
|
12
|
+
if (typeof onError === "function") onError("配置项显示条件解析失败:" + (error && error.message || showCondition));
|
|
13
|
+
compiled = false;
|
|
14
|
+
}
|
|
15
|
+
cache.set(showCondition, compiled);
|
|
16
|
+
return compiled;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
compileShowCondition
|
|
20
|
+
};
|