@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
|
@@ -36,7 +36,8 @@ var _DISPLAY_OPTIONS_ = [{
|
|
|
36
36
|
value: 'text'
|
|
37
37
|
}];
|
|
38
38
|
var ActionsEditor = function ActionsEditor(_ref) {
|
|
39
|
-
var
|
|
39
|
+
var nodeId = _ref.nodeId,
|
|
40
|
+
defaultValue = _ref.defaultValue,
|
|
40
41
|
onChange = _ref.onChange,
|
|
41
42
|
suppressDisplay = _ref.suppressDisplay,
|
|
42
43
|
suppressMax = _ref.suppressMax,
|
|
@@ -225,6 +226,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
225
226
|
}));
|
|
226
227
|
})))), /*#__PURE__*/_react.default.createElement(_ActionBindModal.default, {
|
|
227
228
|
event: action,
|
|
229
|
+
nodeId: nodeId,
|
|
228
230
|
defaultCode: defaultCode,
|
|
229
231
|
onComfirm: function onComfirm(actionPool) {
|
|
230
232
|
return handleValueChange('action', (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(action, ['key'])), {}, {
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _ahooks = require("ahooks");
|
|
14
13
|
var _antd = require("luck-design/antd");
|
|
@@ -56,15 +55,10 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
56
55
|
nodeId = _ref.nodeId,
|
|
57
56
|
renderPanelItems = _ref.renderPanelItems,
|
|
58
57
|
innerProps = _ref.innerProps;
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
node = _usePageData2[0];
|
|
64
|
-
var _ref2 = node || {
|
|
65
|
-
props: {}
|
|
66
|
-
},
|
|
67
|
-
blocks = _ref2.props.blocks;
|
|
58
|
+
var blocks = (0, _ContextProvider.useGet)({
|
|
59
|
+
id: nodeId,
|
|
60
|
+
path: 'props.blocks'
|
|
61
|
+
});
|
|
68
62
|
var handleAddBlock = (0, _ahooks.useMemoizedFn)(function (type) {
|
|
69
63
|
var _id = "block_".concat((0, _utils.suid)());
|
|
70
64
|
var newData = (0, _lodash.concat)(blocks, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
@@ -118,13 +112,12 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
118
112
|
order: index + 1
|
|
119
113
|
});
|
|
120
114
|
});
|
|
121
|
-
console.log('newData', newData, sortItems);
|
|
122
115
|
onChange(newData);
|
|
123
116
|
});
|
|
124
117
|
var menu = (0, _ahooks.useCreation)(function () {
|
|
125
118
|
return /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
126
|
-
onClick: function onClick(
|
|
127
|
-
var key =
|
|
119
|
+
onClick: function onClick(_ref2) {
|
|
120
|
+
var key = _ref2.key;
|
|
128
121
|
return handleAddBlock(key);
|
|
129
122
|
}
|
|
130
123
|
}, addOptions.map(function (opt) {
|
|
@@ -170,7 +163,7 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
170
163
|
}, renderPanelItems(commonProps.map(function (p) {
|
|
171
164
|
var cloneP = (0, _lodash.cloneDeep)(p);
|
|
172
165
|
if (cloneP.key === 'dataset') {
|
|
173
|
-
cloneP.
|
|
166
|
+
cloneP.fieldsKey = 'blocks[0].fields';
|
|
174
167
|
}
|
|
175
168
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, cloneP), {}, {
|
|
176
169
|
disabled: (0, _lodash.includes)(['mode', 'serialEffect'], cloneP.key) || cloneP.disabled,
|
|
@@ -215,8 +208,9 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
215
208
|
cloneP.valueKey = "blocks[".concat(i + 1, "].").concat(p.key);
|
|
216
209
|
if (p.key === 'dataset') {
|
|
217
210
|
if ((0, _lodash.includes)(['auto', 'grid', 'writer'], blockItem.type)) {
|
|
218
|
-
if (blockItem.type !== 'auto') cloneP.
|
|
219
|
-
cloneP.
|
|
211
|
+
if (blockItem.type !== 'auto') cloneP.component = 'tableForm';
|
|
212
|
+
cloneP.fieldsKey = "blocks[".concat(i + 1, "].fields");
|
|
213
|
+
;
|
|
220
214
|
result.push(cloneP);
|
|
221
215
|
}
|
|
222
216
|
} else result.push(cloneP);
|
|
@@ -12,10 +12,12 @@ var _antd = require("luck-design/antd");
|
|
|
12
12
|
var _buttonType = _interopRequireDefault(require("../style/button-type.less"));
|
|
13
13
|
var _excluded = ["onChange"];
|
|
14
14
|
var ButtonType = function ButtonType(_ref) {
|
|
15
|
-
var
|
|
15
|
+
var _onChange = _ref.onChange,
|
|
16
16
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement(_antd.Select, (0, _extends2.default)({}, props, {
|
|
18
|
-
onChange: onChange
|
|
18
|
+
onChange: function onChange(val) {
|
|
19
|
+
return _onChange(val);
|
|
20
|
+
},
|
|
19
21
|
className: _buttonType.default['lc-painter-panel-section-components-buttontype']
|
|
20
22
|
}), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
21
23
|
value: "primary"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _antd = require("luck-design/antd");
|
|
11
|
+
var _lodash = require("lodash");
|
|
12
|
+
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
13
|
+
var ComponentSelector = function ComponentSelector(_ref) {
|
|
14
|
+
var nodeId = _ref.nodeId,
|
|
15
|
+
defaultValue = _ref.defaultValue,
|
|
16
|
+
_onChange = _ref.onChange,
|
|
17
|
+
filter = _ref.filter;
|
|
18
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
20
|
+
size: "small",
|
|
21
|
+
allowClear: true,
|
|
22
|
+
defaultValue: defaultValue,
|
|
23
|
+
onChange: function onChange(val) {
|
|
24
|
+
return _onChange(val);
|
|
25
|
+
}
|
|
26
|
+
}, (0, _lodash.reduce)(ctx.componentList, function (ret, _ref2) {
|
|
27
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
28
|
+
compId = _ref3[0],
|
|
29
|
+
comp = _ref3[1];
|
|
30
|
+
if (compId !== nodeId && (!filter || filter.find(function (_ref4) {
|
|
31
|
+
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
|
32
|
+
key = _ref5[0],
|
|
33
|
+
val = _ref5[1];
|
|
34
|
+
return (0, _lodash.get)(comp, key) === val;
|
|
35
|
+
}))) {
|
|
36
|
+
ret.push( /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
37
|
+
value: compId
|
|
38
|
+
}, comp.meta.name || compId));
|
|
39
|
+
}
|
|
40
|
+
return ret;
|
|
41
|
+
}, []));
|
|
42
|
+
};
|
|
43
|
+
var _default = exports.default = ComponentSelector;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -15,6 +16,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
15
16
|
var _antd = require("luck-design/antd");
|
|
16
17
|
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
17
18
|
var _apiUrl = require("../../constants/api-url");
|
|
19
|
+
var _helper = require("../../engine/tools/helper");
|
|
18
20
|
var Div = _styledComponents.default.div.withConfig({
|
|
19
21
|
displayName: "Div",
|
|
20
22
|
componentId: "luckda-6530__sc-onj9tc-0"
|
|
@@ -22,6 +24,9 @@ var Div = _styledComponents.default.div.withConfig({
|
|
|
22
24
|
var DataSetSelector = function DataSetSelector(_ref) {
|
|
23
25
|
var defaultValue = _ref.defaultValue,
|
|
24
26
|
onChange = _ref.onChange,
|
|
27
|
+
_ref$fieldsKey = _ref.fieldsKey,
|
|
28
|
+
fieldsKey = _ref$fieldsKey === void 0 ? 'fields' : _ref$fieldsKey,
|
|
29
|
+
component = _ref.component,
|
|
25
30
|
size = _ref.size,
|
|
26
31
|
isTree = _ref.isTree,
|
|
27
32
|
next = _ref.next;
|
|
@@ -37,8 +42,7 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
37
42
|
dataset = _useRemoteSource.dataset,
|
|
38
43
|
fetchAllDatasetLoading = _useRemoteSource.fetchAllDatasetLoading,
|
|
39
44
|
refreshModlueData = _useRemoteSource.refreshModlueData,
|
|
40
|
-
refreshDataset = _useRemoteSource.refreshDataset
|
|
41
|
-
pageinfo = _useRemoteSource.pageinfo;
|
|
45
|
+
refreshDataset = _useRemoteSource.refreshDataset;
|
|
42
46
|
var _useRequest = (0, _ahooks.useRequest)(_apiUrl.fetchAddDataset, {
|
|
43
47
|
manual: true
|
|
44
48
|
}),
|
|
@@ -52,12 +56,12 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
52
56
|
}, [dataset, isTree]);
|
|
53
57
|
var handleChange = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/function () {
|
|
54
58
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value, _ref3) {
|
|
55
|
-
var key,
|
|
59
|
+
var key, _getLDMetaAttr, _getLDMetaAttr2, moduleId, dataModelKey, _yield$runAsync, code, res, _ds;
|
|
56
60
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
57
61
|
while (1) switch (_context.prev = _context.next) {
|
|
58
62
|
case 0:
|
|
59
63
|
key = _ref3.key;
|
|
60
|
-
|
|
64
|
+
_getLDMetaAttr = (0, _helper.getLDMetaAttr)(['moduleId', 'dataModelKey']), _getLDMetaAttr2 = (0, _slicedToArray2.default)(_getLDMetaAttr, 2), moduleId = _getLDMetaAttr2[0], dataModelKey = _getLDMetaAttr2[1];
|
|
61
65
|
_context.next = 4;
|
|
62
66
|
return runAsync({
|
|
63
67
|
uid: moduleId,
|
|
@@ -83,7 +87,28 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
83
87
|
code: value,
|
|
84
88
|
uid: key
|
|
85
89
|
};
|
|
86
|
-
onChange(_ds)
|
|
90
|
+
onChange(_ds, function (exe) {
|
|
91
|
+
var dsFields = res.data.dataSets[value];
|
|
92
|
+
exe(fieldsKey, dsFields.map(function (f) {
|
|
93
|
+
var restProps = {
|
|
94
|
+
fieldAliasName: f.fieldAliasName || f.fieldName
|
|
95
|
+
};
|
|
96
|
+
if (['table', 'tableForm'].includes(component)) {
|
|
97
|
+
var _extra = JSON.parse(f.extra || '{}');
|
|
98
|
+
var alignMapping = {
|
|
99
|
+
0: 'left',
|
|
100
|
+
1: 'center',
|
|
101
|
+
2: 'right'
|
|
102
|
+
};
|
|
103
|
+
restProps.align = alignMapping[_extra.scell_alignment];
|
|
104
|
+
restProps.headerAlign = alignMapping[_extra.sheading_alignment];
|
|
105
|
+
}
|
|
106
|
+
return (0, _objectSpread2.default)({
|
|
107
|
+
uid: f.uid,
|
|
108
|
+
field: f.field
|
|
109
|
+
}, restProps);
|
|
110
|
+
}));
|
|
111
|
+
});
|
|
87
112
|
setCurrentDataset(_ds);
|
|
88
113
|
}
|
|
89
114
|
case 11:
|
|
@@ -123,9 +148,10 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
123
148
|
disabled: !currentDataset,
|
|
124
149
|
onClick: function onClick() {
|
|
125
150
|
return next({
|
|
126
|
-
pageinfo: pageinfo,
|
|
127
151
|
datasetUid: currentDataset.uid,
|
|
128
|
-
datasetCode: currentDataset.code
|
|
152
|
+
datasetCode: currentDataset.code,
|
|
153
|
+
valueKey: fieldsKey,
|
|
154
|
+
component: component
|
|
129
155
|
});
|
|
130
156
|
}
|
|
131
157
|
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
@@ -24,7 +24,7 @@ var _apiUrl = require("../../constants/api-url");
|
|
|
24
24
|
var _helper = require("../../engine/tools/helper");
|
|
25
25
|
var _fieldsSetting = _interopRequireDefault(require("../style/fields-setting.less"));
|
|
26
26
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
27
|
-
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'col', 'row', 'note', 'placeholder'];
|
|
27
|
+
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'col', 'row', 'note', 'placeholder', 'fieldAliasName'];
|
|
28
28
|
var Header = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "Header",
|
|
30
30
|
componentId: "luckda-6530__sc-gcwvp1-0"
|
|
@@ -35,7 +35,6 @@ var FieldKey = (0, _styledComponents.default)(_luckDesign.Ellipsis).withConfig({
|
|
|
35
35
|
})(["width:80px;margin-left:4px;"]);
|
|
36
36
|
var FieldsSetting = function FieldsSetting(_ref) {
|
|
37
37
|
var component = _ref.component,
|
|
38
|
-
pageinfo = _ref.pageinfo,
|
|
39
38
|
datasetUid = _ref.datasetUid,
|
|
40
39
|
nodeId = _ref.nodeId,
|
|
41
40
|
defaultValue = _ref.defaultValue,
|
|
@@ -54,21 +53,35 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
54
53
|
checkedFields = _useMap2[0],
|
|
55
54
|
_useMap2$ = _useMap2[1],
|
|
56
55
|
set = _useMap2$.set,
|
|
57
|
-
|
|
56
|
+
get = _useMap2$.get,
|
|
57
|
+
setAll = _useMap2$.setAll,
|
|
58
|
+
remove = _useMap2$.remove,
|
|
59
|
+
reset = _useMap2$.reset;
|
|
58
60
|
var _useState3 = (0, _react.useState)(void 0),
|
|
59
61
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
60
62
|
drawerType = _useState4[0],
|
|
61
63
|
setDrawerType = _useState4[1];
|
|
64
|
+
var _useState5 = (0, _react.useState)(false),
|
|
65
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
66
|
+
checkAll = _useState6[0],
|
|
67
|
+
setCheckAll = _useState6[1];
|
|
62
68
|
var fieldData = (0, _ahooks.useCreation)(function () {
|
|
63
69
|
return fields.find(function (_ref2) {
|
|
64
70
|
var uid = _ref2.uid;
|
|
65
71
|
return uid === fieldId;
|
|
66
72
|
});
|
|
67
73
|
}, [fieldId, fields]);
|
|
74
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
75
|
+
if (checkedFields.size === fields.length) {
|
|
76
|
+
setCheckAll(true);
|
|
77
|
+
} else if (checkedFields.size === 0) {
|
|
78
|
+
setCheckAll(false);
|
|
79
|
+
}
|
|
80
|
+
}, [checkedFields, fields]);
|
|
68
81
|
var _useRequest = (0, _ahooks.useRequest)(_apiUrl.fetchFieldsByDataset, {
|
|
69
82
|
defaultParams: [{
|
|
70
83
|
datasetUid: datasetUid,
|
|
71
|
-
moduleUid:
|
|
84
|
+
moduleUid: (0, _helper.getLDMetaAttr)('moduleId')
|
|
72
85
|
}],
|
|
73
86
|
onSuccess: function onSuccess(_ref3) {
|
|
74
87
|
var code = _ref3.code,
|
|
@@ -82,18 +95,23 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
82
95
|
return ret;
|
|
83
96
|
}, []), list.map(function (id) {
|
|
84
97
|
var _fieldData = detail[id];
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
0: 'left',
|
|
88
|
-
1: 'center',
|
|
89
|
-
2: 'right'
|
|
98
|
+
var restProps = {
|
|
99
|
+
fieldAliasName: _fieldData.fieldAliasName
|
|
90
100
|
};
|
|
91
|
-
|
|
101
|
+
if (['table', 'tableForm'].includes(component)) {
|
|
102
|
+
var extra = JSON.parse(_fieldData.extra || '{}');
|
|
103
|
+
var alignMapping = {
|
|
104
|
+
0: 'left',
|
|
105
|
+
1: 'center',
|
|
106
|
+
2: 'right'
|
|
107
|
+
};
|
|
108
|
+
restProps.align = alignMapping[extra.scell_alignment];
|
|
109
|
+
restProps.headerAlign = alignMapping[extra.sheading_alignment];
|
|
110
|
+
}
|
|
111
|
+
return (0, _objectSpread2.default)({
|
|
92
112
|
uid: id,
|
|
93
|
-
field: detail[id].field
|
|
94
|
-
|
|
95
|
-
headerAlign: alignMapping[extraAttr.sheading_alignment]
|
|
96
|
-
};
|
|
113
|
+
field: detail[id].field
|
|
114
|
+
}, restProps);
|
|
97
115
|
}), 'uid');
|
|
98
116
|
if (!(0, _lodash.isEqual)(_fields, defaultValue)) {
|
|
99
117
|
onChange(_fields);
|
|
@@ -113,34 +131,6 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
113
131
|
return _fieldData._type === 'divider' ? _fieldData : (0, _lodash.pick)(_fieldData, _PICK_KEYS_);
|
|
114
132
|
}));
|
|
115
133
|
});
|
|
116
|
-
var _useRequest2 = (0, _ahooks.useRequest)(_apiUrl.fetchUpdateFieldAttrs, {
|
|
117
|
-
manual: true
|
|
118
|
-
}),
|
|
119
|
-
runUpdateFieldAttrs = _useRequest2.runAsync;
|
|
120
|
-
var _useDebounceFn = (0, _ahooks.useDebounceFn)(function (field, value) {
|
|
121
|
-
var _pageinfo$relationshi = pageinfo.relationship,
|
|
122
|
-
moduleId = _pageinfo$relationshi.moduleId,
|
|
123
|
-
dataModelKey = _pageinfo$relationshi.dataModelKey;
|
|
124
|
-
runUpdateFieldAttrs({
|
|
125
|
-
dataModelKey: dataModelKey,
|
|
126
|
-
datasetBusinessUids: [field.uid],
|
|
127
|
-
fieldAliasName: value,
|
|
128
|
-
moduleDatasetUid: datasetUid,
|
|
129
|
-
moduleUid: moduleId,
|
|
130
|
-
scope: 'FIELD_ALIAS_NAME',
|
|
131
|
-
uid: field.uid
|
|
132
|
-
}).then(function () {
|
|
133
|
-
if (component === 'table') {
|
|
134
|
-
var gridApi = ctx.componentMap.get(nodeId).api.self.ref.current.gridApi;
|
|
135
|
-
var col = gridApi.columnApi.getColumn(field.field);
|
|
136
|
-
col.colDef.headerName = value;
|
|
137
|
-
gridApi.api.refreshHeader();
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}, {
|
|
141
|
-
wait: 500
|
|
142
|
-
}),
|
|
143
|
-
run = _useDebounceFn.run;
|
|
144
134
|
var handleSortChange = (0, _ahooks.useMemoizedFn)(function (sortItems, fromIndex, toIndex) {
|
|
145
135
|
dispatch({
|
|
146
136
|
type: 'sort',
|
|
@@ -162,9 +152,19 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
162
152
|
data: {
|
|
163
153
|
fieldAliasName: value
|
|
164
154
|
}
|
|
155
|
+
},
|
|
156
|
+
callback: function callback(newFields) {
|
|
157
|
+
if (component === 'table') {
|
|
158
|
+
setTimeout(function () {
|
|
159
|
+
var gridApi = ctx.componentMap.get(nodeId).api.self.ref.current.gridApi;
|
|
160
|
+
var col = gridApi.columnApi.getColumn(field.field);
|
|
161
|
+
col.colDef.headerName = value;
|
|
162
|
+
gridApi.api.refreshHeader();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
handleChange(newFields);
|
|
165
166
|
}
|
|
166
167
|
});
|
|
167
|
-
run(field, value);
|
|
168
168
|
});
|
|
169
169
|
var handleFieldCheckChange = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
170
170
|
var _e$target = e.target,
|
|
@@ -176,6 +176,15 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
176
176
|
remove(data.uid, data);
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
+
var handleFieldCheckAll = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
180
|
+
if (e.target.checked) {
|
|
181
|
+
setAll(fields.map(function (_field) {
|
|
182
|
+
return [_field.uid, _field];
|
|
183
|
+
}));
|
|
184
|
+
} else {
|
|
185
|
+
reset();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
179
188
|
var handleBatchSetting = (0, _ahooks.useMemoizedFn)(function () {
|
|
180
189
|
setDrawerType('batch');
|
|
181
190
|
});
|
|
@@ -189,7 +198,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
189
198
|
uid: groupId,
|
|
190
199
|
id: groupId,
|
|
191
200
|
field: 'divider',
|
|
192
|
-
|
|
201
|
+
fieldName: 'Group',
|
|
193
202
|
_type: 'divider'
|
|
194
203
|
}
|
|
195
204
|
},
|
|
@@ -231,10 +240,18 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
231
240
|
});
|
|
232
241
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
233
242
|
spinning: loading
|
|
234
|
-
}, /*#__PURE__*/_react.default.createElement(Header, null, /*#__PURE__*/_react.default.createElement(
|
|
243
|
+
}, /*#__PURE__*/_react.default.createElement(Header, null, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
244
|
+
style: {
|
|
245
|
+
marginLeft: 20
|
|
246
|
+
},
|
|
247
|
+
disabled: drawerType === 'batch',
|
|
248
|
+
checked: checkAll,
|
|
249
|
+
indeterminate: checkedFields.size > 0 && checkedFields.size !== fields.length,
|
|
250
|
+
onChange: handleFieldCheckAll
|
|
251
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
235
252
|
style: {
|
|
236
|
-
width:
|
|
237
|
-
paddingLeft:
|
|
253
|
+
width: 80,
|
|
254
|
+
paddingLeft: 4
|
|
238
255
|
}
|
|
239
256
|
}, (0, _utils.formatMessage)({
|
|
240
257
|
id: "".concat(_I18N_PREFIX_, ".field"),
|
|
@@ -275,6 +292,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
275
292
|
left: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, field._type !== 'divider' ? /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
276
293
|
disabled: drawerType === 'batch',
|
|
277
294
|
data: field,
|
|
295
|
+
checked: !!get(field.uid),
|
|
278
296
|
onChange: handleFieldCheckChange
|
|
279
297
|
}) : null, /*#__PURE__*/_react.default.createElement(FieldKey, {
|
|
280
298
|
tooltip: true,
|
|
@@ -317,8 +335,8 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
317
335
|
dispatch: dispatch,
|
|
318
336
|
nodeId: nodeId,
|
|
319
337
|
fieldData: fieldData,
|
|
320
|
-
dataModelKey:
|
|
321
|
-
moduleId:
|
|
338
|
+
dataModelKey: (0, _helper.getLDMetaAttr)('dataModelKey'),
|
|
339
|
+
moduleId: (0, _helper.getLDMetaAttr)('moduleId'),
|
|
322
340
|
datasetId: datasetUid,
|
|
323
341
|
component: component,
|
|
324
342
|
onAliasChange: handleAliasChange,
|
|
@@ -327,8 +345,8 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
327
345
|
dispatch: dispatch,
|
|
328
346
|
nodeId: nodeId,
|
|
329
347
|
fieldsData: checkedFields,
|
|
330
|
-
dataModelKey:
|
|
331
|
-
moduleId:
|
|
348
|
+
dataModelKey: (0, _helper.getLDMetaAttr)('dataModelKey'),
|
|
349
|
+
moduleId: (0, _helper.getLDMetaAttr)('moduleId'),
|
|
332
350
|
datasetId: datasetUid,
|
|
333
351
|
component: component,
|
|
334
352
|
onChange: handleChange
|
|
@@ -19,7 +19,8 @@ var I18nInput = function I18nInput(_ref) {
|
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
20
20
|
defaultValue: defaultValue,
|
|
21
21
|
onChange: function onChange(e) {
|
|
22
|
-
|
|
22
|
+
var _e$target$value;
|
|
23
|
+
return run((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim());
|
|
23
24
|
},
|
|
24
25
|
size: size
|
|
25
26
|
});
|
|
@@ -10,29 +10,29 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _icon = _interopRequireDefault(require("../style/icon.less"));
|
|
12
12
|
var _IconFont = _interopRequireDefault(require("../../../components/IconFont"));
|
|
13
|
-
/**
|
|
14
|
-
* 一个简单的图标选择器组件,展示了一个图标并允许用户点击选择。
|
|
15
|
-
* 该组件使用了`Icon.createFromIconfontCN`来创建一个可以从Iconfont.cn加载图标的`IconFont`组件。
|
|
16
|
-
* 当图标被点击时,会调用`onSelect`回调函数,并传递一个对象,其中包含了`field`字段。
|
|
17
|
-
*
|
|
18
|
-
* @component
|
|
19
|
-
* @example
|
|
20
|
-
* ```jsx
|
|
21
|
-
* <IconSelector
|
|
22
|
-
* field="iconField"
|
|
23
|
-
* onSelect={({ field }) => console.log(`Selected icon field: ${field}`)}
|
|
24
|
-
* defaultValue="icon-example"
|
|
25
|
-
* />
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param {Object} props 组件的props
|
|
29
|
-
* @param {string} props.field 用于识别选择的图标字段的标识符。
|
|
30
|
-
* @param {Function} props.onSelect 当图标被点击时触发的回调函数。
|
|
31
|
-
* 接收一个对象参数,该对象包含`field`字段。
|
|
32
|
-
* @param {string} [props.defaultValue='iconyingyongguanli'] 初始化时图标的类型,
|
|
33
|
-
* 默认为'iconyingyongguanli'。
|
|
34
|
-
*
|
|
35
|
-
* @returns {React.Element} 渲染的React元素。
|
|
13
|
+
/**
|
|
14
|
+
* 一个简单的图标选择器组件,展示了一个图标并允许用户点击选择。
|
|
15
|
+
* 该组件使用了`Icon.createFromIconfontCN`来创建一个可以从Iconfont.cn加载图标的`IconFont`组件。
|
|
16
|
+
* 当图标被点击时,会调用`onSelect`回调函数,并传递一个对象,其中包含了`field`字段。
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <IconSelector
|
|
22
|
+
* field="iconField"
|
|
23
|
+
* onSelect={({ field }) => console.log(`Selected icon field: ${field}`)}
|
|
24
|
+
* defaultValue="icon-example"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} props 组件的props
|
|
29
|
+
* @param {string} props.field 用于识别选择的图标字段的标识符。
|
|
30
|
+
* @param {Function} props.onSelect 当图标被点击时触发的回调函数。
|
|
31
|
+
* 接收一个对象参数,该对象包含`field`字段。
|
|
32
|
+
* @param {string} [props.defaultValue='iconyingyongguanli'] 初始化时图标的类型,
|
|
33
|
+
* 默认为'iconyingyongguanli'。
|
|
34
|
+
*
|
|
35
|
+
* @returns {React.Element} 渲染的React元素。
|
|
36
36
|
*/
|
|
37
37
|
function _default(_ref) {
|
|
38
38
|
var defaultValue = _ref.defaultValue,
|
|
@@ -17,22 +17,22 @@ var _utils = require("@luck-design-biz/base/utils");
|
|
|
17
17
|
var _apiUrl = require("../../constants/api-url");
|
|
18
18
|
var Search = _antd.Input.Search;
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* 一个用于选择图标的组件,提供了图标的搜索和选择功能。
|
|
22
|
-
*
|
|
23
|
-
* 该组件首先从预定义的URL加载图标列表,然后显示这些图标。用户可以通过输入框搜索图标,
|
|
24
|
-
* 点击图标时,会通过 `onChange` 回调将选中的图标信息返回给父组件。
|
|
25
|
-
*
|
|
26
|
-
* @component
|
|
27
|
-
* @example
|
|
28
|
-
* ```jsx
|
|
29
|
-
* <IconSelector
|
|
30
|
-
* onChange={(selectedIcon) => console.log(selectedIcon)}
|
|
31
|
-
* />
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} props 组件接受的props
|
|
35
|
-
* @param {Function} props.onChange 当图标被选中时触发的回调函数,接受选中图标的信息作为参数
|
|
20
|
+
/**
|
|
21
|
+
* 一个用于选择图标的组件,提供了图标的搜索和选择功能。
|
|
22
|
+
*
|
|
23
|
+
* 该组件首先从预定义的URL加载图标列表,然后显示这些图标。用户可以通过输入框搜索图标,
|
|
24
|
+
* 点击图标时,会通过 `onChange` 回调将选中的图标信息返回给父组件。
|
|
25
|
+
*
|
|
26
|
+
* @component
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <IconSelector
|
|
30
|
+
* onChange={(selectedIcon) => console.log(selectedIcon)}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} props 组件接受的props
|
|
35
|
+
* @param {Function} props.onChange 当图标被选中时触发的回调函数,接受选中图标的信息作为参数
|
|
36
36
|
*/
|
|
37
37
|
function _default(_ref) {
|
|
38
38
|
var onChange = _ref.onChange,
|