@luck-design-biz/luckda 0.0.24-1 → 0.0.24-3
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 +0 -0
- package/README.md +0 -0
- package/es/components/Builder/index.js +24 -17
- package/es/components/LdAutoForm/index.js +15 -5
- 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 +4 -1
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +13 -7
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +12 -4
- package/es/components/LdGridForm/index.less +0 -0
- package/es/components/LdInfoPanel/index.js +0 -0
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +0 -0
- package/es/components/LdTree/index.js +0 -0
- package/es/components/LdTree/index.less +0 -0
- package/es/helper/FromItems.js +0 -0
- package/es/helper/action.js +0 -0
- package/es/helper/form.js +8 -2
- package/es/helper/index.less +0 -0
- package/es/helper/ldBuilder.js +4 -1
- package/es/helper/ldComBuild.js +0 -0
- package/es/index.js +0 -0
- package/es/lowcode/constants/api-url.js +1 -2
- package/es/lowcode/constants/event-topics.js +1 -14
- package/es/lowcode/constants/index.js +0 -0
- package/es/lowcode/engine/factory/DataFactory.js +0 -0
- package/es/lowcode/engine/meta/button.props.default.json +7 -15
- package/es/lowcode/engine/meta/cardlist.props.default.json +9 -17
- package/es/lowcode/engine/meta/{button.props.json → components/button.json} +103 -121
- package/es/lowcode/engine/meta/{cardlist.props.json → components/card-list.json} +142 -143
- package/es/lowcode/engine/meta/{drawer.props.json → components/drawer.json} +142 -143
- package/es/lowcode/engine/meta/{form.props.json → components/form.json} +115 -116
- package/{lib/lowcode/engine/meta/iframe.props.json → es/lowcode/engine/meta/components/iframe.json} +30 -31
- package/{lib/lowcode/engine/meta/image.props.json → es/lowcode/engine/meta/components/image.json} +112 -113
- package/es/lowcode/engine/meta/{imex.props.json → components/imex.json} +80 -81
- package/es/lowcode/engine/meta/{jsx.props.json → components/jsx.json} +23 -24
- package/{lib/lowcode/engine/meta/layout.props.json → es/lowcode/engine/meta/components/layout.json} +106 -107
- package/{lib/lowcode/engine/meta/link.props.json → es/lowcode/engine/meta/components/link.json} +110 -111
- package/{lib/lowcode/engine/meta/dialog.props.json → es/lowcode/engine/meta/components/modal.json} +119 -120
- package/{lib/lowcode/engine/meta/section.props.json → es/lowcode/engine/meta/components/section.json} +106 -107
- package/es/lowcode/engine/meta/{split.props.json → components/split.json} +70 -71
- package/es/lowcode/{view/lc-components/CardList/meta.json → engine/meta/components/table.json} +28 -11
- package/{lib/lowcode/engine/meta/tabs.props.json → es/lowcode/engine/meta/components/tabs.json} +139 -140
- package/{lib/lowcode/engine/meta/text.props.json → es/lowcode/engine/meta/components/text.json} +64 -65
- package/es/lowcode/engine/meta/{tree.props.json → components/tree.json} +155 -156
- package/es/lowcode/engine/meta/components-list.json +121 -127
- package/es/lowcode/engine/meta/drawer.props.default.json +9 -17
- package/es/lowcode/engine/meta/form.props.default.json +4 -12
- package/es/lowcode/engine/meta/iframe.props.default.json +2 -10
- package/es/lowcode/engine/meta/image.props.default.json +7 -15
- package/es/lowcode/engine/meta/imex.props.default.json +3 -11
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -10
- package/es/lowcode/engine/meta/layout.props.default.json +4 -12
- package/es/lowcode/engine/meta/link.props.default.json +5 -13
- package/es/lowcode/engine/meta/modal.props.default.json +11 -0
- package/es/lowcode/engine/meta/section.props.default.json +8 -16
- package/es/lowcode/engine/meta/split.props.default.json +4 -12
- package/es/lowcode/engine/meta/table.props.default.json +9 -11
- package/es/lowcode/engine/meta/tabs.props.default.json +9 -17
- package/es/lowcode/engine/meta/text.props.default.json +3 -11
- package/es/lowcode/engine/meta/tree.props.default.json +8 -16
- package/es/lowcode/engine/provider/ContextProvider.js +17 -10
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/tools/dataProcess.js +5 -80
- package/es/lowcode/engine/tools/helper.js +0 -0
- package/es/lowcode/engine/tools/lcid.js +16 -0
- package/es/lowcode/index.js +0 -0
- package/es/lowcode/painter/Components.js +0 -0
- package/es/lowcode/painter/Design.js +42 -274
- package/es/lowcode/painter/I18n.js +2 -202
- package/es/lowcode/painter/Outline.js +28 -33
- package/es/lowcode/painter/Panel.js +2 -201
- package/es/lowcode/painter/Ribbon.js +55 -61
- package/es/lowcode/painter/components/PanelItem.js +9 -52
- package/es/lowcode/painter/components/RuleInput.js +4 -4
- package/es/lowcode/painter/index.js +1 -27
- package/es/lowcode/painter/panel-section/LayoutRatio.js +49 -56
- package/es/lowcode/painter/panel-section/Radio.js +58 -0
- package/es/lowcode/painter/style/components.less +0 -0
- package/es/lowcode/painter/style/design.less +5 -109
- package/es/lowcode/painter/style/index.less +1 -0
- package/es/lowcode/painter/style/layout-ratio.less +1 -1
- package/es/lowcode/painter/style/outline.less +0 -2
- package/es/lowcode/painter/style/panel-item.less +15 -38
- package/es/lowcode/painter/style/panel.less +0 -137
- package/es/lowcode/painter/style/radio.less +0 -0
- package/es/lowcode/painter/style/ribbon.less +0 -1
- package/es/lowcode/painter/style/rule-input.less +0 -0
- package/es/lowcode/view/Canvas.js +55 -63
- package/es/lowcode/view/Loading.js +0 -0
- package/es/lowcode/view/Page.js +2 -199
- package/es/lowcode/view/index.js +0 -0
- package/es/lowcode/view/lc-components/Box/index.js +5 -22
- package/es/lowcode/view/lc-components/Button/index.js +7 -72
- package/es/lowcode/view/lc-components/CardList/index.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -12
- package/es/lowcode/view/lc-components/Dialog/index.less +0 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +3 -19
- package/es/lowcode/view/lc-components/Form/index.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/es/lowcode/view/lc-components/Image/index.js +0 -0
- package/es/lowcode/view/lc-components/JSX/index.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.js +7 -40
- package/es/lowcode/view/lc-components/Link/index.js +0 -0
- package/es/lowcode/view/lc-components/Section/index.js +0 -0
- package/es/lowcode/view/lc-components/Split/index.js +0 -0
- package/es/lowcode/view/lc-components/Table/index.js +8 -138
- package/es/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/es/lowcode/view/lc-components/Text/index.js +0 -0
- package/es/lowcode/view/lc-components/Tree/index.js +0 -0
- package/es/lowcode/view/lc-components/Wrapper.js +23 -32
- package/es/lowcode/view/style/canvas.less +0 -0
- package/es/lowcode/view/style/loading.less +0 -0
- package/es/lowcode/view/style/page.less +1 -0
- package/es/services.js +24 -7
- package/es/upload/Form/gridForm.js +5 -4
- package/es/upload/Form/index.js +0 -0
- package/es/upload/Form/index.less +0 -0
- package/es/upload/FormItem/index.js +4 -3
- 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 +37 -3
- package/es/utils/grid.js +9 -8
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +22 -15
- package/lib/components/LdAutoForm/index.js +14 -4
- 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 +5 -1
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +11 -3
- package/lib/components/LdGridForm/index.less +0 -0
- package/lib/components/LdInfoPanel/index.js +0 -0
- package/lib/components/LdPop/index.js +0 -0
- package/lib/components/LdRuntimeCom/index.js +0 -0
- package/lib/components/LdTree/index.js +0 -0
- package/lib/components/LdTree/index.less +0 -0
- package/lib/helper/FromItems.js +0 -0
- package/lib/helper/action.js +0 -0
- package/lib/helper/form.js +8 -2
- package/lib/helper/index.less +0 -0
- package/lib/helper/ldBuilder.js +4 -1
- package/lib/helper/ldComBuild.js +0 -0
- package/lib/index.js +0 -0
- package/lib/lowcode/constants/api-url.js +2 -3
- package/lib/lowcode/constants/event-topics.js +2 -15
- package/lib/lowcode/constants/index.js +0 -0
- package/lib/lowcode/engine/factory/DataFactory.js +0 -0
- package/lib/lowcode/engine/meta/button.props.default.json +7 -15
- package/lib/lowcode/engine/meta/cardlist.props.default.json +9 -17
- package/lib/lowcode/engine/meta/{button.props.json → components/button.json} +103 -121
- package/lib/lowcode/engine/meta/{cardlist.props.json → components/card-list.json} +142 -143
- package/lib/lowcode/engine/meta/{drawer.props.json → components/drawer.json} +142 -143
- package/lib/lowcode/engine/meta/{form.props.json → components/form.json} +115 -116
- package/{es/lowcode/engine/meta/iframe.props.json → lib/lowcode/engine/meta/components/iframe.json} +30 -31
- package/{es/lowcode/engine/meta/image.props.json → lib/lowcode/engine/meta/components/image.json} +112 -113
- package/lib/lowcode/engine/meta/{imex.props.json → components/imex.json} +80 -81
- package/lib/lowcode/engine/meta/{jsx.props.json → components/jsx.json} +23 -24
- package/{es/lowcode/engine/meta/layout.props.json → lib/lowcode/engine/meta/components/layout.json} +106 -107
- package/{es/lowcode/engine/meta/link.props.json → lib/lowcode/engine/meta/components/link.json} +110 -111
- package/{es/lowcode/engine/meta/dialog.props.json → lib/lowcode/engine/meta/components/modal.json} +119 -120
- package/{es/lowcode/engine/meta/section.props.json → lib/lowcode/engine/meta/components/section.json} +106 -107
- package/lib/lowcode/engine/meta/{split.props.json → components/split.json} +70 -71
- package/lib/lowcode/{view/lc-components/CardList/meta.json → engine/meta/components/table.json} +28 -11
- package/{es/lowcode/engine/meta/tabs.props.json → lib/lowcode/engine/meta/components/tabs.json} +139 -140
- package/{es/lowcode/engine/meta/text.props.json → lib/lowcode/engine/meta/components/text.json} +64 -65
- package/lib/lowcode/engine/meta/{tree.props.json → components/tree.json} +155 -156
- package/lib/lowcode/engine/meta/components-list.json +121 -127
- package/lib/lowcode/engine/meta/drawer.props.default.json +9 -17
- package/lib/lowcode/engine/meta/form.props.default.json +4 -12
- package/lib/lowcode/engine/meta/iframe.props.default.json +2 -10
- package/lib/lowcode/engine/meta/image.props.default.json +7 -15
- package/lib/lowcode/engine/meta/imex.props.default.json +3 -11
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -10
- package/lib/lowcode/engine/meta/layout.props.default.json +4 -12
- package/lib/lowcode/engine/meta/link.props.default.json +5 -13
- package/lib/lowcode/engine/meta/modal.props.default.json +11 -0
- package/lib/lowcode/engine/meta/section.props.default.json +8 -16
- package/lib/lowcode/engine/meta/split.props.default.json +4 -12
- package/lib/lowcode/engine/meta/table.props.default.json +9 -11
- package/lib/lowcode/engine/meta/tabs.props.default.json +9 -17
- package/lib/lowcode/engine/meta/text.props.default.json +3 -11
- package/lib/lowcode/engine/meta/tree.props.default.json +8 -16
- package/lib/lowcode/engine/provider/ContextProvider.js +16 -9
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/tools/dataProcess.js +5 -81
- package/lib/lowcode/engine/tools/helper.js +0 -0
- package/lib/lowcode/engine/tools/lcid.js +22 -0
- package/lib/lowcode/index.js +0 -0
- package/lib/lowcode/painter/Components.js +0 -0
- package/lib/lowcode/painter/Design.js +40 -271
- package/lib/lowcode/painter/I18n.js +2 -203
- package/lib/lowcode/painter/Outline.js +27 -32
- package/lib/lowcode/painter/Panel.js +2 -201
- package/lib/lowcode/painter/Ribbon.js +64 -63
- package/lib/lowcode/painter/components/PanelItem.js +9 -53
- package/lib/lowcode/painter/components/RuleInput.js +4 -4
- package/lib/lowcode/painter/index.js +1 -29
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +48 -55
- package/lib/lowcode/painter/panel-section/Radio.js +65 -0
- package/lib/lowcode/painter/style/components.less +0 -0
- package/lib/lowcode/painter/style/design.less +5 -109
- package/lib/lowcode/painter/style/index.less +1 -0
- package/lib/lowcode/painter/style/layout-ratio.less +1 -1
- package/lib/lowcode/painter/style/outline.less +0 -2
- package/lib/lowcode/painter/style/panel-item.less +15 -38
- package/lib/lowcode/painter/style/panel.less +0 -137
- package/lib/lowcode/painter/style/radio.less +0 -0
- package/lib/lowcode/painter/style/ribbon.less +0 -1
- package/lib/lowcode/painter/style/rule-input.less +0 -0
- package/lib/lowcode/view/Canvas.js +60 -68
- package/lib/lowcode/view/Loading.js +0 -0
- package/lib/lowcode/view/Page.js +1 -198
- package/lib/lowcode/view/index.js +0 -0
- package/lib/lowcode/view/lc-components/Box/index.js +6 -23
- package/lib/lowcode/view/lc-components/Button/index.js +8 -73
- package/lib/lowcode/view/lc-components/CardList/index.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +0 -11
- package/lib/lowcode/view/lc-components/Dialog/index.less +0 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +2 -18
- package/lib/lowcode/view/lc-components/Form/index.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/lib/lowcode/view/lc-components/Image/index.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +8 -41
- package/lib/lowcode/view/lc-components/Link/index.js +0 -0
- package/lib/lowcode/view/lc-components/Section/index.js +0 -0
- package/lib/lowcode/view/lc-components/Split/index.js +0 -0
- package/lib/lowcode/view/lc-components/Table/index.js +8 -138
- package/lib/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/lib/lowcode/view/lc-components/Text/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +0 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +21 -30
- package/lib/lowcode/view/style/canvas.less +0 -0
- package/lib/lowcode/view/style/loading.less +0 -0
- package/lib/lowcode/view/style/page.less +1 -0
- package/lib/services.js +25 -7
- package/lib/upload/Form/gridForm.js +5 -4
- package/lib/upload/Form/index.js +0 -0
- package/lib/upload/Form/index.less +0 -0
- package/lib/upload/FormItem/index.js +4 -3
- 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 +38 -3
- package/lib/utils/grid.js +11 -10
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +5 -12
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -60
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +0 -50
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -21
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -50
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/index.js +0 -42
- package/es/lowcode/engine/meta/box.props.default.json +0 -12
- package/es/lowcode/engine/meta/box.props.json +0 -42
- package/es/lowcode/engine/meta/dialog.props.default.json +0 -19
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +0 -29
- package/es/lowcode/engine/meta/table.props.json +0 -174
- package/es/lowcode/engine/tools/usePromiseState.js +0 -24
- package/es/lowcode/painter/components/Collapse.js +0 -31
- package/es/lowcode/painter/components/NumberInput.js +0 -93
- package/es/lowcode/painter/components/PopConfirm.js +0 -20
- package/es/lowcode/painter/components/PopForm.js +0 -71
- package/es/lowcode/painter/components/SortBox.js +0 -92
- package/es/lowcode/painter/components/TabEditor.js +0 -88
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +0 -118
- package/es/lowcode/painter/components/code-editor/CssEditor.js +0 -14
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +0 -64
- package/es/lowcode/painter/components/code-editor/JSEditor.js +0 -84
- package/es/lowcode/painter/components/code-editor/index.js +0 -2
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -39
- package/es/lowcode/painter/panel-section/Icon.js +0 -48
- package/es/lowcode/painter/panel-section/IconSelector.js +0 -134
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +0 -292
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -543
- package/es/lowcode/painter/panel-section/StylePanel/Height.js +0 -48
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +0 -64
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +0 -101
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
- package/es/lowcode/painter/panel-section/StylePanel/index.js +0 -12
- package/es/lowcode/painter/panel-section/TabItems.js +0 -237
- package/es/lowcode/painter/services/I18n.js +0 -85
- package/es/lowcode/painter/style/button-type.less +0 -5
- package/es/lowcode/painter/style/collapse.less +0 -21
- package/es/lowcode/painter/style/display.less +0 -17
- package/es/lowcode/painter/style/fullscreen-editor.less +0 -17
- package/es/lowcode/painter/style/icon-selector.less +0 -22
- package/es/lowcode/painter/style/icon.less +0 -11
- package/es/lowcode/painter/style/number-input.less +0 -17
- package/es/lowcode/painter/style/pop-confirm.less +0 -10
- package/es/lowcode/painter/style/pop-form.less +0 -20
- package/es/lowcode/painter/style/style-panel.less +0 -5
- package/es/lowcode/painter/style/tabeditor.less +0 -90
- package/es/lowcode/painter/style/tabitems.less +0 -90
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -20
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Box/index.less +0 -15
- package/es/lowcode/view/lc-components/Box/meta.json +0 -42
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +0 -21
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Button/meta.json +0 -122
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -121
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -144
- package/es/lowcode/view/lc-components/Drawer/style.less +0 -7
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Form/meta.json +0 -117
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Iframe/meta.json +0 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/ImEx/meta.json +0 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Image/meta.json +0 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/JSX/meta.json +0 -25
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -75
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +0 -15
- package/es/lowcode/view/lc-components/Layout/index.less +0 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +0 -108
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Link/meta.json +0 -112
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Section/meta.json +0 -108
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Split/meta.json +0 -72
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +0 -16
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Table/meta.json +0 -174
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -141
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Text/meta.json +0 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Tree/meta.json +0 -157
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -73
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +0 -56
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -27
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -56
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +0 -48
- package/lib/lowcode/engine/meta/box.props.default.json +0 -12
- package/lib/lowcode/engine/meta/box.props.json +0 -42
- package/lib/lowcode/engine/meta/dialog.props.default.json +0 -19
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +0 -29
- package/lib/lowcode/engine/meta/table.props.json +0 -174
- package/lib/lowcode/engine/tools/usePromiseState.js +0 -31
- package/lib/lowcode/painter/components/Collapse.js +0 -39
- package/lib/lowcode/painter/components/NumberInput.js +0 -101
- package/lib/lowcode/painter/components/PopConfirm.js +0 -26
- package/lib/lowcode/painter/components/PopForm.js +0 -77
- package/lib/lowcode/painter/components/SortBox.js +0 -99
- package/lib/lowcode/painter/components/TabEditor.js +0 -94
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +0 -126
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +0 -22
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +0 -72
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +0 -95
- package/lib/lowcode/painter/components/code-editor/index.js +0 -20
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -46
- package/lib/lowcode/painter/panel-section/Icon.js +0 -54
- package/lib/lowcode/painter/panel-section/IconSelector.js +0 -141
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +0 -299
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -550
- package/lib/lowcode/painter/panel-section/StylePanel/Height.js +0 -55
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +0 -72
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +0 -112
- package/lib/lowcode/painter/panel-section/StylePanel/Width.js +0 -55
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +0 -19
- package/lib/lowcode/painter/panel-section/TabItems.js +0 -245
- package/lib/lowcode/painter/services/I18n.js +0 -95
- package/lib/lowcode/painter/style/button-type.less +0 -5
- package/lib/lowcode/painter/style/collapse.less +0 -21
- package/lib/lowcode/painter/style/display.less +0 -17
- package/lib/lowcode/painter/style/fullscreen-editor.less +0 -17
- package/lib/lowcode/painter/style/icon-selector.less +0 -22
- package/lib/lowcode/painter/style/icon.less +0 -11
- package/lib/lowcode/painter/style/number-input.less +0 -17
- package/lib/lowcode/painter/style/pop-confirm.less +0 -10
- package/lib/lowcode/painter/style/pop-form.less +0 -20
- package/lib/lowcode/painter/style/style-panel.less +0 -5
- package/lib/lowcode/painter/style/tabeditor.less +0 -90
- package/lib/lowcode/painter/style/tabitems.less +0 -90
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -27
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Box/index.less +0 -15
- package/lib/lowcode/view/lc-components/Box/meta.json +0 -42
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +0 -28
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Button/meta.json +0 -122
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -121
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -144
- package/lib/lowcode/view/lc-components/Drawer/style.less +0 -7
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Form/meta.json +0 -117
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Iframe/meta.json +0 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/ImEx/meta.json +0 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Image/meta.json +0 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/JSX/meta.json +0 -25
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -82
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +0 -22
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +0 -108
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Link/meta.json +0 -112
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Section/meta.json +0 -108
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Split/meta.json +0 -72
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +0 -23
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Table/meta.json +0 -174
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -141
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Text/meta.json +0 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Tree/meta.json +0 -157
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["id", "children"];
|
|
2
3
|
import React, { useRef } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
4
|
import { useMemoizedFn } from 'ahooks';
|
|
5
5
|
import Wrapper from "../Wrapper";
|
|
6
|
-
import styles from "./index.less";
|
|
7
|
-
import defaultMeta from "../../../engine/meta/layout.props.default.json";
|
|
8
6
|
var LCLayout = function LCLayout(_ref) {
|
|
9
7
|
var id = _ref.id,
|
|
10
8
|
children = _ref.children,
|
|
11
|
-
|
|
12
|
-
columnSpacing = _ref.columnSpacing,
|
|
13
|
-
lineSpacing = _ref.lineSpacing,
|
|
14
|
-
style = _ref.style;
|
|
9
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
10
|
var ref = useRef();
|
|
16
11
|
var getTargetDom = useMemoizedFn(function () {
|
|
17
12
|
return ref.current;
|
|
@@ -21,37 +16,9 @@ var LCLayout = function LCLayout(_ref) {
|
|
|
21
16
|
getTargetDom: getTargetDom
|
|
22
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
23
18
|
ref: ref,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, children));
|
|
19
|
+
style: {
|
|
20
|
+
padding: 8
|
|
21
|
+
}
|
|
22
|
+
}, "LCLayout-", id, children));
|
|
29
23
|
};
|
|
30
|
-
LCLayout.propTypes = {
|
|
31
|
-
/**
|
|
32
|
-
* @name 唯一标识
|
|
33
|
-
* @type string
|
|
34
|
-
* @disabled true
|
|
35
|
-
*/
|
|
36
|
-
id: PropTypes.string.isRequired,
|
|
37
|
-
/**
|
|
38
|
-
* @name 列比例
|
|
39
|
-
* @type string
|
|
40
|
-
* @default 12:3:9
|
|
41
|
-
*/
|
|
42
|
-
columnRatio: PropTypes.string,
|
|
43
|
-
/**
|
|
44
|
-
* @name 列间距
|
|
45
|
-
* @type number
|
|
46
|
-
* @default 16
|
|
47
|
-
*/
|
|
48
|
-
columnSpacing: PropTypes.number,
|
|
49
|
-
/**
|
|
50
|
-
* @name 行间距
|
|
51
|
-
* @type number
|
|
52
|
-
* @default 8
|
|
53
|
-
*/
|
|
54
|
-
lineSpacing: PropTypes.number
|
|
55
|
-
};
|
|
56
|
-
LCLayout.defaultProps = _objectSpread({}, defaultMeta);
|
|
57
24
|
export default LCLayout;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,153 +1,23 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["id"
|
|
2
|
+
var _excluded = ["id"];
|
|
4
3
|
import React, { useRef } from 'react';
|
|
5
4
|
import { useMemoizedFn } from 'ahooks';
|
|
6
|
-
import { ldModuleBuild, LdGrid } from '@luck-design-biz/luckda';
|
|
7
|
-
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
-
import classNames from 'classnames';
|
|
9
5
|
import Wrapper from "../Wrapper";
|
|
10
6
|
var LCTable = function LCTable(_ref) {
|
|
11
7
|
var id = _ref.id,
|
|
12
|
-
doAction = _ref.doAction,
|
|
13
|
-
className = _ref.className,
|
|
14
|
-
dataset = _ref.dataset,
|
|
15
8
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
9
|
var ref = useRef();
|
|
17
10
|
var getTargetDom = useMemoizedFn(function () {
|
|
18
|
-
return ref.current
|
|
11
|
+
return ref.current;
|
|
19
12
|
});
|
|
20
13
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
21
14
|
id: id,
|
|
22
15
|
getTargetDom: getTargetDom
|
|
23
|
-
}, /*#__PURE__*/React.createElement(
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
24
17
|
ref: ref,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @description 组件唯一key,项目全局唯一
|
|
30
|
-
* @require true
|
|
31
|
-
* @default -
|
|
32
|
-
*/,
|
|
33
|
-
ldId: id
|
|
34
|
-
/**
|
|
35
|
-
* @description 数据集key(可传树形数据集,传树形数据集自动转为树形表格)
|
|
36
|
-
* @require true
|
|
37
|
-
* @default -
|
|
38
|
-
*/,
|
|
39
|
-
dataSetKey: dataset
|
|
40
|
-
/**
|
|
41
|
-
* @description 批量配置项
|
|
42
|
-
* @require false
|
|
43
|
-
* @default -
|
|
44
|
-
*/,
|
|
45
|
-
batchOperations: [{
|
|
46
|
-
key: 'delete',
|
|
47
|
-
title: formatMessage({
|
|
48
|
-
id: 'app.base.operate.delete'
|
|
49
|
-
}),
|
|
50
|
-
resource: 'delete'
|
|
51
|
-
}]
|
|
52
|
-
/**
|
|
53
|
-
* @description 批量操作方法
|
|
54
|
-
* @require false
|
|
55
|
-
* @default -
|
|
56
|
-
*/,
|
|
57
|
-
onBatchOperationsClick: function onBatchOperationsClick(key, selectedRows) {}
|
|
58
|
-
/**
|
|
59
|
-
* @description 同gridList的actionsColumn,getActions的返回值可配置resource
|
|
60
|
-
* @require false
|
|
61
|
-
* @default -
|
|
62
|
-
*/,
|
|
63
|
-
actionsColumn: {
|
|
64
|
-
getActions: function getActions(data) {
|
|
65
|
-
return [{
|
|
66
|
-
title: formatMessage({
|
|
67
|
-
id: 'app.base.operate.update'
|
|
68
|
-
}),
|
|
69
|
-
action: function action() {},
|
|
70
|
-
resource: 'update'
|
|
71
|
-
}, {
|
|
72
|
-
title: formatMessage({
|
|
73
|
-
id: 'app.base.operate.delete'
|
|
74
|
-
}),
|
|
75
|
-
style: {
|
|
76
|
-
color: 'var(--luck-color-danger)'
|
|
77
|
-
},
|
|
78
|
-
action: function action() {},
|
|
79
|
-
resource: 'delete'
|
|
80
|
-
}];
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
rowSelection: "multiple"
|
|
84
|
-
/* ----------------------------其他可用配置开始 !!!不使用请删除!!!------------------------------ */
|
|
85
|
-
/**
|
|
86
|
-
* @description 是否只读
|
|
87
|
-
* @require false
|
|
88
|
-
* @default false
|
|
89
|
-
*/
|
|
90
|
-
// readOnly={false}
|
|
91
|
-
/**
|
|
92
|
-
* @description 抑制初始化自动加载数据
|
|
93
|
-
* @require false
|
|
94
|
-
* @default -
|
|
95
|
-
*/
|
|
96
|
-
// suppressInit={true}
|
|
97
|
-
/**
|
|
98
|
-
* @description 初始化后的回调
|
|
99
|
-
* @require false
|
|
100
|
-
* @default -
|
|
101
|
-
*/
|
|
102
|
-
// afterInit={(res, dispatch, props)=>console.log(res, dispatch, props)}
|
|
103
|
-
/**
|
|
104
|
-
* @description 获取过滤条件
|
|
105
|
-
* @require false
|
|
106
|
-
* @default -
|
|
107
|
-
*/
|
|
108
|
-
// readFilter={(params, filters)=>{}}
|
|
109
|
-
/**
|
|
110
|
-
* @description columns中的字段的覆写
|
|
111
|
-
* @require false
|
|
112
|
-
* @default -
|
|
113
|
-
*/
|
|
114
|
-
// columnsRewrite={[{
|
|
115
|
-
// field:'事例', // 必填,用于匹配覆写元素
|
|
116
|
-
// title:'demo',
|
|
117
|
-
// }]}
|
|
118
|
-
/**
|
|
119
|
-
* @description columns中的字段的完全自定义,优先级大于columnsRewrite
|
|
120
|
-
* @require false
|
|
121
|
-
* @default -
|
|
122
|
-
*/
|
|
123
|
-
// columnsReset={[]}
|
|
124
|
-
/**
|
|
125
|
-
* @description 格式化表格数据
|
|
126
|
-
* @require false
|
|
127
|
-
* @default -
|
|
128
|
-
*/
|
|
129
|
-
// formatDataSource={(list, detail) => list.map(i => ({ ...detail[i], demo: 'test' }))}
|
|
130
|
-
/**
|
|
131
|
-
* @description 同树形表格getDataPath用法,用于构建树形表格层级关系
|
|
132
|
-
* @require false
|
|
133
|
-
* @default data =>data.sidcc?.substring(1, data.sidcc.length - 1).split(‘/‘)
|
|
134
|
-
*/
|
|
135
|
-
// getDataPath={data =>data.sidcc?.substring(1, data.sidcc.length - 1).split(‘/‘)}
|
|
136
|
-
/**
|
|
137
|
-
* @description 复写model参数
|
|
138
|
-
* @require false
|
|
139
|
-
* @default -
|
|
140
|
-
*/
|
|
141
|
-
// overModel={{ unclosableSet: ['ilinkno'] }}
|
|
142
|
-
/**
|
|
143
|
-
* @description 读取数据源后的回调,返回所有接口中所有
|
|
144
|
-
* @require false
|
|
145
|
-
* @default -
|
|
146
|
-
*/
|
|
147
|
-
// afterQuery={(res) => console.log('afterQuery', res)}
|
|
148
|
-
|
|
149
|
-
// ... gridTable组件的其他可用属性
|
|
150
|
-
/* ----------------------------其他可用配置结束 !!!不使用请删除!!!------------------------------ */
|
|
151
|
-
}));
|
|
18
|
+
style: {
|
|
19
|
+
padding: 8
|
|
20
|
+
}
|
|
21
|
+
}, "LCTable-", id));
|
|
152
22
|
};
|
|
153
|
-
export default
|
|
23
|
+
export default LCTable;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { useLatest, useCreation } from 'ahooks';
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
4
3
|
import { useLDContext } from "../../engine/provider/ContextProvider";
|
|
5
|
-
import { findNodeAndParent
|
|
4
|
+
import { findNodeAndParent } from "../../engine/tools/dataProcess";
|
|
6
5
|
import { CELL_CLASS_NAME } from "../../constants";
|
|
7
6
|
var LCWrapper = function LCWrapper(_ref) {
|
|
8
7
|
var id = _ref.id,
|
|
@@ -10,37 +9,29 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
10
9
|
getTargetDom = _ref.getTargetDom,
|
|
11
10
|
api = _ref.api;
|
|
12
11
|
var context = useLDContext();
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
getLevelNodes: function getLevelNodes() {
|
|
20
|
-
return getPathNodesById(_pageData.current, id);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}, []);
|
|
12
|
+
var _apiRef = useRef({
|
|
13
|
+
getSelfAndParentLCData: function getSelfAndParentLCData() {
|
|
14
|
+
return findNodeAndParent(id, context.pageData);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
24
17
|
useEffect(function () {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return api ? _objectSpread(_objectSpread({}, _api), api.current) : _api;
|
|
37
|
-
}
|
|
38
|
-
return Reflect.get(target, property, receiver);
|
|
18
|
+
var dom = getTargetDom();
|
|
19
|
+
if (dom) {
|
|
20
|
+
dom.setAttribute('id', id);
|
|
21
|
+
dom.classList.add(CELL_CLASS_NAME);
|
|
22
|
+
}
|
|
23
|
+
context.register(id, new Proxy({
|
|
24
|
+
dom: dom
|
|
25
|
+
}, {
|
|
26
|
+
get: function get(target, property, receiver) {
|
|
27
|
+
if (property === 'api') {
|
|
28
|
+
return api ? _objectSpread(_objectSpread({}, _apiRef.current), api.current) : _apiRef.current;
|
|
39
29
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
return Reflect.get(target, property, receiver);
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
context.$publisher(context.topics.COMPONENT_MOUNT, {
|
|
34
|
+
id: id
|
|
44
35
|
});
|
|
45
36
|
return function () {
|
|
46
37
|
context.unregister(id);
|
|
File without changes
|
|
File without changes
|
package/es/services.js
CHANGED
|
@@ -20,15 +20,32 @@ function _readModlue() {
|
|
|
20
20
|
}));
|
|
21
21
|
return _readModlue.apply(this, arguments);
|
|
22
22
|
}
|
|
23
|
-
export function
|
|
24
|
-
return
|
|
23
|
+
export function readUI(_x2) {
|
|
24
|
+
return _readUI.apply(this, arguments);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function _readUI() {
|
|
27
|
+
_readUI = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(get) {
|
|
28
28
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
29
29
|
while (1) switch (_context2.prev = _context2.next) {
|
|
30
30
|
case 0:
|
|
31
|
-
return _context2.abrupt("return", request("".concat(api.LUCKDA_HOST, "/
|
|
31
|
+
return _context2.abrupt("return", request("".concat(api.LUCKDA_HOST, "/ui/builder/noAuthFetchModuleDataSetUI?").concat(stringify(get))));
|
|
32
|
+
case 1:
|
|
33
|
+
case "end":
|
|
34
|
+
return _context2.stop();
|
|
35
|
+
}
|
|
36
|
+
}, _callee2);
|
|
37
|
+
}));
|
|
38
|
+
return _readUI.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
export function readBehaviorCall(_x3, _x4) {
|
|
41
|
+
return _readBehaviorCall.apply(this, arguments);
|
|
42
|
+
}
|
|
43
|
+
function _readBehaviorCall() {
|
|
44
|
+
_readBehaviorCall = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(get, post) {
|
|
45
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
46
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
return _context3.abrupt("return", request("".concat(api.LUCKDA_HOST, "/to/behavior/call?").concat(stringify(get)), {
|
|
32
49
|
method: 'POST',
|
|
33
50
|
body: post,
|
|
34
51
|
headers: {
|
|
@@ -37,9 +54,9 @@ function _readBehaviorCall() {
|
|
|
37
54
|
}));
|
|
38
55
|
case 1:
|
|
39
56
|
case "end":
|
|
40
|
-
return
|
|
57
|
+
return _context3.stop();
|
|
41
58
|
}
|
|
42
|
-
},
|
|
59
|
+
}, _callee3);
|
|
43
60
|
}));
|
|
44
61
|
return _readBehaviorCall.apply(this, arguments);
|
|
45
62
|
}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["formId", "formRef", "showNote", "operates", "loading", "uploadUrl", "forbiddenTypes", "beforeUpload", "formMode", "onUploadChange", "zipName", "resetActions", "getUrl", "wrapperRef"];
|
|
5
|
+
var _excluded = ["formId", "formRef", "showNote", "operates", "loading", "uploadUrl", "supportTypes", "forbiddenTypes", "beforeUpload", "formMode", "onUploadChange", "zipName", "resetActions", "getUrl", "wrapperRef"];
|
|
6
6
|
import React, { useState, useRef, forwardRef } from 'react';
|
|
7
7
|
import { getDvaApp } from 'umi';
|
|
8
8
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
@@ -55,6 +55,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
55
55
|
operates = _ref$operates === void 0 ? ['read', 'add', 'delete', 'download'] : _ref$operates,
|
|
56
56
|
loading = _ref.loading,
|
|
57
57
|
uploadUrl = _ref.uploadUrl,
|
|
58
|
+
supportTypes = _ref.supportTypes,
|
|
58
59
|
_ref$forbiddenTypes = _ref.forbiddenTypes,
|
|
59
60
|
forbiddenTypes = _ref$forbiddenTypes === void 0 ? [] : _ref$forbiddenTypes,
|
|
60
61
|
_beforeUpload = _ref.beforeUpload,
|
|
@@ -78,8 +79,8 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
78
79
|
var _getDvaApp$_store$get = (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.getState().user,
|
|
79
80
|
currentUser = _getDvaApp$_store$get.currentUser;
|
|
80
81
|
var supportUploadTypes = useCreation(function () {
|
|
81
|
-
return getSupportUploadTypes(forbiddenTypes);
|
|
82
|
-
}, [forbiddenTypes]);
|
|
82
|
+
return getSupportUploadTypes(forbiddenTypes, supportTypes);
|
|
83
|
+
}, [forbiddenTypes, supportTypes]);
|
|
83
84
|
|
|
84
85
|
// 下载
|
|
85
86
|
var downloadFile = function downloadFile(filenames, tag) {
|
|
@@ -377,7 +378,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
377
378
|
return _beforeUpload2({
|
|
378
379
|
file: file,
|
|
379
380
|
fileList: fileList,
|
|
380
|
-
|
|
381
|
+
forbiddenTypes: forbiddenTypes,
|
|
381
382
|
beforeUpload: _beforeUpload
|
|
382
383
|
});
|
|
383
384
|
}
|
package/es/upload/Form/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "forbiddenTypes", "children", "dataFormat", "listType"];
|
|
4
|
+
var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "supportTypes", "forbiddenTypes", "children", "dataFormat", "listType"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { BasicFormItem } from 'luck-design';
|
|
7
7
|
import { formatMessage, beforeUpload as _beforeUpload, getSupportUploadTypes } from '@luck-design-biz/base/utils';
|
|
@@ -35,6 +35,7 @@ function buildComponent(props) {
|
|
|
35
35
|
note = _props$note === void 0 ? '' : _props$note,
|
|
36
36
|
_props$config = props.config,
|
|
37
37
|
config = _props$config === void 0 ? {} : _props$config,
|
|
38
|
+
supportTypes = props.supportTypes,
|
|
38
39
|
forbiddenTypes = props.forbiddenTypes,
|
|
39
40
|
children = props.children,
|
|
40
41
|
dataFormat = props.dataFormat,
|
|
@@ -44,8 +45,8 @@ function buildComponent(props) {
|
|
|
44
45
|
return "".concat(window.appConfig.OSS_HOST_V3, "?moduleCode=").concat(moduleCode, "&behaviorKey=").concat(behaviorKey, "&bucket=").concat(bucket, "&tag=").concat(tag, "¬e=").concat(note);
|
|
45
46
|
};
|
|
46
47
|
var supportUploadTypes = useCreation(function () {
|
|
47
|
-
return getSupportUploadTypes(forbiddenTypes);
|
|
48
|
-
}, [forbiddenTypes]);
|
|
48
|
+
return getSupportUploadTypes(forbiddenTypes, supportTypes);
|
|
49
|
+
}, [forbiddenTypes, supportTypes]);
|
|
49
50
|
return /*#__PURE__*/React.createElement(BasicFormItem, _extends({
|
|
50
51
|
extra: "".concat(formatMessage({
|
|
51
52
|
id: 'app.upload.supportUpload',
|
|
File without changes
|
package/es/upload/index.js
CHANGED
|
File without changes
|
package/es/utils/action.js
CHANGED
|
File without changes
|
package/es/utils/form.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -22,6 +23,7 @@ import * as formItemUtils from "../helper/FromItems";
|
|
|
22
23
|
* 根据动态表单配置项生成formItem
|
|
23
24
|
* @param {动态表单配置项} props
|
|
24
25
|
* @param {自定义动态表单配置项} customProps
|
|
26
|
+
* @param {formUi配置项} formUiPreset
|
|
25
27
|
* @returns <BasicForm name='' ... />
|
|
26
28
|
*/
|
|
27
29
|
export function getFormItem() {
|
|
@@ -30,9 +32,10 @@ export function getFormItem() {
|
|
|
30
32
|
property = _ref.property,
|
|
31
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
34
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
35
|
+
var formUiPreset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
33
36
|
if (!property) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
34
37
|
if (property === 'sint' || property === 'number') props.opt_decimal = 0;
|
|
35
|
-
var _translator = translator(props),
|
|
38
|
+
var _translator = translator(_objectSpread(_objectSpread({}, props), formUiPreset)),
|
|
36
39
|
name = _translator.name,
|
|
37
40
|
translateProps = _objectWithoutProperties(_translator, _excluded2);
|
|
38
41
|
var _merge = merge(
|
|
@@ -40,6 +43,7 @@ export function getFormItem() {
|
|
|
40
43
|
translateProps, formatCustomProps(customProps)),
|
|
41
44
|
type = _merge.type,
|
|
42
45
|
_props = _objectWithoutProperties(_merge, _excluded3);
|
|
46
|
+
console.log('getFormItem', translateProps, _props);
|
|
43
47
|
if (customProps.renderBasicFormItem) {
|
|
44
48
|
var com = customProps.renderBasicFormItem(_props);
|
|
45
49
|
var comProps = merge(_props, com.props);
|
|
@@ -189,8 +193,12 @@ export var dataFormat = function dataFormat() {
|
|
|
189
193
|
/**
|
|
190
194
|
*
|
|
191
195
|
* @param formType
|
|
196
|
+
* @param comName
|
|
197
|
+
* @param property
|
|
192
198
|
* @param props
|
|
199
|
+
* @param formItemRewrite
|
|
193
200
|
* @param customProps
|
|
201
|
+
* @param gridUiPreset
|
|
194
202
|
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
195
203
|
*/
|
|
196
204
|
export var getFormColumn = function getFormColumn() {
|
|
@@ -203,9 +211,10 @@ export var getFormColumn = function getFormColumn() {
|
|
|
203
211
|
var _ref5 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
204
212
|
formItemRewrite = _ref5.formItemRewrite,
|
|
205
213
|
customProps = _objectWithoutProperties(_ref5, _excluded7);
|
|
214
|
+
var gridUiPreset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
206
215
|
var formItemType = comName || defaultComName[property];
|
|
207
216
|
if (formItemType === 'radio') formItemType = 'select';
|
|
208
|
-
var _translator2 = translator(props),
|
|
217
|
+
var _translator2 = translator(_objectSpread(_objectSpread({}, props), gridUiPreset)),
|
|
209
218
|
name = _translator2.name,
|
|
210
219
|
translateProps = _objectWithoutProperties(_translator2, _excluded8);
|
|
211
220
|
var _merge2 = merge(
|
|
@@ -216,7 +225,7 @@ export var getFormColumn = function getFormColumn() {
|
|
|
216
225
|
_props = _objectWithoutProperties(_merge2, _excluded9);
|
|
217
226
|
var columnRender = getColumnRender(name, formItemType, _props);
|
|
218
227
|
if (formType !== 'writer') _props.name = name;
|
|
219
|
-
return _objectSpread(_objectSpread({
|
|
228
|
+
return _objectSpread(_objectSpread(_objectSpread({}, _props), {}, {
|
|
220
229
|
title: translateProps.label,
|
|
221
230
|
editable: formType === 'writer' && {
|
|
222
231
|
required: _props.required || ((_props$config = _props.config) === null || _props$config === void 0 ? void 0 : _props$config.required)
|
|
@@ -245,4 +254,29 @@ export var getFormColumn = function getFormColumn() {
|
|
|
245
254
|
},
|
|
246
255
|
field: name
|
|
247
256
|
});
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* 合并两个数组,并且数据顺序以arr2为准
|
|
261
|
+
* @param arr1
|
|
262
|
+
* @param arr2
|
|
263
|
+
* @param rowKey
|
|
264
|
+
*/
|
|
265
|
+
export var mergeAndSort = function mergeAndSort(arr1, arr2, rowKey) {
|
|
266
|
+
// 将a2转换为一个Map,便于快速查找
|
|
267
|
+
var a2Map = new Map(arr2.map(function (item) {
|
|
268
|
+
return [item[rowKey], item];
|
|
269
|
+
}));
|
|
270
|
+
// 创建一个新的数组,按a2的顺序填充元素,同时包含a1中不在a2中的元素
|
|
271
|
+
var mergedArray = arr2.map(function (item) {
|
|
272
|
+
var a1Item = arr1.find(function (a1) {
|
|
273
|
+
return a1[rowKey] === item[rowKey];
|
|
274
|
+
});
|
|
275
|
+
return a1Item ? _objectSpread(_objectSpread({}, item), a1Item) : item;
|
|
276
|
+
});
|
|
277
|
+
// 将a1中未出现在a2中的元素追加到合并后的数组末尾
|
|
278
|
+
mergedArray.push.apply(mergedArray, _toConsumableArray(arr1.filter(function (a1Item) {
|
|
279
|
+
return !a2Map.has(a1Item[rowKey]);
|
|
280
|
+
})));
|
|
281
|
+
return mergedArray;
|
|
248
282
|
};
|
package/es/utils/grid.js
CHANGED
|
@@ -4,9 +4,8 @@ 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 'react';
|
|
8
7
|
import { getDvaApp } from 'umi';
|
|
9
|
-
import { merge, isNil, isArray, includes, capitalize
|
|
8
|
+
import { merge, isNil, isArray, includes, capitalize } from 'lodash';
|
|
10
9
|
import { Switch, Tag } from 'luck-design/antd';
|
|
11
10
|
import moment from 'moment';
|
|
12
11
|
import UploadGridCell from "../upload/GridCell";
|
|
@@ -69,9 +68,9 @@ export function getColumnRender(name, type) {
|
|
|
69
68
|
break;
|
|
70
69
|
case 'region':
|
|
71
70
|
render = function render(text, record) {
|
|
72
|
-
return record["".concat(name, "_virtual")] ||
|
|
71
|
+
return record["".concat(name, "_virtual")] || text ? text.map(function (i) {
|
|
73
72
|
return i.name;
|
|
74
|
-
}).join('/') : undefined
|
|
73
|
+
}).join('/') : undefined;
|
|
75
74
|
};
|
|
76
75
|
break;
|
|
77
76
|
case 'upload':
|
|
@@ -115,11 +114,12 @@ export var getGridColumn = function getGridColumn() {
|
|
|
115
114
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
116
115
|
var isTreeGrid = arguments.length > 2 ? arguments[2] : undefined;
|
|
117
116
|
var writable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
117
|
+
var gridUiPreset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
118
118
|
var _props$isVirtual = props.isVirtual,
|
|
119
119
|
isVirtual = _props$isVirtual === void 0 ? false : _props$isVirtual,
|
|
120
120
|
_props$extra = props.extra,
|
|
121
121
|
extra = _props$extra === void 0 ? {} : _props$extra;
|
|
122
|
-
var _translator = translator(props),
|
|
122
|
+
var _translator = translator(_objectSpread(_objectSpread({}, props), gridUiPreset)),
|
|
123
123
|
name = _translator.name,
|
|
124
124
|
translateProps = _objectWithoutProperties(_translator, _excluded2);
|
|
125
125
|
var _merge = merge(translateProps, formatCustomProps(customProps)),
|
|
@@ -127,11 +127,12 @@ export var getGridColumn = function getGridColumn() {
|
|
|
127
127
|
filterParams = _merge.filterParams,
|
|
128
128
|
_props = _objectWithoutProperties(_merge, _excluded3);
|
|
129
129
|
var _extra = JSON.parse(extra) || {};
|
|
130
|
-
var data = _objectSpread(_objectSpread({
|
|
130
|
+
var data = _objectSpread(_objectSpread({
|
|
131
|
+
headerAlign: getAlign(_extra, 'sheading_alignment_virtual'),
|
|
132
|
+
align: getAlign(_extra, 'scell_alignment_virtual')
|
|
133
|
+
}, _props), {}, {
|
|
131
134
|
field: name,
|
|
132
135
|
title: _props.label,
|
|
133
|
-
headerAlign: getAlign(_extra, 'sheading_alignment_virtual'),
|
|
134
|
-
align: getAlign(_extra, 'scell_alignment_virtual'),
|
|
135
136
|
render: _props.render || getColumnRender(name, comName || defaultComName[property], _props)
|
|
136
137
|
});
|
|
137
138
|
if (isTreeGrid || isVirtual || includes(['user', 'select', 'group', 'switch', 'color', 'region', 'file'], comName || defaultComName[property])) data.sortable = false;
|
package/es/utils/index.js
CHANGED
|
File without changes
|
|
@@ -36,21 +36,28 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
36
36
|
var _useRequest = (0, _ahooks.useRequest)(_services.readModlue, {
|
|
37
37
|
defaultParams: [{
|
|
38
38
|
moduleCode: moduleCode
|
|
39
|
-
}]
|
|
40
|
-
onSuccess: function onSuccess(res) {
|
|
41
|
-
var code = res.code,
|
|
42
|
-
data = res.data;
|
|
43
|
-
if (code === 1) {
|
|
44
|
-
setModuleData({
|
|
45
|
-
actions: data.actions || {},
|
|
46
|
-
dataSets: data.dataSets || {},
|
|
47
|
-
isTree: data.isTree || [],
|
|
48
|
-
resources: data.resources || []
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
39
|
+
}]
|
|
52
40
|
}),
|
|
53
|
-
|
|
41
|
+
loading1 = _useRequest.loading,
|
|
42
|
+
moduleResult = _useRequest.data;
|
|
43
|
+
var _useRequest2 = (0, _ahooks.useRequest)(_services.readUI, {
|
|
44
|
+
defaultParams: [{
|
|
45
|
+
moduleCode: moduleCode
|
|
46
|
+
}]
|
|
47
|
+
}),
|
|
48
|
+
loading2 = _useRequest2.loading,
|
|
49
|
+
uiResult = _useRequest2.data;
|
|
50
|
+
(0, _react.useEffect)(function () {
|
|
51
|
+
if (!loading1 && !loading2 && (moduleResult === null || moduleResult === void 0 ? void 0 : moduleResult.code) === 1 && (uiResult === null || uiResult === void 0 ? void 0 : uiResult.code) === 1) {
|
|
52
|
+
setModuleData({
|
|
53
|
+
actions: moduleResult.data.actions || {},
|
|
54
|
+
dataSets: moduleResult.data.dataSets || {},
|
|
55
|
+
isTree: moduleResult.data.isTree || [],
|
|
56
|
+
resources: moduleResult.data.resources || [],
|
|
57
|
+
moduleUiList: uiResult.data.moduleUiList || {}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}, [loading1, loading2, moduleResult, uiResult]);
|
|
54
61
|
var openPop = (0, _ahooks.useMemoizedFn)(function (ldId, params) {
|
|
55
62
|
setPops(function (prev) {
|
|
56
63
|
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, prev), {}, (0, _defineProperty2.default)({}, ldId, (0, _objectSpread4.default)((0, _objectSpread4.default)({}, prev[ldId]), params)));
|
|
@@ -100,7 +107,7 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
100
107
|
var _props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
101
108
|
fieldProps.current = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, fieldProps.current), _props);
|
|
102
109
|
};
|
|
103
|
-
if (
|
|
110
|
+
if (loading1 || loading2) return null;
|
|
104
111
|
if (!moduleData) return (0, _utils.formatMessage)({
|
|
105
112
|
id: 'luckda.module.loadFailed',
|
|
106
113
|
label: '模块信息加载失败'
|