@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
|
@@ -4,8 +4,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useRequest, useSetState, useDebounceFn, useMemoizedFn } from 'ahooks';
|
|
7
|
-
import { Modal } from 'luck-design/antd';
|
|
8
|
-
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
9
7
|
import { dropWhile, startsWith } from 'lodash';
|
|
10
8
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
11
9
|
import SettingUI from "./SettingUI";
|
|
@@ -211,88 +209,57 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
211
209
|
}),
|
|
212
210
|
runDebounce = _useDebounceFn.run;
|
|
213
211
|
var run = useMemoizedFn( /*#__PURE__*/function () {
|
|
214
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
215
|
-
var mapping, _stateItem, request, c, d, _yield$request,
|
|
216
|
-
return _regeneratorRuntime().wrap(function
|
|
217
|
-
while (1) switch (
|
|
212
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(key, val) {
|
|
213
|
+
var _yield$fetchDelAttrs, code, mapping, _stateItem, request, c, d, _yield$request, _code;
|
|
214
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
215
|
+
while (1) switch (_context.prev = _context.next) {
|
|
218
216
|
case 0:
|
|
219
217
|
if (!(key === 'isEqual')) {
|
|
220
|
-
|
|
218
|
+
_context.next = 5;
|
|
221
219
|
break;
|
|
222
220
|
}
|
|
223
|
-
|
|
221
|
+
_context.next = 3;
|
|
224
222
|
return runFetchUpdateUniqueField(_defineProperty({
|
|
225
223
|
moduleDatasetUid: datasetId,
|
|
226
224
|
moduleUid: moduleId
|
|
227
225
|
}, val ? 'uniqueFieldUid' : 'noUniqueFieldUid', fieldData.uid));
|
|
228
226
|
case 3:
|
|
229
|
-
|
|
227
|
+
_context.next = 34;
|
|
230
228
|
break;
|
|
231
229
|
case 5:
|
|
232
230
|
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip')) {
|
|
233
|
-
|
|
231
|
+
_context.next = 9;
|
|
234
232
|
break;
|
|
235
233
|
}
|
|
236
234
|
handleUIChange(key, val);
|
|
237
|
-
|
|
235
|
+
_context.next = 34;
|
|
238
236
|
break;
|
|
239
237
|
case 9:
|
|
240
238
|
if (!(key === 'col' || key === 'row')) {
|
|
241
|
-
|
|
239
|
+
_context.next = 13;
|
|
242
240
|
break;
|
|
243
241
|
}
|
|
244
242
|
handleUIChange(key, val);
|
|
245
|
-
|
|
243
|
+
_context.next = 34;
|
|
246
244
|
break;
|
|
247
245
|
case 13:
|
|
248
246
|
if (!(key === 'delRule')) {
|
|
249
|
-
|
|
247
|
+
_context.next = 21;
|
|
250
248
|
break;
|
|
251
249
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
zIndex: 1001,
|
|
261
|
-
onOk: function () {
|
|
262
|
-
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
263
|
-
var _yield$fetchDelAttrs, code;
|
|
264
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
265
|
-
while (1) switch (_context.prev = _context.next) {
|
|
266
|
-
case 0:
|
|
267
|
-
_context.next = 2;
|
|
268
|
-
return fetchDelAttrs({
|
|
269
|
-
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
270
|
-
ccmModuleFieldVerifies: [{
|
|
271
|
-
uid: val
|
|
272
|
-
}],
|
|
273
|
-
scope: FIELD_SCOPES.CHECK_RULES
|
|
274
|
-
});
|
|
275
|
-
case 2:
|
|
276
|
-
_yield$fetchDelAttrs = _context.sent;
|
|
277
|
-
code = _yield$fetchDelAttrs.code;
|
|
278
|
-
if (code === 1) {
|
|
279
|
-
rulesRefresh();
|
|
280
|
-
}
|
|
281
|
-
case 5:
|
|
282
|
-
case "end":
|
|
283
|
-
return _context.stop();
|
|
284
|
-
}
|
|
285
|
-
}, _callee);
|
|
286
|
-
}));
|
|
287
|
-
function onOk() {
|
|
288
|
-
return _onOk.apply(this, arguments);
|
|
289
|
-
}
|
|
290
|
-
return onOk;
|
|
291
|
-
}()
|
|
250
|
+
_context.next = 16;
|
|
251
|
+
return fetchDelAttrs({
|
|
252
|
+
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
253
|
+
ccmModuleFieldVerifies: [{
|
|
254
|
+
uid: val
|
|
255
|
+
}],
|
|
256
|
+
scope: FIELD_SCOPES.CHECK_RULES
|
|
292
257
|
});
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
258
|
+
case 16:
|
|
259
|
+
_yield$fetchDelAttrs = _context.sent;
|
|
260
|
+
code = _yield$fetchDelAttrs.code;
|
|
261
|
+
return _context.abrupt("return", code === 1);
|
|
262
|
+
case 21:
|
|
296
263
|
mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FIELD_SCOPES.FIELD_REQUIRED, {
|
|
297
264
|
key: 'fieldRequired',
|
|
298
265
|
refresh: requiredRefresh
|
|
@@ -328,19 +295,19 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
328
295
|
if (!_stateItem) {
|
|
329
296
|
d.datasetBusinessUids = [fieldData.uid];
|
|
330
297
|
}
|
|
331
|
-
|
|
298
|
+
_context.next = 31;
|
|
332
299
|
return request(d);
|
|
333
|
-
case
|
|
334
|
-
_yield$request =
|
|
335
|
-
|
|
336
|
-
if (
|
|
300
|
+
case 31:
|
|
301
|
+
_yield$request = _context.sent;
|
|
302
|
+
_code = _yield$request.code;
|
|
303
|
+
if (_code === 1) {
|
|
337
304
|
mapping[key].refresh();
|
|
338
305
|
}
|
|
339
|
-
case
|
|
306
|
+
case 34:
|
|
340
307
|
case "end":
|
|
341
|
-
return
|
|
308
|
+
return _context.stop();
|
|
342
309
|
}
|
|
343
|
-
},
|
|
310
|
+
}, _callee);
|
|
344
311
|
}));
|
|
345
312
|
return function (_x, _x2) {
|
|
346
313
|
return _ref8.apply(this, arguments);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export var getFrontRules = function getFrontRules(property) {
|
|
2
|
+
var rules = [];
|
|
3
|
+
switch (property) {
|
|
4
|
+
case 'number':
|
|
5
|
+
case 'money':
|
|
6
|
+
case 'decimal':
|
|
7
|
+
case 'sint':
|
|
8
|
+
rules = [{
|
|
9
|
+
label: '最小值',
|
|
10
|
+
key: 'min',
|
|
11
|
+
defaultCode: "function min(cValue) { \n return 0; // 返回数字 \n}"
|
|
12
|
+
}, {
|
|
13
|
+
label: '最大值',
|
|
14
|
+
key: 'max',
|
|
15
|
+
defaultCode: "function max(cValue) { \n return 100; // 返回数字 \n}"
|
|
16
|
+
}];
|
|
17
|
+
break;
|
|
18
|
+
case 'string':
|
|
19
|
+
rules = [{
|
|
20
|
+
label: '长度',
|
|
21
|
+
key: 'length',
|
|
22
|
+
defaultCode: "function length(cValue) { \n return 100; // 返回数字 \n}"
|
|
23
|
+
}, {
|
|
24
|
+
label: '邮箱',
|
|
25
|
+
key: 'email',
|
|
26
|
+
noCode: true
|
|
27
|
+
}, {
|
|
28
|
+
label: '身份证',
|
|
29
|
+
key: 'idcard',
|
|
30
|
+
noCode: true
|
|
31
|
+
}, {
|
|
32
|
+
label: '手机号码',
|
|
33
|
+
key: 'mobile',
|
|
34
|
+
noCode: true
|
|
35
|
+
}];
|
|
36
|
+
break;
|
|
37
|
+
case 'text':
|
|
38
|
+
rules = [{
|
|
39
|
+
label: '长度',
|
|
40
|
+
key: 'length',
|
|
41
|
+
defaultCode: "function length(cValue) { \n return 100; // 返回数字 \n}"
|
|
42
|
+
}];
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
;
|
|
46
|
+
}
|
|
47
|
+
rules.push({
|
|
48
|
+
label: '自定义',
|
|
49
|
+
key: 'rules',
|
|
50
|
+
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n callback(); \n}"
|
|
51
|
+
});
|
|
52
|
+
return rules;
|
|
53
|
+
};
|
|
@@ -28,7 +28,8 @@ var _DISPLAY_OPTIONS_ = [{
|
|
|
28
28
|
value: 'text'
|
|
29
29
|
}];
|
|
30
30
|
var ActionsEditor = function ActionsEditor(_ref) {
|
|
31
|
-
var
|
|
31
|
+
var nodeId = _ref.nodeId,
|
|
32
|
+
defaultValue = _ref.defaultValue,
|
|
32
33
|
onChange = _ref.onChange,
|
|
33
34
|
suppressDisplay = _ref.suppressDisplay,
|
|
34
35
|
suppressMax = _ref.suppressMax,
|
|
@@ -217,6 +218,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
217
218
|
}));
|
|
218
219
|
})))), /*#__PURE__*/React.createElement(ActionBindModal, {
|
|
219
220
|
event: action,
|
|
221
|
+
nodeId: nodeId,
|
|
220
222
|
defaultCode: defaultCode,
|
|
221
223
|
onComfirm: function onComfirm(actionPool) {
|
|
222
224
|
return handleValueChange('action', _objectSpread(_objectSpread({}, omit(action, ['key'])), {}, {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _toArray from "@babel/runtime/helpers/esm/toArray";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
7
6
|
import { Icon, Dropdown, Button, Menu, Modal } from 'luck-design/antd';
|
|
8
7
|
import { concat, reduce, sortBy, includes, cloneDeep } from 'lodash';
|
|
9
8
|
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
10
|
-
import {
|
|
9
|
+
import { useGet } from "../../../engine/provider/ContextProvider";
|
|
11
10
|
import { SortBox, SortItem } from "../../components/SortBox";
|
|
12
11
|
import BlockEditorItem from "./BlockEditorItem";
|
|
13
12
|
import defaultMeta from "../../../engine/meta/form.props.default.json";
|
|
@@ -49,15 +48,10 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
49
48
|
nodeId = _ref.nodeId,
|
|
50
49
|
renderPanelItems = _ref.renderPanelItems,
|
|
51
50
|
innerProps = _ref.innerProps;
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
node = _usePageData2[0];
|
|
57
|
-
var _ref2 = node || {
|
|
58
|
-
props: {}
|
|
59
|
-
},
|
|
60
|
-
blocks = _ref2.props.blocks;
|
|
51
|
+
var blocks = useGet({
|
|
52
|
+
id: nodeId,
|
|
53
|
+
path: 'props.blocks'
|
|
54
|
+
});
|
|
61
55
|
var handleAddBlock = useMemoizedFn(function (type) {
|
|
62
56
|
var _id = "block_".concat(suid());
|
|
63
57
|
var newData = concat(blocks, _objectSpread(_objectSpread({
|
|
@@ -111,13 +105,12 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
111
105
|
order: index + 1
|
|
112
106
|
});
|
|
113
107
|
});
|
|
114
|
-
console.log('newData', newData, sortItems);
|
|
115
108
|
onChange(newData);
|
|
116
109
|
});
|
|
117
110
|
var menu = useCreation(function () {
|
|
118
111
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
119
|
-
onClick: function onClick(
|
|
120
|
-
var key =
|
|
112
|
+
onClick: function onClick(_ref2) {
|
|
113
|
+
var key = _ref2.key;
|
|
121
114
|
return handleAddBlock(key);
|
|
122
115
|
}
|
|
123
116
|
}, addOptions.map(function (opt) {
|
|
@@ -163,7 +156,7 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
163
156
|
}, renderPanelItems(commonProps.map(function (p) {
|
|
164
157
|
var cloneP = cloneDeep(p);
|
|
165
158
|
if (cloneP.key === 'dataset') {
|
|
166
|
-
cloneP.
|
|
159
|
+
cloneP.fieldsKey = 'blocks[0].fields';
|
|
167
160
|
}
|
|
168
161
|
return _objectSpread(_objectSpread({}, cloneP), {}, {
|
|
169
162
|
disabled: includes(['mode', 'serialEffect'], cloneP.key) || cloneP.disabled,
|
|
@@ -208,8 +201,9 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
208
201
|
cloneP.valueKey = "blocks[".concat(i + 1, "].").concat(p.key);
|
|
209
202
|
if (p.key === 'dataset') {
|
|
210
203
|
if (includes(['auto', 'grid', 'writer'], blockItem.type)) {
|
|
211
|
-
if (blockItem.type !== 'auto') cloneP.
|
|
212
|
-
cloneP.
|
|
204
|
+
if (blockItem.type !== 'auto') cloneP.component = 'tableForm';
|
|
205
|
+
cloneP.fieldsKey = "blocks[".concat(i + 1, "].fields");
|
|
206
|
+
;
|
|
213
207
|
result.push(cloneP);
|
|
214
208
|
}
|
|
215
209
|
} else result.push(cloneP);
|
|
@@ -5,10 +5,12 @@ import React from 'react';
|
|
|
5
5
|
import { Select, Button } from 'luck-design/antd';
|
|
6
6
|
import styles from "../style/button-type.less";
|
|
7
7
|
var ButtonType = function ButtonType(_ref) {
|
|
8
|
-
var
|
|
8
|
+
var _onChange = _ref.onChange,
|
|
9
9
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
10
|
return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
11
|
-
onChange: onChange
|
|
11
|
+
onChange: function onChange(val) {
|
|
12
|
+
return _onChange(val);
|
|
13
|
+
},
|
|
12
14
|
className: styles['lc-painter-panel-section-components-buttontype']
|
|
13
15
|
}), /*#__PURE__*/React.createElement(Select.Option, {
|
|
14
16
|
value: "primary"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Select } from 'luck-design/antd';
|
|
4
|
+
import { reduce, get } from 'lodash';
|
|
5
|
+
import { useContext } from "../../engine/provider/ContextProvider";
|
|
6
|
+
var ComponentSelector = function ComponentSelector(_ref) {
|
|
7
|
+
var nodeId = _ref.nodeId,
|
|
8
|
+
defaultValue = _ref.defaultValue,
|
|
9
|
+
_onChange = _ref.onChange,
|
|
10
|
+
filter = _ref.filter;
|
|
11
|
+
var ctx = useContext();
|
|
12
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
13
|
+
size: "small",
|
|
14
|
+
allowClear: true,
|
|
15
|
+
defaultValue: defaultValue,
|
|
16
|
+
onChange: function onChange(val) {
|
|
17
|
+
return _onChange(val);
|
|
18
|
+
}
|
|
19
|
+
}, reduce(ctx.componentList, function (ret, _ref2) {
|
|
20
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
21
|
+
compId = _ref3[0],
|
|
22
|
+
comp = _ref3[1];
|
|
23
|
+
if (compId !== nodeId && (!filter || filter.find(function (_ref4) {
|
|
24
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
25
|
+
key = _ref5[0],
|
|
26
|
+
val = _ref5[1];
|
|
27
|
+
return get(comp, key) === val;
|
|
28
|
+
}))) {
|
|
29
|
+
ret.push( /*#__PURE__*/React.createElement(Select.Option, {
|
|
30
|
+
value: compId
|
|
31
|
+
}, comp.meta.name || compId));
|
|
32
|
+
}
|
|
33
|
+
return ret;
|
|
34
|
+
}, []));
|
|
35
|
+
};
|
|
36
|
+
export default ComponentSelector;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
5
|
import React, { useEffect, useState } from 'react';
|
|
@@ -7,6 +8,7 @@ import styled from 'styled-components';
|
|
|
7
8
|
import { Select, Button, Tooltip } from 'luck-design/antd';
|
|
8
9
|
import { useRemoteSource } from "../../engine/provider/ContextProvider";
|
|
9
10
|
import { fetchAddDataset } from "../../constants/api-url";
|
|
11
|
+
import { getLDMetaAttr } from "../../engine/tools/helper";
|
|
10
12
|
var Div = styled.div.withConfig({
|
|
11
13
|
displayName: "Div",
|
|
12
14
|
componentId: "luckda-6530__sc-onj9tc-0"
|
|
@@ -14,6 +16,9 @@ var Div = styled.div.withConfig({
|
|
|
14
16
|
var DataSetSelector = function DataSetSelector(_ref) {
|
|
15
17
|
var defaultValue = _ref.defaultValue,
|
|
16
18
|
onChange = _ref.onChange,
|
|
19
|
+
_ref$fieldsKey = _ref.fieldsKey,
|
|
20
|
+
fieldsKey = _ref$fieldsKey === void 0 ? 'fields' : _ref$fieldsKey,
|
|
21
|
+
component = _ref.component,
|
|
17
22
|
size = _ref.size,
|
|
18
23
|
isTree = _ref.isTree,
|
|
19
24
|
next = _ref.next;
|
|
@@ -29,8 +34,7 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
29
34
|
dataset = _useRemoteSource.dataset,
|
|
30
35
|
fetchAllDatasetLoading = _useRemoteSource.fetchAllDatasetLoading,
|
|
31
36
|
refreshModlueData = _useRemoteSource.refreshModlueData,
|
|
32
|
-
refreshDataset = _useRemoteSource.refreshDataset
|
|
33
|
-
pageinfo = _useRemoteSource.pageinfo;
|
|
37
|
+
refreshDataset = _useRemoteSource.refreshDataset;
|
|
34
38
|
var _useRequest = useRequest(fetchAddDataset, {
|
|
35
39
|
manual: true
|
|
36
40
|
}),
|
|
@@ -44,12 +48,12 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
44
48
|
}, [dataset, isTree]);
|
|
45
49
|
var handleChange = useMemoizedFn( /*#__PURE__*/function () {
|
|
46
50
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value, _ref3) {
|
|
47
|
-
var key,
|
|
51
|
+
var key, _getLDMetaAttr, _getLDMetaAttr2, moduleId, dataModelKey, _yield$runAsync, code, res, _ds;
|
|
48
52
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
49
53
|
while (1) switch (_context.prev = _context.next) {
|
|
50
54
|
case 0:
|
|
51
55
|
key = _ref3.key;
|
|
52
|
-
|
|
56
|
+
_getLDMetaAttr = getLDMetaAttr(['moduleId', 'dataModelKey']), _getLDMetaAttr2 = _slicedToArray(_getLDMetaAttr, 2), moduleId = _getLDMetaAttr2[0], dataModelKey = _getLDMetaAttr2[1];
|
|
53
57
|
_context.next = 4;
|
|
54
58
|
return runAsync({
|
|
55
59
|
uid: moduleId,
|
|
@@ -75,7 +79,28 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
75
79
|
code: value,
|
|
76
80
|
uid: key
|
|
77
81
|
};
|
|
78
|
-
onChange(_ds)
|
|
82
|
+
onChange(_ds, function (exe) {
|
|
83
|
+
var dsFields = res.data.dataSets[value];
|
|
84
|
+
exe(fieldsKey, dsFields.map(function (f) {
|
|
85
|
+
var restProps = {
|
|
86
|
+
fieldAliasName: f.fieldAliasName || f.fieldName
|
|
87
|
+
};
|
|
88
|
+
if (['table', 'tableForm'].includes(component)) {
|
|
89
|
+
var _extra = JSON.parse(f.extra || '{}');
|
|
90
|
+
var alignMapping = {
|
|
91
|
+
0: 'left',
|
|
92
|
+
1: 'center',
|
|
93
|
+
2: 'right'
|
|
94
|
+
};
|
|
95
|
+
restProps.align = alignMapping[_extra.scell_alignment];
|
|
96
|
+
restProps.headerAlign = alignMapping[_extra.sheading_alignment];
|
|
97
|
+
}
|
|
98
|
+
return _objectSpread({
|
|
99
|
+
uid: f.uid,
|
|
100
|
+
field: f.field
|
|
101
|
+
}, restProps);
|
|
102
|
+
}));
|
|
103
|
+
});
|
|
79
104
|
setCurrentDataset(_ds);
|
|
80
105
|
}
|
|
81
106
|
case 11:
|
|
@@ -115,9 +140,10 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
115
140
|
disabled: !currentDataset,
|
|
116
141
|
onClick: function onClick() {
|
|
117
142
|
return next({
|
|
118
|
-
pageinfo: pageinfo,
|
|
119
143
|
datasetUid: currentDataset.uid,
|
|
120
|
-
datasetCode: currentDataset.code
|
|
144
|
+
datasetCode: currentDataset.code,
|
|
145
|
+
valueKey: fieldsKey,
|
|
146
|
+
component: component
|
|
121
147
|
});
|
|
122
148
|
}
|
|
123
149
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import React, { useReducer, useState } from 'react';
|
|
4
|
-
import { useMemoizedFn, useRequest,
|
|
4
|
+
import { useMemoizedFn, useRequest, useCreation, useMap, useUpdateEffect } from 'ahooks';
|
|
5
5
|
import { Ellipsis } from 'luck-design';
|
|
6
6
|
import { Spin, Input, Tooltip, Icon, Checkbox, Drawer } from 'luck-design/antd';
|
|
7
7
|
import styled from 'styled-components';
|
|
@@ -12,11 +12,11 @@ import { SortBox, SortItem } from "../components/SortBox";
|
|
|
12
12
|
import { ListEditor, ListEditorItem } from "../components/ListEditor";
|
|
13
13
|
import FieldSetting from "../components/field-setting";
|
|
14
14
|
import BatchSetting from "../components/field-setting/BatchSetting";
|
|
15
|
-
import { fetchFieldsByDataset
|
|
16
|
-
import { listReducer } from "../../engine/tools/helper";
|
|
15
|
+
import { fetchFieldsByDataset } from "../../constants/api-url";
|
|
16
|
+
import { listReducer, getLDMetaAttr } from "../../engine/tools/helper";
|
|
17
17
|
import styles from "../style/fields-setting.less";
|
|
18
18
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
19
|
-
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'col', 'row', 'note', 'placeholder'];
|
|
19
|
+
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'col', 'row', 'note', 'placeholder', 'fieldAliasName'];
|
|
20
20
|
var Header = styled.div.withConfig({
|
|
21
21
|
displayName: "Header",
|
|
22
22
|
componentId: "luckda-6530__sc-gcwvp1-0"
|
|
@@ -27,7 +27,6 @@ var FieldKey = styled(Ellipsis).withConfig({
|
|
|
27
27
|
})(["width:80px;margin-left:4px;"]);
|
|
28
28
|
var FieldsSetting = function FieldsSetting(_ref) {
|
|
29
29
|
var component = _ref.component,
|
|
30
|
-
pageinfo = _ref.pageinfo,
|
|
31
30
|
datasetUid = _ref.datasetUid,
|
|
32
31
|
nodeId = _ref.nodeId,
|
|
33
32
|
defaultValue = _ref.defaultValue,
|
|
@@ -46,21 +45,35 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
46
45
|
checkedFields = _useMap2[0],
|
|
47
46
|
_useMap2$ = _useMap2[1],
|
|
48
47
|
set = _useMap2$.set,
|
|
49
|
-
|
|
48
|
+
get = _useMap2$.get,
|
|
49
|
+
setAll = _useMap2$.setAll,
|
|
50
|
+
remove = _useMap2$.remove,
|
|
51
|
+
reset = _useMap2$.reset;
|
|
50
52
|
var _useState3 = useState(void 0),
|
|
51
53
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
54
|
drawerType = _useState4[0],
|
|
53
55
|
setDrawerType = _useState4[1];
|
|
56
|
+
var _useState5 = useState(false),
|
|
57
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
|
+
checkAll = _useState6[0],
|
|
59
|
+
setCheckAll = _useState6[1];
|
|
54
60
|
var fieldData = useCreation(function () {
|
|
55
61
|
return fields.find(function (_ref2) {
|
|
56
62
|
var uid = _ref2.uid;
|
|
57
63
|
return uid === fieldId;
|
|
58
64
|
});
|
|
59
65
|
}, [fieldId, fields]);
|
|
66
|
+
useUpdateEffect(function () {
|
|
67
|
+
if (checkedFields.size === fields.length) {
|
|
68
|
+
setCheckAll(true);
|
|
69
|
+
} else if (checkedFields.size === 0) {
|
|
70
|
+
setCheckAll(false);
|
|
71
|
+
}
|
|
72
|
+
}, [checkedFields, fields]);
|
|
60
73
|
var _useRequest = useRequest(fetchFieldsByDataset, {
|
|
61
74
|
defaultParams: [{
|
|
62
75
|
datasetUid: datasetUid,
|
|
63
|
-
moduleUid:
|
|
76
|
+
moduleUid: getLDMetaAttr('moduleId')
|
|
64
77
|
}],
|
|
65
78
|
onSuccess: function onSuccess(_ref3) {
|
|
66
79
|
var code = _ref3.code,
|
|
@@ -74,18 +87,23 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
74
87
|
return ret;
|
|
75
88
|
}, []), list.map(function (id) {
|
|
76
89
|
var _fieldData = detail[id];
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
0: 'left',
|
|
80
|
-
1: 'center',
|
|
81
|
-
2: 'right'
|
|
90
|
+
var restProps = {
|
|
91
|
+
fieldAliasName: _fieldData.fieldAliasName
|
|
82
92
|
};
|
|
83
|
-
|
|
93
|
+
if (['table', 'tableForm'].includes(component)) {
|
|
94
|
+
var extra = JSON.parse(_fieldData.extra || '{}');
|
|
95
|
+
var alignMapping = {
|
|
96
|
+
0: 'left',
|
|
97
|
+
1: 'center',
|
|
98
|
+
2: 'right'
|
|
99
|
+
};
|
|
100
|
+
restProps.align = alignMapping[extra.scell_alignment];
|
|
101
|
+
restProps.headerAlign = alignMapping[extra.sheading_alignment];
|
|
102
|
+
}
|
|
103
|
+
return _objectSpread({
|
|
84
104
|
uid: id,
|
|
85
|
-
field: detail[id].field
|
|
86
|
-
|
|
87
|
-
headerAlign: alignMapping[extraAttr.sheading_alignment]
|
|
88
|
-
};
|
|
105
|
+
field: detail[id].field
|
|
106
|
+
}, restProps);
|
|
89
107
|
}), 'uid');
|
|
90
108
|
if (!isEqual(_fields, defaultValue)) {
|
|
91
109
|
onChange(_fields);
|
|
@@ -105,34 +123,6 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
105
123
|
return _fieldData._type === 'divider' ? _fieldData : pick(_fieldData, _PICK_KEYS_);
|
|
106
124
|
}));
|
|
107
125
|
});
|
|
108
|
-
var _useRequest2 = useRequest(fetchUpdateFieldAttrs, {
|
|
109
|
-
manual: true
|
|
110
|
-
}),
|
|
111
|
-
runUpdateFieldAttrs = _useRequest2.runAsync;
|
|
112
|
-
var _useDebounceFn = useDebounceFn(function (field, value) {
|
|
113
|
-
var _pageinfo$relationshi = pageinfo.relationship,
|
|
114
|
-
moduleId = _pageinfo$relationshi.moduleId,
|
|
115
|
-
dataModelKey = _pageinfo$relationshi.dataModelKey;
|
|
116
|
-
runUpdateFieldAttrs({
|
|
117
|
-
dataModelKey: dataModelKey,
|
|
118
|
-
datasetBusinessUids: [field.uid],
|
|
119
|
-
fieldAliasName: value,
|
|
120
|
-
moduleDatasetUid: datasetUid,
|
|
121
|
-
moduleUid: moduleId,
|
|
122
|
-
scope: 'FIELD_ALIAS_NAME',
|
|
123
|
-
uid: field.uid
|
|
124
|
-
}).then(function () {
|
|
125
|
-
if (component === 'table') {
|
|
126
|
-
var gridApi = ctx.componentMap.get(nodeId).api.self.ref.current.gridApi;
|
|
127
|
-
var col = gridApi.columnApi.getColumn(field.field);
|
|
128
|
-
col.colDef.headerName = value;
|
|
129
|
-
gridApi.api.refreshHeader();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}, {
|
|
133
|
-
wait: 500
|
|
134
|
-
}),
|
|
135
|
-
run = _useDebounceFn.run;
|
|
136
126
|
var handleSortChange = useMemoizedFn(function (sortItems, fromIndex, toIndex) {
|
|
137
127
|
dispatch({
|
|
138
128
|
type: 'sort',
|
|
@@ -154,9 +144,19 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
154
144
|
data: {
|
|
155
145
|
fieldAliasName: value
|
|
156
146
|
}
|
|
147
|
+
},
|
|
148
|
+
callback: function callback(newFields) {
|
|
149
|
+
if (component === 'table') {
|
|
150
|
+
setTimeout(function () {
|
|
151
|
+
var gridApi = ctx.componentMap.get(nodeId).api.self.ref.current.gridApi;
|
|
152
|
+
var col = gridApi.columnApi.getColumn(field.field);
|
|
153
|
+
col.colDef.headerName = value;
|
|
154
|
+
gridApi.api.refreshHeader();
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
handleChange(newFields);
|
|
157
158
|
}
|
|
158
159
|
});
|
|
159
|
-
run(field, value);
|
|
160
160
|
});
|
|
161
161
|
var handleFieldCheckChange = useMemoizedFn(function (e) {
|
|
162
162
|
var _e$target = e.target,
|
|
@@ -168,6 +168,15 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
168
168
|
remove(data.uid, data);
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
|
+
var handleFieldCheckAll = useMemoizedFn(function (e) {
|
|
172
|
+
if (e.target.checked) {
|
|
173
|
+
setAll(fields.map(function (_field) {
|
|
174
|
+
return [_field.uid, _field];
|
|
175
|
+
}));
|
|
176
|
+
} else {
|
|
177
|
+
reset();
|
|
178
|
+
}
|
|
179
|
+
});
|
|
171
180
|
var handleBatchSetting = useMemoizedFn(function () {
|
|
172
181
|
setDrawerType('batch');
|
|
173
182
|
});
|
|
@@ -181,7 +190,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
181
190
|
uid: groupId,
|
|
182
191
|
id: groupId,
|
|
183
192
|
field: 'divider',
|
|
184
|
-
|
|
193
|
+
fieldName: 'Group',
|
|
185
194
|
_type: 'divider'
|
|
186
195
|
}
|
|
187
196
|
},
|
|
@@ -223,10 +232,18 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
223
232
|
});
|
|
224
233
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Spin, {
|
|
225
234
|
spinning: loading
|
|
226
|
-
}, /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(
|
|
235
|
+
}, /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
236
|
+
style: {
|
|
237
|
+
marginLeft: 20
|
|
238
|
+
},
|
|
239
|
+
disabled: drawerType === 'batch',
|
|
240
|
+
checked: checkAll,
|
|
241
|
+
indeterminate: checkedFields.size > 0 && checkedFields.size !== fields.length,
|
|
242
|
+
onChange: handleFieldCheckAll
|
|
243
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
227
244
|
style: {
|
|
228
|
-
width:
|
|
229
|
-
paddingLeft:
|
|
245
|
+
width: 80,
|
|
246
|
+
paddingLeft: 4
|
|
230
247
|
}
|
|
231
248
|
}, formatMessage({
|
|
232
249
|
id: "".concat(_I18N_PREFIX_, ".field"),
|
|
@@ -267,6 +284,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
267
284
|
left: /*#__PURE__*/React.createElement(React.Fragment, null, field._type !== 'divider' ? /*#__PURE__*/React.createElement(Checkbox, {
|
|
268
285
|
disabled: drawerType === 'batch',
|
|
269
286
|
data: field,
|
|
287
|
+
checked: !!get(field.uid),
|
|
270
288
|
onChange: handleFieldCheckChange
|
|
271
289
|
}) : null, /*#__PURE__*/React.createElement(FieldKey, {
|
|
272
290
|
tooltip: true,
|
|
@@ -309,8 +327,8 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
309
327
|
dispatch: dispatch,
|
|
310
328
|
nodeId: nodeId,
|
|
311
329
|
fieldData: fieldData,
|
|
312
|
-
dataModelKey:
|
|
313
|
-
moduleId:
|
|
330
|
+
dataModelKey: getLDMetaAttr('dataModelKey'),
|
|
331
|
+
moduleId: getLDMetaAttr('moduleId'),
|
|
314
332
|
datasetId: datasetUid,
|
|
315
333
|
component: component,
|
|
316
334
|
onAliasChange: handleAliasChange,
|
|
@@ -319,8 +337,8 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
319
337
|
dispatch: dispatch,
|
|
320
338
|
nodeId: nodeId,
|
|
321
339
|
fieldsData: checkedFields,
|
|
322
|
-
dataModelKey:
|
|
323
|
-
moduleId:
|
|
340
|
+
dataModelKey: getLDMetaAttr('dataModelKey'),
|
|
341
|
+
moduleId: getLDMetaAttr('moduleId'),
|
|
324
342
|
datasetId: datasetUid,
|
|
325
343
|
component: component,
|
|
326
344
|
onChange: handleChange
|