@luck-design-biz/luckda 0.0.22-4 → 0.0.22-6
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/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/Builder/index.js +1 -1
- package/es/components/LdAutoForm/index.js +0 -0
- package/es/components/LdCard/index.js +0 -0
- package/es/components/LdCard/model.js +0 -0
- package/es/components/LdCom/index.js +0 -0
- package/es/components/LdFormList/index.js +0 -0
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +0 -0
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdInfoPanel/index.js +0 -0
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +42 -0
- package/es/components/LdTree/index.js +0 -0
- package/es/components/LdTree/index.less +36 -36
- package/es/helper/FromItems.js +0 -0
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +0 -0
- package/es/helper/ldComBuild.js +0 -0
- package/es/index.js +1 -0
- package/es/lowcode/constants/api-url.js +3 -0
- package/es/lowcode/constants/event-topics.js +36 -0
- package/es/lowcode/constants/index.js +12 -0
- package/es/lowcode/engine/factory/DataFactory.js +1 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +55 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +40 -0
- package/es/lowcode/engine/meta/box.props.default.json +10 -0
- package/es/lowcode/engine/meta/box.props.json +40 -0
- package/es/lowcode/engine/meta/button.props.default.json +16 -0
- package/es/lowcode/engine/meta/button.props.json +117 -0
- package/es/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/es/lowcode/engine/meta/cardlist.props.json +144 -0
- package/es/lowcode/engine/meta/components-list.json +128 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/es/lowcode/engine/meta/dialog.props.json +121 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/es/lowcode/engine/meta/drawer.props.json +144 -0
- package/es/lowcode/engine/meta/form.props.default.json +13 -0
- package/es/lowcode/engine/meta/form.props.json +117 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/es/lowcode/engine/meta/iframe.props.json +32 -0
- package/es/lowcode/engine/meta/image.props.default.json +16 -0
- package/es/lowcode/engine/meta/image.props.json +114 -0
- package/es/lowcode/engine/meta/imex.props.default.json +12 -0
- package/es/lowcode/engine/meta/imex.props.json +82 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/es/lowcode/engine/meta/jsx.props.json +25 -0
- package/es/lowcode/engine/meta/layout.props.default.json +13 -0
- package/es/lowcode/engine/meta/layout.props.json +108 -0
- package/es/lowcode/engine/meta/link.props.default.json +14 -0
- package/es/lowcode/engine/meta/link.props.json +112 -0
- package/es/lowcode/engine/meta/section.props.default.json +17 -0
- package/es/lowcode/engine/meta/section.props.json +108 -0
- package/es/lowcode/engine/meta/split.props.default.json +13 -0
- package/es/lowcode/engine/meta/split.props.json +72 -0
- package/es/lowcode/engine/meta/table.props.default.json +18 -0
- package/es/lowcode/engine/meta/table.props.json +162 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/es/lowcode/engine/meta/tabs.props.json +141 -0
- package/es/lowcode/engine/meta/text.props.default.json +12 -0
- package/es/lowcode/engine/meta/text.props.json +66 -0
- package/es/lowcode/engine/meta/tree.props.default.json +17 -0
- package/es/lowcode/engine/meta/tree.props.json +157 -0
- package/es/lowcode/engine/provider/ContextProvider.js +157 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
- package/es/lowcode/engine/tools/dataProcess.js +263 -0
- package/es/lowcode/engine/tools/helper.js +4 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +3 -0
- package/es/lowcode/painter/Components.js +104 -0
- package/es/lowcode/painter/Design.js +321 -0
- package/es/lowcode/painter/I18n.js +205 -0
- package/es/lowcode/painter/Outline.js +208 -0
- package/es/lowcode/painter/Panel.js +200 -0
- package/es/lowcode/painter/Ribbon.js +142 -0
- package/es/lowcode/painter/components/PanelItem.js +35 -0
- package/es/lowcode/painter/components/PopConfirm.js +20 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/RuleInput.js +105 -0
- package/es/lowcode/painter/components/SortBox.js +92 -0
- package/es/lowcode/painter/components/TabEditor.js +88 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +49 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +77 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/index.js +45 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +45 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +139 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +140 -0
- package/es/lowcode/painter/panel-section/TabItems.js +237 -0
- package/es/lowcode/painter/services/I18n.js +85 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/components.less +90 -0
- package/es/lowcode/painter/style/design.less +135 -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 +6 -0
- package/es/lowcode/painter/style/layout-ratio.less +51 -0
- package/es/lowcode/painter/style/outline.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +22 -0
- package/es/lowcode/painter/style/panel.less +119 -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/radio.less +24 -0
- package/es/lowcode/painter/style/ribbon.less +5 -0
- package/es/lowcode/painter/style/rule-input.less +13 -0
- package/es/lowcode/painter/style/tabeditor.less +90 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/view/Canvas.js +138 -0
- package/es/lowcode/view/Loading.js +23 -0
- package/es/lowcode/view/Page.js +249 -0
- package/es/lowcode/view/index.js +18 -0
- 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 +30 -0
- package/es/lowcode/view/lc-components/Box/index.less +14 -0
- package/es/lowcode/view/lc-components/Box/meta.json +40 -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 +37 -0
- package/es/lowcode/view/lc-components/Button/meta.json +117 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +20 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +61 -0
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +62 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/es/lowcode/view/lc-components/Drawer/style.less +7 -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/index.js +20 -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/index.js +20 -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/index.js +20 -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/index.js +20 -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/index.js +20 -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 +60 -0
- 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/index.js +20 -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/index.js +34 -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/index.js +21 -0
- package/es/lowcode/view/lc-components/Split/meta.json +72 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +23 -0
- package/es/lowcode/view/lc-components/Table/meta.json +162 -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/index.js +21 -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/index.js +23 -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/index.js +20 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/es/lowcode/view/lc-components/Wrapper.js +52 -0
- package/es/lowcode/view/style/canvas.less +5 -0
- package/es/lowcode/view/style/loading.less +84 -0
- package/es/lowcode/view/style/page.less +5 -0
- package/es/services.js +0 -0
- package/es/upload/Form/gridForm.js +0 -0
- package/es/upload/Form/index.js +0 -0
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +15 -15
- package/es/upload/GridCell/index.js +0 -0
- package/es/upload/index.js +0 -0
- package/es/utils/action.js +0 -0
- package/es/utils/form.js +22 -22
- package/es/utils/grid.js +3 -2
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +1 -1
- package/lib/components/LdAutoForm/index.js +0 -0
- package/lib/components/LdCard/index.js +0 -0
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +0 -0
- package/lib/components/LdFormList/index.js +0 -0
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +0 -0
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdInfoPanel/index.js +0 -0
- package/lib/components/LdPop/index.js +0 -0
- package/lib/components/LdRuntimeCom/index.js +49 -0
- package/lib/components/LdTree/index.js +0 -0
- package/lib/components/LdTree/index.less +36 -36
- package/lib/helper/FromItems.js +0 -0
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +0 -0
- package/lib/helper/ldComBuild.js +0 -0
- package/lib/index.js +9 -1
- package/lib/lowcode/constants/api-url.js +9 -0
- package/lib/lowcode/constants/event-topics.js +42 -0
- package/lib/lowcode/constants/index.js +18 -0
- package/lib/lowcode/engine/factory/DataFactory.js +3 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +61 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +46 -0
- package/lib/lowcode/engine/meta/box.props.default.json +10 -0
- package/lib/lowcode/engine/meta/box.props.json +40 -0
- package/lib/lowcode/engine/meta/button.props.default.json +16 -0
- package/lib/lowcode/engine/meta/button.props.json +117 -0
- package/lib/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +144 -0
- package/lib/lowcode/engine/meta/components-list.json +128 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/lib/lowcode/engine/meta/dialog.props.json +121 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/lib/lowcode/engine/meta/drawer.props.json +144 -0
- package/lib/lowcode/engine/meta/form.props.default.json +13 -0
- package/lib/lowcode/engine/meta/form.props.json +117 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/lib/lowcode/engine/meta/iframe.props.json +32 -0
- package/lib/lowcode/engine/meta/image.props.default.json +16 -0
- package/lib/lowcode/engine/meta/image.props.json +114 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +12 -0
- package/lib/lowcode/engine/meta/imex.props.json +82 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/lib/lowcode/engine/meta/jsx.props.json +25 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +13 -0
- package/lib/lowcode/engine/meta/layout.props.json +108 -0
- package/lib/lowcode/engine/meta/link.props.default.json +14 -0
- package/lib/lowcode/engine/meta/link.props.json +112 -0
- package/lib/lowcode/engine/meta/section.props.default.json +17 -0
- package/lib/lowcode/engine/meta/section.props.json +108 -0
- package/lib/lowcode/engine/meta/split.props.default.json +13 -0
- package/lib/lowcode/engine/meta/split.props.json +72 -0
- package/lib/lowcode/engine/meta/table.props.default.json +18 -0
- package/lib/lowcode/engine/meta/table.props.json +162 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/lib/lowcode/engine/meta/tabs.props.json +141 -0
- package/lib/lowcode/engine/meta/text.props.default.json +12 -0
- package/lib/lowcode/engine/meta/text.props.json +66 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +17 -0
- package/lib/lowcode/engine/meta/tree.props.json +157 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +165 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
- package/lib/lowcode/engine/tools/dataProcess.js +277 -0
- package/lib/lowcode/engine/tools/helper.js +11 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +20 -0
- package/lib/lowcode/painter/Components.js +112 -0
- package/lib/lowcode/painter/Design.js +328 -0
- package/lib/lowcode/painter/I18n.js +213 -0
- package/lib/lowcode/painter/Outline.js +216 -0
- package/lib/lowcode/painter/Panel.js +208 -0
- package/lib/lowcode/painter/Ribbon.js +150 -0
- package/lib/lowcode/painter/components/PanelItem.js +41 -0
- package/lib/lowcode/painter/components/PopConfirm.js +26 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/RuleInput.js +112 -0
- package/lib/lowcode/painter/components/SortBox.js +99 -0
- package/lib/lowcode/painter/components/TabEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +57 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +88 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/index.js +54 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +52 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +146 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +148 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +245 -0
- package/lib/lowcode/painter/services/I18n.js +95 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/components.less +90 -0
- package/lib/lowcode/painter/style/design.less +135 -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 +6 -0
- package/lib/lowcode/painter/style/layout-ratio.less +51 -0
- package/lib/lowcode/painter/style/outline.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +22 -0
- package/lib/lowcode/painter/style/panel.less +119 -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/radio.less +24 -0
- package/lib/lowcode/painter/style/ribbon.less +5 -0
- package/lib/lowcode/painter/style/rule-input.less +13 -0
- package/lib/lowcode/painter/style/tabeditor.less +90 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/view/Canvas.js +153 -0
- package/lib/lowcode/view/Loading.js +30 -0
- package/lib/lowcode/view/Page.js +257 -0
- package/lib/lowcode/view/index.js +25 -0
- 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 +38 -0
- package/lib/lowcode/view/lc-components/Box/index.less +14 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -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 +45 -0
- package/lib/lowcode/view/lc-components/Button/meta.json +117 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +69 -0
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +70 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Drawer/style.less +7 -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/index.js +28 -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/index.js +28 -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/index.js +28 -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/index.js +28 -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/index.js +28 -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 +68 -0
- 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/index.js +28 -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/index.js +42 -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/index.js +29 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +31 -0
- package/lib/lowcode/view/lc-components/Table/meta.json +162 -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/index.js +29 -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/index.js +31 -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/index.js +28 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +59 -0
- package/lib/lowcode/view/style/canvas.less +5 -0
- package/lib/lowcode/view/style/loading.less +84 -0
- package/lib/lowcode/view/style/page.less +5 -0
- package/lib/services.js +0 -0
- package/lib/upload/Form/gridForm.js +0 -0
- package/lib/upload/Form/index.js +0 -0
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +15 -15
- package/lib/upload/GridCell/index.js +0 -0
- package/lib/upload/index.js +0 -0
- package/lib/utils/action.js +0 -0
- package/lib/utils/form.js +22 -22
- package/lib/utils/grid.js +6 -5
- package/lib/utils/index.js +0 -0
- package/lowcode.js +1 -0
- package/package.json +47 -34
- package/upload.js +1 -1
- package/utils.js +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
+
var _excluded = ["props", "children"],
|
|
7
|
+
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
8
|
+
import React, { useRef, useState } from 'react';
|
|
9
|
+
import { dynamic } from 'umi';
|
|
10
|
+
import { useMemoizedFn, useDeepCompareLayoutEffect } from 'ahooks';
|
|
11
|
+
import { reduce, upperFirst } from 'lodash';
|
|
12
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
13
|
+
import Box from "./lc-components/Box";
|
|
14
|
+
import { CELL_KEY } from "../constants";
|
|
15
|
+
import styles from "./style/canvas.less";
|
|
16
|
+
var PAGE_CELL = [CELL_KEY.PAGE_HEADER, CELL_KEY.PAGE_CONTENT, CELL_KEY.PAGE_FOOTER];
|
|
17
|
+
var Canvas = function Canvas(_ref) {
|
|
18
|
+
var dataSource = _ref.dataSource;
|
|
19
|
+
var dynamicCompMap = useRef({});
|
|
20
|
+
var context = useLDContext();
|
|
21
|
+
var _useState = useState(null),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
header = _useState2[0],
|
|
24
|
+
setHeader = _useState2[1];
|
|
25
|
+
var _useState3 = useState(null),
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
content = _useState4[0],
|
|
28
|
+
setContent = _useState4[1];
|
|
29
|
+
var _useState5 = useState(null),
|
|
30
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
31
|
+
footer = _useState6[0],
|
|
32
|
+
setFooter = _useState6[1];
|
|
33
|
+
var _useState7 = useState(null),
|
|
34
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
35
|
+
modal = _useState8[0],
|
|
36
|
+
setModal = _useState8[1];
|
|
37
|
+
var render = useMemoizedFn(function (_ref2) {
|
|
38
|
+
var props = _ref2.props,
|
|
39
|
+
children = _ref2.children,
|
|
40
|
+
childrenMap = _objectWithoutProperties(_ref2, _excluded);
|
|
41
|
+
if (props && !PAGE_CELL.includes(props.id)) {
|
|
42
|
+
var id = props.id,
|
|
43
|
+
component = props.component,
|
|
44
|
+
name = props.name,
|
|
45
|
+
desc = props.desc,
|
|
46
|
+
icon = props.icon,
|
|
47
|
+
group = props.group,
|
|
48
|
+
groupName = props.groupName,
|
|
49
|
+
order = props.order,
|
|
50
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
51
|
+
if (!dynamicCompMap.current[component]) {
|
|
52
|
+
dynamicCompMap.current[component] = dynamic({
|
|
53
|
+
loader: function () {
|
|
54
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
55
|
+
var _runtime, _yield$import, _Comp;
|
|
56
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
|
+
while (1) switch (_context.prev = _context.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
_runtime = upperFirst(context.runtime);
|
|
60
|
+
_context.next = 3;
|
|
61
|
+
return import("./lc-components/".concat(component, "/Function").concat(_runtime));
|
|
62
|
+
case 3:
|
|
63
|
+
_yield$import = _context.sent;
|
|
64
|
+
_Comp = _yield$import.default;
|
|
65
|
+
return _context.abrupt("return", _Comp);
|
|
66
|
+
case 6:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
70
|
+
}, _callee);
|
|
71
|
+
}));
|
|
72
|
+
function loader() {
|
|
73
|
+
return _loader.apply(this, arguments);
|
|
74
|
+
}
|
|
75
|
+
return loader;
|
|
76
|
+
}()
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
var Comp = dynamicCompMap.current[component];
|
|
80
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
81
|
+
key: id,
|
|
82
|
+
id: id,
|
|
83
|
+
context: context
|
|
84
|
+
}, rest), (children || []).map(function (_id) {
|
|
85
|
+
return render(childrenMap[_id]);
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
return (children || []).map(function (_id) {
|
|
89
|
+
return render(childrenMap[_id]);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
useDeepCompareLayoutEffect(function () {
|
|
93
|
+
setHeader(render(dataSource[CELL_KEY.PAGE_HEADER]));
|
|
94
|
+
}, [dataSource[CELL_KEY.PAGE_HEADER]]);
|
|
95
|
+
useDeepCompareLayoutEffect(function () {
|
|
96
|
+
setContent(render(dataSource[CELL_KEY.PAGE_CONTENT]));
|
|
97
|
+
}, [dataSource[CELL_KEY.PAGE_CONTENT]]);
|
|
98
|
+
useDeepCompareLayoutEffect(function () {
|
|
99
|
+
setFooter(render(dataSource[CELL_KEY.PAGE_FOOTER]));
|
|
100
|
+
}, [dataSource[CELL_KEY.PAGE_FOOTER]]);
|
|
101
|
+
useDeepCompareLayoutEffect(function () {
|
|
102
|
+
var pageModal = reduce(dataSource.children, function (result, _id) {
|
|
103
|
+
if (!PAGE_CELL.includes(_id)) {
|
|
104
|
+
result[_id] = dataSource[_id];
|
|
105
|
+
if (!result.children) {
|
|
106
|
+
result.children = [];
|
|
107
|
+
}
|
|
108
|
+
result.children.push(_id);
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}, {});
|
|
112
|
+
setModal(render(pageModal));
|
|
113
|
+
}, [dataSource.children]);
|
|
114
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
id: "page-canvas",
|
|
116
|
+
className: styles['lc-view-canvas']
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
118
|
+
key: CELL_KEY.PAGE_HEADER,
|
|
119
|
+
id: CELL_KEY.PAGE_HEADER,
|
|
120
|
+
style: {
|
|
121
|
+
width: '100%',
|
|
122
|
+
height: 120,
|
|
123
|
+
backgroundColor: '#d3f261'
|
|
124
|
+
}
|
|
125
|
+
}, header), /*#__PURE__*/React.createElement(Box, {
|
|
126
|
+
key: CELL_KEY.PAGE_CONTENT,
|
|
127
|
+
id: CELL_KEY.PAGE_CONTENT
|
|
128
|
+
}, content), /*#__PURE__*/React.createElement(Box, {
|
|
129
|
+
key: CELL_KEY.PAGE_FOOTER,
|
|
130
|
+
id: CELL_KEY.PAGE_FOOTER,
|
|
131
|
+
style: {
|
|
132
|
+
width: '100%',
|
|
133
|
+
height: 80,
|
|
134
|
+
backgroundColor: '#69c0ff'
|
|
135
|
+
}
|
|
136
|
+
}, footer), modal);
|
|
137
|
+
};
|
|
138
|
+
export default Canvas;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from "./style/loading.less";
|
|
4
|
+
var Loading = function Loading() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: styles['lc-painter-loading']
|
|
7
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: styles['cube']
|
|
9
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: classNames(styles['side'], styles['side1'])
|
|
11
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: classNames(styles['side'], styles['side2'])
|
|
13
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames(styles['side'], styles['side3'])
|
|
15
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: classNames(styles['side'], styles['side4'])
|
|
17
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: classNames(styles['side'], styles['side5'])
|
|
19
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: classNames(styles['side'], styles['side6'])
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
export default Loading;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["pageCode", "className"];
|
|
6
|
+
import React, { useRef, useEffect, forwardRef } from 'react';
|
|
7
|
+
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
10
|
+
import Loading from "./Loading";
|
|
11
|
+
import Wrapper from "./lc-components/Wrapper";
|
|
12
|
+
import Canvas from "./Canvas";
|
|
13
|
+
import { decompress } from "../engine/tools/dataProcess";
|
|
14
|
+
import { CELL_KEY } from "../constants";
|
|
15
|
+
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
|
+
var d = {
|
|
25
|
+
props: {
|
|
26
|
+
id: 'page_root',
|
|
27
|
+
group: 'build-in',
|
|
28
|
+
component: 'Page',
|
|
29
|
+
name: '页面',
|
|
30
|
+
hasHeder: true,
|
|
31
|
+
hasFooter: true
|
|
32
|
+
},
|
|
33
|
+
children: ['page_header', 'page_content', 'page_footer', 'dialog_ms2o9hj0', 'drawer_ou79jw8c'],
|
|
34
|
+
page_header: {
|
|
35
|
+
props: {
|
|
36
|
+
id: 'page_header',
|
|
37
|
+
parentId: 'page_root',
|
|
38
|
+
group: 'build-in',
|
|
39
|
+
component: 'PageHeader',
|
|
40
|
+
name: '页面头',
|
|
41
|
+
fixed: false
|
|
42
|
+
},
|
|
43
|
+
children: ['text_kju78bvs'],
|
|
44
|
+
text_kju78bvs: {
|
|
45
|
+
props: {
|
|
46
|
+
id: 'text_kju78bvs',
|
|
47
|
+
parentId: 'page_header',
|
|
48
|
+
group: 'basic',
|
|
49
|
+
component: 'Text',
|
|
50
|
+
name: '文本'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
page_content: {
|
|
55
|
+
props: {
|
|
56
|
+
id: 'page_content',
|
|
57
|
+
parentId: 'page_root',
|
|
58
|
+
group: 'build-in',
|
|
59
|
+
component: 'PageContent',
|
|
60
|
+
name: '页面内容'
|
|
61
|
+
},
|
|
62
|
+
children: ['layout_OL4gi6mr'],
|
|
63
|
+
layout_OL4gi6mr: {
|
|
64
|
+
props: {
|
|
65
|
+
component: 'Layout',
|
|
66
|
+
name: '布局容器',
|
|
67
|
+
icon: 'icon-layout',
|
|
68
|
+
group: 'container',
|
|
69
|
+
groupName: '布局',
|
|
70
|
+
desc: '布局容器是一种提供列比例、列间距、行间距和样式等配置选项的元素,用于创建灵活的页面布局。它使用户能够轻松组织和排列组件,并实现各种复杂的布局需求。',
|
|
71
|
+
order: 1,
|
|
72
|
+
style: {},
|
|
73
|
+
columnRatio: '12:3:9',
|
|
74
|
+
columnSpacing: 16,
|
|
75
|
+
lineSpacing: 16,
|
|
76
|
+
id: 'layout_OL4gi6mr'
|
|
77
|
+
},
|
|
78
|
+
children: ['box_xFuKLKBI', 'box_jeVHiHZV', 'box_5KLx4rGb'],
|
|
79
|
+
box_xFuKLKBI: {
|
|
80
|
+
props: {
|
|
81
|
+
component: 'Box',
|
|
82
|
+
name: '容器',
|
|
83
|
+
desc: '盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。',
|
|
84
|
+
icon: 'icon-box',
|
|
85
|
+
group: 'container',
|
|
86
|
+
groupName: '布局',
|
|
87
|
+
order: 3,
|
|
88
|
+
style: {
|
|
89
|
+
gridColumn: 'span 12',
|
|
90
|
+
height: 'auto'
|
|
91
|
+
},
|
|
92
|
+
id: 'box_xFuKLKBI'
|
|
93
|
+
},
|
|
94
|
+
children: ['button_okj2n87x', 'text_nmu9wqqw'],
|
|
95
|
+
button_okj2n87x: {
|
|
96
|
+
props: {
|
|
97
|
+
id: 'button_okj2n87x',
|
|
98
|
+
parentId: 'box_ihj2n8cv',
|
|
99
|
+
group: 'basic',
|
|
100
|
+
component: 'Button',
|
|
101
|
+
name: '按钮',
|
|
102
|
+
type: 'primary'
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
text_nmu9wqqw: {
|
|
106
|
+
props: {
|
|
107
|
+
id: 'text_nmu9wqqw',
|
|
108
|
+
parentId: 'box_ihj2n8cv',
|
|
109
|
+
group: 'basic',
|
|
110
|
+
component: 'Text',
|
|
111
|
+
name: '文本'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
box_jeVHiHZV: {
|
|
116
|
+
props: {
|
|
117
|
+
component: 'Box',
|
|
118
|
+
name: '容器',
|
|
119
|
+
desc: '盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。',
|
|
120
|
+
icon: 'icon-box',
|
|
121
|
+
group: 'container',
|
|
122
|
+
groupName: '布局',
|
|
123
|
+
order: 3,
|
|
124
|
+
style: {
|
|
125
|
+
gridColumn: 'span 3',
|
|
126
|
+
height: '60px'
|
|
127
|
+
},
|
|
128
|
+
id: 'box_jeVHiHZV'
|
|
129
|
+
},
|
|
130
|
+
children: ['text_hh2b87qs'],
|
|
131
|
+
text_hh2b87qs: {
|
|
132
|
+
props: {
|
|
133
|
+
id: 'text_hh2b87qs',
|
|
134
|
+
parentId: 'box_diam9dis',
|
|
135
|
+
group: 'basic',
|
|
136
|
+
component: 'Text',
|
|
137
|
+
name: '文本'
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
box_5KLx4rGb: {
|
|
142
|
+
props: {
|
|
143
|
+
component: 'Box',
|
|
144
|
+
name: '容器',
|
|
145
|
+
desc: '盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。',
|
|
146
|
+
icon: 'icon-box',
|
|
147
|
+
group: 'container',
|
|
148
|
+
groupName: '布局',
|
|
149
|
+
order: 3,
|
|
150
|
+
style: {
|
|
151
|
+
gridColumn: 'span 9',
|
|
152
|
+
height: '60px'
|
|
153
|
+
},
|
|
154
|
+
id: 'box_5KLx4rGb'
|
|
155
|
+
},
|
|
156
|
+
children: ['table_diam9dis'],
|
|
157
|
+
table_diam9dis: {
|
|
158
|
+
props: {
|
|
159
|
+
id: 'table_diam9dis',
|
|
160
|
+
parentId: 'box_s0j3j08t',
|
|
161
|
+
group: 'advance',
|
|
162
|
+
component: 'Table',
|
|
163
|
+
name: '列表'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
page_footer: {
|
|
170
|
+
props: {
|
|
171
|
+
id: 'page_footer',
|
|
172
|
+
parentId: 'page_root',
|
|
173
|
+
group: 'build-in',
|
|
174
|
+
component: 'PageFooter',
|
|
175
|
+
name: '页面尾'
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
dialog_ms2o9hj0: {
|
|
179
|
+
props: {
|
|
180
|
+
id: 'dialog_ms2o9hj0',
|
|
181
|
+
parentId: 'page_root',
|
|
182
|
+
group: 'basic',
|
|
183
|
+
component: 'Dialog',
|
|
184
|
+
name: '对话框'
|
|
185
|
+
},
|
|
186
|
+
children: ['form_gyusku8j'],
|
|
187
|
+
form_gyusku8j: {
|
|
188
|
+
props: {
|
|
189
|
+
id: 'form_gyusku8j',
|
|
190
|
+
parentId: 'dialog_ms2o9hj0',
|
|
191
|
+
group: 'advance',
|
|
192
|
+
component: 'Form',
|
|
193
|
+
name: '表单'
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
drawer_ou79jw8c: {
|
|
198
|
+
props: {
|
|
199
|
+
id: 'drawer_ou79jw8c',
|
|
200
|
+
parentId: 'page_root',
|
|
201
|
+
group: 'basic',
|
|
202
|
+
component: 'Drawer',
|
|
203
|
+
name: '抽屉'
|
|
204
|
+
},
|
|
205
|
+
children: ['form_jknbjkun'],
|
|
206
|
+
form_jknbjkun: {
|
|
207
|
+
props: {
|
|
208
|
+
id: 'form_jknbjkun',
|
|
209
|
+
parentId: 'drawer_ou79jw8c',
|
|
210
|
+
group: 'advance',
|
|
211
|
+
component: 'Form',
|
|
212
|
+
name: '表单'
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
218
|
+
var pageCode = _ref2.pageCode,
|
|
219
|
+
className = _ref2.className,
|
|
220
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
221
|
+
var _ref = useRef(null);
|
|
222
|
+
var _rootRef = ref || _ref;
|
|
223
|
+
var context = useLDContext();
|
|
224
|
+
var _useBoolean = useBoolean(true),
|
|
225
|
+
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
226
|
+
loading = _useBoolean2[0],
|
|
227
|
+
setFalse = _useBoolean2[1].setFalse;
|
|
228
|
+
useEffect(function () {
|
|
229
|
+
context._pageCode.current = pageCode;
|
|
230
|
+
mock(pageCode).then(function (pageData) {
|
|
231
|
+
// context._setPageData(decompress(pageData));
|
|
232
|
+
context._setPageData(d);
|
|
233
|
+
setFalse();
|
|
234
|
+
});
|
|
235
|
+
}, []);
|
|
236
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
237
|
+
return _rootRef.current;
|
|
238
|
+
});
|
|
239
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
240
|
+
id: CELL_KEY.PAGE_ROOT,
|
|
241
|
+
getTargetDom: getTargetDom
|
|
242
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
243
|
+
ref: _rootRef,
|
|
244
|
+
className: classNames(styles['lc-view-page'], _defineProperty({}, className, !!className))
|
|
245
|
+
}, props), loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement(Canvas, {
|
|
246
|
+
dataSource: context.pageData
|
|
247
|
+
})));
|
|
248
|
+
});
|
|
249
|
+
export default LCPage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["pageCode"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import EventBusProvider from "../engine/provider/EventBusProvider";
|
|
6
|
+
import ContextProvider from "../engine/provider/ContextProvider";
|
|
7
|
+
import Page from "./Page";
|
|
8
|
+
import { RUNTIME } from "../constants/index";
|
|
9
|
+
var View = function View(_ref) {
|
|
10
|
+
var pageCode = _ref.pageCode,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
13
|
+
runtime: RUNTIME.LIVE
|
|
14
|
+
}, /*#__PURE__*/React.createElement(ContextProvider, null, /*#__PURE__*/React.createElement(Page, _extends({
|
|
15
|
+
pageCode: pageCode
|
|
16
|
+
}, props))));
|
|
17
|
+
};
|
|
18
|
+
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;
|
|
@@ -0,0 +1,30 @@
|
|
|
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, { useRef } from 'react';
|
|
6
|
+
import { useMemoizedFn } from 'ahooks';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import Wrapper from "../Wrapper";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
var LCBox = function LCBox(_ref) {
|
|
11
|
+
var id = _ref.id,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
context = _ref.context,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
var ref = useRef();
|
|
17
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
18
|
+
return ref.current;
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
21
|
+
id: id,
|
|
22
|
+
getTargetDom: getTargetDom
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: classNames(styles['lc-component-box'], _defineProperty({}, className, !!className))
|
|
26
|
+
}, props, {
|
|
27
|
+
name: "box"
|
|
28
|
+
}), children));
|
|
29
|
+
};
|
|
30
|
+
export default LCBox;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.lc-component-box {
|
|
2
|
+
&-design.placeholder {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
min-height: 60px;
|
|
6
|
+
background-color: #f0f0f0;
|
|
7
|
+
border: 1px dotted;
|
|
8
|
+
color: #a7b1bd;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
"desc": "唯一标识",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"disabled": true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"style": {},
|
|
18
|
+
"advance": {
|
|
19
|
+
"events": [
|
|
20
|
+
{
|
|
21
|
+
"key": "onMount",
|
|
22
|
+
"name": "组件首次渲染时",
|
|
23
|
+
"desc": "在组件首次渲染时,执行方法",
|
|
24
|
+
"func": "(params)=>{\n\t\n}"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"key": "onUnmount",
|
|
28
|
+
"name": "组件卸载时",
|
|
29
|
+
"desc": "在组件卸载时,执行方法。",
|
|
30
|
+
"func": "(params)=>{\n\t\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "onClick",
|
|
34
|
+
"name": "点击事件",
|
|
35
|
+
"desc": "点击文本时,执行方法",
|
|
36
|
+
"func": "(e)=>{\n\t\n}"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["id", "children"];
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
|
+
import { useMemoizedFn } from 'ahooks';
|
|
6
|
+
import { useLDContext } from "../../../engine/provider/ContextProvider";
|
|
7
|
+
import { Button } from 'luck-design/antd';
|
|
8
|
+
import Wrapper from "../Wrapper";
|
|
9
|
+
import { RUNTIME } from "../../../constants";
|
|
10
|
+
var LCButton = function LCButton(_ref) {
|
|
11
|
+
var id = _ref.id,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
var context = useLDContext();
|
|
15
|
+
var ref = useRef();
|
|
16
|
+
var getTargetDom = useMemoizedFn(function () {
|
|
17
|
+
return ref.current.buttonNode;
|
|
18
|
+
});
|
|
19
|
+
var handleClick = useMemoizedFn(function (e) {
|
|
20
|
+
if (context.runtime !== RUNTIME.LIVE) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
console.log('click', context);
|
|
25
|
+
context.$publisher(context.topics.COMPONENT_MOUNT, {
|
|
26
|
+
id: id
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
30
|
+
id: id,
|
|
31
|
+
getTargetDom: getTargetDom
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
33
|
+
ref: ref,
|
|
34
|
+
onClick: handleClick
|
|
35
|
+
}, props), "LCButton-", id));
|
|
36
|
+
};
|
|
37
|
+
export default LCButton;
|