@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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldUpload",
|
|
3
|
+
"name": "附件上传",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "附件上传表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "fieldAliasName",
|
|
12
|
+
"name": "字段标题",
|
|
13
|
+
"type": "_I18nInput"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "action",
|
|
17
|
+
"name": "上传地址",
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"key": "listType",
|
|
22
|
+
"name": "展示样式",
|
|
23
|
+
"type": "segmented",
|
|
24
|
+
"options": [
|
|
25
|
+
{
|
|
26
|
+
"label": "文本",
|
|
27
|
+
"value": "text"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"label": "图片",
|
|
31
|
+
"value": "picture"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "图片卡片",
|
|
35
|
+
"value": "picture-card"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"default": "text"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"key": "num",
|
|
42
|
+
"name": "最大上传数",
|
|
43
|
+
"desc": "上传文件数,超过该值不显示上传按钮,0表示不限数量",
|
|
44
|
+
"type": "number",
|
|
45
|
+
"default": 0
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "name",
|
|
49
|
+
"name": "发到后台的文件参数名",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"default": "files"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"key": "accept",
|
|
55
|
+
"name": "上传的文件类型",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"default": "*"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"key": "generalSetting",
|
|
61
|
+
"name": "通用配置",
|
|
62
|
+
"type": "group",
|
|
63
|
+
"props": [
|
|
64
|
+
{
|
|
65
|
+
"key": "col",
|
|
66
|
+
"name": "占列数",
|
|
67
|
+
"type": "radio",
|
|
68
|
+
"repositioning": true,
|
|
69
|
+
"options": [
|
|
70
|
+
{
|
|
71
|
+
"label": "1",
|
|
72
|
+
"value": 1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"label": "2",
|
|
76
|
+
"value": 2
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"label": "3",
|
|
80
|
+
"value": 3
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"label": "4",
|
|
84
|
+
"value": 4
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"default": 1
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "row",
|
|
91
|
+
"name": "占行数",
|
|
92
|
+
"type": "radio",
|
|
93
|
+
"repositioning": true,
|
|
94
|
+
"options": [
|
|
95
|
+
{
|
|
96
|
+
"label": "1",
|
|
97
|
+
"value": 1
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"label": "2",
|
|
101
|
+
"value": 2
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"label": "3",
|
|
105
|
+
"value": 3
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"label": "4",
|
|
109
|
+
"value": 4
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"default": 1
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"key": "note",
|
|
116
|
+
"name": "字段注释",
|
|
117
|
+
"type": "_I18nInput"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"key": "tip",
|
|
121
|
+
"name": "长说明",
|
|
122
|
+
"type": "_I18nInput"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"key": "placeholder",
|
|
126
|
+
"name": "默认提示",
|
|
127
|
+
"type": "_I18nInput"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"advance": {
|
|
133
|
+
"events": [
|
|
134
|
+
{
|
|
135
|
+
"key": "onValueChange",
|
|
136
|
+
"name": "数据变化事件",
|
|
137
|
+
"desc": "在数据变化事件时,执行方法",
|
|
138
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"key": "onChange",
|
|
142
|
+
"name": "值变化事件(onChange)",
|
|
143
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
144
|
+
"func": "function onChange(e) {\n\t\n}"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"key": "beforeUpload",
|
|
148
|
+
"name": "上传之前的回调",
|
|
149
|
+
"desc": "上传文件之前的钩子,参数为上传的文件",
|
|
150
|
+
"func": "function beforeUpload(file,fileList) {\n\t\n}"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldUser",
|
|
3
|
+
"name": "用户",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "用户类型表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "fieldAliasName",
|
|
12
|
+
"name": "字段标题",
|
|
13
|
+
"type": "_I18nInput"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "allowClear",
|
|
17
|
+
"name": "允许清除",
|
|
18
|
+
"type": "switch",
|
|
19
|
+
"default": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "screenable",
|
|
23
|
+
"name": "弹窗选择",
|
|
24
|
+
"type": "switch",
|
|
25
|
+
"default": "true"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"key": "mode",
|
|
29
|
+
"name": "更新模式",
|
|
30
|
+
"type": "segmented",
|
|
31
|
+
"options": [
|
|
32
|
+
{
|
|
33
|
+
"label": "覆盖",
|
|
34
|
+
"value": "modify"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"label": "追加",
|
|
38
|
+
"value": "except"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"default": "modify"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"key": "extraFilter",
|
|
45
|
+
"name": "登录人过滤",
|
|
46
|
+
"type": "segmented",
|
|
47
|
+
"desc": "按登录人信息过滤",
|
|
48
|
+
"options": [
|
|
49
|
+
{
|
|
50
|
+
"label": "不过滤",
|
|
51
|
+
"value": null
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"label": "管辖部门",
|
|
55
|
+
"value": "0"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"label": "所属部门",
|
|
59
|
+
"value": "1"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"default": null
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"key": "generalSetting",
|
|
66
|
+
"name": "通用配置",
|
|
67
|
+
"type": "group",
|
|
68
|
+
"props": [
|
|
69
|
+
{
|
|
70
|
+
"key": "col",
|
|
71
|
+
"name": "占列数",
|
|
72
|
+
"type": "radio",
|
|
73
|
+
"repositioning": true,
|
|
74
|
+
"options": [
|
|
75
|
+
{
|
|
76
|
+
"label": "1",
|
|
77
|
+
"value": 1
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"label": "2",
|
|
81
|
+
"value": 2
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"label": "3",
|
|
85
|
+
"value": 3
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"label": "4",
|
|
89
|
+
"value": 4
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"default": 1
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"key": "row",
|
|
96
|
+
"name": "占行数",
|
|
97
|
+
"type": "radio",
|
|
98
|
+
"repositioning": true,
|
|
99
|
+
"options": [
|
|
100
|
+
{
|
|
101
|
+
"label": "1",
|
|
102
|
+
"value": 1
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"label": "2",
|
|
106
|
+
"value": 2
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"label": "3",
|
|
110
|
+
"value": 3
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"label": "4",
|
|
114
|
+
"value": 4
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"default": 1
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"key": "note",
|
|
121
|
+
"name": "字段注释",
|
|
122
|
+
"type": "_I18nInput"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"key": "tip",
|
|
126
|
+
"name": "长说明",
|
|
127
|
+
"type": "_I18nInput"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"key": "placeholder",
|
|
131
|
+
"name": "默认提示",
|
|
132
|
+
"type": "_I18nInput"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"advance": {
|
|
138
|
+
"events": [
|
|
139
|
+
{
|
|
140
|
+
"key": "onValueChange",
|
|
141
|
+
"name": "数据变化事件",
|
|
142
|
+
"desc": "在数据变化事件时,执行方法",
|
|
143
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"key": "onChange",
|
|
147
|
+
"name": "值变化事件(onChange)",
|
|
148
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
149
|
+
"func": "function onChange(value, extra) {\n\t\n}"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"key": "onSelect",
|
|
153
|
+
"name": "下拉选中事件",
|
|
154
|
+
"desc": "下拉选中时,执行方法",
|
|
155
|
+
"func": "function onSelect(value, option) {\n\t\n}"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"key": "onBlur",
|
|
159
|
+
"name": "失焦事件",
|
|
160
|
+
"desc": "失去焦点时回调",
|
|
161
|
+
"func": "function onBlur() {\n\t\n}"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldYear",
|
|
3
|
+
"name": "年份选择",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "年份选择表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "fieldAliasName",
|
|
12
|
+
"name": "字段标题",
|
|
13
|
+
"type": "_I18nInput"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "allowClear",
|
|
17
|
+
"name": "允许清除",
|
|
18
|
+
"type": "switch"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"key": "disabledDate",
|
|
22
|
+
"name": "不可选日期",
|
|
23
|
+
"type": "_JSEditor",
|
|
24
|
+
"defaultCode": "function disabledDate(currentDate) {return true}",
|
|
25
|
+
"mustConfirm": true,
|
|
26
|
+
"wrapper": "collapse",
|
|
27
|
+
"wrapperProps": { "suppressIcon": true }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "generalSetting",
|
|
31
|
+
"name": "通用配置",
|
|
32
|
+
"type": "group",
|
|
33
|
+
"props": [
|
|
34
|
+
{
|
|
35
|
+
"key": "col",
|
|
36
|
+
"name": "占列数",
|
|
37
|
+
"type": "radio",
|
|
38
|
+
"repositioning": true,
|
|
39
|
+
"options": [
|
|
40
|
+
{
|
|
41
|
+
"label": "1",
|
|
42
|
+
"value": 1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"label": "2",
|
|
46
|
+
"value": 2
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "3",
|
|
50
|
+
"value": 3
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"label": "4",
|
|
54
|
+
"value": 4
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"default": 1
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"key": "row",
|
|
61
|
+
"name": "占行数",
|
|
62
|
+
"type": "radio",
|
|
63
|
+
"repositioning": true,
|
|
64
|
+
"options": [
|
|
65
|
+
{
|
|
66
|
+
"label": "1",
|
|
67
|
+
"value": 1
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"label": "2",
|
|
71
|
+
"value": 2
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"label": "3",
|
|
75
|
+
"value": 3
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"label": "4",
|
|
79
|
+
"value": 4
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"default": 1
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"key": "note",
|
|
86
|
+
"name": "字段注释",
|
|
87
|
+
"type": "_I18nInput"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "tip",
|
|
91
|
+
"name": "长说明",
|
|
92
|
+
"type": "_I18nInput"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"key": "placeholder",
|
|
96
|
+
"name": "默认提示",
|
|
97
|
+
"type": "_I18nInput"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"advance": {
|
|
103
|
+
"events": [
|
|
104
|
+
{
|
|
105
|
+
"key": "onValueChange",
|
|
106
|
+
"name": "数据变化事件",
|
|
107
|
+
"desc": "在数据变化事件时,执行方法",
|
|
108
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"key": "onChange",
|
|
112
|
+
"name": "值变化事件(onChange)",
|
|
113
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
114
|
+
"func": "function onChange(date, dateString) {\n\t\n}"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -16,7 +16,6 @@ var _ahooks = require("ahooks");
|
|
|
16
16
|
var _lodash = require("lodash");
|
|
17
17
|
var _utils = require("@luck-design-biz/base/utils");
|
|
18
18
|
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
19
|
-
var _dataProcess = require("../../../engine/tools/dataProcess");
|
|
20
19
|
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
21
20
|
var _index = _interopRequireDefault(require("./index"));
|
|
22
21
|
var _excluded = ["children", "blocks", "id"];
|
|
@@ -27,38 +26,32 @@ var FunctionDesign = function FunctionDesign(_ref) {
|
|
|
27
26
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
27
|
var ref = (0, _react.useRef)(null);
|
|
29
28
|
var ctx = (0, _ContextProvider.useContext)();
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
var current = (0, _ContextProvider.useGet)({
|
|
30
|
+
id: id
|
|
31
|
+
});
|
|
33
32
|
var previousBlocks = (0, _ahooks.usePrevious)((0, _lodash.cloneDeep)(blocks), function (prev, next) {
|
|
34
33
|
return !(0, _lodash.isEqual)(prev, next);
|
|
35
34
|
});
|
|
36
35
|
(0, _ahooks.useUpdateLayoutEffect)(function () {
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
gridApi = _ctx$componentMap$get.gridApi;
|
|
52
|
-
gridApi.api.refreshCells({
|
|
53
|
-
columns: ['luck-actions'],
|
|
54
|
-
force: true
|
|
55
|
-
});
|
|
36
|
+
var blocksObj = (0, _lodash.keyBy)(blocks, 'id');
|
|
37
|
+
var previousBlocksObj = (0, _lodash.keyBy)(previousBlocks, 'id');
|
|
38
|
+
(0, _lodash.forEach)(blocksObj, function (value, key) {
|
|
39
|
+
var _value$dataset, _previousBlocksObj$ke, _value$dataset2, _previousBlocksObj$ke2;
|
|
40
|
+
if (((_value$dataset = value.dataset) === null || _value$dataset === void 0 ? void 0 : _value$dataset.code) !== ((_previousBlocksObj$ke = previousBlocksObj[key]) === null || _previousBlocksObj$ke === void 0 || (_previousBlocksObj$ke = _previousBlocksObj$ke.dataset) === null || _previousBlocksObj$ke === void 0 ? void 0 : _previousBlocksObj$ke.code)) ((_value$dataset2 = value.dataset) === null || _value$dataset2 === void 0 ? void 0 : _value$dataset2.code) && ref.current.doQueryOne(key);
|
|
41
|
+
if (value.actionsColumnReset !== ((_previousBlocksObj$ke2 = previousBlocksObj[key]) === null || _previousBlocksObj$ke2 === void 0 ? void 0 : _previousBlocksObj$ke2.actionsColumnReset)) {
|
|
42
|
+
var _ctx$componentMap$get2;
|
|
43
|
+
var _ctx$componentMap$get = (_ctx$componentMap$get2 = ctx.componentMap.get(id)) === null || _ctx$componentMap$get2 === void 0 ? void 0 : _ctx$componentMap$get2.api.getForm().getFormRef(key).formRef.current,
|
|
44
|
+
gridApi = _ctx$componentMap$get.gridApi;
|
|
45
|
+
gridApi.api.refreshCells({
|
|
46
|
+
columns: ['luck-actions'],
|
|
47
|
+
force: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
56
50
|
});
|
|
57
51
|
}, [JSON.stringify(blocks)]);
|
|
58
52
|
(0, _react.useEffect)(function () {
|
|
59
53
|
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref2) {
|
|
60
54
|
var compId = _ref2.id,
|
|
61
|
-
pageData = _ref2.pageData,
|
|
62
55
|
newValue = _ref2.newValue,
|
|
63
56
|
oldValue = _ref2.oldValue;
|
|
64
57
|
if (compId !== id || !newValue.hasOwnProperty('blocks')) return;
|
|
@@ -68,25 +61,21 @@ var FunctionDesign = function FunctionDesign(_ref) {
|
|
|
68
61
|
newItem = _differenceBy2[0];
|
|
69
62
|
if (newItem.type === 'blank') {
|
|
70
63
|
var boxId = "box_".concat((0, _utils.suid)());
|
|
71
|
-
(0,
|
|
64
|
+
(0, _ContextProvider.addNode)(id, boxId, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
72
65
|
buildIn: true,
|
|
73
66
|
formBoxId: newItem.id
|
|
74
67
|
}));
|
|
75
|
-
setPageData(pageData);
|
|
76
68
|
}
|
|
77
69
|
} else if (newValue.blocks.length < oldValue.blocks.length) {
|
|
78
70
|
var _differenceBy3 = (0, _lodash.differenceBy)(oldValue.blocks, newValue.blocks, 'id'),
|
|
79
71
|
_differenceBy4 = (0, _slicedToArray2.default)(_differenceBy3, 1),
|
|
80
72
|
removeItem = _differenceBy4[0];
|
|
81
73
|
if (removeItem.type === 'blank') {
|
|
82
|
-
var _findNodeAndParent = (0, _dataProcess.findNodeAndParent)(id, pageData),
|
|
83
|
-
current = _findNodeAndParent.node;
|
|
84
74
|
var _boxId = current.children.find(function (childId) {
|
|
85
|
-
return current[childId].props.
|
|
75
|
+
return current[childId].props.formBoxId === removeItem.id;
|
|
86
76
|
});
|
|
87
77
|
ctx.$publisher(ctx.topics.COMPONENT_DELETE, {
|
|
88
|
-
id: _boxId
|
|
89
|
-
pageData: pageData
|
|
78
|
+
id: _boxId
|
|
90
79
|
});
|
|
91
80
|
}
|
|
92
81
|
}
|
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _index = _interopRequireDefault(require("./index"));
|
|
10
11
|
var _excluded = ["children"];
|
|
11
12
|
var FunctionLive = function FunctionLive(_ref) {
|
|
12
13
|
var children = _ref.children,
|
|
13
14
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, props, children);
|
|
15
16
|
};
|
|
16
17
|
var _default = exports.default = FunctionLive;
|
|
@@ -5,12 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
12
|
var _index = _interopRequireDefault(require("./index"));
|
|
10
13
|
var _excluded = ["children"];
|
|
11
14
|
var FunctionPreview = function FunctionPreview(_ref) {
|
|
12
15
|
var children = _ref.children,
|
|
13
16
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
14
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({}, props, {
|
|
18
|
+
initData: {
|
|
19
|
+
formMode: 'update',
|
|
20
|
+
ticketData: (0, _defineProperty2.default)({}, window.appConfig.constraintKeys.PRIMARY, 'test')
|
|
21
|
+
}
|
|
22
|
+
}), children);
|
|
15
23
|
};
|
|
16
24
|
var _default = exports.default = FunctionPreview;
|