@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
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
var _excluded = ["props", "children"]
|
|
7
|
-
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
5
|
+
var _excluded = ["props", "children"];
|
|
8
6
|
import React, { useRef, useState } from 'react';
|
|
9
7
|
import { dynamic } from 'umi';
|
|
10
8
|
import { useMemoizedFn, useDeepCompareLayoutEffect } from 'ahooks';
|
|
11
|
-
import { reduce
|
|
12
|
-
import
|
|
13
|
-
import Box from "./lc-components/Box";
|
|
9
|
+
import { reduce } from 'lodash';
|
|
10
|
+
import Wrapper from "./lc-components/Wrapper";
|
|
14
11
|
import { CELL_KEY } from "../constants";
|
|
15
12
|
import styles from "./style/canvas.less";
|
|
16
13
|
var PAGE_CELL = [CELL_KEY.PAGE_HEADER, CELL_KEY.PAGE_CONTENT, CELL_KEY.PAGE_FOOTER];
|
|
17
|
-
var Canvas = function Canvas() {
|
|
18
|
-
var
|
|
19
|
-
|
|
14
|
+
var Canvas = function Canvas(_ref) {
|
|
15
|
+
var dataSource = _ref.dataSource;
|
|
16
|
+
console.log('dataSource', dataSource);
|
|
17
|
+
var headerRef = useRef();
|
|
18
|
+
var contentRef = useRef();
|
|
19
|
+
var footerRef = useRef();
|
|
20
20
|
var _useState = useState(null),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
22
|
header = _useState2[0],
|
|
@@ -33,54 +33,40 @@ var Canvas = function Canvas() {
|
|
|
33
33
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
34
34
|
modal = _useState8[0],
|
|
35
35
|
setModal = _useState8[1];
|
|
36
|
-
var render = useMemoizedFn(function (
|
|
37
|
-
var props =
|
|
38
|
-
children =
|
|
39
|
-
childrenMap = _objectWithoutProperties(
|
|
36
|
+
var render = useMemoizedFn(function (_ref2) {
|
|
37
|
+
var props = _ref2.props,
|
|
38
|
+
children = _ref2.children,
|
|
39
|
+
childrenMap = _objectWithoutProperties(_ref2, _excluded);
|
|
40
40
|
if (props && !PAGE_CELL.includes(props.id)) {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}));
|
|
71
|
-
function loader() {
|
|
72
|
-
return _loader.apply(this, arguments);
|
|
73
|
-
}
|
|
74
|
-
return loader;
|
|
75
|
-
}()
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
var Comp = dynamicCompMap.current[component];
|
|
79
|
-
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
80
|
-
key: id,
|
|
81
|
-
id: id,
|
|
82
|
-
context: context
|
|
83
|
-
}, rest), (children || []).map(function (_id) {
|
|
41
|
+
var Comp = dynamic({
|
|
42
|
+
loader: function () {
|
|
43
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
44
|
+
var _yield$import, _Comp;
|
|
45
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
46
|
+
while (1) switch (_context.prev = _context.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
_context.next = 2;
|
|
49
|
+
return import("./lc-components/".concat(props.type));
|
|
50
|
+
case 2:
|
|
51
|
+
_yield$import = _context.sent;
|
|
52
|
+
_Comp = _yield$import.default;
|
|
53
|
+
return _context.abrupt("return", _Comp);
|
|
54
|
+
case 5:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee);
|
|
59
|
+
}));
|
|
60
|
+
function loader() {
|
|
61
|
+
return _loader.apply(this, arguments);
|
|
62
|
+
}
|
|
63
|
+
return loader;
|
|
64
|
+
}()
|
|
65
|
+
});
|
|
66
|
+
return /*#__PURE__*/React.createElement(Comp, {
|
|
67
|
+
id: props.id,
|
|
68
|
+
lcdata: props
|
|
69
|
+
}, (children || []).map(function (_id) {
|
|
84
70
|
return render(childrenMap[_id]);
|
|
85
71
|
}));
|
|
86
72
|
}
|
|
@@ -89,18 +75,18 @@ var Canvas = function Canvas() {
|
|
|
89
75
|
});
|
|
90
76
|
});
|
|
91
77
|
useDeepCompareLayoutEffect(function () {
|
|
92
|
-
setHeader(render(
|
|
93
|
-
}, [
|
|
78
|
+
setHeader(render(dataSource[CELL_KEY.PAGE_HEADER]));
|
|
79
|
+
}, [dataSource[CELL_KEY.PAGE_HEADER]]);
|
|
94
80
|
useDeepCompareLayoutEffect(function () {
|
|
95
|
-
setContent(render(
|
|
96
|
-
}, [
|
|
81
|
+
setContent(render(dataSource[CELL_KEY.PAGE_CONTENT]));
|
|
82
|
+
}, [dataSource[CELL_KEY.PAGE_CONTENT]]);
|
|
97
83
|
useDeepCompareLayoutEffect(function () {
|
|
98
|
-
setFooter(render(
|
|
99
|
-
}, [
|
|
84
|
+
setFooter(render(dataSource[CELL_KEY.PAGE_FOOTER]));
|
|
85
|
+
}, [dataSource[CELL_KEY.PAGE_FOOTER]]);
|
|
100
86
|
useDeepCompareLayoutEffect(function () {
|
|
101
|
-
var pageModal = reduce(
|
|
87
|
+
var pageModal = reduce(dataSource.children, function (result, _id) {
|
|
102
88
|
if (!PAGE_CELL.includes(_id)) {
|
|
103
|
-
result[_id] =
|
|
89
|
+
result[_id] = dataSource[_id];
|
|
104
90
|
if (!result.children) {
|
|
105
91
|
result.children = [];
|
|
106
92
|
}
|
|
@@ -109,36 +95,41 @@ var Canvas = function Canvas() {
|
|
|
109
95
|
return result;
|
|
110
96
|
}, {});
|
|
111
97
|
setModal(render(pageModal));
|
|
112
|
-
}, [
|
|
113
|
-
return context.pageData[_id];
|
|
114
|
-
})]);
|
|
98
|
+
}, [dataSource.children]);
|
|
115
99
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
100
|
id: "page-canvas",
|
|
117
101
|
className: styles['lc-view-canvas']
|
|
118
|
-
}, /*#__PURE__*/React.createElement(
|
|
119
|
-
key: CELL_KEY.PAGE_HEADER,
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Wrapper, {
|
|
120
103
|
id: CELL_KEY.PAGE_HEADER,
|
|
104
|
+
getTargetDom: function getTargetDom() {
|
|
105
|
+
return headerRef.current;
|
|
106
|
+
}
|
|
107
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
ref: headerRef,
|
|
121
109
|
style: {
|
|
122
110
|
width: '100%',
|
|
123
111
|
height: 120,
|
|
124
112
|
backgroundColor: '#d3f261'
|
|
125
113
|
}
|
|
126
|
-
}, header), /*#__PURE__*/React.createElement(
|
|
127
|
-
key: CELL_KEY.PAGE_CONTENT,
|
|
114
|
+
}, header)), /*#__PURE__*/React.createElement(Wrapper, {
|
|
128
115
|
id: CELL_KEY.PAGE_CONTENT,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
116
|
+
getTargetDom: function getTargetDom() {
|
|
117
|
+
return contentRef.current;
|
|
118
|
+
}
|
|
119
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
ref: contentRef
|
|
121
|
+
}, content)), /*#__PURE__*/React.createElement(Wrapper, {
|
|
122
|
+
id: CELL_KEY.PAGE_HEADER,
|
|
123
|
+
getTargetDom: function getTargetDom() {
|
|
124
|
+
return footerRef.current;
|
|
133
125
|
}
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
id: CELL_KEY.PAGE_FOOTER,
|
|
126
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
ref: footerRef,
|
|
137
128
|
style: {
|
|
138
129
|
width: '100%',
|
|
139
130
|
height: 80,
|
|
140
131
|
backgroundColor: '#69c0ff'
|
|
141
132
|
}
|
|
142
|
-
}, footer), modal);
|
|
133
|
+
}, footer)), modal);
|
|
143
134
|
};
|
|
144
135
|
export default Canvas;
|
|
File without changes
|
package/es/lowcode/view/Page.js
CHANGED
|
@@ -1,28 +1,44 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className"];
|
|
5
|
+
var _excluded = ["pageCode", "className"];
|
|
5
6
|
import React, { useRef, useEffect, forwardRef } from 'react';
|
|
6
|
-
import { useMemoizedFn, useBoolean
|
|
7
|
+
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
7
8
|
import classNames from 'classnames';
|
|
8
9
|
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
9
10
|
import Loading from "./Loading";
|
|
10
11
|
import Wrapper from "./lc-components/Wrapper";
|
|
11
12
|
import Canvas from "./Canvas";
|
|
12
|
-
import
|
|
13
|
+
import { decompress, compress } from "../engine/tools/dataProcess";
|
|
13
14
|
import { CELL_KEY } from "../constants";
|
|
14
15
|
import styles from "./style/page.less";
|
|
16
|
+
var mock = function mock(_pageCode) {
|
|
17
|
+
return new Promise(function (resolve) {
|
|
18
|
+
setTimeout(function () {
|
|
19
|
+
var data = 'ᯡࠣ䂼྆ڑÙ⁅䁆䞠䌣䰪ぞ婈Ø䀦䉑Ŝ持䀥ດ⠦榠⍼Ⲉᗣᠱ嵜䐠׆Ⱐॼ哘ᄳࡠ֕惂ᬠ౪Ӕ沥尡㸴Ƭ䎰嫀䗠ވ䀻▯ἰ湬⥒ᓡᰀ᪡㱲璻䞠ೣⰊ焥⍂へ僸簠ⷌ)䔠ԂࠡⰠಢ㍬[婿ԯဧデ匒<̰N䁞椌狲⎣℁ࡈ琤ᶡ桎睑砢◛㶤ს㕍Ʃ䅌欫㊓㢛粠᙭⃀㤠ȉᑤզ愕ۦ厁䷅ᜧ㱯䀦密䭋氠㞘㵵朞礒⺛㺕婐㰵占マ១犚弐x㙁䘸㮱劐ش೮䈈J毟䈦Ⳙీฺ㐠槬⁽Ჰ栰帿٠䂠㐳楂唏៣爭ᡘℼ撘䑼㴷ᨀ᭖䶀㠤嫯䐢䌵n皹᪑ᣬ䭅曢冪富ધ䤲瘠೯嗰ᾕ㍿䎋㪣⣷⟕䃎䌪㟨媽⽸㝐墎㲂暘抮ⴳ₂†ٳõᶢ㹕ㄢà㵠g❌L檪䠨晴⸨ⶱ淛္≢曈廳ܥ䁀⊸ᱥႫ帲墛ᷯ猦↕埄㩀磫ῠ琉Ẁ崆㴮梌棖巶翖㈈䏕䒒⪭掩犕唹䠽䊗ࣾᅡ爌䩛㓧ⲑ㲥Ꮸ®㏾❰僷戦熂濛紎玈㋻్羜㺗㸌᠁猑℄畛㶋泧₀¥毗䚼⬦Сღ䀮劶☔⟫㢯㵏Ⰺ渍װ爊㱏ᘇ給㮄̋ᐆ͈䇑෫˅ࠢ⑰樼↫⦉ࡋᖃ䌍ࠤ效✿䃫༼䂁ߏ籈涎㑽ᗎ甥ᙉ抸咈ǰ䪠ˢᛦ儏ⰲ㐹浦☉Ȱ䗁䤘ⲇ沞ⵑ梾䣡炕߄哾ߢ^ສࣀ旔▨॒⍨夿ᠷ䦩焲╨ᥖ❒囓恦 ⊱ᯮ㥝ဤ羊}璀̰塎㎥⥸ᗸၠ㢿⨾⋠㮾≴璺碠⋄喵哵䃝礔۔垵䫚囵棜ゥ᠙⣖䞮ွ⌵哄ω䀵Ⳇ捜䐯䤪ㅦ⡊㕦欐硤娪Ф⥪㥥⢊㽸䔙ᓯચɳ嫬怷ʚ橔²ᵼ嚻৷剛䆃塯彁Ⱟ䈕㺿啴૰˻磡ᠯ㻿喀亾䮲眝囕ົṖ⛘䵕曍ᐠ';
|
|
20
|
+
resolve(data);
|
|
21
|
+
}, 400);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
15
24
|
var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
16
|
-
var
|
|
17
|
-
|
|
25
|
+
var pageCode = _ref2.pageCode,
|
|
26
|
+
className = _ref2.className,
|
|
18
27
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
19
28
|
var _ref = useRef(null);
|
|
20
29
|
var _rootRef = ref || _ref;
|
|
21
30
|
var context = useLDContext();
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
var _useBoolean = useBoolean(true),
|
|
32
|
+
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
33
|
+
loading = _useBoolean2[0],
|
|
34
|
+
setFalse = _useBoolean2[1].setFalse;
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
context._pageCode.current = pageCode;
|
|
37
|
+
mock(pageCode).then(function (pageData) {
|
|
38
|
+
context._pageData.current = decompress(pageData);
|
|
39
|
+
setFalse();
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
26
42
|
var getTargetDom = useMemoizedFn(function () {
|
|
27
43
|
return _rootRef.current;
|
|
28
44
|
});
|
|
@@ -32,6 +48,8 @@ var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
32
48
|
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
33
49
|
ref: _rootRef,
|
|
34
50
|
className: classNames(styles['lc-view-page'], _defineProperty({}, className, !!className))
|
|
35
|
-
}, props),
|
|
51
|
+
}, props), loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement(Canvas, {
|
|
52
|
+
dataSource: context.pageData
|
|
53
|
+
})));
|
|
36
54
|
});
|
|
37
55
|
export default LCPage;
|
package/es/lowcode/view/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["pageCode"];
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import EventBusProvider from "../engine/provider/EventBusProvider";
|
|
5
6
|
import ContextProvider from "../engine/provider/ContextProvider";
|
|
6
7
|
import Page from "./Page";
|
|
7
8
|
import { RUNTIME } from "../constants/index";
|
|
8
9
|
var View = function View(_ref) {
|
|
9
|
-
var
|
|
10
|
+
var pageCode = _ref.pageCode,
|
|
10
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
12
|
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
12
13
|
runtime: RUNTIME.LIVE
|
|
13
|
-
}, /*#__PURE__*/React.createElement(ContextProvider, {
|
|
14
|
-
|
|
15
|
-
},
|
|
14
|
+
}, /*#__PURE__*/React.createElement(ContextProvider, null, /*#__PURE__*/React.createElement(Page, _extends({
|
|
15
|
+
pageCode: pageCode
|
|
16
|
+
}, props))));
|
|
16
17
|
};
|
|
17
18
|
export default View;
|
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import React, { useRef
|
|
4
|
-
import
|
|
5
|
-
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import styled from 'styled-components';
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["id", "children"];
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
|
+
import { useMemoizedFn } from 'ahooks';
|
|
8
5
|
import Wrapper from "../Wrapper";
|
|
9
|
-
import styles from "./index.less";
|
|
10
|
-
import { omitBadProps } from "../../../engine/tools/helper";
|
|
11
|
-
import defaultMeta from "../../../engine/meta/box.props.default.json";
|
|
12
|
-
var Box = styled.div.withConfig({
|
|
13
|
-
displayName: "Box",
|
|
14
|
-
componentId: "luckda-6530__sc-19se5zf-0"
|
|
15
|
-
})(["", ""], function (props) {
|
|
16
|
-
return props.css;
|
|
17
|
-
});
|
|
18
|
-
var _StyledBox = styled(Box).withConfig({
|
|
19
|
-
displayName: "_StyledBox",
|
|
20
|
-
componentId: "luckda-6530__sc-19se5zf-1"
|
|
21
|
-
})(["", ""], function (p) {
|
|
22
|
-
return p.$_css;
|
|
23
|
-
});
|
|
24
6
|
var LCBox = function LCBox(_ref) {
|
|
25
7
|
var id = _ref.id,
|
|
26
8
|
children = _ref.children,
|
|
27
|
-
|
|
28
|
-
css = _ref.css,
|
|
29
|
-
style = _ref.style;
|
|
9
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
10
|
var ref = useRef();
|
|
31
11
|
var getTargetDom = useMemoizedFn(function () {
|
|
32
12
|
return ref.current;
|
|
@@ -34,21 +14,8 @@ var LCBox = function LCBox(_ref) {
|
|
|
34
14
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
35
15
|
id: id,
|
|
36
16
|
getTargetDom: getTargetDom
|
|
37
|
-
}, /*#__PURE__*/React.createElement(
|
|
38
|
-
ref: ref
|
|
39
|
-
|
|
40
|
-
style: style,
|
|
41
|
-
name: "box",
|
|
42
|
-
$_css: css
|
|
43
|
-
}, children));
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
ref: ref
|
|
19
|
+
}, "LCBox", children));
|
|
44
20
|
};
|
|
45
|
-
LCBox.propTypes = {
|
|
46
|
-
/**
|
|
47
|
-
* @name 唯一标识
|
|
48
|
-
* @type string
|
|
49
|
-
* @disabled true
|
|
50
|
-
*/
|
|
51
|
-
id: PropTypes.string.isRequired
|
|
52
|
-
};
|
|
53
|
-
LCBox.defaultProps = omitBadProps(defaultMeta);
|
|
54
21
|
export default LCBox;
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["id", "children"];
|
|
2
4
|
import React, { useRef } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
5
|
import { useMemoizedFn } from 'ahooks';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
6
|
import { useLDContext } from "../../../engine/provider/ContextProvider";
|
|
7
7
|
import { Button } from 'luck-design/antd';
|
|
8
8
|
import Wrapper from "../Wrapper";
|
|
9
9
|
import { RUNTIME } from "../../../constants";
|
|
10
|
-
import { omitBadProps } from "../../../engine/tools/helper";
|
|
11
|
-
import defaultMeta from "../../../engine/meta/button.props.default.json";
|
|
12
|
-
import styles from "./style.less";
|
|
13
10
|
var LCButton = function LCButton(_ref) {
|
|
14
11
|
var id = _ref.id,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
size = _ref.size,
|
|
18
|
-
block = _ref.block,
|
|
19
|
-
serial = _ref.serial,
|
|
20
|
-
serialEffect = _ref.serialEffect,
|
|
21
|
-
ghost = _ref.ghost,
|
|
22
|
-
style = _ref.style,
|
|
23
|
-
className = _ref.className;
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
14
|
var context = useLDContext();
|
|
25
15
|
var ref = useRef();
|
|
26
16
|
var getTargetDom = useMemoizedFn(function () {
|
|
@@ -39,67 +29,9 @@ var LCButton = function LCButton(_ref) {
|
|
|
39
29
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
40
30
|
id: id,
|
|
41
31
|
getTargetDom: getTargetDom
|
|
42
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
43
33
|
ref: ref,
|
|
44
|
-
type: type,
|
|
45
|
-
size: size,
|
|
46
|
-
block: block,
|
|
47
|
-
ghost: ghost,
|
|
48
|
-
style: style,
|
|
49
|
-
className: classNames(_defineProperty(_defineProperty({}, styles['runtime-button'], context.runtime === RUNTIME.DESIGN), className, !!className)),
|
|
50
34
|
onClick: handleClick
|
|
51
|
-
},
|
|
35
|
+
}, props), "LCButton-", id));
|
|
52
36
|
};
|
|
53
|
-
LCButton.propTypes = {
|
|
54
|
-
/**
|
|
55
|
-
* @name 唯一标识
|
|
56
|
-
* @type string
|
|
57
|
-
* @disabled true
|
|
58
|
-
*/
|
|
59
|
-
id: PropTypes.string.isRequired,
|
|
60
|
-
/**
|
|
61
|
-
* @name 按钮标题
|
|
62
|
-
* @type string
|
|
63
|
-
* @default 12:3:9
|
|
64
|
-
*/
|
|
65
|
-
title: PropTypes.string,
|
|
66
|
-
/**
|
|
67
|
-
* @name 按钮类型
|
|
68
|
-
* @type _ButtonType
|
|
69
|
-
* @default 'default'
|
|
70
|
-
*/
|
|
71
|
-
type: PropTypes.oneOf(['default', 'primary', 'dashed', 'danger']),
|
|
72
|
-
/**
|
|
73
|
-
* @name 按钮大小
|
|
74
|
-
* @type segmented
|
|
75
|
-
* @options [{ "label": "小", "value": "small"}, { "label": "中", "value": "middle" }, { "label": "大", "value": "large" }]
|
|
76
|
-
* @default 'default'
|
|
77
|
-
*/
|
|
78
|
-
size: PropTypes.oneOf(['small', 'default', 'large']),
|
|
79
|
-
/**
|
|
80
|
-
* @name 将按钮宽度调整为其父宽度的选项
|
|
81
|
-
* @type boolean
|
|
82
|
-
* @default false
|
|
83
|
-
*/
|
|
84
|
-
block: PropTypes.bool,
|
|
85
|
-
/**
|
|
86
|
-
* @name 资源串
|
|
87
|
-
* @type string
|
|
88
|
-
*/
|
|
89
|
-
serial: PropTypes.string,
|
|
90
|
-
/**
|
|
91
|
-
* @name 资源串效果
|
|
92
|
-
* @type segmented
|
|
93
|
-
* @options [{ "label": "隐藏", "value": "hidden" }, { "label": "禁用", "value": "disable"}]
|
|
94
|
-
* @default 'hidden'
|
|
95
|
-
*/
|
|
96
|
-
serialEffect: PropTypes.oneOf(['disabled', 'hidden']),
|
|
97
|
-
/**
|
|
98
|
-
* @name 幽灵按钮
|
|
99
|
-
* @type boolean
|
|
100
|
-
* @default false
|
|
101
|
-
*/
|
|
102
|
-
ghost: PropTypes.bool
|
|
103
|
-
};
|
|
104
|
-
LCButton.defaultProps = omitBadProps(defaultMeta);
|
|
105
37
|
export default LCButton;
|
|
File without changes
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["id", "children"
|
|
4
|
+
var _excluded = ["id", "children"];
|
|
5
5
|
import React, { useRef, useImperativeHandle } from 'react';
|
|
6
6
|
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
7
7
|
import { Modal } from 'luck-design/antd';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
+
import { useLDContext } from "../../../engine/provider/ContextProvider";
|
|
10
|
+
import { CELL_KEY, RUNTIME } from "../../../constants";
|
|
9
11
|
import Wrapper from "../Wrapper";
|
|
10
12
|
import styles from "./index.less";
|
|
11
13
|
var LCDialog = function LCDialog(_ref) {
|
|
12
14
|
var id = _ref.id,
|
|
13
15
|
children = _ref.children,
|
|
14
|
-
getContainer = _ref.getContainer,
|
|
15
|
-
wrapClassName = _ref.wrapClassName,
|
|
16
|
-
maskStyle = _ref.maskStyle,
|
|
17
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
17
|
var apiRef = useRef();
|
|
19
|
-
var
|
|
18
|
+
var context = useLDContext();
|
|
20
19
|
var _useBoolean = useBoolean(false),
|
|
21
20
|
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
22
21
|
open = _useBoolean2[0],
|
|
@@ -25,8 +24,7 @@ var LCDialog = function LCDialog(_ref) {
|
|
|
25
24
|
setFalse = _useBoolean2$.setFalse,
|
|
26
25
|
toggle = _useBoolean2$.toggle;
|
|
27
26
|
var getTargetDom = useMemoizedFn(function () {
|
|
28
|
-
|
|
29
|
-
return (_domRef$current = domRef.current) === null || _domRef$current === void 0 ? void 0 : _domRef$current.closest('.ant-modal-content');
|
|
27
|
+
return (context.runtime === RUNTIME.DESIGN ? context.componentMap.get(CELL_KEY.PAGE_ROOT).dom : document).getElementsByClassName('ant-modal-content')[0];
|
|
30
28
|
});
|
|
31
29
|
useImperativeHandle(apiRef, function () {
|
|
32
30
|
return {
|
|
@@ -42,18 +40,11 @@ var LCDialog = function LCDialog(_ref) {
|
|
|
42
40
|
api: apiRef
|
|
43
41
|
}, /*#__PURE__*/React.createElement(Modal, {
|
|
44
42
|
visible: open,
|
|
45
|
-
getContainer:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
width: 0,
|
|
52
|
-
margin: 0,
|
|
53
|
-
padding: 0,
|
|
54
|
-
visibility: 'hidden'
|
|
55
|
-
},
|
|
56
|
-
ref: domRef
|
|
57
|
-
}), children));
|
|
43
|
+
getContainer: context.runtime !== RUNTIME.DESIGN,
|
|
44
|
+
wrapClassName: classNames(styles['lc-component-modal-wrapper'], _defineProperty({}, styles['runtime-design'], context.runtime === RUNTIME.DESIGN)),
|
|
45
|
+
maskStyle: {
|
|
46
|
+
position: context.runtime !== RUNTIME.DESIGN ? 'fixed' : 'absolute'
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", null, "LCDialog-", id), children));
|
|
58
49
|
};
|
|
59
50
|
export default LCDialog;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["id", "children"
|
|
3
|
+
var _excluded = ["id", "children"];
|
|
5
4
|
import React, { useRef, useImperativeHandle } from 'react';
|
|
6
5
|
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
7
6
|
import { Drawer } from 'luck-design/antd';
|
|
8
|
-
import
|
|
7
|
+
import { useLDContext } from "../../../engine/provider/ContextProvider";
|
|
8
|
+
import { CELL_KEY, RUNTIME } from "../../../constants";
|
|
9
9
|
import Wrapper from "../Wrapper";
|
|
10
|
-
import styles from "./index.less";
|
|
11
10
|
var LCDrawer = function LCDrawer(_ref) {
|
|
12
11
|
var id = _ref.id,
|
|
13
12
|
children = _ref.children,
|
|
14
|
-
className = _ref.className,
|
|
15
|
-
getContainer = _ref.getContainer,
|
|
16
|
-
style = _ref.style,
|
|
17
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
14
|
var apiRef = useRef();
|
|
19
|
-
var
|
|
15
|
+
var context = useLDContext();
|
|
20
16
|
var _useBoolean = useBoolean(false),
|
|
21
17
|
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
22
18
|
open = _useBoolean2[0],
|
|
@@ -25,30 +21,13 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
25
21
|
setFalse = _useBoolean2$.setFalse,
|
|
26
22
|
toggle = _useBoolean2$.toggle;
|
|
27
23
|
var getTargetDom = useMemoizedFn(function () {
|
|
28
|
-
|
|
29
|
-
return (_domRef$current = domRef.current) === null || _domRef$current === void 0 ? void 0 : _domRef$current.closest('.ant-drawer-content-wrapper');
|
|
24
|
+
return (context.runtime === RUNTIME.DESIGN ? context.componentMap.get(CELL_KEY.PAGE_ROOT).dom : document).getElementsByClassName('ant-drawer-content-wrapper')[0];
|
|
30
25
|
});
|
|
31
26
|
useImperativeHandle(apiRef, function () {
|
|
32
27
|
return {
|
|
33
|
-
/**
|
|
34
|
-
* 是否打开
|
|
35
|
-
* @property
|
|
36
|
-
*/
|
|
37
28
|
open: open,
|
|
38
|
-
/**
|
|
39
|
-
* 打开弹窗
|
|
40
|
-
* @method
|
|
41
|
-
*/
|
|
42
29
|
doOpen: setTrue,
|
|
43
|
-
/**
|
|
44
|
-
* 关闭弹窗
|
|
45
|
-
* @method
|
|
46
|
-
*/
|
|
47
30
|
doClose: setFalse,
|
|
48
|
-
/**
|
|
49
|
-
* @method
|
|
50
|
-
* 切换弹窗
|
|
51
|
-
*/
|
|
52
31
|
toggle: toggle
|
|
53
32
|
};
|
|
54
33
|
});
|
|
@@ -58,18 +37,10 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
58
37
|
api: apiRef
|
|
59
38
|
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
60
39
|
visible: open,
|
|
61
|
-
getContainer:
|
|
62
|
-
style: style,
|
|
63
|
-
className: classNames(styles['lc-component-drawer'], _defineProperty({}, className, !!className))
|
|
64
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
getContainer: context.runtime !== RUNTIME.DESIGN,
|
|
65
41
|
style: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
padding: 0,
|
|
70
|
-
visibility: 'hidden'
|
|
71
|
-
},
|
|
72
|
-
ref: domRef
|
|
73
|
-
}), /*#__PURE__*/React.createElement("div", null, "LCDrawer-", id), children));
|
|
42
|
+
position: context.runtime === RUNTIME.DESIGN ? 'absolute' : 'fixed'
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", null, "LCDrawer-", id), children));
|
|
74
45
|
};
|
|
75
46
|
export default LCDrawer;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|