@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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -19,7 +20,6 @@ var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
|
19
20
|
var _AttrsPanel = _interopRequireDefault(require("./components/AttrsPanel"));
|
|
20
21
|
var _StylePanel = _interopRequireDefault(require("./panel-section/StylePanel"));
|
|
21
22
|
var _AdvancePanel = _interopRequireDefault(require("./components/AdvancePanel"));
|
|
22
|
-
var _dataProcess = require("../engine/tools/dataProcess");
|
|
23
23
|
var _panel = _interopRequireDefault(require("./style/panel.less"));
|
|
24
24
|
var _constants = require("../constants");
|
|
25
25
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel';
|
|
@@ -43,6 +43,7 @@ var _TAB_LIST_ = [{
|
|
|
43
43
|
key: 'advance'
|
|
44
44
|
}];
|
|
45
45
|
var Panel = function Panel() {
|
|
46
|
+
var _activeNode$$target;
|
|
46
47
|
var activeTabRef = (0, _react.useRef)(null);
|
|
47
48
|
var underLineRef = (0, _react.useRef)(null);
|
|
48
49
|
var _useState = (0, _react.useState)(null),
|
|
@@ -54,73 +55,107 @@ var Panel = function Panel() {
|
|
|
54
55
|
activeTabKey = _useState4[0],
|
|
55
56
|
setActiveTabKey = _useState4[1];
|
|
56
57
|
var context = (0, _ContextProvider.useContext)();
|
|
57
|
-
var
|
|
58
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
59
|
-
pageData = _usePageData2[0],
|
|
60
|
-
setPageData = _usePageData2[1].setPageData;
|
|
58
|
+
var task = (0, _ContextProvider.useTask)('modify');
|
|
61
59
|
var meta = (0, _ahooks.useCreation)(function () {
|
|
60
|
+
if ((0, _lodash.isNil)(activeNode)) return null;
|
|
62
61
|
try {
|
|
63
|
-
|
|
62
|
+
var _meta = require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
63
|
+
if (!(0, _lodash.isNil)(activeNode === null || activeNode === void 0 ? void 0 : activeNode.$target)) {
|
|
64
|
+
var setValueKey = function setValueKey(items) {
|
|
65
|
+
items.forEach(function (item) {
|
|
66
|
+
if (item.next) {
|
|
67
|
+
setValueKey(item.next.props);
|
|
68
|
+
} else if (item.props) {
|
|
69
|
+
setValueKey(item.props);
|
|
70
|
+
} else {
|
|
71
|
+
item.valueKey = "".concat(activeNode.$target.keyPath, ".").concat(item.key);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
setValueKey(_meta.props);
|
|
76
|
+
}
|
|
77
|
+
return _meta;
|
|
64
78
|
} catch (e) {
|
|
65
79
|
return null;
|
|
66
80
|
}
|
|
67
81
|
}, [activeNode]);
|
|
68
|
-
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value
|
|
82
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value) {
|
|
83
|
+
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
84
|
+
repositioning = _ref.repositioning,
|
|
85
|
+
before = _ref.before;
|
|
69
86
|
if (field === 'enableHeader') {
|
|
70
87
|
if (value) {
|
|
71
88
|
var headerMeta = require("../engine/meta/pageheader.props.default.json");
|
|
72
|
-
(0,
|
|
89
|
+
(0, _ContextProvider.addNode)(_constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT, _constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headerMeta), {}, {
|
|
73
90
|
buildIn: true
|
|
74
91
|
}));
|
|
75
92
|
} else {
|
|
76
|
-
(0,
|
|
93
|
+
(0, _ContextProvider.deleteNode)(_constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER);
|
|
77
94
|
}
|
|
78
95
|
} else if (field === 'enableFooter') {
|
|
79
96
|
if (value) {
|
|
80
97
|
var footerMeta = require("../engine/meta/pagefooter.props.default.json");
|
|
81
|
-
(0,
|
|
98
|
+
(0, _ContextProvider.addNode)(_constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT, _constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, footerMeta), {}, {
|
|
82
99
|
buildIn: true
|
|
83
100
|
}));
|
|
84
101
|
} else {
|
|
85
|
-
(0,
|
|
102
|
+
(0, _ContextProvider.deleteNode)(_constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER);
|
|
86
103
|
}
|
|
87
104
|
}
|
|
88
|
-
var
|
|
89
|
-
var
|
|
90
|
-
|
|
105
|
+
var targetId = (0, _lodash.isNil)(activeNode.$target) ? activeNode.node.id : activeNode.$target.ancestorId;
|
|
106
|
+
var component = context.componentMap.get(targetId);
|
|
107
|
+
var node = component.api.getSelfData();
|
|
91
108
|
var oldValue = (0, _defineProperty2.default)({}, field, (0, _lodash.get)(node.props, field));
|
|
92
|
-
var
|
|
93
|
-
(
|
|
94
|
-
|
|
109
|
+
var newValue = (0, _defineProperty2.default)({}, field, value);
|
|
110
|
+
if (before) {
|
|
111
|
+
before(handleChange);
|
|
112
|
+
}
|
|
113
|
+
task(targetId, newValue).then(function () {
|
|
114
|
+
var _id = (0, _lodash.isNil)(activeNode.$target) ? activeNode.node.id : activeNode.$target.id;
|
|
95
115
|
context.$publisher(context.topics.COMPONENT_MODIFY, {
|
|
96
|
-
id:
|
|
97
|
-
pageData: newData,
|
|
116
|
+
id: _id,
|
|
98
117
|
oldValue: oldValue,
|
|
99
|
-
newValue:
|
|
118
|
+
newValue: newValue
|
|
100
119
|
});
|
|
101
120
|
if (repositioning) context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
102
|
-
id:
|
|
121
|
+
id: _id
|
|
103
122
|
});
|
|
104
123
|
});
|
|
105
124
|
});
|
|
106
125
|
(0, _react.useEffect)(function () {
|
|
107
|
-
var
|
|
126
|
+
var tid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
108
127
|
setActiveTabKey('attrs');
|
|
109
|
-
if (!payload.
|
|
128
|
+
if (!payload.target) {
|
|
110
129
|
setActiveNode(null);
|
|
111
130
|
return;
|
|
112
131
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
node =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
if ((0, _lodash.isString)(payload.target)) {
|
|
133
|
+
var component = context.componentMap.get(payload.target);
|
|
134
|
+
var node = component.api.getSelfData();
|
|
135
|
+
var levelNodes = (0, _lodash.takeRight)(component.api.getLevelNodes(), 4);
|
|
136
|
+
setActiveNode({
|
|
137
|
+
node: node.props,
|
|
138
|
+
level: levelNodes
|
|
139
|
+
});
|
|
140
|
+
} else {
|
|
141
|
+
var _component = payload.target.element.getAttribute('data-__component');
|
|
142
|
+
var ancestor = context.componentMap.get(payload.target.ancestorId);
|
|
143
|
+
var _levelNodes = (0, _lodash.takeRight)(ancestor.api.getLevelNodes(), 3);
|
|
144
|
+
setActiveNode({
|
|
145
|
+
node: {
|
|
146
|
+
id: payload.target.id,
|
|
147
|
+
component: _component
|
|
148
|
+
},
|
|
149
|
+
level: [].concat((0, _toConsumableArray2.default)(_levelNodes), [{
|
|
150
|
+
id: payload.target.id,
|
|
151
|
+
name: payload.target.label
|
|
152
|
+
}]),
|
|
153
|
+
$target: payload.target
|
|
154
|
+
});
|
|
155
|
+
}
|
|
121
156
|
}).watch();
|
|
122
157
|
return function () {
|
|
123
|
-
return context.$unsubscriber(context.topics.COMPONENT_ACTIVE,
|
|
158
|
+
return context.$unsubscriber(context.topics.COMPONENT_ACTIVE, tid);
|
|
124
159
|
};
|
|
125
160
|
}, []);
|
|
126
161
|
(0, _react.useLayoutEffect)(function () {
|
|
@@ -135,16 +170,16 @@ var Panel = function Panel() {
|
|
|
135
170
|
style: {
|
|
136
171
|
fontSize: 12
|
|
137
172
|
}
|
|
138
|
-
}, activeNode === null || activeNode === void 0 ? void 0 : activeNode.level.map(function (
|
|
139
|
-
var id =
|
|
140
|
-
name =
|
|
173
|
+
}, activeNode === null || activeNode === void 0 ? void 0 : activeNode.level.map(function (_ref2) {
|
|
174
|
+
var id = _ref2.id,
|
|
175
|
+
name = _ref2.name;
|
|
141
176
|
return /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb.Item, {
|
|
142
177
|
key: id,
|
|
143
178
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _panel.default['active-node-level'], id !== activeNode.node.id)),
|
|
144
179
|
onMouseEnter: function onMouseEnter() {
|
|
145
180
|
if (id === activeNode.node.id) return;
|
|
146
181
|
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
147
|
-
|
|
182
|
+
target: id
|
|
148
183
|
});
|
|
149
184
|
},
|
|
150
185
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -154,7 +189,7 @@ var Panel = function Panel() {
|
|
|
154
189
|
onClick: function onClick() {
|
|
155
190
|
if (id === activeNode.node.id) return;
|
|
156
191
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
157
|
-
|
|
192
|
+
target: id
|
|
158
193
|
});
|
|
159
194
|
}
|
|
160
195
|
}, name);
|
|
@@ -184,21 +219,26 @@ var Panel = function Panel() {
|
|
|
184
219
|
ref: underLineRef,
|
|
185
220
|
className: _panel.default.underline
|
|
186
221
|
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(_AttrsPanel.default, {
|
|
222
|
+
key: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
223
|
+
nodeId: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
224
|
+
ancestorId: activeNode === null || activeNode === void 0 || (_activeNode$$target = activeNode.$target) === null || _activeNode$$target === void 0 ? void 0 : _activeNode$$target.ancestorId,
|
|
187
225
|
meta: meta,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return handleChange(field, value, repositioning);
|
|
226
|
+
onChange: function onChange(field, value, params) {
|
|
227
|
+
return handleChange(field, value, params);
|
|
191
228
|
}
|
|
192
229
|
}), activeTabKey === _TAB_LIST_[1].key && /*#__PURE__*/_react.default.createElement(_StylePanel.default, {
|
|
193
|
-
|
|
230
|
+
key: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
231
|
+
nodeId: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
194
232
|
onChange: function onChange(_, newCss) {
|
|
195
233
|
return handleChange('css', newCss);
|
|
196
234
|
}
|
|
197
235
|
}), activeTabKey === _TAB_LIST_[2].key && /*#__PURE__*/_react.default.createElement(_AdvancePanel.default, {
|
|
236
|
+
key: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
237
|
+
nodeId: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.id,
|
|
238
|
+
target: activeNode === null || activeNode === void 0 ? void 0 : activeNode.$target,
|
|
198
239
|
meta: meta,
|
|
199
|
-
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.advance,
|
|
200
240
|
onChange: function onChange(val) {
|
|
201
|
-
return handleChange('advance', val);
|
|
241
|
+
return handleChange((0, _lodash.isNil)(activeNode.$target) ? 'advance' : "".concat(activeNode.$target.keyPath, ".advance"), val);
|
|
202
242
|
}
|
|
203
243
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
204
244
|
className: (0, _classnames.default)(_panel.default['lc-painter-panel-empty'], (0, _defineProperty2.default)({}, _panel.default.hidden, !!activeNode))
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
12
|
var _ahooks = require("ahooks");
|
|
@@ -17,7 +16,7 @@ var _lodash = require("lodash");
|
|
|
17
16
|
var _utils = require("@luck-design-biz/base/utils");
|
|
18
17
|
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
19
18
|
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
20
|
-
var
|
|
19
|
+
var _helper = require("../../engine/tools/helper");
|
|
21
20
|
var _actionBindModal = _interopRequireDefault(require("../style/action-bind-modal.less"));
|
|
22
21
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.actionBindModal';
|
|
23
22
|
var _ACTION_CATEGORY_ = [{
|
|
@@ -39,10 +38,11 @@ var _ACTION_CATEGORY_ = [{
|
|
|
39
38
|
label: '自定义动作'
|
|
40
39
|
})
|
|
41
40
|
}];
|
|
42
|
-
var _DEFAULT_JSON_CODE_ = '{"
|
|
41
|
+
var _DEFAULT_JSON_CODE_ = '{"params":{},"data":{}}';
|
|
43
42
|
var _DEFAULT_JS_CODE_ = 'function todo() {\n\n}';
|
|
44
43
|
var ActionBindModal = function ActionBindModal(_ref) {
|
|
45
|
-
var
|
|
44
|
+
var nodeId = _ref.nodeId,
|
|
45
|
+
event = _ref.event,
|
|
46
46
|
_ref$defaultCode = _ref.defaultCode,
|
|
47
47
|
defaultCode = _ref$defaultCode === void 0 ? _DEFAULT_JS_CODE_ : _ref$defaultCode,
|
|
48
48
|
onComfirm = _ref.onComfirm,
|
|
@@ -73,6 +73,10 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
73
73
|
searchValue = _useState6[0],
|
|
74
74
|
setSearchValue = _useState6[1];
|
|
75
75
|
var latestActiveKey = (0, _ahooks.useLatest)(activeKey);
|
|
76
|
+
var pageData = (0, _ContextProvider.useGet)();
|
|
77
|
+
var keywords = (0, _ahooks.useCreation)(function () {
|
|
78
|
+
return (0, _helper.extractKeywords)(pageData, ['id', ['dataset', 'code'], 'field']);
|
|
79
|
+
}, []);
|
|
76
80
|
var options = (0, _ahooks.useCreation)(function () {
|
|
77
81
|
if (category === 'page-action') {
|
|
78
82
|
return (0, _lodash.reduce)(module.actions, function (ret, actionName, actionKey) {
|
|
@@ -89,7 +93,7 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
89
93
|
target = _ref3[1];
|
|
90
94
|
ret.push({
|
|
91
95
|
key: key,
|
|
92
|
-
label: "".concat(target.api.
|
|
96
|
+
label: "".concat(target.api.getSelfData().props.name, "(").concat(key, ")")
|
|
93
97
|
});
|
|
94
98
|
return ret;
|
|
95
99
|
}, []);
|
|
@@ -106,28 +110,30 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
106
110
|
}, [category]);
|
|
107
111
|
(0, _ahooks.useUpdateEffect)(function () {
|
|
108
112
|
if (activeKey) {
|
|
113
|
+
var _editorRef$current;
|
|
109
114
|
var action = get(activeKey);
|
|
110
|
-
editorRef.current.editor.setValue(action.code);
|
|
115
|
+
(_editorRef$current = editorRef.current) === null || _editorRef$current === void 0 || _editorRef$current.editor.setValue(action === null || action === void 0 ? void 0 : action.code);
|
|
111
116
|
}
|
|
112
|
-
}, [activeKey]);
|
|
117
|
+
}, [category, activeKey]);
|
|
113
118
|
(0, _ahooks.useUpdateEffect)(function () {
|
|
114
119
|
setAll(event === null || event === void 0 ? void 0 : event.actionPool);
|
|
115
120
|
}, [event]);
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
var _useDebounceFn = (0, _ahooks.useDebounceFn)(function (code) {
|
|
122
|
+
if (latestActiveKey.current) {
|
|
123
|
+
var action = get(latestActiveKey.current);
|
|
124
|
+
action.code = code;
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
wait: 500
|
|
128
|
+
}),
|
|
129
|
+
handleEditorValueChange = _useDebounceFn.run;
|
|
122
130
|
var handleOptionClick = (0, _ahooks.useMemoizedFn)(function (key) {
|
|
123
131
|
setActiveKey(key);
|
|
124
132
|
var action;
|
|
125
133
|
if (actionPool.has(key)) {
|
|
126
134
|
action = get(key);
|
|
127
135
|
} else {
|
|
128
|
-
var code = category === 'custom' ?
|
|
129
|
-
moduleCode: module.moduleCode
|
|
130
|
-
}, JSON.parse(_DEFAULT_JSON_CODE_)), null, '\t');
|
|
136
|
+
var code = event.func || (category === 'custom' ? defaultCode : "".concat(defaultCode.slice(0, -1), "\n\treturn ").concat(_DEFAULT_JSON_CODE_, " \n}"));
|
|
131
137
|
action = {
|
|
132
138
|
category: category,
|
|
133
139
|
key: key,
|
|
@@ -141,9 +147,7 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
141
147
|
if (activeKey !== key) {
|
|
142
148
|
setActiveKey(key);
|
|
143
149
|
}
|
|
144
|
-
var code = category === 'custom' ?
|
|
145
|
-
moduleCode: module.moduleCode
|
|
146
|
-
}, JSON.parse(_DEFAULT_JSON_CODE_)), null, '\t');
|
|
150
|
+
var code = event.func || (category === 'custom' ? defaultCode : "".concat(defaultCode.slice(0, -1), "\n\treturn ").concat(_DEFAULT_JSON_CODE_, " \n}"));
|
|
147
151
|
set(key, {
|
|
148
152
|
category: category,
|
|
149
153
|
key: key,
|
|
@@ -173,9 +177,9 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
173
177
|
marginTop: 0,
|
|
174
178
|
padding: '4px 24px'
|
|
175
179
|
},
|
|
176
|
-
title: event === null || event === void 0 ? void 0 : event.name,
|
|
180
|
+
title: "".concat(event === null || event === void 0 ? void 0 : event.name, "(").concat(nodeId, ")"),
|
|
177
181
|
visible: !!event,
|
|
178
|
-
width:
|
|
182
|
+
width: "70vw",
|
|
179
183
|
closable: false,
|
|
180
184
|
maskClosable: false,
|
|
181
185
|
getContainer: function getContainer() {
|
|
@@ -203,7 +207,19 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
203
207
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, key === category)),
|
|
204
208
|
onClick: function onClick() {
|
|
205
209
|
setCategory(key);
|
|
206
|
-
|
|
210
|
+
if ('custom' === key) {
|
|
211
|
+
var _activeKey = 'coding';
|
|
212
|
+
setActiveKey(_activeKey);
|
|
213
|
+
if (!actionPool.has(_activeKey)) {
|
|
214
|
+
set(_activeKey, {
|
|
215
|
+
category: key,
|
|
216
|
+
key: _activeKey,
|
|
217
|
+
code: event.func || defaultCode
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
setActiveKey(void 0);
|
|
222
|
+
}
|
|
207
223
|
}
|
|
208
224
|
}, label, key === category && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
209
225
|
type: "check",
|
|
@@ -278,9 +294,9 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
278
294
|
type: "exclamation-circle"
|
|
279
295
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
280
296
|
className: _actionBindModal.default['code-box']
|
|
281
|
-
}, activeKey ? /*#__PURE__*/_react.default.createElement(
|
|
297
|
+
}, activeKey ? /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
282
298
|
ref: editorRef,
|
|
283
|
-
onChange: handleEditorValueChange
|
|
299
|
+
onChange: handleEditorValueChange
|
|
284
300
|
}) : (0, _utils.formatMessage)({
|
|
285
301
|
id: "".concat(_I18N_PREFIX_, ".noActionSelected"),
|
|
286
302
|
label: '请在右侧选择行为项'
|
|
@@ -291,7 +307,8 @@ var ActionBindModal = function ActionBindModal(_ref) {
|
|
|
291
307
|
className: _actionBindModal.default['code-box']
|
|
292
308
|
}, activeKey ? /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
293
309
|
ref: editorRef,
|
|
294
|
-
|
|
310
|
+
keywords: keywords,
|
|
311
|
+
onChange: handleEditorValueChange
|
|
295
312
|
}) : (0, _utils.formatMessage)({
|
|
296
313
|
id: "".concat(_I18N_PREFIX_, ".noActionSelected"),
|
|
297
314
|
label: '请在右侧选择行为项'
|
|
@@ -15,6 +15,7 @@ var _ahooks = require("ahooks");
|
|
|
15
15
|
var _antd = require("luck-design/antd");
|
|
16
16
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
17
|
var _lodash = require("lodash");
|
|
18
|
+
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
18
19
|
var _utils = require("@luck-design-biz/base/utils");
|
|
19
20
|
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
|
20
21
|
var _ActionBindModal = _interopRequireDefault(require("./ActionBindModal"));
|
|
@@ -27,8 +28,16 @@ var EventItem = _styledComponents.default.div.withConfig({
|
|
|
27
28
|
})(["display:flex;align-items:center;justify-content:space-between;padding:4px 8px;border:1px solid #e5e6e8;border-radius:6px;margin-bottom:6px;font-size:12px;i{color:rgba(0,0,0,0.4);cursor:pointer;}i:not(:last-child){margin-right:6px;}"]);
|
|
28
29
|
var AdvancePanel = function AdvancePanel(_ref) {
|
|
29
30
|
var meta = _ref.meta,
|
|
30
|
-
|
|
31
|
+
nodeId = _ref.nodeId,
|
|
32
|
+
target = _ref.target,
|
|
31
33
|
onChange = _ref.onChange;
|
|
34
|
+
var value = (0, _ContextProvider.useGet)((0, _lodash.isNil)(target) ? {
|
|
35
|
+
id: nodeId,
|
|
36
|
+
path: 'props.advance'
|
|
37
|
+
} : {
|
|
38
|
+
id: target.ancestorId,
|
|
39
|
+
path: "props.".concat(target.keyPath, ".advance")
|
|
40
|
+
});
|
|
32
41
|
var _useState = (0, _react.useState)((value === null || value === void 0 ? void 0 : value.events) || {}),
|
|
33
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
43
|
events = _useState2[0],
|
|
@@ -74,24 +83,28 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
74
83
|
style: {
|
|
75
84
|
fontSize: 12
|
|
76
85
|
}
|
|
77
|
-
}, (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
}, (0, _lodash.reduce)((_meta$advance2 = meta.advance) === null || _meta$advance2 === void 0 ? void 0 : _meta$advance2.events, function (ret, event) {
|
|
87
|
+
var _value$events;
|
|
88
|
+
if (!(value !== null && value !== void 0 && (_value$events = value.events) !== null && _value$events !== void 0 && _value$events[event.key])) {
|
|
89
|
+
ret.push( /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
90
|
+
key: event.key,
|
|
91
|
+
payload: event
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
93
|
+
title: event.desc || event.name,
|
|
94
|
+
placement: "left",
|
|
95
|
+
getPopupContainer: function getPopupContainer() {
|
|
96
|
+
return document.getElementById('lc-design-workspace');
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
style: {
|
|
100
|
+
width: '100%',
|
|
101
|
+
fontSize: 12
|
|
102
|
+
}
|
|
103
|
+
}, event.name))));
|
|
104
|
+
}
|
|
105
|
+
return ret;
|
|
106
|
+
}, []));
|
|
107
|
+
}, [value]);
|
|
95
108
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
96
109
|
field: "events",
|
|
97
110
|
label: (0, _utils.formatMessage)({
|
|
@@ -102,7 +115,9 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
102
115
|
padding: '12px 16px'
|
|
103
116
|
}
|
|
104
117
|
}, (0, _lodash.keys)(events).map(function (ek) {
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement(EventItem,
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement(EventItem, {
|
|
119
|
+
key: ek
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, metaMap[ek].name), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
106
121
|
title: (0, _utils.formatMessage)({
|
|
107
122
|
id: 'luckda.lowcode.painter.edit',
|
|
108
123
|
label: '编辑'
|
|
@@ -138,6 +153,7 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
138
153
|
id: "".concat(_I18N_PREFIX_, ".addEventAction"),
|
|
139
154
|
label: '添加事件动作'
|
|
140
155
|
})))), /*#__PURE__*/_react.default.createElement(_ActionBindModal.default, {
|
|
156
|
+
nodeId: nodeId,
|
|
141
157
|
event: event,
|
|
142
158
|
onComfirm: handleComfirm,
|
|
143
159
|
onClose: function onClose() {
|
|
@@ -24,7 +24,8 @@ var _excluded = ["type", "key", "valueKey", "name", "desc", "default", "props",
|
|
|
24
24
|
var AttrsPanel = function AttrsPanel(_ref) {
|
|
25
25
|
var _nextRef$current2, _nextRef$current3;
|
|
26
26
|
var meta = _ref.meta,
|
|
27
|
-
|
|
27
|
+
nodeId = _ref.nodeId,
|
|
28
|
+
ancestorId = _ref.ancestorId,
|
|
28
29
|
onChange = _ref.onChange;
|
|
29
30
|
var nextRef = (0, _react.useRef)(null);
|
|
30
31
|
var factory = (0, _react.useRef)(new _panelItemFactory.default());
|
|
@@ -34,10 +35,18 @@ var AttrsPanel = function AttrsPanel(_ref) {
|
|
|
34
35
|
_useBoolean2$ = _useBoolean2[1],
|
|
35
36
|
setTrue = _useBoolean2$.setTrue,
|
|
36
37
|
setFalse = _useBoolean2$.setFalse;
|
|
37
|
-
var
|
|
38
|
-
|
|
38
|
+
var node = (0, _ContextProvider.useGet)({
|
|
39
|
+
id: (0, _lodash.isNil)(ancestorId) ? nodeId : ancestorId,
|
|
40
|
+
path: 'props'
|
|
41
|
+
});
|
|
42
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, val, _ref2) {
|
|
39
43
|
var _nextRef$current;
|
|
40
|
-
|
|
44
|
+
var repositioning = _ref2.repositioning,
|
|
45
|
+
before = _ref2.before;
|
|
46
|
+
onChange(field, val, {
|
|
47
|
+
repositioning: repositioning,
|
|
48
|
+
before: before
|
|
49
|
+
});
|
|
41
50
|
if ((_nextRef$current = nextRef.current) !== null && _nextRef$current !== void 0 && _nextRef$current.autoClose) {
|
|
42
51
|
setFalse();
|
|
43
52
|
}
|
|
@@ -52,25 +61,24 @@ var AttrsPanel = function AttrsPanel(_ref) {
|
|
|
52
61
|
setTrue();
|
|
53
62
|
});
|
|
54
63
|
var renderPanelItems = (0, _ahooks.useMemoizedFn)(function (items, dynamicProps) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
repositioning = _ref2.repositioning,
|
|
69
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
64
|
+
return items.map(function (_ref3) {
|
|
65
|
+
var type = _ref3.type,
|
|
66
|
+
key = _ref3.key,
|
|
67
|
+
valueKey = _ref3.valueKey,
|
|
68
|
+
name = _ref3.name,
|
|
69
|
+
desc = _ref3.desc,
|
|
70
|
+
defaultValue = _ref3.default,
|
|
71
|
+
props = _ref3.props,
|
|
72
|
+
wrapper = _ref3.wrapper,
|
|
73
|
+
wrapperProps = _ref3.wrapperProps,
|
|
74
|
+
next = _ref3.next,
|
|
75
|
+
repositioning = _ref3.repositioning,
|
|
76
|
+
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
70
77
|
var Comp = factory.current.getPanelItemFor((0, _lodash.startsWith)(type, '_') ? 'dynamic' : type, type);
|
|
78
|
+
var _valueKey = (dynamicProps === null || dynamicProps === void 0 ? void 0 : dynamicProps.valueKey) || valueKey;
|
|
71
79
|
if (type === 'group') {
|
|
72
80
|
return /*#__PURE__*/_react.default.createElement(Comp, {
|
|
73
|
-
nodeId:
|
|
81
|
+
nodeId: nodeId,
|
|
74
82
|
key: key,
|
|
75
83
|
field: key,
|
|
76
84
|
label: name,
|
|
@@ -81,26 +89,29 @@ var AttrsPanel = function AttrsPanel(_ref) {
|
|
|
81
89
|
desc: desc
|
|
82
90
|
}, renderPanelItems(props || [], dynamicProps));
|
|
83
91
|
}
|
|
84
|
-
var _originalVal = (0, _lodash.get)(node
|
|
92
|
+
var _originalVal = (0, _lodash.get)(node, _valueKey || key);
|
|
85
93
|
var comp = Comp && /*#__PURE__*/_react.default.createElement(Comp, (0, _extends2.default)({
|
|
86
|
-
nodeId:
|
|
94
|
+
nodeId: nodeId,
|
|
87
95
|
key: key,
|
|
88
96
|
defaultValue: (0, _lodash.isNil)(_originalVal) ? defaultValue : _originalVal,
|
|
89
97
|
next: next !== null && next !== void 0 && next.props ? function (_dp) {
|
|
90
98
|
return goNext(next, _dp);
|
|
91
99
|
} : null,
|
|
92
|
-
onChange: function onChange(val) {
|
|
93
|
-
return handleChange(
|
|
100
|
+
onChange: function onChange(val, before) {
|
|
101
|
+
return handleChange(_valueKey || key, val, {
|
|
102
|
+
repositioning: repositioning,
|
|
103
|
+
before: before
|
|
104
|
+
});
|
|
94
105
|
},
|
|
95
106
|
size: "small",
|
|
96
|
-
settings: node
|
|
107
|
+
settings: node,
|
|
97
108
|
renderPanelItems: renderPanelItems
|
|
98
109
|
}, rest, dynamicProps));
|
|
99
110
|
if (wrapper === 'hidden') return comp;
|
|
100
111
|
var Wrapper = wrapper === 'collapse' ? _Collapse.default : _PanelItem.default;
|
|
101
112
|
return /*#__PURE__*/_react.default.createElement(Wrapper, (0, _extends2.default)({
|
|
102
113
|
key: key,
|
|
103
|
-
nodeId:
|
|
114
|
+
nodeId: nodeId,
|
|
104
115
|
field: key,
|
|
105
116
|
label: name,
|
|
106
117
|
desc: desc
|
|
@@ -113,7 +124,7 @@ var AttrsPanel = function AttrsPanel(_ref) {
|
|
|
113
124
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
114
125
|
}
|
|
115
126
|
return renderPanelItems(meta.props);
|
|
116
|
-
}, [
|
|
127
|
+
}, [nodeId]);
|
|
117
128
|
(0, _react.useEffect)(function () {
|
|
118
129
|
if (!open) {
|
|
119
130
|
nextRef.current = null;
|
|
@@ -121,7 +132,7 @@ var AttrsPanel = function AttrsPanel(_ref) {
|
|
|
121
132
|
}, [open]);
|
|
122
133
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
123
134
|
id: "lc-painter-panel-attrs-container",
|
|
124
|
-
className: (0, _classnames.default)(_panelAttrs.default['lc-painter-panel-attrs'], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _panelAttrs.default.hidden, !
|
|
135
|
+
className: (0, _classnames.default)(_panelAttrs.default['lc-painter-panel-attrs'], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _panelAttrs.default.hidden, !nodeId), _panelAttrs.default.showNext, open))
|
|
125
136
|
}, PropsComps, /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
126
137
|
visible: open,
|
|
127
138
|
width: 320,
|