@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
package/lib/helper/action.js
CHANGED
|
@@ -14,12 +14,12 @@ var _utils2 = require("../utils");
|
|
|
14
14
|
var _form = require("./form");
|
|
15
15
|
// 通用方法
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* 提交行为
|
|
19
|
-
* @param action 行为
|
|
20
|
-
* @param data 数据
|
|
21
|
-
* @param parmas 附件设置
|
|
22
|
-
* @param moduleData 当前模块信息
|
|
17
|
+
/**
|
|
18
|
+
* 提交行为
|
|
19
|
+
* @param action 行为
|
|
20
|
+
* @param data 数据
|
|
21
|
+
* @param parmas 附件设置
|
|
22
|
+
* @param moduleData 当前模块信息
|
|
23
23
|
*/
|
|
24
24
|
var doAction = exports.doAction = function doAction(action) {
|
|
25
25
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
package/lib/helper/form.js
CHANGED
|
@@ -34,11 +34,11 @@ var defaultComName = exports.defaultComName = {
|
|
|
34
34
|
file: 'upload'
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* 动态表单配置项转译
|
|
39
|
-
* @param {key string} keyStr
|
|
40
|
-
* @param {label string} labelStr
|
|
41
|
-
* @returns [{key,label}]
|
|
37
|
+
/**
|
|
38
|
+
* 动态表单配置项转译
|
|
39
|
+
* @param {key string} keyStr
|
|
40
|
+
* @param {label string} labelStr
|
|
41
|
+
* @returns [{key,label}]
|
|
42
42
|
*/
|
|
43
43
|
var splitStrToObj = exports.splitStrToObj = function splitStrToObj(keyStr, labelStr) {
|
|
44
44
|
var keys = keyStr && keyStr.length > 0 ? keyStr.split(',') : undefined;
|
|
@@ -55,11 +55,11 @@ var splitStrToObj = exports.splitStrToObj = function splitStrToObj(keyStr, label
|
|
|
55
55
|
return undefined;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* 动态表单配置项转译
|
|
60
|
-
* @param {动态表单配置项} props
|
|
61
|
-
* @param {自定义动态表单配置项} customProps
|
|
62
|
-
* @returns {name: '',...}
|
|
58
|
+
/**
|
|
59
|
+
* 动态表单配置项转译
|
|
60
|
+
* @param {动态表单配置项} props
|
|
61
|
+
* @param {自定义动态表单配置项} customProps
|
|
62
|
+
* @returns {name: '',...}
|
|
63
63
|
*/
|
|
64
64
|
function translator() {
|
|
65
65
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -99,10 +99,10 @@ function translator() {
|
|
|
99
99
|
return _props;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
/**
|
|
103
|
-
* 删除自动移操作中的不可覆盖字段
|
|
104
|
-
* @param props
|
|
105
|
-
* @returns {{multiple}|*}
|
|
102
|
+
/**
|
|
103
|
+
* 删除自动移操作中的不可覆盖字段
|
|
104
|
+
* @param props
|
|
105
|
+
* @returns {{multiple}|*}
|
|
106
106
|
*/
|
|
107
107
|
function formatCustomProps(props) {
|
|
108
108
|
var _props$confiig;
|
package/lib/helper/index.less
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.ldLabs{
|
|
2
|
-
:global{
|
|
3
|
-
.ant-tabs-bar{
|
|
4
|
-
margin: 0 0 4px 0;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
.ldLabs{
|
|
2
|
+
:global{
|
|
3
|
+
.ant-tabs-bar{
|
|
4
|
+
margin: 0 0 4px 0;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
package/lib/helper/ldBuilder.js
CHANGED
|
File without changes
|
package/lib/helper/ldComBuild.js
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,8 @@ var _exportNames = {
|
|
|
12
12
|
buildLdAutoForm: true,
|
|
13
13
|
buildLdGridForm: true,
|
|
14
14
|
LdInfoPanel: true,
|
|
15
|
-
LdCard: true
|
|
15
|
+
LdCard: true,
|
|
16
|
+
LdRuntimeCom: true
|
|
16
17
|
};
|
|
17
18
|
Object.defineProperty(exports, "LdCard", {
|
|
18
19
|
enumerable: true,
|
|
@@ -38,6 +39,12 @@ Object.defineProperty(exports, "LdInfoPanel", {
|
|
|
38
39
|
return _LdInfoPanel.default;
|
|
39
40
|
}
|
|
40
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "LdRuntimeCom", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _LdRuntimeCom.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
41
48
|
Object.defineProperty(exports, "LdTree", {
|
|
42
49
|
enumerable: true,
|
|
43
50
|
get: function get() {
|
|
@@ -70,6 +77,7 @@ var _LdAutoForm = _interopRequireDefault(require("./components/LdAutoForm"));
|
|
|
70
77
|
var _LdGridForm = _interopRequireDefault(require("./components/LdGridForm"));
|
|
71
78
|
var _LdInfoPanel = _interopRequireDefault(require("./components/LdInfoPanel"));
|
|
72
79
|
var _LdCard = _interopRequireDefault(require("./components/LdCard"));
|
|
80
|
+
var _LdRuntimeCom = _interopRequireDefault(require("./components/LdRuntimeCom"));
|
|
73
81
|
var _LdCom = require("./components/LdCom");
|
|
74
82
|
Object.keys(_LdCom).forEach(function (key) {
|
|
75
83
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ICONLIST_URL = exports.ICONLIST_JS = void 0;
|
|
7
|
+
// icon地址
|
|
8
|
+
var ICONLIST_URL = exports.ICONLIST_URL = '/public/icons/iconfont.json';
|
|
9
|
+
var ICONLIST_JS = exports.ICONLIST_JS = '/public/icons/iconfont.js';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MODAL_OPEN = exports.MODAL_CLOSE = exports.LANG_SETTING_SELECT = exports.COMPONENT_UNMOUNT = exports.COMPONENT_SETTING_CLICK = exports.COMPONENT_MOUNT = exports.COMPONENT_MODIFY = exports.COMPONENT_HOVER = exports.COMPONENT_DELETE = exports.COMPONENT_APPEND = exports.COMPONENT_ACTIVE = void 0;
|
|
7
|
+
/******************************** 通用Topic开始 ********************************/
|
|
8
|
+
|
|
9
|
+
// 组件的加载完成事件
|
|
10
|
+
var COMPONENT_MOUNT = exports.COMPONENT_MOUNT = 'component-mount';
|
|
11
|
+
// 组件的卸载事件
|
|
12
|
+
var COMPONENT_UNMOUNT = exports.COMPONENT_UNMOUNT = 'component-unmount';
|
|
13
|
+
// 模态视图层打开事件
|
|
14
|
+
var MODAL_OPEN = exports.MODAL_OPEN = 'modal-open';
|
|
15
|
+
// 模态视图层关闭事件
|
|
16
|
+
var MODAL_CLOSE = exports.MODAL_CLOSE = 'modal-close';
|
|
17
|
+
|
|
18
|
+
/******************************** 通用Topic结束 ********************************/
|
|
19
|
+
|
|
20
|
+
/******************************* Design Topic开始 *******************************/
|
|
21
|
+
|
|
22
|
+
// 组件的hover事件
|
|
23
|
+
var COMPONENT_HOVER = exports.COMPONENT_HOVER = 'component-hover';
|
|
24
|
+
// 组件的激活事件
|
|
25
|
+
var COMPONENT_ACTIVE = exports.COMPONENT_ACTIVE = 'component-active';
|
|
26
|
+
// 组件设置的click事件
|
|
27
|
+
var COMPONENT_SETTING_CLICK = exports.COMPONENT_SETTING_CLICK = 'component-setting-click';
|
|
28
|
+
// 组件的追加事件
|
|
29
|
+
var COMPONENT_APPEND = exports.COMPONENT_APPEND = 'component-append';
|
|
30
|
+
// 组件的删除事件
|
|
31
|
+
var COMPONENT_DELETE = exports.COMPONENT_DELETE = 'component-delete';
|
|
32
|
+
// 组件的修改事件
|
|
33
|
+
var COMPONENT_MODIFY = exports.COMPONENT_MODIFY = 'component-modify';
|
|
34
|
+
|
|
35
|
+
/******************************* Design Topic结束 *******************************/
|
|
36
|
+
|
|
37
|
+
/******************************** Live Topic开始 ********************************/
|
|
38
|
+
|
|
39
|
+
/******************************** Live Topic结束 ********************************/
|
|
40
|
+
|
|
41
|
+
// 国际化语言设置
|
|
42
|
+
var LANG_SETTING_SELECT = exports.LANG_SETTING_SELECT = 'lang-setting-select';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RUNTIME = exports.CELL_KEY = exports.CELL_CLASS_NAME = void 0;
|
|
7
|
+
var RUNTIME = exports.RUNTIME = {
|
|
8
|
+
LIVE: 'live',
|
|
9
|
+
DESIGN: 'design',
|
|
10
|
+
PREVIEW: 'preview'
|
|
11
|
+
};
|
|
12
|
+
var CELL_CLASS_NAME = exports.CELL_CLASS_NAME = 'ld-lc-cell';
|
|
13
|
+
var CELL_KEY = exports.CELL_KEY = {
|
|
14
|
+
PAGE_ROOT: 'page_root',
|
|
15
|
+
PAGE_HEADER: 'page_header',
|
|
16
|
+
PAGE_CONTENT: 'page_content',
|
|
17
|
+
PAGE_FOOTER: 'page_footer'
|
|
18
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
|
+
var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
16
|
+
var _umi = require("umi");
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _Strategy2 = _interopRequireDefault(require("./Strategy"));
|
|
19
|
+
var _TYPE_ = 'dynamic';
|
|
20
|
+
var DynamicStrategy = exports.default = /*#__PURE__*/function (_Strategy) {
|
|
21
|
+
(0, _inherits2.default)(DynamicStrategy, _Strategy);
|
|
22
|
+
var _super = (0, _createSuper2.default)(DynamicStrategy);
|
|
23
|
+
function DynamicStrategy(factory) {
|
|
24
|
+
var _this;
|
|
25
|
+
(0, _classCallCheck2.default)(this, DynamicStrategy);
|
|
26
|
+
_this = _super.call(this, _TYPE_);
|
|
27
|
+
factory.register(_TYPE_, (0, _assertThisInitialized2.default)(_this));
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
(0, _createClass2.default)(DynamicStrategy, [{
|
|
31
|
+
key: "match",
|
|
32
|
+
value: function match(type) {
|
|
33
|
+
return type === _TYPE_;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "builder",
|
|
37
|
+
value: function builder(value) {
|
|
38
|
+
return (0, _umi.dynamic)({
|
|
39
|
+
loader: function () {
|
|
40
|
+
var _loader = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
41
|
+
var name, _yield$import, _Comp;
|
|
42
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
43
|
+
while (1) switch (_context.prev = _context.next) {
|
|
44
|
+
case 0:
|
|
45
|
+
name = (0, _lodash.trimStart)(value, '_');
|
|
46
|
+
_context.next = 3;
|
|
47
|
+
return function (specifier) {
|
|
48
|
+
return new Promise(function (r) {
|
|
49
|
+
return r(specifier);
|
|
50
|
+
}).then(function (s) {
|
|
51
|
+
return (0, _interopRequireWildcard2.default)(require(s));
|
|
52
|
+
});
|
|
53
|
+
}("../../../painter/panel-section/".concat(name));
|
|
54
|
+
case 3:
|
|
55
|
+
_yield$import = _context.sent;
|
|
56
|
+
_Comp = _yield$import.default;
|
|
57
|
+
return _context.abrupt("return", _Comp);
|
|
58
|
+
case 6:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
61
|
+
}
|
|
62
|
+
}, _callee);
|
|
63
|
+
}));
|
|
64
|
+
function loader() {
|
|
65
|
+
return _loader.apply(this, arguments);
|
|
66
|
+
}
|
|
67
|
+
return loader;
|
|
68
|
+
}()
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}]);
|
|
72
|
+
return DynamicStrategy;
|
|
73
|
+
}(_Strategy2.default);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _Strategy2 = _interopRequireDefault(require("./Strategy"));
|
|
15
|
+
var _TYPE_ = 'segmented';
|
|
16
|
+
var SelectStrategy = exports.default = /*#__PURE__*/function (_Strategy) {
|
|
17
|
+
(0, _inherits2.default)(SelectStrategy, _Strategy);
|
|
18
|
+
var _super = (0, _createSuper2.default)(SelectStrategy);
|
|
19
|
+
function SelectStrategy(factory) {
|
|
20
|
+
var _this;
|
|
21
|
+
(0, _classCallCheck2.default)(this, SelectStrategy);
|
|
22
|
+
_this = _super.call(this, _TYPE_);
|
|
23
|
+
factory.register(_TYPE_, (0, _assertThisInitialized2.default)(_this));
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
(0, _createClass2.default)(SelectStrategy, [{
|
|
27
|
+
key: "match",
|
|
28
|
+
value: function match(type) {
|
|
29
|
+
return type === _TYPE_;
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "builder",
|
|
33
|
+
value: function builder() {
|
|
34
|
+
return _antd.Segmented;
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
return SelectStrategy;
|
|
38
|
+
}(_Strategy2.default);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
var _antd = require("luck-design/antd");
|
|
16
|
+
var _Strategy2 = _interopRequireDefault(require("./Strategy"));
|
|
17
|
+
var _excluded = ["options", "field", "onChange"];
|
|
18
|
+
var _TYPE_ = 'select';
|
|
19
|
+
var SelectComp = function SelectComp(_ref) {
|
|
20
|
+
var options = _ref.options,
|
|
21
|
+
field = _ref.field,
|
|
22
|
+
_onChange = _ref.onChange,
|
|
23
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
24
|
+
return /*#__PURE__*/React.createElement(_antd.Select, (0, _extends2.default)({
|
|
25
|
+
onChange: function onChange(value) {
|
|
26
|
+
return _onChange({
|
|
27
|
+
field: field,
|
|
28
|
+
value: value
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}, props), options.map(function (_ref2) {
|
|
32
|
+
var value = _ref2.value,
|
|
33
|
+
label = _ref2.label;
|
|
34
|
+
return /*#__PURE__*/React.createElement(_antd.Select.Option, {
|
|
35
|
+
value: value
|
|
36
|
+
}, label);
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
var SelectStrategy = exports.default = /*#__PURE__*/function (_Strategy) {
|
|
40
|
+
(0, _inherits2.default)(SelectStrategy, _Strategy);
|
|
41
|
+
var _super = (0, _createSuper2.default)(SelectStrategy);
|
|
42
|
+
function SelectStrategy(factory) {
|
|
43
|
+
var _this;
|
|
44
|
+
(0, _classCallCheck2.default)(this, SelectStrategy);
|
|
45
|
+
_this = _super.call(this, _TYPE_);
|
|
46
|
+
factory.register(_TYPE_, (0, _assertThisInitialized2.default)(_this));
|
|
47
|
+
return _this;
|
|
48
|
+
}
|
|
49
|
+
(0, _createClass2.default)(SelectStrategy, [{
|
|
50
|
+
key: "match",
|
|
51
|
+
value: function match(type) {
|
|
52
|
+
return type === _TYPE_;
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
key: "builder",
|
|
56
|
+
value: function builder() {
|
|
57
|
+
return SelectComp;
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
60
|
+
return SelectStrategy;
|
|
61
|
+
}(_Strategy2.default);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var PanelItemStrategy = exports.default = /*#__PURE__*/function () {
|
|
11
|
+
function PanelItemStrategy(type) {
|
|
12
|
+
(0, _classCallCheck2.default)(this, PanelItemStrategy);
|
|
13
|
+
this.type = type;
|
|
14
|
+
}
|
|
15
|
+
(0, _createClass2.default)(PanelItemStrategy, [{
|
|
16
|
+
key: "builder",
|
|
17
|
+
value: function builder(value) {
|
|
18
|
+
throw new Error('builder Function Not implemented');
|
|
19
|
+
}
|
|
20
|
+
}, {
|
|
21
|
+
key: "match",
|
|
22
|
+
value: function match(type) {
|
|
23
|
+
throw new Error('support Function Not implemented');
|
|
24
|
+
}
|
|
25
|
+
}]);
|
|
26
|
+
return PanelItemStrategy;
|
|
27
|
+
}();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _Strategy2 = _interopRequireDefault(require("./Strategy"));
|
|
15
|
+
var _TYPE_ = 'string';
|
|
16
|
+
var StringStrategy = exports.default = /*#__PURE__*/function (_Strategy) {
|
|
17
|
+
(0, _inherits2.default)(StringStrategy, _Strategy);
|
|
18
|
+
var _super = (0, _createSuper2.default)(StringStrategy);
|
|
19
|
+
function StringStrategy(factory) {
|
|
20
|
+
var _this;
|
|
21
|
+
(0, _classCallCheck2.default)(this, StringStrategy);
|
|
22
|
+
_this = _super.call(this, _TYPE_);
|
|
23
|
+
factory.register(_TYPE_, (0, _assertThisInitialized2.default)(_this));
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
(0, _createClass2.default)(StringStrategy, [{
|
|
27
|
+
key: "match",
|
|
28
|
+
value: function match(type) {
|
|
29
|
+
return type === _TYPE_;
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "builder",
|
|
33
|
+
value: function builder() {
|
|
34
|
+
return _antd.Input;
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
return StringStrategy;
|
|
38
|
+
}(_Strategy2.default);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _Strategy2 = _interopRequireDefault(require("./Strategy"));
|
|
15
|
+
var _TYPE_ = 'switch';
|
|
16
|
+
var SelectStrategy = exports.default = /*#__PURE__*/function (_Strategy) {
|
|
17
|
+
(0, _inherits2.default)(SelectStrategy, _Strategy);
|
|
18
|
+
var _super = (0, _createSuper2.default)(SelectStrategy);
|
|
19
|
+
function SelectStrategy(factory) {
|
|
20
|
+
var _this;
|
|
21
|
+
(0, _classCallCheck2.default)(this, SelectStrategy);
|
|
22
|
+
_this = _super.call(this, _TYPE_);
|
|
23
|
+
factory.register(_TYPE_, (0, _assertThisInitialized2.default)(_this));
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
(0, _createClass2.default)(SelectStrategy, [{
|
|
27
|
+
key: "match",
|
|
28
|
+
value: function match(type) {
|
|
29
|
+
return type === _TYPE_;
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "builder",
|
|
33
|
+
value: function builder() {
|
|
34
|
+
return _antd.Switch;
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
return SelectStrategy;
|
|
38
|
+
}(_Strategy2.default);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _StringStrategy = _interopRequireDefault(require("./StringStrategy"));
|
|
11
|
+
var _SelectStrategy = _interopRequireDefault(require("./SelectStrategy"));
|
|
12
|
+
var _SwitchStrategy = _interopRequireDefault(require("./SwitchStrategy"));
|
|
13
|
+
var _SegmentedStrategy = _interopRequireDefault(require("./SegmentedStrategy"));
|
|
14
|
+
var _DynamicStrategy = _interopRequireDefault(require("./DynamicStrategy"));
|
|
15
|
+
var Factory = exports.default = /*#__PURE__*/function () {
|
|
16
|
+
function Factory() {
|
|
17
|
+
(0, _classCallCheck2.default)(this, Factory);
|
|
18
|
+
this.strategies = {};
|
|
19
|
+
this._setPlugins();
|
|
20
|
+
}
|
|
21
|
+
(0, _createClass2.default)(Factory, [{
|
|
22
|
+
key: "_setPlugins",
|
|
23
|
+
value: function _setPlugins() {
|
|
24
|
+
new _StringStrategy.default(this);
|
|
25
|
+
new _DynamicStrategy.default(this);
|
|
26
|
+
new _SelectStrategy.default(this);
|
|
27
|
+
new _SegmentedStrategy.default(this);
|
|
28
|
+
new _SwitchStrategy.default(this);
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
key: "register",
|
|
32
|
+
value: function register(type, strategy) {
|
|
33
|
+
this.strategies[type] = strategy;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "getPanelItemFor",
|
|
37
|
+
value: function getPanelItemFor(type, value) {
|
|
38
|
+
var strategy = this.strategies[type];
|
|
39
|
+
if (strategy !== null && strategy !== void 0 && strategy.match(type)) {
|
|
40
|
+
return strategy.builder(value);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}]);
|
|
45
|
+
return Factory;
|
|
46
|
+
}();
|
|
@@ -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,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Button",
|
|
3
|
+
"name": "按钮",
|
|
4
|
+
"desc": "用于触发特定的操作或动作,以便用户可以轻松地创建具有自定义样式和行为的界面。",
|
|
5
|
+
"icon": "icon-button",
|
|
6
|
+
"group": "basic",
|
|
7
|
+
"groupName": "基础",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"style": {},
|
|
10
|
+
"title": "按钮",
|
|
11
|
+
"type": {
|
|
12
|
+
"key": "primary"
|
|
13
|
+
},
|
|
14
|
+
"size": "middle",
|
|
15
|
+
"effect": "hidden"
|
|
16
|
+
}
|