@luck-design-biz/luckda 0.0.24-1 → 0.0.25-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/es/components/Builder/index.js +11 -7
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +133 -0
- package/es/components/LDActions/index.less +65 -0
- package/es/components/LdAutoForm/index.js +1 -1
- package/es/components/LdCard/index.js +0 -0
- package/es/components/LdCard/model.js +0 -0
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +26 -11
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdGridForm/index.less +0 -0
- package/es/components/LdInfoPanel/index.js +0 -0
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/FromItems.js +0 -0
- package/es/helper/action.js +0 -0
- package/es/helper/form.js +0 -0
- package/es/helper/index.less +0 -0
- package/es/helper/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +221 -0
- package/es/lowcode/constants/api-url.js +409 -1
- package/es/lowcode/constants/event-topics.js +8 -4
- package/es/lowcode/constants/index.js +30 -2
- package/es/lowcode/engine/factory/DataFactory.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +12 -11
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/es/lowcode/engine/factory/panel-item-factory/index.js +4 -0
- package/es/lowcode/engine/meta/box.props.default.json +3 -2
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +15 -10
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +53 -4
- package/es/lowcode/engine/meta/form.props.json +584 -55
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +5 -2
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +155 -29
- package/es/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/es/lowcode/engine/meta/jsx.props.json +10 -5
- package/es/lowcode/engine/meta/layout.props.default.json +5 -2
- package/es/lowcode/engine/meta/layout.props.json +1 -2
- package/es/lowcode/engine/meta/link.props.default.json +5 -2
- package/es/lowcode/engine/meta/link.props.json +2 -2
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +49 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/section.props.default.json +5 -2
- package/es/lowcode/engine/meta/section.props.json +1 -1
- package/es/lowcode/engine/meta/split.props.default.json +9 -4
- package/es/lowcode/engine/meta/split.props.json +14 -29
- package/es/lowcode/engine/meta/table.props.default.json +40 -2
- package/es/lowcode/engine/meta/table.props.json +347 -83
- package/es/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/es/lowcode/engine/meta/tabs.props.json +57 -81
- package/es/lowcode/engine/meta/text.props.default.json +5 -2
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +20 -7
- package/es/lowcode/engine/meta/tree.props.json +225 -79
- package/es/lowcode/engine/provider/ContextProvider/index.js +169 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +161 -0
- package/es/lowcode/engine/tools/dataProcess.js +67 -3
- package/es/lowcode/engine/tools/helper.js +145 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +75 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -6
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +4 -1
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +27 -304
- package/es/lowcode/painter/DesignOperator.js +290 -0
- package/es/lowcode/painter/DesignToolbar.js +162 -0
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +54 -45
- package/es/lowcode/painter/Panel.js +102 -106
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +293 -0
- package/es/lowcode/painter/components/AdvancePanel.js +140 -0
- package/es/lowcode/painter/components/AttrsPanel.js +145 -0
- package/es/lowcode/painter/components/Collapse.js +81 -11
- 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 +47 -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 +44 -0
- package/es/lowcode/painter/components/{TabEditor.js → ListEditor.js} +32 -22
- package/es/lowcode/painter/components/NumberInput.js +72 -17
- package/es/lowcode/painter/components/PanelItem.js +40 -11
- package/es/lowcode/painter/components/PopConfirm.js +14 -4
- package/es/lowcode/painter/components/PopForm.js +0 -0
- package/es/lowcode/painter/components/RuleInput.js +5 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +56 -66
- package/es/lowcode/painter/components/code-editor/CssEditor.js +27 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +37 -14
- package/es/lowcode/painter/components/code-editor/JSEditor.js +44 -11
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/index.js +0 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +144 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +126 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +116 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +419 -0
- package/es/lowcode/painter/components/field-setting/index.js +363 -0
- package/es/lowcode/painter/index.js +9 -3
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +231 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +24 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +44 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +202 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +133 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +308 -0
- package/es/lowcode/painter/panel-section/Icon.js +14 -14
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +8 -8
- package/es/lowcode/painter/panel-section/SerialsSelector.js +44 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +248 -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 +15 -11
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -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 +44 -12
- 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 +56 -29
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +23 -20
- package/es/lowcode/painter/panel-section/StylePanel/index.js +17 -0
- package/es/lowcode/painter/panel-section/TabItems.js +52 -66
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +74 -0
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +0 -0
- package/es/lowcode/painter/services/toolbar.js +25 -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 +0 -0
- package/es/lowcode/painter/style/collapse.less +8 -1
- 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 +9 -3
- package/es/lowcode/painter/style/display.less +0 -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 +0 -0
- package/es/lowcode/painter/style/icon-selector.less +0 -0
- package/es/lowcode/painter/style/icon.less +0 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/index.less +0 -0
- package/es/lowcode/painter/style/layout-ratio.less +0 -0
- package/es/lowcode/painter/style/{tabeditor.less → list-editor.less} +9 -40
- package/es/lowcode/painter/style/number-input.less +0 -0
- package/es/lowcode/painter/style/outline.less +0 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel-item.less +11 -1
- package/es/lowcode/painter/style/panel.less +5 -49
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/pop-form.less +0 -0
- package/es/lowcode/painter/style/radio.less +0 -0
- package/es/lowcode/painter/style/ribbon.less +0 -0
- package/es/lowcode/painter/style/rule-input.less +0 -0
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/style-panel.less +32 -0
- package/es/lowcode/painter/style/tabitems.less +0 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +14 -0
- package/es/lowcode/view/Canvas.js +33 -137
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +18 -231
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +13 -4
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +50 -24
- package/es/lowcode/view/lc-components/Button/meta.json +15 -10
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +42 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +22 -23
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +15 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +36 -22
- package/es/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +114 -8
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +534 -55
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +19 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +19 -17
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Layout/index.js +1 -0
- package/es/lowcode/view/lc-components/Layout/index.less +0 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +2 -2
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +53 -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 +40 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +23 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +1 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +59 -2
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +46 -7
- package/es/lowcode/view/lc-components/Split/meta.json +10 -29
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +42 -3
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +545 -139
- package/es/lowcode/view/lc-components/Table/meta.json +308 -83
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +72 -2
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +113 -10
- package/es/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +323 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/es/lowcode/view/lc-components/Wrapper.js +44 -27
- package/es/lowcode/view/style/canvas.less +0 -0
- package/es/lowcode/view/style/loading.less +0 -0
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- package/es/upload/Form/gridForm.js +0 -0
- package/es/upload/Form/index.js +0 -0
- package/es/upload/Form/index.less +0 -0
- package/es/upload/FormItem/index.js +0 -0
- package/es/upload/GridCell/index.js +0 -0
- package/es/upload/index.js +0 -0
- package/es/utils/action.js +0 -0
- package/es/utils/form.js +0 -0
- package/es/utils/grid.js +2 -2
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +9 -4
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +141 -0
- package/lib/components/LDActions/index.less +65 -0
- package/lib/components/LdAutoForm/index.js +1 -1
- package/lib/components/LdCard/index.js +0 -0
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +25 -10
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +4 -3
- package/lib/components/LdGridForm/index.less +0 -0
- package/lib/components/LdInfoPanel/index.js +0 -0
- package/lib/components/LdPop/index.js +0 -0
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/FromItems.js +0 -0
- package/lib/helper/action.js +0 -0
- package/lib/helper/form.js +0 -0
- package/lib/helper/index.less +0 -0
- package/lib/helper/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +227 -0
- package/lib/lowcode/constants/api-url.js +411 -1
- package/lib/lowcode/constants/event-topics.js +9 -5
- package/lib/lowcode/constants/index.js +31 -3
- package/lib/lowcode/engine/factory/DataFactory.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +11 -10
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +4 -0
- package/lib/lowcode/engine/meta/box.props.default.json +3 -2
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +15 -10
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +53 -4
- package/lib/lowcode/engine/meta/form.props.json +584 -55
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +5 -2
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +155 -29
- package/lib/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/lib/lowcode/engine/meta/jsx.props.json +10 -5
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -2
- package/lib/lowcode/engine/meta/layout.props.json +1 -2
- package/lib/lowcode/engine/meta/link.props.default.json +5 -2
- package/lib/lowcode/engine/meta/link.props.json +2 -2
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +49 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/section.props.default.json +5 -2
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- package/lib/lowcode/engine/meta/split.props.default.json +9 -4
- package/lib/lowcode/engine/meta/split.props.json +14 -29
- package/lib/lowcode/engine/meta/table.props.default.json +40 -2
- package/lib/lowcode/engine/meta/table.props.json +347 -83
- package/lib/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/lib/lowcode/engine/meta/tabs.props.json +57 -81
- package/lib/lowcode/engine/meta/text.props.default.json +5 -2
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +20 -7
- package/lib/lowcode/engine/meta/tree.props.json +225 -79
- package/lib/lowcode/engine/provider/ContextProvider/index.js +177 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +169 -0
- package/lib/lowcode/engine/tools/dataProcess.js +68 -3
- package/lib/lowcode/engine/tools/helper.js +152 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +90 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -5
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +12 -1
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +24 -300
- package/lib/lowcode/painter/DesignOperator.js +297 -0
- package/lib/lowcode/painter/DesignToolbar.js +170 -0
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +52 -43
- package/lib/lowcode/painter/Panel.js +98 -102
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +300 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +148 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +153 -0
- package/lib/lowcode/painter/components/Collapse.js +79 -10
- 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 +54 -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 +52 -0
- package/lib/lowcode/painter/components/{TabEditor.js → ListEditor.js} +33 -23
- package/lib/lowcode/painter/components/NumberInput.js +70 -16
- package/lib/lowcode/painter/components/PanelItem.js +40 -11
- package/lib/lowcode/painter/components/PopConfirm.js +14 -4
- package/lib/lowcode/painter/components/PopForm.js +0 -0
- package/lib/lowcode/painter/components/RuleInput.js +5 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +54 -65
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +26 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +35 -13
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +44 -11
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/index.js +0 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +151 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +133 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +123 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +427 -0
- package/lib/lowcode/painter/components/field-setting/index.js +370 -0
- package/lib/lowcode/painter/index.js +9 -3
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +109 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +239 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +31 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +51 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +208 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +316 -0
- package/lib/lowcode/painter/panel-section/Icon.js +16 -14
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +7 -7
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +51 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +256 -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 +15 -11
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -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 +42 -11
- 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/{Width.js → Size.js} +39 -35
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +57 -30
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +22 -19
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +16 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +51 -65
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +82 -0
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +0 -0
- package/lib/lowcode/painter/services/toolbar.js +32 -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 +0 -0
- package/lib/lowcode/painter/style/collapse.less +8 -1
- 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 +9 -3
- package/lib/lowcode/painter/style/display.less +0 -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 +0 -0
- package/lib/lowcode/painter/style/icon-selector.less +0 -0
- package/lib/lowcode/painter/style/icon.less +0 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/index.less +0 -0
- package/lib/lowcode/painter/style/layout-ratio.less +0 -0
- package/lib/lowcode/painter/style/{tabeditor.less → list-editor.less} +9 -40
- package/lib/lowcode/painter/style/number-input.less +0 -0
- package/lib/lowcode/painter/style/outline.less +0 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel-item.less +11 -1
- package/lib/lowcode/painter/style/panel.less +5 -49
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/pop-form.less +0 -0
- package/lib/lowcode/painter/style/radio.less +0 -0
- package/lib/lowcode/painter/style/ribbon.less +0 -0
- package/lib/lowcode/painter/style/rule-input.less +0 -0
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/style-panel.less +32 -0
- package/lib/lowcode/painter/style/tabitems.less +0 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +21 -0
- package/lib/lowcode/view/Canvas.js +31 -143
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +14 -227
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +13 -4
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +48 -22
- package/lib/lowcode/view/lc-components/Button/meta.json +15 -10
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +42 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +21 -22
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +15 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +35 -21
- package/lib/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +32 -2
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +113 -7
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +534 -55
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +19 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +21 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +1 -0
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +61 -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 +48 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +30 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +1 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +60 -2
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +45 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +10 -29
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +44 -4
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +544 -138
- package/lib/lowcode/view/lc-components/Table/meta.json +308 -83
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +73 -2
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +112 -9
- package/lib/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +321 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/lib/lowcode/view/lc-components/Wrapper.js +42 -25
- package/lib/lowcode/view/style/canvas.less +0 -0
- package/lib/lowcode/view/style/loading.less +0 -0
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/upload/Form/gridForm.js +0 -0
- package/lib/upload/Form/index.js +0 -0
- package/lib/upload/Form/index.less +0 -0
- package/lib/upload/FormItem/index.js +0 -0
- package/lib/upload/GridCell/index.js +0 -0
- package/lib/upload/index.js +0 -0
- package/lib/utils/action.js +0 -0
- package/lib/utils/form.js +0 -0
- package/lib/utils/grid.js +2 -2
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +15 -8
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/engine/provider/ContextProvider.js +0 -157
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
- package/es/lowcode/view/lc-components/Drawer/style.less +0 -7
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -165
- package/lib/lowcode/view/lc-components/Drawer/style.less +0 -7
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _ahooks = require("ahooks");
|
|
14
|
+
var _antd = require("luck-design/antd");
|
|
15
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _lodash = require("lodash");
|
|
17
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
18
|
+
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
19
|
+
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
20
|
+
var _JsonEditor = _interopRequireDefault(require("./code-editor/JsonEditor"));
|
|
21
|
+
var _actionBindModal = _interopRequireDefault(require("../style/action-bind-modal.less"));
|
|
22
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.actionBindModal';
|
|
23
|
+
var _ACTION_CATEGORY_ = [{
|
|
24
|
+
key: 'page-action',
|
|
25
|
+
label: (0, _utils.formatMessage)({
|
|
26
|
+
id: "".concat(_I18N_PREFIX_, ".pageActions"),
|
|
27
|
+
label: '页面行为'
|
|
28
|
+
})
|
|
29
|
+
}, {
|
|
30
|
+
key: 'trigger',
|
|
31
|
+
label: (0, _utils.formatMessage)({
|
|
32
|
+
id: "".concat(_I18N_PREFIX_, ".trigger"),
|
|
33
|
+
label: '触发器'
|
|
34
|
+
})
|
|
35
|
+
}, {
|
|
36
|
+
key: 'custom',
|
|
37
|
+
label: (0, _utils.formatMessage)({
|
|
38
|
+
id: "".concat(_I18N_PREFIX_, ".custom"),
|
|
39
|
+
label: '自定义动作'
|
|
40
|
+
})
|
|
41
|
+
}];
|
|
42
|
+
var _DEFAULT_JSON_CODE_ = '{"datasetCode": "","params":{},"body":{}}';
|
|
43
|
+
var _DEFAULT_JS_CODE_ = 'function todo() {\n\n}';
|
|
44
|
+
var ActionBindModal = function ActionBindModal(_ref) {
|
|
45
|
+
var event = _ref.event,
|
|
46
|
+
_ref$defaultCode = _ref.defaultCode,
|
|
47
|
+
defaultCode = _ref$defaultCode === void 0 ? _DEFAULT_JS_CODE_ : _ref$defaultCode,
|
|
48
|
+
onComfirm = _ref.onComfirm,
|
|
49
|
+
onClose = _ref.onClose;
|
|
50
|
+
var context = (0, _ContextProvider.useContext)();
|
|
51
|
+
var _useRemoteSource = (0, _ContextProvider.useRemoteSource)(),
|
|
52
|
+
module = _useRemoteSource.module;
|
|
53
|
+
var editorRef = (0, _react.useRef)();
|
|
54
|
+
var _useMap = (0, _ahooks.useMap)([]),
|
|
55
|
+
_useMap2 = (0, _slicedToArray2.default)(_useMap, 2),
|
|
56
|
+
actionPool = _useMap2[0],
|
|
57
|
+
_useMap2$ = _useMap2[1],
|
|
58
|
+
set = _useMap2$.set,
|
|
59
|
+
remove = _useMap2$.remove,
|
|
60
|
+
get = _useMap2$.get,
|
|
61
|
+
setAll = _useMap2$.setAll,
|
|
62
|
+
reset = _useMap2$.reset;
|
|
63
|
+
var _useState = (0, _react.useState)('page-action'),
|
|
64
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
65
|
+
category = _useState2[0],
|
|
66
|
+
setCategory = _useState2[1];
|
|
67
|
+
var _useState3 = (0, _react.useState)(void 0),
|
|
68
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
69
|
+
activeKey = _useState4[0],
|
|
70
|
+
setActiveKey = _useState4[1];
|
|
71
|
+
var _useState5 = (0, _react.useState)(void 0),
|
|
72
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
73
|
+
searchValue = _useState6[0],
|
|
74
|
+
setSearchValue = _useState6[1];
|
|
75
|
+
var latestActiveKey = (0, _ahooks.useLatest)(activeKey);
|
|
76
|
+
var options = (0, _ahooks.useCreation)(function () {
|
|
77
|
+
if (category === 'page-action') {
|
|
78
|
+
return (0, _lodash.reduce)(module.actions, function (ret, actionName, actionKey) {
|
|
79
|
+
ret.push({
|
|
80
|
+
key: actionKey,
|
|
81
|
+
label: actionName
|
|
82
|
+
});
|
|
83
|
+
return ret;
|
|
84
|
+
}, []);
|
|
85
|
+
} else if (category === 'trigger') {
|
|
86
|
+
return (0, _lodash.reduce)(context.componentList, function (ret, _ref2) {
|
|
87
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
88
|
+
key = _ref3[0],
|
|
89
|
+
target = _ref3[1];
|
|
90
|
+
ret.push({
|
|
91
|
+
key: key,
|
|
92
|
+
label: "".concat(target.api.getSelfAndParentLCData().node.props.name, "(").concat(key, ")")
|
|
93
|
+
});
|
|
94
|
+
return ret;
|
|
95
|
+
}, []);
|
|
96
|
+
} else if (category === 'custom') {
|
|
97
|
+
return [{
|
|
98
|
+
key: 'coding',
|
|
99
|
+
label: (0, _utils.formatMessage)({
|
|
100
|
+
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
101
|
+
label: '动作编写'
|
|
102
|
+
})
|
|
103
|
+
}];
|
|
104
|
+
}
|
|
105
|
+
return [];
|
|
106
|
+
}, [category]);
|
|
107
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
108
|
+
if (activeKey) {
|
|
109
|
+
var action = get(activeKey);
|
|
110
|
+
editorRef.current.editor.setValue(action.code);
|
|
111
|
+
}
|
|
112
|
+
}, [activeKey]);
|
|
113
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
114
|
+
setAll(event === null || event === void 0 ? void 0 : event.actionPool);
|
|
115
|
+
}, [event]);
|
|
116
|
+
var handleEditorValueChange = (0, _react.useRef)((0, _lodash.debounce)(function (code) {
|
|
117
|
+
if (latestActiveKey.current) {
|
|
118
|
+
var action = get(latestActiveKey.current);
|
|
119
|
+
action.code = code;
|
|
120
|
+
}
|
|
121
|
+
}, 400));
|
|
122
|
+
var handleOptionClick = (0, _ahooks.useMemoizedFn)(function (key) {
|
|
123
|
+
setActiveKey(key);
|
|
124
|
+
var action;
|
|
125
|
+
if (actionPool.has(key)) {
|
|
126
|
+
action = get(key);
|
|
127
|
+
} else {
|
|
128
|
+
var code = category === 'custom' ? event.func || defaultCode : JSON.stringify((0, _objectSpread2.default)({
|
|
129
|
+
moduleCode: module.moduleCode
|
|
130
|
+
}, JSON.parse(_DEFAULT_JSON_CODE_)), null, '\t');
|
|
131
|
+
action = {
|
|
132
|
+
category: category,
|
|
133
|
+
key: key,
|
|
134
|
+
code: code
|
|
135
|
+
};
|
|
136
|
+
set(key, action);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
var handleChecked = (0, _ahooks.useMemoizedFn)(function (key, checked) {
|
|
140
|
+
if (checked) {
|
|
141
|
+
if (activeKey !== key) {
|
|
142
|
+
setActiveKey(key);
|
|
143
|
+
}
|
|
144
|
+
var code = category === 'custom' ? event.func || defaultCode : JSON.stringify((0, _objectSpread2.default)({
|
|
145
|
+
moduleCode: module.moduleCode
|
|
146
|
+
}, JSON.parse(_DEFAULT_JSON_CODE_)), null, '\t');
|
|
147
|
+
set(key, {
|
|
148
|
+
category: category,
|
|
149
|
+
key: key,
|
|
150
|
+
code: code
|
|
151
|
+
});
|
|
152
|
+
} else {
|
|
153
|
+
if (activeKey === key) {
|
|
154
|
+
setActiveKey(void 0);
|
|
155
|
+
}
|
|
156
|
+
remove(key);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
var handleClose = (0, _ahooks.useMemoizedFn)(function () {
|
|
160
|
+
onClose();
|
|
161
|
+
reset();
|
|
162
|
+
setCategory('page-action');
|
|
163
|
+
setActiveKey(void 0);
|
|
164
|
+
setSearchValue(void 0);
|
|
165
|
+
});
|
|
166
|
+
var handleComfirm = (0, _ahooks.useMemoizedFn)(function () {
|
|
167
|
+
onComfirm(Array.from(actionPool), event);
|
|
168
|
+
handleClose();
|
|
169
|
+
});
|
|
170
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
171
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal'],
|
|
172
|
+
bodyStyle: {
|
|
173
|
+
marginTop: 0,
|
|
174
|
+
padding: '4px 24px'
|
|
175
|
+
},
|
|
176
|
+
title: event === null || event === void 0 ? void 0 : event.name,
|
|
177
|
+
visible: !!event,
|
|
178
|
+
width: 960,
|
|
179
|
+
closable: false,
|
|
180
|
+
maskClosable: false,
|
|
181
|
+
getContainer: function getContainer() {
|
|
182
|
+
return document.getElementById('lc-design-workspace');
|
|
183
|
+
},
|
|
184
|
+
zIndex: 3000,
|
|
185
|
+
onCancel: handleClose,
|
|
186
|
+
onOk: handleComfirm
|
|
187
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
188
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body']
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
190
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-left']
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
192
|
+
id: "".concat(_I18N_PREFIX_, ".bind"),
|
|
193
|
+
label: '绑定动作'
|
|
194
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
195
|
+
className: _actionBindModal.default['selector-box']
|
|
196
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
197
|
+
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['action-category'])
|
|
198
|
+
}, _ACTION_CATEGORY_.map(function (_ref4) {
|
|
199
|
+
var key = _ref4.key,
|
|
200
|
+
label = _ref4.label;
|
|
201
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
202
|
+
key: key,
|
|
203
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, key === category)),
|
|
204
|
+
onClick: function onClick() {
|
|
205
|
+
setCategory(key);
|
|
206
|
+
setActiveKey(void 0);
|
|
207
|
+
}
|
|
208
|
+
}, label, key === category && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
209
|
+
type: "check",
|
|
210
|
+
className: _actionBindModal.default['check-icon']
|
|
211
|
+
}));
|
|
212
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
213
|
+
className: _actionBindModal.default['selecter-items-box']
|
|
214
|
+
}, category !== 'custom' && /*#__PURE__*/_react.default.createElement("div", {
|
|
215
|
+
style: {
|
|
216
|
+
height: 42,
|
|
217
|
+
display: 'flex',
|
|
218
|
+
justifyContent: 'center'
|
|
219
|
+
}
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Input.Search, {
|
|
221
|
+
placeholder: (0, _utils.formatMessage)({
|
|
222
|
+
id: "".concat(_I18N_PREFIX_, ".search"),
|
|
223
|
+
label: '搜索'
|
|
224
|
+
}),
|
|
225
|
+
size: "small",
|
|
226
|
+
onChange: function onChange(e) {
|
|
227
|
+
return setSearchValue(e.target.value);
|
|
228
|
+
},
|
|
229
|
+
style: {
|
|
230
|
+
width: 170,
|
|
231
|
+
alignSelf: 'center'
|
|
232
|
+
}
|
|
233
|
+
})), /*#__PURE__*/_react.default.createElement("ul", {
|
|
234
|
+
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['selecter-items'])
|
|
235
|
+
}, options.filter(function (_ref5) {
|
|
236
|
+
var key = _ref5.key,
|
|
237
|
+
label = _ref5.label;
|
|
238
|
+
return !searchValue || "".concat(key, " ").concat(label).toLowerCase().includes(searchValue.toLowerCase());
|
|
239
|
+
}).map(function (_ref6) {
|
|
240
|
+
var key = _ref6.key,
|
|
241
|
+
label = _ref6.label;
|
|
242
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
243
|
+
key: key,
|
|
244
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, key === activeKey)),
|
|
245
|
+
onClick: function onClick() {
|
|
246
|
+
return handleOptionClick(key);
|
|
247
|
+
}
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
249
|
+
checked: actionPool.has(key),
|
|
250
|
+
style: {
|
|
251
|
+
marginRight: 4
|
|
252
|
+
},
|
|
253
|
+
onChange: function onChange(e) {
|
|
254
|
+
return handleChecked(key, e.target.checked);
|
|
255
|
+
},
|
|
256
|
+
onClick: function onClick(e) {
|
|
257
|
+
return e.stopPropagation();
|
|
258
|
+
}
|
|
259
|
+
}), label);
|
|
260
|
+
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
261
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-right']
|
|
262
|
+
}, category === 'page-action' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
263
|
+
id: "".concat(_I18N_PREFIX_, ".params"),
|
|
264
|
+
label: '配置参数'
|
|
265
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
266
|
+
title: (0, _utils.formatMessage)({
|
|
267
|
+
id: "".concat(_I18N_PREFIX_, ".params.info"),
|
|
268
|
+
label: '请勿随意修改配置参数结构和参数名称,参数异常可能会导致请求失败'
|
|
269
|
+
}),
|
|
270
|
+
getPopupContainer: function getPopupContainer() {
|
|
271
|
+
return document.getElementById('lc-design-workspace');
|
|
272
|
+
},
|
|
273
|
+
zIndex: 3000
|
|
274
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
275
|
+
style: {
|
|
276
|
+
marginLeft: 4
|
|
277
|
+
},
|
|
278
|
+
type: "exclamation-circle"
|
|
279
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
280
|
+
className: _actionBindModal.default['code-box']
|
|
281
|
+
}, activeKey ? /*#__PURE__*/_react.default.createElement(_JsonEditor.default, {
|
|
282
|
+
ref: editorRef,
|
|
283
|
+
onChange: handleEditorValueChange.current
|
|
284
|
+
}) : (0, _utils.formatMessage)({
|
|
285
|
+
id: "".concat(_I18N_PREFIX_, ".noActionSelected"),
|
|
286
|
+
label: '请在右侧选择行为项'
|
|
287
|
+
}))), category === 'custom' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
288
|
+
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
289
|
+
label: '动作编写'
|
|
290
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
291
|
+
className: _actionBindModal.default['code-box']
|
|
292
|
+
}, activeKey ? /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
293
|
+
ref: editorRef,
|
|
294
|
+
onChange: handleEditorValueChange.current
|
|
295
|
+
}) : (0, _utils.formatMessage)({
|
|
296
|
+
id: "".concat(_I18N_PREFIX_, ".noActionSelected"),
|
|
297
|
+
label: '请在右侧选择行为项'
|
|
298
|
+
}))))));
|
|
299
|
+
};
|
|
300
|
+
var _default = exports.default = ActionBindModal;
|
|
@@ -0,0 +1,148 @@
|
|
|
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.default = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _antd = require("luck-design/antd");
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
+
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
|
20
|
+
var _ActionBindModal = _interopRequireDefault(require("./ActionBindModal"));
|
|
21
|
+
var _excluded = ["events"],
|
|
22
|
+
_excluded2 = ["events"];
|
|
23
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.advancePanel';
|
|
24
|
+
var EventItem = _styledComponents.default.div.withConfig({
|
|
25
|
+
displayName: "EventItem",
|
|
26
|
+
componentId: "luckda-6530__sc-6426fo-0"
|
|
27
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:4px 8px;border:1px solid #e5e6e8;border-radius:6px;margin-bottom:6px;font-size:12px;i{color:rgba(0,0,0,0.4);cursor:pointer;}i:not(:last-child){margin-right:6px;}"]);
|
|
28
|
+
var AdvancePanel = function AdvancePanel(_ref) {
|
|
29
|
+
var meta = _ref.meta,
|
|
30
|
+
value = _ref.value,
|
|
31
|
+
onChange = _ref.onChange;
|
|
32
|
+
var _useState = (0, _react.useState)((value === null || value === void 0 ? void 0 : value.events) || {}),
|
|
33
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
|
+
events = _useState2[0],
|
|
35
|
+
setEvents = _useState2[1];
|
|
36
|
+
var _useState3 = (0, _react.useState)(null),
|
|
37
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
38
|
+
event = _useState4[0],
|
|
39
|
+
setEvent = _useState4[1];
|
|
40
|
+
var metaMap = (0, _ahooks.useCreation)(function () {
|
|
41
|
+
var _meta$advance;
|
|
42
|
+
return (0, _lodash.keyBy)((meta === null || meta === void 0 || (_meta$advance = meta.advance) === null || _meta$advance === void 0 ? void 0 : _meta$advance.events) || [], 'key');
|
|
43
|
+
}, [meta]);
|
|
44
|
+
var handleEventClick = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
45
|
+
var payload = e.item.props.payload;
|
|
46
|
+
setEvent((0, _objectSpread3.default)((0, _objectSpread3.default)({}, payload), {}, {
|
|
47
|
+
actionPool: null
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
var handleDeleteEvent = (0, _ahooks.useMemoizedFn)(function (ek) {
|
|
51
|
+
var _ref2 = value || {},
|
|
52
|
+
events = _ref2.events,
|
|
53
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
54
|
+
var _events = (0, _lodash.omit)(events, [ek]);
|
|
55
|
+
setEvents(_events);
|
|
56
|
+
onChange((0, _objectSpread3.default)((0, _objectSpread3.default)({}, rest), {}, {
|
|
57
|
+
events: _events
|
|
58
|
+
}));
|
|
59
|
+
});
|
|
60
|
+
var handleComfirm = (0, _ahooks.useMemoizedFn)(function (actionPool) {
|
|
61
|
+
var _ref3 = value || {},
|
|
62
|
+
events = _ref3.events,
|
|
63
|
+
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
64
|
+
var _events = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, events), {}, (0, _defineProperty2.default)({}, event.key, actionPool));
|
|
65
|
+
setEvents(_events);
|
|
66
|
+
onChange((0, _objectSpread3.default)((0, _objectSpread3.default)({}, rest), {}, {
|
|
67
|
+
events: _events
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
var eventsMenu = (0, _ahooks.useCreation)(function () {
|
|
71
|
+
var _meta$advance2;
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
73
|
+
onClick: handleEventClick,
|
|
74
|
+
style: {
|
|
75
|
+
fontSize: 12
|
|
76
|
+
}
|
|
77
|
+
}, (_meta$advance2 = meta.advance) === null || _meta$advance2 === void 0 || (_meta$advance2 = _meta$advance2.events) === null || _meta$advance2 === void 0 ? void 0 : _meta$advance2.map(function (event) {
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
79
|
+
key: event.key,
|
|
80
|
+
payload: event
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
82
|
+
title: event.desc || event.name,
|
|
83
|
+
placement: "left",
|
|
84
|
+
getPopupContainer: function getPopupContainer() {
|
|
85
|
+
return document.getElementById('lc-design-workspace');
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
style: {
|
|
89
|
+
width: '100%',
|
|
90
|
+
fontSize: 12
|
|
91
|
+
}
|
|
92
|
+
}, event.name)));
|
|
93
|
+
}));
|
|
94
|
+
}, []);
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
96
|
+
field: "events",
|
|
97
|
+
label: (0, _utils.formatMessage)({
|
|
98
|
+
id: "".concat(_I18N_PREFIX_, ".events"),
|
|
99
|
+
label: '事件'
|
|
100
|
+
}),
|
|
101
|
+
bodyStyle: {
|
|
102
|
+
padding: '12px 16px'
|
|
103
|
+
}
|
|
104
|
+
}, (0, _lodash.keys)(events).map(function (ek) {
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(EventItem, null, /*#__PURE__*/_react.default.createElement("span", null, metaMap[ek].name), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
106
|
+
title: (0, _utils.formatMessage)({
|
|
107
|
+
id: 'luckda.lowcode.painter.edit',
|
|
108
|
+
label: '编辑'
|
|
109
|
+
})
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
111
|
+
type: "edit",
|
|
112
|
+
onClick: function onClick() {
|
|
113
|
+
return setEvent((0, _objectSpread3.default)((0, _objectSpread3.default)({}, metaMap[ek]), {}, {
|
|
114
|
+
actionPool: events[ek]
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
118
|
+
title: (0, _utils.formatMessage)({
|
|
119
|
+
id: 'luckda.lowcode.painter.delete',
|
|
120
|
+
label: '删除'
|
|
121
|
+
})
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
123
|
+
type: "delete",
|
|
124
|
+
onClick: function onClick() {
|
|
125
|
+
return handleDeleteEvent(ek);
|
|
126
|
+
}
|
|
127
|
+
}))));
|
|
128
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
129
|
+
overlay: eventsMenu,
|
|
130
|
+
placement: "bottomCenter",
|
|
131
|
+
getPopupContainer: function getPopupContainer() {
|
|
132
|
+
return document.getElementById('lc-design-workspace');
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
135
|
+
size: "small",
|
|
136
|
+
block: true
|
|
137
|
+
}, (0, _utils.formatMessage)({
|
|
138
|
+
id: "".concat(_I18N_PREFIX_, ".addEventAction"),
|
|
139
|
+
label: '添加事件动作'
|
|
140
|
+
})))), /*#__PURE__*/_react.default.createElement(_ActionBindModal.default, {
|
|
141
|
+
event: event,
|
|
142
|
+
onComfirm: handleComfirm,
|
|
143
|
+
onClose: function onClose() {
|
|
144
|
+
return setEvent(null);
|
|
145
|
+
}
|
|
146
|
+
}));
|
|
147
|
+
};
|
|
148
|
+
var _default = exports.default = AdvancePanel;
|
|
@@ -0,0 +1,153 @@
|
|
|
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.default = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _antd = require("luck-design/antd");
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
19
|
+
var _panelItemFactory = _interopRequireDefault(require("../../engine/factory/panel-item-factory"));
|
|
20
|
+
var _PanelItem = _interopRequireDefault(require("./PanelItem"));
|
|
21
|
+
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
|
22
|
+
var _panelAttrs = _interopRequireDefault(require("../style/panel-attrs.less"));
|
|
23
|
+
var _excluded = ["type", "key", "valueKey", "name", "desc", "default", "props", "wrapper", "wrapperProps", "next", "repositioning"];
|
|
24
|
+
var AttrsPanel = function AttrsPanel(_ref) {
|
|
25
|
+
var _nextRef$current2, _nextRef$current3;
|
|
26
|
+
var meta = _ref.meta,
|
|
27
|
+
value = _ref.value,
|
|
28
|
+
onChange = _ref.onChange;
|
|
29
|
+
var nextRef = (0, _react.useRef)(null);
|
|
30
|
+
var factory = (0, _react.useRef)(new _panelItemFactory.default());
|
|
31
|
+
var _useBoolean = (0, _ahooks.useBoolean)(false),
|
|
32
|
+
_useBoolean2 = (0, _slicedToArray2.default)(_useBoolean, 2),
|
|
33
|
+
open = _useBoolean2[0],
|
|
34
|
+
_useBoolean2$ = _useBoolean2[1],
|
|
35
|
+
setTrue = _useBoolean2$.setTrue,
|
|
36
|
+
setFalse = _useBoolean2$.setFalse;
|
|
37
|
+
var context = (0, _ContextProvider.useContext)();
|
|
38
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, val, repositioning) {
|
|
39
|
+
var _nextRef$current;
|
|
40
|
+
onChange(field, val, repositioning);
|
|
41
|
+
if ((_nextRef$current = nextRef.current) !== null && _nextRef$current !== void 0 && _nextRef$current.autoClose) {
|
|
42
|
+
setFalse();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var goNext = (0, _ahooks.useMemoizedFn)(function (_next, dynamicProps) {
|
|
46
|
+
if (!_next) return;
|
|
47
|
+
nextRef.current = {
|
|
48
|
+
name: _next.name,
|
|
49
|
+
autoClose: _next.autoClose,
|
|
50
|
+
NextComp: renderPanelItems(_next.props, dynamicProps)
|
|
51
|
+
};
|
|
52
|
+
setTrue();
|
|
53
|
+
});
|
|
54
|
+
var renderPanelItems = (0, _ahooks.useMemoizedFn)(function (items, dynamicProps) {
|
|
55
|
+
var _context$componentMap = context.componentMap.get(value.id).api.getSelfAndParentLCData(),
|
|
56
|
+
node = _context$componentMap.node;
|
|
57
|
+
return items.map(function (_ref2) {
|
|
58
|
+
var type = _ref2.type,
|
|
59
|
+
key = _ref2.key,
|
|
60
|
+
valueKey = _ref2.valueKey,
|
|
61
|
+
name = _ref2.name,
|
|
62
|
+
desc = _ref2.desc,
|
|
63
|
+
defaultValue = _ref2.default,
|
|
64
|
+
props = _ref2.props,
|
|
65
|
+
wrapper = _ref2.wrapper,
|
|
66
|
+
wrapperProps = _ref2.wrapperProps,
|
|
67
|
+
_next2 = _ref2.next,
|
|
68
|
+
repositioning = _ref2.repositioning,
|
|
69
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
70
|
+
var Comp = factory.current.getPanelItemFor((0, _lodash.startsWith)(type, '_') ? 'dynamic' : type, type);
|
|
71
|
+
if (type === 'group') {
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(Comp, {
|
|
73
|
+
nodeId: value.id,
|
|
74
|
+
key: key,
|
|
75
|
+
field: key,
|
|
76
|
+
label: name,
|
|
77
|
+
next: _next2 ? function (_dp) {
|
|
78
|
+
return goNext(_next2, _dp);
|
|
79
|
+
} : null,
|
|
80
|
+
defaultCollapsed: defaultValue,
|
|
81
|
+
desc: desc
|
|
82
|
+
}, renderPanelItems(props || [], dynamicProps));
|
|
83
|
+
}
|
|
84
|
+
var _originalVal = (0, _lodash.get)(node.props, valueKey || key);
|
|
85
|
+
var comp = Comp && /*#__PURE__*/_react.default.createElement(Comp, (0, _extends2.default)({
|
|
86
|
+
nodeId: value.id,
|
|
87
|
+
key: key,
|
|
88
|
+
defaultValue: (0, _lodash.isNil)(_originalVal) ? defaultValue : _originalVal,
|
|
89
|
+
next: function next(_dp) {
|
|
90
|
+
return goNext(_next2, _dp);
|
|
91
|
+
},
|
|
92
|
+
onChange: function onChange(val) {
|
|
93
|
+
return handleChange(valueKey || key, val, repositioning);
|
|
94
|
+
},
|
|
95
|
+
size: "small",
|
|
96
|
+
settings: node.props,
|
|
97
|
+
renderPanelItems: renderPanelItems
|
|
98
|
+
}, rest, dynamicProps));
|
|
99
|
+
if (wrapper === 'hidden') return comp;
|
|
100
|
+
var Wrapper = wrapper === 'collapse' ? _Collapse.default : _PanelItem.default;
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(Wrapper, (0, _extends2.default)({
|
|
102
|
+
key: key,
|
|
103
|
+
nodeId: value.id,
|
|
104
|
+
field: key,
|
|
105
|
+
label: name,
|
|
106
|
+
desc: desc
|
|
107
|
+
}, wrapperProps), comp);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
var PropsComps = (0, _ahooks.useCreation)(function () {
|
|
111
|
+
setFalse();
|
|
112
|
+
if (!meta) {
|
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
114
|
+
}
|
|
115
|
+
return renderPanelItems(meta.props);
|
|
116
|
+
}, [value]);
|
|
117
|
+
(0, _react.useEffect)(function () {
|
|
118
|
+
if (!open) {
|
|
119
|
+
nextRef.current = null;
|
|
120
|
+
}
|
|
121
|
+
}, [open]);
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
id: "lc-painter-panel-attrs-container",
|
|
124
|
+
className: (0, _classnames.default)(_panelAttrs.default['lc-painter-panel-attrs'], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _panelAttrs.default.hidden, !value), _panelAttrs.default.showNext, open))
|
|
125
|
+
}, PropsComps, /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
126
|
+
visible: open,
|
|
127
|
+
width: 320,
|
|
128
|
+
mask: false,
|
|
129
|
+
closable: false,
|
|
130
|
+
getContainer: false,
|
|
131
|
+
destroyOnClose: true,
|
|
132
|
+
style: {
|
|
133
|
+
position: 'absolute',
|
|
134
|
+
transform: 'none'
|
|
135
|
+
},
|
|
136
|
+
bodyStyle: {
|
|
137
|
+
padding: 0,
|
|
138
|
+
height: '100%'
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: _panelAttrs.default['lc-painter-panel-attrs-next']
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: _panelAttrs.default['lc-painter-panel-attrs-next-header'],
|
|
144
|
+
onClick: setFalse
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
146
|
+
type: "left"
|
|
147
|
+
}), (_nextRef$current2 = nextRef.current) === null || _nextRef$current2 === void 0 ? void 0 : _nextRef$current2.name, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
148
|
+
type: "close"
|
|
149
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
className: _panelAttrs.default['lc-painter-panel-attrs-next-body']
|
|
151
|
+
}, (_nextRef$current3 = nextRef.current) === null || _nextRef$current3 === void 0 ? void 0 : _nextRef$current3.NextComp))));
|
|
152
|
+
};
|
|
153
|
+
var _default = exports.default = AttrsPanel;
|