@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
@@ -9,7 +9,7 @@ export var getRowKey = function getRowKey(rowKey, record) {
|
|
9
9
|
}
|
10
10
|
return key;
|
11
11
|
};
|
12
|
-
var
|
12
|
+
export var addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
13
13
|
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
14
14
|
var currentParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
15
15
|
return tree.map(function (node) {
|
@@ -18,12 +18,11 @@ var _addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
|
18
18
|
newNode.parentId = currentParentId;
|
19
19
|
newNode.rowKey = getRowKey(rowKey, node);
|
20
20
|
if (node.children) {
|
21
|
-
newNode.children =
|
21
|
+
newNode.children = addLevelAndParentId(node.children, rowKey, currentLevel + 1, newNode.rowKey);
|
22
22
|
}
|
23
23
|
return newNode;
|
24
24
|
});
|
25
25
|
};
|
26
|
-
export { _addLevelAndParentId as addLevelAndParentId };
|
27
26
|
export function getFinalChildrenKey(tree, meta, options) {
|
28
27
|
if (typeof options.getChildrenKey === 'function') {
|
29
28
|
var dynamicChildrenKey = options.getChildrenKey(tree, meta);
|
@@ -33,8 +32,9 @@ export function getFinalChildrenKey(tree, meta, options) {
|
|
33
32
|
}
|
34
33
|
return options.childrenKey;
|
35
34
|
}
|
35
|
+
|
36
36
|
// 前置深度优先遍历
|
37
|
-
var
|
37
|
+
var treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
38
38
|
var callbackResult = callback(treeItem, options);
|
39
39
|
if (callbackResult) {
|
40
40
|
return treeItem;
|
@@ -46,7 +46,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
46
46
|
}
|
47
47
|
for (var i = 0, count = children.length; i < count; i++) {
|
48
48
|
var childItem = children[i];
|
49
|
-
var findOne =
|
49
|
+
var findOne = treeNodePreImpl(childItem, callback, _objectSpread(_objectSpread({}, options), {}, {
|
50
50
|
parents: [].concat(_toConsumableArray(options.parents), [treeItem]),
|
51
51
|
depth: options.depth + 1
|
52
52
|
}));
|
@@ -57,7 +57,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
57
57
|
return undefined;
|
58
58
|
};
|
59
59
|
var treeNodeStrategies = {
|
60
|
-
pre:
|
60
|
+
pre: treeNodePreImpl
|
61
61
|
};
|
62
62
|
export function treeNodeFind(tree, callback, options) {
|
63
63
|
var _options$childrenKey, _options$strategy;
|
@@ -121,8 +121,9 @@ export function createTreeFromArray(array, options) {
|
|
121
121
|
});
|
122
122
|
return result;
|
123
123
|
}
|
124
|
+
|
124
125
|
// 前置遍历
|
125
|
-
var
|
126
|
+
var treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, options) {
|
126
127
|
callback(treeItem, options);
|
127
128
|
var finalChildrenKey = getFinalChildrenKey(treeItem, options, options);
|
128
129
|
var children = treeItem === null || treeItem === void 0 ? void 0 : treeItem[finalChildrenKey];
|
@@ -132,12 +133,12 @@ var _treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, option
|
|
132
133
|
depth: options.depth + 1
|
133
134
|
});
|
134
135
|
children.forEach(function (childItem) {
|
135
|
-
|
136
|
+
treeForEachPreImpl(childItem, callback, nextLevelOptions);
|
136
137
|
});
|
137
138
|
}
|
138
139
|
};
|
139
140
|
var treeForEachStrategies = {
|
140
|
-
pre:
|
141
|
+
pre: treeForEachPreImpl
|
141
142
|
};
|
142
143
|
export function treeForEach(tree, callback, options) {
|
143
144
|
var _options$childrenKey2, _options$strategy2;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
5
4
|
import { Table } from 'antd';
|
6
5
|
import { memo } from 'react';
|
7
|
-
import DndWrapper, { Row } from
|
8
|
-
import { RenderEmptyText, RenderSummary } from
|
6
|
+
import DndWrapper, { Row } from "./components/DndWrapper";
|
7
|
+
import { RenderEmptyText, RenderSummary } from "../../../index";
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
var DraggableTable = function DraggableTable(_ref) {
|
10
10
|
var dataSource = _ref.dataSource,
|
11
11
|
tableProps = _ref.tableProps,
|
@@ -22,7 +22,7 @@ var DraggableTable = function DraggableTable(_ref) {
|
|
22
22
|
rowKey = draggableProps.rowKey,
|
23
23
|
onDragStartGuard = draggableProps.onDragStartGuard,
|
24
24
|
onDragEndGuard = draggableProps.onDragEndGuard;
|
25
|
-
return _jsx(DndWrapper, {
|
25
|
+
return /*#__PURE__*/_jsx(DndWrapper, {
|
26
26
|
value: dataSource !== null && dataSource !== void 0 ? dataSource : [],
|
27
27
|
onChange: onChange,
|
28
28
|
disabled: disabled,
|
@@ -30,7 +30,7 @@ var DraggableTable = function DraggableTable(_ref) {
|
|
30
30
|
rowKey: rowKey,
|
31
31
|
onDragStartGuard: onDragStartGuard,
|
32
32
|
onDragEndGuard: onDragEndGuard,
|
33
|
-
children: _jsx(Table, _objectSpread(_objectSpread({
|
33
|
+
children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
|
34
34
|
className: "pro-edit-table-drag",
|
35
35
|
components: {
|
36
36
|
body: {
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/** 基础表格 */
|
2
|
-
export { default as BaseTable } from
|
2
|
+
export { default as BaseTable } from "./components/BaseTable/index";
|
3
3
|
/** 拖拽表格 */
|
4
|
-
export { default as DraggableTable } from
|
4
|
+
export { default as DraggableTable } from "./components/DraggableTable/index";
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
|
-
import _isBoolean from "lodash/isBoolean";
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
5
3
|
import { useRef } from 'react';
|
6
4
|
import { Tooltip, Typography, Space } from 'antd';
|
7
5
|
import { useSetState } from 'ahooks';
|
6
|
+
import { isBoolean } from 'lodash';
|
8
7
|
import classNames from 'classnames';
|
9
8
|
import { CheckOutlined } from '@ant-design/icons';
|
10
9
|
import { ReactSVG } from 'react-svg';
|
11
|
-
import { parseWidth } from
|
12
|
-
import { isEmpty, isEllipsisActive } from
|
13
|
-
import copySvg from
|
10
|
+
import { parseWidth } from "../../utils";
|
11
|
+
import { isEmpty, isEllipsisActive } from "../../../utils";
|
12
|
+
import copySvg from "../../../assets/copy.svg";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
14
16
|
var Paragraph = Typography.Paragraph,
|
15
17
|
Text = Typography.Text;
|
16
18
|
// @ts-ignore
|
@@ -35,6 +37,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
35
37
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
36
38
|
tooltip = _useSetState2[0].tooltip,
|
37
39
|
setState = _useSetState2[1];
|
40
|
+
|
38
41
|
// 计算并更新宽度
|
39
42
|
var updateCalculatedWidth = function updateCalculatedWidth(element) {
|
40
43
|
if (!element) return null;
|
@@ -62,12 +65,13 @@ var RenderColumn = function RenderColumn(props) {
|
|
62
65
|
return triggerNode.parentNode;
|
63
66
|
}
|
64
67
|
}, toolTipProps);
|
68
|
+
|
65
69
|
// 比对场景走的逻辑
|
66
|
-
if (!isInNewRowFlag &&
|
70
|
+
if (!isInNewRowFlag && isBoolean(props === null || props === void 0 ? void 0 : props.isChanged)) {
|
67
71
|
var renderNode = value ? node : '-';
|
68
72
|
var isXMaxContent = (scroll === null || scroll === void 0 ? void 0 : scroll.x) === 'max-content';
|
69
|
-
if (ellipsis ||
|
70
|
-
renderNode = !isXMaxContent ? _jsx(Text, {
|
73
|
+
if (ellipsis || props !== null && props !== void 0 && props.isChanged) {
|
74
|
+
renderNode = !isXMaxContent ? /*#__PURE__*/_jsx(Text, {
|
71
75
|
style: {
|
72
76
|
width: currentValue === '-' ? 32.5 : width,
|
73
77
|
minWidth: minWidth
|
@@ -76,7 +80,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
76
80
|
tooltip: false
|
77
81
|
},
|
78
82
|
children: ellipsis ? currentValue : renderNode
|
79
|
-
}) : _jsx("div", {
|
83
|
+
}) : /*#__PURE__*/_jsx("div", {
|
80
84
|
style: {
|
81
85
|
minWidth: minWidth,
|
82
86
|
width: width,
|
@@ -88,7 +92,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
88
92
|
});
|
89
93
|
if ((props === null || props === void 0 ? void 0 : props.isChanged) === false) {
|
90
94
|
if (ellipsis) {
|
91
|
-
return _jsx(Tooltip, _objectSpread(_objectSpread({
|
95
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
92
96
|
title: currentValue,
|
93
97
|
onOpenChange: function onOpenChange(open) {
|
94
98
|
setState({
|
@@ -97,7 +101,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
97
101
|
},
|
98
102
|
open: tooltip
|
99
103
|
}, tooltipProps), {}, {
|
100
|
-
children: _jsx(Text, {
|
104
|
+
children: /*#__PURE__*/_jsx(Text, {
|
101
105
|
style: {
|
102
106
|
width: width,
|
103
107
|
minWidth: minWidth
|
@@ -120,7 +124,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
120
124
|
}
|
121
125
|
return !isEmpty(originalValue) ? originalValue : '-';
|
122
126
|
};
|
123
|
-
return _jsx(Tooltip, _objectSpread(_objectSpread({
|
127
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
124
128
|
className: cellDiffCls,
|
125
129
|
style: {
|
126
130
|
width: width,
|
@@ -132,17 +136,17 @@ var RenderColumn = function RenderColumn(props) {
|
|
132
136
|
destroyOnHidden: true,
|
133
137
|
placement: "topLeft",
|
134
138
|
autoAdjustOverflow: false,
|
135
|
-
title: _jsx(Space, {
|
139
|
+
title: /*#__PURE__*/_jsx(Space, {
|
136
140
|
direction: "vertical",
|
137
141
|
className: "changed-tooltip",
|
138
|
-
children:
|
139
|
-
children: [_jsxs(Space, {
|
142
|
+
children: props !== null && props !== void 0 && props.isChanged && !(props !== null && props !== void 0 && props.isAddCell) ? /*#__PURE__*/_jsxs(_Fragment, {
|
143
|
+
children: [/*#__PURE__*/_jsxs(Space, {
|
140
144
|
align: "start",
|
141
145
|
className: "original-value-container",
|
142
146
|
children: ["\u521D\u59CB\u503C\uFF1A", originalValueCalc()]
|
143
|
-
}), _jsx(Space, {
|
147
|
+
}), /*#__PURE__*/_jsx(Space, {
|
144
148
|
className: "current-value-container",
|
145
|
-
children: ellipsis ? _jsxs(Space, {
|
149
|
+
children: ellipsis ? /*#__PURE__*/_jsxs(Space, {
|
146
150
|
children: ["\u5F53\u524D\u503C\uFF1A", currentValue]
|
147
151
|
}) : null
|
148
152
|
})]
|
@@ -152,7 +156,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
152
156
|
children: renderNode
|
153
157
|
}));
|
154
158
|
}
|
155
|
-
return _jsx("div", {
|
159
|
+
return /*#__PURE__*/_jsx("div", {
|
156
160
|
className: cellDiffCls,
|
157
161
|
style: {
|
158
162
|
width: width,
|
@@ -162,9 +166,9 @@ var RenderColumn = function RenderColumn(props) {
|
|
162
166
|
});
|
163
167
|
}
|
164
168
|
if (copyable) {
|
165
|
-
return _jsx("span", {
|
169
|
+
return /*#__PURE__*/_jsx("span", {
|
166
170
|
className: "copyable-table-cell",
|
167
|
-
children: _jsx(Paragraph, {
|
171
|
+
children: /*#__PURE__*/_jsx(Paragraph, {
|
168
172
|
style: ellipsis ? {
|
169
173
|
width: width
|
170
174
|
} : undefined,
|
@@ -173,10 +177,10 @@ var RenderColumn = function RenderColumn(props) {
|
|
173
177
|
} : false,
|
174
178
|
copyable: {
|
175
179
|
text: node,
|
176
|
-
icon: [_jsx(ReactSVG, {
|
180
|
+
icon: [/*#__PURE__*/_jsx(ReactSVG, {
|
177
181
|
className: "drag-icon",
|
178
182
|
src: copySvg
|
179
|
-
}, "copy-icon"), _jsx(CheckOutlined, {}, "copied-icon")],
|
183
|
+
}, "copy-icon"), /*#__PURE__*/_jsx(CheckOutlined, {}, "copied-icon")],
|
180
184
|
tooltips: ['复制', '复制成功']
|
181
185
|
},
|
182
186
|
children: node
|
@@ -185,7 +189,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
185
189
|
}
|
186
190
|
if (ellipsis) {
|
187
191
|
if (!value) {
|
188
|
-
return _jsx("div", {
|
192
|
+
return /*#__PURE__*/_jsx("div", {
|
189
193
|
style: {
|
190
194
|
minWidth: minWidth
|
191
195
|
},
|
@@ -193,7 +197,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
193
197
|
});
|
194
198
|
}
|
195
199
|
var calculatedWidth = updateCalculatedWidth(textRef.current);
|
196
|
-
return _jsx(Tooltip, _objectSpread(_objectSpread({
|
200
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
197
201
|
title: value,
|
198
202
|
destroyOnHidden: true,
|
199
203
|
onOpenChange: function onOpenChange() {
|
@@ -206,7 +210,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
206
210
|
getPopupContainer: function getPopupContainer() {
|
207
211
|
return document.body;
|
208
212
|
},
|
209
|
-
children: _jsx(Text, {
|
213
|
+
children: /*#__PURE__*/_jsx(Text, {
|
210
214
|
ref: textRef,
|
211
215
|
style: {
|
212
216
|
width: calculatedWidth,
|
@@ -219,7 +223,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
219
223
|
})
|
220
224
|
}));
|
221
225
|
}
|
222
|
-
return _jsx("div", {
|
226
|
+
return /*#__PURE__*/_jsx("div", {
|
223
227
|
style: {
|
224
228
|
minWidth: minWidth
|
225
229
|
},
|
@@ -1,19 +1,20 @@
|
|
1
|
-
import { jsx as _jsx
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
2
3
|
var RenderEmptyText = function RenderEmptyText(props) {
|
3
4
|
var _locale$ProTable;
|
4
5
|
var _ref = props || {},
|
5
6
|
empty = _ref.empty,
|
6
7
|
locale = _ref.locale,
|
7
8
|
emptyText = _ref.emptyText;
|
8
|
-
return _jsxs("div", {
|
9
|
+
return /*#__PURE__*/_jsxs("div", {
|
9
10
|
className: "pro-table-empty",
|
10
|
-
children: [_jsx("div", {
|
11
|
+
children: [/*#__PURE__*/_jsx("div", {
|
11
12
|
className: "empty-image",
|
12
|
-
children: _jsx("img", {
|
13
|
+
children: /*#__PURE__*/_jsx("img", {
|
13
14
|
src: empty,
|
14
|
-
alt: locale === null || locale === void 0
|
15
|
+
alt: locale === null || locale === void 0 || (_locale$ProTable = locale.ProTable) === null || _locale$ProTable === void 0 ? void 0 : _locale$ProTable.noData
|
15
16
|
})
|
16
|
-
}), _jsx("div", {
|
17
|
+
}), /*#__PURE__*/_jsx("div", {
|
17
18
|
className: "empty-description",
|
18
19
|
children: typeof emptyText === 'function' ? emptyText() : emptyText
|
19
20
|
})]
|
@@ -6,8 +6,8 @@ var RenderFooter = function RenderFooter(props) {
|
|
6
6
|
footerRender = _ref2.footerRender,
|
7
7
|
pagination = _ref2.pagination,
|
8
8
|
_dataSource = _ref2._dataSource;
|
9
|
-
return footerRender ? _jsx("div", {
|
10
|
-
className: "pro-table-footer ".concat(pagination && !!(_dataSource
|
9
|
+
return footerRender ? /*#__PURE__*/_jsx("div", {
|
10
|
+
className: "pro-table-footer ".concat(pagination && !!(_dataSource !== null && _dataSource !== void 0 && _dataSource.length) ? 'has-page' : 'no-page'),
|
11
11
|
children: typeof footerRender === 'function' ? footerRender() : footerRender
|
12
12
|
}) : null;
|
13
13
|
};
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
2
|
-
import _get from "lodash/get";
|
3
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
4
2
|
import { Table } from 'antd';
|
3
|
+
import { get } from 'lodash';
|
5
4
|
import { tools } from '@zat-design/utils';
|
6
|
-
import { valueTypeRender } from
|
5
|
+
import { valueTypeRender } from "../../../ProUtils/utils";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
8
|
var renderSummary = function renderSummary(props) {
|
8
9
|
var summary = props.summary,
|
9
10
|
dataSource = props.dataSource;
|
@@ -14,12 +15,12 @@ var renderSummary = function renderSummary(props) {
|
|
14
15
|
_ref$fixed = _ref.fixed,
|
15
16
|
fixed = _ref$fixed === void 0 ? true : _ref$fixed;
|
16
17
|
// 没有数据时,不展示合计栏
|
17
|
-
if (!(dataSource
|
18
|
+
if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
|
18
19
|
return null;
|
19
20
|
}
|
20
|
-
return _typeof(summary) === 'object' ? _jsx(Table.Summary, {
|
21
|
+
return _typeof(summary) === 'object' ? /*#__PURE__*/_jsx(Table.Summary, {
|
21
22
|
fixed: fixed,
|
22
|
-
children: _jsx(Table.Summary.Row, {
|
23
|
+
children: /*#__PURE__*/_jsx(Table.Summary.Row, {
|
23
24
|
children: columns === null || columns === void 0 ? void 0 : columns.map(function (_ref2) {
|
24
25
|
var key = _ref2.key,
|
25
26
|
index = _ref2.index,
|
@@ -35,14 +36,14 @@ var renderSummary = function renderSummary(props) {
|
|
35
36
|
} else if (total && key) {
|
36
37
|
var _dataSource$reduce;
|
37
38
|
var format = valueTypeRender === null || valueTypeRender === void 0 ? void 0 : valueTypeRender[valueType];
|
38
|
-
var sum = dataSource === null || dataSource === void 0
|
39
|
-
var
|
40
|
-
return tools.calc(pre, '+', (
|
39
|
+
var sum = dataSource === null || dataSource === void 0 || (_dataSource$reduce = dataSource.reduce) === null || _dataSource$reduce === void 0 ? void 0 : _dataSource$reduce.call(dataSource, function (pre, cur) {
|
40
|
+
var _get;
|
41
|
+
return tools.calc(pre, '+', (_get = get(cur, key)) !== null && _get !== void 0 ? _get : 0);
|
41
42
|
}, 0);
|
42
43
|
text = format ? format(sum, precision !== null && precision !== void 0 ? precision : 2) : sum;
|
43
44
|
}
|
44
45
|
var _key = key;
|
45
|
-
return _jsxs(Table.Summary.Cell, {
|
46
|
+
return /*#__PURE__*/_jsxs(Table.Summary.Cell, {
|
46
47
|
index: index,
|
47
48
|
colSpan: colSpan,
|
48
49
|
children: [prefix, text, suffix]
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
1
|
import { Button } from 'antd';
|
3
2
|
import { ReactSVG } from 'react-svg';
|
4
|
-
import { ProTreeModal } from
|
3
|
+
import { ProTreeModal } from "../../../index";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
6
|
var RenderTableHeader = function RenderTableHeader(props) {
|
6
7
|
var _locale$ProTable, _locale$ProTable2, _locale$ProTable3;
|
7
8
|
var dataSource = props.dataSource;
|
@@ -16,27 +17,28 @@ var RenderTableHeader = function RenderTableHeader(props) {
|
|
16
17
|
checkColumns = _ref.checkColumns,
|
17
18
|
handleColumnConfig = _ref.handleColumnConfig,
|
18
19
|
customColumnSvg = _ref.customColumnSvg;
|
20
|
+
|
19
21
|
// 没有数据时,不展示tableHeader
|
20
22
|
if (!(headerRender || columnConfig || resizeColumn)) {
|
21
23
|
return null;
|
22
24
|
}
|
23
|
-
return _jsxs("div", {
|
25
|
+
return /*#__PURE__*/_jsxs("div", {
|
24
26
|
className: "column-config",
|
25
|
-
children: [_jsx("div", {
|
27
|
+
children: [/*#__PURE__*/_jsx("div", {
|
26
28
|
className: "left-contain",
|
27
29
|
children: headerRender ? typeof headerRender === 'function' ? headerRender() : headerRender : null
|
28
|
-
}), _jsxs("div", {
|
30
|
+
}), /*#__PURE__*/_jsxs("div", {
|
29
31
|
className: "right-actions",
|
30
|
-
children: [resizeColumn && _jsx(Button, {
|
31
|
-
icon: _jsx(ReactSVG, {
|
32
|
+
children: [resizeColumn && /*#__PURE__*/_jsx(Button, {
|
33
|
+
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
32
34
|
className: "anticon",
|
33
35
|
wrapper: "span",
|
34
36
|
src: resetSvg
|
35
37
|
}),
|
36
38
|
onClick: resetColumnWidth,
|
37
|
-
children: locale === null || locale === void 0
|
38
|
-
}), columnConfig && _jsx(ProTreeModal, {
|
39
|
-
title: locale === null || locale === void 0
|
39
|
+
children: locale === null || locale === void 0 || (_locale$ProTable = locale.ProTable) === null || _locale$ProTable === void 0 ? void 0 : _locale$ProTable.resetColumnWidth
|
40
|
+
}), columnConfig && /*#__PURE__*/_jsx(ProTreeModal, {
|
41
|
+
title: locale === null || locale === void 0 || (_locale$ProTable2 = locale.ProTable) === null || _locale$ProTable2 === void 0 ? void 0 : _locale$ProTable2.customColumns,
|
40
42
|
span: 8,
|
41
43
|
mode: "list",
|
42
44
|
draggable: true,
|
@@ -44,14 +46,14 @@ var RenderTableHeader = function RenderTableHeader(props) {
|
|
44
46
|
value: checkColumns,
|
45
47
|
allValue: "all",
|
46
48
|
onChange: handleColumnConfig,
|
47
|
-
trigger: _jsx(Button, {
|
49
|
+
trigger: /*#__PURE__*/_jsx(Button, {
|
48
50
|
className: "custom-column-btn",
|
49
|
-
icon: _jsx(ReactSVG, {
|
51
|
+
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
50
52
|
className: "anticon",
|
51
53
|
wrapper: "span",
|
52
54
|
src: customColumnSvg
|
53
55
|
}),
|
54
|
-
children: locale === null || locale === void 0
|
56
|
+
children: locale === null || locale === void 0 || (_locale$ProTable3 = locale.ProTable) === null || _locale$ProTable3 === void 0 ? void 0 : _locale$ProTable3.customColumns
|
55
57
|
})
|
56
58
|
})]
|
57
59
|
})]
|
@@ -2,10 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
import { Tabs, Form } from 'antd';
|
7
6
|
import { useMemo, useState, useEffect, memo } from 'react';
|
8
|
-
import useEnum from
|
7
|
+
import useEnum from "../../../ProEnum/hooks/useEnum";
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
var RenderTabs = function RenderTabs(props) {
|
10
10
|
var code = props.code,
|
11
11
|
_props$dataSource = props.dataSource,
|
@@ -26,6 +26,7 @@ var RenderTabs = function RenderTabs(props) {
|
|
26
26
|
_useEnum2 = _slicedToArray(_useEnum, 1),
|
27
27
|
options = _useEnum2[0];
|
28
28
|
var fieldValue = Form.useWatch(name, form);
|
29
|
+
|
29
30
|
// 使用useMemo计算派生状态
|
30
31
|
var tabItems = useMemo(function () {
|
31
32
|
var defaultItems = [].concat(_toConsumableArray(dataSource), _toConsumableArray(options || []));
|
@@ -54,12 +55,12 @@ var RenderTabs = function RenderTabs(props) {
|
|
54
55
|
}, [dataSource, options, transformResponse]);
|
55
56
|
useEffect(function () {
|
56
57
|
var _tabItems$;
|
57
|
-
setActiveKey(fieldValue || (tabItems === null || tabItems === void 0
|
58
|
+
setActiveKey(fieldValue || (tabItems === null || tabItems === void 0 || (_tabItems$ = tabItems[0]) === null || _tabItems$ === void 0 ? void 0 : _tabItems$.key));
|
58
59
|
}, [fieldValue]);
|
59
|
-
if (!(tabItems
|
60
|
+
if (!(tabItems !== null && tabItems !== void 0 && tabItems.length)) {
|
60
61
|
return null;
|
61
62
|
}
|
62
|
-
return _jsx(Tabs, _objectSpread(_objectSpread({
|
63
|
+
return /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({
|
63
64
|
className: "pro-table-tabs",
|
64
65
|
onChange: function onChange(key) {
|
65
66
|
var fieldsValues = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
@@ -69,7 +70,7 @@ var RenderTabs = function RenderTabs(props) {
|
|
69
70
|
if (transformParams && typeof transformParams === 'function') {
|
70
71
|
params = transformParams(params);
|
71
72
|
}
|
72
|
-
onSearch === null || onSearch === void 0
|
73
|
+
onSearch === null || onSearch === void 0 || onSearch(params);
|
73
74
|
},
|
74
75
|
type: "card"
|
75
76
|
}, tabsProps), {}, {
|
@@ -2,11 +2,11 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
4
|
var _excluded = ["onDrag", "width", "minwidth"];
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
import { useState } from 'react';
|
7
6
|
import { Resizable } from 'react-resizable';
|
8
7
|
import classnames from 'classnames';
|
9
|
-
import { getParentElement } from
|
8
|
+
import { getParentElement } from "../FormatColumn";
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
10
10
|
var ResizableTitle = function ResizableTitle(props) {
|
11
11
|
var _restProps$className;
|
12
12
|
var onDrag = props.onDrag,
|
@@ -14,20 +14,21 @@ var ResizableTitle = function ResizableTitle(props) {
|
|
14
14
|
_props$minwidth = props.minwidth,
|
15
15
|
minwidth = _props$minwidth === void 0 ? 50 : _props$minwidth,
|
16
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
17
|
+
|
17
18
|
// 添加偏移量
|
18
19
|
var _useState = useState(0),
|
19
20
|
_useState2 = _slicedToArray(_useState, 2),
|
20
21
|
offset = _useState2[0],
|
21
22
|
setOffset = _useState2[1];
|
22
|
-
if (restProps
|
23
|
-
return _jsx("th", _objectSpread({}, restProps));
|
23
|
+
if (restProps !== null && restProps !== void 0 && (_restProps$className = restProps.className) !== null && _restProps$className !== void 0 && _restProps$className.includes('ant-table-selection-column')) {
|
24
|
+
return /*#__PURE__*/_jsx("th", _objectSpread({}, restProps));
|
24
25
|
}
|
25
26
|
var ResizableComponent = Resizable;
|
26
|
-
return _jsx(ResizableComponent, {
|
27
|
+
return /*#__PURE__*/_jsx(ResizableComponent, {
|
27
28
|
width: Number(width) + Number(offset),
|
28
29
|
minConstraints: [minwidth, 0],
|
29
30
|
height: 0,
|
30
|
-
handle: _jsx("span", {
|
31
|
+
handle: /*#__PURE__*/_jsx("span", {
|
31
32
|
className: classnames(['react-resizable-handle', offset && 'active']),
|
32
33
|
style: {
|
33
34
|
transform: "translateX(".concat(offset, "px)")
|
@@ -70,11 +71,11 @@ var ResizableTitle = function ResizableTitle(props) {
|
|
70
71
|
draggableOpts: {
|
71
72
|
enableUserSelectHack: false
|
72
73
|
},
|
73
|
-
children: _jsx("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
74
|
+
children: /*#__PURE__*/_jsx("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
74
75
|
style: _objectSpread({
|
75
76
|
overflow: 'visible'
|
76
77
|
}, restProps.style),
|
77
|
-
children: _jsx("div", {
|
78
|
+
children: /*#__PURE__*/_jsx("div", {
|
78
79
|
className: "pro-table-th-cell",
|
79
80
|
children: restProps.children
|
80
81
|
})
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
1
|
import { Tooltip } from 'antd';
|
3
2
|
import { ReactSVG } from 'react-svg';
|
4
|
-
import tipSvg from
|
3
|
+
import tipSvg from "../../../assets/tip.svg";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
6
|
var TooltipTitle = function TooltipTitle(props) {
|
6
7
|
var title = props.title,
|
7
8
|
tooltip = props.tooltip;
|
8
9
|
var _ref = tooltip || {},
|
9
10
|
tooltipTitle = _ref.title,
|
10
11
|
icon = _ref.icon;
|
11
|
-
return _jsxs("span", {
|
12
|
+
return /*#__PURE__*/_jsxs("span", {
|
12
13
|
className: "pro-table-tooltip",
|
13
|
-
children: [title, _jsx(Tooltip, {
|
14
|
+
children: [title, /*#__PURE__*/_jsx(Tooltip, {
|
14
15
|
title: tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : tooltip,
|
15
|
-
children: _jsx(ReactSVG, {
|
16
|
+
children: /*#__PURE__*/_jsx(ReactSVG, {
|
16
17
|
className: "icon-tip",
|
17
18
|
src: icon || tipSvg
|
18
19
|
})
|
@@ -2,29 +2,34 @@
|
|
2
2
|
* 表格可伸缩列组件
|
3
3
|
* @description 实现表格列宽可调整功能
|
4
4
|
*/
|
5
|
-
export { default as TableResizable } from
|
5
|
+
export { default as TableResizable } from "./TableResizable";
|
6
|
+
|
6
7
|
/**
|
7
8
|
* 表格空数据渲染组件
|
8
9
|
* @description 当表格数据为空时的显示内容
|
9
10
|
*/
|
10
|
-
export { default as RenderEmptyText } from
|
11
|
+
export { default as RenderEmptyText } from "./RenderEmptyText";
|
12
|
+
|
11
13
|
/**
|
12
14
|
* 表格汇总行组件
|
13
15
|
* @description 用于渲染表格底部的汇总信息
|
14
16
|
*/
|
15
|
-
export { default as RenderSummary } from
|
17
|
+
export { default as RenderSummary } from "./RenderSummary";
|
18
|
+
|
16
19
|
/**
|
17
20
|
* 表格头部渲染组件
|
18
21
|
* @description 自定义表格头部区域,支持自定义内容和操作按钮
|
19
22
|
*/
|
20
|
-
export { default as RenderTableHeader } from
|
23
|
+
export { default as RenderTableHeader } from "./RenderTableHeader";
|
24
|
+
|
21
25
|
/**
|
22
26
|
* 表格底部渲染组件
|
23
27
|
* @description 自定义表格底部区域,支持添加额外操作按钮
|
24
28
|
*/
|
25
|
-
export { default as RenderFooter } from
|
29
|
+
export { default as RenderFooter } from "./RenderFooter";
|
30
|
+
|
26
31
|
/**
|
27
32
|
* 表格标签页组件
|
28
33
|
* @description 实现表格顶部的标签页切换功能,用于数据分类展示
|
29
34
|
*/
|
30
|
-
export { default as RenderTabs } from
|
35
|
+
export { default as RenderTabs } from "./RenderTabs";
|