@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,30 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _lodash = require("lodash");
|
|
10
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
11
|
+
var _useCanvasRender = _interopRequireDefault(require("../../../engine/tools/useCanvasRender"));
|
|
12
|
+
var _constants = require("../../../constants");
|
|
13
|
+
var PageModal = function PageModal() {
|
|
14
|
+
var _usePageData = (0, _ContextProvider.usePageData)(function (pagedata) {
|
|
15
|
+
return (0, _lodash.reduce)(pagedata.children, function (result, childId) {
|
|
16
|
+
if (!_constants.LC_BUILDIN_UNIT_KEY_LIST.includes(childId)) {
|
|
17
|
+
result[childId] = pagedata[childId];
|
|
18
|
+
if (!result.children) {
|
|
19
|
+
result.children = [];
|
|
20
|
+
}
|
|
21
|
+
result.children.push(childId);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}, {});
|
|
25
|
+
}),
|
|
26
|
+
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 1),
|
|
27
|
+
pagemodal = _usePageData2[0];
|
|
28
|
+
return (0, _useCanvasRender.default)(pagemodal);
|
|
29
|
+
};
|
|
30
|
+
var _default = exports.default = PageModal;
|
|
@@ -5,12 +5,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
13
|
var _index = _interopRequireDefault(require("./index"));
|
|
10
|
-
var
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
16
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
17
|
+
var _dataProcess = require("../../../engine/tools/dataProcess");
|
|
18
|
+
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
19
|
+
var _excluded = ["children", "id"];
|
|
11
20
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
12
21
|
var children = _ref.children,
|
|
22
|
+
id = _ref.id,
|
|
13
23
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
-
|
|
24
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
25
|
+
var _usePageData = (0, _ContextProvider.usePageData)(),
|
|
26
|
+
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
27
|
+
setPageData = _usePageData2[1].setPageData;
|
|
28
|
+
(0, _ahooks.useCreation)(function () {
|
|
29
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
30
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
31
|
+
var compId = _ref2.id,
|
|
32
|
+
pageData = _ref2.pageData;
|
|
33
|
+
if (compId !== id) return;
|
|
34
|
+
var boxId = "box_".concat((0, _utils.suid)());
|
|
35
|
+
(0, _dataProcess.add)(pageData, id, boxId, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
36
|
+
buildIn: true
|
|
37
|
+
}));
|
|
38
|
+
setPageData(pageData);
|
|
39
|
+
}).watch();
|
|
40
|
+
}, []);
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
42
|
+
id: id
|
|
43
|
+
}, props), children);
|
|
15
44
|
};
|
|
16
45
|
var _default = exports.default = FunctionDesign;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
10
|
+
var _excluded = ["children"];
|
|
11
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
12
|
+
var children = _ref.children,
|
|
13
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(_index.default, props, children);
|
|
15
|
+
};
|
|
16
|
+
var _default = exports.default = FunctionPreview;
|
|
@@ -1,42 +1,133 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _reactDom = require("react-dom");
|
|
12
13
|
var _ahooks = require("ahooks");
|
|
14
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _antd = require("luck-design/antd");
|
|
17
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
18
|
+
var _IconFont = _interopRequireDefault(require("../../../../components/IconFont"));
|
|
19
|
+
var _LdRuntimeCom = _interopRequireDefault(require("../../../../components/LdRuntimeCom"));
|
|
13
20
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
var _index = _interopRequireDefault(require("./index.less"));
|
|
22
|
+
var StyledCollapse = (0, _styledComponents.default)(_antd.Collapse).withConfig({
|
|
23
|
+
displayName: "StyledCollapse",
|
|
24
|
+
componentId: "luckda-6530__sc-lb0zuy-0"
|
|
25
|
+
})(["", ""], function (props) {
|
|
26
|
+
return props.$css;
|
|
27
|
+
});
|
|
28
|
+
var StyledPanel = (0, _styledComponents.default)(_antd.Collapse.Panel).withConfig({
|
|
29
|
+
displayName: "StyledPanel",
|
|
30
|
+
componentId: "luckda-6530__sc-lb0zuy-1"
|
|
31
|
+
})([".ant-collapse-content-box{", "}"], function (props) {
|
|
32
|
+
return !props.padding ? 'padding: 0' : void 0;
|
|
33
|
+
});
|
|
34
|
+
var HeaderWrapper = _styledComponents.default.div.withConfig({
|
|
35
|
+
displayName: "HeaderWrapper",
|
|
36
|
+
componentId: "luckda-6530__sc-lb0zuy-2"
|
|
37
|
+
})(["width:auto;display:inline-flex;align-items:center;"]);
|
|
38
|
+
var Header = function Header(_ref) {
|
|
39
|
+
var title = _ref.title,
|
|
40
|
+
icon = _ref.icon,
|
|
41
|
+
tooltip = _ref.tooltip,
|
|
42
|
+
subtitle = _ref.subtitle;
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(HeaderWrapper, null, icon ? /*#__PURE__*/_react.default.createElement(_IconFont.default, {
|
|
44
|
+
type: icon,
|
|
45
|
+
style: {
|
|
46
|
+
marginRight: 8,
|
|
47
|
+
fontSize: 14,
|
|
48
|
+
color: '#878f95'
|
|
49
|
+
}
|
|
50
|
+
}) : null, title, tooltip ? /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
51
|
+
title: tooltip
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
53
|
+
type: "info-circle",
|
|
54
|
+
theme: "filled",
|
|
55
|
+
style: {
|
|
56
|
+
margin: '0 8px',
|
|
57
|
+
fontSize: 14,
|
|
58
|
+
color: 'var(--ant-primary-color)'
|
|
59
|
+
}
|
|
60
|
+
})) : null, subtitle ? /*#__PURE__*/_react.default.createElement(_LdRuntimeCom.default, null, subtitle) : null);
|
|
61
|
+
};
|
|
62
|
+
var LCSection = function LCSection(_ref2) {
|
|
63
|
+
var id = _ref2.id,
|
|
64
|
+
children = _ref2.children,
|
|
65
|
+
collapse = _ref2.collapse,
|
|
66
|
+
title = _ref2.title,
|
|
67
|
+
iconFont = _ref2.iconFont,
|
|
68
|
+
tooltip = _ref2.tooltip,
|
|
69
|
+
subtitle = _ref2.subtitle,
|
|
70
|
+
extra = _ref2.extra,
|
|
71
|
+
simple = _ref2.simple,
|
|
72
|
+
destroyInactivePanel = _ref2.destroyInactivePanel,
|
|
73
|
+
padding = _ref2.padding,
|
|
74
|
+
css = _ref2.css,
|
|
75
|
+
advance = _ref2.advance;
|
|
20
76
|
var ref = (0, _react.useRef)();
|
|
21
|
-
var
|
|
77
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
78
|
+
var _useCreation = (0, _ahooks.useCreation)(function () {
|
|
79
|
+
if (collapse) {
|
|
80
|
+
return {
|
|
81
|
+
_collapseProps: {
|
|
82
|
+
defaultActiveKey: [id]
|
|
83
|
+
},
|
|
84
|
+
_panelProps: {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
_collapseProps: {
|
|
89
|
+
activeKey: [id]
|
|
90
|
+
},
|
|
91
|
+
_panelProps: {
|
|
92
|
+
showArrow: false
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}, [collapse]),
|
|
96
|
+
_collapseProps = _useCreation._collapseProps,
|
|
97
|
+
_panelProps = _useCreation._panelProps;
|
|
98
|
+
(0, _react.useEffect)(function () {
|
|
99
|
+
ctx.doAction(advance.events.onMount, {
|
|
100
|
+
instance: ref.current
|
|
101
|
+
});
|
|
102
|
+
return function () {
|
|
103
|
+
ctx.doAction(advance.events.onUnmount, {
|
|
104
|
+
instance: ref.current
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
}, []);
|
|
22
108
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
23
|
-
return ref.current;
|
|
24
|
-
});
|
|
25
|
-
(0, _react.useImperativeHandle)(apiRef, function () {
|
|
26
|
-
return {};
|
|
109
|
+
return (0, _reactDom.findDOMNode)(ref.current);
|
|
27
110
|
});
|
|
28
111
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
29
112
|
id: id,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
113
|
+
displayName: "Section",
|
|
114
|
+
getTargetDom: getTargetDom
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(StyledCollapse, (0, _extends2.default)({
|
|
33
116
|
ref: ref,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
117
|
+
bordered: !simple,
|
|
118
|
+
className: (0, _classnames.default)(_index.default['lc-component-Section'], (0, _defineProperty2.default)({}, _index.default['simple-theme'], simple)),
|
|
119
|
+
destroyInactivePanel: destroyInactivePanel,
|
|
120
|
+
$css: css
|
|
121
|
+
}, _collapseProps), /*#__PURE__*/_react.default.createElement(StyledPanel, (0, _extends2.default)({
|
|
122
|
+
header: /*#__PURE__*/_react.default.createElement(Header, {
|
|
123
|
+
title: title,
|
|
124
|
+
icon: iconFont,
|
|
125
|
+
tooltip: tooltip,
|
|
126
|
+
subtitle: subtitle
|
|
127
|
+
}),
|
|
128
|
+
key: id,
|
|
129
|
+
extra: extra ? /*#__PURE__*/_react.default.createElement(_LdRuntimeCom.default, null, extra) : null,
|
|
130
|
+
padding: padding
|
|
131
|
+
}, _panelProps), children)));
|
|
41
132
|
};
|
|
42
133
|
var _default = exports.default = LCSection;
|
|
@@ -8,100 +8,99 @@
|
|
|
8
8
|
"order": 1,
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
|
-
"key": "
|
|
11
|
+
"key": "id",
|
|
12
12
|
"name": "唯一标识",
|
|
13
|
-
"desc": "组件的唯一标识符,不能够与其它组件重名,不能够为空,且只能够使用以字母开头的,下划线以及数字的组合",
|
|
14
13
|
"type": "string",
|
|
15
14
|
"disabled": true
|
|
16
15
|
},
|
|
17
16
|
{
|
|
18
17
|
"key": "collapse",
|
|
19
18
|
"name": "折叠",
|
|
20
|
-
"
|
|
21
|
-
"type": "boolean",
|
|
19
|
+
"type": "switch",
|
|
22
20
|
"default": true
|
|
23
21
|
},
|
|
24
22
|
{
|
|
25
|
-
"key": "
|
|
26
|
-
"name": "
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
23
|
+
"key": "simple",
|
|
24
|
+
"name": "简洁风格",
|
|
25
|
+
"type": "switch",
|
|
26
|
+
"default": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "padding",
|
|
30
|
+
"name": "内边距",
|
|
31
|
+
"type": "switch",
|
|
32
|
+
"default": true,
|
|
33
|
+
"repositioning": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "destroyInactivePanel",
|
|
37
|
+
"name": "隐藏销毁",
|
|
38
|
+
"desc": "面板被折叠隐藏时销毁面板中的组件",
|
|
39
|
+
"type": "switch",
|
|
40
|
+
"default": false
|
|
30
41
|
},
|
|
31
42
|
{
|
|
32
43
|
"key": "title",
|
|
33
44
|
"name": "分组标题",
|
|
34
|
-
"
|
|
35
|
-
"type": "string",
|
|
45
|
+
"type": "_I18nInput",
|
|
36
46
|
"default": "分组"
|
|
37
47
|
},
|
|
38
48
|
{
|
|
39
|
-
"key": "
|
|
49
|
+
"key": "iconFont",
|
|
40
50
|
"name": "图标",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
51
|
+
"type": "_Icon",
|
|
52
|
+
"next": {
|
|
53
|
+
"name": "选择图标",
|
|
54
|
+
"autoClose": true,
|
|
55
|
+
"props": [
|
|
56
|
+
{
|
|
57
|
+
"key": "iconFont",
|
|
58
|
+
"name": "#图标选择器",
|
|
59
|
+
"type": "_IconSelector"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
43
63
|
},
|
|
44
64
|
{
|
|
45
65
|
"key": "tooltip",
|
|
46
66
|
"name": "用户提示",
|
|
47
|
-
"
|
|
48
|
-
"type": "string"
|
|
67
|
+
"type": "_I18nInput"
|
|
49
68
|
},
|
|
50
69
|
{
|
|
51
70
|
"key": "subtitle",
|
|
52
71
|
"name": "副标题插槽",
|
|
53
72
|
"desc": "分组副标题的插槽内容",
|
|
54
|
-
"type": "
|
|
73
|
+
"type": "_JSEditor",
|
|
74
|
+
"defaultCode": "function Component() { \n return <span>subtitle</span>; \n}",
|
|
75
|
+
"mustConfirm": true,
|
|
76
|
+
"wrapper": "collapse",
|
|
77
|
+
"wrapperProps": { "suppressIcon": true }
|
|
55
78
|
},
|
|
56
79
|
{
|
|
57
80
|
"key": "extra",
|
|
58
81
|
"name": "扩展区域插槽",
|
|
59
82
|
"desc": "分组扩展区域的插槽内容",
|
|
60
|
-
"type": "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"desc": "是否展示头部分割线(仅在非折叠情况下有效)",
|
|
66
|
-
"type": "boolean",
|
|
67
|
-
"default": true
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"key": "showBorder",
|
|
71
|
-
"name": "显示边框",
|
|
72
|
-
"desc": "是否展示分组边框(仅在非折叠情况下有效)",
|
|
73
|
-
"type": "boolean",
|
|
74
|
-
"default": false
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"key": "withMargin",
|
|
78
|
-
"name": "外边距",
|
|
79
|
-
"desc": "是否展示外边距",
|
|
80
|
-
"type": "boolean",
|
|
81
|
-
"default": false
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"key": "withPadding",
|
|
85
|
-
"name": "内边距",
|
|
86
|
-
"desc": "是否展示内边距",
|
|
87
|
-
"type": "boolean",
|
|
88
|
-
"default": true
|
|
83
|
+
"type": "_JSEditor",
|
|
84
|
+
"defaultCode": "function Component() { \n return <div>extra</div>; \n}",
|
|
85
|
+
"mustConfirm": true,
|
|
86
|
+
"wrapper": "collapse",
|
|
87
|
+
"wrapperProps": { "suppressIcon": true }
|
|
89
88
|
}
|
|
90
89
|
],
|
|
91
|
-
"
|
|
90
|
+
"css": "width: 100%;",
|
|
92
91
|
"advance": {
|
|
93
92
|
"events": [
|
|
94
93
|
{
|
|
95
94
|
"key": "onMount",
|
|
96
95
|
"name": "组件首次渲染时",
|
|
97
96
|
"desc": "在组件首次渲染时,执行方法",
|
|
98
|
-
"func": "(
|
|
97
|
+
"func": "(instance)=>{\n\t\n}"
|
|
99
98
|
},
|
|
100
99
|
{
|
|
101
100
|
"key": "onUnmount",
|
|
102
101
|
"name": "组件卸载时",
|
|
103
102
|
"desc": "在组件卸载时,执行方法。",
|
|
104
|
-
"func": "(
|
|
103
|
+
"func": "(instance)=>{\n\t\n}"
|
|
105
104
|
}
|
|
106
105
|
]
|
|
107
106
|
}
|
|
@@ -1,16 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
16
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
9
17
|
var _index = _interopRequireDefault(require("./index"));
|
|
10
|
-
var
|
|
18
|
+
var _dataProcess = require("../../../engine/tools/dataProcess");
|
|
19
|
+
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
20
|
+
var _excluded = ["children", "id", "display"];
|
|
11
21
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
12
22
|
var children = _ref.children,
|
|
23
|
+
id = _ref.id,
|
|
24
|
+
display = _ref.display,
|
|
13
25
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
-
|
|
26
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
27
|
+
var _usePageData = (0, _ContextProvider.usePageData)(),
|
|
28
|
+
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
29
|
+
setPageData = _usePageData2[1].setPageData;
|
|
30
|
+
var refreshChild = (0, _ahooks.useMemoizedFn)(function (_pageData) {
|
|
31
|
+
var _findNodeAndParent = (0, _dataProcess.findNodeAndParent)(id, _pageData),
|
|
32
|
+
current = _findNodeAndParent.node;
|
|
33
|
+
var ratioArr = display.ratio ? display.ratio.split(':') : new Array(display.type.length);
|
|
34
|
+
drop(current.children, ratioArr.length).forEach(function (boxId) {
|
|
35
|
+
(0, _dataProcess.deleteById)(_pageData, boxId);
|
|
36
|
+
});
|
|
37
|
+
ratioArr.forEach(function (_, index) {
|
|
38
|
+
var _current$children;
|
|
39
|
+
if (!((_current$children = current.children) !== null && _current$children !== void 0 && _current$children[index])) {
|
|
40
|
+
(0, _dataProcess.add)(_pageData, id, "box_".concat((0, _utils.suid)()), (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
41
|
+
buildIn: true
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
setPageData(_pageData);
|
|
46
|
+
});
|
|
47
|
+
(0, _ahooks.useCreation)(function () {
|
|
48
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
49
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
50
|
+
var compId = _ref2.id,
|
|
51
|
+
pageData = _ref2.pageData;
|
|
52
|
+
if (compId !== id) return;
|
|
53
|
+
refreshChild(pageData);
|
|
54
|
+
}).watch();
|
|
55
|
+
}, []);
|
|
56
|
+
(0, _react.useEffect)(function () {
|
|
57
|
+
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
58
|
+
var compId = _ref3.id,
|
|
59
|
+
pageData = _ref3.pageData;
|
|
60
|
+
if (compId !== id) return;
|
|
61
|
+
refreshChild(pageData);
|
|
62
|
+
}).watch();
|
|
63
|
+
return function () {
|
|
64
|
+
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
65
|
+
};
|
|
66
|
+
}, []);
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
68
|
+
id: id,
|
|
69
|
+
display: display
|
|
70
|
+
}, props), children);
|
|
15
71
|
};
|
|
16
72
|
var _default = exports.default = FunctionDesign;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
10
|
+
var _excluded = ["children"];
|
|
11
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
12
|
+
var children = _ref.children,
|
|
13
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(_index.default, props, children);
|
|
15
|
+
};
|
|
16
|
+
var _default = exports.default = FunctionPreview;
|
|
@@ -6,24 +6,63 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _ahooks = require("ahooks");
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
|
+
var _base = require("@luck-design-biz/base");
|
|
12
14
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
13
|
-
var
|
|
15
|
+
var _MAPPING_ = {
|
|
16
|
+
left: 'min',
|
|
17
|
+
up: 'min',
|
|
18
|
+
right: 'max',
|
|
19
|
+
down: 'max'
|
|
20
|
+
};
|
|
21
|
+
var Div = _styledComponents.default.div.withConfig({
|
|
22
|
+
displayName: "Div",
|
|
23
|
+
componentId: "luckda-6530__sc-halzyx-0"
|
|
24
|
+
})(["width:100%;height:100%;", ""], function (props) {
|
|
25
|
+
return props.$css;
|
|
26
|
+
});
|
|
14
27
|
var LCSplit = function LCSplit(_ref) {
|
|
15
28
|
var id = _ref.id,
|
|
16
29
|
children = _ref.children,
|
|
17
|
-
|
|
30
|
+
css = _ref.css,
|
|
31
|
+
display = _ref.display;
|
|
32
|
+
var prevDisplay = (0, _ahooks.usePrevious)(display);
|
|
18
33
|
var ref = (0, _react.useRef)();
|
|
19
34
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
20
35
|
return ref.current;
|
|
21
36
|
});
|
|
37
|
+
var _useCreation = (0, _ahooks.useCreation)(function () {
|
|
38
|
+
if ((0, _lodash.isNil)(display.ratio)) return {};
|
|
39
|
+
var arr = display.ratio.split(':').map(function (r) {
|
|
40
|
+
return parseInt(r);
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
ratioArr: arr,
|
|
44
|
+
total: (0, _lodash.sum)(arr)
|
|
45
|
+
};
|
|
46
|
+
}, [display.ratio]),
|
|
47
|
+
ratioArr = _useCreation.ratioArr,
|
|
48
|
+
total = _useCreation.total;
|
|
22
49
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
23
50
|
id: id,
|
|
51
|
+
displayName: "Split",
|
|
24
52
|
getTargetDom: getTargetDom
|
|
25
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
26
|
-
ref: ref
|
|
27
|
-
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(Div, {
|
|
54
|
+
ref: ref,
|
|
55
|
+
$css: css
|
|
56
|
+
}, prevDisplay && prevDisplay.type !== display.type ? null : display.type === 'normal' ? /*#__PURE__*/_react.default.createElement(_base.MemorySplit, {
|
|
57
|
+
split: display.split
|
|
58
|
+
}, ratioArr.map(function (r, i) {
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_base.MemorySplit.Pane, {
|
|
60
|
+
fastTo: !display.fastTo || i === display.fastTo.length ? 'max' : _MAPPING_[display.fastTo[i]],
|
|
61
|
+
initialSize: "".concat(r / total * 100, "%"),
|
|
62
|
+
key: i
|
|
63
|
+
}, children === null || children === void 0 ? void 0 : children[i]);
|
|
64
|
+
})) : /*#__PURE__*/_react.default.createElement(_base.Layout, null, /*#__PURE__*/_react.default.createElement(_base.Layout.Sider, null, children[0]), /*#__PURE__*/_react.default.createElement(_base.Layout.Main, null, display.type === 'lr' ? children === null || children === void 0 ? void 0 : children[1] : /*#__PURE__*/_react.default.createElement(_base.MemorySplit, {
|
|
65
|
+
split: display.type === 'ltb' ? 'horizontal' : 'vertical'
|
|
66
|
+
}, children === null || children === void 0 ? void 0 : children[1], children === null || children === void 0 ? void 0 : children[2])))));
|
|
28
67
|
};
|
|
29
68
|
var _default = exports.default = LCSplit;
|
|
@@ -8,45 +8,26 @@
|
|
|
8
8
|
"order": 1,
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
|
-
"key": "
|
|
11
|
+
"key": "id",
|
|
12
12
|
"name": "唯一标识",
|
|
13
|
-
"desc": "组件的唯一标识符,不能够与其它组件重名,不能够为空,且只能够使用以字母开头的,下划线以及数字的组合",
|
|
14
13
|
"type": "string",
|
|
15
14
|
"disabled": true
|
|
16
15
|
},
|
|
17
16
|
{
|
|
18
|
-
"key": "
|
|
17
|
+
"key": "displaySetting",
|
|
19
18
|
"name": "展现形式",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"default": "normal"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"key": "split",
|
|
26
|
-
"name": "分割方向",
|
|
27
|
-
"desc": "分割面板容器的分割方向(仅display为normal时有效)",
|
|
28
|
-
"type": "radio",
|
|
29
|
-
"options": [
|
|
30
|
-
{
|
|
31
|
-
"label": "垂直",
|
|
32
|
-
"value": "vertical"
|
|
33
|
-
},
|
|
19
|
+
"type": "group",
|
|
20
|
+
"props": [
|
|
34
21
|
{
|
|
35
|
-
"
|
|
36
|
-
"
|
|
22
|
+
"key": "display",
|
|
23
|
+
"name": "#展现形式",
|
|
24
|
+
"type": "_SplitDisplay",
|
|
25
|
+
"default": { "type": "normal", "split": "horizontal", "ratio": "1:1" }
|
|
37
26
|
}
|
|
38
|
-
]
|
|
39
|
-
"default": "vertical"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"key": "ratio",
|
|
43
|
-
"name": "比率",
|
|
44
|
-
"desc": "表示分割面板容器所占比例的比率(仅display为normal时有效)",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"default": "1:3"
|
|
27
|
+
]
|
|
47
28
|
}
|
|
48
29
|
],
|
|
49
|
-
"
|
|
30
|
+
"css": "background-color: transparent",
|
|
50
31
|
"advance": {
|
|
51
32
|
"events": [
|
|
52
33
|
{
|