@luck-design-biz/luckda 0.0.24-1 → 0.0.24-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/es/components/Builder/index.js +6 -4
- package/es/components/LdAutoForm/index.js +0 -0
- 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 +0 -0
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +12 -3
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +0 -0
- 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 +0 -0
- package/es/components/LdTree/index.less +0 -0
- package/es/helper/FromItems.js +0 -0
- package/es/helper/action.js +0 -0
- package/es/helper/form.js +0 -0
- package/es/helper/index.less +0 -0
- package/es/helper/ldBuilder.js +0 -0
- package/es/helper/ldComBuild.js +0 -0
- package/es/index.js +0 -0
- package/es/lowcode/constants/api-url.js +291 -1
- package/es/lowcode/constants/event-topics.js +4 -4
- package/es/lowcode/constants/index.js +0 -0
- package/es/lowcode/engine/factory/DataFactory.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +12 -11
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +0 -0
- package/es/lowcode/engine/meta/box.props.json +0 -0
- package/es/lowcode/engine/meta/button.props.default.json +0 -0
- package/es/lowcode/engine/meta/button.props.json +7 -2
- package/es/lowcode/engine/meta/cardlist.props.default.json +0 -0
- package/es/lowcode/engine/meta/cardlist.props.json +0 -0
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/dialog.props.default.json +0 -0
- package/es/lowcode/engine/meta/dialog.props.json +0 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +0 -0
- package/es/lowcode/engine/meta/drawer.props.json +0 -0
- package/es/lowcode/engine/meta/form.props.default.json +0 -0
- package/es/lowcode/engine/meta/form.props.json +0 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +0 -0
- package/es/lowcode/engine/meta/iframe.props.json +0 -0
- package/es/lowcode/engine/meta/image.props.default.json +0 -0
- package/es/lowcode/engine/meta/image.props.json +0 -0
- package/es/lowcode/engine/meta/imex.props.default.json +0 -0
- package/es/lowcode/engine/meta/imex.props.json +0 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
- package/es/lowcode/engine/meta/jsx.props.default.json +0 -0
- package/es/lowcode/engine/meta/jsx.props.json +0 -0
- package/es/lowcode/engine/meta/layout.props.default.json +0 -0
- package/es/lowcode/engine/meta/layout.props.json +0 -0
- package/es/lowcode/engine/meta/link.props.default.json +0 -0
- package/es/lowcode/engine/meta/link.props.json +0 -0
- package/es/lowcode/engine/meta/section.props.default.json +0 -0
- package/es/lowcode/engine/meta/section.props.json +0 -0
- package/es/lowcode/engine/meta/split.props.default.json +0 -0
- package/es/lowcode/engine/meta/split.props.json +0 -0
- package/es/lowcode/engine/meta/table.props.default.json +20 -2
- package/es/lowcode/engine/meta/table.props.json +99 -37
- package/es/lowcode/engine/meta/tabs.props.default.json +0 -0
- package/es/lowcode/engine/meta/tabs.props.json +0 -0
- package/es/lowcode/engine/meta/text.props.default.json +0 -0
- package/es/lowcode/engine/meta/text.props.json +0 -0
- package/es/lowcode/engine/meta/tree.props.default.json +0 -0
- package/es/lowcode/engine/meta/tree.props.json +0 -0
- package/es/lowcode/engine/provider/ContextProvider.js +40 -28
- package/es/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/es/lowcode/engine/tools/dataProcess.js +5 -3
- package/es/lowcode/engine/tools/helper.js +68 -0
- package/es/lowcode/engine/tools/usePromiseState.js +0 -0
- package/es/lowcode/index.js +3 -1
- package/es/lowcode/painter/Components.js +0 -0
- package/es/lowcode/painter/Design.js +27 -304
- package/es/lowcode/painter/DesignOperator.js +271 -0
- package/es/lowcode/painter/DesignToolbar.js +91 -0
- package/es/lowcode/painter/I18n.js +0 -0
- package/es/lowcode/painter/Outline.js +31 -27
- package/es/lowcode/painter/Panel.js +71 -33
- package/es/lowcode/painter/Ribbon.js +0 -0
- package/es/lowcode/painter/components/Collapse.js +67 -8
- package/es/lowcode/painter/components/ColorInput.js +125 -0
- package/es/lowcode/painter/components/{TabEditor.js → ListEditor.js} +17 -16
- package/es/lowcode/painter/components/NumberInput.js +72 -17
- package/es/lowcode/painter/components/PanelItem.js +40 -11
- package/es/lowcode/painter/components/PopConfirm.js +4 -1
- package/es/lowcode/painter/components/PopForm.js +0 -0
- package/es/lowcode/painter/components/RuleInput.js +5 -3
- package/es/lowcode/painter/components/SortBox.js +0 -0
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +147 -0
- package/es/lowcode/painter/components/actions-editor/index.js +170 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +42 -64
- package/es/lowcode/painter/components/code-editor/CssEditor.js +27 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +37 -14
- package/es/lowcode/painter/components/code-editor/JSEditor.js +22 -0
- package/es/lowcode/painter/components/code-editor/index.js +0 -0
- package/es/lowcode/painter/index.js +6 -2
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +61 -0
- package/es/lowcode/painter/panel-section/Icon.js +0 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +0 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +2 -1
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +42 -10
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +55 -8
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +23 -20
- package/es/lowcode/painter/panel-section/StylePanel/index.js +17 -0
- package/es/lowcode/painter/panel-section/TabItems.js +7 -37
- package/es/lowcode/painter/panel-section/TableActions.js +19 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +14 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +0 -0
- package/es/lowcode/painter/style/actions-editor.less +16 -0
- package/es/lowcode/painter/style/border-editor.less +36 -0
- package/es/lowcode/painter/style/border-radius-selector.less +43 -0
- package/es/lowcode/painter/style/border-selector.less +40 -0
- package/es/lowcode/painter/style/button-type.less +0 -0
- package/es/lowcode/painter/style/collapse.less +2 -1
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/components.less +0 -0
- package/es/lowcode/painter/style/design.less +7 -0
- package/es/lowcode/painter/style/display.less +0 -0
- package/es/lowcode/painter/style/font-editor.less +9 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +0 -0
- package/es/lowcode/painter/style/icon-selector.less +0 -0
- package/es/lowcode/painter/style/icon.less +0 -0
- package/es/lowcode/painter/style/index.less +0 -0
- package/es/lowcode/painter/style/layout-ratio.less +0 -0
- package/{lib/lowcode/painter/style/tabeditor.less → es/lowcode/painter/style/list-editor.less} +9 -40
- package/es/lowcode/painter/style/number-input.less +0 -0
- package/es/lowcode/painter/style/outline.less +0 -0
- package/es/lowcode/painter/style/panel-item.less +11 -1
- package/es/lowcode/painter/style/panel.less +3 -16
- package/es/lowcode/painter/style/pop-confirm.less +0 -0
- package/es/lowcode/painter/style/pop-form.less +0 -0
- package/es/lowcode/painter/style/radio.less +0 -0
- package/es/lowcode/painter/style/ribbon.less +0 -0
- package/es/lowcode/painter/style/rule-input.less +0 -0
- package/es/lowcode/painter/style/style-panel.less +32 -0
- package/es/lowcode/painter/style/tabitems.less +0 -0
- package/es/lowcode/view/Canvas.js +16 -15
- package/es/lowcode/view/Loading.js +0 -0
- package/es/lowcode/view/Page.js +10 -225
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Box/index.js +2 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -0
- package/es/lowcode/view/lc-components/Box/meta.json +0 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Button/index.js +10 -7
- package/es/lowcode/view/lc-components/Button/meta.json +7 -2
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/CardList/index.js +0 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +0 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +48 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +21 -23
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +13 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +19 -22
- package/es/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Form/index.js +0 -0
- package/es/lowcode/view/lc-components/Form/meta.json +0 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +0 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Image/index.js +0 -0
- package/es/lowcode/view/lc-components/Image/meta.json +0 -0
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/JSX/index.js +0 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +0 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.js +0 -0
- package/es/lowcode/view/lc-components/Layout/index.less +0 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Link/index.js +0 -0
- package/es/lowcode/view/lc-components/Link/meta.json +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Section/index.js +0 -0
- package/es/lowcode/view/lc-components/Section/meta.json +0 -0
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Split/index.js +0 -0
- package/es/lowcode/view/lc-components/Split/meta.json +0 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Table/index.js +222 -132
- package/es/lowcode/view/lc-components/Table/meta.json +88 -37
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -0
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Text/index.js +0 -0
- package/es/lowcode/view/lc-components/Text/meta.json +0 -0
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Tree/index.js +0 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +0 -0
- package/es/lowcode/view/lc-components/Wrapper.js +0 -0
- 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 +0 -0
- package/es/services.js +0 -0
- package/es/upload/Form/gridForm.js +0 -0
- package/es/upload/Form/index.js +0 -0
- package/es/upload/Form/index.less +0 -0
- package/es/upload/FormItem/index.js +0 -0
- 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 +0 -0
- package/es/utils/grid.js +0 -0
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +5 -3
- package/lib/components/LdAutoForm/index.js +0 -0
- 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 +0 -0
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +12 -3
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +0 -0
- 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 +0 -0
- package/lib/components/LdTree/index.less +0 -0
- package/lib/helper/FromItems.js +0 -0
- package/lib/helper/action.js +0 -0
- package/lib/helper/form.js +0 -0
- package/lib/helper/index.less +0 -0
- package/lib/helper/ldBuilder.js +0 -0
- package/lib/helper/ldComBuild.js +0 -0
- package/lib/index.js +0 -0
- package/lib/lowcode/constants/api-url.js +293 -2
- package/lib/lowcode/constants/event-topics.js +5 -5
- package/lib/lowcode/constants/index.js +0 -0
- package/lib/lowcode/engine/factory/DataFactory.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +11 -10
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +0 -0
- package/lib/lowcode/engine/meta/box.props.json +0 -0
- package/lib/lowcode/engine/meta/button.props.default.json +0 -0
- package/lib/lowcode/engine/meta/button.props.json +7 -2
- package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +0 -0
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/dialog.props.default.json +0 -0
- package/lib/lowcode/engine/meta/dialog.props.json +0 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +0 -0
- package/lib/lowcode/engine/meta/drawer.props.json +0 -0
- package/lib/lowcode/engine/meta/form.props.default.json +0 -0
- package/lib/lowcode/engine/meta/form.props.json +0 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +0 -0
- package/lib/lowcode/engine/meta/iframe.props.json +0 -0
- package/lib/lowcode/engine/meta/image.props.default.json +0 -0
- package/lib/lowcode/engine/meta/image.props.json +0 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +0 -0
- package/lib/lowcode/engine/meta/imex.props.json +0 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
- package/lib/lowcode/engine/meta/jsx.props.default.json +0 -0
- package/lib/lowcode/engine/meta/jsx.props.json +0 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +0 -0
- package/lib/lowcode/engine/meta/layout.props.json +0 -0
- package/lib/lowcode/engine/meta/link.props.default.json +0 -0
- package/lib/lowcode/engine/meta/link.props.json +0 -0
- package/lib/lowcode/engine/meta/section.props.default.json +0 -0
- package/lib/lowcode/engine/meta/section.props.json +0 -0
- package/lib/lowcode/engine/meta/split.props.default.json +0 -0
- package/lib/lowcode/engine/meta/split.props.json +0 -0
- package/lib/lowcode/engine/meta/table.props.default.json +20 -2
- package/lib/lowcode/engine/meta/table.props.json +99 -37
- package/lib/lowcode/engine/meta/tabs.props.default.json +0 -0
- package/lib/lowcode/engine/meta/tabs.props.json +0 -0
- package/lib/lowcode/engine/meta/text.props.default.json +0 -0
- package/lib/lowcode/engine/meta/text.props.json +0 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +0 -0
- package/lib/lowcode/engine/meta/tree.props.json +0 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +40 -28
- package/lib/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/lib/lowcode/engine/tools/dataProcess.js +5 -3
- package/lib/lowcode/engine/tools/helper.js +70 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +0 -0
- package/lib/lowcode/index.js +5 -1
- package/lib/lowcode/painter/Components.js +0 -0
- package/lib/lowcode/painter/Design.js +24 -300
- package/lib/lowcode/painter/DesignOperator.js +278 -0
- package/lib/lowcode/painter/DesignToolbar.js +99 -0
- package/lib/lowcode/painter/I18n.js +0 -0
- package/lib/lowcode/painter/Outline.js +31 -27
- package/lib/lowcode/painter/Panel.js +71 -33
- package/lib/lowcode/painter/Ribbon.js +0 -0
- package/lib/lowcode/painter/components/Collapse.js +65 -7
- package/lib/lowcode/painter/components/ColorInput.js +132 -0
- package/lib/lowcode/painter/components/{TabEditor.js → ListEditor.js} +19 -18
- package/lib/lowcode/painter/components/NumberInput.js +70 -16
- package/lib/lowcode/painter/components/PanelItem.js +40 -11
- package/lib/lowcode/painter/components/PopConfirm.js +4 -1
- package/lib/lowcode/painter/components/PopForm.js +0 -0
- package/lib/lowcode/painter/components/RuleInput.js +5 -3
- package/lib/lowcode/painter/components/SortBox.js +0 -0
- package/lib/lowcode/painter/components/actions-editor/ActionEditor.js +155 -0
- package/lib/lowcode/painter/components/actions-editor/index.js +178 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +40 -63
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +26 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +35 -13
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +22 -0
- package/lib/lowcode/painter/components/code-editor/index.js +0 -0
- package/lib/lowcode/painter/index.js +6 -2
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +69 -0
- package/lib/lowcode/painter/panel-section/Icon.js +0 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +0 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +2 -1
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +40 -9
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
- package/lib/lowcode/painter/panel-section/StylePanel/{Width.js → Size.js} +39 -35
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +55 -8
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +22 -19
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +16 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +7 -37
- package/lib/lowcode/painter/panel-section/TableActions.js +26 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +21 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +0 -0
- package/lib/lowcode/painter/style/actions-editor.less +16 -0
- package/lib/lowcode/painter/style/border-editor.less +36 -0
- package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
- package/lib/lowcode/painter/style/border-selector.less +40 -0
- package/lib/lowcode/painter/style/button-type.less +0 -0
- package/lib/lowcode/painter/style/collapse.less +2 -1
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/components.less +0 -0
- package/lib/lowcode/painter/style/design.less +7 -0
- package/lib/lowcode/painter/style/display.less +0 -0
- package/lib/lowcode/painter/style/font-editor.less +9 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +0 -0
- package/lib/lowcode/painter/style/icon-selector.less +0 -0
- package/lib/lowcode/painter/style/icon.less +0 -0
- package/lib/lowcode/painter/style/index.less +0 -0
- package/lib/lowcode/painter/style/layout-ratio.less +0 -0
- package/{es/lowcode/painter/style/tabeditor.less → lib/lowcode/painter/style/list-editor.less} +9 -40
- package/lib/lowcode/painter/style/number-input.less +0 -0
- package/lib/lowcode/painter/style/outline.less +0 -0
- package/lib/lowcode/painter/style/panel-item.less +11 -1
- package/lib/lowcode/painter/style/panel.less +3 -16
- package/lib/lowcode/painter/style/pop-confirm.less +0 -0
- package/lib/lowcode/painter/style/pop-form.less +0 -0
- package/lib/lowcode/painter/style/radio.less +0 -0
- package/lib/lowcode/painter/style/ribbon.less +0 -0
- package/lib/lowcode/painter/style/rule-input.less +0 -0
- package/lib/lowcode/painter/style/style-panel.less +32 -0
- package/lib/lowcode/painter/style/tabitems.less +0 -0
- package/lib/lowcode/view/Canvas.js +16 -15
- package/lib/lowcode/view/Loading.js +0 -0
- package/lib/lowcode/view/Page.js +9 -224
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Box/index.js +2 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Button/index.js +10 -7
- package/lib/lowcode/view/lc-components/Button/meta.json +7 -2
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +49 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +20 -22
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +13 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +18 -21
- package/lib/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Form/index.js +0 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +0 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Image/index.js +0 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +0 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +0 -0
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Link/index.js +0 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Section/index.js +0 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Split/index.js +0 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Table/index.js +221 -131
- package/lib/lowcode/view/lc-components/Table/meta.json +88 -37
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Text/index.js +0 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +0 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +0 -0
- 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 +0 -0
- package/lib/services.js +0 -0
- package/lib/upload/Form/gridForm.js +0 -0
- package/lib/upload/Form/index.js +0 -0
- package/lib/upload/Form/index.less +0 -0
- package/lib/upload/FormItem/index.js +0 -0
- 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 +0 -0
- package/lib/utils/grid.js +0 -0
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +7 -5
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
|
@@ -5,17 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.StyleProvider = StyleProvider;
|
|
8
|
-
exports.styleToCSS = void 0;
|
|
8
|
+
exports.styleToCSS = exports.isModified = void 0;
|
|
9
9
|
exports.useEditor = useEditor;
|
|
10
10
|
exports.useStyle = useStyle;
|
|
11
11
|
exports.useStyleDispatch = useStyleDispatch;
|
|
12
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
12
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
14
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
15
|
var _react = require("react");
|
|
15
16
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
17
|
+
var _lodash = require("lodash");
|
|
18
|
+
var _ahooks = require("ahooks");
|
|
16
19
|
var StyleContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
17
20
|
var StyleDispatchContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
18
21
|
var EditorContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 样式上下文组件
|
|
25
|
+
*/
|
|
19
26
|
function StyleProvider(_ref) {
|
|
20
27
|
var onChange = _ref.onChange,
|
|
21
28
|
children = _ref.children,
|
|
@@ -24,12 +31,24 @@ function StyleProvider(_ref) {
|
|
|
24
31
|
var styleReducer = function styleReducer(state, action) {
|
|
25
32
|
switch (action.type) {
|
|
26
33
|
case 'edit':
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
{
|
|
35
|
+
var field = action.payload.id;
|
|
36
|
+
var _value = action.payload.value;
|
|
37
|
+
var newState = (0, _objectSpread2.default)({}, state);
|
|
38
|
+
if (!(0, _lodash.isNil)(_value) && _value !== '') newState[field] = _value;else delete newState[field];
|
|
39
|
+
if (editorRef.current) {
|
|
40
|
+
editorRef.current.editor.setValue(styleToCSS(newState));
|
|
41
|
+
}
|
|
42
|
+
return newState;
|
|
43
|
+
}
|
|
44
|
+
case 'new':
|
|
45
|
+
{
|
|
46
|
+
var _newState = (0, _objectSpread2.default)({}, action.payload);
|
|
47
|
+
if (editorRef.current) {
|
|
48
|
+
editorRef.current.editor.setValue(styleToCSS(_newState));
|
|
49
|
+
}
|
|
50
|
+
return _newState;
|
|
31
51
|
}
|
|
32
|
-
return newState;
|
|
33
52
|
case 'code':
|
|
34
53
|
return parseCSS(action.payload);
|
|
35
54
|
default:
|
|
@@ -40,10 +59,10 @@ function StyleProvider(_ref) {
|
|
|
40
59
|
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
41
60
|
style = _useReducer2[0],
|
|
42
61
|
dispatch = _useReducer2[1];
|
|
43
|
-
(0,
|
|
62
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
44
63
|
if (style) {
|
|
45
64
|
var css = styleToCSS(style);
|
|
46
|
-
if (onChange) onChange(style, css);
|
|
65
|
+
if (onChange) onChange(style, removeRootBrackets(css));
|
|
47
66
|
}
|
|
48
67
|
}, [style]);
|
|
49
68
|
return /*#__PURE__*/React.createElement(StyleContext.Provider, {
|
|
@@ -63,6 +82,15 @@ function useStyleDispatch() {
|
|
|
63
82
|
function useEditor() {
|
|
64
83
|
return (0, _react.useContext)(EditorContext);
|
|
65
84
|
}
|
|
85
|
+
function removeRootBrackets(cssText) {
|
|
86
|
+
// 正则表达式匹配 :root 选择器及其大括号,保留里面的内容
|
|
87
|
+
var rootRegex = /:root\s*\{([^}]*)\}/;
|
|
88
|
+
|
|
89
|
+
// 替换 :root 和大括号,但保留其中的内容
|
|
90
|
+
return cssText.replace(rootRegex, function (match, innerContent) {
|
|
91
|
+
return innerContent.trim();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
66
94
|
var parseCSS = function parseCSS(cssString) {
|
|
67
95
|
// 创建一个空对象来存储解析后的样式
|
|
68
96
|
var parsedStyles = {};
|
|
@@ -109,4 +137,23 @@ var styleToCSS = exports.styleToCSS = function styleToCSS(styleObject) {
|
|
|
109
137
|
|
|
110
138
|
// Convert the root to a CSS string
|
|
111
139
|
return root.toString();
|
|
140
|
+
};
|
|
141
|
+
var isModified = exports.isModified = function isModified(style, textRelatedStyles) {
|
|
142
|
+
// 遍历数组中的每个键
|
|
143
|
+
var _iterator = (0, _createForOfIteratorHelper2.default)(textRelatedStyles),
|
|
144
|
+
_step;
|
|
145
|
+
try {
|
|
146
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
147
|
+
var prop = _step.value;
|
|
148
|
+
// 检查style对象中是否有该键,并且该键对应的值不是undefined
|
|
149
|
+
if (style.hasOwnProperty(prop) && style[prop] !== undefined) {
|
|
150
|
+
return true; // 如果找到至少一个键有值,返回true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
} catch (err) {
|
|
154
|
+
_iterator.e(err);
|
|
155
|
+
} finally {
|
|
156
|
+
_iterator.f();
|
|
157
|
+
}
|
|
158
|
+
return false; // 如果没有找到任何一个键有值,返回false
|
|
112
159
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _stylePanel = _interopRequireDefault(require("../../style/style-panel.less"));
|
|
12
|
+
var _excluded = ["children"];
|
|
13
|
+
/**
|
|
14
|
+
* 样式行通用组件
|
|
15
|
+
*/
|
|
16
|
+
function _default(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
20
|
+
className: _stylePanel.default['row']
|
|
21
|
+
}, rest), children);
|
|
22
|
+
}
|
|
@@ -8,11 +8,10 @@ exports.default = _default;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _PanelItem = _interopRequireDefault(require("../../components/PanelItem"));
|
|
12
11
|
var _NumberInput = _interopRequireDefault(require("../../components/NumberInput"));
|
|
13
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
14
12
|
var _StyleContext = require("./StyleContext");
|
|
15
|
-
var
|
|
13
|
+
var _HighLightPanel = _interopRequireDefault(require("./HighLightPanel"));
|
|
14
|
+
var _excluded = ["field", "label", "placeholder"];
|
|
16
15
|
var options = [{
|
|
17
16
|
label: 'px',
|
|
18
17
|
value: 'px'
|
|
@@ -23,33 +22,37 @@ var options = [{
|
|
|
23
22
|
label: 'A',
|
|
24
23
|
value: 'auto'
|
|
25
24
|
}];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 宽高设置控件
|
|
28
|
+
*/
|
|
26
29
|
function _default(_ref) {
|
|
27
30
|
var field = _ref.field,
|
|
31
|
+
label = _ref.label,
|
|
32
|
+
placeholder = _ref.placeholder,
|
|
28
33
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
34
|
var style = (0, _StyleContext.useStyle)();
|
|
30
35
|
var dispatch = (0, _StyleContext.useStyleDispatch)();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
var handleChange = function handleChange(field, value) {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'edit',
|
|
39
|
+
payload: {
|
|
40
|
+
id: field,
|
|
41
|
+
value: value
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_HighLightPanel.default, {
|
|
46
|
+
label: label,
|
|
47
|
+
highLightFields: [field]
|
|
36
48
|
}, /*#__PURE__*/_react.default.createElement(_NumberInput.default, (0, _extends2.default)({
|
|
37
49
|
options: options,
|
|
38
50
|
value: style[field],
|
|
39
51
|
min: 0,
|
|
40
52
|
max: 10000,
|
|
41
53
|
onChange: function onChange(value) {
|
|
42
|
-
|
|
43
|
-
type: 'edit',
|
|
44
|
-
payload: {
|
|
45
|
-
id: field,
|
|
46
|
-
value: value
|
|
47
|
-
}
|
|
48
|
-
});
|
|
54
|
+
return handleChange(field, value);
|
|
49
55
|
},
|
|
50
|
-
placeholder:
|
|
51
|
-
id: 'luckda.lowcode.painter.panel-section.style-panel.width.ph',
|
|
52
|
-
label: '请输入宽度'
|
|
53
|
-
})
|
|
56
|
+
placeholder: placeholder
|
|
54
57
|
}, rest)));
|
|
55
58
|
}
|
|
@@ -8,6 +8,22 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _StyleContext = require("./StyleContext");
|
|
10
10
|
var _MainPanel = _interopRequireDefault(require("./MainPanel"));
|
|
11
|
+
/**
|
|
12
|
+
* StylePanel 组件是一个 React 组件,用于提供样式设置主面板。
|
|
13
|
+
* 该组件通过 StyleProvider 将样式变更和当前样式值传递给其子组件。
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @example
|
|
17
|
+
* const handleChange = (newValue) => console.log(newValue);
|
|
18
|
+
* const initialValue = "dark";
|
|
19
|
+
* <StylePanel onChange={handleChange} value={initialValue} />
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} props - 组件的属性。
|
|
22
|
+
* @param {Function} props.onChange - 当样式变更时调用的函数,该函数接受新的样式值作为参数。
|
|
23
|
+
* @param {any} props.value - 样式字符串
|
|
24
|
+
*
|
|
25
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了 StyleProvider 和 MainPanel 组件。
|
|
26
|
+
*/
|
|
11
27
|
var StylePanel = function StylePanel(_ref) {
|
|
12
28
|
var onChange = _ref.onChange,
|
|
13
29
|
value = _ref.value;
|
|
@@ -6,53 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
12
|
var _antd = require("luck-design/antd");
|
|
14
13
|
var _utils = require("@luck-design-biz/base/utils");
|
|
15
14
|
var _uiDesign = require("@luck-helper/ui-design");
|
|
16
15
|
var _tabitems = _interopRequireDefault(require("../style/tabitems.less"));
|
|
17
16
|
var _SortBox = require("../components/SortBox");
|
|
18
|
-
var
|
|
17
|
+
var _ListEditor = require("../components/ListEditor");
|
|
19
18
|
var _PopConfirm = _interopRequireDefault(require("../components/PopConfirm"));
|
|
20
19
|
var _PopForm = require("../components/PopForm");
|
|
21
|
-
|
|
22
|
-
switch (action.type) {
|
|
23
|
-
case 'add':
|
|
24
|
-
return [].concat((0, _toConsumableArray2.default)(state), [action.payload]);
|
|
25
|
-
case 'delete':
|
|
26
|
-
return state.filter(function (item) {
|
|
27
|
-
return item.id !== action.payload;
|
|
28
|
-
});
|
|
29
|
-
case 'edit':
|
|
30
|
-
return state.map(function (item) {
|
|
31
|
-
return item.id === action.payload.id ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), action.payload.data) : item;
|
|
32
|
-
});
|
|
33
|
-
case 'active':
|
|
34
|
-
return state.map(function (item) {
|
|
35
|
-
item.active = false;
|
|
36
|
-
return item.id === action.payload.id ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), action.payload.data) : item;
|
|
37
|
-
});
|
|
38
|
-
case 'new':
|
|
39
|
-
return (0, _toConsumableArray2.default)(action.payload);
|
|
40
|
-
case 'sort':
|
|
41
|
-
var sortItems = action.payload;
|
|
42
|
-
var newItems = state.sort(function (a, b) {
|
|
43
|
-
var indexA = sortItems.indexOf(a.id);
|
|
44
|
-
var indexB = sortItems.indexOf(b.id);
|
|
45
|
-
return indexA - indexB;
|
|
46
|
-
});
|
|
47
|
-
return (0, _toConsumableArray2.default)(newItems);
|
|
48
|
-
default:
|
|
49
|
-
throw new Error();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
20
|
+
var _helper = require("../../engine/tools/helper");
|
|
52
21
|
var TabItems = function TabItems(_ref) {
|
|
53
22
|
var options = _ref.options,
|
|
54
23
|
onChange = _ref.onChange;
|
|
55
|
-
var _useReducer = (0, _react.useReducer)(
|
|
24
|
+
var _useReducer = (0, _react.useReducer)(_helper.listReducer, options),
|
|
56
25
|
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
57
26
|
items = _useReducer2[0],
|
|
58
27
|
dispatch = _useReducer2[1];
|
|
@@ -87,12 +56,13 @@ var TabItems = function TabItems(_ref) {
|
|
|
87
56
|
return item.id;
|
|
88
57
|
}),
|
|
89
58
|
onChange: handleSortChange
|
|
90
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditor, {
|
|
91
60
|
handleAdd: handleAdd
|
|
92
61
|
}, items.map(function (item) {
|
|
93
62
|
return /*#__PURE__*/_react.default.createElement(_SortBox.SortItem, {
|
|
63
|
+
key: item.id,
|
|
94
64
|
id: item.id
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditorItem, {
|
|
96
66
|
left: /*#__PURE__*/_react.default.createElement(TabItemLeft, {
|
|
97
67
|
item: item,
|
|
98
68
|
dispatch: dispatch
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
10
|
+
var _Collapse = _interopRequireDefault(require("../components/Collapse"));
|
|
11
|
+
var _actionsEditor = _interopRequireDefault(require("../components/actions-editor"));
|
|
12
|
+
var TableActions = function TableActions(_ref) {
|
|
13
|
+
var defaultValue = _ref.defaultValue,
|
|
14
|
+
onChange = _ref.onChange;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
16
|
+
field: "test",
|
|
17
|
+
label: (0, _utils.formatMessage)({
|
|
18
|
+
id: 'luckda.lowcode.painter.panel-section.tableActions',
|
|
19
|
+
label: '表格操作'
|
|
20
|
+
})
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_actionsEditor.default, {
|
|
22
|
+
defaultValue: defaultValue,
|
|
23
|
+
onChange: onChange
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = TableActions;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _lodash = require("lodash");
|
|
10
|
+
var _ColorInput = _interopRequireDefault(require("../components/ColorInput"));
|
|
11
|
+
var TableZebra = function TableZebra(_ref) {
|
|
12
|
+
var defaultValue = _ref.defaultValue,
|
|
13
|
+
_onChange = _ref.onChange;
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_ColorInput.default, {
|
|
15
|
+
value: (0, _lodash.isString)(defaultValue) ? defaultValue : void 0,
|
|
16
|
+
onChange: function onChange(value) {
|
|
17
|
+
_onChange(value || false);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = TableZebra;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
10
|
+
var _NumberInput = _interopRequireDefault(require("../components/NumberInput"));
|
|
11
|
+
var units = [{
|
|
12
|
+
label: 'px',
|
|
13
|
+
value: 'px'
|
|
14
|
+
}, {
|
|
15
|
+
label: '%',
|
|
16
|
+
value: '%'
|
|
17
|
+
}, {
|
|
18
|
+
label: 'A',
|
|
19
|
+
value: 'auto'
|
|
20
|
+
}];
|
|
21
|
+
var WidthHeight = function WidthHeight(_ref) {
|
|
22
|
+
var defaultValue = _ref.defaultValue,
|
|
23
|
+
size = _ref.size,
|
|
24
|
+
onChange = _ref.onChange,
|
|
25
|
+
_ref$options = _ref.options,
|
|
26
|
+
options = _ref$options === void 0 ? units : _ref$options,
|
|
27
|
+
convertInt = _ref.convertInt,
|
|
28
|
+
_ref$min = _ref.min,
|
|
29
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
30
|
+
_ref$max = _ref.max,
|
|
31
|
+
max = _ref$max === void 0 ? 10000 : _ref$max;
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_NumberInput.default, {
|
|
33
|
+
options: options,
|
|
34
|
+
defaultValue: defaultValue,
|
|
35
|
+
size: size,
|
|
36
|
+
min: min,
|
|
37
|
+
max: max,
|
|
38
|
+
convertInt: convertInt,
|
|
39
|
+
onChange: onChange,
|
|
40
|
+
placeholder: (0, _utils.formatMessage)({
|
|
41
|
+
id: 'luckda.lowcode.painter.panel-section.width-height',
|
|
42
|
+
label: '请输入数值'
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var _default = exports.default = WidthHeight;
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.lc-painter-panel-section-components-actionsEditor {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.action-pool-selector {
|
|
6
|
+
width: 100%;
|
|
7
|
+
:global(.ant-select-selection) {
|
|
8
|
+
padding-right: 18px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.action-pool-coder {
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 4px;
|
|
14
|
+
top: 6px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.lc-painter-panel-section-style-panel-border-editor {
|
|
2
|
+
.border-editor-wrapper {
|
|
3
|
+
display: flex;
|
|
4
|
+
|
|
5
|
+
.wrapper-left {
|
|
6
|
+
width: 40%;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.wrapper-right {
|
|
13
|
+
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: flex-end;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.editor-item {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 4px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wrapper-right-single {
|
|
29
|
+
flex: 1;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: flex-end;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.lc-painter-panel-section-style-panel-border-radius-selector {
|
|
2
|
+
.selector-box {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
.selector-row {
|
|
7
|
+
width: 22px;
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
&.b-left {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-content: flex-start;
|
|
14
|
+
}
|
|
15
|
+
&.b-center {
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
&.b-right {
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
align-content: flex-start;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.selector-wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
padding: 4px;
|
|
29
|
+
border-radius: 3px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
|
|
33
|
+
&.selector-over {
|
|
34
|
+
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.selector-item {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.lc-painter-panel-section-style-panel-border-selector {
|
|
2
|
+
.selector-box {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
.selector-row {
|
|
7
|
+
width: 22px;
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
&.b-left {
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
}
|
|
13
|
+
&.b-center {
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
}
|
|
18
|
+
&.b-right {
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.selector-wrapper {
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
padding: 4px;
|
|
26
|
+
border-radius: 3px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
user-select: none;
|
|
29
|
+
|
|
30
|
+
&.selector-over {
|
|
31
|
+
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.selector-item {
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.lc-painter-components-color-input {
|
|
2
|
+
.color-input-wrap {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.color-input {
|
|
7
|
+
text-indent: 20px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.color-display{
|
|
11
|
+
width: 16px;
|
|
12
|
+
height: 16px;
|
|
13
|
+
border-radius: 3px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 4px;
|
|
16
|
+
top: 4px;
|
|
17
|
+
border: 1px solid rgba(31, 56, 88, .3);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
border: 1px dashed var(--ant-primary-color);
|
|
97
97
|
background-color: color-mix(in sRGB, var(--ant-primary-color), transparent 95%);
|
|
98
98
|
.box();
|
|
99
|
+
|
|
100
|
+
&-name{
|
|
101
|
+
position: absolute;
|
|
102
|
+
color: var(--ant-primary-color);
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
line-height: 20px;
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
&-selector {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|