@zat-design/sisyphus-react 4.0.0-beta.2 → 4.0.0-beta.3
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/FormsProvider/index.js +4 -2
- package/es/ProAction/components/CheckModalContent/index.js +9 -8
- package/es/ProAction/index.js +77 -75
- package/es/ProConfigProvider/index.js +17 -12
- package/es/ProDownload/index.js +89 -94
- package/es/ProDownload/utils.js +59 -50
- package/es/ProDrawerForm/components/ProDrawer/index.js +79 -72
- package/es/ProDrawerForm/components/ProModal/index.js +62 -60
- package/es/ProDrawerForm/components/index.js +2 -2
- package/es/ProDrawerForm/index.js +13 -11
- package/es/ProEditLabel/components/RenderProForm.js +25 -21
- package/es/ProEditLabel/index.js +54 -46
- package/es/ProEditTable/components/ActionButton/index.js +31 -23
- package/es/ProEditTable/components/RcTable/BaseTable.js +16 -15
- package/es/ProEditTable/components/RcTable/DraggableTable.js +19 -18
- package/es/ProEditTable/components/RcTable/index.js +2 -2
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +27 -17
- package/es/ProEditTable/components/RenderField/index.js +176 -145
- package/es/ProEditTable/components/RenderToolbar/index.js +26 -24
- package/es/ProEditTable/components/Summary/index.js +13 -11
- package/es/ProEditTable/components/Validator/index.js +6 -5
- package/es/ProEditTable/components/index.js +5 -5
- package/es/ProEditTable/index.d.ts +1 -1
- package/es/ProEditTable/index.js +96 -80
- package/es/ProEditTable/utils/config.js +44 -37
- package/es/ProEditTable/utils/diffOriginal.js +8 -6
- package/es/ProEditTable/utils/getDefaultProps.js +8 -8
- package/es/ProEditTable/utils/index.js +86 -73
- package/es/ProEditTable/utils/tools.js +166 -157
- package/es/ProEditTable/utils/useEditTableError.js +17 -6
- package/es/ProEnum/components/Group.js +6 -6
- package/es/ProEnum/components/Tag.js +8 -6
- package/es/ProEnum/hooks/useEnum.js +26 -4
- package/es/ProEnum/hooks/useEnumRequest.js +59 -54
- package/es/ProEnum/index.js +48 -49
- package/es/ProEnum/utils/eventCenter.js +6 -4
- package/es/ProEnum/utils/getEnumLabel.js +9 -10
- package/es/ProEnum/utils/index.js +10 -5
- package/es/ProForm/components/Container.js +7 -5
- package/es/ProForm/components/FormFooter/index.js +10 -8
- package/es/ProForm/components/base/Checkbox/index.js +11 -8
- package/es/ProForm/components/base/DatePicker/index.js +21 -19
- package/es/ProForm/components/base/Input/index.js +17 -15
- package/es/ProForm/components/base/InputNumber/index.js +42 -38
- package/es/ProForm/components/base/Radio/index.js +10 -8
- package/es/ProForm/components/base/RangePicker/index.js +20 -20
- package/es/ProForm/components/base/Select/index.js +12 -10
- package/es/ProForm/components/base/Switch/index.js +12 -11
- package/es/ProForm/components/base/SwitchCheckbox/index.js +15 -14
- package/es/ProForm/components/base/TextArea/index.js +12 -11
- package/es/ProForm/components/base/TimePicker/index.js +7 -6
- package/es/ProForm/components/combination/Container/index.js +14 -12
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +45 -42
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +14 -13
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +6 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +30 -27
- package/es/ProForm/components/combination/FormList/components/LineFields.js +12 -11
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +31 -29
- package/es/ProForm/components/combination/FormList/index.js +22 -21
- package/es/ProForm/components/combination/FormList/utils.js +5 -3
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
- package/es/ProForm/components/combination/Group/component/ComRender.js +19 -15
- package/es/ProForm/components/combination/Group/hooks/index.js +19 -16
- package/es/ProForm/components/combination/Group/index.js +19 -18
- package/es/ProForm/components/combination/Group/utils.js +22 -14
- package/es/ProForm/components/combination/ProCascader/index.js +53 -51
- package/es/ProForm/components/combination/ProCascader/utils/index.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +22 -14
- package/es/ProForm/components/combination/ProModalSelect/index.js +153 -135
- package/es/ProForm/components/combination/ProNumberRange/index.js +23 -20
- package/es/ProForm/components/combination/ProRangeLimit/index.js +33 -29
- package/es/ProForm/components/combination/ProTimeLimit/index.js +34 -28
- package/es/ProForm/components/index.d.ts +2 -0
- package/es/ProForm/components/index.js +31 -27
- package/es/ProForm/components/render/ChangedWrapper.js +19 -13
- package/es/ProForm/components/render/ConfirmWrapper.js +35 -35
- package/es/ProForm/components/render/Render.js +93 -71
- package/es/ProForm/components/render/RenderFields.js +42 -27
- package/es/ProForm/components/render/propsType.js +25 -0
- package/es/ProForm/index.js +53 -36
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/propsType.js +5 -1
- package/es/ProForm/utils/diffOriginal.js +9 -7
- package/es/ProForm/utils/getDefaultProps.js +7 -7
- package/es/ProForm/utils/index.js +63 -38
- package/es/ProForm/utils/processDependencies.js +11 -0
- package/es/ProForm/utils/rulesCreator.js +12 -13
- package/es/ProForm/utils/transformNames.js +5 -4
- package/es/ProForm/utils/transformValue.js +11 -6
- package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
- package/es/ProForm/utils/useForm.js +71 -71
- package/es/ProForm/utils/useRules.js +11 -9
- package/es/ProForm/utils/useShouldUpdate.js +29 -27
- package/es/ProForm/utils/useWatch.js +25 -3
- package/es/ProForm/utils/valueType.js +14 -11
- package/es/ProIcon/config/index.js +2 -0
- package/es/ProIcon/index.js +33 -23
- package/es/ProIcon/utils/index.js +4 -5
- package/es/ProLayout/components/Layout/Header/index.js +12 -10
- package/es/ProLayout/components/Layout/Icon/Icon.js +3 -3
- package/es/ProLayout/components/Layout/Icon/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +24 -19
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +30 -25
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +7 -6
- package/es/ProLayout/components/Layout/Menu/index.js +12 -10
- package/es/ProLayout/components/Layout/Notice/index.js +9 -8
- package/es/ProLayout/components/Layout/index.js +4 -4
- package/es/ProLayout/components/ProCollapse/index.js +19 -15
- package/es/ProLayout/components/ProFooter/index.js +3 -3
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +6 -6
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +5 -4
- package/es/ProLayout/components/ProHeader/components/index.js +2 -2
- package/es/ProLayout/components/ProHeader/index.js +87 -75
- package/es/ProLayout/components/index.js +3 -3
- package/es/ProLayout/index.d.ts +1 -1
- package/es/ProLayout/index.js +17 -13
- package/es/ProLayout/utils/index.js +21 -18
- package/es/ProSelect/components/AdaptiveTooltip.js +5 -4
- package/es/ProSelect/index.js +44 -43
- package/es/ProSelect/utils/index.js +5 -4
- package/es/ProStep/components/Anchor/index.d.ts +1 -0
- package/es/ProStep/components/Anchor/index.js +19 -18
- package/es/ProStep/components/Item/index.d.ts +1 -0
- package/es/ProStep/components/Item/index.js +15 -11
- package/es/ProStep/components/Listener/index.js +18 -16
- package/es/ProStep/components/Step/index.js +15 -14
- package/es/ProStep/index.js +74 -62
- package/es/ProStep/utils/index.js +6 -5
- package/es/ProStepTab/index.js +111 -77
- package/es/ProTable/components/FormatColumn/index.js +69 -66
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +3 -3
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +39 -35
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +10 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +5 -5
- package/es/ProTable/components/RcTable/index.js +2 -2
- package/es/ProTable/components/RenderColumn/index.js +30 -26
- package/es/ProTable/components/RenderEmptyText/index.js +7 -6
- package/es/ProTable/components/RenderFooter/index.js +2 -2
- package/es/ProTable/components/RenderSummary/index.js +11 -10
- package/es/ProTable/components/RenderTableHeader/index.js +15 -13
- package/es/ProTable/components/RenderTabs/index.js +7 -6
- package/es/ProTable/components/TableResizable/index.js +9 -8
- package/es/ProTable/components/TooltipTitle/index.js +6 -5
- package/es/ProTable/components/index.js +11 -6
- package/es/ProTable/hooks/useAntdTable.js +54 -47
- package/es/ProTable/index.js +71 -65
- package/es/ProTable/utils/index.js +12 -5
- package/es/ProTabs/components/Card/index.js +12 -11
- package/es/ProTabs/components/index.js +1 -1
- package/es/ProTabs/index.js +9 -8
- package/es/ProThemeTools/component/ProTools/index.js +42 -41
- package/es/ProThemeTools/component/index.js +1 -1
- package/es/ProThemeTools/context/ThemeContext.js +18 -2
- package/es/ProThemeTools/index.js +40 -14
- package/es/ProThemeTools/utils/index.js +9 -0
- package/es/ProTooltip/index.js +24 -22
- package/es/ProTree/components/AdaptiveTooltip.js +4 -4
- package/es/ProTree/components/CloseIcon.js +5 -5
- package/es/ProTree/components/List.js +15 -13
- package/es/ProTree/components/ProTree.js +62 -56
- package/es/ProTree/components/ProTreeSelect/index.js +88 -73
- package/es/ProTree/components/SearchTitle.js +10 -9
- package/es/ProTree/components/Tree.js +53 -52
- package/es/ProTree/components/index.js +4 -4
- package/es/ProTree/index.js +4 -4
- package/es/ProTree/utils.js +21 -14
- package/es/ProTreeModal/components/Cascader.js +23 -21
- package/es/ProTreeModal/components/CloseIcon.js +5 -5
- package/es/ProTreeModal/components/List.js +40 -33
- package/es/ProTreeModal/components/SearchTitle.js +5 -4
- package/es/ProTreeModal/components/SortableItem.js +10 -8
- package/es/ProTreeModal/components/Tree.js +37 -35
- package/es/ProTreeModal/components/Trigger.js +23 -22
- package/es/ProTreeModal/components/index.js +6 -6
- package/es/ProTreeModal/index.js +85 -65
- package/es/ProTreeModal/utils.js +22 -18
- package/es/ProUpload/components/ButtonRender.js +38 -37
- package/es/ProUpload/components/DragRender.js +41 -34
- package/es/ProUpload/components/DraggableUploadListItem.js +3 -2
- package/es/ProUpload/components/Example.js +10 -9
- package/es/ProUpload/components/FileItem.js +47 -42
- package/es/ProUpload/components/ImageRender.js +85 -85
- package/es/ProUpload/index.js +24 -19
- package/es/ProUpload/uitls.js +1 -1
- package/es/ProViewer/index.js +25 -19
- package/es/ProViewer/propsType.js +3 -1
- package/es/ProWaterMark/index.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +38 -29
- package/es/locale/index.js +7 -2
- package/es/tokens.js +1 -0
- package/es/utils/index.js +7 -3
- package/lib/FormsProvider/index.js +53 -29
- package/lib/ProAction/components/CheckModalContent/index.js +27 -33
- package/lib/ProAction/index.js +155 -198
- package/lib/ProAction/propsType.js +16 -4
- package/lib/ProConfigProvider/index.js +139 -121
- package/lib/ProDownload/index.js +123 -194
- package/lib/ProDownload/propsType.js +16 -4
- package/lib/ProDownload/utils.js +145 -179
- package/lib/ProDrawerForm/components/ProDrawer/index.js +169 -236
- package/lib/ProDrawerForm/components/ProModal/index.js +134 -188
- package/lib/ProDrawerForm/components/index.js +39 -17
- package/lib/ProDrawerForm/index.js +86 -70
- package/lib/ProDrawerForm/propsType.js +16 -4
- package/lib/ProDrawerForm/utils/index.js +31 -13
- package/lib/ProEditLabel/components/RenderProForm.js +60 -58
- package/lib/ProEditLabel/index.js +182 -237
- package/lib/ProEditLabel/propsType.js +16 -4
- package/lib/ProEditLabel/utils/index.js +31 -15
- package/lib/ProEditTable/components/ActionButton/index.js +172 -153
- package/lib/ProEditTable/components/RcTable/BaseTable.js +103 -104
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +159 -187
- package/lib/ProEditTable/components/RcTable/index.js +39 -17
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +184 -178
- package/lib/ProEditTable/components/RenderField/index.js +564 -646
- package/lib/ProEditTable/components/RenderToolbar/index.js +105 -125
- package/lib/ProEditTable/components/Summary/index.js +61 -67
- package/lib/ProEditTable/components/Validator/index.js +48 -27
- package/lib/ProEditTable/components/index.js +48 -38
- package/lib/ProEditTable/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +372 -430
- package/lib/ProEditTable/propsType.js +16 -4
- package/lib/ProEditTable/utils/config.js +180 -235
- package/lib/ProEditTable/utils/diffOriginal.js +59 -50
- package/lib/ProEditTable/utils/getDefaultProps.js +44 -29
- package/lib/ProEditTable/utils/index.js +255 -325
- package/lib/ProEditTable/utils/tools.js +252 -436
- package/lib/ProEditTable/utils/transform.js +28 -19
- package/lib/ProEditTable/utils/useEditTableError.js +58 -60
- package/lib/ProEnum/components/Group.js +78 -54
- package/lib/ProEnum/components/Tag.js +55 -40
- package/lib/ProEnum/hooks/useEnum.js +53 -53
- package/lib/ProEnum/hooks/useEnumRequest.js +198 -268
- package/lib/ProEnum/index.js +235 -244
- package/lib/ProEnum/propsType.js +16 -4
- package/lib/ProEnum/utils/eventCenter.js +25 -37
- package/lib/ProEnum/utils/getEnumLabel.js +65 -63
- package/lib/ProEnum/utils/index.js +67 -92
- package/lib/ProForm/components/Container.js +45 -32
- package/lib/ProForm/components/FormFooter/index.js +80 -63
- package/lib/ProForm/components/FormFooter/propsType.js +16 -4
- package/lib/ProForm/components/base/Checkbox/index.js +62 -65
- package/lib/ProForm/components/base/DatePicker/index.js +82 -71
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +31 -16
- package/lib/ProForm/components/base/Input/index.js +73 -61
- package/lib/ProForm/components/base/Input/propsType.js +16 -4
- package/lib/ProForm/components/base/InputNumber/index.js +177 -225
- package/lib/ProForm/components/base/Radio/index.js +69 -59
- package/lib/ProForm/components/base/RangePicker/index.js +90 -77
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +46 -28
- package/lib/ProForm/components/base/Select/index.js +69 -60
- package/lib/ProForm/components/base/Switch/index.js +59 -42
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +63 -62
- package/lib/ProForm/components/base/TextArea/index.js +67 -52
- package/lib/ProForm/components/base/TimePicker/index.js +59 -43
- package/lib/ProForm/components/combination/Container/index.js +77 -62
- package/lib/ProForm/components/combination/Container/propsType.js +16 -4
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +195 -247
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +108 -81
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +44 -25
- package/lib/ProForm/components/combination/FormList/components/Empty.js +55 -92
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +120 -94
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +103 -136
- package/lib/ProForm/components/combination/FormList/index.js +168 -142
- package/lib/ProForm/components/combination/FormList/propsType.js +16 -4
- package/lib/ProForm/components/combination/FormList/utils.js +54 -33
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +38 -21
- package/lib/ProForm/components/combination/Group/component/ComRender.js +74 -76
- package/lib/ProForm/components/combination/Group/hooks/index.js +136 -130
- package/lib/ProForm/components/combination/Group/index.js +114 -106
- package/lib/ProForm/components/combination/Group/propsType.js +16 -4
- package/lib/ProForm/components/combination/Group/utils.js +113 -128
- package/lib/ProForm/components/combination/ProCascader/index.js +192 -248
- package/lib/ProForm/components/combination/ProCascader/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +35 -24
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +121 -114
- package/lib/ProForm/components/combination/ProModalSelect/index.js +491 -660
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +45 -22
- package/lib/ProForm/components/combination/ProNumberRange/index.js +163 -182
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +140 -164
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +49 -28
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +128 -143
- package/lib/ProForm/components/index.d.ts +2 -0
- package/lib/ProForm/components/index.js +115 -192
- package/lib/ProForm/components/render/ChangedWrapper.js +146 -132
- package/lib/ProForm/components/render/ConfirmWrapper.js +78 -122
- package/lib/ProForm/components/render/Render.js +348 -419
- package/lib/ProForm/components/render/RenderFields.js +186 -188
- package/lib/ProForm/components/render/propsType.js +16 -5
- package/lib/ProForm/index.js +239 -270
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.js +38 -5
- package/lib/ProForm/utils/diffOriginal.js +56 -44
- package/lib/ProForm/utils/getDefaultProps.js +44 -28
- package/lib/ProForm/utils/index.js +270 -321
- package/lib/ProForm/utils/processDependencies.js +44 -52
- package/lib/ProForm/utils/rulesCreator.js +84 -61
- package/lib/ProForm/utils/transformNames.js +38 -27
- package/lib/ProForm/utils/transformValue.js +51 -48
- package/lib/ProForm/utils/useDeepCompareMemo.js +36 -16
- package/lib/ProForm/utils/useFieldProps.js +42 -11
- package/lib/ProForm/utils/useForm.js +118 -228
- package/lib/ProForm/utils/useRules.js +67 -60
- package/lib/ProForm/utils/useShouldUpdate.js +105 -177
- package/lib/ProForm/utils/useWatch.js +93 -100
- package/lib/ProForm/utils/valueType.js +157 -224
- package/lib/ProIcon/config/index.js +365 -276
- package/lib/ProIcon/index.js +189 -214
- package/lib/ProIcon/propsTypes.js +16 -4
- package/lib/ProIcon/symbolIcon.js +23 -30
- package/lib/ProIcon/utils/index.js +66 -57
- package/lib/ProLayout/components/Layout/Header/index.js +59 -42
- package/lib/ProLayout/components/Layout/Icon/Icon.js +49 -30
- package/lib/ProLayout/components/Layout/Icon/index.js +34 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +113 -120
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +118 -123
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +16 -4
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +59 -42
- package/lib/ProLayout/components/Layout/Menu/index.js +76 -56
- package/lib/ProLayout/components/Layout/Notice/index.js +39 -31
- package/lib/ProLayout/components/Layout/index.js +45 -31
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProCollapse/index.js +132 -135
- package/lib/ProLayout/components/ProFooter/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProFooter/index.js +58 -44
- package/lib/ProLayout/components/ProHeader/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +53 -25
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +48 -27
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +16 -4
- package/lib/ProLayout/components/ProHeader/components/index.js +39 -17
- package/lib/ProLayout/components/ProHeader/index.js +274 -452
- package/lib/ProLayout/components/ProHeader/utils/index.js +32 -14
- package/lib/ProLayout/components/index.js +42 -24
- package/lib/ProLayout/index.d.ts +1 -1
- package/lib/ProLayout/index.js +127 -124
- package/lib/ProLayout/propTypes.js +16 -4
- package/lib/ProLayout/utils/index.js +92 -103
- package/lib/ProSelect/components/AdaptiveTooltip.js +46 -40
- package/lib/ProSelect/index.js +218 -250
- package/lib/ProSelect/propsType.js +16 -4
- package/lib/ProSelect/utils/index.js +80 -78
- package/lib/ProStep/components/Anchor/index.d.ts +1 -0
- package/lib/ProStep/components/Anchor/index.js +108 -101
- package/lib/ProStep/components/Item/index.d.ts +1 -0
- package/lib/ProStep/components/Item/index.js +83 -75
- package/lib/ProStep/components/Listener/index.js +62 -71
- package/lib/ProStep/components/Step/index.js +76 -67
- package/lib/ProStep/index.js +167 -225
- package/lib/ProStep/propsType.js +16 -4
- package/lib/ProStep/utils/index.js +59 -52
- package/lib/ProStepTab/index.js +179 -287
- package/lib/ProStepTab/propsType.js +16 -4
- package/lib/ProTable/components/FormatColumn/index.js +446 -495
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +53 -40
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +139 -200
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +116 -95
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +16 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +80 -59
- package/lib/ProTable/components/RcTable/index.js +39 -17
- package/lib/ProTable/components/RenderColumn/index.js +194 -200
- package/lib/ProTable/components/RenderEmptyText/index.js +27 -25
- package/lib/ProTable/components/RenderFooter/index.js +33 -17
- package/lib/ProTable/components/RenderSummary/index.js +46 -56
- package/lib/ProTable/components/RenderTableHeader/index.js +68 -59
- package/lib/ProTable/components/RenderTabs/index.js +89 -78
- package/lib/ProTable/components/TableResizable/index.js +88 -87
- package/lib/ProTable/components/TooltipTitle/index.js +40 -26
- package/lib/ProTable/components/index.js +51 -45
- package/lib/ProTable/hooks/useAntdTable.js +313 -375
- package/lib/ProTable/index.js +351 -385
- package/lib/ProTable/propsType.js +16 -4
- package/lib/ProTable/utils/index.js +84 -84
- package/lib/ProTabs/components/Card/index.js +30 -50
- package/lib/ProTabs/components/index.js +36 -10
- package/lib/ProTabs/index.js +92 -85
- package/lib/ProTabs/propType.js +16 -4
- package/lib/ProThemeTools/component/ProTools/index.js +198 -238
- package/lib/ProThemeTools/component/index.js +36 -10
- package/lib/ProThemeTools/context/ThemeContext.js +96 -87
- package/lib/ProThemeTools/index.js +183 -190
- package/lib/ProThemeTools/propsType.js +16 -4
- package/lib/ProThemeTools/utils/index.js +85 -79
- package/lib/ProTooltip/index.js +217 -221
- package/lib/ProTooltip/propsType.js +16 -4
- package/lib/ProTree/components/AdaptiveTooltip.js +33 -22
- package/lib/ProTree/components/CloseIcon.js +36 -31
- package/lib/ProTree/components/List.js +68 -72
- package/lib/ProTree/components/ProTree.js +262 -362
- package/lib/ProTree/components/ProTreeSelect/index.js +367 -474
- package/lib/ProTree/components/ProTreeSelect/propsType.js +16 -4
- package/lib/ProTree/components/SearchTitle.js +47 -50
- package/lib/ProTree/components/Tree.js +230 -302
- package/lib/ProTree/components/index.js +45 -31
- package/lib/ProTree/index.js +45 -22
- package/lib/ProTree/propsType.js +16 -4
- package/lib/ProTree/utils.js +83 -135
- package/lib/ProTreeModal/components/Cascader.js +97 -93
- package/lib/ProTreeModal/components/CloseIcon.js +36 -31
- package/lib/ProTreeModal/components/List.js +194 -263
- package/lib/ProTreeModal/components/SearchTitle.js +30 -22
- package/lib/ProTreeModal/components/SortableItem.js +60 -59
- package/lib/ProTreeModal/components/Tree.js +162 -180
- package/lib/ProTreeModal/components/Trigger.js +108 -126
- package/lib/ProTreeModal/components/index.js +51 -45
- package/lib/ProTreeModal/index.js +464 -574
- package/lib/ProTreeModal/propsType.js +16 -4
- package/lib/ProTreeModal/utils.js +105 -158
- package/lib/ProUpload/components/ButtonRender.js +86 -108
- package/lib/ProUpload/components/DragRender.js +120 -167
- package/lib/ProUpload/components/DraggableUploadListItem.js +50 -32
- package/lib/ProUpload/components/Example.js +56 -38
- package/lib/ProUpload/components/FileItem.js +114 -203
- package/lib/ProUpload/components/ImageRender.js +176 -246
- package/lib/ProUpload/index.js +204 -215
- package/lib/ProUpload/propsType.js +16 -4
- package/lib/ProUpload/uitls.js +34 -10
- package/lib/ProUtils/utils/index.js +38 -26
- package/lib/ProViewer/index.js +173 -199
- package/lib/ProViewer/propsType.js +16 -4
- package/lib/ProWaterMark/index.js +38 -18
- package/lib/ProWaterMark/propsType.js +16 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +123 -272
- package/lib/locale/en_US.js +145 -127
- package/lib/locale/index.js +58 -38
- package/lib/locale/zh_CN.js +146 -128
- package/lib/tokens.js +103 -86
- package/lib/utils/index.js +91 -63
- package/package.json +7 -7
@@ -2,25 +2,24 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
|
-
import _isString from "lodash/isString";
|
6
|
-
import _isNumber from "lodash/isNumber";
|
7
|
-
import _isEmpty from "lodash/isEmpty";
|
8
|
-
import _isFunction from "lodash/isFunction";
|
9
5
|
var _excluded = ["width"];
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
11
6
|
/* eslint-disable react/no-array-index-key */
|
12
7
|
import { Space, Divider, Breadcrumb, Tooltip, Modal } from 'antd';
|
13
|
-
import { memo, useEffect, useState, useRef } from 'react';
|
8
|
+
import React, { memo, useEffect, useState, useRef } from 'react';
|
14
9
|
import { tools } from '@zat-design/utils';
|
15
10
|
import classnames from 'classnames';
|
16
11
|
import dayjs from 'dayjs';
|
17
12
|
import { useToggle, useSize } from 'ahooks';
|
13
|
+
import { isFunction, isEmpty, isNumber, isString } from 'lodash';
|
18
14
|
import { ReactSVG } from 'react-svg';
|
19
|
-
import foldSvg from
|
20
|
-
import { Copy, ProBackBtn } from
|
21
|
-
import getEnumLabel from
|
22
|
-
import locale from
|
23
|
-
import { checkDescribeItemsHidden } from
|
15
|
+
import foldSvg from "../../../assets/arrow.svg";
|
16
|
+
import { Copy, ProBackBtn } from "./components";
|
17
|
+
import getEnumLabel from "../../../ProEnum/utils/getEnumLabel";
|
18
|
+
import locale from "../../../locale";
|
19
|
+
import { checkDescribeItemsHidden } from "./utils";
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
22
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
24
23
|
var formatAmount = tools.formatAmount;
|
25
24
|
var ProHeader = function ProHeader(props) {
|
26
25
|
var breadcrumbColumns = props.breadcrumbColumns,
|
@@ -59,8 +58,10 @@ var ProHeader = function ProHeader(props) {
|
|
59
58
|
var ref = useRef(null);
|
60
59
|
var size = useSize(ref);
|
61
60
|
var _title = title;
|
61
|
+
|
62
62
|
// 面包屑配置数据源
|
63
63
|
var _breadcrumbColumns = breadcrumbColumns || [];
|
64
|
+
|
64
65
|
// 次级配置数据源
|
65
66
|
var _subDescribeColumns = subDescribeColumns || [];
|
66
67
|
useEffect(function () {
|
@@ -80,6 +81,7 @@ var ProHeader = function ProHeader(props) {
|
|
80
81
|
setBackState(false);
|
81
82
|
}
|
82
83
|
}, []);
|
84
|
+
|
83
85
|
/**
|
84
86
|
* 主级描述数据渲染
|
85
87
|
*/
|
@@ -87,7 +89,7 @@ var ProHeader = function ProHeader(props) {
|
|
87
89
|
if (!Array.isArray(describeData)) {
|
88
90
|
return null;
|
89
91
|
}
|
90
|
-
return _jsx("ul", {
|
92
|
+
return /*#__PURE__*/_jsx("ul", {
|
91
93
|
className: classnames({
|
92
94
|
'pro-header-describe': true,
|
93
95
|
'pro-header-describe-open': fold,
|
@@ -110,68 +112,70 @@ var ProHeader = function ProHeader(props) {
|
|
110
112
|
}
|
111
113
|
var onlyTag = tag && !label && !value;
|
112
114
|
var tagRender = function tagRender(parmas) {
|
113
|
-
if (Array.isArray(parmas === null || parmas === void 0 ? void 0 : parmas.tag) &&
|
114
|
-
return _jsx(Space, {
|
115
|
+
if (Array.isArray(parmas === null || parmas === void 0 ? void 0 : parmas.tag) && parmas !== null && parmas !== void 0 && parmas.tag.length) {
|
116
|
+
return /*#__PURE__*/_jsx(Space, {
|
115
117
|
size: 4,
|
116
118
|
children: parmas.tag.map(function (tagItem, index) {
|
117
|
-
return _jsx("div", {
|
119
|
+
return /*#__PURE__*/_jsx("div", {
|
118
120
|
className: "pro-header-tag",
|
119
121
|
children: tagItem
|
120
122
|
}, index);
|
121
123
|
})
|
122
124
|
});
|
123
125
|
}
|
124
|
-
return
|
126
|
+
return parmas !== null && parmas !== void 0 && parmas.tag ? /*#__PURE__*/_jsx("div", {
|
125
127
|
className: "pro-header-tag",
|
126
128
|
children: parmas === null || parmas === void 0 ? void 0 : parmas.tag
|
127
129
|
}) : null;
|
128
130
|
};
|
131
|
+
|
129
132
|
/** 单行渲染 */
|
130
133
|
var valueRender = function valueRender(parmas) {
|
131
|
-
return _jsxs(Space, {
|
134
|
+
return /*#__PURE__*/_jsxs(Space, {
|
132
135
|
size: 4,
|
133
|
-
align:
|
134
|
-
children: [
|
136
|
+
align: parmas !== null && parmas !== void 0 && parmas.tag ? 'baseline' : 'center',
|
137
|
+
children: [parmas !== null && parmas !== void 0 && parmas.link ? /*#__PURE__*/_jsx("a", {
|
135
138
|
href: parmas.link,
|
136
139
|
rel: "noopener noreferrer",
|
137
140
|
target: "_blank",
|
138
141
|
children: parmas === null || parmas === void 0 ? void 0 : parmas.value
|
139
|
-
}) : parmas === null || parmas === void 0 ? void 0 : parmas.value,
|
142
|
+
}) : parmas === null || parmas === void 0 ? void 0 : parmas.value, parmas !== null && parmas !== void 0 && parmas.copyable && isString(parmas === null || parmas === void 0 ? void 0 : parmas.value) ? /*#__PURE__*/_jsx(Copy, {
|
140
143
|
text: parmas.value
|
141
144
|
}) : null, tagRender({
|
142
145
|
tag: parmas === null || parmas === void 0 ? void 0 : parmas.tag
|
143
146
|
})]
|
144
147
|
});
|
145
148
|
};
|
149
|
+
|
146
150
|
/** 多行渲染 */
|
147
151
|
var itemsRender = function itemsRender() {
|
148
152
|
// items配置是否超长,超长配置... + tip 提示
|
149
153
|
var itemsHidden = checkDescribeItemsHidden(ref === null || ref === void 0 ? void 0 : ref.current);
|
150
|
-
var result = _jsxs("div", {
|
154
|
+
var result = /*#__PURE__*/_jsxs("div", {
|
151
155
|
ref: ref,
|
152
156
|
className: classnames({
|
153
157
|
'pro-header-describe-items': true,
|
154
158
|
'pro-header-describe-items-more': items.length >= 2
|
155
159
|
}),
|
156
160
|
children: [(items === null || items === void 0 ? void 0 : items.length) > 3 ? "\u5171".concat(items === null || items === void 0 ? void 0 : items.length, "\u4E2A\uFF0C") : null, items.map(function (item, index) {
|
157
|
-
return _jsxs("span", {
|
161
|
+
return /*#__PURE__*/_jsxs("span", {
|
158
162
|
children: [valueRender(item), (items === null || items === void 0 ? void 0 : items.length) !== index + 1 ? ' 、' : null]
|
159
163
|
}, index);
|
160
|
-
}), itemsHidden ? _jsx("span", {
|
164
|
+
}), itemsHidden ? /*#__PURE__*/_jsx("span", {
|
161
165
|
className: "pro-header-describe-items-omit",
|
162
166
|
children: "..."
|
163
167
|
}) : null]
|
164
168
|
});
|
165
169
|
if (itemsHidden) {
|
166
|
-
var tipResult = _jsx(_Fragment, {
|
170
|
+
var tipResult = /*#__PURE__*/_jsx(_Fragment, {
|
167
171
|
children: items.map(function (item, index) {
|
168
|
-
return _jsx("p", {
|
172
|
+
return /*#__PURE__*/_jsx("p", {
|
169
173
|
className: "pro-header-describe-items-tip-value",
|
170
174
|
children: valueRender(item)
|
171
175
|
}, index);
|
172
176
|
})
|
173
177
|
});
|
174
|
-
return _jsx(Tooltip, {
|
178
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
175
179
|
placement: "bottomLeft",
|
176
180
|
classNames: {
|
177
181
|
root: 'pro-header-describe-items-tip'
|
@@ -184,21 +188,21 @@ var ProHeader = function ProHeader(props) {
|
|
184
188
|
};
|
185
189
|
var tagCls = classnames({
|
186
190
|
'pro-header-only-tag': onlyTag,
|
187
|
-
'pro-header-describe-items-calc':
|
191
|
+
'pro-header-describe-items-calc': isString(width) ? width.includes('calc') : false
|
188
192
|
});
|
189
|
-
return _jsx("li", {
|
193
|
+
return /*#__PURE__*/_jsx("li", {
|
190
194
|
className: tagCls,
|
191
195
|
style: {
|
192
196
|
width: width
|
193
197
|
},
|
194
|
-
children: _jsxs(Space, {
|
198
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
195
199
|
size: 4,
|
196
|
-
children: [label ? _jsx("span", {
|
200
|
+
children: [label ? /*#__PURE__*/_jsx("span", {
|
197
201
|
className: "pro-header-describe-label",
|
198
202
|
children: label
|
199
|
-
}) : null, _jsx("span", {
|
203
|
+
}) : null, /*#__PURE__*/_jsx("span", {
|
200
204
|
className: "pro-header-describe-value",
|
201
|
-
children:
|
205
|
+
children: items !== null && items !== void 0 && items.length ? itemsRender() : /*#__PURE__*/_jsx("span", {
|
202
206
|
children: valueRender({
|
203
207
|
value: value,
|
204
208
|
copyable: copyable,
|
@@ -212,6 +216,7 @@ var ProHeader = function ProHeader(props) {
|
|
212
216
|
})
|
213
217
|
});
|
214
218
|
};
|
219
|
+
|
215
220
|
/**
|
216
221
|
* 次级描述数据渲染
|
217
222
|
*/
|
@@ -235,7 +240,7 @@ var ProHeader = function ProHeader(props) {
|
|
235
240
|
case 'thousandth':
|
236
241
|
case 'money':
|
237
242
|
// 千分位
|
238
|
-
result = value ||
|
243
|
+
result = value || isNumber(value) ? formatAmount(value, precision) : '-';
|
239
244
|
break;
|
240
245
|
case 'enumName':
|
241
246
|
// 枚举-展示name
|
@@ -257,36 +262,37 @@ var ProHeader = function ProHeader(props) {
|
|
257
262
|
result = String(value).includes('undefined') || !value ? '-' : value;
|
258
263
|
break;
|
259
264
|
}
|
260
|
-
return _jsxs(_Fragment, {
|
261
|
-
children: [_jsx("span", {
|
265
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
266
|
+
children: [/*#__PURE__*/_jsx("span", {
|
262
267
|
children: label
|
263
|
-
}), _jsx("span", {
|
268
|
+
}), /*#__PURE__*/_jsx("span", {
|
264
269
|
className: "describe-value",
|
265
270
|
children: result
|
266
271
|
})]
|
267
272
|
});
|
268
273
|
};
|
274
|
+
|
269
275
|
/**
|
270
276
|
* 头部右侧按钮面板渲染
|
271
277
|
*/
|
272
278
|
var actionsRender = function actionsRender() {
|
273
279
|
if (Array.isArray(actionRender) && actionRender.length) {
|
274
|
-
return _jsx(Space, {
|
275
|
-
split: _jsx(Divider, {
|
280
|
+
return /*#__PURE__*/_jsx(Space, {
|
281
|
+
split: /*#__PURE__*/_jsx(Divider, {
|
276
282
|
type: "vertical"
|
277
283
|
}),
|
278
284
|
children: actionRender.map(function (item, index) {
|
279
285
|
var _item$props;
|
280
|
-
if (
|
281
|
-
return _jsx("div", {
|
286
|
+
if (isFunction(item === null || item === void 0 ? void 0 : item.type)) {
|
287
|
+
return /*#__PURE__*/_jsx("div", {
|
282
288
|
children: item
|
283
289
|
}, index);
|
284
290
|
}
|
285
291
|
// 判断第一层dom节点为空
|
286
|
-
if (
|
292
|
+
if (item !== null && item !== void 0 && item.type && !(item !== null && item !== void 0 && (_item$props = item.props) !== null && _item$props !== void 0 && _item$props.children)) {
|
287
293
|
return null;
|
288
294
|
}
|
289
|
-
return _jsx("div", {
|
295
|
+
return /*#__PURE__*/_jsx("div", {
|
290
296
|
children: item
|
291
297
|
}, index);
|
292
298
|
})
|
@@ -294,6 +300,7 @@ var ProHeader = function ProHeader(props) {
|
|
294
300
|
}
|
295
301
|
return actionRender;
|
296
302
|
};
|
303
|
+
|
297
304
|
/**
|
298
305
|
* 总结信息面板渲染
|
299
306
|
*/
|
@@ -312,38 +319,40 @@ var ProHeader = function ProHeader(props) {
|
|
312
319
|
tag = item.tag;
|
313
320
|
var tagRender = function tagRender() {
|
314
321
|
if (Array.isArray(tag) && tag.length) {
|
315
|
-
return _jsx(Space, {
|
322
|
+
return /*#__PURE__*/_jsx(Space, {
|
316
323
|
size: 8,
|
317
324
|
children: tag.map(function (tagItem, index) {
|
318
|
-
return _jsx("div", {
|
325
|
+
return /*#__PURE__*/_jsx("div", {
|
319
326
|
className: "pro-header-tag",
|
320
327
|
children: tagItem
|
321
328
|
}, index);
|
322
329
|
})
|
323
330
|
});
|
324
331
|
}
|
325
|
-
return tag ? _jsx("div", {
|
332
|
+
return tag ? /*#__PURE__*/_jsx("div", {
|
326
333
|
className: "pro-header-tag",
|
327
334
|
children: tag
|
328
335
|
}) : null;
|
329
336
|
};
|
337
|
+
|
330
338
|
// show或者值不存在为false直接隐藏¸
|
331
339
|
if (!show || !value) {
|
332
340
|
return null;
|
333
341
|
}
|
334
342
|
// 判断第一层dom节点为空
|
335
|
-
if (
|
343
|
+
if (value !== null && value !== void 0 && value.type && !(value !== null && value !== void 0 && (_value$props = value.props) !== null && _value$props !== void 0 && _value$props.children)) {
|
336
344
|
return null;
|
337
345
|
}
|
338
346
|
return {
|
339
347
|
key: index,
|
340
|
-
title: _jsxs(Space, {
|
348
|
+
title: /*#__PURE__*/_jsxs(Space, {
|
341
349
|
size: 4,
|
342
350
|
children: [value, " ", tagRender()]
|
343
351
|
})
|
344
352
|
};
|
345
353
|
}).filter(Boolean); // 过滤掉null值
|
346
354
|
};
|
355
|
+
|
347
356
|
/**
|
348
357
|
* 头部左侧导航栏后业务信息
|
349
358
|
*/
|
@@ -357,7 +366,7 @@ var ProHeader = function ProHeader(props) {
|
|
357
366
|
if (!list.length) {
|
358
367
|
return null;
|
359
368
|
}
|
360
|
-
return _jsx("ul", {
|
369
|
+
return /*#__PURE__*/_jsx("ul", {
|
361
370
|
className: "pro-header-info",
|
362
371
|
children: list.map(function (item, index) {
|
363
372
|
var _value$props2;
|
@@ -373,7 +382,7 @@ var ProHeader = function ProHeader(props) {
|
|
373
382
|
return '';
|
374
383
|
}
|
375
384
|
// 判断第一层dom节点为空
|
376
|
-
if (
|
385
|
+
if (value !== null && value !== void 0 && value.type && !(value !== null && value !== void 0 && (_value$props2 = value.props) !== null && _value$props2 !== void 0 && _value$props2.children)) {
|
377
386
|
return '';
|
378
387
|
}
|
379
388
|
// value为null或者undefined返回'-'
|
@@ -381,44 +390,45 @@ var ProHeader = function ProHeader(props) {
|
|
381
390
|
if (type === 'version' && val) {
|
382
391
|
val = "".concat(locale.ProHeader.versionTitle).concat(val);
|
383
392
|
}
|
393
|
+
|
384
394
|
// 面包屑样式
|
385
395
|
var breadcrumbCls = classnames({
|
386
396
|
'breadcrumb-value': true,
|
387
397
|
omit: width
|
388
398
|
});
|
389
399
|
var valueRender = function valueRender(type) {
|
390
|
-
var valRender = _jsx("div", {
|
400
|
+
var valRender = /*#__PURE__*/_jsx("div", {
|
391
401
|
className: breadcrumbCls,
|
392
402
|
style: {
|
393
403
|
width: width
|
394
404
|
},
|
395
|
-
children: _jsxs(Space, {
|
405
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
396
406
|
size: 4,
|
397
|
-
children: [val, " ", tag ? _jsx("div", {
|
407
|
+
children: [val, " ", tag ? /*#__PURE__*/_jsx("div", {
|
398
408
|
className: "pro-header-tag",
|
399
409
|
children: tag
|
400
410
|
}) : null]
|
401
411
|
})
|
402
412
|
});
|
403
413
|
if (type === 'copy') {
|
404
|
-
return valRender = _jsxs(_Fragment, {
|
405
|
-
children: [width ? _jsx(Tooltip, {
|
414
|
+
return valRender = /*#__PURE__*/_jsxs(_Fragment, {
|
415
|
+
children: [width ? /*#__PURE__*/_jsx(Tooltip, {
|
406
416
|
title: val,
|
407
417
|
children: valRender
|
408
|
-
}) : valRender, _jsx(Copy, {
|
418
|
+
}) : valRender, /*#__PURE__*/_jsx(Copy, {
|
409
419
|
text: val
|
410
420
|
})]
|
411
421
|
});
|
412
422
|
}
|
413
423
|
if (width) {
|
414
|
-
return _jsx(Tooltip, {
|
424
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
415
425
|
title: val,
|
416
426
|
children: valRender
|
417
427
|
});
|
418
428
|
}
|
419
429
|
return valRender;
|
420
430
|
};
|
421
|
-
return _jsx("li", {
|
431
|
+
return /*#__PURE__*/_jsx("li", {
|
422
432
|
className: classnames({
|
423
433
|
version: ['version', 'tag'].includes(type),
|
424
434
|
hidden: ['version', 'tag'].includes(type) && !val
|
@@ -432,13 +442,15 @@ var ProHeader = function ProHeader(props) {
|
|
432
442
|
'pro-header': true,
|
433
443
|
'pro-header-fixed': fixedTop,
|
434
444
|
'pro-header-shadow': showShadow,
|
445
|
+
// 内部窗口滚动自带阴影场景
|
435
446
|
'pro-header-no-back': !backState,
|
436
|
-
'pro-header-has-describe': !
|
437
|
-
'pro-header-no-describe':
|
447
|
+
'pro-header-has-describe': !isEmpty(_subDescribeColumns) || !isEmpty(describeColumns) || !isEmpty(describeColumns),
|
448
|
+
'pro-header-no-describe': isEmpty(_subDescribeColumns) && isEmpty(describeColumns) || isEmpty(describeColumns)
|
438
449
|
}, "".concat(className), className));
|
439
|
-
if (title && !
|
450
|
+
if (title && !isEmpty(_breadcrumbColumns)) {
|
440
451
|
console.error('warning: The title and the breadcrumbList cannot be used together');
|
441
452
|
}
|
453
|
+
|
442
454
|
// title默认不显示返回按钮,只有showBack设置为true时才显示
|
443
455
|
if (title && props.showBack) {
|
444
456
|
_title = null;
|
@@ -470,54 +482,54 @@ var ProHeader = function ProHeader(props) {
|
|
470
482
|
width: width
|
471
483
|
} : {}), restModalProps));
|
472
484
|
};
|
473
|
-
return _jsx("div", {
|
485
|
+
return /*#__PURE__*/_jsx("div", {
|
474
486
|
className: cls,
|
475
487
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
476
488
|
top: fixedTop,
|
477
489
|
zIndex: zIndex
|
478
490
|
}),
|
479
|
-
children: _title ? _jsx("div", {
|
491
|
+
children: _title ? /*#__PURE__*/_jsx("div", {
|
480
492
|
className: "pro-header-title",
|
481
493
|
children: _title
|
482
|
-
}) : _jsxs(_Fragment, {
|
483
|
-
children: [_jsxs("div", {
|
494
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
495
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
484
496
|
className: "pro-header-top",
|
485
|
-
children: [_jsx("div", {
|
497
|
+
children: [/*#__PURE__*/_jsx("div", {
|
486
498
|
className: classnames({
|
487
499
|
'pro-header-left': true,
|
488
500
|
'pro-header-left-space': !backState
|
489
501
|
}),
|
490
|
-
children: _jsxs(Space, {
|
502
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
491
503
|
size: backState ? 4 : 0,
|
492
|
-
children: [backState ? _jsx(ProBackBtn, {
|
504
|
+
children: [backState ? /*#__PURE__*/_jsx(ProBackBtn, {
|
493
505
|
onBack: onConfirm
|
494
|
-
}) : null, _jsx(Breadcrumb, {
|
506
|
+
}) : null, /*#__PURE__*/_jsx(Breadcrumb, {
|
495
507
|
separator: ">",
|
496
508
|
items: breadcrumbRender()
|
497
509
|
}), infoRender()]
|
498
510
|
})
|
499
|
-
}), _jsx("div", {
|
511
|
+
}), /*#__PURE__*/_jsx("div", {
|
500
512
|
className: "pro-header-right",
|
501
513
|
children: actionsRender()
|
502
514
|
})]
|
503
|
-
}), describeRender(describeColumns), !
|
515
|
+
}), describeRender(describeColumns), !isEmpty(_subDescribeColumns) ? /*#__PURE__*/_jsxs("div", {
|
504
516
|
className: classnames({
|
505
517
|
'pro-header-nav': true,
|
506
518
|
'pro-header-nav-open': fold,
|
507
519
|
'pro-header-nav-hidden': !fold
|
508
520
|
}),
|
509
|
-
children: [_jsx("ul", {
|
521
|
+
children: [/*#__PURE__*/_jsx("ul", {
|
510
522
|
children: _subDescribeColumns.map(function (item, index) {
|
511
|
-
return _jsx("li", {
|
523
|
+
return /*#__PURE__*/_jsx("li", {
|
512
524
|
children: subDescribeRender(item)
|
513
525
|
}, index);
|
514
526
|
})
|
515
|
-
}), _jsx("div", {
|
527
|
+
}), /*#__PURE__*/_jsx("div", {
|
516
528
|
className: "pro-header-fold",
|
517
|
-
children: _jsx("div", {
|
529
|
+
children: /*#__PURE__*/_jsx("div", {
|
518
530
|
className: "pro-header-fold-bg",
|
519
531
|
onClick: toggle,
|
520
|
-
children: _jsx(ReactSVG, {
|
532
|
+
children: /*#__PURE__*/_jsx(ReactSVG, {
|
521
533
|
className: "fold-icon",
|
522
534
|
src: foldSvg
|
523
535
|
}, "copy-icon")
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export { default as ProCollapse } from
|
2
|
-
export { default as ProFooter } from
|
3
|
-
export { default as ProHeader } from
|
1
|
+
export { default as ProCollapse } from "./ProCollapse";
|
2
|
+
export { default as ProFooter } from "./ProFooter";
|
3
|
+
export { default as ProHeader } from "./ProHeader";
|
package/es/ProLayout/index.d.ts
CHANGED
@@ -20,6 +20,6 @@ declare const ProLayout: {
|
|
20
20
|
};
|
21
21
|
ProCollapse: (props: import("./components/ProCollapse/PropTypes").ProCollapseType) => import("react/jsx-runtime").JSX.Element;
|
22
22
|
ProFooter: import("react").MemoExoticComponent<(props: import("./components/ProFooter/PropTypes").ProFooterType) => import("react/jsx-runtime").JSX.Element>;
|
23
|
-
ProHeader: import("react").MemoExoticComponent<(props: import("
|
23
|
+
ProHeader: import("react").MemoExoticComponent<(props: import("./components/ProHeader/PropTypes").ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
|
24
24
|
};
|
25
25
|
export default ProLayout;
|
package/es/ProLayout/index.js
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
5
4
|
import { message } from 'antd';
|
6
5
|
import { createContext } from 'react';
|
7
6
|
import classNames from 'classnames';
|
8
7
|
import { useSetState, useToggle, useDeepCompareEffect } from 'ahooks';
|
9
|
-
import { ProWaterMark } from
|
10
|
-
import { ProCollapse, ProFooter, ProHeader } from
|
11
|
-
import { Header, Notice, Menu } from
|
12
|
-
import { transformMenus } from
|
8
|
+
import { ProWaterMark } from "../index";
|
9
|
+
import { ProCollapse, ProFooter, ProHeader } from "./components";
|
10
|
+
import { Header, Notice, Menu } from "./components/Layout/index";
|
11
|
+
import { transformMenus } from "./utils";
|
12
|
+
|
13
13
|
// 全局上下文
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
16
|
export var LayoutContext = /*#__PURE__*/createContext(undefined);
|
15
17
|
var ProLayout = function ProLayout(props) {
|
16
18
|
var _Object$keys;
|
@@ -62,6 +64,7 @@ var ProLayout = function ProLayout(props) {
|
|
62
64
|
menus: menuData
|
63
65
|
});
|
64
66
|
}, [dataSource]);
|
67
|
+
|
65
68
|
/**
|
66
69
|
* 关闭提示框
|
67
70
|
*/
|
@@ -78,18 +81,18 @@ var ProLayout = function ProLayout(props) {
|
|
78
81
|
'pro-layout-row-left-pure': typeof pure !== 'boolean' && (pure === null || pure === void 0 ? void 0 : pure.leftMenu)
|
79
82
|
});
|
80
83
|
var noticeHeight = notice ? 32 : 0;
|
81
|
-
var layoutDom = _jsxs("div", {
|
84
|
+
var layoutDom = /*#__PURE__*/_jsxs("div", {
|
82
85
|
className: classNames(_defineProperty({
|
83
86
|
'pro-layout': true,
|
84
87
|
'pro-layout-dark': theme === 'dark',
|
85
88
|
'pro-layout-light': theme === 'light'
|
86
89
|
}, "".concat(className), className)),
|
87
|
-
children: [_jsx(Header, _objectSpread({}, props)), _jsx(Notice, _objectSpread(_objectSpread({}, props), {}, {
|
90
|
+
children: [/*#__PURE__*/_jsx(Header, _objectSpread({}, props)), /*#__PURE__*/_jsx(Notice, _objectSpread(_objectSpread({}, props), {}, {
|
88
91
|
notice: notice,
|
89
92
|
onCancel: onCancelNotice
|
90
|
-
})), _jsxs("div", {
|
93
|
+
})), /*#__PURE__*/_jsxs("div", {
|
91
94
|
className: contentCls,
|
92
|
-
children: [_jsx(Menu, _objectSpread(_objectSpread({}, props), {}, {
|
95
|
+
children: [/*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({}, props), {}, {
|
93
96
|
dataSource: Array.isArray(menus) ? {
|
94
97
|
menus: menus
|
95
98
|
} : menus,
|
@@ -99,24 +102,24 @@ var ProLayout = function ProLayout(props) {
|
|
99
102
|
toggle();
|
100
103
|
onCollapsedChange && onCollapsedChange(!collapsed);
|
101
104
|
}
|
102
|
-
})), _jsx("div", {
|
105
|
+
})), /*#__PURE__*/_jsx("div", {
|
103
106
|
className: "pro-layout-content",
|
104
107
|
style: _objectSpread(_objectSpread({}, contentStyle), {}, {
|
105
108
|
marginTop: headerHeight + noticeHeight
|
106
109
|
}),
|
107
|
-
children: _jsx("div", {
|
110
|
+
children: /*#__PURE__*/_jsx("div", {
|
108
111
|
children: children
|
109
112
|
})
|
110
113
|
})]
|
111
114
|
})]
|
112
115
|
});
|
113
|
-
return _jsx(LayoutContext.Provider, {
|
116
|
+
return /*#__PURE__*/_jsx(LayoutContext.Provider, {
|
114
117
|
value: {
|
115
118
|
selectedPath: selectedPath,
|
116
119
|
target: target,
|
117
120
|
onSelected: setState
|
118
121
|
},
|
119
|
-
children: !((_Object$keys = Object.keys(waterMarkProps))
|
122
|
+
children: !((_Object$keys = Object.keys(waterMarkProps)) !== null && _Object$keys !== void 0 && _Object$keys.length) ? layoutDom : /*#__PURE__*/_jsx(ProWaterMark, _objectSpread(_objectSpread({}, waterMarkProps), {}, {
|
120
123
|
children: layoutDom
|
121
124
|
}))
|
122
125
|
});
|
@@ -132,6 +135,7 @@ ProLayout.defaultProps = {
|
|
132
135
|
headerHeight: 48,
|
133
136
|
contentStyle: {}
|
134
137
|
};
|
138
|
+
|
135
139
|
// 下一版本会移除
|
136
140
|
ProLayout.ProCollapse = ProCollapse;
|
137
141
|
ProLayout.ProFooter = ProFooter;
|