@luck-design-biz/luckda 1.0.1-9 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/LDActions/index.less +70 -68
- package/es/components/LdCard/index.js +154 -67
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +14 -8
- package/es/components/LdTree/index.less +42 -40
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +1 -1
- package/es/locales/zh-CN.js +10 -4
- package/es/lowcode/constants/api-url.js +87 -87
- package/es/lowcode/constants/index.js +1 -1
- package/es/lowcode/engine/meta/cardlist.props.default.json +27 -7
- package/es/lowcode/engine/meta/cardlist.props.json +254 -73
- package/es/lowcode/engine/meta/components-list.json +30 -0
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +83 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -2
- package/es/lowcode/engine/meta/iframe.props.json +3 -5
- package/es/lowcode/engine/meta/image.props.default.json +3 -3
- package/es/lowcode/engine/meta/image.props.json +51 -17
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +47 -29
- package/es/lowcode/engine/meta/link.props.default.json +1 -2
- package/es/lowcode/engine/meta/link.props.json +9 -10
- package/es/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +2 -2
- package/es/lowcode/engine/provider/ContextProvider/index.js +50 -46
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +82 -2
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/helper.js +21 -0
- package/es/lowcode/painter/Components.js +8 -3
- package/es/lowcode/painter/DesignOperator.js +10 -5
- package/es/lowcode/painter/DesignToolbar.js +78 -47
- package/es/lowcode/painter/Ribbon.js +14 -1
- package/es/lowcode/painter/components/ActionBindModal.js +3 -7
- package/es/lowcode/painter/components/Collapse.js +26 -26
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +144 -37
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +29 -6
- package/es/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/RuleInput.js +30 -30
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +34 -33
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/expect.js +27 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/es/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageVars.js +1 -1
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +3 -2
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/es/lowcode/painter/panel-section/TabItems.js +1 -1
- package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/es/lowcode/painter/style/action-bind-modal.less +104 -102
- package/es/lowcode/painter/style/actions-editor.less +15 -15
- package/es/lowcode/painter/style/border-editor.less +36 -36
- package/es/lowcode/painter/style/border-radius-selector.less +42 -42
- package/es/lowcode/painter/style/border-selector.less +39 -39
- package/es/lowcode/painter/style/button-type.less +5 -5
- package/es/lowcode/painter/style/collapse.less +28 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +91 -91
- package/es/lowcode/painter/style/design.less +179 -166
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +56 -10
- package/es/lowcode/painter/style/fields-setting.less +25 -25
- package/es/lowcode/painter/style/font-editor.less +9 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/es/lowcode/painter/style/icon-selector.less +22 -22
- package/es/lowcode/painter/style/icon.less +10 -10
- package/es/lowcode/painter/style/impexp.less +7 -7
- package/es/lowcode/painter/style/index.less +6 -6
- package/es/lowcode/painter/style/layout-ratio.less +51 -51
- package/es/lowcode/painter/style/list-editor.less +97 -95
- package/es/lowcode/painter/style/number-input.less +19 -17
- package/es/lowcode/painter/style/outline.less +30 -28
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/page-vars.less +25 -25
- package/es/lowcode/painter/style/panel-attrs.less +47 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +100 -98
- package/es/lowcode/painter/style/pop-confirm.less +17 -17
- package/es/lowcode/painter/style/pop-form.less +19 -19
- package/es/lowcode/painter/style/radio.less +24 -24
- package/es/lowcode/painter/style/ribbon.less +7 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -18
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/svg/code.svg +3 -0
- package/es/lowcode/painter/svg/expect.svg +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +4 -4
- package/es/lowcode/view/lc-components/Box/index.less +14 -14
- package/es/lowcode/view/lc-components/Box/meta.json +40 -40
- package/es/lowcode/view/lc-components/Button/index.js +33 -33
- package/es/lowcode/view/lc-components/Button/meta.json +127 -127
- package/es/lowcode/view/lc-components/Button/style.less +2 -2
- package/es/lowcode/view/lc-components/CardList/index.js +481 -12
- package/es/lowcode/view/lc-components/CardList/meta.json +335 -154
- package/es/lowcode/view/lc-components/Dialog/index.js +13 -13
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/es/lowcode/view/lc-components/Dialog/meta.json +204 -204
- package/es/lowcode/view/lc-components/Drawer/index.js +13 -13
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -141
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/es/lowcode/view/lc-components/Form/index.js +20 -20
- package/es/lowcode/view/lc-components/Form/meta.json +645 -645
- package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/index.js +212 -0
- package/es/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/es/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
- package/es/lowcode/view/lc-components/Iframe/meta.json +31 -33
- package/es/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/es/lowcode/view/lc-components/Image/index.js +82 -6
- package/es/lowcode/view/lc-components/Image/index.less +27 -0
- package/es/lowcode/view/lc-components/Image/meta.json +149 -115
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/index.js +16 -16
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/es/lowcode/view/lc-components/Link/index.js +53 -5
- package/es/lowcode/view/lc-components/Link/index.less +15 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -113
- package/es/lowcode/view/lc-components/Page/meta.json +61 -61
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -108
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +150 -152
- package/es/lowcode/view/lc-components/Table/meta.json +450 -450
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +40 -4
- package/es/lowcode/view/lc-components/Tabs/index.js +24 -24
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +117 -115
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -98
- package/es/lowcode/view/style/page.less +7 -7
- package/es/upload/FilesWall/index.js +13 -13
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +15 -15
- package/es/utils/form.js +21 -21
- package/lib/components/LDActions/index.less +70 -68
- package/lib/components/LdCard/index.js +153 -66
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +14 -8
- package/lib/components/LdTree/index.less +42 -40
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +2 -2
- package/lib/locales/zh-CN.js +10 -4
- package/lib/lowcode/constants/api-url.js +87 -87
- package/lib/lowcode/constants/index.js +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -7
- package/lib/lowcode/engine/meta/cardlist.props.json +254 -73
- package/lib/lowcode/engine/meta/components-list.json +30 -0
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +83 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -2
- package/lib/lowcode/engine/meta/iframe.props.json +3 -5
- package/lib/lowcode/engine/meta/image.props.default.json +3 -3
- package/lib/lowcode/engine/meta/image.props.json +51 -17
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +47 -29
- package/lib/lowcode/engine/meta/link.props.default.json +1 -2
- package/lib/lowcode/engine/meta/link.props.json +9 -10
- package/lib/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +2 -2
- package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -46
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +83 -3
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/helper.js +22 -0
- package/lib/lowcode/painter/Components.js +8 -3
- package/lib/lowcode/painter/DesignOperator.js +10 -5
- package/lib/lowcode/painter/DesignToolbar.js +78 -47
- package/lib/lowcode/painter/Ribbon.js +14 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +3 -7
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +142 -35
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +27 -4
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/RuleInput.js +30 -30
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +34 -33
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/expect.js +34 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/lib/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageVars.js +1 -1
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +3 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/lib/lowcode/painter/panel-section/TabItems.js +1 -1
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/lib/lowcode/painter/style/action-bind-modal.less +104 -102
- package/lib/lowcode/painter/style/actions-editor.less +15 -15
- package/lib/lowcode/painter/style/border-editor.less +36 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
- package/lib/lowcode/painter/style/border-selector.less +39 -39
- package/lib/lowcode/painter/style/button-type.less +5 -5
- package/lib/lowcode/painter/style/collapse.less +28 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +91 -91
- package/lib/lowcode/painter/style/design.less +179 -166
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +56 -10
- package/lib/lowcode/painter/style/fields-setting.less +25 -25
- package/lib/lowcode/painter/style/font-editor.less +9 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/lib/lowcode/painter/style/icon-selector.less +22 -22
- package/lib/lowcode/painter/style/icon.less +10 -10
- package/lib/lowcode/painter/style/impexp.less +7 -7
- package/lib/lowcode/painter/style/index.less +6 -6
- package/lib/lowcode/painter/style/layout-ratio.less +51 -51
- package/lib/lowcode/painter/style/list-editor.less +97 -95
- package/lib/lowcode/painter/style/number-input.less +19 -17
- package/lib/lowcode/painter/style/outline.less +30 -28
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/page-vars.less +25 -25
- package/lib/lowcode/painter/style/panel-attrs.less +47 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +100 -98
- package/lib/lowcode/painter/style/pop-confirm.less +17 -17
- package/lib/lowcode/painter/style/pop-form.less +19 -19
- package/lib/lowcode/painter/style/radio.less +24 -24
- package/lib/lowcode/painter/style/ribbon.less +7 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -18
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/svg/code.svg +3 -0
- package/lib/lowcode/painter/svg/expect.svg +9 -0
- package/lib/lowcode/view/lc-components/Box/index.js +4 -4
- package/lib/lowcode/view/lc-components/Box/index.less +14 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
- package/lib/lowcode/view/lc-components/Button/index.js +33 -33
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
- package/lib/lowcode/view/lc-components/Button/style.less +2 -2
- package/lib/lowcode/view/lc-components/CardList/index.js +480 -11
- package/lib/lowcode/view/lc-components/CardList/meta.json +335 -154
- package/lib/lowcode/view/lc-components/Dialog/index.js +13 -13
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -204
- package/lib/lowcode/view/lc-components/Drawer/index.js +13 -13
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -141
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/lib/lowcode/view/lc-components/Form/index.js +20 -20
- package/lib/lowcode/view/lc-components/Form/meta.json +645 -645
- package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.js +220 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
- package/lib/lowcode/view/lc-components/Iframe/meta.json +31 -33
- package/lib/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/lib/lowcode/view/lc-components/Image/index.js +80 -4
- package/lib/lowcode/view/lc-components/Image/index.less +27 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +149 -115
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +16 -16
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Link/index.js +52 -4
- package/lib/lowcode/view/lc-components/Link/index.less +15 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -113
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -61
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -108
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +150 -152
- package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +38 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +24 -24
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +116 -114
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -98
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/upload/FilesWall/index.js +13 -13
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +15 -15
- package/lib/utils/form.js +21 -21
- package/lowcode.js +1 -1
- package/package.json +176 -175
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/painter/style/treedragdrop.less +0 -19
- package/lib/lowcode/painter/style/treedragdrop.less +0 -19
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 UmiJS
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 UmiJS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# 微服务 3.0 纯净版
|
|
2
|
-
|
|
3
|
-
luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
|
|
4
|
-
|
|
5
|
-
## 启动
|
|
6
|
-
|
|
7
|
-
安装 `node_modules`:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pnpm install
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## 开始项目
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm start
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## 代码校验
|
|
20
|
-
|
|
21
|
-
本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
|
|
22
|
-
|
|
23
|
-
### 代码规范
|
|
24
|
-
|
|
25
|
-
根据 eslint 校验规范。
|
|
26
|
-
|
|
27
|
-
### commit message 校验
|
|
28
|
-
|
|
29
|
-
commit message 格式:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
💥 feat(模块): 添加了个很棒的功能
|
|
33
|
-
🐛 fix(模块): 修复了一些 bug
|
|
34
|
-
📝 docs(模块): 更新了一下文档
|
|
35
|
-
💄 UI(模块): 修改了一下样式
|
|
36
|
-
🎨 chore(模块): 对脚手架做了些更改
|
|
37
|
-
🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
|
|
38
|
-
🐞 test(模块): 增加、修改测试用例
|
|
39
|
-
🌟 release(3.0.1):url
|
|
40
|
-
```
|
|
1
|
+
# 微服务 3.0 纯净版
|
|
2
|
+
|
|
3
|
+
luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
|
|
4
|
+
|
|
5
|
+
## 启动
|
|
6
|
+
|
|
7
|
+
安装 `node_modules`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 开始项目
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm start
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 代码校验
|
|
20
|
+
|
|
21
|
+
本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
|
|
22
|
+
|
|
23
|
+
### 代码规范
|
|
24
|
+
|
|
25
|
+
根据 eslint 校验规范。
|
|
26
|
+
|
|
27
|
+
### commit message 校验
|
|
28
|
+
|
|
29
|
+
commit message 格式:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
💥 feat(模块): 添加了个很棒的功能
|
|
33
|
+
🐛 fix(模块): 修复了一些 bug
|
|
34
|
+
📝 docs(模块): 更新了一下文档
|
|
35
|
+
💄 UI(模块): 修改了一下样式
|
|
36
|
+
🎨 chore(模块): 对脚手架做了些更改
|
|
37
|
+
🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
|
|
38
|
+
🐞 test(模块): 增加、修改测试用例
|
|
39
|
+
🌟 release(3.0.1):url
|
|
40
|
+
```
|
|
@@ -1,68 +1,70 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
color:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
color:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
3
|
+
@spanDefault: #262626;
|
|
4
|
+
@spanPrimary: var(--ant-primary-color);
|
|
5
|
+
@spanDanger: #ff4d4f;
|
|
6
|
+
@spanDestroy: #820014;
|
|
7
|
+
|
|
8
|
+
.ldActions {
|
|
9
|
+
|
|
10
|
+
button:not(:last-child) {
|
|
11
|
+
margin-right: 4px;
|
|
12
|
+
}
|
|
13
|
+
button:not(:first-child) {
|
|
14
|
+
margin-left: 4px;
|
|
15
|
+
}
|
|
16
|
+
span {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
button.default {
|
|
21
|
+
background-color: @component-background;
|
|
22
|
+
}
|
|
23
|
+
span.default {
|
|
24
|
+
color: @spanDefault;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
button.primary {
|
|
28
|
+
background-color: var(--ant-primary-color);
|
|
29
|
+
border-color: var(--ant-primary-color);
|
|
30
|
+
color: white;
|
|
31
|
+
}
|
|
32
|
+
span.primary {
|
|
33
|
+
color: @spanPrimary;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
button.danger {
|
|
37
|
+
background-color: #ff4d4f;
|
|
38
|
+
border-color: #ff4d4f;
|
|
39
|
+
color: white;
|
|
40
|
+
}
|
|
41
|
+
span.danger {
|
|
42
|
+
color: @spanDanger;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
button.destroy {
|
|
46
|
+
background-color: #820014;
|
|
47
|
+
border-color: #820014;
|
|
48
|
+
color: white;
|
|
49
|
+
}
|
|
50
|
+
span.destroy {
|
|
51
|
+
color: @spanDestroy;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
span.disabled {
|
|
55
|
+
color: #bfbfbf;
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
span.default.menuItem {
|
|
60
|
+
color: @spanDefault;
|
|
61
|
+
}
|
|
62
|
+
span.primary.menuItem {
|
|
63
|
+
color: @spanPrimary;
|
|
64
|
+
}
|
|
65
|
+
span.danger.menuItem {
|
|
66
|
+
color: @spanDanger;
|
|
67
|
+
}
|
|
68
|
+
span.destroy.menuItem {
|
|
69
|
+
color: @spanDestroy;
|
|
70
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
|
|
5
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "loading", "wrapperRef", "hasMore", "list", "detail", "params", "doQuery", "onQuery", "unclosableSet", "formatDataSource", "resultSet", "cardConfig", "maxActionsCount", "cardActions", "onOperationsClick", "readOnly", "batchOperations", "readFilter", "wrapper", "wrapperProps", "draggable", "onDrop", "onMount", "onUnmount"],
|
|
6
7
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery"];
|
|
7
|
-
import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
|
|
8
|
+
import React, { forwardRef, useImperativeHandle, useRef, useEffect, useLayoutEffect } from 'react';
|
|
8
9
|
import { getDvaApp } from 'umi';
|
|
10
|
+
import classNames from 'classnames';
|
|
9
11
|
import PropTypes from 'prop-types';
|
|
10
12
|
import { Icon, Tooltip } from 'luck-design/antd';
|
|
11
13
|
import { ResultSet, PermissionUtil } from 'luck-design';
|
|
@@ -16,37 +18,92 @@ import ldBuilder from "../../helper/ldBuilder";
|
|
|
16
18
|
import { CardList, Card } from '@luck-design-biz/base/List';
|
|
17
19
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
18
20
|
import { build } from '@luck-design-biz/base/Component';
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
actions = _ref.actions,
|
|
23
|
-
doAction = _ref.doAction,
|
|
24
|
-
afterInit = _ref.afterInit,
|
|
25
|
-
namespace = _ref.namespace,
|
|
26
|
-
loading = _ref.loading,
|
|
27
|
-
wrapperRef = _ref.wrapperRef,
|
|
28
|
-
hasMore = _ref.hasMore,
|
|
29
|
-
list = _ref.list,
|
|
30
|
-
detail = _ref.detail,
|
|
31
|
-
params = _ref.params,
|
|
32
|
-
doQuery = _ref.doQuery,
|
|
33
|
-
onQuery = _ref.onQuery,
|
|
34
|
-
unclosableSet = _ref.unclosableSet,
|
|
35
|
-
formatDataSource = _ref.formatDataSource,
|
|
36
|
-
resultSet = _ref.resultSet,
|
|
37
|
-
cardConfig = _ref.cardConfig,
|
|
38
|
-
cardActions = _ref.cardActions,
|
|
21
|
+
var Action = function Action(_ref) {
|
|
22
|
+
var data = _ref.data,
|
|
23
|
+
action = _ref.action,
|
|
39
24
|
onOperationsClick = _ref.onOperationsClick,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
_ref$inPopover = _ref.inPopover,
|
|
26
|
+
inPopover = _ref$inPopover === void 0 ? false : _ref$inPopover;
|
|
27
|
+
var style = _objectSpread({
|
|
28
|
+
fontSize: '18px'
|
|
29
|
+
}, action.style);
|
|
30
|
+
if (action.disabled) style.color = 'var(--luck-color-disabled)';
|
|
31
|
+
if (inPopover) style = _objectSpread(_objectSpread({}, style), {}, {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
cursor: 'pointer'
|
|
34
|
+
});
|
|
35
|
+
if (action.render) return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
style: style
|
|
37
|
+
}, action.render());
|
|
38
|
+
var renderDiv = function renderDiv(_title) {
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
style: style,
|
|
41
|
+
onClick: function onClick(e) {
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
action.onClick ? action.onClick(data, e) : onOperationsClick(action.key, data, e);
|
|
44
|
+
}
|
|
45
|
+
}, action.iconNode ? action.iconNode : /*#__PURE__*/React.createElement(Icon, {
|
|
46
|
+
type: action.icon
|
|
47
|
+
}), _title && /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
style: {
|
|
49
|
+
marginLeft: '4px',
|
|
50
|
+
fontSize: '12px'
|
|
51
|
+
}
|
|
52
|
+
}, _title));
|
|
53
|
+
};
|
|
54
|
+
if (inPopover) return renderDiv(action.title);
|
|
55
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
56
|
+
placement: "top",
|
|
57
|
+
title: action.title
|
|
58
|
+
}, renderDiv());
|
|
59
|
+
};
|
|
60
|
+
var LdCard = function LdCard(_ref2) {
|
|
61
|
+
var columns = _ref2.columns,
|
|
62
|
+
resources = _ref2.resources,
|
|
63
|
+
actions = _ref2.actions,
|
|
64
|
+
doAction = _ref2.doAction,
|
|
65
|
+
afterInit = _ref2.afterInit,
|
|
66
|
+
namespace = _ref2.namespace,
|
|
67
|
+
loading = _ref2.loading,
|
|
68
|
+
wrapperRef = _ref2.wrapperRef,
|
|
69
|
+
hasMore = _ref2.hasMore,
|
|
70
|
+
list = _ref2.list,
|
|
71
|
+
detail = _ref2.detail,
|
|
72
|
+
params = _ref2.params,
|
|
73
|
+
doQuery = _ref2.doQuery,
|
|
74
|
+
onQuery = _ref2.onQuery,
|
|
75
|
+
unclosableSet = _ref2.unclosableSet,
|
|
76
|
+
formatDataSource = _ref2.formatDataSource,
|
|
77
|
+
resultSet = _ref2.resultSet,
|
|
78
|
+
cardConfig = _ref2.cardConfig,
|
|
79
|
+
maxActionsCount = _ref2.maxActionsCount,
|
|
80
|
+
cardActions = _ref2.cardActions,
|
|
81
|
+
onOperationsClick = _ref2.onOperationsClick,
|
|
82
|
+
readOnly = _ref2.readOnly,
|
|
83
|
+
batchOperations = _ref2.batchOperations,
|
|
84
|
+
readFilter = _ref2.readFilter,
|
|
85
|
+
wrapper = _ref2.wrapper,
|
|
86
|
+
wrapperProps = _ref2.wrapperProps,
|
|
87
|
+
draggable = _ref2.draggable,
|
|
88
|
+
onDrop = _ref2.onDrop,
|
|
89
|
+
onMount = _ref2.onMount,
|
|
90
|
+
onUnmount = _ref2.onUnmount,
|
|
91
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
44
92
|
var cardRef = useRef(null);
|
|
45
93
|
useEffect(function () {
|
|
46
94
|
readFilter && readFilter(params);
|
|
47
95
|
}, [params]);
|
|
48
96
|
useImperativeHandle(wrapperRef, function () {
|
|
49
97
|
return _objectSpread(_objectSpread({}, cardRef.current), {}, {
|
|
98
|
+
getProps: function getProps() {
|
|
99
|
+
var _getDvaApp;
|
|
100
|
+
return {
|
|
101
|
+
apiUrl: (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 || (_getDvaApp = _getDvaApp._store.getState()[namespace]) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp.apiUrl,
|
|
102
|
+
filter: {
|
|
103
|
+
params: params
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
},
|
|
50
107
|
onLdQuery: function onLdQuery() {
|
|
51
108
|
var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
52
109
|
doQuery({
|
|
@@ -56,6 +113,14 @@ var LdCard = function LdCard(_ref) {
|
|
|
56
113
|
}
|
|
57
114
|
});
|
|
58
115
|
});
|
|
116
|
+
useLayoutEffect(function () {
|
|
117
|
+
onMount && onMount({
|
|
118
|
+
params: params
|
|
119
|
+
});
|
|
120
|
+
return function () {
|
|
121
|
+
onUnmount && onUnmount();
|
|
122
|
+
};
|
|
123
|
+
}, []);
|
|
59
124
|
var _batchOperations = useCreation(function () {
|
|
60
125
|
return (batchOperations || []).map(function (i) {
|
|
61
126
|
return _objectSpread(_objectSpread({}, i), {}, {
|
|
@@ -66,6 +131,7 @@ var LdCard = function LdCard(_ref) {
|
|
|
66
131
|
var renderCard = useMemoizedFn(function (item) {
|
|
67
132
|
return /*#__PURE__*/React.createElement(Card, _extends({}, cardConfig, {
|
|
68
133
|
dataSource: item,
|
|
134
|
+
showDragHandle: draggable,
|
|
69
135
|
operates: readOnly ? [] : item['__infuse_serial__'] || resources,
|
|
70
136
|
onCardClick: function onCardClick(_item, e) {
|
|
71
137
|
return onOperationsClick && onOperationsClick('read', _item, e);
|
|
@@ -73,33 +139,51 @@ var LdCard = function LdCard(_ref) {
|
|
|
73
139
|
onCardDelete: function onCardDelete(_item, e) {
|
|
74
140
|
return onOperationsClick && onOperationsClick('delete', _item, e);
|
|
75
141
|
},
|
|
76
|
-
actions: PermissionUtil(cardActions.map(function (
|
|
77
|
-
return
|
|
78
|
-
key:
|
|
79
|
-
wanted:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
key: i.key,
|
|
85
|
-
wanted: i.resource || 'virtual',
|
|
86
|
-
placement: "top",
|
|
87
|
-
title: i.title
|
|
88
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
style: {
|
|
90
|
-
fontSize: '18px'
|
|
91
|
-
},
|
|
92
|
-
onClick: function onClick(e) {
|
|
93
|
-
e.stopPropagation();
|
|
94
|
-
i.onClick ? i.onClick(item, e) : onOperationsClick(i.key, item, e);
|
|
95
|
-
}
|
|
96
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
97
|
-
type: i.icon
|
|
98
|
-
})));
|
|
99
|
-
}), readOnly ? [] : [].concat(_toConsumableArray(item['__infuse_serial__'] || resources), ['virtual']))
|
|
142
|
+
actions: PermissionUtil(cardActions.map(function (action) {
|
|
143
|
+
return /*#__PURE__*/React.createElement(Action, {
|
|
144
|
+
key: action.key,
|
|
145
|
+
wanted: action.resource || 'virtual',
|
|
146
|
+
data: item,
|
|
147
|
+
action: action
|
|
148
|
+
});
|
|
149
|
+
}), readOnly ? [] : [].concat(_toConsumableArray(item['__infuse_serial__'] || resources), ['virtual']), false, 'right', maxActionsCount)
|
|
100
150
|
}));
|
|
101
151
|
});
|
|
102
|
-
|
|
152
|
+
var handleDragEnd = useMemoizedFn(function (evt) {
|
|
153
|
+
var oldIndex = evt.oldIndex,
|
|
154
|
+
newIndex = evt.newIndex;
|
|
155
|
+
var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
|
|
156
|
+
var dragNodeProps = detail[list[oldIndex]];
|
|
157
|
+
var targetNodeProps = detail[list[newIndex]];
|
|
158
|
+
if (onDrop) onDrop({
|
|
159
|
+
dragNodeProps: dragNodeProps,
|
|
160
|
+
targetNodeProps: targetNodeProps,
|
|
161
|
+
evt: evt
|
|
162
|
+
});else {
|
|
163
|
+
doAction('drag', {
|
|
164
|
+
get: {
|
|
165
|
+
datasetCode: props.dataSetKey
|
|
166
|
+
},
|
|
167
|
+
post: {
|
|
168
|
+
fromId: dragNodeProps[PRIMARY],
|
|
169
|
+
toId: targetNodeProps[PRIMARY]
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
showConfirm: false,
|
|
173
|
+
callback: function callback(success) {
|
|
174
|
+
return success && doQuery();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
var _ref3 = wrapperProps || {},
|
|
180
|
+
className = _ref3.className,
|
|
181
|
+
_wrapperProps = _ref3._wrapperProps;
|
|
182
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
183
|
+
ref: wrapper
|
|
184
|
+
}, _wrapperProps, {
|
|
185
|
+
className: classNames('luck-card-list', _defineProperty({}, className, !!className))
|
|
186
|
+
}), difference(Object.keys(params), resultSet.invisibleSet || []).length > 0 && /*#__PURE__*/React.createElement(ResultSet, _extends({
|
|
103
187
|
set: params,
|
|
104
188
|
onQuery: onQuery
|
|
105
189
|
}, resultSet, {
|
|
@@ -107,14 +191,16 @@ var LdCard = function LdCard(_ref) {
|
|
|
107
191
|
})), /*#__PURE__*/React.createElement(CardList, _extends({
|
|
108
192
|
col: 4,
|
|
109
193
|
loading: loading,
|
|
110
|
-
renderCard: renderCard
|
|
194
|
+
renderCard: renderCard,
|
|
195
|
+
onDragEnd: handleDragEnd
|
|
111
196
|
}, props, {
|
|
112
197
|
operates: [].concat(_toConsumableArray(resources), ['virtual']),
|
|
113
198
|
modelName: namespace,
|
|
114
199
|
dataSource: formatDataSource(list, detail),
|
|
115
200
|
hasMore: !!hasMore,
|
|
116
201
|
batchOperations: _batchOperations,
|
|
117
|
-
ref: cardRef
|
|
202
|
+
ref: cardRef,
|
|
203
|
+
draggable: draggable
|
|
118
204
|
})));
|
|
119
205
|
};
|
|
120
206
|
var ForwardLdCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
@@ -122,23 +208,23 @@ var ForwardLdCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
122
208
|
wrapperRef: ref
|
|
123
209
|
}, props));
|
|
124
210
|
});
|
|
125
|
-
var LdIndex = function LdIndex(
|
|
126
|
-
var namespace =
|
|
127
|
-
moduleCode =
|
|
128
|
-
suppressInit =
|
|
129
|
-
overModel =
|
|
130
|
-
afterQuery =
|
|
131
|
-
props = _objectWithoutProperties(
|
|
211
|
+
var LdIndex = function LdIndex(_ref4) {
|
|
212
|
+
var namespace = _ref4.ldId,
|
|
213
|
+
moduleCode = _ref4.moduleCode,
|
|
214
|
+
suppressInit = _ref4.suppressInit,
|
|
215
|
+
overModel = _ref4.overModel,
|
|
216
|
+
afterQuery = _ref4.afterQuery,
|
|
217
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
132
218
|
if (includes(props.isTree, props.dataSetKey)) return formatMessage({
|
|
133
219
|
id: 'luckda.ldCard.notTres',
|
|
134
220
|
label: '此数据集为树形数据集,请选择非树形数据集'
|
|
135
221
|
});
|
|
136
222
|
var Component = useCreation(function () {
|
|
137
|
-
var
|
|
138
|
-
(
|
|
139
|
-
if (!((
|
|
140
|
-
var
|
|
141
|
-
(
|
|
223
|
+
var _getDvaApp2, _getDvaApp3;
|
|
224
|
+
(_getDvaApp2 = getDvaApp()) === null || _getDvaApp2 === void 0 || _getDvaApp2.unmodel(namespace);
|
|
225
|
+
if (!((_getDvaApp3 = getDvaApp()) !== null && _getDvaApp3 !== void 0 && _getDvaApp3._store.getState()[namespace])) {
|
|
226
|
+
var _getDvaApp4;
|
|
227
|
+
(_getDvaApp4 = getDvaApp()) === null || _getDvaApp4 === void 0 || _getDvaApp4.model(createModel(namespace, _objectSpread(_objectSpread({
|
|
142
228
|
isFlow: !!props.isFlow
|
|
143
229
|
}, overModel), {}, {
|
|
144
230
|
dataSetKey: props.dataSetKey,
|
|
@@ -190,7 +276,8 @@ Index.defaultProps = {
|
|
|
190
276
|
},
|
|
191
277
|
cardActions: [],
|
|
192
278
|
overModel: {},
|
|
193
|
-
cardKey: window.appConfig.constraintKeys.PRIMARY
|
|
279
|
+
cardKey: window.appConfig.constraintKeys.PRIMARY,
|
|
280
|
+
maxActionsCount: 3
|
|
194
281
|
};
|
|
195
282
|
export default /*#__PURE__*/forwardRef(function (props, ref) {
|
|
196
283
|
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
@@ -93,10 +93,10 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
93
93
|
});
|
|
94
94
|
}, [batchOperations]);
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* 优先级
|
|
98
|
-
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
99
|
-
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
96
|
+
/**
|
|
97
|
+
* 优先级
|
|
98
|
+
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
99
|
+
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
100
100
|
*/
|
|
101
101
|
var _columns = useCreation(function () {
|
|
102
102
|
if (columnsReset) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.ldGridForm {
|
|
2
|
-
:global {
|
|
3
|
-
.ag-layout-auto-height {
|
|
4
|
-
height: 100% !important;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
.ldGridForm {
|
|
2
|
+
:global {
|
|
3
|
+
.ag-layout-auto-height {
|
|
4
|
+
height: 100% !important;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
4
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "
|
|
7
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "wrapper", "wrapperProps", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender", "onlyRoot"],
|
|
8
8
|
_excluded2 = ["0"],
|
|
9
9
|
_excluded3 = ["onClick"];
|
|
10
10
|
import React, { useState, useRef, useImperativeHandle, forwardRef, useLayoutEffect } from 'react';
|
|
@@ -16,7 +16,7 @@ import { Icon, Popover } from 'luck-design/antd';
|
|
|
16
16
|
import { LuckTree } from 'luck-design';
|
|
17
17
|
import { formatMessage, dataToTree, dragTreeData } from '@luck-design-biz/base/utils';
|
|
18
18
|
import { TreeBox } from '@luck-design-biz/base';
|
|
19
|
-
import ldBuilder from "../../helper/ldBuilder";
|
|
19
|
+
import ldBuilder, { ErrorWrapper } from "../../helper/ldBuilder";
|
|
20
20
|
import { behaviorCall } from "../../utils";
|
|
21
21
|
import styles from "./index.less";
|
|
22
22
|
var _window$appConfig$con = window.appConfig.constraintKeys,
|
|
@@ -59,7 +59,8 @@ var LdTree = function LdTree(_ref) {
|
|
|
59
59
|
isTree = _ref.isTree,
|
|
60
60
|
service = _ref.service,
|
|
61
61
|
dataToTreeFormat = _ref.dataToTreeFormat,
|
|
62
|
-
|
|
62
|
+
wrapper = _ref.wrapper,
|
|
63
|
+
wrapperProps = _ref.wrapperProps,
|
|
63
64
|
doubleClickExpand = _ref.doubleClickExpand,
|
|
64
65
|
onNodeDoubleClick = _ref.onNodeDoubleClick,
|
|
65
66
|
width = _ref.width,
|
|
@@ -76,10 +77,14 @@ var LdTree = function LdTree(_ref) {
|
|
|
76
77
|
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
77
78
|
onlyRoot = _ref.onlyRoot,
|
|
78
79
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
79
|
-
if (!includes(isTree, dataSetKey)) return
|
|
80
|
+
if (!includes(isTree, dataSetKey)) return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
81
|
+
ref: wrapper,
|
|
82
|
+
className: className,
|
|
83
|
+
style: props.style
|
|
84
|
+
}, formatMessage({
|
|
80
85
|
id: 'luckda.ldTree.notTrees',
|
|
81
86
|
label: '此数据集非树形数据集,请选择树形数据集'
|
|
82
|
-
});
|
|
87
|
+
}));
|
|
83
88
|
var _useState = useState(null),
|
|
84
89
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85
90
|
dataSource = _useState2[0],
|
|
@@ -319,19 +324,20 @@ var LdTree = function LdTree(_ref) {
|
|
|
319
324
|
loadData: onLoadData
|
|
320
325
|
} : {};
|
|
321
326
|
}, []);
|
|
322
|
-
return /*#__PURE__*/React.createElement(TreeBox, {
|
|
327
|
+
return /*#__PURE__*/React.createElement(TreeBox, _extends({
|
|
323
328
|
suppressTitle: !title,
|
|
324
329
|
title: title,
|
|
325
330
|
loading: loading,
|
|
326
331
|
id: ldId,
|
|
327
332
|
onAdd: onAdd,
|
|
328
333
|
className: className,
|
|
329
|
-
ref:
|
|
334
|
+
ref: wrapper
|
|
335
|
+
}, wrapperProps, {
|
|
330
336
|
style: {
|
|
331
337
|
width: width,
|
|
332
338
|
height: height
|
|
333
339
|
}
|
|
334
|
-
}, dataSource && /*#__PURE__*/React.createElement(LuckTree, _extends({
|
|
340
|
+
}), dataSource && /*#__PURE__*/React.createElement(LuckTree, _extends({
|
|
335
341
|
blockNode: true,
|
|
336
342
|
className: classNames(styles.tree, _defineProperty({}, className, !!treeClassName)),
|
|
337
343
|
draggable: !readOnly && draggable,
|