@luck-design-biz/luckda 0.0.24-2 → 0.0.25-1
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/es/components/Builder/index.js +6 -4
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +133 -0
- package/es/components/LDActions/index.less +65 -0
- package/es/components/LdAutoForm/index.js +1 -1
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdGrid/index.js +14 -8
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +221 -0
- package/es/lowcode/constants/api-url.js +380 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +30 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +3 -2
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +8 -8
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +53 -4
- package/es/lowcode/engine/meta/form.props.json +584 -55
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +5 -2
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/es/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/es/lowcode/engine/meta/jsx.props.json +10 -5
- package/es/lowcode/engine/meta/layout.props.default.json +5 -2
- package/es/lowcode/engine/meta/layout.props.json +1 -2
- package/es/lowcode/engine/meta/link.props.default.json +5 -2
- package/es/lowcode/engine/meta/link.props.json +2 -2
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +49 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/section.props.default.json +5 -2
- package/es/lowcode/engine/meta/section.props.json +1 -1
- package/es/lowcode/engine/meta/split.props.default.json +9 -4
- package/es/lowcode/engine/meta/split.props.json +14 -29
- package/es/lowcode/engine/meta/table.props.default.json +23 -3
- package/es/lowcode/engine/meta/table.props.json +257 -55
- package/es/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/es/lowcode/engine/meta/tabs.props.json +57 -81
- package/es/lowcode/engine/meta/text.props.default.json +5 -2
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +20 -7
- package/es/lowcode/engine/meta/tree.props.json +225 -79
- package/es/lowcode/engine/provider/ContextProvider/index.js +169 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +161 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +96 -19
- package/es/lowcode/engine/tools/useCanvasRender.js +75 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -6
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +1 -0
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/DesignOperator.js +47 -28
- package/es/lowcode/painter/DesignToolbar.js +86 -15
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +100 -142
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +293 -0
- package/es/lowcode/painter/components/AdvancePanel.js +140 -0
- package/es/lowcode/painter/components/AttrsPanel.js +145 -0
- package/es/lowcode/painter/components/Collapse.js +20 -9
- package/es/lowcode/painter/components/ColorInput.js +5 -3
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +47 -0
- package/es/lowcode/painter/components/DragDrop/Overlay.js +8 -0
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +67 -0
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/ListEditor.js +18 -9
- package/es/lowcode/painter/components/PanelItem.js +1 -1
- package/es/lowcode/painter/components/PopConfirm.js +10 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +144 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +126 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +116 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +419 -0
- package/es/lowcode/painter/components/field-setting/index.js +363 -0
- package/es/lowcode/painter/index.js +3 -1
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +74 -13
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +24 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +44 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +202 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +308 -0
- package/es/lowcode/painter/panel-section/Icon.js +14 -14
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +6 -7
- package/es/lowcode/painter/panel-section/SerialsSelector.js +44 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +248 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -22
- package/es/lowcode/painter/panel-section/TabItems.js +46 -30
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +66 -6
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/services/toolbar.js +25 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/collapse.less +6 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +2 -3
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +14 -0
- package/es/lowcode/view/Canvas.js +34 -139
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +16 -14
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +11 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +43 -20
- package/es/lowcode/view/lc-components/Button/meta.json +8 -8
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +17 -23
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/es/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +114 -8
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +534 -55
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +19 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +19 -17
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Layout/index.js +1 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +2 -2
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +53 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +38 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +40 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +23 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +1 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +59 -2
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +46 -7
- package/es/lowcode/view/lc-components/Split/meta.json +10 -29
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +41 -4
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +365 -49
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +72 -2
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +113 -10
- package/es/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +323 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/es/lowcode/view/lc-components/Wrapper.js +44 -27
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +4 -1
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +141 -0
- package/lib/components/LDActions/index.less +65 -0
- package/lib/components/LdAutoForm/index.js +1 -1
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGridForm/index.js +4 -3
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +227 -0
- package/lib/lowcode/constants/api-url.js +382 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +31 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +3 -2
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +8 -8
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +53 -4
- package/lib/lowcode/engine/meta/form.props.json +584 -55
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +5 -2
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/lib/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/lib/lowcode/engine/meta/jsx.props.json +10 -5
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -2
- package/lib/lowcode/engine/meta/layout.props.json +1 -2
- package/lib/lowcode/engine/meta/link.props.default.json +5 -2
- package/lib/lowcode/engine/meta/link.props.json +2 -2
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +49 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/section.props.default.json +5 -2
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- package/lib/lowcode/engine/meta/split.props.default.json +9 -4
- package/lib/lowcode/engine/meta/split.props.json +14 -29
- package/lib/lowcode/engine/meta/table.props.default.json +23 -3
- package/lib/lowcode/engine/meta/table.props.json +257 -55
- package/lib/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/lib/lowcode/engine/meta/tabs.props.json +57 -81
- package/lib/lowcode/engine/meta/text.props.default.json +5 -2
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +20 -7
- package/lib/lowcode/engine/meta/tree.props.json +225 -79
- package/lib/lowcode/engine/provider/ContextProvider/index.js +177 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +169 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +100 -18
- package/lib/lowcode/engine/tools/useCanvasRender.js +90 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -5
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +7 -0
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/DesignOperator.js +45 -26
- package/lib/lowcode/painter/DesignToolbar.js +82 -11
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +97 -139
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +300 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +148 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +153 -0
- package/lib/lowcode/painter/components/Collapse.js +20 -9
- package/lib/lowcode/painter/components/ColorInput.js +5 -3
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +54 -0
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +15 -0
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +75 -0
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +17 -8
- package/lib/lowcode/painter/components/PanelItem.js +1 -1
- package/lib/lowcode/painter/components/PopConfirm.js +10 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +151 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +133 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +123 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +427 -0
- package/lib/lowcode/painter/components/field-setting/index.js +370 -0
- package/lib/lowcode/painter/index.js +3 -1
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +20 -66
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +71 -10
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +31 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +51 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +208 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +316 -0
- package/lib/lowcode/painter/panel-section/Icon.js +16 -14
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +5 -6
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +51 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +256 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -23
- package/lib/lowcode/painter/panel-section/TabItems.js +45 -29
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +67 -6
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/services/toolbar.js +32 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/collapse.less +6 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +2 -3
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +21 -0
- package/lib/lowcode/view/Canvas.js +32 -145
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +12 -10
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +11 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +41 -18
- package/lib/lowcode/view/lc-components/Button/meta.json +8 -8
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -23
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +32 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +113 -7
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +534 -55
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +19 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +21 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +1 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +61 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +46 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +48 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +30 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +1 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +60 -2
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +45 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +10 -29
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +43 -5
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +364 -48
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +73 -2
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +112 -9
- package/lib/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +321 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/lib/lowcode/view/lc-components/Wrapper.js +42 -25
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/utils/grid.js +2 -2
- package/package.json +12 -7
- package/es/lowcode/engine/provider/ContextProvider.js +0 -169
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +0 -147
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -177
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
|
@@ -12,18 +12,32 @@ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helper
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
|
|
14
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
15
16
|
var _react = _interopRequireWildcard3(require("react"));
|
|
16
17
|
var _BaseEditor = _interopRequireDefault(require("./BaseEditor"));
|
|
17
18
|
var monaco = _interopRequireWildcard3(require("monaco-editor"));
|
|
19
|
+
var _lodash = require("lodash");
|
|
18
20
|
var _excluded = ["children"];
|
|
21
|
+
function capitalizeFirstLetter(string) {
|
|
22
|
+
if ((0, _lodash.isNil)(string)) return null;
|
|
23
|
+
if (string.length === 0) {
|
|
24
|
+
return ''; // 如果字符串为空,返回空字符串
|
|
25
|
+
}
|
|
26
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
27
|
+
}
|
|
19
28
|
var _provideCompletionItems = function provideCompletionItems(monaco, model, position, module) {
|
|
20
29
|
var textUntilPosition = model.getValueInRange({
|
|
21
|
-
startLineNumber:
|
|
30
|
+
startLineNumber: 1,
|
|
22
31
|
startColumn: 1,
|
|
23
32
|
endLineNumber: position.lineNumber,
|
|
24
33
|
endColumn: position.column
|
|
25
34
|
});
|
|
26
|
-
|
|
35
|
+
|
|
36
|
+
// 正则表达式匹配以 triggerWord 开头的任何单词
|
|
37
|
+
var pattern = new RegExp('\\b' + module.triggerWord + '[\\w.]*', 'i');
|
|
38
|
+
var match = textUntilPosition.match(pattern);
|
|
39
|
+
// console.log('match',match)
|
|
40
|
+
if (match) {
|
|
27
41
|
var word = model.getWordUntilPosition(position);
|
|
28
42
|
var range = {
|
|
29
43
|
startLineNumber: position.lineNumber,
|
|
@@ -31,14 +45,10 @@ var _provideCompletionItems = function provideCompletionItems(monaco, model, pos
|
|
|
31
45
|
startColumn: word.startColumn,
|
|
32
46
|
endColumn: word.endColumn
|
|
33
47
|
};
|
|
34
|
-
|
|
35
|
-
// 从模块中调用 completions 函数获取补全项数组
|
|
36
|
-
// 并动态转换 kind 字段
|
|
37
48
|
return module.completions.map(function (completion) {
|
|
38
|
-
return
|
|
49
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, completion), {}, {
|
|
39
50
|
range: range,
|
|
40
|
-
|
|
41
|
-
kind: monaco.languages.CompletionItemKind[completion.kind]
|
|
51
|
+
kind: monaco.languages.CompletionItemKind[capitalizeFirstLetter(completion.kind)]
|
|
42
52
|
});
|
|
43
53
|
});
|
|
44
54
|
}
|
|
@@ -56,7 +66,8 @@ var setupAutocomplete = /*#__PURE__*/function () {
|
|
|
56
66
|
});
|
|
57
67
|
case 2:
|
|
58
68
|
autoCompleteModules = _context.sent;
|
|
59
|
-
console.log('autoCompleteModules', autoCompleteModules);
|
|
69
|
+
// console.log('autoCompleteModules', autoCompleteModules);
|
|
70
|
+
|
|
60
71
|
monaco.languages.registerCompletionItemProvider('javascript', (0, _defineProperty2.default)({
|
|
61
72
|
triggerCharacters: ['.'],
|
|
62
73
|
provideCompletionItems: function provideCompletionItems(model, position) {
|
|
@@ -72,7 +83,7 @@ var setupAutocomplete = /*#__PURE__*/function () {
|
|
|
72
83
|
};
|
|
73
84
|
}
|
|
74
85
|
}, "triggerCharacters", ['.']));
|
|
75
|
-
case
|
|
86
|
+
case 4:
|
|
76
87
|
case "end":
|
|
77
88
|
return _context.stop();
|
|
78
89
|
}
|
|
@@ -87,7 +98,7 @@ var setupAutocomplete = /*#__PURE__*/function () {
|
|
|
87
98
|
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
88
99
|
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
89
100
|
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
90
|
-
*
|
|
101
|
+
*
|
|
91
102
|
* @component
|
|
92
103
|
* @example
|
|
93
104
|
* <JSEditor
|
|
@@ -96,12 +107,12 @@ var setupAutocomplete = /*#__PURE__*/function () {
|
|
|
96
107
|
* >
|
|
97
108
|
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
98
109
|
* </JSEditor>
|
|
99
|
-
*
|
|
110
|
+
*
|
|
100
111
|
* @param {Object} props - 组件的属性。
|
|
101
112
|
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
102
113
|
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
103
114
|
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
104
|
-
*
|
|
115
|
+
*
|
|
105
116
|
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
106
117
|
*/
|
|
107
118
|
var JSEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
@@ -112,6 +123,6 @@ var JSEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
112
123
|
}, []);
|
|
113
124
|
return /*#__PURE__*/_react.default.createElement(_BaseEditor.default, (0, _extends2.default)({
|
|
114
125
|
ref: ref
|
|
115
|
-
}, rest));
|
|
126
|
+
}, rest), children);
|
|
116
127
|
});
|
|
117
128
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(JSEditor);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _BaseEditor = _interopRequireDefault(require("./BaseEditor"));
|
|
13
|
+
var _excluded = ["children"];
|
|
14
|
+
/**
|
|
15
|
+
* JsonEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
16
|
+
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
17
|
+
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
* @example
|
|
21
|
+
* const handleCssChange = (newCss, event) => {
|
|
22
|
+
* console.log('CSS changed: ', newCss);
|
|
23
|
+
* };
|
|
24
|
+
* <JsonEditor
|
|
25
|
+
* onChange={handleCssChange}
|
|
26
|
+
* isFullscreen={false}
|
|
27
|
+
* width="600px"
|
|
28
|
+
* height="400px"
|
|
29
|
+
* >
|
|
30
|
+
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
31
|
+
* </JsonEditor>
|
|
32
|
+
*
|
|
33
|
+
* @param {Object} props - 组件的属性。
|
|
34
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
35
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
36
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
37
|
+
*
|
|
38
|
+
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
39
|
+
*/
|
|
40
|
+
var JsonEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
41
|
+
var children = _ref.children,
|
|
42
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_BaseEditor.default, (0, _extends2.default)({
|
|
44
|
+
ref: ref,
|
|
45
|
+
language: "json"
|
|
46
|
+
}, rest), children);
|
|
47
|
+
});
|
|
48
|
+
var _default = exports.default = /*#__PURE__*/_react.default.memo(JsonEditor);
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _ahooks = require("ahooks");
|
|
16
|
+
var _lodash = require("lodash");
|
|
17
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
18
|
+
var _SettingUI = _interopRequireDefault(require("./SettingUI"));
|
|
19
|
+
var _apiUrl = require("../../../constants/api-url");
|
|
20
|
+
var _TRUE_FALSE_ = ['__TRUE__', '__FALSE__'];
|
|
21
|
+
var BatchSetting = function BatchSetting(_ref) {
|
|
22
|
+
var dispatch = _ref.dispatch,
|
|
23
|
+
nodeId = _ref.nodeId,
|
|
24
|
+
dataModelKey = _ref.dataModelKey,
|
|
25
|
+
datasetId = _ref.datasetId,
|
|
26
|
+
moduleId = _ref.moduleId,
|
|
27
|
+
component = _ref.component,
|
|
28
|
+
fieldsData = _ref.fieldsData,
|
|
29
|
+
onChange = _ref.onChange;
|
|
30
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
31
|
+
var handleUIChange = (0, _ahooks.useMemoizedFn)(function (key, val) {
|
|
32
|
+
dispatch({
|
|
33
|
+
type: 'batchEdit',
|
|
34
|
+
payload: {
|
|
35
|
+
items: (0, _toConsumableArray2.default)(fieldsData.keys()),
|
|
36
|
+
data: (0, _defineProperty2.default)({}, key, val)
|
|
37
|
+
},
|
|
38
|
+
callback: function callback(newFields) {
|
|
39
|
+
if (component === 'table') {
|
|
40
|
+
var gridApi = ctx.componentMap.get(nodeId).api.self.ref.current.gridApi;
|
|
41
|
+
var cols = [];
|
|
42
|
+
var _iterator = (0, _createForOfIteratorHelper2.default)(fieldsData),
|
|
43
|
+
_step;
|
|
44
|
+
try {
|
|
45
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
46
|
+
var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
|
|
47
|
+
fieldData = _step$value[1];
|
|
48
|
+
cols.push(gridApi.columnApi.getColumn(fieldData.field));
|
|
49
|
+
}
|
|
50
|
+
} catch (err) {
|
|
51
|
+
_iterator.e(err);
|
|
52
|
+
} finally {
|
|
53
|
+
_iterator.f();
|
|
54
|
+
}
|
|
55
|
+
if ('headerAlign' === key) {
|
|
56
|
+
cols.forEach(function (col) {
|
|
57
|
+
var _headerClassFunc = col.colDef.headerClass;
|
|
58
|
+
col.colDef.headerClass = function (params) {
|
|
59
|
+
var classes = _headerClassFunc(params);
|
|
60
|
+
var temp = (0, _lodash.dropWhile)(classes, function (c) {
|
|
61
|
+
return (0, _lodash.startsWith)(c, 'luck-header-label-');
|
|
62
|
+
});
|
|
63
|
+
temp.push("luck-header-label-".concat(val));
|
|
64
|
+
return temp;
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
gridApi.api.refreshHeader();
|
|
68
|
+
} else if ('align' === key) {
|
|
69
|
+
var colsField = cols.map(function (col) {
|
|
70
|
+
var _cellStyleFunc = col.colDef.cellStyle;
|
|
71
|
+
col.colDef.cellStyle = function (params) {
|
|
72
|
+
var cellStyle = _cellStyleFunc(params);
|
|
73
|
+
if ('center' === val) {
|
|
74
|
+
cellStyle.justifyContent = 'center';
|
|
75
|
+
cellStyle.textAlign = 'center';
|
|
76
|
+
} else if ('right' === val) {
|
|
77
|
+
cellStyle.justifyContent = 'flex-end';
|
|
78
|
+
cellStyle.textAlign = 'end';
|
|
79
|
+
} else if ('left' === val) {
|
|
80
|
+
cellStyle.justifyContent = 'flex-start';
|
|
81
|
+
cellStyle.textAlign = 'start';
|
|
82
|
+
}
|
|
83
|
+
return cellStyle;
|
|
84
|
+
};
|
|
85
|
+
return col.colId;
|
|
86
|
+
});
|
|
87
|
+
gridApi.api.refreshCells({
|
|
88
|
+
columns: colsField,
|
|
89
|
+
force: true
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
onChange(newFields);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
var _useDebounceFn = (0, _ahooks.useDebounceFn)(function (key, val) {
|
|
98
|
+
if (key === 'width') {
|
|
99
|
+
handleUIChange(key, val);
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
wait: 400
|
|
103
|
+
}),
|
|
104
|
+
runDebounce = _useDebounceFn.run;
|
|
105
|
+
var run = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/function () {
|
|
106
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(key, val) {
|
|
107
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
108
|
+
while (1) switch (_context.prev = _context.next) {
|
|
109
|
+
case 0:
|
|
110
|
+
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip')) {
|
|
111
|
+
_context.next = 4;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
handleUIChange(key, val);
|
|
115
|
+
_context.next = 6;
|
|
116
|
+
break;
|
|
117
|
+
case 4:
|
|
118
|
+
_context.next = 6;
|
|
119
|
+
return (0, _apiUrl.fetchAddFieldAttrs)({
|
|
120
|
+
dataModelKey: dataModelKey,
|
|
121
|
+
moduleDatasetUid: datasetId,
|
|
122
|
+
moduleUid: moduleId,
|
|
123
|
+
scope: key,
|
|
124
|
+
ccmOnoffConditions: [{
|
|
125
|
+
conditionType: val ? _TRUE_FALSE_[0] : _TRUE_FALSE_[1],
|
|
126
|
+
config: val ? '是' : '否',
|
|
127
|
+
showconfig: val ? '是' : '否'
|
|
128
|
+
}],
|
|
129
|
+
datasetBusinessUids: (0, _toConsumableArray2.default)(fieldsData.keys())
|
|
130
|
+
});
|
|
131
|
+
case 6:
|
|
132
|
+
case "end":
|
|
133
|
+
return _context.stop();
|
|
134
|
+
}
|
|
135
|
+
}, _callee);
|
|
136
|
+
}));
|
|
137
|
+
return function (_x, _x2) {
|
|
138
|
+
return _ref2.apply(this, arguments);
|
|
139
|
+
};
|
|
140
|
+
}());
|
|
141
|
+
return /*#__PURE__*/_react.default.createElement(_SettingUI.default, {
|
|
142
|
+
data: (0, _toConsumableArray2.default)(fieldsData.keys()),
|
|
143
|
+
dataModelKey: dataModelKey,
|
|
144
|
+
datasetId: datasetId,
|
|
145
|
+
moduleId: moduleId,
|
|
146
|
+
component: component,
|
|
147
|
+
runDebounce: runDebounce,
|
|
148
|
+
run: run
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
var _default = exports.default = BatchSetting;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ahooks = require("ahooks");
|
|
10
|
+
var _antd = require("luck-design/antd");
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
14
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting.checkRules';
|
|
15
|
+
var FormItem = (0, _styledComponents.default)(_antd.Form.Item).withConfig({
|
|
16
|
+
displayName: "FormItem",
|
|
17
|
+
componentId: "luckda-6530__sc-da3g5m-0"
|
|
18
|
+
})(["margin-bottom:0;"]);
|
|
19
|
+
var CheckRules = function CheckRules(_ref) {
|
|
20
|
+
var form = _ref.form,
|
|
21
|
+
condition = _ref.condition,
|
|
22
|
+
fields = _ref.fields,
|
|
23
|
+
rule = _ref.rule;
|
|
24
|
+
(0, _ahooks.useMount)(function () {
|
|
25
|
+
if (rule.uid) {
|
|
26
|
+
form.setFieldsValue({
|
|
27
|
+
verifyType: rule.verifyType,
|
|
28
|
+
verifyScope: rule.verifyScope,
|
|
29
|
+
expression: rule.expression,
|
|
30
|
+
errorMsg: rule.errorMsg
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
35
|
+
layout: "vertical"
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Row, {
|
|
37
|
+
gutter: 8
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
39
|
+
span: 12
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
41
|
+
label: (0, _utils.formatMessage)({
|
|
42
|
+
id: "".concat(_I18N_PREFIX_, ".verifyType"),
|
|
43
|
+
label: '校验规则'
|
|
44
|
+
})
|
|
45
|
+
}, form.getFieldDecorator('verifyType', {
|
|
46
|
+
rules: [{
|
|
47
|
+
required: true,
|
|
48
|
+
message: (0, _utils.formatMessage)({
|
|
49
|
+
id: "".concat(_I18N_PREFIX_, ".message.verifyType"),
|
|
50
|
+
label: '请选择校验规则'
|
|
51
|
+
})
|
|
52
|
+
}]
|
|
53
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Select, null, (0, _lodash.reduce)(condition === null || condition === void 0 ? void 0 : condition.options, function (types, val, key) {
|
|
54
|
+
types.push( /*#__PURE__*/_react.default.createElement(Option, {
|
|
55
|
+
key: key,
|
|
56
|
+
value: key
|
|
57
|
+
}, val));
|
|
58
|
+
return types;
|
|
59
|
+
}, []))))), /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
60
|
+
span: 12
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
62
|
+
label: (0, _utils.formatMessage)({
|
|
63
|
+
id: "".concat(_I18N_PREFIX_, ".verifyScope"),
|
|
64
|
+
label: '校验类型'
|
|
65
|
+
})
|
|
66
|
+
}, form.getFieldDecorator('verifyScope', {
|
|
67
|
+
rules: [{
|
|
68
|
+
required: true,
|
|
69
|
+
message: (0, _utils.formatMessage)({
|
|
70
|
+
id: "".concat(_I18N_PREFIX_, ".message.verifyScope"),
|
|
71
|
+
label: '请选择校验类型'
|
|
72
|
+
})
|
|
73
|
+
}]
|
|
74
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Select, null, /*#__PURE__*/_react.default.createElement(Option, {
|
|
75
|
+
value: 0
|
|
76
|
+
}, (0, _utils.formatMessage)({
|
|
77
|
+
id: "".concat(_I18N_PREFIX_, ".frontend"),
|
|
78
|
+
label: '前端'
|
|
79
|
+
})), /*#__PURE__*/_react.default.createElement(Option, {
|
|
80
|
+
value: 1
|
|
81
|
+
}, (0, _utils.formatMessage)({
|
|
82
|
+
id: "".concat(_I18N_PREFIX_, ".backend"),
|
|
83
|
+
label: '后端'
|
|
84
|
+
})))))), /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
85
|
+
span: 24
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
87
|
+
label: (0, _utils.formatMessage)({
|
|
88
|
+
id: 'luckda.lowcode.painter.expression',
|
|
89
|
+
label: '表达式'
|
|
90
|
+
})
|
|
91
|
+
}, form.getFieldDecorator('expression', {
|
|
92
|
+
rules: [{
|
|
93
|
+
required: true,
|
|
94
|
+
message: (0, _utils.formatMessage)({
|
|
95
|
+
id: 'luckda.lowcode.painter.message.expression',
|
|
96
|
+
label: '请输入表达式'
|
|
97
|
+
})
|
|
98
|
+
}]
|
|
99
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Mentions, {
|
|
100
|
+
rows: 4,
|
|
101
|
+
prefix: "#",
|
|
102
|
+
placeholder: (0, _utils.formatMessage)({
|
|
103
|
+
id: 'luckda.lowcode.painter.message.expression',
|
|
104
|
+
label: '请输入表达式'
|
|
105
|
+
})
|
|
106
|
+
}, fields.filter(function (_ref2) {
|
|
107
|
+
var id = _ref2.id;
|
|
108
|
+
return !(0, _lodash.startsWith)(id, '-');
|
|
109
|
+
}).map(function (_ref3) {
|
|
110
|
+
var field = _ref3.field;
|
|
111
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Mentions.Option, {
|
|
112
|
+
value: field
|
|
113
|
+
}, field);
|
|
114
|
+
}))))), /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
115
|
+
span: 24
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
117
|
+
label: (0, _utils.formatMessage)({
|
|
118
|
+
id: "".concat(_I18N_PREFIX_, ".errorMsg"),
|
|
119
|
+
label: '错误提示'
|
|
120
|
+
})
|
|
121
|
+
}, form.getFieldDecorator('errorMsg', {
|
|
122
|
+
rules: [{
|
|
123
|
+
required: true,
|
|
124
|
+
message: (0, _utils.formatMessage)({
|
|
125
|
+
id: "".concat(_I18N_PREFIX_, ".message.errorMsg"),
|
|
126
|
+
label: '请输入错误提示'
|
|
127
|
+
})
|
|
128
|
+
}]
|
|
129
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
|
|
130
|
+
rows: 2
|
|
131
|
+
}))))));
|
|
132
|
+
};
|
|
133
|
+
var _default = exports.default = CheckRules;
|