@luck-design-biz/luckda 0.0.25-1 → 0.0.25-11
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 +37 -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 +47 -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 +11 -4
- 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 +119 -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 +35 -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 +27 -12
- 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 +8 -9
- 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 +37 -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 +48 -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 +11 -4
- 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 +119 -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 +35 -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 +26 -11
- 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 +8 -9
- 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 +175 -171
- 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,10 +1,13 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
6
|
import React, { useState } from 'react';
|
|
4
|
-
import { useRequest, useMemoizedFn } from 'ahooks';
|
|
5
|
-
import { Spin, Input, Segmented, Switch, Tooltip, Icon, Radio } from 'luck-design/antd';
|
|
7
|
+
import { useRequest, useMemoizedFn, useCreation } from 'ahooks';
|
|
8
|
+
import { Spin, Input, Segmented, Switch, Tooltip, Icon, Radio, Modal } from 'luck-design/antd';
|
|
6
9
|
import styled from 'styled-components';
|
|
7
|
-
import { isArray } from 'lodash';
|
|
10
|
+
import { isArray, keyBy, isNil, groupBy } from 'lodash';
|
|
8
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
9
12
|
import Collapse from "../../components/Collapse";
|
|
10
13
|
import PanelItem from "../../components/PanelItem";
|
|
@@ -13,6 +16,7 @@ import WidthHeight from "../../panel-section/WidthHeight";
|
|
|
13
16
|
import FieldAttrsModal from "./FieldAttrsModal";
|
|
14
17
|
import FieldRulesModal from "./FieldRulesModal";
|
|
15
18
|
import { fetchFieldCondition, fetchAttrs } from "../../../constants/api-url";
|
|
19
|
+
import { getFrontRules } from "./meta/frontRules";
|
|
16
20
|
import { FIELD_SCOPES } from "../../../constants";
|
|
17
21
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
18
22
|
var _ALIGN_OPTIONS_ = [{
|
|
@@ -62,6 +66,10 @@ var DefaultValueWrapper = styled.span.withConfig({
|
|
|
62
66
|
displayName: "DefaultValueWrapper",
|
|
63
67
|
componentId: "luckda-6530__sc-1n41f3z-1"
|
|
64
68
|
})(["color:var(--ant-primary-color);font-size:12px;padding:0 16px;display:inline-block;cursor:pointer;"]);
|
|
69
|
+
var StyledRadio = styled(Radio.Group).withConfig({
|
|
70
|
+
displayName: "StyledRadio",
|
|
71
|
+
componentId: "luckda-6530__sc-1n41f3z-2"
|
|
72
|
+
})(["span.ant-radio + *{padding-left:4px;padding-right:4px;}"]);
|
|
65
73
|
var SettingUI = function SettingUI(_ref) {
|
|
66
74
|
var loading = _ref.loading,
|
|
67
75
|
data = _ref.data,
|
|
@@ -96,12 +104,16 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
96
104
|
setRules = _useState6[1];
|
|
97
105
|
var _useState7 = useState(null),
|
|
98
106
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
frontRules = _useState8[0],
|
|
108
|
+
setFrontRules = _useState8[1];
|
|
101
109
|
var _useState9 = useState(null),
|
|
102
110
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
condition = _useState10[0],
|
|
112
|
+
setCondition = _useState10[1];
|
|
113
|
+
var _useState11 = useState(null),
|
|
114
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
115
|
+
optionalFields = _useState12[0],
|
|
116
|
+
setOptionalFields = _useState12[1];
|
|
105
117
|
var fieldData = isBatch ? {} : data;
|
|
106
118
|
var _useRequest = useRequest(fetchFieldCondition, {
|
|
107
119
|
defaultParams: [{
|
|
@@ -127,20 +139,37 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
127
139
|
}],
|
|
128
140
|
ready: !isBatch,
|
|
129
141
|
refreshDeps: [fieldData.datasetFieldUid],
|
|
130
|
-
onSuccess: function onSuccess(_ref4) {
|
|
142
|
+
onSuccess: function onSuccess(_ref4, _ref5) {
|
|
131
143
|
var code = _ref4.code,
|
|
132
144
|
list = _ref4.list,
|
|
133
145
|
detail = _ref4.detail;
|
|
146
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
|
147
|
+
verifyScope = _ref6[0].verifyScope;
|
|
134
148
|
if (code === 1) {
|
|
135
149
|
var _detail$list$;
|
|
136
|
-
|
|
150
|
+
var _data = (_detail$list$ = detail[list[0]]) === null || _detail$list$ === void 0 ? void 0 : _detail$list$.ccmModuleFieldVerifies;
|
|
151
|
+
if (isNil(verifyScope)) {
|
|
152
|
+
var dataByGroup = groupBy(_data, 'verifyScope');
|
|
153
|
+
setRules(dataByGroup[1]);
|
|
154
|
+
setFrontRules(dataByGroup[0]);
|
|
155
|
+
} else if (verifyScope === 0) setFrontRules(_data);else if (verifyScope === 1) setRules(_data);
|
|
137
156
|
}
|
|
138
157
|
}
|
|
139
158
|
}),
|
|
159
|
+
rulesParams = _useRequest2.params,
|
|
140
160
|
rulesLoading = _useRequest2.loading,
|
|
141
|
-
|
|
142
|
-
var
|
|
143
|
-
|
|
161
|
+
rulesRun = _useRequest2.run;
|
|
162
|
+
var rulesRefresh = function rulesRefresh() {
|
|
163
|
+
var newParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
164
|
+
return rulesRun(_objectSpread(_objectSpread({}, rulesParams[0]), newParams));
|
|
165
|
+
};
|
|
166
|
+
var propertyRules = useCreation(function () {
|
|
167
|
+
return keyBy(getFrontRules(fieldData.property), 'key');
|
|
168
|
+
}, [fieldData]);
|
|
169
|
+
var handleFieldRulesModalClose = useMemoizedFn(function (success, verifyScope) {
|
|
170
|
+
success && rulesRefresh({
|
|
171
|
+
verifyScope: verifyScope
|
|
172
|
+
});
|
|
144
173
|
setRule(null);
|
|
145
174
|
});
|
|
146
175
|
var renderCodeIcon = useMemoizedFn(function (_stateItem, _scope) {
|
|
@@ -166,6 +195,55 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
166
195
|
}
|
|
167
196
|
})));
|
|
168
197
|
});
|
|
198
|
+
var handleDelete = useMemoizedFn( /*#__PURE__*/function () {
|
|
199
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(uid, verifyScope) {
|
|
200
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
201
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
202
|
+
case 0:
|
|
203
|
+
Modal.confirm({
|
|
204
|
+
title: formatMessage({
|
|
205
|
+
id: 'luckda.lowcode.painter.delete.tip',
|
|
206
|
+
label: '确定删除吗?'
|
|
207
|
+
}),
|
|
208
|
+
getContainer: function getContainer() {
|
|
209
|
+
return document.getElementById('lc-design-workspace');
|
|
210
|
+
},
|
|
211
|
+
zIndex: 1001,
|
|
212
|
+
onOk: function () {
|
|
213
|
+
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
214
|
+
var success;
|
|
215
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
216
|
+
while (1) switch (_context.prev = _context.next) {
|
|
217
|
+
case 0:
|
|
218
|
+
_context.next = 2;
|
|
219
|
+
return run('delRule', uid);
|
|
220
|
+
case 2:
|
|
221
|
+
success = _context.sent;
|
|
222
|
+
if (success) rulesRefresh({
|
|
223
|
+
verifyScope: verifyScope
|
|
224
|
+
});
|
|
225
|
+
case 4:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context.stop();
|
|
228
|
+
}
|
|
229
|
+
}, _callee);
|
|
230
|
+
}));
|
|
231
|
+
function onOk() {
|
|
232
|
+
return _onOk.apply(this, arguments);
|
|
233
|
+
}
|
|
234
|
+
return onOk;
|
|
235
|
+
}()
|
|
236
|
+
});
|
|
237
|
+
case 1:
|
|
238
|
+
case "end":
|
|
239
|
+
return _context2.stop();
|
|
240
|
+
}
|
|
241
|
+
}, _callee2);
|
|
242
|
+
}));
|
|
243
|
+
return function (_x, _x2) {
|
|
244
|
+
return _ref7.apply(this, arguments);
|
|
245
|
+
};
|
|
246
|
+
}());
|
|
169
247
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
170
248
|
spinning: _loading || loading || rulesLoading
|
|
171
249
|
}, !isBatch ? /*#__PURE__*/React.createElement(PanelItem, {
|
|
@@ -179,7 +257,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
179
257
|
onChange: function onChange(e) {
|
|
180
258
|
return onAliasChange(fieldData, e.target.value);
|
|
181
259
|
}
|
|
182
|
-
})) : null,
|
|
260
|
+
})) : null, ['table', 'tableForm'].includes(component) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PanelItem, {
|
|
183
261
|
label: formatMessage({
|
|
184
262
|
id: "".concat(_I18N_PREFIX_, ".width"),
|
|
185
263
|
label: '列宽'
|
|
@@ -243,8 +321,11 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
243
321
|
id: "".concat(_I18N_PREFIX_, ".fieldColumn"),
|
|
244
322
|
label: '占列数'
|
|
245
323
|
})
|
|
246
|
-
}, /*#__PURE__*/React.createElement(
|
|
247
|
-
|
|
324
|
+
}, /*#__PURE__*/React.createElement(StyledRadio, {
|
|
325
|
+
defaultValue: fieldData.col,
|
|
326
|
+
onChange: function onChange(e) {
|
|
327
|
+
return run('col', e.target.value);
|
|
328
|
+
}
|
|
248
329
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
249
330
|
value: 1
|
|
250
331
|
}, "1"), /*#__PURE__*/React.createElement(Radio, {
|
|
@@ -258,8 +339,11 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
258
339
|
id: "".concat(_I18N_PREFIX_, ".fieldRow"),
|
|
259
340
|
label: '占行数'
|
|
260
341
|
})
|
|
261
|
-
}, /*#__PURE__*/React.createElement(
|
|
262
|
-
|
|
342
|
+
}, /*#__PURE__*/React.createElement(StyledRadio, {
|
|
343
|
+
defaultValue: fieldData.row,
|
|
344
|
+
onChange: function onChange(e) {
|
|
345
|
+
return run('row', e.target.value);
|
|
346
|
+
}
|
|
263
347
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
264
348
|
value: 1
|
|
265
349
|
}, "1"), /*#__PURE__*/React.createElement(Radio, {
|
|
@@ -274,7 +358,10 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
274
358
|
label: '字段注释'
|
|
275
359
|
})
|
|
276
360
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
277
|
-
defaultValue:
|
|
361
|
+
defaultValue: fieldData.note,
|
|
362
|
+
onChange: function onChange(e) {
|
|
363
|
+
return runDebounce('note', e.target.value);
|
|
364
|
+
},
|
|
278
365
|
size: "small"
|
|
279
366
|
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
280
367
|
label: formatMessage({
|
|
@@ -282,7 +369,10 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
282
369
|
label: '长说明'
|
|
283
370
|
})
|
|
284
371
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
285
|
-
defaultValue:
|
|
372
|
+
defaultValue: fieldData.tip,
|
|
373
|
+
onChange: function onChange(e) {
|
|
374
|
+
return runDebounce('tip', e.target.value);
|
|
375
|
+
},
|
|
286
376
|
size: "small"
|
|
287
377
|
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
288
378
|
label: formatMessage({
|
|
@@ -290,7 +380,10 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
290
380
|
label: '默认提示'
|
|
291
381
|
})
|
|
292
382
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
293
|
-
defaultValue:
|
|
383
|
+
defaultValue: fieldData.placeholder,
|
|
384
|
+
onChange: function onChange(e) {
|
|
385
|
+
return runDebounce('placeholder', e.target.value);
|
|
386
|
+
},
|
|
294
387
|
size: "small"
|
|
295
388
|
}))), !isBatch ? /*#__PURE__*/React.createElement(PanelItem, {
|
|
296
389
|
label: formatMessage({
|
|
@@ -308,15 +401,15 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
308
401
|
id: "".concat(_I18N_PREFIX_, ".required"),
|
|
309
402
|
label: '是否必填'
|
|
310
403
|
})
|
|
311
|
-
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), 'table'
|
|
404
|
+
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes && /*#__PURE__*/React.createElement(PanelItem, {
|
|
312
405
|
label: formatMessage({
|
|
313
|
-
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
314
|
-
label: '
|
|
406
|
+
id: "".concat(_I18N_PREFIX_, ".table.display"),
|
|
407
|
+
label: '表格中显示'
|
|
315
408
|
})
|
|
316
|
-
}, renderCodeIcon(fieldTable, FIELD_SCOPES.FIELD_TABLE_DISPLAY)), 'form'
|
|
409
|
+
}, renderCodeIcon(fieldTable, FIELD_SCOPES.FIELD_TABLE_DISPLAY)), ['form', 'tableForm'].includes(component) && /*#__PURE__*/React.createElement(PanelItem, {
|
|
317
410
|
label: formatMessage({
|
|
318
|
-
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
319
|
-
label: '
|
|
411
|
+
id: "".concat(_I18N_PREFIX_, ".form.display"),
|
|
412
|
+
label: '表单中显示'
|
|
320
413
|
})
|
|
321
414
|
}, renderCodeIcon(fieldForm, FIELD_SCOPES.FIELD_FORM_DISPLAY)), /*#__PURE__*/React.createElement(PanelItem, {
|
|
322
415
|
label: formatMessage({
|
|
@@ -343,7 +436,61 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
343
436
|
}), "\n \u3010").concat(fieldDefaultValue.expression, "\u3011") : formatMessage({
|
|
344
437
|
id: 'luckda.lowcode.painter.setting',
|
|
345
438
|
label: '设置'
|
|
346
|
-
}))) : null, !isBatch ? /*#__PURE__*/React.createElement(Collapse, {
|
|
439
|
+
}))) : null, !isBatch ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Collapse, {
|
|
440
|
+
label: formatMessage({
|
|
441
|
+
id: "".concat(_I18N_PREFIX_, ".rules.front"),
|
|
442
|
+
label: '前端校验规则'
|
|
443
|
+
}),
|
|
444
|
+
bodyStyle: {
|
|
445
|
+
padding: '12px 16px'
|
|
446
|
+
}
|
|
447
|
+
}, /*#__PURE__*/React.createElement(ListEditor, {
|
|
448
|
+
addText: formatMessage({
|
|
449
|
+
id: "".concat(_I18N_PREFIX_, ".addRules"),
|
|
450
|
+
label: '添加校验规则'
|
|
451
|
+
}),
|
|
452
|
+
handleAdd: function handleAdd() {
|
|
453
|
+
return setRule({
|
|
454
|
+
ruleType: 'front'
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}, frontRules === null || frontRules === void 0 ? void 0 : frontRules.map(function (_rule) {
|
|
458
|
+
return /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
459
|
+
left: /*#__PURE__*/React.createElement("span", null, propertyRules[_rule.verifyType].label),
|
|
460
|
+
right: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
461
|
+
title: formatMessage({
|
|
462
|
+
id: 'luckda.lowcode.painter.edit',
|
|
463
|
+
label: '编辑'
|
|
464
|
+
})
|
|
465
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
466
|
+
type: "edit",
|
|
467
|
+
style: {
|
|
468
|
+
marginRight: '8px',
|
|
469
|
+
cursor: 'pointer'
|
|
470
|
+
},
|
|
471
|
+
onClick: function onClick() {
|
|
472
|
+
return setRule(_objectSpread(_objectSpread({}, _rule), {}, {
|
|
473
|
+
ruleType: 'front'
|
|
474
|
+
}));
|
|
475
|
+
}
|
|
476
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
477
|
+
title: formatMessage({
|
|
478
|
+
id: 'luckda.lowcode.painter.delete',
|
|
479
|
+
label: '删除'
|
|
480
|
+
})
|
|
481
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
482
|
+
type: "delete",
|
|
483
|
+
style: {
|
|
484
|
+
cursor: 'pointer'
|
|
485
|
+
},
|
|
486
|
+
onClick: function onClick() {
|
|
487
|
+
return handleDelete(_rule.uid, 0);
|
|
488
|
+
}
|
|
489
|
+
}))),
|
|
490
|
+
item: _rule,
|
|
491
|
+
sortable: false
|
|
492
|
+
});
|
|
493
|
+
}))), /*#__PURE__*/React.createElement(Collapse, {
|
|
347
494
|
label: formatMessage({
|
|
348
495
|
id: "".concat(_I18N_PREFIX_, ".rules"),
|
|
349
496
|
label: '校验规则'
|
|
@@ -357,7 +504,9 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
357
504
|
label: '添加校验规则'
|
|
358
505
|
}),
|
|
359
506
|
handleAdd: function handleAdd() {
|
|
360
|
-
return setRule({
|
|
507
|
+
return setRule({
|
|
508
|
+
ruleType: 'back'
|
|
509
|
+
});
|
|
361
510
|
}
|
|
362
511
|
}, rules === null || rules === void 0 ? void 0 : rules.map(function (_rule) {
|
|
363
512
|
return /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
@@ -374,7 +523,9 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
374
523
|
cursor: 'pointer'
|
|
375
524
|
},
|
|
376
525
|
onClick: function onClick() {
|
|
377
|
-
return setRule(_rule)
|
|
526
|
+
return setRule(_objectSpread(_objectSpread({}, _rule), {}, {
|
|
527
|
+
ruleType: 'back'
|
|
528
|
+
}));
|
|
378
529
|
}
|
|
379
530
|
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
380
531
|
title: formatMessage({
|
|
@@ -387,13 +538,13 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
387
538
|
cursor: 'pointer'
|
|
388
539
|
},
|
|
389
540
|
onClick: function onClick() {
|
|
390
|
-
return
|
|
541
|
+
return handleDelete(_rule.uid, 1);
|
|
391
542
|
}
|
|
392
543
|
}))),
|
|
393
544
|
item: _rule,
|
|
394
545
|
sortable: false
|
|
395
546
|
});
|
|
396
|
-
}))) : null, /*#__PURE__*/React.createElement(FieldAttrsModal, {
|
|
547
|
+
})))) : null, /*#__PURE__*/React.createElement(FieldAttrsModal, {
|
|
397
548
|
dataModelKey: dataModelKey,
|
|
398
549
|
datasetId: datasetId,
|
|
399
550
|
moduleId: moduleId,
|
|
@@ -203,86 +203,65 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
203
203
|
var _useDebounceFn = useDebounceFn(function (key, val) {
|
|
204
204
|
if (key === 'width') {
|
|
205
205
|
handleUIChange(key, val);
|
|
206
|
+
} else if (key === 'note' || key === 'tip' || key === 'placeholder') {
|
|
207
|
+
handleUIChange(key, val);
|
|
206
208
|
}
|
|
207
209
|
}, {
|
|
208
210
|
wait: 400
|
|
209
211
|
}),
|
|
210
212
|
runDebounce = _useDebounceFn.run;
|
|
211
213
|
var run = useMemoizedFn( /*#__PURE__*/function () {
|
|
212
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
213
|
-
var mapping, _stateItem, request, c, d, _yield$request,
|
|
214
|
-
return _regeneratorRuntime().wrap(function
|
|
215
|
-
while (1) switch (
|
|
214
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(key, val) {
|
|
215
|
+
var _yield$fetchDelAttrs, code, mapping, _stateItem, request, c, d, _yield$request, _code;
|
|
216
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
217
|
+
while (1) switch (_context.prev = _context.next) {
|
|
216
218
|
case 0:
|
|
217
219
|
if (!(key === 'isEqual')) {
|
|
218
|
-
|
|
220
|
+
_context.next = 5;
|
|
219
221
|
break;
|
|
220
222
|
}
|
|
221
|
-
|
|
223
|
+
_context.next = 3;
|
|
222
224
|
return runFetchUpdateUniqueField(_defineProperty({
|
|
223
225
|
moduleDatasetUid: datasetId,
|
|
224
226
|
moduleUid: moduleId
|
|
225
227
|
}, val ? 'uniqueFieldUid' : 'noUniqueFieldUid', fieldData.uid));
|
|
226
228
|
case 3:
|
|
227
|
-
|
|
229
|
+
_context.next = 34;
|
|
228
230
|
break;
|
|
229
231
|
case 5:
|
|
230
232
|
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip')) {
|
|
231
|
-
|
|
233
|
+
_context.next = 9;
|
|
232
234
|
break;
|
|
233
235
|
}
|
|
234
236
|
handleUIChange(key, val);
|
|
235
|
-
|
|
237
|
+
_context.next = 34;
|
|
236
238
|
break;
|
|
237
239
|
case 9:
|
|
238
|
-
if (!(key === '
|
|
239
|
-
|
|
240
|
+
if (!(key === 'col' || key === 'row')) {
|
|
241
|
+
_context.next = 13;
|
|
240
242
|
break;
|
|
241
243
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
id: 'luckda.lowcode.painter.delete.tip',
|
|
245
|
-
label: '确定删除吗?'
|
|
246
|
-
}),
|
|
247
|
-
getContainer: function getContainer() {
|
|
248
|
-
return document.getElementById('lc-design-workspace');
|
|
249
|
-
},
|
|
250
|
-
zIndex: 1001,
|
|
251
|
-
onOk: function () {
|
|
252
|
-
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
253
|
-
var _yield$fetchDelAttrs, code;
|
|
254
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
255
|
-
while (1) switch (_context.prev = _context.next) {
|
|
256
|
-
case 0:
|
|
257
|
-
_context.next = 2;
|
|
258
|
-
return fetchDelAttrs({
|
|
259
|
-
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
260
|
-
ccmModuleFieldVerifies: [{
|
|
261
|
-
uid: val
|
|
262
|
-
}],
|
|
263
|
-
scope: FIELD_SCOPES.CHECK_RULES
|
|
264
|
-
});
|
|
265
|
-
case 2:
|
|
266
|
-
_yield$fetchDelAttrs = _context.sent;
|
|
267
|
-
code = _yield$fetchDelAttrs.code;
|
|
268
|
-
if (code === 1) {
|
|
269
|
-
rulesRefresh();
|
|
270
|
-
}
|
|
271
|
-
case 5:
|
|
272
|
-
case "end":
|
|
273
|
-
return _context.stop();
|
|
274
|
-
}
|
|
275
|
-
}, _callee);
|
|
276
|
-
}));
|
|
277
|
-
function onOk() {
|
|
278
|
-
return _onOk.apply(this, arguments);
|
|
279
|
-
}
|
|
280
|
-
return onOk;
|
|
281
|
-
}()
|
|
282
|
-
});
|
|
283
|
-
_context2.next = 26;
|
|
244
|
+
handleUIChange(key, val);
|
|
245
|
+
_context.next = 34;
|
|
284
246
|
break;
|
|
285
247
|
case 13:
|
|
248
|
+
if (!(key === 'delRule')) {
|
|
249
|
+
_context.next = 21;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
_context.next = 16;
|
|
253
|
+
return fetchDelAttrs({
|
|
254
|
+
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
255
|
+
ccmModuleFieldVerifies: [{
|
|
256
|
+
uid: val
|
|
257
|
+
}],
|
|
258
|
+
scope: FIELD_SCOPES.CHECK_RULES
|
|
259
|
+
});
|
|
260
|
+
case 16:
|
|
261
|
+
_yield$fetchDelAttrs = _context.sent;
|
|
262
|
+
code = _yield$fetchDelAttrs.code;
|
|
263
|
+
return _context.abrupt("return", code === 1);
|
|
264
|
+
case 21:
|
|
286
265
|
mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FIELD_SCOPES.FIELD_REQUIRED, {
|
|
287
266
|
key: 'fieldRequired',
|
|
288
267
|
refresh: requiredRefresh
|
|
@@ -318,19 +297,19 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
318
297
|
if (!_stateItem) {
|
|
319
298
|
d.datasetBusinessUids = [fieldData.uid];
|
|
320
299
|
}
|
|
321
|
-
|
|
300
|
+
_context.next = 31;
|
|
322
301
|
return request(d);
|
|
323
|
-
case
|
|
324
|
-
_yield$request =
|
|
325
|
-
|
|
326
|
-
if (
|
|
302
|
+
case 31:
|
|
303
|
+
_yield$request = _context.sent;
|
|
304
|
+
_code = _yield$request.code;
|
|
305
|
+
if (_code === 1) {
|
|
327
306
|
mapping[key].refresh();
|
|
328
307
|
}
|
|
329
|
-
case
|
|
308
|
+
case 34:
|
|
330
309
|
case "end":
|
|
331
|
-
return
|
|
310
|
+
return _context.stop();
|
|
332
311
|
}
|
|
333
|
-
},
|
|
312
|
+
}, _callee);
|
|
334
313
|
}));
|
|
335
314
|
return function (_x, _x2) {
|
|
336
315
|
return _ref8.apply(this, arguments);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export var getFrontRules = function getFrontRules(property) {
|
|
2
|
+
var rules = [];
|
|
3
|
+
switch (property) {
|
|
4
|
+
case 'number':
|
|
5
|
+
case 'money':
|
|
6
|
+
case 'decimal':
|
|
7
|
+
case 'sint':
|
|
8
|
+
rules = [{
|
|
9
|
+
label: '最小值',
|
|
10
|
+
key: 'min',
|
|
11
|
+
defaultCode: "function min(cValue) { \n return 0; // 返回数字 \n}"
|
|
12
|
+
}, {
|
|
13
|
+
label: '最大值',
|
|
14
|
+
key: 'max',
|
|
15
|
+
defaultCode: "function max(cValue) { \n return 100; // 返回数字 \n}"
|
|
16
|
+
}];
|
|
17
|
+
break;
|
|
18
|
+
case 'string':
|
|
19
|
+
rules = [{
|
|
20
|
+
label: '长度',
|
|
21
|
+
key: 'length',
|
|
22
|
+
defaultCode: "function length(cValue) { \n return 100; // 返回数字 \n}"
|
|
23
|
+
}, {
|
|
24
|
+
label: '邮箱',
|
|
25
|
+
key: 'email',
|
|
26
|
+
noCode: true
|
|
27
|
+
}, {
|
|
28
|
+
label: '身份证',
|
|
29
|
+
key: 'idcard',
|
|
30
|
+
noCode: true
|
|
31
|
+
}, {
|
|
32
|
+
label: '手机号码',
|
|
33
|
+
key: 'mobile',
|
|
34
|
+
noCode: true
|
|
35
|
+
}];
|
|
36
|
+
break;
|
|
37
|
+
case 'text':
|
|
38
|
+
rules = [{
|
|
39
|
+
label: '长度',
|
|
40
|
+
key: 'length',
|
|
41
|
+
defaultCode: "function length(cValue) { \n return 100; // 返回数字 \n}"
|
|
42
|
+
}];
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
;
|
|
46
|
+
}
|
|
47
|
+
rules.push({
|
|
48
|
+
label: '自定义',
|
|
49
|
+
key: 'rules',
|
|
50
|
+
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n callback(); \n}"
|
|
51
|
+
});
|
|
52
|
+
return rules;
|
|
53
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
// import { history } from 'umi';
|
|
5
|
-
// import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
4
|
import EventBusProvider from "../engine/provider/EventBusProvider";
|
|
7
5
|
import ContextProvider from "../engine/provider/ContextProvider";
|
|
8
6
|
import Ribbon from "./Ribbon";
|
|
@@ -10,35 +8,10 @@ import Design from "./Design";
|
|
|
10
8
|
import Panel from "./Panel";
|
|
11
9
|
import { RUNTIME } from "../constants/index";
|
|
12
10
|
import styles from "./style/index.less";
|
|
13
|
-
import { DndContext } from '@dnd-kit/core';
|
|
14
11
|
import DragDropContext from "./components/DragDrop/DragDropContext";
|
|
15
12
|
var Painter = function Painter(_ref) {
|
|
16
13
|
var className = _ref.className,
|
|
17
14
|
code = _ref.code;
|
|
18
|
-
// 修改后刷新提示功能,暂时关掉,等待提供数据对比进行判断
|
|
19
|
-
// useEffect(() => {
|
|
20
|
-
// const handleBeforeUnload = (event) => {
|
|
21
|
-
// event.preventDefault();
|
|
22
|
-
// event.returnValue = null;
|
|
23
|
-
// return null;
|
|
24
|
-
// };
|
|
25
|
-
|
|
26
|
-
// window.addEventListener('beforeunload', handleBeforeUnload);
|
|
27
|
-
|
|
28
|
-
// const unblock = history.block(() =>
|
|
29
|
-
// confirm(`${formatMessage({
|
|
30
|
-
// id: 'app.base.operate.comfire.reload', label: '重新加载此网站?'
|
|
31
|
-
// })}\n${formatMessage({
|
|
32
|
-
// id: 'app.base.operate.comfire.message.reload', label: '系统可能不会保存您所做的更改。'
|
|
33
|
-
// })}`)
|
|
34
|
-
// );
|
|
35
|
-
|
|
36
|
-
// return () => {
|
|
37
|
-
// unblock();
|
|
38
|
-
// window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
39
|
-
// };
|
|
40
|
-
// }, []);
|
|
41
|
-
|
|
42
15
|
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
43
16
|
runtime: RUNTIME.DESIGN
|
|
44
17
|
}, /*#__PURE__*/React.createElement(ContextProvider, {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["blockId", "onChange"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useMemoizedFn } from 'ahooks';
|
|
6
|
+
import WidthHeight from "./WidthHeight";
|
|
7
|
+
import { useContext } from "../../engine/provider/ContextProvider";
|
|
8
|
+
var ActionsColumnWidth = function ActionsColumnWidth(_ref) {
|
|
9
|
+
var blockId = _ref.blockId,
|
|
10
|
+
onChange = _ref.onChange,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
var ctx = useContext();
|
|
13
|
+
var handleChange = useMemoizedFn(function (value) {
|
|
14
|
+
var _ctx$componentMap$get2;
|
|
15
|
+
var _ctx$componentMap$get = (_ctx$componentMap$get2 = ctx.componentMap.get(props.nodeId)) === null || _ctx$componentMap$get2 === void 0 ? void 0 : _ctx$componentMap$get2.api.getForm().getFormRef(blockId).formRef.current,
|
|
16
|
+
gridApi = _ctx$componentMap$get.gridApi;
|
|
17
|
+
var col = gridApi.columnApi.getColumn('luck-actions');
|
|
18
|
+
gridApi.columnApi.setColumnWidth(col, value || 160);
|
|
19
|
+
onChange && onChange(value);
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/React.createElement(WidthHeight, _extends({
|
|
22
|
+
onChange: handleChange
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
export default ActionsColumnWidth;
|
|
@@ -3,18 +3,21 @@ import { useMemoizedFn } from 'ahooks';
|
|
|
3
3
|
import { Icon } from 'luck-design/antd';
|
|
4
4
|
var BlockEditor = function BlockEditor(_ref) {
|
|
5
5
|
var blockName = _ref.blockName,
|
|
6
|
+
blockId = _ref.blockId,
|
|
6
7
|
next = _ref.next;
|
|
7
8
|
var handleClick = useMemoizedFn(function (e) {
|
|
8
9
|
e.stopPropagation();
|
|
9
|
-
next(
|
|
10
|
+
next && next({
|
|
11
|
+
blockId: blockId
|
|
12
|
+
});
|
|
10
13
|
});
|
|
11
14
|
return /*#__PURE__*/React.createElement("span", {
|
|
12
15
|
onClick: handleClick,
|
|
13
|
-
style: {
|
|
16
|
+
style: next ? {
|
|
14
17
|
color: 'var(--ant-primary-color)',
|
|
15
18
|
cursor: 'pointer'
|
|
16
|
-
}
|
|
17
|
-
}, blockName, /*#__PURE__*/React.createElement(Icon, {
|
|
19
|
+
} : {}
|
|
20
|
+
}, blockName || blockId, next && /*#__PURE__*/React.createElement(Icon, {
|
|
18
21
|
type: "setting",
|
|
19
22
|
style: {
|
|
20
23
|
marginLeft: 4
|