@luck-design-biz/luckda 0.0.24-1 → 0.0.24-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/LICENSE +0 -0
- package/README.md +0 -0
- package/es/components/Builder/index.js +6 -4
- 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 +0 -0
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +12 -3
- 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 +0 -0
- package/es/components/LdTree/index.less +0 -0
- 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 +0 -0
- package/es/lowcode/constants/api-url.js +291 -1
- package/es/lowcode/constants/event-topics.js +4 -4
- package/es/lowcode/constants/index.js +0 -0
- package/es/lowcode/engine/factory/DataFactory.js +0 -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 +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +0 -0
- package/es/lowcode/engine/meta/box.props.json +0 -0
- package/es/lowcode/engine/meta/button.props.default.json +0 -0
- package/es/lowcode/engine/meta/button.props.json +7 -2
- package/es/lowcode/engine/meta/cardlist.props.default.json +0 -0
- package/es/lowcode/engine/meta/cardlist.props.json +0 -0
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/dialog.props.default.json +0 -0
- package/es/lowcode/engine/meta/dialog.props.json +0 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +0 -0
- package/es/lowcode/engine/meta/drawer.props.json +0 -0
- package/es/lowcode/engine/meta/form.props.default.json +0 -0
- package/es/lowcode/engine/meta/form.props.json +0 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +0 -0
- package/es/lowcode/engine/meta/iframe.props.json +0 -0
- package/es/lowcode/engine/meta/image.props.default.json +0 -0
- package/es/lowcode/engine/meta/image.props.json +0 -0
- package/es/lowcode/engine/meta/imex.props.default.json +0 -0
- package/es/lowcode/engine/meta/imex.props.json +0 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
- package/es/lowcode/engine/meta/jsx.props.default.json +0 -0
- package/es/lowcode/engine/meta/jsx.props.json +0 -0
- package/es/lowcode/engine/meta/layout.props.default.json +0 -0
- package/es/lowcode/engine/meta/layout.props.json +0 -0
- package/es/lowcode/engine/meta/link.props.default.json +0 -0
- package/es/lowcode/engine/meta/link.props.json +0 -0
- package/es/lowcode/engine/meta/section.props.default.json +0 -0
- package/es/lowcode/engine/meta/section.props.json +0 -0
- package/es/lowcode/engine/meta/split.props.default.json +0 -0
- package/es/lowcode/engine/meta/split.props.json +0 -0
- package/es/lowcode/engine/meta/table.props.default.json +20 -2
- package/es/lowcode/engine/meta/table.props.json +99 -37
- package/es/lowcode/engine/meta/tabs.props.default.json +0 -0
- package/es/lowcode/engine/meta/tabs.props.json +0 -0
- package/es/lowcode/engine/meta/text.props.default.json +0 -0
- package/es/lowcode/engine/meta/text.props.json +0 -0
- package/es/lowcode/engine/meta/tree.props.default.json +0 -0
- package/es/lowcode/engine/meta/tree.props.json +0 -0
- package/es/lowcode/engine/provider/ContextProvider.js +40 -28
- 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 +68 -0
- package/es/lowcode/engine/tools/usePromiseState.js +0 -0
- 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 +71 -33
- package/es/lowcode/painter/Ribbon.js +0 -0
- package/es/lowcode/painter/components/Collapse.js +67 -8
- package/es/lowcode/painter/components/ColorInput.js +125 -0
- package/es/lowcode/painter/components/{TabEditor.js → ListEditor.js} +17 -16
- 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 +4 -1
- 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/actions-editor/ActionEditor.js +147 -0
- package/es/lowcode/painter/components/actions-editor/index.js +170 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +42 -64
- 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 +22 -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/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/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 +42 -10
- 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 +55 -8
- 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/TableActions.js +19 -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/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 +7 -0
- 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/index.less +0 -0
- package/es/lowcode/painter/style/layout-ratio.less +0 -0
- package/{lib/lowcode/painter/style/tabeditor.less → es/lowcode/painter/style/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-item.less +11 -1
- package/es/lowcode/painter/style/panel.less +3 -16
- package/es/lowcode/painter/style/pop-confirm.less +0 -0
- 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 +2 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -0
- package/es/lowcode/view/lc-components/Box/meta.json +0 -0
- 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 +7 -2
- 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 +0 -0
- 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 -0
- 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 +19 -22
- package/es/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
- 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 +0 -0
- 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 +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Section/index.js +0 -0
- package/es/lowcode/view/lc-components/Section/meta.json +0 -0
- 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 +0 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Table/index.js +222 -132
- package/es/lowcode/view/lc-components/Table/meta.json +88 -37
- 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 -0
- 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 +0 -0
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tree/index.js +0 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +0 -0
- package/es/lowcode/view/lc-components/Wrapper.js +0 -0
- 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/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 +0 -0
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +12 -3
- 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 +0 -0
- package/lib/components/LdTree/index.less +0 -0
- 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 +0 -0
- package/lib/lowcode/constants/api-url.js +293 -2
- package/lib/lowcode/constants/event-topics.js +5 -5
- package/lib/lowcode/constants/index.js +0 -0
- package/lib/lowcode/engine/factory/DataFactory.js +0 -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 +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +0 -0
- package/lib/lowcode/engine/meta/box.props.json +0 -0
- package/lib/lowcode/engine/meta/button.props.default.json +0 -0
- package/lib/lowcode/engine/meta/button.props.json +7 -2
- package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +0 -0
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/dialog.props.default.json +0 -0
- package/lib/lowcode/engine/meta/dialog.props.json +0 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +0 -0
- package/lib/lowcode/engine/meta/drawer.props.json +0 -0
- package/lib/lowcode/engine/meta/form.props.default.json +0 -0
- package/lib/lowcode/engine/meta/form.props.json +0 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +0 -0
- package/lib/lowcode/engine/meta/iframe.props.json +0 -0
- package/lib/lowcode/engine/meta/image.props.default.json +0 -0
- package/lib/lowcode/engine/meta/image.props.json +0 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +0 -0
- package/lib/lowcode/engine/meta/imex.props.json +0 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
- package/lib/lowcode/engine/meta/jsx.props.default.json +0 -0
- package/lib/lowcode/engine/meta/jsx.props.json +0 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +0 -0
- package/lib/lowcode/engine/meta/layout.props.json +0 -0
- package/lib/lowcode/engine/meta/link.props.default.json +0 -0
- package/lib/lowcode/engine/meta/link.props.json +0 -0
- package/lib/lowcode/engine/meta/section.props.default.json +0 -0
- package/lib/lowcode/engine/meta/section.props.json +0 -0
- package/lib/lowcode/engine/meta/split.props.default.json +0 -0
- package/lib/lowcode/engine/meta/split.props.json +0 -0
- package/lib/lowcode/engine/meta/table.props.default.json +20 -2
- package/lib/lowcode/engine/meta/table.props.json +99 -37
- package/lib/lowcode/engine/meta/tabs.props.default.json +0 -0
- package/lib/lowcode/engine/meta/tabs.props.json +0 -0
- package/lib/lowcode/engine/meta/text.props.default.json +0 -0
- package/lib/lowcode/engine/meta/text.props.json +0 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +0 -0
- package/lib/lowcode/engine/meta/tree.props.json +0 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +40 -28
- 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 +70 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +0 -0
- 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 +71 -33
- package/lib/lowcode/painter/Ribbon.js +0 -0
- package/lib/lowcode/painter/components/Collapse.js +65 -7
- package/lib/lowcode/painter/components/ColorInput.js +132 -0
- package/lib/lowcode/painter/components/{TabEditor.js → ListEditor.js} +19 -18
- 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 +4 -1
- 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/actions-editor/ActionEditor.js +155 -0
- package/lib/lowcode/painter/components/actions-editor/index.js +178 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +40 -63
- 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 +22 -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/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/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 +40 -9
- 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 +55 -8
- 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/TableActions.js +26 -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/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 +7 -0
- 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/index.less +0 -0
- package/lib/lowcode/painter/style/layout-ratio.less +0 -0
- package/{es/lowcode/painter/style/tabeditor.less → lib/lowcode/painter/style/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-item.less +11 -1
- package/lib/lowcode/painter/style/panel.less +3 -16
- package/lib/lowcode/painter/style/pop-confirm.less +0 -0
- 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 +2 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +0 -0
- 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 +7 -2
- 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 +0 -0
- 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 -0
- 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 +18 -21
- package/lib/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
- 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 +0 -0
- 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 +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Section/index.js +0 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +0 -0
- 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 +0 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Table/index.js +221 -131
- package/lib/lowcode/view/lc-components/Table/meta.json +88 -37
- 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 -0
- 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 +0 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +0 -0
- 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 +7 -5
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.useLDContext = exports.default = exports.Context = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _umi = require("umi");
|
|
13
14
|
var _ahooks = require("ahooks");
|
|
14
15
|
var _EventBusProvider = require("./EventBusProvider");
|
|
15
16
|
var _usePromiseState3 = _interopRequireDefault(require("../tools/usePromiseState"));
|
|
17
|
+
var _action = require("../../../helper/action");
|
|
16
18
|
var topics = _interopRequireWildcard(require("../../constants/event-topics"));
|
|
19
|
+
var _dataProcess = require("../tools/dataProcess");
|
|
20
|
+
var _apiUrl = require("../../constants/api-url");
|
|
21
|
+
var _excluded = ["source"];
|
|
17
22
|
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(null);
|
|
18
23
|
var useLDContext = exports.useLDContext = function useLDContext() {
|
|
19
24
|
return (0, _react.useContext)(Context);
|
|
20
25
|
};
|
|
21
|
-
var PRIVATE_KEYS = ['
|
|
26
|
+
var PRIVATE_KEYS = ['pageinfo', 'componentList', 'componentMap'];
|
|
22
27
|
var _default = exports.default = function _default(_ref) {
|
|
23
|
-
var children = _ref.children
|
|
28
|
+
var children = _ref.children,
|
|
29
|
+
code = _ref.code;
|
|
24
30
|
var eventBus = (0, _EventBusProvider.useLDEventBus)();
|
|
25
31
|
|
|
26
|
-
/**
|
|
27
|
-
* 页面码
|
|
28
|
-
*/
|
|
29
|
-
var _pageCode = (0, _react.useRef)(void 0);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 模块码
|
|
33
|
-
*/
|
|
34
|
-
var _moduleCode = (0, _react.useRef)(void 0);
|
|
35
|
-
|
|
36
32
|
/**
|
|
37
33
|
* 页面数据
|
|
38
34
|
*/
|
|
@@ -41,16 +37,18 @@ var _default = exports.default = function _default(_ref) {
|
|
|
41
37
|
pageData = _usePromiseState2[0],
|
|
42
38
|
_setPageData = _usePromiseState2[1];
|
|
43
39
|
|
|
40
|
+
/**
|
|
41
|
+
* 页面信息
|
|
42
|
+
*/
|
|
43
|
+
var _pageinfo = (0, _react.useRef)(null);
|
|
44
|
+
|
|
44
45
|
/**
|
|
45
46
|
* 组件列表
|
|
46
47
|
*/
|
|
47
48
|
var _componentList = (0, _react.useRef)([]);
|
|
48
49
|
var _privateGetter = (0, _react.useRef)({
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
moduleCode: function moduleCode() {
|
|
53
|
-
return _moduleCode.current;
|
|
50
|
+
pageinfo: function pageinfo() {
|
|
51
|
+
return _pageinfo.current;
|
|
54
52
|
},
|
|
55
53
|
componentList: function componentList() {
|
|
56
54
|
return _componentList.current;
|
|
@@ -115,23 +113,37 @@ var _default = exports.default = function _default(_ref) {
|
|
|
115
113
|
*/
|
|
116
114
|
var getDataSetById = (0, _ahooks.useMemoizedFn)(function (datasetId) {});
|
|
117
115
|
|
|
118
|
-
/**
|
|
119
|
-
* 执行actionKey对应的行为
|
|
120
|
-
* actionKey:string 行为key
|
|
121
|
-
* return:Promise
|
|
122
|
-
*/
|
|
123
|
-
var doAction = (0, _ahooks.useMemoizedFn)(function (actionKey) {});
|
|
124
|
-
|
|
125
116
|
/**
|
|
126
117
|
* 获取url参数
|
|
127
118
|
* return:object
|
|
128
119
|
*/
|
|
129
120
|
var getUrlParams = (0, _ahooks.useMemoizedFn)(function () {});
|
|
121
|
+
var _useRequest = (0, _ahooks.useRequest)(_apiUrl.fetchPageData, {
|
|
122
|
+
manual: true
|
|
123
|
+
}),
|
|
124
|
+
loading = _useRequest.loading,
|
|
125
|
+
runFetchPageData = _useRequest.runAsync;
|
|
126
|
+
(0, _react.useEffect)(function () {
|
|
127
|
+
runFetchPageData(code).then(function (_ref4) {
|
|
128
|
+
var code = _ref4.code,
|
|
129
|
+
data = _ref4.data,
|
|
130
|
+
list = _ref4.list,
|
|
131
|
+
detail = _ref4.detail;
|
|
132
|
+
if (code === 1) {
|
|
133
|
+
var _detail$list$ = detail[list[0]],
|
|
134
|
+
source = _detail$list$.source,
|
|
135
|
+
info = (0, _objectWithoutProperties2.default)(_detail$list$, _excluded);
|
|
136
|
+
_pageinfo.current = (0, _objectSpread2.default)({
|
|
137
|
+
relationship: data
|
|
138
|
+
}, info);
|
|
139
|
+
_setPageData((0, _dataProcess.decompress)(source));
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}, [code]);
|
|
130
143
|
return /*#__PURE__*/_react.default.createElement(Context.Provider, {
|
|
131
144
|
value: new Proxy((0, _objectSpread2.default)({
|
|
132
|
-
_pageCode: _pageCode,
|
|
133
|
-
_moduleCode: _moduleCode,
|
|
134
145
|
_setPageData: _setPageData,
|
|
146
|
+
loading: loading,
|
|
135
147
|
pageData: pageData,
|
|
136
148
|
history: _umi.history,
|
|
137
149
|
topics: topics,
|
|
@@ -142,7 +154,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
142
154
|
getElementPathById: getElementPathById,
|
|
143
155
|
getModule: getModule,
|
|
144
156
|
getDataSetById: getDataSetById,
|
|
145
|
-
doAction: doAction,
|
|
157
|
+
doAction: _action.doAction,
|
|
146
158
|
getUrlParams: getUrlParams
|
|
147
159
|
}, eventBus), {
|
|
148
160
|
get: function get(target, property, receiver) {
|
|
File without changes
|
|
@@ -18,6 +18,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
18
18
|
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
19
19
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
20
20
|
var LZString = _interopRequireWildcard(require("lz-string"));
|
|
21
|
+
var _constants = require("../../constants");
|
|
21
22
|
/**
|
|
22
23
|
* 数据压缩
|
|
23
24
|
* @param {JSON} data
|
|
@@ -27,7 +28,7 @@ function compress(data) {
|
|
|
27
28
|
// 将对象转换为JSON字符串
|
|
28
29
|
var jsonString = JSON.stringify(data);
|
|
29
30
|
// 使用LZ-String压缩JSON字符串
|
|
30
|
-
return LZString.
|
|
31
|
+
return LZString.compressToBase64(jsonString);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -37,7 +38,7 @@ function compress(data) {
|
|
|
37
38
|
*/
|
|
38
39
|
function decompress(compressedData) {
|
|
39
40
|
// 使用LZ-String解压数据
|
|
40
|
-
var jsonString = LZString.
|
|
41
|
+
var jsonString = LZString.decompressFromBase64(compressedData);
|
|
41
42
|
// 将JSON字符串转换回对象
|
|
42
43
|
return JSON.parse(jsonString);
|
|
43
44
|
}
|
|
@@ -119,7 +120,7 @@ function process(json, path, id, data) {
|
|
|
119
120
|
current[id] = {
|
|
120
121
|
props: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
121
122
|
id: id,
|
|
122
|
-
parentId: current.id
|
|
123
|
+
parentId: current.props.id
|
|
123
124
|
})
|
|
124
125
|
};
|
|
125
126
|
} else if (!path && id && data) {
|
|
@@ -194,6 +195,7 @@ function deleteById(json, id) {
|
|
|
194
195
|
function getPathById(json, id) {
|
|
195
196
|
var currentPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
196
197
|
for (var key in json) {
|
|
198
|
+
if (id === _constants.CELL_KEY.PAGE_ROOT) return '/';
|
|
197
199
|
var newPath = currentPath ? "".concat(currentPath, "/").concat(key) : key;
|
|
198
200
|
if (json[key].props && json[key].props.id === id) {
|
|
199
201
|
return newPath;
|
|
@@ -5,7 +5,77 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.isPromise = isPromise;
|
|
8
|
+
exports.listReducer = listReducer;
|
|
9
|
+
exports.omitBadProps = omitBadProps;
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
8
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
+
var _lodash = require("lodash");
|
|
9
14
|
function isPromise(value) {
|
|
10
15
|
return !!value && (0, _typeof2.default)(value) === 'object' && typeof value.then === 'function';
|
|
16
|
+
}
|
|
17
|
+
function omitBadProps(props) {
|
|
18
|
+
var rubbish = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
19
|
+
return (0, _lodash.omit)(props, ['component', 'name', 'desc', 'icon', 'group', 'groupName', 'order'].concat((0, _toConsumableArray2.default)(rubbish)));
|
|
20
|
+
}
|
|
21
|
+
function listReducer(state, action) {
|
|
22
|
+
switch (action.type) {
|
|
23
|
+
case 'add':
|
|
24
|
+
{
|
|
25
|
+
var _action$callback;
|
|
26
|
+
var newState = [].concat((0, _toConsumableArray2.default)(state), [action.payload]);
|
|
27
|
+
(_action$callback = action.callback) === null || _action$callback === void 0 || _action$callback.call(action, newState);
|
|
28
|
+
return newState;
|
|
29
|
+
}
|
|
30
|
+
case 'delete':
|
|
31
|
+
{
|
|
32
|
+
var _action$callback2;
|
|
33
|
+
var _newState = state.filter(function (item) {
|
|
34
|
+
return item.id !== action.payload;
|
|
35
|
+
});
|
|
36
|
+
(_action$callback2 = action.callback) === null || _action$callback2 === void 0 || _action$callback2.call(action, _newState);
|
|
37
|
+
return _newState;
|
|
38
|
+
}
|
|
39
|
+
case 'edit':
|
|
40
|
+
{
|
|
41
|
+
var _action$callback3;
|
|
42
|
+
var _newState2 = state.map(function (item) {
|
|
43
|
+
return item.id === action.payload.id ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), action.payload.data) : item;
|
|
44
|
+
});
|
|
45
|
+
(_action$callback3 = action.callback) === null || _action$callback3 === void 0 || _action$callback3.call(action, _newState2);
|
|
46
|
+
return _newState2;
|
|
47
|
+
}
|
|
48
|
+
case 'active':
|
|
49
|
+
{
|
|
50
|
+
var _action$callback4;
|
|
51
|
+
var _newState3 = state.map(function (item) {
|
|
52
|
+
item.active = false;
|
|
53
|
+
return item.id === action.payload.id ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), action.payload.data) : item;
|
|
54
|
+
});
|
|
55
|
+
(_action$callback4 = action.callback) === null || _action$callback4 === void 0 || _action$callback4.call(action, _newState3);
|
|
56
|
+
return _newState3;
|
|
57
|
+
}
|
|
58
|
+
case 'new':
|
|
59
|
+
{
|
|
60
|
+
var _action$callback5;
|
|
61
|
+
var _newState4 = (0, _toConsumableArray2.default)(action.payload);
|
|
62
|
+
(_action$callback5 = action.callback) === null || _action$callback5 === void 0 || _action$callback5.call(action, _newState4);
|
|
63
|
+
return _newState4;
|
|
64
|
+
}
|
|
65
|
+
case 'sort':
|
|
66
|
+
{
|
|
67
|
+
var _action$callback6;
|
|
68
|
+
var sortItems = action.payload;
|
|
69
|
+
var newItems = state.sort(function (a, b) {
|
|
70
|
+
var indexA = sortItems.indexOf(a.id);
|
|
71
|
+
var indexB = sortItems.indexOf(b.id);
|
|
72
|
+
return indexA - indexB;
|
|
73
|
+
});
|
|
74
|
+
(_action$callback6 = action.callback) === null || _action$callback6 === void 0 || _action$callback6.call(action, _newState5);
|
|
75
|
+
var _newState5 = (0, _toConsumableArray2.default)(newItems);
|
|
76
|
+
return _newState5;
|
|
77
|
+
}
|
|
78
|
+
default:
|
|
79
|
+
throw new Error();
|
|
80
|
+
}
|
|
11
81
|
}
|
|
File without changes
|
package/lib/lowcode/index.js
CHANGED
|
@@ -16,5 +16,9 @@ Object.defineProperty(exports, "View", {
|
|
|
16
16
|
return _view.default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
exports.default = launcher;
|
|
19
20
|
var _painter = _interopRequireDefault(require("./painter"));
|
|
20
|
-
var _view = _interopRequireDefault(require("./view"));
|
|
21
|
+
var _view = _interopRequireDefault(require("./view"));
|
|
22
|
+
// export * as dataProcess from './engine/tools/dataProcess';
|
|
23
|
+
|
|
24
|
+
function launcher() {}
|
|
File without changes
|
|
@@ -6,330 +6,54 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
11
|
var _umi = require("umi");
|
|
16
12
|
var _ahooks = require("ahooks");
|
|
13
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
17
14
|
var _antd = require("luck-design/antd");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
15
|
+
var _DesignToolbar = _interopRequireDefault(require("./DesignToolbar"));
|
|
16
|
+
var _DesignOperator = _interopRequireDefault(require("./DesignOperator"));
|
|
20
17
|
var _Page = _interopRequireDefault(require("../view/Page"));
|
|
21
|
-
var _dataProcess = require("../engine/tools/dataProcess");
|
|
22
|
-
var _constants = require("../constants");
|
|
23
18
|
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
24
|
-
var getOperatorStyle = function getOperatorStyle(page, cellNode) {
|
|
25
|
-
var _page$getBoundingClie = page.getBoundingClientRect(),
|
|
26
|
-
pageLeft = _page$getBoundingClie.left,
|
|
27
|
-
pageTop = _page$getBoundingClie.top;
|
|
28
|
-
var _cellNode$getBounding = cellNode.getBoundingClientRect(),
|
|
29
|
-
cellNodeLeft = _cellNode$getBounding.left,
|
|
30
|
-
cellNodeTop = _cellNode$getBounding.top;
|
|
31
|
-
return {
|
|
32
|
-
left: "".concat(cellNodeLeft - pageLeft, "px"),
|
|
33
|
-
top: "".concat(cellNodeTop - pageTop, "px"),
|
|
34
|
-
width: "".concat(cellNode.offsetWidth, "px"),
|
|
35
|
-
height: "".concat(cellNode.offsetHeight, "px")
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
19
|
var Design = function Design() {
|
|
39
|
-
var
|
|
40
|
-
var context = (0, _ContextProvider.useLDContext)();
|
|
41
|
-
var selectorRef = (0, _react.useRef)(null);
|
|
20
|
+
var _localeInfo$locale;
|
|
42
21
|
var simulatorRef = (0, _react.useRef)(null);
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
selector: null,
|
|
46
|
-
detector: null
|
|
22
|
+
var _useState = (0, _react.useState)(function () {
|
|
23
|
+
return (0, _umi.getLocale)();
|
|
47
24
|
}),
|
|
48
|
-
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
49
|
-
operatorId = _useSetState2[0],
|
|
50
|
-
setOperatorId = _useSetState2[1];
|
|
51
|
-
var _useState = (0, _react.useState)(null),
|
|
52
25
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
locale = _useState2[0],
|
|
27
|
+
setLocale = _useState2[1];
|
|
55
28
|
var _useState3 = (0, _react.useState)(function () {
|
|
56
|
-
return (0, _umi.getLocale)();
|
|
29
|
+
return (0, _umi.getIntl)((0, _umi.getLocale)(), true);
|
|
57
30
|
}),
|
|
58
31
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
return (0, _umi.getIntl)(locale, true);
|
|
63
|
-
}),
|
|
64
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
65
|
-
intl = _useState6[0],
|
|
66
|
-
setContainerIntl = _useState6[1];
|
|
67
|
-
var _useState7 = (0, _react.useState)('pc'),
|
|
68
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
69
|
-
activedTarget = _useState8[0],
|
|
70
|
-
setActivedTarget = _useState8[1];
|
|
71
|
-
(0, _ahooks.useEventListener)('mousemove', function (event) {
|
|
72
|
-
var elem = event.target;
|
|
73
|
-
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
74
|
-
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
75
|
-
if (targetCellId && targetCellId !== operatorId.detector && targetCellId !== operatorId.selector) {
|
|
76
|
-
setOperatorId({
|
|
77
|
-
detector: targetCellId
|
|
78
|
-
});
|
|
79
|
-
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
80
|
-
id: targetCellId
|
|
81
|
-
});
|
|
82
|
-
} else if (!targetCell || targetCellId === operatorId.selector) {
|
|
83
|
-
setOperatorId({
|
|
84
|
-
detector: null
|
|
85
|
-
});
|
|
86
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
target: simulatorRef
|
|
90
|
-
});
|
|
91
|
-
(0, _ahooks.useEventListener)('mouseleave', function () {
|
|
92
|
-
if (operatorId.detector) {
|
|
93
|
-
setOperatorId({
|
|
94
|
-
detector: null
|
|
95
|
-
});
|
|
96
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
97
|
-
}
|
|
98
|
-
}, {
|
|
99
|
-
target: simulatorRef
|
|
100
|
-
});
|
|
101
|
-
(0, _ahooks.useEventListener)('click', function (event) {
|
|
102
|
-
var elem = event.target;
|
|
103
|
-
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
104
|
-
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
105
|
-
if (!targetCellId || targetCellId === operatorId.selector) return;
|
|
106
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
107
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
108
|
-
id: targetCell.id
|
|
109
|
-
});
|
|
110
|
-
}, {
|
|
111
|
-
target: simulatorRef
|
|
112
|
-
});
|
|
113
|
-
(0, _react.useEffect)(function () {
|
|
114
|
-
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
115
|
-
if (payload.id) setOperatorId({
|
|
116
|
-
detector: payload.id
|
|
117
|
-
});else setOperatorId({
|
|
118
|
-
detector: null
|
|
119
|
-
});
|
|
120
|
-
}).watch();
|
|
121
|
-
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
122
|
-
if (payload.id) {
|
|
123
|
-
setOperatorId({
|
|
124
|
-
selector: payload.id,
|
|
125
|
-
detector: null
|
|
126
|
-
});
|
|
127
|
-
} else {
|
|
128
|
-
setOperatorId({
|
|
129
|
-
selector: null
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}).watch();
|
|
133
|
-
return function () {
|
|
134
|
-
context.$unsubscriber(context.topics.COMPONENT_HOVER, hcid);
|
|
135
|
-
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, acid);
|
|
136
|
-
};
|
|
137
|
-
}, [context.pageData]);
|
|
138
|
-
(0, _react.useEffect)(function () {
|
|
139
|
-
var moid = context.$subscriber(context.topics.MODAL_OPEN).on(function () {
|
|
140
|
-
simulatorRef.current.style.setProperty('overflow', 'hidden');
|
|
141
|
-
}).watch();
|
|
142
|
-
var mcid = context.$subscriber(context.topics.MODAL_CLOSE).on(function () {
|
|
143
|
-
simulatorRef.current.style.removeProperty('overflow');
|
|
144
|
-
}).watch();
|
|
145
|
-
var laid = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref) {
|
|
146
|
-
var _langList = _ref.langList;
|
|
147
|
-
return setLangList(_langList);
|
|
148
|
-
}).watch();
|
|
149
|
-
return function () {
|
|
150
|
-
context.$unsubscriber(context.topics.MODAL_OPEN, moid);
|
|
151
|
-
context.$unsubscriber(context.topics.MODAL_CLOSE, mcid);
|
|
152
|
-
context.$unsubscriber(context.topics.LANG_SETTING_SELECT, laid);
|
|
153
|
-
};
|
|
154
|
-
}, []);
|
|
155
|
-
(0, _react.useEffect)(function () {
|
|
156
|
-
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (_ref2) {
|
|
157
|
-
var data = _ref2.data;
|
|
158
|
-
if (!operatorId.selector) {
|
|
159
|
-
_antd.message.info('请在右侧画布选择节点');
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
if (context.componentMap.get(operatorId.selector).dom.getAttribute('name') !== 'box') {
|
|
163
|
-
_antd.message.info('该节点不支持添加子节点');
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
167
|
-
var _id = "".concat(data.component.toLowerCase(), "_").concat((0, _utils.suid)());
|
|
168
|
-
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
169
|
-
(0, _dataProcess.add)(cloneData, operatorId.selector, _id, json);
|
|
170
|
-
context._setPageData(cloneData).then(function (newData) {
|
|
171
|
-
context.$publisher(context.topics.COMPONENT_APPEND, {
|
|
172
|
-
id: _id,
|
|
173
|
-
pageData: newData
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
}).watch();
|
|
177
|
-
return function () {
|
|
178
|
-
return context.$unsubscriber(context.topics.COMPONENT_SETTING_CLICK, csid);
|
|
179
|
-
};
|
|
180
|
-
}, [context.pageData]);
|
|
181
|
-
var getDomById = (0, _ahooks.useMemoizedFn)(function (id) {
|
|
182
|
-
return context.componentMap.get(id).dom;
|
|
183
|
-
});
|
|
184
|
-
var handleLangChange = (0, _ahooks.useMemoizedFn)(function (locale) {
|
|
32
|
+
intl = _useState4[0],
|
|
33
|
+
setIntl = _useState4[1];
|
|
34
|
+
var handleLangChange = (0, _ahooks.useMemoizedFn)(function (_locale) {
|
|
185
35
|
if (_moment.default !== null && _moment.default !== void 0 && _moment.default.locale) {
|
|
186
|
-
var _localeInfo$
|
|
187
|
-
_moment.default.locale(((_localeInfo$
|
|
188
|
-
}
|
|
189
|
-
setLocale(locale);
|
|
190
|
-
setContainerIntl((0, _umi.getIntl)(locale));
|
|
191
|
-
});
|
|
192
|
-
var acticeProps = (0, _ahooks.useCreation)(function () {
|
|
193
|
-
if (operatorId.selector) {
|
|
194
|
-
var levelNodes = context.componentMap.get(operatorId.selector).api.getLevelNodes();
|
|
195
|
-
return {
|
|
196
|
-
props: (0, _lodash.last)(levelNodes),
|
|
197
|
-
menu: /*#__PURE__*/_react.default.createElement("div", {
|
|
198
|
-
className: _design.default['next-overlay-wrapper'],
|
|
199
|
-
onMouseLeave: function onMouseLeave() {
|
|
200
|
-
return handleHover();
|
|
201
|
-
}
|
|
202
|
-
}, (0, _lodash.reverse)((0, _lodash.initial)(levelNodes)).map(function (m) {
|
|
203
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
-
key: m.id
|
|
205
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
206
|
-
onClick: function onClick() {
|
|
207
|
-
return handleSelect(m.id);
|
|
208
|
-
},
|
|
209
|
-
onMouseOver: function onMouseOver() {
|
|
210
|
-
return handleHover(m.id);
|
|
211
|
-
}
|
|
212
|
-
}, m.name));
|
|
213
|
-
}))
|
|
214
|
-
};
|
|
36
|
+
var _localeInfo$_locale;
|
|
37
|
+
_moment.default.locale(((_localeInfo$_locale = _umi.localeInfo[_locale]) === null || _localeInfo$_locale === void 0 ? void 0 : _localeInfo$_locale.momentLocale) || 'en');
|
|
215
38
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
var handleSelect = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
219
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
220
|
-
id: _key
|
|
221
|
-
} : null);
|
|
222
|
-
});
|
|
223
|
-
var handleHover = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
224
|
-
context.$publisher(context.topics.COMPONENT_HOVER, _key ? {
|
|
225
|
-
id: _key
|
|
226
|
-
} : null);
|
|
227
|
-
});
|
|
228
|
-
var handleDelete = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
229
|
-
context.$publisher(context.topics.COMPONENT_DELETE, _key ? {
|
|
230
|
-
id: _key
|
|
231
|
-
} : null);
|
|
39
|
+
setLocale(_locale);
|
|
40
|
+
setIntl((0, _umi.getIntl)(_locale));
|
|
232
41
|
});
|
|
233
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
234
43
|
className: _design.default['lc-painter-design']
|
|
235
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
value: langList ? locale : undefined,
|
|
240
|
-
className: _design.default['i18n-selecter'],
|
|
241
|
-
style: {
|
|
242
|
-
fontSize: 12
|
|
243
|
-
},
|
|
244
|
-
onSelect: handleLangChange
|
|
245
|
-
}, langList === null || langList === void 0 ? void 0 : langList.map(function (item) {
|
|
246
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
247
|
-
key: item.field,
|
|
248
|
-
value: item.field
|
|
249
|
-
}, item.title);
|
|
250
|
-
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
251
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'pc')),
|
|
252
|
-
onClick: function onClick() {
|
|
253
|
-
return setActivedTarget('pc');
|
|
254
|
-
}
|
|
255
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
256
|
-
type: "laptop"
|
|
257
|
-
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
258
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'mobile')),
|
|
259
|
-
onClick: function onClick() {
|
|
260
|
-
return setActivedTarget('mobile');
|
|
261
|
-
}
|
|
262
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
263
|
-
type: "mobile"
|
|
264
|
-
})), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
265
|
-
type: "vertical"
|
|
266
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
267
|
-
style: {
|
|
268
|
-
width: 'auto',
|
|
269
|
-
fontSize: 12
|
|
270
|
-
},
|
|
271
|
-
className: _design.default['toolbar-item'],
|
|
272
|
-
onClick: function onClick() {
|
|
273
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
274
|
-
id: _constants.CELL_KEY.PAGE_ROOT
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
278
|
-
type: "vertical"
|
|
279
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
280
|
-
size: "small",
|
|
281
|
-
style: {
|
|
282
|
-
fontSize: 12,
|
|
283
|
-
margin: '0 2px'
|
|
284
|
-
}
|
|
285
|
-
}, "\u9884\u89C8"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
286
|
-
type: "vertical"
|
|
287
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
288
|
-
size: "small",
|
|
289
|
-
type: "primary",
|
|
290
|
-
style: {
|
|
291
|
-
fontSize: 12,
|
|
292
|
-
margin: '0 0 0 2px'
|
|
293
|
-
}
|
|
294
|
-
}, "\u4FDD\u5B58")), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_DesignToolbar.default, {
|
|
45
|
+
locale: locale,
|
|
46
|
+
onLangChange: handleLangChange
|
|
47
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
295
48
|
className: _design.default['lc-painter-design-workspace']
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}), operatorId.selector && /*#__PURE__*/_react.default.createElement("div", {
|
|
301
|
-
id: "lc-selector",
|
|
302
|
-
ref: selectorRef,
|
|
303
|
-
key: "".concat((size === null || size === void 0 ? void 0 : size.width) || 0, "-").concat((size === null || size === void 0 ? void 0 : size.height) || 0),
|
|
304
|
-
className: _design.default['lc-painter-design-selector'],
|
|
305
|
-
style: getOperatorStyle(simulatorRef.current, getDomById(operatorId.selector))
|
|
306
|
-
}, acticeProps && /*#__PURE__*/_react.default.createElement("div", {
|
|
307
|
-
className: _design.default['lc-borders-actions'],
|
|
308
|
-
style: acticeProps.props.id === _constants.CELL_KEY.PAGE_ROOT ? {
|
|
309
|
-
top: 0
|
|
310
|
-
} : ((_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.offsetTop) < 23 ? {
|
|
311
|
-
bottom: '-23px'
|
|
312
|
-
} : {
|
|
313
|
-
top: '-23px'
|
|
314
|
-
}
|
|
315
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
316
|
-
overlay: acticeProps.menu,
|
|
317
|
-
placement: "bottomLeft"
|
|
318
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
319
|
-
className: "instance-node-selector"
|
|
320
|
-
}, acticeProps.props.name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
321
|
-
onClick: function onClick() {
|
|
322
|
-
return handleDelete(acticeProps.props);
|
|
323
|
-
}
|
|
324
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
325
|
-
type: "delete"
|
|
326
|
-
})))), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
327
|
-
locale: ((_localeInfo$locale2 = _umi.localeInfo[locale]) === null || _localeInfo$locale2 === void 0 ? void 0 : _localeInfo$locale2.antd) || {}
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_DesignOperator.default, {
|
|
50
|
+
target: simulatorRef
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
52
|
+
locale: ((_localeInfo$locale = _umi.localeInfo[locale]) === null || _localeInfo$locale === void 0 ? void 0 : _localeInfo$locale.antd) || {}
|
|
328
53
|
}, /*#__PURE__*/_react.default.createElement(_umi.RawIntlProvider, {
|
|
329
54
|
value: intl
|
|
330
55
|
}, /*#__PURE__*/_react.default.createElement(_Page.default, {
|
|
331
56
|
ref: simulatorRef,
|
|
332
|
-
pageCode: "mk2i87qb",
|
|
333
57
|
className: _design.default['lc-painter-design-simulator']
|
|
334
58
|
})))));
|
|
335
59
|
};
|