@luck-design-biz/luckda 1.0.1 → 1.0.2-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/LdAutoForm/index.js +2 -1
- package/es/components/LdCard/index.js +154 -67
- package/es/components/LdFormList/index.js +20 -6
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.js +40 -24
- 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 +13 -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 -6
- package/es/lowcode/engine/meta/cardlist.props.json +254 -72
- package/es/lowcode/engine/meta/components-list.json +12 -108
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +74 -18
- package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/es/lowcode/engine/meta/drawer.props.json +144 -24
- package/es/lowcode/engine/meta/form.props.default.json +14 -3
- package/es/lowcode/engine/meta/form.props.json +49 -9
- 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 -1
- package/es/lowcode/engine/meta/iframe.props.json +3 -4
- package/es/lowcode/engine/meta/image.props.default.json +3 -2
- package/es/lowcode/engine/meta/image.props.json +51 -16
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +49 -31
- package/es/lowcode/engine/meta/link.props.default.json +1 -1
- package/es/lowcode/engine/meta/link.props.json +9 -9
- package/es/lowcode/engine/meta/table.props.json +1 -1
- 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/engine/tools/useCanvasRender.js +13 -1
- package/es/lowcode/painter/Components.js +8 -3
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +25 -15
- 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/AdvancePanel.js +11 -4
- 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 +29 -29
- 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 +38 -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/components/field-setting/SettingUI.js +30 -2
- package/es/lowcode/painter/components/field-setting/index.js +26 -12
- 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/FieldState.js +11 -2
- package/es/lowcode/painter/panel-section/FieldsSetting.js +2 -2
- 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 +10 -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/panel-section/TableZebra.js +5 -1
- package/es/lowcode/painter/panel-section/TextContent.js +10 -2
- 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 -160
- 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 -153
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
- package/es/lowcode/view/lc-components/Dialog/index.js +28 -18
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/es/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
- package/es/lowcode/view/lc-components/Drawer/index.js +149 -34
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -131
- 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/FunctionDesign.js +2 -1
- package/es/lowcode/view/lc-components/Form/index.js +65 -48
- package/es/lowcode/view/lc-components/Form/meta.json +645 -609
- 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 -32
- 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 -114
- 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 -112
- 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 +152 -153
- 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/es/utils/grid.js +3 -3
- package/lib/components/LDActions/index.less +70 -68
- package/lib/components/LdAutoForm/index.js +2 -1
- package/lib/components/LdCard/index.js +153 -66
- package/lib/components/LdFormList/index.js +19 -5
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.js +40 -24
- 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 +13 -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 -6
- package/lib/lowcode/engine/meta/cardlist.props.json +254 -72
- package/lib/lowcode/engine/meta/components-list.json +12 -108
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +74 -18
- package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/lib/lowcode/engine/meta/drawer.props.json +144 -24
- package/lib/lowcode/engine/meta/form.props.default.json +14 -3
- package/lib/lowcode/engine/meta/form.props.json +49 -9
- 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 -1
- package/lib/lowcode/engine/meta/iframe.props.json +3 -4
- package/lib/lowcode/engine/meta/image.props.default.json +3 -2
- package/lib/lowcode/engine/meta/image.props.json +51 -16
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +49 -31
- package/lib/lowcode/engine/meta/link.props.default.json +1 -1
- package/lib/lowcode/engine/meta/link.props.json +9 -9
- package/lib/lowcode/engine/meta/table.props.json +1 -1
- 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/engine/tools/useCanvasRender.js +13 -1
- package/lib/lowcode/painter/Components.js +8 -3
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +25 -15
- 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/AdvancePanel.js +10 -3
- 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 +29 -29
- 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 +38 -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/components/field-setting/SettingUI.js +29 -1
- package/lib/lowcode/painter/components/field-setting/index.js +26 -12
- 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/FieldState.js +11 -2
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +2 -2
- 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 +10 -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/panel-section/TableZebra.js +5 -1
- package/lib/lowcode/painter/panel-section/TextContent.js +9 -1
- 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 -160
- 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 -153
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +28 -18
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
- package/lib/lowcode/view/lc-components/Drawer/index.js +148 -33
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -131
- 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/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Form/index.js +64 -47
- package/lib/lowcode/view/lc-components/Form/meta.json +645 -609
- 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 -32
- 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 -114
- 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 -112
- 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 +152 -153
- 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/lib/utils/grid.js +2 -2
- 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/es/lowcode/view/lc-components/Form/index.less +0 -5
- package/lib/lowcode/painter/style/treedragdrop.less +0 -19
- package/lib/lowcode/view/lc-components/Form/index.less +0 -5
|
@@ -1,150 +1,204 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "Dialog",
|
|
3
|
-
"name": "对话框",
|
|
4
|
-
"desc": "需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Modal 在当前页面正中打开一个浮层,承载相应的操作。",
|
|
5
|
-
"icon": "icon-dialog",
|
|
6
|
-
"group": "basic",
|
|
7
|
-
"groupName": "基础",
|
|
8
|
-
"order": 1,
|
|
9
|
-
"props": [
|
|
10
|
-
{
|
|
11
|
-
"key": "id",
|
|
12
|
-
"name": "唯一标识",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"disabled": true
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"key": "title",
|
|
18
|
-
"name": "标题",
|
|
19
|
-
"desc": "对话框左上角的标题",
|
|
20
|
-
"type": "_I18nInput",
|
|
21
|
-
"default": "对话框"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"key": "width",
|
|
25
|
-
"name": "对话框宽度",
|
|
26
|
-
"type": "_WidthHeight",
|
|
27
|
-
"options": [
|
|
28
|
-
{
|
|
29
|
-
"label": "px",
|
|
30
|
-
"value": "px"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"label": "%",
|
|
34
|
-
"value": "%"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"label": "vw",
|
|
38
|
-
"value": "vw"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"label": "A",
|
|
42
|
-
"value": "auto"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"default": "700px"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"key": "height",
|
|
49
|
-
"name": "内容区高度",
|
|
50
|
-
"type": "_WidthHeight",
|
|
51
|
-
"options": [
|
|
52
|
-
{
|
|
53
|
-
"label": "px",
|
|
54
|
-
"value": "px"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"label": "vh",
|
|
58
|
-
"value": "vh"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"label": "A",
|
|
62
|
-
"value": "auto"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"default": "50vh"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"key": "
|
|
69
|
-
"name": "
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
1
|
+
{
|
|
2
|
+
"component": "Dialog",
|
|
3
|
+
"name": "对话框",
|
|
4
|
+
"desc": "需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Modal 在当前页面正中打开一个浮层,承载相应的操作。",
|
|
5
|
+
"icon": "icon-dialog",
|
|
6
|
+
"group": "basic",
|
|
7
|
+
"groupName": "基础",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "id",
|
|
12
|
+
"name": "唯一标识",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"disabled": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "title",
|
|
18
|
+
"name": "标题",
|
|
19
|
+
"desc": "对话框左上角的标题",
|
|
20
|
+
"type": "_I18nInput",
|
|
21
|
+
"default": "对话框"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "width",
|
|
25
|
+
"name": "对话框宽度",
|
|
26
|
+
"type": "_WidthHeight",
|
|
27
|
+
"options": [
|
|
28
|
+
{
|
|
29
|
+
"label": "px",
|
|
30
|
+
"value": "px"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "%",
|
|
34
|
+
"value": "%"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"label": "vw",
|
|
38
|
+
"value": "vw"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"label": "A",
|
|
42
|
+
"value": "auto"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"default": "700px"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "height",
|
|
49
|
+
"name": "内容区高度",
|
|
50
|
+
"type": "_WidthHeight",
|
|
51
|
+
"options": [
|
|
52
|
+
{
|
|
53
|
+
"label": "px",
|
|
54
|
+
"value": "px"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"label": "vh",
|
|
58
|
+
"value": "vh"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"label": "A",
|
|
62
|
+
"value": "auto"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"default": "50vh"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"key": "padding",
|
|
69
|
+
"name": "内边距",
|
|
70
|
+
"type": "select",
|
|
71
|
+
"options": [
|
|
72
|
+
{
|
|
73
|
+
"label": "大(24px)",
|
|
74
|
+
"value": 24
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"label": "中(16px)",
|
|
78
|
+
"value": 16
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"label": "小(8px)",
|
|
82
|
+
"value": 8
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"label": "无(0px)",
|
|
86
|
+
"value": 0
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"default": 16
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"key": "defaultOpen",
|
|
93
|
+
"name": "默认显示",
|
|
94
|
+
"desc": "默认是否显示",
|
|
95
|
+
"type": "switch",
|
|
96
|
+
"default": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"key": "mask",
|
|
100
|
+
"name": "显示遮罩",
|
|
101
|
+
"type": "switch",
|
|
102
|
+
"default": true
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"key": "closable",
|
|
106
|
+
"name": "关闭按钮",
|
|
107
|
+
"desc": "是否显示右上角的关闭按钮",
|
|
108
|
+
"type": "switch",
|
|
109
|
+
"default": true
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"key": "destroyOnClose",
|
|
113
|
+
"name": "关闭销毁",
|
|
114
|
+
"desc": "关闭时销毁对话框里的子元素",
|
|
115
|
+
"type": "switch",
|
|
116
|
+
"default": true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"key": "closeType",
|
|
120
|
+
"name": "关闭方式",
|
|
121
|
+
"type": "checkbox",
|
|
122
|
+
"options": [
|
|
123
|
+
{
|
|
124
|
+
"label": "点击遮罩",
|
|
125
|
+
"value": "maskClosable"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"label": "ESC",
|
|
129
|
+
"value": "keyboard"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"defaultValue": ["maskClosable"]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"key": "footerSetting",
|
|
136
|
+
"name": "底部按钮配置",
|
|
137
|
+
"type": "group",
|
|
138
|
+
"props": [
|
|
139
|
+
{
|
|
140
|
+
"key": "footer",
|
|
141
|
+
"name": "显示footer",
|
|
142
|
+
"desc": "是否显示底部按钮区域",
|
|
143
|
+
"type": "switch",
|
|
144
|
+
"default": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"key": "okText",
|
|
148
|
+
"name": "确认文字",
|
|
149
|
+
"type": "_I18nInput",
|
|
150
|
+
"default": "确定"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"key": "cancelText",
|
|
154
|
+
"name": "取消文字",
|
|
155
|
+
"type": "_I18nInput",
|
|
156
|
+
"default": "取消"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"key": "btnGroup",
|
|
162
|
+
"name": "按钮组",
|
|
163
|
+
"desc": "底部按钮区域的按钮组",
|
|
164
|
+
"type": "_ActionsEditor",
|
|
165
|
+
"default": { "display": "button", "max": 2, "moreText": "操作", "todoList": [] },
|
|
166
|
+
"wrapper": "collapse",
|
|
167
|
+
"wrapperProps": { "suppressIcon": true }
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"advance": {
|
|
171
|
+
"events": [
|
|
172
|
+
{
|
|
173
|
+
"key": "onMount",
|
|
174
|
+
"name": "组件首次渲染时",
|
|
175
|
+
"desc": "在组件首次渲染时,执行方法",
|
|
176
|
+
"func": "function onMount() {\n\t\n}"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"key": "onUnmount",
|
|
180
|
+
"name": "组件卸载时",
|
|
181
|
+
"desc": "在组件卸载时,执行方法。",
|
|
182
|
+
"func": "function onUnmount() {\n\t\n}"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "onOpen",
|
|
186
|
+
"name": "对话框打开时",
|
|
187
|
+
"desc": "在对话框打开时,执行方法",
|
|
188
|
+
"func": "function onOpen() {\n\t\n}"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"key": "onClose",
|
|
192
|
+
"name": "对话框关闭时",
|
|
193
|
+
"desc": "在对话框关闭时,执行方法",
|
|
194
|
+
"func": "function onClose() {\n\t\n}"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"key": "onOk",
|
|
198
|
+
"name": "确定按钮点击",
|
|
199
|
+
"desc": "点击确定按钮时,执行方法,return为Promose对象时会自动追加loading状态",
|
|
200
|
+
"func": "function onOk() {\n\t\n}"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -1,30 +1,74 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react =
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
12
15
|
var _index = _interopRequireDefault(require("./index"));
|
|
13
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var
|
|
15
|
-
var
|
|
17
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
18
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
19
|
+
require("./index.less");
|
|
20
|
+
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
21
|
+
var _excluded = ["id", "children", "className", "defaultOpen"];
|
|
16
22
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
17
|
-
var
|
|
23
|
+
var id = _ref.id,
|
|
24
|
+
children = _ref.children,
|
|
18
25
|
className = _ref.className,
|
|
19
|
-
|
|
26
|
+
defaultOpen = _ref.defaultOpen,
|
|
20
27
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
var apiRef = (0, _react.useRef)();
|
|
29
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
30
|
+
(0, _react.useImperativeHandle)(apiRef, function () {
|
|
31
|
+
return {
|
|
32
|
+
doOpen: function doOpen() {
|
|
33
|
+
var _self = ctx.componentMap.get(id).api.getSelfDom();
|
|
34
|
+
_self.closest('#design-workspace').style.overflow = 'hidden';
|
|
35
|
+
_self.closest('.ant-drawer').style.display = 'block';
|
|
36
|
+
},
|
|
37
|
+
doClose: function doClose() {
|
|
38
|
+
var _self = ctx.componentMap.get(id).api.getSelfDom();
|
|
39
|
+
_self.closest('#design-workspace').style.overflow = '';
|
|
40
|
+
_self.closest('.ant-drawer').style.display = 'none';
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
(0, _react.useEffect)(function () {
|
|
45
|
+
if (defaultOpen) {
|
|
46
|
+
ctx.componentMap.get(id).api.getSelfDom().closest('#design-workspace').style.overflow = 'hidden';
|
|
47
|
+
}
|
|
48
|
+
}, [defaultOpen]);
|
|
49
|
+
(0, _ahooks.useCreation)(function () {
|
|
50
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
51
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
52
|
+
var compId = _ref2.id;
|
|
53
|
+
if (compId !== id) return;
|
|
54
|
+
(0, _ContextProvider.addNode)(id, "box_".concat((0, _utils.suid)()), (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
55
|
+
buildIn: true
|
|
56
|
+
}));
|
|
57
|
+
}).watch();
|
|
58
|
+
}, []);
|
|
21
59
|
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
22
|
-
|
|
60
|
+
id: id,
|
|
61
|
+
className: (0, _classnames.default)('runtime-design', (0, _defineProperty2.default)({}, className, !!className)),
|
|
23
62
|
getContainer: false,
|
|
24
|
-
show: show,
|
|
25
63
|
style: {
|
|
26
64
|
position: 'absolute'
|
|
27
65
|
}
|
|
28
|
-
}, props
|
|
66
|
+
}, props, {
|
|
67
|
+
$apiRef: apiRef,
|
|
68
|
+
$designProps: {
|
|
69
|
+
visible: true,
|
|
70
|
+
zIndex: 10
|
|
71
|
+
}
|
|
72
|
+
}), children);
|
|
29
73
|
};
|
|
30
74
|
var _default = exports.default = FunctionDesign;
|
|
@@ -1,78 +1,176 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
13
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
16
|
var _ahooks = require("ahooks");
|
|
14
17
|
var _antd = require("luck-design/antd");
|
|
15
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
20
|
+
var _lodash = require("lodash");
|
|
16
21
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
22
|
+
var _index = require("../../../../index");
|
|
23
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
24
|
+
var _usePromiseState5 = _interopRequireDefault(require("../../../engine/tools/usePromiseState"));
|
|
17
25
|
var _helper = require("../../../engine/tools/helper");
|
|
18
26
|
var _drawerPropsDefault = _interopRequireDefault(require("../../../engine/meta/drawer.props.default.json"));
|
|
19
|
-
var
|
|
20
|
-
var
|
|
27
|
+
var _index2 = _interopRequireDefault(require("./index.less"));
|
|
28
|
+
var Footer = _styledComponents.default.div.withConfig({
|
|
29
|
+
displayName: "Footer",
|
|
30
|
+
componentId: "luckda-6530__sc-79l6vu-0"
|
|
31
|
+
})(["position:absolute;right:0;bottom:0;width:100%;display:flex;justify-content:flex-end;border-top:1px solid #e9e9e9;padding:10px 16px;background:#fff;text-align:right;"]);
|
|
21
32
|
var LCDrawer = function LCDrawer(_ref) {
|
|
22
33
|
var id = _ref.id,
|
|
23
34
|
children = _ref.children,
|
|
35
|
+
title = _ref.title,
|
|
36
|
+
width = _ref.width,
|
|
37
|
+
height = _ref.height,
|
|
38
|
+
padding = _ref.padding,
|
|
24
39
|
className = _ref.className,
|
|
25
40
|
getContainer = _ref.getContainer,
|
|
41
|
+
defaultOpen = _ref.defaultOpen,
|
|
42
|
+
mask = _ref.mask,
|
|
43
|
+
closable = _ref.closable,
|
|
26
44
|
style = _ref.style,
|
|
27
|
-
|
|
45
|
+
closeType = _ref.closeType,
|
|
46
|
+
placement = _ref.placement,
|
|
47
|
+
destroyOnClose = _ref.destroyOnClose,
|
|
48
|
+
header = _ref.header,
|
|
49
|
+
footer = _ref.footer,
|
|
50
|
+
okText = _ref.okText,
|
|
51
|
+
cancelText = _ref.cancelText,
|
|
52
|
+
btnGroup = _ref.btnGroup,
|
|
53
|
+
advance = _ref.advance,
|
|
54
|
+
$apiRef = _ref.$apiRef,
|
|
55
|
+
$designProps = _ref.$designProps;
|
|
56
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
28
57
|
var apiRef = (0, _react.useRef)();
|
|
29
58
|
var domRef = (0, _react.useRef)();
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
open =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
59
|
+
var _usePromiseState = (0, _usePromiseState5.default)(defaultOpen),
|
|
60
|
+
_usePromiseState2 = (0, _slicedToArray2.default)(_usePromiseState, 2),
|
|
61
|
+
open = _usePromiseState2[0],
|
|
62
|
+
setOpen = _usePromiseState2[1];
|
|
63
|
+
var _useState = (0, _react.useState)(false),
|
|
64
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
65
|
+
loading = _useState2[0],
|
|
66
|
+
setLoading = _useState2[1];
|
|
67
|
+
var _usePromiseState3 = (0, _usePromiseState5.default)(title),
|
|
68
|
+
_usePromiseState4 = (0, _slicedToArray2.default)(_usePromiseState3, 2),
|
|
69
|
+
_title = _usePromiseState4[0],
|
|
70
|
+
_setTitle = _usePromiseState4[1];
|
|
71
|
+
(0, _react.useEffect)(function () {
|
|
72
|
+
ctx.doAction(advance.events.onMount);
|
|
73
|
+
return function () {
|
|
74
|
+
_setTitle(title);
|
|
75
|
+
ctx.doAction(advance.events.onUnmount);
|
|
76
|
+
};
|
|
77
|
+
}, []);
|
|
78
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
79
|
+
if (open) {
|
|
80
|
+
ctx.doAction(advance.events.onOpen);
|
|
81
|
+
} else {
|
|
82
|
+
ctx.doAction(advance.events.onClose);
|
|
83
|
+
}
|
|
84
|
+
}, [open]);
|
|
85
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
86
|
+
_setTitle(title);
|
|
87
|
+
}, [title]);
|
|
88
|
+
var handleOk = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
89
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
90
|
+
while (1) switch (_context.prev = _context.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
setLoading(true);
|
|
93
|
+
_context.next = 3;
|
|
94
|
+
return ctx.doAction(advance.events.onOk);
|
|
95
|
+
case 3:
|
|
96
|
+
setLoading(false);
|
|
97
|
+
case 4:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee);
|
|
102
|
+
})));
|
|
37
103
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
38
104
|
var _domRef$current;
|
|
39
105
|
return (_domRef$current = domRef.current) === null || _domRef$current === void 0 ? void 0 : _domRef$current.closest('.ant-drawer-content-wrapper');
|
|
40
106
|
});
|
|
41
107
|
(0, _react.useImperativeHandle)(apiRef, function () {
|
|
42
108
|
return {
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @property
|
|
109
|
+
/**
|
|
110
|
+
* 弹窗打开状态
|
|
111
|
+
* @property
|
|
46
112
|
*/
|
|
47
113
|
open: open,
|
|
48
|
-
/**
|
|
49
|
-
* 打开弹窗
|
|
50
|
-
* @method
|
|
114
|
+
/**
|
|
115
|
+
* 打开弹窗
|
|
116
|
+
* @method
|
|
51
117
|
*/
|
|
52
|
-
doOpen:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
118
|
+
doOpen: function doOpen() {
|
|
119
|
+
return setOpen(true);
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* 关闭弹窗
|
|
123
|
+
* @method
|
|
56
124
|
*/
|
|
57
|
-
doClose:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
125
|
+
doClose: function doClose() {
|
|
126
|
+
return setOpen(false);
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* 设置弹窗标题
|
|
130
|
+
* @method
|
|
131
|
+
* @param {stirng} title -标题
|
|
61
132
|
*/
|
|
62
|
-
|
|
133
|
+
setTitle: function setTitle(_title) {
|
|
134
|
+
return _setTitle(_title);
|
|
135
|
+
}
|
|
63
136
|
};
|
|
64
137
|
});
|
|
65
138
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
66
139
|
id: id,
|
|
67
140
|
displayName: "Drawer",
|
|
68
141
|
getTargetDom: getTargetDom,
|
|
69
|
-
api: apiRef
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
142
|
+
api: $apiRef || apiRef
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Drawer, (0, _extends2.default)({
|
|
144
|
+
title: _title,
|
|
71
145
|
visible: open,
|
|
72
|
-
|
|
146
|
+
width: width,
|
|
147
|
+
height: height,
|
|
148
|
+
mask: mask,
|
|
149
|
+
closable: closable,
|
|
73
150
|
style: style,
|
|
74
|
-
|
|
75
|
-
|
|
151
|
+
headerStyle: (0, _objectSpread2.default)({
|
|
152
|
+
position: 'sticky',
|
|
153
|
+
top: 0,
|
|
154
|
+
left: 0,
|
|
155
|
+
zIndex: 10
|
|
156
|
+
}, header ? null : {
|
|
157
|
+
display: 'none'
|
|
158
|
+
}),
|
|
159
|
+
bodyStyle: {
|
|
160
|
+
padding: padding
|
|
161
|
+
},
|
|
162
|
+
maskClosable: !!(closeType !== null && closeType !== void 0 && closeType.includes('maskClosable')),
|
|
163
|
+
keyboard: !!(closeType !== null && closeType !== void 0 && closeType.includes('keyboard')),
|
|
164
|
+
placement: placement,
|
|
165
|
+
destroyOnClose: destroyOnClose,
|
|
166
|
+
onClose: function onClose() {
|
|
167
|
+
return setOpen(false);
|
|
168
|
+
},
|
|
169
|
+
getContainer: (0, _lodash.isNil)(getContainer) ? function () {
|
|
170
|
+
return document.getElementById('root') || document.getElementById('react-content') || document.body;
|
|
171
|
+
} : getContainer,
|
|
172
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, className, !!className))
|
|
173
|
+
}, $designProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
76
174
|
style: {
|
|
77
175
|
height: 0,
|
|
78
176
|
width: 0,
|
|
@@ -81,7 +179,24 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
81
179
|
visibility: 'hidden'
|
|
82
180
|
},
|
|
83
181
|
ref: domRef
|
|
84
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
182
|
+
}), children, footer ? /*#__PURE__*/_react.default.createElement(Footer, {
|
|
183
|
+
className: "ant-drawer-footer"
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement(_index.LDActions, (0, _extends2.default)({}, btnGroup, {
|
|
185
|
+
doAction: function doAction(action) {
|
|
186
|
+
return ctx.doAction(action);
|
|
187
|
+
}
|
|
188
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
189
|
+
onClick: function onClick() {
|
|
190
|
+
return setOpen(false);
|
|
191
|
+
},
|
|
192
|
+
style: {
|
|
193
|
+
margin: '0px 8px'
|
|
194
|
+
}
|
|
195
|
+
}, cancelText), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
196
|
+
type: "primary",
|
|
197
|
+
loading: loading,
|
|
198
|
+
onClick: handleOk
|
|
199
|
+
}, okText)) : null));
|
|
85
200
|
};
|
|
86
201
|
LCDrawer.defaultProps = (0, _helper.omitBadProps)(_drawerPropsDefault.default);
|
|
87
202
|
var _default = exports.default = LCDrawer;
|