@luck-design-biz/luckda 0.0.24-2 → 0.0.25-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/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 +230 -0
- package/es/lowcode/constants/api-url.js +464 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +31 -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 +4 -3
- package/es/lowcode/engine/meta/box.props.json +2 -4
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +9 -9
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +2 -3
- package/es/lowcode/engine/meta/components-list.json +1 -1
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +1 -2
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +1 -2
- package/es/lowcode/engine/meta/form.props.default.json +52 -4
- package/es/lowcode/engine/meta/form.props.json +596 -64
- 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 +3 -3
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +2 -2
- 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 +3 -3
- 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 +7 -6
- package/es/lowcode/engine/meta/section.props.json +52 -49
- 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 +3 -3
- 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 +177 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +174 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +97 -18
- package/es/lowcode/engine/tools/useCanvasRender.js +73 -0
- package/es/lowcode/engine/tools/usePromiseState.js +23 -12
- 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/Design.js +34 -2
- package/es/lowcode/painter/DesignOperator.js +48 -31
- package/es/lowcode/painter/DesignToolbar.js +324 -16
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +99 -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 +50 -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 +26 -11
- 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 +154 -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 +438 -0
- package/es/lowcode/painter/components/field-setting/index.js +373 -0
- package/es/lowcode/painter/index.js +3 -28
- package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
- 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 +27 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +45 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +235 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +329 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +20 -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/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 +7 -4
- 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/list-editor.less +36 -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 +27 -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 +2 -4
- 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 +9 -9
- 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 +2 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -24
- 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 +1 -2
- 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 +1 -2
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +93 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +290 -13
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +546 -64
- 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 +2 -2
- 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 +3 -3
- 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 +23 -22
- 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 +3 -3
- 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/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +115 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +48 -49
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +57 -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 -48
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +70 -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 +3 -3
- 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/upload/Form/gridForm.js +7 -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 +236 -0
- package/lib/lowcode/constants/api-url.js +465 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +32 -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 +4 -3
- package/lib/lowcode/engine/meta/box.props.json +2 -4
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +9 -9
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +2 -3
- package/lib/lowcode/engine/meta/components-list.json +1 -1
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +1 -2
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +1 -2
- package/lib/lowcode/engine/meta/form.props.default.json +52 -4
- package/lib/lowcode/engine/meta/form.props.json +596 -64
- 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 +3 -3
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +2 -2
- 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 +3 -3
- 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 +7 -6
- package/lib/lowcode/engine/meta/section.props.json +52 -49
- 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 +3 -3
- 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 +185 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +182 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +101 -17
- package/lib/lowcode/engine/tools/useCanvasRender.js +88 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +22 -12
- 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/Design.js +32 -0
- package/lib/lowcode/painter/DesignOperator.js +45 -28
- package/lib/lowcode/painter/DesignToolbar.js +321 -13
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +96 -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 +57 -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 +25 -10
- 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 +161 -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 +446 -0
- package/lib/lowcode/painter/components/field-setting/index.js +380 -0
- package/lib/lowcode/painter/index.js +3 -30
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
- 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 +34 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +52 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +242 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +337 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +27 -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/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 +7 -4
- 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/list-editor.less +36 -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 +35 -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 +2 -4
- 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 +9 -9
- 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 +2 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +15 -24
- 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 +1 -2
- 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 +1 -2
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +94 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +289 -12
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +546 -64
- 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 +2 -2
- 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 +3 -3
- 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 +24 -22
- 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 +3 -3
- 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/FunctionDesign.js +31 -2
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +114 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +58 -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 -47
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +71 -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 +3 -3
- 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/upload/Form/gridForm.js +7 -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
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useReducer, useState } from 'react';
|
|
4
|
+
import { useSetState, useMemoizedFn } from 'ahooks';
|
|
5
|
+
import { Tooltip, Radio, Input, Icon } from 'luck-design/antd';
|
|
6
|
+
import { isString, isArray, isNil } from 'lodash';
|
|
7
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
8
|
+
import { SortBox, SortItem } from "../components/SortBox";
|
|
9
|
+
import { ListEditor, ListEditorItem } from "../components/ListEditor";
|
|
10
|
+
import PopConfirm from "../components/PopConfirm";
|
|
11
|
+
import { PopForm, PopFormItem, PopFormItemLeft, PopFormItemRight } from "../components/PopForm";
|
|
12
|
+
import FieldSelector from "../components/FieldSelector";
|
|
13
|
+
import { listReducer } from "../../engine/tools/helper";
|
|
14
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.tableTopFilter';
|
|
15
|
+
var _RADIO_STYLE_ = {
|
|
16
|
+
display: 'block',
|
|
17
|
+
margin: '0 0 4px 0',
|
|
18
|
+
lineHeight: 0.4
|
|
19
|
+
};
|
|
20
|
+
var TableTopFilter = function TableTopFilter(_ref) {
|
|
21
|
+
var defaultValue = _ref.defaultValue,
|
|
22
|
+
_onChange = _ref.onChange;
|
|
23
|
+
var _useState = useState(function () {
|
|
24
|
+
if (isNil(defaultValue)) return 'nil';
|
|
25
|
+
if (isString(defaultValue)) return 'customApi';
|
|
26
|
+
if (isArray(defaultValue)) return 'custom';
|
|
27
|
+
return 'dict';
|
|
28
|
+
}),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
type = _useState2[0],
|
|
31
|
+
setType = _useState2[1];
|
|
32
|
+
var _useSetState = useSetState(type === 'dict' ? defaultValue : null),
|
|
33
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
34
|
+
dict = _useSetState2[0],
|
|
35
|
+
setDict = _useSetState2[1];
|
|
36
|
+
var _useReducer = useReducer(listReducer, type === 'custom' ? defaultValue : []),
|
|
37
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
38
|
+
options = _useReducer2[0],
|
|
39
|
+
dispatch = _useReducer2[1];
|
|
40
|
+
var _useState3 = useState(type === 'customApi' ? defaultValue : void 0),
|
|
41
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
+
apiUrl = _useState4[0],
|
|
43
|
+
setApiUrl = _useState4[1];
|
|
44
|
+
var handleAdd = useMemoizedFn(function () {
|
|
45
|
+
var id = suid();
|
|
46
|
+
dispatch({
|
|
47
|
+
type: 'add',
|
|
48
|
+
payload: {
|
|
49
|
+
id: id,
|
|
50
|
+
value: id,
|
|
51
|
+
field: id,
|
|
52
|
+
label: "\u8FC7\u6EE4\u9879".concat(options.length + 1)
|
|
53
|
+
},
|
|
54
|
+
callback: function callback(newOptions) {
|
|
55
|
+
return _onChange(newOptions);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
var handleDelete = useMemoizedFn(function (opt) {
|
|
60
|
+
dispatch({
|
|
61
|
+
type: 'delete',
|
|
62
|
+
payload: opt.id,
|
|
63
|
+
callback: function callback(newOptions) {
|
|
64
|
+
return _onChange(newOptions);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
var handleChange = useMemoizedFn(function (opt) {
|
|
69
|
+
dispatch({
|
|
70
|
+
type: 'edit',
|
|
71
|
+
payload: {
|
|
72
|
+
id: opt.id,
|
|
73
|
+
data: opt
|
|
74
|
+
},
|
|
75
|
+
callback: function callback(newOptions) {
|
|
76
|
+
return _onChange(newOptions);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
var handleSortChange = useMemoizedFn(function (sortItems) {
|
|
81
|
+
dispatch({
|
|
82
|
+
type: 'sort',
|
|
83
|
+
payload: sortItems,
|
|
84
|
+
callback: function callback(newOptions) {
|
|
85
|
+
return _onChange(newOptions);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
var handleTypeChange = useMemoizedFn(function (e) {
|
|
90
|
+
setType(e.target.value);
|
|
91
|
+
_onChange({
|
|
92
|
+
nil: null,
|
|
93
|
+
dict: dict,
|
|
94
|
+
custom: options,
|
|
95
|
+
customApi: apiUrl
|
|
96
|
+
}[e.target.value]);
|
|
97
|
+
});
|
|
98
|
+
var renderItemRight = useMemoizedFn(function (opt) {
|
|
99
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
|
+
title: formatMessage({
|
|
101
|
+
id: 'luckda.lowcode.painter.edit',
|
|
102
|
+
label: '编辑'
|
|
103
|
+
})
|
|
104
|
+
}, /*#__PURE__*/React.createElement(PopConfirm, {
|
|
105
|
+
placement: "left",
|
|
106
|
+
title: /*#__PURE__*/React.createElement(PopForm, null, /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
107
|
+
id: "".concat(_I18N_PREFIX_, ".label"),
|
|
108
|
+
label: '名称'
|
|
109
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
110
|
+
size: "small",
|
|
111
|
+
defaultValue: opt.label,
|
|
112
|
+
onChange: function onChange(e) {
|
|
113
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
114
|
+
label: e.target.value
|
|
115
|
+
}));
|
|
116
|
+
},
|
|
117
|
+
placeholder: formatMessage({
|
|
118
|
+
id: "".concat(_I18N_PREFIX_, ".label.placeholder"),
|
|
119
|
+
label: '请输入过滤项名称'
|
|
120
|
+
})
|
|
121
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
122
|
+
id: "".concat(_I18N_PREFIX_, ".value"),
|
|
123
|
+
label: '值'
|
|
124
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
125
|
+
size: "small",
|
|
126
|
+
defaultValue: opt.value,
|
|
127
|
+
onChange: function onChange(e) {
|
|
128
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
129
|
+
value: e.target.value
|
|
130
|
+
}));
|
|
131
|
+
},
|
|
132
|
+
placeholder: formatMessage({
|
|
133
|
+
id: "".concat(_I18N_PREFIX_, ".value.placeholder"),
|
|
134
|
+
label: '请输入过滤项值'
|
|
135
|
+
})
|
|
136
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
137
|
+
id: "".concat(_I18N_PREFIX_, ".field"),
|
|
138
|
+
label: '字段'
|
|
139
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(FieldSelector, {
|
|
140
|
+
defaultValue: opt.field,
|
|
141
|
+
style: {
|
|
142
|
+
width: '50%'
|
|
143
|
+
},
|
|
144
|
+
placeholder: formatMessage({
|
|
145
|
+
id: "".concat(_I18N_PREFIX_, ".field.placeholder"),
|
|
146
|
+
label: '请选择过滤字段'
|
|
147
|
+
}),
|
|
148
|
+
onChange: function onChange(e) {
|
|
149
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
150
|
+
field: e.target.value
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}))))
|
|
154
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
155
|
+
type: "edit",
|
|
156
|
+
style: {
|
|
157
|
+
marginRight: '8px',
|
|
158
|
+
cursor: 'pointer'
|
|
159
|
+
}
|
|
160
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
161
|
+
title: formatMessage({
|
|
162
|
+
id: 'luckda.lowcode.painter.delete',
|
|
163
|
+
label: '删除'
|
|
164
|
+
})
|
|
165
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
166
|
+
type: "delete",
|
|
167
|
+
style: {
|
|
168
|
+
marginRight: '8px',
|
|
169
|
+
cursor: 'pointer'
|
|
170
|
+
},
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
return handleDelete(action);
|
|
173
|
+
}
|
|
174
|
+
})));
|
|
175
|
+
});
|
|
176
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
style: {
|
|
178
|
+
width: '100%',
|
|
179
|
+
padding: '0 16px'
|
|
180
|
+
}
|
|
181
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
182
|
+
value: type,
|
|
183
|
+
style: {
|
|
184
|
+
width: '100%'
|
|
185
|
+
},
|
|
186
|
+
onChange: handleTypeChange
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
188
|
+
style: _RADIO_STYLE_,
|
|
189
|
+
value: "nil"
|
|
190
|
+
}, formatMessage({
|
|
191
|
+
id: "".concat(_I18N_PREFIX_, ".nil"),
|
|
192
|
+
label: '关闭过滤器'
|
|
193
|
+
})), /*#__PURE__*/React.createElement(Radio, {
|
|
194
|
+
style: _RADIO_STYLE_,
|
|
195
|
+
value: "dict"
|
|
196
|
+
}, formatMessage({
|
|
197
|
+
id: "".concat(_I18N_PREFIX_, ".dict"),
|
|
198
|
+
label: '数据字典'
|
|
199
|
+
}), type === 'dict' && /*#__PURE__*/React.createElement(Input.Group, {
|
|
200
|
+
compact: true,
|
|
201
|
+
style: {
|
|
202
|
+
marginTop: 4
|
|
203
|
+
}
|
|
204
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
205
|
+
size: "small",
|
|
206
|
+
value: dict === null || dict === void 0 ? void 0 : dict.key,
|
|
207
|
+
style: {
|
|
208
|
+
width: '50%'
|
|
209
|
+
},
|
|
210
|
+
placeholder: formatMessage({
|
|
211
|
+
id: "".concat(_I18N_PREFIX_, ".dict.placeholder"),
|
|
212
|
+
label: '请输入字典key'
|
|
213
|
+
}),
|
|
214
|
+
onChange: function onChange(e) {
|
|
215
|
+
var key = e.target.value;
|
|
216
|
+
setDict({
|
|
217
|
+
key: key
|
|
218
|
+
});
|
|
219
|
+
if (dict !== null && dict !== void 0 && dict.field) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
|
|
220
|
+
key: key
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
}), /*#__PURE__*/React.createElement(FieldSelector, {
|
|
224
|
+
style: {
|
|
225
|
+
width: '50%'
|
|
226
|
+
},
|
|
227
|
+
defaultValue: dict === null || dict === void 0 ? void 0 : dict.field,
|
|
228
|
+
placeholder: formatMessage({
|
|
229
|
+
id: "".concat(_I18N_PREFIX_, ".field.placeholder"),
|
|
230
|
+
label: '请选择过滤字段'
|
|
231
|
+
}),
|
|
232
|
+
onChange: function onChange(field) {
|
|
233
|
+
setDict({
|
|
234
|
+
field: field
|
|
235
|
+
});
|
|
236
|
+
if (dict !== null && dict !== void 0 && dict.key) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
|
|
237
|
+
field: field
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
}))), /*#__PURE__*/React.createElement(Radio, {
|
|
241
|
+
style: _RADIO_STYLE_,
|
|
242
|
+
value: "custom"
|
|
243
|
+
}, formatMessage({
|
|
244
|
+
id: "".concat(_I18N_PREFIX_, ".custom"),
|
|
245
|
+
label: '自定义项'
|
|
246
|
+
}), type === 'custom' && /*#__PURE__*/React.createElement(SortBox, {
|
|
247
|
+
datas: options.map(function (_ref2) {
|
|
248
|
+
var id = _ref2.id;
|
|
249
|
+
return id;
|
|
250
|
+
}),
|
|
251
|
+
onChange: handleSortChange
|
|
252
|
+
}, /*#__PURE__*/React.createElement(ListEditor, {
|
|
253
|
+
style: {
|
|
254
|
+
marginTop: 8
|
|
255
|
+
},
|
|
256
|
+
addText: formatMessage({
|
|
257
|
+
id: "".concat(_I18N_PREFIX_, ".add"),
|
|
258
|
+
label: '添加过滤项'
|
|
259
|
+
}),
|
|
260
|
+
handleAdd: handleAdd
|
|
261
|
+
}, options.map(function (opt) {
|
|
262
|
+
return /*#__PURE__*/React.createElement(SortItem, {
|
|
263
|
+
key: opt.id,
|
|
264
|
+
id: opt.id
|
|
265
|
+
}, /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
266
|
+
left: /*#__PURE__*/React.createElement("span", null, opt.label),
|
|
267
|
+
right: renderItemRight(opt),
|
|
268
|
+
item: opt,
|
|
269
|
+
dispatch: dispatch
|
|
270
|
+
}));
|
|
271
|
+
})))), /*#__PURE__*/React.createElement(Radio, {
|
|
272
|
+
style: _RADIO_STYLE_,
|
|
273
|
+
value: "customApi"
|
|
274
|
+
}, formatMessage({
|
|
275
|
+
id: "".concat(_I18N_PREFIX_, ".customApi"),
|
|
276
|
+
label: '自定义接口'
|
|
277
|
+
}), type === 'customApi' && /*#__PURE__*/React.createElement(Input, {
|
|
278
|
+
size: "small",
|
|
279
|
+
value: apiUrl,
|
|
280
|
+
placeholder: formatMessage({
|
|
281
|
+
id: "".concat(_I18N_PREFIX_, ".dict.placeholder"),
|
|
282
|
+
label: '请输入接口地址'
|
|
283
|
+
}),
|
|
284
|
+
style: {
|
|
285
|
+
display: 'block',
|
|
286
|
+
marginTop: 8
|
|
287
|
+
},
|
|
288
|
+
suffix: /*#__PURE__*/React.createElement(Tooltip, {
|
|
289
|
+
title: formatMessage({
|
|
290
|
+
id: "".concat(_I18N_PREFIX_, ".customApi.tip"),
|
|
291
|
+
label: '接口返回数据格式必须是: {mainInfo:{options:[{value: string,label: stirng}], field: string}}'
|
|
292
|
+
})
|
|
293
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
294
|
+
type: "info-circle",
|
|
295
|
+
style: {
|
|
296
|
+
color: 'rgba(0,0,0,.45)'
|
|
297
|
+
}
|
|
298
|
+
})),
|
|
299
|
+
onChange: function onChange(e) {
|
|
300
|
+
var val = e.target.value;
|
|
301
|
+
setApiUrl(val);
|
|
302
|
+
_onChange(val);
|
|
303
|
+
}
|
|
304
|
+
}))));
|
|
305
|
+
};
|
|
306
|
+
export default TableTopFilter;
|
|
@@ -1,14 +1,74 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
3
|
+
import { Icon } from 'luck-design/antd';
|
|
3
4
|
import ColorInput from "../components/ColorInput";
|
|
5
|
+
import PopConfirm from "../components/PopConfirm";
|
|
6
|
+
import FullScreenEditor from "../components/code-editor/FullScreenEditor";
|
|
7
|
+
import JSEditor from "../components/code-editor/JSEditor";
|
|
8
|
+
import { isColor } from "../../engine/tools/helper";
|
|
9
|
+
var _DEFAULT_FUNC_ = 'function getCondition(params) { \n return true; \n}';
|
|
4
10
|
var TableZebra = function TableZebra(_ref) {
|
|
5
11
|
var defaultValue = _ref.defaultValue,
|
|
6
12
|
_onChange = _ref.onChange;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
var editorRef = useRef();
|
|
14
|
+
var inputRef = useRef();
|
|
15
|
+
var valueRef = useRef(defaultValue);
|
|
16
|
+
var defaultColor = useCreation(function () {
|
|
17
|
+
var _temp = defaultValue.color || defaultValue;
|
|
18
|
+
return isColor(_temp) ? _temp : void 0;
|
|
19
|
+
}, [defaultValue]);
|
|
20
|
+
var handleConfirm = useMemoizedFn(function () {
|
|
21
|
+
var condition = editorRef.current.editor.getValue();
|
|
22
|
+
if (condition) {
|
|
23
|
+
valueRef.current = {
|
|
24
|
+
condition: condition,
|
|
25
|
+
color: inputRef.current.state.value
|
|
26
|
+
};
|
|
27
|
+
} else {
|
|
28
|
+
valueRef.current = inputRef.current.state.value || false;
|
|
11
29
|
}
|
|
30
|
+
_onChange(valueRef.current);
|
|
31
|
+
});
|
|
32
|
+
var handleEditorLoad = useMemoizedFn(function () {
|
|
33
|
+
editorRef.current.editor.setValue((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.condition) || _DEFAULT_FUNC_);
|
|
12
34
|
});
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
style: {
|
|
37
|
+
width: '100%',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center'
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/React.createElement(ColorInput, {
|
|
42
|
+
ref: inputRef,
|
|
43
|
+
value: defaultColor,
|
|
44
|
+
wrapperStyle: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
marginRight: 4
|
|
47
|
+
},
|
|
48
|
+
onChange: function onChange(value) {
|
|
49
|
+
if (!value) {
|
|
50
|
+
valueRef.current = false;
|
|
51
|
+
editorRef.current.editor.setValue(_DEFAULT_FUNC_);
|
|
52
|
+
} else if (valueRef.current.condition) {
|
|
53
|
+
valueRef.current.color = value;
|
|
54
|
+
} else {
|
|
55
|
+
valueRef.current = value;
|
|
56
|
+
}
|
|
57
|
+
_onChange(valueRef.current);
|
|
58
|
+
}
|
|
59
|
+
}), /*#__PURE__*/React.createElement(PopConfirm, {
|
|
60
|
+
placement: "left",
|
|
61
|
+
title: /*#__PURE__*/React.createElement(FullScreenEditor, {
|
|
62
|
+
ref: editorRef,
|
|
63
|
+
EditorComponent: JSEditor,
|
|
64
|
+
width: "600px",
|
|
65
|
+
height: "400px",
|
|
66
|
+
onLoad: handleEditorLoad
|
|
67
|
+
}),
|
|
68
|
+
showBtn: true,
|
|
69
|
+
onConfirm: handleConfirm
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
71
|
+
type: "filter"
|
|
72
|
+
})));
|
|
13
73
|
};
|
|
14
74
|
export default TableZebra;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useState, useRef } from 'react';
|
|
3
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
|
+
import { Tooltip, Icon } from 'luck-design/antd';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { cloneDeep } from 'lodash';
|
|
7
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
+
import ActionEditor from "./ActionsEditor/ActionEditor";
|
|
9
|
+
import ActionBindModal from "../components/ActionBindModal";
|
|
10
|
+
import PopConfirm from "../components/PopConfirm";
|
|
11
|
+
var EventItem = styled.div.withConfig({
|
|
12
|
+
displayName: "EventItem",
|
|
13
|
+
componentId: "luckda-6530__sc-1bvweo0-0"
|
|
14
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:4px 8px;border:1px solid #e5e6e8;border-radius:6px;margin-bottom:6px;font-size:12px;i{cursor:pointer;}i:not(:last-child){margin-right:6px;}"]);
|
|
15
|
+
var TreeRootEditor = function TreeRootEditor(_ref) {
|
|
16
|
+
var defaultValue = _ref.defaultValue,
|
|
17
|
+
_onChange = _ref.onChange;
|
|
18
|
+
var valueRef = useRef(cloneDeep(defaultValue));
|
|
19
|
+
var _useState = useState(null),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
event = _useState2[0],
|
|
22
|
+
setEvent = _useState2[1];
|
|
23
|
+
var handleComfirm = useMemoizedFn(function (actionPool) {
|
|
24
|
+
valueRef.current = {
|
|
25
|
+
actionPool: actionPool
|
|
26
|
+
};
|
|
27
|
+
_onChange({
|
|
28
|
+
actionPool: actionPool
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(EventItem, null, /*#__PURE__*/React.createElement("span", null, formatMessage({
|
|
32
|
+
id: 'luckda.lowcode.painter.tree.rootAdd',
|
|
33
|
+
label: '根节点新增'
|
|
34
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
35
|
+
title: formatMessage({
|
|
36
|
+
id: 'luckda.lowcode.painter.edit',
|
|
37
|
+
label: '编辑'
|
|
38
|
+
})
|
|
39
|
+
}, /*#__PURE__*/React.createElement(PopConfirm, {
|
|
40
|
+
placement: "left",
|
|
41
|
+
title: /*#__PURE__*/React.createElement(ActionEditor, {
|
|
42
|
+
suppressName: true,
|
|
43
|
+
suppressRiskLevel: true,
|
|
44
|
+
action: valueRef.current,
|
|
45
|
+
onChange: function onChange(value) {
|
|
46
|
+
valueRef.current = value;
|
|
47
|
+
_onChange(value);
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
51
|
+
type: "edit",
|
|
52
|
+
style: {
|
|
53
|
+
marginRight: '8px',
|
|
54
|
+
cursor: 'pointer'
|
|
55
|
+
}
|
|
56
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
57
|
+
title: formatMessage({
|
|
58
|
+
id: 'luckda.lowcode.painter.edit',
|
|
59
|
+
label: '编辑'
|
|
60
|
+
})
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
62
|
+
type: "paper-clip",
|
|
63
|
+
style: {
|
|
64
|
+
marginRight: '8px',
|
|
65
|
+
cursor: 'pointer'
|
|
66
|
+
},
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return setEvent(valueRef.current);
|
|
69
|
+
}
|
|
70
|
+
})))), /*#__PURE__*/React.createElement(ActionBindModal, {
|
|
71
|
+
event: event,
|
|
72
|
+
onComfirm: handleComfirm,
|
|
73
|
+
onClose: function onClose() {
|
|
74
|
+
return setEvent(null);
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
export default TreeRootEditor;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
.lc-painter-panel-action-bind-modal {
|
|
2
|
+
&-body {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 460px;
|
|
5
|
+
display: flex;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
|
|
8
|
+
&-left {
|
|
9
|
+
width: 320px;
|
|
10
|
+
|
|
11
|
+
.selector-box {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 420px;
|
|
14
|
+
border: 1px solid #e8e8e8;
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
display: flex;
|
|
17
|
+
|
|
18
|
+
.selector-box-ul {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
padding: 0;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
flex-grow: 0;
|
|
24
|
+
|
|
25
|
+
li {
|
|
26
|
+
height: 28px;
|
|
27
|
+
line-height: 28px;
|
|
28
|
+
padding: 0 30px 0 12px;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
position: relative;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
|
|
35
|
+
.check-icon {
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 12px;
|
|
38
|
+
top: 8px;
|
|
39
|
+
height: 12px;
|
|
40
|
+
color: #006cff;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
li.active {
|
|
44
|
+
background: rgba(31, 56, 88, 0.06);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.selector-box-ul.action-category {
|
|
48
|
+
width: 120px;
|
|
49
|
+
border-right: 1px solid #e8e8e8;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.selecter-items-box {
|
|
53
|
+
width: 200px;
|
|
54
|
+
height: 100%;
|
|
55
|
+
|
|
56
|
+
.selecter-items {
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: calc(100% - 48px);
|
|
59
|
+
overflow-y: auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-right {
|
|
66
|
+
margin-left: 12px;
|
|
67
|
+
flex: 1;
|
|
68
|
+
|
|
69
|
+
.code-box {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 420px;
|
|
72
|
+
border: 1px solid #e8e8e8;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
p {
|
|
82
|
+
height: 32px;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
margin-bottom: 8px;
|
|
86
|
+
color: rgba(0, 0, 0, 0.8);
|
|
87
|
+
display: flex;
|
|
88
|
+
-webkit-box-align: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:global {
|
|
94
|
+
.ant-modal-header,
|
|
95
|
+
.ant-modal-footer {
|
|
96
|
+
border: none;
|
|
97
|
+
}
|
|
98
|
+
.ant-input-sm {
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
border-radius: 4px;
|
|
43
43
|
transition: border-color 0.3s;
|
|
44
44
|
box-sizing: border-box; // 确保边框和填充不会增加元素的宽度
|
|
45
|
+
user-select: none;
|
|
45
46
|
|
|
46
47
|
&:hover {
|
|
47
48
|
cursor: pointer;
|
|
@@ -78,12 +79,12 @@
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
:global{
|
|
82
|
-
.ant-tabs-nav-scroll{
|
|
82
|
+
:global {
|
|
83
|
+
.ant-tabs-nav-scroll {
|
|
83
84
|
display: flex;
|
|
84
85
|
justify-content: center;
|
|
85
|
-
.ant-tabs-tab{
|
|
86
|
-
font-size: 14px!important;
|
|
86
|
+
.ant-tabs-tab {
|
|
87
|
+
font-size: 14px !important;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
color: #8c8c8c;
|
|
64
64
|
background: #f1f2f3;
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
.toolbar-item.disabled {
|
|
68
|
+
color: #d9d9d9;
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
}
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
&-workspace {
|
|
@@ -77,10 +82,8 @@
|
|
|
77
82
|
|
|
78
83
|
&-simulator {
|
|
79
84
|
min-height: 100%;
|
|
80
|
-
height: auto;
|
|
81
|
-
display: grid;
|
|
82
85
|
:global {
|
|
83
|
-
.ant-form-item {
|
|
86
|
+
.ant-form-item, .ant-collapse-header, .resizer {
|
|
84
87
|
pointer-events: none;
|
|
85
88
|
}
|
|
86
89
|
.luck-grid-table {
|
|
@@ -132,7 +135,7 @@
|
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
.next-overlay-wrapper {
|
|
135
|
-
z-index:
|
|
138
|
+
z-index: 3000;
|
|
136
139
|
display: flex;
|
|
137
140
|
flex-direction: column;
|
|
138
141
|
& > div > span {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.dragdrop-overlay {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: 2px 0;
|
|
6
|
+
background-color: rgba(0, 0, 0, 0.5); /* 黑色背景,50% 透明度 */
|
|
7
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* 水平偏移0,垂直偏移4px,模糊半径8px,阴影颜色黑色且50%透明 */
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
color: #ffffff;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.lc-painter-panel-field-setting-drawer {
|
|
2
|
+
:global {
|
|
3
|
+
.ant-drawer-header {
|
|
4
|
+
height: 38px;
|
|
5
|
+
padding: 8px 16px;
|
|
6
|
+
.ant-drawer-close {
|
|
7
|
+
width: 38px !important;
|
|
8
|
+
height: 38px !important;
|
|
9
|
+
line-height: 38px !important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.ant-drawer-body {
|
|
13
|
+
height: calc(100% - 38px);
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
padding: 8px 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input,
|
|
19
|
+
button,
|
|
20
|
+
.ant-radio-wrapper,
|
|
21
|
+
.ant-select-sm {
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|