@luck-design-biz/luckda 0.0.22-5 → 0.0.22-6
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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/es/lowcode/constants/event-topics.js +6 -1
- 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/SegmentedStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +24 -1
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +0 -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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/es/lowcode/engine/meta/table.props.json +0 -0
- 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 +6 -14
- package/es/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/es/lowcode/engine/tools/dataProcess.js +0 -0
- package/es/lowcode/engine/tools/helper.js +0 -0
- package/es/lowcode/engine/tools/usePromiseState.js +24 -0
- package/es/lowcode/index.js +0 -0
- package/es/lowcode/painter/Components.js +0 -0
- package/es/lowcode/painter/Design.js +178 -67
- package/es/lowcode/painter/I18n.js +9 -6
- package/es/lowcode/painter/Outline.js +0 -0
- package/es/lowcode/painter/Panel.js +7 -2
- package/es/lowcode/painter/Ribbon.js +0 -0
- package/es/lowcode/painter/components/PanelItem.js +0 -0
- package/es/lowcode/painter/components/PopConfirm.js +0 -0
- package/es/lowcode/painter/components/PopForm.js +0 -0
- package/es/lowcode/painter/components/RuleInput.js +4 -4
- package/es/lowcode/painter/components/SortBox.js +0 -0
- package/es/lowcode/painter/components/TabEditor.js +0 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +0 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +0 -0
- package/es/lowcode/painter/components/code-editor/index.js +0 -0
- package/es/lowcode/painter/index.js +0 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +45 -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 -2
- package/es/lowcode/painter/panel-section/TabItems.js +2 -3
- package/es/lowcode/painter/services/I18n.js +0 -0
- package/es/lowcode/painter/style/button-type.less +5 -0
- package/es/lowcode/painter/style/components.less +0 -0
- package/es/lowcode/painter/style/design.less +56 -3
- 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/es/lowcode/painter/style/outline.less +0 -0
- package/es/lowcode/painter/style/panel-item.less +0 -0
- package/es/lowcode/painter/style/panel.less +0 -0
- 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/tabeditor.less +0 -0
- package/es/lowcode/painter/style/tabitems.less +0 -0
- package/es/lowcode/view/Canvas.js +11 -8
- package/es/lowcode/view/Loading.js +0 -0
- package/es/lowcode/view/Page.js +2 -4
- package/es/lowcode/view/index.js +0 -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 +8 -2
- package/es/lowcode/view/lc-components/Box/index.less +14 -0
- package/es/lowcode/view/lc-components/Box/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Button/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Dialog/index.less +0 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -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 +1 -1
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -0
- package/es/lowcode/view/lc-components/Drawer/style.less +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Form/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Image/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +0 -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 +4 -42
- package/es/lowcode/view/lc-components/Layout/index.less +0 -4
- package/es/lowcode/view/lc-components/Layout/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Link/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Section/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Split/meta.json +0 -0
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +9 -0
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +9 -0
- package/es/lowcode/view/lc-components/Table/index.js +0 -0
- package/es/lowcode/view/lc-components/Table/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -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 +0 -0
- package/es/lowcode/view/lc-components/Text/meta.json +0 -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 +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 +1 -0
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +0 -0
- 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 +0 -0
- 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 +0 -0
- package/lib/lowcode/constants/event-topics.js +7 -2
- 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/SegmentedStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +24 -1
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +0 -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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/lib/lowcode/engine/meta/table.props.json +0 -0
- 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 +6 -14
- package/lib/lowcode/engine/provider/EventBusProvider.js +2 -2
- package/lib/lowcode/engine/tools/dataProcess.js +0 -0
- package/lib/lowcode/engine/tools/helper.js +0 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +31 -0
- package/lib/lowcode/index.js +0 -0
- package/lib/lowcode/painter/Components.js +0 -0
- package/lib/lowcode/painter/Design.js +176 -66
- package/lib/lowcode/painter/I18n.js +7 -3
- package/lib/lowcode/painter/Outline.js +0 -0
- package/lib/lowcode/painter/Panel.js +7 -2
- package/lib/lowcode/painter/Ribbon.js +0 -0
- package/lib/lowcode/painter/components/PanelItem.js +0 -0
- package/lib/lowcode/painter/components/PopConfirm.js +0 -0
- package/lib/lowcode/painter/components/PopForm.js +0 -0
- package/lib/lowcode/painter/components/RuleInput.js +4 -4
- package/lib/lowcode/painter/components/SortBox.js +0 -0
- package/lib/lowcode/painter/components/TabEditor.js +0 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +0 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +0 -0
- package/lib/lowcode/painter/components/code-editor/index.js +0 -0
- package/lib/lowcode/painter/index.js +0 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +52 -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 -2
- package/lib/lowcode/painter/panel-section/TabItems.js +1 -2
- package/lib/lowcode/painter/services/I18n.js +0 -0
- package/lib/lowcode/painter/style/button-type.less +5 -0
- package/lib/lowcode/painter/style/components.less +0 -0
- package/lib/lowcode/painter/style/design.less +56 -3
- 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/lib/lowcode/painter/style/outline.less +0 -0
- package/lib/lowcode/painter/style/panel-item.less +0 -0
- package/lib/lowcode/painter/style/panel.less +0 -0
- 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/tabeditor.less +0 -0
- package/lib/lowcode/painter/style/tabitems.less +0 -0
- package/lib/lowcode/view/Canvas.js +10 -7
- package/lib/lowcode/view/Loading.js +0 -0
- package/lib/lowcode/view/Page.js +2 -4
- package/lib/lowcode/view/index.js +0 -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 +8 -2
- package/lib/lowcode/view/lc-components/Box/index.less +14 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Button/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Dialog/index.less +0 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -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 +1 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Drawer/style.less +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +0 -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 +2 -40
- package/lib/lowcode/view/lc-components/Layout/index.less +0 -4
- package/lib/lowcode/view/lc-components/Layout/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +0 -0
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +16 -0
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +16 -0
- package/lib/lowcode/view/lc-components/Table/index.js +0 -0
- package/lib/lowcode/view/lc-components/Table/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -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 +0 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +0 -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 +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 +4 -3
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +164 -163
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/engine/tools/lcid.js +0 -16
- package/lib/lowcode/engine/tools/lcid.js +0 -22
|
@@ -1,61 +1,95 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import React, { useRef, useEffect, useState } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { Select, Button, Icon, Divider, message } from 'luck-design/antd';
|
|
4
|
+
import moment from 'moment';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
|
-
import {
|
|
6
|
+
import { last, initial } from 'lodash';
|
|
7
|
+
import { RawIntlProvider, getLocale, getIntl, localeInfo } from 'umi';
|
|
8
|
+
import { useEventListener, useSetState, useMemoizedFn, useCreation } from 'ahooks';
|
|
9
|
+
import { Select, Button, Icon, Divider, ConfigProvider, Dropdown, message } from 'luck-design/antd';
|
|
10
|
+
import { cloneDeep, reverse } from 'lodash';
|
|
11
|
+
import { suid } from '@luck-design-biz/base/utils';
|
|
8
12
|
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
9
13
|
import Page from "../view/Page";
|
|
10
14
|
import { add } from "../engine/tools/dataProcess";
|
|
11
|
-
import generateShortUuid from "../engine/tools/lcid";
|
|
12
15
|
import { CELL_KEY, CELL_CLASS_NAME } from "../constants";
|
|
13
16
|
import styles from "./style/design.less";
|
|
14
|
-
var
|
|
17
|
+
var getOperatorStyle = function getOperatorStyle(page, cellNode) {
|
|
15
18
|
var _page$getBoundingClie = page.getBoundingClientRect(),
|
|
16
19
|
pageLeft = _page$getBoundingClie.left,
|
|
17
20
|
pageTop = _page$getBoundingClie.top;
|
|
18
21
|
var _cellNode$getBounding = cellNode.getBoundingClientRect(),
|
|
19
22
|
cellNodeLeft = _cellNode$getBounding.left,
|
|
20
23
|
cellNodeTop = _cellNode$getBounding.top;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
return {
|
|
25
|
+
left: "".concat(cellNodeLeft - pageLeft, "px"),
|
|
26
|
+
top: "".concat(cellNodeTop - pageTop, "px"),
|
|
27
|
+
width: "".concat(cellNode.offsetWidth, "px"),
|
|
28
|
+
height: "".concat(cellNode.offsetHeight, "px")
|
|
29
|
+
};
|
|
25
30
|
};
|
|
26
31
|
var Design = function Design() {
|
|
32
|
+
var _selectorRef$current, _localeInfo$locale2;
|
|
27
33
|
var context = useLDContext();
|
|
28
|
-
var detectorRef = useRef(null);
|
|
29
34
|
var selectorRef = useRef(null);
|
|
30
35
|
var simulatorRef = useRef(null);
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
var _useSetState = useSetState({
|
|
37
|
+
selector: null,
|
|
38
|
+
detector: null
|
|
39
|
+
}),
|
|
40
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
41
|
+
operatorId = _useSetState2[0],
|
|
42
|
+
setOperatorId = _useSetState2[1];
|
|
43
|
+
var _useState = useState(null),
|
|
36
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
acticeProps = _useState2[0],
|
|
46
|
+
setActiceProps = _useState2[1];
|
|
47
|
+
var _useState3 = useState(null),
|
|
48
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
+
langList = _useState4[0],
|
|
50
|
+
setLangList = _useState4[1];
|
|
51
|
+
var _useState5 = useState(function () {
|
|
52
|
+
return getLocale();
|
|
53
|
+
}),
|
|
54
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
55
|
+
locale = _useState6[0],
|
|
56
|
+
setLocale = _useState6[1];
|
|
57
|
+
var _useState7 = useState(function () {
|
|
58
|
+
return getIntl(locale, true);
|
|
59
|
+
}),
|
|
60
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
61
|
+
intl = _useState8[0],
|
|
62
|
+
setContainerIntl = _useState8[1];
|
|
63
|
+
var _useState9 = useState('pc'),
|
|
64
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
65
|
+
activedTarget = _useState10[0],
|
|
66
|
+
setActivedTarget = _useState10[1];
|
|
39
67
|
useEventListener('mousemove', function (event) {
|
|
40
68
|
var elem = event.target;
|
|
41
69
|
var targetCell = elem.closest(".".concat(CELL_CLASS_NAME));
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
71
|
+
if (targetCellId && targetCellId !== operatorId.detector && targetCellId !== operatorId.selector) {
|
|
72
|
+
setOperatorId({
|
|
73
|
+
detector: targetCellId
|
|
74
|
+
});
|
|
45
75
|
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
46
|
-
id:
|
|
76
|
+
id: targetCellId,
|
|
47
77
|
cellNode: targetCell
|
|
48
78
|
});
|
|
49
|
-
} else if (!targetCell ||
|
|
50
|
-
|
|
79
|
+
} else if (!targetCell || targetCellId === operatorId.selector) {
|
|
80
|
+
setOperatorId({
|
|
81
|
+
detector: null
|
|
82
|
+
});
|
|
51
83
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
52
84
|
}
|
|
53
85
|
}, {
|
|
54
86
|
target: simulatorRef
|
|
55
87
|
});
|
|
56
88
|
useEventListener('mouseleave', function () {
|
|
57
|
-
if (
|
|
58
|
-
|
|
89
|
+
if (operatorId.detector) {
|
|
90
|
+
setOperatorId({
|
|
91
|
+
detector: null
|
|
92
|
+
});
|
|
59
93
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
60
94
|
}
|
|
61
95
|
}, {
|
|
@@ -64,7 +98,8 @@ var Design = function Design() {
|
|
|
64
98
|
useEventListener('click', function (event) {
|
|
65
99
|
var elem = event.target;
|
|
66
100
|
var targetCell = elem.closest(".".concat(CELL_CLASS_NAME));
|
|
67
|
-
|
|
101
|
+
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
102
|
+
if (!targetCellId || targetCellId === operatorId.selector) return;
|
|
68
103
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
69
104
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
70
105
|
id: targetCell.id,
|
|
@@ -73,34 +108,30 @@ var Design = function Design() {
|
|
|
73
108
|
}, {
|
|
74
109
|
target: simulatorRef
|
|
75
110
|
});
|
|
76
|
-
useEffect(function () {
|
|
77
|
-
if (selectorRef.current && activeCellRef.current) setRect(simulatorRef.current, selectorRef.current, activeCellRef.current);
|
|
78
|
-
if (detectorRef.current && hoverCellRef.current) setRect(simulatorRef.current, detectorRef.current, hoverCellRef.current);
|
|
79
|
-
}, [size, scroll]);
|
|
80
111
|
useEffect(function () {
|
|
81
112
|
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
82
|
-
if (payload.id) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
113
|
+
if (payload.id) setOperatorId({
|
|
114
|
+
detector: payload.id
|
|
115
|
+
});else setOperatorId({
|
|
116
|
+
detector: null
|
|
117
|
+
});
|
|
88
118
|
}).watch();
|
|
89
119
|
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
90
120
|
if (payload.id) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
121
|
+
setOperatorId({
|
|
122
|
+
selector: payload.id,
|
|
123
|
+
detector: null
|
|
124
|
+
});
|
|
125
|
+
setActiceProps(context.componentMap.get(payload.id).api.getLevelNodes());
|
|
95
126
|
} else {
|
|
96
|
-
|
|
127
|
+
setActiceProps(null);
|
|
97
128
|
}
|
|
98
129
|
}).watch();
|
|
99
130
|
return function () {
|
|
100
131
|
context.$unsubscriber(context.topics.COMPONENT_HOVER, hcid);
|
|
101
132
|
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, acid);
|
|
102
133
|
};
|
|
103
|
-
}, [
|
|
134
|
+
}, [context.pageData]);
|
|
104
135
|
useEffect(function () {
|
|
105
136
|
var moid = context.$subscriber(context.topics.MODAL_OPEN).on(function () {
|
|
106
137
|
simulatorRef.current.style['overflow-y'] = 'hidden';
|
|
@@ -108,31 +139,35 @@ var Design = function Design() {
|
|
|
108
139
|
var mcid = context.$subscriber(context.topics.MODAL_CLOSE).on(function () {
|
|
109
140
|
simulatorRef.current.style['overflow-y'] = 'auto';
|
|
110
141
|
}).watch();
|
|
142
|
+
var laid = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref) {
|
|
143
|
+
var _langList = _ref.langList;
|
|
144
|
+
return setLangList(_langList);
|
|
145
|
+
}).watch();
|
|
111
146
|
return function () {
|
|
112
147
|
context.$unsubscriber(context.topics.MODAL_OPEN, moid);
|
|
113
148
|
context.$unsubscriber(context.topics.MODAL_CLOSE, mcid);
|
|
149
|
+
context.$unsubscriber(context.topics.LANG_SETTING_SELECT, laid);
|
|
114
150
|
};
|
|
115
151
|
}, []);
|
|
116
152
|
useEffect(function () {
|
|
117
|
-
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (
|
|
118
|
-
var data =
|
|
119
|
-
if (!
|
|
153
|
+
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (_ref2) {
|
|
154
|
+
var data = _ref2.data;
|
|
155
|
+
if (!operatorId.selector) {
|
|
120
156
|
message.info('请在右侧画布选择节点');
|
|
121
157
|
return;
|
|
122
158
|
}
|
|
123
|
-
if (
|
|
159
|
+
if (context.componentMap.get(operatorId.selector).dom.getAttribute('name') !== 'box') {
|
|
124
160
|
message.info('该节点不支持添加子节点');
|
|
125
161
|
return;
|
|
126
162
|
}
|
|
127
163
|
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
128
|
-
var _id = "".concat(data.component.toLowerCase(), "_").concat(
|
|
164
|
+
var _id = "".concat(data.component.toLowerCase(), "_").concat(suid());
|
|
129
165
|
var cloneData = cloneDeep(context.pageData);
|
|
130
|
-
add(cloneData,
|
|
131
|
-
context._setPageData(cloneData)
|
|
132
|
-
setTimeout(function () {
|
|
166
|
+
add(cloneData, operatorId.selector, _id, json);
|
|
167
|
+
context._setPageData(cloneData).then(function (newData) {
|
|
133
168
|
context.$publisher(context.topics.COMPONENT_APPEND, {
|
|
134
169
|
id: _id,
|
|
135
|
-
pageData:
|
|
170
|
+
pageData: newData
|
|
136
171
|
});
|
|
137
172
|
});
|
|
138
173
|
}).watch();
|
|
@@ -140,22 +175,68 @@ var Design = function Design() {
|
|
|
140
175
|
return context.$unsubscriber(context.topics.COMPONENT_SETTING_CLICK, csid);
|
|
141
176
|
};
|
|
142
177
|
}, [context.pageData]);
|
|
178
|
+
var getDomById = useMemoizedFn(function (id) {
|
|
179
|
+
return context.componentMap.get(id).dom;
|
|
180
|
+
});
|
|
181
|
+
var handleLangChange = useMemoizedFn(function (locale) {
|
|
182
|
+
if (moment !== null && moment !== void 0 && moment.locale) {
|
|
183
|
+
var _localeInfo$locale;
|
|
184
|
+
moment.locale(((_localeInfo$locale = localeInfo[locale]) === null || _localeInfo$locale === void 0 ? void 0 : _localeInfo$locale.momentLocale) || 'en');
|
|
185
|
+
}
|
|
186
|
+
setLocale(locale);
|
|
187
|
+
setContainerIntl(getIntl(locale));
|
|
188
|
+
});
|
|
189
|
+
var handleSelect = function handleSelect(_key) {
|
|
190
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
191
|
+
id: _key,
|
|
192
|
+
cellNode: getDomById(_key)
|
|
193
|
+
} : null);
|
|
194
|
+
};
|
|
195
|
+
var handleHover = function handleHover(_key) {
|
|
196
|
+
context.$publisher(context.topics.COMPONENT_HOVER, _key ? {
|
|
197
|
+
id: _key,
|
|
198
|
+
cellNode: getDomById(_key)
|
|
199
|
+
} : null);
|
|
200
|
+
};
|
|
201
|
+
var menu = useCreation(function () {
|
|
202
|
+
if ((acticeProps === null || acticeProps === void 0 ? void 0 : acticeProps.length) > 0) return /*#__PURE__*/React.createElement("div", {
|
|
203
|
+
className: styles['next-overlay-wrapper'],
|
|
204
|
+
onMouseLeave: function onMouseLeave() {
|
|
205
|
+
return handleHover();
|
|
206
|
+
}
|
|
207
|
+
}, reverse(initial(acticeProps)).map(function (m) {
|
|
208
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
key: m.id
|
|
210
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
return handleSelect(m.id);
|
|
213
|
+
},
|
|
214
|
+
onMouseOver: function onMouseOver() {
|
|
215
|
+
return handleHover(m.id);
|
|
216
|
+
}
|
|
217
|
+
}, m.name));
|
|
218
|
+
}));
|
|
219
|
+
return [];
|
|
220
|
+
}, [acticeProps]);
|
|
221
|
+
console.log('operatorId', operatorId);
|
|
143
222
|
return /*#__PURE__*/React.createElement("div", {
|
|
144
223
|
className: styles['lc-painter-design']
|
|
145
224
|
}, /*#__PURE__*/React.createElement("div", {
|
|
146
225
|
className: styles['lc-painter-design-toolbar']
|
|
147
226
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
148
227
|
size: "small",
|
|
149
|
-
|
|
228
|
+
value: langList ? locale : undefined,
|
|
150
229
|
className: styles['i18n-selecter'],
|
|
151
230
|
style: {
|
|
152
231
|
fontSize: 12
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
232
|
+
},
|
|
233
|
+
onSelect: handleLangChange
|
|
234
|
+
}, langList === null || langList === void 0 ? void 0 : langList.map(function (item) {
|
|
235
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
236
|
+
key: item.field,
|
|
237
|
+
value: item.field
|
|
238
|
+
}, item.title);
|
|
239
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
159
240
|
className: classNames(styles['toolbar-item'], _defineProperty({}, styles.actived, activedTarget === 'pc')),
|
|
160
241
|
onClick: function onClick() {
|
|
161
242
|
return setActivedTarget('pc');
|
|
@@ -180,31 +261,61 @@ var Design = function Design() {
|
|
|
180
261
|
onClick: function onClick() {
|
|
181
262
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
182
263
|
id: CELL_KEY.PAGE_ROOT,
|
|
183
|
-
cellNode:
|
|
264
|
+
cellNode: getDomById(CELL_KEY.PAGE_ROOT)
|
|
184
265
|
});
|
|
185
266
|
}
|
|
186
267
|
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/React.createElement(Divider, {
|
|
187
268
|
type: "vertical"
|
|
269
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
270
|
+
size: "small",
|
|
271
|
+
style: {
|
|
272
|
+
fontSize: 12,
|
|
273
|
+
margin: '0 2px'
|
|
274
|
+
}
|
|
275
|
+
}, "\u9884\u89C8"), /*#__PURE__*/React.createElement(Divider, {
|
|
276
|
+
type: "vertical"
|
|
188
277
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
189
278
|
size: "small",
|
|
190
279
|
type: "primary",
|
|
191
280
|
style: {
|
|
192
|
-
fontSize: 12
|
|
281
|
+
fontSize: 12,
|
|
282
|
+
margin: '0 0 0 2px'
|
|
193
283
|
}
|
|
194
284
|
}, "\u4FDD\u5B58")), /*#__PURE__*/React.createElement("div", {
|
|
195
285
|
className: styles['lc-painter-design-workspace']
|
|
196
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
286
|
+
}, operatorId.detector && /*#__PURE__*/React.createElement("div", {
|
|
197
287
|
id: "lc-detector",
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
className: styles['lc-painter-design-detector'],
|
|
289
|
+
style: getOperatorStyle(simulatorRef.current, getDomById(operatorId.detector))
|
|
290
|
+
}), operatorId.selector && /*#__PURE__*/React.createElement("div", {
|
|
201
291
|
id: "lc-selector",
|
|
202
292
|
ref: selectorRef,
|
|
203
|
-
className: styles['lc-painter-design-selector']
|
|
204
|
-
|
|
293
|
+
className: styles['lc-painter-design-selector'],
|
|
294
|
+
style: getOperatorStyle(simulatorRef.current, getDomById(operatorId.selector))
|
|
295
|
+
}, acticeProps && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
296
|
+
className: styles['lc-borders-actions'],
|
|
297
|
+
style: last(acticeProps).id === "page_root" ? {
|
|
298
|
+
top: 0
|
|
299
|
+
} : ((_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.offsetTop) < 23 ? {
|
|
300
|
+
bottom: '-23px'
|
|
301
|
+
} : {
|
|
302
|
+
top: '-23px'
|
|
303
|
+
}
|
|
304
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
305
|
+
overlay: menu,
|
|
306
|
+
placement: "bottomLeft"
|
|
307
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
308
|
+
className: "instance-node-selector"
|
|
309
|
+
}, last(acticeProps).name)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Icon, {
|
|
310
|
+
type: "delete"
|
|
311
|
+
}))))), /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
312
|
+
locale: ((_localeInfo$locale2 = localeInfo[locale]) === null || _localeInfo$locale2 === void 0 ? void 0 : _localeInfo$locale2.antd) || {}
|
|
313
|
+
}, /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
314
|
+
value: intl
|
|
315
|
+
}, /*#__PURE__*/React.createElement(Page, {
|
|
205
316
|
ref: simulatorRef,
|
|
206
317
|
pageCode: "mk2i87qb",
|
|
207
318
|
className: styles['lc-painter-design-simulator']
|
|
208
|
-
})));
|
|
319
|
+
})))));
|
|
209
320
|
};
|
|
210
321
|
export default Design;
|
|
@@ -6,19 +6,18 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
6
6
|
var _getDvaApp;
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
9
|
-
import { useAsyncEffect, useCreation } from 'ahooks';
|
|
9
|
+
import { useAsyncEffect, useCreation, useMemoizedFn } from 'ahooks';
|
|
10
10
|
import { GridTable } from 'luck-design';
|
|
11
11
|
import { reduce, remove, cloneDeep, debounce } from 'lodash';
|
|
12
12
|
import { Input, Button, Icon } from 'luck-design/antd';
|
|
13
|
-
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
14
|
-
import
|
|
13
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
14
|
+
import { useLDContext } from "../engine/provider/ContextProvider";
|
|
15
15
|
import { readAllLang, doAddLang, doUpdateLang, doDeleteLang } from "./services/I18n";
|
|
16
|
-
import { useMemoizedFn } from 'ahooks';
|
|
17
16
|
var Search = Input.Search;
|
|
18
17
|
var _getDvaApp$_store = (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store,
|
|
19
18
|
dispatch = _getDvaApp$_store.dispatch;
|
|
20
19
|
var getLangKey = function getLangKey() {
|
|
21
|
-
return "app.lowcode.".concat(
|
|
20
|
+
return "app.lowcode.".concat(suid());
|
|
22
21
|
};
|
|
23
22
|
var formatDataFunc = function formatDataFunc(data) {
|
|
24
23
|
return _objectSpread(_objectSpread({}, data), reduce(data.languages, function (ret, value, key) {
|
|
@@ -27,6 +26,7 @@ var formatDataFunc = function formatDataFunc(data) {
|
|
|
27
26
|
}, {}));
|
|
28
27
|
};
|
|
29
28
|
var I18n = function I18n() {
|
|
29
|
+
var context = useLDContext();
|
|
30
30
|
var _useState = useState([]),
|
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
32
|
langList = _useState2[0],
|
|
@@ -60,8 +60,11 @@ var I18n = function I18n() {
|
|
|
60
60
|
case 2:
|
|
61
61
|
_langList = _context.sent;
|
|
62
62
|
setLangList(_langList);
|
|
63
|
+
context.$publisher(context.topics.LANG_SETTING_SELECT, {
|
|
64
|
+
langList: _langList
|
|
65
|
+
});
|
|
63
66
|
doQuery();
|
|
64
|
-
case
|
|
67
|
+
case 6:
|
|
65
68
|
case "end":
|
|
66
69
|
return _context.stop();
|
|
67
70
|
}
|
|
File without changes
|
|
@@ -48,7 +48,12 @@ var Panel = function Panel() {
|
|
|
48
48
|
console.log('handleChange', activeNode, field, value);
|
|
49
49
|
var cloneData = cloneDeep(context.pageData);
|
|
50
50
|
modifyById(cloneData, activeNode.node.id, _objectSpread(_objectSpread({}, activeNode.node), {}, _defineProperty({}, field, value)));
|
|
51
|
-
context._setPageData(cloneData)
|
|
51
|
+
context._setPageData(cloneData).then(function (newData) {
|
|
52
|
+
context.$publisher(context.topics.COMPONENT_MODIFY, {
|
|
53
|
+
id: activeNode.node.id,
|
|
54
|
+
pageData: cloneDeep(newData)
|
|
55
|
+
});
|
|
56
|
+
});
|
|
52
57
|
setFalse();
|
|
53
58
|
});
|
|
54
59
|
var renderPanelItems = useMemoizedFn(function (items) {
|
|
@@ -59,7 +64,7 @@ var Panel = function Panel() {
|
|
|
59
64
|
label: item.name
|
|
60
65
|
}, Comp && /*#__PURE__*/React.createElement(Comp, {
|
|
61
66
|
field: item.key,
|
|
62
|
-
|
|
67
|
+
defaultValue: activeNode.node[item.key],
|
|
63
68
|
next: function next() {
|
|
64
69
|
if (!item.next) return;
|
|
65
70
|
nextRef.current = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
6
|
var _excluded = ["onValueChange", "rules", "value"];
|
|
6
7
|
import React, { forwardRef, useState, useEffect } from 'react';
|
|
7
8
|
import { Input, Tooltip } from 'luck-design/antd';
|
|
9
|
+
import classNames from 'classnames';
|
|
8
10
|
import styles from "../style/rule-input.less";
|
|
9
11
|
|
|
10
12
|
/**
|
|
@@ -85,16 +87,14 @@ export default /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
85
87
|
onValueChange(e, value);
|
|
86
88
|
} else {
|
|
87
89
|
setErr(error);
|
|
88
|
-
console.
|
|
90
|
+
console.error(error);
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
|
-
var className = styles['lc-painter-components-ruleinput'];
|
|
92
|
-
if (err) className += ' ' + styles['err'];
|
|
93
93
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
94
94
|
title: err,
|
|
95
95
|
visible: err
|
|
96
96
|
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
97
|
-
className:
|
|
97
|
+
className: classNames(styles['lc-painter-components-ruleinput'], _defineProperty({}, styles.err, !!err)),
|
|
98
98
|
size: "small",
|
|
99
99
|
value: inputValue // 绑定输入值
|
|
100
100
|
,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["field", "onChange"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Select, Button } from 'luck-design/antd';
|
|
6
|
+
import styles from "../style/button-type.less";
|
|
7
|
+
var ButtonType = function ButtonType(_ref) {
|
|
8
|
+
var field = _ref.field,
|
|
9
|
+
_onChange = _ref.onChange,
|
|
10
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
12
|
+
onChange: function onChange(value) {
|
|
13
|
+
return _onChange({
|
|
14
|
+
field: field,
|
|
15
|
+
value: value
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
className: styles['lc-painter-panel-section-components-buttontype']
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Select.Option, {
|
|
20
|
+
value: "primary"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
22
|
+
type: "primary",
|
|
23
|
+
size: "small",
|
|
24
|
+
className: styles['lc-painter-panel-section-components-buttontype-option']
|
|
25
|
+
}, "primary")), /*#__PURE__*/React.createElement(Select.Option, {
|
|
26
|
+
value: "default"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
type: "default",
|
|
29
|
+
size: "small",
|
|
30
|
+
className: styles['lc-painter-panel-section-components-buttontype-option']
|
|
31
|
+
}, "default")), /*#__PURE__*/React.createElement(Select.Option, {
|
|
32
|
+
value: "dashed"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
type: "dashed",
|
|
35
|
+
size: "small",
|
|
36
|
+
className: styles['lc-painter-panel-section-components-buttontype-option']
|
|
37
|
+
}, "dashed")), /*#__PURE__*/React.createElement(Select.Option, {
|
|
38
|
+
value: "danger"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
40
|
+
type: "danger",
|
|
41
|
+
size: "small",
|
|
42
|
+
className: styles['lc-painter-panel-section-components-buttontype-option']
|
|
43
|
+
}, "danger")));
|
|
44
|
+
};
|
|
45
|
+
export default ButtonType;
|
|
File without changes
|
|
File without changes
|
|
@@ -35,9 +35,9 @@ var _DEFAULTRATIO_ = '12:3:9';
|
|
|
35
35
|
*/
|
|
36
36
|
var LayoutRatio = function LayoutRatio(_ref) {
|
|
37
37
|
var field = _ref.field,
|
|
38
|
-
|
|
38
|
+
defaultValue = _ref.defaultValue,
|
|
39
39
|
onChange = _ref.onChange;
|
|
40
|
-
var _useState = useState(
|
|
40
|
+
var _useState = useState(defaultValue || _DEFAULTRATIO_),
|
|
41
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
42
|
currentRatio = _useState2[0],
|
|
43
43
|
setCurrentRatio = _useState2[1];
|
|
@@ -3,10 +3,9 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import React, { useRef, useReducer, useEffect } from 'react';
|
|
5
5
|
import { Radio, Icon, Tooltip, Input } from 'luck-design/antd';
|
|
6
|
-
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
7
7
|
import { Segmented } from '@luck-helper/ui-design';
|
|
8
8
|
import styles from "../style/tabitems.less";
|
|
9
|
-
import generateShortUuid from "../../engine/tools/lcid";
|
|
10
9
|
import { SortBox, SortItem } from "../components/SortBox";
|
|
11
10
|
import { TabEditor, TabEditorItem } from "../components/TabEditor";
|
|
12
11
|
import PopConfirm from "../components/PopConfirm";
|
|
@@ -61,7 +60,7 @@ var TabItems = function TabItems(_ref) {
|
|
|
61
60
|
dispatch({
|
|
62
61
|
type: 'add',
|
|
63
62
|
payload: {
|
|
64
|
-
id: "tab_".concat(
|
|
63
|
+
id: "tab_".concat(suid()),
|
|
65
64
|
name: "\u9009\u9879".concat(items.length + 1),
|
|
66
65
|
active: false,
|
|
67
66
|
resid: null,
|
|
File without changes
|
|
File without changes
|