@luck-design-biz/luckda 0.0.22 → 0.0.24-1
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 +21 -21
- package/README.md +40 -49
- package/es/components/Builder/index.js +4 -4
- package/es/components/LdAutoForm/index.js +7 -9
- package/es/components/LdCard/index.js +5 -6
- package/es/components/LdCard/model.js +1 -1
- package/es/components/LdCom/index.js +2 -2
- package/es/components/LdFormList/index.js +15 -16
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +11 -12
- package/es/components/LdGrid/model.js +1 -1
- package/es/components/LdGridForm/index.js +10 -10
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdInfoPanel/index.js +2 -2
- package/es/components/LdPop/index.js +0 -0
- package/es/components/LdRuntimeCom/index.js +42 -0
- package/es/components/LdTree/index.js +3 -4
- package/es/components/LdTree/index.less +36 -36
- package/es/helper/FromItems.js +1 -1
- package/es/helper/action.js +8 -8
- package/es/helper/form.js +16 -16
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +1 -1
- package/es/helper/ldComBuild.js +4 -4
- package/es/index.js +10 -9
- package/es/lowcode/constants/api-url.js +3 -0
- package/es/lowcode/constants/event-topics.js +36 -0
- package/es/lowcode/constants/index.js +12 -0
- package/es/lowcode/engine/factory/DataFactory.js +1 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +50 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +50 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +42 -0
- package/es/lowcode/engine/meta/box.props.default.json +12 -0
- package/es/lowcode/engine/meta/box.props.json +42 -0
- package/es/lowcode/engine/meta/button.props.default.json +16 -0
- package/es/lowcode/engine/meta/button.props.json +122 -0
- package/es/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/es/lowcode/engine/meta/cardlist.props.json +144 -0
- package/es/lowcode/engine/meta/components-list.json +128 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/es/lowcode/engine/meta/dialog.props.json +121 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/es/lowcode/engine/meta/drawer.props.json +144 -0
- package/es/lowcode/engine/meta/form.props.default.json +13 -0
- package/es/lowcode/engine/meta/form.props.json +117 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/es/lowcode/engine/meta/iframe.props.json +32 -0
- package/es/lowcode/engine/meta/image.props.default.json +16 -0
- package/es/lowcode/engine/meta/image.props.json +114 -0
- package/es/lowcode/engine/meta/imex.props.default.json +12 -0
- package/es/lowcode/engine/meta/imex.props.json +82 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/es/lowcode/engine/meta/jsx.props.json +25 -0
- package/es/lowcode/engine/meta/layout.props.default.json +13 -0
- package/es/lowcode/engine/meta/layout.props.json +108 -0
- package/es/lowcode/engine/meta/link.props.default.json +14 -0
- package/es/lowcode/engine/meta/link.props.json +112 -0
- package/es/lowcode/engine/meta/section.props.default.json +17 -0
- package/es/lowcode/engine/meta/section.props.json +108 -0
- package/es/lowcode/engine/meta/split.props.default.json +13 -0
- package/es/lowcode/engine/meta/split.props.json +72 -0
- package/es/lowcode/engine/meta/table.props.default.json +12 -0
- package/es/lowcode/engine/meta/table.props.json +174 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/es/lowcode/engine/meta/tabs.props.json +141 -0
- package/es/lowcode/engine/meta/text.props.default.json +12 -0
- package/es/lowcode/engine/meta/text.props.json +66 -0
- package/es/lowcode/engine/meta/tree.props.default.json +17 -0
- package/es/lowcode/engine/meta/tree.props.json +157 -0
- package/es/lowcode/engine/provider/ContextProvider.js +157 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
- package/es/lowcode/engine/tools/dataProcess.js +263 -0
- package/es/lowcode/engine/tools/helper.js +4 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +3 -0
- package/es/lowcode/painter/Components.js +104 -0
- package/es/lowcode/painter/Design.js +329 -0
- package/es/lowcode/painter/I18n.js +205 -0
- package/es/lowcode/painter/Outline.js +207 -0
- package/es/lowcode/painter/Panel.js +207 -0
- package/es/lowcode/painter/Ribbon.js +142 -0
- package/es/lowcode/painter/components/Collapse.js +31 -0
- package/es/lowcode/painter/components/NumberInput.js +93 -0
- package/es/lowcode/painter/components/PanelItem.js +63 -0
- package/es/lowcode/painter/components/PopConfirm.js +20 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/RuleInput.js +105 -0
- package/es/lowcode/painter/components/SortBox.js +92 -0
- package/es/lowcode/painter/components/TabEditor.js +88 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +118 -0
- package/es/lowcode/painter/components/code-editor/CssEditor.js +14 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +64 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +84 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/index.js +45 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +39 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +134 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +130 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +292 -0
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +543 -0
- package/es/lowcode/painter/panel-section/StylePanel/Height.js +48 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +64 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +101 -0
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +48 -0
- package/es/lowcode/painter/panel-section/StylePanel/index.js +12 -0
- package/es/lowcode/painter/panel-section/TabItems.js +237 -0
- package/es/lowcode/painter/services/I18n.js +85 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/collapse.less +21 -0
- package/es/lowcode/painter/style/components.less +90 -0
- package/es/lowcode/painter/style/design.less +142 -0
- package/es/lowcode/painter/style/display.less +17 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/index.less +6 -0
- package/es/lowcode/painter/style/layout-ratio.less +51 -0
- package/es/lowcode/painter/style/number-input.less +17 -0
- package/es/lowcode/painter/style/outline.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +44 -0
- package/es/lowcode/painter/style/panel.less +142 -0
- package/es/lowcode/painter/style/pop-confirm.less +10 -0
- package/es/lowcode/painter/style/pop-form.less +20 -0
- package/es/lowcode/painter/style/radio.less +24 -0
- package/es/lowcode/painter/style/ribbon.less +5 -0
- package/es/lowcode/painter/style/rule-input.less +13 -0
- package/es/lowcode/painter/style/style-panel.less +5 -0
- package/es/lowcode/painter/style/tabeditor.less +90 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/view/Canvas.js +143 -0
- package/es/lowcode/view/Loading.js +23 -0
- package/es/lowcode/view/Page.js +252 -0
- package/es/lowcode/view/index.js +18 -0
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +20 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +38 -0
- package/es/lowcode/view/lc-components/Box/index.less +15 -0
- package/es/lowcode/view/lc-components/Box/meta.json +42 -0
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +21 -0
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Button/index.js +102 -0
- package/es/lowcode/view/lc-components/Button/meta.json +122 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +20 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +61 -0
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +62 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/es/lowcode/view/lc-components/Drawer/style.less +7 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +20 -0
- package/es/lowcode/view/lc-components/Form/meta.json +117 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +20 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +20 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +20 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -0
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +20 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +75 -0
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +15 -0
- package/es/lowcode/view/lc-components/Layout/index.js +57 -0
- package/es/lowcode/view/lc-components/Layout/index.less +5 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +20 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +34 -0
- package/es/lowcode/view/lc-components/Section/meta.json +108 -0
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +21 -0
- package/es/lowcode/view/lc-components/Split/meta.json +72 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +16 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +153 -0
- package/es/lowcode/view/lc-components/Table/meta.json +174 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +21 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +23 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -0
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Tree/index.js +20 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/es/lowcode/view/lc-components/Wrapper.js +54 -0
- package/es/lowcode/view/style/canvas.less +5 -0
- package/es/lowcode/view/style/loading.less +84 -0
- package/es/lowcode/view/style/page.less +5 -0
- package/es/services.js +1 -1
- package/es/upload/Form/gridForm.js +30 -8
- package/es/upload/Form/index.js +1 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +30 -18
- package/es/upload/GridCell/index.js +0 -0
- package/es/upload/index.js +3 -3
- package/es/utils/action.js +1 -1
- package/es/utils/form.js +26 -26
- package/es/utils/grid.js +26 -29
- package/es/utils/index.js +3 -3
- package/lib/components/Builder/index.js +3 -5
- package/lib/components/LdAutoForm/index.js +5 -8
- package/lib/components/LdCard/index.js +5 -7
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +6 -11
- package/lib/components/LdFormList/index.js +10 -12
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +10 -12
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +6 -7
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdInfoPanel/index.js +2 -3
- package/lib/components/LdPop/index.js +2 -4
- package/lib/components/LdRuntimeCom/index.js +49 -0
- package/lib/components/LdTree/index.js +2 -4
- package/lib/components/LdTree/index.less +36 -36
- package/lib/helper/FromItems.js +15 -29
- package/lib/helper/action.js +9 -11
- package/lib/helper/form.js +18 -20
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +1 -2
- package/lib/helper/ldComBuild.js +7 -11
- package/lib/index.js +9 -1
- package/lib/lowcode/constants/api-url.js +9 -0
- package/lib/lowcode/constants/event-topics.js +42 -0
- package/lib/lowcode/constants/index.js +18 -0
- package/lib/lowcode/engine/factory/DataFactory.js +3 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +56 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +56 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +48 -0
- package/lib/lowcode/engine/meta/box.props.default.json +12 -0
- package/lib/lowcode/engine/meta/box.props.json +42 -0
- package/lib/lowcode/engine/meta/button.props.default.json +16 -0
- package/lib/lowcode/engine/meta/button.props.json +122 -0
- package/lib/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +144 -0
- package/lib/lowcode/engine/meta/components-list.json +128 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/lib/lowcode/engine/meta/dialog.props.json +121 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/lib/lowcode/engine/meta/drawer.props.json +144 -0
- package/lib/lowcode/engine/meta/form.props.default.json +13 -0
- package/lib/lowcode/engine/meta/form.props.json +117 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/lib/lowcode/engine/meta/iframe.props.json +32 -0
- package/lib/lowcode/engine/meta/image.props.default.json +16 -0
- package/lib/lowcode/engine/meta/image.props.json +114 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +12 -0
- package/lib/lowcode/engine/meta/imex.props.json +82 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/lib/lowcode/engine/meta/jsx.props.json +25 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +13 -0
- package/lib/lowcode/engine/meta/layout.props.json +108 -0
- package/lib/lowcode/engine/meta/link.props.default.json +14 -0
- package/lib/lowcode/engine/meta/link.props.json +112 -0
- package/lib/lowcode/engine/meta/section.props.default.json +17 -0
- package/lib/lowcode/engine/meta/section.props.json +108 -0
- package/lib/lowcode/engine/meta/split.props.default.json +13 -0
- package/lib/lowcode/engine/meta/split.props.json +72 -0
- package/lib/lowcode/engine/meta/table.props.default.json +12 -0
- package/lib/lowcode/engine/meta/table.props.json +174 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/lib/lowcode/engine/meta/tabs.props.json +141 -0
- package/lib/lowcode/engine/meta/text.props.default.json +12 -0
- package/lib/lowcode/engine/meta/text.props.json +66 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +17 -0
- package/lib/lowcode/engine/meta/tree.props.json +157 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +165 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
- package/lib/lowcode/engine/tools/dataProcess.js +277 -0
- package/lib/lowcode/engine/tools/helper.js +11 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +20 -0
- package/lib/lowcode/painter/Components.js +112 -0
- package/lib/lowcode/painter/Design.js +336 -0
- package/lib/lowcode/painter/I18n.js +213 -0
- package/lib/lowcode/painter/Outline.js +215 -0
- package/lib/lowcode/painter/Panel.js +215 -0
- package/lib/lowcode/painter/Ribbon.js +150 -0
- package/lib/lowcode/painter/components/Collapse.js +39 -0
- package/lib/lowcode/painter/components/NumberInput.js +101 -0
- package/lib/lowcode/painter/components/PanelItem.js +70 -0
- package/lib/lowcode/painter/components/PopConfirm.js +26 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/RuleInput.js +112 -0
- package/lib/lowcode/painter/components/SortBox.js +99 -0
- package/lib/lowcode/painter/components/TabEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +126 -0
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +22 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +72 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +95 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/index.js +54 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +46 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +138 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +299 -0
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +550 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Height.js +55 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +72 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +112 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Width.js +55 -0
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +19 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +245 -0
- package/lib/lowcode/painter/services/I18n.js +95 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/collapse.less +21 -0
- package/lib/lowcode/painter/style/components.less +90 -0
- package/lib/lowcode/painter/style/design.less +142 -0
- package/lib/lowcode/painter/style/display.less +17 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/index.less +6 -0
- package/lib/lowcode/painter/style/layout-ratio.less +51 -0
- package/lib/lowcode/painter/style/number-input.less +17 -0
- package/lib/lowcode/painter/style/outline.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +44 -0
- package/lib/lowcode/painter/style/panel.less +142 -0
- package/lib/lowcode/painter/style/pop-confirm.less +10 -0
- package/lib/lowcode/painter/style/pop-form.less +20 -0
- package/lib/lowcode/painter/style/radio.less +24 -0
- package/lib/lowcode/painter/style/ribbon.less +5 -0
- package/lib/lowcode/painter/style/rule-input.less +13 -0
- package/lib/lowcode/painter/style/style-panel.less +5 -0
- package/lib/lowcode/painter/style/tabeditor.less +90 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/view/Canvas.js +158 -0
- package/lib/lowcode/view/Loading.js +30 -0
- package/lib/lowcode/view/Page.js +260 -0
- package/lib/lowcode/view/index.js +25 -0
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +27 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +46 -0
- package/lib/lowcode/view/lc-components/Box/index.less +15 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +42 -0
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +28 -0
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Button/index.js +110 -0
- package/lib/lowcode/view/lc-components/Button/meta.json +122 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +69 -0
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +70 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Drawer/style.less +7 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +28 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +117 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +28 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +28 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +28 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +28 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +82 -0
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +22 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +65 -0
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +28 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +42 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +29 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +23 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +161 -0
- package/lib/lowcode/view/lc-components/Table/meta.json +174 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +29 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +31 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +28 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +61 -0
- package/lib/lowcode/view/style/canvas.less +5 -0
- package/lib/lowcode/view/style/loading.less +84 -0
- package/lib/lowcode/view/style/page.less +5 -0
- package/lib/services.js +0 -0
- package/lib/upload/Form/gridForm.js +28 -7
- package/lib/upload/Form/index.js +1 -2
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +30 -19
- package/lib/upload/GridCell/index.js +1 -2
- package/lib/upload/index.js +0 -0
- package/lib/utils/action.js +0 -0
- package/lib/utils/form.js +26 -29
- package/lib/utils/grid.js +22 -26
- package/lib/utils/index.js +0 -0
- package/lowcode.js +1 -0
- package/package.json +164 -78
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/README.zh-CN.md +0 -51
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.StyleProvider = StyleProvider;
|
|
8
|
+
exports.styleToCSS = void 0;
|
|
9
|
+
exports.useEditor = useEditor;
|
|
10
|
+
exports.useStyle = useStyle;
|
|
11
|
+
exports.useStyleDispatch = useStyleDispatch;
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
var _postcss = _interopRequireDefault(require("postcss"));
|
|
16
|
+
var StyleContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
17
|
+
var StyleDispatchContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
18
|
+
var EditorContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
19
|
+
function StyleProvider(_ref) {
|
|
20
|
+
var onChange = _ref.onChange,
|
|
21
|
+
children = _ref.children,
|
|
22
|
+
value = _ref.value;
|
|
23
|
+
var editorRef = (0, _react.useRef)(null);
|
|
24
|
+
var styleReducer = function styleReducer(state, action) {
|
|
25
|
+
switch (action.type) {
|
|
26
|
+
case 'edit':
|
|
27
|
+
var newState = (0, _objectSpread2.default)({}, state);
|
|
28
|
+
newState[action.payload.id] = action.payload.value;
|
|
29
|
+
if (editorRef.current) {
|
|
30
|
+
editorRef.current.editor.setValue(styleToCSS(newState));
|
|
31
|
+
}
|
|
32
|
+
return newState;
|
|
33
|
+
case 'code':
|
|
34
|
+
return parseCSS(action.payload);
|
|
35
|
+
default:
|
|
36
|
+
throw new Error();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var _useReducer = (0, _react.useReducer)(styleReducer, parseCSS(value)),
|
|
40
|
+
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
41
|
+
style = _useReducer2[0],
|
|
42
|
+
dispatch = _useReducer2[1];
|
|
43
|
+
(0, _react.useEffect)(function () {
|
|
44
|
+
if (style) {
|
|
45
|
+
var css = styleToCSS(style);
|
|
46
|
+
if (onChange) onChange(style, css);
|
|
47
|
+
}
|
|
48
|
+
}, [style]);
|
|
49
|
+
return /*#__PURE__*/React.createElement(StyleContext.Provider, {
|
|
50
|
+
value: style
|
|
51
|
+
}, /*#__PURE__*/React.createElement(EditorContext.Provider, {
|
|
52
|
+
value: editorRef
|
|
53
|
+
}, /*#__PURE__*/React.createElement(StyleDispatchContext.Provider, {
|
|
54
|
+
value: dispatch
|
|
55
|
+
}, children)));
|
|
56
|
+
}
|
|
57
|
+
function useStyle() {
|
|
58
|
+
return (0, _react.useContext)(StyleContext);
|
|
59
|
+
}
|
|
60
|
+
function useStyleDispatch() {
|
|
61
|
+
return (0, _react.useContext)(StyleDispatchContext);
|
|
62
|
+
}
|
|
63
|
+
function useEditor() {
|
|
64
|
+
return (0, _react.useContext)(EditorContext);
|
|
65
|
+
}
|
|
66
|
+
var parseCSS = function parseCSS(cssString) {
|
|
67
|
+
// 创建一个空对象来存储解析后的样式
|
|
68
|
+
var parsedStyles = {};
|
|
69
|
+
if (cssString) {
|
|
70
|
+
try {
|
|
71
|
+
// 解析CSS字符串
|
|
72
|
+
var ast = _postcss.default.parse(cssString);
|
|
73
|
+
|
|
74
|
+
// 遍历AST中的每个规则
|
|
75
|
+
ast.walkDecls(function (decl) {
|
|
76
|
+
// 将每个声明的属性和值存储在对象中
|
|
77
|
+
parsedStyles[decl.prop] = decl.value;
|
|
78
|
+
});
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error(e);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 返回包含所有样式的对象
|
|
85
|
+
return parsedStyles;
|
|
86
|
+
};
|
|
87
|
+
var styleToCSS = exports.styleToCSS = function styleToCSS(styleObject) {
|
|
88
|
+
// Create a PostCSS root node
|
|
89
|
+
var root = _postcss.default.root();
|
|
90
|
+
|
|
91
|
+
// Create a new rule for the :root selector
|
|
92
|
+
var rule = _postcss.default.rule({
|
|
93
|
+
selector: ':root'
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Iterate over the style object and add declarations to the rule
|
|
97
|
+
Object.keys(styleObject).forEach(function (property) {
|
|
98
|
+
var value = styleObject[property];
|
|
99
|
+
var decl = _postcss.default.decl({
|
|
100
|
+
prop: property.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
101
|
+
// Convert camelCase to kebab-case
|
|
102
|
+
value: value
|
|
103
|
+
});
|
|
104
|
+
rule.append(decl);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Append the rule to the root
|
|
108
|
+
root.append(rule);
|
|
109
|
+
|
|
110
|
+
// Convert the root to a CSS string
|
|
111
|
+
return root.toString();
|
|
112
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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 _PanelItem = _interopRequireDefault(require("../../components/PanelItem"));
|
|
12
|
+
var _NumberInput = _interopRequireDefault(require("../../components/NumberInput"));
|
|
13
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
14
|
+
var _StyleContext = require("./StyleContext");
|
|
15
|
+
var _excluded = ["field"];
|
|
16
|
+
var options = [{
|
|
17
|
+
label: 'px',
|
|
18
|
+
value: 'px'
|
|
19
|
+
}, {
|
|
20
|
+
label: '%',
|
|
21
|
+
value: '%'
|
|
22
|
+
}, {
|
|
23
|
+
label: 'A',
|
|
24
|
+
value: 'auto'
|
|
25
|
+
}];
|
|
26
|
+
function _default(_ref) {
|
|
27
|
+
var field = _ref.field,
|
|
28
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
|
+
var style = (0, _StyleContext.useStyle)();
|
|
30
|
+
var dispatch = (0, _StyleContext.useStyleDispatch)();
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
32
|
+
label: (0, _utils.formatMessage)({
|
|
33
|
+
id: 'luckda.lowcode.painter.panel-section.style-panel.height',
|
|
34
|
+
label: '高'
|
|
35
|
+
})
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_NumberInput.default, (0, _extends2.default)({
|
|
37
|
+
options: options,
|
|
38
|
+
value: style[field],
|
|
39
|
+
min: 0,
|
|
40
|
+
max: 10000,
|
|
41
|
+
onChange: function onChange(value) {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: 'edit',
|
|
44
|
+
payload: {
|
|
45
|
+
id: field,
|
|
46
|
+
value: value
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
placeholder: (0, _utils.formatMessage)({
|
|
51
|
+
id: 'luckda.lowcode.painter.panel-section.style-panel.height.ph',
|
|
52
|
+
label: '请输入高度'
|
|
53
|
+
})
|
|
54
|
+
}, rest)));
|
|
55
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 _StyleContext = require("./StyleContext");
|
|
10
|
+
var _MainPanel = _interopRequireDefault(require("./MainPanel"));
|
|
11
|
+
var StylePanel = function StylePanel(_ref) {
|
|
12
|
+
var onChange = _ref.onChange,
|
|
13
|
+
value = _ref.value;
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_StyleContext.StyleProvider, {
|
|
15
|
+
onChange: onChange,
|
|
16
|
+
value: value
|
|
17
|
+
}, /*#__PURE__*/_react.default.createElement(_MainPanel.default, null));
|
|
18
|
+
};
|
|
19
|
+
var _default = exports.default = StylePanel;
|
|
@@ -0,0 +1,245 @@
|
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _antd = require("luck-design/antd");
|
|
14
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
15
|
+
var _uiDesign = require("@luck-helper/ui-design");
|
|
16
|
+
var _tabitems = _interopRequireDefault(require("../style/tabitems.less"));
|
|
17
|
+
var _SortBox = require("../components/SortBox");
|
|
18
|
+
var _TabEditor = require("../components/TabEditor");
|
|
19
|
+
var _PopConfirm = _interopRequireDefault(require("../components/PopConfirm"));
|
|
20
|
+
var _PopForm = require("../components/PopForm");
|
|
21
|
+
function itemsReducer(state, action) {
|
|
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
|
+
}
|
|
52
|
+
var TabItems = function TabItems(_ref) {
|
|
53
|
+
var options = _ref.options,
|
|
54
|
+
onChange = _ref.onChange;
|
|
55
|
+
var _useReducer = (0, _react.useReducer)(itemsReducer, options),
|
|
56
|
+
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
57
|
+
items = _useReducer2[0],
|
|
58
|
+
dispatch = _useReducer2[1];
|
|
59
|
+
var isFirstRender = (0, _react.useRef)(true);
|
|
60
|
+
(0, _react.useEffect)(function () {
|
|
61
|
+
if (isFirstRender.current) {
|
|
62
|
+
isFirstRender.current = false;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (onChange) onChange(items);
|
|
66
|
+
}, [items, onChange]);
|
|
67
|
+
var handleAdd = function handleAdd() {
|
|
68
|
+
dispatch({
|
|
69
|
+
type: 'add',
|
|
70
|
+
payload: {
|
|
71
|
+
id: "tab_".concat((0, _utils.suid)()),
|
|
72
|
+
name: "\u9009\u9879".concat(items.length + 1),
|
|
73
|
+
active: false,
|
|
74
|
+
resid: null,
|
|
75
|
+
effect: 'disable'
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
var handleSortChange = function handleSortChange(sortItems) {
|
|
80
|
+
dispatch({
|
|
81
|
+
type: 'sort',
|
|
82
|
+
payload: sortItems
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_SortBox.SortBox, {
|
|
86
|
+
datas: items.map(function (item) {
|
|
87
|
+
return item.id;
|
|
88
|
+
}),
|
|
89
|
+
onChange: handleSortChange
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_TabEditor.TabEditor, {
|
|
91
|
+
handleAdd: handleAdd
|
|
92
|
+
}, items.map(function (item) {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_SortBox.SortItem, {
|
|
94
|
+
id: item.id
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_TabEditor.TabEditorItem, {
|
|
96
|
+
left: /*#__PURE__*/_react.default.createElement(TabItemLeft, {
|
|
97
|
+
item: item,
|
|
98
|
+
dispatch: dispatch
|
|
99
|
+
}),
|
|
100
|
+
right: /*#__PURE__*/_react.default.createElement(TabItemRight, {
|
|
101
|
+
item: item,
|
|
102
|
+
dispatch: dispatch
|
|
103
|
+
}),
|
|
104
|
+
item: item,
|
|
105
|
+
dispatch: dispatch
|
|
106
|
+
}));
|
|
107
|
+
})));
|
|
108
|
+
};
|
|
109
|
+
var TabItemLeft = function TabItemLeft(_ref2) {
|
|
110
|
+
var item = _ref2.item,
|
|
111
|
+
dispatch = _ref2.dispatch;
|
|
112
|
+
var handleActiveChange = function handleActiveChange() {
|
|
113
|
+
dispatch({
|
|
114
|
+
type: 'active',
|
|
115
|
+
payload: {
|
|
116
|
+
id: item.id,
|
|
117
|
+
data: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
118
|
+
active: true
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Radio, {
|
|
124
|
+
checked: item.active,
|
|
125
|
+
onClick: handleActiveChange
|
|
126
|
+
})), /*#__PURE__*/_react.default.createElement("div", null, item.name));
|
|
127
|
+
};
|
|
128
|
+
var TabItemRight = function TabItemRight(_ref3) {
|
|
129
|
+
var item = _ref3.item,
|
|
130
|
+
dispatch = _ref3.dispatch;
|
|
131
|
+
var handleDelete = function handleDelete() {
|
|
132
|
+
dispatch({
|
|
133
|
+
type: 'delete',
|
|
134
|
+
payload: item.id
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
138
|
+
title: (0, _utils.formatMessage)({
|
|
139
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.edit',
|
|
140
|
+
label: '添加'
|
|
141
|
+
})
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_PopConfirm.default, {
|
|
143
|
+
placement: "bottomLeft",
|
|
144
|
+
title: /*#__PURE__*/_react.default.createElement(TabItemEditor, {
|
|
145
|
+
item: item,
|
|
146
|
+
dispatch: dispatch
|
|
147
|
+
})
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
149
|
+
className: _tabitems.default['tabitem-action'],
|
|
150
|
+
type: "edit"
|
|
151
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
152
|
+
title: (0, _utils.formatMessage)({
|
|
153
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.delete',
|
|
154
|
+
label: '删除'
|
|
155
|
+
})
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
157
|
+
className: _tabitems.default['tabitem-action'],
|
|
158
|
+
type: "delete",
|
|
159
|
+
onClick: handleDelete
|
|
160
|
+
})));
|
|
161
|
+
};
|
|
162
|
+
var TabItemEditor = function TabItemEditor(_ref4) {
|
|
163
|
+
var item = _ref4.item,
|
|
164
|
+
dispatch = _ref4.dispatch;
|
|
165
|
+
var options = [{
|
|
166
|
+
label: '禁用',
|
|
167
|
+
value: 'disable'
|
|
168
|
+
}, {
|
|
169
|
+
label: '隐藏',
|
|
170
|
+
value: 'middle'
|
|
171
|
+
}];
|
|
172
|
+
var handleNameChange = function handleNameChange(e) {
|
|
173
|
+
dispatch({
|
|
174
|
+
type: 'edit',
|
|
175
|
+
payload: {
|
|
176
|
+
id: item.id,
|
|
177
|
+
data: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
178
|
+
name: e.target.value
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
var handleEffectChange = function handleEffectChange(value) {
|
|
184
|
+
console.log('value', value);
|
|
185
|
+
dispatch({
|
|
186
|
+
type: 'edit',
|
|
187
|
+
payload: {
|
|
188
|
+
id: item.id,
|
|
189
|
+
data: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
190
|
+
effect: value.option.value
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
var handleResChange = function handleResChange(e) {
|
|
196
|
+
dispatch({
|
|
197
|
+
type: 'edit',
|
|
198
|
+
payload: {
|
|
199
|
+
id: item.id,
|
|
200
|
+
data: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
201
|
+
resid: e.target.value
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
return /*#__PURE__*/_react.default.createElement(_PopForm.PopForm, null, /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItem, null, /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemLeft, null, (0, _utils.formatMessage)({
|
|
207
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.tabname',
|
|
208
|
+
label: '名称'
|
|
209
|
+
})), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemRight, null, /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
210
|
+
size: "small",
|
|
211
|
+
value: item.name,
|
|
212
|
+
onChange: handleNameChange,
|
|
213
|
+
placeholder: (0, _utils.formatMessage)({
|
|
214
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.tabname.placeholder',
|
|
215
|
+
label: '请输入标签名称'
|
|
216
|
+
})
|
|
217
|
+
}))), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItem, null, /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemLeft, null, (0, _utils.formatMessage)({
|
|
218
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.id',
|
|
219
|
+
label: '编号'
|
|
220
|
+
})), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemRight, null, /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
221
|
+
size: "small",
|
|
222
|
+
value: item.id,
|
|
223
|
+
disabled: true
|
|
224
|
+
}))), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItem, null, /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemLeft, null, (0, _utils.formatMessage)({
|
|
225
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.reskey',
|
|
226
|
+
label: '资源串'
|
|
227
|
+
})), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemRight, null, /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
228
|
+
size: "small",
|
|
229
|
+
value: item.resid,
|
|
230
|
+
onChange: handleResChange,
|
|
231
|
+
placeholder: (0, _utils.formatMessage)({
|
|
232
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.reskey.placeholder',
|
|
233
|
+
label: '请输入资源串'
|
|
234
|
+
})
|
|
235
|
+
}))), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItem, null, /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemLeft, null, (0, _utils.formatMessage)({
|
|
236
|
+
id: 'luckda.lowcode.painter.panel-section.tabsitems.editor.reskey',
|
|
237
|
+
label: '控制效果'
|
|
238
|
+
})), /*#__PURE__*/_react.default.createElement(_PopForm.PopFormItemRight, null, /*#__PURE__*/_react.default.createElement(_uiDesign.Segmented, {
|
|
239
|
+
field: "effect",
|
|
240
|
+
options: options,
|
|
241
|
+
onChange: handleEffectChange,
|
|
242
|
+
value: item.effect
|
|
243
|
+
}))));
|
|
244
|
+
};
|
|
245
|
+
var _default = exports.default = TabItems;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.doAddLang = doAddLang;
|
|
8
|
+
exports.doDeleteLang = doDeleteLang;
|
|
9
|
+
exports.doUpdateLang = doUpdateLang;
|
|
10
|
+
exports.readAllLang = readAllLang;
|
|
11
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
var _qs = require("qs");
|
|
14
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
15
|
+
var _ApiConfig = _interopRequireDefault(require("@/services/ApiConfig"));
|
|
16
|
+
function readAllLang(_x, _x2) {
|
|
17
|
+
return _readAllLang.apply(this, arguments);
|
|
18
|
+
}
|
|
19
|
+
function _readAllLang() {
|
|
20
|
+
_readAllLang = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(params, body) {
|
|
21
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
22
|
+
while (1) switch (_context.prev = _context.next) {
|
|
23
|
+
case 0:
|
|
24
|
+
return _context.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.BASE_HOST, "/lang/sysLanguageKeys/readAll?").concat((0, _qs.stringify)(params)), {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
body: body
|
|
27
|
+
}));
|
|
28
|
+
case 1:
|
|
29
|
+
case "end":
|
|
30
|
+
return _context.stop();
|
|
31
|
+
}
|
|
32
|
+
}, _callee);
|
|
33
|
+
}));
|
|
34
|
+
return _readAllLang.apply(this, arguments);
|
|
35
|
+
}
|
|
36
|
+
function doAddLang(_x3, _x4) {
|
|
37
|
+
return _doAddLang.apply(this, arguments);
|
|
38
|
+
}
|
|
39
|
+
function _doAddLang() {
|
|
40
|
+
_doAddLang = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params, body) {
|
|
41
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
42
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
43
|
+
case 0:
|
|
44
|
+
return _context2.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.BASE_HOST, "/lang/sysLanguageKeys/add?").concat((0, _qs.stringify)(params)), {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
body: body
|
|
47
|
+
}));
|
|
48
|
+
case 1:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context2.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee2);
|
|
53
|
+
}));
|
|
54
|
+
return _doAddLang.apply(this, arguments);
|
|
55
|
+
}
|
|
56
|
+
function doUpdateLang(_x5, _x6) {
|
|
57
|
+
return _doUpdateLang.apply(this, arguments);
|
|
58
|
+
}
|
|
59
|
+
function _doUpdateLang() {
|
|
60
|
+
_doUpdateLang = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3(params, body) {
|
|
61
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
|
62
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
return _context3.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.BASE_HOST, "/lang/sysLanguageKeys/update?").concat((0, _qs.stringify)(params)), {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
body: body
|
|
67
|
+
}));
|
|
68
|
+
case 1:
|
|
69
|
+
case "end":
|
|
70
|
+
return _context3.stop();
|
|
71
|
+
}
|
|
72
|
+
}, _callee3);
|
|
73
|
+
}));
|
|
74
|
+
return _doUpdateLang.apply(this, arguments);
|
|
75
|
+
}
|
|
76
|
+
function doDeleteLang(_x7, _x8) {
|
|
77
|
+
return _doDeleteLang.apply(this, arguments);
|
|
78
|
+
}
|
|
79
|
+
function _doDeleteLang() {
|
|
80
|
+
_doDeleteLang = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4(params, body) {
|
|
81
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {
|
|
82
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
return _context4.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.BASE_HOST, "/lang/sysLanguageKeys/delete?").concat((0, _qs.stringify)(params)), {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: body
|
|
87
|
+
}));
|
|
88
|
+
case 1:
|
|
89
|
+
case "end":
|
|
90
|
+
return _context4.stop();
|
|
91
|
+
}
|
|
92
|
+
}, _callee4);
|
|
93
|
+
}));
|
|
94
|
+
return _doDeleteLang.apply(this, arguments);
|
|
95
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.lc-painter-components-collapse {
|
|
2
|
+
.head {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
background-color: hsla(210, 8%, 95%, 0.4);
|
|
7
|
+
border-bottom: 1px solid rgba(31, 56, 88, 0.1);
|
|
8
|
+
height: 32px;
|
|
9
|
+
padding: 0 12px;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
user-select: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.body {
|
|
15
|
+
padding: 12px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.action {
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.lc-painter-components {
|
|
2
|
+
.components-search {
|
|
3
|
+
padding: 0 20px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.components-content {
|
|
7
|
+
border-top: 1px solid #e3e3e3;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
padding-top: 10px;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
|
|
16
|
+
.components-wrapper {
|
|
17
|
+
padding: 0 20px;
|
|
18
|
+
flex-basis: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
align-items: center;
|
|
23
|
+
margin-bottom: 20px;
|
|
24
|
+
|
|
25
|
+
h3 {
|
|
26
|
+
width: 100%; // 使标题占满整行
|
|
27
|
+
margin-left: 0;
|
|
28
|
+
margin-bottom: 10px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.components-item {
|
|
33
|
+
display: flex;
|
|
34
|
+
width: 121px;
|
|
35
|
+
height: 37px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center; // 水平居中对齐
|
|
38
|
+
padding: 10px;
|
|
39
|
+
border: 1px solid #ddd;
|
|
40
|
+
margin-right: 10px; // 添加右边距来分隔项
|
|
41
|
+
margin-bottom: 10px; // 添加底边距来分隔行
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
transition: border-color 0.3s;
|
|
44
|
+
box-sizing: border-box; // 确保边框和填充不会增加元素的宽度
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
border-color: #3478ff;
|
|
49
|
+
color: #3478ff; // 文本颜色
|
|
50
|
+
.icon-wrapper {
|
|
51
|
+
color: #3478ff; // Icon颜色(如果Icon组件接受color属性)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.icon-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
align-items: center;
|
|
59
|
+
margin-right: 10px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.text-content {
|
|
63
|
+
flex-grow: 1;
|
|
64
|
+
text-align: left;
|
|
65
|
+
|
|
66
|
+
span {
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
color: #333;
|
|
69
|
+
white-space: nowrap; // 防止文字换行
|
|
70
|
+
overflow: hidden; // 隐藏溢出的文字
|
|
71
|
+
text-overflow: ellipsis; // 使用省略号表示溢出
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
p {
|
|
75
|
+
display: none; // 隐藏描述,因为在这个组件尺寸中无法显示
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:global{
|
|
82
|
+
.ant-tabs-nav-scroll{
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
.ant-tabs-tab{
|
|
86
|
+
font-size: 14px!important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|