@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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,6 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _umi = require("umi");
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
14
|
var _EventBusProvider = require("./EventBusProvider");
|
|
15
|
+
var _usePromiseState3 = _interopRequireDefault(require("../tools/usePromiseState"));
|
|
15
16
|
var topics = _interopRequireWildcard(require("../../constants/event-topics"));
|
|
16
17
|
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(null);
|
|
17
18
|
var useLDContext = exports.useLDContext = function useLDContext() {
|
|
@@ -35,20 +36,15 @@ var _default = exports.default = function _default(_ref) {
|
|
|
35
36
|
/**
|
|
36
37
|
* 页面数据
|
|
37
38
|
*/
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
pageData =
|
|
41
|
-
_setPageData =
|
|
39
|
+
var _usePromiseState = (0, _usePromiseState3.default)(null),
|
|
40
|
+
_usePromiseState2 = (0, _slicedToArray2.default)(_usePromiseState, 2),
|
|
41
|
+
pageData = _usePromiseState2[0],
|
|
42
|
+
_setPageData = _usePromiseState2[1];
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* 组件列表
|
|
45
46
|
*/
|
|
46
47
|
var _componentList = (0, _react.useRef)([]);
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 组件id与组件的映射
|
|
50
|
-
*/
|
|
51
|
-
var _componentMap = (0, _react.useRef)(new Map());
|
|
52
48
|
var _privateGetter = (0, _react.useRef)({
|
|
53
49
|
pageCode: function pageCode() {
|
|
54
50
|
return _pageCode.current;
|
|
@@ -60,7 +56,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
60
56
|
return _componentList.current;
|
|
61
57
|
},
|
|
62
58
|
componentMap: function componentMap() {
|
|
63
|
-
return
|
|
59
|
+
return new Map(_componentList.current);
|
|
64
60
|
}
|
|
65
61
|
});
|
|
66
62
|
|
|
@@ -70,7 +66,6 @@ var _default = exports.default = function _default(_ref) {
|
|
|
70
66
|
* component:ReactNode 组件
|
|
71
67
|
*/
|
|
72
68
|
var register = (0, _ahooks.useMemoizedFn)(function (id, component) {
|
|
73
|
-
_componentMap.current.set(id, component);
|
|
74
69
|
_componentList.current.push([id, component]);
|
|
75
70
|
});
|
|
76
71
|
|
|
@@ -79,7 +74,6 @@ var _default = exports.default = function _default(_ref) {
|
|
|
79
74
|
* id:string 组件id
|
|
80
75
|
*/
|
|
81
76
|
var unregister = (0, _ahooks.useMemoizedFn)(function (id) {
|
|
82
|
-
_componentMap.current.delete(id);
|
|
83
77
|
_componentList.current = _componentList.current.filter(function (_ref2) {
|
|
84
78
|
var _ref3 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
85
79
|
_id = _ref3[0];
|
|
@@ -138,8 +132,6 @@ var _default = exports.default = function _default(_ref) {
|
|
|
138
132
|
_pageCode: _pageCode,
|
|
139
133
|
_moduleCode: _moduleCode,
|
|
140
134
|
_setPageData: _setPageData,
|
|
141
|
-
_componentList: _componentList,
|
|
142
|
-
_componentMap: _componentMap,
|
|
143
135
|
pageData: pageData,
|
|
144
136
|
history: _umi.history,
|
|
145
137
|
topics: topics,
|
|
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
|
-
var
|
|
14
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
15
15
|
var _helper = require("../tools/helper");
|
|
16
16
|
var _excluded = ["topic"];
|
|
17
17
|
var EventBus = exports.EventBus = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -95,7 +95,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
95
95
|
});
|
|
96
96
|
var $subscriber = (0, _ahooks.useMemoizedFn)(function (topic) {
|
|
97
97
|
if (!subscriberPool.has(topic)) subscriberPool.set(topic, []);
|
|
98
|
-
var id = (0,
|
|
98
|
+
var id = (0, _utils.suid)();
|
|
99
99
|
var _subscriber = Subscriber(id);
|
|
100
100
|
subscriberPool.get(topic).push([id, _subscriber]);
|
|
101
101
|
return _subscriber;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _ahooks = require("ahooks");
|
|
11
|
+
var usePromiseState = function usePromiseState(initialState) {
|
|
12
|
+
var _useSafeState = (0, _ahooks.useSafeState)(initialState),
|
|
13
|
+
_useSafeState2 = (0, _slicedToArray2.default)(_useSafeState, 2),
|
|
14
|
+
state = _useSafeState2[0],
|
|
15
|
+
setState = _useSafeState2[1];
|
|
16
|
+
var promiseRef = (0, _react.useRef)(null);
|
|
17
|
+
var setStatePromise = (0, _react.useCallback)(function (_state) {
|
|
18
|
+
return new Promise(function (resolve) {
|
|
19
|
+
promiseRef.current = resolve;
|
|
20
|
+
setState(_state);
|
|
21
|
+
});
|
|
22
|
+
}, []);
|
|
23
|
+
(0, _ahooks.useDeepCompareEffect)(function () {
|
|
24
|
+
if (promiseRef.current) {
|
|
25
|
+
promiseRef.current(state);
|
|
26
|
+
promiseRef.current = null;
|
|
27
|
+
}
|
|
28
|
+
}, [state]);
|
|
29
|
+
return [state, setStatePromise];
|
|
30
|
+
};
|
|
31
|
+
var _default = exports.default = usePromiseState;
|
package/lib/lowcode/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -9,61 +9,94 @@ exports.default = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
13
|
-
var _antd = require("luck-design/antd");
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
14
|
var _lodash = require("lodash");
|
|
15
|
+
var _umi = require("umi");
|
|
16
|
+
var _ahooks = require("ahooks");
|
|
17
|
+
var _antd = require("luck-design/antd");
|
|
18
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
16
19
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
17
20
|
var _Page = _interopRequireDefault(require("../view/Page"));
|
|
18
21
|
var _dataProcess = require("../engine/tools/dataProcess");
|
|
19
|
-
var _lcid = _interopRequireDefault(require("../engine/tools/lcid"));
|
|
20
22
|
var _constants = require("../constants");
|
|
21
23
|
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
22
|
-
var
|
|
24
|
+
var getOperatorStyle = function getOperatorStyle(page, cellNode) {
|
|
23
25
|
var _page$getBoundingClie = page.getBoundingClientRect(),
|
|
24
26
|
pageLeft = _page$getBoundingClie.left,
|
|
25
27
|
pageTop = _page$getBoundingClie.top;
|
|
26
28
|
var _cellNode$getBounding = cellNode.getBoundingClientRect(),
|
|
27
29
|
cellNodeLeft = _cellNode$getBounding.left,
|
|
28
30
|
cellNodeTop = _cellNode$getBounding.top;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
return {
|
|
32
|
+
left: "".concat(cellNodeLeft - pageLeft, "px"),
|
|
33
|
+
top: "".concat(cellNodeTop - pageTop, "px"),
|
|
34
|
+
width: "".concat(cellNode.offsetWidth, "px"),
|
|
35
|
+
height: "".concat(cellNode.offsetHeight, "px")
|
|
36
|
+
};
|
|
33
37
|
};
|
|
34
38
|
var Design = function Design() {
|
|
39
|
+
var _selectorRef$current, _localeInfo$locale2;
|
|
35
40
|
var context = (0, _ContextProvider.useLDContext)();
|
|
36
|
-
var detectorRef = (0, _react.useRef)(null);
|
|
37
41
|
var selectorRef = (0, _react.useRef)(null);
|
|
38
42
|
var simulatorRef = (0, _react.useRef)(null);
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
var _useSetState = (0, _ahooks.useSetState)({
|
|
44
|
+
selector: null,
|
|
45
|
+
detector: null
|
|
46
|
+
}),
|
|
47
|
+
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
48
|
+
operatorId = _useSetState2[0],
|
|
49
|
+
setOperatorId = _useSetState2[1];
|
|
50
|
+
var _useState = (0, _react.useState)(null),
|
|
44
51
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
acticeProps = _useState2[0],
|
|
53
|
+
setActiceProps = _useState2[1];
|
|
54
|
+
var _useState3 = (0, _react.useState)(null),
|
|
55
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
56
|
+
langList = _useState4[0],
|
|
57
|
+
setLangList = _useState4[1];
|
|
58
|
+
var _useState5 = (0, _react.useState)(function () {
|
|
59
|
+
return (0, _umi.getLocale)();
|
|
60
|
+
}),
|
|
61
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
62
|
+
locale = _useState6[0],
|
|
63
|
+
setLocale = _useState6[1];
|
|
64
|
+
var _useState7 = (0, _react.useState)(function () {
|
|
65
|
+
return (0, _umi.getIntl)(locale, true);
|
|
66
|
+
}),
|
|
67
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
68
|
+
intl = _useState8[0],
|
|
69
|
+
setContainerIntl = _useState8[1];
|
|
70
|
+
var _useState9 = (0, _react.useState)('pc'),
|
|
71
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
72
|
+
activedTarget = _useState10[0],
|
|
73
|
+
setActivedTarget = _useState10[1];
|
|
47
74
|
(0, _ahooks.useEventListener)('mousemove', function (event) {
|
|
48
75
|
var elem = event.target;
|
|
49
76
|
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
77
|
+
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
78
|
+
if (targetCellId && targetCellId !== operatorId.detector && targetCellId !== operatorId.selector) {
|
|
79
|
+
setOperatorId({
|
|
80
|
+
detector: targetCellId
|
|
81
|
+
});
|
|
53
82
|
context.$publisher(context.topics.COMPONENT_HOVER, {
|
|
54
|
-
id:
|
|
83
|
+
id: targetCellId,
|
|
55
84
|
cellNode: targetCell
|
|
56
85
|
});
|
|
57
|
-
} else if (!targetCell ||
|
|
58
|
-
|
|
86
|
+
} else if (!targetCell || targetCellId === operatorId.selector) {
|
|
87
|
+
setOperatorId({
|
|
88
|
+
detector: null
|
|
89
|
+
});
|
|
59
90
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
60
91
|
}
|
|
61
92
|
}, {
|
|
62
93
|
target: simulatorRef
|
|
63
94
|
});
|
|
64
95
|
(0, _ahooks.useEventListener)('mouseleave', function () {
|
|
65
|
-
if (
|
|
66
|
-
|
|
96
|
+
if (operatorId.detector) {
|
|
97
|
+
setOperatorId({
|
|
98
|
+
detector: null
|
|
99
|
+
});
|
|
67
100
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
68
101
|
}
|
|
69
102
|
}, {
|
|
@@ -72,7 +105,8 @@ var Design = function Design() {
|
|
|
72
105
|
(0, _ahooks.useEventListener)('click', function (event) {
|
|
73
106
|
var elem = event.target;
|
|
74
107
|
var targetCell = elem.closest(".".concat(_constants.CELL_CLASS_NAME));
|
|
75
|
-
|
|
108
|
+
var targetCellId = targetCell === null || targetCell === void 0 ? void 0 : targetCell.id;
|
|
109
|
+
if (!targetCellId || targetCellId === operatorId.selector) return;
|
|
76
110
|
context.$publisher(context.topics.COMPONENT_HOVER, null);
|
|
77
111
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
78
112
|
id: targetCell.id,
|
|
@@ -81,34 +115,30 @@ var Design = function Design() {
|
|
|
81
115
|
}, {
|
|
82
116
|
target: simulatorRef
|
|
83
117
|
});
|
|
84
|
-
(0, _react.useEffect)(function () {
|
|
85
|
-
if (selectorRef.current && activeCellRef.current) setRect(simulatorRef.current, selectorRef.current, activeCellRef.current);
|
|
86
|
-
if (detectorRef.current && hoverCellRef.current) setRect(simulatorRef.current, detectorRef.current, hoverCellRef.current);
|
|
87
|
-
}, [size, scroll]);
|
|
88
118
|
(0, _react.useEffect)(function () {
|
|
89
119
|
var hcid = context.$subscriber(context.topics.COMPONENT_HOVER).on(function (payload) {
|
|
90
|
-
if (payload.id) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
120
|
+
if (payload.id) setOperatorId({
|
|
121
|
+
detector: payload.id
|
|
122
|
+
});else setOperatorId({
|
|
123
|
+
detector: null
|
|
124
|
+
});
|
|
96
125
|
}).watch();
|
|
97
126
|
var acid = context.$subscriber(context.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
98
127
|
if (payload.id) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
128
|
+
setOperatorId({
|
|
129
|
+
selector: payload.id,
|
|
130
|
+
detector: null
|
|
131
|
+
});
|
|
132
|
+
setActiceProps(context.componentMap.get(payload.id).api.getLevelNodes());
|
|
103
133
|
} else {
|
|
104
|
-
|
|
134
|
+
setActiceProps(null);
|
|
105
135
|
}
|
|
106
136
|
}).watch();
|
|
107
137
|
return function () {
|
|
108
138
|
context.$unsubscriber(context.topics.COMPONENT_HOVER, hcid);
|
|
109
139
|
context.$unsubscriber(context.topics.COMPONENT_ACTIVE, acid);
|
|
110
140
|
};
|
|
111
|
-
}, [
|
|
141
|
+
}, [context.pageData]);
|
|
112
142
|
(0, _react.useEffect)(function () {
|
|
113
143
|
var moid = context.$subscriber(context.topics.MODAL_OPEN).on(function () {
|
|
114
144
|
simulatorRef.current.style['overflow-y'] = 'hidden';
|
|
@@ -116,31 +146,35 @@ var Design = function Design() {
|
|
|
116
146
|
var mcid = context.$subscriber(context.topics.MODAL_CLOSE).on(function () {
|
|
117
147
|
simulatorRef.current.style['overflow-y'] = 'auto';
|
|
118
148
|
}).watch();
|
|
149
|
+
var laid = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref) {
|
|
150
|
+
var _langList = _ref.langList;
|
|
151
|
+
return setLangList(_langList);
|
|
152
|
+
}).watch();
|
|
119
153
|
return function () {
|
|
120
154
|
context.$unsubscriber(context.topics.MODAL_OPEN, moid);
|
|
121
155
|
context.$unsubscriber(context.topics.MODAL_CLOSE, mcid);
|
|
156
|
+
context.$unsubscriber(context.topics.LANG_SETTING_SELECT, laid);
|
|
122
157
|
};
|
|
123
158
|
}, []);
|
|
124
159
|
(0, _react.useEffect)(function () {
|
|
125
|
-
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (
|
|
126
|
-
var data =
|
|
127
|
-
if (!
|
|
160
|
+
var csid = context.$subscriber(context.topics.COMPONENT_SETTING_CLICK).on(function (_ref2) {
|
|
161
|
+
var data = _ref2.data;
|
|
162
|
+
if (!operatorId.selector) {
|
|
128
163
|
_antd.message.info('请在右侧画布选择节点');
|
|
129
164
|
return;
|
|
130
165
|
}
|
|
131
|
-
if (
|
|
166
|
+
if (context.componentMap.get(operatorId.selector).dom.getAttribute('name') !== 'box') {
|
|
132
167
|
_antd.message.info('该节点不支持添加子节点');
|
|
133
168
|
return;
|
|
134
169
|
}
|
|
135
170
|
var json = require("../engine/meta/".concat(data.component.toLowerCase(), ".props.default.json"));
|
|
136
|
-
var _id = "".concat(data.component.toLowerCase(), "_").concat((0,
|
|
171
|
+
var _id = "".concat(data.component.toLowerCase(), "_").concat((0, _utils.suid)());
|
|
137
172
|
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
138
|
-
(0, _dataProcess.add)(cloneData,
|
|
139
|
-
context._setPageData(cloneData)
|
|
140
|
-
setTimeout(function () {
|
|
173
|
+
(0, _dataProcess.add)(cloneData, operatorId.selector, _id, json);
|
|
174
|
+
context._setPageData(cloneData).then(function (newData) {
|
|
141
175
|
context.$publisher(context.topics.COMPONENT_APPEND, {
|
|
142
176
|
id: _id,
|
|
143
|
-
pageData:
|
|
177
|
+
pageData: newData
|
|
144
178
|
});
|
|
145
179
|
});
|
|
146
180
|
}).watch();
|
|
@@ -148,22 +182,68 @@ var Design = function Design() {
|
|
|
148
182
|
return context.$unsubscriber(context.topics.COMPONENT_SETTING_CLICK, csid);
|
|
149
183
|
};
|
|
150
184
|
}, [context.pageData]);
|
|
185
|
+
var getDomById = (0, _ahooks.useMemoizedFn)(function (id) {
|
|
186
|
+
return context.componentMap.get(id).dom;
|
|
187
|
+
});
|
|
188
|
+
var handleLangChange = (0, _ahooks.useMemoizedFn)(function (locale) {
|
|
189
|
+
if (_moment.default !== null && _moment.default !== void 0 && _moment.default.locale) {
|
|
190
|
+
var _localeInfo$locale;
|
|
191
|
+
_moment.default.locale(((_localeInfo$locale = _umi.localeInfo[locale]) === null || _localeInfo$locale === void 0 ? void 0 : _localeInfo$locale.momentLocale) || 'en');
|
|
192
|
+
}
|
|
193
|
+
setLocale(locale);
|
|
194
|
+
setContainerIntl((0, _umi.getIntl)(locale));
|
|
195
|
+
});
|
|
196
|
+
var handleSelect = function handleSelect(_key) {
|
|
197
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, _key ? {
|
|
198
|
+
id: _key,
|
|
199
|
+
cellNode: getDomById(_key)
|
|
200
|
+
} : null);
|
|
201
|
+
};
|
|
202
|
+
var handleHover = function handleHover(_key) {
|
|
203
|
+
context.$publisher(context.topics.COMPONENT_HOVER, _key ? {
|
|
204
|
+
id: _key,
|
|
205
|
+
cellNode: getDomById(_key)
|
|
206
|
+
} : null);
|
|
207
|
+
};
|
|
208
|
+
var menu = (0, _ahooks.useCreation)(function () {
|
|
209
|
+
if ((acticeProps === null || acticeProps === void 0 ? void 0 : acticeProps.length) > 0) return /*#__PURE__*/_react.default.createElement("div", {
|
|
210
|
+
className: _design.default['next-overlay-wrapper'],
|
|
211
|
+
onMouseLeave: function onMouseLeave() {
|
|
212
|
+
return handleHover();
|
|
213
|
+
}
|
|
214
|
+
}, (0, _lodash.reverse)((0, _lodash.initial)(acticeProps)).map(function (m) {
|
|
215
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
216
|
+
key: m.id
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
218
|
+
onClick: function onClick() {
|
|
219
|
+
return handleSelect(m.id);
|
|
220
|
+
},
|
|
221
|
+
onMouseOver: function onMouseOver() {
|
|
222
|
+
return handleHover(m.id);
|
|
223
|
+
}
|
|
224
|
+
}, m.name));
|
|
225
|
+
}));
|
|
226
|
+
return [];
|
|
227
|
+
}, [acticeProps]);
|
|
228
|
+
console.log('operatorId', operatorId);
|
|
151
229
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
152
230
|
className: _design.default['lc-painter-design']
|
|
153
231
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
154
232
|
className: _design.default['lc-painter-design-toolbar']
|
|
155
233
|
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
156
234
|
size: "small",
|
|
157
|
-
|
|
235
|
+
value: langList ? locale : undefined,
|
|
158
236
|
className: _design.default['i18n-selecter'],
|
|
159
237
|
style: {
|
|
160
238
|
fontSize: 12
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
239
|
+
},
|
|
240
|
+
onSelect: handleLangChange
|
|
241
|
+
}, langList === null || langList === void 0 ? void 0 : langList.map(function (item) {
|
|
242
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
243
|
+
key: item.field,
|
|
244
|
+
value: item.field
|
|
245
|
+
}, item.title);
|
|
246
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
167
247
|
className: (0, _classnames.default)(_design.default['toolbar-item'], (0, _defineProperty2.default)({}, _design.default.actived, activedTarget === 'pc')),
|
|
168
248
|
onClick: function onClick() {
|
|
169
249
|
return setActivedTarget('pc');
|
|
@@ -188,31 +268,61 @@ var Design = function Design() {
|
|
|
188
268
|
onClick: function onClick() {
|
|
189
269
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
190
270
|
id: _constants.CELL_KEY.PAGE_ROOT,
|
|
191
|
-
cellNode:
|
|
271
|
+
cellNode: getDomById(_constants.CELL_KEY.PAGE_ROOT)
|
|
192
272
|
});
|
|
193
273
|
}
|
|
194
274
|
}, "\u9875\u9762\u5C5E\u6027"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
195
275
|
type: "vertical"
|
|
276
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
277
|
+
size: "small",
|
|
278
|
+
style: {
|
|
279
|
+
fontSize: 12,
|
|
280
|
+
margin: '0 2px'
|
|
281
|
+
}
|
|
282
|
+
}, "\u9884\u89C8"), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
283
|
+
type: "vertical"
|
|
196
284
|
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
197
285
|
size: "small",
|
|
198
286
|
type: "primary",
|
|
199
287
|
style: {
|
|
200
|
-
fontSize: 12
|
|
288
|
+
fontSize: 12,
|
|
289
|
+
margin: '0 0 0 2px'
|
|
201
290
|
}
|
|
202
291
|
}, "\u4FDD\u5B58")), /*#__PURE__*/_react.default.createElement("div", {
|
|
203
292
|
className: _design.default['lc-painter-design-workspace']
|
|
204
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
293
|
+
}, operatorId.detector && /*#__PURE__*/_react.default.createElement("div", {
|
|
205
294
|
id: "lc-detector",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
295
|
+
className: _design.default['lc-painter-design-detector'],
|
|
296
|
+
style: getOperatorStyle(simulatorRef.current, getDomById(operatorId.detector))
|
|
297
|
+
}), operatorId.selector && /*#__PURE__*/_react.default.createElement("div", {
|
|
209
298
|
id: "lc-selector",
|
|
210
299
|
ref: selectorRef,
|
|
211
|
-
className: _design.default['lc-painter-design-selector']
|
|
212
|
-
|
|
300
|
+
className: _design.default['lc-painter-design-selector'],
|
|
301
|
+
style: getOperatorStyle(simulatorRef.current, getDomById(operatorId.selector))
|
|
302
|
+
}, acticeProps && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
303
|
+
className: _design.default['lc-borders-actions'],
|
|
304
|
+
style: (0, _lodash.last)(acticeProps).id === "page_root" ? {
|
|
305
|
+
top: 0
|
|
306
|
+
} : ((_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.offsetTop) < 23 ? {
|
|
307
|
+
bottom: '-23px'
|
|
308
|
+
} : {
|
|
309
|
+
top: '-23px'
|
|
310
|
+
}
|
|
311
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
312
|
+
overlay: menu,
|
|
313
|
+
placement: "bottomLeft"
|
|
314
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
315
|
+
className: "instance-node-selector"
|
|
316
|
+
}, (0, _lodash.last)(acticeProps).name)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
317
|
+
type: "delete"
|
|
318
|
+
}))))), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
319
|
+
locale: ((_localeInfo$locale2 = _umi.localeInfo[locale]) === null || _localeInfo$locale2 === void 0 ? void 0 : _localeInfo$locale2.antd) || {}
|
|
320
|
+
}, /*#__PURE__*/_react.default.createElement(_umi.RawIntlProvider, {
|
|
321
|
+
value: intl
|
|
322
|
+
}, /*#__PURE__*/_react.default.createElement(_Page.default, {
|
|
213
323
|
ref: simulatorRef,
|
|
214
324
|
pageCode: "mk2i87qb",
|
|
215
325
|
className: _design.default['lc-painter-design-simulator']
|
|
216
|
-
})));
|
|
326
|
+
})))));
|
|
217
327
|
};
|
|
218
328
|
var _default = exports.default = Design;
|
|
@@ -18,14 +18,14 @@ var _luckDesign = require("luck-design");
|
|
|
18
18
|
var _lodash = require("lodash");
|
|
19
19
|
var _antd = require("luck-design/antd");
|
|
20
20
|
var _utils = require("@luck-design-biz/base/utils");
|
|
21
|
-
var
|
|
21
|
+
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
22
22
|
var _I18n = require("./services/I18n");
|
|
23
23
|
var _getDvaApp;
|
|
24
24
|
var Search = _antd.Input.Search;
|
|
25
25
|
var _getDvaApp$_store = (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store,
|
|
26
26
|
dispatch = _getDvaApp$_store.dispatch;
|
|
27
27
|
var getLangKey = function getLangKey() {
|
|
28
|
-
return "app.lowcode.".concat((0,
|
|
28
|
+
return "app.lowcode.".concat((0, _utils.suid)());
|
|
29
29
|
};
|
|
30
30
|
var formatDataFunc = function formatDataFunc(data) {
|
|
31
31
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, data), (0, _lodash.reduce)(data.languages, function (ret, value, key) {
|
|
@@ -34,6 +34,7 @@ var formatDataFunc = function formatDataFunc(data) {
|
|
|
34
34
|
}, {}));
|
|
35
35
|
};
|
|
36
36
|
var I18n = function I18n() {
|
|
37
|
+
var context = (0, _ContextProvider.useLDContext)();
|
|
37
38
|
var _useState = (0, _react.useState)([]),
|
|
38
39
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
39
40
|
langList = _useState2[0],
|
|
@@ -67,8 +68,11 @@ var I18n = function I18n() {
|
|
|
67
68
|
case 2:
|
|
68
69
|
_langList = _context.sent;
|
|
69
70
|
setLangList(_langList);
|
|
71
|
+
context.$publisher(context.topics.LANG_SETTING_SELECT, {
|
|
72
|
+
langList: _langList
|
|
73
|
+
});
|
|
70
74
|
doQuery();
|
|
71
|
-
case
|
|
75
|
+
case 6:
|
|
72
76
|
case "end":
|
|
73
77
|
return _context.stop();
|
|
74
78
|
}
|
|
File without changes
|
|
@@ -56,7 +56,12 @@ var Panel = function Panel() {
|
|
|
56
56
|
console.log('handleChange', activeNode, field, value);
|
|
57
57
|
var cloneData = (0, _lodash.cloneDeep)(context.pageData);
|
|
58
58
|
(0, _dataProcess.modifyById)(cloneData, activeNode.node.id, (0, _objectSpread3.default)((0, _objectSpread3.default)({}, activeNode.node), {}, (0, _defineProperty2.default)({}, field, value)));
|
|
59
|
-
context._setPageData(cloneData)
|
|
59
|
+
context._setPageData(cloneData).then(function (newData) {
|
|
60
|
+
context.$publisher(context.topics.COMPONENT_MODIFY, {
|
|
61
|
+
id: activeNode.node.id,
|
|
62
|
+
pageData: (0, _lodash.cloneDeep)(newData)
|
|
63
|
+
});
|
|
64
|
+
});
|
|
60
65
|
setFalse();
|
|
61
66
|
});
|
|
62
67
|
var renderPanelItems = (0, _ahooks.useMemoizedFn)(function (items) {
|
|
@@ -67,7 +72,7 @@ var Panel = function Panel() {
|
|
|
67
72
|
label: item.name
|
|
68
73
|
}, Comp && /*#__PURE__*/_react.default.createElement(Comp, {
|
|
69
74
|
field: item.key,
|
|
70
|
-
|
|
75
|
+
defaultValue: activeNode.node[item.key],
|
|
71
76
|
next: function next() {
|
|
72
77
|
if (!item.next) return;
|
|
73
78
|
nextRef.current = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,11 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
15
|
var _antd = require("luck-design/antd");
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
17
|
var _ruleInput = _interopRequireDefault(require("../style/rule-input.less"));
|
|
16
18
|
var _excluded = ["onValueChange", "rules", "value"];
|
|
17
19
|
/**
|
|
@@ -92,16 +94,14 @@ var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
92
94
|
onValueChange(e, value);
|
|
93
95
|
} else {
|
|
94
96
|
setErr(error);
|
|
95
|
-
console.
|
|
97
|
+
console.error(error);
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
|
-
var className = _ruleInput.default['lc-painter-components-ruleinput'];
|
|
99
|
-
if (err) className += ' ' + _ruleInput.default['err'];
|
|
100
100
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
101
101
|
title: err,
|
|
102
102
|
visible: err
|
|
103
103
|
}, /*#__PURE__*/_react.default.createElement(_antd.Input, (0, _extends2.default)({
|
|
104
|
-
className:
|
|
104
|
+
className: (0, _classnames.default)(_ruleInput.default['lc-painter-components-ruleinput'], (0, _defineProperty2.default)({}, _ruleInput.default.err, !!err)),
|
|
105
105
|
size: "small",
|
|
106
106
|
value: inputValue // 绑定输入值
|
|
107
107
|
,
|