@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
|
@@ -7,13 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _ahooks = require("ahooks");
|
|
14
16
|
var _antd = require("luck-design/antd");
|
|
17
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
18
|
var _ruleInput = _interopRequireDefault(require("../style/rule-input.less"));
|
|
16
|
-
var _excluded = ["onValueChange", "rules", "value"];
|
|
19
|
+
var _excluded = ["onValueChange", "rules", "value", "defaultValue"];
|
|
17
20
|
/**
|
|
18
21
|
* 带校验功能的输入组件。
|
|
19
22
|
*
|
|
@@ -49,8 +52,9 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
49
52
|
var onValueChange = _ref.onValueChange,
|
|
50
53
|
rules = _ref.rules,
|
|
51
54
|
value = _ref.value,
|
|
55
|
+
defaultValue = _ref.defaultValue,
|
|
52
56
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
53
|
-
var _useState = (0, _react.useState)(value),
|
|
57
|
+
var _useState = (0, _react.useState)(value || defaultValue),
|
|
54
58
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
55
59
|
inputValue = _useState2[0],
|
|
56
60
|
setInputValue = _useState2[1]; // 托管输入值的状态
|
|
@@ -60,7 +64,7 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
60
64
|
setErr = _useState4[1];
|
|
61
65
|
|
|
62
66
|
// 使用useEffect钩子监听value的变化
|
|
63
|
-
(0,
|
|
67
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
64
68
|
setInputValue(value);
|
|
65
69
|
setErr(null);
|
|
66
70
|
}, [value]);
|
|
@@ -68,7 +72,6 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
68
72
|
var value = e.target.value;
|
|
69
73
|
setInputValue(value); // 更新托管的输入值
|
|
70
74
|
|
|
71
|
-
if (value == '') onValueChange(e, value);
|
|
72
75
|
var error = null;
|
|
73
76
|
|
|
74
77
|
// 遍历rules,检查输入值是否满足条件
|
|
@@ -92,16 +95,14 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
92
95
|
onValueChange(e, value);
|
|
93
96
|
} else {
|
|
94
97
|
setErr(error);
|
|
95
|
-
console.
|
|
98
|
+
console.error(error);
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
|
-
var className = _ruleInput.default['lc-painter-components-ruleinput'];
|
|
99
|
-
if (err) className += ' ' + _ruleInput.default['err'];
|
|
100
101
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
101
102
|
title: err,
|
|
102
103
|
visible: err
|
|
103
104
|
}, /*#__PURE__*/_react.default.createElement(_antd.Input, (0, _extends2.default)({
|
|
104
|
-
className:
|
|
105
|
+
className: (0, _classnames.default)(_ruleInput.default['lc-painter-components-ruleinput'], (0, _defineProperty2.default)({}, _ruleInput.default.err, !!err)),
|
|
105
106
|
size: "small",
|
|
106
107
|
value: inputValue // 绑定输入值
|
|
107
108
|
,
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SortItem = exports.SortBox = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _core = require("@dnd-kit/core");
|
|
14
|
+
var _sortable = require("@dnd-kit/sortable");
|
|
15
|
+
var _utilities = require("@dnd-kit/utilities");
|
|
16
|
+
var _excluded = ["datas", "children", "onChange", "strategy", "onDragEnd"];
|
|
17
|
+
/**
|
|
18
|
+
* SortBox 是一个使用 dnd-kit 实现拖拽排序的组件。
|
|
19
|
+
* 它允许子元素通过拖拽操作来重新排序,并在排序操作完成后通过 onChange 回调传递新的排序结果。
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} props 组件的 props。
|
|
22
|
+
* @param {Array} props.datas 初始排序的数据数组,通常包含用于排序的唯一标识符。
|
|
23
|
+
* @param {ReactNode} props.children 组件的子元素,通常是需要进行排序的元素集合。
|
|
24
|
+
* @param {Function} props.onChange 当排序操作完成时触发的回调函数,参数为重新排序后的数据数组。
|
|
25
|
+
* @param {Function} [props.strategy=verticalListSortingStrategy] 用于排序的策略。默认为垂直列表排序策略。
|
|
26
|
+
*
|
|
27
|
+
* @returns {ReactNode} 返回一个配置了 DndContext 和 SortableContext 的 React 组件结构。
|
|
28
|
+
*/
|
|
29
|
+
var SortBox = exports.SortBox = function SortBox(_ref) {
|
|
30
|
+
var datas = _ref.datas,
|
|
31
|
+
children = _ref.children,
|
|
32
|
+
onChange = _ref.onChange,
|
|
33
|
+
strategy = _ref.strategy,
|
|
34
|
+
onDragEnd = _ref.onDragEnd,
|
|
35
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
|
+
var _useState = (0, _react.useState)(datas),
|
|
37
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
38
|
+
items = _useState2[0],
|
|
39
|
+
setItems = _useState2[1];
|
|
40
|
+
var sortStrategy = strategy !== null && strategy !== void 0 ? strategy : _sortable.verticalListSortingStrategy;
|
|
41
|
+
(0, _react.useEffect)(function () {
|
|
42
|
+
setItems(datas);
|
|
43
|
+
}, [datas]);
|
|
44
|
+
function handleDragEnd(event) {
|
|
45
|
+
onDragEnd && onDragEnd(event);
|
|
46
|
+
var active = event.active,
|
|
47
|
+
over = event.over;
|
|
48
|
+
if (!active || !over) return;
|
|
49
|
+
if (active.id !== over.id) {
|
|
50
|
+
setItems(function (items) {
|
|
51
|
+
var oldIndex = items.indexOf(active.id);
|
|
52
|
+
var newIndex = items.indexOf(over.id);
|
|
53
|
+
var newSortItem = (0, _sortable.arrayMove)(items, oldIndex, newIndex);
|
|
54
|
+
if (onChange) onChange(newSortItem, oldIndex, newIndex);
|
|
55
|
+
return newSortItem;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_core.DndContext, (0, _extends2.default)({}, rest, {
|
|
60
|
+
onDragEnd: handleDragEnd
|
|
61
|
+
}), /*#__PURE__*/_react.default.createElement(_sortable.SortableContext, {
|
|
62
|
+
strategy: sortStrategy,
|
|
63
|
+
items: items
|
|
64
|
+
}, children));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* SortItem 组件是一个使用 dnd-kit 实现的可排序项。它通过 useSortable 钩子来提供拖拽功能,
|
|
69
|
+
* 并将必要的属性和监听器传递给其子元素,使得子元素可拖拽。
|
|
70
|
+
*
|
|
71
|
+
* @param {Object} props - 组件的 props。
|
|
72
|
+
* @param {string} props.id - 该排序项的唯一标识符,用于识别不同的可排序元素。
|
|
73
|
+
* @param {ReactNode} props.children - 该组件的子元素。通常是你希望使之可拖拽的元素。
|
|
74
|
+
* SortItem 会将拖拽相关的 props 注入到这个子元素中。
|
|
75
|
+
*
|
|
76
|
+
* @returns {ReactNode} 返回一个增强后的 React 元素,此元素集成了拖拽功能。
|
|
77
|
+
* 它基于原 children 元素,附加了用于拖拽的属性和样式。
|
|
78
|
+
*/
|
|
79
|
+
var SortItem = exports.SortItem = function SortItem(_ref2) {
|
|
80
|
+
var id = _ref2.id,
|
|
81
|
+
children = _ref2.children;
|
|
82
|
+
var _useSortable = (0, _sortable.useSortable)({
|
|
83
|
+
id: id
|
|
84
|
+
}),
|
|
85
|
+
attributes = _useSortable.attributes,
|
|
86
|
+
listeners = _useSortable.listeners,
|
|
87
|
+
setNodeRef = _useSortable.setNodeRef,
|
|
88
|
+
transform = _useSortable.transform,
|
|
89
|
+
transition = _useSortable.transition,
|
|
90
|
+
setActivatorNodeRef = _useSortable.setActivatorNodeRef;
|
|
91
|
+
var style = {
|
|
92
|
+
transform: _utilities.CSS.Transform.toString(transform),
|
|
93
|
+
transition: transition
|
|
94
|
+
};
|
|
95
|
+
var childWithProps = /*#__PURE__*/_react.default.cloneElement(children, {
|
|
96
|
+
key: id,
|
|
97
|
+
attributes: attributes,
|
|
98
|
+
listeners: listeners,
|
|
99
|
+
setNodeRef: setNodeRef,
|
|
100
|
+
transform: transform,
|
|
101
|
+
transition: transition,
|
|
102
|
+
setActivatorNodeRef: setActivatorNodeRef,
|
|
103
|
+
style: style
|
|
104
|
+
});
|
|
105
|
+
return childWithProps;
|
|
106
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _antd = require("luck-design/antd");
|
|
12
|
+
var _excluded = ["title", "type"];
|
|
13
|
+
var TipIcon = function TipIcon(_ref) {
|
|
14
|
+
var title = _ref.title,
|
|
15
|
+
type = _ref.type,
|
|
16
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
18
|
+
title: title
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, (0, _extends2.default)({
|
|
20
|
+
type: type
|
|
21
|
+
}, rest)));
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = TipIcon;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _TreeDragDropWrapper = _interopRequireDefault(require("./DragDrop/TreeDragDropWrapper"));
|
|
10
|
+
function _default(_ref) {
|
|
11
|
+
var item = _ref.item;
|
|
12
|
+
var EditorNode = function EditorNode() {
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
14
|
+
className: "item"
|
|
15
|
+
}, item.name);
|
|
16
|
+
};
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_TreeDragDropWrapper.default, {
|
|
18
|
+
item: item
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(EditorNode, null));
|
|
20
|
+
}
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _ahooks = require("ahooks");
|
|
12
|
+
var _antd = require("luck-design/antd");
|
|
13
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
16
|
+
var _VisionEditor = _interopRequireDefault(require("./code-editor/VisionEditor"));
|
|
17
|
+
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
18
|
+
var _TipIcon = _interopRequireDefault(require("./TipIcon"));
|
|
19
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.pageVars';
|
|
20
|
+
var StyledForm = (0, _styledComponents.default)(_antd.Form).withConfig({
|
|
21
|
+
displayName: "StyledForm",
|
|
22
|
+
componentId: "luckda-6530__sc-iq6k7e-0"
|
|
23
|
+
})(["font-size:12px;.ant-form-item{font-size:12px;margin-bottom:0;}label{font-size:12px;}"]);
|
|
24
|
+
var StyledSegmented = (0, _styledComponents.default)(_antd.Segmented).withConfig({
|
|
25
|
+
displayName: "StyledSegmented",
|
|
26
|
+
componentId: "luckda-6530__sc-iq6k7e-1"
|
|
27
|
+
})(["width:100%;"]);
|
|
28
|
+
var EditorWrapper = _styledComponents.default.div.withConfig({
|
|
29
|
+
displayName: "EditorWrapper",
|
|
30
|
+
componentId: "luckda-6530__sc-iq6k7e-2"
|
|
31
|
+
})(["width:100%;height:80px;border:1px solid #d9d9d9;border-radius:4px;margin:8px 0;"]);
|
|
32
|
+
var LabelLine = _styledComponents.default.div.withConfig({
|
|
33
|
+
displayName: "LabelLine",
|
|
34
|
+
componentId: "luckda-6530__sc-iq6k7e-3"
|
|
35
|
+
})(["height:28px;background:rgba(31,56,88,0.04);border-top:1px solid rgba(31,56,88,0.1);border-bottom:1px solid rgba(31,56,88,0.1);margin:8px 0;line-height:26px;padding:0 12px;", ""], function (props) {
|
|
36
|
+
return props.$flex ? {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
'align-items': 'center',
|
|
39
|
+
'justify-content': 'space-between'
|
|
40
|
+
} : null;
|
|
41
|
+
});
|
|
42
|
+
var _EDITOR_OPTIONS = {
|
|
43
|
+
minimap: {
|
|
44
|
+
enabled: false
|
|
45
|
+
},
|
|
46
|
+
lineNumbers: 'off'
|
|
47
|
+
};
|
|
48
|
+
var _TASK_TYPE_OPTIONS = [{
|
|
49
|
+
label: (0, _utils.formatMessage)({
|
|
50
|
+
id: "".concat(_I18N_PREFIX_, ".taskType.serial"),
|
|
51
|
+
label: '串行'
|
|
52
|
+
}),
|
|
53
|
+
value: 'serial'
|
|
54
|
+
}, {
|
|
55
|
+
label: (0, _utils.formatMessage)({
|
|
56
|
+
id: "".concat(_I18N_PREFIX_, ".taskType.parallel"),
|
|
57
|
+
label: '并行'
|
|
58
|
+
}),
|
|
59
|
+
value: 'parallel'
|
|
60
|
+
}];
|
|
61
|
+
var _METHOD_OPTIONS = [{
|
|
62
|
+
label: (0, _utils.formatMessage)({
|
|
63
|
+
id: "".concat(_I18N_PREFIX_, ".method.jsonp"),
|
|
64
|
+
label: 'JSONP'
|
|
65
|
+
}),
|
|
66
|
+
value: 'jsonp'
|
|
67
|
+
}, {
|
|
68
|
+
label: (0, _utils.formatMessage)({
|
|
69
|
+
id: "".concat(_I18N_PREFIX_, ".method.get"),
|
|
70
|
+
label: 'GET'
|
|
71
|
+
}),
|
|
72
|
+
value: 'get'
|
|
73
|
+
}, {
|
|
74
|
+
label: (0, _utils.formatMessage)({
|
|
75
|
+
id: "".concat(_I18N_PREFIX_, ".taskType.post"),
|
|
76
|
+
label: 'POST'
|
|
77
|
+
}),
|
|
78
|
+
value: 'post'
|
|
79
|
+
}, {
|
|
80
|
+
label: (0, _utils.formatMessage)({
|
|
81
|
+
id: "".concat(_I18N_PREFIX_, ".taskType.put"),
|
|
82
|
+
label: 'PUT'
|
|
83
|
+
}),
|
|
84
|
+
value: 'put'
|
|
85
|
+
}, {
|
|
86
|
+
label: (0, _utils.formatMessage)({
|
|
87
|
+
id: "".concat(_I18N_PREFIX_, ".taskType.delete"),
|
|
88
|
+
label: 'DELETE'
|
|
89
|
+
}),
|
|
90
|
+
value: 'delete'
|
|
91
|
+
}];
|
|
92
|
+
var _DEFAULT_PROCESS_ = {
|
|
93
|
+
willFetch: {
|
|
94
|
+
code: 'function willFetch(vars, config){\n\t\n}',
|
|
95
|
+
title: (0, _utils.formatMessage)({
|
|
96
|
+
id: "".concat(_I18N_PREFIX_, ".willFetch"),
|
|
97
|
+
label: "\u8BF7\u6C42\u53D1\u9001\u524D\u5904\u7406\u51FD\u6570(willFetch)"
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
didFetch: {
|
|
101
|
+
code: 'function didFetch(content){\n\t\n}',
|
|
102
|
+
title: (0, _utils.formatMessage)({
|
|
103
|
+
id: "".concat(_I18N_PREFIX_, ".didFetch"),
|
|
104
|
+
label: "\u8BF7\u6C42\u53D1\u9001\u524D\u5904\u7406\u51FD\u6570(didFetch)"
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
onError: {
|
|
108
|
+
code: 'function onError(error){\n\t\n}',
|
|
109
|
+
title: (0, _utils.formatMessage)({
|
|
110
|
+
id: "".concat(_I18N_PREFIX_, ".onError"),
|
|
111
|
+
label: "\u8BF7\u6C42\u53D1\u9001\u524D\u5904\u7406\u51FD\u6570(onError)"
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
var getBasicFormItem = function getBasicFormItem(form, item) {
|
|
116
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
117
|
+
label: (0, _utils.formatMessage)({
|
|
118
|
+
id: "".concat(_I18N_PREFIX_, ".name"),
|
|
119
|
+
label: '名称'
|
|
120
|
+
})
|
|
121
|
+
}, form.getFieldDecorator('name', {
|
|
122
|
+
initialValue: item.name,
|
|
123
|
+
rules: [{
|
|
124
|
+
required: true,
|
|
125
|
+
message: (0, _utils.formatMessage)({
|
|
126
|
+
id: "".concat(_I18N_PREFIX_, ".messag.name"),
|
|
127
|
+
label: '请输入变量名'
|
|
128
|
+
})
|
|
129
|
+
}]
|
|
130
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
131
|
+
size: "small"
|
|
132
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
133
|
+
label: (0, _utils.formatMessage)({
|
|
134
|
+
id: "".concat(_I18N_PREFIX_, ".desc"),
|
|
135
|
+
label: '描述'
|
|
136
|
+
})
|
|
137
|
+
}, form.getFieldDecorator('desc', {
|
|
138
|
+
initialValue: item.desc
|
|
139
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
140
|
+
size: "small",
|
|
141
|
+
placeholder: (0, _utils.formatMessage)({
|
|
142
|
+
id: "".concat(_I18N_PREFIX_, ".placeholder"),
|
|
143
|
+
label: '请输入'
|
|
144
|
+
})
|
|
145
|
+
}))));
|
|
146
|
+
};
|
|
147
|
+
var VarForm = _antd.Form.create({
|
|
148
|
+
name: 'var_form',
|
|
149
|
+
onValuesChange: function onValuesChange(_ref, values) {
|
|
150
|
+
var dispatch = _ref.dispatch,
|
|
151
|
+
item = _ref.item;
|
|
152
|
+
dispatch({
|
|
153
|
+
type: 'edit',
|
|
154
|
+
payload: {
|
|
155
|
+
id: item.id,
|
|
156
|
+
data: values
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
})(function (_ref2) {
|
|
161
|
+
var form = _ref2.form,
|
|
162
|
+
item = _ref2.item,
|
|
163
|
+
dispatch = _ref2.dispatch;
|
|
164
|
+
var _useDebounceFn = (0, _ahooks.useDebounceFn)(function (code) {
|
|
165
|
+
dispatch({
|
|
166
|
+
type: 'edit',
|
|
167
|
+
payload: {
|
|
168
|
+
id: item.id,
|
|
169
|
+
data: {
|
|
170
|
+
data: code
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}, {
|
|
175
|
+
wait: 500
|
|
176
|
+
}),
|
|
177
|
+
handleEditorValueChange = _useDebounceFn.run;
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement(StyledForm, {
|
|
179
|
+
layout: "horizontal",
|
|
180
|
+
labelCol: {
|
|
181
|
+
span: 6
|
|
182
|
+
},
|
|
183
|
+
wrapperCol: {
|
|
184
|
+
span: 17
|
|
185
|
+
},
|
|
186
|
+
hideRequiredMark: true
|
|
187
|
+
}, getBasicFormItem(form, item), /*#__PURE__*/_react.default.createElement(LabelLine, null, (0, _utils.formatMessage)({
|
|
188
|
+
id: "".concat(_I18N_PREFIX_, ".data"),
|
|
189
|
+
label: '数据'
|
|
190
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
191
|
+
type: "question-circle",
|
|
192
|
+
style: {
|
|
193
|
+
marginLeft: 4
|
|
194
|
+
},
|
|
195
|
+
title: (0, _utils.formatMessage)({
|
|
196
|
+
id: "".concat(_I18N_PREFIX_, ".tip.data"),
|
|
197
|
+
label: "\u8F93\u5165\u6846\u5185\u652F\u6301\u8F93\u5165JS\u7684\u57FA\u672C\u7C7B\u578B\u53D8\u91CF\uFF0C\u5982\u5B57\u7B26\u4E32:\"string\"\uFF0C\u6570\u5B57:123\uFF0C\u5E03\u5C14\u503C:true/false\uFF0C\u6570\u7EC4:[1,2,3]\uFF0C\u5BF9\u8C61:{\"name\": \"test\"}\uFF0C\u7A7A\u503C:null"
|
|
198
|
+
})
|
|
199
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
200
|
+
style: {
|
|
201
|
+
width: '100%',
|
|
202
|
+
height: 300
|
|
203
|
+
}
|
|
204
|
+
}, /*#__PURE__*/_react.default.createElement(_VisionEditor.default, {
|
|
205
|
+
onChange: handleEditorValueChange
|
|
206
|
+
}, item.data)));
|
|
207
|
+
});
|
|
208
|
+
var ApiForm = _antd.Form.create({
|
|
209
|
+
name: 'api_form',
|
|
210
|
+
onValuesChange: function onValuesChange(_ref3, values, all) {
|
|
211
|
+
var dispatch = _ref3.dispatch,
|
|
212
|
+
item = _ref3.item;
|
|
213
|
+
var auto = (0, _lodash.get)(values, 'data.auto');
|
|
214
|
+
if (auto) {
|
|
215
|
+
(0, _lodash.set)(all, 'data.taskType', 'parallel');
|
|
216
|
+
} else if (auto === false) {
|
|
217
|
+
(0, _lodash.unset)(all, 'data.taskType');
|
|
218
|
+
}
|
|
219
|
+
dispatch({
|
|
220
|
+
type: 'edit',
|
|
221
|
+
payload: {
|
|
222
|
+
id: item.id,
|
|
223
|
+
data: all
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
})(function (_ref4) {
|
|
228
|
+
var _item$data, _item$data2, _item$data3, _item$data4, _item$data5, _item$data6, _item$data7, _item$data8, _item$data9, _item$data10, _item$data11;
|
|
229
|
+
var form = _ref4.form,
|
|
230
|
+
item = _ref4.item,
|
|
231
|
+
dispatch = _ref4.dispatch;
|
|
232
|
+
var _useSet = (0, _ahooks.useSet)((0, _lodash.intersection)(['willFetch', 'didFetch', 'onError'], (0, _lodash.keys)(item))),
|
|
233
|
+
_useSet2 = (0, _slicedToArray2.default)(_useSet, 2),
|
|
234
|
+
processSet = _useSet2[0],
|
|
235
|
+
_useSet2$ = _useSet2[1],
|
|
236
|
+
add = _useSet2$.add,
|
|
237
|
+
remove = _useSet2$.remove;
|
|
238
|
+
var _useDebounceFn2 = (0, _ahooks.useDebounceFn)(function (field, code) {
|
|
239
|
+
var obj = {};
|
|
240
|
+
(0, _lodash.set)(obj, field, code);
|
|
241
|
+
form.setFieldsValue(obj);
|
|
242
|
+
}, {
|
|
243
|
+
wait: 500
|
|
244
|
+
}),
|
|
245
|
+
handleEditorValueChange = _useDebounceFn2.run;
|
|
246
|
+
var handleAddProcessFun = (0, _ahooks.useMemoizedFn)(function (_ref5) {
|
|
247
|
+
var key = _ref5.key;
|
|
248
|
+
if (!processSet.has(key)) {
|
|
249
|
+
add(key);
|
|
250
|
+
dispatch({
|
|
251
|
+
type: 'edit',
|
|
252
|
+
payload: {
|
|
253
|
+
id: item.id,
|
|
254
|
+
data: (0, _defineProperty2.default)({}, key, _DEFAULT_PROCESS_[key].code)
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
var handleDelProcessFun = (0, _ahooks.useMemoizedFn)(function (_ref6) {
|
|
260
|
+
var key = _ref6.key;
|
|
261
|
+
remove(key);
|
|
262
|
+
dispatch({
|
|
263
|
+
type: 'edit',
|
|
264
|
+
payload: {
|
|
265
|
+
id: item.id,
|
|
266
|
+
data: (0, _defineProperty2.default)({}, key, void 0)
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
var renderProcess = (0, _ahooks.useMemoizedFn)(function (processKey) {
|
|
271
|
+
return processSet.has(processKey) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(LabelLine, {
|
|
272
|
+
$flex: true
|
|
273
|
+
}, _DEFAULT_PROCESS_[processKey].title, /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
274
|
+
type: "delete",
|
|
275
|
+
onClick: function onClick() {
|
|
276
|
+
return handleDelProcessFun(processKey);
|
|
277
|
+
}
|
|
278
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
279
|
+
wrapperCol: {
|
|
280
|
+
span: 24
|
|
281
|
+
}
|
|
282
|
+
}, form.getFieldDecorator(processKey, {
|
|
283
|
+
initialValue: item[processKey] || _DEFAULT_PROCESS_[processKey].code
|
|
284
|
+
})( /*#__PURE__*/_react.default.createElement(EditorWrapper, {
|
|
285
|
+
style: {
|
|
286
|
+
margin: '4px 18px',
|
|
287
|
+
width: 'calc(100% - 36px)'
|
|
288
|
+
}
|
|
289
|
+
}, /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
290
|
+
options: _EDITOR_OPTIONS,
|
|
291
|
+
onChange: function onChange(code) {
|
|
292
|
+
return handleEditorValueChange(processKey, code);
|
|
293
|
+
}
|
|
294
|
+
}, item[processKey] || _DEFAULT_PROCESS_[processKey].code))))) : null;
|
|
295
|
+
});
|
|
296
|
+
var menu = (0, _ahooks.useCreation)(function () {
|
|
297
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
298
|
+
onClick: handleAddProcessFun
|
|
299
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
300
|
+
key: "willFetch"
|
|
301
|
+
}, _DEFAULT_PROCESS_.willFetch.title), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
302
|
+
key: "didFetch"
|
|
303
|
+
}, _DEFAULT_PROCESS_.didFetch.title), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
304
|
+
key: "onError"
|
|
305
|
+
}, _DEFAULT_PROCESS_.onError.title));
|
|
306
|
+
}, []);
|
|
307
|
+
return /*#__PURE__*/_react.default.createElement(StyledForm, {
|
|
308
|
+
layout: "horizontal",
|
|
309
|
+
labelCol: {
|
|
310
|
+
span: 6
|
|
311
|
+
},
|
|
312
|
+
wrapperCol: {
|
|
313
|
+
span: 17
|
|
314
|
+
},
|
|
315
|
+
hideRequiredMark: true
|
|
316
|
+
}, getBasicFormItem(form, item), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
317
|
+
label: (0, _utils.formatMessage)({
|
|
318
|
+
id: "".concat(_I18N_PREFIX_, ".auto"),
|
|
319
|
+
label: '自动加载'
|
|
320
|
+
})
|
|
321
|
+
}, form.getFieldDecorator('data.auto', {
|
|
322
|
+
valuePropName: 'checked',
|
|
323
|
+
initialValue: Boolean((_item$data = item.data) === null || _item$data === void 0 ? void 0 : _item$data.auto)
|
|
324
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Switch, {
|
|
325
|
+
size: "small"
|
|
326
|
+
}))), form.getFieldValue('data.auto') ? /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
327
|
+
label: (0, _utils.formatMessage)({
|
|
328
|
+
id: "".concat(_I18N_PREFIX_, ".taskType"),
|
|
329
|
+
label: '加载方式'
|
|
330
|
+
})
|
|
331
|
+
}, form.getFieldDecorator('data.taskType', {
|
|
332
|
+
initialValue: ((_item$data2 = item.data) === null || _item$data2 === void 0 ? void 0 : _item$data2.taskType) || 'parallel'
|
|
333
|
+
})( /*#__PURE__*/_react.default.createElement(StyledSegmented, {
|
|
334
|
+
size: "small",
|
|
335
|
+
options: _TASK_TYPE_OPTIONS
|
|
336
|
+
}))) : null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
337
|
+
label: (0, _utils.formatMessage)({
|
|
338
|
+
id: "".concat(_I18N_PREFIX_, ".url"),
|
|
339
|
+
label: '请求地址'
|
|
340
|
+
})
|
|
341
|
+
}, form.getFieldDecorator('data.url', {
|
|
342
|
+
initialValue: ((_item$data3 = item.data) === null || _item$data3 === void 0 ? void 0 : _item$data3.url) || ''
|
|
343
|
+
})( /*#__PURE__*/_react.default.createElement(EditorWrapper, null, /*#__PURE__*/_react.default.createElement(_VisionEditor.default, {
|
|
344
|
+
options: _EDITOR_OPTIONS,
|
|
345
|
+
onChange: function onChange(code) {
|
|
346
|
+
return handleEditorValueChange('data.url', code);
|
|
347
|
+
}
|
|
348
|
+
}, ((_item$data4 = item.data) === null || _item$data4 === void 0 ? void 0 : _item$data4.url) || '')))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
349
|
+
label: (0, _utils.formatMessage)({
|
|
350
|
+
id: "".concat(_I18N_PREFIX_, ".method"),
|
|
351
|
+
label: '请求方式'
|
|
352
|
+
})
|
|
353
|
+
}, form.getFieldDecorator('data.method', {
|
|
354
|
+
initialValue: ((_item$data5 = item.data) === null || _item$data5 === void 0 ? void 0 : _item$data5.method) || 'get'
|
|
355
|
+
})( /*#__PURE__*/_react.default.createElement(StyledSegmented, {
|
|
356
|
+
size: "small",
|
|
357
|
+
options: _METHOD_OPTIONS
|
|
358
|
+
}))), /*#__PURE__*/_react.default.createElement(LabelLine, null, (0, _utils.formatMessage)({
|
|
359
|
+
id: "".concat(_I18N_PREFIX_, ".urlParams"),
|
|
360
|
+
label: '请求参数'
|
|
361
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
362
|
+
type: "question-circle",
|
|
363
|
+
style: {
|
|
364
|
+
marginLeft: 4
|
|
365
|
+
},
|
|
366
|
+
title: (0, _utils.formatMessage)({
|
|
367
|
+
id: "".concat(_I18N_PREFIX_, ".tip.urlParams"),
|
|
368
|
+
label: 'URL 请求参数,格式为 {key1:value1,key2:value2} ,等价于 ?key1=value1&key2=value2'
|
|
369
|
+
})
|
|
370
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
371
|
+
wrapperCol: {
|
|
372
|
+
span: 24
|
|
373
|
+
}
|
|
374
|
+
}, form.getFieldDecorator('data.params', {
|
|
375
|
+
initialValue: ((_item$data6 = item.data) === null || _item$data6 === void 0 ? void 0 : _item$data6.params) || ''
|
|
376
|
+
})( /*#__PURE__*/_react.default.createElement(EditorWrapper, {
|
|
377
|
+
style: {
|
|
378
|
+
margin: '4px 18px',
|
|
379
|
+
width: 'calc(100% - 36px)'
|
|
380
|
+
}
|
|
381
|
+
}, /*#__PURE__*/_react.default.createElement(_VisionEditor.default, {
|
|
382
|
+
options: _EDITOR_OPTIONS,
|
|
383
|
+
onChange: function onChange(code) {
|
|
384
|
+
return handleEditorValueChange('data.params', code);
|
|
385
|
+
}
|
|
386
|
+
}, ((_item$data7 = item.data) === null || _item$data7 === void 0 ? void 0 : _item$data7.params) || '')))), /*#__PURE__*/_react.default.createElement(LabelLine, null, (0, _utils.formatMessage)({
|
|
387
|
+
id: "".concat(_I18N_PREFIX_, ".body"),
|
|
388
|
+
label: '请求体'
|
|
389
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
390
|
+
type: "question-circle",
|
|
391
|
+
style: {
|
|
392
|
+
marginLeft: 4
|
|
393
|
+
},
|
|
394
|
+
title: (0, _utils.formatMessage)({
|
|
395
|
+
id: "".concat(_I18N_PREFIX_, ".tip.body"),
|
|
396
|
+
label: '接口请求体(body),格式为 {key1:value1,key2:value2}'
|
|
397
|
+
})
|
|
398
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
399
|
+
wrapperCol: {
|
|
400
|
+
span: 24
|
|
401
|
+
}
|
|
402
|
+
}, form.getFieldDecorator('data.body', {
|
|
403
|
+
initialValue: ((_item$data8 = item.data) === null || _item$data8 === void 0 ? void 0 : _item$data8.body) || ''
|
|
404
|
+
})( /*#__PURE__*/_react.default.createElement(EditorWrapper, {
|
|
405
|
+
style: {
|
|
406
|
+
margin: '4px 18px',
|
|
407
|
+
width: 'calc(100% - 36px)'
|
|
408
|
+
}
|
|
409
|
+
}, /*#__PURE__*/_react.default.createElement(_VisionEditor.default, {
|
|
410
|
+
options: _EDITOR_OPTIONS,
|
|
411
|
+
onChange: function onChange(code) {
|
|
412
|
+
return handleEditorValueChange('data.body', code);
|
|
413
|
+
}
|
|
414
|
+
}, ((_item$data9 = item.data) === null || _item$data9 === void 0 ? void 0 : _item$data9.body) || '')))), /*#__PURE__*/_react.default.createElement(LabelLine, {
|
|
415
|
+
$flex: true
|
|
416
|
+
}, (0, _utils.formatMessage)({
|
|
417
|
+
id: "".concat(_I18N_PREFIX_, ".process"),
|
|
418
|
+
label: '数据处理'
|
|
419
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
420
|
+
overlay: menu,
|
|
421
|
+
trigger: ['click'],
|
|
422
|
+
getPopupContainer: function getPopupContainer() {
|
|
423
|
+
return document.getElementById('lc-design-workspace');
|
|
424
|
+
}
|
|
425
|
+
}, /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
426
|
+
type: "plus"
|
|
427
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
428
|
+
style: {
|
|
429
|
+
padding: '0 12px'
|
|
430
|
+
}
|
|
431
|
+
}, renderProcess('willFetch'), renderProcess('didFetch'), renderProcess('onError')), /*#__PURE__*/_react.default.createElement(LabelLine, null, (0, _utils.formatMessage)({
|
|
432
|
+
id: "".concat(_I18N_PREFIX_, ".defaultValue"),
|
|
433
|
+
label: '默认数据'
|
|
434
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
435
|
+
wrapperCol: {
|
|
436
|
+
span: 24
|
|
437
|
+
}
|
|
438
|
+
}, form.getFieldDecorator('data.defaultValue', {
|
|
439
|
+
initialValue: (_item$data10 = item.data) === null || _item$data10 === void 0 ? void 0 : _item$data10.defaultValue
|
|
440
|
+
})( /*#__PURE__*/_react.default.createElement(EditorWrapper, {
|
|
441
|
+
style: {
|
|
442
|
+
margin: '4px 18px',
|
|
443
|
+
width: 'calc(100% - 36px)'
|
|
444
|
+
}
|
|
445
|
+
}, /*#__PURE__*/_react.default.createElement(_VisionEditor.default, {
|
|
446
|
+
options: _EDITOR_OPTIONS,
|
|
447
|
+
onChange: function onChange(code) {
|
|
448
|
+
return handleEditorValueChange('data.defaultValue', code);
|
|
449
|
+
}
|
|
450
|
+
}, ((_item$data11 = item.data) === null || _item$data11 === void 0 ? void 0 : _item$data11.defaultValue) || '')))));
|
|
451
|
+
});
|
|
452
|
+
var VarEditor = function VarEditor(_ref7) {
|
|
453
|
+
var item = _ref7.item,
|
|
454
|
+
dispatch = _ref7.dispatch;
|
|
455
|
+
return item.type === 'var' ? /*#__PURE__*/_react.default.createElement(VarForm, {
|
|
456
|
+
item: item,
|
|
457
|
+
dispatch: dispatch
|
|
458
|
+
}) : /*#__PURE__*/_react.default.createElement(ApiForm, {
|
|
459
|
+
item: item,
|
|
460
|
+
dispatch: dispatch
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
var _default = exports.default = VarEditor;
|