@luck-design-biz/luckda 0.0.23 → 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/es/components/Builder/index.js +6 -4
- package/es/components/LdFormList/index.js +1 -4
- package/es/components/LdGrid/index.js +12 -3
- package/es/lowcode/constants/api-url.js +292 -1
- package/es/lowcode/constants/event-topics.js +14 -1
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +51 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +42 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +44 -0
- package/es/lowcode/engine/meta/box.props.default.json +12 -0
- package/es/lowcode/engine/meta/box.props.json +42 -0
- package/es/lowcode/engine/meta/button.props.default.json +15 -7
- package/es/lowcode/engine/meta/{components/button.json → button.props.json} +126 -103
- package/es/lowcode/engine/meta/cardlist.props.default.json +17 -9
- package/es/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +143 -142
- package/es/lowcode/engine/meta/components-list.json +127 -121
- package/es/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/{lib/lowcode/engine/meta/components/modal.json → es/lowcode/engine/meta/dialog.props.json} +120 -119
- package/es/lowcode/engine/meta/drawer.props.default.json +17 -9
- package/{lib/lowcode/engine/meta/components/drawer.json → es/lowcode/engine/meta/drawer.props.json} +143 -142
- package/es/lowcode/engine/meta/form.props.default.json +12 -4
- package/{lib/lowcode/engine/meta/components/form.json → es/lowcode/engine/meta/form.props.json} +116 -115
- package/es/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/es/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/es/lowcode/engine/meta/image.props.default.json +15 -7
- package/es/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/es/lowcode/engine/meta/imex.props.default.json +11 -3
- package/{lib/lowcode/engine/meta/components/imex.json → es/lowcode/engine/meta/imex.props.json} +81 -80
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +10 -1
- package/es/lowcode/engine/meta/{components/jsx.json → jsx.props.json} +24 -23
- package/es/lowcode/engine/meta/layout.props.default.json +12 -4
- package/{lib/lowcode/engine/meta/components/layout.json → es/lowcode/engine/meta/layout.props.json} +107 -106
- package/es/lowcode/engine/meta/link.props.default.json +13 -5
- package/{lib/lowcode/engine/meta/components/link.json → es/lowcode/engine/meta/link.props.json} +111 -110
- package/es/lowcode/engine/meta/section.props.default.json +16 -8
- package/{lib/lowcode/engine/meta/components/section.json → es/lowcode/engine/meta/section.props.json} +107 -106
- package/es/lowcode/engine/meta/split.props.default.json +12 -4
- package/es/lowcode/engine/meta/{components/split.json → split.props.json} +71 -70
- package/es/lowcode/engine/meta/table.props.default.json +29 -9
- package/es/lowcode/engine/meta/table.props.json +236 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +17 -9
- package/es/lowcode/engine/meta/{components/tabs.json → tabs.props.json} +140 -139
- package/es/lowcode/engine/meta/text.props.default.json +11 -3
- package/{lib/lowcode/engine/meta/components/text.json → es/lowcode/engine/meta/text.props.json} +65 -64
- package/es/lowcode/engine/meta/tree.props.default.json +16 -8
- package/es/lowcode/engine/meta/{components/tree.json → tree.props.json} +156 -155
- package/es/lowcode/engine/provider/ContextProvider.js +46 -41
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/tools/dataProcess.js +85 -8
- package/es/lowcode/engine/tools/helper.js +68 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +3 -1
- package/es/lowcode/painter/Design.js +40 -85
- package/es/lowcode/painter/DesignOperator.js +271 -0
- package/es/lowcode/painter/DesignToolbar.js +91 -0
- package/es/lowcode/painter/I18n.js +202 -2
- package/es/lowcode/painter/Outline.js +63 -54
- package/es/lowcode/painter/Panel.js +239 -2
- package/es/lowcode/painter/Ribbon.js +61 -55
- package/es/lowcode/painter/components/Collapse.js +90 -0
- package/es/lowcode/painter/components/ColorInput.js +125 -0
- package/es/lowcode/painter/components/ListEditor.js +89 -0
- package/es/lowcode/painter/components/NumberInput.js +148 -0
- package/es/lowcode/painter/components/PanelItem.js +83 -11
- package/es/lowcode/painter/components/PopConfirm.js +23 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/RuleInput.js +9 -7
- package/es/lowcode/painter/components/SortBox.js +92 -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 +96 -0
- package/es/lowcode/painter/components/code-editor/CssEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +87 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +106 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/index.js +33 -3
- package/es/lowcode/painter/panel-section/ButtonType.js +39 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +61 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +134 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +57 -49
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +296 -0
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +543 -0
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +96 -0
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +148 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +51 -0
- package/es/lowcode/painter/panel-section/StylePanel/index.js +29 -0
- package/es/lowcode/painter/panel-section/TabItems.js +207 -0
- 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 +85 -0
- package/es/lowcode/painter/style/actions-editor.less +16 -0
- package/es/lowcode/painter/style/border-editor.less +36 -0
- package/es/lowcode/painter/style/border-radius-selector.less +43 -0
- package/es/lowcode/painter/style/border-selector.less +40 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/collapse.less +22 -0
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/design.less +116 -5
- package/es/lowcode/painter/style/display.less +17 -0
- package/es/lowcode/painter/style/font-editor.less +9 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/index.less +0 -1
- package/es/lowcode/painter/style/layout-ratio.less +1 -1
- package/es/lowcode/painter/style/list-editor.less +59 -0
- package/es/lowcode/painter/style/number-input.less +17 -0
- package/es/lowcode/painter/style/outline.less +2 -0
- package/es/lowcode/painter/style/panel-item.less +45 -12
- package/es/lowcode/painter/style/panel.less +124 -0
- package/es/lowcode/painter/style/pop-confirm.less +10 -0
- package/es/lowcode/painter/style/pop-form.less +20 -0
- package/es/lowcode/painter/style/ribbon.less +1 -0
- package/es/lowcode/painter/style/style-panel.less +37 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/view/Canvas.js +79 -70
- package/es/lowcode/view/Page.js +10 -28
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +20 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +22 -5
- package/es/lowcode/view/lc-components/Box/index.less +15 -0
- package/es/lowcode/view/lc-components/Box/meta.json +42 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +21 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Button/index.js +75 -7
- package/es/lowcode/view/lc-components/Button/meta.json +127 -0
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +9 -0
- package/{lib/lowcode/engine/meta/components/table.json → es/lowcode/view/lc-components/CardList/meta.json} +11 -28
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +54 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +20 -11
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +20 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +22 -9
- package/es/lowcode/view/lc-components/Drawer/index.less +7 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Form/meta.json +117 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -0
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +75 -0
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +15 -0
- package/es/lowcode/view/lc-components/Layout/index.js +40 -7
- package/es/lowcode/view/lc-components/Layout/index.less +5 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Section/meta.json +108 -0
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Split/meta.json +72 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +18 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +229 -9
- package/es/lowcode/view/lc-components/Table/meta.json +225 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -0
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/es/lowcode/view/lc-components/Wrapper.js +32 -23
- package/es/lowcode/view/style/page.less +0 -1
- package/es/upload/Form/gridForm.js +1 -1
- package/es/utils/grid.js +4 -3
- package/lib/components/Builder/index.js +5 -3
- package/lib/components/LdFormList/index.js +1 -5
- package/lib/components/LdGrid/index.js +12 -3
- package/lib/lowcode/constants/api-url.js +294 -2
- package/lib/lowcode/constants/event-topics.js +15 -2
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +57 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +48 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +50 -0
- package/lib/lowcode/engine/meta/box.props.default.json +12 -0
- package/lib/lowcode/engine/meta/box.props.json +42 -0
- package/lib/lowcode/engine/meta/button.props.default.json +15 -7
- package/lib/lowcode/engine/meta/{components/button.json → button.props.json} +126 -103
- package/lib/lowcode/engine/meta/cardlist.props.default.json +17 -9
- package/lib/lowcode/engine/meta/{components/card-list.json → cardlist.props.json} +143 -142
- package/lib/lowcode/engine/meta/components-list.json +127 -121
- package/lib/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/{es/lowcode/engine/meta/components/modal.json → lib/lowcode/engine/meta/dialog.props.json} +120 -119
- package/lib/lowcode/engine/meta/drawer.props.default.json +17 -9
- package/{es/lowcode/engine/meta/components/drawer.json → lib/lowcode/engine/meta/drawer.props.json} +143 -142
- package/lib/lowcode/engine/meta/form.props.default.json +12 -4
- package/{es/lowcode/engine/meta/components/form.json → lib/lowcode/engine/meta/form.props.json} +116 -115
- package/lib/lowcode/engine/meta/iframe.props.default.json +10 -2
- package/lib/lowcode/engine/meta/{components/iframe.json → iframe.props.json} +31 -30
- package/lib/lowcode/engine/meta/image.props.default.json +15 -7
- package/lib/lowcode/engine/meta/{components/image.json → image.props.json} +113 -112
- package/lib/lowcode/engine/meta/imex.props.default.json +11 -3
- package/{es/lowcode/engine/meta/components/imex.json → lib/lowcode/engine/meta/imex.props.json} +81 -80
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +10 -1
- package/lib/lowcode/engine/meta/{components/jsx.json → jsx.props.json} +24 -23
- package/lib/lowcode/engine/meta/layout.props.default.json +12 -4
- package/{es/lowcode/engine/meta/components/layout.json → lib/lowcode/engine/meta/layout.props.json} +107 -106
- package/lib/lowcode/engine/meta/link.props.default.json +13 -5
- package/{es/lowcode/engine/meta/components/link.json → lib/lowcode/engine/meta/link.props.json} +111 -110
- package/lib/lowcode/engine/meta/section.props.default.json +16 -8
- package/{es/lowcode/engine/meta/components/section.json → lib/lowcode/engine/meta/section.props.json} +107 -106
- package/lib/lowcode/engine/meta/split.props.default.json +12 -4
- package/lib/lowcode/engine/meta/{components/split.json → split.props.json} +71 -70
- package/lib/lowcode/engine/meta/table.props.default.json +29 -9
- package/lib/lowcode/engine/meta/table.props.json +236 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +17 -9
- package/lib/lowcode/engine/meta/{components/tabs.json → tabs.props.json} +140 -139
- package/lib/lowcode/engine/meta/text.props.default.json +11 -3
- package/{es/lowcode/engine/meta/components/text.json → lib/lowcode/engine/meta/text.props.json} +65 -64
- package/lib/lowcode/engine/meta/tree.props.default.json +16 -8
- package/lib/lowcode/engine/meta/{components/tree.json → tree.props.json} +156 -155
- package/lib/lowcode/engine/provider/ContextProvider.js +46 -41
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/tools/dataProcess.js +86 -8
- package/lib/lowcode/engine/tools/helper.js +70 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +5 -1
- package/lib/lowcode/painter/Design.js +39 -84
- package/lib/lowcode/painter/DesignOperator.js +278 -0
- package/lib/lowcode/painter/DesignToolbar.js +99 -0
- package/lib/lowcode/painter/I18n.js +203 -2
- package/lib/lowcode/painter/Outline.js +62 -53
- package/lib/lowcode/painter/Panel.js +238 -1
- package/lib/lowcode/painter/Ribbon.js +63 -64
- package/lib/lowcode/painter/components/Collapse.js +97 -0
- package/lib/lowcode/painter/components/ColorInput.js +132 -0
- package/lib/lowcode/painter/components/ListEditor.js +95 -0
- package/lib/lowcode/painter/components/NumberInput.js +155 -0
- package/lib/lowcode/painter/components/PanelItem.js +84 -11
- package/lib/lowcode/painter/components/PopConfirm.js +29 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/RuleInput.js +9 -7
- package/lib/lowcode/painter/components/SortBox.js +99 -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 +103 -0
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +117 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/index.js +35 -3
- package/lib/lowcode/painter/panel-section/ButtonType.js +46 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +69 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +56 -48
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +303 -0
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +550 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +103 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +59 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +159 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +58 -0
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +35 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +215 -0
- 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 +95 -0
- package/lib/lowcode/painter/style/actions-editor.less +16 -0
- package/lib/lowcode/painter/style/border-editor.less +36 -0
- package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
- package/lib/lowcode/painter/style/border-selector.less +40 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/collapse.less +22 -0
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/design.less +116 -5
- package/lib/lowcode/painter/style/display.less +17 -0
- package/lib/lowcode/painter/style/font-editor.less +9 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/index.less +0 -1
- package/lib/lowcode/painter/style/layout-ratio.less +1 -1
- package/lib/lowcode/painter/style/list-editor.less +59 -0
- package/lib/lowcode/painter/style/number-input.less +17 -0
- package/lib/lowcode/painter/style/outline.less +2 -0
- package/lib/lowcode/painter/style/panel-item.less +45 -12
- package/lib/lowcode/painter/style/panel.less +124 -0
- package/lib/lowcode/painter/style/pop-confirm.less +10 -0
- package/lib/lowcode/painter/style/pop-form.less +20 -0
- package/lib/lowcode/painter/style/ribbon.less +1 -0
- package/lib/lowcode/painter/style/style-panel.less +37 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/view/Canvas.js +84 -75
- package/lib/lowcode/view/Page.js +9 -27
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +27 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +23 -6
- package/lib/lowcode/view/lc-components/Box/index.less +15 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +42 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +28 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Button/index.js +76 -8
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -0
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +16 -0
- package/{es/lowcode/engine/meta/components/table.json → lib/lowcode/view/lc-components/CardList/meta.json} +11 -28
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +62 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +20 -11
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +27 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +22 -9
- package/lib/lowcode/view/lc-components/Drawer/index.less +7 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +117 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +82 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +22 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +41 -8
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +25 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +228 -8
- package/lib/lowcode/view/lc-components/Table/meta.json +225 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +30 -21
- package/lib/lowcode/view/style/page.less +0 -1
- package/lib/upload/Form/gridForm.js +1 -1
- package/lib/utils/grid.js +6 -5
- package/package.json +15 -6
- package/es/lowcode/engine/meta/modal.props.default.json +0 -11
- package/es/lowcode/engine/tools/lcid.js +0 -16
- package/es/lowcode/painter/panel-section/Radio.js +0 -58
- package/lib/lowcode/engine/meta/modal.props.default.json +0 -11
- package/lib/lowcode/engine/tools/lcid.js +0 -22
- package/lib/lowcode/painter/panel-section/Radio.js +0 -65
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { useMemoizedFn } from 'ahooks';
|
|
3
|
+
import { Tooltip, Icon, Input, Segmented, Select } from 'luck-design/antd';
|
|
4
|
+
import { cloneDeep, debounce } from 'lodash';
|
|
5
|
+
import PopConfirm from "../../components/PopConfirm";
|
|
6
|
+
import { PopForm, PopFormItem, PopFormItemLeft, PopFormItemRight } from "../../components/PopForm";
|
|
7
|
+
import JSEditor from "../../components/code-editor/JSEditor";
|
|
8
|
+
import FullScreenEditor from "../../components/code-editor/FullScreenEditor";
|
|
9
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
10
|
+
import styles from "../../style/actions-editor.less";
|
|
11
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.actionEditor';
|
|
12
|
+
var _SERIAL_EFFECT_OPTIONS_ = [{
|
|
13
|
+
label: formatMessage({
|
|
14
|
+
id: "".concat(_I18N_PREFIX_, ".hidden"),
|
|
15
|
+
label: '隐藏'
|
|
16
|
+
}),
|
|
17
|
+
value: 'hidden'
|
|
18
|
+
}, {
|
|
19
|
+
label: formatMessage({
|
|
20
|
+
id: "".concat(_I18N_PREFIX_, ".disable"),
|
|
21
|
+
label: '禁用'
|
|
22
|
+
}),
|
|
23
|
+
value: 'disable'
|
|
24
|
+
}];
|
|
25
|
+
var _RISK_LEVEL_OPTIONS_ = [{
|
|
26
|
+
label: formatMessage({
|
|
27
|
+
id: "".concat(_I18N_PREFIX_, ".default"),
|
|
28
|
+
label: '一般'
|
|
29
|
+
}),
|
|
30
|
+
value: 'default'
|
|
31
|
+
}, {
|
|
32
|
+
label: formatMessage({
|
|
33
|
+
id: "".concat(_I18N_PREFIX_, ".danger"),
|
|
34
|
+
label: '危险'
|
|
35
|
+
}),
|
|
36
|
+
value: 'danger'
|
|
37
|
+
}, {
|
|
38
|
+
label: formatMessage({
|
|
39
|
+
id: "".concat(_I18N_PREFIX_, ".destroy"),
|
|
40
|
+
label: '毁灭'
|
|
41
|
+
}),
|
|
42
|
+
value: 'destroy'
|
|
43
|
+
}];
|
|
44
|
+
var ActionEditor = function ActionEditor(_ref) {
|
|
45
|
+
var action = _ref.action,
|
|
46
|
+
onChange = _ref.onChange;
|
|
47
|
+
var editorRef = useRef();
|
|
48
|
+
var valueRef = useRef(cloneDeep(action));
|
|
49
|
+
var handleCodeChange = useRef(debounce(function (code) {
|
|
50
|
+
valueRef.current.actionCode = code;
|
|
51
|
+
onChange(valueRef.current);
|
|
52
|
+
}, 400));
|
|
53
|
+
var handleChange = useMemoizedFn(function (field, value) {
|
|
54
|
+
valueRef.current[field] = value;
|
|
55
|
+
onChange(valueRef.current);
|
|
56
|
+
});
|
|
57
|
+
var handOnEditorLoad = useMemoizedFn(function () {
|
|
58
|
+
editorRef.current.editor.setValue(action.actionCode);
|
|
59
|
+
});
|
|
60
|
+
return /*#__PURE__*/React.createElement(PopForm, null, /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
61
|
+
id: "".concat(_I18N_PREFIX_, ".name"),
|
|
62
|
+
label: '名称'
|
|
63
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
64
|
+
size: "small",
|
|
65
|
+
defaultValue: action.name,
|
|
66
|
+
onChange: function onChange(e) {
|
|
67
|
+
return handleChange('name', e.target.value);
|
|
68
|
+
},
|
|
69
|
+
placeholder: formatMessage({
|
|
70
|
+
id: "".concat(_I18N_PREFIX_, ".name.placeholder"),
|
|
71
|
+
label: '请输入行为名称'
|
|
72
|
+
})
|
|
73
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
74
|
+
id: "".concat(_I18N_PREFIX_, ".serial"),
|
|
75
|
+
label: '资源串'
|
|
76
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
77
|
+
size: "small",
|
|
78
|
+
defaultValue: action.serial,
|
|
79
|
+
onChange: function onChange(e) {
|
|
80
|
+
return handleChange('serial', e.target.value);
|
|
81
|
+
},
|
|
82
|
+
placeholder: formatMessage({
|
|
83
|
+
id: "".concat(_I18N_PREFIX_, ".serial.placeholder"),
|
|
84
|
+
label: '请输入行为名称'
|
|
85
|
+
})
|
|
86
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
87
|
+
id: "".concat(_I18N_PREFIX_, ".serialEffect"),
|
|
88
|
+
label: '越权效果'
|
|
89
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Segmented, {
|
|
90
|
+
size: "small",
|
|
91
|
+
options: _SERIAL_EFFECT_OPTIONS_,
|
|
92
|
+
value: action.serialEffect,
|
|
93
|
+
onChange: function onChange(value) {
|
|
94
|
+
return handleChange('serialEffect', value);
|
|
95
|
+
}
|
|
96
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
97
|
+
id: "".concat(_I18N_PREFIX_, ".serialEffect"),
|
|
98
|
+
label: '风险等级'
|
|
99
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Segmented, {
|
|
100
|
+
size: "small",
|
|
101
|
+
options: _RISK_LEVEL_OPTIONS_,
|
|
102
|
+
value: action.riskLevel,
|
|
103
|
+
onChange: function onChange(value) {
|
|
104
|
+
return handleChange('riskLevel', value);
|
|
105
|
+
}
|
|
106
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
107
|
+
id: "".concat(_I18N_PREFIX_, ".actionPool"),
|
|
108
|
+
label: '行为池'
|
|
109
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, {
|
|
110
|
+
style: {
|
|
111
|
+
position: 'relative'
|
|
112
|
+
}
|
|
113
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
114
|
+
size: "small",
|
|
115
|
+
mode: "multiple",
|
|
116
|
+
className: styles['action-pool-selector'],
|
|
117
|
+
defaultValue: action.actionPool,
|
|
118
|
+
onChange: function onChange(value) {
|
|
119
|
+
return handleChange('actionPool', value);
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
122
|
+
value: "jack"
|
|
123
|
+
}, "Jack"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
124
|
+
value: "lucy"
|
|
125
|
+
}, "Lucy"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
126
|
+
value: "yiminghe"
|
|
127
|
+
}, "Yiminghe")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
128
|
+
title: formatMessage({
|
|
129
|
+
id: 'luckda.lowcode.painter.coder',
|
|
130
|
+
label: '编码器'
|
|
131
|
+
})
|
|
132
|
+
}, /*#__PURE__*/React.createElement(PopConfirm, {
|
|
133
|
+
placement: "top",
|
|
134
|
+
title: /*#__PURE__*/React.createElement(FullScreenEditor, {
|
|
135
|
+
ref: editorRef,
|
|
136
|
+
EditorComponent: JSEditor,
|
|
137
|
+
width: "640px",
|
|
138
|
+
height: "300px",
|
|
139
|
+
onChange: handleCodeChange.current,
|
|
140
|
+
onLoad: handOnEditorLoad
|
|
141
|
+
})
|
|
142
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
143
|
+
type: "code",
|
|
144
|
+
className: styles['action-pool-coder']
|
|
145
|
+
}))))));
|
|
146
|
+
};
|
|
147
|
+
export default ActionEditor;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef, useReducer } from 'react';
|
|
3
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
|
+
import { Tooltip, Icon, Segmented, InputNumber } from 'luck-design/antd';
|
|
5
|
+
import { cloneDeep } from 'lodash';
|
|
6
|
+
import ActionEditor from "./ActionEditor";
|
|
7
|
+
import PanelItem from "../PanelItem";
|
|
8
|
+
import { SortBox, SortItem } from "../../components/SortBox";
|
|
9
|
+
import { ListEditor, ListEditorItem } from "../../components/ListEditor";
|
|
10
|
+
import PopConfirm from "../../components/PopConfirm";
|
|
11
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
12
|
+
import { listReducer } from "../../../engine/tools/helper";
|
|
13
|
+
import styles from "../../style/actions-editor.less";
|
|
14
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.actionsEditor';
|
|
15
|
+
var _DISPLAY_OPTIONS_ = [{
|
|
16
|
+
label: formatMessage({
|
|
17
|
+
id: "".concat(_I18N_PREFIX_, ".button"),
|
|
18
|
+
label: '按钮'
|
|
19
|
+
}),
|
|
20
|
+
value: 'button'
|
|
21
|
+
}, {
|
|
22
|
+
label: formatMessage({
|
|
23
|
+
id: "".concat(_I18N_PREFIX_, ".text"),
|
|
24
|
+
label: '文本'
|
|
25
|
+
}),
|
|
26
|
+
value: 'text'
|
|
27
|
+
}];
|
|
28
|
+
var ActionsEditor = function ActionsEditor(_ref) {
|
|
29
|
+
var defaultValue = _ref.defaultValue,
|
|
30
|
+
onChange = _ref.onChange;
|
|
31
|
+
var valueRef = useRef(cloneDeep(defaultValue));
|
|
32
|
+
var _useReducer = useReducer(listReducer, defaultValue.todoList || []),
|
|
33
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
34
|
+
todoList = _useReducer2[0],
|
|
35
|
+
dispatch = _useReducer2[1];
|
|
36
|
+
var handleAdd = useMemoizedFn(function () {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'add',
|
|
39
|
+
payload: {
|
|
40
|
+
id: suid(),
|
|
41
|
+
name: "\u64CD\u4F5C".concat(todoList.length + 1),
|
|
42
|
+
serial: void 0,
|
|
43
|
+
serialEffect: 'hidden',
|
|
44
|
+
riskLevel: 'default',
|
|
45
|
+
actionPool: [],
|
|
46
|
+
actionCode: void 0
|
|
47
|
+
},
|
|
48
|
+
callback: function callback(newActions) {
|
|
49
|
+
valueRef.current.todoList = newActions;
|
|
50
|
+
onChange(valueRef.current);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var handleSortChange = useMemoizedFn(function (sortItems) {
|
|
55
|
+
dispatch({
|
|
56
|
+
type: 'sort',
|
|
57
|
+
payload: sortItems,
|
|
58
|
+
callback: function callback(newActions) {
|
|
59
|
+
valueRef.current.todoList = newActions;
|
|
60
|
+
onChange(valueRef.current);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
var handleValueChange = useMemoizedFn(function (field, value) {
|
|
65
|
+
if (field === 'action') {
|
|
66
|
+
dispatch({
|
|
67
|
+
type: 'edit',
|
|
68
|
+
payload: {
|
|
69
|
+
id: value.id,
|
|
70
|
+
data: value
|
|
71
|
+
},
|
|
72
|
+
callback: function callback(newActions) {
|
|
73
|
+
valueRef.current.todoList = newActions;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
valueRef.current[field] = value;
|
|
78
|
+
}
|
|
79
|
+
onChange(valueRef.current);
|
|
80
|
+
});
|
|
81
|
+
var renderItemRight = useMemoizedFn(function (action) {
|
|
82
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
83
|
+
title: formatMessage({
|
|
84
|
+
id: 'luckda.lowcode.painter.edit',
|
|
85
|
+
label: '编辑'
|
|
86
|
+
})
|
|
87
|
+
}, /*#__PURE__*/React.createElement(PopConfirm, {
|
|
88
|
+
placement: "left",
|
|
89
|
+
title: /*#__PURE__*/React.createElement(ActionEditor, {
|
|
90
|
+
action: action,
|
|
91
|
+
onChange: function onChange(value) {
|
|
92
|
+
return handleValueChange('action', value);
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
96
|
+
type: "edit",
|
|
97
|
+
style: {
|
|
98
|
+
marginRight: '8px',
|
|
99
|
+
cursor: 'pointer'
|
|
100
|
+
}
|
|
101
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
102
|
+
title: formatMessage({
|
|
103
|
+
id: 'luckda.lowcode.painter.delete',
|
|
104
|
+
label: '删除'
|
|
105
|
+
})
|
|
106
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
107
|
+
type: "delete",
|
|
108
|
+
style: {
|
|
109
|
+
marginRight: '8px',
|
|
110
|
+
cursor: 'pointer'
|
|
111
|
+
}
|
|
112
|
+
})));
|
|
113
|
+
});
|
|
114
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: styles['lc-painter-panel-section-components-actionsEditor']
|
|
116
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
style: {
|
|
118
|
+
width: '100%',
|
|
119
|
+
padding: '0 16px'
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/React.createElement(PanelItem, {
|
|
122
|
+
suppressPadding: true,
|
|
123
|
+
label: formatMessage({
|
|
124
|
+
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
125
|
+
label: '展现形式'
|
|
126
|
+
})
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Segmented, {
|
|
128
|
+
size: "small",
|
|
129
|
+
options: _DISPLAY_OPTIONS_,
|
|
130
|
+
defaultValue: defaultValue.display,
|
|
131
|
+
onChange: function onChange(value) {
|
|
132
|
+
return handleValueChange('display', value);
|
|
133
|
+
}
|
|
134
|
+
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
135
|
+
suppressPadding: true,
|
|
136
|
+
label: formatMessage({
|
|
137
|
+
id: "".concat(_I18N_PREFIX_, ".max"),
|
|
138
|
+
label: '最大显示数'
|
|
139
|
+
})
|
|
140
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
141
|
+
size: "small",
|
|
142
|
+
defaultValue: defaultValue.max,
|
|
143
|
+
onChange: function onChange(value) {
|
|
144
|
+
return handleValueChange('max', value);
|
|
145
|
+
}
|
|
146
|
+
})), /*#__PURE__*/React.createElement(SortBox, {
|
|
147
|
+
datas: todoList.map(function (_ref2) {
|
|
148
|
+
var id = _ref2.id;
|
|
149
|
+
return id;
|
|
150
|
+
}),
|
|
151
|
+
onChange: handleSortChange
|
|
152
|
+
}, /*#__PURE__*/React.createElement(ListEditor, {
|
|
153
|
+
addText: formatMessage({
|
|
154
|
+
id: "".concat(_I18N_PREFIX_, ".add"),
|
|
155
|
+
label: '添加操作'
|
|
156
|
+
}),
|
|
157
|
+
handleAdd: handleAdd
|
|
158
|
+
}, todoList.map(function (action) {
|
|
159
|
+
return /*#__PURE__*/React.createElement(SortItem, {
|
|
160
|
+
key: action.id,
|
|
161
|
+
id: action.id
|
|
162
|
+
}, /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
163
|
+
left: /*#__PURE__*/React.createElement("span", null, action.name),
|
|
164
|
+
right: renderItemRight(action),
|
|
165
|
+
item: action,
|
|
166
|
+
dispatch: dispatch
|
|
167
|
+
}));
|
|
168
|
+
})))));
|
|
169
|
+
};
|
|
170
|
+
export default ActionsEditor;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["onChange", "isFullscreen"],
|
|
5
|
+
_excluded2 = ["children", "language", "options"];
|
|
6
|
+
import React, { useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
7
|
+
import * as monaco from 'monaco-editor';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* BaseEditor 组件是一个封装了 monaco 编辑器的 React 组件,支持前向 ref 引用。
|
|
11
|
+
* 该组件允许用户编辑代码,并在代码发生变更时触发回调函数。
|
|
12
|
+
* 它还支持通过 props 控制编辑器的语言、选项以及是否全屏显示。
|
|
13
|
+
*
|
|
14
|
+
* @component
|
|
15
|
+
* @example
|
|
16
|
+
* const handleEditorChange = (newValue, event) => {
|
|
17
|
+
* console.log('Editor content changed: ', newValue);
|
|
18
|
+
* };
|
|
19
|
+
* <BaseEditor
|
|
20
|
+
* language="javascript"
|
|
21
|
+
* onChange={handleEditorChange}
|
|
22
|
+
* isFullscreen={false}
|
|
23
|
+
* width="600px"
|
|
24
|
+
* height="400px"
|
|
25
|
+
* >
|
|
26
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
27
|
+
* </BaseEditor>
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} props - 组件的属性。
|
|
30
|
+
* @param {Function} props.onChange - 当编辑器内容变更时调用的函数。接收最新的编辑器内容和事件对象作为参数。
|
|
31
|
+
* @param {boolean} props.isFullscreen - 控制编辑器是否全屏显示。
|
|
32
|
+
* @param {string} [props.language='javascript'] - 设置编辑器的编程语言,默认为 'javascript'。
|
|
33
|
+
* @param {Object} [props.options={}] - 用于自定义编辑器的选项。
|
|
34
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始代码。
|
|
35
|
+
* @param {string} [props.width] - 编辑器的宽度,默认为 '100%'。
|
|
36
|
+
* @param {string} [props.height] - 编辑器的高度,默认为 '100%'。
|
|
37
|
+
* @param {Object} rest - 传递给 div 容器的其它属性。
|
|
38
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
39
|
+
*
|
|
40
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个配置好的 monaco 编辑器实例。
|
|
41
|
+
*/
|
|
42
|
+
var BaseEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
43
|
+
var onChange = _ref.onChange,
|
|
44
|
+
isFullscreen = _ref.isFullscreen,
|
|
45
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
var children = props.children,
|
|
47
|
+
_props$language = props.language,
|
|
48
|
+
language = _props$language === void 0 ? 'javascript' : _props$language,
|
|
49
|
+
_props$options = props.options,
|
|
50
|
+
options = _props$options === void 0 ? {} : _props$options,
|
|
51
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
52
|
+
var editorRef = useRef(null);
|
|
53
|
+
var editorInstance = useRef(null);
|
|
54
|
+
|
|
55
|
+
// 初始化编辑器实例
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
if (editorRef.current) {
|
|
58
|
+
var code = React.Children.toArray(children).join('').trim();
|
|
59
|
+
editorInstance.current = monaco.editor.create(editorRef.current, _objectSpread({
|
|
60
|
+
value: code,
|
|
61
|
+
language: language,
|
|
62
|
+
automaticLayout: true
|
|
63
|
+
}, options));
|
|
64
|
+
editorInstance.current.onDidChangeModelContent(function (event) {
|
|
65
|
+
if (onChange) onChange(editorInstance.current.getValue(), event);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return function () {
|
|
69
|
+
var _editorInstance$curre;
|
|
70
|
+
return (_editorInstance$curre = editorInstance.current) === null || _editorInstance$curre === void 0 ? void 0 : _editorInstance$curre.dispose();
|
|
71
|
+
};
|
|
72
|
+
}, [children, language, options]);
|
|
73
|
+
|
|
74
|
+
// 使用 ref 暴露组件方法
|
|
75
|
+
useImperativeHandle(ref, function () {
|
|
76
|
+
return {
|
|
77
|
+
get editor() {
|
|
78
|
+
return editorInstance.current;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 根据是否全屏来设置编辑器的样式
|
|
84
|
+
var editorStyle = isFullscreen ? {
|
|
85
|
+
width: '100vw',
|
|
86
|
+
height: '100vh'
|
|
87
|
+
} : {
|
|
88
|
+
width: props.width || '100%',
|
|
89
|
+
height: props.height || '100%'
|
|
90
|
+
};
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
92
|
+
ref: editorRef,
|
|
93
|
+
style: editorStyle
|
|
94
|
+
}, rest));
|
|
95
|
+
});
|
|
96
|
+
export default /*#__PURE__*/React.memo(BaseEditor);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import BaseEditor from "./BaseEditor";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CssEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
9
|
+
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
10
|
+
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @example
|
|
14
|
+
* const handleCssChange = (newCss, event) => {
|
|
15
|
+
* console.log('CSS changed: ', newCss);
|
|
16
|
+
* };
|
|
17
|
+
* <CssEditor
|
|
18
|
+
* onChange={handleCssChange}
|
|
19
|
+
* isFullscreen={false}
|
|
20
|
+
* width="600px"
|
|
21
|
+
* height="400px"
|
|
22
|
+
* >
|
|
23
|
+
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
24
|
+
* </CssEditor>
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} props - 组件的属性。
|
|
27
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
28
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
29
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
30
|
+
*
|
|
31
|
+
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
32
|
+
*/
|
|
33
|
+
var CssEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
34
|
+
var children = _ref.children,
|
|
35
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
return /*#__PURE__*/React.createElement(BaseEditor, _extends({
|
|
37
|
+
ref: ref,
|
|
38
|
+
language: "css"
|
|
39
|
+
}, rest), children);
|
|
40
|
+
});
|
|
41
|
+
export default /*#__PURE__*/React.memo(CssEditor);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["EditorComponent", "onLoad", "children"];
|
|
5
|
+
import React, { useEffect, forwardRef, useRef } from 'react';
|
|
6
|
+
import { Tooltip, Icon } from 'luck-design/antd';
|
|
7
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
+
import styles from "../../style/fullscreen-editor.less";
|
|
9
|
+
import { useFullscreen } from 'ahooks';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* FullScreenEditor 组件是一个支持全屏编辑模式的 React 组件,它利用提供的 EditorComponent 来实现代码编辑功能。
|
|
13
|
+
* 该组件使用 ahooks 的 useFullscreen 钩子来实现全屏切换,并在全屏模式下调整编辑器布局。
|
|
14
|
+
* 全屏/非全屏模式下编辑器的某些选项可能会有所不同,以适应不同的布局需求。
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @example
|
|
18
|
+
* const MyEditor = React.forwardRef((props, ref) => <BaseEditor {...props} ref={ref} />);
|
|
19
|
+
* <FullScreenEditor
|
|
20
|
+
* EditorComponent={MyEditor}
|
|
21
|
+
* onLoad={() => console.log('Editor loaded')}
|
|
22
|
+
* >
|
|
23
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
24
|
+
* </FullScreenEditor>
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} props - 组件的属性。
|
|
27
|
+
* @param {Function} props.EditorComponent - 用于编辑的组件,该组件需要支持 ref 引用以调用编辑器的方法。
|
|
28
|
+
* @param {Function} [props.onLoad] - 编辑器加载完成时的回调函数。
|
|
29
|
+
* @param {React.ReactNode} children - 传递给 EditorComponent 的 children,通常是初始代码或内容。
|
|
30
|
+
* @param {Object} rest - 传递给 EditorComponent 的其他属性。
|
|
31
|
+
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 EditorComponent 实例的方法。
|
|
32
|
+
*
|
|
33
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有全屏切换功能的编辑器界面。
|
|
34
|
+
*/
|
|
35
|
+
var FullScreenEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
36
|
+
var EditorComponent = _ref.EditorComponent,
|
|
37
|
+
onLoad = _ref.onLoad,
|
|
38
|
+
children = _ref.children,
|
|
39
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
+
var fullscreenRef = useRef(null);
|
|
41
|
+
var _useFullscreen = useFullscreen(fullscreenRef),
|
|
42
|
+
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
43
|
+
isFullscreen = _useFullscreen2[0],
|
|
44
|
+
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
45
|
+
var handleFullscreen = function handleFullscreen() {
|
|
46
|
+
toggleFullscreen();
|
|
47
|
+
};
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
if (onLoad) onLoad();
|
|
50
|
+
}, []);
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: styles['lc-painter-components-fullscreen-editor']
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: styles['actions']
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
56
|
+
title: formatMessage({
|
|
57
|
+
id: 'luckda.lowcode.painter.components.fullscreen.tip',
|
|
58
|
+
label: '全屏'
|
|
59
|
+
})
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
+
type: "fullscreen",
|
|
62
|
+
onClick: handleFullscreen
|
|
63
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: isFullscreen ? styles['fullscreen'] : '',
|
|
65
|
+
ref: fullscreenRef
|
|
66
|
+
}, /*#__PURE__*/React.createElement(EditorComponent, _extends({
|
|
67
|
+
ref: ref,
|
|
68
|
+
isFullscreen: isFullscreen,
|
|
69
|
+
options: isFullscreen ? {} : {
|
|
70
|
+
lineNumbers: 'off',
|
|
71
|
+
glyphMargin: false,
|
|
72
|
+
folding: false,
|
|
73
|
+
lineDecorationsWidth: 0,
|
|
74
|
+
lineNumbersMinChars: 0,
|
|
75
|
+
minimap: {
|
|
76
|
+
enabled: false
|
|
77
|
+
},
|
|
78
|
+
overviewRulerLanes: 0,
|
|
79
|
+
scrollbar: {
|
|
80
|
+
vertical: 'hidden',
|
|
81
|
+
horizontal: 'hidden',
|
|
82
|
+
handleMouseWheel: false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}, props), children)));
|
|
86
|
+
});
|
|
87
|
+
export default /*#__PURE__*/React.memo(FullScreenEditor);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
|
+
var _excluded = ["children"];
|
|
7
|
+
import React, { useEffect, forwardRef } from 'react';
|
|
8
|
+
import BaseEditor from "./BaseEditor";
|
|
9
|
+
import * as monaco from 'monaco-editor';
|
|
10
|
+
var _provideCompletionItems = function provideCompletionItems(monaco, model, position, module) {
|
|
11
|
+
var textUntilPosition = model.getValueInRange({
|
|
12
|
+
startLineNumber: position.lineNumber,
|
|
13
|
+
startColumn: 1,
|
|
14
|
+
endLineNumber: position.lineNumber,
|
|
15
|
+
endColumn: position.column
|
|
16
|
+
});
|
|
17
|
+
if (textUntilPosition.endsWith(module.triggerWord + '.')) {
|
|
18
|
+
var word = model.getWordUntilPosition(position);
|
|
19
|
+
var range = {
|
|
20
|
+
startLineNumber: position.lineNumber,
|
|
21
|
+
endLineNumber: position.lineNumber,
|
|
22
|
+
startColumn: word.startColumn,
|
|
23
|
+
endColumn: word.endColumn
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// 从模块中调用 completions 函数获取补全项数组
|
|
27
|
+
// 并动态转换 kind 字段
|
|
28
|
+
return module.completions.map(function (completion) {
|
|
29
|
+
return Object.assign({}, completion, {
|
|
30
|
+
range: range,
|
|
31
|
+
// 动态转换 kind 字段
|
|
32
|
+
kind: monaco.languages.CompletionItemKind[completion.kind]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return [];
|
|
37
|
+
};
|
|
38
|
+
var setupAutocomplete = /*#__PURE__*/function () {
|
|
39
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(monaco) {
|
|
40
|
+
var autoCompleteModules;
|
|
41
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42
|
+
while (1) switch (_context.prev = _context.next) {
|
|
43
|
+
case 0:
|
|
44
|
+
_context.next = 2;
|
|
45
|
+
return import("../../../engine/meta/js-editor/auto-complete.json");
|
|
46
|
+
case 2:
|
|
47
|
+
autoCompleteModules = _context.sent;
|
|
48
|
+
console.log('autoCompleteModules', autoCompleteModules);
|
|
49
|
+
monaco.languages.registerCompletionItemProvider('javascript', _defineProperty({
|
|
50
|
+
triggerCharacters: ['.'],
|
|
51
|
+
provideCompletionItems: function provideCompletionItems(model, position) {
|
|
52
|
+
var allCompletionItems = [];
|
|
53
|
+
|
|
54
|
+
// 从所有模块收集补全项
|
|
55
|
+
autoCompleteModules.default.forEach(function (module) {
|
|
56
|
+
var items = _provideCompletionItems(monaco, model, position, module);
|
|
57
|
+
allCompletionItems = allCompletionItems.concat(items);
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
suggestions: allCompletionItems
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}, "triggerCharacters", ['.']));
|
|
64
|
+
case 5:
|
|
65
|
+
case "end":
|
|
66
|
+
return _context.stop();
|
|
67
|
+
}
|
|
68
|
+
}, _callee);
|
|
69
|
+
}));
|
|
70
|
+
return function setupAutocomplete(_x) {
|
|
71
|
+
return _ref.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
}();
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
77
|
+
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
78
|
+
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
79
|
+
*
|
|
80
|
+
* @component
|
|
81
|
+
* @example
|
|
82
|
+
* <JSEditor
|
|
83
|
+
* language="javascript"
|
|
84
|
+
* options={{ fontSize: 14 }}
|
|
85
|
+
* >
|
|
86
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
87
|
+
* </JSEditor>
|
|
88
|
+
*
|
|
89
|
+
* @param {Object} props - 组件的属性。
|
|
90
|
+
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
91
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
92
|
+
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
93
|
+
*
|
|
94
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
95
|
+
*/
|
|
96
|
+
var JSEditor = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
97
|
+
var children = _ref2.children,
|
|
98
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
99
|
+
useEffect(function () {
|
|
100
|
+
setupAutocomplete(monaco);
|
|
101
|
+
}, []);
|
|
102
|
+
return /*#__PURE__*/React.createElement(BaseEditor, _extends({
|
|
103
|
+
ref: ref
|
|
104
|
+
}, rest));
|
|
105
|
+
});
|
|
106
|
+
export default /*#__PURE__*/React.memo(JSEditor);
|