@luck-design-biz/luckda 0.0.24-1 → 0.0.25-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/es/components/Builder/index.js +11 -7
- 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/LdCard/index.js +0 -0
- package/es/components/LdCard/model.js +0 -0
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdFormList/model.js +0 -0
- package/es/components/LdGrid/index.js +26 -11
- package/es/components/LdGrid/model.js +0 -0
- package/es/components/LdGridForm/index.js +5 -4
- 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 +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- 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 +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +221 -0
- package/es/lowcode/constants/api-url.js +409 -1
- package/es/lowcode/constants/event-topics.js +8 -4
- package/es/lowcode/constants/index.js +30 -2
- package/es/lowcode/engine/factory/DataFactory.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +12 -11
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/es/lowcode/engine/factory/panel-item-factory/index.js +4 -0
- package/es/lowcode/engine/meta/box.props.default.json +3 -2
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +15 -10
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +53 -4
- package/es/lowcode/engine/meta/form.props.json +584 -55
- 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 +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +155 -29
- 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 +2 -2
- 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 +5 -2
- package/es/lowcode/engine/meta/section.props.json +1 -1
- 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 +40 -2
- package/es/lowcode/engine/meta/table.props.json +347 -83
- 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 +1 -1
- 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 +169 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +161 -0
- package/es/lowcode/engine/tools/dataProcess.js +67 -3
- package/es/lowcode/engine/tools/helper.js +145 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +75 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -6
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +4 -1
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/Design.js +27 -304
- package/es/lowcode/painter/DesignOperator.js +290 -0
- package/es/lowcode/painter/DesignToolbar.js +162 -0
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +54 -45
- package/es/lowcode/painter/Panel.js +102 -106
- 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 +81 -11
- package/es/lowcode/painter/components/ColorInput.js +127 -0
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +47 -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/{TabEditor.js → ListEditor.js} +32 -22
- package/es/lowcode/painter/components/NumberInput.js +72 -17
- package/es/lowcode/painter/components/PanelItem.js +40 -11
- package/es/lowcode/painter/components/PopConfirm.js +14 -4
- package/es/lowcode/painter/components/PopForm.js +0 -0
- package/es/lowcode/painter/components/RuleInput.js +5 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +56 -66
- package/es/lowcode/painter/components/code-editor/CssEditor.js +27 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +37 -14
- package/es/lowcode/painter/components/code-editor/JSEditor.js +44 -11
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/index.js +0 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +144 -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 +419 -0
- package/es/lowcode/painter/components/field-setting/index.js +363 -0
- package/es/lowcode/painter/index.js +9 -3
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +231 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +24 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +44 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +202 -0
- package/es/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +133 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +308 -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 +8 -8
- 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/BackGround.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
- package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +44 -12
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +56 -29
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
- package/es/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +23 -20
- package/es/lowcode/painter/panel-section/StylePanel/index.js +17 -0
- package/es/lowcode/painter/panel-section/TabItems.js +52 -66
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +74 -0
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
- package/es/lowcode/painter/services/I18n.js +0 -0
- package/es/lowcode/painter/services/toolbar.js +25 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/actions-editor.less +16 -0
- package/es/lowcode/painter/style/border-editor.less +36 -0
- package/es/lowcode/painter/style/border-radius-selector.less +43 -0
- package/es/lowcode/painter/style/border-selector.less +40 -0
- package/es/lowcode/painter/style/button-type.less +0 -0
- package/es/lowcode/painter/style/collapse.less +8 -1
- package/es/lowcode/painter/style/color-input.less +19 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +9 -3
- package/es/lowcode/painter/style/display.less +0 -0
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/font-editor.less +9 -0
- package/es/lowcode/painter/style/fullscreen-editor.less +0 -0
- package/es/lowcode/painter/style/icon-selector.less +0 -0
- package/es/lowcode/painter/style/icon.less +0 -0
- package/es/lowcode/painter/style/impexp.less +7 -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/{tabeditor.less → list-editor.less} +9 -40
- package/es/lowcode/painter/style/number-input.less +0 -0
- package/es/lowcode/painter/style/outline.less +0 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel-item.less +11 -1
- package/es/lowcode/painter/style/panel.less +5 -49
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- 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/split-display.less +28 -0
- package/es/lowcode/painter/style/style-panel.less +32 -0
- package/es/lowcode/painter/style/tabitems.less +0 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +14 -0
- package/es/lowcode/view/Canvas.js +33 -137
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +18 -231
- package/es/lowcode/view/index.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +13 -4
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- 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 +50 -24
- package/es/lowcode/view/lc-components/Button/meta.json +15 -10
- package/es/lowcode/view/lc-components/Button/style.less +3 -0
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +42 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +22 -23
- package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +15 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +36 -22
- package/es/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +114 -8
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +534 -55
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Iframe/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/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- 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 +1 -1
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/JSX/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 +19 -17
- 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/index.less +0 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +2 -2
- 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 +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +1 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +59 -2
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- 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 +42 -3
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- 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 +545 -139
- package/es/lowcode/view/lc-components/Table/meta.json +308 -83
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +72 -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/FunctionDesign.js +0 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- 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 +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- 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/canvas.less +0 -0
- package/es/lowcode/view/style/loading.less +0 -0
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- 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 +2 -2
- package/es/utils/index.js +0 -0
- package/lib/components/Builder/index.js +9 -4
- 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/LdCard/index.js +0 -0
- package/lib/components/LdCard/model.js +0 -0
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdFormList/model.js +0 -0
- package/lib/components/LdGrid/index.js +25 -10
- package/lib/components/LdGrid/model.js +0 -0
- package/lib/components/LdGridForm/index.js +4 -3
- 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 +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- 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 +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +227 -0
- package/lib/lowcode/constants/api-url.js +411 -1
- package/lib/lowcode/constants/event-topics.js +9 -5
- package/lib/lowcode/constants/index.js +31 -3
- package/lib/lowcode/engine/factory/DataFactory.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +11 -10
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +4 -0
- package/lib/lowcode/engine/meta/box.props.default.json +3 -2
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +15 -10
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +53 -4
- package/lib/lowcode/engine/meta/form.props.json +584 -55
- 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 +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +155 -29
- 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 +2 -2
- 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 +5 -2
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- 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 +40 -2
- package/lib/lowcode/engine/meta/table.props.json +347 -83
- 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 +1 -1
- 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 +177 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +0 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +169 -0
- package/lib/lowcode/engine/tools/dataProcess.js +68 -3
- package/lib/lowcode/engine/tools/helper.js +152 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +90 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -5
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +12 -1
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/Design.js +24 -300
- package/lib/lowcode/painter/DesignOperator.js +297 -0
- package/lib/lowcode/painter/DesignToolbar.js +170 -0
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +52 -43
- package/lib/lowcode/painter/Panel.js +98 -102
- 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 +79 -10
- package/lib/lowcode/painter/components/ColorInput.js +134 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +54 -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/{TabEditor.js → ListEditor.js} +33 -23
- package/lib/lowcode/painter/components/NumberInput.js +70 -16
- package/lib/lowcode/painter/components/PanelItem.js +40 -11
- package/lib/lowcode/painter/components/PopConfirm.js +14 -4
- package/lib/lowcode/painter/components/PopForm.js +0 -0
- package/lib/lowcode/painter/components/RuleInput.js +5 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +54 -65
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +26 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +35 -13
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +44 -11
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/code-editor/index.js +0 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +151 -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 +427 -0
- package/lib/lowcode/painter/components/field-setting/index.js +370 -0
- package/lib/lowcode/painter/index.js +9 -3
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +109 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +239 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +31 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +51 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +208 -0
- package/lib/lowcode/painter/panel-section/ButtonType.js +0 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +141 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +316 -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 +7 -7
- 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/BackGround.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
- package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +42 -11
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
- package/lib/lowcode/painter/panel-section/StylePanel/{Width.js → Size.js} +39 -35
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +57 -30
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
- package/lib/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +22 -19
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +16 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +51 -65
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +82 -0
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
- package/lib/lowcode/painter/services/I18n.js +0 -0
- package/lib/lowcode/painter/services/toolbar.js +32 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/actions-editor.less +16 -0
- package/lib/lowcode/painter/style/border-editor.less +36 -0
- package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
- package/lib/lowcode/painter/style/border-selector.less +40 -0
- package/lib/lowcode/painter/style/button-type.less +0 -0
- package/lib/lowcode/painter/style/collapse.less +8 -1
- package/lib/lowcode/painter/style/color-input.less +19 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +9 -3
- package/lib/lowcode/painter/style/display.less +0 -0
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/font-editor.less +9 -0
- package/lib/lowcode/painter/style/fullscreen-editor.less +0 -0
- package/lib/lowcode/painter/style/icon-selector.less +0 -0
- package/lib/lowcode/painter/style/icon.less +0 -0
- package/lib/lowcode/painter/style/impexp.less +7 -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/{tabeditor.less → list-editor.less} +9 -40
- package/lib/lowcode/painter/style/number-input.less +0 -0
- package/lib/lowcode/painter/style/outline.less +0 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel-item.less +11 -1
- package/lib/lowcode/painter/style/panel.less +5 -49
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- 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/split-display.less +28 -0
- package/lib/lowcode/painter/style/style-panel.less +32 -0
- package/lib/lowcode/painter/style/tabitems.less +0 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +21 -0
- package/lib/lowcode/view/Canvas.js +31 -143
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +14 -227
- package/lib/lowcode/view/index.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +13 -4
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- 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 +48 -22
- package/lib/lowcode/view/lc-components/Button/meta.json +15 -10
- package/lib/lowcode/view/lc-components/Button/style.less +3 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +42 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +21 -22
- package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +15 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +35 -21
- package/lib/lowcode/view/lc-components/Drawer/index.less +10 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +32 -2
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +113 -7
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +534 -55
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Iframe/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/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
- 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 +1 -1
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/JSX/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 +21 -18
- 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/index.less +0 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +2 -2
- 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 +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +1 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +60 -2
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
- 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 +44 -4
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
- 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 +544 -138
- package/lib/lowcode/view/lc-components/Table/meta.json +308 -83
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +73 -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/FunctionDesign.js +0 -0
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
- 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 +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
- 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/canvas.less +0 -0
- package/lib/lowcode/view/style/loading.less +0 -0
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- 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 +2 -2
- package/lib/utils/index.js +0 -0
- package/lowcode.js +0 -0
- package/package.json +15 -8
- package/upload.js +0 -0
- package/utils.js +0 -0
- package/es/lowcode/engine/provider/ContextProvider.js +0 -157
- package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
- package/es/lowcode/view/lc-components/Drawer/style.less +0 -7
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -165
- package/lib/lowcode/view/lc-components/Drawer/style.less +0 -7
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
|
@@ -2,16 +2,19 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
-
import React, { createContext, useState, useRef } from 'react';
|
|
5
|
+
import React, { forwardRef, createContext, useState, useRef, useContext } from 'react';
|
|
6
6
|
import { useRequest, useSetState, useMemoizedFn } from 'ahooks';
|
|
7
7
|
import { BasicForm, BasicFormItem } from 'luck-design';
|
|
8
8
|
import LdPop from "../LdPop";
|
|
9
9
|
import { readModlue } from "../../services";
|
|
10
10
|
import { doAction as doActionUtils } from "../../helper/action";
|
|
11
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
12
|
-
var LuckDaContext = /*#__PURE__*/createContext();
|
|
12
|
+
export var LuckDaContext = /*#__PURE__*/createContext();
|
|
13
|
+
export var useLDCtx = function useLDCtx() {
|
|
14
|
+
return useContext(LuckDaContext);
|
|
15
|
+
};
|
|
13
16
|
var builder = function builder(WrappedComponent, moduleCode) {
|
|
14
|
-
var Component = function
|
|
17
|
+
var Component = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
18
|
if (!moduleCode) return formatMessage({
|
|
16
19
|
id: 'luckda.paramMiss.moduleCode',
|
|
17
20
|
label: '缺少模块Key'
|
|
@@ -110,7 +113,9 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
110
113
|
setFieldProps: setFieldProps,
|
|
111
114
|
moduleCode: moduleCode
|
|
112
115
|
})
|
|
113
|
-
}, /*#__PURE__*/React.createElement(WrappedComponent, _extends({
|
|
116
|
+
}, /*#__PURE__*/React.createElement(WrappedComponent, _extends({
|
|
117
|
+
ref: ref
|
|
118
|
+
}, moduleData || {}, {
|
|
114
119
|
doAction: doAction,
|
|
115
120
|
openPop: openPop,
|
|
116
121
|
closePop: closePop
|
|
@@ -126,8 +131,7 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
126
131
|
}, pops[ldId])
|
|
127
132
|
});
|
|
128
133
|
}));
|
|
129
|
-
};
|
|
134
|
+
});
|
|
130
135
|
return Component;
|
|
131
136
|
};
|
|
132
|
-
export default builder;
|
|
133
|
-
export { LuckDaContext };
|
|
137
|
+
export default builder;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["children", "display", "action", "className", "onClick"],
|
|
7
|
+
_excluded2 = ["max", "display", "todoList", "className", "moreText", "doAction"];
|
|
8
|
+
import React, { Fragment } from 'react';
|
|
9
|
+
import { useCreation, useMemoizedFn } from 'ahooks';
|
|
10
|
+
import { Modal, recheck } from '@luck-design-biz/base';
|
|
11
|
+
import { Button, Menu, Dropdown, Icon, Divider } from 'luck-design/antd';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { reduce } from 'lodash';
|
|
14
|
+
import { getResources } from "../../helper/ldComBuild";
|
|
15
|
+
import styles from "./index.less";
|
|
16
|
+
var DisplayComp = function DisplayComp(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
display = _ref.display,
|
|
19
|
+
action = _ref.action,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
onClick = _ref.onClick,
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
if (display === 'text') {
|
|
24
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
25
|
+
className: classNames(styles[action.riskLevel], _defineProperty(_defineProperty({}, className, !!className), styles.disabled, action.serialEffect === 'disable')),
|
|
26
|
+
onClick: onClick
|
|
27
|
+
}), children);
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
30
|
+
disabled: action.serialEffect === 'disable',
|
|
31
|
+
className: classNames(styles[action.riskLevel], _defineProperty({}, className, !!className)),
|
|
32
|
+
onClick: onClick
|
|
33
|
+
}), children);
|
|
34
|
+
};
|
|
35
|
+
var LDActions = function LDActions(_ref2) {
|
|
36
|
+
var max = _ref2.max,
|
|
37
|
+
display = _ref2.display,
|
|
38
|
+
todoList = _ref2.todoList,
|
|
39
|
+
className = _ref2.className,
|
|
40
|
+
_ref2$moreText = _ref2.moreText,
|
|
41
|
+
moreText = _ref2$moreText === void 0 ? '更多行为' : _ref2$moreText,
|
|
42
|
+
doAction = _ref2.doAction,
|
|
43
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
44
|
+
var resources = getResources();
|
|
45
|
+
var handleClick = useMemoizedFn(function (action) {
|
|
46
|
+
if (action.riskLevel === 'danger') {
|
|
47
|
+
Modal.confirm({
|
|
48
|
+
title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
|
|
49
|
+
onOk: function onOk() {
|
|
50
|
+
return doAction(action.actionPool);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
} else if (action.riskLevel === 'destroy') {
|
|
54
|
+
recheck({
|
|
55
|
+
title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
|
|
56
|
+
checkWords: "\u6267\u884C".concat(action.name),
|
|
57
|
+
onOk: function onOk() {
|
|
58
|
+
return doAction(action.actionPool);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
doAction(action.actionPool);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var actionMap = useCreation(function () {
|
|
66
|
+
return reduce(todoList, function (ret, action, index) {
|
|
67
|
+
ret[action.serial] = _objectSpread(_objectSpread({}, action), {}, {
|
|
68
|
+
serialValue: Math.pow(2, index)
|
|
69
|
+
});
|
|
70
|
+
return ret;
|
|
71
|
+
}, {});
|
|
72
|
+
}, [todoList]);
|
|
73
|
+
var mySerialsValue = useCreation(function () {
|
|
74
|
+
return reduce(resources, function (ret, resKey) {
|
|
75
|
+
var _actionMap$resKey;
|
|
76
|
+
ret |= ((_actionMap$resKey = actionMap[resKey]) === null || _actionMap$resKey === void 0 ? void 0 : _actionMap$resKey.serialValue) || 0;
|
|
77
|
+
return ret;
|
|
78
|
+
}, 0);
|
|
79
|
+
}, [resources, actionMap]);
|
|
80
|
+
var _useCreation = useCreation(function () {
|
|
81
|
+
var approvedActions = reduce(actionMap, function (ret, action) {
|
|
82
|
+
if (mySerialsValue & action.serialValue) {
|
|
83
|
+
ret.push(action);
|
|
84
|
+
} else if (action.serialEffect === 'disable') {
|
|
85
|
+
ret.push(action);
|
|
86
|
+
}
|
|
87
|
+
return ret;
|
|
88
|
+
}, []);
|
|
89
|
+
var _length = approvedActions.length;
|
|
90
|
+
var _permanent = approvedActions.splice(0, max >= _length ? _length : max - 1);
|
|
91
|
+
return [_permanent, approvedActions];
|
|
92
|
+
}, [max, mySerialsValue, actionMap]),
|
|
93
|
+
_useCreation2 = _slicedToArray(_useCreation, 2),
|
|
94
|
+
permanent = _useCreation2[0],
|
|
95
|
+
more = _useCreation2[1];
|
|
96
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
97
|
+
className: classNames(styles.ldActions, _defineProperty({}, className, !!className))
|
|
98
|
+
}, props), permanent.map(function (action, index) {
|
|
99
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
100
|
+
key: action.id
|
|
101
|
+
}, /*#__PURE__*/React.createElement(DisplayComp, {
|
|
102
|
+
display: display,
|
|
103
|
+
action: action,
|
|
104
|
+
onClick: function onClick() {
|
|
105
|
+
return handleClick(action);
|
|
106
|
+
}
|
|
107
|
+
}, action.name), display === 'text' && index < permanent.length - (more.length ? 0 : 1) && /*#__PURE__*/React.createElement(Divider, {
|
|
108
|
+
type: "vertical"
|
|
109
|
+
}));
|
|
110
|
+
}), !!more.length && /*#__PURE__*/React.createElement(Dropdown, {
|
|
111
|
+
overlay: /*#__PURE__*/React.createElement(Menu, {
|
|
112
|
+
onClick: function onClick(e) {
|
|
113
|
+
return handleClick(e.item.props.action);
|
|
114
|
+
}
|
|
115
|
+
}, more.map(function (action) {
|
|
116
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
117
|
+
key: action.id,
|
|
118
|
+
action: action,
|
|
119
|
+
disabled: action.serialEffect === 'disable'
|
|
120
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
121
|
+
className: classNames(styles[action.riskLevel], styles.menuItem)
|
|
122
|
+
}, action.name));
|
|
123
|
+
}))
|
|
124
|
+
}, /*#__PURE__*/React.createElement(DisplayComp, {
|
|
125
|
+
display: display,
|
|
126
|
+
action: {
|
|
127
|
+
riskLevel: 'default'
|
|
128
|
+
}
|
|
129
|
+
}, moreText, display !== 'text' && /*#__PURE__*/React.createElement(Icon, {
|
|
130
|
+
type: "down"
|
|
131
|
+
}))));
|
|
132
|
+
};
|
|
133
|
+
export default LDActions;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@spanDefault: #262626;
|
|
2
|
+
@spanPrimary: var(--luck-color-primary);
|
|
3
|
+
@spanDanger: #ff4d4f;
|
|
4
|
+
@spanDestroy: #820014;
|
|
5
|
+
|
|
6
|
+
.ldActions {
|
|
7
|
+
|
|
8
|
+
button:not(:last-child) {
|
|
9
|
+
margin-right: 8px;
|
|
10
|
+
}
|
|
11
|
+
span {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
button.default {
|
|
16
|
+
background-color: white;
|
|
17
|
+
}
|
|
18
|
+
span.default {
|
|
19
|
+
color: @spanDefault;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
button.primary {
|
|
23
|
+
background-color: var(--luck-color-primary);
|
|
24
|
+
border-color: var(--luck-color-primary);
|
|
25
|
+
color: white;
|
|
26
|
+
}
|
|
27
|
+
span.primary {
|
|
28
|
+
color: @spanPrimary;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
button.danger {
|
|
32
|
+
background-color: #ff4d4f;
|
|
33
|
+
border-color: #ff4d4f;
|
|
34
|
+
color: white;
|
|
35
|
+
}
|
|
36
|
+
span.danger {
|
|
37
|
+
color: @spanDanger;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
button.destroy {
|
|
41
|
+
background-color: #820014;
|
|
42
|
+
border-color: #820014;
|
|
43
|
+
color: white;
|
|
44
|
+
}
|
|
45
|
+
span.destroy {
|
|
46
|
+
color: @spanDestroy;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
span.disabled {
|
|
50
|
+
color: #bfbfbf;
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
span.default.menuItem {
|
|
55
|
+
color: @spanDefault;
|
|
56
|
+
}
|
|
57
|
+
span.primary.menuItem {
|
|
58
|
+
color: @spanPrimary;
|
|
59
|
+
}
|
|
60
|
+
span.danger.menuItem {
|
|
61
|
+
color: @spanDanger;
|
|
62
|
+
}
|
|
63
|
+
span.destroy.menuItem {
|
|
64
|
+
color: @spanDestroy;
|
|
65
|
+
}
|
|
@@ -65,7 +65,7 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
65
65
|
}
|
|
66
66
|
}, []);
|
|
67
67
|
defaultValues.current = _defaultValues;
|
|
68
|
-
setFieldProps(_defineProperty({}, ldId, _nodes.map(function (i) {
|
|
68
|
+
setFieldProps && setFieldProps(_defineProperty({}, ldId, _nodes.map(function (i) {
|
|
69
69
|
return _objectSpread({
|
|
70
70
|
component: i.type.comName || i.type.displayName
|
|
71
71
|
}, i.props);
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
3
3
|
var _excluded = ["options"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Button, Tabs } from 'luck-design/antd';
|
|
6
|
-
import { Collapse, ButtonRadio
|
|
6
|
+
import { Collapse, ButtonRadio } from '@luck-design-biz/base';
|
|
7
|
+
import IconFont from "../IconFont";
|
|
7
8
|
import { ldComBuilder, filterOptions, deepFilterCom } from "../../helper/ldComBuild";
|
|
8
9
|
export var LdButton = ldComBuilder(Button);
|
|
9
10
|
export var LdCollapse = ldComBuilder(Collapse);
|
|
@@ -8,11 +8,13 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
9
9
|
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps"],
|
|
10
10
|
_excluded2 = ["dataSets", "doAction", "resources"],
|
|
11
|
-
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft"],
|
|
11
|
+
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
|
|
12
12
|
_excluded4 = ["ldId", "initData", "overModel"];
|
|
13
13
|
import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState } from 'react';
|
|
14
|
-
import { connect, getDvaApp, useRouteMatch
|
|
14
|
+
import { connect, getDvaApp, useRouteMatch } from 'umi';
|
|
15
15
|
import PropTypes from 'prop-types';
|
|
16
|
+
import { isArray, sortBy, mapValues, reduce, includes } from 'lodash';
|
|
17
|
+
import { BpmButton } from '@luck-design-biz/bpm';
|
|
16
18
|
import { useCreation, useMemoizedFn, useAsyncEffect } from 'ahooks';
|
|
17
19
|
import { BasicDivider } from 'luck-design';
|
|
18
20
|
import { ChildrenUtil } from '@luck-design-biz/base/utils';
|
|
@@ -24,10 +26,7 @@ import { LuckDaContext } from "../Builder";
|
|
|
24
26
|
import { LuckDaPopContext } from "../LdPop";
|
|
25
27
|
import createModel from "./model";
|
|
26
28
|
import { onBatchSubmitAction } from "../../helper/action";
|
|
27
|
-
import { isArray, sortBy, mapValues } from 'lodash';
|
|
28
|
-
import { BpmButton } from '@luck-design-biz/bpm';
|
|
29
29
|
import { readBehaviorCall } from "../../services";
|
|
30
|
-
import { parse, stringify } from 'querystring';
|
|
31
30
|
|
|
32
31
|
// 组件
|
|
33
32
|
var LdFormList = function LdFormList(_ref) {
|
|
@@ -196,8 +195,8 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
196
195
|
mainDataSetKey: mainDataSetKey
|
|
197
196
|
}, function (success, mainKey, res) {
|
|
198
197
|
setSubmitLoading(false);
|
|
199
|
-
var mainFormData = res.detail[res.list[0]];
|
|
200
198
|
if (success) {
|
|
199
|
+
var mainFormData = res.detail[res.list[0]];
|
|
201
200
|
if (afterSubmit) {
|
|
202
201
|
afterSubmit(success, mainKey, res);
|
|
203
202
|
} else {
|
|
@@ -223,7 +222,11 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
223
222
|
renderExtra: renderExtra
|
|
224
223
|
});
|
|
225
224
|
var formList = useCreation(function () {
|
|
226
|
-
|
|
225
|
+
var _list = renderFormList(formConfig);
|
|
226
|
+
return reduce(_list, function (result, item) {
|
|
227
|
+
if (!item.serial || item.serialEffect === 'disable' || includes(resources, item.serial)) result.push(item);
|
|
228
|
+
return result;
|
|
229
|
+
}, []);
|
|
227
230
|
}, [formConfig]);
|
|
228
231
|
var formExtra = useCreation(function () {
|
|
229
232
|
return renderFormExtra && isArray(renderFormExtra(formConfig)) ? renderFormExtra(formConfig) : [renderFormExtra(formConfig)];
|
|
@@ -231,7 +234,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
231
234
|
var mainDataSetKey = (_formList$find = formList.find(function (i) {
|
|
232
235
|
return i.id === mainFormLdId;
|
|
233
236
|
})) === null || _formList$find === void 0 ? void 0 : _formList$find.dataSetKey;
|
|
234
|
-
return /*#__PURE__*/React.createElement(FormList, _extends({
|
|
237
|
+
return formList.length > 0 ? /*#__PURE__*/React.createElement(FormList, _extends({
|
|
235
238
|
editFlow: true,
|
|
236
239
|
formState: formState,
|
|
237
240
|
formMode: formMode,
|
|
@@ -264,17 +267,19 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
264
267
|
_ref8$header = _ref8.header,
|
|
265
268
|
header = _ref8$header === void 0 ? 'collapse' : _ref8$header,
|
|
266
269
|
title = _ref8.title,
|
|
267
|
-
|
|
270
|
+
selfReadOnly = _ref8.readOnly,
|
|
268
271
|
_ref8$extraConfig = _ref8.extraConfig,
|
|
269
272
|
extraConfig = _ref8$extraConfig === void 0 ? {} : _ref8$extraConfig,
|
|
270
273
|
_ref8$renderTopLeft = _ref8.renderTopLeft,
|
|
271
274
|
_renderTopLeft = _ref8$renderTopLeft === void 0 ? function () {
|
|
272
275
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
273
276
|
} : _ref8$renderTopLeft,
|
|
277
|
+
serial = _ref8.serial,
|
|
274
278
|
_props = _objectWithoutProperties(_ref8, _excluded3);
|
|
275
279
|
var _props$type = _props.type,
|
|
276
280
|
type = _props$type === void 0 ? 'auto' : _props$type;
|
|
277
281
|
var renderForm = type === 'auto' ? buildLdAutoForm : buildLdGridForm;
|
|
282
|
+
var _readOnly = selfReadOnly || serial && !includes(resources, serial);
|
|
278
283
|
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/React.createElement(Collapse, {
|
|
279
284
|
title: title || ldId,
|
|
280
285
|
extra: type === 'auto' && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
@@ -319,7 +324,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
319
324
|
mode: child.props.mode || 'tab'
|
|
320
325
|
}) : child.props);
|
|
321
326
|
})[0];
|
|
322
|
-
}));
|
|
327
|
+
})) : null;
|
|
323
328
|
};
|
|
324
329
|
|
|
325
330
|
// 构建带有model的组件
|
|
File without changes
|
|
@@ -2,11 +2,11 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "loading", "unclosableSet", "onQuery", "doQuery", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "loading", "unclosableSet", "onQuery", "doQuery", "pagination", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
6
6
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery", "isTreeGrid"];
|
|
7
7
|
import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
9
|
-
import { transform, includes, keyBy, union, keys, isNil } from 'lodash';
|
|
9
|
+
import { transform, includes, keyBy, union, keys, isNil, isFunction } from 'lodash';
|
|
10
10
|
import { useCreation } from 'ahooks';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { build } from '@luck-design-biz/base/Component';
|
|
@@ -30,6 +30,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
30
30
|
unclosableSet = _ref.unclosableSet,
|
|
31
31
|
onQuery = _ref.onQuery,
|
|
32
32
|
doQuery = _ref.doQuery,
|
|
33
|
+
pagination = _ref.pagination,
|
|
33
34
|
current = _ref.pageno,
|
|
34
35
|
pageSize = _ref.pagesize,
|
|
35
36
|
total = _ref.totalCount,
|
|
@@ -87,10 +88,16 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
87
88
|
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
88
89
|
*/
|
|
89
90
|
var _columns = useCreation(function () {
|
|
90
|
-
if (columnsReset)
|
|
91
|
+
if (columnsReset) {
|
|
92
|
+
if (isFunction) {
|
|
93
|
+
return columnsReset(columns);
|
|
94
|
+
}
|
|
95
|
+
return columnsReset;
|
|
96
|
+
}
|
|
97
|
+
var _columnsRewrite = isFunction(columnsRewrite) ? columnsRewrite(columns) : columnsRewrite;
|
|
91
98
|
var defaultColumns = keyBy(columns, 'aliaName');
|
|
92
|
-
var customColumns = keyBy(
|
|
93
|
-
var mergeFields = union(keys(
|
|
99
|
+
var customColumns = keyBy(_columnsRewrite, 'field');
|
|
100
|
+
var mergeFields = union(keys(customColumns), keys(defaultColumns));
|
|
94
101
|
return transform(mergeFields, function (result, field) {
|
|
95
102
|
var _customColumns$field;
|
|
96
103
|
if ((_customColumns$field = customColumns[field]) !== null && _customColumns$field !== void 0 && _customColumns$field.hide) {
|
|
@@ -136,11 +143,11 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
136
143
|
actionsColumn: _actionsColumn,
|
|
137
144
|
batchOperations: _batchOperations,
|
|
138
145
|
loading: loading,
|
|
139
|
-
pagination: isFlow ? false : {
|
|
146
|
+
pagination: isFlow ? false : _objectSpread({
|
|
140
147
|
total: total,
|
|
141
148
|
current: current,
|
|
142
149
|
pageSize: pageSize
|
|
143
|
-
},
|
|
150
|
+
}, pagination),
|
|
144
151
|
dataSource: formatDataSource(list, detail),
|
|
145
152
|
resultSet: _resultSet,
|
|
146
153
|
gridId: namespace,
|
|
@@ -171,11 +178,11 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
171
178
|
if (!((_getDvaApp2 = getDvaApp()) !== null && _getDvaApp2 !== void 0 && _getDvaApp2._store.getState()[namespace])) {
|
|
172
179
|
var _getDvaApp3;
|
|
173
180
|
(_getDvaApp3 = getDvaApp()) === null || _getDvaApp3 === void 0 || _getDvaApp3.model(createModel(namespace, _objectSpread(_objectSpread({
|
|
174
|
-
|
|
181
|
+
behaviorKey: isTreeGrid ? 'readTree' : 'readGrid'
|
|
175
182
|
}, overModel), {}, {
|
|
176
|
-
|
|
183
|
+
isFlow: isTreeGrid || !!props.isFlow,
|
|
177
184
|
moduleCode: moduleCode,
|
|
178
|
-
|
|
185
|
+
dataSetKey: props.dataSetKey,
|
|
179
186
|
afterQuery: afterQuery
|
|
180
187
|
})));
|
|
181
188
|
}
|
|
@@ -183,7 +190,7 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
183
190
|
suppressInit: suppressInit,
|
|
184
191
|
afterInit: props.afterInit
|
|
185
192
|
});
|
|
186
|
-
}, [namespace]);
|
|
193
|
+
}, [namespace, props.dataSetKey]);
|
|
187
194
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
188
195
|
isTreeGrid: isTreeGrid,
|
|
189
196
|
namespace: namespace
|
|
@@ -202,6 +209,14 @@ Index.propTypes = {
|
|
|
202
209
|
PropTypes.shape({
|
|
203
210
|
field: PropTypes.string.isRequired
|
|
204
211
|
})),
|
|
212
|
+
pagination: PropTypes.shape({
|
|
213
|
+
pageSize: PropTypes.number,
|
|
214
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.string),
|
|
215
|
+
showSizeChanger: PropTypes.bool,
|
|
216
|
+
showQuickJumper: PropTypes.bool,
|
|
217
|
+
hideOnSinglePage: PropTypes.bool,
|
|
218
|
+
simple: PropTypes.bool
|
|
219
|
+
}),
|
|
205
220
|
batchOperations: PropTypes.array,
|
|
206
221
|
// 批量操作元素
|
|
207
222
|
formatDataSource: PropTypes.func,
|
|
File without changes
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode"];
|
|
6
|
-
import React, { createRef, useContext } from 'react';
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode"];
|
|
6
|
+
import React, { createRef, useContext, useEffect } from 'react';
|
|
7
7
|
import { transform } from 'lodash';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import ldBuilder from "../../helper/ldBuilder";
|
|
@@ -25,6 +25,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
25
25
|
dataSetKey = _ref.dataSetKey,
|
|
26
26
|
_ref$columnsRewrite = _ref.columnsRewrite,
|
|
27
27
|
columnsRewrite = _ref$columnsRewrite === void 0 ? [] : _ref$columnsRewrite,
|
|
28
|
+
columnsReset = _ref.columnsReset,
|
|
28
29
|
_ref$onQuery = _ref.onQuery,
|
|
29
30
|
onQuery = _ref$onQuery === void 0 ? {} : _ref$onQuery,
|
|
30
31
|
_ref$onAdd = _ref.onAdd,
|
|
@@ -84,7 +85,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
84
85
|
}
|
|
85
86
|
}, []);
|
|
86
87
|
defaultValues.current = _defaultValues;
|
|
87
|
-
setFieldProps(_defineProperty({}, ldId, _nodes.map(function (col) {
|
|
88
|
+
setFieldProps && setFieldProps(_defineProperty({}, ldId, _nodes.map(function (col) {
|
|
88
89
|
var node = col.renderBasicFormItem();
|
|
89
90
|
var renderBasicFormItem = node === null || node === void 0 ? void 0 : node.props;
|
|
90
91
|
return _objectSpread(_objectSpread({}, col), {}, {
|
|
@@ -93,7 +94,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
93
94
|
}, renderBasicFormItem)
|
|
94
95
|
});
|
|
95
96
|
})));
|
|
96
|
-
return _nodes;
|
|
97
|
+
return columnsReset ? columnsReset(_nodes) : _nodes;
|
|
97
98
|
}();
|
|
98
99
|
var defaultDataSource = _objectSpread(_objectSpread({}, formItemDataFormat(columns, defaultValues.current)), defaultDataSourceFormat(defaultValues.current));
|
|
99
100
|
var formConfig = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import _construct from "@babel/runtime/helpers/esm/construct";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
1
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["children"];
|
|
2
6
|
import React, { useEffect, useState } from 'react';
|
|
3
7
|
import * as Babel from '@babel/standalone';
|
|
4
8
|
import * as LuckAntd from 'luck-design/antd';
|
|
5
9
|
import * as LuckDesign from 'luck-design';
|
|
10
|
+
import * as Lodash from 'lodash';
|
|
11
|
+
import * as ahooks from 'ahooks';
|
|
12
|
+
import { keys } from 'lodash';
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* 实时代码渲染组件
|
|
@@ -10,7 +17,8 @@ import * as LuckDesign from 'luck-design';
|
|
|
10
17
|
* todo:Loading效果的优化
|
|
11
18
|
*/
|
|
12
19
|
var LdRuntimeCom = function LdRuntimeCom(_ref) {
|
|
13
|
-
var children = _ref.children
|
|
20
|
+
var children = _ref.children,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
22
|
var _useState = useState(null),
|
|
15
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16
24
|
Component = _useState2[0],
|
|
@@ -23,20 +31,25 @@ var LdRuntimeCom = function LdRuntimeCom(_ref) {
|
|
|
23
31
|
presets: ['react']
|
|
24
32
|
}).code;
|
|
25
33
|
|
|
26
|
-
// 输出编译后的代码用于排错
|
|
27
|
-
console.log('transformedCode', transformedCode);
|
|
28
|
-
|
|
29
34
|
// 自动
|
|
30
35
|
var functionNameMatch = transformedCode.match(/function\s+([^\s(]+)/);
|
|
31
36
|
if (functionNameMatch && functionNameMatch.length > 1) {
|
|
32
37
|
var functionName = functionNameMatch[1];
|
|
33
|
-
var
|
|
38
|
+
var argsName = keys(rest);
|
|
39
|
+
var _args = argsName.map(function (n) {
|
|
40
|
+
return rest[n];
|
|
41
|
+
});
|
|
42
|
+
var execute = _construct(Function, ['React', 'LuckAntd', 'LuckDesign', 'libs'].concat(_toConsumableArray(argsName), ["".concat(transformedCode, "; return ").concat(functionName, ";")]));
|
|
34
43
|
// 设置组件状态
|
|
35
|
-
var ReactComponent = execute(React, LuckAntd, LuckDesign
|
|
44
|
+
var ReactComponent = execute.apply(void 0, [React, LuckAntd, LuckDesign, {
|
|
45
|
+
Lodash: Lodash,
|
|
46
|
+
ahooks: ahooks
|
|
47
|
+
}].concat(_toConsumableArray(_args)));
|
|
36
48
|
setComponent( /*#__PURE__*/React.createElement(ReactComponent, null));
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
}, [code]);
|
|
40
|
-
|
|
52
|
+
if (code === '') return null;
|
|
53
|
+
return Component ? Component : 'JSX Component';
|
|
41
54
|
};
|
|
42
55
|
export default LdRuntimeCom;
|