@luck-design-biz/luckda 0.0.25-2 → 0.0.25-21
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/ComplexItem/index.js +92 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/LDActions/index.js +8 -10
- package/es/components/LDActions/index.less +68 -65
- package/es/components/LdAutoForm/index.js +57 -12
- package/es/components/LdFormList/index.js +50 -28
- package/es/components/LdGrid/index.js +23 -11
- package/es/components/LdGridForm/index.js +37 -12
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +59 -19
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/FromItems.js +177 -94
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +69 -28
- package/es/helper/index.less +7 -7
- package/es/helper/props_config.js +17 -0
- package/es/index.js +0 -1
- package/es/locales/zh-CN.js +22 -17
- package/es/lowcode/constants/api-url.js +269 -98
- package/es/lowcode/constants/event-topics.js +3 -0
- package/es/lowcode/constants/index.js +2 -1
- package/es/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +2 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/launcher.js +7 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +4 -4
- package/es/lowcode/engine/meta/button.props.json +3 -3
- package/es/lowcode/engine/meta/cardlist.props.json +13 -3
- package/es/lowcode/engine/meta/components-list.json +116 -8
- package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/es/lowcode/engine/meta/dialog.props.json +79 -42
- package/es/lowcode/engine/meta/drawer.props.json +8 -20
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/es/lowcode/engine/meta/fielddate.props.json +130 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddict.props.json +127 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/es/lowcode/engine/meta/fielduser.props.json +165 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/es/lowcode/engine/meta/form.props.default.json +2 -2
- package/es/lowcode/engine/meta/form.props.json +36 -16
- package/es/lowcode/engine/meta/imex.props.default.json +8 -1
- package/es/lowcode/engine/meta/imex.props.json +54 -22
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +12 -6
- package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +4 -4
- package/es/lowcode/engine/meta/table.props.default.json +2 -1
- package/es/lowcode/engine/meta/table.props.json +27 -14
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +7 -5
- package/es/lowcode/engine/meta/tree.props.json +112 -55
- package/es/lowcode/engine/provider/ContextProvider/index.js +104 -86
- package/es/lowcode/engine/provider/ContextProvider/usePageState.js +21 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +96 -49
- package/es/lowcode/engine/tools/dataProcess.js +80 -76
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +92 -7
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/useCombinedRefs.js +14 -0
- package/es/lowcode/engine/tools/usePageDataStore.js +350 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/index.js +1 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +8 -5
- package/es/lowcode/painter/DesignOperator.js +111 -85
- package/es/lowcode/painter/DesignToolbar.js +85 -47
- package/es/lowcode/painter/Outline.js +12 -10
- package/es/lowcode/painter/Panel.js +85 -45
- package/es/lowcode/painter/components/ActionBindModal.js +45 -28
- package/es/lowcode/painter/components/AdvancePanel.js +37 -21
- package/es/lowcode/painter/components/AttrsPanel.js +40 -29
- 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 +1 -1
- package/es/lowcode/painter/components/FieldSelector.js +26 -13
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/PreviewIframe.js +19 -0
- package/es/lowcode/painter/components/RuleInput.js +30 -31
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- 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 +48 -42
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
- package/es/lowcode/painter/components/field-setting/SettingUI.js +158 -77
- package/es/lowcode/painter/components/field-setting/index.js +32 -65
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +11 -17
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/es/lowcode/painter/panel-section/FieldsSetting.js +72 -54
- package/es/lowcode/painter/panel-section/I18nInput.js +2 -1
- 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/ImpExp.js +131 -37
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +124 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +112 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +28 -112
- 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 +4 -4
- 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 +3 -3
- 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 +22 -16
- package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/es/lowcode/painter/style/action-bind-modal.less +102 -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 +159 -152
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +10 -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 +95 -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/page-layout-display.less +28 -0
- 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/split-display.less +18 -27
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/style/treedragdrop.less +19 -19
- package/es/lowcode/view/Canvas.js +34 -8
- package/es/lowcode/view/Page.js +2 -4
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -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 +35 -39
- 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 +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/es/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/es/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/es/lowcode/view/lc-components/Form/index.js +345 -80
- package/es/lowcode/view/lc-components/Form/index.less +4 -4
- package/es/lowcode/view/lc-components/Form/meta.json +610 -599
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
- package/es/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +12 -15
- package/es/lowcode/view/lc-components/JSX/index.js +5 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Layout/index.js +19 -17
- 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/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Link/index.js +3 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +55 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +11 -10
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +8 -6
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +68 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/index.js +37 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Section/index.js +6 -3
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +107 -107
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Split/index.js +8 -9
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +425 -0
- package/es/lowcode/view/lc-components/Table/index.js +426 -202
- package/es/lowcode/view/lc-components/Table/meta.json +451 -399
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -18
- package/es/lowcode/view/lc-components/Tabs/index.js +52 -37
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Text/index.js +3 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tree/index.js +173 -119
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/es/lowcode/view/lc-components/Wrapper.js +11 -12
- 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 +7 -7
- package/es/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/gridForm.js +3 -2
- package/es/upload/Form/index.js +2 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +20 -21
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +37 -24
- package/es/utils/grid.js +10 -7
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +68 -65
- package/lib/components/LdAutoForm/index.js +56 -11
- package/lib/components/LdFormList/index.js +49 -27
- package/lib/components/LdGrid/index.js +23 -11
- package/lib/components/LdGridForm/index.js +35 -10
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +57 -17
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +67 -27
- package/lib/helper/index.less +7 -7
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +1 -9
- package/lib/locales/zh-CN.js +22 -17
- package/lib/lowcode/constants/api-url.js +270 -97
- package/lib/lowcode/constants/event-topics.js +4 -1
- package/lib/lowcode/constants/index.js +3 -2
- package/lib/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +4 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/launcher.js +13 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +4 -4
- package/lib/lowcode/engine/meta/button.props.json +3 -3
- package/lib/lowcode/engine/meta/cardlist.props.json +13 -3
- package/lib/lowcode/engine/meta/components-list.json +116 -8
- package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/lib/lowcode/engine/meta/dialog.props.json +79 -42
- package/lib/lowcode/engine/meta/drawer.props.json +8 -20
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +130 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +165 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/lib/lowcode/engine/meta/form.props.default.json +2 -2
- package/lib/lowcode/engine/meta/form.props.json +36 -16
- package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
- package/lib/lowcode/engine/meta/imex.props.json +54 -22
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +12 -6
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +4 -4
- package/lib/lowcode/engine/meta/table.props.default.json +2 -1
- package/lib/lowcode/engine/meta/table.props.json +27 -14
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +7 -5
- package/lib/lowcode/engine/meta/tree.props.json +112 -55
- package/lib/lowcode/engine/provider/ContextProvider/index.js +120 -86
- package/lib/lowcode/engine/provider/ContextProvider/usePageState.js +28 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +93 -46
- package/lib/lowcode/engine/tools/dataProcess.js +80 -76
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +96 -6
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/useCombinedRefs.js +20 -0
- package/lib/lowcode/engine/tools/usePageDataStore.js +357 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +7 -4
- package/lib/lowcode/painter/DesignOperator.js +108 -82
- package/lib/lowcode/painter/DesignToolbar.js +83 -45
- package/lib/lowcode/painter/Outline.js +10 -8
- package/lib/lowcode/painter/Panel.js +83 -43
- package/lib/lowcode/painter/components/ActionBindModal.js +42 -25
- package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
- package/lib/lowcode/painter/components/AttrsPanel.js +39 -28
- 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 +1 -1
- package/lib/lowcode/painter/components/FieldSelector.js +26 -13
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/PreviewIframe.js +26 -0
- package/lib/lowcode/painter/components/RuleInput.js +30 -31
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- 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 +48 -42
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +155 -74
- package/lib/lowcode/painter/components/field-setting/index.js +32 -65
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +10 -16
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +69 -51
- package/lib/lowcode/painter/panel-section/I18nInput.js +2 -1
- 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/ImpExp.js +131 -36
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +130 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +120 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +27 -111
- 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 +4 -4
- 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 +7 -6
- 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 +22 -16
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -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 +159 -152
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +10 -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 +95 -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/page-layout-display.less +28 -0
- 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/split-display.less +18 -27
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/style/treedragdrop.less +19 -19
- package/lib/lowcode/view/Canvas.js +34 -7
- package/lib/lowcode/view/Page.js +2 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
- 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 +35 -39
- 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 +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/lib/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/lib/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/lib/lowcode/view/lc-components/Form/index.js +341 -76
- package/lib/lowcode/view/lc-components/Form/index.less +4 -4
- package/lib/lowcode/view/lc-components/Form/meta.json +610 -599
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
- package/lib/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +13 -16
- package/lib/lowcode/view/lc-components/JSX/index.js +5 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Layout/index.js +19 -17
- 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/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Link/index.js +3 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +55 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +9 -8
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +7 -5
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +76 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/index.js +45 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Section/index.js +6 -3
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +5 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +433 -0
- package/lib/lowcode/view/lc-components/Table/index.js +422 -198
- package/lib/lowcode/view/lc-components/Table/meta.json +451 -399
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +12 -19
- package/lib/lowcode/view/lc-components/Tabs/index.js +51 -36
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Text/index.js +3 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +170 -116
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/lib/lowcode/view/lc-components/Wrapper.js +12 -12
- 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 +7 -7
- package/lib/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/gridForm.js +3 -2
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +20 -21
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +37 -24
- package/lib/utils/grid.js +10 -7
- package/lowcode.js +1 -1
- package/package.json +173 -171
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
|
@@ -13,15 +13,14 @@ var _ahooks = require("ahooks");
|
|
|
13
13
|
var _antd = require("luck-design/antd");
|
|
14
14
|
var _utils = require("@luck-design-biz/base/utils");
|
|
15
15
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
16
|
-
var _dataProcess = require("../engine/tools/dataProcess");
|
|
17
16
|
var _constants = require("../constants");
|
|
18
17
|
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
19
18
|
var _MODAL_COMPONENT_ = ['Dialog', 'Drawer'];
|
|
20
|
-
var getOperatorStyle = function getOperatorStyle(
|
|
19
|
+
var getOperatorStyle = function getOperatorStyle(canvas, cellNode) {
|
|
21
20
|
if (!cellNode) return {};
|
|
22
|
-
var
|
|
23
|
-
pageLeft =
|
|
24
|
-
pageTop =
|
|
21
|
+
var _canvas$getBoundingCl = canvas.getBoundingClientRect(),
|
|
22
|
+
pageLeft = _canvas$getBoundingCl.left,
|
|
23
|
+
pageTop = _canvas$getBoundingCl.top;
|
|
25
24
|
var _cellNode$getBounding = cellNode.getBoundingClientRect(),
|
|
26
25
|
cellNodeLeft = _cellNode$getBounding.left,
|
|
27
26
|
cellNodeTop = _cellNode$getBounding.top;
|
|
@@ -33,14 +32,10 @@ var getOperatorStyle = function getOperatorStyle(page, cellNode) {
|
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
var DesignOperator = function DesignOperator(_ref) {
|
|
36
|
-
var
|
|
37
|
-
var
|
|
35
|
+
var _getElement, _getElement2;
|
|
36
|
+
var canvas = _ref.canvas;
|
|
38
37
|
var context = (0, _ContextProvider.useContext)();
|
|
39
|
-
var
|
|
40
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
41
|
-
pageData = _usePageData2[0],
|
|
42
|
-
setPageData = _usePageData2[1].setPageData;
|
|
43
|
-
var size = (0, _ahooks.useSize)(target);
|
|
38
|
+
var size = (0, _ahooks.useSize)(canvas);
|
|
44
39
|
var _useState = (0, _react.useState)((0, _utils.suid)()),
|
|
45
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
41
|
positionKey = _useState2[0],
|
|
@@ -54,48 +49,53 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
54
49
|
setOperatorId = _useSetState2[1];
|
|
55
50
|
var lastSelectorId = (0, _ahooks.useLatest)(operatorId.selector);
|
|
56
51
|
var currentModal = (0, _react.useRef)(null);
|
|
57
|
-
var
|
|
52
|
+
var getElement = (0, _ahooks.useMemoizedFn)(function (_target) {
|
|
58
53
|
var _context$componentMap;
|
|
59
|
-
return (_context$componentMap = context.componentMap.get(
|
|
54
|
+
return (0, _lodash.isString)(_target) ? (_context$componentMap = context.componentMap.get(_target)) === null || _context$componentMap === void 0 ? void 0 : _context$componentMap.api.getSelfDom() : _target;
|
|
60
55
|
});
|
|
61
|
-
var handleSelect = (0, _ahooks.useMemoizedFn)(function (
|
|
62
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE,
|
|
63
|
-
|
|
56
|
+
var handleSelect = (0, _ahooks.useMemoizedFn)(function (_target) {
|
|
57
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, _target ? {
|
|
58
|
+
target: _target
|
|
64
59
|
} : null);
|
|
65
60
|
});
|
|
66
|
-
var handleHover = (0, _ahooks.useMemoizedFn)(function (
|
|
67
|
-
context.$publisher(context.topics.COMPONENT_HOVER,
|
|
68
|
-
|
|
61
|
+
var handleHover = (0, _ahooks.useMemoizedFn)(function (_target) {
|
|
62
|
+
context.$publisher(context.topics.COMPONENT_HOVER, _target ? {
|
|
63
|
+
target: _target
|
|
69
64
|
} : null);
|
|
70
65
|
});
|
|
71
66
|
var handleDelete = (0, _ahooks.useMemoizedFn)(function (_ref2) {
|
|
72
67
|
var id = _ref2.id;
|
|
73
68
|
context.$publisher(context.topics.COMPONENT_DELETE, {
|
|
74
|
-
id: id
|
|
75
|
-
pageData: pageData
|
|
69
|
+
id: id
|
|
76
70
|
});
|
|
77
71
|
});
|
|
78
72
|
var addComponent = (0, _ahooks.useMemoizedFn)(function (data, targetId) {
|
|
79
|
-
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
80
|
-
var _id = "".concat(data.component.toLowerCase(), "_").concat((0, _utils.suid)());
|
|
81
|
-
(0, _dataProcess.add)(pageData, targetId, _id, json);
|
|
82
73
|
context.$subscriber(context.topics.COMPONENT_MOUNT).once(function (_ref3) {
|
|
83
74
|
var mountCompId = _ref3.id;
|
|
84
75
|
if (mountCompId === _id) {
|
|
85
76
|
context.$publisher(context.topics.COMPONENT_APPEND, {
|
|
86
|
-
id: _id,
|
|
87
|
-
pageData: pageData
|
|
88
|
-
});
|
|
89
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
90
77
|
id: _id
|
|
91
78
|
});
|
|
79
|
+
handleSelect(_id);
|
|
92
80
|
}
|
|
93
81
|
}).watch();
|
|
94
|
-
|
|
82
|
+
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
83
|
+
var _id = "".concat(data.component.toLowerCase(), "_").concat((0, _utils.suid)());
|
|
84
|
+
(0, _ContextProvider.addNode)(targetId, _id, json);
|
|
95
85
|
});
|
|
96
86
|
var acticeProps = (0, _ahooks.useCreation)(function () {
|
|
97
87
|
if (!operatorId.selector) return null;
|
|
98
|
-
var
|
|
88
|
+
var _id = (0, _lodash.isNil)(operatorId.selectorTarget) ? operatorId.selector : operatorId.selectorTarget.ancestorId;
|
|
89
|
+
var levelNodes = context.componentMap.get(_id).api.getLevelNodes();
|
|
90
|
+
if (operatorId.selectorTarget) {
|
|
91
|
+
var _operatorId$selectorT = operatorId.selectorTarget,
|
|
92
|
+
id = _operatorId$selectorT.id,
|
|
93
|
+
label = _operatorId$selectorT.label;
|
|
94
|
+
levelNodes.push({
|
|
95
|
+
id: id,
|
|
96
|
+
name: label
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
99
|
return {
|
|
100
100
|
props: (0, _lodash.last)(levelNodes),
|
|
101
101
|
menu: /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -117,50 +117,70 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
117
117
|
}))
|
|
118
118
|
};
|
|
119
119
|
}, [operatorId.selector]);
|
|
120
|
-
var
|
|
121
|
-
|
|
120
|
+
var lastDetectorName = (0, _ahooks.useCreation)(function () {
|
|
121
|
+
var _last;
|
|
122
|
+
return operatorId.detector && (0, _lodash.isString)(operatorId.detector) ? (_last = (0, _lodash.last)(context.componentMap.get(operatorId.detector).api.getLevelNodes())) === null || _last === void 0 ? void 0 : _last.name : void 0;
|
|
122
123
|
}, [operatorId.detector]);
|
|
123
124
|
(0, _ahooks.useEventListener)('mousemove', function (event) {
|
|
124
125
|
var elem = event.target;
|
|
126
|
+
var targetFormItem = elem.closest("[".concat(_constants.LC_COMPONENT_UNIT_KEY, "=\"").concat(_constants.LC_FORMITEM_UNIT, "\"]"));
|
|
127
|
+
if (targetFormItem) {
|
|
128
|
+
handleHover(targetFormItem);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
125
131
|
var targetCell = elem.closest("[".concat(_constants.LC_COMPONENT_UNIT_KEY, "=\"").concat(_constants.LC_COMPONENT_UNIT, "\"]"));
|
|
126
132
|
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
127
133
|
if (targetCellId && targetCellId !== operatorId.detector && targetCellId !== operatorId.selector) {
|
|
128
|
-
|
|
129
|
-
detector: targetCellId
|
|
130
|
-
});
|
|
131
|
-
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
132
|
-
id: targetCellId
|
|
133
|
-
});
|
|
134
|
+
handleHover(targetCellId);
|
|
134
135
|
} else if (!targetCell || targetCellId === operatorId.selector) {
|
|
135
|
-
|
|
136
|
-
detector: null
|
|
137
|
-
});
|
|
138
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
136
|
+
handleHover();
|
|
139
137
|
}
|
|
140
138
|
}, {
|
|
141
|
-
target:
|
|
139
|
+
target: canvas
|
|
142
140
|
});
|
|
143
141
|
(0, _ahooks.useEventListener)('mouseleave', function () {
|
|
144
142
|
if (operatorId.detector) {
|
|
145
|
-
|
|
146
|
-
detector: null
|
|
147
|
-
});
|
|
148
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
143
|
+
handleHover();
|
|
149
144
|
}
|
|
150
145
|
}, {
|
|
151
|
-
target:
|
|
146
|
+
target: canvas
|
|
152
147
|
});
|
|
153
148
|
(0, _ahooks.useEventListener)('click', function (event) {
|
|
154
149
|
var elem = event.target;
|
|
150
|
+
var targetFormItem = elem.closest("[".concat(_constants.LC_COMPONENT_UNIT_KEY, "=\"").concat(_constants.LC_FORMITEM_UNIT, "\"]"));
|
|
151
|
+
if (targetFormItem) {
|
|
152
|
+
var _fieldName = targetFormItem.getAttribute('data-__field');
|
|
153
|
+
var _fieldLabel = targetFormItem.getAttribute('data-__label');
|
|
154
|
+
var _masterId = targetFormItem.getAttribute('data-__master');
|
|
155
|
+
var _ancestorId = targetFormItem.closest("[".concat(_constants.LC_COMPONENT_UNIT_KEY, "=\"").concat(_constants.LC_COMPONENT_UNIT, "\"]")).getAttribute('id');
|
|
156
|
+
var _ancestor = context.componentMap.get(_ancestorId);
|
|
157
|
+
var ancestorData = _ancestor.api.getSelfData();
|
|
158
|
+
var blockIndex = ancestorData.props.blocks.findIndex(function (b) {
|
|
159
|
+
return b.id === _masterId;
|
|
160
|
+
});
|
|
161
|
+
var fieldIndex = ancestorData.props.blocks[blockIndex].fields.findIndex(function (f) {
|
|
162
|
+
return f.field === _fieldName;
|
|
163
|
+
});
|
|
164
|
+
var _target = {
|
|
165
|
+
element: targetFormItem,
|
|
166
|
+
id: "".concat(_ancestorId, ".").concat(_masterId, ".").concat(_fieldName),
|
|
167
|
+
field: _fieldName,
|
|
168
|
+
label: _fieldLabel,
|
|
169
|
+
masterId: _masterId,
|
|
170
|
+
ancestorId: _ancestorId,
|
|
171
|
+
keyPath: "blocks[".concat(blockIndex, "].fields[").concat(fieldIndex, "]")
|
|
172
|
+
};
|
|
173
|
+
handleHover();
|
|
174
|
+
handleSelect(_target);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
155
177
|
var targetCell = elem.closest("[".concat(_constants.LC_COMPONENT_UNIT_KEY, "=\"").concat(_constants.LC_COMPONENT_UNIT, "\"]"));
|
|
156
178
|
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
157
179
|
if (!targetCellId || targetCellId === operatorId.selector) return;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
id: targetCell.id
|
|
161
|
-
});
|
|
180
|
+
handleHover();
|
|
181
|
+
handleSelect(targetCell.id);
|
|
162
182
|
}, {
|
|
163
|
-
target:
|
|
183
|
+
target: canvas
|
|
164
184
|
});
|
|
165
185
|
(0, _react.useEffect)(function () {
|
|
166
186
|
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (_ref4) {
|
|
@@ -172,9 +192,7 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
172
192
|
toggle: true,
|
|
173
193
|
id: compId
|
|
174
194
|
});
|
|
175
|
-
|
|
176
|
-
id: compId
|
|
177
|
-
});
|
|
195
|
+
handleSelect(compId);
|
|
178
196
|
}).watch();
|
|
179
197
|
addComponent(data, _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT);
|
|
180
198
|
return;
|
|
@@ -190,39 +208,49 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
190
208
|
addComponent(data, lastSelectorId.current);
|
|
191
209
|
}).watch();
|
|
192
210
|
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
193
|
-
if (payload.
|
|
194
|
-
detector: payload.
|
|
211
|
+
if (payload.target) setOperatorId({
|
|
212
|
+
detector: payload.target
|
|
195
213
|
});else setOperatorId({
|
|
196
214
|
detector: null
|
|
197
215
|
});
|
|
198
216
|
}).watch();
|
|
199
217
|
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
200
|
-
if (payload.
|
|
201
|
-
|
|
202
|
-
node =
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
218
|
+
if (payload.target) {
|
|
219
|
+
if ((0, _lodash.isString)(payload.target)) {
|
|
220
|
+
var node = context.componentMap.get(payload.target).api.getSelfData();
|
|
221
|
+
setOperatorId({
|
|
222
|
+
selector: payload.target,
|
|
223
|
+
selectorTarget: null,
|
|
224
|
+
deletable: !node || node.props.buildIn !== true,
|
|
225
|
+
detector: null
|
|
226
|
+
});
|
|
227
|
+
} else {
|
|
228
|
+
setOperatorId({
|
|
229
|
+
selector: payload.target.id,
|
|
230
|
+
selectorTarget: payload.target,
|
|
231
|
+
deletable: false,
|
|
232
|
+
detector: null
|
|
233
|
+
});
|
|
234
|
+
}
|
|
208
235
|
} else {
|
|
209
236
|
setOperatorId({
|
|
210
|
-
selector: null
|
|
237
|
+
selector: null,
|
|
238
|
+
selectorTarget: null
|
|
211
239
|
});
|
|
212
240
|
}
|
|
213
241
|
}).watch();
|
|
214
242
|
var cmtid = context.$subscriber(context.topics.COMPONENT_MODAL_TOGGLE).on(function (_ref6) {
|
|
215
243
|
var toggle = _ref6.toggle,
|
|
216
244
|
id = _ref6.id;
|
|
217
|
-
if (toggle) {
|
|
218
|
-
|
|
245
|
+
if (toggle && id !== currentModal.current) {
|
|
246
|
+
canvas.current.style.setProperty('overflow', 'hidden');
|
|
219
247
|
var _modal = context.componentMap.get(id);
|
|
220
248
|
var _prevModal = currentModal.current ? context.componentMap.get(currentModal.current) : null;
|
|
221
249
|
_prevModal === null || _prevModal === void 0 || _prevModal.api.doClose();
|
|
222
250
|
_modal.api.doOpen();
|
|
223
251
|
currentModal.current = id;
|
|
224
|
-
} else {
|
|
225
|
-
|
|
252
|
+
} else if (!toggle) {
|
|
253
|
+
canvas.current.style.removeProperty('overflow');
|
|
226
254
|
var _id = id || currentModal.current;
|
|
227
255
|
if (_id) {
|
|
228
256
|
var _modal2 = context.componentMap.get(_id);
|
|
@@ -232,13 +260,11 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
232
260
|
}
|
|
233
261
|
}).watch();
|
|
234
262
|
var cdid = context.$subscriber(context.topics.COMPONENT_DELETE).on(function (_ref7) {
|
|
235
|
-
var id = _ref7.id
|
|
236
|
-
pageData = _ref7.pageData;
|
|
263
|
+
var id = _ref7.id;
|
|
237
264
|
if (lastSelectorId.current === id) {
|
|
238
|
-
|
|
265
|
+
handleSelect();
|
|
239
266
|
}
|
|
240
|
-
(0,
|
|
241
|
-
setPageData(pageData);
|
|
267
|
+
(0, _ContextProvider.deleteNode)(id);
|
|
242
268
|
});
|
|
243
269
|
return function () {
|
|
244
270
|
context.$unsubscriber(context.topics.COMPONENT_SETTING_CLICK, csid);
|
|
@@ -259,22 +285,22 @@ var DesignOperator = function DesignOperator(_ref) {
|
|
|
259
285
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, operatorId.detector && /*#__PURE__*/_react.default.createElement("div", {
|
|
260
286
|
id: "lc-detector",
|
|
261
287
|
className: _design.default['lc-painter-design-detector'],
|
|
262
|
-
style: getOperatorStyle(
|
|
288
|
+
style: getOperatorStyle(canvas.current, getElement(operatorId.detector))
|
|
263
289
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
264
290
|
className: _design.default['lc-painter-design-detector-name'],
|
|
265
291
|
style: {
|
|
266
|
-
top: ((
|
|
292
|
+
top: ((_getElement = getElement(operatorId.detector)) === null || _getElement === void 0 ? void 0 : _getElement.offsetTop) < 23 ? 0 : '-23px'
|
|
267
293
|
}
|
|
268
|
-
},
|
|
294
|
+
}, lastDetectorName ? "".concat(lastDetectorName, "(").concat(operatorId.detector, ")") : null)), operatorId.selector && /*#__PURE__*/_react.default.createElement("div", {
|
|
269
295
|
id: "lc-selector",
|
|
270
296
|
key: "".concat((size === null || size === void 0 ? void 0 : size.width) || 0, "-").concat((size === null || size === void 0 ? void 0 : size.height) || 0, "-").concat(positionKey),
|
|
271
297
|
className: _design.default['lc-painter-design-selector'],
|
|
272
|
-
style: getOperatorStyle(
|
|
298
|
+
style: getOperatorStyle(canvas.current, getElement((0, _lodash.isNil)(operatorId.selectorTarget) ? operatorId.selector : operatorId.selectorTarget.element))
|
|
273
299
|
}, acticeProps && /*#__PURE__*/_react.default.createElement("div", {
|
|
274
300
|
className: _design.default['lc-borders-actions'],
|
|
275
301
|
style: acticeProps.props.id === _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT ? {
|
|
276
302
|
top: 0
|
|
277
|
-
} : ((
|
|
303
|
+
} : ((_getElement2 = getElement((0, _lodash.isNil)(operatorId.selectorTarget) ? operatorId.selector : operatorId.selectorTarget.element)) === null || _getElement2 === void 0 ? void 0 : _getElement2.offsetTop) < 23 ? {
|
|
278
304
|
bottom: '-23px'
|
|
279
305
|
} : {
|
|
280
306
|
top: '-23px'
|
|
@@ -21,10 +21,11 @@ var _antd = require("luck-design/antd");
|
|
|
21
21
|
var _utils = require("@luck-design-biz/base/utils");
|
|
22
22
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
23
23
|
var _JsonEditor = _interopRequireDefault(require("../painter/components/code-editor/JsonEditor"));
|
|
24
|
-
var
|
|
24
|
+
var _PreviewIframe = _interopRequireDefault(require("./components/PreviewIframe"));
|
|
25
25
|
var _constants = require("../constants");
|
|
26
26
|
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
27
27
|
var _apiUrl = require("../constants/api-url");
|
|
28
|
+
var _helper = require("../engine/tools/helper");
|
|
28
29
|
var _services = require("@luck-design-biz/base/lib/sys/services");
|
|
29
30
|
var _excluded = ["key", "label"];
|
|
30
31
|
var DesignToolbar = function DesignToolbar(_ref) {
|
|
@@ -33,17 +34,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
33
34
|
var location = (0, _umi.useLocation)();
|
|
34
35
|
var editorRef = (0, _react.useRef)();
|
|
35
36
|
var context = (0, _ContextProvider.useContext)();
|
|
36
|
-
var
|
|
37
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
38
|
-
pageData = _usePageData2[0],
|
|
39
|
-
_usePageData2$ = _usePageData2[1],
|
|
40
|
-
setPageData = _usePageData2$.setPageData,
|
|
41
|
-
back = _usePageData2$.back,
|
|
42
|
-
forward = _usePageData2$.forward,
|
|
43
|
-
backLength = _usePageData2$.backLength,
|
|
44
|
-
forwardLength = _usePageData2$.forwardLength;
|
|
45
|
-
var _ref2 = (0, _ContextProvider.useRemoteSource)() || {},
|
|
46
|
-
pageinfo = _ref2.pageinfo;
|
|
37
|
+
var pageData = (0, _ContextProvider.useGet)();
|
|
47
38
|
var _useState = (0, _react.useState)(null),
|
|
48
39
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
40
|
langList = _useState2[0],
|
|
@@ -64,6 +55,18 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
64
55
|
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
65
56
|
userOptions = _useState10[0],
|
|
66
57
|
setUserOptions = _useState10[1];
|
|
58
|
+
var _useTemporalStore = (0, _ContextProvider.useTemporalStore)(function (state) {
|
|
59
|
+
return {
|
|
60
|
+
undo: state.undo,
|
|
61
|
+
redo: state.redo,
|
|
62
|
+
pastStates: state.pastStates,
|
|
63
|
+
futureStates: state.futureStates
|
|
64
|
+
};
|
|
65
|
+
}),
|
|
66
|
+
canUndo = _useTemporalStore.canUndo,
|
|
67
|
+
canRedo = _useTemporalStore.canRedo,
|
|
68
|
+
undo = _useTemporalStore.undo,
|
|
69
|
+
redo = _useTemporalStore.redo;
|
|
67
70
|
var _useCookieState = (0, _ahooks.useCookieState)(_constants.COOKIE_VIRTUAL_ACCOUNT_KEY),
|
|
68
71
|
_useCookieState2 = (0, _slicedToArray2.default)(_useCookieState, 2),
|
|
69
72
|
userId = _useCookieState2[0],
|
|
@@ -72,7 +75,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
72
75
|
manual: true
|
|
73
76
|
}),
|
|
74
77
|
clearCacheLoading = _useRequest.loading,
|
|
75
|
-
runClearCache = _useRequest.
|
|
78
|
+
runClearCache = _useRequest.runAsync;
|
|
76
79
|
var _useRequest2 = (0, _ahooks.useRequest)(_apiUrl.fetchUpdatePageData, {
|
|
77
80
|
manual: true,
|
|
78
81
|
debounceWait: 300
|
|
@@ -80,8 +83,8 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
80
83
|
updatePageDataLoading = _useRequest2.loading,
|
|
81
84
|
runAsync = _useRequest2.runAsync;
|
|
82
85
|
(0, _react.useEffect)(function () {
|
|
83
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (
|
|
84
|
-
var _langList =
|
|
86
|
+
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
87
|
+
var _langList = _ref2.langList;
|
|
85
88
|
return setLangList(_langList);
|
|
86
89
|
}).watch();
|
|
87
90
|
return function () {
|
|
@@ -94,25 +97,43 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
94
97
|
}
|
|
95
98
|
}, [showPreview]);
|
|
96
99
|
var handleSave = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
97
|
-
var _pageinfo$relationshi;
|
|
98
100
|
var _yield$runAsync, code;
|
|
99
101
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
100
102
|
while (1) switch (_context.prev = _context.next) {
|
|
101
103
|
case 0:
|
|
102
|
-
|
|
104
|
+
_antd.message.loading({
|
|
105
|
+
content: (0, _utils.formatMessage)({
|
|
106
|
+
id: 'luckda.lowcode.design.toolbar.save.on',
|
|
107
|
+
label: '保存中...'
|
|
108
|
+
}),
|
|
109
|
+
key: 'saveLoading'
|
|
110
|
+
});
|
|
111
|
+
_context.next = 3;
|
|
103
112
|
return runAsync({
|
|
104
113
|
pageData: JSON.stringify(pageData),
|
|
105
|
-
pageCode:
|
|
114
|
+
pageCode: (0, _helper.getLDMetaAttr)('pageCode')
|
|
106
115
|
});
|
|
107
|
-
case
|
|
116
|
+
case 3:
|
|
108
117
|
_yield$runAsync = _context.sent;
|
|
109
118
|
code = _yield$runAsync.code;
|
|
110
119
|
if (code === 1) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
_antd.message.success({
|
|
121
|
+
content: (0, _utils.formatMessage)({
|
|
122
|
+
id: 'luckda.lowcode.design.toolbar.save.success',
|
|
123
|
+
label: '保存成功'
|
|
124
|
+
}),
|
|
125
|
+
key: 'saveLoading'
|
|
126
|
+
});
|
|
127
|
+
} else {
|
|
128
|
+
_antd.message.error({
|
|
129
|
+
content: (0, _utils.formatMessage)({
|
|
130
|
+
id: 'luckda.lowcode.design.toolbar.save.error',
|
|
131
|
+
label: '保存失败'
|
|
132
|
+
}),
|
|
133
|
+
key: 'saveLoading'
|
|
134
|
+
});
|
|
114
135
|
}
|
|
115
|
-
case
|
|
136
|
+
case 6:
|
|
116
137
|
case "end":
|
|
117
138
|
return _context.stop();
|
|
118
139
|
}
|
|
@@ -134,7 +155,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
134
155
|
zIndex: 3000,
|
|
135
156
|
onOk: function onOk() {
|
|
136
157
|
return runClearCache({
|
|
137
|
-
moduleCode:
|
|
158
|
+
moduleCode: (0, _helper.getLDMetaAttr)('moduleCode')
|
|
138
159
|
});
|
|
139
160
|
}
|
|
140
161
|
});
|
|
@@ -143,9 +164,10 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
143
164
|
var code = editorRef.current.editor.getValue();
|
|
144
165
|
try {
|
|
145
166
|
var data = JSON.parse(code);
|
|
146
|
-
|
|
167
|
+
(0, _ContextProvider.resetPageData)(data);
|
|
147
168
|
setShow(false);
|
|
148
169
|
} catch (e) {
|
|
170
|
+
console.error(e);
|
|
149
171
|
_antd.message.warning((0, _utils.formatMessage)({
|
|
150
172
|
id: 'luckda.lowcode.error.pagedata',
|
|
151
173
|
label: '页面数据错误'
|
|
@@ -153,7 +175,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
153
175
|
}
|
|
154
176
|
});
|
|
155
177
|
var _useDebounceFn = (0, _ahooks.useDebounceFn)( /*#__PURE__*/function () {
|
|
156
|
-
var
|
|
178
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(value) {
|
|
157
179
|
var _yield$readAllUser, code, list, detail;
|
|
158
180
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
159
181
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -183,7 +205,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
183
205
|
}, _callee2);
|
|
184
206
|
}));
|
|
185
207
|
return function (_x) {
|
|
186
|
-
return
|
|
208
|
+
return _ref4.apply(this, arguments);
|
|
187
209
|
};
|
|
188
210
|
}(), {
|
|
189
211
|
wait: 500
|
|
@@ -221,9 +243,9 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
221
243
|
})), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
222
244
|
type: "vertical"
|
|
223
245
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
224
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.disabled,
|
|
246
|
+
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.disabled, !canUndo)),
|
|
225
247
|
onClick: function onClick() {
|
|
226
|
-
return
|
|
248
|
+
return canUndo && undo();
|
|
227
249
|
}
|
|
228
250
|
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
229
251
|
viewBox: "0 0 1024 1024",
|
|
@@ -236,9 +258,9 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
236
258
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
237
259
|
d: "M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z"
|
|
238
260
|
}))), /*#__PURE__*/_react.default.createElement("span", {
|
|
239
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.disabled,
|
|
261
|
+
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.disabled, !canRedo)),
|
|
240
262
|
onClick: function onClick() {
|
|
241
|
-
return
|
|
263
|
+
return canRedo && redo();
|
|
242
264
|
}
|
|
243
265
|
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
244
266
|
viewBox: "0 0 1024 1024",
|
|
@@ -257,7 +279,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
257
279
|
className: _design.default['toolbar-item'],
|
|
258
280
|
onClick: function onClick() {
|
|
259
281
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
260
|
-
|
|
282
|
+
target: _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT
|
|
261
283
|
});
|
|
262
284
|
}
|
|
263
285
|
}, (0, _utils.formatMessage)({
|
|
@@ -271,7 +293,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
271
293
|
fontSize: 12,
|
|
272
294
|
margin: '0 4px 0 2px'
|
|
273
295
|
},
|
|
274
|
-
|
|
296
|
+
disabled: clearCacheLoading,
|
|
275
297
|
onClick: handleClearCache
|
|
276
298
|
}, (0, _utils.formatMessage)({
|
|
277
299
|
id: 'luckda.lowcode.design.toolbar.clear',
|
|
@@ -282,18 +304,33 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
282
304
|
fontSize: 12,
|
|
283
305
|
margin: '0 4px 0 2px'
|
|
284
306
|
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
307
|
+
disabled: updatePageDataLoading,
|
|
308
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
|
|
309
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
|
310
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
311
|
+
case 0:
|
|
312
|
+
_context3.next = 2;
|
|
313
|
+
return handleSave();
|
|
314
|
+
case 2:
|
|
315
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
316
|
+
setShowPreview(true);
|
|
317
|
+
case 4:
|
|
318
|
+
case "end":
|
|
319
|
+
return _context3.stop();
|
|
320
|
+
}
|
|
321
|
+
}, _callee3);
|
|
322
|
+
}))
|
|
288
323
|
}, (0, _utils.formatMessage)({
|
|
289
324
|
id: 'luckda.lowcode.design.toolbar.preview',
|
|
290
325
|
label: '预览'
|
|
291
326
|
})), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
292
327
|
size: "small",
|
|
293
328
|
type: "primary",
|
|
329
|
+
disabled: updatePageDataLoading,
|
|
294
330
|
style: {
|
|
295
331
|
fontSize: 12,
|
|
296
|
-
padding: '0 7px 0 0'
|
|
332
|
+
padding: '0 7px 0 0',
|
|
333
|
+
marginLeft: 2
|
|
297
334
|
}
|
|
298
335
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
299
336
|
style: {
|
|
@@ -312,7 +349,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
312
349
|
return setShow(true);
|
|
313
350
|
}
|
|
314
351
|
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
315
|
-
type:
|
|
352
|
+
type: "eye"
|
|
316
353
|
})))), /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
317
354
|
visible: show,
|
|
318
355
|
width: 1024,
|
|
@@ -320,15 +357,15 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
320
357
|
return document.getElementById('lc-design-workspace');
|
|
321
358
|
},
|
|
322
359
|
zIndex: 3000,
|
|
323
|
-
bodyStyle: {
|
|
324
|
-
height: '70vh'
|
|
325
|
-
},
|
|
326
360
|
onOk: handleOk,
|
|
327
361
|
onCancel: function onCancel() {
|
|
328
362
|
return setShow(false);
|
|
329
363
|
}
|
|
330
364
|
}, /*#__PURE__*/_react.default.createElement(_JsonEditor.default, {
|
|
331
|
-
ref: editorRef
|
|
365
|
+
ref: editorRef,
|
|
366
|
+
style: {
|
|
367
|
+
height: '70vh'
|
|
368
|
+
}
|
|
332
369
|
}, JSON.stringify(pageData, null, '\t'))), /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
333
370
|
title: /*#__PURE__*/_react.default.createElement("div", {
|
|
334
371
|
id: "preview-drawer-header",
|
|
@@ -382,8 +419,9 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
382
419
|
})))),
|
|
383
420
|
placement: "bottom",
|
|
384
421
|
height: "94vh",
|
|
385
|
-
footer: false
|
|
386
|
-
zIndex
|
|
422
|
+
footer: false
|
|
423
|
+
// zIndex={3000}
|
|
424
|
+
,
|
|
387
425
|
headerStyle: {
|
|
388
426
|
padding: '0 48px 0 24px'
|
|
389
427
|
},
|
|
@@ -399,7 +437,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
399
437
|
getContainer: function getContainer() {
|
|
400
438
|
return document.getElementById('lc-design-workspace');
|
|
401
439
|
}
|
|
402
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
440
|
+
}, /*#__PURE__*/_react.default.createElement(_PreviewIframe.default, {
|
|
403
441
|
code: location.query.code,
|
|
404
442
|
userId: userId || 'no-user'
|
|
405
443
|
})));
|
|
@@ -27,9 +27,7 @@ var Outline = function Outline(_ref) {
|
|
|
27
27
|
var open = _ref.open;
|
|
28
28
|
var clickBySelf = (0, _react.useRef)(false);
|
|
29
29
|
var ctx = (0, _ContextProvider.useContext)();
|
|
30
|
-
var
|
|
31
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 1),
|
|
32
|
-
pageData = _usePageData2[0];
|
|
30
|
+
var pageData = (0, _ContextProvider.useGet)();
|
|
33
31
|
var _useState = (0, _react.useState)(null),
|
|
34
32
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
35
33
|
pageAndModal = _useState2[0],
|
|
@@ -50,18 +48,22 @@ var Outline = function Outline(_ref) {
|
|
|
50
48
|
var lastPageExpandedKeysRef = (0, _ahooks.useLatest)(pageExpandedKeys);
|
|
51
49
|
(0, _react.useEffect)(function () {
|
|
52
50
|
var _id = ctx.$subscriber(ctx.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
53
|
-
|
|
51
|
+
if (!(0, _lodash.isString)(payload.target)) {
|
|
52
|
+
setSelectedKey(null);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setSelectedKey(payload.target);
|
|
54
56
|
if (clickBySelf.current) {
|
|
55
57
|
clickBySelf.current = false;
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
|
-
var _split = (0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.
|
|
60
|
+
var _split = (0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.target), '/'),
|
|
59
61
|
_split2 = (0, _slicedToArray2.default)(_split, 1),
|
|
60
62
|
_root = _split2[0];
|
|
61
63
|
if (!_constants.LC_BUILDIN_UNIT_KEY_LIST.includes(_root)) {
|
|
62
|
-
setModalExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(latestModalExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.
|
|
64
|
+
setModalExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(latestModalExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.target), '/')))));
|
|
63
65
|
} else {
|
|
64
|
-
setPageExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(lastPageExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.
|
|
66
|
+
setPageExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(lastPageExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(pageData, payload.target), '/')))));
|
|
65
67
|
}
|
|
66
68
|
}).watch();
|
|
67
69
|
return function () {
|
|
@@ -71,7 +73,7 @@ var Outline = function Outline(_ref) {
|
|
|
71
73
|
var handleSelect = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
72
74
|
clickBySelf.current = true;
|
|
73
75
|
ctx.$publisher(ctx.topics.COMPONENT_ACTIVE, _key ? {
|
|
74
|
-
|
|
76
|
+
target: _key
|
|
75
77
|
} : null);
|
|
76
78
|
});
|
|
77
79
|
var render = (0, _ahooks.useMemoizedFn)(function (_ref2) {
|