@luck-design-biz/luckda 0.0.24-3 → 0.0.25-10
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 +27 -30
- package/es/components/ComplexItem/index.js +92 -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 +37 -24
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +55 -37
- package/es/components/LdGrid/index.js +51 -28
- package/es/components/LdGridForm/index.js +36 -22
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +133 -34
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/FromItems.js +177 -94
- package/es/helper/form.js +55 -20
- package/es/helper/ldBuilder.js +29 -16
- package/es/helper/ldComBuild.js +29 -14
- package/es/helper/props_config.js +17 -0
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +236 -0
- package/es/lowcode/constants/api-url.js +660 -1
- package/es/lowcode/constants/event-topics.js +20 -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/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 +46 -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/es/lowcode/engine/meta/{components/button.json → 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/es/lowcode/engine/meta/{components/drawer.json → drawer.props.json} +130 -142
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +63 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +39 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +12 -0
- package/es/lowcode/engine/meta/fielddate.props.json +47 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +14 -0
- package/es/lowcode/engine/meta/fielddict.props.json +44 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +44 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +73 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +48 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +20 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +26 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +58 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +62 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +31 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +49 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +71 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielduser.props.json +82 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +20 -0
- package/es/lowcode/engine/meta/form.props.default.json +60 -4
- package/es/lowcode/engine/meta/form.props.json +655 -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 +21 -3
- package/{lib/lowcode/engine/meta/components/imex.json → es/lowcode/engine/meta/imex.props.json} +113 -80
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +205 -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 +49 -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 +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.default.json +17 -8
- package/es/lowcode/engine/meta/section.props.json +111 -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 +49 -9
- package/es/lowcode/engine/meta/table.props.json +444 -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 +14 -3
- package/{lib/lowcode/engine/meta/components/text.json → es/lowcode/engine/meta/text.props.json} +65 -64
- package/es/lowcode/engine/meta/tree.props.default.json +31 -8
- package/es/lowcode/engine/meta/tree.props.json +366 -0
- package/es/lowcode/engine/provider/ContextProvider/index.js +155 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +213 -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 +169 -1
- package/es/lowcode/engine/tools/useCanvasRender.js +74 -0
- package/es/lowcode/engine/tools/usePageDataStore.js +331 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/engine/tools/useTodo.js +88 -0
- package/es/lowcode/index.js +4 -1
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +70 -80
- package/es/lowcode/painter/DesignOperator.js +314 -0
- package/es/lowcode/painter/DesignToolbar.js +406 -0
- package/es/lowcode/painter/I18n.js +202 -2
- package/es/lowcode/painter/Outline.js +85 -69
- package/es/lowcode/painter/Panel.js +235 -2
- package/es/lowcode/painter/Ribbon.js +61 -55
- package/es/lowcode/painter/components/ActionBindModal.js +304 -0
- package/es/lowcode/painter/components/AdvancePanel.js +156 -0
- package/es/lowcode/painter/components/AttrsPanel.js +156 -0
- package/es/lowcode/painter/components/Collapse.js +101 -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/RuleInput.js +9 -7
- package/es/lowcode/painter/components/SortBox.js +99 -0
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +109 -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 +113 -0
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -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 +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +136 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +570 -0
- package/es/lowcode/painter/components/field-setting/index.js +342 -0
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/index.js +8 -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 +231 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +27 -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/DataSetSelector.js +156 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +377 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -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 +176 -0
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +108 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +61 -54
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +95 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +46 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +163 -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 +96 -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 +128 -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 +223 -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/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +85 -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 +120 -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/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 +29 -0
- package/es/lowcode/view/Canvas.js +32 -129
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +17 -34
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +21 -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 +32 -6
- 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 +106 -19
- 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/es/lowcode/{engine/meta/components/table.json → view/lc-components/CardList/meta.json} +24 -32
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +39 -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 +135 -28
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- 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 +39 -9
- package/es/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/{lib/lowcode/engine/meta/components/drawer.json → es/lowcode/view/lc-components/Drawer/meta.json} +11 -23
- package/es/lowcode/view/lc-components/FieldColor/meta.json +63 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +45 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +44 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +62 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +82 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +20 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +90 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +17 -0
- package/es/lowcode/view/lc-components/Form/index.js +453 -12
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +605 -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 +470 -10
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +114 -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/index.js +19 -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 +41 -7
- 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} +8 -8
- 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 +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +52 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +35 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +39 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +63 -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 +32 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -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 +115 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +107 -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 +42 -7
- 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 +420 -0
- package/es/lowcode/view/lc-components/Table/index.js +798 -15
- package/es/lowcode/view/lc-components/Table/meta.json +405 -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 +115 -10
- 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 +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -0
- 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 +397 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +363 -0
- package/es/lowcode/view/lc-components/Wrapper.js +45 -21
- 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 +9 -5
- package/es/upload/Form/index.js +2 -1
- package/es/upload/FormItem/index.js +3 -5
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +19 -40
- package/es/utils/grid.js +16 -14
- package/lib/components/Builder/index.js +24 -26
- package/lib/components/ComplexItem/index.js +100 -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 +35 -22
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +53 -36
- package/lib/components/LdGrid/index.js +50 -27
- package/lib/components/LdGridForm/index.js +34 -20
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +133 -34
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/form.js +53 -19
- package/lib/helper/ldBuilder.js +29 -16
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +242 -0
- package/lib/lowcode/constants/api-url.js +664 -2
- package/lib/lowcode/constants/event-topics.js +21 -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/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 +52 -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/lib/lowcode/engine/meta/{components/button.json → 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 +14 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +63 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +39 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +47 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +44 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +44 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +73 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +48 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +20 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +26 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +58 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +62 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +31 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +49 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +71 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +82 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +20 -0
- package/lib/lowcode/engine/meta/form.props.default.json +60 -4
- package/lib/lowcode/engine/meta/form.props.json +655 -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 +21 -3
- package/{es/lowcode/engine/meta/components/imex.json → lib/lowcode/engine/meta/imex.props.json} +113 -80
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +205 -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 +49 -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 +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.default.json +17 -8
- package/lib/lowcode/engine/meta/section.props.json +111 -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 +49 -9
- package/lib/lowcode/engine/meta/table.props.json +444 -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 +14 -3
- package/{es/lowcode/engine/meta/components/text.json → lib/lowcode/engine/meta/text.props.json} +65 -64
- package/lib/lowcode/engine/meta/tree.props.default.json +31 -8
- package/lib/lowcode/engine/meta/tree.props.json +366 -0
- package/lib/lowcode/engine/provider/ContextProvider/index.js +179 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +221 -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 +178 -1
- package/lib/lowcode/engine/tools/useCanvasRender.js +89 -0
- package/lib/lowcode/engine/tools/usePageDataStore.js +338 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/engine/tools/useTodo.js +95 -0
- package/lib/lowcode/index.js +12 -1
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +68 -78
- package/lib/lowcode/painter/DesignOperator.js +321 -0
- package/lib/lowcode/painter/DesignToolbar.js +414 -0
- package/lib/lowcode/painter/I18n.js +203 -2
- package/lib/lowcode/painter/Outline.js +81 -65
- package/lib/lowcode/painter/Panel.js +235 -2
- package/lib/lowcode/painter/Ribbon.js +63 -64
- package/lib/lowcode/painter/components/ActionBindModal.js +311 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +164 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +164 -0
- package/lib/lowcode/painter/components/Collapse.js +108 -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/RuleInput.js +9 -7
- package/lib/lowcode/painter/components/SortBox.js +106 -0
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +116 -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 +124 -0
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -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 +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +144 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +578 -0
- package/lib/lowcode/painter/components/field-setting/index.js +349 -0
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/index.js +8 -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 +239 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +34 -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/DataSetSelector.js +164 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +385 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
- package/lib/lowcode/painter/panel-section/Icon.js +56 -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 +184 -0
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +114 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +60 -53
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +103 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +53 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +171 -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 +103 -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 +140 -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 +231 -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/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +95 -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 +120 -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/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 +37 -0
- package/lib/lowcode/view/Canvas.js +31 -136
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +13 -30
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +28 -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 +33 -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 +105 -18
- 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/lib/lowcode/{engine/meta/components/table.json → view/lc-components/CardList/meta.json} +24 -32
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +46 -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 +133 -26
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- 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 +39 -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 +63 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +45 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +44 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +62 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +82 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +20 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +97 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +24 -0
- package/lib/lowcode/view/lc-components/Form/index.js +451 -10
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +605 -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 +468 -8
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +114 -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/index.js +19 -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 +42 -8
- 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 +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +60 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +43 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +47 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +71 -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 +40 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -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 +114 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +107 -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 +41 -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 +428 -0
- package/lib/lowcode/view/lc-components/Table/index.js +797 -14
- package/lib/lowcode/view/lc-components/Table/meta.json +405 -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 +114 -9
- 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 +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -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 +395 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +363 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +44 -19
- 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 +9 -5
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/FormItem/index.js +3 -5
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +19 -41
- package/lib/utils/grid.js +18 -16
- package/package.json +25 -9
- package/es/lowcode/engine/meta/components/form.json +0 -116
- 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/lowcode/engine/meta/components/form.json +0 -116
- 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
|
@@ -6,23 +6,464 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
var _ahooks = require("ahooks");
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _luckDesign = require("luck-design");
|
|
19
|
+
var _base = require("@luck-design-biz/base");
|
|
20
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
12
21
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
var _index = require("../../../../index");
|
|
23
|
+
var _helper = require("../../../engine/tools/helper");
|
|
24
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
25
|
+
var _Form = _interopRequireDefault(require("../../../../upload/Form"));
|
|
26
|
+
var _LdRuntimeCom = _interopRequireDefault(require("../../../../components/LdRuntimeCom"));
|
|
27
|
+
var _formPropsDefault = _interopRequireDefault(require("../../../engine/meta/form.props.default.json"));
|
|
28
|
+
var _index2 = _interopRequireDefault(require("./index.less"));
|
|
29
|
+
var _excluded = ["advance"];
|
|
30
|
+
var _I18N_PREFIX_ = 'lc.form.validator';
|
|
31
|
+
var Header = function Header(_ref) {
|
|
32
|
+
var _ref$header = _ref.header,
|
|
33
|
+
header = _ref$header === void 0 ? 'collapse' : _ref$header,
|
|
34
|
+
title = _ref.title,
|
|
35
|
+
ldId = _ref.ldId,
|
|
36
|
+
children = _ref.children;
|
|
37
|
+
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/_react.default.createElement(_base.Collapse, {
|
|
38
|
+
title: title || ldId,
|
|
39
|
+
id: ldId,
|
|
40
|
+
key: ldId,
|
|
41
|
+
mode: header === 'collapse' && 'tab'
|
|
42
|
+
}, children);
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
44
|
+
key: ldId
|
|
45
|
+
}, header === 'divider' && /*#__PURE__*/_react.default.createElement(_luckDesign.BasicDivider, {
|
|
46
|
+
title: title || ldId,
|
|
47
|
+
id: ldId
|
|
48
|
+
}), children);
|
|
49
|
+
};
|
|
50
|
+
var getMthodParams = function getMthodParams(methodStr) {
|
|
51
|
+
var paramRegex = /\((.*?)\)/;
|
|
52
|
+
var match = methodStr.match(paramRegex);
|
|
53
|
+
if (match && match.length > 1) {
|
|
54
|
+
var paramStr = match[1];
|
|
55
|
+
var params = (0, _lodash.reduce)(paramStr.split(','), function (result, param) {
|
|
56
|
+
var _param$trim;
|
|
57
|
+
if (((_param$trim = param.trim()) === null || _param$trim === void 0 ? void 0 : _param$trim.length) > 0) result.push(param.trim());
|
|
58
|
+
return result;
|
|
59
|
+
}, []);
|
|
60
|
+
return params;
|
|
61
|
+
}
|
|
62
|
+
return [];
|
|
63
|
+
};
|
|
64
|
+
var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
65
|
+
var _ctx$pagePublicResour2;
|
|
66
|
+
var id = _ref2.id,
|
|
67
|
+
parentId = _ref2.parentId,
|
|
68
|
+
width = _ref2.width,
|
|
69
|
+
height = _ref2.height,
|
|
70
|
+
className = _ref2.className,
|
|
71
|
+
blocks = _ref2.blocks,
|
|
72
|
+
advance = _ref2.advance,
|
|
73
|
+
initData = _ref2.initData,
|
|
74
|
+
readOnly = _ref2.readOnly,
|
|
75
|
+
showSave = _ref2.showSave,
|
|
76
|
+
saveTitle = _ref2.saveTitle,
|
|
77
|
+
settingLayout = _ref2.settingLayout,
|
|
78
|
+
renderFormLeft = _ref2.renderFormLeft,
|
|
79
|
+
renderFormRight = _ref2.renderFormRight,
|
|
80
|
+
children = _ref2.children;
|
|
81
|
+
var apiRef = (0, _react.useRef)();
|
|
82
|
+
var boxRef = (0, _react.useRef)();
|
|
83
|
+
var formRef = (0, _react.useRef)();
|
|
84
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
85
|
+
var remoteSource = (0, _ContextProvider.useRemoteSource)();
|
|
86
|
+
var _initData = (0, _ahooks.useCreation)(function () {
|
|
87
|
+
return (0, _utils.getPageQuery)();
|
|
88
|
+
}, []); // 获取主界面传递过来的详情页参数
|
|
89
|
+
|
|
90
|
+
var serials = (0, _ahooks.useCreation)(function () {
|
|
91
|
+
var _remoteSource$serials;
|
|
92
|
+
return ((_remoteSource$serials = remoteSource.serials) === null || _remoteSource$serials === void 0 ? void 0 : _remoteSource$serials.map(function (i) {
|
|
93
|
+
return i.serial;
|
|
94
|
+
})) || [];
|
|
95
|
+
}, [remoteSource.serials]);
|
|
96
|
+
(0, _ahooks.useMount)(function () {
|
|
97
|
+
ctx.doAction(advance.events.onMount, {
|
|
98
|
+
instance: (ref || formRef).current
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref3) {
|
|
103
|
+
var resource = _ref3.resource,
|
|
104
|
+
prevResource = _ref3.prevResource;
|
|
105
|
+
ctx.doAction(advance.events.onPagePublicResourceChanged, {
|
|
106
|
+
resource: resource,
|
|
107
|
+
prevResource: prevResource,
|
|
108
|
+
instance: (ref || formRef).current
|
|
109
|
+
});
|
|
110
|
+
}).watch();
|
|
111
|
+
return function () {
|
|
112
|
+
ctx.$unsubscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED, tid);
|
|
113
|
+
ctx.doAction(advance.events.onUnmount, {
|
|
114
|
+
instance: (ref || formRef).current
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
}, []);
|
|
118
|
+
(0, _react.useImperativeHandle)(apiRef, function () {
|
|
119
|
+
return {
|
|
120
|
+
/**
|
|
121
|
+
* 获取表格实例
|
|
122
|
+
* @method
|
|
123
|
+
*/
|
|
124
|
+
getInstance: function getInstance() {
|
|
125
|
+
return (ref || formRef).current;
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* 提交表格数据
|
|
129
|
+
* @method
|
|
130
|
+
*/
|
|
131
|
+
submit: function submit() {
|
|
132
|
+
var _ctx$pagePublicResour;
|
|
133
|
+
var instance = (ref || formRef).current;
|
|
134
|
+
var _ref4 = ((_ctx$pagePublicResour = ctx.pagePublicResource) === null || _ctx$pagePublicResour === void 0 ? void 0 : _ctx$pagePublicResour[id]) || initData || _initData || {},
|
|
135
|
+
formMode = _ref4.formMode;
|
|
136
|
+
if (formMode === 'add') {
|
|
137
|
+
instance.onAdd();
|
|
138
|
+
} else if (formMode === 'update') {
|
|
139
|
+
instance.onBatchUpdate();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
});
|
|
18
144
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
19
|
-
return
|
|
145
|
+
return boxRef.current;
|
|
146
|
+
});
|
|
147
|
+
var handleDefaultDataSourceFormat = (0, _ahooks.useMemoizedFn)(function (defaultDataSourceFormat, defaultValues) {
|
|
148
|
+
if ((0, _lodash.isNil)(defaultDataSourceFormat)) return function () {
|
|
149
|
+
return defaultValues;
|
|
150
|
+
};
|
|
151
|
+
return (0, _helper.executeCode)(ctx, defaultDataSourceFormat, ['defaultValues'], defaultValues);
|
|
152
|
+
});
|
|
153
|
+
var handleDataSourceFormat = (0, _ahooks.useMemoizedFn)(function (dataSourceFormat, dataSetKey, _ref5) {
|
|
154
|
+
var values = _ref5.values,
|
|
155
|
+
submitData = _ref5.submitData;
|
|
156
|
+
if ((0, _lodash.isNil)(dataSourceFormat)) return (0, _defineProperty2.default)({}, dataSetKey, submitData);
|
|
157
|
+
return (0, _helper.executeCode)(ctx, dataSourceFormat, ['dataSetKey', 'values', 'submitData'], dataSetKey, values, submitData);
|
|
158
|
+
});
|
|
159
|
+
var handleResetActionsColumn = (0, _ahooks.useMemoizedFn)(function (actionsColumnReset, data, index, actions, params) {
|
|
160
|
+
return (0, _helper.executeCode)(ctx, actionsColumnReset, ['data', 'index', 'actions', 'params'], data, index, actions, params);
|
|
161
|
+
});
|
|
162
|
+
var handleColumnsReset = (0, _ahooks.useMemoizedFn)(function (actionsColumnReset, columns) {
|
|
163
|
+
if ((0, _lodash.isNil)(actionsColumnReset)) return columns;
|
|
164
|
+
return (0, _helper.executeCode)(ctx, actionsColumnReset, ['columns'], columns);
|
|
165
|
+
});
|
|
166
|
+
var handleGridFormReady = (0, _ahooks.useMemoizedFn)(function (onGridFormReady, ref, params, gridForm) {
|
|
167
|
+
if (!(0, _lodash.isNil)(onGridFormReady)) return (0, _helper.executeCode)(ctx, onGridFormReady, ['ref', 'params', 'gridForm'], ref, params, gridForm);
|
|
168
|
+
});
|
|
169
|
+
var handleResetActions = (0, _ahooks.useMemoizedFn)(function (resetActions, data, index, actionList, params) {
|
|
170
|
+
if ((0, _lodash.isNil)(resetActions)) return actionList;
|
|
171
|
+
return (0, _helper.executeCode)(ctx, resetActions, ['data', 'index', 'actionList', 'params'], data, index, actionList, params);
|
|
172
|
+
});
|
|
173
|
+
var handleForbiddenTypes = (0, _ahooks.useMemoizedFn)(function (forbiddenTypes) {
|
|
174
|
+
if ((0, _lodash.isNil)(forbiddenTypes)) return [];
|
|
175
|
+
return (0, _helper.executeCode)(ctx, forbiddenTypes, []);
|
|
176
|
+
});
|
|
177
|
+
var handleBeforeUpload = (0, _ahooks.useMemoizedFn)(function (beforeUpload, file, fileList) {
|
|
178
|
+
if ((0, _lodash.isNil)(beforeUpload)) return true;
|
|
179
|
+
return (0, _helper.executeCode)(ctx, beforeUpload, ['file', 'fileList'], file, fileList);
|
|
180
|
+
});
|
|
181
|
+
var handleUploadChange = (0, _ahooks.useMemoizedFn)(function (onUploadChange, e) {
|
|
182
|
+
if (!(0, _lodash.isNil)(onUploadChange)) return (0, _helper.executeCode)(ctx, onUploadChange, ['event'], e);
|
|
183
|
+
});
|
|
184
|
+
var renderAffix = (0, _ahooks.useMemoizedFn)(function (_render) {
|
|
185
|
+
return _render ? /*#__PURE__*/_react.default.createElement(_LdRuntimeCom.default, null, _render) : null;
|
|
186
|
+
});
|
|
187
|
+
var setVerifyRules = function setVerifyRules(_props, verifyListObj) {
|
|
188
|
+
var _verifyListObj$length, _verifyListObj$min, _verifyListObj$max, _verifyListObj$rules;
|
|
189
|
+
var props = (0, _lodash.cloneDeep)(_props);
|
|
190
|
+
props.config.rules = props.config.rules || [];
|
|
191
|
+
if ((_verifyListObj$length = verifyListObj.length) !== null && _verifyListObj$length !== void 0 && _verifyListObj$length.expression) props.config.rules.push({
|
|
192
|
+
validator: function validator(rule, value, callback) {
|
|
193
|
+
var _current;
|
|
194
|
+
var length = (0, _helper.executeCode)(ctx, verifyListObj.length.expression, ['cValue'], (_current = (ref || formRef).current) === null || _current === void 0 ? void 0 : _current.getCValue());
|
|
195
|
+
if (value.length > length) callback("".concat((0, _utils.formatMessage)({
|
|
196
|
+
id: "".concat(_I18N_PREFIX_, ".maxLength"),
|
|
197
|
+
label: '字数不得超过'
|
|
198
|
+
})).concat(length).concat((0, _utils.formatMessage)({
|
|
199
|
+
id: "".concat(_I18N_PREFIX_, ".textNum"),
|
|
200
|
+
label: '个字符'
|
|
201
|
+
})));
|
|
202
|
+
callback();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
if ((_verifyListObj$min = verifyListObj.min) !== null && _verifyListObj$min !== void 0 && _verifyListObj$min.expression) props.config.rules.push({
|
|
206
|
+
validator: function validator(rule, value, callback) {
|
|
207
|
+
var _current2;
|
|
208
|
+
var min = (0, _helper.executeCode)(ctx, verifyListObj.min.expression, ['cValue'], (_current2 = (ref || formRef).current) === null || _current2 === void 0 ? void 0 : _current2.getCValue());
|
|
209
|
+
if (value < min) callback((0, _utils.formatMessage)({
|
|
210
|
+
id: "".concat(_I18N_PREFIX_, ".numberBelowMin"),
|
|
211
|
+
label: '低于最小值'
|
|
212
|
+
}));
|
|
213
|
+
callback();
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
if ((_verifyListObj$max = verifyListObj.max) !== null && _verifyListObj$max !== void 0 && _verifyListObj$max.expression) props.config.rules.push({
|
|
217
|
+
validator: function validator(rule, value, callback) {
|
|
218
|
+
var _current3;
|
|
219
|
+
var max = (0, _helper.executeCode)(ctx, verifyListObj.max.expression, ['cValue'], (_current3 = (ref || formRef).current) === null || _current3 === void 0 ? void 0 : _current3.getCValue());
|
|
220
|
+
if (value > max) callback((0, _utils.formatMessage)({
|
|
221
|
+
id: "".concat(_I18N_PREFIX_, ".numberExceedMax"),
|
|
222
|
+
label: '超过最大值'
|
|
223
|
+
}));
|
|
224
|
+
callback();
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
if (verifyListObj.email) props.config.type = 'email';
|
|
228
|
+
if (verifyListObj.idcard) props.config.type = 'idcard';
|
|
229
|
+
if (verifyListObj.mobile) props.config.type = 'mobile';
|
|
230
|
+
if ((_verifyListObj$rules = verifyListObj.rules) !== null && _verifyListObj$rules !== void 0 && _verifyListObj$rules.expression) props.config.rules.push({
|
|
231
|
+
validator: function validator(rule, value, callback) {
|
|
232
|
+
var _current4;
|
|
233
|
+
(0, _helper.executeCode)(ctx, verifyListObj.rules.expression, ['cValue', 'rule', 'value', 'callback'], (_current4 = (ref || formRef).current) === null || _current4 === void 0 ? void 0 : _current4.getCValue(), rule, value, callback);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
return props;
|
|
237
|
+
};
|
|
238
|
+
var transEventsInfields = function transEventsInfields(fields) {
|
|
239
|
+
return fields.map(function (setting) {
|
|
240
|
+
var advance = setting.advance,
|
|
241
|
+
rest = (0, _objectWithoutProperties2.default)(setting, _excluded);
|
|
242
|
+
var props = (0, _lodash.reduce)(rest, function (result, value, key) {
|
|
243
|
+
//处理方法
|
|
244
|
+
result[key] = (0, _lodash.isString)(value) && (0, _lodash.startsWith)(value, 'function') ? function () {
|
|
245
|
+
for (var _len = arguments.length, _props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
246
|
+
_props[_key] = arguments[_key];
|
|
247
|
+
}
|
|
248
|
+
return _helper.executeCode.apply(void 0, [ctx, value, getMthodParams(value)].concat(_props));
|
|
249
|
+
} : value;
|
|
250
|
+
return result;
|
|
251
|
+
}, {});
|
|
252
|
+
if (advance !== null && advance !== void 0 && advance.events) return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
253
|
+
events: (0, _lodash.reduce)(advance.events, function (result, value, key) {
|
|
254
|
+
//处理事件
|
|
255
|
+
result[key] = function () {
|
|
256
|
+
for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
257
|
+
props[_key2] = arguments[_key2];
|
|
258
|
+
}
|
|
259
|
+
ctx.doAction(value, (0, _lodash.reduce)(getMthodParams(value[0][1].code), function (result, value, index) {
|
|
260
|
+
result[value] = props[index];
|
|
261
|
+
return result;
|
|
262
|
+
}, {}));
|
|
263
|
+
};
|
|
264
|
+
return result;
|
|
265
|
+
}, {})
|
|
266
|
+
});
|
|
267
|
+
return props;
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
var renderFormList = (0, _ahooks.useMemoizedFn)(function (formConfig) {
|
|
271
|
+
return (0, _lodash.reduce)(blocks, function (result, item) {
|
|
272
|
+
if ((0, _lodash.includes)(['auto', 'grid', 'writer'], item.type) && (0, _lodash.includes)(item.mode, formConfig.formMode)) {
|
|
273
|
+
var _item$dataset;
|
|
274
|
+
var data = {
|
|
275
|
+
id: item.id,
|
|
276
|
+
order: item.order,
|
|
277
|
+
type: item.type,
|
|
278
|
+
readOnly: item.readOnly,
|
|
279
|
+
title: item.name,
|
|
280
|
+
header: item.header,
|
|
281
|
+
dataSetKey: (_item$dataset = item.dataset) === null || _item$dataset === void 0 ? void 0 : _item$dataset.code,
|
|
282
|
+
serial: item.serial,
|
|
283
|
+
serialEffect: item.serialEffect,
|
|
284
|
+
fields: transEventsInfields(item.fields),
|
|
285
|
+
defaultDataSourceFormat: function defaultDataSourceFormat(defaultValues) {
|
|
286
|
+
return handleDefaultDataSourceFormat(item.defaultDataSourceFormat, defaultValues);
|
|
287
|
+
},
|
|
288
|
+
onUpdate: {
|
|
289
|
+
post: function post(data) {
|
|
290
|
+
var _item$dataset2;
|
|
291
|
+
return handleDataSourceFormat(item.dataSourceFormat, (_item$dataset2 = item.dataset) === null || _item$dataset2 === void 0 ? void 0 : _item$dataset2.code, data);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
if (item.type === 'auto') data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
296
|
+
col: item.cols
|
|
297
|
+
});else data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
298
|
+
suppressPreset: item.suppressPreset,
|
|
299
|
+
height: item.height,
|
|
300
|
+
bordered: item.bordered,
|
|
301
|
+
draggable: item.draggable,
|
|
302
|
+
orderByAdd: item.orderByAdd,
|
|
303
|
+
hideActionsColumn: item.suppressActions,
|
|
304
|
+
actionsWidth: item.actionsColumnWidth,
|
|
305
|
+
columnsReset: function columnsReset(columns) {
|
|
306
|
+
return handleColumnsReset(item.columnsReset, columns);
|
|
307
|
+
},
|
|
308
|
+
onGridFormReady: function onGridFormReady(ref, params, gridForm) {
|
|
309
|
+
return handleGridFormReady(item.onGridFormReady, ref, params, gridForm);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
if (item.actionsColumnReset) data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
313
|
+
resetActionsColumn: function resetActionsColumn(data, index, actions, params) {
|
|
314
|
+
return handleResetActionsColumn(item.actionsColumnReset, data, index, actions, params);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
result.push(data);
|
|
318
|
+
}
|
|
319
|
+
return result;
|
|
320
|
+
}, []);
|
|
321
|
+
});
|
|
322
|
+
var renderFormExtra = (0, _ahooks.useMemoizedFn)(function (formConfig) {
|
|
323
|
+
return (0, _lodash.reduce)(blocks, function (result, item) {
|
|
324
|
+
if ((0, _lodash.includes)(item.mode, formConfig.formMode) && !item.serial || item.serialEffect === 'disable' || (0, _lodash.includes)(serials, item.serial)) {
|
|
325
|
+
if (item.type === 'uploadForm') {
|
|
326
|
+
var dom = /*#__PURE__*/_react.default.createElement(Header, {
|
|
327
|
+
ldId: item.id,
|
|
328
|
+
key: item.id,
|
|
329
|
+
header: item.header,
|
|
330
|
+
title: item.name,
|
|
331
|
+
order: item.order
|
|
332
|
+
}, (0, _Form.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, formConfig), {}, {
|
|
333
|
+
formId: item.id,
|
|
334
|
+
moduleCode: (0, _helper.getLDMetaAttr)('moduleCode'),
|
|
335
|
+
readOnly: item.readOnly || formConfig.readOnly || item.serial && !(0, _lodash.includes)(serials, item.serial),
|
|
336
|
+
suppressPreset: item.suppressPreset,
|
|
337
|
+
height: item.height,
|
|
338
|
+
bordered: item.bordered,
|
|
339
|
+
showNote: item.showNote,
|
|
340
|
+
zipName: "".concat(item.zipName || 'download', ".zip"),
|
|
341
|
+
uploadUrl: item.uploadUrl,
|
|
342
|
+
resetActions: item.useResetActions ? null : function () {
|
|
343
|
+
for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
344
|
+
params[_key3] = arguments[_key3];
|
|
345
|
+
}
|
|
346
|
+
return handleResetActions.apply(void 0, [item.resetActions].concat(params));
|
|
347
|
+
},
|
|
348
|
+
forbiddenTypes: function forbiddenTypes() {
|
|
349
|
+
return handleForbiddenTypes(item.forbiddenTypes);
|
|
350
|
+
},
|
|
351
|
+
beforeUpload: function beforeUpload() {
|
|
352
|
+
for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
353
|
+
params[_key4] = arguments[_key4];
|
|
354
|
+
}
|
|
355
|
+
return handleBeforeUpload.apply(void 0, [item.beforeUpload].concat(params));
|
|
356
|
+
},
|
|
357
|
+
onUploadChange: function onUploadChange(e) {
|
|
358
|
+
return handleUploadChange(item.onUploadChange, e);
|
|
359
|
+
}
|
|
360
|
+
})));
|
|
361
|
+
result.push(dom);
|
|
362
|
+
}
|
|
363
|
+
if (item.type === 'blank') {
|
|
364
|
+
var _dom = /*#__PURE__*/_react.default.createElement(Header, {
|
|
365
|
+
ldId: item.id,
|
|
366
|
+
key: item.id,
|
|
367
|
+
header: item.header,
|
|
368
|
+
title: item.name,
|
|
369
|
+
order: item.order
|
|
370
|
+
}, children === null || children === void 0 ? void 0 : children.find(function (child) {
|
|
371
|
+
return child.props.formBoxId === item.id;
|
|
372
|
+
}));
|
|
373
|
+
result.push(_dom);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return result;
|
|
377
|
+
}, []);
|
|
378
|
+
});
|
|
379
|
+
var beforeSubmit = (0, _ahooks.useMemoizedFn)(function (values, data) {
|
|
380
|
+
return new Promise( /*#__PURE__*/function () {
|
|
381
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(resolve) {
|
|
382
|
+
var _data;
|
|
383
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
384
|
+
while (1) switch (_context.prev = _context.next) {
|
|
385
|
+
case 0:
|
|
386
|
+
if (!(0, _lodash.isNil)(advance.events.beforeSave)) {
|
|
387
|
+
_context.next = 4;
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
resolve(values);
|
|
391
|
+
_context.next = 8;
|
|
392
|
+
break;
|
|
393
|
+
case 4:
|
|
394
|
+
_context.next = 6;
|
|
395
|
+
return ctx.doAction(advance.events.beforeSave, {
|
|
396
|
+
values: values,
|
|
397
|
+
data: data
|
|
398
|
+
});
|
|
399
|
+
case 6:
|
|
400
|
+
_data = _context.sent;
|
|
401
|
+
resolve((0, _lodash.last)(_data));
|
|
402
|
+
case 8:
|
|
403
|
+
case "end":
|
|
404
|
+
return _context.stop();
|
|
405
|
+
}
|
|
406
|
+
}, _callee);
|
|
407
|
+
}));
|
|
408
|
+
return function (_x) {
|
|
409
|
+
return _ref7.apply(this, arguments);
|
|
410
|
+
};
|
|
411
|
+
}());
|
|
412
|
+
});
|
|
413
|
+
var afterSubmit = (0, _ahooks.useMemoizedFn)(function (success, mainKey, res) {
|
|
414
|
+
ctx.doAction(advance.events.onSaveCallback, {
|
|
415
|
+
success: success,
|
|
416
|
+
mainKey: mainKey,
|
|
417
|
+
res: res
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
var onValueChange = (0, _ahooks.useMemoizedFn)(function (change, data) {
|
|
421
|
+
ctx.doAction(advance.events.onValueChange, {
|
|
422
|
+
change: change,
|
|
423
|
+
data: data
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
var onChildChange = (0, _ahooks.useMemoizedFn)(function (instance) {
|
|
427
|
+
ctx.doAction(advance.events.onChildChange, {
|
|
428
|
+
instance: instance
|
|
429
|
+
});
|
|
20
430
|
});
|
|
21
431
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
22
432
|
id: id,
|
|
23
|
-
|
|
433
|
+
displayName: "Form",
|
|
434
|
+
getTargetDom: getTargetDom,
|
|
435
|
+
api: apiRef
|
|
24
436
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
ref:
|
|
26
|
-
|
|
27
|
-
|
|
437
|
+
ref: boxRef,
|
|
438
|
+
style: {
|
|
439
|
+
width: width,
|
|
440
|
+
height: height
|
|
441
|
+
}
|
|
442
|
+
}, /*#__PURE__*/_react.default.createElement(_index.LdFormList, {
|
|
443
|
+
id: id,
|
|
444
|
+
ldId: id,
|
|
445
|
+
className: (0, _classnames.default)(_index2.default['lc-component-form'], (0, _defineProperty2.default)({}, className, !!className)),
|
|
446
|
+
renderFormList: renderFormList,
|
|
447
|
+
renderFormExtra: renderFormExtra,
|
|
448
|
+
mainFormLdId: "block_main",
|
|
449
|
+
initData: ((_ctx$pagePublicResour2 = ctx.pagePublicResource) === null || _ctx$pagePublicResour2 === void 0 ? void 0 : _ctx$pagePublicResour2[id]) || initData || _initData,
|
|
450
|
+
ref: ref || formRef,
|
|
451
|
+
readOnly: readOnly,
|
|
452
|
+
showSaveBtn: showSave,
|
|
453
|
+
saveBtnTitle: saveTitle,
|
|
454
|
+
affixLayout: settingLayout,
|
|
455
|
+
renderAffixLeft: function renderAffixLeft() {
|
|
456
|
+
return renderAffix(renderFormLeft);
|
|
457
|
+
},
|
|
458
|
+
renderAffixRight: function renderAffixRight() {
|
|
459
|
+
return renderAffix(renderFormRight);
|
|
460
|
+
},
|
|
461
|
+
beforeSubmit: beforeSubmit,
|
|
462
|
+
afterSubmit: advance.events.onSaveCallback ? afterSubmit : null,
|
|
463
|
+
onValueChange: onValueChange,
|
|
464
|
+
onChildChange: onChildChange,
|
|
465
|
+
setVerifyRules: setVerifyRules
|
|
466
|
+
})));
|
|
467
|
+
});
|
|
468
|
+
LCForm.defaultProps = (0, _helper.omitBadProps)(_formPropsDefault.default);
|
|
28
469
|
var _default = exports.default = LCForm;
|