@luck-design-biz/luckda 0.0.25-2 → 0.0.25-20
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 +344 -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 +340 -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
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
+
var _excluded = ["advance"];
|
|
7
|
+
import React, { useRef, forwardRef, Fragment, useImperativeHandle, useEffect } from 'react';
|
|
8
|
+
import { useMemoizedFn, useCreation, useUnmount } from 'ahooks';
|
|
5
9
|
import classNames from 'classnames';
|
|
6
|
-
import { reduce, includes, isNil } from 'lodash';
|
|
10
|
+
import { reduce, includes, isNil, cloneDeep, last, startsWith, isString } from 'lodash';
|
|
7
11
|
import { BasicDivider } from 'luck-design';
|
|
8
12
|
import { Collapse } from '@luck-design-biz/base';
|
|
13
|
+
import { formatMessage, getPageQuery } from '@luck-design-biz/base/utils';
|
|
9
14
|
import Wrapper from "../Wrapper";
|
|
10
15
|
import { LdFormList } from "../../../../index";
|
|
11
|
-
import { omitBadProps, executeCode } from "../../../engine/tools/helper";
|
|
12
|
-
import { useContext, useRemoteSource } from "../../../engine/provider/ContextProvider";
|
|
16
|
+
import { omitBadProps, executeCode, getLDMetaAttr } from "../../../engine/tools/helper";
|
|
17
|
+
import { useContext, useRemoteSource, modifyNode } from "../../../engine/provider/ContextProvider";
|
|
13
18
|
import buildUploadForm from "../../../../upload/Form";
|
|
14
|
-
import
|
|
19
|
+
import RuntimeComp from "../JSX/RuntimeComp";
|
|
20
|
+
import useCombinedRefs from "../../../engine/tools/useCombinedRefs";
|
|
15
21
|
import defaultMeta from "../../../engine/meta/form.props.default.json";
|
|
16
22
|
import styles from "./index.less";
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
var _I18N_PREFIX_ = 'lc.form.validator';
|
|
24
|
+
var Header = function Header(_ref2) {
|
|
25
|
+
var _ref2$header = _ref2.header,
|
|
26
|
+
header = _ref2$header === void 0 ? 'collapse' : _ref2$header,
|
|
27
|
+
title = _ref2.title,
|
|
28
|
+
ldId = _ref2.ldId,
|
|
29
|
+
children = _ref2.children;
|
|
23
30
|
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/React.createElement(Collapse, {
|
|
24
31
|
title: title || ldId,
|
|
25
32
|
id: ldId,
|
|
@@ -33,52 +40,191 @@ var Header = function Header(_ref) {
|
|
|
33
40
|
id: ldId
|
|
34
41
|
}), children);
|
|
35
42
|
};
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
var getMthodParams = function getMthodParams(methodStr) {
|
|
44
|
+
var paramRegex = /\((.*?)\)/;
|
|
45
|
+
var match = methodStr.match(paramRegex);
|
|
46
|
+
if (match && match.length > 1) {
|
|
47
|
+
var paramStr = match[1];
|
|
48
|
+
var params = reduce(paramStr.split(','), function (result, param) {
|
|
49
|
+
var _param$trim;
|
|
50
|
+
if (((_param$trim = param.trim()) === null || _param$trim === void 0 ? void 0 : _param$trim.length) > 0) result.push(param.trim());
|
|
51
|
+
return result;
|
|
52
|
+
}, []);
|
|
53
|
+
return params;
|
|
54
|
+
}
|
|
55
|
+
return [];
|
|
56
|
+
};
|
|
57
|
+
var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
58
|
+
var _ctx$state2;
|
|
59
|
+
var id = _ref3.id,
|
|
60
|
+
className = _ref3.className,
|
|
61
|
+
blocks = _ref3.blocks,
|
|
62
|
+
advance = _ref3.advance,
|
|
63
|
+
initData = _ref3.initData,
|
|
64
|
+
readOnly = _ref3.readOnly,
|
|
65
|
+
showSave = _ref3.showSave,
|
|
66
|
+
saveTitle = _ref3.saveTitle,
|
|
67
|
+
getContainer = _ref3.getContainer,
|
|
68
|
+
settingLayout = _ref3.settingLayout,
|
|
69
|
+
renderFormLeft = _ref3.renderFormLeft,
|
|
70
|
+
renderFormRight = _ref3.renderFormRight,
|
|
71
|
+
children = _ref3.children;
|
|
52
72
|
var apiRef = useRef();
|
|
53
|
-
var
|
|
54
|
-
var formRef =
|
|
73
|
+
var wrapperRef = useRef();
|
|
74
|
+
var formRef = useCombinedRefs(ref);
|
|
75
|
+
var promiseRef = useRef(null);
|
|
55
76
|
var ctx = useContext();
|
|
56
77
|
var remoteSource = useRemoteSource();
|
|
78
|
+
var _initData = useCreation(function () {
|
|
79
|
+
return getPageQuery();
|
|
80
|
+
}, []); // 获取主界面传递过来的详情页参数
|
|
81
|
+
|
|
57
82
|
var serials = useCreation(function () {
|
|
58
83
|
var _remoteSource$serials;
|
|
59
84
|
return ((_remoteSource$serials = remoteSource.serials) === null || _remoteSource$serials === void 0 ? void 0 : _remoteSource$serials.map(function (i) {
|
|
60
85
|
return i.serial;
|
|
61
86
|
})) || [];
|
|
62
87
|
}, [remoteSource.serials]);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
var _blocks = useCreation(function () {
|
|
89
|
+
return blocks.filter(function (_ref4) {
|
|
90
|
+
var hidden = _ref4.hidden;
|
|
91
|
+
return !hidden;
|
|
66
92
|
});
|
|
67
|
-
});
|
|
93
|
+
}, [blocks]);
|
|
68
94
|
useUnmount(function () {
|
|
69
|
-
ctx.doAction(advance.events.onUnmount, {
|
|
70
|
-
instance:
|
|
95
|
+
return ctx.doAction(advance.events.onUnmount, {
|
|
96
|
+
instance: formRef.current
|
|
71
97
|
});
|
|
72
98
|
});
|
|
73
99
|
useImperativeHandle(apiRef, function () {
|
|
74
100
|
return {
|
|
75
|
-
|
|
76
|
-
|
|
101
|
+
/**
|
|
102
|
+
* 获取表格实例
|
|
103
|
+
* @method
|
|
104
|
+
*/
|
|
105
|
+
getInstance: function getInstance() {
|
|
106
|
+
return formRef.current;
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* 提交表格数据
|
|
110
|
+
* @method
|
|
111
|
+
*/
|
|
112
|
+
submit: function submit() {
|
|
113
|
+
return new Promise(function (resolve) {
|
|
114
|
+
var _ctx$state;
|
|
115
|
+
promiseRef.current = resolve;
|
|
116
|
+
var instance = formRef.current;
|
|
117
|
+
var _ref5 = ((_ctx$state = ctx.state) === null || _ctx$state === void 0 ? void 0 : _ctx$state[id]) || initData || _initData || {},
|
|
118
|
+
formMode = _ref5.formMode;
|
|
119
|
+
if (formMode === 'add') {
|
|
120
|
+
instance.onAdd();
|
|
121
|
+
} else if (formMode === 'update') {
|
|
122
|
+
instance.onBatchUpdate();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* @typedef {Object} Field
|
|
128
|
+
* @property {Object} target - 字段引用
|
|
129
|
+
* @property {boolean} disabled - 字段不可维护
|
|
130
|
+
* @property {boolean} required - 字段必填
|
|
131
|
+
* @property {any} value - 字段值
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* @typedef {Object} Block
|
|
135
|
+
* @property {Object} target - 区块引用
|
|
136
|
+
* @property {function(fieldName): Field} getField - 获取区块下的表单域
|
|
137
|
+
*/
|
|
138
|
+
/**
|
|
139
|
+
* 获取区块
|
|
140
|
+
* @param {*} blockId - 区块ID
|
|
141
|
+
* @returns {Block}
|
|
142
|
+
*/
|
|
143
|
+
getBlock: function getBlock(blockId) {
|
|
144
|
+
var instance = formRef.current;
|
|
145
|
+
var block = instance.formRefs[blockId];
|
|
146
|
+
if (!block) {
|
|
147
|
+
console.error('未发现区块');
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
var getField = function getField(fieldName) {
|
|
151
|
+
if (block.current.props.type !== 'auto') {
|
|
152
|
+
console.error('该区块无法获取表单域');
|
|
153
|
+
return {};
|
|
154
|
+
}
|
|
155
|
+
var basicForm = block.current.props.wrappedComponentRef.current;
|
|
156
|
+
var field = basicForm.fieldsRef[fieldName];
|
|
157
|
+
if (!field) {
|
|
158
|
+
console.error("\u672A\u53D1\u73B0".concat(fieldName, "\u5B57\u6BB5"));
|
|
159
|
+
return {};
|
|
160
|
+
}
|
|
161
|
+
return new Proxy({
|
|
162
|
+
target: field
|
|
163
|
+
}, {
|
|
164
|
+
set: function set(_, property, receiver) {
|
|
165
|
+
if (['disabled', 'required'].includes(property)) {
|
|
166
|
+
var bi = blocks.findIndex(function (b) {
|
|
167
|
+
return b.id === blockId;
|
|
168
|
+
});
|
|
169
|
+
var fi = blocks[bi].fields.findIndex(function (f) {
|
|
170
|
+
return f.field === fieldName;
|
|
171
|
+
});
|
|
172
|
+
modifyNode(id, _defineProperty({}, "blocks[".concat(bi, "].fields[").concat(fi, "].config.").concat(property), receiver));
|
|
173
|
+
return true;
|
|
174
|
+
} else if ('value' === property) {
|
|
175
|
+
block.current.setFieldsValue(_defineProperty({}, fieldName, receiver));
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
return Reflect.set(target, property, receiver);
|
|
179
|
+
},
|
|
180
|
+
get: function get(target, property, receiver) {
|
|
181
|
+
if (['disabled', 'required'].includes(property)) {
|
|
182
|
+
return field.props.config[property];
|
|
183
|
+
} else if ('value' === property) {
|
|
184
|
+
block.current.getFieldValue(fieldName);
|
|
185
|
+
}
|
|
186
|
+
return Reflect.get(target, property, receiver);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
return new Proxy({
|
|
191
|
+
target: block.current,
|
|
192
|
+
getField: getField
|
|
193
|
+
}, {
|
|
194
|
+
set: function set(_, property, receiver) {
|
|
195
|
+
if (['hidden', 'readOnly'].includes(property)) {
|
|
196
|
+
var i = blocks.findIndex(function (b) {
|
|
197
|
+
return b.id === blockId;
|
|
198
|
+
});
|
|
199
|
+
modifyNode(id, _defineProperty({}, "blocks[".concat(i, "].").concat(property), receiver));
|
|
200
|
+
return true;
|
|
201
|
+
} else if ('data' === property) {
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
return Reflect.get(target, property, receiver);
|
|
205
|
+
},
|
|
206
|
+
get: function get(target, property, receiver) {
|
|
207
|
+
if (['hidden', 'readOnly'].includes(property)) {
|
|
208
|
+
var item = blocks.find(function (b) {
|
|
209
|
+
return b.id === blockId;
|
|
210
|
+
});
|
|
211
|
+
return item === null || item === void 0 ? void 0 : item[property];
|
|
212
|
+
} else if ('data' === property) {
|
|
213
|
+
var blockProps = instance.formProps[blockId];
|
|
214
|
+
if (blockProps.type === 'auto') {
|
|
215
|
+
return block.current.getFieldsValue();
|
|
216
|
+
} else {
|
|
217
|
+
return block.getData();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return Reflect.get(target, property, receiver);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
77
223
|
}
|
|
78
224
|
};
|
|
79
225
|
});
|
|
80
226
|
var getTargetDom = useMemoizedFn(function () {
|
|
81
|
-
return
|
|
227
|
+
return wrapperRef.current;
|
|
82
228
|
});
|
|
83
229
|
var handleDefaultDataSourceFormat = useMemoizedFn(function (defaultDataSourceFormat, defaultValues) {
|
|
84
230
|
if (isNil(defaultDataSourceFormat)) return function () {
|
|
@@ -86,11 +232,12 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
86
232
|
};
|
|
87
233
|
return executeCode(ctx, defaultDataSourceFormat, ['defaultValues'], defaultValues);
|
|
88
234
|
});
|
|
89
|
-
var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat,
|
|
90
|
-
var values =
|
|
91
|
-
submitData =
|
|
92
|
-
|
|
93
|
-
|
|
235
|
+
var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat, dataSetKey, _ref6) {
|
|
236
|
+
var values = _ref6.values,
|
|
237
|
+
submitData = _ref6.submitData,
|
|
238
|
+
behaviorKey = _ref6.behaviorKey;
|
|
239
|
+
if (isNil(dataSourceFormat)) return _defineProperty({}, dataSetKey, submitData);
|
|
240
|
+
return executeCode(ctx, dataSourceFormat, ['dataSetKey', 'values', 'submitData', 'behaviorKey'], dataSetKey, values, submitData, behaviorKey);
|
|
94
241
|
});
|
|
95
242
|
var handleResetActionsColumn = useMemoizedFn(function (actionsColumnReset, data, index, actions, params) {
|
|
96
243
|
return executeCode(ctx, actionsColumnReset, ['data', 'index', 'actions', 'params'], data, index, actions, params);
|
|
@@ -99,8 +246,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
99
246
|
if (isNil(actionsColumnReset)) return columns;
|
|
100
247
|
return executeCode(ctx, actionsColumnReset, ['columns'], columns);
|
|
101
248
|
});
|
|
102
|
-
var handleGridFormReady = useMemoizedFn(function (onGridFormReady,
|
|
103
|
-
if (!isNil(onGridFormReady)) return executeCode(ctx, onGridFormReady, ['ref', 'params', 'gridForm'],
|
|
249
|
+
var handleGridFormReady = useMemoizedFn(function (onGridFormReady, _ref, params, gridForm) {
|
|
250
|
+
if (!isNil(onGridFormReady)) return executeCode(ctx, onGridFormReady, ['ref', 'params', 'gridForm'], _ref, params, gridForm);
|
|
104
251
|
});
|
|
105
252
|
var handleResetActions = useMemoizedFn(function (resetActions, data, index, actionList, params) {
|
|
106
253
|
if (isNil(resetActions)) return actionList;
|
|
@@ -118,11 +265,95 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
118
265
|
if (!isNil(onUploadChange)) return executeCode(ctx, onUploadChange, ['event'], e);
|
|
119
266
|
});
|
|
120
267
|
var renderAffix = useMemoizedFn(function (_render) {
|
|
121
|
-
return _render ? /*#__PURE__*/React.createElement(
|
|
268
|
+
return _render ? /*#__PURE__*/React.createElement(RuntimeComp, null, _render) : null;
|
|
122
269
|
});
|
|
270
|
+
var setVerifyRules = function setVerifyRules(_props, verifyListObj) {
|
|
271
|
+
var _verifyListObj$length, _verifyListObj$min, _verifyListObj$max, _verifyListObj$rules;
|
|
272
|
+
var props = cloneDeep(_props);
|
|
273
|
+
props.config.rules = props.config.rules || [];
|
|
274
|
+
if ((_verifyListObj$length = verifyListObj.length) !== null && _verifyListObj$length !== void 0 && _verifyListObj$length.expression) props.config.rules.push({
|
|
275
|
+
validator: function validator(rule, value, callback) {
|
|
276
|
+
var _formRef$current;
|
|
277
|
+
var length = executeCode(ctx, verifyListObj.length.expression, ['cValue'], (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getCValue());
|
|
278
|
+
if (value.length > length) callback("".concat(formatMessage({
|
|
279
|
+
id: "".concat(_I18N_PREFIX_, ".maxLength"),
|
|
280
|
+
label: '字数不得超过'
|
|
281
|
+
})).concat(length).concat(formatMessage({
|
|
282
|
+
id: "".concat(_I18N_PREFIX_, ".textNum"),
|
|
283
|
+
label: '个字符'
|
|
284
|
+
})));
|
|
285
|
+
callback();
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
if ((_verifyListObj$min = verifyListObj.min) !== null && _verifyListObj$min !== void 0 && _verifyListObj$min.expression) props.config.rules.push({
|
|
289
|
+
validator: function validator(rule, value, callback) {
|
|
290
|
+
var _formRef$current2;
|
|
291
|
+
var min = executeCode(ctx, verifyListObj.min.expression, ['cValue'], (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getCValue());
|
|
292
|
+
if (value < min) callback(formatMessage({
|
|
293
|
+
id: "".concat(_I18N_PREFIX_, ".numberBelowMin"),
|
|
294
|
+
label: '低于最小值'
|
|
295
|
+
}));
|
|
296
|
+
callback();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
if ((_verifyListObj$max = verifyListObj.max) !== null && _verifyListObj$max !== void 0 && _verifyListObj$max.expression) props.config.rules.push({
|
|
300
|
+
validator: function validator(rule, value, callback) {
|
|
301
|
+
var _formRef$current3;
|
|
302
|
+
var max = executeCode(ctx, verifyListObj.max.expression, ['cValue'], (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.getCValue());
|
|
303
|
+
if (value > max) callback(formatMessage({
|
|
304
|
+
id: "".concat(_I18N_PREFIX_, ".numberExceedMax"),
|
|
305
|
+
label: '超过最大值'
|
|
306
|
+
}));
|
|
307
|
+
callback();
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
if (verifyListObj.email) props.config.type = 'email';
|
|
311
|
+
if (verifyListObj.idcard) props.config.type = 'idcard';
|
|
312
|
+
if (verifyListObj.mobile) props.config.type = 'mobile';
|
|
313
|
+
if ((_verifyListObj$rules = verifyListObj.rules) !== null && _verifyListObj$rules !== void 0 && _verifyListObj$rules.expression) props.config.rules.push({
|
|
314
|
+
validator: function validator(rule, value, callback) {
|
|
315
|
+
var _formRef$current4;
|
|
316
|
+
executeCode(ctx, verifyListObj.rules.expression, ['cValue', 'rule', 'value', 'callback'], (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.getCValue(), rule, value, callback);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
return props;
|
|
320
|
+
};
|
|
321
|
+
var transEventsInfields = function transEventsInfields(fields) {
|
|
322
|
+
return (fields === null || fields === void 0 ? void 0 : fields.map(function (setting) {
|
|
323
|
+
var advance = setting.advance,
|
|
324
|
+
rest = _objectWithoutProperties(setting, _excluded);
|
|
325
|
+
var props = reduce(rest, function (result, value, key) {
|
|
326
|
+
//处理方法
|
|
327
|
+
result[key] = isString(value) && startsWith(value, 'function') ? function () {
|
|
328
|
+
for (var _len = arguments.length, _props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
329
|
+
_props[_key] = arguments[_key];
|
|
330
|
+
}
|
|
331
|
+
return executeCode.apply(void 0, [ctx, value, getMthodParams(value)].concat(_props));
|
|
332
|
+
} : value;
|
|
333
|
+
return result;
|
|
334
|
+
}, {});
|
|
335
|
+
if (advance !== null && advance !== void 0 && advance.events) return _objectSpread(_objectSpread({}, props), {}, {
|
|
336
|
+
events: reduce(advance.events, function (result, value, key) {
|
|
337
|
+
//处理事件
|
|
338
|
+
result[key] = function () {
|
|
339
|
+
for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
340
|
+
props[_key2] = arguments[_key2];
|
|
341
|
+
}
|
|
342
|
+
ctx.doAction(value, reduce(getMthodParams(value[0][1].code), function (result, value, index) {
|
|
343
|
+
result[value] = props[index];
|
|
344
|
+
return result;
|
|
345
|
+
}, {}));
|
|
346
|
+
};
|
|
347
|
+
return result;
|
|
348
|
+
}, {})
|
|
349
|
+
});
|
|
350
|
+
return props;
|
|
351
|
+
})) || [];
|
|
352
|
+
};
|
|
123
353
|
var renderFormList = useMemoizedFn(function (formConfig) {
|
|
124
|
-
return reduce(
|
|
125
|
-
if (includes(['auto', 'grid', 'writer'], item.type) &&
|
|
354
|
+
return reduce(_blocks, function (result, item) {
|
|
355
|
+
if (includes(['auto', 'grid', 'writer'], item.type) && includes(item.mode, formConfig.formMode)) {
|
|
356
|
+
var _item$dataset;
|
|
126
357
|
var data = {
|
|
127
358
|
id: item.id,
|
|
128
359
|
order: item.order,
|
|
@@ -130,15 +361,17 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
130
361
|
readOnly: item.readOnly,
|
|
131
362
|
title: item.name,
|
|
132
363
|
header: item.header,
|
|
133
|
-
dataSetKey: item.dataset.code,
|
|
364
|
+
dataSetKey: (_item$dataset = item.dataset) === null || _item$dataset === void 0 ? void 0 : _item$dataset.code,
|
|
134
365
|
serial: item.serial,
|
|
135
366
|
serialEffect: item.serialEffect,
|
|
367
|
+
fields: transEventsInfields(item.fields),
|
|
136
368
|
defaultDataSourceFormat: function defaultDataSourceFormat(defaultValues) {
|
|
137
369
|
return handleDefaultDataSourceFormat(item.defaultDataSourceFormat, defaultValues);
|
|
138
370
|
},
|
|
139
371
|
onUpdate: {
|
|
140
372
|
post: function post(data) {
|
|
141
|
-
|
|
373
|
+
var _item$dataset2;
|
|
374
|
+
return handleDataSourceFormat(item.dataSourceFormat, (_item$dataset2 = item.dataset) === null || _item$dataset2 === void 0 ? void 0 : _item$dataset2.code, data);
|
|
142
375
|
}
|
|
143
376
|
}
|
|
144
377
|
};
|
|
@@ -155,8 +388,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
155
388
|
columnsReset: function columnsReset(columns) {
|
|
156
389
|
return handleColumnsReset(item.columnsReset, columns);
|
|
157
390
|
},
|
|
158
|
-
onGridFormReady: function onGridFormReady(
|
|
159
|
-
return handleGridFormReady(item.onGridFormReady,
|
|
391
|
+
onGridFormReady: function onGridFormReady(_ref, params, gridForm) {
|
|
392
|
+
return handleGridFormReady(item.onGridFormReady, _ref, params, gridForm);
|
|
160
393
|
}
|
|
161
394
|
});
|
|
162
395
|
if (item.actionsColumnReset) data = _objectSpread(_objectSpread({}, data), {}, {
|
|
@@ -170,10 +403,9 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
170
403
|
}, []);
|
|
171
404
|
});
|
|
172
405
|
var renderFormExtra = useMemoizedFn(function (formConfig) {
|
|
173
|
-
return reduce(
|
|
406
|
+
return reduce(_blocks, function (result, item) {
|
|
174
407
|
if (includes(item.mode, formConfig.formMode) && !item.serial || item.serialEffect === 'disable' || includes(serials, item.serial)) {
|
|
175
408
|
if (item.type === 'uploadForm') {
|
|
176
|
-
var _remoteSource$pageinf;
|
|
177
409
|
var dom = /*#__PURE__*/React.createElement(Header, {
|
|
178
410
|
ldId: item.id,
|
|
179
411
|
key: item.id,
|
|
@@ -182,7 +414,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
182
414
|
order: item.order
|
|
183
415
|
}, buildUploadForm(_objectSpread(_objectSpread({}, formConfig), {}, {
|
|
184
416
|
formId: item.id,
|
|
185
|
-
moduleCode:
|
|
417
|
+
moduleCode: getLDMetaAttr('moduleCode'),
|
|
186
418
|
readOnly: item.readOnly || formConfig.readOnly || item.serial && !includes(serials, item.serial),
|
|
187
419
|
suppressPreset: item.suppressPreset,
|
|
188
420
|
height: item.height,
|
|
@@ -191,8 +423,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
191
423
|
zipName: "".concat(item.zipName || 'download', ".zip"),
|
|
192
424
|
uploadUrl: item.uploadUrl,
|
|
193
425
|
resetActions: item.useResetActions ? null : function () {
|
|
194
|
-
for (var
|
|
195
|
-
params[
|
|
426
|
+
for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
427
|
+
params[_key3] = arguments[_key3];
|
|
196
428
|
}
|
|
197
429
|
return handleResetActions.apply(void 0, [item.resetActions].concat(params));
|
|
198
430
|
},
|
|
@@ -200,8 +432,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
200
432
|
return handleForbiddenTypes(item.forbiddenTypes);
|
|
201
433
|
},
|
|
202
434
|
beforeUpload: function beforeUpload() {
|
|
203
|
-
for (var
|
|
204
|
-
params[
|
|
435
|
+
for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
436
|
+
params[_key4] = arguments[_key4];
|
|
205
437
|
}
|
|
206
438
|
return handleBeforeUpload.apply(void 0, [item.beforeUpload].concat(params));
|
|
207
439
|
},
|
|
@@ -228,15 +460,42 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
228
460
|
}, []);
|
|
229
461
|
});
|
|
230
462
|
var beforeSubmit = useMemoizedFn(function (values, data) {
|
|
231
|
-
return new Promise(function (
|
|
232
|
-
|
|
233
|
-
var _data
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
463
|
+
return new Promise( /*#__PURE__*/function () {
|
|
464
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
|
|
465
|
+
var _data;
|
|
466
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
467
|
+
while (1) switch (_context.prev = _context.next) {
|
|
468
|
+
case 0:
|
|
469
|
+
if (!isNil(advance.events.beforeSave)) {
|
|
470
|
+
_context.next = 4;
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
resolve(values);
|
|
474
|
+
_context.next = 8;
|
|
475
|
+
break;
|
|
476
|
+
case 4:
|
|
477
|
+
_context.next = 6;
|
|
478
|
+
return ctx.doAction(advance.events.beforeSave, {
|
|
479
|
+
values: values,
|
|
480
|
+
data: data
|
|
481
|
+
});
|
|
482
|
+
case 6:
|
|
483
|
+
_data = _context.sent;
|
|
484
|
+
resolve(last(_data));
|
|
485
|
+
case 8:
|
|
486
|
+
case "end":
|
|
487
|
+
return _context.stop();
|
|
488
|
+
}
|
|
489
|
+
}, _callee);
|
|
490
|
+
}));
|
|
491
|
+
return function (_x) {
|
|
492
|
+
return _ref8.apply(this, arguments);
|
|
493
|
+
};
|
|
494
|
+
}());
|
|
495
|
+
});
|
|
496
|
+
var afterInit = useMemoizedFn(function () {
|
|
497
|
+
ctx.doAction(advance.events.onMount, {
|
|
498
|
+
instance: formRef.current
|
|
240
499
|
});
|
|
241
500
|
});
|
|
242
501
|
var afterSubmit = useMemoizedFn(function (success, mainKey, res) {
|
|
@@ -262,21 +521,16 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
262
521
|
displayName: "Form",
|
|
263
522
|
getTargetDom: getTargetDom,
|
|
264
523
|
api: apiRef
|
|
265
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
266
|
-
ref: boxRef,
|
|
267
|
-
style: {
|
|
268
|
-
width: width,
|
|
269
|
-
height: height
|
|
270
|
-
}
|
|
271
524
|
}, /*#__PURE__*/React.createElement(LdFormList, {
|
|
525
|
+
wrapperRef: wrapperRef,
|
|
272
526
|
id: id,
|
|
273
527
|
ldId: id,
|
|
274
528
|
className: classNames(styles['lc-component-form'], _defineProperty({}, className, !!className)),
|
|
275
529
|
renderFormList: renderFormList,
|
|
276
530
|
renderFormExtra: renderFormExtra,
|
|
277
531
|
mainFormLdId: "block_main",
|
|
278
|
-
initData: initData,
|
|
279
|
-
ref:
|
|
532
|
+
initData: ((_ctx$state2 = ctx.state) === null || _ctx$state2 === void 0 ? void 0 : _ctx$state2[id]) || initData || _initData,
|
|
533
|
+
ref: formRef,
|
|
280
534
|
readOnly: readOnly,
|
|
281
535
|
showSaveBtn: showSave,
|
|
282
536
|
saveBtnTitle: saveTitle,
|
|
@@ -290,8 +544,18 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
290
544
|
beforeSubmit: beforeSubmit,
|
|
291
545
|
afterSubmit: advance.events.onSaveCallback ? afterSubmit : null,
|
|
292
546
|
onValueChange: onValueChange,
|
|
293
|
-
onChildChange: onChildChange
|
|
294
|
-
|
|
547
|
+
onChildChange: onChildChange,
|
|
548
|
+
setVerifyRules: setVerifyRules,
|
|
549
|
+
getContainer: isNil(getContainer) ? null : ctx.componentMap.get(getContainer).api.getSelfDom,
|
|
550
|
+
afterSubmitLoading: function afterSubmitLoading() {
|
|
551
|
+
var _promiseRef$current;
|
|
552
|
+
for (var _len5 = arguments.length, rest = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
553
|
+
rest[_key5] = arguments[_key5];
|
|
554
|
+
}
|
|
555
|
+
return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
|
|
556
|
+
},
|
|
557
|
+
afterInit: afterInit
|
|
558
|
+
}));
|
|
295
559
|
});
|
|
296
560
|
LCForm.defaultProps = omitBadProps(defaultMeta);
|
|
297
561
|
export default LCForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.lc-component-form{
|
|
2
|
-
}
|
|
3
|
-
.lc-component-form.runtime-form {
|
|
4
|
-
|
|
1
|
+
.lc-component-form{
|
|
2
|
+
}
|
|
3
|
+
.lc-component-form.runtime-form {
|
|
4
|
+
|
|
5
5
|
}
|