@luck-design-biz/luckda 0.0.24-1 → 0.0.25
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 +6 -4
- package/es/components/LDActions/index.js +130 -0
- package/es/components/LDActions/index.less +48 -0
- package/es/components/LdAutoForm/index.js +0 -0
- package/es/components/LdCard/index.js +0 -0
- package/es/components/LdCard/model.js +0 -0
- package/es/components/LdCom/index.js +0 -0
- package/es/components/LdFormList/index.js +1 -1
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +21 -6
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +0 -0
- 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 +0 -0
- package/es/components/LdTree/index.js +32 -5
- 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 +0 -0
- package/es/helper/ldComBuild.js +0 -0
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +151 -0
- package/es/lowcode/constants/api-url.js +350 -1
- package/es/lowcode/constants/event-topics.js +4 -4
- package/es/lowcode/constants/index.js +3 -1
- 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 +1 -3
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +8 -3
- package/es/lowcode/engine/meta/cardlist.props.default.json +0 -1
- 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 +0 -1
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +1 -2
- 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 +1 -1
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +1 -1
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +135 -29
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/es/lowcode/engine/meta/jsx.props.json +1 -1
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +1 -1
- package/es/lowcode/engine/meta/link.props.default.json +1 -1
- package/es/lowcode/engine/meta/link.props.json +1 -1
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/section.props.default.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +1 -1
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +1 -1
- package/es/lowcode/engine/meta/table.props.default.json +36 -2
- package/es/lowcode/engine/meta/table.props.json +295 -58
- package/es/lowcode/engine/meta/tabs.props.default.json +0 -1
- package/es/lowcode/engine/meta/tabs.props.json +0 -1
- package/es/lowcode/engine/meta/text.props.default.json +1 -1
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +9 -4
- package/es/lowcode/engine/meta/tree.props.json +101 -55
- package/es/lowcode/engine/provider/ContextProvider/index.js +199 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/es/lowcode/engine/tools/dataProcess.js +5 -3
- package/es/lowcode/engine/tools/helper.js +96 -0
- package/es/lowcode/engine/tools/usePromiseState.js +7 -6
- package/es/lowcode/index.js +3 -1
- package/es/lowcode/painter/Components.js +0 -0
- package/es/lowcode/painter/Design.js +27 -304
- package/es/lowcode/painter/DesignOperator.js +271 -0
- package/es/lowcode/painter/DesignToolbar.js +91 -0
- package/es/lowcode/painter/I18n.js +0 -0
- package/es/lowcode/painter/Outline.js +31 -27
- package/es/lowcode/painter/Panel.js +52 -97
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +180 -0
- package/es/lowcode/painter/components/AdvancePanel.js +68 -0
- package/es/lowcode/painter/components/AttrsPanel.js +134 -0
- package/es/lowcode/painter/components/Collapse.js +74 -10
- package/es/lowcode/painter/components/ColorInput.js +125 -0
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/{TabEditor.js → ListEditor.js} +20 -17
- 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 +0 -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/index.js +6 -2
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +154 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +198 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +61 -0
- package/es/lowcode/painter/panel-section/Icon.js +0 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +0 -0
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +48 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +2 -1
- 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 -9
- 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 +7 -37
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +14 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +0 -0
- package/es/lowcode/painter/style/action-bind-modal.less +99 -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 +2 -1
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/components.less +0 -0
- package/es/lowcode/painter/style/design.less +8 -1
- package/es/lowcode/painter/style/display.less +0 -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/style-panel.less +32 -0
- package/es/lowcode/painter/style/tabitems.less +0 -0
- package/es/lowcode/view/Canvas.js +16 -15
- package/es/lowcode/view/Loading.js +0 -0
- package/es/lowcode/view/Page.js +10 -225
- 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/index.js +22 -6
- 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 +0 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Button/index.js +10 -7
- package/es/lowcode/view/lc-components/Button/meta.json +8 -3
- 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/index.js +0 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +48 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +21 -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 +13 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +35 -22
- package/es/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Form/index.js +0 -0
- package/es/lowcode/view/lc-components/Form/meta.json +1 -2
- 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/index.js +0 -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/index.js +0 -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/index.js +0 -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/index.js +0 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +6 -9
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.less +0 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -1
- 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/index.js +0 -0
- package/es/lowcode/view/lc-components/Link/meta.json +1 -1
- 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/index.js +0 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Split/index.js +0 -0
- package/es/lowcode/view/lc-components/Split/meta.json +1 -1
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +37 -2
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +418 -108
- package/es/lowcode/view/lc-components/Table/meta.json +256 -58
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -1
- 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/index.js +0 -0
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +48 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tree/index.js +77 -6
- package/es/lowcode/view/lc-components/Tree/index.less +2 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +97 -55
- package/es/lowcode/view/lc-components/Wrapper.js +2 -2
- 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 +0 -0
- package/es/services.js +0 -0
- 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 +0 -0
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +5 -3
- package/lib/components/LDActions/index.js +138 -0
- package/lib/components/LDActions/index.less +48 -0
- package/lib/components/LdAutoForm/index.js +0 -0
- package/lib/components/LdCard/index.js +0 -0
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +0 -0
- package/lib/components/LdFormList/index.js +1 -1
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +20 -5
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +0 -0
- 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 +0 -0
- package/lib/components/LdTree/index.js +31 -4
- 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 +0 -0
- package/lib/helper/ldComBuild.js +0 -0
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +157 -0
- package/lib/lowcode/constants/api-url.js +352 -2
- package/lib/lowcode/constants/event-topics.js +5 -5
- package/lib/lowcode/constants/index.js +4 -2
- 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 +1 -3
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +8 -3
- package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -1
- 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 +0 -1
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +1 -2
- 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 +1 -1
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +135 -29
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/lib/lowcode/engine/meta/jsx.props.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +1 -1
- package/lib/lowcode/engine/meta/link.props.default.json +1 -1
- package/lib/lowcode/engine/meta/link.props.json +1 -1
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/section.props.default.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +1 -1
- package/lib/lowcode/engine/meta/table.props.default.json +36 -2
- package/lib/lowcode/engine/meta/table.props.json +295 -58
- package/lib/lowcode/engine/meta/tabs.props.default.json +0 -1
- package/lib/lowcode/engine/meta/tabs.props.json +0 -1
- package/lib/lowcode/engine/meta/text.props.default.json +1 -1
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +9 -4
- package/lib/lowcode/engine/meta/tree.props.json +101 -55
- package/lib/lowcode/engine/provider/ContextProvider/index.js +207 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/lib/lowcode/engine/tools/dataProcess.js +5 -3
- package/lib/lowcode/engine/tools/helper.js +101 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +6 -5
- package/lib/lowcode/index.js +5 -1
- package/lib/lowcode/painter/Components.js +0 -0
- package/lib/lowcode/painter/Design.js +24 -300
- package/lib/lowcode/painter/DesignOperator.js +278 -0
- package/lib/lowcode/painter/DesignToolbar.js +99 -0
- package/lib/lowcode/painter/I18n.js +0 -0
- package/lib/lowcode/painter/Outline.js +31 -27
- package/lib/lowcode/painter/Panel.js +49 -94
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +188 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +76 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +142 -0
- package/lib/lowcode/painter/components/Collapse.js +72 -9
- package/lib/lowcode/painter/components/ColorInput.js +132 -0
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/{TabEditor.js → ListEditor.js} +22 -19
- 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 +0 -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/index.js +6 -2
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +162 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +206 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +69 -0
- package/lib/lowcode/painter/panel-section/Icon.js +0 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +0 -0
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +56 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +2 -1
- 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 +56 -9
- 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 +7 -37
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +21 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +0 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +99 -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 +2 -1
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/components.less +0 -0
- package/lib/lowcode/painter/style/design.less +8 -1
- package/lib/lowcode/painter/style/display.less +0 -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/style-panel.less +32 -0
- package/lib/lowcode/painter/style/tabitems.less +0 -0
- package/lib/lowcode/view/Canvas.js +16 -15
- package/lib/lowcode/view/Loading.js +0 -0
- package/lib/lowcode/view/Page.js +9 -224
- 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/index.js +19 -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 +0 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Button/index.js +10 -7
- package/lib/lowcode/view/lc-components/Button/meta.json +8 -3
- 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/index.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +49 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +20 -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 +13 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +34 -21
- package/lib/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Form/index.js +0 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +1 -2
- 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/index.js +0 -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/index.js +0 -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/index.js +0 -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/index.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +6 -9
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -1
- 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/index.js +0 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
- 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/index.js +0 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Split/index.js +0 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +39 -3
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +418 -108
- package/lib/lowcode/view/lc-components/Table/meta.json +256 -58
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -1
- 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/index.js +0 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +49 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +77 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +2 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +97 -55
- package/lib/lowcode/view/lc-components/Wrapper.js +2 -2
- 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 +0 -0
- package/lib/services.js +0 -0
- 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 +0 -0
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +14 -7
- 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/lib/lowcode/engine/provider/ContextProvider.js +0 -165
|
@@ -0,0 +1,99 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
15
|
+
var _constants = require("../constants");
|
|
16
|
+
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
17
|
+
var DesignToolbar = function DesignToolbar(_ref) {
|
|
18
|
+
var locale = _ref.locale,
|
|
19
|
+
onLangChange = _ref.onLangChange;
|
|
20
|
+
var context = (0, _ContextProvider.useLDContext)();
|
|
21
|
+
var _useState = (0, _react.useState)(null),
|
|
22
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
+
langList = _useState2[0],
|
|
24
|
+
setLangList = _useState2[1];
|
|
25
|
+
var _useState3 = (0, _react.useState)('pc'),
|
|
26
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
27
|
+
activedTarget = _useState4[0],
|
|
28
|
+
setActivedTarget = _useState4[1];
|
|
29
|
+
(0, _react.useEffect)(function () {
|
|
30
|
+
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
31
|
+
var _langList = _ref2.langList;
|
|
32
|
+
return setLangList(_langList);
|
|
33
|
+
}).watch();
|
|
34
|
+
return function () {
|
|
35
|
+
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: _design.default['lc-painter-design-toolbar']
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
41
|
+
size: "small",
|
|
42
|
+
value: langList ? locale : undefined,
|
|
43
|
+
className: _design.default['i18n-selecter'],
|
|
44
|
+
style: {
|
|
45
|
+
fontSize: 12
|
|
46
|
+
},
|
|
47
|
+
onSelect: onLangChange
|
|
48
|
+
}, langList === null || langList === void 0 ? void 0 : langList.map(function (item) {
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
50
|
+
key: item.field,
|
|
51
|
+
value: item.field
|
|
52
|
+
}, item.title);
|
|
53
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
+
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'pc')),
|
|
55
|
+
onClick: function onClick() {
|
|
56
|
+
return setActivedTarget('pc');
|
|
57
|
+
}
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
59
|
+
type: "laptop"
|
|
60
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
61
|
+
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'mobile')),
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
return setActivedTarget('mobile');
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
66
|
+
type: "mobile"
|
|
67
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
68
|
+
type: "vertical"
|
|
69
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
70
|
+
style: {
|
|
71
|
+
width: 'auto',
|
|
72
|
+
fontSize: 12
|
|
73
|
+
},
|
|
74
|
+
className: _design.default['toolbar-item'],
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
77
|
+
id: _constants.CELL_KEY.PAGE_ROOT
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
81
|
+
type: "vertical"
|
|
82
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
83
|
+
size: "small",
|
|
84
|
+
style: {
|
|
85
|
+
fontSize: 12,
|
|
86
|
+
margin: '0 2px'
|
|
87
|
+
}
|
|
88
|
+
}, "\u9884\u89C8"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
89
|
+
type: "vertical"
|
|
90
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
91
|
+
size: "small",
|
|
92
|
+
type: "primary",
|
|
93
|
+
style: {
|
|
94
|
+
fontSize: 12,
|
|
95
|
+
margin: '0 0 0 2px'
|
|
96
|
+
}
|
|
97
|
+
}, "\u4FDD\u5B58"));
|
|
98
|
+
};
|
|
99
|
+
var _default = exports.default = DesignToolbar;
|
|
File without changes
|
|
@@ -25,7 +25,6 @@ var TreeNode = _antd.Tree.TreeNode;
|
|
|
25
25
|
var PAGE_CELL = [_constants.CELL_KEY.PAGE_HEADER, _constants.CELL_KEY.PAGE_CONTENT, _constants.CELL_KEY.PAGE_FOOTER];
|
|
26
26
|
var Outline = function Outline(_ref) {
|
|
27
27
|
var open = _ref.open;
|
|
28
|
-
var openModal = (0, _react.useRef)(void 0);
|
|
29
28
|
var clickBySelf = (0, _react.useRef)(false);
|
|
30
29
|
var context = (0, _ContextProvider.useLDContext)();
|
|
31
30
|
var _useState = (0, _react.useState)(null),
|
|
@@ -53,7 +52,10 @@ var Outline = function Outline(_ref) {
|
|
|
53
52
|
clickBySelf.current = false;
|
|
54
53
|
return;
|
|
55
54
|
}
|
|
56
|
-
|
|
55
|
+
var _split = (0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/'),
|
|
56
|
+
_split2 = (0, _slicedToArray2.default)(_split, 1),
|
|
57
|
+
_root = _split2[0];
|
|
58
|
+
if (!PAGE_CELL.includes(_root)) {
|
|
57
59
|
setModalExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(latestModalExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/')))));
|
|
58
60
|
} else {
|
|
59
61
|
setPageExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(lastPageExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/')))));
|
|
@@ -63,18 +65,11 @@ var Outline = function Outline(_ref) {
|
|
|
63
65
|
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
64
66
|
};
|
|
65
67
|
}, [context.pageData]);
|
|
66
|
-
var handleSelect = function
|
|
68
|
+
var handleSelect = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
67
69
|
clickBySelf.current = true;
|
|
68
70
|
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
69
71
|
id: _key
|
|
70
72
|
} : null);
|
|
71
|
-
};
|
|
72
|
-
var handleOpenModal = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
73
|
-
var _comp = context.componentMap.get(_key);
|
|
74
|
-
var _prevComp = openModal.current ? context.componentMap.get(openModal.current) : null;
|
|
75
|
-
_prevComp === null || _prevComp === void 0 || _prevComp.api.doClose();
|
|
76
|
-
_comp.api.doOpen();
|
|
77
|
-
openModal.current = _key;
|
|
78
73
|
});
|
|
79
74
|
var render = (0, _ahooks.useMemoizedFn)(function (_ref2) {
|
|
80
75
|
var props = _ref2.props,
|
|
@@ -139,7 +134,7 @@ var Outline = function Outline(_ref) {
|
|
|
139
134
|
type: "inner",
|
|
140
135
|
hoverable: true,
|
|
141
136
|
title: (0, _utils.formatMessage)({
|
|
142
|
-
id: 'luckda.lowcode.
|
|
137
|
+
id: 'luckda.lowcode.modal',
|
|
143
138
|
label: '模态视图层'
|
|
144
139
|
}),
|
|
145
140
|
style: {
|
|
@@ -162,21 +157,29 @@ var Outline = function Outline(_ref) {
|
|
|
162
157
|
var selected = _ref4.selected,
|
|
163
158
|
node = _ref4.node;
|
|
164
159
|
if (selected && node.props.pos.split('-').length === 2) {
|
|
165
|
-
|
|
160
|
+
// 选中节点是模态视图,则打开模态视图组件
|
|
161
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
162
|
+
toggle: true,
|
|
163
|
+
id: _key
|
|
164
|
+
});
|
|
166
165
|
handleSelect(_key);
|
|
167
166
|
} else if (!selected && node.props.pos.split('-').length === 2) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
// 取消选中节点是模态视图,则关闭模态视图
|
|
168
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
169
|
+
toggle: false,
|
|
170
|
+
id: _key
|
|
171
|
+
});
|
|
171
172
|
handleSelect(null);
|
|
172
173
|
} else {
|
|
174
|
+
// 选中节点是模态视图下的子组件,则打开该组件的模态视图组件
|
|
173
175
|
handleSelect(node.props.eventKey);
|
|
174
|
-
var
|
|
175
|
-
|
|
176
|
-
parentModal =
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
var _split3 = (0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, node.props.eventKey), '/'),
|
|
177
|
+
_split4 = (0, _slicedToArray2.default)(_split3, 1),
|
|
178
|
+
parentModal = _split4[0];
|
|
179
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
180
|
+
toggle: true,
|
|
181
|
+
id: parentModal
|
|
182
|
+
});
|
|
180
183
|
}
|
|
181
184
|
},
|
|
182
185
|
expandedKeys: modalExpandedKeys,
|
|
@@ -185,7 +188,10 @@ var Outline = function Outline(_ref) {
|
|
|
185
188
|
node = _ref6.node;
|
|
186
189
|
if (expanded && node.props.pos.split('-').length === 2) {
|
|
187
190
|
handleSelect(null);
|
|
188
|
-
|
|
191
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
192
|
+
toggle: true,
|
|
193
|
+
id: node.props.eventKey
|
|
194
|
+
});
|
|
189
195
|
}
|
|
190
196
|
setModalExpandedKeys(_keys);
|
|
191
197
|
}
|
|
@@ -201,11 +207,9 @@ var Outline = function Outline(_ref) {
|
|
|
201
207
|
var _ref9 = (0, _slicedToArray2.default)(_ref7, 1),
|
|
202
208
|
_key = _ref9[0];
|
|
203
209
|
var node = _ref8.node;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
openModal.current = void 0;
|
|
208
|
-
}
|
|
210
|
+
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
211
|
+
toggle: false
|
|
212
|
+
});
|
|
209
213
|
handleSelect(node.props.eventKey);
|
|
210
214
|
},
|
|
211
215
|
expandedKeys: pageExpandedKeys,
|
|
@@ -14,27 +14,36 @@ var _ahooks = require("ahooks");
|
|
|
14
14
|
var _antd = require("luck-design/antd");
|
|
15
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
16
|
var _lodash = require("lodash");
|
|
17
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
17
18
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
19
|
+
var _AttrsPanel = _interopRequireDefault(require("./components/AttrsPanel"));
|
|
20
|
+
var _StylePanel = _interopRequireDefault(require("./panel-section/StylePanel"));
|
|
21
|
+
var _AdvancePanel = _interopRequireDefault(require("./components/AdvancePanel"));
|
|
20
22
|
var _dataProcess = require("../engine/tools/dataProcess");
|
|
21
23
|
var _panel = _interopRequireDefault(require("./style/panel.less"));
|
|
24
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel';
|
|
22
25
|
var _TAB_LIST_ = [{
|
|
23
|
-
title:
|
|
26
|
+
title: (0, _utils.formatMessage)({
|
|
27
|
+
id: "".concat(_I18N_PREFIX_, ".attrs"),
|
|
28
|
+
label: '属性'
|
|
29
|
+
}),
|
|
24
30
|
key: 'attrs'
|
|
25
31
|
}, {
|
|
26
|
-
title:
|
|
32
|
+
title: (0, _utils.formatMessage)({
|
|
33
|
+
id: "".concat(_I18N_PREFIX_, ".styles"),
|
|
34
|
+
label: '样式'
|
|
35
|
+
}),
|
|
27
36
|
key: 'styles'
|
|
28
37
|
}, {
|
|
29
|
-
title:
|
|
38
|
+
title: (0, _utils.formatMessage)({
|
|
39
|
+
id: "".concat(_I18N_PREFIX_, ".advance"),
|
|
40
|
+
label: '高级'
|
|
41
|
+
}),
|
|
30
42
|
key: 'advance'
|
|
31
43
|
}];
|
|
32
44
|
var Panel = function Panel() {
|
|
33
|
-
var _nextRef$current, _nextRef$current2;
|
|
34
45
|
var activeTabRef = (0, _react.useRef)(null);
|
|
35
46
|
var underLineRef = (0, _react.useRef)(null);
|
|
36
|
-
var nextRef = (0, _react.useRef)(null);
|
|
37
|
-
var factory = (0, _react.useRef)(new _panelItemFactory.default());
|
|
38
47
|
var _useState = (0, _react.useState)(null),
|
|
39
48
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
49
|
activeNode = _useState2[0],
|
|
@@ -43,14 +52,11 @@ var Panel = function Panel() {
|
|
|
43
52
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
44
53
|
activeTabKey = _useState4[0],
|
|
45
54
|
setActiveTabKey = _useState4[1];
|
|
46
|
-
var _useBoolean = (0, _ahooks.useBoolean)(false),
|
|
47
|
-
_useBoolean2 = (0, _slicedToArray2.default)(_useBoolean, 2),
|
|
48
|
-
open = _useBoolean2[0],
|
|
49
|
-
_useBoolean2$ = _useBoolean2[1],
|
|
50
|
-
setTrue = _useBoolean2$.setTrue,
|
|
51
|
-
setFalse = _useBoolean2$.setFalse;
|
|
52
55
|
var context = (0, _ContextProvider.useLDContext)();
|
|
53
|
-
var
|
|
56
|
+
var meta = (0, _ahooks.useCreation)(function () {
|
|
57
|
+
return (0, _lodash.isNil)(activeNode) ? null : require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
58
|
+
}, [activeNode]);
|
|
59
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value, repositioning) {
|
|
54
60
|
var component = context.componentMap.get(activeNode.node.id);
|
|
55
61
|
var _component$api$getSel = component.api.getSelfAndParentLCData(),
|
|
56
62
|
node = _component$api$getSel.node;
|
|
@@ -61,58 +67,14 @@ var Panel = function Panel() {
|
|
|
61
67
|
id: activeNode.node.id,
|
|
62
68
|
pageData: (0, _lodash.cloneDeep)(newData)
|
|
63
69
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var renderPanelItems = (0, _ahooks.useMemoizedFn)(function (items) {
|
|
68
|
-
return items.map(function (item) {
|
|
69
|
-
var Comp = factory.current.getPanelItemFor((0, _lodash.startsWith)(item.type, '_') ? 'dynamic' : item.type, item.type);
|
|
70
|
-
if (item.type === 'group') {
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(Comp, {
|
|
72
|
-
key: item.key,
|
|
73
|
-
label: item.name,
|
|
74
|
-
defaultCollapsed: true
|
|
75
|
-
}, renderPanelItems(item.props));
|
|
76
|
-
}
|
|
77
|
-
console.log(11111, item.key, activeNode.node);
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
79
|
-
key: item.key,
|
|
80
|
-
label: item.name
|
|
81
|
-
}, Comp && /*#__PURE__*/_react.default.createElement(Comp, {
|
|
82
|
-
defaultValue: activeNode.node[item.key],
|
|
83
|
-
next: function next() {
|
|
84
|
-
if (!item.next) return;
|
|
85
|
-
nextRef.current = {
|
|
86
|
-
name: item.next.name,
|
|
87
|
-
NextComp: renderPanelItems(item.next.props)
|
|
88
|
-
};
|
|
89
|
-
setTrue();
|
|
90
|
-
},
|
|
91
|
-
options: item.options,
|
|
92
|
-
disabled: item.disabled,
|
|
93
|
-
onChange: function onChange(value) {
|
|
94
|
-
return handleChange(item.key, value);
|
|
95
|
-
},
|
|
96
|
-
size: "small"
|
|
97
|
-
}));
|
|
70
|
+
if (repositioning) context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
71
|
+
id: activeNode.node.id
|
|
72
|
+
});
|
|
98
73
|
});
|
|
99
74
|
});
|
|
100
|
-
var PropsComps = (0, _ahooks.useCreation)(function () {
|
|
101
|
-
var _meta;
|
|
102
|
-
try {
|
|
103
|
-
_meta = require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
104
|
-
} catch (e) {
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
106
|
-
}
|
|
107
|
-
return renderPanelItems(_meta.props);
|
|
108
|
-
}, [activeNode]);
|
|
109
|
-
(0, _react.useEffect)(function () {
|
|
110
|
-
if (!open) {
|
|
111
|
-
nextRef.current = null;
|
|
112
|
-
}
|
|
113
|
-
}, [open]);
|
|
114
75
|
(0, _react.useEffect)(function () {
|
|
115
76
|
var _id = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
77
|
+
setActiveTabKey('attrs');
|
|
116
78
|
if (!payload.id) {
|
|
117
79
|
setActiveNode(null);
|
|
118
80
|
return;
|
|
@@ -127,9 +89,9 @@ var Panel = function Panel() {
|
|
|
127
89
|
});
|
|
128
90
|
}).watch();
|
|
129
91
|
return function () {
|
|
130
|
-
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
92
|
+
return context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
131
93
|
};
|
|
132
|
-
}, [
|
|
94
|
+
}, []);
|
|
133
95
|
(0, _react.useLayoutEffect)(function () {
|
|
134
96
|
underLineRef.current.style.left = "".concat(activeTabRef.current.offsetLeft + activeTabRef.current.offsetWidth / 2 - 10, "px");
|
|
135
97
|
}, [activeTabKey, !!activeNode]);
|
|
@@ -169,7 +131,7 @@ var Panel = function Panel() {
|
|
|
169
131
|
className: (0, _classnames.default)(_panel.default['lc-painter-panel-tabbar'], (0, _defineProperty2.default)({}, _panel.default.hidden, !activeNode))
|
|
170
132
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
171
133
|
className: _panel.default.headerList
|
|
172
|
-
}, _TAB_LIST_.map(function (_item) {
|
|
134
|
+
}, (activeNode !== null && activeNode !== void 0 && activeNode.node.css ? _TAB_LIST_ : [_TAB_LIST_[0], _TAB_LIST_[2]]).map(function (_item) {
|
|
173
135
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
174
136
|
key: _item.key,
|
|
175
137
|
ref: activeTabKey === _item.key ? activeTabRef : null,
|
|
@@ -181,35 +143,28 @@ var Panel = function Panel() {
|
|
|
181
143
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
182
144
|
ref: underLineRef,
|
|
183
145
|
className: _panel.default.underline
|
|
184
|
-
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
mask: false,
|
|
190
|
-
closable: false,
|
|
191
|
-
getContainer: false,
|
|
192
|
-
destroyOnClose: true,
|
|
193
|
-
style: {
|
|
194
|
-
position: 'absolute'
|
|
195
|
-
},
|
|
196
|
-
bodyStyle: {
|
|
197
|
-
padding: 0,
|
|
198
|
-
height: '100%'
|
|
146
|
+
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(_AttrsPanel.default, {
|
|
147
|
+
meta: meta,
|
|
148
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node,
|
|
149
|
+
onChange: function onChange(field, value, repositioning) {
|
|
150
|
+
return handleChange(field, value, repositioning);
|
|
199
151
|
}
|
|
200
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
152
|
+
}), activeTabKey === _TAB_LIST_[1].key && /*#__PURE__*/_react.default.createElement(_StylePanel.default, {
|
|
153
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.css,
|
|
154
|
+
onChange: function onChange(_, newCss) {
|
|
155
|
+
return handleChange('css', newCss);
|
|
156
|
+
}
|
|
157
|
+
}), activeTabKey === _TAB_LIST_[2].key && /*#__PURE__*/_react.default.createElement(_AdvancePanel.default, {
|
|
158
|
+
meta: meta,
|
|
159
|
+
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node,
|
|
160
|
+
onChange: function onChange(val) {
|
|
161
|
+
return handleChange('advance', val);
|
|
162
|
+
}
|
|
163
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
212
164
|
className: (0, _classnames.default)(_panel.default['lc-painter-panel-empty'], (0, _defineProperty2.default)({}, _panel.default.hidden, !!activeNode))
|
|
213
|
-
},
|
|
165
|
+
}, (0, _utils.formatMessage)({
|
|
166
|
+
id: "".concat(_I18N_PREFIX_, ".empty"),
|
|
167
|
+
label: '请在左侧画布选中节点'
|
|
168
|
+
})));
|
|
214
169
|
};
|
|
215
170
|
var _default = exports.default = Panel;
|
|
@@ -0,0 +1,188 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _ahooks = require("ahooks");
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
|
+
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
17
|
+
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
18
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
+
var _actionBindModal = _interopRequireDefault(require("../style/action-bind-modal.less"));
|
|
20
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.actionBindModal';
|
|
21
|
+
var _ACTION_CATEGORY_ = [{
|
|
22
|
+
key: 'actions',
|
|
23
|
+
label: (0, _utils.formatMessage)({
|
|
24
|
+
id: "".concat(_I18N_PREFIX_, ".actions"),
|
|
25
|
+
label: '页面行为'
|
|
26
|
+
})
|
|
27
|
+
}, {
|
|
28
|
+
key: 'trigger',
|
|
29
|
+
label: (0, _utils.formatMessage)({
|
|
30
|
+
id: "".concat(_I18N_PREFIX_, ".trigger"),
|
|
31
|
+
label: '触发器'
|
|
32
|
+
})
|
|
33
|
+
}, {
|
|
34
|
+
key: 'code',
|
|
35
|
+
label: (0, _utils.formatMessage)({
|
|
36
|
+
id: "".concat(_I18N_PREFIX_, ".code"),
|
|
37
|
+
label: '自定义动作'
|
|
38
|
+
})
|
|
39
|
+
}];
|
|
40
|
+
var _CATEGORY_CODE_ITEMS = [{
|
|
41
|
+
key: 'coding',
|
|
42
|
+
label: (0, _utils.formatMessage)({
|
|
43
|
+
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
44
|
+
label: '动作编写'
|
|
45
|
+
})
|
|
46
|
+
}];
|
|
47
|
+
var ActionBindModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
48
|
+
var activeNode = _ref.activeNode,
|
|
49
|
+
onComfirm = _ref.onComfirm;
|
|
50
|
+
var context = (0, _ContextProvider.useLDContext)();
|
|
51
|
+
var _useState = (0, _react.useState)(void 0),
|
|
52
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
+
title = _useState2[0],
|
|
54
|
+
setTitle = _useState2[1];
|
|
55
|
+
var _useState3 = (0, _react.useState)('actions'),
|
|
56
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
57
|
+
category = _useState4[0],
|
|
58
|
+
setCategory = _useState4[1];
|
|
59
|
+
var _useMap = (0, _ahooks.useMap)([]),
|
|
60
|
+
_useMap2 = (0, _slicedToArray2.default)(_useMap, 2),
|
|
61
|
+
actionPool = _useMap2[0],
|
|
62
|
+
_useMap2$ = _useMap2[1],
|
|
63
|
+
set = _useMap2$.set,
|
|
64
|
+
remove = _useMap2$.remove,
|
|
65
|
+
reset = _useMap2$.reset,
|
|
66
|
+
get = _useMap2$.get;
|
|
67
|
+
var selectItems = (0, _ahooks.useCreation)(function () {
|
|
68
|
+
if (category === 'actions') {
|
|
69
|
+
return [];
|
|
70
|
+
} else if (category === 'trigger') {
|
|
71
|
+
return (0, _lodash.reduce)(context.componentList, function (ret, _ref2) {
|
|
72
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
73
|
+
key = _ref3[0],
|
|
74
|
+
target = _ref3[1];
|
|
75
|
+
if (key !== activeNode.id) {
|
|
76
|
+
ret.push({
|
|
77
|
+
key: key,
|
|
78
|
+
label: "".concat(target.api.getSelfAndParentLCData().node.props.name, "(").concat(key, ")")
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return ret;
|
|
82
|
+
}, []);
|
|
83
|
+
} else if (category === 'code') {
|
|
84
|
+
return _CATEGORY_CODE_ITEMS;
|
|
85
|
+
}
|
|
86
|
+
return [];
|
|
87
|
+
}, [category]);
|
|
88
|
+
var handleClose = (0, _ahooks.useMemoizedFn)(function () {
|
|
89
|
+
setTitle(void 0);
|
|
90
|
+
});
|
|
91
|
+
var handleComfirm = (0, _ahooks.useMemoizedFn)(function () {
|
|
92
|
+
handleClose();
|
|
93
|
+
});
|
|
94
|
+
var handleSearch = (0, _ahooks.useMemoizedFn)(function (val) {});
|
|
95
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
96
|
+
return {
|
|
97
|
+
doOpen: function doOpen(title) {
|
|
98
|
+
setTitle(title);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, []);
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
103
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal'],
|
|
104
|
+
bodyStyle: {
|
|
105
|
+
marginTop: 0,
|
|
106
|
+
padding: '4px 24px'
|
|
107
|
+
},
|
|
108
|
+
title: title,
|
|
109
|
+
visible: !!title,
|
|
110
|
+
width: 960,
|
|
111
|
+
closable: false,
|
|
112
|
+
maskClosable: false,
|
|
113
|
+
getContainer: function getContainer() {
|
|
114
|
+
return document.getElementById('lc-design-workspace');
|
|
115
|
+
},
|
|
116
|
+
zIndex: 3000,
|
|
117
|
+
onCancel: handleClose,
|
|
118
|
+
onOk: handleComfirm
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body']
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-left']
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
124
|
+
id: "".concat(_I18N_PREFIX_, ".bind"),
|
|
125
|
+
label: '绑定动作'
|
|
126
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
className: _actionBindModal.default['selector-box']
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
129
|
+
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['action-category'])
|
|
130
|
+
}, _ACTION_CATEGORY_.map(function (_ref4) {
|
|
131
|
+
var key = _ref4.key,
|
|
132
|
+
label = _ref4.label;
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
134
|
+
key: key,
|
|
135
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, key === category)),
|
|
136
|
+
onClick: function onClick() {
|
|
137
|
+
return setCategory(key);
|
|
138
|
+
}
|
|
139
|
+
}, label, key === category && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
140
|
+
type: "check",
|
|
141
|
+
className: _actionBindModal.default['check-icon']
|
|
142
|
+
}));
|
|
143
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
+
className: _actionBindModal.default['selecter-items-box']
|
|
145
|
+
}, category !== 'code' && /*#__PURE__*/_react.default.createElement("div", {
|
|
146
|
+
style: {
|
|
147
|
+
height: 42,
|
|
148
|
+
display: 'flex',
|
|
149
|
+
justifyContent: 'center'
|
|
150
|
+
}
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Input.Search, {
|
|
152
|
+
placeholder: (0, _utils.formatMessage)({
|
|
153
|
+
id: "".concat(_I18N_PREFIX_, ".search"),
|
|
154
|
+
label: '搜索'
|
|
155
|
+
}),
|
|
156
|
+
size: "small",
|
|
157
|
+
onSearch: handleSearch,
|
|
158
|
+
style: {
|
|
159
|
+
width: 170,
|
|
160
|
+
alignSelf: 'center'
|
|
161
|
+
}
|
|
162
|
+
})), /*#__PURE__*/_react.default.createElement("ul", {
|
|
163
|
+
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['selecter-items'])
|
|
164
|
+
}, selectItems.map(function (_ref5) {
|
|
165
|
+
var key = _ref5.key,
|
|
166
|
+
label = _ref5.label;
|
|
167
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
168
|
+
key: key,
|
|
169
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, actionPool.has(key))),
|
|
170
|
+
onClick: function onClick() {
|
|
171
|
+
return set(key, label);
|
|
172
|
+
}
|
|
173
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
174
|
+
checked: actionPool.has(key),
|
|
175
|
+
style: {
|
|
176
|
+
marginRight: 4
|
|
177
|
+
}
|
|
178
|
+
}), label);
|
|
179
|
+
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
+
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-right']
|
|
181
|
+
}, category === 'code' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
182
|
+
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
183
|
+
label: '动作编写'
|
|
184
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
className: _actionBindModal.default['code-box']
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_JSEditor.default, null))))));
|
|
187
|
+
});
|
|
188
|
+
var _default = exports.default = ActionBindModal;
|