@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
package/es/utils/form.js
CHANGED
|
@@ -18,11 +18,11 @@ import { defaultComName, translator, splitStrToObj, formatCustomProps } from "..
|
|
|
18
18
|
import { getColumnRender } from "./grid";
|
|
19
19
|
import * as formItemUtils from "../helper/FromItems";
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* 根据动态表单配置项生成formItem
|
|
23
|
-
* @param {动态表单配置项} props
|
|
24
|
-
* @param {自定义动态表单配置项} customProps
|
|
25
|
-
* @returns <BasicForm name='' ... />
|
|
21
|
+
/**
|
|
22
|
+
* 根据动态表单配置项生成formItem
|
|
23
|
+
* @param {动态表单配置项} props
|
|
24
|
+
* @param {自定义动态表单配置项} customProps
|
|
25
|
+
* @returns <BasicForm name='' ... />
|
|
26
26
|
*/
|
|
27
27
|
export function getFormItem() {
|
|
28
28
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -32,12 +32,13 @@ export function getFormItem() {
|
|
|
32
32
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
33
33
|
if (!property) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
34
34
|
if (property === 'sint' || property === 'number') props.opt_decimal = 0;
|
|
35
|
+
var comType = comName || defaultComName[property];
|
|
35
36
|
var _translator = translator(props),
|
|
36
37
|
name = _translator.name,
|
|
37
38
|
translateProps = _objectWithoutProperties(_translator, _excluded2);
|
|
38
39
|
var _merge = merge(
|
|
39
40
|
// 移除type,不能删除type,会导致查询renderInfo的时候报错
|
|
40
|
-
translateProps, formatCustomProps(customProps)),
|
|
41
|
+
translateProps, formatCustomProps(comType, customProps)),
|
|
41
42
|
type = _merge.type,
|
|
42
43
|
_props = _objectWithoutProperties(_merge, _excluded3);
|
|
43
44
|
if (customProps.renderBasicFormItem) {
|
|
@@ -48,18 +49,18 @@ export function getFormItem() {
|
|
|
48
49
|
key: name
|
|
49
50
|
}), com.props.children);
|
|
50
51
|
}
|
|
51
|
-
var getFormItemUtils = formItemUtils["get".concat(capitalize(
|
|
52
|
+
var getFormItemUtils = formItemUtils["get".concat(capitalize(comType), "Item")];
|
|
52
53
|
return getFormItemUtils(_objectSpread(_objectSpread({}, _props), {}, {
|
|
53
54
|
name: name,
|
|
54
55
|
key: name
|
|
55
56
|
}));
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
/**
|
|
59
|
-
* 根据后端返回数据组装表单数据
|
|
60
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
61
|
-
* @param {对象---后端返回的未处理数据} values
|
|
62
|
-
* @returns
|
|
59
|
+
/**
|
|
60
|
+
* 根据后端返回数据组装表单数据
|
|
61
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
62
|
+
* @param {对象---后端返回的未处理数据} values
|
|
63
|
+
* @returns
|
|
63
64
|
*/
|
|
64
65
|
export var formItemDataFormat = function formItemDataFormat() {
|
|
65
66
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -77,9 +78,15 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
77
78
|
case 'date':
|
|
78
79
|
result[name] = values["".concat(name, "_virtual")] ? moment(values["".concat(name, "_virtual")], 'YYYY-MM-DD HH:mm:ss') : undefined;
|
|
79
80
|
break;
|
|
81
|
+
case 'dict':
|
|
82
|
+
if (props.display === 'radio') {
|
|
83
|
+
result[name] = values[name] || void 0;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
80
86
|
case 'user':
|
|
81
87
|
case 'select':
|
|
82
88
|
case 'group':
|
|
89
|
+
case 'complex':
|
|
83
90
|
if (translatorProps.multiple) {
|
|
84
91
|
result[name] = splitStrToObj(values[name], values["".concat(name, "_virtual")]);
|
|
85
92
|
} else {
|
|
@@ -123,11 +130,11 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
123
130
|
return _objectSpread(_objectSpread({}, omitValues), data);
|
|
124
131
|
};
|
|
125
132
|
|
|
126
|
-
/**
|
|
127
|
-
* 数据格式化
|
|
128
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
129
|
-
* @param {对象---表单获取到的未处理数据} values
|
|
130
|
-
* @returns
|
|
133
|
+
/**
|
|
134
|
+
* 数据格式化
|
|
135
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
136
|
+
* @param {对象---表单获取到的未处理数据} values
|
|
137
|
+
* @returns
|
|
131
138
|
*/
|
|
132
139
|
export var dataFormat = function dataFormat() {
|
|
133
140
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -147,9 +154,15 @@ export var dataFormat = function dataFormat() {
|
|
|
147
154
|
case 'date':
|
|
148
155
|
result[name] = values[name] ? moment(values[name]).valueOf() : null;
|
|
149
156
|
break;
|
|
157
|
+
case 'dict':
|
|
158
|
+
if (props.display === 'radio') {
|
|
159
|
+
result[name] = values[name] || null;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
150
162
|
case 'user':
|
|
151
163
|
case 'select':
|
|
152
164
|
case 'group':
|
|
165
|
+
case 'complex':
|
|
153
166
|
if (isArray(values[name])) result[name] = values[name].map(function (v) {
|
|
154
167
|
return v.value || v.key;
|
|
155
168
|
}).join(',');else result[name] = !isNil((_values$name = values[name]) === null || _values$name === void 0 ? void 0 : _values$name.value) ? values[name].value : ((_values$name2 = values[name]) === null || _values$name2 === void 0 ? void 0 : _values$name2.key) || null;
|
|
@@ -186,12 +199,12 @@ export var dataFormat = function dataFormat() {
|
|
|
186
199
|
return _objectSpread(_objectSpread({}, values), data);
|
|
187
200
|
};
|
|
188
201
|
|
|
189
|
-
/**
|
|
190
|
-
*
|
|
191
|
-
* @param formType
|
|
192
|
-
* @param props
|
|
193
|
-
* @param customProps
|
|
194
|
-
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @param formType
|
|
205
|
+
* @param props
|
|
206
|
+
* @param customProps
|
|
207
|
+
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
195
208
|
*/
|
|
196
209
|
export var getFormColumn = function getFormColumn() {
|
|
197
210
|
var _props$config;
|
|
@@ -210,7 +223,7 @@ export var getFormColumn = function getFormColumn() {
|
|
|
210
223
|
translateProps = _objectWithoutProperties(_translator2, _excluded8);
|
|
211
224
|
var _merge2 = merge(
|
|
212
225
|
// mode=writer移除type,不能删除type,会导致查询renderInfo的时候报错
|
|
213
|
-
translateProps, formatCustomProps(formItemRewrite)),
|
|
226
|
+
translateProps, formatCustomProps(formItemType, formItemRewrite)),
|
|
214
227
|
type = _merge2.type,
|
|
215
228
|
_ = _merge2.name,
|
|
216
229
|
_props = _objectWithoutProperties(_merge2, _excluded9);
|
package/es/utils/grid.js
CHANGED
|
@@ -44,6 +44,7 @@ export function getColumnRender(name, type) {
|
|
|
44
44
|
case 'user':
|
|
45
45
|
case 'select':
|
|
46
46
|
case 'group':
|
|
47
|
+
case 'complex':
|
|
47
48
|
render = function render(text, record) {
|
|
48
49
|
if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
|
|
49
50
|
if (isArray(text)) return text.map(function (i) {
|
|
@@ -115,26 +116,27 @@ export var getGridColumn = function getGridColumn() {
|
|
|
115
116
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
116
117
|
var isTreeGrid = arguments.length > 2 ? arguments[2] : undefined;
|
|
117
118
|
var writable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
119
|
+
var comType = comName || defaultComName[property];
|
|
118
120
|
var _props$isVirtual = props.isVirtual,
|
|
119
121
|
isVirtual = _props$isVirtual === void 0 ? false : _props$isVirtual,
|
|
120
122
|
_props$extra = props.extra,
|
|
121
|
-
extra = _props$extra === void 0 ? {} : _props$extra;
|
|
123
|
+
extra = _props$extra === void 0 ? '{}' : _props$extra;
|
|
122
124
|
var _translator = translator(props),
|
|
123
125
|
name = _translator.name,
|
|
124
126
|
translateProps = _objectWithoutProperties(_translator, _excluded2);
|
|
125
|
-
var _merge = merge(translateProps, formatCustomProps(customProps)),
|
|
127
|
+
var _merge = merge(translateProps, formatCustomProps(comType, customProps)),
|
|
126
128
|
filter = _merge.filter,
|
|
127
129
|
filterParams = _merge.filterParams,
|
|
128
130
|
_props = _objectWithoutProperties(_merge, _excluded3);
|
|
129
131
|
var _extra = JSON.parse(extra) || {};
|
|
130
132
|
var data = _objectSpread(_objectSpread({}, _props), {}, {
|
|
131
133
|
field: name,
|
|
132
|
-
title: _props.label,
|
|
134
|
+
title: _props.fieldAliasName || _props.label,
|
|
133
135
|
headerAlign: _props.headerAlign || getAlign(_extra, 'sheading_alignment_virtual'),
|
|
134
136
|
align: _props.align || getAlign(_extra, 'scell_alignment_virtual'),
|
|
135
|
-
render: _props.render || getColumnRender(name,
|
|
137
|
+
render: _props.render || getColumnRender(name, comType, _props)
|
|
136
138
|
});
|
|
137
|
-
if (isTreeGrid || isVirtual || includes(['user', 'select', 'group', 'switch', 'color', 'region', 'file'],
|
|
139
|
+
if (isTreeGrid || isVirtual || includes(['user', 'select', 'group', 'switch', 'color', 'region', 'file', 'complex'], comType)) data.sortable = false;
|
|
138
140
|
// data.filter = false;
|
|
139
141
|
if (!isNil(filter)) {
|
|
140
142
|
// 因为后端升级问题,暂时关闭过滤功能
|
|
@@ -147,7 +149,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
147
149
|
data.filter = 'text';
|
|
148
150
|
return data;
|
|
149
151
|
}
|
|
150
|
-
switch (
|
|
152
|
+
switch (comType) {
|
|
151
153
|
case 'switch':
|
|
152
154
|
data.filter = 'select';
|
|
153
155
|
data.filterParams = {
|
|
@@ -248,7 +250,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
248
250
|
required: true
|
|
249
251
|
} : true;
|
|
250
252
|
if (_props.cellWriter) data.cellWriter = _props.cellWriter;else {
|
|
251
|
-
var formItemCom = capitalize(
|
|
253
|
+
var formItemCom = capitalize(comType) === 'Textarea' ? 'String' : capitalize(comType);
|
|
252
254
|
var getFormItemUtils = formItemUtils["get".concat(formItemCom, "Item")];
|
|
253
255
|
var formItemProps = {};
|
|
254
256
|
switch (formItemCom) {
|
|
@@ -265,6 +267,7 @@ export var getGridColumn = function getGridColumn() {
|
|
|
265
267
|
case 'user':
|
|
266
268
|
case 'select':
|
|
267
269
|
case 'group':
|
|
270
|
+
case 'complex':
|
|
268
271
|
if (translateProps.multiple) {
|
|
269
272
|
formItemProps = {
|
|
270
273
|
dataFormat: function dataFormat(value) {
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _umi = require("umi");
|
|
16
|
+
var _antd = require("luck-design/antd");
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _base = require("@luck-design-biz/base");
|
|
19
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
20
|
+
var _luckDesign = require("luck-design");
|
|
21
|
+
var _ApiConfig = _interopRequireDefault(require("@/services/ApiConfig"));
|
|
22
|
+
var _service = require("./service");
|
|
23
|
+
var _excluded = ["wrapperRef", "config", "renderInfoMode", "complexConfig"];
|
|
24
|
+
var Index = function Index(_ref) {
|
|
25
|
+
var wrapperRef = _ref.wrapperRef,
|
|
26
|
+
_ref$config = _ref.config,
|
|
27
|
+
config = _ref$config === void 0 ? {} : _ref$config,
|
|
28
|
+
renderInfoMode = _ref.renderInfoMode,
|
|
29
|
+
_ref$complexConfig = _ref.complexConfig,
|
|
30
|
+
_ref$complexConfig$is = _ref$complexConfig.isTree,
|
|
31
|
+
isTree = _ref$complexConfig$is === void 0 ? false : _ref$complexConfig$is,
|
|
32
|
+
moduleCode = _ref$complexConfig.moduleCode,
|
|
33
|
+
dataModel = _ref$complexConfig.dataModel,
|
|
34
|
+
dataSetCode = _ref$complexConfig.dataSetCode,
|
|
35
|
+
keyField = _ref$complexConfig.keyField,
|
|
36
|
+
valueField = _ref$complexConfig.valueField,
|
|
37
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
|
+
var _useState = (0, _react.useState)([]),
|
|
39
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
|
+
dataSource = _useState2[0],
|
|
41
|
+
setDataSource = _useState2[1];
|
|
42
|
+
var handleFocus = function handleFocus() {
|
|
43
|
+
if (!dataSource || dataSource.length === 0) {
|
|
44
|
+
(0, _service.fetchContent)(dataModel, {
|
|
45
|
+
datasetCode: dataSetCode,
|
|
46
|
+
moduleCode: moduleCode
|
|
47
|
+
}).then(function (res) {
|
|
48
|
+
var code = res.code,
|
|
49
|
+
data = res.data;
|
|
50
|
+
if (code === 1) {
|
|
51
|
+
var formatData = data.map(function (i) {
|
|
52
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, i), {}, {
|
|
53
|
+
key: i[keyField],
|
|
54
|
+
value: i[keyField],
|
|
55
|
+
label: valueField.length > 0 ? valueField.split(',').map(function (val) {
|
|
56
|
+
return i[val];
|
|
57
|
+
}).join('-') : '',
|
|
58
|
+
title: valueField.length > 0 ? valueField.split(',').map(function (val) {
|
|
59
|
+
return i[val];
|
|
60
|
+
}).join('-') : ''
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
if (isTree) {
|
|
64
|
+
setDataSource((0, _utils.dataToTree)(formatData, null, 'uid', 'parent_uid'));
|
|
65
|
+
} else setDataSource(formatData);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return renderInfoMode ? renderInfoMode(function (value) {
|
|
71
|
+
return (config.multiple || config.mode === 'multiple') && (0, _lodash.isArray)(value) ? value.map(function (item) {
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
73
|
+
key: item.key
|
|
74
|
+
}, item.label || item.value || item.key);
|
|
75
|
+
}) : /*#__PURE__*/_react.default.createElement("span", null, value.label || value.value || value.key);
|
|
76
|
+
}) : /*#__PURE__*/_react.default.createElement(_luckDesign.BasicFormItem, (0, _extends2.default)({}, props, {
|
|
77
|
+
type: isTree ? 'treeSelect' : 'select',
|
|
78
|
+
ref: wrapperRef,
|
|
79
|
+
config: (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
80
|
+
required: false,
|
|
81
|
+
placeholder: (0, _utils.formatMessage)({
|
|
82
|
+
id: 'app.base.tip.select'
|
|
83
|
+
}),
|
|
84
|
+
message: (0, _utils.formatMessage)({
|
|
85
|
+
id: 'app.base.tip.select'
|
|
86
|
+
})
|
|
87
|
+
}, config), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
88
|
+
showSearch: true,
|
|
89
|
+
optionFilterProp: 'title',
|
|
90
|
+
treeNodeFilterProp: 'label'
|
|
91
|
+
}, isTree ? 'treeData' : 'dataSource', dataSource), "onFocus", handleFocus))
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
var RefCom = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement(Index, (0, _extends2.default)({
|
|
96
|
+
wrapperRef: ref
|
|
97
|
+
}, props));
|
|
98
|
+
});
|
|
99
|
+
RefCom.displayName = 'BasicFormItem';
|
|
100
|
+
var _default = exports.default = RefCom;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.fetchContent = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _qs = require("qs");
|
|
11
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
12
|
+
var _ApiConfig = _interopRequireDefault(require("@/services/ApiConfig"));
|
|
13
|
+
var fetchContent = exports.fetchContent = /*#__PURE__*/function () {
|
|
14
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(dmCode, get) {
|
|
15
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
16
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17
|
+
case 0:
|
|
18
|
+
return _context.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.API_HOST, "/").concat(dmCode, "/ui/builder/complex/noAuthFetchContent?").concat((0, _qs.stringify)(get))));
|
|
19
|
+
case 1:
|
|
20
|
+
case "end":
|
|
21
|
+
return _context.stop();
|
|
22
|
+
}
|
|
23
|
+
}, _callee);
|
|
24
|
+
}));
|
|
25
|
+
return function fetchContent(_x, _x2) {
|
|
26
|
+
return _ref.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
}();
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -72,22 +71,21 @@ var LDActions = function LDActions(_ref2) {
|
|
|
72
71
|
});
|
|
73
72
|
var actionMap = (0, _ahooks.useCreation)(function () {
|
|
74
73
|
return (0, _lodash.reduce)(todoList, function (ret, action, index) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
74
|
+
if (!(0, _lodash.isNil)(action.serial) && !ret[action.serial]) {
|
|
75
|
+
ret[action.serial] = Math.pow(2, index);
|
|
76
|
+
}
|
|
78
77
|
return ret;
|
|
79
78
|
}, {});
|
|
80
79
|
}, [todoList]);
|
|
81
80
|
var mySerialsValue = (0, _ahooks.useCreation)(function () {
|
|
82
81
|
return (0, _lodash.reduce)(resources, function (ret, resKey) {
|
|
83
|
-
|
|
84
|
-
ret |= ((_actionMap$resKey = actionMap[resKey]) === null || _actionMap$resKey === void 0 ? void 0 : _actionMap$resKey.serialValue) || 0;
|
|
82
|
+
ret |= actionMap[resKey] || 0;
|
|
85
83
|
return ret;
|
|
86
84
|
}, 0);
|
|
87
85
|
}, [resources, actionMap]);
|
|
88
86
|
var _useCreation = (0, _ahooks.useCreation)(function () {
|
|
89
|
-
var approvedActions = (0, _lodash.reduce)(
|
|
90
|
-
if (mySerialsValue & action.
|
|
87
|
+
var approvedActions = (0, _lodash.reduce)(todoList, function (ret, action) {
|
|
88
|
+
if ((0, _lodash.isNil)(action.serial) || mySerialsValue & actionMap[action.serial]) {
|
|
91
89
|
ret.push(action);
|
|
92
90
|
} else if (action.serialEffect === 'disable') {
|
|
93
91
|
ret.push(action);
|
|
@@ -97,7 +95,7 @@ var LDActions = function LDActions(_ref2) {
|
|
|
97
95
|
var _length = approvedActions.length;
|
|
98
96
|
var _permanent = approvedActions.splice(0, max >= _length ? _length : max - 1);
|
|
99
97
|
return [_permanent, approvedActions];
|
|
100
|
-
}, [max, mySerialsValue, actionMap]),
|
|
98
|
+
}, [max, mySerialsValue, actionMap, todoList]),
|
|
101
99
|
_useCreation2 = (0, _slicedToArray2.default)(_useCreation, 2),
|
|
102
100
|
permanent = _useCreation2[0],
|
|
103
101
|
more = _useCreation2[1];
|
|
@@ -1,65 +1,68 @@
|
|
|
1
|
-
@spanDefault: #262626;
|
|
2
|
-
@spanPrimary: var(--
|
|
3
|
-
@spanDanger: #ff4d4f;
|
|
4
|
-
@spanDestroy: #820014;
|
|
5
|
-
|
|
6
|
-
.ldActions {
|
|
7
|
-
|
|
8
|
-
button:not(:last-child) {
|
|
9
|
-
margin-right:
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color:
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color:
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
color:
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
color:
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
span.
|
|
58
|
-
color: @
|
|
59
|
-
}
|
|
60
|
-
span.
|
|
61
|
-
color: @
|
|
62
|
-
}
|
|
63
|
-
span.
|
|
64
|
-
color: @
|
|
65
|
-
}
|
|
1
|
+
@spanDefault: #262626;
|
|
2
|
+
@spanPrimary: var(--ant-primary-color);
|
|
3
|
+
@spanDanger: #ff4d4f;
|
|
4
|
+
@spanDestroy: #820014;
|
|
5
|
+
|
|
6
|
+
.ldActions {
|
|
7
|
+
|
|
8
|
+
button:not(:last-child) {
|
|
9
|
+
margin-right: 4px;
|
|
10
|
+
}
|
|
11
|
+
button:not(:first-child) {
|
|
12
|
+
margin-left: 4px;
|
|
13
|
+
}
|
|
14
|
+
span {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
button.default {
|
|
19
|
+
background-color: white;
|
|
20
|
+
}
|
|
21
|
+
span.default {
|
|
22
|
+
color: @spanDefault;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button.primary {
|
|
26
|
+
background-color: var(--ant-primary-color);
|
|
27
|
+
border-color: var(--ant-primary-color);
|
|
28
|
+
color: white;
|
|
29
|
+
}
|
|
30
|
+
span.primary {
|
|
31
|
+
color: @spanPrimary;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
button.danger {
|
|
35
|
+
background-color: #ff4d4f;
|
|
36
|
+
border-color: #ff4d4f;
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
span.danger {
|
|
40
|
+
color: @spanDanger;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button.destroy {
|
|
44
|
+
background-color: #820014;
|
|
45
|
+
border-color: #820014;
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
span.destroy {
|
|
49
|
+
color: @spanDestroy;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
span.disabled {
|
|
53
|
+
color: #bfbfbf;
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
span.default.menuItem {
|
|
58
|
+
color: @spanDefault;
|
|
59
|
+
}
|
|
60
|
+
span.primary.menuItem {
|
|
61
|
+
color: @spanPrimary;
|
|
62
|
+
}
|
|
63
|
+
span.danger.menuItem {
|
|
64
|
+
color: @spanDanger;
|
|
65
|
+
}
|
|
66
|
+
span.destroy.menuItem {
|
|
67
|
+
color: @spanDestroy;
|
|
68
|
+
}
|
|
@@ -12,11 +12,24 @@ var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
|
+
var _luckDesign = require("luck-design");
|
|
15
16
|
var _FormList = require("@luck-design-biz/base/FormList");
|
|
16
17
|
var _ldBuilder = _interopRequireDefault(require("../../helper/ldBuilder"));
|
|
17
18
|
var _utils = require("../../utils");
|
|
18
19
|
var _Builder = require("../Builder");
|
|
19
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "filedsRewrite", "mainFormLdId", "mainDataSetKey", "onValueChange", "onQuery", "onAdd", "onUpdate", "moduleCode", "defaultDataSourceFormat", "ticketData", "relationKey"];
|
|
20
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "filedsRewrite", "mainFormLdId", "mainDataSetKey", "onValueChange", "onQuery", "onAdd", "onUpdate", "moduleCode", "defaultDataSourceFormat", "ticketData", "relationKey", "fields", "setVerifyRules"];
|
|
21
|
+
var didMount = false;
|
|
22
|
+
var debounceFunc = (0, _lodash.debounce)(function (fields, changedValues, allValues, props) {
|
|
23
|
+
(0, _lodash.forEach)(changedValues, function (val, key) {
|
|
24
|
+
var _field$events;
|
|
25
|
+
var field = fields.find(function (f) {
|
|
26
|
+
return f.field === key;
|
|
27
|
+
});
|
|
28
|
+
if (field !== null && field !== void 0 && (_field$events = field.events) !== null && _field$events !== void 0 && _field$events.onValueChange) {
|
|
29
|
+
field.events.onValueChange(val, key, allValues, props);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}, 300);
|
|
20
33
|
var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
21
34
|
var _ref$columns = _ref.columns,
|
|
22
35
|
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
@@ -49,28 +62,46 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
49
62
|
ticketData = _ref$ticketData === void 0 ? {} : _ref$ticketData,
|
|
50
63
|
_ref$relationKey = _ref.relationKey,
|
|
51
64
|
relationKey = _ref$relationKey === void 0 ? window.appConfig.constraintKeys.PRIMARY : _ref$relationKey,
|
|
65
|
+
fields = _ref.fields,
|
|
66
|
+
setVerifyRules = _ref.setVerifyRules,
|
|
52
67
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
53
68
|
var _ref2 = (0, _react.useContext)(_Builder.LuckDaContext) || {},
|
|
54
69
|
setFieldProps = _ref2.setFieldProps;
|
|
55
|
-
var defaultValues = /*#__PURE__*/(0, _react.createRef)();
|
|
70
|
+
var defaultValues = /*#__PURE__*/(0, _react.createRef)({});
|
|
56
71
|
var isMain = ldId === mainFormLdId;
|
|
57
72
|
var basicItems = function () {
|
|
73
|
+
var fieldsObj = (0, _lodash.keyBy)(fields, 'field');
|
|
74
|
+
var columnsObj = (0, _lodash.keyBy)(columns, 'field');
|
|
75
|
+
var keys = (0, _lodash.isEmpty)(fields) ? Object.keys(columnsObj) : (0, _lodash.union)(Object.keys(fieldsObj), Object.keys(columnsObj));
|
|
58
76
|
var _defaultValues = {};
|
|
59
|
-
var _nodes = (0, _lodash.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
var _nodes = (0, _lodash.reduce)(keys, function (result, key) {
|
|
78
|
+
var setting = fieldsObj[key];
|
|
79
|
+
var col = columnsObj[key];
|
|
80
|
+
if ((setting === null || setting === void 0 ? void 0 : setting._type) === 'divider') {
|
|
81
|
+
result.push( /*#__PURE__*/_react.default.createElement(_luckDesign.BasicDivider, {
|
|
82
|
+
title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName
|
|
83
|
+
}));
|
|
84
|
+
} else if (col !== null && col !== void 0 && col.isShowInForm) {
|
|
85
|
+
var customFiled = filedsRewrite.find(function (_field) {
|
|
86
|
+
return _field.name === col.aliaName;
|
|
63
87
|
}) || {};
|
|
64
88
|
_defaultValues = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
65
|
-
|
|
89
|
+
var defaultSet = ['col', 'row', 'note', 'tip', 'placeholder'];
|
|
90
|
+
var newCol = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, col), {}, {
|
|
91
|
+
setVerifyRules: setVerifyRules,
|
|
92
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
93
|
+
}, (0, _lodash.pick)(setting, defaultSet));
|
|
94
|
+
result.push((0, _utils.getFormItem)(newCol, (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
66
95
|
formId: ldId,
|
|
67
96
|
moduleCode: moduleCode
|
|
68
97
|
}, customFiled), {}, {
|
|
69
98
|
handleValueChange: function handleValueChange(value) {
|
|
70
99
|
return onValueChange((0, _defineProperty2.default)({}, ldId, (0, _defineProperty2.default)({}, col.aliaName, value)));
|
|
71
|
-
}
|
|
100
|
+
},
|
|
101
|
+
setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field']))
|
|
72
102
|
})));
|
|
73
103
|
}
|
|
104
|
+
return result;
|
|
74
105
|
}, []);
|
|
75
106
|
defaultValues.current = _defaultValues;
|
|
76
107
|
setFieldProps && setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (i) {
|
|
@@ -83,7 +114,9 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
83
114
|
var formConfig = {
|
|
84
115
|
formId: ldId,
|
|
85
116
|
isMain: isMain,
|
|
86
|
-
defaultDataSource: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, (0, _utils.formItemDataFormat)(columns
|
|
117
|
+
defaultDataSource: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, (0, _utils.formItemDataFormat)(columns.map(function (c) {
|
|
118
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, c), (0, _lodash.keyBy)(fields, 'field')[c.field]);
|
|
119
|
+
}), defaultValues.current)), defaultDataSourceFormat(defaultValues.current))
|
|
87
120
|
};
|
|
88
121
|
var onOperate = function onOperate() {
|
|
89
122
|
var _onOperate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -117,6 +150,9 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
117
150
|
});
|
|
118
151
|
};
|
|
119
152
|
return /*#__PURE__*/_react.default.createElement(_FormList.AutoForm, (0, _extends2.default)({}, props, {
|
|
153
|
+
onDataLoaded: function onDataLoaded() {
|
|
154
|
+
didMount = true;
|
|
155
|
+
},
|
|
120
156
|
onQuery: (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
121
157
|
api: _utils.behaviorCall,
|
|
122
158
|
get: function get(formData) {
|
|
@@ -127,14 +163,23 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
127
163
|
}
|
|
128
164
|
}, onQuery), {}, {
|
|
129
165
|
format: function format(data, res) {
|
|
130
|
-
var formItemData = (0, _objectSpread3.default)({}, (0, _utils.formItemDataFormat)(columns
|
|
166
|
+
var formItemData = (0, _objectSpread3.default)({}, (0, _utils.formItemDataFormat)(columns.map(function (c) {
|
|
167
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, c), (0, _lodash.keyBy)(fields, 'field')[c.field]);
|
|
168
|
+
}), data));
|
|
131
169
|
if (onQuery !== null && onQuery !== void 0 && onQuery.format) return onQuery.format(data, formItemData, res); // 以预设为主
|
|
132
170
|
return formItemData;
|
|
133
171
|
}
|
|
134
172
|
})
|
|
135
173
|
// onAdd={onOperate(onAdd, 'add')}
|
|
136
174
|
,
|
|
137
|
-
onUpdate: onOperate(onUpdate, 'update')
|
|
175
|
+
onUpdate: onOperate(onUpdate, 'update'),
|
|
176
|
+
formOption: {
|
|
177
|
+
onValuesChange: function onValuesChange(props, changedValues, allValues) {
|
|
178
|
+
if (didMount) {
|
|
179
|
+
debounceFunc(fields, changedValues, allValues, props);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
138
183
|
}, formConfig), basicItems);
|
|
139
184
|
};
|
|
140
185
|
var _default = exports.default = (0, _ldBuilder.default)(buildLdAutoForm);
|