@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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _ahooks = require("ahooks");
|
|
16
|
+
var _base = require("@luck-design-biz/base");
|
|
17
|
+
var _antd = require("luck-design/antd");
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
var _lodash = require("lodash");
|
|
20
|
+
var _ldComBuild = require("../../helper/ldComBuild");
|
|
21
|
+
var _index = _interopRequireDefault(require("./index.less"));
|
|
22
|
+
var _excluded = ["children", "display", "action", "className", "onClick"],
|
|
23
|
+
_excluded2 = ["max", "display", "todoList", "className", "moreText", "doAction"];
|
|
24
|
+
var DisplayComp = function DisplayComp(_ref) {
|
|
25
|
+
var children = _ref.children,
|
|
26
|
+
display = _ref.display,
|
|
27
|
+
action = _ref.action,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
onClick = _ref.onClick,
|
|
30
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
if (display === 'text') {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, props, {
|
|
33
|
+
className: (0, _classnames.default)(_index.default[action.riskLevel], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, !!className), _index.default.disabled, action.serialEffect === 'disable')),
|
|
34
|
+
onClick: onClick
|
|
35
|
+
}), children);
|
|
36
|
+
}
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _extends2.default)({}, props, {
|
|
38
|
+
disabled: action.serialEffect === 'disable',
|
|
39
|
+
className: (0, _classnames.default)(_index.default[action.riskLevel], (0, _defineProperty2.default)({}, className, !!className)),
|
|
40
|
+
onClick: onClick
|
|
41
|
+
}), children);
|
|
42
|
+
};
|
|
43
|
+
var LDActions = function LDActions(_ref2) {
|
|
44
|
+
var max = _ref2.max,
|
|
45
|
+
display = _ref2.display,
|
|
46
|
+
todoList = _ref2.todoList,
|
|
47
|
+
className = _ref2.className,
|
|
48
|
+
_ref2$moreText = _ref2.moreText,
|
|
49
|
+
moreText = _ref2$moreText === void 0 ? '更多行为' : _ref2$moreText,
|
|
50
|
+
doAction = _ref2.doAction,
|
|
51
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
52
|
+
var resources = (0, _ldComBuild.getResources)();
|
|
53
|
+
var handleClick = (0, _ahooks.useMemoizedFn)(function (action) {
|
|
54
|
+
if (action.riskLevel === 'danger') {
|
|
55
|
+
_base.Modal.confirm({
|
|
56
|
+
title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
|
|
57
|
+
onOk: function onOk() {
|
|
58
|
+
return doAction(action.actionPool);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
} else if (action.riskLevel === 'destroy') {
|
|
62
|
+
(0, _base.recheck)({
|
|
63
|
+
title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
|
|
64
|
+
checkWords: "\u6267\u884C".concat(action.name),
|
|
65
|
+
onOk: function onOk() {
|
|
66
|
+
return doAction(action.actionPool);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
} else {
|
|
70
|
+
doAction(action.actionPool);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var actionMap = (0, _ahooks.useCreation)(function () {
|
|
74
|
+
return (0, _lodash.reduce)(todoList, function (ret, action, index) {
|
|
75
|
+
ret[action.serial] = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, action), {}, {
|
|
76
|
+
serialValue: Math.pow(2, index)
|
|
77
|
+
});
|
|
78
|
+
return ret;
|
|
79
|
+
}, {});
|
|
80
|
+
}, [todoList]);
|
|
81
|
+
var mySerialsValue = (0, _ahooks.useCreation)(function () {
|
|
82
|
+
return (0, _lodash.reduce)(resources, function (ret, resKey) {
|
|
83
|
+
var _actionMap$resKey;
|
|
84
|
+
ret |= ((_actionMap$resKey = actionMap[resKey]) === null || _actionMap$resKey === void 0 ? void 0 : _actionMap$resKey.serialValue) || 0;
|
|
85
|
+
return ret;
|
|
86
|
+
}, 0);
|
|
87
|
+
}, [resources, actionMap]);
|
|
88
|
+
var _useCreation = (0, _ahooks.useCreation)(function () {
|
|
89
|
+
var approvedActions = (0, _lodash.reduce)(actionMap, function (ret, action) {
|
|
90
|
+
if (mySerialsValue & action.serialValue) {
|
|
91
|
+
ret.push(action);
|
|
92
|
+
} else if (action.serialEffect === 'disable') {
|
|
93
|
+
ret.push(action);
|
|
94
|
+
}
|
|
95
|
+
return ret;
|
|
96
|
+
}, []);
|
|
97
|
+
var _length = approvedActions.length;
|
|
98
|
+
var _permanent = approvedActions.splice(0, max >= _length ? _length : max - 1);
|
|
99
|
+
return [_permanent, approvedActions];
|
|
100
|
+
}, [max, mySerialsValue, actionMap]),
|
|
101
|
+
_useCreation2 = (0, _slicedToArray2.default)(_useCreation, 2),
|
|
102
|
+
permanent = _useCreation2[0],
|
|
103
|
+
more = _useCreation2[1];
|
|
104
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
105
|
+
className: (0, _classnames.default)(_index.default.ldActions, (0, _defineProperty2.default)({}, className, !!className))
|
|
106
|
+
}, props), permanent.map(function (action, index) {
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
108
|
+
key: action.id
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(DisplayComp, {
|
|
110
|
+
display: display,
|
|
111
|
+
action: action,
|
|
112
|
+
onClick: function onClick() {
|
|
113
|
+
return handleClick(action);
|
|
114
|
+
}
|
|
115
|
+
}, action.name), display === 'text' && index < permanent.length - (more.length ? 0 : 1) && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
116
|
+
type: "vertical"
|
|
117
|
+
}));
|
|
118
|
+
}), !!more.length && /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
119
|
+
overlay: /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
120
|
+
onClick: function onClick(e) {
|
|
121
|
+
return handleClick(e.item.props.action);
|
|
122
|
+
}
|
|
123
|
+
}, more.map(function (action) {
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
125
|
+
key: action.id,
|
|
126
|
+
action: action,
|
|
127
|
+
disabled: action.serialEffect === 'disable'
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
129
|
+
className: (0, _classnames.default)(_index.default[action.riskLevel], _index.default.menuItem)
|
|
130
|
+
}, action.name));
|
|
131
|
+
}))
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(DisplayComp, {
|
|
133
|
+
display: display,
|
|
134
|
+
action: {
|
|
135
|
+
riskLevel: 'default'
|
|
136
|
+
}
|
|
137
|
+
}, moreText, display !== 'text' && /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
138
|
+
type: "down"
|
|
139
|
+
}))));
|
|
140
|
+
};
|
|
141
|
+
var _default = exports.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
|
+
}
|
|
@@ -73,7 +73,7 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
73
73
|
}
|
|
74
74
|
}, []);
|
|
75
75
|
defaultValues.current = _defaultValues;
|
|
76
|
-
setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (i) {
|
|
76
|
+
setFieldProps && setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (i) {
|
|
77
77
|
return (0, _objectSpread3.default)({
|
|
78
78
|
component: i.type.comName || i.type.displayName
|
|
79
79
|
}, i.props);
|
|
File without changes
|
|
File without changes
|
|
@@ -10,6 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _antd = require("luck-design/antd");
|
|
12
12
|
var _base = require("@luck-design-biz/base");
|
|
13
|
+
var _IconFont = _interopRequireDefault(require("../IconFont"));
|
|
13
14
|
var _ldComBuild = require("../../helper/ldComBuild");
|
|
14
15
|
var _excluded = ["options"];
|
|
15
16
|
var LdButton = exports.LdButton = (0, _ldComBuild.ldComBuilder)(_antd.Button);
|
|
@@ -22,7 +23,7 @@ var LdButtonRadio = exports.LdButtonRadio = function LdButtonRadio(_ref) {
|
|
|
22
23
|
options: (0, _ldComBuild.filterOptions)(options)
|
|
23
24
|
}));
|
|
24
25
|
};
|
|
25
|
-
var LdIconFont = exports.LdIconFont = (0, _ldComBuild.ldComBuilder)(
|
|
26
|
+
var LdIconFont = exports.LdIconFont = (0, _ldComBuild.ldComBuilder)(_IconFont.default);
|
|
26
27
|
var LdTabs = exports.LdTabs = (0, _ldComBuild.deepFilterCom)(_antd.Tabs, function (child) {
|
|
27
28
|
var _child$type;
|
|
28
29
|
return (child === null || child === void 0 || (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'TabPane';
|
|
@@ -17,6 +17,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
17
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
18
|
var _umi = require("umi");
|
|
19
19
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
20
|
+
var _lodash = require("lodash");
|
|
21
|
+
var _bpm = require("@luck-design-biz/bpm");
|
|
20
22
|
var _ahooks = require("ahooks");
|
|
21
23
|
var _luckDesign = require("luck-design");
|
|
22
24
|
var _utils = require("@luck-design-biz/base/utils");
|
|
@@ -28,13 +30,10 @@ var _Builder = require("../Builder");
|
|
|
28
30
|
var _LdPop = require("../LdPop");
|
|
29
31
|
var _model = _interopRequireDefault(require("./model"));
|
|
30
32
|
var _action = require("../../helper/action");
|
|
31
|
-
var _lodash = require("lodash");
|
|
32
|
-
var _bpm = require("@luck-design-biz/bpm");
|
|
33
33
|
var _services = require("../../services");
|
|
34
|
-
var _querystring = require("querystring");
|
|
35
34
|
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps"],
|
|
36
35
|
_excluded2 = ["dataSets", "doAction", "resources"],
|
|
37
|
-
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft"],
|
|
36
|
+
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
|
|
38
37
|
_excluded4 = ["ldId", "initData", "overModel"];
|
|
39
38
|
// 组件
|
|
40
39
|
var LdFormList = function LdFormList(_ref) {
|
|
@@ -203,8 +202,8 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
203
202
|
mainDataSetKey: mainDataSetKey
|
|
204
203
|
}, function (success, mainKey, res) {
|
|
205
204
|
setSubmitLoading(false);
|
|
206
|
-
var mainFormData = res.detail[res.list[0]];
|
|
207
205
|
if (success) {
|
|
206
|
+
var mainFormData = res.detail[res.list[0]];
|
|
208
207
|
if (afterSubmit) {
|
|
209
208
|
afterSubmit(success, mainKey, res);
|
|
210
209
|
} else {
|
|
@@ -230,7 +229,11 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
230
229
|
renderExtra: renderExtra
|
|
231
230
|
});
|
|
232
231
|
var formList = (0, _ahooks.useCreation)(function () {
|
|
233
|
-
|
|
232
|
+
var _list = renderFormList(formConfig);
|
|
233
|
+
return (0, _lodash.reduce)(_list, function (result, item) {
|
|
234
|
+
if (!item.serial || item.serialEffect === 'disable' || (0, _lodash.includes)(resources, item.serial)) result.push(item);
|
|
235
|
+
return result;
|
|
236
|
+
}, []);
|
|
234
237
|
}, [formConfig]);
|
|
235
238
|
var formExtra = (0, _ahooks.useCreation)(function () {
|
|
236
239
|
return renderFormExtra && (0, _lodash.isArray)(renderFormExtra(formConfig)) ? renderFormExtra(formConfig) : [renderFormExtra(formConfig)];
|
|
@@ -238,7 +241,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
238
241
|
var mainDataSetKey = (_formList$find = formList.find(function (i) {
|
|
239
242
|
return i.id === mainFormLdId;
|
|
240
243
|
})) === null || _formList$find === void 0 ? void 0 : _formList$find.dataSetKey;
|
|
241
|
-
return /*#__PURE__*/_react.default.createElement(_FormList.FormList, (0, _extends2.default)({
|
|
244
|
+
return formList.length > 0 ? /*#__PURE__*/_react.default.createElement(_FormList.FormList, (0, _extends2.default)({
|
|
242
245
|
editFlow: true,
|
|
243
246
|
formState: formState,
|
|
244
247
|
formMode: formMode,
|
|
@@ -271,17 +274,19 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
271
274
|
_ref8$header = _ref8.header,
|
|
272
275
|
header = _ref8$header === void 0 ? 'collapse' : _ref8$header,
|
|
273
276
|
title = _ref8.title,
|
|
274
|
-
|
|
277
|
+
selfReadOnly = _ref8.readOnly,
|
|
275
278
|
_ref8$extraConfig = _ref8.extraConfig,
|
|
276
279
|
extraConfig = _ref8$extraConfig === void 0 ? {} : _ref8$extraConfig,
|
|
277
280
|
_ref8$renderTopLeft = _ref8.renderTopLeft,
|
|
278
281
|
_renderTopLeft = _ref8$renderTopLeft === void 0 ? function () {
|
|
279
282
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
280
283
|
} : _ref8$renderTopLeft,
|
|
284
|
+
serial = _ref8.serial,
|
|
281
285
|
_props = (0, _objectWithoutProperties2.default)(_ref8, _excluded3);
|
|
282
286
|
var _props$type = _props.type,
|
|
283
287
|
type = _props$type === void 0 ? 'auto' : _props$type;
|
|
284
288
|
var renderForm = type === 'auto' ? _LdAutoForm.default : _LdGridForm.default;
|
|
289
|
+
var _readOnly = selfReadOnly || serial && !(0, _lodash.includes)(resources, serial);
|
|
285
290
|
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/_react.default.createElement(_base.Collapse, {
|
|
286
291
|
title: title || ldId,
|
|
287
292
|
extra: type === 'auto' && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
@@ -326,7 +331,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
326
331
|
mode: child.props.mode || 'tab'
|
|
327
332
|
}) : child.props);
|
|
328
333
|
})[0];
|
|
329
|
-
}));
|
|
334
|
+
})) : null;
|
|
330
335
|
};
|
|
331
336
|
|
|
332
337
|
// 构建带有model的组件
|
|
File without changes
|
|
@@ -20,7 +20,7 @@ var _List = require("@luck-design-biz/base/List");
|
|
|
20
20
|
var _ldBuilder = _interopRequireDefault(require("../../helper/ldBuilder"));
|
|
21
21
|
var _utils = require("../../utils");
|
|
22
22
|
var _model = _interopRequireDefault(require("./model"));
|
|
23
|
-
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"],
|
|
23
|
+
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"],
|
|
24
24
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery", "isTreeGrid"];
|
|
25
25
|
var LdGrid = function LdGrid(_ref) {
|
|
26
26
|
var columns = _ref.columns,
|
|
@@ -38,6 +38,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
38
38
|
unclosableSet = _ref.unclosableSet,
|
|
39
39
|
onQuery = _ref.onQuery,
|
|
40
40
|
doQuery = _ref.doQuery,
|
|
41
|
+
pagination = _ref.pagination,
|
|
41
42
|
current = _ref.pageno,
|
|
42
43
|
pageSize = _ref.pagesize,
|
|
43
44
|
total = _ref.totalCount,
|
|
@@ -95,10 +96,16 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
95
96
|
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
96
97
|
*/
|
|
97
98
|
var _columns = (0, _ahooks.useCreation)(function () {
|
|
98
|
-
if (columnsReset)
|
|
99
|
+
if (columnsReset) {
|
|
100
|
+
if (_lodash.isFunction) {
|
|
101
|
+
return columnsReset(columns);
|
|
102
|
+
}
|
|
103
|
+
return columnsReset;
|
|
104
|
+
}
|
|
105
|
+
var _columnsRewrite = (0, _lodash.isFunction)(columnsRewrite) ? columnsRewrite(columns) : columnsRewrite;
|
|
99
106
|
var defaultColumns = (0, _lodash.keyBy)(columns, 'aliaName');
|
|
100
|
-
var customColumns = (0, _lodash.keyBy)(
|
|
101
|
-
var mergeFields = (0, _lodash.union)((0, _lodash.keys)(
|
|
107
|
+
var customColumns = (0, _lodash.keyBy)(_columnsRewrite, 'field');
|
|
108
|
+
var mergeFields = (0, _lodash.union)((0, _lodash.keys)(customColumns), (0, _lodash.keys)(defaultColumns));
|
|
102
109
|
return (0, _lodash.transform)(mergeFields, function (result, field) {
|
|
103
110
|
var _customColumns$field;
|
|
104
111
|
if ((_customColumns$field = customColumns[field]) !== null && _customColumns$field !== void 0 && _customColumns$field.hide) {
|
|
@@ -144,11 +151,11 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
144
151
|
actionsColumn: _actionsColumn,
|
|
145
152
|
batchOperations: _batchOperations,
|
|
146
153
|
loading: loading,
|
|
147
|
-
pagination: isFlow ? false : {
|
|
154
|
+
pagination: isFlow ? false : (0, _objectSpread2.default)({
|
|
148
155
|
total: total,
|
|
149
156
|
current: current,
|
|
150
157
|
pageSize: pageSize
|
|
151
|
-
},
|
|
158
|
+
}, pagination),
|
|
152
159
|
dataSource: formatDataSource(list, detail),
|
|
153
160
|
resultSet: _resultSet,
|
|
154
161
|
gridId: namespace,
|
|
@@ -179,11 +186,11 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
179
186
|
if (!((_getDvaApp2 = (0, _umi.getDvaApp)()) !== null && _getDvaApp2 !== void 0 && _getDvaApp2._store.getState()[namespace])) {
|
|
180
187
|
var _getDvaApp3;
|
|
181
188
|
(_getDvaApp3 = (0, _umi.getDvaApp)()) === null || _getDvaApp3 === void 0 || _getDvaApp3.model((0, _model.default)(namespace, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
182
|
-
|
|
189
|
+
behaviorKey: isTreeGrid ? 'readTree' : 'readGrid'
|
|
183
190
|
}, overModel), {}, {
|
|
184
|
-
|
|
191
|
+
isFlow: isTreeGrid || !!props.isFlow,
|
|
185
192
|
moduleCode: moduleCode,
|
|
186
|
-
|
|
193
|
+
dataSetKey: props.dataSetKey,
|
|
187
194
|
afterQuery: afterQuery
|
|
188
195
|
})));
|
|
189
196
|
}
|
|
@@ -191,7 +198,7 @@ var LdIndex = function LdIndex(_ref2) {
|
|
|
191
198
|
suppressInit: suppressInit,
|
|
192
199
|
afterInit: props.afterInit
|
|
193
200
|
});
|
|
194
|
-
}, [namespace]);
|
|
201
|
+
}, [namespace, props.dataSetKey]);
|
|
195
202
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
196
203
|
isTreeGrid: isTreeGrid,
|
|
197
204
|
namespace: namespace
|
|
@@ -210,6 +217,14 @@ Index.propTypes = {
|
|
|
210
217
|
_propTypes.default.shape({
|
|
211
218
|
field: _propTypes.default.string.isRequired
|
|
212
219
|
})),
|
|
220
|
+
pagination: _propTypes.default.shape({
|
|
221
|
+
pageSize: _propTypes.default.number,
|
|
222
|
+
pageSizeOptions: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
223
|
+
showSizeChanger: _propTypes.default.bool,
|
|
224
|
+
showQuickJumper: _propTypes.default.bool,
|
|
225
|
+
hideOnSinglePage: _propTypes.default.bool,
|
|
226
|
+
simple: _propTypes.default.bool
|
|
227
|
+
}),
|
|
213
228
|
batchOperations: _propTypes.default.array,
|
|
214
229
|
// 批量操作元素
|
|
215
230
|
formatDataSource: _propTypes.default.func,
|
|
File without changes
|
|
@@ -19,7 +19,7 @@ var _utils = require("../../utils");
|
|
|
19
19
|
var _form = require("../../helper/form");
|
|
20
20
|
var _Builder = require("../Builder");
|
|
21
21
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
22
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode"];
|
|
22
|
+
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"];
|
|
23
23
|
var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
24
24
|
var _ref$columns = _ref.columns,
|
|
25
25
|
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
@@ -33,6 +33,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
33
33
|
dataSetKey = _ref.dataSetKey,
|
|
34
34
|
_ref$columnsRewrite = _ref.columnsRewrite,
|
|
35
35
|
columnsRewrite = _ref$columnsRewrite === void 0 ? [] : _ref$columnsRewrite,
|
|
36
|
+
columnsReset = _ref.columnsReset,
|
|
36
37
|
_ref$onQuery = _ref.onQuery,
|
|
37
38
|
onQuery = _ref$onQuery === void 0 ? {} : _ref$onQuery,
|
|
38
39
|
_ref$onAdd = _ref.onAdd,
|
|
@@ -92,7 +93,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
92
93
|
}
|
|
93
94
|
}, []);
|
|
94
95
|
defaultValues.current = _defaultValues;
|
|
95
|
-
setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (col) {
|
|
96
|
+
setFieldProps && setFieldProps((0, _defineProperty2.default)({}, ldId, _nodes.map(function (col) {
|
|
96
97
|
var node = col.renderBasicFormItem();
|
|
97
98
|
var renderBasicFormItem = node === null || node === void 0 ? void 0 : node.props;
|
|
98
99
|
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
|
|
@@ -101,7 +102,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
101
102
|
}, renderBasicFormItem)
|
|
102
103
|
});
|
|
103
104
|
})));
|
|
104
|
-
return _nodes;
|
|
105
|
+
return columnsReset ? columnsReset(_nodes) : _nodes;
|
|
105
106
|
}();
|
|
106
107
|
var defaultDataSource = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _utils.formItemDataFormat)(columns, defaultValues.current)), defaultDataSourceFormat(defaultValues.current));
|
|
107
108
|
var formConfig = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
14
|
var Babel = _interopRequireWildcard(require("@babel/standalone"));
|
|
12
15
|
var LuckAntd = _interopRequireWildcard(require("luck-design/antd"));
|
|
13
16
|
var LuckDesign = _interopRequireWildcard(require("luck-design"));
|
|
17
|
+
var _lodash = _interopRequireWildcard(require("lodash"));
|
|
18
|
+
var Lodash = _lodash;
|
|
19
|
+
var ahooks = _interopRequireWildcard(require("ahooks"));
|
|
20
|
+
var _excluded = ["children"];
|
|
14
21
|
/**
|
|
15
22
|
* 实时代码渲染组件
|
|
16
23
|
* todo:沙箱上下文的集成
|
|
17
24
|
* todo:Loading效果的优化
|
|
18
25
|
*/
|
|
19
26
|
var LdRuntimeCom = function LdRuntimeCom(_ref) {
|
|
20
|
-
var children = _ref.children
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
29
|
var _useState = (0, _react.useState)(null),
|
|
22
30
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
31
|
Component = _useState2[0],
|
|
@@ -30,20 +38,25 @@ var LdRuntimeCom = function LdRuntimeCom(_ref) {
|
|
|
30
38
|
presets: ['react']
|
|
31
39
|
}).code;
|
|
32
40
|
|
|
33
|
-
// 输出编译后的代码用于排错
|
|
34
|
-
console.log('transformedCode', transformedCode);
|
|
35
|
-
|
|
36
41
|
// 自动
|
|
37
42
|
var functionNameMatch = transformedCode.match(/function\s+([^\s(]+)/);
|
|
38
43
|
if (functionNameMatch && functionNameMatch.length > 1) {
|
|
39
44
|
var functionName = functionNameMatch[1];
|
|
40
|
-
var
|
|
45
|
+
var argsName = (0, _lodash.keys)(rest);
|
|
46
|
+
var _args = argsName.map(function (n) {
|
|
47
|
+
return rest[n];
|
|
48
|
+
});
|
|
49
|
+
var execute = (0, _construct2.default)(Function, ['React', 'LuckAntd', 'LuckDesign', 'libs'].concat((0, _toConsumableArray2.default)(argsName), ["".concat(transformedCode, "; return ").concat(functionName, ";")]));
|
|
41
50
|
// 设置组件状态
|
|
42
|
-
var ReactComponent = execute(_react.default, LuckAntd, LuckDesign
|
|
51
|
+
var ReactComponent = execute.apply(void 0, [_react.default, LuckAntd, LuckDesign, {
|
|
52
|
+
Lodash: Lodash,
|
|
53
|
+
ahooks: ahooks
|
|
54
|
+
}].concat((0, _toConsumableArray2.default)(_args)));
|
|
43
55
|
setComponent( /*#__PURE__*/_react.default.createElement(ReactComponent, null));
|
|
44
56
|
}
|
|
45
57
|
}
|
|
46
58
|
}, [code]);
|
|
47
|
-
|
|
59
|
+
if (code === '') return null;
|
|
60
|
+
return Component ? Component : 'JSX Component';
|
|
48
61
|
};
|
|
49
62
|
var _default = exports.default = LdRuntimeCom;
|