@luck-design-biz/luckda 1.0.2 → 1.0.4-13tl
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/LDActions/index.js +1 -0
- package/es/components/LDActions/index.less +70 -70
- package/es/components/LdFormList/index.js +6 -4
- package/es/components/LdGrid/index.js +5 -8
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.less +42 -42
- package/es/helper/action.js +8 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/locales/zh-CN.js +22 -3
- package/es/lowcode/constants/api-url.js +410 -268
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +1 -1
- package/es/lowcode/engine/meta/button.api.json +0 -0
- package/es/lowcode/engine/meta/cardlist.props.json +3 -5
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/es/lowcode/engine/meta/dialog.props.json +24 -4
- package/es/lowcode/engine/meta/drawer.props.json +1 -1
- package/es/lowcode/engine/meta/fielddate.props.json +0 -1
- package/es/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/es/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/es/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +3 -19
- package/es/lowcode/engine/meta/grouptree.props.json +0 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +30 -30
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/es/lowcode/engine/meta/jsx.props.json +4 -3
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/table.props.json +0 -7
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +1 -5
- package/es/lowcode/engine/provider/ContextProvider/index.js +44 -44
- package/es/lowcode/engine/provider/ContextProvider/router.js +21 -1
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +16 -16
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/painter/Components.js +3 -3
- package/es/lowcode/painter/DesignOperator.js +10 -4
- package/es/lowcode/painter/DesignToolbar.js +27 -28
- package/es/lowcode/painter/History.js +300 -0
- package/es/lowcode/painter/Panel.js +1 -1
- package/es/lowcode/painter/Ribbon.js +38 -2
- package/es/lowcode/painter/components/AdvancePanel.js +30 -37
- 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 +10 -3
- 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/RuleInput.js +30 -30
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/TreeEditor.js +76 -8
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +43 -35
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/DiffEditor.js +41 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/components/field-setting/SettingUI.js +0 -1
- package/es/lowcode/painter/panel-section/ConditionCheck.js +71 -0
- package/es/lowcode/painter/panel-section/DialogSize.js +76 -0
- package/es/lowcode/painter/panel-section/DialogWidthHeight.js +60 -0
- package/es/lowcode/painter/panel-section/FieldState.js +11 -2
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +0 -1
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +171 -0
- package/es/lowcode/painter/panel-section/JSEditor/index.js +171 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- 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 +39 -21
- 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 +2 -2
- 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 +15 -15
- package/es/lowcode/painter/panel-section/TableZebra.js +5 -1
- package/es/lowcode/painter/panel-section/TextContent.js +10 -2
- package/es/lowcode/painter/style/action-bind-modal.less +104 -104
- 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 +178 -178
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +56 -56
- 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/history.less +46 -0
- 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 +97 -97
- package/es/lowcode/painter/style/number-input.less +19 -19
- package/es/lowcode/painter/style/outline.less +30 -30
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/page-vars.less +25 -25
- package/es/lowcode/painter/style/panel-attrs.less +47 -47
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +100 -100
- 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 +7 -7
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -18
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/svg/code.svg +3 -3
- package/es/lowcode/painter/svg/expect.svg +9 -9
- package/es/lowcode/view/ErrorBoundary.js +80 -0
- package/es/lowcode/view/Page.js +3 -3
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- 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 +33 -33
- 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/index.js +123 -123
- package/es/lowcode/view/lc-components/CardList/meta.json +332 -334
- package/es/lowcode/view/lc-components/Dialog/index.js +25 -18
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/es/lowcode/view/lc-components/Dialog/meta.json +224 -204
- package/es/lowcode/view/lc-components/Drawer/index.js +16 -16
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/es/lowcode/view/lc-components/FieldDate/meta.json +140 -141
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +137 -138
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +166 -167
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/es/lowcode/view/lc-components/FieldYear/meta.json +128 -129
- package/es/lowcode/view/lc-components/Form/index.js +32 -39
- package/es/lowcode/view/lc-components/Form/meta.json +629 -645
- package/es/lowcode/view/lc-components/GroupTree/index.js +25 -25
- package/es/lowcode/view/lc-components/GroupTree/index.less +11 -11
- package/es/lowcode/view/lc-components/GroupTree/meta.json +82 -83
- package/es/lowcode/view/lc-components/Iframe/meta.json +31 -31
- package/es/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/es/lowcode/view/lc-components/Image/index.less +27 -27
- package/es/lowcode/view/lc-components/Image/meta.json +149 -149
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +36 -20
- package/es/lowcode/view/lc-components/JSX/meta.json +29 -28
- package/es/lowcode/view/lc-components/Layout/index.js +16 -16
- 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/index.less +15 -15
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +61 -61
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -108
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +40 -18
- package/es/lowcode/view/lc-components/Table/index.js +152 -151
- package/es/lowcode/view/lc-components/Table/meta.json +443 -450
- package/es/lowcode/view/lc-components/Tabs/index.js +23 -23
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +96 -96
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +353 -357
- package/es/lowcode/view/lc-components/Wrapper.js +2 -0
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -98
- package/es/lowcode/view/style/page.less +7 -7
- package/es/upload/FilesWall/index.js +29 -19
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/gridForm.js +16 -6
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +31 -19
- package/es/utils/form.js +25 -24
- package/es/utils/grid.js +10 -2
- package/lib/components/LDActions/index.js +1 -0
- package/lib/components/LDActions/index.less +70 -70
- package/lib/components/LdFormList/index.js +6 -4
- package/lib/components/LdGrid/index.js +5 -8
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.less +42 -42
- package/lib/helper/action.js +8 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/locales/zh-CN.js +22 -3
- package/lib/lowcode/constants/api-url.js +411 -270
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +1 -1
- package/lib/lowcode/engine/meta/button.api.json +0 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +3 -5
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/lib/lowcode/engine/meta/dialog.props.json +24 -4
- package/lib/lowcode/engine/meta/drawer.props.json +1 -1
- package/lib/lowcode/engine/meta/fielddate.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +3 -19
- package/lib/lowcode/engine/meta/grouptree.props.json +0 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +30 -30
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/lib/lowcode/engine/meta/jsx.props.json +4 -3
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/table.props.json +0 -7
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +1 -5
- package/lib/lowcode/engine/provider/ContextProvider/index.js +44 -44
- package/lib/lowcode/engine/provider/ContextProvider/router.js +22 -1
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +16 -16
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/painter/Components.js +3 -3
- package/lib/lowcode/painter/DesignOperator.js +10 -4
- package/lib/lowcode/painter/DesignToolbar.js +27 -28
- package/lib/lowcode/painter/History.js +308 -0
- package/lib/lowcode/painter/Panel.js +1 -1
- package/lib/lowcode/painter/Ribbon.js +38 -2
- package/lib/lowcode/painter/components/AdvancePanel.js +29 -36
- 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 +10 -3
- 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/RuleInput.js +30 -30
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/TreeEditor.js +76 -8
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +43 -35
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/DiffEditor.js +49 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +0 -1
- package/lib/lowcode/painter/panel-section/ConditionCheck.js +79 -0
- package/lib/lowcode/painter/panel-section/DialogSize.js +83 -0
- package/lib/lowcode/painter/panel-section/DialogWidthHeight.js +67 -0
- package/lib/lowcode/painter/panel-section/FieldState.js +11 -2
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +0 -1
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +178 -0
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +179 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- 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 +39 -21
- 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 +2 -2
- 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 +15 -15
- package/lib/lowcode/painter/panel-section/TableZebra.js +5 -1
- package/lib/lowcode/painter/panel-section/TextContent.js +9 -1
- package/lib/lowcode/painter/style/action-bind-modal.less +104 -104
- 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 +178 -178
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +56 -56
- 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/history.less +46 -0
- 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 +97 -97
- package/lib/lowcode/painter/style/number-input.less +19 -19
- package/lib/lowcode/painter/style/outline.less +30 -30
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/page-vars.less +25 -25
- package/lib/lowcode/painter/style/panel-attrs.less +47 -47
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +100 -100
- 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 +7 -7
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -18
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/svg/code.svg +3 -3
- package/lib/lowcode/painter/svg/expect.svg +9 -9
- package/lib/lowcode/view/ErrorBoundary.js +88 -0
- package/lib/lowcode/view/Page.js +4 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- 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 +33 -33
- 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/index.js +123 -123
- package/lib/lowcode/view/lc-components/CardList/meta.json +332 -334
- package/lib/lowcode/view/lc-components/Dialog/index.js +23 -16
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/lib/lowcode/view/lc-components/Dialog/meta.json +224 -204
- package/lib/lowcode/view/lc-components/Drawer/index.js +14 -14
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +140 -141
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +137 -138
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +166 -167
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +128 -129
- package/lib/lowcode/view/lc-components/Form/index.js +32 -39
- package/lib/lowcode/view/lc-components/Form/meta.json +629 -645
- package/lib/lowcode/view/lc-components/GroupTree/index.js +25 -25
- package/lib/lowcode/view/lc-components/GroupTree/index.less +11 -11
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +82 -83
- package/lib/lowcode/view/lc-components/Iframe/meta.json +31 -31
- package/lib/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/lib/lowcode/view/lc-components/Image/index.less +27 -27
- package/lib/lowcode/view/lc-components/Image/meta.json +149 -149
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +37 -20
- package/lib/lowcode/view/lc-components/JSX/meta.json +29 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +16 -16
- 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/index.less +15 -15
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -61
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -108
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +39 -17
- package/lib/lowcode/view/lc-components/Table/index.js +152 -151
- package/lib/lowcode/view/lc-components/Table/meta.json +443 -450
- package/lib/lowcode/view/lc-components/Tabs/index.js +23 -23
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +96 -96
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +353 -357
- package/lib/lowcode/view/lc-components/Wrapper.js +2 -0
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -98
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/upload/FilesWall/index.js +26 -16
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/gridForm.js +13 -3
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +30 -18
- package/lib/utils/form.js +24 -23
- package/lib/utils/grid.js +11 -3
- package/lowcode.js +1 -1
- package/package.json +175 -176
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/painter/panel-section/JSEditor.js +0 -49
- package/es/lowcode/view/errorBoundary.js +0 -61
- package/lib/lowcode/painter/panel-section/JSEditor.js +0 -57
- package/lib/lowcode/view/errorBoundary.js +0 -69
|
@@ -94,20 +94,6 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
94
94
|
}),
|
|
95
95
|
updatePageDataLoading = _useRequest2.loading,
|
|
96
96
|
runAsync = _useRequest2.runAsync;
|
|
97
|
-
(0, _react.useEffect)(function () {
|
|
98
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
99
|
-
var _langList = _ref2.langList;
|
|
100
|
-
return setLangList(_langList);
|
|
101
|
-
}).watch();
|
|
102
|
-
return function () {
|
|
103
|
-
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
104
|
-
};
|
|
105
|
-
}, []);
|
|
106
|
-
(0, _react.useEffect)(function () {
|
|
107
|
-
if (!showPreview) {
|
|
108
|
-
setUserId(void 0);
|
|
109
|
-
}
|
|
110
|
-
}, [showPreview]);
|
|
111
97
|
var handleSave = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
112
98
|
var _yield$runAsync, code;
|
|
113
99
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
@@ -152,6 +138,23 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
152
138
|
}
|
|
153
139
|
}, _callee);
|
|
154
140
|
})), []);
|
|
141
|
+
(0, _react.useEffect)(function () {
|
|
142
|
+
var lssid = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref3) {
|
|
143
|
+
var _langList = _ref3.langList;
|
|
144
|
+
setLangList(_langList);
|
|
145
|
+
console.log(11111, _langList);
|
|
146
|
+
}).watch();
|
|
147
|
+
var dasid = context.$subscriber(context.topics.DESIGN_OPERATE_SAVE).on(handleSave).watch();
|
|
148
|
+
return function () {
|
|
149
|
+
context.$unsubscriber(context.topics.LANG_SETTING_SELECT, lssid);
|
|
150
|
+
context.$unsubscriber(context.topics.DESIGN_OPERATE_SAVE, dasid);
|
|
151
|
+
};
|
|
152
|
+
}, []);
|
|
153
|
+
(0, _react.useEffect)(function () {
|
|
154
|
+
if (!showPreview) {
|
|
155
|
+
setUserId(void 0);
|
|
156
|
+
}
|
|
157
|
+
}, [showPreview]);
|
|
155
158
|
var handleClearCache = (0, _ahooks.useMemoizedFn)(function () {
|
|
156
159
|
_antd.Modal.confirm({
|
|
157
160
|
title: (0, _utils.formatMessage)({
|
|
@@ -333,20 +336,14 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
333
336
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
|
334
337
|
while (1) switch (_context3.prev = _context3.next) {
|
|
335
338
|
case 0:
|
|
336
|
-
if (updatePageDataLoading) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
break;
|
|
339
|
+
if (!updatePageDataLoading) {
|
|
340
|
+
if ((0, _ContextProvider.getNeedPrompt)()) {
|
|
341
|
+
context.$publisher(context.topics.DESIGN_OPERATE_SAVE);
|
|
342
|
+
}
|
|
343
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
344
|
+
setShowPreview(true);
|
|
343
345
|
}
|
|
344
|
-
|
|
345
|
-
return handleSave();
|
|
346
|
-
case 4:
|
|
347
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
348
|
-
setShowPreview(true);
|
|
349
|
-
case 6:
|
|
346
|
+
case 1:
|
|
350
347
|
case "end":
|
|
351
348
|
return _context3.stop();
|
|
352
349
|
}
|
|
@@ -385,7 +382,9 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
385
382
|
fontSize: 14,
|
|
386
383
|
margin: '0 11px 0 5px'
|
|
387
384
|
},
|
|
388
|
-
onClick:
|
|
385
|
+
onClick: function onClick() {
|
|
386
|
+
return context.$publisher(context.topics.DESIGN_OPERATE_SAVE);
|
|
387
|
+
}
|
|
389
388
|
})), /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
390
389
|
visible: show,
|
|
391
390
|
width: 1024,
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _ahooks = require("ahooks");
|
|
12
|
+
var _antd = require("luck-design/antd");
|
|
13
|
+
var _luckDesign = require("luck-design");
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
|
+
var _base = require("@luck-design-biz/base");
|
|
17
|
+
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
18
|
+
var _TipIcon = _interopRequireDefault(require("./components/TipIcon"));
|
|
19
|
+
var _DiffEditor = _interopRequireDefault(require("./components/code-editor/DiffEditor"));
|
|
20
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
21
|
+
var _helper = require("../engine/tools/helper");
|
|
22
|
+
var _dataProcess = require("../engine/tools/dataProcess");
|
|
23
|
+
var _history = _interopRequireDefault(require("./style/history.less"));
|
|
24
|
+
var _apiUrl = require("../constants/api-url");
|
|
25
|
+
var History = function History(_ref) {
|
|
26
|
+
var form = _ref.form;
|
|
27
|
+
var ref = (0, _react.useRef)();
|
|
28
|
+
var editorRef = (0, _react.useRef)();
|
|
29
|
+
var versionListRef = (0, _react.useRef)(null);
|
|
30
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
31
|
+
var _useState = (0, _react.useState)([]),
|
|
32
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
33
|
+
versionList = _useState2[0],
|
|
34
|
+
setVersionList = _useState2[1];
|
|
35
|
+
var _useState3 = (0, _react.useState)(null),
|
|
36
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
37
|
+
version = _useState4[0],
|
|
38
|
+
setVersion = _useState4[1];
|
|
39
|
+
var _useState5 = (0, _react.useState)(false),
|
|
40
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
41
|
+
visible = _useState6[0],
|
|
42
|
+
setVisible = _useState6[1];
|
|
43
|
+
var _useInViewport = (0, _ahooks.useInViewport)(ref),
|
|
44
|
+
_useInViewport2 = (0, _slicedToArray2.default)(_useInViewport, 1),
|
|
45
|
+
inViewport = _useInViewport2[0];
|
|
46
|
+
var pageData = (0, _ContextProvider.useGet)();
|
|
47
|
+
var _useRequest = (0, _ahooks.useRequest)(_apiUrl.fetchHistoryVersionList, {
|
|
48
|
+
manual: true,
|
|
49
|
+
onSuccess: function onSuccess(_ref2) {
|
|
50
|
+
var code = _ref2.code,
|
|
51
|
+
list = _ref2.list,
|
|
52
|
+
detail = _ref2.detail;
|
|
53
|
+
if (code === 1) {
|
|
54
|
+
versionListRef.current = list.map(function (id) {
|
|
55
|
+
return detail[id];
|
|
56
|
+
});
|
|
57
|
+
setVersionList(versionListRef.current);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
loading = _useRequest.loading,
|
|
62
|
+
runFetchHistoryVersionList = _useRequest.run;
|
|
63
|
+
var _useRequest2 = (0, _ahooks.useRequest)(_apiUrl.fetchAddHistoryVersion, {
|
|
64
|
+
manual: true,
|
|
65
|
+
onSuccess: function onSuccess(_ref3) {
|
|
66
|
+
var code = _ref3.code;
|
|
67
|
+
if (code === 1) {
|
|
68
|
+
setVisible(false);
|
|
69
|
+
runFetchHistoryVersionList({
|
|
70
|
+
pageCode: (0, _helper.getLDMetaAttr)('pageCode')
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
addLoading = _useRequest2.loading,
|
|
76
|
+
runFetchAddHistoryVersion = _useRequest2.run;
|
|
77
|
+
var _useRequest3 = (0, _ahooks.useRequest)(_apiUrl.fetchDelHistoryVersion, {
|
|
78
|
+
manual: true,
|
|
79
|
+
onSuccess: function onSuccess(_ref4) {
|
|
80
|
+
var code = _ref4.code;
|
|
81
|
+
if (code === 1) {
|
|
82
|
+
runFetchHistoryVersionList({
|
|
83
|
+
pageCode: (0, _helper.getLDMetaAttr)('pageCode')
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
deleteLoading = _useRequest3.loading,
|
|
89
|
+
runFetchDelHistoryVersion = _useRequest3.run;
|
|
90
|
+
var _useRequest4 = (0, _ahooks.useRequest)(_apiUrl.fetchRecoverHistoryVersion, {
|
|
91
|
+
manual: true,
|
|
92
|
+
onSuccess: function onSuccess(_ref5) {
|
|
93
|
+
var code = _ref5.code;
|
|
94
|
+
return code === 1 && window.location.reload();
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
runFetchRecoverHistoryVersion = _useRequest4.run;
|
|
98
|
+
var handleSearch = (0, _ahooks.useMemoizedFn)(function (value) {
|
|
99
|
+
if ((0, _lodash.isNil)(value)) {
|
|
100
|
+
setVersionList(versionListRef.current);
|
|
101
|
+
} else {
|
|
102
|
+
setVersionList(versionListRef.current.filter(function (item) {
|
|
103
|
+
return JSON.stringify(item).includes(value);
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var handleAddVersion = (0, _ahooks.useMemoizedFn)(function () {
|
|
108
|
+
form.validateFields(function (err, values) {
|
|
109
|
+
if (!err) {
|
|
110
|
+
runFetchAddHistoryVersion({
|
|
111
|
+
pageCode: (0, _helper.getLDMetaAttr)('pageCode'),
|
|
112
|
+
backupName: values.title,
|
|
113
|
+
backupNote: values.note
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
var handleDeleteVersion = (0, _ahooks.useMemoizedFn)(function (item) {
|
|
119
|
+
(0, _base.recheck)({
|
|
120
|
+
title: "".concat((0, _utils.formatMessage)({
|
|
121
|
+
id: 'luckda.lowcode.version.delete',
|
|
122
|
+
label: '你确定要删除该历史版本吗?'
|
|
123
|
+
})),
|
|
124
|
+
checkWords: "".concat(item.backupName, "(").concat(item.backupUserName, ")"),
|
|
125
|
+
cancelText: (0, _utils.formatMessage)({
|
|
126
|
+
id: 'app.base.operate.cancel'
|
|
127
|
+
}),
|
|
128
|
+
okText: (0, _utils.formatMessage)({
|
|
129
|
+
id: 'app.base.operate.ok'
|
|
130
|
+
}),
|
|
131
|
+
onOk: function onOk() {
|
|
132
|
+
runFetchDelHistoryVersion({
|
|
133
|
+
uid: item.id
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
var handleRecoverVersion = (0, _ahooks.useMemoizedFn)(function () {
|
|
139
|
+
(0, _base.recheck)({
|
|
140
|
+
title: "".concat((0, _utils.formatMessage)({
|
|
141
|
+
id: 'luckda.lowcode.version.confirm.recover',
|
|
142
|
+
label: '你确定要还原到该历史版本吗?'
|
|
143
|
+
})),
|
|
144
|
+
checkWords: "".concat(version.backupName, "(").concat(version.backupUserName, ")"),
|
|
145
|
+
cancelText: (0, _utils.formatMessage)({
|
|
146
|
+
id: 'app.base.operate.cancel'
|
|
147
|
+
}),
|
|
148
|
+
okText: (0, _utils.formatMessage)({
|
|
149
|
+
id: 'luckda.lowcode.version.recover',
|
|
150
|
+
label: '还原版本'
|
|
151
|
+
}),
|
|
152
|
+
onOk: function onOk() {
|
|
153
|
+
return runFetchRecoverHistoryVersion({
|
|
154
|
+
uid: version.id
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
var handleUseVersion = (0, _ahooks.useMemoizedFn)(function () {
|
|
160
|
+
var code = editorRef.current.getModel().modified.getValue();
|
|
161
|
+
try {
|
|
162
|
+
var data = JSON.parse(code);
|
|
163
|
+
(0, _ContextProvider.resetPageData)(data);
|
|
164
|
+
setVersion(null);
|
|
165
|
+
} catch (e) {
|
|
166
|
+
console.error(e);
|
|
167
|
+
message.warning((0, _utils.formatMessage)({
|
|
168
|
+
id: 'luckda.lowcode.error.pagedata',
|
|
169
|
+
label: '页面数据错误'
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
(0, _react.useEffect)(function () {
|
|
174
|
+
if (inViewport) {
|
|
175
|
+
runFetchHistoryVersionList({
|
|
176
|
+
pageCode: (0, _helper.getLDMetaAttr)('pageCode')
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}, [inViewport]);
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
+
ref: ref,
|
|
182
|
+
className: _history.default['lc-painter-history']
|
|
183
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
184
|
+
className: _history.default.historyToolbar
|
|
185
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Input.Search, {
|
|
186
|
+
placeholder: (0, _utils.formatMessage)({
|
|
187
|
+
id: 'luckda.lowcode.version.placeholder.search',
|
|
188
|
+
label: '请输入查询内容'
|
|
189
|
+
}),
|
|
190
|
+
size: "small",
|
|
191
|
+
onSearch: handleSearch
|
|
192
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
193
|
+
type: "primary",
|
|
194
|
+
icon: "plus",
|
|
195
|
+
size: "small",
|
|
196
|
+
style: {
|
|
197
|
+
marginLeft: '8px',
|
|
198
|
+
flexShrink: 0
|
|
199
|
+
},
|
|
200
|
+
onClick: function onClick() {
|
|
201
|
+
return setVisible(true);
|
|
202
|
+
}
|
|
203
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
204
|
+
spinning: loading || deleteLoading
|
|
205
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Timeline, null, versionList.map(function (item) {
|
|
206
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Timeline.Item, {
|
|
207
|
+
className: _history.default.timelineItem
|
|
208
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
209
|
+
className: _history.default.timelineItemHeader
|
|
210
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, item.backupName), /*#__PURE__*/_react.default.createElement("div", {
|
|
211
|
+
className: _history.default.timelineItemActions
|
|
212
|
+
}, /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
213
|
+
title: (0, _utils.formatMessage)({
|
|
214
|
+
id: 'app.base.operate.delete',
|
|
215
|
+
label: '删除'
|
|
216
|
+
}),
|
|
217
|
+
type: "delete",
|
|
218
|
+
style: {
|
|
219
|
+
color: 'var(--luck-color-danger)',
|
|
220
|
+
marginRight: 8
|
|
221
|
+
},
|
|
222
|
+
onClick: function onClick() {
|
|
223
|
+
return handleDeleteVersion(item);
|
|
224
|
+
}
|
|
225
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
226
|
+
title: (0, _utils.formatMessage)({
|
|
227
|
+
id: 'luckda.lowcode.version.diff',
|
|
228
|
+
label: '差异比对'
|
|
229
|
+
}),
|
|
230
|
+
type: "swap",
|
|
231
|
+
onClick: function onClick() {
|
|
232
|
+
ctx.$publisher(ctx.topics.COMPONENT_ACTIVE, null);
|
|
233
|
+
setVersion(item);
|
|
234
|
+
}
|
|
235
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
236
|
+
className: _history.default.timelineItemUser
|
|
237
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Avatar, {
|
|
238
|
+
style: {
|
|
239
|
+
backgroundColor: 'var(--luck-ant-colorful-primary)',
|
|
240
|
+
verticalAlign: 'middle',
|
|
241
|
+
marginRight: '8px'
|
|
242
|
+
}
|
|
243
|
+
}, item.backupUserName.slice(-1)), item.backupUserName), /*#__PURE__*/_react.default.createElement("div", {
|
|
244
|
+
className: _history.default.timelineItemTime
|
|
245
|
+
}, (0, _moment.default)(item.backupTime).fromNow()));
|
|
246
|
+
})))), /*#__PURE__*/_react.default.createElement(_luckDesign.LuckModal, {
|
|
247
|
+
title: "".concat(version === null || version === void 0 ? void 0 : version.backupName, "(").concat(version === null || version === void 0 ? void 0 : version.backupUserName, ") \u21CB \u5F53\u524D\u7248\u672C"),
|
|
248
|
+
width: "80vw",
|
|
249
|
+
height: "80vh",
|
|
250
|
+
visible: !(0, _lodash.isNil)(version),
|
|
251
|
+
fullScreen: true,
|
|
252
|
+
getContainer: function getContainer() {
|
|
253
|
+
return document.getElementById('lc-design-workspace');
|
|
254
|
+
},
|
|
255
|
+
okText: (0, _utils.formatMessage)({
|
|
256
|
+
id: 'luckda.lowcode.version.recover',
|
|
257
|
+
label: '还原版本'
|
|
258
|
+
}),
|
|
259
|
+
cancelText: (0, _utils.formatMessage)({
|
|
260
|
+
id: 'luckda.lowcode.version.use',
|
|
261
|
+
label: '使用'
|
|
262
|
+
}),
|
|
263
|
+
cancelButtonProps: {
|
|
264
|
+
onClick: handleUseVersion
|
|
265
|
+
},
|
|
266
|
+
onOk: handleRecoverVersion,
|
|
267
|
+
onClose: function onClose() {
|
|
268
|
+
return setVersion(null);
|
|
269
|
+
}
|
|
270
|
+
}, /*#__PURE__*/_react.default.createElement(_DiffEditor.default, {
|
|
271
|
+
ref: editorRef,
|
|
272
|
+
language: "json",
|
|
273
|
+
originalCode: version ? JSON.stringify((0, _dataProcess.decompress)(version === null || version === void 0 ? void 0 : version.pageData), null, '\t') : '',
|
|
274
|
+
modifiedCode: JSON.stringify(pageData, null, '\t')
|
|
275
|
+
})), /*#__PURE__*/_react.default.createElement(_luckDesign.LuckModal, {
|
|
276
|
+
title: (0, _utils.formatMessage)({
|
|
277
|
+
id: 'luckda.lowcode.version.add',
|
|
278
|
+
label: '添加到历史版本'
|
|
279
|
+
}),
|
|
280
|
+
size: "small",
|
|
281
|
+
visible: visible,
|
|
282
|
+
okButtonProps: {
|
|
283
|
+
loading: addLoading
|
|
284
|
+
},
|
|
285
|
+
onOk: handleAddVersion,
|
|
286
|
+
onClose: function onClose() {
|
|
287
|
+
return setVisible(false);
|
|
288
|
+
}
|
|
289
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form, null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, form.getFieldDecorator('title', {
|
|
290
|
+
rules: [{
|
|
291
|
+
required: true
|
|
292
|
+
}]
|
|
293
|
+
})( /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
294
|
+
placeholder: (0, _utils.formatMessage)({
|
|
295
|
+
id: 'luckda.lowcode.version.placeholder.title',
|
|
296
|
+
label: '请输入版本标题'
|
|
297
|
+
})
|
|
298
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, form.getFieldDecorator('note')( /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
|
|
299
|
+
rows: 6,
|
|
300
|
+
placeholder: (0, _utils.formatMessage)({
|
|
301
|
+
id: 'luckda.lowcode.version.placeholder.note',
|
|
302
|
+
label: '请输入版本描述'
|
|
303
|
+
})
|
|
304
|
+
}))))));
|
|
305
|
+
};
|
|
306
|
+
var _default = exports.default = _antd.Form.create({
|
|
307
|
+
name: 'version_form'
|
|
308
|
+
})(History);
|
|
@@ -117,7 +117,7 @@ var Panel = function Panel() {
|
|
|
117
117
|
oldValue: oldValue,
|
|
118
118
|
newValue: newValue
|
|
119
119
|
});
|
|
120
|
-
if (repositioning) context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
120
|
+
if (repositioning || field === 'css') context.$publisher(context.topics.COMPONENT_REPOSITIONING, {
|
|
121
121
|
id: _id
|
|
122
122
|
});
|
|
123
123
|
});
|
|
@@ -15,8 +15,9 @@ var _antd = require("luck-design/antd");
|
|
|
15
15
|
var _Outline = _interopRequireDefault(require("./Outline"));
|
|
16
16
|
var _Components = _interopRequireDefault(require("./Components"));
|
|
17
17
|
var _I18n = _interopRequireDefault(require("./I18n"));
|
|
18
|
+
var _History = _interopRequireDefault(require("./History"));
|
|
18
19
|
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
-
var _expect = _interopRequireDefault(require("./expect
|
|
20
|
+
var _expect = _interopRequireDefault(require("./expect"));
|
|
20
21
|
var _ribbon = _interopRequireDefault(require("./style/ribbon.less"));
|
|
21
22
|
var _WIDTH_ = 48;
|
|
22
23
|
var _DRAWER_PROPS = {
|
|
@@ -55,6 +56,12 @@ var _DRAWER_I18N_ = {
|
|
|
55
56
|
title: '多语言文案管理',
|
|
56
57
|
fix: false
|
|
57
58
|
};
|
|
59
|
+
var _DRAWER_HISTORY_ = {
|
|
60
|
+
width: 240,
|
|
61
|
+
key: 'history',
|
|
62
|
+
title: '版本历史',
|
|
63
|
+
fix: false
|
|
64
|
+
};
|
|
58
65
|
var Ribbon = function Ribbon() {
|
|
59
66
|
var _useState = (0, _react.useState)(null),
|
|
60
67
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -114,6 +121,21 @@ var Ribbon = function Ribbon() {
|
|
|
114
121
|
onClick: function onClick() {
|
|
115
122
|
return setDrawer((drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_I18N_.key ? null : _DRAWER_I18N_);
|
|
116
123
|
}
|
|
124
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
125
|
+
placement: "right",
|
|
126
|
+
title: (0, _utils.formatMessage)({
|
|
127
|
+
id: 'luckda.lowcode.history',
|
|
128
|
+
label: _DRAWER_HISTORY_.title
|
|
129
|
+
})
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
131
|
+
type: "history",
|
|
132
|
+
style: {
|
|
133
|
+
color: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_HISTORY_.key && '#1d79f2',
|
|
134
|
+
fontSize: 20
|
|
135
|
+
},
|
|
136
|
+
onClick: function onClick() {
|
|
137
|
+
return setDrawer((drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_HISTORY_.key ? null : _DRAWER_HISTORY_);
|
|
138
|
+
}
|
|
117
139
|
}))), /*#__PURE__*/_react.default.createElement(_antd.Drawer, (0, _extends2.default)({
|
|
118
140
|
title: drawer ? (0, _utils.formatMessage)({
|
|
119
141
|
id: "luckda.lowcode.".concat(drawer.key),
|
|
@@ -158,6 +180,20 @@ var Ribbon = function Ribbon() {
|
|
|
158
180
|
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _DRAWER_PROPS.style), {}, {
|
|
159
181
|
display: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_I18N_.key ? 'block' : 'none'
|
|
160
182
|
})
|
|
161
|
-
}), /*#__PURE__*/_react.default.createElement(_expect.default, null)))
|
|
183
|
+
}), /*#__PURE__*/_react.default.createElement(_expect.default, null)), /*#__PURE__*/_react.default.createElement(_antd.Drawer, (0, _extends2.default)({
|
|
184
|
+
title: drawer ? (0, _utils.formatMessage)({
|
|
185
|
+
id: "luckda.lowcode.".concat(drawer.key),
|
|
186
|
+
label: drawer.title
|
|
187
|
+
}) : '',
|
|
188
|
+
width: (drawer === null || drawer === void 0 ? void 0 : drawer.width) || 0,
|
|
189
|
+
visible: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_HISTORY_.key,
|
|
190
|
+
onClose: function onClose() {
|
|
191
|
+
return setDrawer(null);
|
|
192
|
+
}
|
|
193
|
+
}, _DRAWER_PROPS, {
|
|
194
|
+
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _DRAWER_PROPS.style), {}, {
|
|
195
|
+
display: (drawer === null || drawer === void 0 ? void 0 : drawer.key) === _DRAWER_HISTORY_.key ? 'block' : 'none'
|
|
196
|
+
})
|
|
197
|
+
}), /*#__PURE__*/_react.default.createElement(_History.default, null)));
|
|
162
198
|
};
|
|
163
199
|
var _default = exports.default = Ribbon;
|
|
@@ -18,10 +18,7 @@ var _lodash = require("lodash");
|
|
|
18
18
|
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
19
19
|
var _utils = require("@luck-design-biz/base/utils");
|
|
20
20
|
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
|
21
|
-
var
|
|
22
|
-
var _FullScreenEditor = _interopRequireDefault(require("./code-editor/FullScreenEditor"));
|
|
23
|
-
var _JSEditor = _interopRequireDefault(require("./code-editor/JSEditor"));
|
|
24
|
-
var _ActionBindModal = _interopRequireDefault(require("./ActionBindModal"));
|
|
21
|
+
var _JSEditor = _interopRequireDefault(require("../panel-section/JSEditor"));
|
|
25
22
|
var _constants = require("../../constants");
|
|
26
23
|
var _excluded = ["events"],
|
|
27
24
|
_excluded2 = ["events"],
|
|
@@ -31,14 +28,15 @@ var _I18N_PREFIX_ = 'luckda.lowcode.painter.advancePanel';
|
|
|
31
28
|
var EventItem = _styledComponents.default.div.withConfig({
|
|
32
29
|
displayName: "EventItem",
|
|
33
30
|
componentId: "luckda-6530__sc-6426fo-0"
|
|
34
|
-
})(["display:flex;align-items:center;justify-content:space-between;padding:4px 8px;border:1px solid #e5e6e8;border-radius:6px;margin-bottom:6px;font-size:12px;i{color:
|
|
31
|
+
})(["display:flex;align-items:center;justify-content:space-between;padding:4px 8px;border:1px solid #e5e6e8;border-radius:6px;margin-bottom:6px;font-size:12px;i{color:var(--ant-text-color);cursor:pointer;}i:not(:last-child){margin-right:6px;}"]);
|
|
35
32
|
var _DEFAULT_FUNC_ = 'function isTrue() {\n return true; \n}';
|
|
36
33
|
var AdvancePanel = function AdvancePanel(_ref) {
|
|
37
|
-
var _value$render2;
|
|
34
|
+
var _value$render2, _Map$get;
|
|
38
35
|
var meta = _ref.meta,
|
|
39
36
|
nodeId = _ref.nodeId,
|
|
40
37
|
target = _ref.target,
|
|
41
38
|
onChange = _ref.onChange;
|
|
39
|
+
var jseditorTrigger = (0, _react.useRef)(null);
|
|
42
40
|
var value = (0, _ContextProvider.useGet)((0, _lodash.isNil)(target) ? {
|
|
43
41
|
id: nodeId,
|
|
44
42
|
path: 'props.advance'
|
|
@@ -46,7 +44,6 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
46
44
|
id: target.ancestorId,
|
|
47
45
|
path: "props.".concat(target.keyPath, ".advance")
|
|
48
46
|
});
|
|
49
|
-
var editorRef = (0, _react.useRef)();
|
|
50
47
|
var _useState = (0, _react.useState)((value === null || value === void 0 ? void 0 : value.events) || {}),
|
|
51
48
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
52
49
|
events = _useState2[0],
|
|
@@ -64,6 +61,7 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
64
61
|
setEvent((0, _objectSpread3.default)((0, _objectSpread3.default)({}, payload), {}, {
|
|
65
62
|
actionPool: null
|
|
66
63
|
}));
|
|
64
|
+
jseditorTrigger.current.show();
|
|
67
65
|
});
|
|
68
66
|
var handleDeleteEvent = (0, _ahooks.useMemoizedFn)(function (ek) {
|
|
69
67
|
var _ref2 = value || {},
|
|
@@ -75,25 +73,29 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
75
73
|
events: _events
|
|
76
74
|
}));
|
|
77
75
|
});
|
|
78
|
-
var handleComfirm = (0, _ahooks.useMemoizedFn)(function (
|
|
76
|
+
var handleComfirm = (0, _ahooks.useMemoizedFn)(function (_code) {
|
|
79
77
|
var _ref3 = value || {},
|
|
80
78
|
events = _ref3.events,
|
|
81
79
|
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
82
|
-
var _events = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, events), {}, (0, _defineProperty2.default)({}, event.key,
|
|
80
|
+
var _events = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, events), {}, (0, _defineProperty2.default)({}, event.key, [['coding', {
|
|
81
|
+
category: 'custom',
|
|
82
|
+
key: 'coding',
|
|
83
|
+
code: _code
|
|
84
|
+
}]]));
|
|
83
85
|
setEvents(_events);
|
|
86
|
+
setEvent(null);
|
|
84
87
|
onChange((0, _objectSpread3.default)((0, _objectSpread3.default)({}, rest), {}, {
|
|
85
88
|
events: _events
|
|
86
89
|
}));
|
|
87
90
|
});
|
|
88
|
-
var handleRenderComfirm = (0, _ahooks.useMemoizedFn)(function () {
|
|
89
|
-
var val = editorRef.current.editor.getValue();
|
|
91
|
+
var handleRenderComfirm = (0, _ahooks.useMemoizedFn)(function (_code) {
|
|
90
92
|
var _ref4 = value || {},
|
|
91
93
|
render = _ref4.render,
|
|
92
94
|
rest = (0, _objectWithoutProperties2.default)(_ref4, _excluded3);
|
|
93
95
|
onChange((0, _objectSpread3.default)((0, _objectSpread3.default)({}, rest), {}, {
|
|
94
96
|
render: {
|
|
95
97
|
value: (0, _lodash.isNil)(render === null || render === void 0 ? void 0 : render.value) ? true : render.value,
|
|
96
|
-
code:
|
|
98
|
+
code: _code
|
|
97
99
|
}
|
|
98
100
|
}));
|
|
99
101
|
});
|
|
@@ -115,14 +117,14 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
115
117
|
style: {
|
|
116
118
|
fontSize: 12
|
|
117
119
|
}
|
|
118
|
-
}, (0, _lodash.reduce)((_meta$advance2 = meta.advance) === null || _meta$advance2 === void 0 ? void 0 : _meta$advance2.events, function (ret,
|
|
120
|
+
}, (0, _lodash.reduce)((_meta$advance2 = meta.advance) === null || _meta$advance2 === void 0 ? void 0 : _meta$advance2.events, function (ret, e) {
|
|
119
121
|
var _value$events;
|
|
120
|
-
if (!(value !== null && value !== void 0 && (_value$events = value.events) !== null && _value$events !== void 0 && _value$events[
|
|
122
|
+
if (!(value !== null && value !== void 0 && (_value$events = value.events) !== null && _value$events !== void 0 && _value$events[e.key])) {
|
|
121
123
|
ret.push( /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
122
|
-
key:
|
|
123
|
-
payload:
|
|
124
|
+
key: e.key,
|
|
125
|
+
payload: e
|
|
124
126
|
}, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
125
|
-
title:
|
|
127
|
+
title: e.desc || e.name,
|
|
126
128
|
placement: "left",
|
|
127
129
|
getPopupContainer: function getPopupContainer() {
|
|
128
130
|
return document.getElementById('lc-design-workspace');
|
|
@@ -132,7 +134,7 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
132
134
|
width: '100%',
|
|
133
135
|
fontSize: 12
|
|
134
136
|
}
|
|
135
|
-
},
|
|
137
|
+
}, e.name))));
|
|
136
138
|
}
|
|
137
139
|
return ret;
|
|
138
140
|
}, []));
|
|
@@ -149,16 +151,9 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
149
151
|
suppressIcon: true,
|
|
150
152
|
extraRender: function extraRender() {
|
|
151
153
|
var _value$render;
|
|
152
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
ref: editorRef,
|
|
156
|
-
EditorComponent: _JSEditor.default,
|
|
157
|
-
width: "600px",
|
|
158
|
-
height: "400px"
|
|
159
|
-
}, (value === null || value === void 0 || (_value$render = value.render) === null || _value$render === void 0 ? void 0 : _value$render.code) || _DEFAULT_FUNC_),
|
|
160
|
-
showBtn: true,
|
|
161
|
-
onConfirm: handleRenderComfirm
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
155
|
+
defaultCode: (value === null || value === void 0 || (_value$render = value.render) === null || _value$render === void 0 ? void 0 : _value$render.code) || _DEFAULT_FUNC_,
|
|
156
|
+
onChange: handleRenderComfirm
|
|
162
157
|
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
163
158
|
type: "code"
|
|
164
159
|
}));
|
|
@@ -186,9 +181,10 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
186
181
|
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
187
182
|
type: "edit",
|
|
188
183
|
onClick: function onClick() {
|
|
189
|
-
|
|
184
|
+
setEvent((0, _objectSpread3.default)((0, _objectSpread3.default)({}, metaMap[ek]), {}, {
|
|
190
185
|
actionPool: events[ek]
|
|
191
186
|
}));
|
|
187
|
+
jseditorTrigger.current.show();
|
|
192
188
|
}
|
|
193
189
|
})), /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
194
190
|
title: (0, _utils.formatMessage)({
|
|
@@ -213,13 +209,10 @@ var AdvancePanel = function AdvancePanel(_ref) {
|
|
|
213
209
|
}, (0, _utils.formatMessage)({
|
|
214
210
|
id: "".concat(_I18N_PREFIX_, ".addEventAction"),
|
|
215
211
|
label: '添加事件动作'
|
|
216
|
-
})))), /*#__PURE__*/_react.default.createElement(
|
|
217
|
-
|
|
218
|
-
event: event,
|
|
219
|
-
|
|
220
|
-
onClose: function onClose() {
|
|
221
|
-
return setEvent(null);
|
|
222
|
-
}
|
|
212
|
+
})))), /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
213
|
+
trigger: jseditorTrigger,
|
|
214
|
+
defaultCode: ((_Map$get = new Map(event === null || event === void 0 ? void 0 : event.actionPool).get('coding')) === null || _Map$get === void 0 ? void 0 : _Map$get.code) || (event === null || event === void 0 ? void 0 : event.func),
|
|
215
|
+
onChange: handleComfirm
|
|
223
216
|
}));
|
|
224
217
|
};
|
|
225
218
|
var _default = exports.default = AdvancePanel;
|