@luck-design-biz/luckda 0.0.24-2 → 0.0.25-2
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 +6 -4
- 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/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdGrid/index.js +14 -8
- package/es/components/LdGridForm/index.js +5 -4
- 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/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +230 -0
- package/es/lowcode/constants/api-url.js +464 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +31 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +4 -3
- package/es/lowcode/engine/meta/box.props.json +2 -4
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +9 -9
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +2 -3
- package/es/lowcode/engine/meta/components-list.json +1 -1
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +1 -2
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +1 -2
- package/es/lowcode/engine/meta/form.props.default.json +52 -4
- package/es/lowcode/engine/meta/form.props.json +596 -64
- 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 +3 -3
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +2 -2
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- 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 +3 -3
- 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 +7 -6
- package/es/lowcode/engine/meta/section.props.json +52 -49
- 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 +23 -3
- package/es/lowcode/engine/meta/table.props.json +257 -55
- 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 +3 -3
- 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 +177 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +174 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +97 -18
- package/es/lowcode/engine/tools/useCanvasRender.js +73 -0
- package/es/lowcode/engine/tools/usePromiseState.js +23 -12
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +1 -0
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +34 -2
- package/es/lowcode/painter/DesignOperator.js +48 -31
- package/es/lowcode/painter/DesignToolbar.js +324 -16
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +99 -142
- 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 +20 -9
- package/es/lowcode/painter/components/ColorInput.js +5 -3
- 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 +44 -0
- package/es/lowcode/painter/components/ListEditor.js +26 -11
- package/es/lowcode/painter/components/PanelItem.js +1 -1
- package/es/lowcode/painter/components/PopConfirm.js +10 -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 +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +154 -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 +438 -0
- package/es/lowcode/painter/components/field-setting/index.js +373 -0
- package/es/lowcode/painter/index.js +3 -28
- 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/{components/actions-editor → panel-section/ActionsEditor}/index.js +74 -13
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +27 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +45 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +235 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +329 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +20 -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 +6 -7
- 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/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -22
- package/es/lowcode/painter/panel-section/TabItems.js +46 -30
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +66 -6
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/collapse.less +6 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +7 -4
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/list-editor.less +36 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +27 -0
- package/es/lowcode/view/Canvas.js +34 -139
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +16 -14
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +11 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +2 -4
- 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 +43 -20
- package/es/lowcode/view/lc-components/Button/meta.json +9 -9
- 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 +2 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -24
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +1 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/es/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +1 -2
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +93 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +290 -13
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +546 -64
- 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/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +2 -2
- 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 +3 -3
- 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 +23 -22
- 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/meta.json +1 -2
- 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 +3 -3
- 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 +31 -2
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +115 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +48 -49
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +57 -2
- 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 +41 -4
- 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 +365 -48
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +70 -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/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +3 -3
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- 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/page.less +3 -0
- package/es/services.js +5 -3
- package/es/upload/Form/gridForm.js +7 -3
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +4 -1
- 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/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGridForm/index.js +4 -3
- 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/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +236 -0
- package/lib/lowcode/constants/api-url.js +465 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +32 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +4 -3
- package/lib/lowcode/engine/meta/box.props.json +2 -4
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +9 -9
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +2 -3
- package/lib/lowcode/engine/meta/components-list.json +1 -1
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +1 -2
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +1 -2
- package/lib/lowcode/engine/meta/form.props.default.json +52 -4
- package/lib/lowcode/engine/meta/form.props.json +596 -64
- 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 +3 -3
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +2 -2
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- 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 +3 -3
- 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 +7 -6
- package/lib/lowcode/engine/meta/section.props.json +52 -49
- 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 +23 -3
- package/lib/lowcode/engine/meta/table.props.json +257 -55
- 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 +3 -3
- 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 +185 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +182 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +101 -17
- package/lib/lowcode/engine/tools/useCanvasRender.js +88 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +22 -12
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +7 -0
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +32 -0
- package/lib/lowcode/painter/DesignOperator.js +45 -28
- package/lib/lowcode/painter/DesignToolbar.js +321 -13
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +96 -139
- 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 +20 -9
- package/lib/lowcode/painter/components/ColorInput.js +5 -3
- 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 +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +25 -10
- package/lib/lowcode/painter/components/PanelItem.js +1 -1
- package/lib/lowcode/painter/components/PopConfirm.js +10 -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 +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +161 -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 +446 -0
- package/lib/lowcode/painter/components/field-setting/index.js +380 -0
- package/lib/lowcode/painter/index.js +3 -30
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +20 -66
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +71 -10
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +34 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +52 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +242 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +337 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +27 -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 +5 -6
- 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/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -23
- package/lib/lowcode/painter/panel-section/TabItems.js +45 -29
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +67 -6
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/collapse.less +6 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +7 -4
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/list-editor.less +36 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +35 -0
- package/lib/lowcode/view/Canvas.js +32 -145
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +12 -10
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +11 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +2 -4
- 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 +41 -18
- package/lib/lowcode/view/lc-components/Button/meta.json +9 -9
- 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 +2 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +15 -24
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +94 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +289 -12
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +546 -64
- 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/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +2 -2
- 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 +3 -3
- 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 +24 -22
- 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/meta.json +1 -2
- 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 +3 -3
- 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 +31 -2
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +114 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +58 -2
- 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 +43 -5
- 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 +364 -47
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +71 -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/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- 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/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/upload/Form/gridForm.js +7 -3
- package/lib/utils/grid.js +2 -2
- package/package.json +12 -7
- package/es/lowcode/engine/provider/ContextProvider.js +0 -169
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +0 -147
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -177
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
|
@@ -1,44 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
var
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
13
|
var _ahooks = require("ahooks");
|
|
16
14
|
var _antd = require("luck-design/antd");
|
|
17
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
18
16
|
var _lodash = require("lodash");
|
|
17
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
19
18
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
20
|
-
var
|
|
21
|
-
var
|
|
19
|
+
var _AttrsPanel = _interopRequireDefault(require("./components/AttrsPanel"));
|
|
20
|
+
var _StylePanel = _interopRequireDefault(require("./panel-section/StylePanel"));
|
|
21
|
+
var _AdvancePanel = _interopRequireDefault(require("./components/AdvancePanel"));
|
|
22
22
|
var _dataProcess = require("../engine/tools/dataProcess");
|
|
23
23
|
var _panel = _interopRequireDefault(require("./style/panel.less"));
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var _constants = require("../constants");
|
|
25
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel';
|
|
26
26
|
var _TAB_LIST_ = [{
|
|
27
|
-
title:
|
|
27
|
+
title: (0, _utils.formatMessage)({
|
|
28
|
+
id: "".concat(_I18N_PREFIX_, ".attrs"),
|
|
29
|
+
label: '属性'
|
|
30
|
+
}),
|
|
28
31
|
key: 'attrs'
|
|
29
32
|
}, {
|
|
30
|
-
title:
|
|
31
|
-
|
|
33
|
+
title: (0, _utils.formatMessage)({
|
|
34
|
+
id: "".concat(_I18N_PREFIX_, ".css"),
|
|
35
|
+
label: '样式'
|
|
36
|
+
}),
|
|
37
|
+
key: 'css'
|
|
32
38
|
}, {
|
|
33
|
-
title:
|
|
39
|
+
title: (0, _utils.formatMessage)({
|
|
40
|
+
id: "".concat(_I18N_PREFIX_, ".advance"),
|
|
41
|
+
label: '高级'
|
|
42
|
+
}),
|
|
34
43
|
key: 'advance'
|
|
35
44
|
}];
|
|
36
45
|
var Panel = function Panel() {
|
|
37
|
-
var _nextRef$current, _nextRef$current2;
|
|
38
46
|
var activeTabRef = (0, _react.useRef)(null);
|
|
39
47
|
var underLineRef = (0, _react.useRef)(null);
|
|
40
|
-
var nextRef = (0, _react.useRef)(null);
|
|
41
|
-
var factory = (0, _react.useRef)(new _panelItemFactory.default());
|
|
42
48
|
var _useState = (0, _react.useState)(null),
|
|
43
49
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
44
50
|
activeNode = _useState2[0],
|
|
@@ -47,107 +53,59 @@ var Panel = function Panel() {
|
|
|
47
53
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
48
54
|
activeTabKey = _useState4[0],
|
|
49
55
|
setActiveTabKey = _useState4[1];
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
var context = (0, _ContextProvider.useContext)();
|
|
57
|
+
var _usePageData = (0, _ContextProvider.usePageData)(),
|
|
58
|
+
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
59
|
+
pageData = _usePageData2[0],
|
|
60
|
+
setPageData = _usePageData2[1].setPageData;
|
|
61
|
+
var meta = (0, _ahooks.useCreation)(function () {
|
|
62
|
+
try {
|
|
63
|
+
return (0, _lodash.isNil)(activeNode) ? null : require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
64
|
+
} catch (e) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}, [activeNode]);
|
|
57
68
|
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value, repositioning) {
|
|
69
|
+
if (field === 'enableHeader') {
|
|
70
|
+
if (value) {
|
|
71
|
+
var headerMeta = require("../engine/meta/pageheader.props.default.json");
|
|
72
|
+
(0, _dataProcess.add)(pageData, _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT, _constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headerMeta), {}, {
|
|
73
|
+
buildIn: true
|
|
74
|
+
}));
|
|
75
|
+
} else {
|
|
76
|
+
(0, _dataProcess.deleteById)(pageData, _constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER);
|
|
77
|
+
}
|
|
78
|
+
} else if (field === 'enableFooter') {
|
|
79
|
+
if (value) {
|
|
80
|
+
var footerMeta = require("../engine/meta/pagefooter.props.default.json");
|
|
81
|
+
(0, _dataProcess.add)(pageData, _constants.LC_BUILDIN_UNIT_KEY.PAGE_ROOT, _constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, footerMeta), {}, {
|
|
82
|
+
buildIn: true
|
|
83
|
+
}));
|
|
84
|
+
} else {
|
|
85
|
+
(0, _dataProcess.deleteById)(pageData, _constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
58
88
|
var component = context.componentMap.get(activeNode.node.id);
|
|
59
89
|
var _component$api$getSel = component.api.getSelfAndParentLCData(),
|
|
60
90
|
node = _component$api$getSel.node;
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
91
|
+
var oldValue = (0, _defineProperty2.default)({}, field, (0, _lodash.get)(node.props, field));
|
|
92
|
+
var newNodeData = (0, _lodash.set)(node.props, field, value);
|
|
93
|
+
(0, _dataProcess.modifyById)(pageData, activeNode.node.id, newNodeData);
|
|
94
|
+
setPageData(pageData).then(function (newData) {
|
|
64
95
|
context.$publisher(context.topics.COMPONENT_MODIFY, {
|
|
65
96
|
id: activeNode.node.id,
|
|
66
|
-
pageData:
|
|
97
|
+
pageData: newData,
|
|
98
|
+
oldValue: oldValue,
|
|
99
|
+
newValue: (0, _defineProperty2.default)({}, field, value)
|
|
67
100
|
});
|
|
68
101
|
if (repositioning) context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
69
102
|
id: activeNode.node.id
|
|
70
103
|
});
|
|
71
104
|
});
|
|
72
|
-
if (nextRef.current.autoClose) {
|
|
73
|
-
setFalse();
|
|
74
|
-
}
|
|
75
105
|
});
|
|
76
|
-
var handleStyleChange = (0, _ahooks.useMemoizedFn)(function (newStyle, newCss) {
|
|
77
|
-
console.log('style', newStyle, newCss);
|
|
78
|
-
// setCss(newCss);
|
|
79
|
-
});
|
|
80
|
-
var goNext = (0, _ahooks.useMemoizedFn)(function (_next) {
|
|
81
|
-
if (!_next) return;
|
|
82
|
-
nextRef.current = {
|
|
83
|
-
name: _next.name,
|
|
84
|
-
autoClose: _next.autoClose,
|
|
85
|
-
NextComp: renderPanelItems(_next.props)
|
|
86
|
-
};
|
|
87
|
-
setTrue();
|
|
88
|
-
});
|
|
89
|
-
var renderPanelItems = (0, _ahooks.useMemoizedFn)(function (items) {
|
|
90
|
-
return items.map(function (_ref) {
|
|
91
|
-
var type = _ref.type,
|
|
92
|
-
key = _ref.key,
|
|
93
|
-
name = _ref.name,
|
|
94
|
-
desc = _ref.desc,
|
|
95
|
-
defaultValue = _ref.default,
|
|
96
|
-
props = _ref.props,
|
|
97
|
-
panelItem = _ref.panelItem,
|
|
98
|
-
_next2 = _ref.next,
|
|
99
|
-
repositioning = _ref.repositioning,
|
|
100
|
-
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
101
|
-
var Comp = factory.current.getPanelItemFor((0, _lodash.startsWith)(type, '_') ? 'dynamic' : type, type);
|
|
102
|
-
if (type === 'group') {
|
|
103
|
-
return /*#__PURE__*/_react.default.createElement(Comp, {
|
|
104
|
-
key: key,
|
|
105
|
-
field: key,
|
|
106
|
-
label: name,
|
|
107
|
-
next: _next2 ? function () {
|
|
108
|
-
return goNext(_next2);
|
|
109
|
-
} : null,
|
|
110
|
-
defaultCollapsed: defaultValue,
|
|
111
|
-
desc: desc
|
|
112
|
-
}, renderPanelItems(props || []));
|
|
113
|
-
}
|
|
114
|
-
var _context$componentMap = context.componentMap.get(activeNode.node.id).api.getSelfAndParentLCData(),
|
|
115
|
-
node = _context$componentMap.node;
|
|
116
|
-
return /*#__PURE__*/_react.default.createElement(_PanelItem.default, (0, _extends2.default)({
|
|
117
|
-
key: key,
|
|
118
|
-
field: key,
|
|
119
|
-
label: name,
|
|
120
|
-
desc: desc
|
|
121
|
-
}, panelItem), Comp && /*#__PURE__*/_react.default.createElement(Comp, (0, _extends2.default)({
|
|
122
|
-
defaultValue: (0, _lodash.isNil)(node.props[key]) ? defaultValue : node.props[key],
|
|
123
|
-
next: function next() {
|
|
124
|
-
return goNext(_next2);
|
|
125
|
-
},
|
|
126
|
-
onChange: function onChange(value) {
|
|
127
|
-
return handleChange(key, value, repositioning);
|
|
128
|
-
},
|
|
129
|
-
size: "small"
|
|
130
|
-
}, rest)));
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
var PropsComps = (0, _ahooks.useCreation)(function () {
|
|
134
|
-
setActiveTabKey('attrs');
|
|
135
|
-
var _meta;
|
|
136
|
-
try {
|
|
137
|
-
_meta = require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
138
|
-
} catch (e) {
|
|
139
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
140
|
-
}
|
|
141
|
-
return renderPanelItems(_meta.props);
|
|
142
|
-
}, [activeNode]);
|
|
143
|
-
(0, _react.useEffect)(function () {
|
|
144
|
-
if (!open) {
|
|
145
|
-
nextRef.current = null;
|
|
146
|
-
}
|
|
147
|
-
}, [open]);
|
|
148
106
|
(0, _react.useEffect)(function () {
|
|
149
107
|
var _id = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
150
|
-
|
|
108
|
+
setActiveTabKey('attrs');
|
|
151
109
|
if (!payload.id) {
|
|
152
110
|
setActiveNode(null);
|
|
153
111
|
return;
|
|
@@ -162,12 +120,12 @@ var Panel = function Panel() {
|
|
|
162
120
|
});
|
|
163
121
|
}).watch();
|
|
164
122
|
return function () {
|
|
165
|
-
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
123
|
+
return context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
166
124
|
};
|
|
167
125
|
}, []);
|
|
168
126
|
(0, _react.useLayoutEffect)(function () {
|
|
169
127
|
underLineRef.current.style.left = "".concat(activeTabRef.current.offsetLeft + activeTabRef.current.offsetWidth / 2 - 10, "px");
|
|
170
|
-
}, [activeTabKey,
|
|
128
|
+
}, [activeTabKey, meta === null || meta === void 0 ? void 0 : meta.component]);
|
|
171
129
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
172
130
|
className: _panel.default['lc-painter-panel']
|
|
173
131
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -177,9 +135,9 @@ var Panel = function Panel() {
|
|
|
177
135
|
style: {
|
|
178
136
|
fontSize: 12
|
|
179
137
|
}
|
|
180
|
-
}, activeNode === null || activeNode === void 0 ? void 0 : activeNode.level.map(function (
|
|
181
|
-
var id =
|
|
182
|
-
name =
|
|
138
|
+
}, activeNode === null || activeNode === void 0 ? void 0 : activeNode.level.map(function (_ref) {
|
|
139
|
+
var id = _ref.id,
|
|
140
|
+
name = _ref.name;
|
|
183
141
|
return /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb.Item, {
|
|
184
142
|
key: id,
|
|
185
143
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _panel.default['active-node-level'], id !== activeNode.node.id)),
|
|
@@ -204,7 +162,16 @@ var Panel = function Panel() {
|
|
|
204
162
|
className: (0, _classnames.default)(_panel.default['lc-painter-panel-tabbar'], (0, _defineProperty2.default)({}, _panel.default.hidden, !activeNode))
|
|
205
163
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
206
164
|
className: _panel.default.headerList
|
|
207
|
-
}, (
|
|
165
|
+
}, (0, _lodash.reduce)(_TAB_LIST_, function (ret, item) {
|
|
166
|
+
if (item.key === 'css' && !!(meta !== null && meta !== void 0 && meta.css)) {
|
|
167
|
+
ret.push(item);
|
|
168
|
+
} else if (item.key === 'advance' && !!(meta !== null && meta !== void 0 && meta.advance)) {
|
|
169
|
+
ret.push(item);
|
|
170
|
+
} else if (item.key === 'attrs') {
|
|
171
|
+
ret.push(item);
|
|
172
|
+
}
|
|
173
|
+
return ret;
|
|
174
|
+
}, []).map(function (_item) {
|
|
208
175
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
209
176
|
key: _item.key,
|
|
210
177
|
ref: activeTabKey === _item.key ? activeTabRef : null,
|
|
@@ -216,38 +183,28 @@ var Panel = function Panel() {
|
|
|
216
183
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
217
184
|
ref: underLineRef,
|
|
218
185
|
className: _panel.default.underline
|
|
219
|
-
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
mask: false,
|
|
225
|
-
closable: false,
|
|
226
|
-
getContainer: false,
|
|
227
|
-
destroyOnClose: true,
|
|
228
|
-
style: {
|
|
229
|
-
position: 'absolute'
|
|
230
|
-
},
|
|
231
|
-
bodyStyle: {
|
|
232
|
-
padding: 0,
|
|
233
|
-
height: '100%'
|
|
186
|
+
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(_AttrsPanel.default, {
|
|
187
|
+
meta: meta,
|
|
188
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node,
|
|
189
|
+
onChange: function onChange(field, value, repositioning) {
|
|
190
|
+
return handleChange(field, value, repositioning);
|
|
234
191
|
}
|
|
235
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
onChange: handleStyleChange,
|
|
248
|
-
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.style
|
|
249
|
-
}), activeTabKey === _TAB_LIST_[2].key && /*#__PURE__*/_react.default.createElement("div", null, "\u9AD8\u7EA7\u9762\u677F"), /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
+
}), activeTabKey === _TAB_LIST_[1].key && /*#__PURE__*/_react.default.createElement(_StylePanel.default, {
|
|
193
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.css,
|
|
194
|
+
onChange: function onChange(_, newCss) {
|
|
195
|
+
return handleChange('css', newCss);
|
|
196
|
+
}
|
|
197
|
+
}), activeTabKey === _TAB_LIST_[2].key && /*#__PURE__*/_react.default.createElement(_AdvancePanel.default, {
|
|
198
|
+
meta: meta,
|
|
199
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.advance,
|
|
200
|
+
onChange: function onChange(val) {
|
|
201
|
+
return handleChange('advance', val);
|
|
202
|
+
}
|
|
203
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
250
204
|
className: (0, _classnames.default)(_panel.default['lc-painter-panel-empty'], (0, _defineProperty2.default)({}, _panel.default.hidden, !!activeNode))
|
|
251
|
-
},
|
|
205
|
+
}, (0, _utils.formatMessage)({
|
|
206
|
+
id: "".concat(_I18N_PREFIX_, ".empty"),
|
|
207
|
+
label: '请在左侧画布选中节点'
|
|
208
|
+
})));
|
|
252
209
|
};
|
|
253
210
|
var _default = exports.default = Panel;
|
|
@@ -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;
|