@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef, useImperativeHandle, useState } from 'react';
|
|
3
|
+
import { useMount, useCreation } from 'ahooks';
|
|
4
|
+
import { keyBy } from 'lodash';
|
|
5
|
+
import { Form, Row, Col, Select } from 'luck-design/antd';
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
+
import { JSEditor } from "../code-editor";
|
|
9
|
+
import { getFrontRules } from "./meta/frontRules";
|
|
10
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting.checkRules';
|
|
11
|
+
var FormItem = styled(Form.Item).withConfig({
|
|
12
|
+
displayName: "FormItem",
|
|
13
|
+
componentId: "luckda-6530__sc-d9mrmm-0"
|
|
14
|
+
})(["margin-bottom:0;"]);
|
|
15
|
+
var CheckRules = function CheckRules(_ref) {
|
|
16
|
+
var form = _ref.form,
|
|
17
|
+
fields = _ref.fields,
|
|
18
|
+
rule = _ref.rule,
|
|
19
|
+
fieldData = _ref.fieldData,
|
|
20
|
+
ruleRef = _ref.ruleRef;
|
|
21
|
+
var _useState = useState(),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
verifyType = _useState2[0],
|
|
24
|
+
setVerifyType = _useState2[1];
|
|
25
|
+
var _useState3 = useState(''),
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
expression = _useState4[0],
|
|
28
|
+
setExpression = _useState4[1];
|
|
29
|
+
var jsRef = useRef();
|
|
30
|
+
useImperativeHandle(ruleRef, function () {
|
|
31
|
+
return jsRef.current;
|
|
32
|
+
});
|
|
33
|
+
useMount(function () {
|
|
34
|
+
if (rule.uid) {
|
|
35
|
+
form.setFieldsValue({
|
|
36
|
+
verifyType: rule.verifyType
|
|
37
|
+
});
|
|
38
|
+
setExpression(rule.expression);
|
|
39
|
+
} else {
|
|
40
|
+
var defaultType = getFrontRules(fieldData.property)[0].key;
|
|
41
|
+
form.setFieldsValue({
|
|
42
|
+
verifyType: defaultType
|
|
43
|
+
});
|
|
44
|
+
setVerifyType(defaultType);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var frontRulesObj = useCreation(function () {
|
|
48
|
+
return keyBy(getFrontRules(fieldData.property), 'key');
|
|
49
|
+
}, []);
|
|
50
|
+
var frontRule = useCreation(function () {
|
|
51
|
+
var _frontRulesObj$verify;
|
|
52
|
+
setExpression(((_frontRulesObj$verify = frontRulesObj[verifyType]) === null || _frontRulesObj$verify === void 0 ? void 0 : _frontRulesObj$verify.defaultCode) || '');
|
|
53
|
+
if (verifyType) return frontRulesObj[verifyType];
|
|
54
|
+
return {
|
|
55
|
+
noCode: false
|
|
56
|
+
};
|
|
57
|
+
}, [verifyType]);
|
|
58
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
59
|
+
layout: "vertical"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
61
|
+
gutter: 8
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
63
|
+
span: 24
|
|
64
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
65
|
+
label: formatMessage({
|
|
66
|
+
id: "".concat(_I18N_PREFIX_, ".verifyType"),
|
|
67
|
+
label: '校验规则'
|
|
68
|
+
})
|
|
69
|
+
}, form.getFieldDecorator('verifyType', {
|
|
70
|
+
rules: [{
|
|
71
|
+
required: true,
|
|
72
|
+
message: formatMessage({
|
|
73
|
+
id: "".concat(_I18N_PREFIX_, ".message.verifyType"),
|
|
74
|
+
label: '请选择校验规则'
|
|
75
|
+
})
|
|
76
|
+
}]
|
|
77
|
+
})( /*#__PURE__*/React.createElement(Select, {
|
|
78
|
+
onChange: function onChange(val) {
|
|
79
|
+
console.log('setVerifyType');
|
|
80
|
+
setVerifyType(val);
|
|
81
|
+
}
|
|
82
|
+
}, getFrontRules(fieldData.property).map(function (rule) {
|
|
83
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
84
|
+
key: rule.key,
|
|
85
|
+
value: rule.key
|
|
86
|
+
}, rule.label);
|
|
87
|
+
}))))), !frontRule.noCode && /*#__PURE__*/React.createElement(Col, {
|
|
88
|
+
span: 24
|
|
89
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
style: {
|
|
91
|
+
fontSize: '14px',
|
|
92
|
+
marginBottom: '16px',
|
|
93
|
+
color: 'rgba(0, 0, 0, 0.85)'
|
|
94
|
+
}
|
|
95
|
+
}, formatMessage({
|
|
96
|
+
id: "".concat(_I18N_PREFIX_, ".logic"),
|
|
97
|
+
label: '校验逻辑'
|
|
98
|
+
})), /*#__PURE__*/React.createElement(JSEditor, {
|
|
99
|
+
style: {
|
|
100
|
+
height: '300px',
|
|
101
|
+
border: '1px solid rgb(217, 217, 217)',
|
|
102
|
+
borderRadius: '4px',
|
|
103
|
+
padding: '12px'
|
|
104
|
+
},
|
|
105
|
+
ref: jsRef
|
|
106
|
+
}, expression))));
|
|
107
|
+
};
|
|
108
|
+
export default CheckRules;
|
|
@@ -29,7 +29,7 @@ var CheckRules = function CheckRules(_ref) {
|
|
|
29
29
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
30
30
|
gutter: 8
|
|
31
31
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
32
|
-
span:
|
|
32
|
+
span: 24
|
|
33
33
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
34
34
|
label: formatMessage({
|
|
35
35
|
id: "".concat(_I18N_PREFIX_, ".verifyType"),
|
|
@@ -50,31 +50,6 @@ var CheckRules = function CheckRules(_ref) {
|
|
|
50
50
|
}, val));
|
|
51
51
|
return types;
|
|
52
52
|
}, []))))), /*#__PURE__*/React.createElement(Col, {
|
|
53
|
-
span: 12
|
|
54
|
-
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
55
|
-
label: formatMessage({
|
|
56
|
-
id: "".concat(_I18N_PREFIX_, ".verifyScope"),
|
|
57
|
-
label: '校验类型'
|
|
58
|
-
})
|
|
59
|
-
}, form.getFieldDecorator('verifyScope', {
|
|
60
|
-
rules: [{
|
|
61
|
-
required: true,
|
|
62
|
-
message: formatMessage({
|
|
63
|
-
id: "".concat(_I18N_PREFIX_, ".message.verifyScope"),
|
|
64
|
-
label: '请选择校验类型'
|
|
65
|
-
})
|
|
66
|
-
}]
|
|
67
|
-
})( /*#__PURE__*/React.createElement(Select, null, /*#__PURE__*/React.createElement(Option, {
|
|
68
|
-
value: 0
|
|
69
|
-
}, formatMessage({
|
|
70
|
-
id: "".concat(_I18N_PREFIX_, ".frontend"),
|
|
71
|
-
label: '前端'
|
|
72
|
-
})), /*#__PURE__*/React.createElement(Option, {
|
|
73
|
-
value: 1
|
|
74
|
-
}, formatMessage({
|
|
75
|
-
id: "".concat(_I18N_PREFIX_, ".backend"),
|
|
76
|
-
label: '后端'
|
|
77
|
-
})))))), /*#__PURE__*/React.createElement(Col, {
|
|
78
53
|
span: 24
|
|
79
54
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
80
55
|
label: formatMessage({
|
|
@@ -2,12 +2,15 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useRef } from 'react';
|
|
6
6
|
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
7
7
|
import { Modal, Form } from 'luck-design/antd';
|
|
8
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
9
|
import CheckRules from "./CheckRules";
|
|
10
|
+
import CheckFrontRules from "./CheckFrontRules";
|
|
9
11
|
import { fetchAddFieldAttrs, fetchUpdateFieldAttrs } from "../../../constants/api-url";
|
|
10
12
|
import { FIELD_SCOPES } from "../../../constants";
|
|
13
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
11
14
|
var FieldRulesModal = Form.create({
|
|
12
15
|
name: 'field-rules-form'
|
|
13
16
|
})(function (_ref) {
|
|
@@ -27,6 +30,7 @@ var FieldRulesModal = Form.create({
|
|
|
27
30
|
_useBoolean2$ = _useBoolean2[1],
|
|
28
31
|
setTrue = _useBoolean2$.setTrue,
|
|
29
32
|
setFalse = _useBoolean2$.setFalse;
|
|
33
|
+
var frontRuleRef = useRef();
|
|
30
34
|
var handleOk = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
31
35
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
32
36
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -34,7 +38,8 @@ var FieldRulesModal = Form.create({
|
|
|
34
38
|
setTrue();
|
|
35
39
|
form.validateFields( /*#__PURE__*/function () {
|
|
36
40
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, vals) {
|
|
37
|
-
var
|
|
41
|
+
var _frontRuleRef$current;
|
|
42
|
+
var request, data, expression, _val, _yield$request, code;
|
|
38
43
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
44
|
while (1) switch (_context.prev = _context.next) {
|
|
40
45
|
case 0:
|
|
@@ -48,29 +53,35 @@ var FieldRulesModal = Form.create({
|
|
|
48
53
|
data = {
|
|
49
54
|
scope: FIELD_SCOPES.CHECK_RULES
|
|
50
55
|
};
|
|
56
|
+
expression = (_frontRuleRef$current = frontRuleRef.current) === null || _frontRuleRef$current === void 0 ? void 0 : _frontRuleRef$current.editor.getValue();
|
|
57
|
+
_val = expression ? _objectSpread(_objectSpread({}, vals), {}, {
|
|
58
|
+
expression: expression
|
|
59
|
+
}) : vals;
|
|
51
60
|
if (rule.uid) {
|
|
52
|
-
data.ccmModuleFieldVerifies = [_objectSpread(_objectSpread({},
|
|
53
|
-
uid: rule.uid
|
|
61
|
+
data.ccmModuleFieldVerifies = [_objectSpread(_objectSpread({}, _val), {}, {
|
|
62
|
+
uid: rule.uid,
|
|
63
|
+
verifyScope: (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' ? 0 : 1
|
|
54
64
|
})];
|
|
55
65
|
} else {
|
|
56
|
-
data.ccmModuleFieldVerifies = [_objectSpread(_objectSpread({},
|
|
57
|
-
dataModelKey: dataModelKey
|
|
66
|
+
data.ccmModuleFieldVerifies = [_objectSpread(_objectSpread({}, _val), {}, {
|
|
67
|
+
dataModelKey: dataModelKey,
|
|
68
|
+
verifyScope: (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' ? 0 : 1
|
|
58
69
|
})];
|
|
59
70
|
data.dataModelKey = dataModelKey;
|
|
60
71
|
data.datasetBusinessUids = [fieldData.uid];
|
|
61
72
|
data.moduleDatasetUid = datasetId;
|
|
62
73
|
data.moduleUid = moduleId;
|
|
63
74
|
}
|
|
64
|
-
_context.next =
|
|
75
|
+
_context.next = 9;
|
|
65
76
|
return request(data);
|
|
66
|
-
case
|
|
77
|
+
case 9:
|
|
67
78
|
_yield$request = _context.sent;
|
|
68
79
|
code = _yield$request.code;
|
|
69
80
|
setFalse();
|
|
70
81
|
if (code === 1) {
|
|
71
|
-
onClose(true);
|
|
82
|
+
onClose(true, (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' ? 0 : 1);
|
|
72
83
|
}
|
|
73
|
-
case
|
|
84
|
+
case 13:
|
|
74
85
|
case "end":
|
|
75
86
|
return _context.stop();
|
|
76
87
|
}
|
|
@@ -87,7 +98,10 @@ var FieldRulesModal = Form.create({
|
|
|
87
98
|
}, _callee2);
|
|
88
99
|
})));
|
|
89
100
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
90
|
-
title:
|
|
101
|
+
title: (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' ? formatMessage({
|
|
102
|
+
id: "".concat(_I18N_PREFIX_, ".rules.front"),
|
|
103
|
+
label: '前端校验规则'
|
|
104
|
+
}) : condition === null || condition === void 0 || (_condition$FIELD_SCOP = condition[FIELD_SCOPES.CHECK_RULES]) === null || _condition$FIELD_SCOP === void 0 ? void 0 : _condition$FIELD_SCOP.scopeName,
|
|
91
105
|
width: 800,
|
|
92
106
|
visible: !!rule,
|
|
93
107
|
getContainer: function getContainer() {
|
|
@@ -104,9 +118,15 @@ var FieldRulesModal = Form.create({
|
|
|
104
118
|
},
|
|
105
119
|
onOk: handleOk,
|
|
106
120
|
onCancel: function onCancel() {
|
|
107
|
-
return onClose(false);
|
|
121
|
+
return onClose(false, (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' ? 0 : 1);
|
|
108
122
|
}
|
|
109
|
-
}, /*#__PURE__*/React.createElement(
|
|
123
|
+
}, (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'front' && /*#__PURE__*/React.createElement(CheckFrontRules, {
|
|
124
|
+
form: form,
|
|
125
|
+
rule: rule,
|
|
126
|
+
fields: fields,
|
|
127
|
+
ruleRef: frontRuleRef,
|
|
128
|
+
fieldData: fieldData
|
|
129
|
+
}), (rule === null || rule === void 0 ? void 0 : rule.ruleType) === 'back' && /*#__PURE__*/React.createElement(CheckRules, {
|
|
110
130
|
form: form,
|
|
111
131
|
rule: rule,
|
|
112
132
|
condition: condition === null || condition === void 0 ? void 0 : condition[FIELD_SCOPES.CHECK_RULES],
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
6
|
import React, { useState } from 'react';
|
|
4
|
-
import { useRequest, useMemoizedFn } from 'ahooks';
|
|
5
|
-
import { Spin, Input, Segmented, Switch, Tooltip, Icon, Radio } from 'luck-design/antd';
|
|
7
|
+
import { useRequest, useMemoizedFn, useCreation } from 'ahooks';
|
|
8
|
+
import { Spin, Input, Segmented, Switch, Tooltip, Icon, Radio, Modal } from 'luck-design/antd';
|
|
6
9
|
import styled from 'styled-components';
|
|
7
|
-
import { isArray } from 'lodash';
|
|
10
|
+
import { isArray, keyBy, isNil, groupBy } from 'lodash';
|
|
8
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
9
12
|
import Collapse from "../../components/Collapse";
|
|
10
13
|
import PanelItem from "../../components/PanelItem";
|
|
@@ -13,6 +16,7 @@ import WidthHeight from "../../panel-section/WidthHeight";
|
|
|
13
16
|
import FieldAttrsModal from "./FieldAttrsModal";
|
|
14
17
|
import FieldRulesModal from "./FieldRulesModal";
|
|
15
18
|
import { fetchFieldCondition, fetchAttrs } from "../../../constants/api-url";
|
|
19
|
+
import { getFrontRules } from "./meta/frontRules";
|
|
16
20
|
import { FIELD_SCOPES } from "../../../constants";
|
|
17
21
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
18
22
|
var _ALIGN_OPTIONS_ = [{
|
|
@@ -100,12 +104,16 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
100
104
|
setRules = _useState6[1];
|
|
101
105
|
var _useState7 = useState(null),
|
|
102
106
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
frontRules = _useState8[0],
|
|
108
|
+
setFrontRules = _useState8[1];
|
|
105
109
|
var _useState9 = useState(null),
|
|
106
110
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
condition = _useState10[0],
|
|
112
|
+
setCondition = _useState10[1];
|
|
113
|
+
var _useState11 = useState(null),
|
|
114
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
115
|
+
optionalFields = _useState12[0],
|
|
116
|
+
setOptionalFields = _useState12[1];
|
|
109
117
|
var fieldData = isBatch ? {} : data;
|
|
110
118
|
var _useRequest = useRequest(fetchFieldCondition, {
|
|
111
119
|
defaultParams: [{
|
|
@@ -131,20 +139,37 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
131
139
|
}],
|
|
132
140
|
ready: !isBatch,
|
|
133
141
|
refreshDeps: [fieldData.datasetFieldUid],
|
|
134
|
-
onSuccess: function onSuccess(_ref4) {
|
|
142
|
+
onSuccess: function onSuccess(_ref4, _ref5) {
|
|
135
143
|
var code = _ref4.code,
|
|
136
144
|
list = _ref4.list,
|
|
137
145
|
detail = _ref4.detail;
|
|
146
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
|
147
|
+
verifyScope = _ref6[0].verifyScope;
|
|
138
148
|
if (code === 1) {
|
|
139
149
|
var _detail$list$;
|
|
140
|
-
|
|
150
|
+
var _data = (_detail$list$ = detail[list[0]]) === null || _detail$list$ === void 0 ? void 0 : _detail$list$.ccmModuleFieldVerifies;
|
|
151
|
+
if (isNil(verifyScope)) {
|
|
152
|
+
var dataByGroup = groupBy(_data, 'verifyScope');
|
|
153
|
+
setRules(dataByGroup[1]);
|
|
154
|
+
setFrontRules(dataByGroup[0]);
|
|
155
|
+
} else if (verifyScope === 0) setFrontRules(_data);else if (verifyScope === 1) setRules(_data);
|
|
141
156
|
}
|
|
142
157
|
}
|
|
143
158
|
}),
|
|
159
|
+
rulesParams = _useRequest2.params,
|
|
144
160
|
rulesLoading = _useRequest2.loading,
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
|
|
161
|
+
rulesRun = _useRequest2.run;
|
|
162
|
+
var rulesRefresh = function rulesRefresh() {
|
|
163
|
+
var newParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
164
|
+
return rulesRun(_objectSpread(_objectSpread({}, rulesParams[0]), newParams));
|
|
165
|
+
};
|
|
166
|
+
var propertyRules = useCreation(function () {
|
|
167
|
+
return keyBy(getFrontRules(fieldData.property), 'key');
|
|
168
|
+
}, [fieldData]);
|
|
169
|
+
var handleFieldRulesModalClose = useMemoizedFn(function (success, verifyScope) {
|
|
170
|
+
success && rulesRefresh({
|
|
171
|
+
verifyScope: verifyScope
|
|
172
|
+
});
|
|
148
173
|
setRule(null);
|
|
149
174
|
});
|
|
150
175
|
var renderCodeIcon = useMemoizedFn(function (_stateItem, _scope) {
|
|
@@ -170,6 +195,55 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
170
195
|
}
|
|
171
196
|
})));
|
|
172
197
|
});
|
|
198
|
+
var handleDelete = useMemoizedFn( /*#__PURE__*/function () {
|
|
199
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(uid, verifyScope) {
|
|
200
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
201
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
202
|
+
case 0:
|
|
203
|
+
Modal.confirm({
|
|
204
|
+
title: formatMessage({
|
|
205
|
+
id: 'luckda.lowcode.painter.delete.tip',
|
|
206
|
+
label: '确定删除吗?'
|
|
207
|
+
}),
|
|
208
|
+
getContainer: function getContainer() {
|
|
209
|
+
return document.getElementById('lc-design-workspace');
|
|
210
|
+
},
|
|
211
|
+
zIndex: 1001,
|
|
212
|
+
onOk: function () {
|
|
213
|
+
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
214
|
+
var success;
|
|
215
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
216
|
+
while (1) switch (_context.prev = _context.next) {
|
|
217
|
+
case 0:
|
|
218
|
+
_context.next = 2;
|
|
219
|
+
return run('delRule', uid);
|
|
220
|
+
case 2:
|
|
221
|
+
success = _context.sent;
|
|
222
|
+
if (success) rulesRefresh({
|
|
223
|
+
verifyScope: verifyScope
|
|
224
|
+
});
|
|
225
|
+
case 4:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context.stop();
|
|
228
|
+
}
|
|
229
|
+
}, _callee);
|
|
230
|
+
}));
|
|
231
|
+
function onOk() {
|
|
232
|
+
return _onOk.apply(this, arguments);
|
|
233
|
+
}
|
|
234
|
+
return onOk;
|
|
235
|
+
}()
|
|
236
|
+
});
|
|
237
|
+
case 1:
|
|
238
|
+
case "end":
|
|
239
|
+
return _context2.stop();
|
|
240
|
+
}
|
|
241
|
+
}, _callee2);
|
|
242
|
+
}));
|
|
243
|
+
return function (_x, _x2) {
|
|
244
|
+
return _ref7.apply(this, arguments);
|
|
245
|
+
};
|
|
246
|
+
}());
|
|
173
247
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
174
248
|
spinning: _loading || loading || rulesLoading
|
|
175
249
|
}, !isBatch ? /*#__PURE__*/React.createElement(PanelItem, {
|
|
@@ -183,7 +257,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
183
257
|
onChange: function onChange(e) {
|
|
184
258
|
return onAliasChange(fieldData, e.target.value);
|
|
185
259
|
}
|
|
186
|
-
})) : null,
|
|
260
|
+
})) : null, ['table', 'tableForm'].includes(component) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PanelItem, {
|
|
187
261
|
label: formatMessage({
|
|
188
262
|
id: "".concat(_I18N_PREFIX_, ".width"),
|
|
189
263
|
label: '列宽'
|
|
@@ -242,7 +316,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
242
316
|
onChange: function onChange(val) {
|
|
243
317
|
return run('tip', val);
|
|
244
318
|
}
|
|
245
|
-
}))), component === 'form' && /*#__PURE__*/React.createElement(
|
|
319
|
+
}))), component === 'form' && /*#__PURE__*/React.createElement(PanelItem, {
|
|
246
320
|
label: formatMessage({
|
|
247
321
|
id: "".concat(_I18N_PREFIX_, ".fieldColumn"),
|
|
248
322
|
label: '占列数'
|
|
@@ -260,58 +334,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
260
334
|
value: 3
|
|
261
335
|
}, "3"), /*#__PURE__*/React.createElement(Radio, {
|
|
262
336
|
value: 4
|
|
263
|
-
}, "4"))), /*#__PURE__*/React.createElement(PanelItem, {
|
|
264
|
-
label: formatMessage({
|
|
265
|
-
id: "".concat(_I18N_PREFIX_, ".fieldRow"),
|
|
266
|
-
label: '占行数'
|
|
267
|
-
})
|
|
268
|
-
}, /*#__PURE__*/React.createElement(StyledRadio, {
|
|
269
|
-
defaultValue: fieldData.row,
|
|
270
|
-
onChange: function onChange(e) {
|
|
271
|
-
return run('row', e.target.value);
|
|
272
|
-
}
|
|
273
|
-
}, /*#__PURE__*/React.createElement(Radio, {
|
|
274
|
-
value: 1
|
|
275
|
-
}, "1"), /*#__PURE__*/React.createElement(Radio, {
|
|
276
|
-
value: 2
|
|
277
|
-
}, "2"), /*#__PURE__*/React.createElement(Radio, {
|
|
278
|
-
value: 3
|
|
279
|
-
}, "3"), /*#__PURE__*/React.createElement(Radio, {
|
|
280
|
-
value: 4
|
|
281
|
-
}, "4"))), /*#__PURE__*/React.createElement(PanelItem, {
|
|
282
|
-
label: formatMessage({
|
|
283
|
-
id: "".concat(_I18N_PREFIX_, ".fieldNote"),
|
|
284
|
-
label: '字段注释'
|
|
285
|
-
})
|
|
286
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
287
|
-
defaultValue: fieldData.note,
|
|
288
|
-
onChange: function onChange(val) {
|
|
289
|
-
return runDebounce('note', val);
|
|
290
|
-
},
|
|
291
|
-
size: "small"
|
|
292
|
-
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
293
|
-
label: formatMessage({
|
|
294
|
-
id: "".concat(_I18N_PREFIX_, ".fieldTip"),
|
|
295
|
-
label: '长说明'
|
|
296
|
-
})
|
|
297
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
298
|
-
defaultValue: fieldData.tip,
|
|
299
|
-
onChange: function onChange(val) {
|
|
300
|
-
return runDebounce('tip', val);
|
|
301
|
-
},
|
|
302
|
-
size: "small"
|
|
303
|
-
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
304
|
-
label: formatMessage({
|
|
305
|
-
id: "".concat(_I18N_PREFIX_, ".placeholder"),
|
|
306
|
-
label: '默认提示'
|
|
307
|
-
})
|
|
308
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
309
|
-
defaultValue: fieldData.placeholder,
|
|
310
|
-
onChange: function onChange(val) {
|
|
311
|
-
return runDebounce('placeholder', val);
|
|
312
|
-
},
|
|
313
|
-
size: "small"
|
|
314
|
-
}))), !isBatch ? /*#__PURE__*/React.createElement(PanelItem, {
|
|
337
|
+
}, "4"))), !isBatch ? /*#__PURE__*/React.createElement(PanelItem, {
|
|
315
338
|
label: formatMessage({
|
|
316
339
|
id: "".concat(_I18N_PREFIX_, ".isEqual"),
|
|
317
340
|
label: '唯一校验'
|
|
@@ -327,15 +350,15 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
327
350
|
id: "".concat(_I18N_PREFIX_, ".required"),
|
|
328
351
|
label: '是否必填'
|
|
329
352
|
})
|
|
330
|
-
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), 'table'
|
|
353
|
+
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes && /*#__PURE__*/React.createElement(PanelItem, {
|
|
331
354
|
label: formatMessage({
|
|
332
|
-
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
333
|
-
label: '
|
|
355
|
+
id: "".concat(_I18N_PREFIX_, ".table.display"),
|
|
356
|
+
label: '表格中显示'
|
|
334
357
|
})
|
|
335
|
-
}, renderCodeIcon(fieldTable, FIELD_SCOPES.FIELD_TABLE_DISPLAY)), 'form'
|
|
358
|
+
}, renderCodeIcon(fieldTable, FIELD_SCOPES.FIELD_TABLE_DISPLAY)), ['form', 'tableForm'].includes(component) && /*#__PURE__*/React.createElement(PanelItem, {
|
|
336
359
|
label: formatMessage({
|
|
337
|
-
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
338
|
-
label: '
|
|
360
|
+
id: "".concat(_I18N_PREFIX_, ".form.display"),
|
|
361
|
+
label: '表单中显示'
|
|
339
362
|
})
|
|
340
363
|
}, renderCodeIcon(fieldForm, FIELD_SCOPES.FIELD_FORM_DISPLAY)), /*#__PURE__*/React.createElement(PanelItem, {
|
|
341
364
|
label: formatMessage({
|
|
@@ -362,7 +385,61 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
362
385
|
}), "\n \u3010").concat(fieldDefaultValue.expression, "\u3011") : formatMessage({
|
|
363
386
|
id: 'luckda.lowcode.painter.setting',
|
|
364
387
|
label: '设置'
|
|
365
|
-
}))) : null, !isBatch ? /*#__PURE__*/React.createElement(Collapse, {
|
|
388
|
+
}))) : null, !isBatch ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Collapse, {
|
|
389
|
+
label: formatMessage({
|
|
390
|
+
id: "".concat(_I18N_PREFIX_, ".rules.front"),
|
|
391
|
+
label: '前端校验规则'
|
|
392
|
+
}),
|
|
393
|
+
bodyStyle: {
|
|
394
|
+
padding: '12px 16px'
|
|
395
|
+
}
|
|
396
|
+
}, /*#__PURE__*/React.createElement(ListEditor, {
|
|
397
|
+
addText: formatMessage({
|
|
398
|
+
id: "".concat(_I18N_PREFIX_, ".addRules"),
|
|
399
|
+
label: '添加校验规则'
|
|
400
|
+
}),
|
|
401
|
+
handleAdd: function handleAdd() {
|
|
402
|
+
return setRule({
|
|
403
|
+
ruleType: 'front'
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}, frontRules === null || frontRules === void 0 ? void 0 : frontRules.map(function (_rule) {
|
|
407
|
+
return /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
408
|
+
left: /*#__PURE__*/React.createElement("span", null, propertyRules[_rule.verifyType].label),
|
|
409
|
+
right: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
410
|
+
title: formatMessage({
|
|
411
|
+
id: 'luckda.lowcode.painter.edit',
|
|
412
|
+
label: '编辑'
|
|
413
|
+
})
|
|
414
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
415
|
+
type: "edit",
|
|
416
|
+
style: {
|
|
417
|
+
marginRight: '8px',
|
|
418
|
+
cursor: 'pointer'
|
|
419
|
+
},
|
|
420
|
+
onClick: function onClick() {
|
|
421
|
+
return setRule(_objectSpread(_objectSpread({}, _rule), {}, {
|
|
422
|
+
ruleType: 'front'
|
|
423
|
+
}));
|
|
424
|
+
}
|
|
425
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
426
|
+
title: formatMessage({
|
|
427
|
+
id: 'luckda.lowcode.painter.delete',
|
|
428
|
+
label: '删除'
|
|
429
|
+
})
|
|
430
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
431
|
+
type: "delete",
|
|
432
|
+
style: {
|
|
433
|
+
cursor: 'pointer'
|
|
434
|
+
},
|
|
435
|
+
onClick: function onClick() {
|
|
436
|
+
return handleDelete(_rule.uid, 0);
|
|
437
|
+
}
|
|
438
|
+
}))),
|
|
439
|
+
item: _rule,
|
|
440
|
+
sortable: false
|
|
441
|
+
});
|
|
442
|
+
}))), /*#__PURE__*/React.createElement(Collapse, {
|
|
366
443
|
label: formatMessage({
|
|
367
444
|
id: "".concat(_I18N_PREFIX_, ".rules"),
|
|
368
445
|
label: '校验规则'
|
|
@@ -376,7 +453,9 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
376
453
|
label: '添加校验规则'
|
|
377
454
|
}),
|
|
378
455
|
handleAdd: function handleAdd() {
|
|
379
|
-
return setRule({
|
|
456
|
+
return setRule({
|
|
457
|
+
ruleType: 'back'
|
|
458
|
+
});
|
|
380
459
|
}
|
|
381
460
|
}, rules === null || rules === void 0 ? void 0 : rules.map(function (_rule) {
|
|
382
461
|
return /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
@@ -393,7 +472,9 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
393
472
|
cursor: 'pointer'
|
|
394
473
|
},
|
|
395
474
|
onClick: function onClick() {
|
|
396
|
-
return setRule(_rule)
|
|
475
|
+
return setRule(_objectSpread(_objectSpread({}, _rule), {}, {
|
|
476
|
+
ruleType: 'back'
|
|
477
|
+
}));
|
|
397
478
|
}
|
|
398
479
|
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
399
480
|
title: formatMessage({
|
|
@@ -406,13 +487,13 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
406
487
|
cursor: 'pointer'
|
|
407
488
|
},
|
|
408
489
|
onClick: function onClick() {
|
|
409
|
-
return
|
|
490
|
+
return handleDelete(_rule.uid, 1);
|
|
410
491
|
}
|
|
411
492
|
}))),
|
|
412
493
|
item: _rule,
|
|
413
494
|
sortable: false
|
|
414
495
|
});
|
|
415
|
-
}))) : null, /*#__PURE__*/React.createElement(FieldAttrsModal, {
|
|
496
|
+
})))) : null, /*#__PURE__*/React.createElement(FieldAttrsModal, {
|
|
416
497
|
dataModelKey: dataModelKey,
|
|
417
498
|
datasetId: datasetId,
|
|
418
499
|
moduleId: moduleId,
|