@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
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import _toArray from "@babel/runtime/helpers/esm/toArray";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
7
|
+
import { isNil, reduce, isArray } from 'lodash';
|
|
8
|
+
import { request } from '@luck-design-biz/base/utils';
|
|
9
|
+
import usePageDataStore from "../provider/ContextProvider/usePageDataStore";
|
|
10
|
+
import { useStateStore } from "../provider/ContextProvider/usePageVar";
|
|
11
|
+
import { executeCode } from "./helper";
|
|
12
|
+
var parseVar = function parseVar(ctx, input) {
|
|
13
|
+
if (isNil(input)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
return executeCode(ctx, "function() {return ".concat(input, "}"));
|
|
18
|
+
} catch (err) {
|
|
19
|
+
return input;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var Task = /*#__PURE__*/function () {
|
|
23
|
+
function Task(ctx, props) {
|
|
24
|
+
_classCallCheck(this, Task);
|
|
25
|
+
this.ctx = ctx;
|
|
26
|
+
this.name = props.name;
|
|
27
|
+
this.props = props;
|
|
28
|
+
}
|
|
29
|
+
_createClass(Task, [{
|
|
30
|
+
key: "run",
|
|
31
|
+
value: function () {
|
|
32
|
+
var _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_params, _data) {
|
|
33
|
+
var _this = this;
|
|
34
|
+
var _this$props, willFetch, didFetch, onError, _this$props$data, url, params, body, method, defaultValue, vars, config;
|
|
35
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
36
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37
|
+
case 0:
|
|
38
|
+
_this$props = this.props, willFetch = _this$props.willFetch, didFetch = _this$props.didFetch, onError = _this$props.onError;
|
|
39
|
+
_this$props$data = this.props.data, url = _this$props$data.url, params = _this$props$data.params, body = _this$props$data.body, method = _this$props$data.method, defaultValue = _this$props$data.defaultValue;
|
|
40
|
+
vars = {
|
|
41
|
+
params: isNil(params) || params === '' ? {} : parseVar(this.ctx, params),
|
|
42
|
+
data: isNil(body) || body === '' ? {} : parseVar(this.ctx, body)
|
|
43
|
+
};
|
|
44
|
+
config = {
|
|
45
|
+
headers: {}
|
|
46
|
+
};
|
|
47
|
+
if (willFetch) {
|
|
48
|
+
executeCode(this.ctx, willFetch, ['vars', 'config'], vars, config);
|
|
49
|
+
}
|
|
50
|
+
return _context.abrupt("return", request(parseVar(this.ctx, url), _objectSpread({
|
|
51
|
+
params: _objectSpread(_objectSpread({}, vars.params), _params),
|
|
52
|
+
data: _objectSpread(_objectSpread({}, vars.data), _data),
|
|
53
|
+
method: parseVar(this.ctx, method)
|
|
54
|
+
}, config)).then(function (res) {
|
|
55
|
+
if (res.code === 1) {
|
|
56
|
+
var list = res.list,
|
|
57
|
+
detail = res.detail;
|
|
58
|
+
var content;
|
|
59
|
+
if (list.length === 1) {
|
|
60
|
+
content = detail[list[0]];
|
|
61
|
+
} else {
|
|
62
|
+
content = list.map(function (_id) {
|
|
63
|
+
return detail[_id];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (didFetch) {
|
|
67
|
+
return executeCode(_this.ctx, didFetch, ['content', 'origin'], content, res);
|
|
68
|
+
}
|
|
69
|
+
return content;
|
|
70
|
+
} else if (onError) {
|
|
71
|
+
executeCode(_this.ctx, onError, ['error'], res);
|
|
72
|
+
}
|
|
73
|
+
if (defaultValue) {
|
|
74
|
+
return parseVar(_this.ctx, defaultValue);
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
case 6:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context.stop();
|
|
80
|
+
}
|
|
81
|
+
}, _callee, this);
|
|
82
|
+
}));
|
|
83
|
+
function run(_x, _x2) {
|
|
84
|
+
return _run.apply(this, arguments);
|
|
85
|
+
}
|
|
86
|
+
return run;
|
|
87
|
+
}()
|
|
88
|
+
}, {
|
|
89
|
+
key: "load",
|
|
90
|
+
value: function () {
|
|
91
|
+
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params, data) {
|
|
92
|
+
var _this2 = this;
|
|
93
|
+
var content;
|
|
94
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
95
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
96
|
+
case 0:
|
|
97
|
+
_context2.next = 2;
|
|
98
|
+
return this.run(params, data);
|
|
99
|
+
case 2:
|
|
100
|
+
content = _context2.sent;
|
|
101
|
+
useStateStore.setState(function (store) {
|
|
102
|
+
store.state[_this2.name] = content;
|
|
103
|
+
});
|
|
104
|
+
return _context2.abrupt("return", content);
|
|
105
|
+
case 5:
|
|
106
|
+
case "end":
|
|
107
|
+
return _context2.stop();
|
|
108
|
+
}
|
|
109
|
+
}, _callee2, this);
|
|
110
|
+
}));
|
|
111
|
+
function load(_x3, _x4) {
|
|
112
|
+
return _load.apply(this, arguments);
|
|
113
|
+
}
|
|
114
|
+
return load;
|
|
115
|
+
}()
|
|
116
|
+
}]);
|
|
117
|
+
return Task;
|
|
118
|
+
}();
|
|
119
|
+
var wrapPromise = function wrapPromise(promise) {
|
|
120
|
+
var cache = {
|
|
121
|
+
status: 'pending',
|
|
122
|
+
data: null
|
|
123
|
+
};
|
|
124
|
+
var suspender = promise.then(function (r) {
|
|
125
|
+
cache.status = 'fulfilled';
|
|
126
|
+
cache.data = r;
|
|
127
|
+
}, function (e) {
|
|
128
|
+
cache.status = 'rejected';
|
|
129
|
+
cache.data = e;
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
read: function read() {
|
|
133
|
+
if (cache.status === 'pending') {
|
|
134
|
+
throw suspender;
|
|
135
|
+
} else if (cache.status === 'rejected') {
|
|
136
|
+
throw cache.data;
|
|
137
|
+
} else if (cache.status === 'fulfilled') {
|
|
138
|
+
return cache.data;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export default function initialize(ctx) {
|
|
144
|
+
var pageVars = usePageDataStore.getState().pageData.props.vars;
|
|
145
|
+
if (isNil(pageVars)) return null;
|
|
146
|
+
var remoteApis = new Map();
|
|
147
|
+
var _reduce = reduce(pageVars, function (ret, val) {
|
|
148
|
+
if (val.type === 'var') {
|
|
149
|
+
ret[0][val.name] = parseVar(ctx, val.data);
|
|
150
|
+
} else if (val.type === 'api') {
|
|
151
|
+
var _val$data = val.data,
|
|
152
|
+
auto = _val$data.auto,
|
|
153
|
+
taskType = _val$data.taskType;
|
|
154
|
+
var task = new Task(ctx, val);
|
|
155
|
+
remoteApis.set(val.name, task);
|
|
156
|
+
if (!auto) return ret;
|
|
157
|
+
if (taskType === 'serial') {
|
|
158
|
+
ret.push(task);
|
|
159
|
+
} else if (taskType === 'parallel') {
|
|
160
|
+
var lastIndex = ret.length - 1;
|
|
161
|
+
if (lastIndex > 0 && isArray(ret[lastIndex])) {
|
|
162
|
+
ret[lastIndex].push(task);
|
|
163
|
+
} else {
|
|
164
|
+
ret.push([task]);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return ret;
|
|
169
|
+
}, [{}]),
|
|
170
|
+
_reduce2 = _toArray(_reduce),
|
|
171
|
+
variables = _reduce2[0],
|
|
172
|
+
autoTasks = _reduce2.slice(1);
|
|
173
|
+
useStateStore.getState().initialize(variables);
|
|
174
|
+
ctx._initRemoteApiMap(remoteApis);
|
|
175
|
+
function run() {
|
|
176
|
+
return _run2.apply(this, arguments);
|
|
177
|
+
}
|
|
178
|
+
function _run2() {
|
|
179
|
+
_run2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
180
|
+
var result, _loop, i;
|
|
181
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context5) {
|
|
182
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
183
|
+
case 0:
|
|
184
|
+
result = {};
|
|
185
|
+
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop(i) {
|
|
186
|
+
var contents, _loop2, j, content;
|
|
187
|
+
return _regeneratorRuntime().wrap(function _loop$(_context4) {
|
|
188
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
189
|
+
case 0:
|
|
190
|
+
if (!isArray(autoTasks[i])) {
|
|
191
|
+
_context4.next = 13;
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
_context4.next = 3;
|
|
195
|
+
return Promise.all(autoTasks[i].map(function (t) {
|
|
196
|
+
return t.run();
|
|
197
|
+
}));
|
|
198
|
+
case 3:
|
|
199
|
+
contents = _context4.sent;
|
|
200
|
+
_loop2 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop2(j) {
|
|
201
|
+
return _regeneratorRuntime().wrap(function _loop2$(_context3) {
|
|
202
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
203
|
+
case 0:
|
|
204
|
+
useStateStore.setState(function (store) {
|
|
205
|
+
store.state[autoTasks[i][j].name] = contents[j];
|
|
206
|
+
});
|
|
207
|
+
case 1:
|
|
208
|
+
case "end":
|
|
209
|
+
return _context3.stop();
|
|
210
|
+
}
|
|
211
|
+
}, _loop2);
|
|
212
|
+
});
|
|
213
|
+
_context4.t0 = _regeneratorRuntime().keys(autoTasks[i]);
|
|
214
|
+
case 6:
|
|
215
|
+
if ((_context4.t1 = _context4.t0()).done) {
|
|
216
|
+
_context4.next = 11;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
j = _context4.t1.value;
|
|
220
|
+
return _context4.delegateYield(_loop2(j), "t2", 9);
|
|
221
|
+
case 9:
|
|
222
|
+
_context4.next = 6;
|
|
223
|
+
break;
|
|
224
|
+
case 11:
|
|
225
|
+
_context4.next = 17;
|
|
226
|
+
break;
|
|
227
|
+
case 13:
|
|
228
|
+
_context4.next = 15;
|
|
229
|
+
return autoTasks[i].run();
|
|
230
|
+
case 15:
|
|
231
|
+
content = _context4.sent;
|
|
232
|
+
useStateStore.setState(function (store) {
|
|
233
|
+
store.state[autoTasks[i].name] = content;
|
|
234
|
+
});
|
|
235
|
+
case 17:
|
|
236
|
+
case "end":
|
|
237
|
+
return _context4.stop();
|
|
238
|
+
}
|
|
239
|
+
}, _loop);
|
|
240
|
+
});
|
|
241
|
+
_context5.t0 = _regeneratorRuntime().keys(autoTasks);
|
|
242
|
+
case 3:
|
|
243
|
+
if ((_context5.t1 = _context5.t0()).done) {
|
|
244
|
+
_context5.next = 8;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
i = _context5.t1.value;
|
|
248
|
+
return _context5.delegateYield(_loop(i), "t2", 6);
|
|
249
|
+
case 6:
|
|
250
|
+
_context5.next = 3;
|
|
251
|
+
break;
|
|
252
|
+
case 8:
|
|
253
|
+
return _context5.abrupt("return", result);
|
|
254
|
+
case 9:
|
|
255
|
+
case "end":
|
|
256
|
+
return _context5.stop();
|
|
257
|
+
}
|
|
258
|
+
}, _callee3);
|
|
259
|
+
}));
|
|
260
|
+
return _run2.apply(this, arguments);
|
|
261
|
+
}
|
|
262
|
+
return wrapPromise(run());
|
|
263
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["props", "children"],
|
|
6
|
+
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
7
|
+
import React, { useRef } from 'react';
|
|
8
|
+
import { dynamic } from 'umi';
|
|
9
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
10
|
+
import { upperFirst, isNil } from 'lodash';
|
|
11
|
+
import { useContext } from "../provider/ContextProvider";
|
|
12
|
+
import { LC_BUILDIN_UNIT_KEY_LIST, RUNTIME } from "../../constants";
|
|
13
|
+
import { executeCode } from "../tools/helper";
|
|
14
|
+
export default function useCanvasRender(data, deps) {
|
|
15
|
+
var dynamicCompMap = useRef({});
|
|
16
|
+
var ctx = useContext();
|
|
17
|
+
var render = useMemoizedFn(function () {
|
|
18
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
19
|
+
props = _ref.props,
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
childrenMap = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
if (props && !LC_BUILDIN_UNIT_KEY_LIST.includes(props.id)) {
|
|
23
|
+
var _rest$advance;
|
|
24
|
+
var id = props.id,
|
|
25
|
+
component = props.component,
|
|
26
|
+
name = props.name,
|
|
27
|
+
desc = props.desc,
|
|
28
|
+
icon = props.icon,
|
|
29
|
+
group = props.group,
|
|
30
|
+
groupName = props.groupName,
|
|
31
|
+
order = props.order,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
33
|
+
if (!dynamicCompMap.current[component]) {
|
|
34
|
+
dynamicCompMap.current[component] = dynamic({
|
|
35
|
+
loader: function () {
|
|
36
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
37
|
+
var _runtime, _yield$import, _Comp;
|
|
38
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
|
+
while (1) switch (_context.prev = _context.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
_runtime = upperFirst(ctx.runtime);
|
|
42
|
+
_context.next = 3;
|
|
43
|
+
return import("../../view/lc-components/".concat(component, "/Function").concat(_runtime));
|
|
44
|
+
case 3:
|
|
45
|
+
_yield$import = _context.sent;
|
|
46
|
+
_Comp = _yield$import.default;
|
|
47
|
+
return _context.abrupt("return", _Comp);
|
|
48
|
+
case 6:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
function loader() {
|
|
55
|
+
return _loader.apply(this, arguments);
|
|
56
|
+
}
|
|
57
|
+
return loader;
|
|
58
|
+
}()
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
var renderable = true;
|
|
62
|
+
if (ctx.runtime !== RUNTIME.DESIGN && (_rest$advance = rest.advance) !== null && _rest$advance !== void 0 && _rest$advance.render) {
|
|
63
|
+
renderable = rest.advance.render.value && (isNil(rest.advance.render.code) ? true : executeCode(ctx, rest.advance.render.code));
|
|
64
|
+
}
|
|
65
|
+
if (!renderable) return null;
|
|
66
|
+
var Comp = dynamicCompMap.current[component];
|
|
67
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
68
|
+
key: id,
|
|
69
|
+
id: id
|
|
70
|
+
}, rest), (children === null || children === void 0 ? void 0 : children.length) > 0 ? children.map(function (_id) {
|
|
71
|
+
return render(childrenMap[_id]);
|
|
72
|
+
}) : null);
|
|
73
|
+
}
|
|
74
|
+
return (children === null || children === void 0 ? void 0 : children.length) > 0 ? children.map(function (_id) {
|
|
75
|
+
return render(childrenMap[_id]);
|
|
76
|
+
}) : null;
|
|
77
|
+
});
|
|
78
|
+
return useCreation(function () {
|
|
79
|
+
return render(data);
|
|
80
|
+
}, deps || [data, ctx.state]);
|
|
81
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { useCreation } from 'ahooks';
|
|
3
|
+
var useCombinedRefs = function useCombinedRefs(forwardedRef) {
|
|
4
|
+
var innerRef = useRef(null);
|
|
5
|
+
useCreation(function () {
|
|
6
|
+
if (!forwardedRef) return;
|
|
7
|
+
if (typeof forwardedRef === 'function') {
|
|
8
|
+
forwardedRef(innerRef.current);
|
|
9
|
+
} else {
|
|
10
|
+
forwardedRef.current = innerRef.current;
|
|
11
|
+
}
|
|
12
|
+
}, [forwardedRef]);
|
|
13
|
+
return forwardedRef || innerRef;
|
|
14
|
+
};
|
|
15
|
+
export default useCombinedRefs;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { useRef, useState, useCallback } from 'react';
|
|
3
|
+
import { useUpdateLayoutEffect } from 'ahooks';
|
|
4
|
+
var usePromiseState = function usePromiseState(initialState) {
|
|
5
|
+
var _useState = useState(initialState),
|
|
6
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7
|
+
state = _useState2[0],
|
|
8
|
+
setState = _useState2[1];
|
|
9
|
+
var promiseRef = useRef(null);
|
|
10
|
+
var setStatePromise = useCallback(function (_state) {
|
|
11
|
+
return new Promise(function (resolve) {
|
|
12
|
+
promiseRef.current = resolve;
|
|
13
|
+
setState(_state);
|
|
14
|
+
});
|
|
15
|
+
}, []);
|
|
16
|
+
useUpdateLayoutEffect(function () {
|
|
17
|
+
if (promiseRef.current) {
|
|
18
|
+
promiseRef.current(state);
|
|
19
|
+
promiseRef.current = null;
|
|
20
|
+
}
|
|
21
|
+
}, [state]);
|
|
22
|
+
return [state, setStatePromise];
|
|
23
|
+
};
|
|
24
|
+
export default usePromiseState;
|
package/es/lowcode/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import React, { useState } from 'react';
|
|
4
5
|
import { Icon, Input, Tabs } from 'luck-design/antd';
|
|
5
6
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
6
7
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
7
|
-
import {
|
|
8
|
+
import { useContext } from "../engine/provider/ContextProvider";
|
|
9
|
+
import { useDraggable } from '@dnd-kit/core';
|
|
8
10
|
import styles from "./style/components.less";
|
|
9
11
|
import data from "../engine/meta/components-list.json";
|
|
12
|
+
import { Action } from "./components/DragDrop/DragDropContext";
|
|
10
13
|
var TabPane = Tabs.TabPane;
|
|
11
14
|
var Search = Input.Search;
|
|
12
15
|
var BaseCom = function BaseCom(_ref) {
|
|
@@ -28,7 +31,7 @@ var BaseCom = function BaseCom(_ref) {
|
|
|
28
31
|
}).filter(function (group) {
|
|
29
32
|
return group.components.length > 0;
|
|
30
33
|
});
|
|
31
|
-
}, [
|
|
34
|
+
}, [searchTerm]);
|
|
32
35
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
33
36
|
className: styles['components-search']
|
|
34
37
|
}, /*#__PURE__*/React.createElement(Search, {
|
|
@@ -44,30 +47,53 @@ var BaseCom = function BaseCom(_ref) {
|
|
|
44
47
|
key: group.group,
|
|
45
48
|
className: styles['components-wrapper']
|
|
46
49
|
}, /*#__PURE__*/React.createElement("h3", null, group.groupName), group.components.map(function (item) {
|
|
47
|
-
return /*#__PURE__*/React.createElement(
|
|
50
|
+
return /*#__PURE__*/React.createElement(CompItem, {
|
|
48
51
|
key: item.component,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: styles['icon-wrapper']
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
56
|
-
type: item.icon || 'home'
|
|
57
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
className: styles['text-content']
|
|
59
|
-
}, /*#__PURE__*/React.createElement("span", null, item.name)));
|
|
52
|
+
item: item,
|
|
53
|
+
onComponentClick: onComponentClick
|
|
54
|
+
});
|
|
60
55
|
}));
|
|
61
56
|
})));
|
|
62
57
|
};
|
|
58
|
+
var CompItem = function CompItem(_ref2) {
|
|
59
|
+
var item = _ref2.item,
|
|
60
|
+
onComponentClick = _ref2.onComponentClick;
|
|
61
|
+
// console.log('CompItem', item.component);
|
|
62
|
+
var _useDraggable = useDraggable({
|
|
63
|
+
id: 'comlist-' + item.component,
|
|
64
|
+
data: {
|
|
65
|
+
component: item,
|
|
66
|
+
action: Action.ADD
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
attributes = _useDraggable.attributes,
|
|
70
|
+
listeners = _useDraggable.listeners,
|
|
71
|
+
transform = _useDraggable.transform,
|
|
72
|
+
setNodeRef = _useDraggable.setNodeRef;
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
74
|
+
ref: setNodeRef
|
|
75
|
+
}, listeners, attributes, {
|
|
76
|
+
key: item.component,
|
|
77
|
+
className: styles['components-item'],
|
|
78
|
+
onClick: function onClick() {
|
|
79
|
+
return onComponentClick(item);
|
|
80
|
+
}
|
|
81
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: styles['icon-wrapper']
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
84
|
+
type: item.icon || 'home'
|
|
85
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: styles['text-content']
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", null, item.name)));
|
|
88
|
+
};
|
|
63
89
|
|
|
64
90
|
/**
|
|
65
91
|
* 组件清单
|
|
66
92
|
*/
|
|
67
|
-
var Components = function Components(
|
|
68
|
-
var
|
|
69
|
-
dataset =
|
|
70
|
-
var context =
|
|
93
|
+
var Components = function Components(_ref3) {
|
|
94
|
+
var _ref3$dataset = _ref3.dataset,
|
|
95
|
+
dataset = _ref3$dataset === void 0 ? 'test' : _ref3$dataset;
|
|
96
|
+
var context = useContext();
|
|
71
97
|
var onComponentClick = useMemoizedFn(function (data) {
|
|
72
98
|
context.$publisher(context.topics.COMPONENT_SETTING_CLICK, {
|
|
73
99
|
data: data
|
|
@@ -95,10 +121,10 @@ var Components = function Components(_ref2) {
|
|
|
95
121
|
onComponentClick: onComponentClick
|
|
96
122
|
})), /*#__PURE__*/React.createElement(TabPane, {
|
|
97
123
|
tab: formatMessage({
|
|
98
|
-
id: 'ccm.dev.page.set.components.
|
|
99
|
-
label: '
|
|
124
|
+
id: 'ccm.dev.page.set.components.custom',
|
|
125
|
+
label: '自定义组件'
|
|
100
126
|
}),
|
|
101
127
|
key: "dataset"
|
|
102
|
-
})));
|
|
128
|
+
}, "\u656C\u8BF7\u671F\u5F85")));
|
|
103
129
|
};
|
|
104
130
|
export default Components;
|
|
@@ -1,97 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { RawIntlProvider, getLocale, getIntl, localeInfo, history } from 'umi';
|
|
4
|
+
import { useMemoizedFn } from 'ahooks';
|
|
5
|
+
import moment from 'moment';
|
|
6
|
+
import { ConfigProvider } from 'luck-design/antd';
|
|
7
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
+
import { getNeedPrompt } from "../engine/provider/ContextProvider";
|
|
9
|
+
import DesignToolbar from "./DesignToolbar";
|
|
10
|
+
import DesignOperator from "./DesignOperator";
|
|
4
11
|
import Page from "../view/Page";
|
|
5
|
-
import { CELL_CLASS_NAME } from "../constants";
|
|
6
12
|
import styles from "./style/design.less";
|
|
7
13
|
var Design = function Design() {
|
|
8
|
-
var
|
|
9
|
-
var detectorRef = useRef(null);
|
|
10
|
-
var selectorRef = useRef(null);
|
|
14
|
+
var _localeInfo$locale;
|
|
11
15
|
var simulatorRef = useRef(null);
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
var _useState = useState(function () {
|
|
17
|
+
return getLocale();
|
|
18
|
+
}),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
locale = _useState2[0],
|
|
21
|
+
setLocale = _useState2[1];
|
|
22
|
+
var _useState3 = useState(function () {
|
|
23
|
+
return getIntl(getLocale(), true);
|
|
24
|
+
}),
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
intl = _useState4[0],
|
|
27
|
+
setIntl = _useState4[1];
|
|
28
|
+
var unblock = useMemoizedFn(function () {
|
|
29
|
+
if (getNeedPrompt()) return confirm("".concat(formatMessage({
|
|
30
|
+
id: 'app.base.operate.comfire.leave',
|
|
31
|
+
label: '离开当前页面?'
|
|
32
|
+
}), "\n").concat(formatMessage({
|
|
33
|
+
id: 'app.base.operate.comfire.message.leave',
|
|
34
|
+
label: '系统可能不会保存您所做的更改。'
|
|
35
|
+
})));
|
|
36
|
+
return true;
|
|
30
37
|
});
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
var handleBeforeUnload = useMemoizedFn(function (event) {
|
|
39
|
+
if (getNeedPrompt()) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.returnValue = null;
|
|
42
|
+
return null;
|
|
35
43
|
}
|
|
36
|
-
}, {
|
|
37
|
-
target: simulatorRef
|
|
38
|
-
});
|
|
39
|
-
useEventListener('click', function (event) {
|
|
40
|
-
var elem = event.target;
|
|
41
|
-
var targetCell = elem.closest(".".concat(CELL_CLASS_NAME));
|
|
42
|
-
if (!targetCell || targetCell.isEqualNode(activeCellRef.current)) return;
|
|
43
|
-
activeCellRef.current = targetCell;
|
|
44
|
-
hoverCellRef.current = null;
|
|
45
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
46
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
47
|
-
id: activeCellRef.current.id,
|
|
48
|
-
cellNode: activeCellRef.current
|
|
49
|
-
});
|
|
50
|
-
}, {
|
|
51
|
-
target: simulatorRef
|
|
52
44
|
});
|
|
53
45
|
useEffect(function () {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
node.style.height = "".concat(cellNode.offsetHeight, "px");
|
|
59
|
-
};
|
|
60
|
-
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
61
|
-
if (payload.id) {
|
|
62
|
-
detectorRef.current.style.display = 'block';
|
|
63
|
-
setRect(detectorRef.current, payload.cellNode);
|
|
64
|
-
} else {
|
|
65
|
-
detectorRef.current.style.display = 'none';
|
|
66
|
-
}
|
|
67
|
-
}).watch();
|
|
68
|
-
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
69
|
-
if (payload.id) {
|
|
70
|
-
selectorRef.current.style.display = 'block';
|
|
71
|
-
setRect(selectorRef.current, payload.cellNode);
|
|
72
|
-
} else {
|
|
73
|
-
selectorRef.current.style.display = 'none';
|
|
74
|
-
}
|
|
75
|
-
}).watch();
|
|
46
|
+
window.addEventListener('beforeunload', handleBeforeUnload);
|
|
47
|
+
history.block(function () {
|
|
48
|
+
return unblock();
|
|
49
|
+
});
|
|
76
50
|
return function () {
|
|
77
|
-
|
|
78
|
-
|
|
51
|
+
window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
52
|
+
history.block(function () {
|
|
53
|
+
return true;
|
|
54
|
+
});
|
|
79
55
|
};
|
|
80
56
|
}, []);
|
|
57
|
+
var handleLangChange = useMemoizedFn(function (_locale) {
|
|
58
|
+
if (moment !== null && moment !== void 0 && moment.locale) {
|
|
59
|
+
var _localeInfo$_locale;
|
|
60
|
+
moment.locale(((_localeInfo$_locale = localeInfo[_locale]) === null || _localeInfo$_locale === void 0 ? void 0 : _localeInfo$_locale.momentLocale) || 'en');
|
|
61
|
+
}
|
|
62
|
+
setLocale(_locale);
|
|
63
|
+
setIntl(getIntl(_locale));
|
|
64
|
+
});
|
|
81
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
66
|
className: styles['lc-painter-design']
|
|
83
|
-
}, /*#__PURE__*/React.createElement(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
className: styles.detector
|
|
67
|
+
}, /*#__PURE__*/React.createElement(DesignToolbar, {
|
|
68
|
+
locale: locale,
|
|
69
|
+
onLangChange: handleLangChange
|
|
87
70
|
}), /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}), /*#__PURE__*/React.createElement(
|
|
71
|
+
className: styles['lc-painter-design-workspace']
|
|
72
|
+
}, /*#__PURE__*/React.createElement(DesignOperator, {
|
|
73
|
+
canvas: simulatorRef
|
|
74
|
+
}), /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
75
|
+
locale: ((_localeInfo$locale = localeInfo[locale]) === null || _localeInfo$locale === void 0 ? void 0 : _localeInfo$locale.antd) || {}
|
|
76
|
+
}, /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
77
|
+
value: intl
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Page, {
|
|
92
79
|
ref: simulatorRef,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}));
|
|
80
|
+
className: styles['lc-painter-design-simulator']
|
|
81
|
+
})))));
|
|
96
82
|
};
|
|
97
83
|
export default Design;
|