@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,49 +1,57 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import React, { createContext } from 'react';
|
|
7
|
+
import { useRequest, useSetState, useAsyncEffect, useMemoizedFn, useCreation, useUnmount } from 'ahooks';
|
|
8
|
+
import launcher from "../launcher";
|
|
10
9
|
import { LuckDaContext } from "../../../components/Builder";
|
|
11
10
|
import { doAction as doActionUtils } from "../../../helper/action";
|
|
12
|
-
import
|
|
11
|
+
import usePageDataStore from "../tools/usePageDataStore";
|
|
12
|
+
import { useTemporalStore } from "../provider/ContextProvider";
|
|
13
13
|
import { decompress } from "../tools/dataProcess";
|
|
14
|
-
import { fetchPageData, fetchDesignModlueData, fetchPreviewModlueData, fetchModlueData, fetchAllDataset, fetchAllSerials } from "../../constants/api-url";
|
|
15
|
-
import { RUNTIME, COOKIE_RUNTIME_KEY,
|
|
14
|
+
import { fetchPageData, fetchDesignModlueData, fetchPreviewModlueData, fetchModlueData, fetchAllDataset, fetchAllSerials, fetchAllBehaviorEx } from "../../constants/api-url";
|
|
15
|
+
import { RUNTIME, COOKIE_RUNTIME_KEY, META_TAG_NAME } from "../../constants";
|
|
16
|
+
import { PAGE_LOAD_MOUNT } from "../../constants/event-topics";
|
|
17
|
+
import { setMetaAttrs } from "../tools/helper";
|
|
16
18
|
export var RemoteSourceContext = /*#__PURE__*/createContext(null);
|
|
17
19
|
export default (function (_ref) {
|
|
18
20
|
var children = _ref.children,
|
|
19
21
|
code = _ref.code,
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
eventBus = _ref.eventBus;
|
|
23
|
+
var _usePageDataStore = usePageDataStore(function (state) {
|
|
24
|
+
return {
|
|
25
|
+
initialize: state.initialize,
|
|
26
|
+
initializeModule: state.initializeModule,
|
|
27
|
+
reset: state.reset
|
|
28
|
+
};
|
|
29
|
+
}),
|
|
30
|
+
initialize = _usePageDataStore.initialize,
|
|
31
|
+
initializeModule = _usePageDataStore.initializeModule,
|
|
32
|
+
reset = _usePageDataStore.reset;
|
|
33
|
+
var _useTemporalStore = useTemporalStore(function (state) {
|
|
34
|
+
return {
|
|
35
|
+
pause: state.pause,
|
|
36
|
+
resume: state.resume,
|
|
37
|
+
clear: state.clear
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
pause = _useTemporalStore.pause,
|
|
41
|
+
resume = _useTemporalStore.resume,
|
|
42
|
+
clear = _useTemporalStore.clear;
|
|
30
43
|
var _useSetState = useSetState({}),
|
|
31
44
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
32
45
|
remoteSource = _useSetState2[0],
|
|
33
46
|
setRemoteSource = _useSetState2[1];
|
|
34
|
-
var _useCookieState = useCookieState(COOKIE_RUNTIME_KEY),
|
|
35
|
-
_useCookieState2 = _slicedToArray(_useCookieState, 2),
|
|
36
|
-
cookieRuntime = _useCookieState2[0],
|
|
37
|
-
setRuntime = _useCookieState2[1];
|
|
38
|
-
var prevRuntime = useRef(cookieRuntime);
|
|
39
47
|
useCreation(function () {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
48
|
+
launcher();
|
|
49
|
+
pause();
|
|
50
|
+
setMetaAttrs(COOKIE_RUNTIME_KEY, eventBus.runtime);
|
|
44
51
|
}, []);
|
|
45
52
|
useUnmount(function () {
|
|
46
|
-
|
|
53
|
+
reset();
|
|
54
|
+
clear();
|
|
47
55
|
});
|
|
48
56
|
|
|
49
57
|
// 获取页面数据
|
|
@@ -53,7 +61,7 @@ export default (function (_ref) {
|
|
|
53
61
|
fetchPageDataLoading = _useRequest.loading,
|
|
54
62
|
runFetchPageData = _useRequest.runAsync;
|
|
55
63
|
// 获取模块数据
|
|
56
|
-
var _useRequest2 = useRequest(_defineProperty(_defineProperty(_defineProperty({}, RUNTIME.DESIGN, fetchDesignModlueData), RUNTIME.PREVIEW, fetchPreviewModlueData), RUNTIME.LIVE, fetchModlueData)[runtime], {
|
|
64
|
+
var _useRequest2 = useRequest(_defineProperty(_defineProperty(_defineProperty({}, RUNTIME.DESIGN, fetchDesignModlueData), RUNTIME.PREVIEW, fetchPreviewModlueData), RUNTIME.LIVE, fetchModlueData)[eventBus.runtime], {
|
|
57
65
|
manual: true,
|
|
58
66
|
onSuccess: function onSuccess(_ref2) {
|
|
59
67
|
var code = _ref2.code,
|
|
@@ -62,6 +70,7 @@ export default (function (_ref) {
|
|
|
62
70
|
setRemoteSource({
|
|
63
71
|
module: data
|
|
64
72
|
});
|
|
73
|
+
initializeModule(data);
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
}),
|
|
@@ -103,8 +112,48 @@ export default (function (_ref) {
|
|
|
103
112
|
fetchAllSerialsLoading = _useRequest4.loading,
|
|
104
113
|
runFetchAllSerials = _useRequest4.run,
|
|
105
114
|
refreshSerials = _useRequest4.refreshAsync;
|
|
115
|
+
|
|
116
|
+
// 获取导入导出行为下拉数据
|
|
117
|
+
var _useRequest5 = useRequest(fetchAllBehaviorEx, {
|
|
118
|
+
manual: true,
|
|
119
|
+
onSuccess: function onSuccess(_ref5) {
|
|
120
|
+
var code = _ref5.code,
|
|
121
|
+
data = _ref5.data;
|
|
122
|
+
if (code === 1) {
|
|
123
|
+
setRemoteSource({
|
|
124
|
+
impTypeList: data.map(function (item) {
|
|
125
|
+
return {
|
|
126
|
+
key: item.code,
|
|
127
|
+
value: item.code,
|
|
128
|
+
label: item.name
|
|
129
|
+
};
|
|
130
|
+
})
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
runFetchAllBehaviorImport = _useRequest5.run;
|
|
136
|
+
var _useRequest6 = useRequest(fetchAllBehaviorEx, {
|
|
137
|
+
manual: true,
|
|
138
|
+
onSuccess: function onSuccess(_ref6) {
|
|
139
|
+
var code = _ref6.code,
|
|
140
|
+
data = _ref6.data;
|
|
141
|
+
if (code === 1) {
|
|
142
|
+
setRemoteSource({
|
|
143
|
+
expTypeList: data.map(function (item) {
|
|
144
|
+
return {
|
|
145
|
+
key: item.code,
|
|
146
|
+
value: item.code,
|
|
147
|
+
label: item.name
|
|
148
|
+
};
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}),
|
|
154
|
+
runFetchAllBehaviorExport = _useRequest6.run;
|
|
106
155
|
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
107
|
-
var fetchPageDataRes, data, list, detail,
|
|
156
|
+
var fetchPageDataRes, data, list, detail, source;
|
|
108
157
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
109
158
|
while (1) switch (_context.prev = _context.next) {
|
|
110
159
|
case 0:
|
|
@@ -115,30 +164,35 @@ export default (function (_ref) {
|
|
|
115
164
|
case 2:
|
|
116
165
|
fetchPageDataRes = _context.sent;
|
|
117
166
|
if (!(fetchPageDataRes.code === 1)) {
|
|
118
|
-
_context.next =
|
|
167
|
+
_context.next = 16;
|
|
119
168
|
break;
|
|
120
169
|
}
|
|
121
170
|
data = fetchPageDataRes.data, list = fetchPageDataRes.list, detail = fetchPageDataRes.detail;
|
|
122
|
-
|
|
123
|
-
|
|
171
|
+
source = detail[list[0]].source;
|
|
172
|
+
setMetaAttrs(META_TAG_NAME, data);
|
|
124
173
|
_context.next = 9;
|
|
125
174
|
return runFetchModlueData(data.dataModelKey, {
|
|
126
175
|
moduleCode: data.moduleCode
|
|
127
176
|
});
|
|
128
177
|
case 9:
|
|
178
|
+
runFetchAllBehaviorImport({
|
|
179
|
+
behaviorMode: 'IMPORT',
|
|
180
|
+
moduleCode: data.moduleCode
|
|
181
|
+
});
|
|
182
|
+
runFetchAllBehaviorExport({
|
|
183
|
+
behaviorMode: 'EXPORT',
|
|
184
|
+
moduleCode: data.moduleCode
|
|
185
|
+
});
|
|
129
186
|
runFetchAllDataset({
|
|
130
187
|
dataModelKey: data.dataModelKey
|
|
131
188
|
});
|
|
132
189
|
runFetchAllSerials({
|
|
133
190
|
uid: data.moduleId
|
|
134
191
|
});
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
});
|
|
140
|
-
setPageData(decompress(source));
|
|
141
|
-
case 13:
|
|
192
|
+
initialize(decompress(source));
|
|
193
|
+
resume();
|
|
194
|
+
eventBus.$publisher(PAGE_LOAD_MOUNT);
|
|
195
|
+
case 16:
|
|
142
196
|
case "end":
|
|
143
197
|
return _context.stop();
|
|
144
198
|
}
|
|
@@ -151,20 +205,13 @@ export default (function (_ref) {
|
|
|
151
205
|
});
|
|
152
206
|
});
|
|
153
207
|
return /*#__PURE__*/React.createElement(RemoteSourceContext.Provider, {
|
|
154
|
-
value: _objectSpread(_objectSpread({
|
|
155
|
-
pageData: pageData
|
|
156
|
-
}, remoteSource), {}, {
|
|
208
|
+
value: _objectSpread(_objectSpread({}, remoteSource), {}, {
|
|
157
209
|
loading: fetchPageDataLoading || fetchModlueDataLoading,
|
|
158
210
|
fetchAllDatasetLoading: fetchAllDatasetLoading,
|
|
159
211
|
fetchAllSerialsLoading: fetchAllSerialsLoading,
|
|
160
212
|
refreshModlueData: refreshModlueData,
|
|
161
213
|
refreshDataset: refreshDataset,
|
|
162
|
-
refreshSerials: refreshSerials
|
|
163
|
-
setPageData: setPageData,
|
|
164
|
-
back: back,
|
|
165
|
-
forward: forward,
|
|
166
|
-
backLength: backLength,
|
|
167
|
-
forwardLength: forwardLength
|
|
214
|
+
refreshSerials: refreshSerials
|
|
168
215
|
})
|
|
169
216
|
}, /*#__PURE__*/React.createElement(LuckDaContext.Provider, {
|
|
170
217
|
value: _objectSpread(_objectSpread({}, remoteSource.module), {}, {
|
|
@@ -5,10 +5,10 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
|
5
5
|
import * as LZString from 'lz-string';
|
|
6
6
|
import { LC_BUILDIN_UNIT_KEY } from "../../constants";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* 数据压缩
|
|
10
|
-
* @param {JSON} data
|
|
11
|
-
* @returns 加密后的字符串
|
|
8
|
+
/**
|
|
9
|
+
* 数据压缩
|
|
10
|
+
* @param {JSON} data
|
|
11
|
+
* @returns 加密后的字符串
|
|
12
12
|
*/
|
|
13
13
|
export function compress(data) {
|
|
14
14
|
// 将对象转换为JSON字符串
|
|
@@ -17,10 +17,10 @@ export function compress(data) {
|
|
|
17
17
|
return LZString.compressToBase64(jsonString);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* 数据解压
|
|
22
|
-
* @param {string} compressedData
|
|
23
|
-
* @returns {json}
|
|
20
|
+
/**
|
|
21
|
+
* 数据解压
|
|
22
|
+
* @param {string} compressedData
|
|
23
|
+
* @returns {json}
|
|
24
24
|
*/
|
|
25
25
|
export function decompress(compressedData) {
|
|
26
26
|
// 使用LZ-String解压数据
|
|
@@ -29,16 +29,20 @@ export function decompress(compressedData) {
|
|
|
29
29
|
return JSON.parse(jsonString);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* 查找指定ID的节点及其父节点。
|
|
34
|
-
*
|
|
35
|
-
* @param {string} id - 要查找的节点ID。
|
|
36
|
-
* @param {Object} current - 当前遍历的JSON对象。
|
|
37
|
-
* @param {Object|null} parent - 当前节点的父节点。
|
|
38
|
-
* @returns {{node: Object|null, parent: Object|null}} 查找结果,包含节点和其父节点。
|
|
32
|
+
/**
|
|
33
|
+
* 查找指定ID的节点及其父节点。
|
|
34
|
+
*
|
|
35
|
+
* @param {string} id - 要查找的节点ID。
|
|
36
|
+
* @param {Object} current - 当前遍历的JSON对象。
|
|
37
|
+
* @param {Object|null} parent - 当前节点的父节点。
|
|
38
|
+
* @returns {{node: Object|null, parent: Object|null}} 查找结果,包含节点和其父节点。
|
|
39
39
|
*/
|
|
40
40
|
export function findNodeAndParent(id, current) {
|
|
41
41
|
var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
42
|
+
if (!id) return {
|
|
43
|
+
node: null,
|
|
44
|
+
parent: null
|
|
45
|
+
};
|
|
42
46
|
if (!parent && current.props.id === id) {
|
|
43
47
|
return {
|
|
44
48
|
node: current,
|
|
@@ -65,13 +69,13 @@ export function findNodeAndParent(id, current) {
|
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
|
|
68
|
-
/**
|
|
69
|
-
* 对指定的JSON结构进行节点的添加、修改或删除操作。
|
|
70
|
-
*
|
|
71
|
-
* @param {Object} json - 要操作的JSON对象。
|
|
72
|
-
* @param {string|null} path - 要操作的节点路径,使用'/'分隔。
|
|
73
|
-
* @param {string} id - 操作节点的唯一标识符。
|
|
74
|
-
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
72
|
+
/**
|
|
73
|
+
* 对指定的JSON结构进行节点的添加、修改或删除操作。
|
|
74
|
+
*
|
|
75
|
+
* @param {Object} json - 要操作的JSON对象。
|
|
76
|
+
* @param {string|null} path - 要操作的节点路径,使用'/'分隔。
|
|
77
|
+
* @param {string} id - 操作节点的唯一标识符。
|
|
78
|
+
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
75
79
|
*/
|
|
76
80
|
function process(json, path, id, data) {
|
|
77
81
|
if (!json) {
|
|
@@ -137,25 +141,25 @@ function process(json, path, id, data) {
|
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
|
|
140
|
-
/**
|
|
141
|
-
* 对指定的JSON结构进行节点的添加操作。
|
|
142
|
-
*
|
|
143
|
-
* @param {Object} json - 要操作的JSON对象。
|
|
144
|
-
* @param {string} parentId - 父节点的唯一标识符。
|
|
145
|
-
* @param {string} id - 操作节点的唯一标识符。
|
|
146
|
-
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
144
|
+
/**
|
|
145
|
+
* 对指定的JSON结构进行节点的添加操作。
|
|
146
|
+
*
|
|
147
|
+
* @param {Object} json - 要操作的JSON对象。
|
|
148
|
+
* @param {string} parentId - 父节点的唯一标识符。
|
|
149
|
+
* @param {string} id - 操作节点的唯一标识符。
|
|
150
|
+
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
147
151
|
*/
|
|
148
152
|
export function add(json, parentId, id, data) {
|
|
149
153
|
process(json, getPathById(json, parentId), id, data);
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
/**
|
|
153
|
-
* 移动指定的节点到另一个节点的指定位置。
|
|
154
|
-
*
|
|
155
|
-
* @param {Object} json - 要操作的JSON对象。
|
|
156
|
-
* @param {string} sid - 被移动的节点id
|
|
157
|
-
* @param {string} tid - 目标节点id
|
|
158
|
-
* @param {string} action - 'left': 往节点前面插入,'right':往节点后面插,'inside':往节点子节点插
|
|
156
|
+
/**
|
|
157
|
+
* 移动指定的节点到另一个节点的指定位置。
|
|
158
|
+
*
|
|
159
|
+
* @param {Object} json - 要操作的JSON对象。
|
|
160
|
+
* @param {string} sid - 被移动的节点id
|
|
161
|
+
* @param {string} tid - 目标节点id
|
|
162
|
+
* @param {string} action - 'left': 往节点前面插入,'right':往节点后面插,'inside':往节点子节点插
|
|
159
163
|
*/
|
|
160
164
|
export function move(json, sid, tid, action) {
|
|
161
165
|
// 验证节点存在性
|
|
@@ -211,34 +215,34 @@ export function move(json, sid, tid, action) {
|
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
217
|
|
|
214
|
-
/**
|
|
215
|
-
* 对指定的JSON结构进行节点的修改操作。
|
|
216
|
-
*
|
|
217
|
-
* @param {Object} json - 要操作的JSON对象。
|
|
218
|
-
* @param {string} id - 操作节点的唯一标识符。
|
|
219
|
-
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
218
|
+
/**
|
|
219
|
+
* 对指定的JSON结构进行节点的修改操作。
|
|
220
|
+
*
|
|
221
|
+
* @param {Object} json - 要操作的JSON对象。
|
|
222
|
+
* @param {string} id - 操作节点的唯一标识符。
|
|
223
|
+
* @param {Object|null} data - 要添加或修改的数据。如果为null,表示删除操作。
|
|
220
224
|
*/
|
|
221
225
|
export function modifyById(json, id, data) {
|
|
222
226
|
process(json, null, id, data);
|
|
223
227
|
}
|
|
224
228
|
|
|
225
|
-
/**
|
|
226
|
-
* 删除指定id的节点。
|
|
227
|
-
*
|
|
228
|
-
* @param {Object} json - JSON对象。
|
|
229
|
-
* @param {string} id - 要删除的节点ID。
|
|
229
|
+
/**
|
|
230
|
+
* 删除指定id的节点。
|
|
231
|
+
*
|
|
232
|
+
* @param {Object} json - JSON对象。
|
|
233
|
+
* @param {string} id - 要删除的节点ID。
|
|
230
234
|
*/
|
|
231
235
|
export function deleteById(json, id) {
|
|
232
236
|
process(json, null, id);
|
|
233
237
|
}
|
|
234
238
|
|
|
235
|
-
/**
|
|
236
|
-
* 根据ID在给定的JSON结构中查找节点的路径。
|
|
237
|
-
*
|
|
238
|
-
* @param {Object} json - 要搜索的JSON对象。
|
|
239
|
-
* @param {string} id - 要查找的节点ID。
|
|
240
|
-
* @param {string} currentPath - 当前递归到的路径,用于构建返回的路径字符串。
|
|
241
|
-
* @returns {string|null} 如果找到节点,返回节点的路径;否则返回null。
|
|
239
|
+
/**
|
|
240
|
+
* 根据ID在给定的JSON结构中查找节点的路径。
|
|
241
|
+
*
|
|
242
|
+
* @param {Object} json - 要搜索的JSON对象。
|
|
243
|
+
* @param {string} id - 要查找的节点ID。
|
|
244
|
+
* @param {string} currentPath - 当前递归到的路径,用于构建返回的路径字符串。
|
|
245
|
+
* @returns {string|null} 如果找到节点,返回节点的路径;否则返回null。
|
|
242
246
|
*/
|
|
243
247
|
export function getPathById(json, id) {
|
|
244
248
|
var currentPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
@@ -258,28 +262,28 @@ export function getPathById(json, id) {
|
|
|
258
262
|
return null;
|
|
259
263
|
}
|
|
260
264
|
|
|
261
|
-
/**
|
|
262
|
-
* 在给定的JSON结构中搜索具有特定id的节点,并返回包含该节点及其所有父节点的props属性的路径数组。
|
|
263
|
-
*
|
|
264
|
-
* @param {Object} data - 待搜索的JSON对象,它代表了一个复杂的树状结构,每个节点都可能有props和children属性。
|
|
265
|
-
* @param {string} targetId - 需要找到的目标节点的id。
|
|
266
|
-
* @returns {Array<Object>} 一个包含目标节点及其所有父节点的props属性的数组。如果未找到目标节点,则返回空数组。
|
|
267
|
-
*
|
|
268
|
-
* @example
|
|
269
|
-
* const data = {
|
|
270
|
-
* props: {
|
|
271
|
-
* id: 'page_root',
|
|
272
|
-
* type: 'Page',
|
|
273
|
-
* name: '页面',
|
|
274
|
-
* hasHeder: true,
|
|
275
|
-
* hasFooter: true,
|
|
276
|
-
* },
|
|
277
|
-
* // ...其他节点
|
|
278
|
-
* };
|
|
279
|
-
*
|
|
280
|
-
* const path = getPathNodesById(data, 'form_jknbjkun');
|
|
281
|
-
* console.log(path);
|
|
282
|
-
* // 输出目标节点及其所有父节点的props属性的数组
|
|
265
|
+
/**
|
|
266
|
+
* 在给定的JSON结构中搜索具有特定id的节点,并返回包含该节点及其所有父节点的props属性的路径数组。
|
|
267
|
+
*
|
|
268
|
+
* @param {Object} data - 待搜索的JSON对象,它代表了一个复杂的树状结构,每个节点都可能有props和children属性。
|
|
269
|
+
* @param {string} targetId - 需要找到的目标节点的id。
|
|
270
|
+
* @returns {Array<Object>} 一个包含目标节点及其所有父节点的props属性的数组。如果未找到目标节点,则返回空数组。
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* const data = {
|
|
274
|
+
* props: {
|
|
275
|
+
* id: 'page_root',
|
|
276
|
+
* type: 'Page',
|
|
277
|
+
* name: '页面',
|
|
278
|
+
* hasHeder: true,
|
|
279
|
+
* hasFooter: true,
|
|
280
|
+
* },
|
|
281
|
+
* // ...其他节点
|
|
282
|
+
* };
|
|
283
|
+
*
|
|
284
|
+
* const path = getPathNodesById(data, 'form_jknbjkun');
|
|
285
|
+
* console.log(path);
|
|
286
|
+
* // 输出目标节点及其所有父节点的props属性的数组
|
|
283
287
|
*/
|
|
284
288
|
export function getPathNodesById(data, targetId) {
|
|
285
289
|
// 初始化结果数组
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
var richTypes = {
|
|
3
|
+
Date: true,
|
|
4
|
+
RegExp: true,
|
|
5
|
+
String: true,
|
|
6
|
+
Number: true
|
|
7
|
+
};
|
|
8
|
+
export default function diff(obj, newObj) {
|
|
9
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
10
|
+
cyclesFix: true
|
|
11
|
+
};
|
|
12
|
+
var _stack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
13
|
+
var diffs = [];
|
|
14
|
+
var isObjArray = Array.isArray(obj);
|
|
15
|
+
var _loop = function _loop() {
|
|
16
|
+
var _Object$getPrototypeO;
|
|
17
|
+
var objKey = obj[key];
|
|
18
|
+
var path = isObjArray ? +key : key;
|
|
19
|
+
if (!(key in newObj)) {
|
|
20
|
+
diffs.push({
|
|
21
|
+
type: 'REMOVE',
|
|
22
|
+
path: [path],
|
|
23
|
+
oldValue: obj[key]
|
|
24
|
+
});
|
|
25
|
+
return 1; // continue
|
|
26
|
+
}
|
|
27
|
+
var newObjKey = newObj[key];
|
|
28
|
+
var areCompatibleObjects = _typeof(objKey) === 'object' && _typeof(newObjKey) === 'object' && Array.isArray(objKey) === Array.isArray(newObjKey);
|
|
29
|
+
if (objKey && newObjKey && areCompatibleObjects && !richTypes[(_Object$getPrototypeO = Object.getPrototypeOf(objKey)) === null || _Object$getPrototypeO === void 0 || (_Object$getPrototypeO = _Object$getPrototypeO.constructor) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name] && (!options.cyclesFix || !_stack.includes(objKey))) {
|
|
30
|
+
var nestedDiffs = diff(objKey, newObjKey, options, options.cyclesFix ? _stack.concat([objKey]) : []);
|
|
31
|
+
diffs.push.apply(diffs, nestedDiffs.map(function (difference) {
|
|
32
|
+
difference.path.unshift(path);
|
|
33
|
+
return difference;
|
|
34
|
+
}));
|
|
35
|
+
} else if (objKey !== newObjKey &&
|
|
36
|
+
// treat NaN values as equivalent
|
|
37
|
+
!(Number.isNaN(objKey) && Number.isNaN(newObjKey)) && !(areCompatibleObjects && (isNaN(objKey) ? objKey + '' === newObjKey + '' : +objKey === +newObjKey))) {
|
|
38
|
+
diffs.push({
|
|
39
|
+
path: [path],
|
|
40
|
+
type: 'CHANGE',
|
|
41
|
+
value: newObjKey,
|
|
42
|
+
oldValue: objKey
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
for (var key in obj) {
|
|
47
|
+
if (_loop()) continue;
|
|
48
|
+
}
|
|
49
|
+
var isNewObjArray = Array.isArray(newObj);
|
|
50
|
+
for (var _key in newObj) {
|
|
51
|
+
if (!obj || !(_key in obj)) {
|
|
52
|
+
diffs.push({
|
|
53
|
+
type: 'CREATE',
|
|
54
|
+
path: [isNewObjArray ? +_key : _key],
|
|
55
|
+
value: newObj[_key]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return diffs;
|
|
60
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
1
2
|
import _construct from "@babel/runtime/helpers/esm/construct";
|
|
2
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
4
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
5
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
5
|
-
import { omit,
|
|
6
|
+
import { omit, isNil, isString, isArray, has, get } from 'lodash';
|
|
6
7
|
import postcss from 'postcss';
|
|
8
|
+
import { META_TAG_NAME } from "../../constants";
|
|
7
9
|
export function isPromise(value) {
|
|
8
10
|
return !!value && _typeof(value) === 'object' && typeof value.then === 'function';
|
|
9
11
|
}
|
|
@@ -96,9 +98,8 @@ export function listReducer(state, action) {
|
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
export function getCtx(context) {
|
|
99
|
-
return
|
|
100
|
-
|
|
101
|
-
});
|
|
101
|
+
return context;
|
|
102
|
+
// return omitBy(context, (_, key) => startsWith(key, '_'));
|
|
102
103
|
}
|
|
103
104
|
export function getFuncBody(funcCode) {
|
|
104
105
|
var regex = /{([\s\S]*?)}(?![\s\S]*})/;
|
|
@@ -119,8 +120,8 @@ export function executeCode(context, code, argsName) {
|
|
|
119
120
|
throw new Error('executeCode参数不匹配');
|
|
120
121
|
}
|
|
121
122
|
var ctx = getCtx(context);
|
|
122
|
-
var func = _construct(Function, _toConsumableArray(argsName || []).concat(['ctx', getFuncBody(code)]));
|
|
123
|
-
return func.apply(void 0, args.concat([ctx]));
|
|
123
|
+
var func = _construct(Function, _toConsumableArray(argsName || []).concat(['ctx', 'window', "\"use strict\"; ".concat(getFuncBody(code))]));
|
|
124
|
+
return func.apply(void 0, args.concat([ctx, _objectSpread(_objectSpread({}, window.proxy), window)]));
|
|
124
125
|
}
|
|
125
126
|
export function parseCSS(cssString) {
|
|
126
127
|
// 创建一个空对象来存储解析后的样式
|
|
@@ -143,9 +144,93 @@ export function parseCSS(cssString) {
|
|
|
143
144
|
// 返回包含所有样式的对象
|
|
144
145
|
return parsedStyles;
|
|
145
146
|
}
|
|
146
|
-
;
|
|
147
147
|
export function isColor(str) {
|
|
148
148
|
var hexRegex = /^#(?:[A-Fa-f0-9]{3,4}){1,2}$/;
|
|
149
149
|
var rgbaRegex = /^rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*(0|1|0?\.\d+))?\s*\)$/;
|
|
150
150
|
return hexRegex.test(str) || rgbaRegex.test(str);
|
|
151
|
+
}
|
|
152
|
+
export function setMetaAttrs(name, data) {
|
|
153
|
+
var meta = document.querySelector("meta[name=\"".concat(name, "\"]"));
|
|
154
|
+
if (!meta) {
|
|
155
|
+
meta = document.createElement('meta');
|
|
156
|
+
}
|
|
157
|
+
meta.name = name;
|
|
158
|
+
meta.content = isString(data) ? data : new URLSearchParams(data).toString().replaceAll('&', ',');
|
|
159
|
+
document.head.appendChild(meta);
|
|
160
|
+
}
|
|
161
|
+
export function getMetaAttr(name, _) {
|
|
162
|
+
if (isNil(name)) return void 0;
|
|
163
|
+
var meta = document.querySelector("meta[name=\"".concat(name, "\"]"));
|
|
164
|
+
if (meta.content.includes(',')) {
|
|
165
|
+
var data = new URLSearchParams(meta.content.replaceAll(',', '&'));
|
|
166
|
+
if (isNil(_)) {
|
|
167
|
+
return Object.fromEntries(data.entries());
|
|
168
|
+
}
|
|
169
|
+
if (isArray(_)) {
|
|
170
|
+
return _.map(function (n) {
|
|
171
|
+
return data.get(n);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return data.get(_);
|
|
175
|
+
}
|
|
176
|
+
return meta.content;
|
|
177
|
+
}
|
|
178
|
+
export function getLDMetaAttr(_) {
|
|
179
|
+
return getMetaAttr(META_TAG_NAME, _);
|
|
180
|
+
}
|
|
181
|
+
export function extractKeywords(obj, keys) {
|
|
182
|
+
var keywords = [];
|
|
183
|
+
function recurse(currentObj) {
|
|
184
|
+
if (_typeof(currentObj) !== 'object' || currentObj === null) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
for (var key in currentObj) {
|
|
188
|
+
var _iterator = _createForOfIteratorHelper(keys),
|
|
189
|
+
_step;
|
|
190
|
+
try {
|
|
191
|
+
tag: for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
192
|
+
var triggerKey = _step.value;
|
|
193
|
+
var flag = isString(triggerKey) ? key === triggerKey : has(currentObj[key], triggerKey);
|
|
194
|
+
if (flag) {
|
|
195
|
+
var keyword = isString(triggerKey) ? currentObj[triggerKey] : get(currentObj[key], triggerKey);
|
|
196
|
+
keywords.push({
|
|
197
|
+
label: keyword,
|
|
198
|
+
kind: 'property',
|
|
199
|
+
insertText: keyword,
|
|
200
|
+
documentation: JSON.stringify(currentObj)
|
|
201
|
+
});
|
|
202
|
+
break tag;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
} catch (err) {
|
|
206
|
+
_iterator.e(err);
|
|
207
|
+
} finally {
|
|
208
|
+
_iterator.f();
|
|
209
|
+
}
|
|
210
|
+
recurse(currentObj[key]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
recurse(obj);
|
|
214
|
+
return keywords;
|
|
215
|
+
}
|
|
216
|
+
export function loadScript(path) {
|
|
217
|
+
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
218
|
+
var script = document.querySelector("script[src=\"".concat(path, "\"]"));
|
|
219
|
+
if (!script) {
|
|
220
|
+
var newScript = document.createElement('script');
|
|
221
|
+
newScript.src = path;
|
|
222
|
+
Object.keys(props).forEach(function (key) {
|
|
223
|
+
newScript[key] = props[key];
|
|
224
|
+
});
|
|
225
|
+
newScript.setAttribute('data-status', 'loading');
|
|
226
|
+
document.body.appendChild(newScript);
|
|
227
|
+
return {
|
|
228
|
+
ref: newScript,
|
|
229
|
+
status: 'loading'
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
ref: script,
|
|
234
|
+
status: script.getAttribute('data-status') || 'ready'
|
|
235
|
+
};
|
|
151
236
|
}
|
|
@@ -13,8 +13,9 @@ import { LC_BUILDIN_UNIT_KEY_LIST } from "../../constants";
|
|
|
13
13
|
export default function useCanvasRender(data, deps) {
|
|
14
14
|
var dynamicCompMap = useRef({});
|
|
15
15
|
var ctx = useContext();
|
|
16
|
-
var render = useMemoizedFn(function (
|
|
17
|
-
var
|
|
16
|
+
var render = useMemoizedFn(function () {
|
|
17
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
18
|
+
props = _ref.props,
|
|
18
19
|
children = _ref.children,
|
|
19
20
|
childrenMap = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
if (props && !LC_BUILDIN_UNIT_KEY_LIST.includes(props.id)) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRef, useEffect } from 'react';
|
|
2
|
+
var useCombinedRefs = function useCombinedRefs(forwardedRef) {
|
|
3
|
+
var innerRef = useRef(null);
|
|
4
|
+
useEffect(function () {
|
|
5
|
+
if (!forwardedRef) return;
|
|
6
|
+
if (typeof forwardedRef === 'function') {
|
|
7
|
+
forwardedRef(innerRef.current);
|
|
8
|
+
} else {
|
|
9
|
+
forwardedRef.current = innerRef.current;
|
|
10
|
+
}
|
|
11
|
+
}, [forwardedRef]);
|
|
12
|
+
return forwardedRef || innerRef;
|
|
13
|
+
};
|
|
14
|
+
export default useCombinedRefs;
|