@luck-design-biz/luckda 0.0.27 → 1.0.0-10-alpha
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/es/components/Builder/index.js +22 -27
- package/es/components/ComplexItem/index.js +108 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +131 -0
- package/es/components/LDActions/index.less +68 -0
- package/es/components/LdAutoForm/index.js +61 -25
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +58 -38
- package/es/components/LdGrid/index.js +49 -28
- package/es/components/LdGridForm/index.js +42 -23
- package/es/components/LdTree/index.js +184 -36
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/FromItems.js +177 -94
- package/es/helper/form.js +56 -20
- package/es/helper/ldBuilder.js +34 -16
- package/es/helper/ldComBuild.js +29 -14
- package/es/helper/props_config.js +17 -0
- package/es/index.js +1 -1
- package/es/locales/zh-CN.js +270 -0
- package/es/lowcode/constants/api-url.js +690 -1
- package/es/lowcode/constants/event-topics.js +19 -1
- package/es/lowcode/constants/index.js +32 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +56 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +51 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +45 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +48 -0
- package/es/lowcode/engine/launcher.js +41 -0
- package/es/lowcode/engine/meta/box.props.default.json +13 -0
- package/es/lowcode/engine/meta/box.props.json +40 -0
- package/es/lowcode/engine/meta/button.props.default.json +18 -7
- package/{lib/lowcode/engine/meta/components/button.json → es/lowcode/engine/meta/button.props.json} +126 -103
- package/es/lowcode/engine/meta/cardlist.props.default.json +19 -9
- package/es/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +152 -142
- package/es/lowcode/engine/meta/components-list.json +235 -121
- package/es/lowcode/engine/meta/dialog.props.default.json +27 -0
- package/es/lowcode/engine/meta/dialog.props.json +157 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +19 -9
- package/{lib/lowcode/engine/meta/components/drawer.json → es/lowcode/engine/meta/drawer.props.json} +130 -142
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +159 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +142 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +19 -0
- package/es/lowcode/engine/meta/fielddate.props.json +145 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +19 -0
- package/es/lowcode/engine/meta/fielddict.props.json +140 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +18 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +140 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +169 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +145 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +117 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +123 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +19 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +154 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +154 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +127 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +18 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +145 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +20 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +167 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +21 -0
- package/es/lowcode/engine/meta/fielduser.props.json +178 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +133 -0
- package/es/lowcode/engine/meta/form.props.default.json +59 -4
- package/es/lowcode/engine/meta/form.props.json +668 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/es/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/es/lowcode/engine/meta/image.props.default.json +18 -7
- package/es/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/es/lowcode/engine/meta/imex.props.default.json +22 -3
- package/es/lowcode/engine/meta/imex.props.json +135 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +271 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +11 -1
- package/es/lowcode/engine/meta/jsx.props.json +30 -0
- package/es/lowcode/engine/meta/layout.props.default.json +15 -4
- package/es/lowcode/engine/meta/{components/layout.json → layout.props.json} +106 -106
- package/es/lowcode/engine/meta/link.props.default.json +16 -5
- package/{lib/lowcode/engine/meta/components/link.json → es/lowcode/engine/meta/link.props.json} +111 -110
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +61 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/pagelayout.props.default.json +16 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +59 -0
- package/es/lowcode/engine/meta/section.props.default.json +17 -8
- package/es/lowcode/engine/meta/section.props.json +112 -0
- package/es/lowcode/engine/meta/split.props.default.json +17 -4
- package/es/lowcode/engine/meta/split.props.json +57 -0
- package/es/lowcode/engine/meta/table.props.default.json +50 -9
- package/es/lowcode/engine/meta/table.props.json +451 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +24 -9
- package/es/lowcode/engine/meta/tabs.props.json +117 -0
- package/es/lowcode/engine/meta/text.props.default.json +16 -3
- package/es/lowcode/engine/meta/{components/text.json → text.props.json} +57 -64
- package/es/lowcode/engine/meta/tree.props.default.json +31 -8
- package/es/lowcode/engine/meta/tree.props.json +360 -0
- package/es/lowcode/engine/provider/ContextProvider/index.js +206 -0
- package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +362 -0
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +61 -0
- package/es/lowcode/engine/provider/ContextProvider/useTodo.js +86 -0
- package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +231 -0
- package/es/lowcode/engine/tools/dataProcess.js +151 -8
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +240 -0
- package/es/lowcode/engine/tools/initDS.js +263 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +81 -0
- package/es/lowcode/engine/tools/useCombinedRefs.js +15 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +1 -1
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +66 -80
- package/es/lowcode/painter/DesignOperator.js +323 -0
- package/es/lowcode/painter/DesignToolbar.js +436 -0
- package/es/lowcode/painter/I18n.js +202 -2
- package/es/lowcode/painter/Outline.js +86 -70
- package/es/lowcode/painter/Panel.js +236 -2
- package/es/lowcode/painter/Ribbon.js +61 -55
- package/es/lowcode/painter/components/ActionBindModal.js +308 -0
- package/es/lowcode/painter/components/AdvancePanel.js +217 -0
- package/es/lowcode/painter/components/AttrsPanel.js +160 -0
- package/es/lowcode/painter/components/Collapse.js +104 -0
- package/es/lowcode/painter/components/ColorInput.js +127 -0
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +50 -0
- package/es/lowcode/painter/components/DragDrop/Overlay.js +8 -0
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +67 -0
- package/es/lowcode/painter/components/FieldSelector.js +57 -0
- package/es/lowcode/painter/components/ListEditor.js +104 -0
- package/es/lowcode/painter/components/NumberInput.js +148 -0
- package/es/lowcode/painter/components/PanelItem.js +83 -11
- package/es/lowcode/painter/components/PopConfirm.js +30 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/PreviewIframe.js +19 -0
- package/es/lowcode/painter/components/RuleInput.js +9 -8
- package/es/lowcode/painter/components/SortBox.js +99 -0
- package/es/lowcode/painter/components/TipIcon.js +16 -0
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/VarEditor.js +456 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +111 -0
- package/es/lowcode/painter/components/code-editor/CssEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +87 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +149 -0
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +154 -0
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +101 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +288 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +135 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +532 -0
- package/es/lowcode/painter/components/field-setting/index.js +340 -0
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +54 -0
- package/es/lowcode/painter/index.js +9 -3
- package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +233 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +41 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +45 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +229 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +41 -0
- package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +167 -0
- package/es/lowcode/painter/panel-section/FieldState.js +62 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +372 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +36 -0
- package/es/lowcode/painter/panel-section/Icon.js +53 -0
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +137 -0
- package/es/lowcode/painter/panel-section/ImpExp.js +159 -0
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +123 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +62 -54
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +112 -0
- package/es/lowcode/painter/panel-section/PageVars.js +300 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +46 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +164 -0
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +296 -0
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +543 -0
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +92 -0
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +208 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +51 -0
- package/es/lowcode/painter/panel-section/StylePanel/index.js +35 -0
- package/es/lowcode/painter/panel-section/TabItems.js +187 -0
- package/es/lowcode/painter/panel-section/TableTopFilter.js +316 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +74 -0
- package/es/lowcode/painter/panel-section/TextContent.js +79 -0
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +85 -0
- package/es/lowcode/painter/services/complexPop.js +21 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/actions-editor.less +16 -0
- package/es/lowcode/painter/style/border-editor.less +36 -0
- package/es/lowcode/painter/style/border-radius-selector.less +43 -0
- package/es/lowcode/painter/style/border-selector.less +40 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/collapse.less +28 -0
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +128 -6
- package/es/lowcode/painter/style/display.less +17 -0
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/font-editor.less +9 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/index.less +0 -1
- package/es/lowcode/painter/style/layout-ratio.less +1 -1
- package/es/lowcode/painter/style/list-editor.less +95 -0
- package/es/lowcode/painter/style/number-input.less +17 -0
- package/es/lowcode/painter/style/outline.less +2 -0
- package/es/lowcode/painter/style/page-layout-display.less +28 -0
- package/es/lowcode/painter/style/page-vars.less +25 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel-item.less +45 -12
- package/es/lowcode/painter/style/panel.less +93 -0
- package/es/lowcode/painter/style/pop-confirm.less +17 -0
- package/es/lowcode/painter/style/pop-form.less +20 -0
- package/es/lowcode/painter/style/ribbon.less +1 -0
- package/es/lowcode/painter/style/split-display.less +19 -0
- package/es/lowcode/painter/style/style-panel.less +37 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +28 -0
- package/es/lowcode/view/Canvas.js +59 -127
- package/es/lowcode/view/Loading.js +3 -1
- package/es/lowcode/view/Page.js +47 -36
- package/es/lowcode/view/errorBoundary.js +61 -0
- package/es/lowcode/view/index.js +6 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +26 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Box/index.js +48 -7
- package/es/lowcode/view/lc-components/Box/index.less +14 -0
- package/es/lowcode/view/lc-components/Box/meta.json +40 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +19 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +6 -0
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +107 -20
- package/es/lowcode/view/lc-components/Button/meta.json +127 -0
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/{lib/lowcode/engine/meta/components/table.json → es/lowcode/view/lc-components/CardList/meta.json} +24 -32
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +58 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +162 -28
- package/es/lowcode/view/lc-components/Dialog/index.less +7 -2
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +23 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +42 -9
- package/es/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/es/lowcode/{engine/meta/components/drawer.json → view/lc-components/Drawer/meta.json} +11 -23
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +100 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Form/index.js +584 -13
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +609 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +15 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +542 -11
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +135 -0
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -0
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +44 -0
- package/es/lowcode/view/lc-components/JSX/index.js +18 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +69 -0
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Layout/index.js +62 -9
- package/es/lowcode/view/lc-components/Layout/index.less +5 -0
- package/{lib/lowcode/engine/meta/components/layout.json → es/lowcode/view/lc-components/Layout/meta.json} +10 -10
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Link/index.js +4 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Page/meta.json +61 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +55 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +38 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +42 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +72 -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 +41 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +20 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +32 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Section/index.js +114 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +108 -0
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +63 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Split/index.js +61 -8
- package/es/lowcode/view/lc-components/Split/meta.json +53 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +55 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +117 -0
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +425 -0
- package/es/lowcode/view/lc-components/Table/index.js +817 -14
- package/es/lowcode/view/lc-components/Table/meta.json +451 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +70 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +133 -12
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -0
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Text/index.js +47 -9
- package/{lib/lowcode/engine/meta/components/text.json → es/lowcode/view/lc-components/Text/meta.json} +13 -22
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +68 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +377 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -0
- package/es/lowcode/view/lc-components/Wrapper.js +61 -21
- package/es/lowcode/view/style/loading.less +14 -0
- package/es/lowcode/view/style/page.less +3 -1
- package/es/services.js +4 -43
- 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 +8 -19
- package/es/upload/Form/index.js +2 -12
- package/es/upload/FormItem/index.js +7 -8
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +23 -44
- package/es/utils/grid.js +18 -17
- package/lib/components/Builder/index.js +19 -23
- package/lib/components/ComplexItem/index.js +115 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +139 -0
- package/lib/components/LDActions/index.less +68 -0
- package/lib/components/LdAutoForm/index.js +59 -23
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +56 -37
- package/lib/components/LdGrid/index.js +48 -27
- package/lib/components/LdGridForm/index.js +40 -21
- package/lib/components/LdTree/index.js +184 -36
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/form.js +54 -19
- package/lib/helper/ldBuilder.js +34 -16
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +8 -8
- package/lib/locales/zh-CN.js +276 -0
- package/lib/lowcode/constants/api-url.js +694 -2
- package/lib/lowcode/constants/event-topics.js +20 -2
- package/lib/lowcode/constants/index.js +33 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +62 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +58 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +51 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +54 -0
- package/lib/lowcode/engine/launcher.js +47 -0
- package/lib/lowcode/engine/meta/box.props.default.json +13 -0
- package/lib/lowcode/engine/meta/box.props.json +40 -0
- package/lib/lowcode/engine/meta/button.props.default.json +18 -7
- package/{es/lowcode/engine/meta/components/button.json → lib/lowcode/engine/meta/button.props.json} +126 -103
- package/lib/lowcode/engine/meta/cardlist.props.default.json +19 -9
- package/lib/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +152 -142
- package/lib/lowcode/engine/meta/components-list.json +235 -121
- package/lib/lowcode/engine/meta/dialog.props.default.json +27 -0
- package/lib/lowcode/engine/meta/dialog.props.json +157 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +19 -9
- package/lib/lowcode/engine/meta/drawer.props.json +131 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +159 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +142 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +145 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +140 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +140 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +169 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +145 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +117 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +123 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +19 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +154 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +154 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +145 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +20 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +167 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +21 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +178 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +133 -0
- package/lib/lowcode/engine/meta/form.props.default.json +59 -4
- package/lib/lowcode/engine/meta/form.props.json +668 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/lib/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/lib/lowcode/engine/meta/image.props.default.json +18 -7
- package/lib/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/lib/lowcode/engine/meta/imex.props.default.json +22 -3
- package/lib/lowcode/engine/meta/imex.props.json +135 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +271 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +11 -1
- package/lib/lowcode/engine/meta/jsx.props.json +30 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +15 -4
- package/lib/lowcode/engine/meta/layout.props.json +107 -0
- package/lib/lowcode/engine/meta/link.props.default.json +16 -5
- package/{es/lowcode/engine/meta/components/link.json → lib/lowcode/engine/meta/link.props.json} +111 -110
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +61 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +16 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +59 -0
- package/lib/lowcode/engine/meta/section.props.default.json +17 -8
- package/lib/lowcode/engine/meta/section.props.json +112 -0
- package/lib/lowcode/engine/meta/split.props.default.json +17 -4
- package/lib/lowcode/engine/meta/split.props.json +57 -0
- package/lib/lowcode/engine/meta/table.props.default.json +50 -9
- package/lib/lowcode/engine/meta/table.props.json +451 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +24 -9
- package/lib/lowcode/engine/meta/tabs.props.json +117 -0
- package/lib/lowcode/engine/meta/text.props.default.json +16 -3
- package/lib/lowcode/engine/meta/text.props.json +58 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +31 -8
- package/lib/lowcode/engine/meta/tree.props.json +360 -0
- package/lib/lowcode/engine/provider/ContextProvider/index.js +229 -0
- package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +369 -0
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +67 -0
- package/lib/lowcode/engine/provider/ContextProvider/useTodo.js +93 -0
- package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +239 -0
- package/lib/lowcode/engine/tools/dataProcess.js +153 -8
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +252 -0
- package/lib/lowcode/engine/tools/initDS.js +270 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +96 -0
- package/lib/lowcode/engine/tools/useCombinedRefs.js +21 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +8 -1
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +64 -78
- package/lib/lowcode/painter/DesignOperator.js +330 -0
- package/lib/lowcode/painter/DesignToolbar.js +444 -0
- package/lib/lowcode/painter/I18n.js +203 -2
- package/lib/lowcode/painter/Outline.js +82 -66
- package/lib/lowcode/painter/Panel.js +236 -2
- package/lib/lowcode/painter/Ribbon.js +63 -64
- package/lib/lowcode/painter/components/ActionBindModal.js +315 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +225 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +168 -0
- package/lib/lowcode/painter/components/Collapse.js +111 -0
- package/lib/lowcode/painter/components/ColorInput.js +134 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +57 -0
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +15 -0
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +75 -0
- package/lib/lowcode/painter/components/FieldSelector.js +65 -0
- package/lib/lowcode/painter/components/ListEditor.js +110 -0
- package/lib/lowcode/painter/components/NumberInput.js +155 -0
- package/lib/lowcode/painter/components/PanelItem.js +84 -11
- package/lib/lowcode/painter/components/PopConfirm.js +36 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/PreviewIframe.js +26 -0
- package/lib/lowcode/painter/components/RuleInput.js +9 -8
- package/lib/lowcode/painter/components/SortBox.js +106 -0
- package/lib/lowcode/painter/components/TipIcon.js +23 -0
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/VarEditor.js +463 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +118 -0
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +160 -0
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +161 -0
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +108 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +296 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +143 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +540 -0
- package/lib/lowcode/painter/components/field-setting/index.js +347 -0
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +60 -0
- package/lib/lowcode/painter/index.js +9 -3
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +109 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +241 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +48 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +52 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +236 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +48 -0
- package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +175 -0
- package/lib/lowcode/painter/panel-section/FieldState.js +70 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +380 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +43 -0
- package/lib/lowcode/painter/panel-section/Icon.js +61 -0
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +144 -0
- package/lib/lowcode/painter/panel-section/ImpExp.js +167 -0
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +129 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +61 -53
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +120 -0
- package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +53 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +172 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +303 -0
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +550 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +99 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +59 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +219 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +58 -0
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +41 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +195 -0
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +324 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +82 -0
- package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +94 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +95 -0
- package/lib/lowcode/painter/services/complexPop.js +28 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/actions-editor.less +16 -0
- package/lib/lowcode/painter/style/border-editor.less +36 -0
- package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
- package/lib/lowcode/painter/style/border-selector.less +40 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/collapse.less +28 -0
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +128 -6
- package/lib/lowcode/painter/style/display.less +17 -0
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/font-editor.less +9 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/index.less +0 -1
- package/lib/lowcode/painter/style/layout-ratio.less +1 -1
- package/lib/lowcode/painter/style/list-editor.less +95 -0
- package/lib/lowcode/painter/style/number-input.less +17 -0
- package/lib/lowcode/painter/style/outline.less +2 -0
- package/lib/lowcode/painter/style/page-layout-display.less +28 -0
- package/lib/lowcode/painter/style/page-vars.less +25 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel-item.less +45 -12
- package/lib/lowcode/painter/style/panel.less +93 -0
- package/lib/lowcode/painter/style/pop-confirm.less +17 -0
- package/lib/lowcode/painter/style/pop-form.less +20 -0
- package/lib/lowcode/painter/style/ribbon.less +1 -0
- package/lib/lowcode/painter/style/split-display.less +19 -0
- package/lib/lowcode/painter/style/style-panel.less +37 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +36 -0
- package/lib/lowcode/view/Canvas.js +59 -134
- package/lib/lowcode/view/Loading.js +3 -1
- package/lib/lowcode/view/Page.js +43 -32
- package/lib/lowcode/view/errorBoundary.js +69 -0
- package/lib/lowcode/view/index.js +6 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +33 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Box/index.js +48 -7
- package/lib/lowcode/view/lc-components/Box/index.less +14 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +26 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +13 -0
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +106 -19
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -0
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/{es/lowcode/engine/meta/components/table.json → lib/lowcode/view/lc-components/CardList/meta.json} +24 -32
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +66 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +160 -26
- package/lib/lowcode/view/lc-components/Dialog/index.less +7 -2
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +30 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +42 -9
- package/lib/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +131 -0
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +107 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Form/index.js +582 -11
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +609 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +22 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +541 -10
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +135 -0
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +51 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +18 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +77 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +62 -9
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -0
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Link/index.js +4 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +63 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +46 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +50 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +80 -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 +49 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +27 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +39 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Section/index.js +113 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +71 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Split/index.js +59 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +63 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +124 -0
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +433 -0
- package/lib/lowcode/view/lc-components/Table/index.js +815 -12
- package/lib/lowcode/view/lc-components/Table/meta.json +451 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +78 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +132 -11
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -0
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Text/index.js +46 -8
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +76 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +375 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +58 -18
- package/lib/lowcode/view/style/loading.less +14 -0
- package/lib/lowcode/view/style/page.less +3 -1
- package/lib/services.js +4 -45
- 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 +8 -19
- package/lib/upload/Form/index.js +2 -12
- package/lib/upload/FormItem/index.js +7 -8
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +22 -44
- package/lib/utils/grid.js +17 -16
- package/package.json +30 -12
- package/es/components/LdRuntimeCom/index.js +0 -42
- package/es/lowcode/engine/meta/components/form.json +0 -116
- package/es/lowcode/engine/meta/components/imex.json +0 -81
- package/es/lowcode/engine/meta/components/jsx.json +0 -24
- package/es/lowcode/engine/meta/components/modal.json +0 -120
- package/es/lowcode/engine/meta/components/section.json +0 -107
- package/es/lowcode/engine/meta/components/split.json +0 -71
- package/es/lowcode/engine/meta/components/tabs.json +0 -140
- package/es/lowcode/engine/meta/components/tree.json +0 -156
- package/es/lowcode/engine/meta/modal.props.default.json +0 -11
- package/es/lowcode/engine/provider/ContextProvider.js +0 -164
- package/es/lowcode/engine/tools/lcid.js +0 -16
- package/es/lowcode/painter/panel-section/Radio.js +0 -58
- package/lib/components/LdRuntimeCom/index.js +0 -49
- package/lib/lowcode/engine/meta/components/form.json +0 -116
- package/lib/lowcode/engine/meta/components/imex.json +0 -81
- package/lib/lowcode/engine/meta/components/jsx.json +0 -24
- package/lib/lowcode/engine/meta/components/modal.json +0 -120
- package/lib/lowcode/engine/meta/components/section.json +0 -107
- package/lib/lowcode/engine/meta/components/split.json +0 -71
- package/lib/lowcode/engine/meta/components/tabs.json +0 -140
- package/lib/lowcode/engine/meta/components/tree.json +0 -156
- package/lib/lowcode/engine/meta/modal.props.default.json +0 -11
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -172
- package/lib/lowcode/engine/tools/lcid.js +0 -22
- package/lib/lowcode/painter/panel-section/Radio.js +0 -65
|
@@ -19,7 +19,7 @@ var _utils = require("../../utils");
|
|
|
19
19
|
var _form = require("../../helper/form");
|
|
20
20
|
var _Builder = require("../Builder");
|
|
21
21
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
22
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "
|
|
22
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode", "fields", "setVerifyRules"];
|
|
23
23
|
var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
24
24
|
var _ref$columns = _ref.columns,
|
|
25
25
|
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
@@ -29,12 +29,11 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
29
29
|
actions = _ref$actions === void 0 ? {} : _ref$actions,
|
|
30
30
|
_ref$doAction = _ref.doAction,
|
|
31
31
|
doAction = _ref$doAction === void 0 ? function () {} : _ref$doAction,
|
|
32
|
-
_ref$uiSettings = _ref.uiSettings,
|
|
33
|
-
uiSettings = _ref$uiSettings === void 0 ? {} : _ref$uiSettings,
|
|
34
32
|
ldId = _ref.ldId,
|
|
35
33
|
dataSetKey = _ref.dataSetKey,
|
|
36
34
|
_ref$columnsRewrite = _ref.columnsRewrite,
|
|
37
35
|
columnsRewrite = _ref$columnsRewrite === void 0 ? [] : _ref$columnsRewrite,
|
|
36
|
+
columnsReset = _ref.columnsReset,
|
|
38
37
|
_ref$onQuery = _ref.onQuery,
|
|
39
38
|
onQuery = _ref$onQuery === void 0 ? {} : _ref$onQuery,
|
|
40
39
|
_ref$onAdd = _ref.onAdd,
|
|
@@ -60,10 +59,12 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
60
59
|
className = _ref.className,
|
|
61
60
|
formRef = _ref.formRef,
|
|
62
61
|
formMode = _ref.formMode,
|
|
62
|
+
fields = _ref.fields,
|
|
63
|
+
setVerifyRules = _ref.setVerifyRules,
|
|
63
64
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
64
65
|
var _ref2 = (0, _react.useContext)(_Builder.LuckDaContext) || {},
|
|
65
66
|
setFieldProps = _ref2.setFieldProps;
|
|
66
|
-
var defaultValues = /*#__PURE__*/(0, _react.createRef)();
|
|
67
|
+
var defaultValues = /*#__PURE__*/(0, _react.createRef)({});
|
|
67
68
|
var isMain = ldId === mainFormLdId;
|
|
68
69
|
var gridColumns = columns.map(function (col) {
|
|
69
70
|
if ((col.comName || _form.defaultComName[col.property]) === 'radio') return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
|
|
@@ -71,12 +72,15 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
71
72
|
});
|
|
72
73
|
return col;
|
|
73
74
|
});
|
|
74
|
-
var gridPresetData = uiSettings && uiSettings.grid && uiSettings.grid[0] && uiSettings.grid[0].preset ? JSON.parse(uiSettings.grid[0].preset) : {};
|
|
75
|
-
var mergedArray = (0, _utils.mergeAndSort)(gridColumns, gridPresetData.gridPreset || [], 'field');
|
|
76
75
|
var _columns = function () {
|
|
76
|
+
var fieldsObj = (0, _lodash.keyBy)(fields, 'field');
|
|
77
|
+
var columnsObj = (0, _lodash.keyBy)(gridColumns, 'field');
|
|
78
|
+
var keys = (0, _lodash.isEmpty)(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
|
|
77
79
|
var _defaultValues = {};
|
|
78
|
-
var _nodes = (0, _lodash.
|
|
79
|
-
|
|
80
|
+
var _nodes = (0, _lodash.reduce)(keys, function (result, key) {
|
|
81
|
+
var setting = fieldsObj[key];
|
|
82
|
+
var col = columnsObj[key];
|
|
83
|
+
if (col !== null && col !== void 0 && col.isShowInForm) {
|
|
80
84
|
var _customColumn;
|
|
81
85
|
var customColumn = columnsRewrite.find(function (column) {
|
|
82
86
|
return column.field === col.aliaName;
|
|
@@ -86,21 +90,25 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
86
90
|
mode: 'grid'
|
|
87
91
|
});
|
|
88
92
|
_defaultValues = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
93
|
-
|
|
93
|
+
var newCol = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
|
|
94
|
+
setVerifyRules: setVerifyRules,
|
|
95
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
96
|
+
});
|
|
97
|
+
var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip'];
|
|
98
|
+
result.push((0, _utils.getFormColumn)(type, newCol, (0, _objectSpread4.default)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _lodash.pick)(setting, defaultSet)), customColumn), {}, {
|
|
94
99
|
formItemRewrite: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
|
|
95
100
|
moduleCode: moduleCode,
|
|
96
101
|
formRef: formRef,
|
|
97
|
-
formMode: formMode
|
|
102
|
+
formMode: formMode,
|
|
103
|
+
render: setting === null || setting === void 0 ? void 0 : setting.render,
|
|
104
|
+
setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
|
|
98
105
|
})
|
|
99
|
-
})
|
|
106
|
+
})));
|
|
100
107
|
}
|
|
108
|
+
return result;
|
|
101
109
|
}, []);
|
|
102
110
|
defaultValues.current = _defaultValues;
|
|
103
|
-
setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (col) {
|
|
111
|
+
setFieldProps && setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (col) {
|
|
104
112
|
var node = col.renderBasicFormItem();
|
|
105
113
|
var renderBasicFormItem = node === null || node === void 0 ? void 0 : node.props;
|
|
106
114
|
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
|
|
@@ -109,9 +117,11 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
109
117
|
}, renderBasicFormItem)
|
|
110
118
|
});
|
|
111
119
|
})));
|
|
112
|
-
return _nodes;
|
|
120
|
+
return columnsReset ? columnsReset(_nodes) : _nodes;
|
|
113
121
|
}();
|
|
114
|
-
var defaultDataSource = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _utils.formItemDataFormat)(columns
|
|
122
|
+
var defaultDataSource = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _utils.formItemDataFormat)(columns.map(function (c) {
|
|
123
|
+
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, c), (0, _lodash.keyBy)(fields, 'field')[c.field]);
|
|
124
|
+
}), defaultValues.current)), defaultDataSourceFormat(defaultValues.current));
|
|
115
125
|
var formConfig = {
|
|
116
126
|
formId: ldId,
|
|
117
127
|
columns: _columns,
|
|
@@ -141,7 +151,11 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
141
151
|
var _submitData = data.map(function (item) {
|
|
142
152
|
return behaviorKey === 'add' ? (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _utils.dataFormat)(gridColumns, item)), {}, (0, _defineProperty2.default)({}, window.appConfig.constraintKeys.PRIMARY, null)) : (0, _utils.dataFormat)(gridColumns, item);
|
|
143
153
|
});
|
|
144
|
-
if (_onOperate !== null && _onOperate !== void 0 && _onOperate.post) return _onOperate.post(
|
|
154
|
+
if (_onOperate !== null && _onOperate !== void 0 && _onOperate.post) return _onOperate.post({
|
|
155
|
+
values: data,
|
|
156
|
+
submitData: _submitData,
|
|
157
|
+
behaviorKey: behaviorKey
|
|
158
|
+
}); // 以预设为主
|
|
145
159
|
return (0, _defineProperty2.default)({}, dataSetKey, (0, _defineProperty2.default)({}, "".concat(behaviorKey, "List"), _submitData));
|
|
146
160
|
}
|
|
147
161
|
});
|
|
@@ -151,7 +165,10 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
151
165
|
orderByAdd: "asc",
|
|
152
166
|
rowSelection: true,
|
|
153
167
|
type: type,
|
|
154
|
-
rowKey: window.appConfig.constraintKeys.PRIMARY || 'indocno'
|
|
168
|
+
rowKey: window.appConfig.constraintKeys.PRIMARY || 'indocno',
|
|
169
|
+
wrapperProps: {
|
|
170
|
+
id: ldId
|
|
171
|
+
}
|
|
155
172
|
}, props, {
|
|
156
173
|
onQuery: (0, _objectSpread4.default)((0, _objectSpread4.default)({
|
|
157
174
|
api: _utils.behaviorCall,
|
|
@@ -168,7 +185,9 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
168
185
|
}, onQuery), {}, {
|
|
169
186
|
format: function format(data) {
|
|
170
187
|
var formItemData = data.map(function (item) {
|
|
171
|
-
return (0, _utils.formItemDataFormat)(gridColumns
|
|
188
|
+
return (0, _utils.formItemDataFormat)(gridColumns.map(function (c) {
|
|
189
|
+
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, c), (0, _lodash.keyBy)(fields, 'field')[c.field]);
|
|
190
|
+
}), item);
|
|
172
191
|
});
|
|
173
192
|
if (onQuery !== null && onQuery !== void 0 && onQuery.format) return onQuery.format(data, formItemData); // 以预设为主
|
|
174
193
|
return formItemData;
|
|
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var
|
|
12
|
+
var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -23,8 +24,21 @@ var _base = require("@luck-design-biz/base");
|
|
|
23
24
|
var _ldBuilder = _interopRequireDefault(require("../../helper/ldBuilder"));
|
|
24
25
|
var _utils2 = require("../../utils");
|
|
25
26
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
26
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat"],
|
|
27
|
-
_excluded2 = ["
|
|
27
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender", "onlyRoot"],
|
|
28
|
+
_excluded2 = ["0"],
|
|
29
|
+
_excluded3 = ["onClick"];
|
|
30
|
+
var _window$appConfig$con = window.appConfig.constraintKeys,
|
|
31
|
+
PRIMARY = _window$appConfig$con.PRIMARY,
|
|
32
|
+
PARENT = _window$appConfig$con.PARENT;
|
|
33
|
+
var deepForEach = function deepForEach(children, deepForEachFn) {
|
|
34
|
+
(0, _lodash.forEach)(children, function (child) {
|
|
35
|
+
var _child$children;
|
|
36
|
+
if (((_child$children = child.children) === null || _child$children === void 0 ? void 0 : _child$children.length) > 0) {
|
|
37
|
+
deepForEach(child.children, deepForEachFn);
|
|
38
|
+
}
|
|
39
|
+
deepForEachFn(child);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
28
42
|
var LdTree = function LdTree(_ref) {
|
|
29
43
|
var columns = _ref.columns,
|
|
30
44
|
resources = _ref.resources,
|
|
@@ -53,9 +67,25 @@ var LdTree = function LdTree(_ref) {
|
|
|
53
67
|
isTree = _ref.isTree,
|
|
54
68
|
service = _ref.service,
|
|
55
69
|
dataToTreeFormat = _ref.dataToTreeFormat,
|
|
70
|
+
boxRef = _ref.boxRef,
|
|
71
|
+
doubleClickExpand = _ref.doubleClickExpand,
|
|
72
|
+
onNodeDoubleClick = _ref.onNodeDoubleClick,
|
|
73
|
+
width = _ref.width,
|
|
74
|
+
height = _ref.height,
|
|
75
|
+
treeNodeCheckable = _ref.treeNodeCheckable,
|
|
76
|
+
treeNodeDisableCheckbox = _ref.treeNodeDisableCheckbox,
|
|
77
|
+
treeNodeDisable = _ref.treeNodeDisable,
|
|
78
|
+
treeNodeIcon = _ref.treeNodeIcon,
|
|
79
|
+
asyncLoad = _ref.asyncLoad,
|
|
80
|
+
parentKey = _ref.parentKey,
|
|
81
|
+
onMount = _ref.onMount,
|
|
82
|
+
onUnmount = _ref.onUnmount,
|
|
83
|
+
onDataSetChange = _ref.onDataSetChange,
|
|
84
|
+
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
85
|
+
onlyRoot = _ref.onlyRoot,
|
|
56
86
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
87
|
if (!(0, _lodash.includes)(isTree, dataSetKey)) return (0, _utils.formatMessage)({
|
|
58
|
-
id: 'luckda.ldTree.
|
|
88
|
+
id: 'luckda.ldTree.notTrees',
|
|
59
89
|
label: '此数据集非树形数据集,请选择树形数据集'
|
|
60
90
|
});
|
|
61
91
|
var _useState = (0, _react.useState)(null),
|
|
@@ -67,11 +97,16 @@ var LdTree = function LdTree(_ref) {
|
|
|
67
97
|
defaultExpandedProps = _useState4[0],
|
|
68
98
|
setDefaultExpandedProps = _useState4[1];
|
|
69
99
|
var treeRef = (0, _react.useRef)(null);
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
100
|
+
var onceRef = (0, _react.useRef)(true);
|
|
101
|
+
var defaultParams = (0, _ahooks.useCreation)(function () {
|
|
102
|
+
var _params = [(0, _objectSpread4.default)({
|
|
103
|
+
moduleCode: moduleCode,
|
|
104
|
+
datasetCode: dataSetKey,
|
|
105
|
+
behaviorKey: 'readTree'
|
|
106
|
+
}, _defaultParmas)];
|
|
107
|
+
if (asyncLoad) _params[0][parentKey] = 0;
|
|
108
|
+
return _params;
|
|
109
|
+
}, []);
|
|
75
110
|
var _useRequest = (0, _ahooks.useRequest)(service || _utils2.behaviorCall, {
|
|
76
111
|
// 获取树数据源
|
|
77
112
|
defaultParams: defaultParams,
|
|
@@ -100,24 +135,73 @@ var LdTree = function LdTree(_ref) {
|
|
|
100
135
|
}
|
|
101
136
|
var treeData = dataToTreeFormat ? dataToTreeFormat(data) : (0, _utils.dataToTree)(data, null, window.appConfig.constraintKeys.PRIMARY, window.appConfig.constraintKeys.PARENT);
|
|
102
137
|
setDataSource(treeData);
|
|
103
|
-
afterInit && afterInit(treeData);
|
|
138
|
+
onceRef.current && afterInit && afterInit(treeData, data);
|
|
139
|
+
onceRef.current = false;
|
|
104
140
|
}
|
|
105
141
|
}
|
|
106
142
|
}),
|
|
107
143
|
loading = _useRequest.loading,
|
|
108
144
|
run = _useRequest.run,
|
|
109
145
|
params = _useRequest.params;
|
|
146
|
+
var onLdQuery = (0, _ahooks.useMemoizedFn)(function () {
|
|
147
|
+
var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
148
|
+
run((0, _objectSpread4.default)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, params[0]), _params), defaultParams[0]));
|
|
149
|
+
});
|
|
150
|
+
var handleUpdateTree = function handleUpdateTree(type, nodes) {
|
|
151
|
+
var data = (0, _lodash.cloneDeep)(dataSource);
|
|
152
|
+
var nodesGroup = (0, _lodash.groupBy)(nodes.map(function (i) {
|
|
153
|
+
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, i), {}, (0, _defineProperty2.default)({}, PARENT, i[PARENT] || 0));
|
|
154
|
+
}), PARENT);
|
|
155
|
+
var rootList = nodesGroup[0],
|
|
156
|
+
restGroup = (0, _objectWithoutProperties2.default)(nodesGroup, _excluded2);
|
|
157
|
+
switch (type) {
|
|
158
|
+
case 'delete':
|
|
159
|
+
if (rootList) data = (0, _lodash.differenceBy)(data, rootList, window.appConfig.constraintKeys.PRIMARY);else deepForEach(data, function (child) {
|
|
160
|
+
if (restGroup[child[PRIMARY]]) {
|
|
161
|
+
var _child$children2;
|
|
162
|
+
if (((_child$children2 = child.children) === null || _child$children2 === void 0 ? void 0 : _child$children2.length) <= restGroup[child[PRIMARY]].length) child.isleaf = true;
|
|
163
|
+
child.children = (0, _lodash.differenceBy)(child.children, restGroup[child[PRIMARY]], window.appConfig.constraintKeys.PRIMARY);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
break;
|
|
167
|
+
case 'add':
|
|
168
|
+
if (rootList) data = data.concat(rootList);else deepForEach(data, function (child) {
|
|
169
|
+
if (restGroup[child[PRIMARY]]) {
|
|
170
|
+
child.isleaf = false;
|
|
171
|
+
child.children = [].concat((0, _toConsumableArray2.default)(child.children || []), (0, _toConsumableArray2.default)(restGroup[child[PRIMARY]]));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
break;
|
|
175
|
+
default:
|
|
176
|
+
deepForEach(data, function (child) {
|
|
177
|
+
var findNode = nodes.find(function (n) {
|
|
178
|
+
return n[PRIMARY] === child[PRIMARY];
|
|
179
|
+
});
|
|
180
|
+
if (findNode) {
|
|
181
|
+
(0, _lodash.assign)(child, findNode);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
setDataSource(data);
|
|
186
|
+
};
|
|
110
187
|
(0, _react.useImperativeHandle)(wrapperRef, function () {
|
|
111
|
-
return (0,
|
|
112
|
-
onLdQuery:
|
|
113
|
-
|
|
114
|
-
run((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, params[0]), _params), defaultParams[0]));
|
|
115
|
-
}
|
|
188
|
+
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, treeRef.current), {}, {
|
|
189
|
+
onLdQuery: onLdQuery,
|
|
190
|
+
updateTree: handleUpdateTree
|
|
116
191
|
});
|
|
117
192
|
});
|
|
193
|
+
(0, _react.useLayoutEffect)(function () {
|
|
194
|
+
onMount && onMount((0, _objectSpread4.default)((0, _objectSpread4.default)({}, params[0]), defaultParams[0]));
|
|
195
|
+
return function () {
|
|
196
|
+
onUnmount && onUnmount();
|
|
197
|
+
};
|
|
198
|
+
}, []);
|
|
199
|
+
(0, _react.useLayoutEffect)(function () {
|
|
200
|
+
onDataSetChange && onDataSetChange(onLdQuery);
|
|
201
|
+
}, [dataSetKey]);
|
|
118
202
|
var handleMenuClick = function handleMenuClick(menu, data) {
|
|
119
203
|
var onClick = menu.onClick,
|
|
120
|
-
other = (0, _objectWithoutProperties2.default)(menu,
|
|
204
|
+
other = (0, _objectWithoutProperties2.default)(menu, _excluded3);
|
|
121
205
|
onClick && onClick(other, data);
|
|
122
206
|
};
|
|
123
207
|
var renderRightMenus = function renderRightMenus(menus, data) {
|
|
@@ -127,7 +211,8 @@ var LdTree = function LdTree(_ref) {
|
|
|
127
211
|
return handleMenuClick(menu, data);
|
|
128
212
|
},
|
|
129
213
|
className: _index.default.rightMenu,
|
|
130
|
-
key: menu.key
|
|
214
|
+
key: menu.key,
|
|
215
|
+
style: menu.style
|
|
131
216
|
}, menu.name || '');
|
|
132
217
|
});
|
|
133
218
|
};
|
|
@@ -147,11 +232,23 @@ var LdTree = function LdTree(_ref) {
|
|
|
147
232
|
type: "more"
|
|
148
233
|
}));
|
|
149
234
|
};
|
|
235
|
+
var handleNodeDoubleClick = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
236
|
+
var switcher = e.currentTarget.closest('li').querySelector('.ant-tree-switcher');
|
|
237
|
+
switcher.click();
|
|
238
|
+
});
|
|
239
|
+
var handleDoubleClick = (0, _ahooks.useMemoizedFn)(function (e, rowData) {
|
|
240
|
+
if (doubleClickExpand) handleNodeDoubleClick(e);
|
|
241
|
+
if (onNodeDoubleClick) onNodeDoubleClick(e, rowData);
|
|
242
|
+
});
|
|
150
243
|
var renderTitleNode = function renderTitleNode(data, unSelectable) {
|
|
151
244
|
var nodeTitle = (0, _lodash.isFunction)(treeNodeTitle) ? treeNodeTitle(data) : data[treeNodeTitle];
|
|
245
|
+
if (onTreeNodeRender) nodeTitle = onTreeNodeRender(nodeTitle, data);
|
|
152
246
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
153
247
|
className: _index.default.nodeTitle,
|
|
154
|
-
key: data[rowKey]
|
|
248
|
+
key: data[rowKey],
|
|
249
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
250
|
+
return handleDoubleClick(e, data);
|
|
251
|
+
}
|
|
155
252
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
156
253
|
title: nodeTitle,
|
|
157
254
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _index.default.nodeTitleDisabled, unSelectable))
|
|
@@ -161,45 +258,93 @@ var LdTree = function LdTree(_ref) {
|
|
|
161
258
|
return data.map(function (item) {
|
|
162
259
|
// 判断是否可选择
|
|
163
260
|
var unSelectable = (0, _lodash.isFunction)(unselectableNodes) ? unselectableNodes(item) : unselectableNodes.includes(item[rowKey]);
|
|
164
|
-
|
|
165
|
-
return /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree.TreeNode, {
|
|
166
|
-
isLeaf: false,
|
|
167
|
-
title: renderTitleNode(item, unSelectable),
|
|
168
|
-
key: item[rowKey],
|
|
169
|
-
dataRef: item,
|
|
170
|
-
selectable: !unSelectable
|
|
171
|
-
}, renderTreeNodes(item.children));
|
|
172
|
-
}
|
|
173
|
-
return /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree.TreeNode, {
|
|
261
|
+
var props = {
|
|
174
262
|
title: renderTitleNode(item, unSelectable),
|
|
175
263
|
key: item[rowKey],
|
|
176
264
|
dataRef: item,
|
|
177
|
-
selectable: !unSelectable
|
|
178
|
-
|
|
265
|
+
selectable: !unSelectable,
|
|
266
|
+
checkable: treeNodeCheckable && treeNodeCheckable(item),
|
|
267
|
+
disableCheckbox: treeNodeDisableCheckbox && treeNodeDisableCheckbox(item),
|
|
268
|
+
disabled: treeNodeDisable && treeNodeDisable(item)
|
|
269
|
+
};
|
|
270
|
+
if (treeNodeIcon && !(0, _lodash.isNil)(treeNodeIcon(item))) props.icon = treeNodeIcon(item);
|
|
271
|
+
if (!item.isleaf && !(0, _lodash.isNil)(item.isleaf)) {
|
|
272
|
+
return /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree.TreeNode, (0, _extends2.default)({
|
|
273
|
+
isLeaf: false
|
|
274
|
+
}, props), renderTreeNodes(item.children || []));
|
|
275
|
+
}
|
|
276
|
+
return /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree.TreeNode, (0, _extends2.default)({
|
|
277
|
+
isLeaf: true
|
|
278
|
+
}, props));
|
|
179
279
|
});
|
|
180
280
|
});
|
|
181
281
|
var handleDrop = (0, _ahooks.useMemoizedFn)(function (info) {
|
|
182
282
|
var dragInfo = (0, _utils.dragTreeData)(info, dataSource);
|
|
183
|
-
onDrop
|
|
283
|
+
if (onDrop) onDrop(info, dragInfo);else if (dragInfo !== false) {
|
|
284
|
+
doAction('drag', {
|
|
285
|
+
get: {
|
|
286
|
+
datasetCode: dataSetKey
|
|
287
|
+
},
|
|
288
|
+
post: {
|
|
289
|
+
fromId: info.dragNode.props.dataRef[PRIMARY],
|
|
290
|
+
toId: info.node.props.dataRef[PRIMARY]
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
showConfirm: false,
|
|
294
|
+
callback: function callback(success) {
|
|
295
|
+
return success && onLdQuery();
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
184
299
|
});
|
|
185
300
|
var onAdd = (0, _ahooks.useCreation)(function () {
|
|
186
|
-
return !(readOnly || !rootAdd || rootAdd.resource && !(0, _lodash.includes)(resources, rootAdd.resource)) ? function () {
|
|
301
|
+
return !(readOnly || !rootAdd || rootAdd.resource && !(0, _lodash.includes)(resources, rootAdd.resource) || onlyRoot && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0) ? function () {
|
|
187
302
|
return handleMenuClick(rootAdd);
|
|
188
303
|
} : null;
|
|
189
304
|
}, [readOnly, rootAdd, resources]);
|
|
305
|
+
var onLoadData = (0, _ahooks.useMemoizedFn)(function (treeNode) {
|
|
306
|
+
return new Promise(function (resolve) {
|
|
307
|
+
if (treeNode.props.isLeaf) {
|
|
308
|
+
resolve();
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
(service || _utils2.behaviorCall)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, params[0]), {}, (0, _defineProperty2.default)({}, parentKey, treeNode.props.dataRef[window.appConfig.constraintKeys.PRIMARY]))).then(function (res) {
|
|
312
|
+
var code = res.code,
|
|
313
|
+
list = res.list,
|
|
314
|
+
detail = res.detail;
|
|
315
|
+
if (code === 1) {
|
|
316
|
+
treeNode.props.dataRef.children = list.map(function (i) {
|
|
317
|
+
return detail[i];
|
|
318
|
+
});
|
|
319
|
+
setDataSource((0, _toConsumableArray2.default)(dataSource));
|
|
320
|
+
resolve();
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
var asyncLoadData = (0, _ahooks.useCreation)(function () {
|
|
326
|
+
return asyncLoad ? {
|
|
327
|
+
loadData: onLoadData
|
|
328
|
+
} : {};
|
|
329
|
+
}, []);
|
|
190
330
|
return /*#__PURE__*/_react.default.createElement(_base.TreeBox, {
|
|
191
331
|
suppressTitle: !title,
|
|
192
332
|
title: title,
|
|
193
333
|
loading: loading,
|
|
194
334
|
id: ldId,
|
|
195
335
|
onAdd: onAdd,
|
|
196
|
-
className: className
|
|
336
|
+
className: className,
|
|
337
|
+
ref: boxRef,
|
|
338
|
+
style: {
|
|
339
|
+
width: width,
|
|
340
|
+
height: height
|
|
341
|
+
}
|
|
197
342
|
}, dataSource && /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree, (0, _extends2.default)({
|
|
198
343
|
blockNode: true,
|
|
199
344
|
className: (0, _classnames.default)(_index.default.tree, (0, _defineProperty2.default)({}, className, !!treeClassName)),
|
|
200
345
|
draggable: !readOnly && draggable,
|
|
201
346
|
onDrop: handleDrop
|
|
202
|
-
}, defaultExpandedProps, props, {
|
|
347
|
+
}, asyncLoadData, defaultExpandedProps, props, {
|
|
203
348
|
ref: treeRef
|
|
204
349
|
}), renderTreeNodes(dataSource)));
|
|
205
350
|
};
|
|
@@ -231,7 +376,9 @@ Index.propTypes = {
|
|
|
231
376
|
// 行为
|
|
232
377
|
suppressInit: _propTypes.default.bool,
|
|
233
378
|
// 抑制初始化
|
|
234
|
-
afterInit: _propTypes.default.func
|
|
379
|
+
afterInit: _propTypes.default.func,
|
|
380
|
+
// 初始化后
|
|
381
|
+
parentKey: _propTypes.default.string
|
|
235
382
|
};
|
|
236
383
|
Index.defaultProps = {
|
|
237
384
|
readOnly: false,
|
|
@@ -246,7 +393,8 @@ Index.defaultProps = {
|
|
|
246
393
|
return [];
|
|
247
394
|
},
|
|
248
395
|
suppressInit: false,
|
|
249
|
-
defaultParmas: {}
|
|
396
|
+
defaultParmas: {},
|
|
397
|
+
parentKey: 'iparentid'
|
|
250
398
|
};
|
|
251
399
|
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
252
400
|
return /*#__PURE__*/_react.default.createElement(Index, (0, _extends2.default)({
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
width: 100%;
|
|
6
|
+
user-select: none;
|
|
6
7
|
|
|
7
8
|
div {
|
|
8
9
|
flex: 1;
|
|
@@ -10,9 +11,11 @@
|
|
|
10
11
|
white-space: nowrap;
|
|
11
12
|
text-overflow: ellipsis;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
div.nodeTitleDisabled {
|
|
14
16
|
color: var(--luck-text-color-disabled);
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
div.nodeTitleDisabled:hover {
|
|
17
20
|
cursor: not-allowed;
|
|
18
21
|
}
|
|
@@ -24,13 +27,15 @@
|
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
}
|
|
30
|
+
|
|
27
31
|
.classTreeOperates {
|
|
28
32
|
:global(.ant-popover-inner-content) {
|
|
29
33
|
padding: 0;
|
|
30
34
|
}
|
|
35
|
+
|
|
31
36
|
.rightMenu {
|
|
32
37
|
display: block;
|
|
33
38
|
padding: 4px 8px;
|
|
34
39
|
color: var(--luck-text-color-);
|
|
35
40
|
}
|
|
36
|
-
}
|
|
41
|
+
}
|