@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
|
@@ -7,16 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
12
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _ahooks = require("ahooks");
|
|
16
14
|
var _antd = require("luck-design/antd");
|
|
17
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
18
15
|
var _ruleInput = _interopRequireDefault(require("../style/rule-input.less"));
|
|
19
|
-
var _excluded = ["onValueChange", "rules", "value"
|
|
16
|
+
var _excluded = ["onValueChange", "rules", "value"];
|
|
20
17
|
/**
|
|
21
18
|
* 带校验功能的输入组件。
|
|
22
19
|
*
|
|
@@ -52,9 +49,8 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
52
49
|
var onValueChange = _ref.onValueChange,
|
|
53
50
|
rules = _ref.rules,
|
|
54
51
|
value = _ref.value,
|
|
55
|
-
defaultValue = _ref.defaultValue,
|
|
56
52
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
|
-
var _useState = (0, _react.useState)(value
|
|
53
|
+
var _useState = (0, _react.useState)(value),
|
|
58
54
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
55
|
inputValue = _useState2[0],
|
|
60
56
|
setInputValue = _useState2[1]; // 托管输入值的状态
|
|
@@ -64,7 +60,7 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
64
60
|
setErr = _useState4[1];
|
|
65
61
|
|
|
66
62
|
// 使用useEffect钩子监听value的变化
|
|
67
|
-
(0,
|
|
63
|
+
(0, _react.useEffect)(function () {
|
|
68
64
|
setInputValue(value);
|
|
69
65
|
setErr(null);
|
|
70
66
|
}, [value]);
|
|
@@ -96,14 +92,16 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
96
92
|
onValueChange(e, value);
|
|
97
93
|
} else {
|
|
98
94
|
setErr(error);
|
|
99
|
-
console.
|
|
95
|
+
console.log('err', error);
|
|
100
96
|
}
|
|
101
97
|
};
|
|
98
|
+
var className = _ruleInput.default['lc-painter-components-ruleinput'];
|
|
99
|
+
if (err) className += ' ' + _ruleInput.default['err'];
|
|
102
100
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
103
101
|
title: err,
|
|
104
102
|
visible: err
|
|
105
103
|
}, /*#__PURE__*/_react.default.createElement(_antd.Input, (0, _extends2.default)({
|
|
106
|
-
className:
|
|
104
|
+
className: className,
|
|
107
105
|
size: "small",
|
|
108
106
|
value: inputValue // 绑定输入值
|
|
109
107
|
,
|
|
@@ -1,13 +1,12 @@
|
|
|
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 = void 0;
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _EventBusProvider = _interopRequireDefault(require("../engine/provider/EventBusProvider"));
|
|
13
12
|
var _ContextProvider = _interopRequireDefault(require("../engine/provider/ContextProvider"));
|
|
@@ -16,42 +15,11 @@ var _Design = _interopRequireDefault(require("./Design"));
|
|
|
16
15
|
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
17
16
|
var _index = require("../constants/index");
|
|
18
17
|
var _index2 = _interopRequireDefault(require("./style/index.less"));
|
|
19
|
-
// import { history } from 'umi';
|
|
20
|
-
// import { formatMessage } from '@luck-design-biz/base/utils';
|
|
21
|
-
|
|
22
18
|
var Painter = function Painter(_ref) {
|
|
23
|
-
var className = _ref.className
|
|
24
|
-
code = _ref.code;
|
|
25
|
-
// 修改后刷新提示功能,暂时关掉,等待提供数据对比进行判断
|
|
26
|
-
// useEffect(() => {
|
|
27
|
-
// const handleBeforeUnload = (event) => {
|
|
28
|
-
// event.preventDefault();
|
|
29
|
-
// event.returnValue = null;
|
|
30
|
-
// return null;
|
|
31
|
-
// };
|
|
32
|
-
|
|
33
|
-
// window.addEventListener('beforeunload', handleBeforeUnload);
|
|
34
|
-
|
|
35
|
-
// const unblock = history.block(() =>
|
|
36
|
-
// confirm(`${formatMessage({
|
|
37
|
-
// id: 'app.base.operate.comfire.reload', label: '重新加载此网站?'
|
|
38
|
-
// })}\n${formatMessage({
|
|
39
|
-
// id: 'app.base.operate.comfire.message.reload', label: '系统可能不会保存您所做的更改。'
|
|
40
|
-
// })}`)
|
|
41
|
-
// );
|
|
42
|
-
|
|
43
|
-
// return () => {
|
|
44
|
-
// unblock();
|
|
45
|
-
// window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
46
|
-
// };
|
|
47
|
-
// }, []);
|
|
48
|
-
|
|
19
|
+
var className = _ref.className;
|
|
49
20
|
return /*#__PURE__*/_react.default.createElement(_EventBusProvider.default, {
|
|
50
21
|
runtime: _index.RUNTIME.DESIGN
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_ContextProvider.default, {
|
|
52
|
-
code: code
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
-
id: "lc-design-workspace",
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_ContextProvider.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
23
|
className: (0, _classnames.default)(_index2.default['lc-painter'], (0, _defineProperty2.default)({}, className, !!className))
|
|
56
24
|
}, /*#__PURE__*/_react.default.createElement(_Ribbon.default, null), /*#__PURE__*/_react.default.createElement(_Design.default, null), /*#__PURE__*/_react.default.createElement(_Panel.default, null))));
|
|
57
25
|
};
|
|
@@ -8,54 +8,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _ahooks = require("ahooks");
|
|
12
11
|
var _layoutRatio = _interopRequireDefault(require("../style/layout-ratio.less"));
|
|
13
12
|
var _utils = require("@luck-design-biz/base/utils");
|
|
14
13
|
var _RuleInput = _interopRequireDefault(require("../components/RuleInput"));
|
|
15
14
|
var _PanelItem = _interopRequireDefault(require("../components/PanelItem"));
|
|
16
|
-
var
|
|
17
|
-
var
|
|
15
|
+
var ratios = ['12', '6:6', '3:9', '9:3', '4:4:4', '3:6:3', '3:3:3:3', '2:2:2:2:2:2'];
|
|
16
|
+
var defaultRatio = '12';
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @component
|
|
27
|
-
* @example
|
|
28
|
-
* ```jsxsdsdsdsdsdsdsd
|
|
29
|
-
* <LayoutRatio
|
|
30
|
-
* value="6:6"
|
|
31
|
-
* onChange={(option) => console.log(option)}
|
|
32
|
-
* />
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @param {Object} props
|
|
36
|
-
* @param {string} [props.value='12'] 初始化时选中的布局比例,默认为"12"。
|
|
37
|
-
* @param {Function} props.onChange 当用户选择一个新的布局比例时调用的回调函数。
|
|
38
|
-
*
|
|
39
|
-
* @returns {React.Element} 渲染的React元素。
|
|
19
|
+
* 布局比例组件
|
|
20
|
+
*
|
|
21
|
+
* @param {string} value 默认值
|
|
22
|
+
* @param {Function} onChange 当合法数据变化时触发
|
|
23
|
+
* @returns
|
|
40
24
|
*/
|
|
41
|
-
var LayoutRatio = function
|
|
42
|
-
var
|
|
25
|
+
var LayoutRatio = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
26
|
+
var value = _ref.value,
|
|
43
27
|
onChange = _ref.onChange;
|
|
44
|
-
var _useState = (0, _react.useState)(
|
|
28
|
+
var _useState = (0, _react.useState)(value || defaultRatio),
|
|
45
29
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
30
|
currentRatio = _useState2[0],
|
|
47
31
|
setCurrentRatio = _useState2[1];
|
|
48
32
|
var handleInputChange = function handleInputChange(_, value) {
|
|
49
|
-
|
|
50
|
-
|
|
33
|
+
console.log('value', value);
|
|
34
|
+
if (!value) value = defaultRatio;
|
|
51
35
|
setCurrentRatio(value);
|
|
52
|
-
onChange === null || onChange === void 0 || onChange(value);
|
|
53
36
|
};
|
|
54
37
|
var handGridClick = function handGridClick(selectedRadio) {
|
|
55
38
|
// console.log('selectedRadio', selectedRadio);
|
|
56
39
|
setCurrentRatio(selectedRadio);
|
|
57
|
-
|
|
40
|
+
if (onChange) onChange(selectedRadio);
|
|
58
41
|
};
|
|
42
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
43
|
+
return {
|
|
44
|
+
getValue: function getValue() {
|
|
45
|
+
return currentRatio;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|
|
59
49
|
|
|
60
50
|
// 定义验证规则
|
|
61
51
|
var rules = [{
|
|
@@ -64,41 +54,44 @@ var LayoutRatio = function LayoutRatio(_ref) {
|
|
|
64
54
|
if (typeof value !== 'string') return false;
|
|
65
55
|
|
|
66
56
|
// 使用正则表达式检查字符串是否只包含数字和冒号,并且不以冒号开始或结束
|
|
67
|
-
|
|
57
|
+
if (!/^[0-9]+(:[0-9]+)*$/.test(value)) return false;
|
|
58
|
+
|
|
59
|
+
// 使用冒号分割字符串,并将分割后的每个元素转换为数字
|
|
60
|
+
var numbers = value.split(':').map(Number);
|
|
61
|
+
|
|
62
|
+
// 计算所有数字的总和
|
|
63
|
+
var sum = numbers.reduce(function (acc, cur) {
|
|
64
|
+
return acc + cur;
|
|
65
|
+
}, 0);
|
|
66
|
+
|
|
67
|
+
// 判断总和是否等于12
|
|
68
|
+
return sum === 12;
|
|
68
69
|
},
|
|
69
70
|
err: (0, _utils.formatMessage)({
|
|
70
71
|
id: 'luckda.lowcode.painter.panel-section.Layoutratio.err',
|
|
71
72
|
label: '必须是数字或者数字加:号的组合,且数字之和必须等于12'
|
|
72
73
|
})
|
|
73
74
|
}];
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
isCurrentInRatios: _RATIOS_.includes(currentRatio),
|
|
77
|
-
currentItemRatios: currentRatio.split(':')
|
|
78
|
-
};
|
|
79
|
-
}, [currentRatio]),
|
|
80
|
-
isCurrentInRatios = _useCreation.isCurrentInRatios,
|
|
81
|
-
currentItemRatios = _useCreation.currentItemRatios;
|
|
75
|
+
var isCurrentInRatios = ratios.includes(currentRatio);
|
|
76
|
+
var currentItemRatios = currentRatio.split(':');
|
|
82
77
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
83
78
|
className: _layoutRatio.default['lc-painter-panel-section-layoutratio']
|
|
84
79
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
80
|
className: _layoutRatio.default['ratio-view']
|
|
86
81
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
87
82
|
className: _layoutRatio.default['gridbox-container']
|
|
88
|
-
},
|
|
83
|
+
}, ratios.map(function (ratio) {
|
|
89
84
|
var itemRatios = ratio.split(':');
|
|
90
85
|
var isCurrent = ratio == currentRatio;
|
|
91
86
|
var className = _layoutRatio.default['gridbox'];
|
|
92
87
|
if (isCurrent) className = className + ' ' + _layoutRatio.default['current'];
|
|
93
88
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
-
key: "grid-".concat(i),
|
|
95
89
|
className: className,
|
|
96
90
|
onClick: function onClick() {
|
|
97
91
|
return handGridClick(ratio);
|
|
98
92
|
}
|
|
99
|
-
}, itemRatios.map(function (itemRatio
|
|
93
|
+
}, itemRatios.map(function (itemRatio) {
|
|
100
94
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
key: "gridItem-".concat(j),
|
|
102
95
|
className: _layoutRatio.default['girditem'],
|
|
103
96
|
style: {
|
|
104
97
|
gridColumn: 'span ' + itemRatio
|
|
@@ -110,9 +103,8 @@ var LayoutRatio = function LayoutRatio(_ref) {
|
|
|
110
103
|
onClick: function onClick() {
|
|
111
104
|
return handGridClick(ratio);
|
|
112
105
|
}
|
|
113
|
-
}, currentItemRatios.map(function (itemRatio
|
|
106
|
+
}, currentItemRatios.map(function (itemRatio) {
|
|
114
107
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
-
key: "itemRatio-".concat(index),
|
|
116
108
|
className: _layoutRatio.default['girditem'],
|
|
117
109
|
style: {
|
|
118
110
|
gridColumn: 'span ' + itemRatio
|
|
@@ -125,15 +117,15 @@ var LayoutRatio = function LayoutRatio(_ref) {
|
|
|
125
117
|
id: 'luckda.lowcode.painter.panel-section.Layoutratio.label',
|
|
126
118
|
label: '列比例'
|
|
127
119
|
}),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})))
|
|
138
|
-
};
|
|
120
|
+
component: /*#__PURE__*/_react.default.createElement(_RuleInput.default, {
|
|
121
|
+
placeholder: (0, _utils.formatMessage)({
|
|
122
|
+
id: 'luckda.lowcode.painter.panel-section.Layoutratio.placeholder',
|
|
123
|
+
label: '请输入列比例'
|
|
124
|
+
}),
|
|
125
|
+
rules: rules,
|
|
126
|
+
onValueChange: handleInputChange,
|
|
127
|
+
value: currentRatio
|
|
128
|
+
})
|
|
129
|
+
})));
|
|
130
|
+
});
|
|
139
131
|
var _default = exports.default = LayoutRatio;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _radio = _interopRequireDefault(require("../style/radio.less"));
|
|
12
|
+
/**
|
|
13
|
+
* Radio组件允许用户从一组选项中选择一个。它接收一个`options`数组来渲染选项,以及一个可选的`onChange`回调函数,
|
|
14
|
+
* 当用户选择不同的选项时,`onChange`会被调用并传递当前选中的选项对象。
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @example
|
|
18
|
+
* const options = [
|
|
19
|
+
* { label: '小', value: 'small' },
|
|
20
|
+
* { label: '中', value: 'middle' },
|
|
21
|
+
* { label: '大', value: 'large' }
|
|
22
|
+
* ];
|
|
23
|
+
*
|
|
24
|
+
* function handleChange(option) {
|
|
25
|
+
* console.log(option);
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* <Radio options={options} onChange={handleChange} />
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} props - 组件的props。
|
|
31
|
+
* @param {Object[]} props.options - 选项数组,每个对象都应包含`label`和`value`。
|
|
32
|
+
* @param {string} props.options[].label - 选项的显示文本。
|
|
33
|
+
* @param {string} props.options[].value - 选项的值,应唯一。
|
|
34
|
+
* @param {Function} [props.onChange] - 可选,当选项变化时调用的回调函数。传递当前选中的选项对象。
|
|
35
|
+
*/
|
|
36
|
+
var Radio = function Radio(_ref) {
|
|
37
|
+
var _options$;
|
|
38
|
+
var options = _ref.options,
|
|
39
|
+
onChange = _ref.onChange;
|
|
40
|
+
var _useState = (0, _react.useState)((_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value),
|
|
41
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
|
+
activeValue = _useState2[0],
|
|
43
|
+
setActiveValue = _useState2[1];
|
|
44
|
+
|
|
45
|
+
// 点击事件处理函数
|
|
46
|
+
var handleClick = function handleClick(option) {
|
|
47
|
+
// 设置当前激活的选项
|
|
48
|
+
setActiveValue(option.value);
|
|
49
|
+
if (onChange) {
|
|
50
|
+
onChange(option);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: _radio.default['lc-painter-panel-section-radio']
|
|
55
|
+
}, options.map(function (option) {
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
key: option.value,
|
|
58
|
+
className: "".concat(_radio.default['radio-item'], " ").concat(activeValue === option.value ? 'active' : ''),
|
|
59
|
+
onClick: function onClick() {
|
|
60
|
+
return handleClick(option);
|
|
61
|
+
}
|
|
62
|
+
}, option.label);
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
var _default = exports.default = Radio;
|
|
File without changes
|
|
@@ -4,22 +4,11 @@
|
|
|
4
4
|
height: 0;
|
|
5
5
|
top: 0;
|
|
6
6
|
left: 0;
|
|
7
|
+
display: none;
|
|
7
8
|
pointer-events: none;
|
|
8
9
|
cursor: pointer;
|
|
9
10
|
overflow: visible;
|
|
10
|
-
z-index:
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.selector-item {
|
|
14
|
-
height: 20px;
|
|
15
|
-
background-color: var(--ant-primary-color);
|
|
16
|
-
color: #fff;
|
|
17
|
-
font-size: 16px;
|
|
18
|
-
line-height: 20px;
|
|
19
|
-
min-width: 20px;
|
|
20
|
-
text-align: center;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
border-radius: 3px;
|
|
11
|
+
z-index: 9999;
|
|
23
12
|
}
|
|
24
13
|
|
|
25
14
|
.lc-painter-design {
|
|
@@ -28,122 +17,22 @@
|
|
|
28
17
|
height: 100%;
|
|
29
18
|
overflow: auto;
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 40px;
|
|
34
|
-
padding: 8px 16px;
|
|
35
|
-
border-bottom: 1px solid #e3e3e3;
|
|
36
|
-
background-color: white;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: flex-end;
|
|
40
|
-
|
|
41
|
-
.i18n-selecter {
|
|
42
|
-
width: 125px;
|
|
43
|
-
padding: 0 8px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.toolbar-item {
|
|
47
|
-
display: inline-block;
|
|
48
|
-
width: 32px;
|
|
49
|
-
height: 32px;
|
|
50
|
-
border-radius: 3px;
|
|
51
|
-
padding: 6px;
|
|
52
|
-
margin: 0 2px;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
text-align: center;
|
|
55
|
-
color: #8c8c8c;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.toolbar-item:hover {
|
|
59
|
-
color: #262626;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.toolbar-item.actived {
|
|
63
|
-
color: #8c8c8c;
|
|
64
|
-
background: #f1f2f3;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&-workspace {
|
|
69
|
-
width: calc(100% - 16px);
|
|
70
|
-
height: calc(100% - 48px);
|
|
71
|
-
position: relative;
|
|
72
|
-
margin: 8px 8px 0 8px;
|
|
73
|
-
background-color: transparent;
|
|
74
|
-
overflow-x: hidden;
|
|
75
|
-
overflow-y: auto;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&-simulator {
|
|
79
|
-
min-height: 100%;
|
|
80
|
-
height: auto;
|
|
81
|
-
display: grid;
|
|
20
|
+
.simulator {
|
|
82
21
|
:global {
|
|
83
22
|
.ant-form-item {
|
|
84
23
|
pointer-events: none;
|
|
85
24
|
}
|
|
86
|
-
.luck-grid-table {
|
|
87
|
-
.topLayout,
|
|
88
|
-
.gridTableBody {
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
25
|
}
|
|
93
26
|
}
|
|
94
27
|
|
|
95
|
-
|
|
28
|
+
.detector {
|
|
96
29
|
border: 1px dashed var(--ant-primary-color);
|
|
97
30
|
background-color: color-mix(in sRGB, var(--ant-primary-color), transparent 95%);
|
|
98
31
|
.box();
|
|
99
|
-
|
|
100
|
-
&-name{
|
|
101
|
-
position: absolute;
|
|
102
|
-
color: var(--ant-primary-color);
|
|
103
|
-
font-size: 12px;
|
|
104
|
-
line-height: 20px;
|
|
105
|
-
}
|
|
106
32
|
}
|
|
107
33
|
|
|
108
|
-
|
|
34
|
+
.selector {
|
|
109
35
|
border: 2px solid var(--ant-primary-6);
|
|
110
36
|
.box();
|
|
111
|
-
|
|
112
|
-
.lc-borders-actions {
|
|
113
|
-
position: absolute;
|
|
114
|
-
right: -2px;
|
|
115
|
-
pointer-events: all;
|
|
116
|
-
cursor: default;
|
|
117
|
-
display: flex;
|
|
118
|
-
|
|
119
|
-
& > div {
|
|
120
|
-
.selector-item();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:local {
|
|
124
|
-
.instance-node-selector {
|
|
125
|
-
padding: 0 6px;
|
|
126
|
-
margin-right: 3px;
|
|
127
|
-
font-size: 12px !important;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.next-overlay-wrapper {
|
|
135
|
-
z-index: 3000;
|
|
136
|
-
display: flex;
|
|
137
|
-
flex-direction: column;
|
|
138
|
-
& > div > span {
|
|
139
|
-
.selector-item();
|
|
140
|
-
|
|
141
|
-
display: inline-block;
|
|
142
|
-
font-size: 12px;
|
|
143
|
-
padding: 0 6px;
|
|
144
|
-
background-color: #78869a;
|
|
145
|
-
&:not(:last-child) {
|
|
146
|
-
margin-bottom: 3px;
|
|
147
|
-
}
|
|
148
37
|
}
|
|
149
38
|
}
|
|
@@ -1,54 +1,21 @@
|
|
|
1
1
|
.lc-painter-components-panelitem {
|
|
2
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
gap: 20px;
|
|
5
|
+
align-items: center;
|
|
6
|
+
min-height: 28px;
|
|
3
7
|
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
.item-label {
|
|
9
|
+
font-size: 12px;
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
.
|
|
12
|
+
.item-component {
|
|
9
13
|
display: flex;
|
|
10
|
-
|
|
11
|
-
align-items: center;
|
|
12
|
-
min-height: 28px;
|
|
13
|
-
|
|
14
|
-
.item-label {
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
width: 80px;
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: flex-start;
|
|
19
|
-
align-items: center;
|
|
20
|
-
gap: 4px;
|
|
21
|
-
user-select: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.item-component {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex: 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.item-icon {
|
|
30
|
-
font-size: 8px;
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* 使.item-component-box的直接子元素铺满 */
|
|
35
|
-
.item-component > *:not(.ant-switch) {
|
|
36
|
-
flex-grow: 1;
|
|
37
|
-
}
|
|
38
|
-
.panel-pointer {
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
}
|
|
14
|
+
width: 215px;
|
|
41
15
|
}
|
|
42
16
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
margin-bottom: 6px;
|
|
47
|
-
margin-top: 6px;
|
|
48
|
-
padding: 4px 8px;
|
|
49
|
-
border-radius: 6px;
|
|
17
|
+
/* 使.item-component-box的直接子元素铺满 */
|
|
18
|
+
.item-component > * {
|
|
19
|
+
flex-grow: 1;
|
|
50
20
|
}
|
|
51
21
|
}
|
|
52
|
-
.lc-painter-components-panelitem.no-padding {
|
|
53
|
-
padding: 0;
|
|
54
|
-
}
|