@luck-design-biz/luckda 0.0.25-1 → 0.0.25-10
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/es/components/ComplexItem/index.js +92 -0
- package/es/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +7 -11
- package/es/components/LDActions/index.js +8 -10
- package/es/components/LDActions/index.less +7 -4
- package/es/components/LdAutoForm/index.js +34 -11
- package/es/components/LdFormList/index.js +39 -23
- package/es/components/LdGrid/index.js +21 -7
- package/es/components/LdGridForm/index.js +32 -11
- package/es/components/LdTree/index.js +33 -15
- package/es/helper/FromItems.js +177 -94
- package/es/helper/form.js +55 -14
- package/es/helper/props_config.js +17 -0
- package/es/locales/zh-CN.js +26 -11
- package/es/lowcode/constants/api-url.js +354 -104
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/constants/index.js +4 -2
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- 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 +4 -4
- package/es/lowcode/engine/meta/cardlist.props.json +14 -4
- package/es/lowcode/engine/meta/components-list.json +109 -1
- package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/es/lowcode/engine/meta/dialog.props.json +80 -43
- package/es/lowcode/engine/meta/drawer.props.json +9 -21
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +63 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +39 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +12 -0
- package/es/lowcode/engine/meta/fielddate.props.json +47 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +14 -0
- package/es/lowcode/engine/meta/fielddict.props.json +44 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +44 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +73 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +48 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +20 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +26 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +58 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +62 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +31 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +49 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +71 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielduser.props.json +82 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +12 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +20 -0
- package/es/lowcode/engine/meta/form.props.default.json +4 -5
- package/es/lowcode/engine/meta/form.props.json +44 -35
- package/es/lowcode/engine/meta/image.props.json +2 -2
- 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 +53 -3
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/link.props.json +1 -1
- package/es/lowcode/engine/meta/page.props.json +2 -2
- 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.default.json +4 -6
- package/es/lowcode/engine/meta/section.props.json +52 -49
- 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.json +19 -13
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/text.props.json +2 -2
- package/es/lowcode/engine/meta/tree.props.default.json +2 -0
- package/es/lowcode/engine/meta/tree.props.json +71 -8
- package/es/lowcode/engine/provider/ContextProvider/index.js +21 -35
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +89 -37
- package/es/lowcode/engine/tools/dataProcess.js +4 -0
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +49 -26
- package/es/lowcode/engine/tools/useCanvasRender.js +8 -9
- package/es/lowcode/engine/tools/usePageDataStore.js +331 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -10
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/painter/Design.js +41 -6
- package/es/lowcode/painter/DesignOperator.js +112 -88
- package/es/lowcode/painter/DesignToolbar.js +280 -36
- package/es/lowcode/painter/Outline.js +12 -10
- package/es/lowcode/painter/Panel.js +84 -46
- package/es/lowcode/painter/components/ActionBindModal.js +38 -27
- package/es/lowcode/painter/components/AdvancePanel.js +37 -21
- package/es/lowcode/painter/components/AttrsPanel.js +45 -34
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
- package/es/lowcode/painter/components/FieldSelector.js +26 -13
- package/es/lowcode/painter/components/ListEditor.js +8 -2
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +5 -9
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
- 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 +182 -31
- package/es/lowcode/painter/components/field-setting/index.js +40 -61
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/index.js +1 -28
- package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +55 -28
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/DataSetSelector.js +30 -7
- package/es/lowcode/painter/panel-section/FieldsSetting.js +124 -55
- package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
- package/es/lowcode/painter/panel-section/ImpExp.js +99 -14
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +108 -0
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +95 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +25 -110
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
- package/es/lowcode/painter/panel-section/StylePanel/index.js +10 -4
- package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/es/lowcode/painter/style/action-bind-modal.less +3 -3
- package/es/lowcode/painter/style/design.less +7 -3
- package/es/lowcode/painter/style/list-editor.less +36 -0
- package/es/lowcode/painter/style/page-layout-display.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +1 -1
- package/es/lowcode/painter/style/split-display.less +0 -9
- package/es/lowcode/preview/index.js +20 -5
- package/es/lowcode/view/Canvas.js +6 -7
- package/es/lowcode/view/Page.js +5 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +3 -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/meta.json +4 -4
- package/es/lowcode/view/lc-components/Button/index.js +2 -6
- package/es/lowcode/view/lc-components/Button/meta.json +4 -4
- 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 +14 -4
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -12
- 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 +116 -19
- package/es/lowcode/view/lc-components/Dialog/meta.json +73 -43
- 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/meta.json +9 -21
- package/es/lowcode/view/lc-components/FieldColor/meta.json +63 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +45 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +44 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +62 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +82 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +20 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +61 -9
- 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 +401 -66
- package/es/lowcode/view/lc-components/Form/meta.json +44 -35
- 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/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 +55 -23
- 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 +2 -2
- 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/lowcode/view/lc-components/Layout/FunctionDesign.js +13 -21
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +2 -2
- 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/meta.json +1 -1
- package/es/lowcode/view/lc-components/Page/meta.json +2 -2
- package/es/lowcode/view/lc-components/PageContent/index.js +8 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/es/lowcode/view/lc-components/PageHeader/index.js +5 -6
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +63 -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 +32 -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 +25 -2
- 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 +114 -24
- package/es/lowcode/view/lc-components/Section/index.less +7 -0
- package/es/lowcode/view/lc-components/Section/meta.json +48 -49
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -22
- 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 +7 -11
- package/es/lowcode/view/lc-components/Split/meta.json +4 -4
- 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 +420 -0
- package/es/lowcode/view/lc-components/Table/index.js +294 -47
- package/es/lowcode/view/lc-components/Table/meta.json +19 -13
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -20
- package/es/lowcode/view/lc-components/Tabs/index.js +3 -1
- package/es/lowcode/view/lc-components/Tabs/meta.json +3 -3
- 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/meta.json +2 -2
- 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 +103 -29
- package/es/lowcode/view/lc-components/Tree/meta.json +71 -9
- package/es/lowcode/view/lc-components/Wrapper.js +10 -12
- 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 +10 -5
- package/es/upload/Form/index.js +2 -1
- package/es/upload/FormItem/index.js +5 -6
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +16 -3
- package/es/utils/grid.js +8 -5
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +8 -12
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +7 -4
- package/lib/components/LdAutoForm/index.js +33 -10
- package/lib/components/LdFormList/index.js +38 -22
- package/lib/components/LdGrid/index.js +21 -7
- package/lib/components/LdGridForm/index.js +30 -9
- package/lib/components/LdTree/index.js +33 -15
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/form.js +53 -13
- package/lib/helper/props_config.js +23 -0
- package/lib/locales/zh-CN.js +26 -11
- package/lib/lowcode/constants/api-url.js +355 -104
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/constants/index.js +5 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +3 -2
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- 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 +4 -4
- package/lib/lowcode/engine/meta/cardlist.props.json +14 -4
- package/lib/lowcode/engine/meta/components-list.json +109 -1
- package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/lib/lowcode/engine/meta/dialog.props.json +80 -43
- package/lib/lowcode/engine/meta/drawer.props.json +9 -21
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +63 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +39 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +47 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +44 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +44 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +73 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +48 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +20 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +26 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +58 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +62 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +31 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +49 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +71 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +82 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +12 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +20 -0
- package/lib/lowcode/engine/meta/form.props.default.json +4 -5
- package/lib/lowcode/engine/meta/form.props.json +44 -35
- package/lib/lowcode/engine/meta/image.props.json +2 -2
- 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 +53 -3
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/link.props.json +1 -1
- package/lib/lowcode/engine/meta/page.props.json +2 -2
- 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.default.json +4 -6
- package/lib/lowcode/engine/meta/section.props.json +52 -49
- 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.json +19 -13
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/text.props.json +2 -2
- package/lib/lowcode/engine/meta/tree.props.default.json +2 -0
- package/lib/lowcode/engine/meta/tree.props.json +71 -8
- package/lib/lowcode/engine/provider/ContextProvider/index.js +37 -35
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +86 -34
- package/lib/lowcode/engine/tools/dataProcess.js +4 -0
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +50 -25
- package/lib/lowcode/engine/tools/useCanvasRender.js +6 -7
- package/lib/lowcode/engine/tools/usePageDataStore.js +338 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +6 -8
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/painter/Design.js +39 -4
- package/lib/lowcode/painter/DesignOperator.js +109 -85
- package/lib/lowcode/painter/DesignToolbar.js +277 -33
- package/lib/lowcode/painter/Outline.js +10 -8
- package/lib/lowcode/painter/Panel.js +82 -44
- package/lib/lowcode/painter/components/ActionBindModal.js +36 -25
- package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
- package/lib/lowcode/painter/components/AttrsPanel.js +44 -33
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
- package/lib/lowcode/painter/components/FieldSelector.js +26 -13
- package/lib/lowcode/painter/components/ListEditor.js +8 -2
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +5 -9
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
- 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 +179 -28
- package/lib/lowcode/painter/components/field-setting/index.js +40 -61
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/index.js +1 -30
- package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +53 -25
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +30 -7
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +121 -52
- package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
- package/lib/lowcode/painter/panel-section/ImpExp.js +99 -13
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +114 -0
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +103 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +24 -109
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +5 -4
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +10 -4
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/lib/lowcode/painter/style/action-bind-modal.less +3 -3
- package/lib/lowcode/painter/style/design.less +7 -3
- package/lib/lowcode/painter/style/list-editor.less +36 -0
- package/lib/lowcode/painter/style/page-layout-display.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +1 -1
- package/lib/lowcode/painter/style/split-display.less +0 -9
- package/lib/lowcode/preview/index.js +21 -5
- package/lib/lowcode/view/Canvas.js +5 -6
- package/lib/lowcode/view/Page.js +5 -6
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +3 -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/meta.json +4 -4
- package/lib/lowcode/view/lc-components/Button/index.js +2 -6
- package/lib/lowcode/view/lc-components/Button/meta.json +4 -4
- 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 +14 -4
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -11
- 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 +116 -19
- package/lib/lowcode/view/lc-components/Dialog/meta.json +73 -43
- 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/meta.json +9 -21
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +63 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +45 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +44 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +62 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +82 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +20 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +58 -7
- 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 +396 -61
- package/lib/lowcode/view/lc-components/Form/meta.json +44 -35
- 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/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 +55 -23
- 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 +2 -2
- 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/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -19
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Layout/meta.json +2 -2
- 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/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Page/meta.json +2 -2
- package/lib/lowcode/view/lc-components/PageContent/index.js +7 -8
- package/lib/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/lib/lowcode/view/lc-components/PageHeader/index.js +4 -5
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +71 -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 +40 -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 +25 -2
- 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 +113 -23
- package/lib/lowcode/view/lc-components/Section/index.less +7 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +18 -21
- 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 +4 -8
- package/lib/lowcode/view/lc-components/Split/meta.json +4 -4
- 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 +428 -0
- package/lib/lowcode/view/lc-components/Table/index.js +292 -45
- package/lib/lowcode/view/lc-components/Table/meta.json +19 -13
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -18
- package/lib/lowcode/view/lc-components/Tabs/index.js +3 -1
- package/lib/lowcode/view/lc-components/Tabs/meta.json +3 -3
- 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/meta.json +2 -2
- 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 +100 -26
- package/lib/lowcode/view/lc-components/Tree/meta.json +71 -9
- package/lib/lowcode/view/lc-components/Wrapper.js +11 -12
- 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 +10 -5
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/FormItem/index.js +5 -6
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +16 -3
- package/lib/utils/grid.js +8 -5
- package/package.json +6 -4
- 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,26 +1,32 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
1
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
7
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
+
var _excluded = ["key", "label"];
|
|
3
9
|
import React, { useRef, useEffect, useState } from 'react';
|
|
10
|
+
import { useLocation } from 'umi';
|
|
4
11
|
import classNames from 'classnames';
|
|
5
|
-
import { useMemoizedFn } from 'ahooks';
|
|
6
|
-
import { Select, Button, Icon, Divider, Modal, message } from 'luck-design/antd';
|
|
12
|
+
import { useMemoizedFn, useRequest, useDebounceFn, useCookieState } from 'ahooks';
|
|
13
|
+
import { Select, Button, Icon, Divider, Modal, message, Drawer } from 'luck-design/antd';
|
|
7
14
|
import { showPop, formatMessage } from '@luck-design-biz/base/utils';
|
|
8
|
-
import { useContext,
|
|
15
|
+
import { useContext, useGet, resetPageData, useTemporalStore } from "../engine/provider/ContextProvider";
|
|
9
16
|
import JsonEditor from "../painter/components/code-editor/JsonEditor";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
17
|
+
import Preview from "../preview";
|
|
18
|
+
import { LC_BUILDIN_UNIT_KEY, COOKIE_VIRTUAL_ACCOUNT_KEY } from "../constants";
|
|
12
19
|
import styles from "./style/design.less";
|
|
20
|
+
import { fetchClearCache, fetchUpdatePageData } from "../constants/api-url";
|
|
21
|
+
import { getLDMetaAttr } from "../engine/tools/helper";
|
|
22
|
+
import { readAllUser } from '@luck-design-biz/base/lib/sys/services';
|
|
13
23
|
var DesignToolbar = function DesignToolbar(_ref) {
|
|
14
24
|
var locale = _ref.locale,
|
|
15
25
|
onLangChange = _ref.onLangChange;
|
|
26
|
+
var location = useLocation();
|
|
16
27
|
var editorRef = useRef();
|
|
17
28
|
var context = useContext();
|
|
18
|
-
var
|
|
19
|
-
_usePageData2 = _slicedToArray(_usePageData, 2),
|
|
20
|
-
pageData = _usePageData2[0],
|
|
21
|
-
setPageData = _usePageData2[1].setPageData;
|
|
22
|
-
var _ref2 = useRemoteSource() || {},
|
|
23
|
-
pageinfo = _ref2.pageinfo;
|
|
29
|
+
var pageData = useGet();
|
|
24
30
|
var _useState = useState(null),
|
|
25
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
32
|
langList = _useState2[0],
|
|
@@ -33,42 +39,154 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
33
39
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
34
40
|
show = _useState6[0],
|
|
35
41
|
setShow = _useState6[1];
|
|
42
|
+
var _useState7 = useState(false),
|
|
43
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
|
+
showPreview = _useState8[0],
|
|
45
|
+
setShowPreview = _useState8[1];
|
|
46
|
+
var _useState9 = useState([]),
|
|
47
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
48
|
+
userOptions = _useState10[0],
|
|
49
|
+
setUserOptions = _useState10[1];
|
|
50
|
+
var _useTemporalStore = useTemporalStore(function (state) {
|
|
51
|
+
return {
|
|
52
|
+
undo: state.undo,
|
|
53
|
+
redo: state.redo,
|
|
54
|
+
pastStates: state.pastStates,
|
|
55
|
+
futureStates: state.futureStates,
|
|
56
|
+
clear: state.clear
|
|
57
|
+
};
|
|
58
|
+
}),
|
|
59
|
+
canUndo = _useTemporalStore.canUndo,
|
|
60
|
+
canRedo = _useTemporalStore.canRedo,
|
|
61
|
+
undo = _useTemporalStore.undo,
|
|
62
|
+
redo = _useTemporalStore.redo,
|
|
63
|
+
clear = _useTemporalStore.clear;
|
|
64
|
+
var _useCookieState = useCookieState(COOKIE_VIRTUAL_ACCOUNT_KEY),
|
|
65
|
+
_useCookieState2 = _slicedToArray(_useCookieState, 2),
|
|
66
|
+
userId = _useCookieState2[0],
|
|
67
|
+
setUserId = _useCookieState2[1];
|
|
68
|
+
var _useRequest = useRequest(fetchClearCache, {
|
|
69
|
+
manual: true
|
|
70
|
+
}),
|
|
71
|
+
clearCacheLoading = _useRequest.loading,
|
|
72
|
+
runClearCache = _useRequest.run;
|
|
73
|
+
var _useRequest2 = useRequest(fetchUpdatePageData, {
|
|
74
|
+
manual: true,
|
|
75
|
+
debounceWait: 300
|
|
76
|
+
}),
|
|
77
|
+
updatePageDataLoading = _useRequest2.loading,
|
|
78
|
+
runAsync = _useRequest2.runAsync;
|
|
36
79
|
useEffect(function () {
|
|
37
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (
|
|
38
|
-
var _langList =
|
|
80
|
+
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
81
|
+
var _langList = _ref2.langList;
|
|
39
82
|
return setLangList(_langList);
|
|
40
83
|
}).watch();
|
|
41
84
|
return function () {
|
|
42
85
|
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
43
86
|
};
|
|
44
87
|
}, []);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
88
|
+
useEffect(function () {
|
|
89
|
+
if (!showPreview) {
|
|
90
|
+
setUserId(void 0);
|
|
91
|
+
}
|
|
92
|
+
}, [showPreview]);
|
|
93
|
+
var handleSave = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
94
|
+
var _yield$runAsync, code;
|
|
95
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
96
|
+
while (1) switch (_context.prev = _context.next) {
|
|
97
|
+
case 0:
|
|
98
|
+
_context.next = 2;
|
|
99
|
+
return runAsync({
|
|
100
|
+
pageData: JSON.stringify(pageData),
|
|
101
|
+
pageCode: getLDMetaAttr('pageCode')
|
|
102
|
+
});
|
|
103
|
+
case 2:
|
|
104
|
+
_yield$runAsync = _context.sent;
|
|
105
|
+
code = _yield$runAsync.code;
|
|
106
|
+
if (code === 1) {
|
|
107
|
+
clear();
|
|
108
|
+
showPop(formatMessage({
|
|
109
|
+
id: 'app.base.tip.operate.success'
|
|
110
|
+
}), null, 'success');
|
|
111
|
+
}
|
|
112
|
+
case 5:
|
|
113
|
+
case "end":
|
|
114
|
+
return _context.stop();
|
|
115
|
+
}
|
|
116
|
+
}, _callee);
|
|
117
|
+
})), []);
|
|
118
|
+
var handleClearCache = useMemoizedFn(function () {
|
|
119
|
+
Modal.confirm({
|
|
120
|
+
title: formatMessage({
|
|
121
|
+
id: 'luckda.lowcode.design.toolbar.clear.tip',
|
|
122
|
+
label: '清除提示'
|
|
123
|
+
}),
|
|
124
|
+
content: formatMessage({
|
|
125
|
+
id: 'luckda.lowcode.design.toolbar.clear',
|
|
126
|
+
label: '确定清除当前页面及模块缓存么?'
|
|
127
|
+
}),
|
|
128
|
+
getContainer: function getContainer() {
|
|
129
|
+
return document.getElementById('lc-design-workspace');
|
|
130
|
+
},
|
|
131
|
+
zIndex: 3000,
|
|
132
|
+
onOk: function onOk() {
|
|
133
|
+
return runClearCache({
|
|
134
|
+
moduleCode: getLDMetaAttr('moduleCode')
|
|
135
|
+
});
|
|
56
136
|
}
|
|
57
137
|
});
|
|
58
|
-
}
|
|
138
|
+
});
|
|
59
139
|
var handleOk = useMemoizedFn(function () {
|
|
60
140
|
var code = editorRef.current.editor.getValue();
|
|
61
141
|
try {
|
|
62
142
|
var data = JSON.parse(code);
|
|
63
|
-
|
|
143
|
+
resetPageData(data);
|
|
64
144
|
setShow(false);
|
|
65
145
|
} catch (e) {
|
|
146
|
+
console.error(e);
|
|
66
147
|
message.warning(formatMessage({
|
|
67
148
|
id: 'luckda.lowcode.error.pagedata',
|
|
68
149
|
label: '页面数据错误'
|
|
69
150
|
}));
|
|
70
151
|
}
|
|
71
152
|
});
|
|
153
|
+
var _useDebounceFn = useDebounceFn( /*#__PURE__*/function () {
|
|
154
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
155
|
+
var _yield$readAllUser, code, list, detail;
|
|
156
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
157
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
158
|
+
case 0:
|
|
159
|
+
_context2.next = 2;
|
|
160
|
+
return readAllUser({
|
|
161
|
+
sname: value
|
|
162
|
+
});
|
|
163
|
+
case 2:
|
|
164
|
+
_yield$readAllUser = _context2.sent;
|
|
165
|
+
code = _yield$readAllUser.code;
|
|
166
|
+
list = _yield$readAllUser.list;
|
|
167
|
+
detail = _yield$readAllUser.detail;
|
|
168
|
+
if (code === 1) {
|
|
169
|
+
setUserOptions(list.map(function (id) {
|
|
170
|
+
var item = detail[id];
|
|
171
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
172
|
+
key: "".concat(item.indocno),
|
|
173
|
+
label: item.sname
|
|
174
|
+
});
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
case 7:
|
|
178
|
+
case "end":
|
|
179
|
+
return _context2.stop();
|
|
180
|
+
}
|
|
181
|
+
}, _callee2);
|
|
182
|
+
}));
|
|
183
|
+
return function (_x) {
|
|
184
|
+
return _ref4.apply(this, arguments);
|
|
185
|
+
};
|
|
186
|
+
}(), {
|
|
187
|
+
wait: 500
|
|
188
|
+
}),
|
|
189
|
+
handleSearch = _useDebounceFn.run;
|
|
72
190
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
73
191
|
className: styles['lc-painter-design-toolbar']
|
|
74
192
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
@@ -100,6 +218,35 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
100
218
|
type: "mobile"
|
|
101
219
|
})), /*#__PURE__*/React.createElement(Divider, {
|
|
102
220
|
type: "vertical"
|
|
221
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
222
|
+
className: classNames(styles['toolbar-item'], _defineProperty({}, styles.disabled, !canUndo)),
|
|
223
|
+
onClick: function onClick() {
|
|
224
|
+
return canUndo && undo();
|
|
225
|
+
}
|
|
226
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
227
|
+
viewBox: "0 0 1024 1024",
|
|
228
|
+
width: "20",
|
|
229
|
+
height: "20",
|
|
230
|
+
fill: "currentColor",
|
|
231
|
+
style: {
|
|
232
|
+
transform: 'rotateY(180deg)'
|
|
233
|
+
}
|
|
234
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
235
|
+
d: "M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z"
|
|
236
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
237
|
+
className: classNames(styles['toolbar-item'], _defineProperty({}, styles.disabled, !canRedo)),
|
|
238
|
+
onClick: function onClick() {
|
|
239
|
+
return canRedo && redo();
|
|
240
|
+
}
|
|
241
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
242
|
+
viewBox: "0 0 1024 1024",
|
|
243
|
+
width: "20",
|
|
244
|
+
height: "20",
|
|
245
|
+
fill: "currentColor"
|
|
246
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
247
|
+
d: "M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z"
|
|
248
|
+
}))), /*#__PURE__*/React.createElement(Divider, {
|
|
249
|
+
type: "vertical"
|
|
103
250
|
}), /*#__PURE__*/React.createElement("span", {
|
|
104
251
|
style: {
|
|
105
252
|
width: 'auto',
|
|
@@ -108,18 +255,38 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
108
255
|
className: styles['toolbar-item'],
|
|
109
256
|
onClick: function onClick() {
|
|
110
257
|
context.$publisher(context.topics.COMPONENT_ACTIVE, {
|
|
111
|
-
|
|
258
|
+
target: LC_BUILDIN_UNIT_KEY.PAGE_ROOT
|
|
112
259
|
});
|
|
113
260
|
}
|
|
114
|
-
},
|
|
261
|
+
}, formatMessage({
|
|
262
|
+
id: 'luckda.lowcode.design.toolbar.pageAttrs',
|
|
263
|
+
label: '页面属性'
|
|
264
|
+
})), /*#__PURE__*/React.createElement(Divider, {
|
|
115
265
|
type: "vertical"
|
|
116
266
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
117
267
|
size: "small",
|
|
118
268
|
style: {
|
|
119
269
|
fontSize: 12,
|
|
120
270
|
margin: '0 4px 0 2px'
|
|
271
|
+
},
|
|
272
|
+
loading: clearCacheLoading,
|
|
273
|
+
onClick: handleClearCache
|
|
274
|
+
}, formatMessage({
|
|
275
|
+
id: 'luckda.lowcode.design.toolbar.clear',
|
|
276
|
+
label: '清除缓存'
|
|
277
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
278
|
+
size: "small",
|
|
279
|
+
style: {
|
|
280
|
+
fontSize: 12,
|
|
281
|
+
margin: '0 4px 0 2px'
|
|
282
|
+
},
|
|
283
|
+
onClick: function onClick() {
|
|
284
|
+
return setShowPreview(true);
|
|
121
285
|
}
|
|
122
|
-
},
|
|
286
|
+
}, formatMessage({
|
|
287
|
+
id: 'luckda.lowcode.design.toolbar.preview',
|
|
288
|
+
label: '预览'
|
|
289
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
123
290
|
size: "small",
|
|
124
291
|
type: "primary",
|
|
125
292
|
style: {
|
|
@@ -132,7 +299,10 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
132
299
|
padding: '0 7px'
|
|
133
300
|
},
|
|
134
301
|
onClick: handleSave
|
|
135
|
-
},
|
|
302
|
+
}, formatMessage({
|
|
303
|
+
id: 'luckda.lowcode.design.toolbar.save',
|
|
304
|
+
label: '保存'
|
|
305
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
136
306
|
style: {
|
|
137
307
|
display: 'inline-block'
|
|
138
308
|
},
|
|
@@ -140,7 +310,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
140
310
|
return setShow(true);
|
|
141
311
|
}
|
|
142
312
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
143
|
-
type:
|
|
313
|
+
type: updatePageDataLoading ? 'loading' : 'eye'
|
|
144
314
|
})))), /*#__PURE__*/React.createElement(Modal, {
|
|
145
315
|
visible: show,
|
|
146
316
|
width: 1024,
|
|
@@ -148,15 +318,89 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
148
318
|
return document.getElementById('lc-design-workspace');
|
|
149
319
|
},
|
|
150
320
|
zIndex: 3000,
|
|
151
|
-
bodyStyle: {
|
|
152
|
-
height: '70vh'
|
|
153
|
-
},
|
|
154
321
|
onOk: handleOk,
|
|
155
322
|
onCancel: function onCancel() {
|
|
156
323
|
return setShow(false);
|
|
157
324
|
}
|
|
158
325
|
}, /*#__PURE__*/React.createElement(JsonEditor, {
|
|
159
|
-
ref: editorRef
|
|
160
|
-
|
|
326
|
+
ref: editorRef,
|
|
327
|
+
style: {
|
|
328
|
+
height: '70vh'
|
|
329
|
+
}
|
|
330
|
+
}, JSON.stringify(pageData, null, '\t'))), /*#__PURE__*/React.createElement(Drawer, {
|
|
331
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
332
|
+
id: "preview-drawer-header",
|
|
333
|
+
style: {
|
|
334
|
+
display: 'flex',
|
|
335
|
+
height: 54,
|
|
336
|
+
alignItems: 'center',
|
|
337
|
+
justifyContent: 'space-between'
|
|
338
|
+
}
|
|
339
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
340
|
+
style: {
|
|
341
|
+
marginBottom: 0
|
|
342
|
+
}
|
|
343
|
+
}, formatMessage({
|
|
344
|
+
id: 'luckda.lowcode.design.toolbar.pagePreview',
|
|
345
|
+
label: '页面预览'
|
|
346
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
347
|
+
placeholder: formatMessage({
|
|
348
|
+
id: 'luckda.lowcode.design.toolbar.selectUser',
|
|
349
|
+
label: '请选择模拟登录人'
|
|
350
|
+
}),
|
|
351
|
+
allowClear: true,
|
|
352
|
+
style: {
|
|
353
|
+
width: 180
|
|
354
|
+
},
|
|
355
|
+
dropdownStyle: {
|
|
356
|
+
zIndex: 3100
|
|
357
|
+
},
|
|
358
|
+
filterOption: false,
|
|
359
|
+
labelInValue: true,
|
|
360
|
+
showSearch: true,
|
|
361
|
+
getPopupContainer: function getPopupContainer() {
|
|
362
|
+
return document.getElementById('preview-drawer-header').closest('.ant-drawer-wrapper-body');
|
|
363
|
+
},
|
|
364
|
+
onSearch: handleSearch,
|
|
365
|
+
onChange: function onChange(_, _opt) {
|
|
366
|
+
if (_opt) {
|
|
367
|
+
setUserId(_opt.props.sloginid);
|
|
368
|
+
} else {
|
|
369
|
+
setUserId(void 0);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}, userOptions.map(function (_ref5) {
|
|
373
|
+
var key = _ref5.key,
|
|
374
|
+
label = _ref5.label,
|
|
375
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
376
|
+
return /*#__PURE__*/React.createElement(Select.Option, _extends({
|
|
377
|
+
key: key,
|
|
378
|
+
value: key
|
|
379
|
+
}, rest), label);
|
|
380
|
+
})))),
|
|
381
|
+
placement: "bottom",
|
|
382
|
+
height: "94vh",
|
|
383
|
+
footer: false,
|
|
384
|
+
zIndex: 3000,
|
|
385
|
+
headerStyle: {
|
|
386
|
+
padding: '0 48px 0 24px'
|
|
387
|
+
},
|
|
388
|
+
bodyStyle: {
|
|
389
|
+
height: 'calc(100% - 54px)',
|
|
390
|
+
backgroundColor: '#F0F2F5'
|
|
391
|
+
},
|
|
392
|
+
visible: showPreview,
|
|
393
|
+
destroyOnClose: true,
|
|
394
|
+
onClose: function onClose() {
|
|
395
|
+
return setShowPreview(false);
|
|
396
|
+
},
|
|
397
|
+
getContainer: function getContainer() {
|
|
398
|
+
return document.getElementById('lc-design-workspace');
|
|
399
|
+
}
|
|
400
|
+
}, /*#__PURE__*/React.createElement(Preview, {
|
|
401
|
+
code: location.query.code,
|
|
402
|
+
userId: userId || 'no-user',
|
|
403
|
+
debug: true
|
|
404
|
+
})));
|
|
161
405
|
};
|
|
162
406
|
export default DesignToolbar;
|
|
@@ -5,11 +5,11 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
5
5
|
var _excluded = ["props", "children"];
|
|
6
6
|
import React, { useRef, useState, useEffect } from 'react';
|
|
7
7
|
import { useMemoizedFn, useDeepCompareLayoutEffect, useLatest } from 'ahooks';
|
|
8
|
-
import { uniq, split, reduce } from 'lodash';
|
|
8
|
+
import { uniq, split, reduce, isString } from 'lodash';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { Card, Tree, Icon } from 'luck-design/antd';
|
|
11
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
12
|
-
import { useContext,
|
|
12
|
+
import { useContext, useGet } from "../engine/provider/ContextProvider";
|
|
13
13
|
import { LC_BUILDIN_UNIT_KEY, LC_BUILDIN_UNIT_KEY_LIST } from "../constants";
|
|
14
14
|
import { getPathById } from "../engine/tools/dataProcess";
|
|
15
15
|
import styles from "./style/outline.less";
|
|
@@ -19,9 +19,7 @@ var Outline = function Outline(_ref) {
|
|
|
19
19
|
var open = _ref.open;
|
|
20
20
|
var clickBySelf = useRef(false);
|
|
21
21
|
var ctx = useContext();
|
|
22
|
-
var
|
|
23
|
-
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
24
|
-
pageData = _usePageData2[0];
|
|
22
|
+
var pageData = useGet();
|
|
25
23
|
var _useState = useState(null),
|
|
26
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
25
|
pageAndModal = _useState2[0],
|
|
@@ -42,18 +40,22 @@ var Outline = function Outline(_ref) {
|
|
|
42
40
|
var lastPageExpandedKeysRef = useLatest(pageExpandedKeys);
|
|
43
41
|
useEffect(function () {
|
|
44
42
|
var _id = ctx.$subscriber(ctx.topics.COMPONENT_ACTIVE).on(function (payload) {
|
|
45
|
-
|
|
43
|
+
if (!isString(payload.target)) {
|
|
44
|
+
setSelectedKey(null);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
setSelectedKey(payload.target);
|
|
46
48
|
if (clickBySelf.current) {
|
|
47
49
|
clickBySelf.current = false;
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
|
-
var _split = split(getPathById(pageData, payload.
|
|
52
|
+
var _split = split(getPathById(pageData, payload.target), '/'),
|
|
51
53
|
_split2 = _slicedToArray(_split, 1),
|
|
52
54
|
_root = _split2[0];
|
|
53
55
|
if (!LC_BUILDIN_UNIT_KEY_LIST.includes(_root)) {
|
|
54
|
-
setModalExpandedKeys(uniq([].concat(_toConsumableArray(latestModalExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.
|
|
56
|
+
setModalExpandedKeys(uniq([].concat(_toConsumableArray(latestModalExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.target), '/')))));
|
|
55
57
|
} else {
|
|
56
|
-
setPageExpandedKeys(uniq([].concat(_toConsumableArray(lastPageExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.
|
|
58
|
+
setPageExpandedKeys(uniq([].concat(_toConsumableArray(lastPageExpandedKeysRef.current), _toConsumableArray(split(getPathById(pageData, payload.target), '/')))));
|
|
57
59
|
}
|
|
58
60
|
}).watch();
|
|
59
61
|
return function () {
|
|
@@ -63,7 +65,7 @@ var Outline = function Outline(_ref) {
|
|
|
63
65
|
var handleSelect = useMemoizedFn(function (_key) {
|
|
64
66
|
clickBySelf.current = true;
|
|
65
67
|
ctx.$publisher(ctx.topics.COMPONENT_ACTIVE, _key ? {
|
|
66
|
-
|
|
68
|
+
target: _key
|
|
67
69
|
} : null);
|
|
68
70
|
});
|
|
69
71
|
var render = useMemoizedFn(function (_ref2) {
|