@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,25 @@
|
|
|
1
|
+
.lc-painter-panel-field-setting-drawer {
|
|
2
|
+
:global {
|
|
3
|
+
.ant-drawer-header {
|
|
4
|
+
height: 38px;
|
|
5
|
+
padding: 8px 16px;
|
|
6
|
+
.ant-drawer-close {
|
|
7
|
+
width: 38px !important;
|
|
8
|
+
height: 38px !important;
|
|
9
|
+
line-height: 38px !important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.ant-drawer-body {
|
|
13
|
+
height: calc(100% - 38px);
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
padding: 8px 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input,
|
|
19
|
+
button,
|
|
20
|
+
.ant-radio-wrapper,
|
|
21
|
+
.ant-select-sm {
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
.list-item {
|
|
9
9
|
height: 28px;
|
|
10
|
+
position: relative;
|
|
10
11
|
background: #fff;
|
|
11
12
|
border: 1px solid #e5e6e8;
|
|
12
13
|
border-radius: 6px;
|
|
@@ -37,6 +38,41 @@
|
|
|
37
38
|
cursor: pointer;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
.list-item-bottom-line {
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 8px;
|
|
45
|
+
border-bottom: solid 1px var(--ant-primary-color);
|
|
46
|
+
position: absolute;
|
|
47
|
+
left: 0;
|
|
48
|
+
bottom: -6px;
|
|
49
|
+
padding-top: 4px;
|
|
50
|
+
display: none;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
z-index: 10;
|
|
55
|
+
}
|
|
56
|
+
.list-item-bottom-line::after {
|
|
57
|
+
content: "+";
|
|
58
|
+
height: 12px;
|
|
59
|
+
margin-top: 4px;
|
|
60
|
+
color: var(--ant-primary-color);
|
|
61
|
+
border: solid 1px var(--ant-primary-color);
|
|
62
|
+
border-radius: 10px;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
background-color: white;
|
|
66
|
+
padding: 0 8px;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
}
|
|
71
|
+
&:hover {
|
|
72
|
+
.list-item-bottom-line {
|
|
73
|
+
display: flex;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
40
76
|
}
|
|
41
77
|
}
|
|
42
78
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.lc-painter-panel-attrs {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
flex: 1;
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
padding: 8px 0;
|
|
8
|
+
|
|
9
|
+
&-next {
|
|
10
|
+
height: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
|
|
14
|
+
&-header {
|
|
15
|
+
height: 28px;
|
|
16
|
+
background-color: #e8e8e8;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 0 4px;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
}
|
|
23
|
+
&-header:hover {
|
|
24
|
+
background-color: #e3e3e3;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-body {
|
|
29
|
+
flex: 1;
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
background-color: white;
|
|
32
|
+
padding: 16px 0 8px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.lc-painter-panel-attrs.hidden {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.lc-painter-panel-attrs.showNext {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
@@ -82,48 +82,17 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
&-content {
|
|
86
|
-
position: relative;
|
|
87
|
-
width: 100%;
|
|
88
|
-
flex: 1;
|
|
89
|
-
overflow-x: hidden;
|
|
90
|
-
overflow-y: auto;
|
|
91
|
-
padding: 8px 0;
|
|
92
|
-
|
|
93
|
-
.next-content {
|
|
94
|
-
height: 100%;
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
|
|
98
|
-
&-header {
|
|
99
|
-
height: 28px;
|
|
100
|
-
background-color: #e8e8e8;
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
justify-content: space-between;
|
|
104
|
-
padding: 0 4px;
|
|
105
|
-
}
|
|
106
|
-
&-header:hover {
|
|
107
|
-
background-color: #e3e3e3;
|
|
108
|
-
cursor: pointer;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&-body {
|
|
112
|
-
flex: 1;
|
|
113
|
-
overflow-y: auto;
|
|
114
|
-
background-color: white;
|
|
115
|
-
padding: 16px 0 8px;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
&-content.showNext {
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
}
|
|
122
85
|
:global {
|
|
123
86
|
.ant-select .ant-btn {
|
|
124
87
|
width: 170px !important;
|
|
125
88
|
height: 20px;
|
|
126
89
|
line-height: 16px;
|
|
127
90
|
}
|
|
91
|
+
input,
|
|
92
|
+
button,
|
|
93
|
+
.ant-radio-wrapper,
|
|
94
|
+
.ant-select-sm {
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
}
|
|
128
97
|
}
|
|
129
98
|
}
|
|
@@ -3,8 +3,15 @@
|
|
|
3
3
|
.ant-popover-message-title {
|
|
4
4
|
padding: 0;
|
|
5
5
|
}
|
|
6
|
-
.ant-popover-buttons{
|
|
6
|
+
.ant-popover-buttons {
|
|
7
7
|
display: none;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
.lc-painter-panel-section-components-popconfirm.show-btn {
|
|
12
|
+
:global {
|
|
13
|
+
.ant-popover-buttons {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.lc-painter-panel-section-splitdisplay {
|
|
2
|
+
.display-type-box {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: repeat(4, 1fr);
|
|
5
|
+
grid-column-gap: 4px;
|
|
6
|
+
|
|
7
|
+
.display-type-item {
|
|
8
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
padding: 3px;
|
|
11
|
+
height: 42px;
|
|
12
|
+
display: flex;
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
border-color: var(--ant-primary-color);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.active {
|
|
20
|
+
border-color: var(--ant-primary-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.item-block {
|
|
24
|
+
background-color: rgb(192, 194, 196);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.lc-painter-components-treedragdrop {
|
|
2
|
+
|
|
3
|
+
user-select: none;
|
|
4
|
+
|
|
5
|
+
&.left-side {
|
|
6
|
+
border-top: 2px solid #1890ff;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&.right-side {
|
|
10
|
+
border-bottom: 2px solid #1890ff;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.inside-side {
|
|
14
|
+
border: 2px solid #1890ff;
|
|
15
|
+
}
|
|
16
|
+
&.ondrag{
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _ahooks = require("ahooks");
|
|
12
|
+
var _EventBusProvider = _interopRequireDefault(require("../engine/provider/EventBusProvider"));
|
|
13
|
+
var _ContextProvider = _interopRequireDefault(require("../engine/provider/ContextProvider"));
|
|
14
|
+
var _Page = _interopRequireDefault(require("../view/Page"));
|
|
15
|
+
var _index = require("../constants/index");
|
|
16
|
+
var Preview = function Preview(_ref) {
|
|
17
|
+
var code = _ref.code,
|
|
18
|
+
userId = _ref.userId;
|
|
19
|
+
var _useState = (0, _react.useState)(userId),
|
|
20
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
21
|
+
currentKey = _useState2[0],
|
|
22
|
+
setCurrentKey = _useState2[1];
|
|
23
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
24
|
+
setCurrentKey(void 0);
|
|
25
|
+
setTimeout(function () {
|
|
26
|
+
setCurrentKey(userId);
|
|
27
|
+
});
|
|
28
|
+
}, [userId]);
|
|
29
|
+
return code && currentKey ? /*#__PURE__*/_react.default.createElement(_EventBusProvider.default, {
|
|
30
|
+
runtime: _index.RUNTIME.PREVIEW
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_ContextProvider.default, {
|
|
32
|
+
code: code
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_Page.default, null))) : null;
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = Preview;
|
|
@@ -1,159 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard3 = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var
|
|
10
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
|
-
var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
|
|
12
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
var _react =
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var _lodash = require("lodash");
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
13
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
20
|
-
var
|
|
14
|
+
var _PageHeader = _interopRequireDefault(require("./lc-components/PageHeader"));
|
|
15
|
+
var _PageContent = _interopRequireDefault(require("./lc-components/PageContent"));
|
|
16
|
+
var _PageFooter = _interopRequireDefault(require("./lc-components/PageFooter"));
|
|
17
|
+
var _PageModal = _interopRequireDefault(require("./lc-components/PageModal"));
|
|
21
18
|
var _constants = require("../constants");
|
|
22
19
|
var _canvas = _interopRequireDefault(require("./style/canvas.less"));
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
39
|
-
footer = _useState6[0],
|
|
40
|
-
setFooter = _useState6[1];
|
|
41
|
-
var _useState7 = (0, _react.useState)(null),
|
|
42
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
43
|
-
modal = _useState8[0],
|
|
44
|
-
setModal = _useState8[1];
|
|
45
|
-
var render = (0, _ahooks.useMemoizedFn)(function (_ref) {
|
|
46
|
-
var props = _ref.props,
|
|
47
|
-
children = _ref.children,
|
|
48
|
-
childrenMap = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
|
-
if (props && !PAGE_CELL.includes(props.id)) {
|
|
50
|
-
var id = props.id,
|
|
51
|
-
component = props.component,
|
|
52
|
-
name = props.name,
|
|
53
|
-
desc = props.desc,
|
|
54
|
-
icon = props.icon,
|
|
55
|
-
group = props.group,
|
|
56
|
-
groupName = props.groupName,
|
|
57
|
-
order = props.order,
|
|
58
|
-
rest = (0, _objectWithoutProperties2.default)(props, _excluded2);
|
|
59
|
-
if (!dynamicCompMap.current[component]) {
|
|
60
|
-
dynamicCompMap.current[component] = (0, _umi.dynamic)({
|
|
61
|
-
loader: function () {
|
|
62
|
-
var _loader = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
63
|
-
var _runtime, _yield$import, _Comp;
|
|
64
|
-
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
65
|
-
while (1) switch (_context.prev = _context.next) {
|
|
66
|
-
case 0:
|
|
67
|
-
_runtime = (0, _lodash.upperFirst)(context.runtime);
|
|
68
|
-
_context.next = 3;
|
|
69
|
-
return function (specifier) {
|
|
70
|
-
return new Promise(function (r) {
|
|
71
|
-
return r(specifier);
|
|
72
|
-
}).then(function (s) {
|
|
73
|
-
return (0, _interopRequireWildcard2.default)(require(s));
|
|
74
|
-
});
|
|
75
|
-
}("./lc-components/".concat(component, "/Function").concat(_runtime));
|
|
76
|
-
case 3:
|
|
77
|
-
_yield$import = _context.sent;
|
|
78
|
-
_Comp = _yield$import.default;
|
|
79
|
-
return _context.abrupt("return", _Comp);
|
|
80
|
-
case 6:
|
|
81
|
-
case "end":
|
|
82
|
-
return _context.stop();
|
|
83
|
-
}
|
|
84
|
-
}, _callee);
|
|
85
|
-
}));
|
|
86
|
-
function loader() {
|
|
87
|
-
return _loader.apply(this, arguments);
|
|
88
|
-
}
|
|
89
|
-
return loader;
|
|
90
|
-
}()
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
var Comp = dynamicCompMap.current[component];
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(Comp, (0, _extends2.default)({
|
|
95
|
-
key: id,
|
|
96
|
-
id: id,
|
|
97
|
-
context: context
|
|
98
|
-
}, rest), (children || []).map(function (_id) {
|
|
99
|
-
return render(childrenMap[_id]);
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
return (children || []).map(function (_id) {
|
|
103
|
-
return render(childrenMap[_id]);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
(0, _ahooks.useDeepCompareLayoutEffect)(function () {
|
|
107
|
-
setHeader(render(context.pageData[_constants.CELL_KEY.PAGE_HEADER]));
|
|
108
|
-
}, [context.pageData[_constants.CELL_KEY.PAGE_HEADER]]);
|
|
109
|
-
(0, _ahooks.useDeepCompareLayoutEffect)(function () {
|
|
110
|
-
setContent(render(context.pageData[_constants.CELL_KEY.PAGE_CONTENT]));
|
|
111
|
-
}, [context.pageData[_constants.CELL_KEY.PAGE_CONTENT]]);
|
|
112
|
-
(0, _ahooks.useDeepCompareLayoutEffect)(function () {
|
|
113
|
-
setFooter(render(context.pageData[_constants.CELL_KEY.PAGE_FOOTER]));
|
|
114
|
-
}, [context.pageData[_constants.CELL_KEY.PAGE_FOOTER]]);
|
|
115
|
-
(0, _ahooks.useDeepCompareLayoutEffect)(function () {
|
|
116
|
-
var pageModal = (0, _lodash.reduce)(context.pageData.children, function (result, _id) {
|
|
117
|
-
if (!PAGE_CELL.includes(_id)) {
|
|
118
|
-
result[_id] = context.pageData[_id];
|
|
119
|
-
if (!result.children) {
|
|
120
|
-
result.children = [];
|
|
121
|
-
}
|
|
122
|
-
result.children.push(_id);
|
|
123
|
-
}
|
|
124
|
-
return result;
|
|
125
|
-
}, {});
|
|
126
|
-
setModal(render(pageModal));
|
|
127
|
-
}, [context.pageData.children, context.pageData.children.map(function (_id) {
|
|
128
|
-
return context.pageData[_id];
|
|
129
|
-
})]);
|
|
130
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
var PageRoot = _styledComponents.default.div.withConfig({
|
|
21
|
+
displayName: "PageRoot",
|
|
22
|
+
componentId: "luckda-6530__sc-mchzyx-0"
|
|
23
|
+
})(["", ""], function (props) {
|
|
24
|
+
return props.$css;
|
|
25
|
+
});
|
|
26
|
+
var Canvas = function Canvas(_ref) {
|
|
27
|
+
var className = _ref.className;
|
|
28
|
+
var _usePageData = (0, _ContextProvider.usePageData)(['props.css', 'props.enableHeader', 'props.enableFooter']),
|
|
29
|
+
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 1),
|
|
30
|
+
_usePageData2$ = (0, _slicedToArray2.default)(_usePageData2[0], 3),
|
|
31
|
+
pagerootCss = _usePageData2$[0],
|
|
32
|
+
enableHeader = _usePageData2$[1],
|
|
33
|
+
enableFooter = _usePageData2$[2];
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(PageRoot, {
|
|
131
35
|
id: "page-canvas",
|
|
132
|
-
className: _canvas.default['lc-view-canvas']
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}, header), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
142
|
-
key: _constants.CELL_KEY.PAGE_CONTENT,
|
|
143
|
-
id: _constants.CELL_KEY.PAGE_CONTENT,
|
|
144
|
-
style: {
|
|
145
|
-
width: '100%',
|
|
146
|
-
height: 'calc(100% - 120px)',
|
|
147
|
-
backgroundColor: 'transparent'
|
|
148
|
-
}
|
|
149
|
-
}, content), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
150
|
-
key: _constants.CELL_KEY.PAGE_FOOTER,
|
|
151
|
-
id: _constants.CELL_KEY.PAGE_FOOTER,
|
|
152
|
-
style: {
|
|
153
|
-
width: '100%',
|
|
154
|
-
height: 80,
|
|
155
|
-
backgroundColor: '#69c0ff'
|
|
156
|
-
}
|
|
157
|
-
}, footer), modal);
|
|
36
|
+
className: (0, _classnames.default)(_canvas.default['lc-view-canvas'], (0, _defineProperty2.default)({}, className, !!className)),
|
|
37
|
+
$css: pagerootCss
|
|
38
|
+
}, enableHeader ? /*#__PURE__*/_react.default.createElement(_PageHeader.default, {
|
|
39
|
+
key: _constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER
|
|
40
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_PageContent.default, {
|
|
41
|
+
key: _constants.LC_BUILDIN_UNIT_KEY.PAGE_CONTENT
|
|
42
|
+
}), enableFooter ? /*#__PURE__*/_react.default.createElement(_PageFooter.default, {
|
|
43
|
+
key: _constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER
|
|
44
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_PageModal.default, null));
|
|
158
45
|
};
|
|
159
46
|
var _default = exports.default = Canvas;
|
|
@@ -5,12 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _loading = _interopRequireDefault(require("./style/loading.less"));
|
|
11
|
-
var Loading = function Loading() {
|
|
12
|
+
var Loading = function Loading(_ref) {
|
|
13
|
+
var className = _ref.className,
|
|
14
|
+
style = _ref.style;
|
|
12
15
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
13
|
-
className: _loading.default['lc-painter-loading']
|
|
16
|
+
className: (0, _classnames.default)(_loading.default['lc-painter-loading'], (0, _defineProperty2.default)({}, className, !!className)),
|
|
17
|
+
style: style
|
|
14
18
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
15
19
|
className: _loading.default['cube']
|
|
16
20
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
package/lib/lowcode/view/Page.js
CHANGED
|
@@ -12,34 +12,36 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
17
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
16
18
|
var _Loading = _interopRequireDefault(require("./Loading"));
|
|
17
19
|
var _Wrapper = _interopRequireDefault(require("./lc-components/Wrapper"));
|
|
18
20
|
var _Canvas = _interopRequireDefault(require("./Canvas"));
|
|
19
|
-
var _Builder = _interopRequireDefault(require("../../components/Builder"));
|
|
20
21
|
var _constants = require("../constants");
|
|
21
22
|
var _page = _interopRequireDefault(require("./style/page.less"));
|
|
22
23
|
var _excluded = ["className"];
|
|
24
|
+
var Masker = _styledComponents.default.div.withConfig({
|
|
25
|
+
displayName: "Masker",
|
|
26
|
+
componentId: "luckda-6530__sc-yswm45-0"
|
|
27
|
+
})(["position:absolute;top:0;left:0;width:100%;height:100%;z-index:2400;background:rgba(0,0,0,0.45);cursor:none;"]);
|
|
23
28
|
var LCPage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
24
|
-
var _context$pageinfo2;
|
|
25
29
|
var className = _ref2.className,
|
|
26
30
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
27
31
|
var _ref = (0, _react.useRef)(null);
|
|
28
32
|
var _rootRef = ref || _ref;
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return !((_context$pageinfo = context.pageinfo) !== null && _context$pageinfo !== void 0 && _context$pageinfo.relationship.moduleCode) ? null : (0, _Builder.default)(_Canvas.default, context.pageinfo.relationship.moduleCode);
|
|
33
|
-
}, [(_context$pageinfo2 = context.pageinfo) === null || _context$pageinfo2 === void 0 ? void 0 : _context$pageinfo2.relationship.moduleCode]);
|
|
33
|
+
var _useRemoteSource = (0, _ContextProvider.useRemoteSource)(),
|
|
34
|
+
loading = _useRemoteSource.loading,
|
|
35
|
+
pageData = _useRemoteSource.pageData;
|
|
34
36
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
35
37
|
return _rootRef.current;
|
|
36
38
|
});
|
|
37
39
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
38
|
-
id: _constants.
|
|
40
|
+
id: _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT,
|
|
39
41
|
getTargetDom: getTargetDom
|
|
40
42
|
}, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
41
43
|
ref: _rootRef,
|
|
42
|
-
className: (0, _classnames.default)(_page.default['lc-view-page'], (0, _defineProperty2.default)({}, className, !!className))
|
|
43
|
-
}, props),
|
|
44
|
+
className: (0, _classnames.default)(_page.default['lc-view-page'], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _page.default.isloading, loading), className, !!className))
|
|
45
|
+
}, props), (0, _lodash.isNil)(pageData) ? null : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Canvas.default, null), loading ? /*#__PURE__*/_react.default.createElement(Masker, null, /*#__PURE__*/_react.default.createElement(_Loading.default, null)) : null)));
|
|
44
46
|
});
|
|
45
47
|
var _default = exports.default = LCPage;
|
|
@@ -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;
|
|
@@ -11,14 +11,22 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _ahooks = require("ahooks");
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
15
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
15
16
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
16
17
|
var _helper = require("../../../engine/tools/helper");
|
|
17
18
|
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
19
|
+
var Box = _styledComponents.default.div.withConfig({
|
|
20
|
+
displayName: "Box",
|
|
21
|
+
componentId: "luckda-6530__sc-19se5zf-0"
|
|
22
|
+
})(["", ""], function (props) {
|
|
23
|
+
return props.$css;
|
|
24
|
+
});
|
|
18
25
|
var LCBox = function LCBox(_ref) {
|
|
19
26
|
var id = _ref.id,
|
|
20
27
|
children = _ref.children,
|
|
21
28
|
className = _ref.className,
|
|
29
|
+
css = _ref.css,
|
|
22
30
|
style = _ref.style;
|
|
23
31
|
var ref = (0, _react.useRef)();
|
|
24
32
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
@@ -26,12 +34,13 @@ var LCBox = function LCBox(_ref) {
|
|
|
26
34
|
});
|
|
27
35
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
28
36
|
id: id,
|
|
37
|
+
displayName: "Box",
|
|
29
38
|
getTargetDom: getTargetDom
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(Box, {
|
|
31
40
|
ref: ref,
|
|
32
41
|
className: (0, _classnames.default)(_index.default['lc-component-box'], (0, _defineProperty2.default)({}, className, !!className)),
|
|
33
42
|
style: style,
|
|
34
|
-
|
|
43
|
+
$css: css
|
|
35
44
|
}, children));
|
|
36
45
|
};
|
|
37
46
|
LCBox.propTypes = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"component": "Box",
|
|
3
|
-
"name": "
|
|
3
|
+
"name": "盒子",
|
|
4
4
|
"desc": "盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。",
|
|
5
5
|
"icon": "icon-box",
|
|
6
6
|
"group": "container",
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
"disabled": true
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
|
-
"
|
|
18
|
-
"height": "60px"
|
|
19
|
-
},
|
|
17
|
+
"css": "height:60px; width: auto; background-color: #fff;",
|
|
20
18
|
"advance": {
|
|
21
19
|
"events": [
|
|
22
20
|
{
|
|
@@ -9,20 +9,18 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _ahooks = require("ahooks");
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
14
|
var _index = _interopRequireDefault(require("./index"));
|
|
14
|
-
var
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _style = _interopRequireDefault(require("./style.less"));
|
|
16
|
+
var _excluded = ["className"];
|
|
16
17
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
17
|
-
var
|
|
18
|
-
children = _ref.children,
|
|
19
|
-
context = _ref.context,
|
|
20
|
-
className = _ref.className,
|
|
18
|
+
var className = _ref.className,
|
|
21
19
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
|
+
var handleClick = (0, _ahooks.useMemoizedFn)(function () {});
|
|
22
21
|
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, props), children);
|
|
22
|
+
className: (0, _classnames.default)(_style.default['runtime-button'], (0, _defineProperty2.default)({}, className, !!className)),
|
|
23
|
+
onClick: handleClick
|
|
24
|
+
}, props));
|
|
27
25
|
};
|
|
28
26
|
var _default = exports.default = FunctionDesign;
|