@luck-design-biz/luckda 0.0.24-2 → 0.0.25-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Builder/index.js +6 -4
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +133 -0
- package/es/components/LDActions/index.less +65 -0
- package/es/components/LdAutoForm/index.js +1 -1
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdGrid/index.js +14 -8
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +221 -0
- package/es/lowcode/constants/api-url.js +380 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +30 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +3 -2
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +8 -8
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +53 -4
- package/es/lowcode/engine/meta/form.props.json +584 -55
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +5 -2
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/es/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/es/lowcode/engine/meta/jsx.props.json +10 -5
- package/es/lowcode/engine/meta/layout.props.default.json +5 -2
- package/es/lowcode/engine/meta/layout.props.json +1 -2
- package/es/lowcode/engine/meta/link.props.default.json +5 -2
- package/es/lowcode/engine/meta/link.props.json +2 -2
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +49 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/section.props.default.json +5 -2
- package/es/lowcode/engine/meta/section.props.json +1 -1
- package/es/lowcode/engine/meta/split.props.default.json +9 -4
- package/es/lowcode/engine/meta/split.props.json +14 -29
- package/es/lowcode/engine/meta/table.props.default.json +23 -3
- package/es/lowcode/engine/meta/table.props.json +257 -55
- package/es/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/es/lowcode/engine/meta/tabs.props.json +57 -81
- package/es/lowcode/engine/meta/text.props.default.json +5 -2
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +20 -7
- package/es/lowcode/engine/meta/tree.props.json +225 -79
- package/es/lowcode/engine/provider/ContextProvider/index.js +169 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +161 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +96 -19
- package/es/lowcode/engine/tools/useCanvasRender.js +75 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -6
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +1 -0
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/DesignOperator.js +47 -28
- package/es/lowcode/painter/DesignToolbar.js +86 -15
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +100 -142
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +293 -0
- package/es/lowcode/painter/components/AdvancePanel.js +140 -0
- package/es/lowcode/painter/components/AttrsPanel.js +145 -0
- package/es/lowcode/painter/components/Collapse.js +20 -9
- package/es/lowcode/painter/components/ColorInput.js +5 -3
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +47 -0
- package/es/lowcode/painter/components/DragDrop/Overlay.js +8 -0
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +67 -0
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/ListEditor.js +18 -9
- package/es/lowcode/painter/components/PanelItem.js +1 -1
- package/es/lowcode/painter/components/PopConfirm.js +10 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +144 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +126 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +116 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +419 -0
- package/es/lowcode/painter/components/field-setting/index.js +363 -0
- package/es/lowcode/painter/index.js +3 -1
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +74 -13
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +24 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +44 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +202 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +308 -0
- package/es/lowcode/painter/panel-section/Icon.js +14 -14
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +6 -7
- package/es/lowcode/painter/panel-section/SerialsSelector.js +44 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +248 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -22
- package/es/lowcode/painter/panel-section/TabItems.js +46 -30
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +66 -6
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/services/toolbar.js +25 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/collapse.less +6 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +2 -3
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +14 -0
- package/es/lowcode/view/Canvas.js +34 -139
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +16 -14
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +11 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +43 -20
- package/es/lowcode/view/lc-components/Button/meta.json +8 -8
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +17 -23
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/es/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +114 -8
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +534 -55
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +19 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +19 -17
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Layout/index.js +1 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +2 -2
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +53 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +38 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +40 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +23 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +1 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +59 -2
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +46 -7
- package/es/lowcode/view/lc-components/Split/meta.json +10 -29
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +41 -4
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +365 -49
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +72 -2
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +113 -10
- package/es/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +323 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/es/lowcode/view/lc-components/Wrapper.js +44 -27
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +4 -1
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +141 -0
- package/lib/components/LDActions/index.less +65 -0
- package/lib/components/LdAutoForm/index.js +1 -1
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGridForm/index.js +4 -3
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +227 -0
- package/lib/lowcode/constants/api-url.js +382 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +31 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +3 -2
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +8 -8
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +53 -4
- package/lib/lowcode/engine/meta/form.props.json +584 -55
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +5 -2
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/lib/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/lib/lowcode/engine/meta/jsx.props.json +10 -5
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -2
- package/lib/lowcode/engine/meta/layout.props.json +1 -2
- package/lib/lowcode/engine/meta/link.props.default.json +5 -2
- package/lib/lowcode/engine/meta/link.props.json +2 -2
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +49 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/section.props.default.json +5 -2
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- package/lib/lowcode/engine/meta/split.props.default.json +9 -4
- package/lib/lowcode/engine/meta/split.props.json +14 -29
- package/lib/lowcode/engine/meta/table.props.default.json +23 -3
- package/lib/lowcode/engine/meta/table.props.json +257 -55
- package/lib/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/lib/lowcode/engine/meta/tabs.props.json +57 -81
- package/lib/lowcode/engine/meta/text.props.default.json +5 -2
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +20 -7
- package/lib/lowcode/engine/meta/tree.props.json +225 -79
- package/lib/lowcode/engine/provider/ContextProvider/index.js +177 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +169 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +100 -18
- package/lib/lowcode/engine/tools/useCanvasRender.js +90 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -5
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +7 -0
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/DesignOperator.js +45 -26
- package/lib/lowcode/painter/DesignToolbar.js +82 -11
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +97 -139
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +300 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +148 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +153 -0
- package/lib/lowcode/painter/components/Collapse.js +20 -9
- package/lib/lowcode/painter/components/ColorInput.js +5 -3
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +54 -0
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +15 -0
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +75 -0
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +17 -8
- package/lib/lowcode/painter/components/PanelItem.js +1 -1
- package/lib/lowcode/painter/components/PopConfirm.js +10 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +151 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +133 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +123 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +427 -0
- package/lib/lowcode/painter/components/field-setting/index.js +370 -0
- package/lib/lowcode/painter/index.js +3 -1
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +20 -66
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +71 -10
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +31 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +51 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +208 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +316 -0
- package/lib/lowcode/painter/panel-section/Icon.js +16 -14
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +5 -6
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +51 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +256 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -23
- package/lib/lowcode/painter/panel-section/TabItems.js +45 -29
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +67 -6
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/services/toolbar.js +32 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/collapse.less +6 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +2 -3
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +21 -0
- package/lib/lowcode/view/Canvas.js +32 -145
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +12 -10
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +11 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +41 -18
- package/lib/lowcode/view/lc-components/Button/meta.json +8 -8
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -23
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +32 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +113 -7
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +534 -55
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +19 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +21 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +1 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +61 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +46 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +48 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +30 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +1 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +60 -2
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +45 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +10 -29
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +43 -5
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +364 -48
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +73 -2
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +112 -9
- package/lib/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +321 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/lib/lowcode/view/lc-components/Wrapper.js +42 -25
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/utils/grid.js +2 -2
- package/package.json +12 -7
- package/es/lowcode/engine/provider/ContextProvider.js +0 -169
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +0 -147
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -177
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import Index from "./index";
|
|
4
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionPreview;
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["id"];
|
|
3
1
|
import React, { useRef } from 'react';
|
|
4
2
|
import { useMemoizedFn } from 'ahooks';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
5
5
|
import Wrapper from "../Wrapper";
|
|
6
|
+
import LdRuntimeCom from "../../../../components/LdRuntimeCom";
|
|
7
|
+
var JSXWrapper = styled.div.withConfig({
|
|
8
|
+
displayName: "JSXWrapper",
|
|
9
|
+
componentId: "luckda-6530__sc-23r5qk-0"
|
|
10
|
+
})(["", ""], function (props) {
|
|
11
|
+
return props.$css;
|
|
12
|
+
});
|
|
6
13
|
var LCJSX = function LCJSX(_ref) {
|
|
7
14
|
var id = _ref.id,
|
|
8
|
-
|
|
15
|
+
render = _ref.render,
|
|
16
|
+
css = _ref.css;
|
|
9
17
|
var ref = useRef();
|
|
18
|
+
var ctx = useContext();
|
|
10
19
|
var getTargetDom = useMemoizedFn(function () {
|
|
11
20
|
return ref.current;
|
|
12
21
|
});
|
|
13
22
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
14
23
|
id: id,
|
|
24
|
+
displayName: "JSX",
|
|
15
25
|
getTargetDom: getTargetDom
|
|
16
|
-
}, /*#__PURE__*/React.createElement(
|
|
17
|
-
ref: ref
|
|
18
|
-
|
|
26
|
+
}, /*#__PURE__*/React.createElement(JSXWrapper, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
$css: css
|
|
29
|
+
}, /*#__PURE__*/React.createElement(LdRuntimeCom, {
|
|
30
|
+
ctx: ctx
|
|
31
|
+
}, render)));
|
|
19
32
|
};
|
|
20
33
|
export default LCJSX;
|
|
@@ -9,17 +9,20 @@
|
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
11
|
"key": "id",
|
|
12
|
-
"
|
|
12
|
+
"name": "唯一标识",
|
|
13
13
|
"type": "string",
|
|
14
14
|
"disabled": true
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"key": "render",
|
|
18
18
|
"name": "编辑jsx代码",
|
|
19
|
-
"desc": "
|
|
20
|
-
"type": "
|
|
19
|
+
"desc": "编写可执行的完整jsx组件代码",
|
|
20
|
+
"type": "_JSEditor",
|
|
21
|
+
"default": "function Component() {\n\treturn(\n\t\t<div>\n\t\t\t此为自定义代码组件,请使用 JSX 语法\n\t\t</div>\n\t)\n}",
|
|
22
|
+
"mustConfirm": true,
|
|
23
|
+
"wrapper": "collapse",
|
|
24
|
+
"wrapperProps": { "suppressIcon": true }
|
|
21
25
|
}
|
|
22
26
|
],
|
|
23
|
-
"
|
|
24
|
-
"advance": {}
|
|
27
|
+
"css": "width: 100%; height: auto;"
|
|
25
28
|
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "
|
|
5
|
-
|
|
6
|
-
import { useEffect } from 'react';
|
|
5
|
+
var _excluded = ["children", "id", "columnRatio"];
|
|
6
|
+
import React, { useEffect } from 'react';
|
|
7
7
|
import { useCreation, useMemoizedFn } from 'ahooks';
|
|
8
8
|
import { drop, cloneDeep } from 'lodash';
|
|
9
9
|
import { suid } from '@luck-design-biz/base/utils';
|
|
10
|
+
import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
|
|
10
11
|
import Index from "./index";
|
|
11
12
|
import { add, modifyById, deleteById, findNodeAndParent } from "../../../engine/tools/dataProcess";
|
|
12
13
|
import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
|
|
13
14
|
var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
14
15
|
var children = _ref.children,
|
|
15
|
-
context = _ref.context,
|
|
16
16
|
id = _ref.id,
|
|
17
17
|
columnRatio = _ref.columnRatio,
|
|
18
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
var ctx = useContext();
|
|
20
|
+
var _usePageData = usePageData(),
|
|
21
|
+
_usePageData2 = _slicedToArray(_usePageData, 2),
|
|
22
|
+
setPageData = _usePageData2[1].setPageData;
|
|
19
23
|
var refreshChild = useMemoizedFn(function (_pageData) {
|
|
20
24
|
var cloneData = cloneDeep(_pageData);
|
|
21
25
|
var _findNodeAndParent = findNodeAndParent(id, cloneData),
|
|
@@ -30,26 +34,25 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
30
34
|
var boxId = (_current$children = current.children) === null || _current$children === void 0 ? void 0 : _current$children[index];
|
|
31
35
|
if (boxId) {
|
|
32
36
|
modifyById(cloneData, current.children[index], _objectSpread(_objectSpread({}, current[boxId].props), {}, {
|
|
33
|
-
style:
|
|
37
|
+
style: {
|
|
34
38
|
gridColumn: 'span ' + ratio
|
|
35
|
-
}
|
|
39
|
+
}
|
|
36
40
|
}));
|
|
37
41
|
} else {
|
|
38
42
|
boxId = "box_".concat(suid());
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
43
|
+
add(cloneData, id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
44
|
+
buildIn: true,
|
|
45
|
+
style: {
|
|
43
46
|
gridColumn: 'span ' + ratio
|
|
44
|
-
}
|
|
47
|
+
}
|
|
45
48
|
}));
|
|
46
49
|
}
|
|
47
50
|
});
|
|
48
|
-
|
|
51
|
+
setPageData(cloneData);
|
|
49
52
|
});
|
|
50
53
|
useCreation(function () {
|
|
51
54
|
if (children !== null && children !== void 0 && children.length) return;
|
|
52
|
-
|
|
55
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
53
56
|
var compId = _ref2.id,
|
|
54
57
|
pageData = _ref2.pageData;
|
|
55
58
|
if (compId !== id) return;
|
|
@@ -57,19 +60,18 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
57
60
|
}).watch();
|
|
58
61
|
}, []);
|
|
59
62
|
useEffect(function () {
|
|
60
|
-
var cmid =
|
|
63
|
+
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
61
64
|
var compId = _ref3.id,
|
|
62
65
|
pageData = _ref3.pageData;
|
|
63
66
|
if (compId !== id) return;
|
|
64
67
|
refreshChild(pageData);
|
|
65
68
|
}).watch();
|
|
66
69
|
return function () {
|
|
67
|
-
return
|
|
70
|
+
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
68
71
|
};
|
|
69
72
|
}, []);
|
|
70
73
|
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
71
|
-
id: id
|
|
72
|
-
context: context
|
|
74
|
+
id: id
|
|
73
75
|
}, props), children);
|
|
74
76
|
};
|
|
75
77
|
export default LayoutFunctionDesign;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children"
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import Index from "./index";
|
|
5
5
|
var LayoutFunctionLive = function LayoutFunctionLive(_ref) {
|
|
6
6
|
var children = _ref.children,
|
|
7
|
-
context = _ref.context,
|
|
8
|
-
id = _ref.id,
|
|
9
7
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
-
return /*#__PURE__*/React.createElement(Index,
|
|
11
|
-
id: id,
|
|
12
|
-
context: context
|
|
13
|
-
}, props), children);
|
|
8
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
14
9
|
};
|
|
15
10
|
export default LayoutFunctionLive;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import Index from "./index";
|
|
4
|
+
var LayoutFunctionPreview = function LayoutFunctionPreview(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default LayoutFunctionPreview;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
{
|
|
11
11
|
"key": "id",
|
|
12
12
|
"name": "唯一标识",
|
|
13
|
-
"desc": "组件的唯一标识符,不能够与其它组件重名,不能够为空,且只能够使用以字母开头的,下划线以及数字的组合",
|
|
14
13
|
"type": "string",
|
|
15
14
|
"disabled": true
|
|
16
15
|
},
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
"default": 16
|
|
89
88
|
}
|
|
90
89
|
],
|
|
91
|
-
"
|
|
90
|
+
"css": {},
|
|
92
91
|
"advance": {
|
|
93
92
|
"events": [
|
|
94
93
|
{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import Index from "./index";
|
|
4
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionPreview;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"key": "serials",
|
|
67
67
|
"name": "资源串",
|
|
68
68
|
"desc": "挂接模块资源串",
|
|
69
|
-
"type": "
|
|
69
|
+
"type": "_SerialsSelector"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"key": "effect",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"default": "hidden"
|
|
87
87
|
}
|
|
88
88
|
],
|
|
89
|
-
"
|
|
89
|
+
"css": {},
|
|
90
90
|
"advance": {
|
|
91
91
|
"events": [
|
|
92
92
|
{
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Page",
|
|
3
|
+
"name": "页面",
|
|
4
|
+
"group": "build-in",
|
|
5
|
+
"props": [
|
|
6
|
+
{
|
|
7
|
+
"key": "pageSlot",
|
|
8
|
+
"name": "页面插槽",
|
|
9
|
+
"type": "group",
|
|
10
|
+
"props": [
|
|
11
|
+
{
|
|
12
|
+
"key": "enableHeader",
|
|
13
|
+
"name": "启用页头",
|
|
14
|
+
"type": "switch",
|
|
15
|
+
"default": "false"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"key": "fixedHeader",
|
|
19
|
+
"name": "固定页头",
|
|
20
|
+
"type": "switch",
|
|
21
|
+
"default": "true"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "enableFooter",
|
|
25
|
+
"name": "启用页尾",
|
|
26
|
+
"type": "switch",
|
|
27
|
+
"default": "false"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"css": "background-color: transparent;",
|
|
33
|
+
"advance": {
|
|
34
|
+
"events": [
|
|
35
|
+
{
|
|
36
|
+
"key": "onPageMount",
|
|
37
|
+
"name": "组件首次渲染时",
|
|
38
|
+
"desc": "在组件首次渲染时,执行方法",
|
|
39
|
+
"func": "(params)=>{\n\t\n}"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"key": "onPageUnmount",
|
|
43
|
+
"name": "组件卸载时",
|
|
44
|
+
"desc": "在组件卸载时,执行方法。",
|
|
45
|
+
"func": "(params)=>{\n\t\n}"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { usePageData } from "../../../engine/provider/ContextProvider";
|
|
6
|
+
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
|
+
import Wrapper from "../Wrapper";
|
|
8
|
+
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
9
|
+
import { parseCSS } from "../../../engine/tools/helper";
|
|
10
|
+
var Div = styled.div.withConfig({
|
|
11
|
+
displayName: "Div",
|
|
12
|
+
componentId: "luckda-6530__sc-19wkpor-0"
|
|
13
|
+
})(["", ""], function (props) {
|
|
14
|
+
return props.$css;
|
|
15
|
+
});
|
|
16
|
+
var PageContent = function PageContent() {
|
|
17
|
+
var ref = useRef();
|
|
18
|
+
var _usePageData = usePageData([LC_BUILDIN_UNIT_KEY.PAGE_CONTENT, 'props.enableHeader', "".concat(LC_BUILDIN_UNIT_KEY.PAGE_HEADER, ".props.css")]),
|
|
19
|
+
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
20
|
+
_usePageData2$ = _slicedToArray(_usePageData2[0], 3),
|
|
21
|
+
pagecontent = _usePageData2$[0],
|
|
22
|
+
enableHeader = _usePageData2$[1],
|
|
23
|
+
headercss = _usePageData2$[2];
|
|
24
|
+
var canvas = useCanvasRender(pagecontent);
|
|
25
|
+
var contentStyle = useCreation(function () {
|
|
26
|
+
if (enableHeader) {
|
|
27
|
+
var headerCss = parseCSS(headercss);
|
|
28
|
+
var _h = "calc(100% - ".concat(headerCss.height || '0px', " - ").concat(headerCss['margin-bottom'] || '0px', " - ").concat(headerCss['margin-top'] || '0px', ")");
|
|
29
|
+
return {
|
|
30
|
+
width: '100%',
|
|
31
|
+
height: 'auto',
|
|
32
|
+
minHeight: _h
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
width: '100%',
|
|
37
|
+
height: '100%'
|
|
38
|
+
};
|
|
39
|
+
}, [enableHeader, headercss]);
|
|
40
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
41
|
+
return ref.current;
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
44
|
+
id: LC_BUILDIN_UNIT_KEY.PAGE_CONTENT,
|
|
45
|
+
displayName: "PageContent",
|
|
46
|
+
getTargetDom: getTargetDom
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Div, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
$css: pagecontent.props.css,
|
|
50
|
+
style: contentStyle
|
|
51
|
+
}, canvas));
|
|
52
|
+
};
|
|
53
|
+
export default PageContent;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { usePageData } from "../../../engine/provider/ContextProvider";
|
|
6
|
+
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
|
+
import Wrapper from "../Wrapper";
|
|
8
|
+
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
9
|
+
var Div = styled.div.withConfig({
|
|
10
|
+
displayName: "Div",
|
|
11
|
+
componentId: "luckda-6530__sc-1d40970-0"
|
|
12
|
+
})(["", ""], function (props) {
|
|
13
|
+
return props.$css;
|
|
14
|
+
});
|
|
15
|
+
var PageFooter = function PageFooter() {
|
|
16
|
+
var ref = useRef();
|
|
17
|
+
var _usePageData = usePageData(LC_BUILDIN_UNIT_KEY.PAGE_FOOTER),
|
|
18
|
+
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
19
|
+
pagefoot = _usePageData2[0];
|
|
20
|
+
var canvas = useCanvasRender(pagefoot);
|
|
21
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
22
|
+
return ref.current;
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
25
|
+
id: LC_BUILDIN_UNIT_KEY.PAGE_FOOTER,
|
|
26
|
+
displayName: "PageFooter",
|
|
27
|
+
getTargetDom: getTargetDom
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Div, {
|
|
29
|
+
ref: ref,
|
|
30
|
+
$css: pagefoot.props.css,
|
|
31
|
+
style: {
|
|
32
|
+
width: '100%',
|
|
33
|
+
height: 80,
|
|
34
|
+
background: '#69c0ff'
|
|
35
|
+
}
|
|
36
|
+
}, canvas));
|
|
37
|
+
};
|
|
38
|
+
export default PageFooter;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { usePageData } from "../../../engine/provider/ContextProvider";
|
|
6
|
+
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
|
+
import Wrapper from "../Wrapper";
|
|
8
|
+
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
9
|
+
var Div = styled.div.withConfig({
|
|
10
|
+
displayName: "Div",
|
|
11
|
+
componentId: "luckda-6530__sc-1t2cxpy-0"
|
|
12
|
+
})(["", ""], function (props) {
|
|
13
|
+
return props.$css;
|
|
14
|
+
});
|
|
15
|
+
var PageHeader = function PageHeader() {
|
|
16
|
+
var ref = useRef();
|
|
17
|
+
var _usePageData = usePageData([LC_BUILDIN_UNIT_KEY.PAGE_HEADER, 'props.fixedHeader']),
|
|
18
|
+
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
19
|
+
_usePageData2$ = _slicedToArray(_usePageData2[0], 2),
|
|
20
|
+
pageheader = _usePageData2$[0],
|
|
21
|
+
fixed = _usePageData2$[1];
|
|
22
|
+
var canvas = useCanvasRender(pageheader);
|
|
23
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
24
|
+
return ref.current;
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
27
|
+
id: LC_BUILDIN_UNIT_KEY.PAGE_HEADER,
|
|
28
|
+
displayName: "PageHeader",
|
|
29
|
+
getTargetDom: getTargetDom
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Div, {
|
|
31
|
+
ref: ref,
|
|
32
|
+
$css: pageheader.props.css,
|
|
33
|
+
style: fixed ? {
|
|
34
|
+
position: 'sticky',
|
|
35
|
+
top: 0,
|
|
36
|
+
zIndex: 10
|
|
37
|
+
} : null
|
|
38
|
+
}, canvas));
|
|
39
|
+
};
|
|
40
|
+
export default PageHeader;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { reduce } from 'lodash';
|
|
3
|
+
import { usePageData } from "../../../engine/provider/ContextProvider";
|
|
4
|
+
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
5
|
+
import { LC_BUILDIN_UNIT_KEY_LIST } from "../../../constants";
|
|
6
|
+
var PageModal = function PageModal() {
|
|
7
|
+
var _usePageData = usePageData(function (pagedata) {
|
|
8
|
+
return reduce(pagedata.children, function (result, childId) {
|
|
9
|
+
if (!LC_BUILDIN_UNIT_KEY_LIST.includes(childId)) {
|
|
10
|
+
result[childId] = pagedata[childId];
|
|
11
|
+
if (!result.children) {
|
|
12
|
+
result.children = [];
|
|
13
|
+
}
|
|
14
|
+
result.children.push(childId);
|
|
15
|
+
}
|
|
16
|
+
return result;
|
|
17
|
+
}, {});
|
|
18
|
+
}),
|
|
19
|
+
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
20
|
+
pagemodal = _usePageData2[0];
|
|
21
|
+
return useCanvasRender(pagemodal);
|
|
22
|
+
};
|
|
23
|
+
export default PageModal;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import Index from "./index";
|
|
4
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionPreview;
|
|
@@ -1,9 +1,66 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["children"];
|
|
5
|
+
var _excluded = ["children", "id", "display"];
|
|
6
|
+
import React, { useEffect } from 'react';
|
|
7
|
+
import { useCreation, useMemoizedFn } from 'ahooks';
|
|
8
|
+
import { drop, cloneDeep } from 'lodash';
|
|
9
|
+
import { suid } from '@luck-design-biz/base/utils';
|
|
10
|
+
import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
|
|
3
11
|
import Index from "./index";
|
|
12
|
+
import { add, deleteById, findNodeAndParent } from "../../../engine/tools/dataProcess";
|
|
13
|
+
import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
|
|
4
14
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
5
15
|
var children = _ref.children,
|
|
16
|
+
id = _ref.id,
|
|
17
|
+
display = _ref.display,
|
|
6
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
-
|
|
19
|
+
var ctx = useContext();
|
|
20
|
+
var _usePageData = usePageData(),
|
|
21
|
+
_usePageData2 = _slicedToArray(_usePageData, 2),
|
|
22
|
+
setPageData = _usePageData2[1].setPageData;
|
|
23
|
+
var refreshChild = useMemoizedFn(function (_pageData) {
|
|
24
|
+
var cloneData = cloneDeep(_pageData);
|
|
25
|
+
var _findNodeAndParent = findNodeAndParent(id, cloneData),
|
|
26
|
+
current = _findNodeAndParent.node;
|
|
27
|
+
var ratioArr = display.ratio ? display.ratio.split(':') : new Array(display.type.length);
|
|
28
|
+
drop(current.children, ratioArr.length).forEach(function (boxId) {
|
|
29
|
+
deleteById(cloneData, boxId);
|
|
30
|
+
});
|
|
31
|
+
ratioArr.forEach(function (_, index) {
|
|
32
|
+
var _current$children;
|
|
33
|
+
if (!((_current$children = current.children) !== null && _current$children !== void 0 && _current$children[index])) {
|
|
34
|
+
add(cloneData, id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
35
|
+
buildIn: true
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
setPageData(cloneData);
|
|
40
|
+
});
|
|
41
|
+
useCreation(function () {
|
|
42
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
43
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
44
|
+
var compId = _ref2.id,
|
|
45
|
+
pageData = _ref2.pageData;
|
|
46
|
+
if (compId !== id) return;
|
|
47
|
+
refreshChild(pageData);
|
|
48
|
+
}).watch();
|
|
49
|
+
}, []);
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
52
|
+
var compId = _ref3.id,
|
|
53
|
+
pageData = _ref3.pageData;
|
|
54
|
+
if (compId !== id) return;
|
|
55
|
+
refreshChild(pageData);
|
|
56
|
+
}).watch();
|
|
57
|
+
return function () {
|
|
58
|
+
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
61
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
62
|
+
id: id,
|
|
63
|
+
display: display
|
|
64
|
+
}, props), children);
|
|
8
65
|
};
|
|
9
66
|
export default FunctionDesign;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import Index from "./index";
|
|
4
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionPreview;
|