@luck-design-biz/luckda 0.0.23 → 0.0.24-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/LdFormList/index.js +1 -4
- package/es/components/LdGrid/index.js +12 -3
- package/es/lowcode/constants/api-url.js +292 -1
- package/es/lowcode/constants/event-topics.js +14 -1
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +51 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +42 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +44 -0
- package/es/lowcode/engine/meta/box.props.default.json +12 -0
- package/es/lowcode/engine/meta/box.props.json +42 -0
- package/es/lowcode/engine/meta/button.props.default.json +15 -7
- package/es/lowcode/engine/meta/{components/button.json → button.props.json} +126 -103
- package/es/lowcode/engine/meta/cardlist.props.default.json +17 -9
- package/es/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +143 -142
- package/es/lowcode/engine/meta/components-list.json +127 -121
- package/es/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/{lib/lowcode/engine/meta/components/modal.json → es/lowcode/engine/meta/dialog.props.json} +120 -119
- package/es/lowcode/engine/meta/drawer.props.default.json +17 -9
- package/{lib/lowcode/engine/meta/components/drawer.json → es/lowcode/engine/meta/drawer.props.json} +143 -142
- package/es/lowcode/engine/meta/form.props.default.json +12 -4
- package/{lib/lowcode/engine/meta/components/form.json → es/lowcode/engine/meta/form.props.json} +116 -115
- package/es/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/es/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/es/lowcode/engine/meta/image.props.default.json +15 -7
- package/es/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/es/lowcode/engine/meta/imex.props.default.json +11 -3
- package/{lib/lowcode/engine/meta/components/imex.json → es/lowcode/engine/meta/imex.props.json} +81 -80
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +10 -1
- package/es/lowcode/engine/meta/{components/jsx.json → jsx.props.json} +24 -23
- package/es/lowcode/engine/meta/layout.props.default.json +12 -4
- package/{lib/lowcode/engine/meta/components/layout.json → es/lowcode/engine/meta/layout.props.json} +107 -106
- package/es/lowcode/engine/meta/link.props.default.json +13 -5
- package/{lib/lowcode/engine/meta/components/link.json → es/lowcode/engine/meta/link.props.json} +111 -110
- package/es/lowcode/engine/meta/section.props.default.json +16 -8
- package/{lib/lowcode/engine/meta/components/section.json → es/lowcode/engine/meta/section.props.json} +107 -106
- package/es/lowcode/engine/meta/split.props.default.json +12 -4
- package/es/lowcode/engine/meta/{components/split.json → split.props.json} +71 -70
- package/es/lowcode/engine/meta/table.props.default.json +29 -9
- package/es/lowcode/engine/meta/table.props.json +236 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +17 -9
- package/es/lowcode/engine/meta/{components/tabs.json → tabs.props.json} +140 -139
- package/es/lowcode/engine/meta/text.props.default.json +11 -3
- package/{lib/lowcode/engine/meta/components/text.json → es/lowcode/engine/meta/text.props.json} +65 -64
- package/es/lowcode/engine/meta/tree.props.default.json +16 -8
- package/es/lowcode/engine/meta/{components/tree.json → tree.props.json} +156 -155
- package/es/lowcode/engine/provider/ContextProvider.js +46 -41
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/tools/dataProcess.js +85 -8
- package/es/lowcode/engine/tools/helper.js +68 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +3 -1
- package/es/lowcode/painter/Design.js +40 -85
- package/es/lowcode/painter/DesignOperator.js +271 -0
- package/es/lowcode/painter/DesignToolbar.js +91 -0
- package/es/lowcode/painter/I18n.js +202 -2
- package/es/lowcode/painter/Outline.js +63 -54
- package/es/lowcode/painter/Panel.js +239 -2
- package/es/lowcode/painter/Ribbon.js +61 -55
- package/es/lowcode/painter/components/Collapse.js +90 -0
- package/es/lowcode/painter/components/ColorInput.js +125 -0
- package/es/lowcode/painter/components/ListEditor.js +89 -0
- package/es/lowcode/painter/components/NumberInput.js +148 -0
- package/es/lowcode/painter/components/PanelItem.js +83 -11
- package/es/lowcode/painter/components/PopConfirm.js +23 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/RuleInput.js +9 -7
- package/es/lowcode/painter/components/SortBox.js +92 -0
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +147 -0
- package/es/lowcode/painter/components/actions-editor/index.js +170 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +96 -0
- package/es/lowcode/painter/components/code-editor/CssEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +87 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +106 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/index.js +33 -3
- package/es/lowcode/painter/panel-section/ButtonType.js +39 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +61 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +134 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +57 -49
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +296 -0
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +543 -0
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +96 -0
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +148 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +51 -0
- package/es/lowcode/painter/panel-section/StylePanel/index.js +29 -0
- package/es/lowcode/painter/panel-section/TabItems.js +207 -0
- package/es/lowcode/painter/panel-section/TableActions.js +19 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +14 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +85 -0
- package/es/lowcode/painter/style/actions-editor.less +16 -0
- package/es/lowcode/painter/style/border-editor.less +36 -0
- package/es/lowcode/painter/style/border-radius-selector.less +43 -0
- package/es/lowcode/painter/style/border-selector.less +40 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/collapse.less +22 -0
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/design.less +116 -5
- package/es/lowcode/painter/style/display.less +17 -0
- package/es/lowcode/painter/style/font-editor.less +9 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/index.less +0 -1
- package/es/lowcode/painter/style/layout-ratio.less +1 -1
- package/es/lowcode/painter/style/list-editor.less +59 -0
- package/es/lowcode/painter/style/number-input.less +17 -0
- package/es/lowcode/painter/style/outline.less +2 -0
- package/es/lowcode/painter/style/panel-item.less +45 -12
- package/es/lowcode/painter/style/panel.less +124 -0
- package/es/lowcode/painter/style/pop-confirm.less +10 -0
- package/es/lowcode/painter/style/pop-form.less +20 -0
- package/es/lowcode/painter/style/ribbon.less +1 -0
- package/es/lowcode/painter/style/style-panel.less +37 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/view/Canvas.js +79 -70
- package/es/lowcode/view/Page.js +10 -28
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +20 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +22 -5
- package/es/lowcode/view/lc-components/Box/index.less +15 -0
- package/es/lowcode/view/lc-components/Box/meta.json +42 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +21 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Button/index.js +75 -7
- package/es/lowcode/view/lc-components/Button/meta.json +127 -0
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +9 -0
- package/{lib/lowcode/engine/meta/components/table.json → es/lowcode/view/lc-components/CardList/meta.json} +11 -28
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +54 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +20 -11
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +20 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +22 -9
- package/es/lowcode/view/lc-components/Drawer/index.less +7 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Form/meta.json +117 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -0
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +75 -0
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +15 -0
- package/es/lowcode/view/lc-components/Layout/index.js +40 -7
- package/es/lowcode/view/lc-components/Layout/index.less +5 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Section/meta.json +108 -0
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Split/meta.json +72 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +18 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +229 -9
- package/es/lowcode/view/lc-components/Table/meta.json +225 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -0
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/es/lowcode/view/lc-components/Wrapper.js +32 -23
- package/es/lowcode/view/style/page.less +0 -1
- package/es/upload/Form/gridForm.js +1 -1
- package/es/utils/grid.js +4 -3
- package/lib/components/Builder/index.js +5 -3
- package/lib/components/LdFormList/index.js +1 -5
- package/lib/components/LdGrid/index.js +12 -3
- package/lib/lowcode/constants/api-url.js +294 -2
- package/lib/lowcode/constants/event-topics.js +15 -2
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +57 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +48 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +50 -0
- package/lib/lowcode/engine/meta/box.props.default.json +12 -0
- package/lib/lowcode/engine/meta/box.props.json +42 -0
- package/lib/lowcode/engine/meta/button.props.default.json +15 -7
- package/lib/lowcode/engine/meta/{components/button.json → button.props.json} +126 -103
- package/lib/lowcode/engine/meta/cardlist.props.default.json +17 -9
- package/lib/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +143 -142
- package/lib/lowcode/engine/meta/components-list.json +127 -121
- package/lib/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/{es/lowcode/engine/meta/components/modal.json → lib/lowcode/engine/meta/dialog.props.json} +120 -119
- package/lib/lowcode/engine/meta/drawer.props.default.json +17 -9
- package/{es/lowcode/engine/meta/components/drawer.json → lib/lowcode/engine/meta/drawer.props.json} +143 -142
- package/lib/lowcode/engine/meta/form.props.default.json +12 -4
- package/{es/lowcode/engine/meta/components/form.json → lib/lowcode/engine/meta/form.props.json} +116 -115
- package/lib/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/lib/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/lib/lowcode/engine/meta/image.props.default.json +15 -7
- package/lib/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/lib/lowcode/engine/meta/imex.props.default.json +11 -3
- package/{es/lowcode/engine/meta/components/imex.json → lib/lowcode/engine/meta/imex.props.json} +81 -80
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +10 -1
- package/lib/lowcode/engine/meta/{components/jsx.json → jsx.props.json} +24 -23
- package/lib/lowcode/engine/meta/layout.props.default.json +12 -4
- package/{es/lowcode/engine/meta/components/layout.json → lib/lowcode/engine/meta/layout.props.json} +107 -106
- package/lib/lowcode/engine/meta/link.props.default.json +13 -5
- package/{es/lowcode/engine/meta/components/link.json → lib/lowcode/engine/meta/link.props.json} +111 -110
- package/lib/lowcode/engine/meta/section.props.default.json +16 -8
- package/{es/lowcode/engine/meta/components/section.json → lib/lowcode/engine/meta/section.props.json} +107 -106
- package/lib/lowcode/engine/meta/split.props.default.json +12 -4
- package/lib/lowcode/engine/meta/{components/split.json → split.props.json} +71 -70
- package/lib/lowcode/engine/meta/table.props.default.json +29 -9
- package/lib/lowcode/engine/meta/table.props.json +236 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +17 -9
- package/lib/lowcode/engine/meta/{components/tabs.json → tabs.props.json} +140 -139
- package/lib/lowcode/engine/meta/text.props.default.json +11 -3
- package/{es/lowcode/engine/meta/components/text.json → lib/lowcode/engine/meta/text.props.json} +65 -64
- package/lib/lowcode/engine/meta/tree.props.default.json +16 -8
- package/lib/lowcode/engine/meta/{components/tree.json → tree.props.json} +156 -155
- package/lib/lowcode/engine/provider/ContextProvider.js +46 -41
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/tools/dataProcess.js +86 -8
- package/lib/lowcode/engine/tools/helper.js +70 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +5 -1
- package/lib/lowcode/painter/Design.js +39 -84
- package/lib/lowcode/painter/DesignOperator.js +278 -0
- package/lib/lowcode/painter/DesignToolbar.js +99 -0
- package/lib/lowcode/painter/I18n.js +203 -2
- package/lib/lowcode/painter/Outline.js +62 -53
- package/lib/lowcode/painter/Panel.js +238 -1
- package/lib/lowcode/painter/Ribbon.js +63 -64
- package/lib/lowcode/painter/components/Collapse.js +97 -0
- package/lib/lowcode/painter/components/ColorInput.js +132 -0
- package/lib/lowcode/painter/components/ListEditor.js +95 -0
- package/lib/lowcode/painter/components/NumberInput.js +155 -0
- package/lib/lowcode/painter/components/PanelItem.js +84 -11
- package/lib/lowcode/painter/components/PopConfirm.js +29 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/RuleInput.js +9 -7
- package/lib/lowcode/painter/components/SortBox.js +99 -0
- package/lib/lowcode/painter/components/actions-editor/ActionEditor.js +155 -0
- package/lib/lowcode/painter/components/actions-editor/index.js +178 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +103 -0
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +117 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/index.js +35 -3
- package/lib/lowcode/painter/panel-section/ButtonType.js +46 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +69 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +56 -48
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +303 -0
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +550 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +103 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +59 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +159 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +58 -0
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +35 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +215 -0
- package/lib/lowcode/painter/panel-section/TableActions.js +26 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +21 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +95 -0
- package/lib/lowcode/painter/style/actions-editor.less +16 -0
- package/lib/lowcode/painter/style/border-editor.less +36 -0
- package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
- package/lib/lowcode/painter/style/border-selector.less +40 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/collapse.less +22 -0
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/design.less +116 -5
- package/lib/lowcode/painter/style/display.less +17 -0
- package/lib/lowcode/painter/style/font-editor.less +9 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/index.less +0 -1
- package/lib/lowcode/painter/style/layout-ratio.less +1 -1
- package/lib/lowcode/painter/style/list-editor.less +59 -0
- package/lib/lowcode/painter/style/number-input.less +17 -0
- package/lib/lowcode/painter/style/outline.less +2 -0
- package/lib/lowcode/painter/style/panel-item.less +45 -12
- package/lib/lowcode/painter/style/panel.less +124 -0
- package/lib/lowcode/painter/style/pop-confirm.less +10 -0
- package/lib/lowcode/painter/style/pop-form.less +20 -0
- package/lib/lowcode/painter/style/ribbon.less +1 -0
- package/lib/lowcode/painter/style/style-panel.less +37 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/view/Canvas.js +84 -75
- package/lib/lowcode/view/Page.js +9 -27
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +27 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +23 -6
- package/lib/lowcode/view/lc-components/Box/index.less +15 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +42 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +28 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Button/index.js +76 -8
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -0
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +16 -0
- package/{es/lowcode/engine/meta/components/table.json → lib/lowcode/view/lc-components/CardList/meta.json} +11 -28
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +62 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +20 -11
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +27 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +22 -9
- package/lib/lowcode/view/lc-components/Drawer/index.less +7 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +117 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +82 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +22 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +41 -8
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +25 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +228 -8
- package/lib/lowcode/view/lc-components/Table/meta.json +225 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +30 -21
- package/lib/lowcode/view/style/page.less +0 -1
- package/lib/upload/Form/gridForm.js +1 -1
- package/lib/utils/grid.js +6 -5
- package/package.json +15 -6
- package/es/lowcode/engine/meta/modal.props.default.json +0 -11
- package/es/lowcode/engine/tools/lcid.js +0 -16
- package/es/lowcode/painter/panel-section/Radio.js +0 -58
- package/lib/lowcode/engine/meta/modal.props.default.json +0 -11
- package/lib/lowcode/engine/tools/lcid.js +0 -22
- package/lib/lowcode/painter/panel-section/Radio.js +0 -65
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.lc-painter-panel-section-components-popform {
|
|
2
|
+
width: 240px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
.item {
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: 2px;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
|
|
12
|
+
.left {
|
|
13
|
+
width: 55px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.right {
|
|
17
|
+
flex: 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.lc-painter-panel-section-style-panel {
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
|
|
5
|
+
.style-panel {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 6px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.style-editor {
|
|
12
|
+
margin-bottom: 8px;
|
|
13
|
+
padding-left: 12px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.label-over {
|
|
17
|
+
color: #006cff;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.row {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.row:not(:last-child) {
|
|
27
|
+
margin-bottom: 8px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.svg-label {
|
|
31
|
+
width: 20px;
|
|
32
|
+
height: 20px;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.lc-painter-panel-section-tabitems {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
.tabs-box {
|
|
7
|
+
width: 100%;
|
|
8
|
+
.tabitem {
|
|
9
|
+
height: 28px;
|
|
10
|
+
background: #fff;
|
|
11
|
+
border: 1px solid #e5e6e8;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
gap: 2px;
|
|
19
|
+
|
|
20
|
+
.tabitem-left {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
padding: 0 4px;
|
|
24
|
+
|
|
25
|
+
.dragicon {
|
|
26
|
+
cursor: move;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tabitem-right {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0 4px;
|
|
34
|
+
gap: 4px;
|
|
35
|
+
|
|
36
|
+
.tabitem-action {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tabs-actions {
|
|
44
|
+
width: 100%;
|
|
45
|
+
.tabs-action {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
height: 28px;
|
|
48
|
+
background: #fff;
|
|
49
|
+
border: 1px solid #e5e6e8;
|
|
50
|
+
border-radius: 6px;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.lc-painter-panel-section-tabitems-editor {
|
|
61
|
+
width: 240px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
.item {
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 2px;
|
|
68
|
+
align-items: center;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
|
|
71
|
+
.left {
|
|
72
|
+
width: 55px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.right {
|
|
76
|
+
flex: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.lc-painter-panel-section-tabitems-popconfirm {
|
|
82
|
+
:global {
|
|
83
|
+
.ant-popover-message-title {
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
.ant-popover-buttons{
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
-
var _excluded = ["props", "children"]
|
|
6
|
+
var _excluded = ["props", "children"],
|
|
7
|
+
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
6
8
|
import React, { useRef, useState } from 'react';
|
|
7
9
|
import { dynamic } from 'umi';
|
|
8
10
|
import { useMemoizedFn, useDeepCompareLayoutEffect } from 'ahooks';
|
|
9
|
-
import { reduce } from 'lodash';
|
|
10
|
-
import
|
|
11
|
+
import { reduce, upperFirst } from 'lodash';
|
|
12
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
13
|
+
import Box from "./lc-components/Box";
|
|
11
14
|
import { CELL_KEY } from "../constants";
|
|
12
15
|
import styles from "./style/canvas.less";
|
|
13
16
|
var PAGE_CELL = [CELL_KEY.PAGE_HEADER, CELL_KEY.PAGE_CONTENT, CELL_KEY.PAGE_FOOTER];
|
|
14
|
-
var Canvas = function Canvas(
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var headerRef = useRef();
|
|
18
|
-
var contentRef = useRef();
|
|
19
|
-
var footerRef = useRef();
|
|
17
|
+
var Canvas = function Canvas() {
|
|
18
|
+
var dynamicCompMap = useRef({});
|
|
19
|
+
var context = useLDContext();
|
|
20
20
|
var _useState = useState(null),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
22
|
header = _useState2[0],
|
|
@@ -33,40 +33,54 @@ var Canvas = function Canvas(_ref) {
|
|
|
33
33
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
34
34
|
modal = _useState8[0],
|
|
35
35
|
setModal = _useState8[1];
|
|
36
|
-
var render = useMemoizedFn(function (
|
|
37
|
-
var props =
|
|
38
|
-
children =
|
|
39
|
-
childrenMap = _objectWithoutProperties(
|
|
36
|
+
var render = useMemoizedFn(function (_ref) {
|
|
37
|
+
var props = _ref.props,
|
|
38
|
+
children = _ref.children,
|
|
39
|
+
childrenMap = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
if (props && !PAGE_CELL.includes(props.id)) {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
41
|
+
var id = props.id,
|
|
42
|
+
component = props.component,
|
|
43
|
+
name = props.name,
|
|
44
|
+
desc = props.desc,
|
|
45
|
+
icon = props.icon,
|
|
46
|
+
group = props.group,
|
|
47
|
+
groupName = props.groupName,
|
|
48
|
+
order = props.order,
|
|
49
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
50
|
+
if (!dynamicCompMap.current[component]) {
|
|
51
|
+
dynamicCompMap.current[component] = dynamic({
|
|
52
|
+
loader: function () {
|
|
53
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
|
+
var _runtime, _yield$import, _Comp;
|
|
55
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
|
+
while (1) switch (_context.prev = _context.next) {
|
|
57
|
+
case 0:
|
|
58
|
+
_runtime = upperFirst(context.runtime);
|
|
59
|
+
_context.next = 3;
|
|
60
|
+
return import("./lc-components/".concat(component, "/Function").concat(_runtime));
|
|
61
|
+
case 3:
|
|
62
|
+
_yield$import = _context.sent;
|
|
63
|
+
_Comp = _yield$import.default;
|
|
64
|
+
return _context.abrupt("return", _Comp);
|
|
65
|
+
case 6:
|
|
66
|
+
case "end":
|
|
67
|
+
return _context.stop();
|
|
68
|
+
}
|
|
69
|
+
}, _callee);
|
|
70
|
+
}));
|
|
71
|
+
function loader() {
|
|
72
|
+
return _loader.apply(this, arguments);
|
|
73
|
+
}
|
|
74
|
+
return loader;
|
|
75
|
+
}()
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
var Comp = dynamicCompMap.current[component];
|
|
79
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
80
|
+
key: id,
|
|
81
|
+
id: id,
|
|
82
|
+
context: context
|
|
83
|
+
}, rest), (children || []).map(function (_id) {
|
|
70
84
|
return render(childrenMap[_id]);
|
|
71
85
|
}));
|
|
72
86
|
}
|
|
@@ -75,18 +89,18 @@ var Canvas = function Canvas(_ref) {
|
|
|
75
89
|
});
|
|
76
90
|
});
|
|
77
91
|
useDeepCompareLayoutEffect(function () {
|
|
78
|
-
setHeader(render(
|
|
79
|
-
}, [
|
|
92
|
+
setHeader(render(context.pageData[CELL_KEY.PAGE_HEADER]));
|
|
93
|
+
}, [context.pageData[CELL_KEY.PAGE_HEADER]]);
|
|
80
94
|
useDeepCompareLayoutEffect(function () {
|
|
81
|
-
setContent(render(
|
|
82
|
-
}, [
|
|
95
|
+
setContent(render(context.pageData[CELL_KEY.PAGE_CONTENT]));
|
|
96
|
+
}, [context.pageData[CELL_KEY.PAGE_CONTENT]]);
|
|
83
97
|
useDeepCompareLayoutEffect(function () {
|
|
84
|
-
setFooter(render(
|
|
85
|
-
}, [
|
|
98
|
+
setFooter(render(context.pageData[CELL_KEY.PAGE_FOOTER]));
|
|
99
|
+
}, [context.pageData[CELL_KEY.PAGE_FOOTER]]);
|
|
86
100
|
useDeepCompareLayoutEffect(function () {
|
|
87
|
-
var pageModal = reduce(
|
|
101
|
+
var pageModal = reduce(context.pageData.children, function (result, _id) {
|
|
88
102
|
if (!PAGE_CELL.includes(_id)) {
|
|
89
|
-
result[_id] =
|
|
103
|
+
result[_id] = context.pageData[_id];
|
|
90
104
|
if (!result.children) {
|
|
91
105
|
result.children = [];
|
|
92
106
|
}
|
|
@@ -95,41 +109,36 @@ var Canvas = function Canvas(_ref) {
|
|
|
95
109
|
return result;
|
|
96
110
|
}, {});
|
|
97
111
|
setModal(render(pageModal));
|
|
98
|
-
}, [
|
|
112
|
+
}, [context.pageData.children, context.pageData.children.map(function (_id) {
|
|
113
|
+
return context.pageData[_id];
|
|
114
|
+
})]);
|
|
99
115
|
return /*#__PURE__*/React.createElement("div", {
|
|
100
116
|
id: "page-canvas",
|
|
101
117
|
className: styles['lc-view-canvas']
|
|
102
|
-
}, /*#__PURE__*/React.createElement(
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
119
|
+
key: CELL_KEY.PAGE_HEADER,
|
|
103
120
|
id: CELL_KEY.PAGE_HEADER,
|
|
104
|
-
getTargetDom: function getTargetDom() {
|
|
105
|
-
return headerRef.current;
|
|
106
|
-
}
|
|
107
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
ref: headerRef,
|
|
109
121
|
style: {
|
|
110
122
|
width: '100%',
|
|
111
123
|
height: 120,
|
|
112
124
|
backgroundColor: '#d3f261'
|
|
113
125
|
}
|
|
114
|
-
}, header)
|
|
126
|
+
}, header), /*#__PURE__*/React.createElement(Box, {
|
|
127
|
+
key: CELL_KEY.PAGE_CONTENT,
|
|
115
128
|
id: CELL_KEY.PAGE_CONTENT,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
ref: contentRef
|
|
121
|
-
}, content)), /*#__PURE__*/React.createElement(Wrapper, {
|
|
122
|
-
id: CELL_KEY.PAGE_HEADER,
|
|
123
|
-
getTargetDom: function getTargetDom() {
|
|
124
|
-
return footerRef.current;
|
|
129
|
+
style: {
|
|
130
|
+
width: '100%',
|
|
131
|
+
height: 'calc(100% - 120px)',
|
|
132
|
+
backgroundColor: 'transparent'
|
|
125
133
|
}
|
|
126
|
-
}, /*#__PURE__*/React.createElement(
|
|
127
|
-
|
|
134
|
+
}, content), /*#__PURE__*/React.createElement(Box, {
|
|
135
|
+
key: CELL_KEY.PAGE_FOOTER,
|
|
136
|
+
id: CELL_KEY.PAGE_FOOTER,
|
|
128
137
|
style: {
|
|
129
138
|
width: '100%',
|
|
130
139
|
height: 80,
|
|
131
140
|
backgroundColor: '#69c0ff'
|
|
132
141
|
}
|
|
133
|
-
}, footer)
|
|
142
|
+
}, footer), modal);
|
|
134
143
|
};
|
|
135
144
|
export default Canvas;
|
package/es/lowcode/view/Page.js
CHANGED
|
@@ -1,44 +1,28 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["
|
|
4
|
+
var _excluded = ["className"];
|
|
6
5
|
import React, { useRef, useEffect, forwardRef } from 'react';
|
|
7
|
-
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
6
|
+
import { useMemoizedFn, useBoolean, useCreation } from 'ahooks';
|
|
8
7
|
import classNames from 'classnames';
|
|
9
8
|
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
10
9
|
import Loading from "./Loading";
|
|
11
10
|
import Wrapper from "./lc-components/Wrapper";
|
|
12
11
|
import Canvas from "./Canvas";
|
|
13
|
-
import
|
|
12
|
+
import ldModuleBuild from "../../components/Builder";
|
|
14
13
|
import { CELL_KEY } from "../constants";
|
|
15
14
|
import styles from "./style/page.less";
|
|
16
|
-
var mock = function mock(_pageCode) {
|
|
17
|
-
return new Promise(function (resolve) {
|
|
18
|
-
setTimeout(function () {
|
|
19
|
-
var data = 'ᯡࠣ䂼྆ڑÙ⁅䁆䞠䌣䰪ぞ婈Ø䀦䉑Ŝ持䀥ດ⠦榠⍼Ⲉᗣᠱ嵜䐠׆Ⱐॼ哘ᄳࡠ֕惂ᬠ౪Ӕ沥尡㸴Ƭ䎰嫀䗠ވ䀻▯ἰ湬⥒ᓡᰀ᪡㱲璻䞠ೣⰊ焥⍂へ僸簠ⷌ)䔠ԂࠡⰠಢ㍬[婿ԯဧデ匒<̰N䁞椌狲⎣℁ࡈ琤ᶡ桎睑砢◛㶤ს㕍Ʃ䅌欫㊓㢛粠᙭⃀㤠ȉᑤզ愕ۦ厁䷅ᜧ㱯䀦密䭋氠㞘㵵朞礒⺛㺕婐㰵占マ១犚弐x㙁䘸㮱劐ش೮䈈J毟䈦Ⳙీฺ㐠槬⁽Ჰ栰帿٠䂠㐳楂唏៣爭ᡘℼ撘䑼㴷ᨀ᭖䶀㠤嫯䐢䌵n皹᪑ᣬ䭅曢冪富ધ䤲瘠೯嗰ᾕ㍿䎋㪣⣷⟕䃎䌪㟨媽⽸㝐墎㲂暘抮ⴳ₂†ٳõᶢ㹕ㄢà㵠g❌L檪䠨晴⸨ⶱ淛္≢曈廳ܥ䁀⊸ᱥႫ帲墛ᷯ猦↕埄㩀磫ῠ琉Ẁ崆㴮梌棖巶翖㈈䏕䒒⪭掩犕唹䠽䊗ࣾᅡ爌䩛㓧ⲑ㲥Ꮸ®㏾❰僷戦熂濛紎玈㋻్羜㺗㸌᠁猑℄畛㶋泧₀¥毗䚼⬦Сღ䀮劶☔⟫㢯㵏Ⰺ渍װ爊㱏ᘇ給㮄̋ᐆ͈䇑෫˅ࠢ⑰樼↫⦉ࡋᖃ䌍ࠤ效✿䃫༼䂁ߏ籈涎㑽ᗎ甥ᙉ抸咈ǰ䪠ˢᛦ儏ⰲ㐹浦☉Ȱ䗁䤘ⲇ沞ⵑ梾䣡炕߄哾ߢ^ສࣀ旔▨॒⍨夿ᠷ䦩焲╨ᥖ❒囓恦 ⊱ᯮ㥝ဤ羊}璀̰塎㎥⥸ᗸၠ㢿⨾⋠㮾≴璺碠⋄喵哵䃝礔۔垵䫚囵棜ゥ᠙⣖䞮ွ⌵哄ω䀵Ⳇ捜䐯䤪ㅦ⡊㕦欐硤娪Ф⥪㥥⢊㽸䔙ᓯચɳ嫬怷ʚ橔²ᵼ嚻৷剛䆃塯彁Ⱟ䈕㺿啴૰˻磡ᠯ㻿喀亾䮲眝囕ົṖ⛘䵕曍ᐠ';
|
|
20
|
-
resolve(data);
|
|
21
|
-
}, 400);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
15
|
var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
25
|
-
var
|
|
26
|
-
|
|
16
|
+
var _context$pageinfo2;
|
|
17
|
+
var className = _ref2.className,
|
|
27
18
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
28
19
|
var _ref = useRef(null);
|
|
29
20
|
var _rootRef = ref || _ref;
|
|
30
21
|
var context = useLDContext();
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
useEffect(function () {
|
|
36
|
-
context._pageCode.current = pageCode;
|
|
37
|
-
mock(pageCode).then(function (pageData) {
|
|
38
|
-
context._pageData.current = decompress(pageData);
|
|
39
|
-
setFalse();
|
|
40
|
-
});
|
|
41
|
-
}, []);
|
|
22
|
+
var LDCanvas = useCreation(function () {
|
|
23
|
+
var _context$pageinfo;
|
|
24
|
+
return !((_context$pageinfo = context.pageinfo) !== null && _context$pageinfo !== void 0 && _context$pageinfo.relationship.moduleCode) ? null : ldModuleBuild(Canvas, context.pageinfo.relationship.moduleCode);
|
|
25
|
+
}, [(_context$pageinfo2 = context.pageinfo) === null || _context$pageinfo2 === void 0 ? void 0 : _context$pageinfo2.relationship.moduleCode]);
|
|
42
26
|
var getTargetDom = useMemoizedFn(function () {
|
|
43
27
|
return _rootRef.current;
|
|
44
28
|
});
|
|
@@ -48,8 +32,6 @@ var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
48
32
|
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
49
33
|
ref: _rootRef,
|
|
50
34
|
className: classNames(styles['lc-view-page'], _defineProperty({}, className, !!className))
|
|
51
|
-
}, props), loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement(
|
|
52
|
-
dataSource: context.pageData
|
|
53
|
-
})));
|
|
35
|
+
}, props), context.loading || !context.pageData ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement(LDCanvas, null)));
|
|
54
36
|
});
|
|
55
37
|
export default LCPage;
|
package/es/lowcode/view/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
2
|
+
var _excluded = ["code"];
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import EventBusProvider from "../engine/provider/EventBusProvider";
|
|
6
5
|
import ContextProvider from "../engine/provider/ContextProvider";
|
|
7
6
|
import Page from "./Page";
|
|
8
7
|
import { RUNTIME } from "../constants/index";
|
|
9
8
|
var View = function View(_ref) {
|
|
10
|
-
var
|
|
9
|
+
var code = _ref.code,
|
|
11
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
11
|
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
13
12
|
runtime: RUNTIME.LIVE
|
|
14
|
-
}, /*#__PURE__*/React.createElement(ContextProvider,
|
|
15
|
-
|
|
16
|
-
}, props)))
|
|
13
|
+
}, /*#__PURE__*/React.createElement(ContextProvider, {
|
|
14
|
+
code: code
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Page, props)));
|
|
17
16
|
};
|
|
18
17
|
export default View;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useCreation } from 'ahooks';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import Index from "./index";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
var FunctionDesign = function FunctionDesign(_ref) {
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
var isEmpty = useCreation(function () {
|
|
14
|
+
return !children || React.Children.count(children) === 0;
|
|
15
|
+
}, [children]);
|
|
16
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
17
|
+
className: classNames(styles['lc-component-box-design'], _defineProperty({}, styles.placeholder, isEmpty))
|
|
18
|
+
}, props), isEmpty ? '点击组件库的组件或拖拽组件到这里' : children);
|
|
19
|
+
};
|
|
20
|
+
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 FunctionLive = function FunctionLive(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionLive;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _excluded = ["id", "children"];
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
2
|
import React, { useRef } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
import { useMemoizedFn } from 'ahooks';
|
|
5
|
+
import classNames from 'classnames';
|
|
5
6
|
import Wrapper from "../Wrapper";
|
|
7
|
+
import styles from "./index.less";
|
|
8
|
+
import { omitBadProps } from "../../../engine/tools/helper";
|
|
9
|
+
import defaultMeta from "../../../engine/meta/box.props.default.json";
|
|
6
10
|
var LCBox = function LCBox(_ref) {
|
|
7
11
|
var id = _ref.id,
|
|
8
12
|
children = _ref.children,
|
|
9
|
-
|
|
13
|
+
className = _ref.className,
|
|
14
|
+
style = _ref.style;
|
|
10
15
|
var ref = useRef();
|
|
11
16
|
var getTargetDom = useMemoizedFn(function () {
|
|
12
17
|
return ref.current;
|
|
@@ -15,7 +20,19 @@ var LCBox = function LCBox(_ref) {
|
|
|
15
20
|
id: id,
|
|
16
21
|
getTargetDom: getTargetDom
|
|
17
22
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
ref: ref
|
|
19
|
-
|
|
23
|
+
ref: ref,
|
|
24
|
+
className: classNames(styles['lc-component-box'], _defineProperty({}, className, !!className)),
|
|
25
|
+
style: style,
|
|
26
|
+
name: "box"
|
|
27
|
+
}, children));
|
|
20
28
|
};
|
|
29
|
+
LCBox.propTypes = {
|
|
30
|
+
/**
|
|
31
|
+
* @name 唯一标识
|
|
32
|
+
* @type string
|
|
33
|
+
* @disabled true
|
|
34
|
+
*/
|
|
35
|
+
id: PropTypes.string.isRequired
|
|
36
|
+
};
|
|
37
|
+
LCBox.defaultProps = omitBadProps(defaultMeta);
|
|
21
38
|
export default LCBox;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.lc-component-box {
|
|
2
|
+
background-color: white;
|
|
3
|
+
&-design.placeholder {
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
min-height: 60px;
|
|
7
|
+
background-color: #f0f0f0;
|
|
8
|
+
border: 1px dotted;
|
|
9
|
+
color: #a7b1bd;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Box",
|
|
3
|
+
"name": "容器",
|
|
4
|
+
"desc": "盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。",
|
|
5
|
+
"icon": "icon-box",
|
|
6
|
+
"group": "container",
|
|
7
|
+
"groupName": "布局",
|
|
8
|
+
"order": 3,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "id",
|
|
12
|
+
"name": "唯一标识",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"disabled": true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"style": {
|
|
18
|
+
"height": "60px"
|
|
19
|
+
},
|
|
20
|
+
"advance": {
|
|
21
|
+
"events": [
|
|
22
|
+
{
|
|
23
|
+
"key": "onMount",
|
|
24
|
+
"name": "组件首次渲染时",
|
|
25
|
+
"desc": "在组件首次渲染时,执行方法",
|
|
26
|
+
"func": "(params)=>{\n\t\n}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "onUnmount",
|
|
30
|
+
"name": "组件卸载时",
|
|
31
|
+
"desc": "在组件卸载时,执行方法。",
|
|
32
|
+
"func": "(params)=>{\n\t\n}"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"key": "onClick",
|
|
36
|
+
"name": "点击事件",
|
|
37
|
+
"desc": "点击文本时,执行方法",
|
|
38
|
+
"func": "(e)=>{\n\t\n}"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["id", "children", "context", "className"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import Index from "./index";
|
|
8
|
+
import { CELL_CLASS_NAME } from "../../../constants/index";
|
|
9
|
+
var FunctionDesign = function FunctionDesign(_ref) {
|
|
10
|
+
var id = _ref.id,
|
|
11
|
+
children = _ref.children,
|
|
12
|
+
context = _ref.context,
|
|
13
|
+
className = _ref.className,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
16
|
+
id: id,
|
|
17
|
+
className: classNames(CELL_CLASS_NAME, _defineProperty({}, className, !!className)),
|
|
18
|
+
context: context
|
|
19
|
+
}, props), children);
|
|
20
|
+
};
|
|
21
|
+
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 FunctionLive = function FunctionLive(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
8
|
+
};
|
|
9
|
+
export default FunctionLive;
|