@luck-design-biz/luckda 0.0.25-8 → 0.0.25-af-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/Builder/index.js +4 -6
- package/es/components/ComplexItem/index.js +92 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/LDActions/index.js +15 -16
- package/es/components/LDActions/index.less +48 -68
- package/es/components/LdAutoForm/index.js +9 -27
- package/es/components/LdCom/index.js +1 -2
- package/es/components/LdFormList/index.js +31 -51
- package/es/components/LdGrid/index.js +16 -23
- package/es/components/LdGridForm/index.js +7 -20
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdRuntimeCom/index.js +11 -24
- package/es/components/LdTree/index.js +40 -112
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/FromItems.js +23 -1
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +44 -30
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +12 -28
- package/es/helper/ldComBuild.js +14 -29
- package/es/locales/zh-CN.js +19 -104
- package/es/lowcode/constants/api-url.js +324 -555
- package/es/lowcode/constants/event-topics.js +0 -6
- package/es/lowcode/constants/index.js +4 -31
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +2 -5
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +2 -5
- package/es/lowcode/engine/meta/box.props.default.json +2 -5
- package/es/lowcode/engine/meta/box.props.json +4 -4
- package/es/lowcode/engine/meta/button.props.default.json +1 -4
- package/es/lowcode/engine/meta/button.props.json +9 -9
- package/es/lowcode/engine/meta/cardlist.props.default.json +1 -4
- package/es/lowcode/engine/meta/cardlist.props.json +1 -1
- package/es/lowcode/engine/meta/components-list.json +7 -13
- package/es/lowcode/engine/meta/dialog.props.default.json +6 -14
- package/es/lowcode/engine/meta/dialog.props.json +43 -73
- package/es/lowcode/engine/meta/drawer.props.default.json +1 -4
- package/es/lowcode/engine/meta/drawer.props.json +21 -9
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +159 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +142 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +19 -0
- package/es/lowcode/engine/meta/fielddate.props.json +145 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +19 -0
- package/es/lowcode/engine/meta/fielddict.props.json +140 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +18 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +140 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +169 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +145 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +117 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +123 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +154 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +154 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +127 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +18 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +145 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +167 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +21 -0
- package/es/lowcode/engine/meta/fielduser.props.json +178 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +133 -0
- package/es/lowcode/engine/meta/form.props.default.json +3 -52
- package/es/lowcode/engine/meta/form.props.json +63 -602
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +89 -0
- package/es/lowcode/engine/meta/image.props.default.json +1 -4
- package/es/lowcode/engine/meta/image.props.json +2 -2
- package/es/lowcode/engine/meta/imex.props.default.json +2 -12
- package/es/lowcode/engine/meta/imex.props.json +22 -54
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +13 -83
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/es/lowcode/engine/meta/jsx.props.json +5 -10
- package/es/lowcode/engine/meta/layout.props.default.json +1 -4
- package/es/lowcode/engine/meta/layout.props.json +3 -2
- package/es/lowcode/engine/meta/link.props.default.json +1 -4
- package/es/lowcode/engine/meta/link.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +18 -6
- package/es/lowcode/engine/meta/pagelayout.props.default.json +3 -1
- package/es/lowcode/engine/meta/pagelayout.props.json +13 -1
- package/es/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/es/lowcode/engine/meta/proxy.props.json +66 -0
- package/es/lowcode/engine/meta/section.props.default.json +6 -7
- package/es/lowcode/engine/meta/section.props.json +49 -52
- package/es/lowcode/engine/meta/split.props.default.json +4 -9
- package/es/lowcode/engine/meta/split.props.json +32 -17
- package/es/lowcode/engine/meta/table.props.default.json +1 -5
- package/es/lowcode/engine/meta/table.props.json +34 -67
- package/es/lowcode/engine/meta/tabs.props.default.json +8 -16
- package/es/lowcode/engine/meta/tabs.props.json +80 -57
- package/es/lowcode/engine/meta/text.props.default.json +1 -4
- package/es/lowcode/engine/meta/text.props.json +2 -2
- package/es/lowcode/engine/meta/tree.props.default.json +6 -16
- package/es/lowcode/engine/meta/tree.props.json +58 -214
- package/es/lowcode/engine/provider/ContextProvider/index.js +115 -70
- package/es/lowcode/engine/tools/dataProcess.js +71 -137
- package/es/lowcode/engine/tools/helper.js +20 -70
- package/es/lowcode/engine/tools/usePromiseState.js +9 -8
- package/es/lowcode/index.js +0 -1
- package/es/lowcode/painter/Components.js +23 -49
- package/es/lowcode/painter/Design.js +2 -34
- package/es/lowcode/painter/DesignOperator.js +37 -43
- package/es/lowcode/painter/DesignToolbar.js +16 -289
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +26 -29
- package/es/lowcode/painter/Panel.js +26 -67
- package/es/lowcode/painter/components/ActionBindModal.js +62 -181
- package/es/lowcode/painter/components/AdvancePanel.js +11 -88
- package/es/lowcode/painter/components/AttrsPanel.js +41 -61
- package/es/lowcode/painter/components/Collapse.js +29 -35
- package/es/lowcode/painter/components/ColorInput.js +27 -29
- package/es/lowcode/painter/components/ListEditor.js +33 -46
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +25 -25
- 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 +26 -33
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +34 -35
- 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/index.js +28 -3
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +69 -16
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +6 -39
- package/es/lowcode/painter/panel-section/ButtonType.js +2 -4
- package/es/lowcode/painter/panel-section/DataSetSelector.js +43 -118
- package/es/lowcode/painter/panel-section/Icon.js +35 -35
- package/es/lowcode/painter/panel-section/IconSelector.js +18 -21
- package/es/lowcode/painter/panel-section/ImpExp.js +6 -93
- package/es/lowcode/painter/panel-section/JSEditor.js +2 -3
- package/es/lowcode/painter/panel-section/LayoutRatio.js +28 -27
- 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 +2 -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 +24 -4
- 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 +16 -22
- package/es/lowcode/painter/panel-section/TabItems.js +30 -46
- package/es/lowcode/painter/panel-section/TableZebra.js +6 -66
- package/es/lowcode/painter/style/action-bind-modal.less +99 -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 +22 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +90 -91
- package/es/lowcode/painter/style/design.less +149 -152
- package/es/lowcode/painter/style/display.less +17 -17
- 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 +59 -95
- package/es/lowcode/painter/style/number-input.less +17 -17
- package/es/lowcode/painter/style/outline.less +28 -28
- package/es/lowcode/painter/style/panel-attrs.less +43 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +98 -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 +5 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/view/Canvas.js +139 -33
- package/es/lowcode/view/Loading.js +2 -6
- package/es/lowcode/view/Page.js +14 -15
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +2 -3
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Box/index.js +17 -10
- 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/FunctionDesign.js +10 -8
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +6 -3
- package/es/lowcode/view/lc-components/Button/index.js +53 -72
- 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/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/CardList/index.js +0 -1
- package/es/lowcode/view/lc-components/CardList/meta.json +143 -143
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +27 -12
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Dialog/index.js +19 -115
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +120 -143
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -5
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Drawer/index.js +12 -13
- package/es/lowcode/view/lc-components/Drawer/index.less +6 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +143 -131
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -83
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Form/index.js +13 -382
- package/es/lowcode/view/lc-components/Form/meta.json +116 -605
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Iframe/index.js +0 -1
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/ImEx/index.js +9 -260
- package/es/lowcode/view/lc-components/ImEx/meta.json +82 -114
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Image/index.js +0 -1
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/JSX/index.js +6 -19
- package/es/lowcode/view/lc-components/JSX/meta.json +25 -28
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +24 -21
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +8 -3
- package/es/lowcode/view/lc-components/Layout/index.js +16 -17
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +108 -107
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Link/index.js +0 -1
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +2 -25
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Section/index.js +24 -115
- package/es/lowcode/view/lc-components/Section/meta.json +108 -107
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +2 -56
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Split/index.js +7 -42
- package/es/lowcode/view/lc-components/Split/meta.json +72 -53
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +3 -7
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Table/index.js +217 -399
- package/es/lowcode/view/lc-components/Table/meta.json +372 -405
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +2 -63
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Tabs/index.js +10 -115
- package/es/lowcode/view/lc-components/Tabs/meta.json +140 -113
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -1
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Text/index.js +0 -1
- package/es/lowcode/view/lc-components/Text/meta.json +66 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +6 -22
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -1
- package/es/lowcode/view/lc-components/Tree/index.js +51 -344
- package/es/lowcode/view/lc-components/Tree/index.less +1 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +199 -356
- package/es/lowcode/view/lc-components/Wrapper.js +32 -47
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +84 -84
- package/es/lowcode/view/style/page.less +5 -8
- package/es/services.js +26 -4
- package/es/upload/Form/gridForm.js +3 -7
- package/es/upload/Form/index.js +1 -2
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +20 -18
- package/es/upload/index.js +1 -2
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +22 -21
- package/es/utils/grid.js +3 -2
- package/lib/components/Builder/index.js +1 -4
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/LDActions/index.js +14 -15
- package/lib/components/LDActions/index.less +48 -68
- package/lib/components/LdAutoForm/index.js +8 -26
- package/lib/components/LdCom/index.js +1 -2
- package/lib/components/LdFormList/index.js +29 -49
- package/lib/components/LdGrid/index.js +16 -23
- package/lib/components/LdGridForm/index.js +6 -19
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdRuntimeCom/index.js +12 -25
- package/lib/components/LdTree/index.js +41 -113
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/FromItems.js +24 -2
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +43 -29
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +12 -28
- package/lib/helper/ldComBuild.js +12 -27
- package/lib/locales/zh-CN.js +19 -104
- package/lib/lowcode/constants/api-url.js +325 -559
- package/lib/lowcode/constants/event-topics.js +1 -7
- package/lib/lowcode/constants/index.js +5 -32
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -7
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +2 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +3 -6
- package/lib/lowcode/engine/meta/box.props.default.json +2 -5
- package/lib/lowcode/engine/meta/box.props.json +4 -4
- package/lib/lowcode/engine/meta/button.props.default.json +1 -4
- package/lib/lowcode/engine/meta/button.props.json +9 -9
- package/lib/lowcode/engine/meta/cardlist.props.default.json +1 -4
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -1
- package/lib/lowcode/engine/meta/components-list.json +7 -13
- package/lib/lowcode/engine/meta/dialog.props.default.json +6 -14
- package/lib/lowcode/engine/meta/dialog.props.json +43 -73
- package/lib/lowcode/engine/meta/drawer.props.default.json +1 -4
- package/lib/lowcode/engine/meta/drawer.props.json +21 -9
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +159 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +142 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +145 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +140 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +140 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +169 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +145 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +117 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +123 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +154 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +154 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +145 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +167 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +21 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +178 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +133 -0
- package/lib/lowcode/engine/meta/form.props.default.json +3 -52
- package/lib/lowcode/engine/meta/form.props.json +63 -602
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +89 -0
- package/lib/lowcode/engine/meta/image.props.default.json +1 -4
- package/lib/lowcode/engine/meta/image.props.json +2 -2
- package/lib/lowcode/engine/meta/imex.props.default.json +2 -12
- package/lib/lowcode/engine/meta/imex.props.json +22 -54
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +13 -83
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/lib/lowcode/engine/meta/jsx.props.json +5 -10
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -4
- package/lib/lowcode/engine/meta/layout.props.json +3 -2
- package/lib/lowcode/engine/meta/link.props.default.json +1 -4
- package/lib/lowcode/engine/meta/link.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +18 -6
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +3 -1
- package/lib/lowcode/engine/meta/pagelayout.props.json +13 -1
- package/lib/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/lib/lowcode/engine/meta/proxy.props.json +66 -0
- package/lib/lowcode/engine/meta/section.props.default.json +6 -7
- package/lib/lowcode/engine/meta/section.props.json +49 -52
- package/lib/lowcode/engine/meta/split.props.default.json +4 -9
- package/lib/lowcode/engine/meta/split.props.json +32 -17
- package/lib/lowcode/engine/meta/table.props.default.json +1 -5
- package/lib/lowcode/engine/meta/table.props.json +34 -67
- package/lib/lowcode/engine/meta/tabs.props.default.json +8 -16
- package/lib/lowcode/engine/meta/tabs.props.json +80 -57
- package/lib/lowcode/engine/meta/text.props.default.json +1 -4
- package/lib/lowcode/engine/meta/text.props.json +2 -2
- package/lib/lowcode/engine/meta/tree.props.default.json +6 -16
- package/lib/lowcode/engine/meta/tree.props.json +58 -214
- package/lib/lowcode/engine/provider/ContextProvider/index.js +114 -85
- package/lib/lowcode/engine/tools/dataProcess.js +70 -137
- package/lib/lowcode/engine/tools/helper.js +20 -72
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -6
- package/lib/lowcode/index.js +0 -7
- package/lib/lowcode/painter/Components.js +22 -48
- package/lib/lowcode/painter/Design.js +0 -32
- package/lib/lowcode/painter/DesignOperator.js +34 -40
- package/lib/lowcode/painter/DesignToolbar.js +13 -286
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +24 -27
- package/lib/lowcode/painter/Panel.js +25 -66
- package/lib/lowcode/painter/components/ActionBindModal.js +58 -176
- package/lib/lowcode/painter/components/AdvancePanel.js +9 -86
- package/lib/lowcode/painter/components/AttrsPanel.js +39 -59
- package/lib/lowcode/painter/components/Collapse.js +29 -35
- package/lib/lowcode/painter/components/ColorInput.js +27 -29
- package/lib/lowcode/painter/components/ListEditor.js +32 -45
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +25 -25
- 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 +27 -34
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +34 -35
- 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/index.js +30 -3
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +67 -14
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +4 -37
- package/lib/lowcode/painter/panel-section/ButtonType.js +2 -4
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +40 -115
- package/lib/lowcode/painter/panel-section/Icon.js +35 -37
- package/lib/lowcode/painter/panel-section/IconSelector.js +18 -21
- package/lib/lowcode/painter/panel-section/ImpExp.js +5 -92
- package/lib/lowcode/painter/panel-section/JSEditor.js +2 -3
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +27 -26
- 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 +2 -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 +29 -10
- 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 +16 -22
- package/lib/lowcode/painter/panel-section/TabItems.js +29 -45
- package/lib/lowcode/painter/panel-section/TableZebra.js +6 -67
- package/lib/lowcode/painter/style/action-bind-modal.less +99 -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 +22 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +90 -91
- package/lib/lowcode/painter/style/design.less +149 -152
- package/lib/lowcode/painter/style/display.less +17 -17
- 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 +59 -95
- package/lib/lowcode/painter/style/number-input.less +17 -17
- package/lib/lowcode/painter/style/outline.less +28 -28
- package/lib/lowcode/painter/style/panel-attrs.less +43 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +98 -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 +5 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/view/Canvas.js +145 -31
- package/lib/lowcode/view/Loading.js +2 -6
- package/lib/lowcode/view/Page.js +10 -11
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +2 -3
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Box/index.js +15 -9
- 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/FunctionDesign.js +10 -8
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +6 -3
- package/lib/lowcode/view/lc-components/Button/index.js +51 -70
- 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/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/CardList/index.js +0 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +143 -143
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +27 -11
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Dialog/index.js +19 -115
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +120 -143
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +3 -6
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Drawer/index.js +12 -13
- package/lib/lowcode/view/lc-components/Drawer/index.less +6 -9
- package/lib/lowcode/view/lc-components/Drawer/meta.json +143 -131
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -83
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Form/index.js +12 -381
- package/lib/lowcode/view/lc-components/Form/meta.json +116 -605
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Iframe/index.js +0 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +3 -9
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/ImEx/index.js +7 -257
- package/lib/lowcode/view/lc-components/ImEx/meta.json +82 -114
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Image/index.js +0 -1
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/JSX/index.js +6 -19
- package/lib/lowcode/view/lc-components/JSX/meta.json +25 -28
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +24 -22
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +8 -3
- package/lib/lowcode/view/lc-components/Layout/index.js +16 -17
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +108 -107
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Link/index.js +0 -1
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -25
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Section/index.js +23 -114
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -107
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +2 -57
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Split/index.js +6 -41
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -53
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +3 -7
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Table/index.js +214 -396
- package/lib/lowcode/view/lc-components/Table/meta.json +372 -405
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +2 -64
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +9 -114
- package/lib/lowcode/view/lc-components/Tabs/meta.json +140 -113
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +1 -2
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Text/index.js +0 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +5 -21
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +1 -2
- package/lib/lowcode/view/lc-components/Tree/index.js +48 -341
- package/lib/lowcode/view/lc-components/Tree/index.less +1 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +199 -356
- package/lib/lowcode/view/lc-components/Wrapper.js +30 -46
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +84 -84
- package/lib/lowcode/view/style/page.less +5 -8
- package/lib/services.js +27 -4
- package/lib/upload/Form/gridForm.js +3 -7
- package/lib/upload/Form/index.js +1 -2
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +20 -18
- package/lib/upload/index.js +1 -8
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +22 -21
- package/lib/utils/grid.js +3 -2
- package/lowcode.js +1 -1
- package/package.json +171 -172
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/components/IconFont/index.js +0 -5
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +0 -219
- package/es/lowcode/engine/tools/useCanvasRender.js +0 -74
- package/es/lowcode/engine/tools/usePageDataStore.js +0 -176
- package/es/lowcode/engine/tools/useTodo.js +0 -88
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +0 -137
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +0 -50
- package/es/lowcode/painter/components/DragDrop/Overlay.js +0 -8
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +0 -67
- package/es/lowcode/painter/components/TreeEditor.js +0 -13
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +0 -154
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +0 -108
- package/es/lowcode/painter/components/field-setting/CheckRules.js +0 -101
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +0 -287
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +0 -290
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +0 -63
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +0 -136
- package/es/lowcode/painter/components/field-setting/SettingUI.js +0 -570
- package/es/lowcode/painter/components/field-setting/index.js +0 -342
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +0 -53
- package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +0 -25
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +0 -27
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +0 -45
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +0 -232
- package/es/lowcode/painter/panel-section/FieldsSetting.js +0 -374
- package/es/lowcode/painter/panel-section/I18nInput.js +0 -20
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +0 -111
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +0 -109
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +0 -95
- package/es/lowcode/painter/panel-section/SerialsSelector.js +0 -46
- package/es/lowcode/painter/panel-section/SplitDisplay.js +0 -163
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +0 -78
- package/es/lowcode/painter/style/dragdrop.less +0 -10
- package/es/lowcode/painter/style/fields-setting.less +0 -25
- package/es/lowcode/painter/style/page-layout-display.less +0 -28
- package/es/lowcode/painter/style/split-display.less +0 -19
- package/es/lowcode/painter/style/treedragdrop.less +0 -19
- package/es/lowcode/preview/index.js +0 -29
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +0 -6
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +0 -17
- package/es/lowcode/view/lc-components/Form/index.less +0 -5
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/ImEx/index.less +0 -7
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Page/meta.json +0 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +0 -52
- package/es/lowcode/view/lc-components/PageContent/meta.json +0 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +0 -35
- package/es/lowcode/view/lc-components/PageFooter/meta.json +0 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +0 -39
- package/es/lowcode/view/lc-components/PageHeader/meta.json +0 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +0 -63
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +0 -10
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/PageLayout/index.js +0 -32
- package/es/lowcode/view/lc-components/PageLayout/meta.json +0 -47
- package/es/lowcode/view/lc-components/PageModal/index.js +0 -20
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Section/index.less +0 -7
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +0 -138
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +0 -10
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +0 -26
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +0 -422
- package/es/upload/FilesWall/index.less +0 -74
- package/lib/components/IconFont/index.js +0 -11
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +0 -227
- package/lib/lowcode/engine/tools/useCanvasRender.js +0 -89
- package/lib/lowcode/engine/tools/usePageDataStore.js +0 -183
- package/lib/lowcode/engine/tools/useTodo.js +0 -95
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +0 -146
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +0 -57
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +0 -15
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +0 -75
- package/lib/lowcode/painter/components/TreeEditor.js +0 -20
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +0 -161
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +0 -116
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +0 -108
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +0 -295
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +0 -298
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +0 -70
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +0 -144
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +0 -578
- package/lib/lowcode/painter/components/field-setting/index.js +0 -349
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +0 -59
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +0 -32
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +0 -34
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +0 -52
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +0 -239
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +0 -382
- package/lib/lowcode/painter/panel-section/I18nInput.js +0 -27
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +0 -119
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -115
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +0 -103
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +0 -53
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +0 -171
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +0 -86
- package/lib/lowcode/painter/style/dragdrop.less +0 -10
- package/lib/lowcode/painter/style/fields-setting.less +0 -25
- package/lib/lowcode/painter/style/page-layout-display.less +0 -28
- package/lib/lowcode/painter/style/split-display.less +0 -19
- package/lib/lowcode/painter/style/treedragdrop.less +0 -19
- package/lib/lowcode/preview/index.js +0 -37
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +0 -13
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +0 -24
- package/lib/lowcode/view/lc-components/Form/index.less +0 -5
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/ImEx/index.less +0 -7
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Page/meta.json +0 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +0 -60
- package/lib/lowcode/view/lc-components/PageContent/meta.json +0 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +0 -43
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +0 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +0 -47
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +0 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +0 -71
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +0 -17
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/PageLayout/index.js +0 -40
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +0 -47
- package/lib/lowcode/view/lc-components/PageModal/index.js +0 -27
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Section/index.less +0 -7
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +0 -145
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +0 -17
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +0 -33
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +0 -429
- package/lib/upload/FilesWall/index.less +0 -74
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
-
|
|
9
|
-
import React, { useRef, useEffect, useState } from 'react';
|
|
10
|
-
import { useLocation } from 'umi';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
11
4
|
import classNames from 'classnames';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { useContext, useGet, resetPageData, useRemoteSource } from "../engine/provider/ContextProvider";
|
|
16
|
-
import JsonEditor from "../painter/components/code-editor/JsonEditor";
|
|
17
|
-
import Preview from "../preview";
|
|
18
|
-
import { LC_BUILDIN_UNIT_KEY, COOKIE_VIRTUAL_ACCOUNT_KEY } from "../constants";
|
|
5
|
+
import { Select, Button, Icon, Divider } from 'luck-design/antd';
|
|
6
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
7
|
+
import { CELL_KEY } from "../constants";
|
|
19
8
|
import styles from "./style/design.less";
|
|
20
|
-
import { fetchClearCache, fetchUpdatePageData } from "../constants/api-url";
|
|
21
|
-
import { readAllUser } from '@luck-design-biz/base/lib/sys/services';
|
|
22
9
|
var DesignToolbar = function DesignToolbar(_ref) {
|
|
23
10
|
var locale = _ref.locale,
|
|
24
11
|
onLangChange = _ref.onLangChange;
|
|
25
|
-
var
|
|
26
|
-
var editorRef = useRef();
|
|
27
|
-
var context = useContext();
|
|
28
|
-
var pageData = useGet();
|
|
29
|
-
var _ref2 = useRemoteSource() || {},
|
|
30
|
-
pageinfo = _ref2.pageinfo;
|
|
12
|
+
var context = useLDContext();
|
|
31
13
|
var _useState = useState(null),
|
|
32
14
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
15
|
langList = _useState2[0],
|
|
@@ -36,145 +18,16 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
36
18
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
19
|
activedTarget = _useState4[0],
|
|
38
20
|
setActivedTarget = _useState4[1];
|
|
39
|
-
var _useState5 = useState(false),
|
|
40
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
-
show = _useState6[0],
|
|
42
|
-
setShow = _useState6[1];
|
|
43
|
-
var _useState7 = useState(false),
|
|
44
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
45
|
-
showPreview = _useState8[0],
|
|
46
|
-
setShowPreview = _useState8[1];
|
|
47
|
-
var _useState9 = useState([]),
|
|
48
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
49
|
-
userOptions = _useState10[0],
|
|
50
|
-
setUserOptions = _useState10[1];
|
|
51
|
-
var _useCookieState = useCookieState(COOKIE_VIRTUAL_ACCOUNT_KEY),
|
|
52
|
-
_useCookieState2 = _slicedToArray(_useCookieState, 2),
|
|
53
|
-
userId = _useCookieState2[0],
|
|
54
|
-
setUserId = _useCookieState2[1];
|
|
55
|
-
var _useRequest = useRequest(fetchClearCache, {
|
|
56
|
-
manual: true
|
|
57
|
-
}),
|
|
58
|
-
clearCacheLoading = _useRequest.loading,
|
|
59
|
-
runClearCache = _useRequest.run;
|
|
60
|
-
var _useRequest2 = useRequest(fetchUpdatePageData, {
|
|
61
|
-
manual: true,
|
|
62
|
-
debounceWait: 300
|
|
63
|
-
}),
|
|
64
|
-
updatePageDataLoading = _useRequest2.loading,
|
|
65
|
-
runAsync = _useRequest2.runAsync;
|
|
66
21
|
useEffect(function () {
|
|
67
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (
|
|
68
|
-
var _langList =
|
|
22
|
+
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
23
|
+
var _langList = _ref2.langList;
|
|
69
24
|
return setLangList(_langList);
|
|
70
25
|
}).watch();
|
|
71
26
|
return function () {
|
|
72
27
|
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
73
28
|
};
|
|
74
29
|
}, []);
|
|
75
|
-
|
|
76
|
-
if (!showPreview) {
|
|
77
|
-
setUserId(void 0);
|
|
78
|
-
}
|
|
79
|
-
}, [showPreview]);
|
|
80
|
-
var handleSave = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
81
|
-
var _pageinfo$relationshi;
|
|
82
|
-
var _yield$runAsync, code;
|
|
83
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
84
|
-
while (1) switch (_context.prev = _context.next) {
|
|
85
|
-
case 0:
|
|
86
|
-
_context.next = 2;
|
|
87
|
-
return runAsync({
|
|
88
|
-
pageData: JSON.stringify(pageData),
|
|
89
|
-
pageCode: pageinfo === null || pageinfo === void 0 || (_pageinfo$relationshi = pageinfo.relationship) === null || _pageinfo$relationshi === void 0 ? void 0 : _pageinfo$relationshi.pageCode
|
|
90
|
-
});
|
|
91
|
-
case 2:
|
|
92
|
-
_yield$runAsync = _context.sent;
|
|
93
|
-
code = _yield$runAsync.code;
|
|
94
|
-
if (code === 1) {
|
|
95
|
-
showPop(formatMessage({
|
|
96
|
-
id: 'app.base.tip.operate.success'
|
|
97
|
-
}), null, 'success');
|
|
98
|
-
}
|
|
99
|
-
case 5:
|
|
100
|
-
case "end":
|
|
101
|
-
return _context.stop();
|
|
102
|
-
}
|
|
103
|
-
}, _callee);
|
|
104
|
-
})), []);
|
|
105
|
-
var handleClearCache = useMemoizedFn(function () {
|
|
106
|
-
Modal.confirm({
|
|
107
|
-
title: formatMessage({
|
|
108
|
-
id: 'luckda.lowcode.design.toolbar.clear.tip',
|
|
109
|
-
label: '清除提示'
|
|
110
|
-
}),
|
|
111
|
-
content: formatMessage({
|
|
112
|
-
id: 'luckda.lowcode.design.toolbar.clear',
|
|
113
|
-
label: '确定清除当前页面及模块缓存么?'
|
|
114
|
-
}),
|
|
115
|
-
getContainer: function getContainer() {
|
|
116
|
-
return document.getElementById('lc-design-workspace');
|
|
117
|
-
},
|
|
118
|
-
zIndex: 3000,
|
|
119
|
-
onOk: function onOk() {
|
|
120
|
-
return runClearCache({
|
|
121
|
-
moduleCode: pageinfo.relationship.moduleCode
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
var handleOk = useMemoizedFn(function () {
|
|
127
|
-
var code = editorRef.current.editor.getValue();
|
|
128
|
-
try {
|
|
129
|
-
var data = JSON.parse(code);
|
|
130
|
-
resetPageData(data);
|
|
131
|
-
setShow(false);
|
|
132
|
-
} catch (e) {
|
|
133
|
-
console.error(e);
|
|
134
|
-
message.warning(formatMessage({
|
|
135
|
-
id: 'luckda.lowcode.error.pagedata',
|
|
136
|
-
label: '页面数据错误'
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
var _useDebounceFn = useDebounceFn( /*#__PURE__*/function () {
|
|
141
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
142
|
-
var _yield$readAllUser, code, list, detail;
|
|
143
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
144
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
145
|
-
case 0:
|
|
146
|
-
_context2.next = 2;
|
|
147
|
-
return readAllUser({
|
|
148
|
-
sname: value
|
|
149
|
-
});
|
|
150
|
-
case 2:
|
|
151
|
-
_yield$readAllUser = _context2.sent;
|
|
152
|
-
code = _yield$readAllUser.code;
|
|
153
|
-
list = _yield$readAllUser.list;
|
|
154
|
-
detail = _yield$readAllUser.detail;
|
|
155
|
-
if (code === 1) {
|
|
156
|
-
setUserOptions(list.map(function (id) {
|
|
157
|
-
var item = detail[id];
|
|
158
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
159
|
-
key: "".concat(item.indocno),
|
|
160
|
-
label: item.sname
|
|
161
|
-
});
|
|
162
|
-
}));
|
|
163
|
-
}
|
|
164
|
-
case 7:
|
|
165
|
-
case "end":
|
|
166
|
-
return _context2.stop();
|
|
167
|
-
}
|
|
168
|
-
}, _callee2);
|
|
169
|
-
}));
|
|
170
|
-
return function (_x) {
|
|
171
|
-
return _ref5.apply(this, arguments);
|
|
172
|
-
};
|
|
173
|
-
}(), {
|
|
174
|
-
wait: 500
|
|
175
|
-
}),
|
|
176
|
-
handleSearch = _useDebounceFn.run;
|
|
177
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
178
31
|
className: styles['lc-painter-design-toolbar']
|
|
179
32
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
180
33
|
size: "small",
|
|
@@ -213,152 +66,26 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
213
66
|
className: styles['toolbar-item'],
|
|
214
67
|
onClick: function onClick() {
|
|
215
68
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
216
|
-
id:
|
|
69
|
+
id: CELL_KEY.PAGE_ROOT
|
|
217
70
|
});
|
|
218
71
|
}
|
|
219
|
-
},
|
|
220
|
-
id: 'luckda.lowcode.design.toolbar.pageAttrs',
|
|
221
|
-
label: '页面属性'
|
|
222
|
-
})), /*#__PURE__*/React.createElement(Divider, {
|
|
72
|
+
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/React.createElement(Divider, {
|
|
223
73
|
type: "vertical"
|
|
224
74
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
225
75
|
size: "small",
|
|
226
76
|
style: {
|
|
227
77
|
fontSize: 12,
|
|
228
|
-
margin: '0
|
|
229
|
-
},
|
|
230
|
-
loading: clearCacheLoading,
|
|
231
|
-
onClick: handleClearCache
|
|
232
|
-
}, formatMessage({
|
|
233
|
-
id: 'luckda.lowcode.design.toolbar.clear',
|
|
234
|
-
label: '清除缓存'
|
|
235
|
-
})), /*#__PURE__*/React.createElement(Button, {
|
|
236
|
-
size: "small",
|
|
237
|
-
style: {
|
|
238
|
-
fontSize: 12,
|
|
239
|
-
margin: '0 4px 0 2px'
|
|
240
|
-
},
|
|
241
|
-
onClick: function onClick() {
|
|
242
|
-
return setShowPreview(true);
|
|
78
|
+
margin: '0 2px'
|
|
243
79
|
}
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
})), /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
}, "\u9884\u89C8"), /*#__PURE__*/React.createElement(Divider, {
|
|
81
|
+
type: "vertical"
|
|
82
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
248
83
|
size: "small",
|
|
249
84
|
type: "primary",
|
|
250
85
|
style: {
|
|
251
86
|
fontSize: 12,
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
255
|
-
style: {
|
|
256
|
-
display: 'inline-block',
|
|
257
|
-
padding: '0 7px'
|
|
258
|
-
},
|
|
259
|
-
onClick: handleSave
|
|
260
|
-
}, formatMessage({
|
|
261
|
-
id: 'luckda.lowcode.design.toolbar.save',
|
|
262
|
-
label: '保存'
|
|
263
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
264
|
-
style: {
|
|
265
|
-
display: 'inline-block'
|
|
266
|
-
},
|
|
267
|
-
onClick: function onClick() {
|
|
268
|
-
return setShow(true);
|
|
269
|
-
}
|
|
270
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
271
|
-
type: updatePageDataLoading ? 'loading' : 'eye'
|
|
272
|
-
})))), /*#__PURE__*/React.createElement(Modal, {
|
|
273
|
-
visible: show,
|
|
274
|
-
width: 1024,
|
|
275
|
-
getContainer: function getContainer() {
|
|
276
|
-
return document.getElementById('lc-design-workspace');
|
|
277
|
-
},
|
|
278
|
-
zIndex: 3000,
|
|
279
|
-
onOk: handleOk,
|
|
280
|
-
onCancel: function onCancel() {
|
|
281
|
-
return setShow(false);
|
|
282
|
-
}
|
|
283
|
-
}, /*#__PURE__*/React.createElement(JsonEditor, {
|
|
284
|
-
ref: editorRef,
|
|
285
|
-
style: {
|
|
286
|
-
height: '70vh'
|
|
287
|
-
}
|
|
288
|
-
}, JSON.stringify(pageData, null, '\t'))), /*#__PURE__*/React.createElement(Drawer, {
|
|
289
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
290
|
-
id: "preview-drawer-header",
|
|
291
|
-
style: {
|
|
292
|
-
display: 'flex',
|
|
293
|
-
height: 54,
|
|
294
|
-
alignItems: 'center',
|
|
295
|
-
justifyContent: 'space-between'
|
|
296
|
-
}
|
|
297
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
298
|
-
style: {
|
|
299
|
-
marginBottom: 0
|
|
300
|
-
}
|
|
301
|
-
}, formatMessage({
|
|
302
|
-
id: 'luckda.lowcode.design.toolbar.pagePreview',
|
|
303
|
-
label: '页面预览'
|
|
304
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
305
|
-
placeholder: formatMessage({
|
|
306
|
-
id: 'luckda.lowcode.design.toolbar.selectUser',
|
|
307
|
-
label: '请选择模拟登录人'
|
|
308
|
-
}),
|
|
309
|
-
allowClear: true,
|
|
310
|
-
style: {
|
|
311
|
-
width: 180
|
|
312
|
-
},
|
|
313
|
-
dropdownStyle: {
|
|
314
|
-
zIndex: 3100
|
|
315
|
-
},
|
|
316
|
-
filterOption: false,
|
|
317
|
-
labelInValue: true,
|
|
318
|
-
showSearch: true,
|
|
319
|
-
getPopupContainer: function getPopupContainer() {
|
|
320
|
-
return document.getElementById('preview-drawer-header').closest('.ant-drawer-wrapper-body');
|
|
321
|
-
},
|
|
322
|
-
onSearch: handleSearch,
|
|
323
|
-
onChange: function onChange(_, _opt) {
|
|
324
|
-
if (_opt) {
|
|
325
|
-
setUserId(_opt.props.sloginid);
|
|
326
|
-
} else {
|
|
327
|
-
setUserId(void 0);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}, userOptions.map(function (_ref6) {
|
|
331
|
-
var key = _ref6.key,
|
|
332
|
-
label = _ref6.label,
|
|
333
|
-
rest = _objectWithoutProperties(_ref6, _excluded);
|
|
334
|
-
return /*#__PURE__*/React.createElement(Select.Option, _extends({
|
|
335
|
-
key: key,
|
|
336
|
-
value: key
|
|
337
|
-
}, rest), label);
|
|
338
|
-
})))),
|
|
339
|
-
placement: "bottom",
|
|
340
|
-
height: "94vh",
|
|
341
|
-
footer: false,
|
|
342
|
-
zIndex: 3000,
|
|
343
|
-
headerStyle: {
|
|
344
|
-
padding: '0 48px 0 24px'
|
|
345
|
-
},
|
|
346
|
-
bodyStyle: {
|
|
347
|
-
height: 'calc(100% - 54px)',
|
|
348
|
-
backgroundColor: '#F0F2F5'
|
|
349
|
-
},
|
|
350
|
-
visible: showPreview,
|
|
351
|
-
destroyOnClose: true,
|
|
352
|
-
onClose: function onClose() {
|
|
353
|
-
return setShowPreview(false);
|
|
354
|
-
},
|
|
355
|
-
getContainer: function getContainer() {
|
|
356
|
-
return document.getElementById('lc-design-workspace');
|
|
87
|
+
margin: '0 0 0 2px'
|
|
357
88
|
}
|
|
358
|
-
},
|
|
359
|
-
code: location.query.code,
|
|
360
|
-
userId: userId || 'no-user',
|
|
361
|
-
debug: true
|
|
362
|
-
})));
|
|
89
|
+
}, "\u4FDD\u5B58"));
|
|
363
90
|
};
|
|
364
91
|
export default DesignToolbar;
|
|
@@ -11,7 +11,7 @@ import { GridTable } from 'luck-design';
|
|
|
11
11
|
import { reduce, remove, cloneDeep, debounce } from 'lodash';
|
|
12
12
|
import { Input, Button, Icon } from 'luck-design/antd';
|
|
13
13
|
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
14
|
-
import {
|
|
14
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
15
15
|
import { readAllLang, doAddLang, doUpdateLang, doDeleteLang } from "./services/I18n";
|
|
16
16
|
var Search = Input.Search;
|
|
17
17
|
var _getDvaApp$_store = (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store,
|
|
@@ -26,7 +26,7 @@ var formatDataFunc = function formatDataFunc(data) {
|
|
|
26
26
|
}, {}));
|
|
27
27
|
};
|
|
28
28
|
var I18n = function I18n() {
|
|
29
|
-
var context =
|
|
29
|
+
var context = useLDContext();
|
|
30
30
|
var _useState = useState([]),
|
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
32
|
langList = _useState2[0],
|
|
@@ -9,17 +9,16 @@ import { uniq, split, reduce } from 'lodash';
|
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { Card, Tree, Icon } from 'luck-design/antd';
|
|
11
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
13
|
+
import { CELL_KEY } from "../constants";
|
|
14
14
|
import { getPathById } from "../engine/tools/dataProcess";
|
|
15
15
|
import styles from "./style/outline.less";
|
|
16
|
-
import TreeEditor from "./components/TreeEditor";
|
|
17
16
|
var TreeNode = Tree.TreeNode;
|
|
17
|
+
var PAGE_CELL = [CELL_KEY.PAGE_HEADER, CELL_KEY.PAGE_CONTENT, CELL_KEY.PAGE_FOOTER];
|
|
18
18
|
var Outline = function Outline(_ref) {
|
|
19
19
|
var open = _ref.open;
|
|
20
20
|
var clickBySelf = useRef(false);
|
|
21
|
-
var
|
|
22
|
-
var pageData = useGet();
|
|
21
|
+
var context = useLDContext();
|
|
23
22
|
var _useState = useState(null),
|
|
24
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
24
|
pageAndModal = _useState2[0],
|
|
@@ -39,28 +38,28 @@ var Outline = function Outline(_ref) {
|
|
|
39
38
|
var latestModalExpandedKeysRef = useLatest(modalExpandedKeys);
|
|
40
39
|
var lastPageExpandedKeysRef = useLatest(pageExpandedKeys);
|
|
41
40
|
useEffect(function () {
|
|
42
|
-
var _id =
|
|
41
|
+
var _id = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
43
42
|
setSelectedKey(payload.id);
|
|
44
43
|
if (clickBySelf.current) {
|
|
45
44
|
clickBySelf.current = false;
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
48
|
-
var _split = split(getPathById(pageData, payload.id), '/'),
|
|
47
|
+
var _split = split(getPathById(context.pageData, payload.id), '/'),
|
|
49
48
|
_split2 = _slicedToArray(_split, 1),
|
|
50
49
|
_root = _split2[0];
|
|
51
|
-
if (!
|
|
52
|
-
setModalExpandedKeys(uniq([].concat(_toConsumableArray(latestModalExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.id), '/')))));
|
|
50
|
+
if (!PAGE_CELL.includes(_root)) {
|
|
51
|
+
setModalExpandedKeys(uniq([].concat(_toConsumableArray(latestModalExpandedKeysRef.current), _toConsumableArray(split(getPathById(context.pageData, payload.id), '/')))));
|
|
53
52
|
} else {
|
|
54
|
-
setPageExpandedKeys(uniq([].concat(_toConsumableArray(lastPageExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.id), '/')))));
|
|
53
|
+
setPageExpandedKeys(uniq([].concat(_toConsumableArray(lastPageExpandedKeysRef.current), _toConsumableArray(split(getPathById(context.pageData, payload.id), '/')))));
|
|
55
54
|
}
|
|
56
55
|
}).watch();
|
|
57
56
|
return function () {
|
|
58
|
-
|
|
57
|
+
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
59
58
|
};
|
|
60
|
-
}, [pageData]);
|
|
59
|
+
}, [context.pageData]);
|
|
61
60
|
var handleSelect = useMemoizedFn(function (_key) {
|
|
62
61
|
clickBySelf.current = true;
|
|
63
|
-
|
|
62
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
64
63
|
id: _key
|
|
65
64
|
} : null);
|
|
66
65
|
});
|
|
@@ -73,9 +72,7 @@ var Outline = function Outline(_ref) {
|
|
|
73
72
|
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
74
73
|
type: "layout"
|
|
75
74
|
}),
|
|
76
|
-
title:
|
|
77
|
-
item: props
|
|
78
|
-
}),
|
|
75
|
+
title: props.name,
|
|
79
76
|
key: props.id
|
|
80
77
|
}, (children === null || children === void 0 ? void 0 : children.length) && children.map(function (_id) {
|
|
81
78
|
return render(childrenMap[_id]);
|
|
@@ -86,12 +83,12 @@ var Outline = function Outline(_ref) {
|
|
|
86
83
|
});
|
|
87
84
|
});
|
|
88
85
|
useDeepCompareLayoutEffect(function () {
|
|
89
|
-
if (!pageData) {
|
|
86
|
+
if (!context.pageData) {
|
|
90
87
|
return;
|
|
91
88
|
}
|
|
92
|
-
var _reduce = reduce(pageData.children, function (result, _id) {
|
|
93
|
-
var resultKey =
|
|
94
|
-
result[resultKey][_id] = pageData[_id];
|
|
89
|
+
var _reduce = reduce(context.pageData.children, function (result, _id) {
|
|
90
|
+
var resultKey = PAGE_CELL.includes(_id) ? 'page' : 'modal';
|
|
91
|
+
result[resultKey][_id] = context.pageData[_id];
|
|
95
92
|
if (!result[resultKey].children) {
|
|
96
93
|
result[resultKey].children = [];
|
|
97
94
|
}
|
|
@@ -107,13 +104,13 @@ var Outline = function Outline(_ref) {
|
|
|
107
104
|
page: render(page),
|
|
108
105
|
modal: render(modal)
|
|
109
106
|
});
|
|
110
|
-
}, [pageData]);
|
|
107
|
+
}, [context.pageData]);
|
|
111
108
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
109
|
className: styles['lc-painter-outline']
|
|
113
110
|
}, /*#__PURE__*/React.createElement("div", {
|
|
114
|
-
className: classNames(styles['page-node'], _defineProperty({}, styles['page-node-active'], selectedKey ===
|
|
111
|
+
className: classNames(styles['page-node'], _defineProperty({}, styles['page-node-active'], selectedKey === CELL_KEY.PAGE_ROOT)),
|
|
115
112
|
onClick: function onClick() {
|
|
116
|
-
return handleSelect(
|
|
113
|
+
return handleSelect(CELL_KEY.PAGE_ROOT);
|
|
117
114
|
}
|
|
118
115
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
119
116
|
type: "layout"
|
|
@@ -153,14 +150,14 @@ var Outline = function Outline(_ref) {
|
|
|
153
150
|
node = _ref4.node;
|
|
154
151
|
if (selected && node.props.pos.split('-').length === 2) {
|
|
155
152
|
// 选中节点是模态视图,则打开模态视图组件
|
|
156
|
-
|
|
153
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
157
154
|
toggle: true,
|
|
158
155
|
id: _key
|
|
159
156
|
});
|
|
160
157
|
handleSelect(_key);
|
|
161
158
|
} else if (!selected && node.props.pos.split('-').length === 2) {
|
|
162
159
|
// 取消选中节点是模态视图,则关闭模态视图
|
|
163
|
-
|
|
160
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
164
161
|
toggle: false,
|
|
165
162
|
id: _key
|
|
166
163
|
});
|
|
@@ -168,10 +165,10 @@ var Outline = function Outline(_ref) {
|
|
|
168
165
|
} else {
|
|
169
166
|
// 选中节点是模态视图下的子组件,则打开该组件的模态视图组件
|
|
170
167
|
handleSelect(node.props.eventKey);
|
|
171
|
-
var _split3 = split(getPathById(pageData, node.props.eventKey), '/'),
|
|
168
|
+
var _split3 = split(getPathById(context.pageData, node.props.eventKey), '/'),
|
|
172
169
|
_split4 = _slicedToArray(_split3, 1),
|
|
173
170
|
parentModal = _split4[0];
|
|
174
|
-
|
|
171
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
175
172
|
toggle: true,
|
|
176
173
|
id: parentModal
|
|
177
174
|
});
|
|
@@ -183,7 +180,7 @@ var Outline = function Outline(_ref) {
|
|
|
183
180
|
node = _ref6.node;
|
|
184
181
|
if (expanded && node.props.pos.split('-').length === 2) {
|
|
185
182
|
handleSelect(null);
|
|
186
|
-
|
|
183
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
187
184
|
toggle: true,
|
|
188
185
|
id: node.props.eventKey
|
|
189
186
|
});
|
|
@@ -202,7 +199,7 @@ var Outline = function Outline(_ref) {
|
|
|
202
199
|
var _ref9 = _slicedToArray(_ref7, 1),
|
|
203
200
|
_key = _ref9[0];
|
|
204
201
|
var node = _ref8.node;
|
|
205
|
-
|
|
202
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
206
203
|
toggle: false
|
|
207
204
|
});
|
|
208
205
|
handleSelect(node.props.eventKey);
|