@luck-design-biz/luckda 0.0.25 → 0.0.26
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 +5 -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 +5 -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
|
@@ -23,8 +23,10 @@ var _outline = _interopRequireDefault(require("./style/outline.less"));
|
|
|
23
23
|
var _excluded = ["props", "children"];
|
|
24
24
|
var TreeNode = _antd.Tree.TreeNode;
|
|
25
25
|
var PAGE_CELL = [_constants.CELL_KEY.PAGE_HEADER, _constants.CELL_KEY.PAGE_CONTENT, _constants.CELL_KEY.PAGE_FOOTER];
|
|
26
|
-
var Outline = function Outline(
|
|
27
|
-
var
|
|
26
|
+
var Outline = function Outline() {
|
|
27
|
+
var modalTreeRef = (0, _react.useRef)();
|
|
28
|
+
var pageTreeRef = (0, _react.useRef)();
|
|
29
|
+
var openModal = (0, _react.useRef)(void 0);
|
|
28
30
|
var clickBySelf = (0, _react.useRef)(false);
|
|
29
31
|
var context = (0, _ContextProvider.useLDContext)();
|
|
30
32
|
var _useState = (0, _react.useState)(null),
|
|
@@ -43,8 +45,6 @@ var Outline = function Outline(_ref) {
|
|
|
43
45
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
44
46
|
pageExpandedKeys = _useState8[0],
|
|
45
47
|
setPageExpandedKeys = _useState8[1];
|
|
46
|
-
var latestModalExpandedKeysRef = (0, _ahooks.useLatest)(modalExpandedKeys);
|
|
47
|
-
var lastPageExpandedKeysRef = (0, _ahooks.useLatest)(pageExpandedKeys);
|
|
48
48
|
(0, _react.useEffect)(function () {
|
|
49
49
|
var _id = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
50
50
|
setSelectedKey(payload.id);
|
|
@@ -52,35 +52,36 @@ var Outline = function Outline(_ref) {
|
|
|
52
52
|
clickBySelf.current = false;
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
_split2 = (0, _slicedToArray2.default)(_split, 1),
|
|
57
|
-
_root = _split2[0];
|
|
58
|
-
if (!PAGE_CELL.includes(_root)) {
|
|
59
|
-
setModalExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(latestModalExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/')))));
|
|
60
|
-
} else {
|
|
61
|
-
setPageExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)(lastPageExpandedKeysRef.current), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/')))));
|
|
62
|
-
}
|
|
55
|
+
setModalExpandedKeys((0, _lodash.uniq)([].concat((0, _toConsumableArray2.default)((openModal.current ? modalTreeRef : pageTreeRef).current.props.expandedKeys), (0, _toConsumableArray2.default)((0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, payload.id), '/')))));
|
|
63
56
|
}).watch();
|
|
64
57
|
return function () {
|
|
65
58
|
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
66
59
|
};
|
|
67
|
-
}, [
|
|
68
|
-
var handleSelect =
|
|
60
|
+
}, []);
|
|
61
|
+
var handleSelect = function handleSelect(_key) {
|
|
69
62
|
clickBySelf.current = true;
|
|
70
63
|
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
71
|
-
id: _key
|
|
64
|
+
id: _key,
|
|
65
|
+
cellNode: context.componentMap.get(_key).dom
|
|
72
66
|
} : null);
|
|
67
|
+
};
|
|
68
|
+
var handleOpenModal = (0, _ahooks.useMemoizedFn)(function (_key) {
|
|
69
|
+
var _comp = context.componentMap.get(_key);
|
|
70
|
+
var _prevComp = openModal.current ? context.componentMap.get(openModal.current) : null;
|
|
71
|
+
_prevComp === null || _prevComp === void 0 || _prevComp.api.doClose();
|
|
72
|
+
_comp.api.doOpen();
|
|
73
|
+
openModal.current = _key;
|
|
73
74
|
});
|
|
74
|
-
var render = (0, _ahooks.useMemoizedFn)(function (
|
|
75
|
-
var props =
|
|
76
|
-
children =
|
|
77
|
-
childrenMap = (0, _objectWithoutProperties2.default)(
|
|
75
|
+
var render = (0, _ahooks.useMemoizedFn)(function (_ref) {
|
|
76
|
+
var props = _ref.props,
|
|
77
|
+
children = _ref.children,
|
|
78
|
+
childrenMap = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
78
79
|
if (props) {
|
|
79
80
|
return /*#__PURE__*/_react.default.createElement(TreeNode, {
|
|
80
81
|
icon: /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
81
82
|
type: "layout"
|
|
82
83
|
}),
|
|
83
|
-
title: props.
|
|
84
|
+
title: props.label,
|
|
84
85
|
key: props.id
|
|
85
86
|
}, (children === null || children === void 0 ? void 0 : children.length) && children.map(function (_id) {
|
|
86
87
|
return render(childrenMap[_id]);
|
|
@@ -91,9 +92,6 @@ var Outline = function Outline(_ref) {
|
|
|
91
92
|
});
|
|
92
93
|
});
|
|
93
94
|
(0, _ahooks.useDeepCompareLayoutEffect)(function () {
|
|
94
|
-
if (!context.pageData) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
95
|
var _reduce = (0, _lodash.reduce)(context.pageData.children, function (result, _id) {
|
|
98
96
|
var resultKey = PAGE_CELL.includes(_id) ? 'page' : 'modal';
|
|
99
97
|
result[resultKey][_id] = context.pageData[_id];
|
|
@@ -134,7 +132,7 @@ var Outline = function Outline(_ref) {
|
|
|
134
132
|
type: "inner",
|
|
135
133
|
hoverable: true,
|
|
136
134
|
title: (0, _utils.formatMessage)({
|
|
137
|
-
id: 'luckda.lowcode.
|
|
135
|
+
id: 'luckda.lowcode.model',
|
|
138
136
|
label: '模态视图层'
|
|
139
137
|
}),
|
|
140
138
|
style: {
|
|
@@ -144,6 +142,7 @@ var Outline = function Outline(_ref) {
|
|
|
144
142
|
padding: 0
|
|
145
143
|
}
|
|
146
144
|
}, /*#__PURE__*/_react.default.createElement(_antd.Tree, {
|
|
145
|
+
ref: modalTreeRef,
|
|
147
146
|
showLine: true,
|
|
148
147
|
showIcon: true,
|
|
149
148
|
blockNode: true,
|
|
@@ -151,51 +150,41 @@ var Outline = function Outline(_ref) {
|
|
|
151
150
|
type: "down"
|
|
152
151
|
}),
|
|
153
152
|
selectedKeys: [selectedKey],
|
|
154
|
-
onSelect: function onSelect(
|
|
155
|
-
var
|
|
156
|
-
_key =
|
|
157
|
-
var selected =
|
|
158
|
-
node =
|
|
153
|
+
onSelect: function onSelect(_ref2, _ref3) {
|
|
154
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
155
|
+
_key = _ref4[0];
|
|
156
|
+
var selected = _ref3.selected,
|
|
157
|
+
node = _ref3.node;
|
|
159
158
|
if (selected && node.props.pos.split('-').length === 2) {
|
|
160
|
-
|
|
161
|
-
context.$publisher(context.topics.COMPONENT_MODAL_TOGGLE, {
|
|
162
|
-
toggle: true,
|
|
163
|
-
id: _key
|
|
164
|
-
});
|
|
159
|
+
handleOpenModal(_key);
|
|
165
160
|
handleSelect(_key);
|
|
166
161
|
} else if (!selected && node.props.pos.split('-').length === 2) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
id: _key
|
|
171
|
-
});
|
|
162
|
+
var _comp = context.componentMap.get(openModal.current);
|
|
163
|
+
_comp.api.doClose();
|
|
164
|
+
openModal.current = void 0;
|
|
172
165
|
handleSelect(null);
|
|
173
166
|
} else {
|
|
174
|
-
// 选中节点是模态视图下的子组件,则打开该组件的模态视图组件
|
|
175
167
|
handleSelect(node.props.eventKey);
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
parentModal =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
});
|
|
168
|
+
var _split = (0, _lodash.split)((0, _dataProcess.getPathById)(context.pageData, node.props.eventKey), '/'),
|
|
169
|
+
_split2 = (0, _slicedToArray2.default)(_split, 1),
|
|
170
|
+
parentModal = _split2[0];
|
|
171
|
+
if (!openModal.current || openModal.current !== parentModal) {
|
|
172
|
+
handleOpenModal(parentModal);
|
|
173
|
+
}
|
|
183
174
|
}
|
|
184
175
|
},
|
|
185
176
|
expandedKeys: modalExpandedKeys,
|
|
186
|
-
onExpand: function onExpand(_keys,
|
|
187
|
-
var expanded =
|
|
188
|
-
node =
|
|
177
|
+
onExpand: function onExpand(_keys, _ref5) {
|
|
178
|
+
var expanded = _ref5.expanded,
|
|
179
|
+
node = _ref5.node;
|
|
189
180
|
if (expanded && node.props.pos.split('-').length === 2) {
|
|
190
181
|
handleSelect(null);
|
|
191
|
-
|
|
192
|
-
toggle: true,
|
|
193
|
-
id: node.props.eventKey
|
|
194
|
-
});
|
|
182
|
+
handleOpenModal(node.props.eventKey);
|
|
195
183
|
}
|
|
196
184
|
setModalExpandedKeys(_keys);
|
|
197
185
|
}
|
|
198
|
-
}, pageAndModal === null || pageAndModal === void 0 ? void 0 : pageAndModal.modal)),
|
|
186
|
+
}, pageAndModal === null || pageAndModal === void 0 ? void 0 : pageAndModal.modal)), /*#__PURE__*/_react.default.createElement(_antd.Tree, {
|
|
187
|
+
ref: pageTreeRef,
|
|
199
188
|
showLine: true,
|
|
200
189
|
showIcon: true,
|
|
201
190
|
blockNode: true,
|
|
@@ -203,13 +192,15 @@ var Outline = function Outline(_ref) {
|
|
|
203
192
|
type: "down"
|
|
204
193
|
}),
|
|
205
194
|
selectedKeys: [selectedKey],
|
|
206
|
-
onSelect: function onSelect(
|
|
207
|
-
var
|
|
208
|
-
_key =
|
|
209
|
-
var node =
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
195
|
+
onSelect: function onSelect(_ref6, _ref7) {
|
|
196
|
+
var _ref8 = (0, _slicedToArray2.default)(_ref6, 1),
|
|
197
|
+
_key = _ref8[0];
|
|
198
|
+
var node = _ref7.node;
|
|
199
|
+
if (openModal.current) {
|
|
200
|
+
var _prevComp = context.componentMap.get(openModal.current);
|
|
201
|
+
_prevComp.api.doClose();
|
|
202
|
+
openModal.current = void 0;
|
|
203
|
+
}
|
|
213
204
|
handleSelect(node.props.eventKey);
|
|
214
205
|
},
|
|
215
206
|
expandedKeys: pageExpandedKeys,
|
|
@@ -1,170 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _ahooks = require("ahooks");
|
|
14
|
-
var _antd = require("luck-design/antd");
|
|
15
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
-
var _lodash = require("lodash");
|
|
17
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
18
|
-
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
19
|
-
var _AttrsPanel = _interopRequireDefault(require("./components/AttrsPanel"));
|
|
20
|
-
var _StylePanel = _interopRequireDefault(require("./panel-section/StylePanel"));
|
|
21
|
-
var _AdvancePanel = _interopRequireDefault(require("./components/AdvancePanel"));
|
|
22
|
-
var _dataProcess = require("../engine/tools/dataProcess");
|
|
23
10
|
var _panel = _interopRequireDefault(require("./style/panel.less"));
|
|
24
|
-
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel';
|
|
25
|
-
var _TAB_LIST_ = [{
|
|
26
|
-
title: (0, _utils.formatMessage)({
|
|
27
|
-
id: "".concat(_I18N_PREFIX_, ".attrs"),
|
|
28
|
-
label: '属性'
|
|
29
|
-
}),
|
|
30
|
-
key: 'attrs'
|
|
31
|
-
}, {
|
|
32
|
-
title: (0, _utils.formatMessage)({
|
|
33
|
-
id: "".concat(_I18N_PREFIX_, ".styles"),
|
|
34
|
-
label: '样式'
|
|
35
|
-
}),
|
|
36
|
-
key: 'styles'
|
|
37
|
-
}, {
|
|
38
|
-
title: (0, _utils.formatMessage)({
|
|
39
|
-
id: "".concat(_I18N_PREFIX_, ".advance"),
|
|
40
|
-
label: '高级'
|
|
41
|
-
}),
|
|
42
|
-
key: 'advance'
|
|
43
|
-
}];
|
|
44
11
|
var Panel = function Panel() {
|
|
45
|
-
var activeTabRef = (0, _react.useRef)(null);
|
|
46
|
-
var underLineRef = (0, _react.useRef)(null);
|
|
47
|
-
var _useState = (0, _react.useState)(null),
|
|
48
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
|
-
activeNode = _useState2[0],
|
|
50
|
-
setActiveNode = _useState2[1];
|
|
51
|
-
var _useState3 = (0, _react.useState)('attrs'),
|
|
52
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
53
|
-
activeTabKey = _useState4[0],
|
|
54
|
-
setActiveTabKey = _useState4[1];
|
|
55
|
-
var context = (0, _ContextProvider.useLDContext)();
|
|
56
|
-
var meta = (0, _ahooks.useCreation)(function () {
|
|
57
|
-
return (0, _lodash.isNil)(activeNode) ? null : require("../engine/meta/".concat(activeNode.node.component.toLowerCase(), ".props.json"));
|
|
58
|
-
}, [activeNode]);
|
|
59
|
-
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value, repositioning) {
|
|
60
|
-
var component = context.componentMap.get(activeNode.node.id);
|
|
61
|
-
var _component$api$getSel = component.api.getSelfAndParentLCData(),
|
|
62
|
-
node = _component$api$getSel.node;
|
|
63
|
-
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
64
|
-
(0, _dataProcess.modifyById)(cloneData, activeNode.node.id, (0, _objectSpread3.default)((0, _objectSpread3.default)({}, node.props), {}, (0, _defineProperty2.default)({}, field, value)));
|
|
65
|
-
context._setPageData(cloneData).then(function (newData) {
|
|
66
|
-
context.$publisher(context.topics.COMPONENT_MODIFY, {
|
|
67
|
-
id: activeNode.node.id,
|
|
68
|
-
pageData: (0, _lodash.cloneDeep)(newData)
|
|
69
|
-
});
|
|
70
|
-
if (repositioning) context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
71
|
-
id: activeNode.node.id
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
(0, _react.useEffect)(function () {
|
|
76
|
-
var _id = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
77
|
-
setActiveTabKey('attrs');
|
|
78
|
-
if (!payload.id) {
|
|
79
|
-
setActiveNode(null);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
var component = context.componentMap.get(payload.id);
|
|
83
|
-
var _component$api$getSel2 = component.api.getSelfAndParentLCData(),
|
|
84
|
-
node = _component$api$getSel2.node;
|
|
85
|
-
var levelNodes = (0, _lodash.takeRight)(component.api.getLevelNodes(), 4);
|
|
86
|
-
setActiveNode({
|
|
87
|
-
node: node.props,
|
|
88
|
-
level: levelNodes
|
|
89
|
-
});
|
|
90
|
-
}).watch();
|
|
91
|
-
return function () {
|
|
92
|
-
return context.$unsubscriber(context.topics.COMPONENT_ACTIVE, _id);
|
|
93
|
-
};
|
|
94
|
-
}, []);
|
|
95
|
-
(0, _react.useLayoutEffect)(function () {
|
|
96
|
-
underLineRef.current.style.left = "".concat(activeTabRef.current.offsetLeft + activeTabRef.current.offsetWidth / 2 - 10, "px");
|
|
97
|
-
}, [activeTabKey, !!activeNode]);
|
|
98
12
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
99
13
|
className: _panel.default['lc-painter-panel']
|
|
100
|
-
},
|
|
101
|
-
className: (0, _classnames.default)(_panel.default['lc-painter-panel-topbar'], (0, _defineProperty2.default)({}, _panel.default.hidden, !activeNode))
|
|
102
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb, {
|
|
103
|
-
separator: ">",
|
|
104
|
-
style: {
|
|
105
|
-
fontSize: 12
|
|
106
|
-
}
|
|
107
|
-
}, activeNode === null || activeNode === void 0 ? void 0 : activeNode.level.map(function (_ref) {
|
|
108
|
-
var id = _ref.id,
|
|
109
|
-
name = _ref.name;
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb.Item, {
|
|
111
|
-
key: id,
|
|
112
|
-
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _panel.default['active-node-level'], id !== activeNode.node.id)),
|
|
113
|
-
onMouseEnter: function onMouseEnter() {
|
|
114
|
-
if (id === activeNode.node.id) return;
|
|
115
|
-
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
116
|
-
id: id
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
onMouseLeave: function onMouseLeave() {
|
|
120
|
-
if (id === activeNode.node.id) return;
|
|
121
|
-
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
122
|
-
},
|
|
123
|
-
onClick: function onClick() {
|
|
124
|
-
if (id === activeNode.node.id) return;
|
|
125
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
126
|
-
id: id
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}, name);
|
|
130
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
-
className: (0, _classnames.default)(_panel.default['lc-painter-panel-tabbar'], (0, _defineProperty2.default)({}, _panel.default.hidden, !activeNode))
|
|
132
|
-
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
133
|
-
className: _panel.default.headerList
|
|
134
|
-
}, (activeNode !== null && activeNode !== void 0 && activeNode.node.css ? _TAB_LIST_ : [_TAB_LIST_[0], _TAB_LIST_[2]]).map(function (_item) {
|
|
135
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
136
|
-
key: _item.key,
|
|
137
|
-
ref: activeTabKey === _item.key ? activeTabRef : null,
|
|
138
|
-
className: (0, _classnames.default)((0, _defineProperty2.default)({}, _panel.default.actived, activeTabKey === _item.key)),
|
|
139
|
-
onClick: function onClick() {
|
|
140
|
-
return setActiveTabKey(_item.key);
|
|
141
|
-
}
|
|
142
|
-
}, _item.title);
|
|
143
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
-
ref: underLineRef,
|
|
145
|
-
className: _panel.default.underline
|
|
146
|
-
})), activeTabKey === _TAB_LIST_[0].key && /*#__PURE__*/_react.default.createElement(_AttrsPanel.default, {
|
|
147
|
-
meta: meta,
|
|
148
|
-
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node,
|
|
149
|
-
onChange: function onChange(field, value, repositioning) {
|
|
150
|
-
return handleChange(field, value, repositioning);
|
|
151
|
-
}
|
|
152
|
-
}), activeTabKey === _TAB_LIST_[1].key && /*#__PURE__*/_react.default.createElement(_StylePanel.default, {
|
|
153
|
-
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node.css,
|
|
154
|
-
onChange: function onChange(_, newCss) {
|
|
155
|
-
return handleChange('css', newCss);
|
|
156
|
-
}
|
|
157
|
-
}), activeTabKey === _TAB_LIST_[2].key && /*#__PURE__*/_react.default.createElement(_AdvancePanel.default, {
|
|
158
|
-
meta: meta,
|
|
159
|
-
value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.node,
|
|
160
|
-
onChange: function onChange(val) {
|
|
161
|
-
return handleChange('advance', val);
|
|
162
|
-
}
|
|
163
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
164
|
-
className: (0, _classnames.default)(_panel.default['lc-painter-panel-empty'], (0, _defineProperty2.default)({}, _panel.default.hidden, !!activeNode))
|
|
165
|
-
}, (0, _utils.formatMessage)({
|
|
166
|
-
id: "".concat(_I18N_PREFIX_, ".empty"),
|
|
167
|
-
label: '请在左侧画布选中节点'
|
|
168
|
-
})));
|
|
14
|
+
}, "Panel");
|
|
169
15
|
};
|
|
170
16
|
var _default = exports.default = Panel;
|
|
@@ -1,41 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireWildcard3 = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
-
var _react =
|
|
13
|
+
var _react = _interopRequireWildcard3(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _umi = require("umi");
|
|
13
16
|
var _luckDesign = require("luck-design");
|
|
14
17
|
var _antd = require("luck-design/antd");
|
|
15
|
-
var _Outline = _interopRequireDefault(require("./Outline"));
|
|
16
|
-
var _Components = _interopRequireDefault(require("./Components"));
|
|
17
|
-
var _I18n = _interopRequireDefault(require("./I18n"));
|
|
18
18
|
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
+
var _lodash = require("lodash");
|
|
19
20
|
var _ribbon = _interopRequireDefault(require("./style/ribbon.less"));
|
|
20
21
|
var _WIDTH_ = 48;
|
|
21
|
-
var _DRAWER_PROPS = {
|
|
22
|
-
placement: 'left',
|
|
23
|
-
mask: false,
|
|
24
|
-
getContainer: false,
|
|
25
|
-
zIndex: 2000,
|
|
26
|
-
headerStyle: {
|
|
27
|
-
borderBottom: 'none'
|
|
28
|
-
},
|
|
29
|
-
style: {
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
left: _WIDTH_
|
|
32
|
-
},
|
|
33
|
-
bodyStyle: {
|
|
34
|
-
overflowY: 'auto',
|
|
35
|
-
height: 'calc(100% - 55px)',
|
|
36
|
-
padding: 0
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
22
|
var _DRAWER_OUTLINE_ = {
|
|
40
23
|
width: 300,
|
|
41
24
|
key: 'outline',
|
|
@@ -46,7 +29,7 @@ var _DRAWER_COMPONENTS_ = {
|
|
|
46
29
|
width: 310,
|
|
47
30
|
key: 'components',
|
|
48
31
|
title: '组件',
|
|
49
|
-
fix:
|
|
32
|
+
fix: false
|
|
50
33
|
};
|
|
51
34
|
var _DRAWER_I18N_ = {
|
|
52
35
|
width: 450,
|
|
@@ -59,6 +42,46 @@ var Ribbon = function Ribbon() {
|
|
|
59
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
60
43
|
drawer = _useState2[0],
|
|
61
44
|
setDrawer = _useState2[1];
|
|
45
|
+
var Detail = (0, _ahooks.useCreation)(function () {
|
|
46
|
+
return (0, _umi.dynamic)({
|
|
47
|
+
loader: function () {
|
|
48
|
+
var _loader = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
49
|
+
var name, _yield$import, Comp;
|
|
50
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
51
|
+
while (1) switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
if (!drawer) {
|
|
54
|
+
_context.next = 7;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
name = (0, _lodash.upperFirst)(drawer.key);
|
|
58
|
+
_context.next = 4;
|
|
59
|
+
return function (specifier) {
|
|
60
|
+
return new Promise(function (r) {
|
|
61
|
+
return r(specifier);
|
|
62
|
+
}).then(function (s) {
|
|
63
|
+
return (0, _interopRequireWildcard2.default)(require(s));
|
|
64
|
+
});
|
|
65
|
+
}("./".concat(name));
|
|
66
|
+
case 4:
|
|
67
|
+
_yield$import = _context.sent;
|
|
68
|
+
Comp = _yield$import.default;
|
|
69
|
+
return _context.abrupt("return", Comp);
|
|
70
|
+
case 7:
|
|
71
|
+
return _context.abrupt("return", null);
|
|
72
|
+
case 8:
|
|
73
|
+
case "end":
|
|
74
|
+
return _context.stop();
|
|
75
|
+
}
|
|
76
|
+
}, _callee);
|
|
77
|
+
}));
|
|
78
|
+
function loader() {
|
|
79
|
+
return _loader.apply(this, arguments);
|
|
80
|
+
}
|
|
81
|
+
return loader;
|
|
82
|
+
}()
|
|
83
|
+
});
|
|
84
|
+
}, [drawer]);
|
|
62
85
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_luckDesign.Box, {
|
|
63
86
|
className: _ribbon.default['lc-painter-ribbon'],
|
|
64
87
|
width: _WIDTH_,
|
|
@@ -101,50 +124,28 @@ var Ribbon = function Ribbon() {
|
|
|
101
124
|
onClick: function onClick() {
|
|
102
125
|
return setDrawer((drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_I18N_.key ? null : _DRAWER_I18N_);
|
|
103
126
|
}
|
|
104
|
-
}))), /*#__PURE__*/_react.default.createElement(_antd.Drawer,
|
|
105
|
-
title: drawer ? (0, _utils.formatMessage)({
|
|
106
|
-
id: "luckda.lowcode.".concat(drawer.key),
|
|
107
|
-
label: drawer.title
|
|
108
|
-
}) : '',
|
|
109
|
-
width: (drawer === null || drawer === void 0 ? void 0 : drawer.width) || 0,
|
|
110
|
-
visible: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_OUTLINE_.key,
|
|
111
|
-
onClose: function onClose() {
|
|
112
|
-
return setDrawer(null);
|
|
113
|
-
}
|
|
114
|
-
}, _DRAWER_PROPS, {
|
|
115
|
-
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _DRAWER_PROPS.style), {}, {
|
|
116
|
-
display: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_OUTLINE_.key ? 'block' : 'none'
|
|
117
|
-
})
|
|
118
|
-
}), /*#__PURE__*/_react.default.createElement(_Outline.default, {
|
|
119
|
-
open: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_OUTLINE_.key
|
|
120
|
-
})), /*#__PURE__*/_react.default.createElement(_antd.Drawer, (0, _extends2.default)({
|
|
127
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
121
128
|
title: drawer ? (0, _utils.formatMessage)({
|
|
122
129
|
id: "luckda.lowcode.".concat(drawer.key),
|
|
123
130
|
label: drawer.title
|
|
124
131
|
}) : '',
|
|
132
|
+
placement: "left",
|
|
125
133
|
width: (drawer === null || drawer === void 0 ? void 0 : drawer.width) || 0,
|
|
126
|
-
visible:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
}, _DRAWER_PROPS, {
|
|
131
|
-
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _DRAWER_PROPS.style), {}, {
|
|
132
|
-
display: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_COMPONENTS_.key ? 'block' : 'none'
|
|
133
|
-
})
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement(_Components.default, null)), /*#__PURE__*/_react.default.createElement(_antd.Drawer, (0, _extends2.default)({
|
|
135
|
-
title: drawer ? (0, _utils.formatMessage)({
|
|
136
|
-
id: "luckda.lowcode.".concat(drawer.key),
|
|
137
|
-
label: drawer.title
|
|
138
|
-
}) : '',
|
|
139
|
-
width: (drawer === null || drawer === void 0 ? void 0 : drawer.width) || 0,
|
|
140
|
-
visible: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_I18N_.key,
|
|
134
|
+
visible: !!drawer,
|
|
135
|
+
mask: false,
|
|
136
|
+
getContainer: false,
|
|
141
137
|
onClose: function onClose() {
|
|
142
138
|
return setDrawer(null);
|
|
139
|
+
},
|
|
140
|
+
style: {
|
|
141
|
+
position: 'absolute',
|
|
142
|
+
left: _WIDTH_
|
|
143
|
+
},
|
|
144
|
+
bodyStyle: {
|
|
145
|
+
overflowY: 'auto',
|
|
146
|
+
height: 'calc(100% - 55px)',
|
|
147
|
+
padding: 0
|
|
143
148
|
}
|
|
144
|
-
},
|
|
145
|
-
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _DRAWER_PROPS.style), {}, {
|
|
146
|
-
display: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_I18N_.key ? 'block' : 'none'
|
|
147
|
-
})
|
|
148
|
-
}), /*#__PURE__*/_react.default.createElement(_I18n.default, null)));
|
|
149
|
+
}, Detail && /*#__PURE__*/_react.default.createElement(Detail, null)));
|
|
149
150
|
};
|
|
150
151
|
var _default = exports.default = Ribbon;
|
|
@@ -1,99 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = _default;
|
|
9
|
-
var
|
|
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 _lodash = require("lodash");
|
|
15
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
16
9
|
var _panelItem = _interopRequireDefault(require("../style/panel-item.less"));
|
|
17
10
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @component
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* <PanelItem
|
|
26
|
-
* label="属性名称"
|
|
27
|
-
* collapsed={false}
|
|
28
|
-
* addon={<div>额外内容</div>}
|
|
29
|
-
* >
|
|
30
|
-
* <input type="text" />
|
|
31
|
-
* </PanelItem>
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} props 组件接收的参数。
|
|
35
|
-
* @param {string} props.label 显示的属性名称。如果标签以 `#` 开头,则不显示。
|
|
36
|
-
* @param {boolean} [props.collapsed=true] 初始是否折叠。默认为 `true`。
|
|
37
|
-
* @param {React.ReactNode} props.addon 当属性项展开时,可以在下方显示额外内容。
|
|
38
|
-
* @param {React.ReactNode} props.children 对应于属性名称的组件,可以是输入框、下拉菜单等 React 节点。
|
|
39
|
-
*
|
|
40
|
-
* @returns {React.Element} 渲染属性名称、对应的组件以及可选的额外内容。
|
|
11
|
+
* 属性面板属性行组件
|
|
12
|
+
* @param {string} label 属性名
|
|
13
|
+
* @param {React.ReactNode} component 属性组件
|
|
14
|
+
* @returns
|
|
41
15
|
*/
|
|
42
16
|
function _default(_ref) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
desc = _ref.desc,
|
|
46
|
-
_ref$collapsed = _ref.collapsed,
|
|
47
|
-
collapsed = _ref$collapsed === void 0 ? true : _ref$collapsed,
|
|
48
|
-
addon = _ref.addon,
|
|
49
|
-
suppressPadding = _ref.suppressPadding,
|
|
50
|
-
children = _ref.children;
|
|
51
|
-
var _useState = (0, _react.useState)(collapsed),
|
|
52
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
-
curClps = _useState2[0],
|
|
54
|
-
setCurClps = _useState2[1];
|
|
55
|
-
var HandleClick = (0, _ahooks.useMemoizedFn)(function () {
|
|
56
|
-
if (!addon) return;
|
|
57
|
-
setCurClps(!curClps);
|
|
58
|
-
});
|
|
59
|
-
var tip = (0, _ahooks.useCreation)(function () {
|
|
60
|
-
var str = void 0;
|
|
61
|
-
if (field) {
|
|
62
|
-
str = "\u5C5E\u6027\uFF1A".concat(field);
|
|
63
|
-
}
|
|
64
|
-
if (desc) {
|
|
65
|
-
str += "".concat(str ? ' | ' : '', "\u8BF4\u660E\uFF1A").concat(desc);
|
|
66
|
-
}
|
|
67
|
-
return str;
|
|
68
|
-
}, [field, desc]);
|
|
69
|
-
(0, _react.useEffect)(function () {
|
|
70
|
-
setCurClps(collapsed);
|
|
71
|
-
}, [collapsed]);
|
|
17
|
+
var label = _ref.label,
|
|
18
|
+
component = _ref.component;
|
|
72
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
className:
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
75
|
-
className: _panelItem.default['panelrow']
|
|
76
|
-
}, label && !(0, _lodash.startsWith)(label, '#') && /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
-
className: "".concat(_panelItem.default['item-label']).concat(addon ? ' panel-pointer' : ''),
|
|
78
|
-
onClick: HandleClick
|
|
79
|
-
}, addon && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
80
|
-
className: _panelItem.default['item-icon'],
|
|
81
|
-
type: !curClps ? 'down' : 'right'
|
|
82
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
83
|
-
overlayStyle: {
|
|
84
|
-
fontSize: '12px'
|
|
85
|
-
},
|
|
86
|
-
title: tip,
|
|
87
|
-
getPopupContainer: function getPopupContainer() {
|
|
88
|
-
return document.getElementById('lc-design-workspace');
|
|
89
|
-
}
|
|
20
|
+
className: _panelItem.default['lc-painter-components-panelitem']
|
|
90
21
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} : null
|
|
94
|
-
}, label))), /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
className: _panelItem.default['item-label']
|
|
23
|
+
}, label), /*#__PURE__*/_react.default.createElement("span", {
|
|
95
24
|
className: _panelItem.default['item-component']
|
|
96
|
-
},
|
|
97
|
-
className: _panelItem.default['addon']
|
|
98
|
-
}, addon));
|
|
25
|
+
}, component));
|
|
99
26
|
}
|