@luck-design-biz/luckda 0.0.25-2 → 0.0.25-21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/ComplexItem/index.js +92 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/LDActions/index.js +8 -10
- package/es/components/LDActions/index.less +68 -65
- package/es/components/LdAutoForm/index.js +57 -12
- package/es/components/LdFormList/index.js +50 -28
- package/es/components/LdGrid/index.js +23 -11
- package/es/components/LdGridForm/index.js +37 -12
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +59 -19
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/FromItems.js +177 -94
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +69 -28
- package/es/helper/index.less +7 -7
- package/es/helper/props_config.js +17 -0
- package/es/index.js +0 -1
- package/es/locales/zh-CN.js +22 -17
- package/es/lowcode/constants/api-url.js +269 -98
- package/es/lowcode/constants/event-topics.js +3 -0
- package/es/lowcode/constants/index.js +2 -1
- package/es/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +2 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/launcher.js +7 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +4 -4
- package/es/lowcode/engine/meta/button.props.json +3 -3
- package/es/lowcode/engine/meta/cardlist.props.json +13 -3
- package/es/lowcode/engine/meta/components-list.json +116 -8
- package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/es/lowcode/engine/meta/dialog.props.json +79 -42
- package/es/lowcode/engine/meta/drawer.props.json +8 -20
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/es/lowcode/engine/meta/fielddate.props.json +130 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddict.props.json +127 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/es/lowcode/engine/meta/fielduser.props.json +165 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/es/lowcode/engine/meta/form.props.default.json +2 -2
- package/es/lowcode/engine/meta/form.props.json +36 -16
- package/es/lowcode/engine/meta/imex.props.default.json +8 -1
- package/es/lowcode/engine/meta/imex.props.json +54 -22
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +12 -6
- package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +4 -4
- package/es/lowcode/engine/meta/table.props.default.json +2 -1
- package/es/lowcode/engine/meta/table.props.json +27 -14
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +7 -5
- package/es/lowcode/engine/meta/tree.props.json +112 -55
- package/es/lowcode/engine/provider/ContextProvider/index.js +104 -86
- package/es/lowcode/engine/provider/ContextProvider/usePageState.js +21 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +96 -49
- package/es/lowcode/engine/tools/dataProcess.js +80 -76
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +92 -7
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/useCombinedRefs.js +14 -0
- package/es/lowcode/engine/tools/usePageDataStore.js +350 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/index.js +1 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +8 -5
- package/es/lowcode/painter/DesignOperator.js +111 -85
- package/es/lowcode/painter/DesignToolbar.js +85 -47
- package/es/lowcode/painter/Outline.js +12 -10
- package/es/lowcode/painter/Panel.js +85 -45
- package/es/lowcode/painter/components/ActionBindModal.js +45 -28
- package/es/lowcode/painter/components/AdvancePanel.js +37 -21
- package/es/lowcode/painter/components/AttrsPanel.js +40 -29
- package/es/lowcode/painter/components/Collapse.js +26 -26
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/es/lowcode/painter/components/FieldSelector.js +26 -13
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/PreviewIframe.js +19 -0
- package/es/lowcode/painter/components/RuleInput.js +30 -31
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +48 -42
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
- package/es/lowcode/painter/components/field-setting/SettingUI.js +158 -77
- package/es/lowcode/painter/components/field-setting/index.js +32 -65
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +11 -17
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/es/lowcode/painter/panel-section/FieldsSetting.js +72 -54
- package/es/lowcode/painter/panel-section/I18nInput.js +2 -1
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/ImpExp.js +131 -37
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +124 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +112 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +28 -112
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +4 -4
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -3
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +22 -16
- package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/es/lowcode/painter/style/action-bind-modal.less +102 -102
- package/es/lowcode/painter/style/actions-editor.less +15 -15
- package/es/lowcode/painter/style/border-editor.less +36 -36
- package/es/lowcode/painter/style/border-radius-selector.less +42 -42
- package/es/lowcode/painter/style/border-selector.less +39 -39
- package/es/lowcode/painter/style/button-type.less +5 -5
- package/es/lowcode/painter/style/collapse.less +28 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +91 -91
- package/es/lowcode/painter/style/design.less +159 -152
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +10 -10
- package/es/lowcode/painter/style/fields-setting.less +25 -25
- package/es/lowcode/painter/style/font-editor.less +9 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/es/lowcode/painter/style/icon-selector.less +22 -22
- package/es/lowcode/painter/style/icon.less +10 -10
- package/es/lowcode/painter/style/impexp.less +7 -7
- package/es/lowcode/painter/style/index.less +6 -6
- package/es/lowcode/painter/style/layout-ratio.less +51 -51
- package/es/lowcode/painter/style/list-editor.less +95 -95
- package/es/lowcode/painter/style/number-input.less +17 -17
- package/es/lowcode/painter/style/outline.less +28 -28
- package/es/lowcode/painter/style/page-layout-display.less +28 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +98 -98
- package/es/lowcode/painter/style/pop-confirm.less +17 -17
- package/es/lowcode/painter/style/pop-form.less +19 -19
- package/es/lowcode/painter/style/radio.less +24 -24
- package/es/lowcode/painter/style/ribbon.less +5 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -27
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/style/treedragdrop.less +19 -19
- package/es/lowcode/view/Canvas.js +34 -8
- package/es/lowcode/view/Page.js +2 -4
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +4 -4
- package/es/lowcode/view/lc-components/Box/index.less +14 -14
- package/es/lowcode/view/lc-components/Box/meta.json +40 -40
- package/es/lowcode/view/lc-components/Button/index.js +35 -39
- package/es/lowcode/view/lc-components/Button/meta.json +127 -127
- package/es/lowcode/view/lc-components/Button/style.less +2 -2
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/es/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/es/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/es/lowcode/view/lc-components/Form/index.js +345 -80
- package/es/lowcode/view/lc-components/Form/index.less +4 -4
- package/es/lowcode/view/lc-components/Form/meta.json +610 -599
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
- package/es/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +12 -15
- package/es/lowcode/view/lc-components/JSX/index.js +5 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Layout/index.js +19 -17
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Link/index.js +3 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +55 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +11 -10
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +8 -6
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +68 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/index.js +37 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Section/index.js +6 -3
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +107 -107
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Split/index.js +8 -9
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +425 -0
- package/es/lowcode/view/lc-components/Table/index.js +426 -202
- package/es/lowcode/view/lc-components/Table/meta.json +451 -399
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -18
- package/es/lowcode/view/lc-components/Tabs/index.js +52 -37
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Text/index.js +3 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tree/index.js +173 -119
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/es/lowcode/view/lc-components/Wrapper.js +11 -12
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +84 -84
- package/es/lowcode/view/style/page.less +7 -7
- package/es/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/gridForm.js +3 -2
- package/es/upload/Form/index.js +2 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +20 -21
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +37 -24
- package/es/utils/grid.js +10 -7
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +68 -65
- package/lib/components/LdAutoForm/index.js +56 -11
- package/lib/components/LdFormList/index.js +49 -27
- package/lib/components/LdGrid/index.js +23 -11
- package/lib/components/LdGridForm/index.js +35 -10
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +57 -17
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +67 -27
- package/lib/helper/index.less +7 -7
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +1 -9
- package/lib/locales/zh-CN.js +22 -17
- package/lib/lowcode/constants/api-url.js +270 -97
- package/lib/lowcode/constants/event-topics.js +4 -1
- package/lib/lowcode/constants/index.js +3 -2
- package/lib/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +4 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/launcher.js +13 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +4 -4
- package/lib/lowcode/engine/meta/button.props.json +3 -3
- package/lib/lowcode/engine/meta/cardlist.props.json +13 -3
- package/lib/lowcode/engine/meta/components-list.json +116 -8
- package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/lib/lowcode/engine/meta/dialog.props.json +79 -42
- package/lib/lowcode/engine/meta/drawer.props.json +8 -20
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +130 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +165 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/lib/lowcode/engine/meta/form.props.default.json +2 -2
- package/lib/lowcode/engine/meta/form.props.json +36 -16
- package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
- package/lib/lowcode/engine/meta/imex.props.json +54 -22
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +12 -6
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +4 -4
- package/lib/lowcode/engine/meta/table.props.default.json +2 -1
- package/lib/lowcode/engine/meta/table.props.json +27 -14
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +7 -5
- package/lib/lowcode/engine/meta/tree.props.json +112 -55
- package/lib/lowcode/engine/provider/ContextProvider/index.js +120 -86
- package/lib/lowcode/engine/provider/ContextProvider/usePageState.js +28 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +93 -46
- package/lib/lowcode/engine/tools/dataProcess.js +80 -76
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +96 -6
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/useCombinedRefs.js +20 -0
- package/lib/lowcode/engine/tools/usePageDataStore.js +357 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +7 -4
- package/lib/lowcode/painter/DesignOperator.js +108 -82
- package/lib/lowcode/painter/DesignToolbar.js +83 -45
- package/lib/lowcode/painter/Outline.js +10 -8
- package/lib/lowcode/painter/Panel.js +83 -43
- package/lib/lowcode/painter/components/ActionBindModal.js +42 -25
- package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
- package/lib/lowcode/painter/components/AttrsPanel.js +39 -28
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/lib/lowcode/painter/components/FieldSelector.js +26 -13
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/PreviewIframe.js +26 -0
- package/lib/lowcode/painter/components/RuleInput.js +30 -31
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +48 -42
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +155 -74
- package/lib/lowcode/painter/components/field-setting/index.js +32 -65
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +10 -16
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +69 -51
- package/lib/lowcode/painter/panel-section/I18nInput.js +2 -1
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/ImpExp.js +131 -36
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +130 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +120 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +27 -111
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +4 -4
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +7 -6
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +22 -16
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -102
- package/lib/lowcode/painter/style/actions-editor.less +15 -15
- package/lib/lowcode/painter/style/border-editor.less +36 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
- package/lib/lowcode/painter/style/border-selector.less +39 -39
- package/lib/lowcode/painter/style/button-type.less +5 -5
- package/lib/lowcode/painter/style/collapse.less +28 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +91 -91
- package/lib/lowcode/painter/style/design.less +159 -152
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +10 -10
- package/lib/lowcode/painter/style/fields-setting.less +25 -25
- package/lib/lowcode/painter/style/font-editor.less +9 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/lib/lowcode/painter/style/icon-selector.less +22 -22
- package/lib/lowcode/painter/style/icon.less +10 -10
- package/lib/lowcode/painter/style/impexp.less +7 -7
- package/lib/lowcode/painter/style/index.less +6 -6
- package/lib/lowcode/painter/style/layout-ratio.less +51 -51
- package/lib/lowcode/painter/style/list-editor.less +95 -95
- package/lib/lowcode/painter/style/number-input.less +17 -17
- package/lib/lowcode/painter/style/outline.less +28 -28
- package/lib/lowcode/painter/style/page-layout-display.less +28 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +98 -98
- package/lib/lowcode/painter/style/pop-confirm.less +17 -17
- package/lib/lowcode/painter/style/pop-form.less +19 -19
- package/lib/lowcode/painter/style/radio.less +24 -24
- package/lib/lowcode/painter/style/ribbon.less +5 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -27
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/style/treedragdrop.less +19 -19
- package/lib/lowcode/view/Canvas.js +34 -7
- package/lib/lowcode/view/Page.js +2 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Box/index.js +4 -4
- package/lib/lowcode/view/lc-components/Box/index.less +14 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
- package/lib/lowcode/view/lc-components/Button/index.js +35 -39
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
- package/lib/lowcode/view/lc-components/Button/style.less +2 -2
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/lib/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/lib/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/lib/lowcode/view/lc-components/Form/index.js +341 -76
- package/lib/lowcode/view/lc-components/Form/index.less +4 -4
- package/lib/lowcode/view/lc-components/Form/meta.json +610 -599
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
- package/lib/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +13 -16
- package/lib/lowcode/view/lc-components/JSX/index.js +5 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Layout/index.js +19 -17
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Link/index.js +3 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +55 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +9 -8
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +7 -5
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +76 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/index.js +45 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Section/index.js +6 -3
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +5 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +433 -0
- package/lib/lowcode/view/lc-components/Table/index.js +422 -198
- package/lib/lowcode/view/lc-components/Table/meta.json +451 -399
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +12 -19
- package/lib/lowcode/view/lc-components/Tabs/index.js +51 -36
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Text/index.js +3 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +170 -116
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/lib/lowcode/view/lc-components/Wrapper.js +12 -12
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +84 -84
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/gridForm.js +3 -2
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +20 -21
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +37 -24
- package/lib/utils/grid.js +10 -7
- package/lowcode.js +1 -1
- package/package.json +173 -171
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
|
@@ -6,11 +6,11 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
7
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
9
|
-
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps"],
|
|
9
|
+
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading"],
|
|
10
10
|
_excluded2 = ["dataSets", "doAction", "resources"],
|
|
11
11
|
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
|
|
12
12
|
_excluded4 = ["ldId", "initData", "overModel"];
|
|
13
|
-
import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState } from 'react';
|
|
13
|
+
import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState, useEffect } from 'react';
|
|
14
14
|
import { connect, getDvaApp, useRouteMatch } from 'umi';
|
|
15
15
|
import PropTypes from 'prop-types';
|
|
16
16
|
import { isArray, sortBy, mapValues, reduce, includes } from 'lodash';
|
|
@@ -26,7 +26,7 @@ import { LuckDaContext } from "../Builder";
|
|
|
26
26
|
import { LuckDaPopContext } from "../LdPop";
|
|
27
27
|
import createModel from "./model";
|
|
28
28
|
import { onBatchSubmitAction } from "../../helper/action";
|
|
29
|
-
import
|
|
29
|
+
import useTodo from "../../lowcode/engine/tools/useTodo";
|
|
30
30
|
|
|
31
31
|
// 组件
|
|
32
32
|
var LdFormList = function LdFormList(_ref) {
|
|
@@ -36,6 +36,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
36
36
|
formMode = _ref.formMode,
|
|
37
37
|
formOperates = _ref.formOperates,
|
|
38
38
|
loading = _ref.loading,
|
|
39
|
+
apiRef = _ref.apiRef,
|
|
39
40
|
wrapperRef = _ref.wrapperRef,
|
|
40
41
|
readOnly = _ref.readOnly,
|
|
41
42
|
mainFormLdId = _ref.mainFormLdId,
|
|
@@ -46,6 +47,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
46
47
|
showSaveBtn = _ref.showSaveBtn,
|
|
47
48
|
saveBtnTitle = _ref.saveBtnTitle,
|
|
48
49
|
affixLayout = _ref.affixLayout,
|
|
50
|
+
getContainer = _ref.getContainer,
|
|
49
51
|
_ref$onValueChange = _ref.onValueChange,
|
|
50
52
|
onValueChange = _ref$onValueChange === void 0 ? function () {} : _ref$onValueChange,
|
|
51
53
|
afterSubmit = _ref.afterSubmit,
|
|
@@ -55,8 +57,11 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
55
57
|
} : _ref$renderFormExtra,
|
|
56
58
|
_ref$bpmButtonProps = _ref.bpmButtonProps,
|
|
57
59
|
bpmButtonProps = _ref$bpmButtonProps === void 0 ? {} : _ref$bpmButtonProps,
|
|
60
|
+
setVerifyRules = _ref.setVerifyRules,
|
|
61
|
+
afterSubmitLoading = _ref.afterSubmitLoading,
|
|
58
62
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
59
63
|
var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
|
|
64
|
+
var currentValueRef = useRef(null);
|
|
60
65
|
var _useState = useState(false),
|
|
61
66
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
67
|
submitLoading = _useState2[0],
|
|
@@ -69,6 +74,10 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
69
74
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
75
|
bizData = _useState6[0],
|
|
71
76
|
setBizData = _useState6[1];
|
|
77
|
+
var _useTodo = useTodo(),
|
|
78
|
+
_useTodo2 = _slicedToArray(_useTodo, 2),
|
|
79
|
+
_ = _useTodo2[0],
|
|
80
|
+
callBehavior = _useTodo2[1];
|
|
72
81
|
var luckTheme = useCreation(function () {
|
|
73
82
|
return document.body.getAttribute('luck-theme');
|
|
74
83
|
}, []);
|
|
@@ -80,8 +89,11 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
80
89
|
resources = _ref3.resources,
|
|
81
90
|
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
82
91
|
var formListRef = useRef(null);
|
|
83
|
-
useImperativeHandle(
|
|
92
|
+
useImperativeHandle(apiRef, function () {
|
|
84
93
|
return _objectSpread(_objectSpread({}, formListRef.current), {}, {
|
|
94
|
+
getCValue: function getCValue() {
|
|
95
|
+
return currentValueRef.current || props.formData;
|
|
96
|
+
},
|
|
85
97
|
onLdQuery: function onLdQuery() {
|
|
86
98
|
var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
87
99
|
if (props.formMode !== 'add') {
|
|
@@ -94,7 +106,8 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
94
106
|
});
|
|
95
107
|
formListRef.current.doQuery();
|
|
96
108
|
}
|
|
97
|
-
}
|
|
109
|
+
},
|
|
110
|
+
ticketData: props.ticketData
|
|
98
111
|
});
|
|
99
112
|
});
|
|
100
113
|
var handleValueChange = useMemoizedFn(function (change) {
|
|
@@ -105,6 +118,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
105
118
|
var getValue = ((_formRefs$key = formRefs[key]) !== null && _formRefs$key !== void 0 && (_formRefs$key = _formRefs$key.formRef) !== null && _formRefs$key !== void 0 && _formRefs$key.current ? formRefs[key].getData : null) || ((_formRefs$key$current = formRefs[key].current) === null || _formRefs$key$current === void 0 ? void 0 : _formRefs$key$current.getFieldsValue);
|
|
106
119
|
return _defineProperty({}, key, getValue && getValue());
|
|
107
120
|
});
|
|
121
|
+
currentValueRef.current = data;
|
|
108
122
|
onValueChange(change, data);
|
|
109
123
|
});
|
|
110
124
|
var renderExtra = useMemoizedFn(function (formId, extraConfig, type) {
|
|
@@ -124,7 +138,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
124
138
|
}, bpmButtonProps)));
|
|
125
139
|
};
|
|
126
140
|
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
127
|
-
var _props$formData$mainF, _params, response, _yield$
|
|
141
|
+
var _props$formData$mainF, _params, response, _yield$callBehavior, code, data, _props$formData$mainF2, _props$formData$mainF3, bpmInfoObj, tempObj;
|
|
128
142
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
129
143
|
while (1) switch (_context.prev = _context.next) {
|
|
130
144
|
case 0:
|
|
@@ -134,13 +148,14 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
134
148
|
}
|
|
135
149
|
_params = {
|
|
136
150
|
indocno: (_props$formData$mainF = props.formData[mainFormLdId]) === null || _props$formData$mainF === void 0 ? void 0 : _props$formData$mainF[PRIMARY],
|
|
151
|
+
mainDataSetKey: mainDataSetKey
|
|
152
|
+
}; // 请求是否有工作流服务
|
|
153
|
+
_context.next = 4;
|
|
154
|
+
return callBehavior({
|
|
137
155
|
moduleCode: rest.moduleCode,
|
|
138
156
|
datasetCode: mainDataSetKey,
|
|
139
|
-
mainDataSetKey: mainDataSetKey,
|
|
140
157
|
behaviorKey: 'readBpmDeploy'
|
|
141
|
-
};
|
|
142
|
-
_context.next = 4;
|
|
143
|
-
return readBehaviorCall(_params);
|
|
158
|
+
}, _params);
|
|
144
159
|
case 4:
|
|
145
160
|
response = _context.sent;
|
|
146
161
|
if (!(response.code === 1 && response.data)) {
|
|
@@ -148,13 +163,15 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
148
163
|
break;
|
|
149
164
|
}
|
|
150
165
|
_context.next = 8;
|
|
151
|
-
return
|
|
166
|
+
return callBehavior({
|
|
167
|
+
moduleCode: rest.moduleCode,
|
|
168
|
+
datasetCode: mainDataSetKey,
|
|
152
169
|
behaviorKey: 'readBpm'
|
|
153
|
-
})
|
|
170
|
+
}, _params);
|
|
154
171
|
case 8:
|
|
155
|
-
_yield$
|
|
156
|
-
code = _yield$
|
|
157
|
-
data = _yield$
|
|
172
|
+
_yield$callBehavior = _context.sent;
|
|
173
|
+
code = _yield$callBehavior.code;
|
|
174
|
+
data = _yield$callBehavior.data;
|
|
158
175
|
if (code == 1 && data) {
|
|
159
176
|
bpmInfoObj = data.bpmInfo;
|
|
160
177
|
tempObj = _objectSpread(_objectSpread({}, props.formData[mainFormLdId]), {}, {
|
|
@@ -194,6 +211,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
194
211
|
formUid: formUid,
|
|
195
212
|
mainDataSetKey: mainDataSetKey
|
|
196
213
|
}, function (success, mainKey, res) {
|
|
214
|
+
afterSubmitLoading && afterSubmitLoading(res);
|
|
197
215
|
setSubmitLoading(false);
|
|
198
216
|
if (success) {
|
|
199
217
|
var mainFormData = res.detail[res.list[0]];
|
|
@@ -234,7 +252,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
234
252
|
var mainDataSetKey = (_formList$find = formList.find(function (i) {
|
|
235
253
|
return i.id === mainFormLdId;
|
|
236
254
|
})) === null || _formList$find === void 0 ? void 0 : _formList$find.dataSetKey;
|
|
237
|
-
return
|
|
255
|
+
return /*#__PURE__*/React.createElement(FormList, _extends({
|
|
238
256
|
editFlow: true,
|
|
239
257
|
formState: formState,
|
|
240
258
|
formMode: formMode,
|
|
@@ -244,6 +262,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
244
262
|
})
|
|
245
263
|
}, props, {
|
|
246
264
|
modelName: namespace,
|
|
265
|
+
wrapperRef: wrapperRef,
|
|
247
266
|
ref: formListRef,
|
|
248
267
|
onAdd: function onAdd(values, other) {
|
|
249
268
|
return handleBatchSubmit(values, 'add', other);
|
|
@@ -256,12 +275,15 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
256
275
|
renderLeft: renderAffixLeft,
|
|
257
276
|
renderRight: isCustomRenderAffixRight ? renderAffixRightCustom : renderAffixRight,
|
|
258
277
|
title: saveBtnTitle,
|
|
259
|
-
layout: affixLayout || defaultLayout
|
|
278
|
+
layout: affixLayout || defaultLayout,
|
|
279
|
+
getContainer: getContainer
|
|
260
280
|
}), sortBy([].concat(_toConsumableArray(formList), _toConsumableArray(formExtra)), function (o) {
|
|
261
281
|
var _o$props;
|
|
262
282
|
return o.order || ((_o$props = o.props) === null || _o$props === void 0 ? void 0 : _o$props.order);
|
|
263
283
|
}).map(function (formProps) {
|
|
264
|
-
|
|
284
|
+
var _formProps$type = formProps.type,
|
|
285
|
+
type = _formProps$type === void 0 ? 'auto' : _formProps$type;
|
|
286
|
+
if (includes(['auto', 'writer', 'grid'], type)) {
|
|
265
287
|
var _ref8 = formProps || {},
|
|
266
288
|
ldId = _ref8.id,
|
|
267
289
|
_ref8$header = _ref8.header,
|
|
@@ -276,17 +298,15 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
276
298
|
} : _ref8$renderTopLeft,
|
|
277
299
|
serial = _ref8.serial,
|
|
278
300
|
_props = _objectWithoutProperties(_ref8, _excluded3);
|
|
279
|
-
var _props$type = _props.type,
|
|
280
|
-
type = _props$type === void 0 ? 'auto' : _props$type;
|
|
281
301
|
var renderForm = type === 'auto' ? buildLdAutoForm : buildLdGridForm;
|
|
282
302
|
var _readOnly = selfReadOnly || serial && !includes(resources, serial);
|
|
283
303
|
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/React.createElement(Collapse, {
|
|
284
304
|
title: title || ldId,
|
|
285
|
-
extra: type === 'auto' && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
305
|
+
extra: type === 'auto' && formProps.dataSetKey && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
286
306
|
id: ldId,
|
|
287
307
|
key: ldId,
|
|
288
308
|
mode: header === 'collapse' && ldId !== mainFormLdId && 'tab'
|
|
289
|
-
}, renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
309
|
+
}, formProps.dataSetKey && renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
290
310
|
ldId: ldId,
|
|
291
311
|
mainFormLdId: mainFormLdId,
|
|
292
312
|
mainDataSetKey: mainDataSetKey,
|
|
@@ -295,18 +315,19 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
295
315
|
ticketData: props.ticketData,
|
|
296
316
|
renderTopLeft: function renderTopLeft() {
|
|
297
317
|
return type === 'auto' ? _renderTopLeft() : [renderExtra(ldId, extraConfig, 'text'), _renderTopLeft()];
|
|
298
|
-
}
|
|
318
|
+
},
|
|
319
|
+
setVerifyRules: setVerifyRules
|
|
299
320
|
})));
|
|
300
321
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
301
322
|
key: ldId
|
|
302
323
|
}, header === 'divider' && /*#__PURE__*/React.createElement(BasicDivider, {
|
|
303
324
|
title: title || ldId,
|
|
304
325
|
id: ldId
|
|
305
|
-
}), type === 'auto' && /*#__PURE__*/React.createElement("div", {
|
|
326
|
+
}), type === 'auto' && formProps.dataSetKey && /*#__PURE__*/React.createElement("div", {
|
|
306
327
|
style: {
|
|
307
328
|
textAlign: 'right'
|
|
308
329
|
}
|
|
309
|
-
}, renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic')), renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
330
|
+
}, renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic')), formProps.dataSetKey && renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
310
331
|
ldId: ldId,
|
|
311
332
|
mainFormLdId: mainFormLdId,
|
|
312
333
|
mainDataSetKey: mainDataSetKey,
|
|
@@ -315,7 +336,8 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
315
336
|
ticketData: props.ticketData,
|
|
316
337
|
renderTopLeft: function renderTopLeft() {
|
|
317
338
|
return type === 'auto' ? _renderTopLeft() : [renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'), _renderTopLeft()];
|
|
318
|
-
}
|
|
339
|
+
},
|
|
340
|
+
setVerifyRules: setVerifyRules
|
|
319
341
|
})));
|
|
320
342
|
}
|
|
321
343
|
return ChildrenUtil.deepMap(formProps, function (child) {
|
|
@@ -324,7 +346,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
324
346
|
mode: child.props.mode || 'tab'
|
|
325
347
|
}) : child.props);
|
|
326
348
|
})[0];
|
|
327
|
-
}))
|
|
349
|
+
}));
|
|
328
350
|
};
|
|
329
351
|
|
|
330
352
|
// 构建带有model的组件
|
|
@@ -409,6 +431,6 @@ Index.defaultProps = {
|
|
|
409
431
|
};
|
|
410
432
|
export default /*#__PURE__*/forwardRef(function (props, ref) {
|
|
411
433
|
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
412
|
-
|
|
434
|
+
apiRef: ref
|
|
413
435
|
}, props));
|
|
414
436
|
});
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "loading", "unclosableSet", "onQuery", "doQuery", "pagination", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "_loading", "loading", "unclosableSet", "onQuery", "doQuery", "pagination", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
6
6
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery", "isTreeGrid"];
|
|
7
7
|
import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
@@ -26,6 +26,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
26
26
|
detail = _ref.detail,
|
|
27
27
|
params = _ref.params,
|
|
28
28
|
filters = _ref.filters,
|
|
29
|
+
_loading = _ref._loading,
|
|
29
30
|
loading = _ref.loading,
|
|
30
31
|
unclosableSet = _ref.unclosableSet,
|
|
31
32
|
onQuery = _ref.onQuery,
|
|
@@ -66,6 +67,16 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
66
67
|
}, [params, filters]);
|
|
67
68
|
useImperativeHandle(wrapperRef, function () {
|
|
68
69
|
return _objectSpread(_objectSpread({}, gridRef.current), {}, {
|
|
70
|
+
getProps: function getProps() {
|
|
71
|
+
var _getDvaApp;
|
|
72
|
+
return {
|
|
73
|
+
apiUrl: (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 || (_getDvaApp = _getDvaApp._store.getState()[namespace]) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp.apiUrl,
|
|
74
|
+
filter: {
|
|
75
|
+
filters: filters,
|
|
76
|
+
params: params
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
},
|
|
69
80
|
onLdQuery: function onLdQuery() {
|
|
70
81
|
var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
71
82
|
doQuery({
|
|
@@ -82,10 +93,10 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
82
93
|
});
|
|
83
94
|
}, [batchOperations]);
|
|
84
95
|
|
|
85
|
-
/**
|
|
86
|
-
* 优先级
|
|
87
|
-
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
88
|
-
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
96
|
+
/**
|
|
97
|
+
* 优先级
|
|
98
|
+
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
99
|
+
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
89
100
|
*/
|
|
90
101
|
var _columns = useCreation(function () {
|
|
91
102
|
if (columnsReset) {
|
|
@@ -142,7 +153,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
142
153
|
,
|
|
143
154
|
actionsColumn: _actionsColumn,
|
|
144
155
|
batchOperations: _batchOperations,
|
|
145
|
-
loading: loading,
|
|
156
|
+
loading: _loading || loading,
|
|
146
157
|
pagination: isFlow ? false : _objectSpread({
|
|
147
158
|
total: total,
|
|
148
159
|
current: current,
|
|
@@ -173,13 +184,14 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
173
184
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
174
185
|
var isTreeGrid = isNil(_isTreeGrid) ? includes(props.isTree, props.dataSetKey) : _isTreeGrid;
|
|
175
186
|
var Component = useCreation(function () {
|
|
176
|
-
var
|
|
177
|
-
(
|
|
178
|
-
if (!((
|
|
179
|
-
var
|
|
180
|
-
(
|
|
187
|
+
var _getDvaApp2, _getDvaApp3;
|
|
188
|
+
(_getDvaApp2 = getDvaApp()) === null || _getDvaApp2 === void 0 || _getDvaApp2.unmodel(namespace);
|
|
189
|
+
if (!((_getDvaApp3 = getDvaApp()) !== null && _getDvaApp3 !== void 0 && _getDvaApp3._store.getState()[namespace])) {
|
|
190
|
+
var _getDvaApp4, _props$pagination;
|
|
191
|
+
(_getDvaApp4 = getDvaApp()) === null || _getDvaApp4 === void 0 || _getDvaApp4.model(createModel(namespace, _objectSpread(_objectSpread({
|
|
181
192
|
behaviorKey: isTreeGrid ? 'readTree' : 'readGrid'
|
|
182
193
|
}, overModel), {}, {
|
|
194
|
+
pageSize: overModel.pageSize || ((_props$pagination = props.pagination) === null || _props$pagination === void 0 ? void 0 : _props$pagination.pageSize) || props.pageSize,
|
|
183
195
|
isFlow: isTreeGrid || !!props.isFlow,
|
|
184
196
|
moduleCode: moduleCode,
|
|
185
197
|
dataSetKey: props.dataSetKey,
|
|
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode"];
|
|
6
|
-
import React, { createRef, useContext
|
|
7
|
-
import {
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode", "fields", "setVerifyRules"];
|
|
6
|
+
import React, { createRef, useContext } from 'react';
|
|
7
|
+
import { reduce, keyBy, isEmpty, pick, omit } from 'lodash';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import ldBuilder from "../../helper/ldBuilder";
|
|
10
10
|
import { GridForm } from '@luck-design-biz/base/FormList';
|
|
@@ -51,10 +51,12 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
51
51
|
className = _ref.className,
|
|
52
52
|
formRef = _ref.formRef,
|
|
53
53
|
formMode = _ref.formMode,
|
|
54
|
+
fields = _ref.fields,
|
|
55
|
+
setVerifyRules = _ref.setVerifyRules,
|
|
54
56
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
57
|
var _ref2 = useContext(LuckDaContext) || {},
|
|
56
58
|
setFieldProps = _ref2.setFieldProps;
|
|
57
|
-
var defaultValues = /*#__PURE__*/createRef();
|
|
59
|
+
var defaultValues = /*#__PURE__*/createRef({});
|
|
58
60
|
var isMain = ldId === mainFormLdId;
|
|
59
61
|
var gridColumns = columns.map(function (col) {
|
|
60
62
|
if ((col.comName || defaultComName[col.property]) === 'radio') return _objectSpread(_objectSpread({}, col), {}, {
|
|
@@ -63,9 +65,14 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
63
65
|
return col;
|
|
64
66
|
});
|
|
65
67
|
var _columns = function () {
|
|
68
|
+
var fieldsObj = keyBy(fields, 'field');
|
|
69
|
+
var columnsObj = keyBy(gridColumns, 'field');
|
|
70
|
+
var keys = isEmpty(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
|
|
66
71
|
var _defaultValues = {};
|
|
67
|
-
var _nodes =
|
|
68
|
-
|
|
72
|
+
var _nodes = reduce(keys, function (result, key) {
|
|
73
|
+
var setting = fieldsObj[key];
|
|
74
|
+
var col = columnsObj[key];
|
|
75
|
+
if (col !== null && col !== void 0 && col.isShowInForm) {
|
|
69
76
|
var _customColumn;
|
|
70
77
|
var customColumn = columnsRewrite.find(function (column) {
|
|
71
78
|
return column.field === col.aliaName;
|
|
@@ -75,14 +82,21 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
75
82
|
mode: 'grid'
|
|
76
83
|
});
|
|
77
84
|
_defaultValues = _objectSpread(_objectSpread({}, _defaultValues), {}, _defineProperty(_defineProperty({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
78
|
-
|
|
85
|
+
var newCol = _objectSpread(_objectSpread({}, col), {}, {
|
|
86
|
+
setVerifyRules: setVerifyRules,
|
|
87
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
88
|
+
});
|
|
89
|
+
var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip'];
|
|
90
|
+
result.push(getFormColumn(type, newCol, _objectSpread(_objectSpread(_objectSpread({}, pick(setting, defaultSet)), customColumn), {}, {
|
|
79
91
|
formItemRewrite: _objectSpread(_objectSpread({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
|
|
80
92
|
moduleCode: moduleCode,
|
|
81
93
|
formRef: formRef,
|
|
82
|
-
formMode: formMode
|
|
94
|
+
formMode: formMode,
|
|
95
|
+
setting: omit(setting, [].concat(defaultSet, ['uid', 'field']))
|
|
83
96
|
})
|
|
84
97
|
})));
|
|
85
98
|
}
|
|
99
|
+
return result;
|
|
86
100
|
}, []);
|
|
87
101
|
defaultValues.current = _defaultValues;
|
|
88
102
|
setFieldProps && setFieldProps(_defineProperty({}, ldId, _nodes.map(function (col) {
|
|
@@ -96,7 +110,9 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
96
110
|
})));
|
|
97
111
|
return columnsReset ? columnsReset(_nodes) : _nodes;
|
|
98
112
|
}();
|
|
99
|
-
var defaultDataSource = _objectSpread(_objectSpread({}, formItemDataFormat(columns
|
|
113
|
+
var defaultDataSource = _objectSpread(_objectSpread({}, formItemDataFormat(columns.map(function (c) {
|
|
114
|
+
return _objectSpread(_objectSpread({}, c), keyBy(fields, 'field')[c.field]);
|
|
115
|
+
}), defaultValues.current)), defaultDataSourceFormat(defaultValues.current));
|
|
100
116
|
var formConfig = {
|
|
101
117
|
formId: ldId,
|
|
102
118
|
columns: _columns,
|
|
@@ -126,7 +142,11 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
126
142
|
var _submitData = data.map(function (item) {
|
|
127
143
|
return behaviorKey === 'add' ? _objectSpread(_objectSpread({}, dataFormat(gridColumns, item)), {}, _defineProperty({}, window.appConfig.constraintKeys.PRIMARY, null)) : dataFormat(gridColumns, item);
|
|
128
144
|
});
|
|
129
|
-
if (_onOperate !== null && _onOperate !== void 0 && _onOperate.post) return _onOperate.post(
|
|
145
|
+
if (_onOperate !== null && _onOperate !== void 0 && _onOperate.post) return _onOperate.post({
|
|
146
|
+
values: data,
|
|
147
|
+
submitData: _submitData,
|
|
148
|
+
behaviorKey: behaviorKey
|
|
149
|
+
}); // 以预设为主
|
|
130
150
|
return _defineProperty({}, dataSetKey, _defineProperty({}, "".concat(behaviorKey, "List"), _submitData));
|
|
131
151
|
}
|
|
132
152
|
});
|
|
@@ -136,7 +156,10 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
136
156
|
orderByAdd: "asc",
|
|
137
157
|
rowSelection: true,
|
|
138
158
|
type: type,
|
|
139
|
-
rowKey: window.appConfig.constraintKeys.PRIMARY || 'indocno'
|
|
159
|
+
rowKey: window.appConfig.constraintKeys.PRIMARY || 'indocno',
|
|
160
|
+
wrapperProps: {
|
|
161
|
+
id: ldId
|
|
162
|
+
}
|
|
140
163
|
}, props, {
|
|
141
164
|
onQuery: _objectSpread(_objectSpread({
|
|
142
165
|
api: behaviorCall,
|
|
@@ -153,7 +176,9 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
153
176
|
}, onQuery), {}, {
|
|
154
177
|
format: function format(data) {
|
|
155
178
|
var formItemData = data.map(function (item) {
|
|
156
|
-
return formItemDataFormat(gridColumns
|
|
179
|
+
return formItemDataFormat(gridColumns.map(function (c) {
|
|
180
|
+
return _objectSpread(_objectSpread({}, c), keyBy(fields, 'field')[c.field]);
|
|
181
|
+
}), item);
|
|
157
182
|
});
|
|
158
183
|
if (onQuery !== null && onQuery !== void 0 && onQuery.format) return onQuery.format(data, formItemData); // 以预设为主
|
|
159
184
|
return formItemData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.ldGridForm {
|
|
2
|
-
:global {
|
|
3
|
-
.ag-layout-auto-height {
|
|
4
|
-
height: 100% !important;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
.ldGridForm {
|
|
2
|
+
:global {
|
|
3
|
+
.ag-layout-auto-height {
|
|
4
|
+
height: 100% !important;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender"],
|
|
7
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender", "onlyRoot"],
|
|
7
8
|
_excluded2 = ["onClick"];
|
|
8
9
|
import React, { useState, useRef, useImperativeHandle, forwardRef, useLayoutEffect } from 'react';
|
|
9
|
-
import { isFunction, isNumber, transform, includes, remove, cloneDeep, isNil } from 'lodash';
|
|
10
|
+
import { isFunction, isNumber, transform, includes, remove, cloneDeep, isNil, differenceBy } from 'lodash';
|
|
10
11
|
import { useRequest, useMemoizedFn, useCreation } from 'ahooks';
|
|
11
12
|
import PropTypes from 'prop-types';
|
|
12
13
|
import classNames from 'classnames';
|
|
13
14
|
import { Icon, Popover } from 'luck-design/antd';
|
|
14
15
|
import { LuckTree } from 'luck-design';
|
|
15
|
-
import { formatMessage, dataToTree, dragTreeData } from '@luck-design-biz/base/utils';
|
|
16
|
+
import { formatMessage, dataToTree, dragTreeData, flattenTree } from '@luck-design-biz/base/utils';
|
|
16
17
|
import { TreeBox } from '@luck-design-biz/base';
|
|
17
18
|
import ldBuilder from "../../helper/ldBuilder";
|
|
18
19
|
import { behaviorCall } from "../../utils";
|
|
@@ -61,6 +62,7 @@ var LdTree = function LdTree(_ref) {
|
|
|
61
62
|
onUnmount = _ref.onUnmount,
|
|
62
63
|
onDataSetChange = _ref.onDataSetChange,
|
|
63
64
|
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
65
|
+
onlyRoot = _ref.onlyRoot,
|
|
64
66
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
65
67
|
if (!includes(isTree, dataSetKey)) return formatMessage({
|
|
66
68
|
id: 'luckda.ldTree.notTrees',
|
|
@@ -75,6 +77,7 @@ var LdTree = function LdTree(_ref) {
|
|
|
75
77
|
defaultExpandedProps = _useState4[0],
|
|
76
78
|
setDefaultExpandedProps = _useState4[1];
|
|
77
79
|
var treeRef = useRef(null);
|
|
80
|
+
var onceRef = useRef(true);
|
|
78
81
|
var defaultParams = useCreation(function () {
|
|
79
82
|
var _params = [_objectSpread({
|
|
80
83
|
moduleCode: moduleCode,
|
|
@@ -112,7 +115,8 @@ var LdTree = function LdTree(_ref) {
|
|
|
112
115
|
}
|
|
113
116
|
var treeData = dataToTreeFormat ? dataToTreeFormat(data) : dataToTree(data, null, window.appConfig.constraintKeys.PRIMARY, window.appConfig.constraintKeys.PARENT);
|
|
114
117
|
setDataSource(treeData);
|
|
115
|
-
afterInit && afterInit(treeData);
|
|
118
|
+
onceRef.current && afterInit && afterInit(treeData, data);
|
|
119
|
+
onceRef.current = false;
|
|
116
120
|
}
|
|
117
121
|
}
|
|
118
122
|
}),
|
|
@@ -123,9 +127,32 @@ var LdTree = function LdTree(_ref) {
|
|
|
123
127
|
var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
124
128
|
run(_objectSpread(_objectSpread(_objectSpread({}, params[0]), _params), defaultParams[0]));
|
|
125
129
|
});
|
|
130
|
+
var handleUpdateTree = function handleUpdateTree(type, nodes) {
|
|
131
|
+
var data = [];
|
|
132
|
+
var flattenData = flattenTree(dataSource);
|
|
133
|
+
switch (type) {
|
|
134
|
+
case 'delete':
|
|
135
|
+
data = differenceBy(flattenData, nodes, window.appConfig.constraintKeys.PRIMARY);
|
|
136
|
+
break;
|
|
137
|
+
case 'add':
|
|
138
|
+
data = [].concat(_toConsumableArray(flattenData), _toConsumableArray(nodes));
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
data = flattenData.map(function (i) {
|
|
142
|
+
var findNode = nodes.find(function (n) {
|
|
143
|
+
return n[PRIMARY] === i[PRIMARY];
|
|
144
|
+
});
|
|
145
|
+
if (findNode) return _objectSpread(_objectSpread({}, i), findNode);
|
|
146
|
+
return i;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
var treeData = dataToTreeFormat ? dataToTreeFormat(data) : dataToTree(data, null, window.appConfig.constraintKeys.PRIMARY, window.appConfig.constraintKeys.PARENT);
|
|
150
|
+
setDataSource(treeData);
|
|
151
|
+
};
|
|
126
152
|
useImperativeHandle(wrapperRef, function () {
|
|
127
153
|
return _objectSpread(_objectSpread({}, treeRef.current), {}, {
|
|
128
|
-
onLdQuery: onLdQuery
|
|
154
|
+
onLdQuery: onLdQuery,
|
|
155
|
+
updateTree: handleUpdateTree
|
|
129
156
|
});
|
|
130
157
|
});
|
|
131
158
|
useLayoutEffect(function () {
|
|
@@ -218,33 +245,46 @@ var LdTree = function LdTree(_ref) {
|
|
|
218
245
|
});
|
|
219
246
|
var handleDrop = useMemoizedFn(function (info) {
|
|
220
247
|
var dragInfo = dragTreeData(info, dataSource);
|
|
221
|
-
onDrop
|
|
248
|
+
if (onDrop) onDrop(info, dragInfo);else if (dragInfo !== false) {
|
|
249
|
+
doAction('drag', {
|
|
250
|
+
get: {
|
|
251
|
+
datasetCode: dataSetKey
|
|
252
|
+
},
|
|
253
|
+
post: {
|
|
254
|
+
fromId: info.dragNode.props.dataRef[PRIMARY],
|
|
255
|
+
toId: info.node.props.dataRef[PRIMARY]
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
showConfirm: false,
|
|
259
|
+
callback: function callback(success) {
|
|
260
|
+
return success && onLdQuery();
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
222
264
|
});
|
|
223
265
|
var onAdd = useCreation(function () {
|
|
224
|
-
return !(readOnly || !rootAdd || rootAdd.resource && !includes(resources, rootAdd.resource)) ? function () {
|
|
266
|
+
return !(readOnly || !rootAdd || rootAdd.resource && !includes(resources, rootAdd.resource) || onlyRoot && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0) ? function () {
|
|
225
267
|
return handleMenuClick(rootAdd);
|
|
226
268
|
} : null;
|
|
227
269
|
}, [readOnly, rootAdd, resources]);
|
|
228
270
|
var onLoadData = useMemoizedFn(function (treeNode) {
|
|
229
271
|
return new Promise(function (resolve) {
|
|
230
|
-
console.log('treeNode.props.children', treeNode.props.children);
|
|
231
272
|
if (treeNode.props.isLeaf) {
|
|
232
273
|
resolve();
|
|
233
274
|
return;
|
|
234
275
|
}
|
|
235
276
|
(service || behaviorCall)(_objectSpread(_objectSpread({}, params[0]), {}, _defineProperty({}, parentKey, treeNode.props.dataRef[window.appConfig.constraintKeys.PRIMARY]))).then(function (res) {
|
|
236
|
-
|
|
277
|
+
var code = res.code,
|
|
278
|
+
list = res.list,
|
|
279
|
+
detail = res.detail;
|
|
280
|
+
if (code === 1) {
|
|
281
|
+
treeNode.props.dataRef.children = list.map(function (i) {
|
|
282
|
+
return detail[i];
|
|
283
|
+
});
|
|
284
|
+
setDataSource(_toConsumableArray(dataSource));
|
|
285
|
+
resolve();
|
|
286
|
+
}
|
|
237
287
|
});
|
|
238
|
-
// setTimeout(() => {
|
|
239
|
-
// treeNode.props.dataRef.children = [
|
|
240
|
-
// { title: 'Child Node', key: `${treeNode.props.eventKey}-0` },
|
|
241
|
-
// { title: 'Child Node', key: `${treeNode.props.eventKey}-1` },
|
|
242
|
-
// ];
|
|
243
|
-
// this.setState({
|
|
244
|
-
// treeData: [...this.state.treeData],
|
|
245
|
-
// });
|
|
246
|
-
// resolve();
|
|
247
|
-
// }, 1000);
|
|
248
288
|
});
|
|
249
289
|
});
|
|
250
290
|
var asyncLoadData = useCreation(function () {
|