@luck-design-biz/luckda 0.0.25-2 → 0.0.25-21
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 +21 -21
- package/README.md +40 -40
- package/es/components/ComplexItem/index.js +92 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/LDActions/index.js +8 -10
- package/es/components/LDActions/index.less +68 -65
- package/es/components/LdAutoForm/index.js +57 -12
- package/es/components/LdFormList/index.js +50 -28
- package/es/components/LdGrid/index.js +23 -11
- package/es/components/LdGridForm/index.js +37 -12
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +59 -19
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/FromItems.js +177 -94
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +69 -28
- package/es/helper/index.less +7 -7
- package/es/helper/props_config.js +17 -0
- package/es/index.js +0 -1
- package/es/locales/zh-CN.js +22 -17
- package/es/lowcode/constants/api-url.js +269 -98
- package/es/lowcode/constants/event-topics.js +3 -0
- package/es/lowcode/constants/index.js +2 -1
- package/es/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +2 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/launcher.js +7 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +4 -4
- package/es/lowcode/engine/meta/button.props.json +3 -3
- package/es/lowcode/engine/meta/cardlist.props.json +13 -3
- package/es/lowcode/engine/meta/components-list.json +116 -8
- package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/es/lowcode/engine/meta/dialog.props.json +79 -42
- package/es/lowcode/engine/meta/drawer.props.json +8 -20
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/es/lowcode/engine/meta/fielddate.props.json +130 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddict.props.json +127 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/es/lowcode/engine/meta/fielduser.props.json +165 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/es/lowcode/engine/meta/form.props.default.json +2 -2
- package/es/lowcode/engine/meta/form.props.json +36 -16
- package/es/lowcode/engine/meta/imex.props.default.json +8 -1
- package/es/lowcode/engine/meta/imex.props.json +54 -22
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +12 -6
- package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +4 -4
- package/es/lowcode/engine/meta/table.props.default.json +2 -1
- package/es/lowcode/engine/meta/table.props.json +27 -14
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +7 -5
- package/es/lowcode/engine/meta/tree.props.json +112 -55
- package/es/lowcode/engine/provider/ContextProvider/index.js +104 -86
- package/es/lowcode/engine/provider/ContextProvider/usePageState.js +21 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +96 -49
- package/es/lowcode/engine/tools/dataProcess.js +80 -76
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +92 -7
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/useCombinedRefs.js +14 -0
- package/es/lowcode/engine/tools/usePageDataStore.js +350 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/index.js +1 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +8 -5
- package/es/lowcode/painter/DesignOperator.js +111 -85
- package/es/lowcode/painter/DesignToolbar.js +85 -47
- package/es/lowcode/painter/Outline.js +12 -10
- package/es/lowcode/painter/Panel.js +85 -45
- package/es/lowcode/painter/components/ActionBindModal.js +45 -28
- package/es/lowcode/painter/components/AdvancePanel.js +37 -21
- package/es/lowcode/painter/components/AttrsPanel.js +40 -29
- package/es/lowcode/painter/components/Collapse.js +26 -26
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/es/lowcode/painter/components/FieldSelector.js +26 -13
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/PreviewIframe.js +19 -0
- package/es/lowcode/painter/components/RuleInput.js +30 -31
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +48 -42
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
- package/es/lowcode/painter/components/field-setting/SettingUI.js +158 -77
- package/es/lowcode/painter/components/field-setting/index.js +32 -65
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +11 -17
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/es/lowcode/painter/panel-section/FieldsSetting.js +72 -54
- package/es/lowcode/painter/panel-section/I18nInput.js +2 -1
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/ImpExp.js +131 -37
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +124 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +112 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +28 -112
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +4 -4
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -3
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +22 -16
- package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/es/lowcode/painter/style/action-bind-modal.less +102 -102
- package/es/lowcode/painter/style/actions-editor.less +15 -15
- package/es/lowcode/painter/style/border-editor.less +36 -36
- package/es/lowcode/painter/style/border-radius-selector.less +42 -42
- package/es/lowcode/painter/style/border-selector.less +39 -39
- package/es/lowcode/painter/style/button-type.less +5 -5
- package/es/lowcode/painter/style/collapse.less +28 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +91 -91
- package/es/lowcode/painter/style/design.less +159 -152
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +10 -10
- package/es/lowcode/painter/style/fields-setting.less +25 -25
- package/es/lowcode/painter/style/font-editor.less +9 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/es/lowcode/painter/style/icon-selector.less +22 -22
- package/es/lowcode/painter/style/icon.less +10 -10
- package/es/lowcode/painter/style/impexp.less +7 -7
- package/es/lowcode/painter/style/index.less +6 -6
- package/es/lowcode/painter/style/layout-ratio.less +51 -51
- package/es/lowcode/painter/style/list-editor.less +95 -95
- package/es/lowcode/painter/style/number-input.less +17 -17
- package/es/lowcode/painter/style/outline.less +28 -28
- package/es/lowcode/painter/style/page-layout-display.less +28 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +98 -98
- package/es/lowcode/painter/style/pop-confirm.less +17 -17
- package/es/lowcode/painter/style/pop-form.less +19 -19
- package/es/lowcode/painter/style/radio.less +24 -24
- package/es/lowcode/painter/style/ribbon.less +5 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -27
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/style/treedragdrop.less +19 -19
- package/es/lowcode/view/Canvas.js +34 -8
- package/es/lowcode/view/Page.js +2 -4
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +4 -4
- package/es/lowcode/view/lc-components/Box/index.less +14 -14
- package/es/lowcode/view/lc-components/Box/meta.json +40 -40
- package/es/lowcode/view/lc-components/Button/index.js +35 -39
- package/es/lowcode/view/lc-components/Button/meta.json +127 -127
- package/es/lowcode/view/lc-components/Button/style.less +2 -2
- package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/es/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/es/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/es/lowcode/view/lc-components/Form/index.js +345 -80
- package/es/lowcode/view/lc-components/Form/index.less +4 -4
- package/es/lowcode/view/lc-components/Form/meta.json +610 -599
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
- package/es/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +12 -15
- package/es/lowcode/view/lc-components/JSX/index.js +5 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Layout/index.js +19 -17
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/es/lowcode/view/lc-components/Link/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Link/index.js +3 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +55 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +11 -10
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +8 -6
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +68 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/index.js +37 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Section/index.js +6 -3
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +107 -107
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Split/index.js +8 -9
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +425 -0
- package/es/lowcode/view/lc-components/Table/index.js +426 -202
- package/es/lowcode/view/lc-components/Table/meta.json +451 -399
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -18
- package/es/lowcode/view/lc-components/Tabs/index.js +52 -37
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Text/index.js +3 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -66
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tree/index.js +173 -119
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/es/lowcode/view/lc-components/Wrapper.js +11 -12
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +84 -84
- package/es/lowcode/view/style/page.less +7 -7
- package/es/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/gridForm.js +3 -2
- package/es/upload/Form/index.js +2 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +20 -21
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +37 -24
- package/es/utils/grid.js +10 -7
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +68 -65
- package/lib/components/LdAutoForm/index.js +56 -11
- package/lib/components/LdFormList/index.js +49 -27
- package/lib/components/LdGrid/index.js +23 -11
- package/lib/components/LdGridForm/index.js +35 -10
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +57 -17
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +67 -27
- package/lib/helper/index.less +7 -7
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +1 -9
- package/lib/locales/zh-CN.js +22 -17
- package/lib/lowcode/constants/api-url.js +270 -97
- package/lib/lowcode/constants/event-topics.js +4 -1
- package/lib/lowcode/constants/index.js +3 -2
- package/lib/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +4 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/launcher.js +13 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +4 -4
- package/lib/lowcode/engine/meta/button.props.json +3 -3
- package/lib/lowcode/engine/meta/cardlist.props.json +13 -3
- package/lib/lowcode/engine/meta/components-list.json +116 -8
- package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/lib/lowcode/engine/meta/dialog.props.json +79 -42
- package/lib/lowcode/engine/meta/drawer.props.json +8 -20
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +130 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +165 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/lib/lowcode/engine/meta/form.props.default.json +2 -2
- package/lib/lowcode/engine/meta/form.props.json +36 -16
- package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
- package/lib/lowcode/engine/meta/imex.props.json +54 -22
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +12 -6
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +4 -4
- package/lib/lowcode/engine/meta/table.props.default.json +2 -1
- package/lib/lowcode/engine/meta/table.props.json +27 -14
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +7 -5
- package/lib/lowcode/engine/meta/tree.props.json +112 -55
- package/lib/lowcode/engine/provider/ContextProvider/index.js +120 -86
- package/lib/lowcode/engine/provider/ContextProvider/usePageState.js +28 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +93 -46
- package/lib/lowcode/engine/tools/dataProcess.js +80 -76
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +96 -6
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/useCombinedRefs.js +20 -0
- package/lib/lowcode/engine/tools/usePageDataStore.js +357 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +7 -4
- package/lib/lowcode/painter/DesignOperator.js +108 -82
- package/lib/lowcode/painter/DesignToolbar.js +83 -45
- package/lib/lowcode/painter/Outline.js +10 -8
- package/lib/lowcode/painter/Panel.js +83 -43
- package/lib/lowcode/painter/components/ActionBindModal.js +42 -25
- package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
- package/lib/lowcode/painter/components/AttrsPanel.js +39 -28
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/lib/lowcode/painter/components/FieldSelector.js +26 -13
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/PreviewIframe.js +26 -0
- package/lib/lowcode/painter/components/RuleInput.js +30 -31
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +35 -34
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +48 -42
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +155 -74
- package/lib/lowcode/painter/components/field-setting/index.js +32 -65
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +10 -16
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +69 -51
- package/lib/lowcode/painter/panel-section/I18nInput.js +2 -1
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/ImpExp.js +131 -36
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +130 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +120 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +27 -111
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +4 -4
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +7 -6
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +22 -16
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -102
- package/lib/lowcode/painter/style/actions-editor.less +15 -15
- package/lib/lowcode/painter/style/border-editor.less +36 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
- package/lib/lowcode/painter/style/border-selector.less +39 -39
- package/lib/lowcode/painter/style/button-type.less +5 -5
- package/lib/lowcode/painter/style/collapse.less +28 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +91 -91
- package/lib/lowcode/painter/style/design.less +159 -152
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +10 -10
- package/lib/lowcode/painter/style/fields-setting.less +25 -25
- package/lib/lowcode/painter/style/font-editor.less +9 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/lib/lowcode/painter/style/icon-selector.less +22 -22
- package/lib/lowcode/painter/style/icon.less +10 -10
- package/lib/lowcode/painter/style/impexp.less +7 -7
- package/lib/lowcode/painter/style/index.less +6 -6
- package/lib/lowcode/painter/style/layout-ratio.less +51 -51
- package/lib/lowcode/painter/style/list-editor.less +95 -95
- package/lib/lowcode/painter/style/number-input.less +17 -17
- package/lib/lowcode/painter/style/outline.less +28 -28
- package/lib/lowcode/painter/style/page-layout-display.less +28 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +98 -98
- package/lib/lowcode/painter/style/pop-confirm.less +17 -17
- package/lib/lowcode/painter/style/pop-form.less +19 -19
- package/lib/lowcode/painter/style/radio.less +24 -24
- package/lib/lowcode/painter/style/ribbon.less +5 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -27
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/style/treedragdrop.less +19 -19
- package/lib/lowcode/view/Canvas.js +34 -7
- package/lib/lowcode/view/Page.js +2 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Box/index.js +4 -4
- package/lib/lowcode/view/lc-components/Box/index.less +14 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
- package/lib/lowcode/view/lc-components/Button/index.js +35 -39
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
- package/lib/lowcode/view/lc-components/Button/style.less +2 -2
- package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/lib/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/lib/lowcode/view/lc-components/Drawer/meta.json +131 -143
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/lib/lowcode/view/lc-components/Form/index.js +341 -76
- package/lib/lowcode/view/lc-components/Form/index.less +4 -4
- package/lib/lowcode/view/lc-components/Form/meta.json +610 -599
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
- package/lib/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +13 -16
- package/lib/lowcode/view/lc-components/JSX/index.js +5 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Layout/index.js +19 -17
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Link/index.js +3 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +55 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +9 -8
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +7 -5
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +76 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/index.js +45 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Section/index.js +6 -3
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +5 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +433 -0
- package/lib/lowcode/view/lc-components/Table/index.js +422 -198
- package/lib/lowcode/view/lc-components/Table/meta.json +451 -399
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +12 -19
- package/lib/lowcode/view/lc-components/Tabs/index.js +51 -36
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Text/index.js +3 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -66
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +170 -116
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/lib/lowcode/view/lc-components/Wrapper.js +12 -12
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +84 -84
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/gridForm.js +3 -2
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +20 -21
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +37 -24
- package/lib/utils/grid.js +10 -7
- package/lowcode.js +1 -1
- package/package.json +173 -171
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["children"];
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import Index from "./index";
|
|
4
5
|
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
6
|
var children = _ref.children,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "Iframe",
|
|
3
|
-
"name": "Iframe",
|
|
4
|
-
"desc": "用于在当前文档中嵌入另一个独立的 HTML 文档、网页或其他类型的媒体内容。它提供了一种将外部内容嵌入到网页中的方法。",
|
|
5
|
-
"icon": "icon-iframe",
|
|
6
|
-
"group": "basic",
|
|
7
|
-
"groupName": "基础",
|
|
8
|
-
"order": 1,
|
|
9
|
-
"props": [
|
|
10
|
-
{
|
|
11
|
-
"key": "id",
|
|
12
|
-
"desc": "唯一标识",
|
|
13
|
-
"type": "string",
|
|
14
|
-
"disabled": true
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"key": "path",
|
|
18
|
-
"name": "网页路径",
|
|
19
|
-
"desc": "iframe打开的网页路径",
|
|
20
|
-
"type": "string"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"key": "supportFullScreen",
|
|
24
|
-
"name": "支持全屏",
|
|
25
|
-
"desc": "是否支持全屏展示",
|
|
26
|
-
"type": "boolean",
|
|
27
|
-
"default": true
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"css": {},
|
|
31
|
-
"advance": {}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"component": "Iframe",
|
|
3
|
+
"name": "Iframe",
|
|
4
|
+
"desc": "用于在当前文档中嵌入另一个独立的 HTML 文档、网页或其他类型的媒体内容。它提供了一种将外部内容嵌入到网页中的方法。",
|
|
5
|
+
"icon": "icon-iframe",
|
|
6
|
+
"group": "basic",
|
|
7
|
+
"groupName": "基础",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "id",
|
|
12
|
+
"desc": "唯一标识",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"disabled": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "path",
|
|
18
|
+
"name": "网页路径",
|
|
19
|
+
"desc": "iframe打开的网页路径",
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"key": "supportFullScreen",
|
|
24
|
+
"name": "支持全屏",
|
|
25
|
+
"desc": "是否支持全屏展示",
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": true
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"css": {},
|
|
31
|
+
"advance": {}
|
|
32
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useMemoizedFn } from 'ahooks';
|
|
3
6
|
import Index from "./index";
|
|
4
7
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
5
|
-
var
|
|
8
|
+
var className = _ref.className,
|
|
6
9
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
-
|
|
10
|
+
var handleClick = useMemoizedFn(function () {});
|
|
11
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
12
|
+
onClick: handleClick
|
|
13
|
+
}, props));
|
|
8
14
|
};
|
|
9
15
|
export default FunctionDesign;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["children"];
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import Index from "./index";
|
|
4
5
|
var FunctionPreview = function FunctionPreview(_ref) {
|
|
5
6
|
var children = _ref.children,
|
|
@@ -1,21 +1,480 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
1
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["id"];
|
|
3
|
-
import React, { useRef } from 'react';
|
|
4
|
-
import
|
|
7
|
+
var _excluded = ["id", "title", "type", "size", "iconFont", "block", "ghost", "css", "className", "onClick", "advance", "impexpSetting"];
|
|
8
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import { useMemoizedFn, useMount, useUnmount, useRequest } from 'ahooks';
|
|
11
|
+
import { notification, Icon as IconAntd, Upload, Button as ButtonAntd, Progress, message } from 'luck-design/antd';
|
|
12
|
+
import { BasicForm, BasicFormItem, PopWindow } from 'luck-design';
|
|
13
|
+
import api from "@/services/ApiConfig";
|
|
14
|
+
import styled from 'styled-components';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import styles from "./index.less";
|
|
17
|
+
import { useRemoteSource } from "../../../engine/provider/ContextProvider";
|
|
5
18
|
import Wrapper from "../Wrapper";
|
|
6
|
-
|
|
19
|
+
import { LdButton as Button } from "../../../../components/LdCom";
|
|
20
|
+
import Icon from "../../../../components/IconFont";
|
|
21
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
22
|
+
import { omitBadProps } from "../../../engine/tools/helper";
|
|
23
|
+
import { exportExcel, getFindexcelstate, uploadTemplate, noAuthGetTemplateUrl } from "../../../constants/api-url";
|
|
24
|
+
import defaultMeta from "../../../engine/meta/imex.props.default.json";
|
|
25
|
+
import { isString, split, last, lowerCase, includes } from 'lodash';
|
|
26
|
+
var StyledButton = styled(Button).withConfig({
|
|
27
|
+
displayName: "StyledButton",
|
|
28
|
+
componentId: "luckda-6530__sc-mil6cj-0"
|
|
29
|
+
})(["", ""], function (props) {
|
|
30
|
+
return props.$css;
|
|
31
|
+
});
|
|
32
|
+
var DownloadLink = styled.div.withConfig({
|
|
33
|
+
displayName: "DownloadLink",
|
|
34
|
+
componentId: "luckda-6530__sc-mil6cj-1"
|
|
35
|
+
})(["display:flex;align-items:center;justify-content:center;margin-top:-36px;"]);
|
|
36
|
+
var UploadDoneWrap = styled.div.withConfig({
|
|
37
|
+
displayName: "UploadDoneWrap",
|
|
38
|
+
componentId: "luckda-6530__sc-mil6cj-2"
|
|
39
|
+
})(["display:flex;align-items:center;justify-content:center;flex-direction:column;padding:16px;"]);
|
|
40
|
+
var LCImex = function LCImex(_ref) {
|
|
7
41
|
var id = _ref.id,
|
|
8
|
-
|
|
42
|
+
title = _ref.title,
|
|
43
|
+
type = _ref.type,
|
|
44
|
+
size = _ref.size,
|
|
45
|
+
iconFont = _ref.iconFont,
|
|
46
|
+
block = _ref.block,
|
|
47
|
+
ghost = _ref.ghost,
|
|
48
|
+
css = _ref.css,
|
|
49
|
+
className = _ref.className,
|
|
50
|
+
onClick = _ref.onClick,
|
|
51
|
+
advance = _ref.advance,
|
|
52
|
+
impexpSetting = _ref.impexpSetting,
|
|
53
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
9
54
|
var ref = useRef();
|
|
55
|
+
var uploadRef = useRef();
|
|
56
|
+
var _useRemoteSource = useRemoteSource(),
|
|
57
|
+
module = _useRemoteSource.module,
|
|
58
|
+
moduleCode = _useRemoteSource.moduleCode;
|
|
10
59
|
var getTargetDom = useMemoizedFn(function () {
|
|
11
|
-
|
|
60
|
+
var _ref$current;
|
|
61
|
+
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.buttonNode;
|
|
12
62
|
});
|
|
63
|
+
|
|
64
|
+
// ========= 导出 ==========
|
|
65
|
+
|
|
66
|
+
var _useRequest = useRequest(exportExcel, {
|
|
67
|
+
manual: true
|
|
68
|
+
}),
|
|
69
|
+
runAsync = _useRequest.runAsync;
|
|
70
|
+
var fecthExcelState = function fecthExcelState(_ref2, procress, resolve, reject) {
|
|
71
|
+
var strategy = _ref2.strategy,
|
|
72
|
+
batchNo = _ref2.batchNo,
|
|
73
|
+
moduleCode = _ref2.moduleCode,
|
|
74
|
+
behaviorKey = _ref2.behaviorKey;
|
|
75
|
+
var _fetchExcelStatePrefix = "/".concat(strategy, "/").concat(batchNo);
|
|
76
|
+
var _fetchExcelStateParams = {
|
|
77
|
+
moduleCode: moduleCode,
|
|
78
|
+
behaviorKey: behaviorKey,
|
|
79
|
+
reportType: "export"
|
|
80
|
+
};
|
|
81
|
+
getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
|
|
82
|
+
if (response.code === 1) {
|
|
83
|
+
var _response$data = response.data,
|
|
84
|
+
successCount = _response$data.successCount,
|
|
85
|
+
totalCount = _response$data.totalCount,
|
|
86
|
+
downloadUrl = _response$data.downloadUrl;
|
|
87
|
+
if (successCount >= totalCount) {
|
|
88
|
+
resolve(downloadUrl);
|
|
89
|
+
} else {
|
|
90
|
+
procress((successCount / totalCount * 100).toFixed(1));
|
|
91
|
+
setTimeout(function () {
|
|
92
|
+
fecthExcelState({
|
|
93
|
+
strategy: strategy,
|
|
94
|
+
batchNo: batchNo,
|
|
95
|
+
moduleCode: moduleCode,
|
|
96
|
+
behaviorKey: behaviorKey
|
|
97
|
+
}, procress, resolve, reject);
|
|
98
|
+
}, 500);
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
reject();
|
|
102
|
+
}
|
|
103
|
+
}).catch(function () {
|
|
104
|
+
reject();
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
var handleExportAll = function handleExportAll(procress) {
|
|
108
|
+
return new Promise( /*#__PURE__*/function () {
|
|
109
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
110
|
+
var isBehavior, strategy, behaviorKey, _exportExcelParams, _exportExcelPrefix, exportExcelResponse;
|
|
111
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
112
|
+
while (1) switch (_context.prev = _context.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
isBehavior = isString(impexpSetting.customParam);
|
|
115
|
+
strategy = isBehavior ? 'behavior' : 'report_server';
|
|
116
|
+
if (isBehavior) {
|
|
117
|
+
_context.next = 4;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
return _context.abrupt("return", message.info("\u672A\u914D\u7F6E\u81EA\u5B9A\u4E49\u884C\u4E3A\uFF01"));
|
|
121
|
+
case 4:
|
|
122
|
+
behaviorKey = impexpSetting.customParam;
|
|
123
|
+
_exportExcelParams = {
|
|
124
|
+
moduleCode: module.moduleCode,
|
|
125
|
+
behaviorKey: behaviorKey,
|
|
126
|
+
reportType: "export"
|
|
127
|
+
};
|
|
128
|
+
_exportExcelPrefix = "/".concat(strategy);
|
|
129
|
+
_context.next = 9;
|
|
130
|
+
return runAsync(_exportExcelPrefix, _exportExcelParams);
|
|
131
|
+
case 9:
|
|
132
|
+
exportExcelResponse = _context.sent;
|
|
133
|
+
if (exportExcelResponse.code === 1) {
|
|
134
|
+
fecthExcelState({
|
|
135
|
+
strategy: strategy,
|
|
136
|
+
batchNo: exportExcelResponse.data,
|
|
137
|
+
moduleCode: module.moduleCode,
|
|
138
|
+
behaviorKey: behaviorKey
|
|
139
|
+
}, procress, resolve, reject);
|
|
140
|
+
} else {
|
|
141
|
+
reject();
|
|
142
|
+
}
|
|
143
|
+
case 11:
|
|
144
|
+
case "end":
|
|
145
|
+
return _context.stop();
|
|
146
|
+
}
|
|
147
|
+
}, _callee);
|
|
148
|
+
}));
|
|
149
|
+
return function (_x, _x2) {
|
|
150
|
+
return _ref3.apply(this, arguments);
|
|
151
|
+
};
|
|
152
|
+
}());
|
|
153
|
+
};
|
|
154
|
+
var doExportAll = function doExportAll(onExportAll) {
|
|
155
|
+
var key = 'exportAll';
|
|
156
|
+
var notificationConfig = {
|
|
157
|
+
key: key,
|
|
158
|
+
duration: null,
|
|
159
|
+
message: '正在导出数据...',
|
|
160
|
+
placement: 'bottomRight',
|
|
161
|
+
closeIcon: /*#__PURE__*/React.createElement("div", null),
|
|
162
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
163
|
+
type: "cloud-download",
|
|
164
|
+
className: styles.exportTheme
|
|
165
|
+
})
|
|
166
|
+
};
|
|
167
|
+
var process = function process(i) {
|
|
168
|
+
notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
169
|
+
description: /*#__PURE__*/React.createElement(Progress, {
|
|
170
|
+
percent: i
|
|
171
|
+
})
|
|
172
|
+
}));
|
|
173
|
+
};
|
|
174
|
+
notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
175
|
+
description: /*#__PURE__*/React.createElement(Progress, {
|
|
176
|
+
percent: 0
|
|
177
|
+
})
|
|
178
|
+
}));
|
|
179
|
+
onExportAll(process).then(function (ret) {
|
|
180
|
+
if (ret) {
|
|
181
|
+
window.location.href = ret;
|
|
182
|
+
}
|
|
183
|
+
notification.close(key);
|
|
184
|
+
}).catch(function () {
|
|
185
|
+
return notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
186
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
187
|
+
type: "cloud-download",
|
|
188
|
+
className: styles.exportErrorTheme
|
|
189
|
+
}),
|
|
190
|
+
message: '导出失败',
|
|
191
|
+
duration: 4
|
|
192
|
+
}));
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// ========= 导出 ==========
|
|
197
|
+
|
|
198
|
+
// ========= 导入 ==========
|
|
199
|
+
var _useState = useState(false),
|
|
200
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
201
|
+
visible = _useState2[0],
|
|
202
|
+
setVisible = _useState2[1];
|
|
203
|
+
var _useState3 = useState('undone'),
|
|
204
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
205
|
+
actionStep = _useState4[0],
|
|
206
|
+
setActionStep = _useState4[1];
|
|
207
|
+
var _useState5 = useState(''),
|
|
208
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
209
|
+
templateUrl = _useState6[0],
|
|
210
|
+
setTemplateUrl = _useState6[1];
|
|
211
|
+
var _useState7 = useState({}),
|
|
212
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
213
|
+
uploadResult = _useState8[0],
|
|
214
|
+
setUploadResult = _useState8[1];
|
|
215
|
+
var _useRequest2 = useRequest(uploadTemplate, {
|
|
216
|
+
manual: true
|
|
217
|
+
}),
|
|
218
|
+
runAsyncImport = _useRequest2.runAsync;
|
|
219
|
+
var fecthFindExcelState = function fecthFindExcelState(_ref4, callback) {
|
|
220
|
+
var strategy = _ref4.strategy,
|
|
221
|
+
batchNo = _ref4.batchNo,
|
|
222
|
+
moduleCode = _ref4.moduleCode,
|
|
223
|
+
behaviorKey = _ref4.behaviorKey,
|
|
224
|
+
templateId = _ref4.templateId;
|
|
225
|
+
var _fetchExcelStatePrefix = "/".concat(strategy, "/").concat(batchNo);
|
|
226
|
+
var _fetchExcelStateParams = {
|
|
227
|
+
moduleCode: moduleCode,
|
|
228
|
+
behaviorKey: behaviorKey,
|
|
229
|
+
templateId: templateId,
|
|
230
|
+
reportType: "import"
|
|
231
|
+
};
|
|
232
|
+
getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
|
|
233
|
+
if (response.code === 1) {
|
|
234
|
+
var data = response.data;
|
|
235
|
+
callback(data);
|
|
236
|
+
if (data.state !== -1 && data.successCount < data.totalCount) {
|
|
237
|
+
setTimeout(function () {
|
|
238
|
+
fecthFindExcelState({
|
|
239
|
+
strategy: strategy,
|
|
240
|
+
batchNo: batchNo,
|
|
241
|
+
moduleCode: moduleCode,
|
|
242
|
+
behaviorKey: behaviorKey,
|
|
243
|
+
templateId: templateId
|
|
244
|
+
}, callback);
|
|
245
|
+
}, 500);
|
|
246
|
+
} else {
|
|
247
|
+
setActionStep('finish');
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
callback();
|
|
251
|
+
setActionStep('finish');
|
|
252
|
+
}
|
|
253
|
+
}).catch(function () {
|
|
254
|
+
setActionStep('finish');
|
|
255
|
+
callback();
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
useEffect(function () {
|
|
259
|
+
if (visible) {
|
|
260
|
+
setActionStep('undone');
|
|
261
|
+
setUploadResult({});
|
|
262
|
+
setTemplateUrl('');
|
|
263
|
+
}
|
|
264
|
+
}, [visible]);
|
|
265
|
+
var handleImport = /*#__PURE__*/function () {
|
|
266
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
267
|
+
var _importExcelParams, strategy, importParameter, _importExcelPrefix, importExcelResponse;
|
|
268
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
269
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
270
|
+
case 0:
|
|
271
|
+
if (err) {
|
|
272
|
+
_context2.next = 14;
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
_importExcelParams = new FormData();
|
|
276
|
+
values.files.forEach(function (file) {
|
|
277
|
+
_importExcelParams.append('file', file.originFileObj);
|
|
278
|
+
});
|
|
279
|
+
strategy = impexpSetting.customType ? 'behavior' : 'report_server';
|
|
280
|
+
importParameter = impexpSetting.customType ? {
|
|
281
|
+
moduleCode: module.moduleCode,
|
|
282
|
+
behaviorKey: impexpSetting.customParam,
|
|
283
|
+
gatewayUrl: "".concat(window.location.origin).concat(api.API_HOST)
|
|
284
|
+
} : {
|
|
285
|
+
templateId: impexpSetting.customParam,
|
|
286
|
+
gatewayUrl: "".concat(window.location.origin).concat(api.API_HOST)
|
|
287
|
+
};
|
|
288
|
+
_importExcelParams.append('importParameter', JSON.stringify(importParameter));
|
|
289
|
+
_importExcelPrefix = "/".concat(strategy);
|
|
290
|
+
_context2.next = 9;
|
|
291
|
+
return runAsyncImport(_importExcelPrefix, _importExcelParams);
|
|
292
|
+
case 9:
|
|
293
|
+
importExcelResponse = _context2.sent;
|
|
294
|
+
setActionStep('uploading');
|
|
295
|
+
fecthFindExcelState(_objectSpread({
|
|
296
|
+
strategy: strategy,
|
|
297
|
+
batchNo: importExcelResponse.data
|
|
298
|
+
}, importParameter), function (result) {
|
|
299
|
+
setUploadResult(result || {});
|
|
300
|
+
});
|
|
301
|
+
_context2.next = 15;
|
|
302
|
+
break;
|
|
303
|
+
case 14:
|
|
304
|
+
message.info('请选择Excel文件!');
|
|
305
|
+
case 15:
|
|
306
|
+
case "end":
|
|
307
|
+
return _context2.stop();
|
|
308
|
+
}
|
|
309
|
+
}, _callee2);
|
|
310
|
+
}));
|
|
311
|
+
return function handleImport(_x3, _x4) {
|
|
312
|
+
return _ref5.apply(this, arguments);
|
|
313
|
+
};
|
|
314
|
+
}();
|
|
315
|
+
|
|
316
|
+
// ========= 导入 ==========
|
|
317
|
+
|
|
318
|
+
var handleClick = useMemoizedFn( /*#__PURE__*/function () {
|
|
319
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
|
|
320
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
321
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
322
|
+
case 0:
|
|
323
|
+
if (!onClick) {
|
|
324
|
+
_context3.next = 3;
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
onClick(e);
|
|
328
|
+
return _context3.abrupt("return");
|
|
329
|
+
case 3:
|
|
330
|
+
if (!(impexpSetting.type === 'export')) {
|
|
331
|
+
_context3.next = 7;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
// ! 导出
|
|
335
|
+
if (isString(impexpSetting.customParam) && impexpSetting.customParam) {
|
|
336
|
+
doExportAll(handleExportAll);
|
|
337
|
+
} else {
|
|
338
|
+
message.info("\u672A\u914D\u7F6E\u884C\u4E3A\uFF01");
|
|
339
|
+
}
|
|
340
|
+
_context3.next = 11;
|
|
341
|
+
break;
|
|
342
|
+
case 7:
|
|
343
|
+
if (impexpSetting.customParam) {
|
|
344
|
+
_context3.next = 9;
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
return _context3.abrupt("return", message.info("\u672A\u914D\u7F6E\u6A21\u7248\uFF01"));
|
|
348
|
+
case 9:
|
|
349
|
+
if (!impexpSetting.customType) {
|
|
350
|
+
noAuthGetTemplateUrl(impexpSetting.customParam).then(function (response) {
|
|
351
|
+
if (response.code === 1) {
|
|
352
|
+
setTemplateUrl(response.data);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
setVisible(true);
|
|
357
|
+
case 11:
|
|
358
|
+
case "end":
|
|
359
|
+
return _context3.stop();
|
|
360
|
+
}
|
|
361
|
+
}, _callee3);
|
|
362
|
+
}));
|
|
363
|
+
return function (_x5) {
|
|
364
|
+
return _ref6.apply(this, arguments);
|
|
365
|
+
};
|
|
366
|
+
}());
|
|
13
367
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
14
368
|
id: id,
|
|
15
|
-
displayName: "
|
|
369
|
+
displayName: "Imex",
|
|
16
370
|
getTargetDom: getTargetDom
|
|
17
|
-
}, /*#__PURE__*/React.createElement(
|
|
18
|
-
ref: ref
|
|
19
|
-
|
|
371
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledButton, {
|
|
372
|
+
ref: ref,
|
|
373
|
+
type: type,
|
|
374
|
+
size: size,
|
|
375
|
+
block: block,
|
|
376
|
+
ghost: ghost,
|
|
377
|
+
$css: css,
|
|
378
|
+
className: classNames(_defineProperty({}, className, !!className)),
|
|
379
|
+
onClick: handleClick
|
|
380
|
+
}, iconFont ? /*#__PURE__*/React.createElement(Icon, {
|
|
381
|
+
type: iconFont
|
|
382
|
+
}) : null, title || formatMessage({
|
|
383
|
+
id: 'luckda.lowcode.painter.import',
|
|
384
|
+
label: '导入'
|
|
385
|
+
})), /*#__PURE__*/React.createElement(PopWindow, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
386
|
+
visible: visible,
|
|
387
|
+
title: "\u4E0A\u4F20excel\u6587\u4EF6",
|
|
388
|
+
mode: "modal",
|
|
389
|
+
size: "mini"
|
|
390
|
+
}, "visible", visible), "destroyOnClose", true), "footer", actionStep === 'undone' ? function () {
|
|
391
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
392
|
+
} : null), "onClose", function onClose() {
|
|
393
|
+
if (actionStep !== 'uploading') {
|
|
394
|
+
setVisible(false);
|
|
395
|
+
}
|
|
396
|
+
}), actionStep === 'undone' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicForm, {
|
|
397
|
+
onSubmit: handleImport,
|
|
398
|
+
layout: "drawer",
|
|
399
|
+
buttonRender: function buttonRender() {
|
|
400
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
401
|
+
type: "primary",
|
|
402
|
+
htmlType: "submit"
|
|
403
|
+
}, "\u5BFC\u5165");
|
|
404
|
+
}
|
|
405
|
+
}, /*#__PURE__*/React.createElement(BasicFormItem, {
|
|
406
|
+
type: "upload",
|
|
407
|
+
name: "files",
|
|
408
|
+
label: "\u4E0A\u4F20",
|
|
409
|
+
accept: ".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
410
|
+
config: {
|
|
411
|
+
required: true,
|
|
412
|
+
message: '请上传Excel文件',
|
|
413
|
+
directory: false,
|
|
414
|
+
num: 1,
|
|
415
|
+
multiple: false,
|
|
416
|
+
autoUpload: false,
|
|
417
|
+
listType: 'text',
|
|
418
|
+
accept: '.xls,.xlsx,.xlt,.xlsm',
|
|
419
|
+
name: 'fileObj',
|
|
420
|
+
beforeUpload: function beforeUpload(file) {
|
|
421
|
+
var suffix = lowerCase(last(split(file.name, '.')));
|
|
422
|
+
if (!includes(['xls', 'xlsx', 'xlt', 'xlsm'], suffix)) {
|
|
423
|
+
message.info('禁止上传的文件类型');
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
})), templateUrl && /*#__PURE__*/React.createElement(DownloadLink, null, /*#__PURE__*/React.createElement("a", {
|
|
429
|
+
href: "".concat(templateUrl),
|
|
430
|
+
download: true
|
|
431
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
432
|
+
type: "link"
|
|
433
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
434
|
+
type: "download"
|
|
435
|
+
}), " \u4E0B\u8F7D\u6A21\u7248")))) : /*#__PURE__*/React.createElement(UploadDoneWrap, null, /*#__PURE__*/React.createElement("p", null, "\u5DF2\u5BFC\u5165\uFF1A", uploadResult.totalCount || 0, "\u6761\uFF0C\u6210\u529F\uFF1A", uploadResult.successCount || 0, "\u6761\uFF0C\u5931\u8D25\uFF1A", uploadResult.failureCount, "\u6761"), uploadResult.failureCount > 0 ? /*#__PURE__*/React.createElement("a", {
|
|
436
|
+
href: uploadResult.errorFileUrl,
|
|
437
|
+
download: true
|
|
438
|
+
}, "\u4E0B\u8F7D\u51FA\u9519\u8868\u683C\u4FE1\u606F") : ''))));
|
|
20
439
|
};
|
|
21
|
-
|
|
440
|
+
LCImex.propTypes = {
|
|
441
|
+
/**
|
|
442
|
+
* @name 唯一标识
|
|
443
|
+
* @type string
|
|
444
|
+
* @disabled true
|
|
445
|
+
*/
|
|
446
|
+
id: PropTypes.string.isRequired,
|
|
447
|
+
/**
|
|
448
|
+
* @name 按钮标题
|
|
449
|
+
* @type string
|
|
450
|
+
* @default 12:3:9
|
|
451
|
+
*/
|
|
452
|
+
title: PropTypes.string,
|
|
453
|
+
/**
|
|
454
|
+
* @name 按钮类型
|
|
455
|
+
* @type _ButtonType
|
|
456
|
+
* @default 'default'
|
|
457
|
+
*/
|
|
458
|
+
type: PropTypes.oneOf(['default', 'primary', 'dashed', 'danger']),
|
|
459
|
+
/**
|
|
460
|
+
* @name impexpSetting
|
|
461
|
+
* @type _ImpExpAlone
|
|
462
|
+
* @default { "customType": false, "customParam": null, "type": "export" }
|
|
463
|
+
*/
|
|
464
|
+
impexpSetting: PropTypes.object,
|
|
465
|
+
/**
|
|
466
|
+
* @name 按钮大小
|
|
467
|
+
* @type segmented
|
|
468
|
+
* @options [{ "label": "小", "value": "small"}, { "label": "中", "value": "middle" }, { "label": "大", "value": "large" }]
|
|
469
|
+
* @default 'default'
|
|
470
|
+
*/
|
|
471
|
+
size: PropTypes.oneOf(['small', 'default', 'large']),
|
|
472
|
+
/**
|
|
473
|
+
* @name 将按钮宽度调整为其父宽度的选项
|
|
474
|
+
* @type boolean
|
|
475
|
+
* @default false
|
|
476
|
+
*/
|
|
477
|
+
block: PropTypes.bool
|
|
478
|
+
};
|
|
479
|
+
LCImex.defaultProps = omitBadProps(defaultMeta);
|
|
480
|
+
export default LCImex;
|