@luck-design-biz/luckda 0.0.24-2 → 0.0.25-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Builder/index.js +6 -4
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +133 -0
- package/es/components/LDActions/index.less +65 -0
- package/es/components/LdAutoForm/index.js +1 -1
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdGrid/index.js +14 -8
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +230 -0
- package/es/lowcode/constants/api-url.js +464 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +31 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +4 -3
- package/es/lowcode/engine/meta/box.props.json +2 -4
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +9 -9
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +2 -3
- package/es/lowcode/engine/meta/components-list.json +1 -1
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +1 -2
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +1 -2
- package/es/lowcode/engine/meta/form.props.default.json +52 -4
- package/es/lowcode/engine/meta/form.props.json +596 -64
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +5 -2
- package/es/lowcode/engine/meta/image.props.json +3 -3
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +2 -2
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/es/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/es/lowcode/engine/meta/jsx.props.json +10 -5
- package/es/lowcode/engine/meta/layout.props.default.json +5 -2
- package/es/lowcode/engine/meta/layout.props.json +1 -2
- package/es/lowcode/engine/meta/link.props.default.json +5 -2
- package/es/lowcode/engine/meta/link.props.json +3 -3
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +49 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/section.props.default.json +7 -6
- package/es/lowcode/engine/meta/section.props.json +52 -49
- package/es/lowcode/engine/meta/split.props.default.json +9 -4
- package/es/lowcode/engine/meta/split.props.json +14 -29
- package/es/lowcode/engine/meta/table.props.default.json +23 -3
- package/es/lowcode/engine/meta/table.props.json +257 -55
- package/es/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/es/lowcode/engine/meta/tabs.props.json +57 -81
- package/es/lowcode/engine/meta/text.props.default.json +5 -2
- package/es/lowcode/engine/meta/text.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +20 -7
- package/es/lowcode/engine/meta/tree.props.json +225 -79
- package/es/lowcode/engine/provider/ContextProvider/index.js +177 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +174 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +97 -18
- package/es/lowcode/engine/tools/useCanvasRender.js +73 -0
- package/es/lowcode/engine/tools/usePromiseState.js +23 -12
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +1 -0
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +34 -2
- package/es/lowcode/painter/DesignOperator.js +48 -31
- package/es/lowcode/painter/DesignToolbar.js +324 -16
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +99 -142
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +293 -0
- package/es/lowcode/painter/components/AdvancePanel.js +140 -0
- package/es/lowcode/painter/components/AttrsPanel.js +145 -0
- package/es/lowcode/painter/components/Collapse.js +20 -9
- package/es/lowcode/painter/components/ColorInput.js +5 -3
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +50 -0
- package/es/lowcode/painter/components/DragDrop/Overlay.js +8 -0
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +67 -0
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/ListEditor.js +26 -11
- package/es/lowcode/painter/components/PanelItem.js +1 -1
- package/es/lowcode/painter/components/PopConfirm.js +10 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +154 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +126 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +116 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +438 -0
- package/es/lowcode/painter/components/field-setting/index.js +373 -0
- package/es/lowcode/painter/index.js +3 -28
- package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +74 -13
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +27 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +45 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +235 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +329 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
- package/es/lowcode/painter/panel-section/Icon.js +14 -14
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +6 -7
- package/es/lowcode/painter/panel-section/SerialsSelector.js +44 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +248 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -22
- package/es/lowcode/painter/panel-section/TabItems.js +46 -30
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +66 -6
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/collapse.less +6 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +7 -4
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/list-editor.less +36 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +27 -0
- package/es/lowcode/view/Canvas.js +34 -139
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +16 -14
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +11 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +2 -4
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +43 -20
- package/es/lowcode/view/lc-components/Button/meta.json +9 -9
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +2 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -24
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +1 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/es/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +1 -2
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +93 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +290 -13
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +546 -64
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +2 -2
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +3 -3
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +19 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +23 -22
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Layout/index.js +1 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +3 -3
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +53 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +38 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +40 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +23 -0
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +115 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +48 -49
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +57 -2
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +46 -7
- package/es/lowcode/view/lc-components/Split/meta.json +10 -29
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +41 -4
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +365 -48
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +70 -2
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +113 -10
- package/es/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +3 -3
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +323 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/es/lowcode/view/lc-components/Wrapper.js +44 -27
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- package/es/upload/Form/gridForm.js +7 -3
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +4 -1
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +141 -0
- package/lib/components/LDActions/index.less +65 -0
- package/lib/components/LdAutoForm/index.js +1 -1
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGridForm/index.js +4 -3
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +236 -0
- package/lib/lowcode/constants/api-url.js +465 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +32 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +4 -3
- package/lib/lowcode/engine/meta/box.props.json +2 -4
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +9 -9
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +2 -3
- package/lib/lowcode/engine/meta/components-list.json +1 -1
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +1 -2
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +1 -2
- package/lib/lowcode/engine/meta/form.props.default.json +52 -4
- package/lib/lowcode/engine/meta/form.props.json +596 -64
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +5 -2
- package/lib/lowcode/engine/meta/image.props.json +3 -3
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +2 -2
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/lib/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/lib/lowcode/engine/meta/jsx.props.json +10 -5
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -2
- package/lib/lowcode/engine/meta/layout.props.json +1 -2
- package/lib/lowcode/engine/meta/link.props.default.json +5 -2
- package/lib/lowcode/engine/meta/link.props.json +3 -3
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +49 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/section.props.default.json +7 -6
- package/lib/lowcode/engine/meta/section.props.json +52 -49
- package/lib/lowcode/engine/meta/split.props.default.json +9 -4
- package/lib/lowcode/engine/meta/split.props.json +14 -29
- package/lib/lowcode/engine/meta/table.props.default.json +23 -3
- package/lib/lowcode/engine/meta/table.props.json +257 -55
- package/lib/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/lib/lowcode/engine/meta/tabs.props.json +57 -81
- package/lib/lowcode/engine/meta/text.props.default.json +5 -2
- package/lib/lowcode/engine/meta/text.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +20 -7
- package/lib/lowcode/engine/meta/tree.props.json +225 -79
- package/lib/lowcode/engine/provider/ContextProvider/index.js +185 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +182 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +101 -17
- package/lib/lowcode/engine/tools/useCanvasRender.js +88 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +22 -12
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +7 -0
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +32 -0
- package/lib/lowcode/painter/DesignOperator.js +45 -28
- package/lib/lowcode/painter/DesignToolbar.js +321 -13
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +96 -139
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +300 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +148 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +153 -0
- package/lib/lowcode/painter/components/Collapse.js +20 -9
- package/lib/lowcode/painter/components/ColorInput.js +5 -3
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +57 -0
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +15 -0
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +75 -0
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +25 -10
- package/lib/lowcode/painter/components/PanelItem.js +1 -1
- package/lib/lowcode/painter/components/PopConfirm.js +10 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +161 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +133 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +123 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +446 -0
- package/lib/lowcode/painter/components/field-setting/index.js +380 -0
- package/lib/lowcode/painter/index.js +3 -30
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +20 -66
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +71 -10
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +34 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +52 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +242 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +337 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
- package/lib/lowcode/painter/panel-section/Icon.js +16 -14
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +5 -6
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +51 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +256 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -23
- package/lib/lowcode/painter/panel-section/TabItems.js +45 -29
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +67 -6
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/collapse.less +6 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +7 -4
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/list-editor.less +36 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +35 -0
- package/lib/lowcode/view/Canvas.js +32 -145
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +12 -10
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +11 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +2 -4
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +41 -18
- package/lib/lowcode/view/lc-components/Button/meta.json +9 -9
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +2 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +15 -24
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +94 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +289 -12
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +546 -64
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +3 -3
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +19 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +24 -22
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +1 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +61 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +46 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +48 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +30 -0
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +31 -2
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +114 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +58 -2
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +45 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +10 -29
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +43 -5
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +364 -47
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +71 -2
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +112 -9
- package/lib/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +321 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/lib/lowcode/view/lc-components/Wrapper.js +42 -25
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/upload/Form/gridForm.js +7 -3
- package/lib/utils/grid.js +2 -2
- package/package.json +12 -7
- package/es/lowcode/engine/provider/ContextProvider.js +0 -169
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +0 -147
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -177
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { createContext, useContext as useReactContext, useRef } from 'react';
|
|
4
|
+
import { history } from 'umi';
|
|
5
|
+
import { useMemoizedFn, useSetState } from 'ahooks';
|
|
6
|
+
import { get, isNil, isArray, isFunction, isObject, isString, reduce } from 'lodash';
|
|
7
|
+
import { useLDEventBus } from "../EventBusProvider";
|
|
8
|
+
import RemoteSourceProvider, { RemoteSourceContext } from "../RemoteSourceProvider";
|
|
9
|
+
import useTodo from "../../tools/useTodo";
|
|
10
|
+
import { findNodeAndParent } from "../../tools/dataProcess";
|
|
11
|
+
import * as topics from "../../../constants/event-topics";
|
|
12
|
+
export var Context = /*#__PURE__*/createContext(null);
|
|
13
|
+
export var useContext = function useContext() {
|
|
14
|
+
return useReactContext(Context);
|
|
15
|
+
};
|
|
16
|
+
export var usePageData = function usePageData(_) {
|
|
17
|
+
var _useReactContext = useReactContext(RemoteSourceContext),
|
|
18
|
+
pageData = _useReactContext.pageData,
|
|
19
|
+
loading = _useReactContext.loading,
|
|
20
|
+
setPageData = _useReactContext.setPageData,
|
|
21
|
+
back = _useReactContext.back,
|
|
22
|
+
forward = _useReactContext.forward,
|
|
23
|
+
backLength = _useReactContext.backLength,
|
|
24
|
+
forwardLength = _useReactContext.forwardLength;
|
|
25
|
+
var _pageData;
|
|
26
|
+
if (isNil(_)) {
|
|
27
|
+
_pageData = pageData;
|
|
28
|
+
} else if (isFunction(_)) {
|
|
29
|
+
_pageData = _(pageData);
|
|
30
|
+
} else if (isArray(_)) {
|
|
31
|
+
_pageData = reduce(_, function (r, k) {
|
|
32
|
+
r.push(get(pageData, k));
|
|
33
|
+
return r;
|
|
34
|
+
}, []);
|
|
35
|
+
} else if (isObject(_) && _.id) {
|
|
36
|
+
var _findNodeAndParent;
|
|
37
|
+
_pageData = (_findNodeAndParent = findNodeAndParent(_.id, pageData)) === null || _findNodeAndParent === void 0 ? void 0 : _findNodeAndParent.node;
|
|
38
|
+
} else if (isString(_)) {
|
|
39
|
+
_pageData = get(pageData, _);
|
|
40
|
+
}
|
|
41
|
+
return [_pageData, {
|
|
42
|
+
loading: loading,
|
|
43
|
+
setPageData: setPageData,
|
|
44
|
+
back: back,
|
|
45
|
+
forward: forward,
|
|
46
|
+
backLength: backLength,
|
|
47
|
+
forwardLength: forwardLength
|
|
48
|
+
}];
|
|
49
|
+
};
|
|
50
|
+
export var useRemoteSource = function useRemoteSource() {
|
|
51
|
+
return useReactContext(RemoteSourceContext);
|
|
52
|
+
};
|
|
53
|
+
var PRIVATE_KEYS = ['componentList', 'componentMap'];
|
|
54
|
+
export default (function (_ref) {
|
|
55
|
+
var children = _ref.children,
|
|
56
|
+
code = _ref.code;
|
|
57
|
+
var eventBus = useLDEventBus();
|
|
58
|
+
var _useTodo = useTodo(),
|
|
59
|
+
_useTodo2 = _slicedToArray(_useTodo, 2),
|
|
60
|
+
todo = _useTodo2[0],
|
|
61
|
+
callBehavior = _useTodo2[1];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 页面公共资源
|
|
65
|
+
*/
|
|
66
|
+
var _useSetState = useSetState(null),
|
|
67
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
68
|
+
pagePublicResource = _useSetState2[0],
|
|
69
|
+
_setPagePublicResource = _useSetState2[1];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 组件列表
|
|
73
|
+
*/
|
|
74
|
+
var _componentList = useRef([]);
|
|
75
|
+
var _privateGetter = useRef({
|
|
76
|
+
componentList: function componentList() {
|
|
77
|
+
return _componentList.current;
|
|
78
|
+
},
|
|
79
|
+
componentMap: function componentMap() {
|
|
80
|
+
return new Map(_componentList.current);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 注册组件
|
|
86
|
+
* id:string 组件id
|
|
87
|
+
* component:ReactNode 组件
|
|
88
|
+
*/
|
|
89
|
+
var _register = useMemoizedFn(function (id, component) {
|
|
90
|
+
_componentList.current.push([id, component]);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 注销组件
|
|
95
|
+
* id:string 组件id
|
|
96
|
+
*/
|
|
97
|
+
var _unregister = useMemoizedFn(function (id) {
|
|
98
|
+
_componentList.current = _componentList.current.filter(function (_ref2) {
|
|
99
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
100
|
+
_id = _ref3[0];
|
|
101
|
+
return _id !== id;
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 根据组件id获取组件
|
|
107
|
+
* compId:string 组件id
|
|
108
|
+
* return:ReactNode
|
|
109
|
+
*/
|
|
110
|
+
var getElementById = useMemoizedFn(function (compId) {});
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 根据组件id获取父组件
|
|
114
|
+
* compId:string 组件id
|
|
115
|
+
* return:ReactNode
|
|
116
|
+
*/
|
|
117
|
+
var getParentElement = useMemoizedFn(function (compId) {});
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 根据组件id获取组件路径
|
|
121
|
+
* compId:string 组件id
|
|
122
|
+
* return:ReactNode
|
|
123
|
+
*/
|
|
124
|
+
var getElementPathById = useMemoizedFn(function (compId) {});
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 获取url参数
|
|
128
|
+
* return:object
|
|
129
|
+
*/
|
|
130
|
+
var getUrlParams = useMemoizedFn(function () {});
|
|
131
|
+
var ctx = new Proxy(_objectSpread({
|
|
132
|
+
_setPagePublicResource: _setPagePublicResource,
|
|
133
|
+
_register: _register,
|
|
134
|
+
_unregister: _unregister,
|
|
135
|
+
pagePublicResource: pagePublicResource,
|
|
136
|
+
history: history,
|
|
137
|
+
callBehavior: callBehavior,
|
|
138
|
+
topics: topics,
|
|
139
|
+
getElementById: getElementById,
|
|
140
|
+
/**
|
|
141
|
+
* @method
|
|
142
|
+
* @param {string} id - 组件id
|
|
143
|
+
* @return {object}
|
|
144
|
+
*/
|
|
145
|
+
getParentElement: getParentElement,
|
|
146
|
+
getElementPathById: getElementPathById,
|
|
147
|
+
doAction: function doAction(actionPool, args) {
|
|
148
|
+
return todo(this, actionPool, args);
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* @method
|
|
152
|
+
* @return {object}
|
|
153
|
+
*/
|
|
154
|
+
getUrlParams: getUrlParams
|
|
155
|
+
}, eventBus), {
|
|
156
|
+
get: function get(target, property, receiver) {
|
|
157
|
+
if (PRIVATE_KEYS.includes(property)) {
|
|
158
|
+
var _privateGetter$curren;
|
|
159
|
+
return (_privateGetter$curren = _privateGetter.current) === null || _privateGetter$curren === void 0 ? void 0 : _privateGetter$curren[property]();
|
|
160
|
+
}
|
|
161
|
+
return Reflect.get(target, property, receiver);
|
|
162
|
+
},
|
|
163
|
+
set: function set(target, property, receiver) {
|
|
164
|
+
if (PRIVATE_KEYS.includes(property)) {
|
|
165
|
+
throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u53EA\u8BFB\u7684"));
|
|
166
|
+
} else {
|
|
167
|
+
return Reflect.set(target, property, receiver);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
172
|
+
value: ctx
|
|
173
|
+
}, /*#__PURE__*/React.createElement(RemoteSourceProvider, {
|
|
174
|
+
code: code,
|
|
175
|
+
runtime: eventBus.runtime
|
|
176
|
+
}, children));
|
|
177
|
+
});
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
+
var _excluded = ["source"];
|
|
8
|
+
import React, { createContext, useRef } from 'react';
|
|
9
|
+
import { useRequest, useSetState, useAsyncEffect, useMemoizedFn, useCookieState, useCreation, useUnmount } from 'ahooks';
|
|
10
|
+
import { LuckDaContext } from "../../../components/Builder";
|
|
11
|
+
import { doAction as doActionUtils } from "../../../helper/action";
|
|
12
|
+
import usePromiseState from "../tools/usePromiseState";
|
|
13
|
+
import { decompress } from "../tools/dataProcess";
|
|
14
|
+
import { fetchPageData, fetchDesignModlueData, fetchPreviewModlueData, fetchModlueData, fetchAllDataset, fetchAllSerials } from "../../constants/api-url";
|
|
15
|
+
import { RUNTIME, COOKIE_RUNTIME_KEY, DATA_MODEL_CODE_KEY } from "../../constants";
|
|
16
|
+
export var RemoteSourceContext = /*#__PURE__*/createContext(null);
|
|
17
|
+
export default (function (_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
code = _ref.code,
|
|
20
|
+
runtime = _ref.runtime;
|
|
21
|
+
var _usePromiseState = usePromiseState(null),
|
|
22
|
+
_usePromiseState2 = _slicedToArray(_usePromiseState, 3),
|
|
23
|
+
pageData = _usePromiseState2[0],
|
|
24
|
+
setPageData = _usePromiseState2[1],
|
|
25
|
+
_usePromiseState2$ = _usePromiseState2[2],
|
|
26
|
+
back = _usePromiseState2$.back,
|
|
27
|
+
forward = _usePromiseState2$.forward,
|
|
28
|
+
backLength = _usePromiseState2$.backLength,
|
|
29
|
+
forwardLength = _usePromiseState2$.forwardLength;
|
|
30
|
+
var _useSetState = useSetState({}),
|
|
31
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
32
|
+
remoteSource = _useSetState2[0],
|
|
33
|
+
setRemoteSource = _useSetState2[1];
|
|
34
|
+
var _useCookieState = useCookieState(COOKIE_RUNTIME_KEY),
|
|
35
|
+
_useCookieState2 = _slicedToArray(_useCookieState, 2),
|
|
36
|
+
cookieRuntime = _useCookieState2[0],
|
|
37
|
+
setRuntime = _useCookieState2[1];
|
|
38
|
+
var prevRuntime = useRef(cookieRuntime);
|
|
39
|
+
useCreation(function () {
|
|
40
|
+
if (runtime !== cookieRuntime) {
|
|
41
|
+
prevRuntime.current = cookieRuntime;
|
|
42
|
+
setRuntime(runtime);
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
45
|
+
useUnmount(function () {
|
|
46
|
+
setRuntime(prevRuntime.current);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// 获取页面数据
|
|
50
|
+
var _useRequest = useRequest(fetchPageData, {
|
|
51
|
+
manual: true
|
|
52
|
+
}),
|
|
53
|
+
fetchPageDataLoading = _useRequest.loading,
|
|
54
|
+
runFetchPageData = _useRequest.runAsync;
|
|
55
|
+
// 获取模块数据
|
|
56
|
+
var _useRequest2 = useRequest(_defineProperty(_defineProperty(_defineProperty({}, RUNTIME.DESIGN, fetchDesignModlueData), RUNTIME.PREVIEW, fetchPreviewModlueData), RUNTIME.LIVE, fetchModlueData)[runtime], {
|
|
57
|
+
manual: true,
|
|
58
|
+
onSuccess: function onSuccess(_ref2) {
|
|
59
|
+
var code = _ref2.code,
|
|
60
|
+
data = _ref2.data;
|
|
61
|
+
if (code === 1) {
|
|
62
|
+
setRemoteSource({
|
|
63
|
+
module: data
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
fetchModlueDataLoading = _useRequest2.loading,
|
|
69
|
+
runFetchModlueData = _useRequest2.runAsync,
|
|
70
|
+
refreshModlueData = _useRequest2.refreshAsync;
|
|
71
|
+
// 获取数据集数据
|
|
72
|
+
var _useRequest3 = useRequest(fetchAllDataset, {
|
|
73
|
+
manual: true,
|
|
74
|
+
onSuccess: function onSuccess(_ref3) {
|
|
75
|
+
var code = _ref3.code,
|
|
76
|
+
data = _ref3.data;
|
|
77
|
+
if (code === 1) {
|
|
78
|
+
setRemoteSource({
|
|
79
|
+
dataset: data
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
fetchAllDatasetLoading = _useRequest3.loading,
|
|
85
|
+
runFetchAllDataset = _useRequest3.run,
|
|
86
|
+
refreshDataset = _useRequest3.refreshAsync;
|
|
87
|
+
// 获取资源串数据
|
|
88
|
+
var _useRequest4 = useRequest(fetchAllSerials, {
|
|
89
|
+
manual: true,
|
|
90
|
+
onSuccess: function onSuccess(_ref4) {
|
|
91
|
+
var code = _ref4.code,
|
|
92
|
+
list = _ref4.list,
|
|
93
|
+
detail = _ref4.detail;
|
|
94
|
+
if (code === 1) {
|
|
95
|
+
setRemoteSource({
|
|
96
|
+
serials: list.map(function (id) {
|
|
97
|
+
return detail[id];
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
fetchAllSerialsLoading = _useRequest4.loading,
|
|
104
|
+
runFetchAllSerials = _useRequest4.run,
|
|
105
|
+
refreshSerials = _useRequest4.refreshAsync;
|
|
106
|
+
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
107
|
+
var fetchPageDataRes, data, list, detail, _detail$list$, source, info;
|
|
108
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
109
|
+
while (1) switch (_context.prev = _context.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context.next = 2;
|
|
112
|
+
return runFetchPageData({
|
|
113
|
+
code: code
|
|
114
|
+
});
|
|
115
|
+
case 2:
|
|
116
|
+
fetchPageDataRes = _context.sent;
|
|
117
|
+
if (!(fetchPageDataRes.code === 1)) {
|
|
118
|
+
_context.next = 13;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
data = fetchPageDataRes.data, list = fetchPageDataRes.list, detail = fetchPageDataRes.detail;
|
|
122
|
+
_detail$list$ = detail[list[0]], source = _detail$list$.source, info = _objectWithoutProperties(_detail$list$, _excluded);
|
|
123
|
+
window[DATA_MODEL_CODE_KEY] = data.dataModelKey;
|
|
124
|
+
_context.next = 9;
|
|
125
|
+
return runFetchModlueData(data.dataModelKey, {
|
|
126
|
+
moduleCode: data.moduleCode
|
|
127
|
+
});
|
|
128
|
+
case 9:
|
|
129
|
+
runFetchAllDataset({
|
|
130
|
+
dataModelKey: data.dataModelKey
|
|
131
|
+
});
|
|
132
|
+
runFetchAllSerials({
|
|
133
|
+
uid: data.moduleId
|
|
134
|
+
});
|
|
135
|
+
setRemoteSource({
|
|
136
|
+
pageinfo: _objectSpread({
|
|
137
|
+
relationship: data
|
|
138
|
+
}, info)
|
|
139
|
+
});
|
|
140
|
+
setPageData(decompress(source));
|
|
141
|
+
case 13:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context.stop();
|
|
144
|
+
}
|
|
145
|
+
}, _callee);
|
|
146
|
+
})), [code]);
|
|
147
|
+
var doAction = useMemoizedFn(function (_action, _data, _params) {
|
|
148
|
+
doActionUtils(_action, _data, _params, {
|
|
149
|
+
actions: remoteSource.module.actions,
|
|
150
|
+
moduleCode: remoteSource.module.moduleCode
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
return /*#__PURE__*/React.createElement(RemoteSourceContext.Provider, {
|
|
154
|
+
value: _objectSpread(_objectSpread({
|
|
155
|
+
pageData: pageData
|
|
156
|
+
}, remoteSource), {}, {
|
|
157
|
+
loading: fetchPageDataLoading || fetchModlueDataLoading,
|
|
158
|
+
fetchAllDatasetLoading: fetchAllDatasetLoading,
|
|
159
|
+
fetchAllSerialsLoading: fetchAllSerialsLoading,
|
|
160
|
+
refreshModlueData: refreshModlueData,
|
|
161
|
+
refreshDataset: refreshDataset,
|
|
162
|
+
refreshSerials: refreshSerials,
|
|
163
|
+
setPageData: setPageData,
|
|
164
|
+
back: back,
|
|
165
|
+
forward: forward,
|
|
166
|
+
backLength: backLength,
|
|
167
|
+
forwardLength: forwardLength
|
|
168
|
+
})
|
|
169
|
+
}, /*#__PURE__*/React.createElement(LuckDaContext.Provider, {
|
|
170
|
+
value: _objectSpread(_objectSpread({}, remoteSource.module), {}, {
|
|
171
|
+
doAction: doAction
|
|
172
|
+
})
|
|
173
|
+
}, children));
|
|
174
|
+
});
|
|
@@ -3,7 +3,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
5
5
|
import * as LZString from 'lz-string';
|
|
6
|
-
import {
|
|
6
|
+
import { LC_BUILDIN_UNIT_KEY } from "../../constants";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 数据压缩
|
|
@@ -149,6 +149,68 @@ export function add(json, parentId, id, data) {
|
|
|
149
149
|
process(json, getPathById(json, parentId), id, data);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* 移动指定的节点到另一个节点的指定位置。
|
|
154
|
+
*
|
|
155
|
+
* @param {Object} json - 要操作的JSON对象。
|
|
156
|
+
* @param {string} sid - 被移动的节点id
|
|
157
|
+
* @param {string} tid - 目标节点id
|
|
158
|
+
* @param {string} action - 'left': 往节点前面插入,'right':往节点后面插,'inside':往节点子节点插
|
|
159
|
+
*/
|
|
160
|
+
export function move(json, sid, tid, action) {
|
|
161
|
+
// 验证节点存在性
|
|
162
|
+
var _findNodeAndParent3 = findNodeAndParent(sid, json),
|
|
163
|
+
sourceNode = _findNodeAndParent3.node,
|
|
164
|
+
sourceParent = _findNodeAndParent3.parent;
|
|
165
|
+
var _findNodeAndParent4 = findNodeAndParent(tid, json),
|
|
166
|
+
targetNode = _findNodeAndParent4.node,
|
|
167
|
+
targetParent = _findNodeAndParent4.parent;
|
|
168
|
+
if (!sourceNode || !targetNode) {
|
|
169
|
+
throw new Error('Source or target node does not exist.');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 从原父节点中移除
|
|
173
|
+
if (sourceParent) {
|
|
174
|
+
sourceParent.children = sourceParent.children.filter(function (id) {
|
|
175
|
+
return id !== sid;
|
|
176
|
+
});
|
|
177
|
+
if (sourceParent.children.length === 0) {
|
|
178
|
+
delete sourceParent.children;
|
|
179
|
+
}
|
|
180
|
+
delete sourceParent[sid];
|
|
181
|
+
}
|
|
182
|
+
switch (action) {
|
|
183
|
+
case 'inside':
|
|
184
|
+
// 插入到目标节点的children数组
|
|
185
|
+
if (!targetNode.children) {
|
|
186
|
+
targetNode.children = [];
|
|
187
|
+
}
|
|
188
|
+
targetNode.children.push(sid);
|
|
189
|
+
sourceNode.props.parentId = tid;
|
|
190
|
+
targetNode[sid] = sourceNode;
|
|
191
|
+
break;
|
|
192
|
+
case 'left':
|
|
193
|
+
case 'right':
|
|
194
|
+
if (!targetParent) {
|
|
195
|
+
throw new Error('Target node must have a parent for left or right operations.');
|
|
196
|
+
}
|
|
197
|
+
// 插入到目标节点同级的前面或后面
|
|
198
|
+
var idx = targetParent.children.indexOf(tid);
|
|
199
|
+
if (idx === -1) {
|
|
200
|
+
throw new Error("Target node is not found in its parent's children list.");
|
|
201
|
+
}
|
|
202
|
+
if (action === 'right') {
|
|
203
|
+
idx++;
|
|
204
|
+
}
|
|
205
|
+
targetParent.children.splice(idx, 0, sid);
|
|
206
|
+
sourceNode.props.parentId = targetParent.props.id;
|
|
207
|
+
targetParent[sid] = sourceNode;
|
|
208
|
+
break;
|
|
209
|
+
default:
|
|
210
|
+
throw new Error('Invalid action type.');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
152
214
|
/**
|
|
153
215
|
* 对指定的JSON结构进行节点的修改操作。
|
|
154
216
|
*
|
|
@@ -181,7 +243,7 @@ export function deleteById(json, id) {
|
|
|
181
243
|
export function getPathById(json, id) {
|
|
182
244
|
var currentPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
183
245
|
for (var key in json) {
|
|
184
|
-
if (id ===
|
|
246
|
+
if (id === LC_BUILDIN_UNIT_KEY.PAGE_ROOT) return '/';
|
|
185
247
|
var newPath = currentPath ? "".concat(currentPath, "/").concat(key) : key;
|
|
186
248
|
if (json[key].props && json[key].props.id === id) {
|
|
187
249
|
return newPath;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import _construct from "@babel/runtime/helpers/esm/construct";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
4
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
-
import { omit } from 'lodash';
|
|
5
|
+
import { omit, omitBy, startsWith, isNil, isString, isArray } from 'lodash';
|
|
6
|
+
import postcss from 'postcss';
|
|
5
7
|
export function isPromise(value) {
|
|
6
8
|
return !!value && _typeof(value) === 'object' && typeof value.then === 'function';
|
|
7
9
|
}
|
|
@@ -11,62 +13,139 @@ export function omitBadProps(props) {
|
|
|
11
13
|
}
|
|
12
14
|
export function listReducer(state, action) {
|
|
13
15
|
switch (action.type) {
|
|
14
|
-
case '
|
|
16
|
+
case 'insert':
|
|
15
17
|
{
|
|
16
18
|
var _action$callback;
|
|
17
|
-
var newState =
|
|
19
|
+
var newState = _toConsumableArray(state);
|
|
20
|
+
newState.splice(action.payload.index + 1, 0, action.payload.data);
|
|
18
21
|
(_action$callback = action.callback) === null || _action$callback === void 0 || _action$callback.call(action, newState);
|
|
19
22
|
return newState;
|
|
20
23
|
}
|
|
21
|
-
case '
|
|
24
|
+
case 'add':
|
|
22
25
|
{
|
|
23
26
|
var _action$callback2;
|
|
24
|
-
var _newState =
|
|
25
|
-
return item.id !== action.payload;
|
|
26
|
-
});
|
|
27
|
+
var _newState = [].concat(_toConsumableArray(state), [action.payload]);
|
|
27
28
|
(_action$callback2 = action.callback) === null || _action$callback2 === void 0 || _action$callback2.call(action, _newState);
|
|
28
29
|
return _newState;
|
|
29
30
|
}
|
|
30
|
-
case '
|
|
31
|
+
case 'delete':
|
|
31
32
|
{
|
|
32
33
|
var _action$callback3;
|
|
33
|
-
var _newState2 = state.
|
|
34
|
-
return item.id
|
|
34
|
+
var _newState2 = state.filter(function (item) {
|
|
35
|
+
return item.id !== action.payload;
|
|
35
36
|
});
|
|
36
37
|
(_action$callback3 = action.callback) === null || _action$callback3 === void 0 || _action$callback3.call(action, _newState2);
|
|
37
38
|
return _newState2;
|
|
38
39
|
}
|
|
39
|
-
case '
|
|
40
|
+
case 'edit':
|
|
40
41
|
{
|
|
41
42
|
var _action$callback4;
|
|
42
43
|
var _newState3 = state.map(function (item) {
|
|
43
|
-
item.active = false;
|
|
44
44
|
return item.id === action.payload.id ? _objectSpread(_objectSpread({}, item), action.payload.data) : item;
|
|
45
45
|
});
|
|
46
46
|
(_action$callback4 = action.callback) === null || _action$callback4 === void 0 || _action$callback4.call(action, _newState3);
|
|
47
47
|
return _newState3;
|
|
48
48
|
}
|
|
49
|
-
case '
|
|
49
|
+
case 'batchEdit':
|
|
50
50
|
{
|
|
51
51
|
var _action$callback5;
|
|
52
|
-
var _newState4 =
|
|
52
|
+
var _newState4 = state.map(function (item) {
|
|
53
|
+
var newItem = action.payload.items.find(function (_id) {
|
|
54
|
+
return _id === item.id;
|
|
55
|
+
});
|
|
56
|
+
if (newItem) {
|
|
57
|
+
return _objectSpread(_objectSpread({}, item), action.payload.data);
|
|
58
|
+
}
|
|
59
|
+
return item;
|
|
60
|
+
});
|
|
53
61
|
(_action$callback5 = action.callback) === null || _action$callback5 === void 0 || _action$callback5.call(action, _newState4);
|
|
54
62
|
return _newState4;
|
|
55
63
|
}
|
|
56
|
-
case '
|
|
64
|
+
case 'active':
|
|
57
65
|
{
|
|
58
66
|
var _action$callback6;
|
|
67
|
+
var _newState5 = state.map(function (item) {
|
|
68
|
+
item.active = false;
|
|
69
|
+
return item.id === action.payload.id ? _objectSpread(_objectSpread({}, item), action.payload.data) : item;
|
|
70
|
+
});
|
|
71
|
+
(_action$callback6 = action.callback) === null || _action$callback6 === void 0 || _action$callback6.call(action, _newState5);
|
|
72
|
+
return _newState5;
|
|
73
|
+
}
|
|
74
|
+
case 'init':
|
|
75
|
+
case 'new':
|
|
76
|
+
{
|
|
77
|
+
var _action$callback7;
|
|
78
|
+
(_action$callback7 = action.callback) === null || _action$callback7 === void 0 || _action$callback7.call(action, action.payload);
|
|
79
|
+
return action.payload;
|
|
80
|
+
}
|
|
81
|
+
case 'sort':
|
|
82
|
+
{
|
|
83
|
+
var _action$callback8;
|
|
59
84
|
var sortItems = action.payload;
|
|
60
85
|
var newItems = state.sort(function (a, b) {
|
|
61
86
|
var indexA = sortItems.indexOf(a.id);
|
|
62
87
|
var indexB = sortItems.indexOf(b.id);
|
|
63
88
|
return indexA - indexB;
|
|
64
89
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return
|
|
90
|
+
var _newState6 = _toConsumableArray(newItems);
|
|
91
|
+
(_action$callback8 = action.callback) === null || _action$callback8 === void 0 || _action$callback8.call(action, _newState6);
|
|
92
|
+
return _newState6;
|
|
68
93
|
}
|
|
69
94
|
default:
|
|
70
95
|
throw new Error();
|
|
71
96
|
}
|
|
97
|
+
}
|
|
98
|
+
export function getCtx(context) {
|
|
99
|
+
return omitBy(context, function (_, key) {
|
|
100
|
+
return startsWith(key, '_');
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export function getFuncBody(funcCode) {
|
|
104
|
+
var regex = /{([\s\S]*?)}(?![\s\S]*})/;
|
|
105
|
+
var matches = funcCode.match(regex);
|
|
106
|
+
if (matches) {
|
|
107
|
+
return matches[1].replace(/\s*\n\s*/g, ' ').trim();
|
|
108
|
+
}
|
|
109
|
+
return '';
|
|
110
|
+
}
|
|
111
|
+
export function executeCode(context, code, argsName) {
|
|
112
|
+
if (!isString(code)) {
|
|
113
|
+
throw new Error('executeCode编码参数无效');
|
|
114
|
+
}
|
|
115
|
+
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
116
|
+
args[_key - 3] = arguments[_key];
|
|
117
|
+
}
|
|
118
|
+
if (isNil(argsName) && args.length > 0 || !isNil(argsName) && !isArray(argsName) || isArray(argsName) && argsName.length !== (args === null || args === void 0 ? void 0 : args.length)) {
|
|
119
|
+
throw new Error('executeCode参数不匹配');
|
|
120
|
+
}
|
|
121
|
+
var ctx = getCtx(context);
|
|
122
|
+
var func = _construct(Function, _toConsumableArray(argsName || []).concat(['ctx', getFuncBody(code)]));
|
|
123
|
+
return func.apply(void 0, args.concat([ctx]));
|
|
124
|
+
}
|
|
125
|
+
export function parseCSS(cssString) {
|
|
126
|
+
// 创建一个空对象来存储解析后的样式
|
|
127
|
+
var parsedStyles = {};
|
|
128
|
+
if (cssString) {
|
|
129
|
+
try {
|
|
130
|
+
// 解析CSS字符串
|
|
131
|
+
var ast = postcss.parse(cssString);
|
|
132
|
+
|
|
133
|
+
// 遍历AST中的每个规则
|
|
134
|
+
ast.walkDecls(function (decl) {
|
|
135
|
+
// 将每个声明的属性和值存储在对象中
|
|
136
|
+
parsedStyles[decl.prop] = decl.value;
|
|
137
|
+
});
|
|
138
|
+
} catch (e) {
|
|
139
|
+
console.error(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 返回包含所有样式的对象
|
|
144
|
+
return parsedStyles;
|
|
145
|
+
}
|
|
146
|
+
;
|
|
147
|
+
export function isColor(str) {
|
|
148
|
+
var hexRegex = /^#(?:[A-Fa-f0-9]{3,4}){1,2}$/;
|
|
149
|
+
var rgbaRegex = /^rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*(0|1|0?\.\d+))?\s*\)$/;
|
|
150
|
+
return hexRegex.test(str) || rgbaRegex.test(str);
|
|
72
151
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["props", "children"],
|
|
6
|
+
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
7
|
+
import React, { useRef } from 'react';
|
|
8
|
+
import { dynamic } from 'umi';
|
|
9
|
+
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
10
|
+
import { upperFirst } from 'lodash';
|
|
11
|
+
import { useContext } from "../provider/ContextProvider";
|
|
12
|
+
import { LC_BUILDIN_UNIT_KEY_LIST } from "../../constants";
|
|
13
|
+
export default function useCanvasRender(data, deps) {
|
|
14
|
+
var dynamicCompMap = useRef({});
|
|
15
|
+
var ctx = useContext();
|
|
16
|
+
var render = useMemoizedFn(function (_ref) {
|
|
17
|
+
var props = _ref.props,
|
|
18
|
+
children = _ref.children,
|
|
19
|
+
childrenMap = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
if (props && !LC_BUILDIN_UNIT_KEY_LIST.includes(props.id)) {
|
|
21
|
+
var id = props.id,
|
|
22
|
+
component = props.component,
|
|
23
|
+
name = props.name,
|
|
24
|
+
desc = props.desc,
|
|
25
|
+
icon = props.icon,
|
|
26
|
+
group = props.group,
|
|
27
|
+
groupName = props.groupName,
|
|
28
|
+
order = props.order,
|
|
29
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
30
|
+
if (!dynamicCompMap.current[component]) {
|
|
31
|
+
dynamicCompMap.current[component] = dynamic({
|
|
32
|
+
loader: function () {
|
|
33
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
34
|
+
var _runtime, _yield$import, _Comp;
|
|
35
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
36
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37
|
+
case 0:
|
|
38
|
+
_runtime = upperFirst(ctx.runtime);
|
|
39
|
+
_context.next = 3;
|
|
40
|
+
return import("../../view/lc-components/".concat(component, "/Function").concat(_runtime));
|
|
41
|
+
case 3:
|
|
42
|
+
_yield$import = _context.sent;
|
|
43
|
+
_Comp = _yield$import.default;
|
|
44
|
+
return _context.abrupt("return", _Comp);
|
|
45
|
+
case 6:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
function loader() {
|
|
52
|
+
return _loader.apply(this, arguments);
|
|
53
|
+
}
|
|
54
|
+
return loader;
|
|
55
|
+
}()
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
var Comp = dynamicCompMap.current[component];
|
|
59
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
60
|
+
key: id,
|
|
61
|
+
id: id
|
|
62
|
+
}, rest), (children === null || children === void 0 ? void 0 : children.length) > 0 ? children.map(function (_id) {
|
|
63
|
+
return render(childrenMap[_id]);
|
|
64
|
+
}) : null);
|
|
65
|
+
}
|
|
66
|
+
return (children === null || children === void 0 ? void 0 : children.length) > 0 ? children.map(function (_id) {
|
|
67
|
+
return render(childrenMap[_id]);
|
|
68
|
+
}) : null;
|
|
69
|
+
});
|
|
70
|
+
return useCreation(function () {
|
|
71
|
+
return render(data);
|
|
72
|
+
}, deps || [data]);
|
|
73
|
+
}
|