@luck-design-biz/luckda 0.0.22 → 0.0.24-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +40 -49
- package/es/components/Builder/index.js +4 -4
- package/es/components/LdAutoForm/index.js +7 -9
- package/es/components/LdCard/index.js +5 -6
- package/es/components/LdCard/model.js +1 -1
- package/es/components/LdCom/index.js +2 -2
- package/es/components/LdFormList/index.js +15 -16
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +11 -12
- package/es/components/LdGrid/model.js +1 -1
- package/es/components/LdGridForm/index.js +10 -10
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdInfoPanel/index.js +2 -2
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +42 -0
- package/es/components/LdTree/index.js +3 -4
- package/es/components/LdTree/index.less +36 -36
- package/es/helper/FromItems.js +1 -1
- package/es/helper/action.js +8 -8
- package/es/helper/form.js +16 -16
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +1 -1
- package/es/helper/ldComBuild.js +4 -4
- package/es/index.js +10 -9
- 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/GroupStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +50 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +50 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +42 -0
- package/es/lowcode/engine/meta/box.props.default.json +12 -0
- package/es/lowcode/engine/meta/box.props.json +42 -0
- package/es/lowcode/engine/meta/button.props.default.json +16 -0
- package/es/lowcode/engine/meta/button.props.json +122 -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 +12 -0
- package/es/lowcode/engine/meta/table.props.json +174 -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 +329 -0
- package/es/lowcode/painter/I18n.js +205 -0
- package/es/lowcode/painter/Outline.js +207 -0
- package/es/lowcode/painter/Panel.js +207 -0
- package/es/lowcode/painter/Ribbon.js +142 -0
- package/es/lowcode/painter/components/Collapse.js +31 -0
- package/es/lowcode/painter/components/NumberInput.js +93 -0
- package/es/lowcode/painter/components/PanelItem.js +63 -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 +118 -0
- package/es/lowcode/painter/components/code-editor/CssEditor.js +14 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +64 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +84 -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 +39 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +134 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +130 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +292 -0
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +543 -0
- package/es/lowcode/painter/panel-section/StylePanel/Height.js +48 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +64 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +101 -0
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +48 -0
- package/es/lowcode/painter/panel-section/StylePanel/index.js +12 -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/collapse.less +21 -0
- package/es/lowcode/painter/style/components.less +90 -0
- package/es/lowcode/painter/style/design.less +142 -0
- package/es/lowcode/painter/style/display.less +17 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/index.less +6 -0
- package/es/lowcode/painter/style/layout-ratio.less +51 -0
- package/es/lowcode/painter/style/number-input.less +17 -0
- package/es/lowcode/painter/style/outline.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +44 -0
- package/es/lowcode/painter/style/panel.less +142 -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/style-panel.less +5 -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 +143 -0
- package/es/lowcode/view/Loading.js +23 -0
- package/es/lowcode/view/Page.js +252 -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 +38 -0
- package/es/lowcode/view/lc-components/Box/index.less +15 -0
- package/es/lowcode/view/lc-components/Box/meta.json +42 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +21 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Button/index.js +102 -0
- package/es/lowcode/view/lc-components/Button/meta.json +122 -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 +57 -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 +16 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +153 -0
- package/es/lowcode/view/lc-components/Table/meta.json +174 -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 +54 -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 +1 -1
- package/es/upload/Form/gridForm.js +30 -8
- package/es/upload/Form/index.js +1 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +30 -18
- package/es/upload/GridCell/index.js +0 -0
- package/es/upload/index.js +3 -3
- package/es/utils/action.js +1 -1
- package/es/utils/form.js +26 -26
- package/es/utils/grid.js +26 -29
- package/es/utils/index.js +3 -3
- package/lib/components/Builder/index.js +3 -5
- package/lib/components/LdAutoForm/index.js +5 -8
- package/lib/components/LdCard/index.js +5 -7
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +6 -11
- package/lib/components/LdFormList/index.js +10 -12
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +10 -12
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +6 -7
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdInfoPanel/index.js +2 -3
- package/lib/components/LdPop/index.js +2 -4
- package/lib/components/LdRuntimeCom/index.js +49 -0
- package/lib/components/LdTree/index.js +2 -4
- package/lib/components/LdTree/index.less +36 -36
- package/lib/helper/FromItems.js +15 -29
- package/lib/helper/action.js +9 -11
- package/lib/helper/form.js +18 -20
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +1 -2
- package/lib/helper/ldComBuild.js +7 -11
- 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/GroupStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +56 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +56 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +48 -0
- package/lib/lowcode/engine/meta/box.props.default.json +12 -0
- package/lib/lowcode/engine/meta/box.props.json +42 -0
- package/lib/lowcode/engine/meta/button.props.default.json +16 -0
- package/lib/lowcode/engine/meta/button.props.json +122 -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 +12 -0
- package/lib/lowcode/engine/meta/table.props.json +174 -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 +336 -0
- package/lib/lowcode/painter/I18n.js +213 -0
- package/lib/lowcode/painter/Outline.js +215 -0
- package/lib/lowcode/painter/Panel.js +215 -0
- package/lib/lowcode/painter/Ribbon.js +150 -0
- package/lib/lowcode/painter/components/Collapse.js +39 -0
- package/lib/lowcode/painter/components/NumberInput.js +101 -0
- package/lib/lowcode/painter/components/PanelItem.js +70 -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 +126 -0
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +22 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +72 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +95 -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 +46 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +138 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +299 -0
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +550 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Height.js +55 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +72 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +112 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Width.js +55 -0
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +19 -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/collapse.less +21 -0
- package/lib/lowcode/painter/style/components.less +90 -0
- package/lib/lowcode/painter/style/design.less +142 -0
- package/lib/lowcode/painter/style/display.less +17 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/index.less +6 -0
- package/lib/lowcode/painter/style/layout-ratio.less +51 -0
- package/lib/lowcode/painter/style/number-input.less +17 -0
- package/lib/lowcode/painter/style/outline.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +44 -0
- package/lib/lowcode/painter/style/panel.less +142 -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/style-panel.less +5 -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 +158 -0
- package/lib/lowcode/view/Loading.js +30 -0
- package/lib/lowcode/view/Page.js +260 -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 +46 -0
- package/lib/lowcode/view/lc-components/Box/index.less +15 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +42 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +28 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Button/index.js +110 -0
- package/lib/lowcode/view/lc-components/Button/meta.json +122 -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 +65 -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 +23 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +161 -0
- package/lib/lowcode/view/lc-components/Table/meta.json +174 -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 +61 -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 +28 -7
- package/lib/upload/Form/index.js +1 -2
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +30 -19
- package/lib/upload/GridCell/index.js +1 -2
- package/lib/upload/index.js +0 -0
- package/lib/utils/action.js +0 -0
- package/lib/utils/form.js +26 -29
- package/lib/utils/grid.js +22 -26
- package/lib/utils/index.js +0 -0
- package/lowcode.js +1 -0
- package/package.json +164 -78
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/README.zh-CN.md +0 -51
|
@@ -5,14 +5,14 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
5
5
|
var _excluded = ["formId", "formRef", "showNote", "operates", "loading", "uploadUrl", "forbiddenTypes", "beforeUpload", "formMode", "onUploadChange", "zipName", "resetActions", "getUrl", "wrapperRef"];
|
|
6
6
|
import React, { useState, useRef, forwardRef } from 'react';
|
|
7
7
|
import { getDvaApp } from 'umi';
|
|
8
|
-
import { useMemoizedFn } from 'ahooks';
|
|
8
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
9
9
|
import { Button, Upload, Tooltip, Icon } from 'luck-design/antd';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { last } from 'lodash';
|
|
12
12
|
import { BasicForm, BasicFormItem, PopWindow } from 'luck-design';
|
|
13
|
-
import api from
|
|
13
|
+
import api from "@/services/ApiConfig";
|
|
14
14
|
import { FormBtn, GridForm } from '@luck-design-biz/base/FormList';
|
|
15
|
-
import { byteConvert, formatMessage, beforeUpload as _beforeUpload2, patchDownloadZip, showPop, request, canPreview } from '@luck-design-biz/base/utils';
|
|
15
|
+
import { byteConvert, formatMessage, beforeUpload as _beforeUpload2, getSupportUploadTypes, patchDownloadZip, showPop, request, canPreview } from '@luck-design-biz/base/utils';
|
|
16
16
|
var columns = [{
|
|
17
17
|
field: 'name',
|
|
18
18
|
title: '附件名称'
|
|
@@ -77,6 +77,9 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
77
77
|
var gridRef = wrapperRef || useRef(null);
|
|
78
78
|
var _getDvaApp$_store$get = (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.getState().user,
|
|
79
79
|
currentUser = _getDvaApp$_store$get.currentUser;
|
|
80
|
+
var supportUploadTypes = useCreation(function () {
|
|
81
|
+
return getSupportUploadTypes(forbiddenTypes);
|
|
82
|
+
}, [forbiddenTypes]);
|
|
80
83
|
|
|
81
84
|
// 下载
|
|
82
85
|
var downloadFile = function downloadFile(filenames, tag) {
|
|
@@ -158,7 +161,8 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
158
161
|
}).then(function (res) {
|
|
159
162
|
var code = res.code,
|
|
160
163
|
list = res.list,
|
|
161
|
-
detail = res.detail
|
|
164
|
+
detail = res.detail,
|
|
165
|
+
msg = res.msg;
|
|
162
166
|
if (code === 1) {
|
|
163
167
|
setUploadLoading(false);
|
|
164
168
|
setVisible(false);
|
|
@@ -185,6 +189,9 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
185
189
|
}, 300);
|
|
186
190
|
}
|
|
187
191
|
});
|
|
192
|
+
} else {
|
|
193
|
+
setUploadLoading(false);
|
|
194
|
+
showPop(msg, null, 'error');
|
|
188
195
|
}
|
|
189
196
|
});
|
|
190
197
|
}
|
|
@@ -205,7 +212,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
205
212
|
var upload = _beforeUpload2({
|
|
206
213
|
file: file,
|
|
207
214
|
fileList: fileList,
|
|
208
|
-
|
|
215
|
+
supportUploadTypes: supportUploadTypes,
|
|
209
216
|
beforeUpload: _beforeUpload
|
|
210
217
|
});
|
|
211
218
|
if (!upload) setUploadLoading(false);
|
|
@@ -228,7 +235,15 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
228
235
|
}, formatMessage({
|
|
229
236
|
id: 'app.base.operate.add',
|
|
230
237
|
label: '添加'
|
|
231
|
-
})) : /*#__PURE__*/React.createElement(
|
|
238
|
+
})) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
239
|
+
title: "".concat(formatMessage({
|
|
240
|
+
id: 'app.upload.supportUpload',
|
|
241
|
+
label: '支持上传'
|
|
242
|
+
})).concat(supportUploadTypes.join(',')).concat(formatMessage({
|
|
243
|
+
id: 'app.upload.supportUpload.type',
|
|
244
|
+
label: '类型的文件'
|
|
245
|
+
}))
|
|
246
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormBtn, {
|
|
232
247
|
formId: "formId"
|
|
233
248
|
}, /*#__PURE__*/React.createElement(Upload, formItemProps, /*#__PURE__*/React.createElement(Button, {
|
|
234
249
|
type: "primary",
|
|
@@ -239,7 +254,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
239
254
|
}, formatMessage({
|
|
240
255
|
id: 'app.base.operate.add',
|
|
241
256
|
label: '添加'
|
|
242
|
-
}))))), /*#__PURE__*/React.createElement(Button, {
|
|
257
|
+
}))))))), /*#__PURE__*/React.createElement(Button, {
|
|
243
258
|
type: "primary",
|
|
244
259
|
onClick: function onClick() {
|
|
245
260
|
var _gridRef$current$form;
|
|
@@ -344,6 +359,13 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
344
359
|
type: "upload",
|
|
345
360
|
name: "files",
|
|
346
361
|
label: "\u9644\u4EF6",
|
|
362
|
+
extra: "".concat(formatMessage({
|
|
363
|
+
id: 'app.upload.supportUpload',
|
|
364
|
+
label: '支持上传'
|
|
365
|
+
})).concat(supportUploadTypes.join(',')).concat(formatMessage({
|
|
366
|
+
id: 'app.upload.supportUpload.type',
|
|
367
|
+
label: '类型的文件'
|
|
368
|
+
})),
|
|
347
369
|
config: _objectSpread(_objectSpread({}, rest), {}, {
|
|
348
370
|
required: true,
|
|
349
371
|
message: '请上传',
|
|
@@ -355,7 +377,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
355
377
|
return _beforeUpload2({
|
|
356
378
|
file: file,
|
|
357
379
|
fileList: fileList,
|
|
358
|
-
|
|
380
|
+
supportUploadTypes: supportUploadTypes,
|
|
359
381
|
beforeUpload: _beforeUpload
|
|
360
382
|
});
|
|
361
383
|
}
|
package/es/upload/Form/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var _excluded = ["formId", "moduleCode", "bucket", "note"];
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { omitBy, isNil } from 'lodash';
|
|
6
6
|
import { stringify } from 'querystring';
|
|
7
|
-
import GridForm from
|
|
7
|
+
import GridForm from "./gridForm";
|
|
8
8
|
import { request } from '@luck-design-biz/base/utils';
|
|
9
9
|
function buildComponent(props) {
|
|
10
10
|
var _formId = props.formId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.fileGrid {
|
|
2
|
-
:global {
|
|
3
|
-
.ag-root-wrapper-body.ag-layout-normal {
|
|
4
|
-
height: 100% !important;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
.fileGrid {
|
|
2
|
+
:global {
|
|
3
|
+
.ag-root-wrapper-body.ag-layout-normal {
|
|
4
|
+
height: 100% !important;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -4,23 +4,24 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
4
4
|
var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "forbiddenTypes", "children", "dataFormat", "listType"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { BasicFormItem } from 'luck-design';
|
|
7
|
-
import { formatMessage, beforeUpload as _beforeUpload } from '@luck-design-biz/base/utils';
|
|
7
|
+
import { formatMessage, beforeUpload as _beforeUpload, getSupportUploadTypes } from '@luck-design-biz/base/utils';
|
|
8
|
+
import { useCreation } from 'ahooks';
|
|
8
9
|
|
|
9
|
-
/**
|
|
10
|
-
* 表单类型富文本上传
|
|
11
|
-
* 是否实体字段: 是
|
|
12
|
-
* 是否接受tag: 是
|
|
13
|
-
* 是否虚拟主键: 否
|
|
14
|
-
* 接受参数:
|
|
15
|
-
* name: 附件名称逗号拼接
|
|
16
|
-
* name_virtual: [{...// 附件所有参数}]
|
|
17
|
-
* ### name=name_virtual ###
|
|
18
|
-
* 传参:
|
|
19
|
-
* name: [{objectName, marker},...]
|
|
20
|
-
* 其他需求:
|
|
21
|
-
* 支持beforeUpload禁止附加类型
|
|
22
|
-
* =>beforeUpload禁止类型全覆盖
|
|
23
|
-
* =>forbiddenTypes和配置管理中禁止类型合并
|
|
10
|
+
/**
|
|
11
|
+
* 表单类型富文本上传
|
|
12
|
+
* 是否实体字段: 是
|
|
13
|
+
* 是否接受tag: 是
|
|
14
|
+
* 是否虚拟主键: 否
|
|
15
|
+
* 接受参数:
|
|
16
|
+
* name: 附件名称逗号拼接
|
|
17
|
+
* name_virtual: [{...// 附件所有参数}]
|
|
18
|
+
* ### name=name_virtual ###
|
|
19
|
+
* 传参:
|
|
20
|
+
* name: [{objectName, marker},...]
|
|
21
|
+
* 其他需求:
|
|
22
|
+
* 支持beforeUpload禁止附加类型
|
|
23
|
+
* =>beforeUpload禁止类型全覆盖
|
|
24
|
+
* =>forbiddenTypes和配置管理中禁止类型合并
|
|
24
25
|
*/
|
|
25
26
|
|
|
26
27
|
function buildComponent(props) {
|
|
@@ -42,7 +43,18 @@ function buildComponent(props) {
|
|
|
42
43
|
var getUrl = function getUrl(behaviorKey) {
|
|
43
44
|
return "".concat(window.appConfig.OSS_HOST_V3, "?moduleCode=").concat(moduleCode, "&behaviorKey=").concat(behaviorKey, "&bucket=").concat(bucket, "&tag=").concat(tag, "¬e=").concat(note);
|
|
44
45
|
};
|
|
45
|
-
|
|
46
|
+
var supportUploadTypes = useCreation(function () {
|
|
47
|
+
return getSupportUploadTypes(forbiddenTypes);
|
|
48
|
+
}, [forbiddenTypes]);
|
|
49
|
+
return /*#__PURE__*/React.createElement(BasicFormItem, _extends({
|
|
50
|
+
extra: "".concat(formatMessage({
|
|
51
|
+
id: 'app.upload.supportUpload',
|
|
52
|
+
label: '支持上传'
|
|
53
|
+
})).concat(supportUploadTypes.join(',')).concat(formatMessage({
|
|
54
|
+
id: 'app.upload.supportUpload.type',
|
|
55
|
+
label: '类型的文件'
|
|
56
|
+
}))
|
|
57
|
+
}, rest, {
|
|
46
58
|
type: "uploadV3",
|
|
47
59
|
config: _objectSpread(_objectSpread({
|
|
48
60
|
required: false,
|
|
@@ -68,7 +80,7 @@ function buildComponent(props) {
|
|
|
68
80
|
return _beforeUpload({
|
|
69
81
|
file: file,
|
|
70
82
|
fileList: fileList,
|
|
71
|
-
|
|
83
|
+
supportUploadTypes: supportUploadTypes,
|
|
72
84
|
beforeUpload: config && config.beforeUpload
|
|
73
85
|
});
|
|
74
86
|
}
|
|
File without changes
|
package/es/upload/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as buildUploadForm } from
|
|
2
|
-
export { default as buildUploadFormItem } from
|
|
3
|
-
export { default as UploadGridCell } from
|
|
1
|
+
export { default as buildUploadForm } from "./Form";
|
|
2
|
+
export { default as buildUploadFormItem } from "./FormItem";
|
|
3
|
+
export { default as UploadGridCell } from "./GridCell";
|
package/es/utils/action.js
CHANGED
|
@@ -2,7 +2,7 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
4
|
// 行为请求同一接口
|
|
5
|
-
import { readBehaviorCall } from
|
|
5
|
+
import { readBehaviorCall } from "../services";
|
|
6
6
|
export function behaviorCall() {
|
|
7
7
|
return _behaviorCall.apply(this, arguments);
|
|
8
8
|
}
|
package/es/utils/form.js
CHANGED
|
@@ -13,16 +13,16 @@ var _excluded = ["comName", "property"],
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import moment from 'moment';
|
|
15
15
|
import { capitalize, merge, transform, isArray, omit, isNil, clone } from 'lodash';
|
|
16
|
-
import api from
|
|
17
|
-
import { defaultComName, translator, splitStrToObj, formatCustomProps } from
|
|
18
|
-
import { getColumnRender } from
|
|
19
|
-
import * as formItemUtils from
|
|
16
|
+
import api from "@/services/ApiConfig";
|
|
17
|
+
import { defaultComName, translator, splitStrToObj, formatCustomProps } from "../helper/form";
|
|
18
|
+
import { getColumnRender } from "./grid";
|
|
19
|
+
import * as formItemUtils from "../helper/FromItems";
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* 根据动态表单配置项生成formItem
|
|
23
|
-
* @param {动态表单配置项} props
|
|
24
|
-
* @param {自定义动态表单配置项} customProps
|
|
25
|
-
* @returns <BasicForm name='' ... />
|
|
21
|
+
/**
|
|
22
|
+
* 根据动态表单配置项生成formItem
|
|
23
|
+
* @param {动态表单配置项} props
|
|
24
|
+
* @param {自定义动态表单配置项} customProps
|
|
25
|
+
* @returns <BasicForm name='' ... />
|
|
26
26
|
*/
|
|
27
27
|
export function getFormItem() {
|
|
28
28
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -55,11 +55,11 @@ export function getFormItem() {
|
|
|
55
55
|
}));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* 根据后端返回数据组装表单数据
|
|
60
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
61
|
-
* @param {对象---后端返回的未处理数据} values
|
|
62
|
-
* @returns
|
|
58
|
+
/**
|
|
59
|
+
* 根据后端返回数据组装表单数据
|
|
60
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
61
|
+
* @param {对象---后端返回的未处理数据} values
|
|
62
|
+
* @returns
|
|
63
63
|
*/
|
|
64
64
|
export var formItemDataFormat = function formItemDataFormat() {
|
|
65
65
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -97,7 +97,7 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
97
97
|
result[name] = values[name] ? JSON.parse(values[name]) : undefined;
|
|
98
98
|
break;
|
|
99
99
|
case 'year':
|
|
100
|
-
result[name] = values[
|
|
100
|
+
result[name] = values[name] ? moment(values[name], 'YYYY') : undefined;
|
|
101
101
|
break;
|
|
102
102
|
case 'radio':
|
|
103
103
|
result[name] = values[name];
|
|
@@ -123,11 +123,11 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
123
123
|
return _objectSpread(_objectSpread({}, omitValues), data);
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
/**
|
|
127
|
-
* 数据格式化
|
|
128
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
129
|
-
* @param {对象---表单获取到的未处理数据} values
|
|
130
|
-
* @returns
|
|
126
|
+
/**
|
|
127
|
+
* 数据格式化
|
|
128
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
129
|
+
* @param {对象---表单获取到的未处理数据} values
|
|
130
|
+
* @returns
|
|
131
131
|
*/
|
|
132
132
|
export var dataFormat = function dataFormat() {
|
|
133
133
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -186,12 +186,12 @@ export var dataFormat = function dataFormat() {
|
|
|
186
186
|
return _objectSpread(_objectSpread({}, values), data);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
/**
|
|
190
|
-
*
|
|
191
|
-
* @param formType
|
|
192
|
-
* @param props
|
|
193
|
-
* @param customProps
|
|
194
|
-
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
* @param formType
|
|
192
|
+
* @param props
|
|
193
|
+
* @param customProps
|
|
194
|
+
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
195
195
|
*/
|
|
196
196
|
export var getFormColumn = function getFormColumn() {
|
|
197
197
|
var _props$config;
|
package/es/utils/grid.js
CHANGED
|
@@ -4,16 +4,16 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
4
4
|
var _excluded = ["comName", "property"],
|
|
5
5
|
_excluded2 = ["name"],
|
|
6
6
|
_excluded3 = ["filter", "filterParams"];
|
|
7
|
-
import React from
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
9
|
-
import { merge, isNil, isArray, includes, capitalize } from 'lodash';
|
|
9
|
+
import { merge, isNil, isArray, includes, capitalize, isString } from 'lodash';
|
|
10
10
|
import { Switch, Tag } from 'luck-design/antd';
|
|
11
11
|
import moment from 'moment';
|
|
12
|
-
import UploadGridCell from
|
|
12
|
+
import UploadGridCell from "../upload/GridCell";
|
|
13
13
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
14
|
-
import api from
|
|
15
|
-
import { defaultComName, translator, formatCustomProps, splitStrToObj } from
|
|
16
|
-
import * as formItemUtils from
|
|
14
|
+
import api from "@/services/ApiConfig";
|
|
15
|
+
import { defaultComName, translator, formatCustomProps, splitStrToObj } from "../helper/form";
|
|
16
|
+
import * as formItemUtils from "../helper/FromItems";
|
|
17
17
|
|
|
18
18
|
// const { dispatch } = getDvaApp()?._store;
|
|
19
19
|
|
|
@@ -28,7 +28,7 @@ export function getColumnRender(name, type) {
|
|
|
28
28
|
case 'textarea':
|
|
29
29
|
render = function render(text, record) {
|
|
30
30
|
var _props$config;
|
|
31
|
-
return record["".concat(name, "_virtual")] || ((
|
|
31
|
+
return record["".concat(name, "_virtual")] || ((_props$config = props.config) !== null && _props$config !== void 0 && _props$config.precision && text ? Number(text).toFixed(props.config.precision) : text);
|
|
32
32
|
};
|
|
33
33
|
break;
|
|
34
34
|
case 'date':
|
|
@@ -37,8 +37,8 @@ export function getColumnRender(name, type) {
|
|
|
37
37
|
};
|
|
38
38
|
break;
|
|
39
39
|
case 'year':
|
|
40
|
-
render = function render(text
|
|
41
|
-
return
|
|
40
|
+
render = function render(text) {
|
|
41
|
+
return text;
|
|
42
42
|
};
|
|
43
43
|
break;
|
|
44
44
|
case 'user':
|
|
@@ -69,9 +69,9 @@ export function getColumnRender(name, type) {
|
|
|
69
69
|
break;
|
|
70
70
|
case 'region':
|
|
71
71
|
render = function render(text, record) {
|
|
72
|
-
return record["".concat(name, "_virtual")] || text ? text.map(function (i) {
|
|
72
|
+
return record["".concat(name, "_virtual")] || (text ? (isString(text) ? JSON.parse(text) : text).map(function (i) {
|
|
73
73
|
return i.name;
|
|
74
|
-
}).join('/') : undefined;
|
|
74
|
+
}).join('/') : undefined);
|
|
75
75
|
};
|
|
76
76
|
break;
|
|
77
77
|
case 'upload':
|
|
@@ -175,14 +175,14 @@ export var getGridColumn = function getGridColumn() {
|
|
|
175
175
|
data.filter = 'select';
|
|
176
176
|
data.filterParams = {
|
|
177
177
|
options: function options() {
|
|
178
|
-
var _getDvaApp
|
|
179
|
-
return (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0
|
|
178
|
+
var _getDvaApp;
|
|
179
|
+
return (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 || (_getDvaApp = _getDvaApp._store) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp.dispatch({
|
|
180
180
|
type: 'global/getUser'
|
|
181
181
|
});
|
|
182
182
|
},
|
|
183
183
|
searchData: function searchData(str) {
|
|
184
|
-
var _getDvaApp2
|
|
185
|
-
return (_getDvaApp2 = getDvaApp()) === null || _getDvaApp2 === void 0
|
|
184
|
+
var _getDvaApp2;
|
|
185
|
+
return (_getDvaApp2 = getDvaApp()) === null || _getDvaApp2 === void 0 || (_getDvaApp2 = _getDvaApp2._store) === null || _getDvaApp2 === void 0 ? void 0 : _getDvaApp2.dispatch({
|
|
186
186
|
type: "global/getUser",
|
|
187
187
|
payload: str
|
|
188
188
|
});
|
|
@@ -197,8 +197,8 @@ export var getGridColumn = function getGridColumn() {
|
|
|
197
197
|
if (_props.alias) {
|
|
198
198
|
data.filterParams = {
|
|
199
199
|
options: function options() {
|
|
200
|
-
var _getDvaApp3
|
|
201
|
-
return (_getDvaApp3 = getDvaApp()) === null || _getDvaApp3 === void 0
|
|
200
|
+
var _getDvaApp3;
|
|
201
|
+
return (_getDvaApp3 = getDvaApp()) === null || _getDvaApp3 === void 0 || (_getDvaApp3 = _getDvaApp3._store) === null || _getDvaApp3 === void 0 ? void 0 : _getDvaApp3.dispatch({
|
|
202
202
|
type: 'global/getDatadic',
|
|
203
203
|
payload: {
|
|
204
204
|
snamealias: _props.alias
|
|
@@ -213,8 +213,8 @@ export var getGridColumn = function getGridColumn() {
|
|
|
213
213
|
data.filter = 'treeSelect';
|
|
214
214
|
data.filterParams = {
|
|
215
215
|
options: function options() {
|
|
216
|
-
var _getDvaApp4
|
|
217
|
-
return (_getDvaApp4 = getDvaApp()) === null || _getDvaApp4 === void 0
|
|
216
|
+
var _getDvaApp4;
|
|
217
|
+
return (_getDvaApp4 = getDvaApp()) === null || _getDvaApp4 === void 0 || (_getDvaApp4 = _getDvaApp4._store) === null || _getDvaApp4 === void 0 ? void 0 : _getDvaApp4.dispatch({
|
|
218
218
|
type: 'global/readGroup',
|
|
219
219
|
payload: {
|
|
220
220
|
sclassKey: _props.sclassKey
|
|
@@ -222,8 +222,8 @@ export var getGridColumn = function getGridColumn() {
|
|
|
222
222
|
});
|
|
223
223
|
},
|
|
224
224
|
searchData: function searchData(str) {
|
|
225
|
-
var _getDvaApp5
|
|
226
|
-
return (_getDvaApp5 = getDvaApp()) === null || _getDvaApp5 === void 0
|
|
225
|
+
var _getDvaApp5;
|
|
226
|
+
return (_getDvaApp5 = getDvaApp()) === null || _getDvaApp5 === void 0 || (_getDvaApp5 = _getDvaApp5._store) === null || _getDvaApp5 === void 0 ? void 0 : _getDvaApp5.dispatch({
|
|
227
227
|
type: 'global/readGroup',
|
|
228
228
|
payload: {
|
|
229
229
|
sclassKey: _props.sclassKey,
|
|
@@ -255,8 +255,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
255
255
|
case 'date':
|
|
256
256
|
formItemProps = {
|
|
257
257
|
dataFormat: function dataFormat(value) {
|
|
258
|
-
|
|
259
|
-
return _ref2 = {}, _defineProperty(_ref2, name, value ? moment(value).valueOf() : undefined), _defineProperty(_ref2, "".concat(name, "_virtual"), value ? moment(value).format('YYYY-MM-DD HH:mm:ss') : undefined), _ref2;
|
|
258
|
+
return _defineProperty(_defineProperty({}, name, value ? moment(value).valueOf() : undefined), "".concat(name, "_virtual"), value ? moment(value).format('YYYY-MM-DD HH:mm:ss') : undefined);
|
|
260
259
|
},
|
|
261
260
|
inputFormat: function inputFormat(value, record, params) {
|
|
262
261
|
return moment(record["".concat(name, "_virtual")], 'YYYY-MM-DD HH:mm:ss');
|
|
@@ -269,12 +268,11 @@ export var getGridColumn = function getGridColumn() {
|
|
|
269
268
|
if (translateProps.multiple) {
|
|
270
269
|
formItemProps = {
|
|
271
270
|
dataFormat: function dataFormat(value) {
|
|
272
|
-
|
|
273
|
-
return _ref3 = {}, _defineProperty(_ref3, name, value.map(function (v) {
|
|
271
|
+
return _defineProperty(_defineProperty({}, name, value.map(function (v) {
|
|
274
272
|
return v.value || v.key;
|
|
275
|
-
}).join(',')),
|
|
273
|
+
}).join(',')), "".concat(name, "_virtual"), value.map(function (v) {
|
|
276
274
|
return v.label;
|
|
277
|
-
}).join(','))
|
|
275
|
+
}).join(','));
|
|
278
276
|
},
|
|
279
277
|
inputFormat: function inputFormat(value, record, params) {
|
|
280
278
|
return _defineProperty({}, name, splitStrToObj(value, record["".concat(name, "_virtual")]));
|
|
@@ -283,8 +281,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
283
281
|
} else {
|
|
284
282
|
formItemProps = {
|
|
285
283
|
dataFormat: function dataFormat(value) {
|
|
286
|
-
|
|
287
|
-
return _ref5 = {}, _defineProperty(_ref5, name, value ? value.value || value.key : undefined), _defineProperty(_ref5, "".concat(name, "_virtual"), value ? value.label : undefined), _ref5;
|
|
284
|
+
return _defineProperty(_defineProperty({}, name, value ? value.value || value.key : undefined), "".concat(name, "_virtual"), value ? value.label : undefined);
|
|
288
285
|
},
|
|
289
286
|
inputFormat: function inputFormat(value, record, params) {
|
|
290
287
|
return _defineProperty({}, name, !isNil(value) ? {
|
package/es/utils/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./grid";
|
|
2
|
+
export * from "./form";
|
|
3
|
+
export * from "./action";
|
|
@@ -17,8 +17,7 @@ var _LdPop = _interopRequireDefault(require("../LdPop"));
|
|
|
17
17
|
var _services = require("../../services");
|
|
18
18
|
var _action2 = require("../../helper/action");
|
|
19
19
|
var _utils = require("@luck-design-biz/base/utils");
|
|
20
|
-
var LuckDaContext = /*#__PURE__*/(0, _react.createContext)();
|
|
21
|
-
exports.LuckDaContext = LuckDaContext;
|
|
20
|
+
var LuckDaContext = exports.LuckDaContext = /*#__PURE__*/(0, _react.createContext)();
|
|
22
21
|
var builder = function builder(WrappedComponent, moduleCode) {
|
|
23
22
|
var Component = function Component(props) {
|
|
24
23
|
if (!moduleCode) return (0, _utils.formatMessage)({
|
|
@@ -101,7 +100,7 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
101
100
|
var _props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
102
101
|
fieldProps.current = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, fieldProps.current), _props);
|
|
103
102
|
};
|
|
104
|
-
if (loading) return
|
|
103
|
+
if (loading) return null;
|
|
105
104
|
if (!moduleData) return (0, _utils.formatMessage)({
|
|
106
105
|
id: 'luckda.module.loadFailed',
|
|
107
106
|
label: '模块信息加载失败'
|
|
@@ -138,5 +137,4 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
138
137
|
};
|
|
139
138
|
return Component;
|
|
140
139
|
};
|
|
141
|
-
var _default = builder;
|
|
142
|
-
exports.default = _default;
|
|
140
|
+
var _default = exports.default = builder;
|
|
@@ -58,11 +58,10 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
58
58
|
var _defaultValues = {};
|
|
59
59
|
var _nodes = (0, _lodash.transform)(columns, function (result, col) {
|
|
60
60
|
if (col.isShowInForm) {
|
|
61
|
-
var _objectSpread2;
|
|
62
61
|
var customFiled = filedsRewrite.find(function (field) {
|
|
63
62
|
return field.name === col.aliaName;
|
|
64
63
|
}) || {};
|
|
65
|
-
_defaultValues = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, _defaultValues), {}, (
|
|
64
|
+
_defaultValues = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
66
65
|
result.push((0, _utils.getFormItem)(col, (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
67
66
|
formId: ldId,
|
|
68
67
|
moduleCode: moduleCode
|
|
@@ -109,7 +108,7 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
109
108
|
var values = _ref3.values,
|
|
110
109
|
submitData = _ref3.submitData;
|
|
111
110
|
var _submitData = (0, _utils.dataFormat)(columns, submitData);
|
|
112
|
-
if (_onOperate
|
|
111
|
+
if (_onOperate !== null && _onOperate !== void 0 && _onOperate.post) return _onOperate.post({
|
|
113
112
|
values: values,
|
|
114
113
|
submitData: _submitData
|
|
115
114
|
}); // 以预设为主
|
|
@@ -121,16 +120,15 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
121
120
|
onQuery: (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
122
121
|
api: _utils.behaviorCall,
|
|
123
122
|
get: function get(formData) {
|
|
124
|
-
var _params2;
|
|
125
123
|
var _relationKey = isMain ? window.appConfig.constraintKeys.PRIMARY : relationKey;
|
|
126
|
-
var _params = (
|
|
124
|
+
var _params = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, isMain ? 'indocno' : 'relationId', formData[mainFormLdId] && formData[mainFormLdId][_relationKey] || ticketData[_relationKey]), "moduleCode", moduleCode), "datasetCode", dataSetKey), "behaviorKey", isMain ? 'readForm' : 'readUniqueForm');
|
|
127
125
|
if (!isMain) _params.relationDs = mainDataSetKey;
|
|
128
126
|
return _params;
|
|
129
127
|
}
|
|
130
128
|
}, onQuery), {}, {
|
|
131
129
|
format: function format(data, res) {
|
|
132
130
|
var formItemData = (0, _objectSpread3.default)({}, (0, _utils.formItemDataFormat)(columns, data));
|
|
133
|
-
if (onQuery
|
|
131
|
+
if (onQuery !== null && onQuery !== void 0 && onQuery.format) return onQuery.format(data, formItemData, res); // 以预设为主
|
|
134
132
|
return formItemData;
|
|
135
133
|
}
|
|
136
134
|
})
|
|
@@ -139,5 +137,4 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
139
137
|
onUpdate: onOperate(onUpdate, 'update')
|
|
140
138
|
}, formConfig), basicItems);
|
|
141
139
|
};
|
|
142
|
-
var _default = (0, _ldBuilder.default)(buildLdAutoForm);
|
|
143
|
-
exports.default = _default;
|
|
140
|
+
var _default = exports.default = (0, _ldBuilder.default)(buildLdAutoForm);
|
|
@@ -143,10 +143,10 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
143
143
|
});
|
|
144
144
|
var Component = (0, _ahooks.useCreation)(function () {
|
|
145
145
|
var _getDvaApp, _getDvaApp2;
|
|
146
|
-
(_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0
|
|
147
|
-
if (!((_getDvaApp2 = (0, _umi.getDvaApp)())
|
|
146
|
+
(_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 || _getDvaApp.unmodel(namespace);
|
|
147
|
+
if (!((_getDvaApp2 = (0, _umi.getDvaApp)()) !== null && _getDvaApp2 !== void 0 && _getDvaApp2._store.getState()[namespace])) {
|
|
148
148
|
var _getDvaApp3;
|
|
149
|
-
(_getDvaApp3 = (0, _umi.getDvaApp)()) === null || _getDvaApp3 === void 0
|
|
149
|
+
(_getDvaApp3 = (0, _umi.getDvaApp)()) === null || _getDvaApp3 === void 0 || _getDvaApp3.model((0, _model.default)(namespace, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
150
150
|
isFlow: !!props.isFlow
|
|
151
151
|
}, overModel), {}, {
|
|
152
152
|
dataSetKey: props.dataSetKey,
|
|
@@ -186,7 +186,6 @@ Index.propTypes = {
|
|
|
186
186
|
// 卡片行为
|
|
187
187
|
cardKey: _propTypes.default.string // 卡片主键
|
|
188
188
|
};
|
|
189
|
-
|
|
190
189
|
Index.defaultProps = {
|
|
191
190
|
resultSet: {},
|
|
192
191
|
suppressInit: false,
|
|
@@ -201,9 +200,8 @@ Index.defaultProps = {
|
|
|
201
200
|
overModel: {},
|
|
202
201
|
cardKey: window.appConfig.constraintKeys.PRIMARY
|
|
203
202
|
};
|
|
204
|
-
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
203
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
205
204
|
return /*#__PURE__*/_react.default.createElement(Index, (0, _extends2.default)({
|
|
206
205
|
wrapperRef: ref
|
|
207
206
|
}, props));
|
|
208
|
-
});
|
|
209
|
-
exports.default = _default;
|
|
207
|
+
});
|
|
File without changes
|
|
@@ -12,11 +12,9 @@ var _antd = require("luck-design/antd");
|
|
|
12
12
|
var _base = require("@luck-design-biz/base");
|
|
13
13
|
var _ldComBuild = require("../../helper/ldComBuild");
|
|
14
14
|
var _excluded = ["options"];
|
|
15
|
-
var LdButton = (0, _ldComBuild.ldComBuilder)(_antd.Button);
|
|
16
|
-
exports.
|
|
17
|
-
var
|
|
18
|
-
exports.LdCollapse = LdCollapse;
|
|
19
|
-
var LdButtonRadio = function LdButtonRadio(_ref) {
|
|
15
|
+
var LdButton = exports.LdButton = (0, _ldComBuild.ldComBuilder)(_antd.Button);
|
|
16
|
+
var LdCollapse = exports.LdCollapse = (0, _ldComBuild.ldComBuilder)(_base.Collapse);
|
|
17
|
+
var LdButtonRadio = exports.LdButtonRadio = function LdButtonRadio(_ref) {
|
|
20
18
|
var _ref$options = _ref.options,
|
|
21
19
|
options = _ref$options === void 0 ? [] : _ref$options,
|
|
22
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -24,12 +22,9 @@ var LdButtonRadio = function LdButtonRadio(_ref) {
|
|
|
24
22
|
options: (0, _ldComBuild.filterOptions)(options)
|
|
25
23
|
}));
|
|
26
24
|
};
|
|
27
|
-
exports.
|
|
28
|
-
var
|
|
29
|
-
exports.LdIconFont = LdIconFont;
|
|
30
|
-
var LdTabs = (0, _ldComBuild.deepFilterCom)(_antd.Tabs, function (child) {
|
|
25
|
+
var LdIconFont = exports.LdIconFont = (0, _ldComBuild.ldComBuilder)(_base.IconFont);
|
|
26
|
+
var LdTabs = exports.LdTabs = (0, _ldComBuild.deepFilterCom)(_antd.Tabs, function (child) {
|
|
31
27
|
var _child$type;
|
|
32
|
-
return (child === null || child === void 0
|
|
28
|
+
return (child === null || child === void 0 || (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'TabPane';
|
|
33
29
|
});
|
|
34
|
-
exports.LdTabs = LdTabs;
|
|
35
30
|
LdTabs.TabPane = _antd.Tabs.TabPane;
|