@luck-design-biz/luckda 0.0.25 → 0.0.26-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 +24 -17
- package/es/components/LdAutoForm/index.js +15 -5
- 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 +4 -1
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +18 -27
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +12 -4
- package/es/components/LdGridForm/index.less +0 -0
- package/es/components/LdInfoPanel/index.js +0 -0
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +0 -0
- package/es/components/LdTree/index.js +5 -32
- package/es/components/LdTree/index.less +1 -6
- package/es/helper/FromItems.js +0 -0
- package/es/helper/action.js +0 -0
- package/es/helper/form.js +8 -2
- package/es/helper/index.less +0 -0
- package/es/helper/ldBuilder.js +4 -1
- package/es/helper/ldComBuild.js +0 -0
- package/es/index.js +0 -1
- package/es/lowcode/constants/api-url.js +1 -351
- package/es/lowcode/constants/event-topics.js +1 -14
- package/es/lowcode/constants/index.js +1 -3
- package/es/lowcode/engine/factory/DataFactory.js +0 -0
- package/es/lowcode/engine/meta/button.props.default.json +7 -15
- package/es/lowcode/engine/meta/cardlist.props.default.json +9 -16
- package/{lib/lowcode/engine/meta/button.props.json → es/lowcode/engine/meta/components/button.json} +103 -126
- package/{lib/lowcode/engine/meta/cardlist.props.json → es/lowcode/engine/meta/components/card-list.json} +142 -142
- package/es/lowcode/engine/meta/{drawer.props.json → components/drawer.json} +142 -142
- package/{lib/lowcode/engine/meta/form.props.json → es/lowcode/engine/meta/components/form.json} +115 -115
- package/{lib/lowcode/engine/meta/iframe.props.json → es/lowcode/engine/meta/components/iframe.json} +30 -31
- package/{lib/lowcode/engine/meta/image.props.json → es/lowcode/engine/meta/components/image.json} +112 -113
- package/{lib/lowcode/engine/meta/imex.props.json → es/lowcode/engine/meta/components/imex.json} +80 -81
- package/{lib/lowcode/engine/meta/jsx.props.json → es/lowcode/engine/meta/components/jsx.json} +23 -24
- package/es/lowcode/engine/meta/{layout.props.json → components/layout.json} +106 -107
- package/es/lowcode/engine/meta/{link.props.json → components/link.json} +110 -111
- package/{lib/lowcode/engine/meta/dialog.props.json → es/lowcode/engine/meta/components/modal.json} +119 -119
- package/es/lowcode/engine/meta/{section.props.json → components/section.json} +106 -107
- package/{lib/lowcode/engine/meta/split.props.json → es/lowcode/engine/meta/components/split.json} +70 -71
- package/es/lowcode/{view/lc-components/CardList/meta.json → engine/meta/components/table.json} +30 -12
- package/{lib/lowcode/engine/meta/tabs.props.json → es/lowcode/engine/meta/components/tabs.json} +139 -139
- package/{lib/lowcode/engine/meta/text.props.json → es/lowcode/engine/meta/components/text.json} +64 -65
- package/{lib/lowcode/engine/meta/tree.props.json → es/lowcode/engine/meta/components/tree.json} +155 -202
- package/es/lowcode/engine/meta/components-list.json +121 -127
- package/es/lowcode/engine/meta/drawer.props.default.json +9 -16
- package/es/lowcode/engine/meta/form.props.default.json +4 -11
- package/es/lowcode/engine/meta/iframe.props.default.json +2 -10
- package/es/lowcode/engine/meta/image.props.default.json +7 -15
- package/es/lowcode/engine/meta/imex.props.default.json +3 -11
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -10
- package/es/lowcode/engine/meta/layout.props.default.json +4 -12
- package/es/lowcode/engine/meta/link.props.default.json +5 -13
- package/es/lowcode/engine/meta/modal.props.default.json +11 -0
- package/es/lowcode/engine/meta/section.props.default.json +8 -16
- package/es/lowcode/engine/meta/split.props.default.json +4 -12
- package/es/lowcode/engine/meta/table.props.default.json +9 -45
- package/es/lowcode/engine/meta/tabs.props.default.json +9 -16
- package/es/lowcode/engine/meta/text.props.default.json +3 -11
- package/es/lowcode/engine/meta/tree.props.default.json +8 -21
- package/es/lowcode/engine/provider/ContextProvider.js +164 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/tools/dataProcess.js +8 -85
- package/es/lowcode/engine/tools/helper.js +0 -96
- package/es/lowcode/engine/tools/lcid.js +16 -0
- package/es/lowcode/index.js +1 -3
- package/es/lowcode/painter/Components.js +0 -0
- package/es/lowcode/painter/Design.js +85 -40
- package/es/lowcode/painter/I18n.js +2 -202
- package/es/lowcode/painter/Outline.js +54 -63
- package/es/lowcode/painter/Panel.js +2 -156
- package/es/lowcode/painter/Ribbon.js +55 -61
- package/es/lowcode/painter/components/PanelItem.js +11 -83
- package/es/lowcode/painter/components/RuleInput.js +7 -9
- package/es/lowcode/painter/index.js +3 -33
- package/es/lowcode/painter/panel-section/LayoutRatio.js +49 -57
- package/es/lowcode/painter/panel-section/Radio.js +58 -0
- package/es/lowcode/painter/style/components.less +0 -0
- package/es/lowcode/painter/style/design.less +5 -116
- package/es/lowcode/painter/style/index.less +1 -0
- package/es/lowcode/painter/style/layout-ratio.less +1 -1
- package/es/lowcode/painter/style/outline.less +0 -2
- package/es/lowcode/painter/style/panel-item.less +12 -45
- package/es/lowcode/painter/style/panel.less +0 -93
- package/es/lowcode/painter/style/radio.less +0 -0
- package/es/lowcode/painter/style/ribbon.less +0 -1
- package/es/lowcode/painter/style/rule-input.less +0 -0
- package/es/lowcode/view/Canvas.js +70 -79
- package/es/lowcode/view/Loading.js +0 -0
- package/es/lowcode/view/Page.js +28 -10
- package/es/lowcode/view/index.js +6 -5
- package/es/lowcode/view/lc-components/Box/index.js +8 -41
- package/es/lowcode/view/lc-components/Button/index.js +7 -75
- package/es/lowcode/view/lc-components/CardList/index.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +11 -20
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Drawer/index.js +9 -38
- package/es/lowcode/view/lc-components/Form/index.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/es/lowcode/view/lc-components/Image/index.js +0 -0
- package/es/lowcode/view/lc-components/JSX/index.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.js +7 -40
- package/es/lowcode/view/lc-components/Link/index.js +0 -0
- package/es/lowcode/view/lc-components/Section/index.js +0 -0
- package/es/lowcode/view/lc-components/Split/index.js +0 -0
- package/es/lowcode/view/lc-components/Table/index.js +11 -451
- package/es/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/es/lowcode/view/lc-components/Text/index.js +0 -0
- package/es/lowcode/view/lc-components/Tree/index.js +6 -77
- package/es/lowcode/view/lc-components/Wrapper.js +24 -33
- 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 +1 -0
- package/es/services.js +24 -7
- package/es/upload/Form/gridForm.js +4 -4
- package/es/upload/Form/index.js +0 -0
- package/es/upload/Form/index.less +0 -0
- package/es/upload/FormItem/index.js +4 -3
- 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 +37 -3
- package/es/utils/grid.js +9 -7
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +22 -15
- package/lib/components/LdAutoForm/index.js +14 -4
- 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 +5 -1
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +17 -26
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +11 -3
- package/lib/components/LdGridForm/index.less +0 -0
- package/lib/components/LdInfoPanel/index.js +0 -0
- package/lib/components/LdPop/index.js +0 -0
- package/lib/components/LdRuntimeCom/index.js +0 -0
- package/lib/components/LdTree/index.js +4 -31
- package/lib/components/LdTree/index.less +1 -6
- package/lib/helper/FromItems.js +0 -0
- package/lib/helper/action.js +0 -0
- package/lib/helper/form.js +8 -2
- package/lib/helper/index.less +0 -0
- package/lib/helper/ldBuilder.js +4 -1
- package/lib/helper/ldComBuild.js +0 -0
- package/lib/index.js +0 -8
- package/lib/lowcode/constants/api-url.js +2 -353
- package/lib/lowcode/constants/event-topics.js +2 -15
- package/lib/lowcode/constants/index.js +2 -4
- package/lib/lowcode/engine/factory/DataFactory.js +0 -0
- package/lib/lowcode/engine/meta/button.props.default.json +7 -15
- package/lib/lowcode/engine/meta/cardlist.props.default.json +9 -16
- package/{es/lowcode/engine/meta/button.props.json → lib/lowcode/engine/meta/components/button.json} +103 -126
- package/{es/lowcode/engine/meta/cardlist.props.json → lib/lowcode/engine/meta/components/card-list.json} +142 -142
- package/lib/lowcode/engine/meta/{drawer.props.json → components/drawer.json} +142 -142
- package/{es/lowcode/engine/meta/form.props.json → lib/lowcode/engine/meta/components/form.json} +115 -115
- package/{es/lowcode/engine/meta/iframe.props.json → lib/lowcode/engine/meta/components/iframe.json} +30 -31
- package/{es/lowcode/engine/meta/image.props.json → lib/lowcode/engine/meta/components/image.json} +112 -113
- package/{es/lowcode/engine/meta/imex.props.json → lib/lowcode/engine/meta/components/imex.json} +80 -81
- package/{es/lowcode/engine/meta/jsx.props.json → lib/lowcode/engine/meta/components/jsx.json} +23 -24
- package/lib/lowcode/engine/meta/{layout.props.json → components/layout.json} +106 -107
- package/lib/lowcode/engine/meta/{link.props.json → components/link.json} +110 -111
- package/{es/lowcode/engine/meta/dialog.props.json → lib/lowcode/engine/meta/components/modal.json} +119 -119
- package/lib/lowcode/engine/meta/{section.props.json → components/section.json} +106 -107
- package/{es/lowcode/engine/meta/split.props.json → lib/lowcode/engine/meta/components/split.json} +70 -71
- package/lib/lowcode/{view/lc-components/CardList/meta.json → engine/meta/components/table.json} +30 -12
- package/{es/lowcode/engine/meta/tabs.props.json → lib/lowcode/engine/meta/components/tabs.json} +139 -139
- package/{es/lowcode/engine/meta/text.props.json → lib/lowcode/engine/meta/components/text.json} +64 -65
- package/{es/lowcode/engine/meta/tree.props.json → lib/lowcode/engine/meta/components/tree.json} +155 -202
- package/lib/lowcode/engine/meta/components-list.json +121 -127
- package/lib/lowcode/engine/meta/drawer.props.default.json +9 -16
- package/lib/lowcode/engine/meta/form.props.default.json +4 -11
- package/lib/lowcode/engine/meta/iframe.props.default.json +2 -10
- package/lib/lowcode/engine/meta/image.props.default.json +7 -15
- package/lib/lowcode/engine/meta/imex.props.default.json +3 -11
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -10
- package/lib/lowcode/engine/meta/layout.props.default.json +4 -12
- package/lib/lowcode/engine/meta/link.props.default.json +5 -13
- package/lib/lowcode/engine/meta/modal.props.default.json +11 -0
- package/lib/lowcode/engine/meta/section.props.default.json +8 -16
- package/lib/lowcode/engine/meta/split.props.default.json +4 -12
- package/lib/lowcode/engine/meta/table.props.default.json +9 -45
- package/lib/lowcode/engine/meta/tabs.props.default.json +9 -16
- package/lib/lowcode/engine/meta/text.props.default.json +3 -11
- package/lib/lowcode/engine/meta/tree.props.default.json +8 -21
- package/lib/lowcode/engine/provider/ContextProvider.js +172 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/tools/dataProcess.js +8 -86
- package/lib/lowcode/engine/tools/helper.js +0 -101
- package/lib/lowcode/engine/tools/lcid.js +22 -0
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +0 -0
- package/lib/lowcode/painter/Design.js +84 -39
- package/lib/lowcode/painter/I18n.js +2 -203
- package/lib/lowcode/painter/Outline.js +53 -62
- package/lib/lowcode/painter/Panel.js +2 -156
- package/lib/lowcode/painter/Ribbon.js +64 -63
- package/lib/lowcode/painter/components/PanelItem.js +11 -84
- package/lib/lowcode/painter/components/RuleInput.js +7 -9
- package/lib/lowcode/painter/index.js +3 -35
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +48 -56
- package/lib/lowcode/painter/panel-section/Radio.js +65 -0
- package/lib/lowcode/painter/style/components.less +0 -0
- package/lib/lowcode/painter/style/design.less +5 -116
- package/lib/lowcode/painter/style/index.less +1 -0
- package/lib/lowcode/painter/style/layout-ratio.less +1 -1
- package/lib/lowcode/painter/style/outline.less +0 -2
- package/lib/lowcode/painter/style/panel-item.less +12 -45
- package/lib/lowcode/painter/style/panel.less +0 -93
- package/lib/lowcode/painter/style/radio.less +0 -0
- package/lib/lowcode/painter/style/ribbon.less +0 -1
- package/lib/lowcode/painter/style/rule-input.less +0 -0
- package/lib/lowcode/view/Canvas.js +75 -84
- package/lib/lowcode/view/Loading.js +0 -0
- package/lib/lowcode/view/Page.js +27 -9
- package/lib/lowcode/view/index.js +6 -5
- package/lib/lowcode/view/lc-components/Box/index.js +7 -39
- package/lib/lowcode/view/lc-components/Button/index.js +8 -76
- package/lib/lowcode/view/lc-components/CardList/index.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +11 -20
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Drawer/index.js +9 -38
- package/lib/lowcode/view/lc-components/Form/index.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/lib/lowcode/view/lc-components/Image/index.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +8 -41
- package/lib/lowcode/view/lc-components/Link/index.js +0 -0
- package/lib/lowcode/view/lc-components/Section/index.js +0 -0
- package/lib/lowcode/view/lc-components/Split/index.js +0 -0
- package/lib/lowcode/view/lc-components/Table/index.js +11 -451
- package/lib/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/lib/lowcode/view/lc-components/Text/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +6 -77
- package/lib/lowcode/view/lc-components/Wrapper.js +24 -32
- 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 +1 -0
- package/lib/services.js +25 -7
- package/lib/upload/Form/gridForm.js +4 -4
- package/lib/upload/Form/index.js +0 -0
- package/lib/upload/Form/index.less +0 -0
- package/lib/upload/FormItem/index.js +4 -3
- 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 +38 -3
- package/lib/utils/grid.js +8 -6
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +8 -22
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/components/LDActions/index.js +0 -130
- package/es/components/LDActions/index.less +0 -48
- package/es/locales/zh-CN.js +0 -151
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -60
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -32
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +0 -53
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -21
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -51
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -42
- package/es/lowcode/engine/factory/panel-item-factory/index.js +0 -46
- package/es/lowcode/engine/meta/box.props.default.json +0 -10
- package/es/lowcode/engine/meta/box.props.json +0 -40
- package/es/lowcode/engine/meta/dialog.props.default.json +0 -18
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +0 -135
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/es/lowcode/engine/meta/table.props.json +0 -411
- package/es/lowcode/engine/provider/ContextProvider/index.js +0 -199
- package/es/lowcode/engine/tools/usePromiseState.js +0 -25
- package/es/lowcode/painter/DesignOperator.js +0 -271
- package/es/lowcode/painter/DesignToolbar.js +0 -91
- package/es/lowcode/painter/components/ActionBindModal.js +0 -180
- package/es/lowcode/painter/components/AdvancePanel.js +0 -68
- package/es/lowcode/painter/components/AttrsPanel.js +0 -134
- package/es/lowcode/painter/components/Collapse.js +0 -95
- package/es/lowcode/painter/components/ColorInput.js +0 -125
- package/es/lowcode/painter/components/FieldSelector.js +0 -44
- package/es/lowcode/painter/components/ListEditor.js +0 -91
- package/es/lowcode/painter/components/NumberInput.js +0 -148
- package/es/lowcode/painter/components/PopConfirm.js +0 -30
- package/es/lowcode/painter/components/PopForm.js +0 -71
- package/es/lowcode/painter/components/SortBox.js +0 -92
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +0 -108
- package/es/lowcode/painter/components/code-editor/CssEditor.js +0 -41
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +0 -87
- package/es/lowcode/painter/components/code-editor/JSEditor.js +0 -117
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +0 -41
- package/es/lowcode/painter/components/code-editor/index.js +0 -2
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +0 -154
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +0 -198
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -39
- package/es/lowcode/painter/panel-section/DataSetSelector.js +0 -61
- package/es/lowcode/painter/panel-section/Icon.js +0 -48
- package/es/lowcode/painter/panel-section/IconSelector.js +0 -134
- package/es/lowcode/painter/panel-section/ImpExp.js +0 -91
- package/es/lowcode/painter/panel-section/JSEditor.js +0 -48
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +0 -61
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +0 -150
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +0 -87
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +0 -66
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +0 -66
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +0 -296
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -543
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +0 -162
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +0 -386
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +0 -78
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +0 -23
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +0 -20
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +0 -23
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +0 -96
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +0 -60
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +0 -50
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +0 -61
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +0 -41
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +0 -216
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +0 -53
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +0 -148
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +0 -16
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +0 -51
- package/es/lowcode/painter/panel-section/StylePanel/index.js +0 -29
- package/es/lowcode/painter/panel-section/TabItems.js +0 -207
- package/es/lowcode/painter/panel-section/TableTopFilter.js +0 -306
- package/es/lowcode/painter/panel-section/TableZebra.js +0 -14
- package/es/lowcode/painter/panel-section/WidthHeight.js +0 -39
- package/es/lowcode/painter/services/I18n.js +0 -85
- package/es/lowcode/painter/style/action-bind-modal.less +0 -99
- package/es/lowcode/painter/style/actions-editor.less +0 -16
- package/es/lowcode/painter/style/border-editor.less +0 -36
- package/es/lowcode/painter/style/border-radius-selector.less +0 -43
- package/es/lowcode/painter/style/border-selector.less +0 -40
- package/es/lowcode/painter/style/button-type.less +0 -5
- package/es/lowcode/painter/style/collapse.less +0 -22
- package/es/lowcode/painter/style/color-input.less +0 -19
- package/es/lowcode/painter/style/display.less +0 -17
- package/es/lowcode/painter/style/font-editor.less +0 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +0 -17
- package/es/lowcode/painter/style/icon-selector.less +0 -22
- package/es/lowcode/painter/style/icon.less +0 -11
- package/es/lowcode/painter/style/impexp.less +0 -7
- package/es/lowcode/painter/style/list-editor.less +0 -59
- package/es/lowcode/painter/style/number-input.less +0 -17
- package/es/lowcode/painter/style/panel-attrs.less +0 -43
- package/es/lowcode/painter/style/pop-confirm.less +0 -17
- package/es/lowcode/painter/style/pop-form.less +0 -20
- package/es/lowcode/painter/style/style-panel.less +0 -37
- package/es/lowcode/painter/style/tabitems.less +0 -90
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -20
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Box/index.less +0 -14
- package/es/lowcode/view/lc-components/Box/meta.json +0 -40
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +0 -21
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Button/meta.json +0 -127
- package/es/lowcode/view/lc-components/Button/style.less +0 -3
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +0 -54
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -120
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +0 -20
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Drawer/index.less +0 -7
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -143
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Form/meta.json +0 -116
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Iframe/meta.json +0 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/ImEx/meta.json +0 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Image/meta.json +0 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/JSX/meta.json +0 -25
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -72
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +0 -15
- package/es/lowcode/view/lc-components/Layout/index.less +0 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +0 -108
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Link/meta.json +0 -112
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Section/meta.json +0 -108
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Split/meta.json +0 -72
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +0 -51
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +0 -96
- package/es/lowcode/view/lc-components/Table/meta.json +0 -372
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -140
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -9
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Text/meta.json +0 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -54
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -9
- package/es/lowcode/view/lc-components/Tree/index.less +0 -2
- package/es/lowcode/view/lc-components/Tree/meta.json +0 -199
- package/lib/components/LDActions/index.js +0 -138
- package/lib/components/LDActions/index.less +0 -48
- package/lib/locales/zh-CN.js +0 -157
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -73
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -38
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +0 -59
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -27
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -57
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -48
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +0 -52
- package/lib/lowcode/engine/meta/box.props.default.json +0 -10
- package/lib/lowcode/engine/meta/box.props.json +0 -40
- package/lib/lowcode/engine/meta/dialog.props.default.json +0 -18
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +0 -135
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
- package/lib/lowcode/engine/meta/table.props.json +0 -411
- package/lib/lowcode/engine/provider/ContextProvider/index.js +0 -207
- package/lib/lowcode/engine/tools/usePromiseState.js +0 -32
- package/lib/lowcode/painter/DesignOperator.js +0 -278
- package/lib/lowcode/painter/DesignToolbar.js +0 -99
- package/lib/lowcode/painter/components/ActionBindModal.js +0 -188
- package/lib/lowcode/painter/components/AdvancePanel.js +0 -76
- package/lib/lowcode/painter/components/AttrsPanel.js +0 -142
- package/lib/lowcode/painter/components/Collapse.js +0 -102
- package/lib/lowcode/painter/components/ColorInput.js +0 -132
- package/lib/lowcode/painter/components/FieldSelector.js +0 -52
- package/lib/lowcode/painter/components/ListEditor.js +0 -97
- package/lib/lowcode/painter/components/NumberInput.js +0 -155
- package/lib/lowcode/painter/components/PopConfirm.js +0 -36
- package/lib/lowcode/painter/components/PopForm.js +0 -77
- package/lib/lowcode/painter/components/SortBox.js +0 -99
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +0 -115
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +0 -48
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +0 -94
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +0 -128
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +0 -48
- package/lib/lowcode/painter/components/code-editor/index.js +0 -20
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +0 -162
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +0 -206
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -46
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +0 -69
- package/lib/lowcode/painter/panel-section/Icon.js +0 -54
- package/lib/lowcode/painter/panel-section/IconSelector.js +0 -141
- package/lib/lowcode/painter/panel-section/ImpExp.js +0 -98
- package/lib/lowcode/painter/panel-section/JSEditor.js +0 -56
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +0 -68
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +0 -158
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +0 -95
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +0 -73
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +0 -73
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +0 -303
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -550
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +0 -170
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +0 -392
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +0 -85
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +0 -29
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +0 -26
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +0 -29
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +0 -103
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +0 -67
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +0 -57
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +0 -68
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +0 -48
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +0 -224
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +0 -59
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +0 -159
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +0 -22
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +0 -58
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +0 -35
- package/lib/lowcode/painter/panel-section/TabItems.js +0 -215
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +0 -314
- package/lib/lowcode/painter/panel-section/TableZebra.js +0 -21
- package/lib/lowcode/painter/panel-section/WidthHeight.js +0 -46
- package/lib/lowcode/painter/services/I18n.js +0 -95
- package/lib/lowcode/painter/style/action-bind-modal.less +0 -99
- package/lib/lowcode/painter/style/actions-editor.less +0 -16
- package/lib/lowcode/painter/style/border-editor.less +0 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +0 -43
- package/lib/lowcode/painter/style/border-selector.less +0 -40
- package/lib/lowcode/painter/style/button-type.less +0 -5
- package/lib/lowcode/painter/style/collapse.less +0 -22
- package/lib/lowcode/painter/style/color-input.less +0 -19
- package/lib/lowcode/painter/style/display.less +0 -17
- package/lib/lowcode/painter/style/font-editor.less +0 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +0 -17
- package/lib/lowcode/painter/style/icon-selector.less +0 -22
- package/lib/lowcode/painter/style/icon.less +0 -11
- package/lib/lowcode/painter/style/impexp.less +0 -7
- package/lib/lowcode/painter/style/list-editor.less +0 -59
- package/lib/lowcode/painter/style/number-input.less +0 -17
- package/lib/lowcode/painter/style/panel-attrs.less +0 -43
- package/lib/lowcode/painter/style/pop-confirm.less +0 -17
- package/lib/lowcode/painter/style/pop-form.less +0 -20
- package/lib/lowcode/painter/style/style-panel.less +0 -37
- package/lib/lowcode/painter/style/tabitems.less +0 -90
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -27
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Box/index.less +0 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +0 -40
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +0 -28
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Button/meta.json +0 -127
- package/lib/lowcode/view/lc-components/Button/style.less +0 -3
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +0 -62
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -120
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +0 -27
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Drawer/index.less +0 -7
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -143
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Form/meta.json +0 -116
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Iframe/meta.json +0 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/ImEx/meta.json +0 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Image/meta.json +0 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/JSX/meta.json +0 -25
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -79
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +0 -22
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +0 -108
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Link/meta.json +0 -112
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Section/meta.json +0 -108
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Split/meta.json +0 -72
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +0 -59
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +0 -104
- package/lib/lowcode/view/lc-components/Table/meta.json +0 -372
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -140
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +0 -16
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Text/meta.json +0 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -62
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -16
- package/lib/lowcode/view/lc-components/Tree/index.less +0 -2
- package/lib/lowcode/view/lc-components/Tree/meta.json +0 -199
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _lodash = require("lodash");
|
|
12
|
-
var _ahooks = require("ahooks");
|
|
13
|
-
var _antd = require("luck-design/antd");
|
|
14
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
15
|
-
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
16
|
-
var _dataProcess = require("../engine/tools/dataProcess");
|
|
17
|
-
var _constants = require("../constants");
|
|
18
|
-
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
19
|
-
var _MODAL_COMPONENT_ = ['Dialog', 'Drawer'];
|
|
20
|
-
var getOperatorStyle = function getOperatorStyle(page, cellNode) {
|
|
21
|
-
var _page$getBoundingClie = page.getBoundingClientRect(),
|
|
22
|
-
pageLeft = _page$getBoundingClie.left,
|
|
23
|
-
pageTop = _page$getBoundingClie.top;
|
|
24
|
-
var _cellNode$getBounding = cellNode.getBoundingClientRect(),
|
|
25
|
-
cellNodeLeft = _cellNode$getBounding.left,
|
|
26
|
-
cellNodeTop = _cellNode$getBounding.top;
|
|
27
|
-
return {
|
|
28
|
-
left: "".concat(cellNodeLeft - pageLeft, "px"),
|
|
29
|
-
top: "".concat(cellNodeTop - pageTop, "px"),
|
|
30
|
-
width: "".concat(cellNode.offsetWidth, "px"),
|
|
31
|
-
height: "".concat(cellNode.offsetHeight, "px")
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
var DesignOperator = function DesignOperator(_ref) {
|
|
35
|
-
var _getDomById, _getDomById2;
|
|
36
|
-
var target = _ref.target;
|
|
37
|
-
var context = (0, _ContextProvider.useLDContext)();
|
|
38
|
-
var size = (0, _ahooks.useSize)(target);
|
|
39
|
-
var _useState = (0, _react.useState)((0, _utils.suid)()),
|
|
40
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
41
|
-
positionKey = _useState2[0],
|
|
42
|
-
setPositionKey = _useState2[1];
|
|
43
|
-
var _useSetState = (0, _ahooks.useSetState)({
|
|
44
|
-
selector: null,
|
|
45
|
-
detector: null
|
|
46
|
-
}),
|
|
47
|
-
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
48
|
-
operatorId = _useSetState2[0],
|
|
49
|
-
setOperatorId = _useSetState2[1];
|
|
50
|
-
var lastSelectorId = (0, _ahooks.useLatest)(operatorId.selector);
|
|
51
|
-
var currentModal = (0, _react.useRef)(null);
|
|
52
|
-
var getDomById = (0, _ahooks.useMemoizedFn)(function (id) {
|
|
53
|
-
return context.componentMap.get(id).dom;
|
|
54
|
-
});
|
|
55
|
-
var handleSelect = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
56
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
57
|
-
id: _key
|
|
58
|
-
} : null);
|
|
59
|
-
});
|
|
60
|
-
var handleHover = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
61
|
-
context.$publisher(context.topics.COMPONENT_HOVER, _key ? {
|
|
62
|
-
id: _key
|
|
63
|
-
} : null);
|
|
64
|
-
});
|
|
65
|
-
var handleDelete = (0, _ahooks.useMemoizedFn)(function (_ref2) {
|
|
66
|
-
var id = _ref2.id,
|
|
67
|
-
parentId = _ref2.parentId;
|
|
68
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
69
|
-
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
70
|
-
(0, _dataProcess.deleteById)(cloneData, id);
|
|
71
|
-
context._setPageData(cloneData).then(function (newData) {
|
|
72
|
-
context.$publisher(context.topics.COMPONENT_DELETE, {
|
|
73
|
-
id: id,
|
|
74
|
-
parentId: parentId,
|
|
75
|
-
pageData: newData
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
var addComponent = (0, _ahooks.useMemoizedFn)(function (data, targetId) {
|
|
80
|
-
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
81
|
-
var _id = "".concat(data.component.toLowerCase(), "_").concat((0, _utils.suid)());
|
|
82
|
-
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
83
|
-
(0, _dataProcess.add)(cloneData, targetId, _id, json);
|
|
84
|
-
context.$subscriber(context.topics.COMPONENT_MOUNT).once(function (_ref3) {
|
|
85
|
-
var mountCompId = _ref3.id;
|
|
86
|
-
if (mountCompId === _id) {
|
|
87
|
-
context.$publisher(context.topics.COMPONENT_APPEND, {
|
|
88
|
-
id: _id,
|
|
89
|
-
pageData: cloneData
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}).watch();
|
|
93
|
-
context._setPageData(cloneData);
|
|
94
|
-
});
|
|
95
|
-
var acticeProps = (0, _ahooks.useCreation)(function () {
|
|
96
|
-
if (!operatorId.selector) return null;
|
|
97
|
-
var levelNodes = context.componentMap.get(operatorId.selector).api.getLevelNodes();
|
|
98
|
-
return {
|
|
99
|
-
props: (0, _lodash.last)(levelNodes),
|
|
100
|
-
menu: /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
className: _design.default['next-overlay-wrapper'],
|
|
102
|
-
onMouseLeave: function onMouseLeave() {
|
|
103
|
-
return handleHover();
|
|
104
|
-
}
|
|
105
|
-
}, (0, _lodash.reverse)((0, _lodash.initial)(levelNodes)).map(function (m) {
|
|
106
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
-
key: m.id
|
|
108
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
109
|
-
onClick: function onClick() {
|
|
110
|
-
return handleSelect(m.id);
|
|
111
|
-
},
|
|
112
|
-
onMouseOver: function onMouseOver() {
|
|
113
|
-
return handleHover(m.id);
|
|
114
|
-
}
|
|
115
|
-
}, m.name));
|
|
116
|
-
}))
|
|
117
|
-
};
|
|
118
|
-
}, [operatorId.selector]);
|
|
119
|
-
var lastDetectorNode = (0, _ahooks.useCreation)(function () {
|
|
120
|
-
return operatorId.detector ? (0, _lodash.last)(context.componentMap.get(operatorId.detector).api.getLevelNodes()) : null;
|
|
121
|
-
}, [operatorId.detector]);
|
|
122
|
-
(0, _ahooks.useEventListener)('mousemove', function (event) {
|
|
123
|
-
var elem = event.target;
|
|
124
|
-
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
125
|
-
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
126
|
-
if (targetCellId && targetCellId !== operatorId.detector && targetCellId !== operatorId.selector) {
|
|
127
|
-
setOperatorId({
|
|
128
|
-
detector: targetCellId
|
|
129
|
-
});
|
|
130
|
-
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
131
|
-
id: targetCellId
|
|
132
|
-
});
|
|
133
|
-
} else if (!targetCell || targetCellId === operatorId.selector) {
|
|
134
|
-
setOperatorId({
|
|
135
|
-
detector: null
|
|
136
|
-
});
|
|
137
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
target: target
|
|
141
|
-
});
|
|
142
|
-
(0, _ahooks.useEventListener)('mouseleave', function () {
|
|
143
|
-
if (operatorId.detector) {
|
|
144
|
-
setOperatorId({
|
|
145
|
-
detector: null
|
|
146
|
-
});
|
|
147
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
target: target
|
|
151
|
-
});
|
|
152
|
-
(0, _ahooks.useEventListener)('click', function (event) {
|
|
153
|
-
var elem = event.target;
|
|
154
|
-
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
155
|
-
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
156
|
-
if (!targetCellId || targetCellId === operatorId.selector) return;
|
|
157
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
158
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
159
|
-
id: targetCell.id
|
|
160
|
-
});
|
|
161
|
-
}, {
|
|
162
|
-
target: target
|
|
163
|
-
});
|
|
164
|
-
(0, _react.useEffect)(function () {
|
|
165
|
-
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (_ref4) {
|
|
166
|
-
var data = _ref4.data;
|
|
167
|
-
if (_MODAL_COMPONENT_.includes(data.component)) {
|
|
168
|
-
context.$subscriber(context.topics.COMPONENT_APPEND).once(function (_ref5) {
|
|
169
|
-
var compId = _ref5.id;
|
|
170
|
-
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
171
|
-
toggle: true,
|
|
172
|
-
id: compId
|
|
173
|
-
});
|
|
174
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
175
|
-
id: compId
|
|
176
|
-
});
|
|
177
|
-
}).watch();
|
|
178
|
-
addComponent(data, _constants.CELL_KEY.PAGE_ROOT);
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
if (!lastSelectorId.current) {
|
|
182
|
-
_antd.message.info('请在右侧画布选择节点');
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
if (context.componentMap.get(lastSelectorId.current).dom.getAttribute('name') !== 'box') {
|
|
186
|
-
_antd.message.info('该节点不支持添加子节点');
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
addComponent(data, lastSelectorId.current);
|
|
190
|
-
}).watch();
|
|
191
|
-
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
192
|
-
if (payload.id) setOperatorId({
|
|
193
|
-
detector: payload.id
|
|
194
|
-
});else setOperatorId({
|
|
195
|
-
detector: null
|
|
196
|
-
});
|
|
197
|
-
}).watch();
|
|
198
|
-
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
199
|
-
if (payload.id) {
|
|
200
|
-
setOperatorId({
|
|
201
|
-
selector: payload.id,
|
|
202
|
-
detector: null
|
|
203
|
-
});
|
|
204
|
-
} else {
|
|
205
|
-
setOperatorId({
|
|
206
|
-
selector: null
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}).watch();
|
|
210
|
-
var cmtid = context.$subscriber(context.topics.COMPONENT_MODAL_TOGGLE).on(function (_ref6) {
|
|
211
|
-
var toggle = _ref6.toggle,
|
|
212
|
-
id = _ref6.id;
|
|
213
|
-
if (toggle) {
|
|
214
|
-
target.current.style.setProperty('overflow', 'hidden');
|
|
215
|
-
var _modal = context.componentMap.get(id);
|
|
216
|
-
var _prevModal = currentModal.current ? context.componentMap.get(currentModal.current) : null;
|
|
217
|
-
_prevModal === null || _prevModal === void 0 || _prevModal.api.doClose();
|
|
218
|
-
_modal.api.doOpen();
|
|
219
|
-
currentModal.current = id;
|
|
220
|
-
} else {
|
|
221
|
-
target.current.style.removeProperty('overflow');
|
|
222
|
-
var _modal2 = context.componentMap.get(id || currentModal.current);
|
|
223
|
-
_modal2.api.doClose();
|
|
224
|
-
currentModal.current = void 0;
|
|
225
|
-
}
|
|
226
|
-
}).watch();
|
|
227
|
-
return function () {
|
|
228
|
-
context.$unsubscriber(context.topics.COMPONENT_SETTING_CLICK, csid);
|
|
229
|
-
context.$unsubscriber(context.topics.COMPONENT_HOVER, hcid);
|
|
230
|
-
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, acid);
|
|
231
|
-
context.$unsubscriber(context.topics.MODAL_OPEN, cmtid);
|
|
232
|
-
};
|
|
233
|
-
}, []);
|
|
234
|
-
(0, _react.useEffect)(function () {
|
|
235
|
-
var crid = context.$subscriber(context.topics.COMPONENT_REPOSITIONING).on(function (payload) {
|
|
236
|
-
if (payload.id === operatorId.selector) setPositionKey((0, _utils.suid)());
|
|
237
|
-
}).watch();
|
|
238
|
-
return function () {
|
|
239
|
-
context.$unsubscriber(context.topics.COMPONENT_REPOSITIONING, crid);
|
|
240
|
-
};
|
|
241
|
-
}, [operatorId.selector]);
|
|
242
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, operatorId.detector && /*#__PURE__*/_react.default.createElement("div", {
|
|
243
|
-
id: "lc-detector",
|
|
244
|
-
className: _design.default['lc-painter-design-detector'],
|
|
245
|
-
style: getOperatorStyle(target.current, getDomById(operatorId.detector))
|
|
246
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
247
|
-
className: _design.default['lc-painter-design-detector-name'],
|
|
248
|
-
style: {
|
|
249
|
-
top: ((_getDomById = getDomById(operatorId.detector)) === null || _getDomById === void 0 ? void 0 : _getDomById.offsetTop) < 23 ? 0 : '-23px'
|
|
250
|
-
}
|
|
251
|
-
}, lastDetectorNode ? "".concat(lastDetectorNode.name, "(").concat(operatorId.detector, ")") : null)), operatorId.selector && /*#__PURE__*/_react.default.createElement("div", {
|
|
252
|
-
id: "lc-selector",
|
|
253
|
-
key: "".concat((size === null || size === void 0 ? void 0 : size.width) || 0, "-").concat((size === null || size === void 0 ? void 0 : size.height) || 0, "-").concat(positionKey),
|
|
254
|
-
className: _design.default['lc-painter-design-selector'],
|
|
255
|
-
style: getOperatorStyle(target.current, getDomById(operatorId.selector))
|
|
256
|
-
}, acticeProps && /*#__PURE__*/_react.default.createElement("div", {
|
|
257
|
-
className: _design.default['lc-borders-actions'],
|
|
258
|
-
style: acticeProps.props.id === _constants.CELL_KEY.PAGE_ROOT ? {
|
|
259
|
-
top: 0
|
|
260
|
-
} : ((_getDomById2 = getDomById(operatorId.selector)) === null || _getDomById2 === void 0 ? void 0 : _getDomById2.offsetTop) < 23 ? {
|
|
261
|
-
bottom: '-23px'
|
|
262
|
-
} : {
|
|
263
|
-
top: '-23px'
|
|
264
|
-
}
|
|
265
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
266
|
-
overlay: acticeProps.menu,
|
|
267
|
-
placement: "bottomLeft"
|
|
268
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
269
|
-
className: "instance-node-selector"
|
|
270
|
-
}, acticeProps.props.name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
271
|
-
onClick: function onClick() {
|
|
272
|
-
return handleDelete(acticeProps.props);
|
|
273
|
-
}
|
|
274
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
275
|
-
type: "delete"
|
|
276
|
-
})))));
|
|
277
|
-
};
|
|
278
|
-
var _default = exports.default = DesignOperator;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
var _antd = require("luck-design/antd");
|
|
14
|
-
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
15
|
-
var _constants = require("../constants");
|
|
16
|
-
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
17
|
-
var DesignToolbar = function DesignToolbar(_ref) {
|
|
18
|
-
var locale = _ref.locale,
|
|
19
|
-
onLangChange = _ref.onLangChange;
|
|
20
|
-
var context = (0, _ContextProvider.useLDContext)();
|
|
21
|
-
var _useState = (0, _react.useState)(null),
|
|
22
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
-
langList = _useState2[0],
|
|
24
|
-
setLangList = _useState2[1];
|
|
25
|
-
var _useState3 = (0, _react.useState)('pc'),
|
|
26
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
27
|
-
activedTarget = _useState4[0],
|
|
28
|
-
setActivedTarget = _useState4[1];
|
|
29
|
-
(0, _react.useEffect)(function () {
|
|
30
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
31
|
-
var _langList = _ref2.langList;
|
|
32
|
-
return setLangList(_langList);
|
|
33
|
-
}).watch();
|
|
34
|
-
return function () {
|
|
35
|
-
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
36
|
-
};
|
|
37
|
-
}, []);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
className: _design.default['lc-painter-design-toolbar']
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
41
|
-
size: "small",
|
|
42
|
-
value: langList ? locale : undefined,
|
|
43
|
-
className: _design.default['i18n-selecter'],
|
|
44
|
-
style: {
|
|
45
|
-
fontSize: 12
|
|
46
|
-
},
|
|
47
|
-
onSelect: onLangChange
|
|
48
|
-
}, langList === null || langList === void 0 ? void 0 : langList.map(function (item) {
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
50
|
-
key: item.field,
|
|
51
|
-
value: item.field
|
|
52
|
-
}, item.title);
|
|
53
|
-
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'pc')),
|
|
55
|
-
onClick: function onClick() {
|
|
56
|
-
return setActivedTarget('pc');
|
|
57
|
-
}
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
59
|
-
type: "laptop"
|
|
60
|
-
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
61
|
-
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'mobile')),
|
|
62
|
-
onClick: function onClick() {
|
|
63
|
-
return setActivedTarget('mobile');
|
|
64
|
-
}
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
66
|
-
type: "mobile"
|
|
67
|
-
})), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
68
|
-
type: "vertical"
|
|
69
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
70
|
-
style: {
|
|
71
|
-
width: 'auto',
|
|
72
|
-
fontSize: 12
|
|
73
|
-
},
|
|
74
|
-
className: _design.default['toolbar-item'],
|
|
75
|
-
onClick: function onClick() {
|
|
76
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
77
|
-
id: _constants.CELL_KEY.PAGE_ROOT
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
81
|
-
type: "vertical"
|
|
82
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
83
|
-
size: "small",
|
|
84
|
-
style: {
|
|
85
|
-
fontSize: 12,
|
|
86
|
-
margin: '0 2px'
|
|
87
|
-
}
|
|
88
|
-
}, "\u9884\u89C8"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
89
|
-
type: "vertical"
|
|
90
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
91
|
-
size: "small",
|
|
92
|
-
type: "primary",
|
|
93
|
-
style: {
|
|
94
|
-
fontSize: 12,
|
|
95
|
-
margin: '0 0 0 2px'
|
|
96
|
-
}
|
|
97
|
-
}, "\u4FDD\u5B58"));
|
|
98
|
-
};
|
|
99
|
-
var _default = exports.default = DesignToolbar;
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _ahooks = require("ahooks");
|
|
13
|
-
var _antd = require("luck-design/antd");
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
var _lodash = require("lodash");
|
|
16
|
-
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
17
|
-
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
18
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
-
var _actionBindModal = _interopRequireDefault(require("../style/action-bind-modal.less"));
|
|
20
|
-
var _I18N_PREFIX_ = 'luckda.lowcode.painter.actionBindModal';
|
|
21
|
-
var _ACTION_CATEGORY_ = [{
|
|
22
|
-
key: 'actions',
|
|
23
|
-
label: (0, _utils.formatMessage)({
|
|
24
|
-
id: "".concat(_I18N_PREFIX_, ".actions"),
|
|
25
|
-
label: '页面行为'
|
|
26
|
-
})
|
|
27
|
-
}, {
|
|
28
|
-
key: 'trigger',
|
|
29
|
-
label: (0, _utils.formatMessage)({
|
|
30
|
-
id: "".concat(_I18N_PREFIX_, ".trigger"),
|
|
31
|
-
label: '触发器'
|
|
32
|
-
})
|
|
33
|
-
}, {
|
|
34
|
-
key: 'code',
|
|
35
|
-
label: (0, _utils.formatMessage)({
|
|
36
|
-
id: "".concat(_I18N_PREFIX_, ".code"),
|
|
37
|
-
label: '自定义动作'
|
|
38
|
-
})
|
|
39
|
-
}];
|
|
40
|
-
var _CATEGORY_CODE_ITEMS = [{
|
|
41
|
-
key: 'coding',
|
|
42
|
-
label: (0, _utils.formatMessage)({
|
|
43
|
-
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
44
|
-
label: '动作编写'
|
|
45
|
-
})
|
|
46
|
-
}];
|
|
47
|
-
var ActionBindModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
48
|
-
var activeNode = _ref.activeNode,
|
|
49
|
-
onComfirm = _ref.onComfirm;
|
|
50
|
-
var context = (0, _ContextProvider.useLDContext)();
|
|
51
|
-
var _useState = (0, _react.useState)(void 0),
|
|
52
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
-
title = _useState2[0],
|
|
54
|
-
setTitle = _useState2[1];
|
|
55
|
-
var _useState3 = (0, _react.useState)('actions'),
|
|
56
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
57
|
-
category = _useState4[0],
|
|
58
|
-
setCategory = _useState4[1];
|
|
59
|
-
var _useMap = (0, _ahooks.useMap)([]),
|
|
60
|
-
_useMap2 = (0, _slicedToArray2.default)(_useMap, 2),
|
|
61
|
-
actionPool = _useMap2[0],
|
|
62
|
-
_useMap2$ = _useMap2[1],
|
|
63
|
-
set = _useMap2$.set,
|
|
64
|
-
remove = _useMap2$.remove,
|
|
65
|
-
reset = _useMap2$.reset,
|
|
66
|
-
get = _useMap2$.get;
|
|
67
|
-
var selectItems = (0, _ahooks.useCreation)(function () {
|
|
68
|
-
if (category === 'actions') {
|
|
69
|
-
return [];
|
|
70
|
-
} else if (category === 'trigger') {
|
|
71
|
-
return (0, _lodash.reduce)(context.componentList, function (ret, _ref2) {
|
|
72
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
73
|
-
key = _ref3[0],
|
|
74
|
-
target = _ref3[1];
|
|
75
|
-
if (key !== activeNode.id) {
|
|
76
|
-
ret.push({
|
|
77
|
-
key: key,
|
|
78
|
-
label: "".concat(target.api.getSelfAndParentLCData().node.props.name, "(").concat(key, ")")
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return ret;
|
|
82
|
-
}, []);
|
|
83
|
-
} else if (category === 'code') {
|
|
84
|
-
return _CATEGORY_CODE_ITEMS;
|
|
85
|
-
}
|
|
86
|
-
return [];
|
|
87
|
-
}, [category]);
|
|
88
|
-
var handleClose = (0, _ahooks.useMemoizedFn)(function () {
|
|
89
|
-
setTitle(void 0);
|
|
90
|
-
});
|
|
91
|
-
var handleComfirm = (0, _ahooks.useMemoizedFn)(function () {
|
|
92
|
-
handleClose();
|
|
93
|
-
});
|
|
94
|
-
var handleSearch = (0, _ahooks.useMemoizedFn)(function (val) {});
|
|
95
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
96
|
-
return {
|
|
97
|
-
doOpen: function doOpen(title) {
|
|
98
|
-
setTitle(title);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}, []);
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
103
|
-
className: _actionBindModal.default['lc-painter-panel-action-bind-modal'],
|
|
104
|
-
bodyStyle: {
|
|
105
|
-
marginTop: 0,
|
|
106
|
-
padding: '4px 24px'
|
|
107
|
-
},
|
|
108
|
-
title: title,
|
|
109
|
-
visible: !!title,
|
|
110
|
-
width: 960,
|
|
111
|
-
closable: false,
|
|
112
|
-
maskClosable: false,
|
|
113
|
-
getContainer: function getContainer() {
|
|
114
|
-
return document.getElementById('lc-design-workspace');
|
|
115
|
-
},
|
|
116
|
-
zIndex: 3000,
|
|
117
|
-
onCancel: handleClose,
|
|
118
|
-
onOk: handleComfirm
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
-
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body']
|
|
121
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
-
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-left']
|
|
123
|
-
}, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
124
|
-
id: "".concat(_I18N_PREFIX_, ".bind"),
|
|
125
|
-
label: '绑定动作'
|
|
126
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
-
className: _actionBindModal.default['selector-box']
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
129
|
-
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['action-category'])
|
|
130
|
-
}, _ACTION_CATEGORY_.map(function (_ref4) {
|
|
131
|
-
var key = _ref4.key,
|
|
132
|
-
label = _ref4.label;
|
|
133
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
134
|
-
key: key,
|
|
135
|
-
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, key === category)),
|
|
136
|
-
onClick: function onClick() {
|
|
137
|
-
return setCategory(key);
|
|
138
|
-
}
|
|
139
|
-
}, label, key === category && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
140
|
-
type: "check",
|
|
141
|
-
className: _actionBindModal.default['check-icon']
|
|
142
|
-
}));
|
|
143
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
-
className: _actionBindModal.default['selecter-items-box']
|
|
145
|
-
}, category !== 'code' && /*#__PURE__*/_react.default.createElement("div", {
|
|
146
|
-
style: {
|
|
147
|
-
height: 42,
|
|
148
|
-
display: 'flex',
|
|
149
|
-
justifyContent: 'center'
|
|
150
|
-
}
|
|
151
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Input.Search, {
|
|
152
|
-
placeholder: (0, _utils.formatMessage)({
|
|
153
|
-
id: "".concat(_I18N_PREFIX_, ".search"),
|
|
154
|
-
label: '搜索'
|
|
155
|
-
}),
|
|
156
|
-
size: "small",
|
|
157
|
-
onSearch: handleSearch,
|
|
158
|
-
style: {
|
|
159
|
-
width: 170,
|
|
160
|
-
alignSelf: 'center'
|
|
161
|
-
}
|
|
162
|
-
})), /*#__PURE__*/_react.default.createElement("ul", {
|
|
163
|
-
className: (0, _classnames.default)(_actionBindModal.default['selector-box-ul'], _actionBindModal.default['selecter-items'])
|
|
164
|
-
}, selectItems.map(function (_ref5) {
|
|
165
|
-
var key = _ref5.key,
|
|
166
|
-
label = _ref5.label;
|
|
167
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
168
|
-
key: key,
|
|
169
|
-
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _actionBindModal.default.active, actionPool.has(key))),
|
|
170
|
-
onClick: function onClick() {
|
|
171
|
-
return set(key, label);
|
|
172
|
-
}
|
|
173
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
174
|
-
checked: actionPool.has(key),
|
|
175
|
-
style: {
|
|
176
|
-
marginRight: 4
|
|
177
|
-
}
|
|
178
|
-
}), label);
|
|
179
|
-
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
-
className: _actionBindModal.default['lc-painter-panel-action-bind-modal-body-right']
|
|
181
|
-
}, category === 'code' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, (0, _utils.formatMessage)({
|
|
182
|
-
id: "".concat(_I18N_PREFIX_, ".coding"),
|
|
183
|
-
label: '动作编写'
|
|
184
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
-
className: _actionBindModal.default['code-box']
|
|
186
|
-
}, /*#__PURE__*/_react.default.createElement(_JSEditor.default, null))))));
|
|
187
|
-
});
|
|
188
|
-
var _default = exports.default = ActionBindModal;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _ahooks = require("ahooks");
|
|
11
|
-
var _antd = require("luck-design/antd");
|
|
12
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
13
|
-
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
|
14
|
-
var _ActionBindModal = _interopRequireDefault(require("./ActionBindModal"));
|
|
15
|
-
var _I18N_PREFIX_ = 'luckda.lowcode.painter.advancePanel';
|
|
16
|
-
var AdvancePanel = function AdvancePanel(_ref) {
|
|
17
|
-
var meta = _ref.meta,
|
|
18
|
-
value = _ref.value,
|
|
19
|
-
onChange = _ref.onChange;
|
|
20
|
-
var modalRef = (0, _react.useRef)();
|
|
21
|
-
var handleEventClick = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
22
|
-
var payload = e.item.props.payload;
|
|
23
|
-
modalRef.current.doOpen(payload.name);
|
|
24
|
-
});
|
|
25
|
-
var eventsMenu = (0, _ahooks.useCreation)(function () {
|
|
26
|
-
var _meta$advance;
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
28
|
-
onClick: handleEventClick,
|
|
29
|
-
style: {
|
|
30
|
-
fontSize: 12
|
|
31
|
-
}
|
|
32
|
-
}, (_meta$advance = meta.advance) === null || _meta$advance === void 0 || (_meta$advance = _meta$advance.events) === null || _meta$advance === void 0 ? void 0 : _meta$advance.map(function (event) {
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
34
|
-
key: event.key,
|
|
35
|
-
payload: event
|
|
36
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
37
|
-
title: event.desc || event.name,
|
|
38
|
-
placement: "left",
|
|
39
|
-
getPopupContainer: function getPopupContainer() {
|
|
40
|
-
return document.getElementById('lc-design-workspace');
|
|
41
|
-
}
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
style: {
|
|
44
|
-
width: '100%',
|
|
45
|
-
fontSize: 12
|
|
46
|
-
}
|
|
47
|
-
}, event.name)));
|
|
48
|
-
}));
|
|
49
|
-
}, [value]);
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
51
|
-
field: "events",
|
|
52
|
-
label: (0, _utils.formatMessage)({
|
|
53
|
-
id: "".concat(_I18N_PREFIX_, ".events"),
|
|
54
|
-
label: '事件'
|
|
55
|
-
}),
|
|
56
|
-
bodyStyle: {
|
|
57
|
-
padding: '12px 16px'
|
|
58
|
-
}
|
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
60
|
-
overlay: eventsMenu,
|
|
61
|
-
placement: "bottomCenter",
|
|
62
|
-
getPopupContainer: function getPopupContainer() {
|
|
63
|
-
return document.getElementById('lc-design-workspace');
|
|
64
|
-
}
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
66
|
-
size: "small",
|
|
67
|
-
block: true
|
|
68
|
-
}, (0, _utils.formatMessage)({
|
|
69
|
-
id: "".concat(_I18N_PREFIX_, ".addEventAction"),
|
|
70
|
-
label: '添加事件动作'
|
|
71
|
-
})))), /*#__PURE__*/_react.default.createElement(_ActionBindModal.default, {
|
|
72
|
-
ref: modalRef,
|
|
73
|
-
activeNode: value
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
76
|
-
var _default = exports.default = AdvancePanel;
|