@zat-design/sisyphus-react 3.13.19-beta.1 → 3.13.19-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +1 -6344
- package/dist/index.min.js +1 -0
- package/dist/less.esm.css +1 -5768
- package/dist/less.min.js +1 -0
- package/es/FormsProvider/index.js +9 -7
- package/es/ProAction/components/CheckModalContent/index.js +14 -14
- package/es/ProAction/index.js +46 -47
- package/es/ProConfigProvider/index.js +26 -20
- package/es/ProDownload/index.js +66 -73
- package/es/ProDownload/utils.js +26 -23
- package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
- package/es/ProDrawerForm/components/ProModal/index.js +25 -23
- package/es/ProDrawerForm/components/index.js +2 -2
- package/es/ProDrawerForm/index.js +19 -21
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +30 -26
- package/es/ProEditLabel/index.js +49 -36
- package/es/ProEditLabel/utils/index.js +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +83 -76
- package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
- package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
- package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
- package/es/ProEditTable/components/RcTable/index.js +3 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -57
- package/es/ProEditTable/components/RenderField/index.js +151 -145
- package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
- package/es/ProEditTable/components/Summary/index.js +22 -21
- package/es/ProEditTable/components/Validator/index.js +11 -10
- package/es/ProEditTable/components/index.js +5 -5
- package/es/ProEditTable/index.d.ts +1 -1
- package/es/ProEditTable/index.js +170 -173
- package/es/ProEditTable/utils/config.js +42 -46
- package/es/ProEditTable/utils/diffOriginal.js +34 -19
- package/es/ProEditTable/utils/getDefaultProps.js +12 -13
- package/es/ProEditTable/utils/index.js +102 -99
- package/es/ProEditTable/utils/tools.js +88 -91
- package/es/ProEditTable/utils/transform.js +7 -11
- package/es/ProEditTable/utils/useEditTableError.js +22 -13
- package/es/ProEnum/components/Group.js +23 -27
- package/es/ProEnum/components/Tag.js +14 -16
- package/es/ProEnum/hooks/useEnum.js +32 -14
- package/es/ProEnum/hooks/useEnumRequest.js +42 -42
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +17 -19
- package/es/ProEnum/index.js +80 -89
- package/es/ProEnum/utils/eventCenter.js +23 -32
- package/es/ProEnum/utils/frequentEnum.js +16 -4
- package/es/ProEnum/utils/getEnumLabel.js +16 -21
- package/es/ProEnum/utils/index.js +12 -7
- package/es/ProForm/components/Container.js +8 -6
- package/es/ProForm/components/FormFooter/index.js +21 -19
- package/es/ProForm/components/base/Checkbox/index.js +16 -15
- package/es/ProForm/components/base/DatePicker/index.js +23 -20
- package/es/ProForm/components/base/Input/index.js +20 -18
- package/es/ProForm/components/base/InputNumber/index.js +57 -53
- package/es/ProForm/components/base/Radio/index.js +15 -15
- package/es/ProForm/components/base/RangePicker/index.js +24 -29
- package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
- package/es/ProForm/components/base/Select/index.js +17 -15
- package/es/ProForm/components/base/Switch/index.js +16 -15
- package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
- package/es/ProForm/components/base/TextArea/index.js +18 -17
- package/es/ProForm/components/base/TimePicker/index.js +10 -9
- package/es/ProForm/components/combination/Container/index.js +25 -23
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
- package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
- package/es/ProForm/components/combination/FormList/index.js +43 -51
- package/es/ProForm/components/combination/FormList/utils.js +9 -9
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
- package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
- package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
- package/es/ProForm/components/combination/Group/index.js +38 -37
- package/es/ProForm/components/combination/Group/utils.js +56 -50
- package/es/ProForm/components/combination/ProCascader/index.js +81 -85
- package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
- package/es/ProForm/components/combination/ProCombination/index.js +41 -37
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
- package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
- package/es/ProForm/components/combination/ProRangeLimit/index.js +39 -39
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.js +43 -40
- package/es/ProForm/components/index.d.ts +1 -0
- package/es/ProForm/components/index.js +40 -35
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +30 -28
- package/es/ProForm/components/old/EnumSelect/index.js +55 -62
- package/es/ProForm/components/old/InputRange/index.js +17 -16
- package/es/ProForm/components/old/InputWithSuffix/index.js +6 -5
- package/es/ProForm/components/old/ProAddress/index.js +53 -75
- package/es/ProForm/components/old/ProCertNo/index.js +17 -17
- package/es/ProForm/components/old/ProCertValidity/index.js +19 -21
- package/es/ProForm/components/old/ProRangeBox/index.js +25 -24
- package/es/ProForm/components/render/ChangedWrapper.js +34 -33
- package/es/ProForm/components/render/ConfirmWrapper.js +16 -18
- package/es/ProForm/components/render/Render.js +150 -135
- package/es/ProForm/components/render/RenderFields.js +65 -50
- package/es/ProForm/components/render/propsType.js +25 -0
- package/es/ProForm/index.js +83 -70
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/propsType.js +5 -1
- package/es/ProForm/utils/diffOriginal.js +30 -16
- package/es/ProForm/utils/getDefaultProps.js +10 -10
- package/es/ProForm/utils/index.js +105 -110
- package/es/ProForm/utils/processDependencies.js +15 -5
- package/es/ProForm/utils/rulesCreator.js +21 -22
- package/es/ProForm/utils/transformNames.js +7 -6
- package/es/ProForm/utils/transformValue.js +16 -13
- package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
- package/es/ProForm/utils/useFieldProps.js +1 -3
- package/es/ProForm/utils/useForm.js +36 -34
- package/es/ProForm/utils/useRules.js +28 -31
- package/es/ProForm/utils/useShouldUpdate.js +83 -86
- package/es/ProForm/utils/useWatch.js +36 -14
- package/es/ProForm/utils/valueType.js +51 -52
- package/es/ProIcon/config/index.js +2 -0
- package/es/ProIcon/index.js +53 -49
- package/es/ProIcon/utils/index.js +8 -9
- package/es/ProLayout/components/Layout/Header/index.js +13 -11
- package/es/ProLayout/components/Layout/Icon/Icon.js +7 -7
- package/es/ProLayout/components/Layout/Icon/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +42 -40
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +51 -52
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +10 -9
- package/es/ProLayout/components/Layout/Menu/index.js +20 -18
- package/es/ProLayout/components/Layout/Notice/index.js +12 -11
- package/es/ProLayout/components/Layout/index.js +4 -4
- package/es/ProLayout/components/ProCollapse/index.js +35 -32
- package/es/ProLayout/components/ProFooter/index.js +13 -15
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +9 -9
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +8 -7
- package/es/ProLayout/components/ProHeader/components/index.js +2 -2
- package/es/ProLayout/components/ProHeader/index.js +129 -118
- package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
- package/es/ProLayout/components/index.js +3 -3
- package/es/ProLayout/index.d.ts +1 -1
- package/es/ProLayout/index.js +28 -25
- package/es/ProLayout/utils/index.js +37 -35
- package/es/ProSelect/components/AdaptiveTooltip.js +10 -11
- package/es/ProSelect/index.js +87 -99
- package/es/ProSelect/utils/index.js +27 -33
- package/es/ProStep/components/Anchor/index.d.ts +1 -0
- package/es/ProStep/components/Anchor/index.js +26 -25
- package/es/ProStep/components/Item/index.d.ts +1 -0
- package/es/ProStep/components/Item/index.js +26 -22
- package/es/ProStep/components/Listener/index.js +11 -15
- package/es/ProStep/components/Step/index.js +24 -25
- package/es/ProStep/index.js +51 -53
- package/es/ProStep/utils/index.js +13 -12
- package/es/ProStepTab/index.js +59 -37
- package/es/ProTable/components/FormatColumn/index.js +106 -110
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +36 -50
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +24 -24
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +8 -10
- package/es/ProTable/components/RcTable/index.js +2 -2
- package/es/ProTable/components/RenderColumn/index.js +51 -51
- package/es/ProTable/components/RenderEmptyText/index.js +8 -7
- package/es/ProTable/components/RenderFooter/index.js +3 -3
- package/es/ProTable/components/RenderSummary/index.js +13 -13
- package/es/ProTable/components/RenderTableHeader/index.js +16 -14
- package/es/ProTable/components/RenderTabs/index.js +28 -33
- package/es/ProTable/components/TableResizable/index.js +17 -16
- package/es/ProTable/components/TooltipTitle/index.js +7 -6
- package/es/ProTable/components/index.js +11 -6
- package/es/ProTable/hooks/useAntdTable.js +106 -119
- package/es/ProTable/index.js +158 -176
- package/es/ProTable/utils/index.js +25 -21
- package/es/ProTabs/components/Card/index.js +15 -14
- package/es/ProTabs/components/index.js +1 -1
- package/es/ProTabs/index.js +24 -25
- package/es/ProThemeTools/component/ProTools/index.js +69 -68
- package/es/ProThemeTools/component/index.js +1 -1
- package/es/ProThemeTools/index.js +47 -33
- package/es/ProThemeTools/utils/index.js +20 -17
- package/es/ProTooltip/index.js +44 -46
- package/es/ProTree/components/AdaptiveTooltip.js +5 -7
- package/es/ProTree/components/CloseIcon.js +5 -5
- package/es/ProTree/components/List.js +22 -24
- package/es/ProTree/components/ProTree.js +84 -102
- package/es/ProTree/components/ProTreeSelect/index.js +128 -119
- package/es/ProTree/components/SearchTitle.js +10 -9
- package/es/ProTree/components/Tree.js +57 -58
- package/es/ProTree/components/index.js +4 -4
- package/es/ProTree/index.js +6 -6
- package/es/ProTree/utils.js +29 -22
- package/es/ProTreeModal/components/Cascader.js +31 -33
- package/es/ProTreeModal/components/CloseIcon.js +5 -5
- package/es/ProTreeModal/components/List.js +74 -93
- package/es/ProTreeModal/components/SearchTitle.js +5 -4
- package/es/ProTreeModal/components/SortableItem.js +14 -14
- package/es/ProTreeModal/components/Tree.js +49 -53
- package/es/ProTreeModal/components/Trigger.js +29 -28
- package/es/ProTreeModal/components/index.js +6 -6
- package/es/ProTreeModal/index.js +166 -206
- package/es/ProTreeModal/utils.js +37 -33
- package/es/ProUpload/components/ButtonRender.js +33 -36
- package/es/ProUpload/components/DragRender.js +54 -51
- package/es/ProUpload/components/DraggableUploadListItem.js +5 -4
- package/es/ProUpload/components/Example.js +13 -12
- package/es/ProUpload/components/FileItem.js +63 -58
- package/es/ProUpload/components/ImageRender.js +98 -100
- package/es/ProUpload/index.js +75 -82
- package/es/ProUpload/uitls.js +3 -3
- package/es/ProUtils/utils/index.js +10 -14
- package/es/ProViewer/index.js +29 -25
- package/es/ProViewer/propsType.js +0 -1
- package/es/ProWaterMark/index.js +5 -4
- package/es/index.d.ts +1 -1
- package/es/index.js +38 -29
- package/es/locale/index.js +7 -4
- package/es/old/ProCertValidity/index.js +19 -21
- package/es/old/ProEditableTable/index.js +156 -156
- package/es/old/ProEditableTable/utils.js +61 -63
- package/es/tokens.js +1 -0
- package/es/utils/index.js +12 -12
- package/lib/FormsProvider/index.js +11 -7
- package/lib/ProAction/components/CheckModalContent/index.js +11 -13
- package/lib/ProAction/index.js +40 -43
- package/lib/ProConfigProvider/index.js +24 -17
- package/lib/ProDownload/index.js +65 -71
- package/lib/ProDownload/utils.js +25 -22
- package/lib/ProDrawerForm/components/ProDrawer/index.js +39 -38
- package/lib/ProDrawerForm/components/ProModal/index.js +23 -22
- package/lib/ProDrawerForm/index.js +18 -18
- package/lib/ProDrawerForm/utils/index.js +3 -2
- package/lib/ProEditLabel/components/RenderProForm.js +26 -24
- package/lib/ProEditLabel/index.js +46 -35
- package/lib/ProEditLabel/utils/index.js +6 -5
- package/lib/ProEditTable/components/ActionButton/index.js +79 -74
- package/lib/ProEditTable/components/RcTable/BaseTable.js +21 -23
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +32 -40
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +3 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +62 -59
- package/lib/ProEditTable/components/RenderField/index.js +137 -132
- package/lib/ProEditTable/components/RenderToolbar/index.js +34 -41
- package/lib/ProEditTable/components/Summary/index.js +20 -20
- package/lib/ProEditTable/components/Validator/index.js +10 -10
- package/lib/ProEditTable/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +159 -164
- package/lib/ProEditTable/utils/config.js +40 -44
- package/lib/ProEditTable/utils/diffOriginal.js +36 -21
- package/lib/ProEditTable/utils/getDefaultProps.js +14 -15
- package/lib/ProEditTable/utils/index.js +97 -97
- package/lib/ProEditTable/utils/tools.js +96 -91
- package/lib/ProEditTable/utils/transform.js +7 -11
- package/lib/ProEditTable/utils/useEditTableError.js +22 -13
- package/lib/ProEnum/components/Group.js +23 -27
- package/lib/ProEnum/components/Tag.js +14 -16
- package/lib/ProEnum/hooks/useEnum.js +30 -12
- package/lib/ProEnum/hooks/useEnumRequest.js +39 -39
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +16 -18
- package/lib/ProEnum/index.js +68 -78
- package/lib/ProEnum/utils/eventCenter.js +23 -32
- package/lib/ProEnum/utils/frequentEnum.js +14 -3
- package/lib/ProEnum/utils/getEnumLabel.js +15 -21
- package/lib/ProEnum/utils/index.js +12 -7
- package/lib/ProForm/components/Container.js +7 -5
- package/lib/ProForm/components/FormFooter/index.js +19 -17
- package/lib/ProForm/components/base/Checkbox/index.js +14 -13
- package/lib/ProForm/components/base/DatePicker/index.js +20 -17
- package/lib/ProForm/components/base/Input/index.js +15 -15
- package/lib/ProForm/components/base/InputNumber/index.js +51 -48
- package/lib/ProForm/components/base/Radio/index.js +13 -13
- package/lib/ProForm/components/base/RangePicker/index.js +19 -22
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
- package/lib/ProForm/components/base/Select/index.js +14 -12
- package/lib/ProForm/components/base/Switch/index.js +11 -11
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
- package/lib/ProForm/components/base/TextArea/index.js +14 -13
- package/lib/ProForm/components/base/TimePicker/index.js +6 -5
- package/lib/ProForm/components/combination/Container/index.js +22 -21
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
- package/lib/ProForm/components/combination/FormList/index.js +35 -43
- package/lib/ProForm/components/combination/FormList/utils.js +11 -10
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
- package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
- package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
- package/lib/ProForm/components/combination/Group/index.js +34 -35
- package/lib/ProForm/components/combination/Group/utils.js +62 -50
- package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
- package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
- package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
- package/lib/ProForm/components/index.d.ts +1 -0
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
- package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
- package/lib/ProForm/components/old/InputRange/index.js +16 -16
- package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
- package/lib/ProForm/components/old/ProAddress/index.js +53 -75
- package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
- package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
- package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
- package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
- package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
- package/lib/ProForm/components/render/Render.js +138 -125
- package/lib/ProForm/components/render/RenderFields.js +57 -43
- package/lib/ProForm/components/render/propsType.js +26 -1
- package/lib/ProForm/index.js +74 -61
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.js +5 -1
- package/lib/ProForm/utils/diffOriginal.js +30 -17
- package/lib/ProForm/utils/getDefaultProps.js +12 -12
- package/lib/ProForm/utils/index.js +127 -106
- package/lib/ProForm/utils/processDependencies.js +15 -6
- package/lib/ProForm/utils/rulesCreator.js +21 -21
- package/lib/ProForm/utils/transformNames.js +6 -6
- package/lib/ProForm/utils/transformValue.js +14 -11
- package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
- package/lib/ProForm/utils/useFieldProps.js +2 -3
- package/lib/ProForm/utils/useForm.js +33 -31
- package/lib/ProForm/utils/useRules.js +25 -28
- package/lib/ProForm/utils/useShouldUpdate.js +82 -85
- package/lib/ProForm/utils/useWatch.js +36 -14
- package/lib/ProForm/utils/valueType.js +52 -52
- package/lib/ProIcon/config/index.js +2 -0
- package/lib/ProIcon/index.js +47 -44
- package/lib/ProIcon/utils/index.js +10 -8
- package/lib/ProLayout/components/Layout/Header/index.js +10 -10
- package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
- package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
- package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
- package/lib/ProLayout/components/ProCollapse/index.js +32 -30
- package/lib/ProLayout/components/ProFooter/index.js +14 -16
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
- package/lib/ProLayout/components/ProHeader/index.js +131 -120
- package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
- package/lib/ProLayout/index.d.ts +1 -1
- package/lib/ProLayout/index.js +22 -21
- package/lib/ProLayout/utils/index.js +42 -33
- package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
- package/lib/ProSelect/index.js +82 -93
- package/lib/ProSelect/utils/index.js +29 -34
- package/lib/ProStep/components/Anchor/index.d.ts +1 -0
- package/lib/ProStep/components/Anchor/index.js +25 -24
- package/lib/ProStep/components/Item/index.d.ts +1 -0
- package/lib/ProStep/components/Item/index.js +24 -20
- package/lib/ProStep/components/Listener/index.js +9 -13
- package/lib/ProStep/components/Step/index.js +20 -21
- package/lib/ProStep/index.js +45 -49
- package/lib/ProStep/utils/index.js +16 -12
- package/lib/ProStepTab/index.js +60 -38
- package/lib/ProTable/components/FormatColumn/index.js +100 -104
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
- package/lib/ProTable/components/RenderColumn/index.js +46 -48
- package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
- package/lib/ProTable/components/RenderFooter/index.js +3 -3
- package/lib/ProTable/components/RenderSummary/index.js +11 -12
- package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
- package/lib/ProTable/components/RenderTabs/index.js +27 -32
- package/lib/ProTable/components/TableResizable/index.js +16 -15
- package/lib/ProTable/components/TooltipTitle/index.js +5 -5
- package/lib/ProTable/hooks/useAntdTable.js +103 -116
- package/lib/ProTable/index.js +149 -169
- package/lib/ProTable/utils/index.js +33 -22
- package/lib/ProTabs/components/Card/index.js +14 -14
- package/lib/ProTabs/index.js +24 -24
- package/lib/ProThemeTools/component/ProTools/index.js +66 -65
- package/lib/ProThemeTools/index.js +43 -29
- package/lib/ProThemeTools/utils/index.js +25 -18
- package/lib/ProTooltip/index.js +44 -46
- package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
- package/lib/ProTree/components/CloseIcon.js +5 -5
- package/lib/ProTree/components/List.js +18 -22
- package/lib/ProTree/components/ProTree.js +77 -96
- package/lib/ProTree/components/ProTreeSelect/index.js +126 -116
- package/lib/ProTree/components/SearchTitle.js +8 -8
- package/lib/ProTree/components/Tree.js +53 -55
- package/lib/ProTree/index.js +4 -4
- package/lib/ProTree/utils.js +34 -25
- package/lib/ProTreeModal/components/Cascader.js +28 -32
- package/lib/ProTreeModal/components/CloseIcon.js +5 -5
- package/lib/ProTreeModal/components/List.js +69 -89
- package/lib/ProTreeModal/components/SearchTitle.js +4 -4
- package/lib/ProTreeModal/components/SortableItem.js +11 -12
- package/lib/ProTreeModal/components/Tree.js +44 -49
- package/lib/ProTreeModal/components/Trigger.js +26 -26
- package/lib/ProTreeModal/index.js +157 -199
- package/lib/ProTreeModal/utils.js +43 -35
- package/lib/ProUpload/components/ButtonRender.js +29 -33
- package/lib/ProUpload/components/DragRender.js +50 -48
- package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
- package/lib/ProUpload/components/Example.js +13 -11
- package/lib/ProUpload/components/FileItem.js +58 -50
- package/lib/ProUpload/components/ImageRender.js +89 -93
- package/lib/ProUpload/index.js +68 -76
- package/lib/ProUpload/uitls.js +5 -3
- package/lib/ProUtils/utils/index.js +10 -14
- package/lib/ProViewer/index.js +26 -24
- package/lib/ProViewer/propsType.js +1 -5
- package/lib/ProWaterMark/index.js +5 -4
- package/lib/index.d.ts +1 -1
- package/lib/locale/index.js +6 -2
- package/lib/old/ProCertValidity/index.js +17 -18
- package/lib/old/ProEditableTable/index.js +153 -156
- package/lib/old/ProEditableTable/utils.js +61 -62
- package/lib/tokens.js +1 -0
- package/lib/utils/index.js +16 -13
- package/package.json +8 -8
- package/dist/index.esm.js +0 -3
- package/dist/less.esm.js +0 -3
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -9,16 +10,11 @@ require("antd/es/space/style");
|
|
9
10
|
var _space = _interopRequireDefault(require("antd/es/space"));
|
10
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
12
|
-
var
|
13
|
-
var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
|
14
|
-
var _isString2 = _interopRequireDefault(require("lodash/isString"));
|
15
|
-
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
16
|
-
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
18
|
-
var _react = require("react");
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
19
14
|
var _moment15 = _interopRequireDefault(require("moment"));
|
20
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
21
16
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
17
|
+
var _lodash = require("lodash");
|
22
18
|
var _utils = require("@zat-design/utils");
|
23
19
|
var _TooltipTitle = _interopRequireDefault(require("../TooltipTitle"));
|
24
20
|
var _RenderColumn = _interopRequireDefault(require("../RenderColumn"));
|
@@ -26,14 +22,13 @@ var _utils2 = require("../../utils");
|
|
26
22
|
var _utils3 = require("../../../utils");
|
27
23
|
var _getEnumLabel = _interopRequireDefault(require("../../../ProEnum/utils/getEnumLabel"));
|
28
24
|
var _ProForm = _interopRequireDefault(require("../../../ProForm"));
|
25
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
29
26
|
var _excluded = ["title", "valueType", "format", "precision", "ellipsis", "code", "copyable", "width", "tooltip", "transform", "prefix", "suffix", "dataIndex", "toolTipProps", "minWidth", "onDiff"];
|
30
27
|
/**
|
31
28
|
* 调整点:
|
32
29
|
*/
|
33
|
-
var isReactElement =
|
34
|
-
|
35
|
-
};
|
36
|
-
var calcMinWidth = function calcMinWidth(_ref) {
|
30
|
+
var isReactElement = element => /*#__PURE__*/(0, _react.isValidElement)(element);
|
31
|
+
var calcMinWidth = _ref => {
|
37
32
|
var minWidth = _ref.minWidth,
|
38
33
|
width = _ref.width,
|
39
34
|
title = _ref.title,
|
@@ -43,7 +38,7 @@ var calcMinWidth = function calcMinWidth(_ref) {
|
|
43
38
|
var tempEl = document.createElement('div');
|
44
39
|
tempEl.style.display = 'inline-block';
|
45
40
|
document.body.appendChild(tempEl);
|
46
|
-
if ((0,
|
41
|
+
if ((0, _lodash.isFunction)(title)) {
|
47
42
|
var component = title();
|
48
43
|
_reactDom.default.render(component, tempEl);
|
49
44
|
} else if (isReactElement(title)) {
|
@@ -52,7 +47,7 @@ var calcMinWidth = function calcMinWidth(_ref) {
|
|
52
47
|
tempEl.innerHTML = title;
|
53
48
|
}
|
54
49
|
// 使用 requestAnimationFrame 确保在下一个浏览器重绘周期中获取宽度
|
55
|
-
requestAnimationFrame(
|
50
|
+
requestAnimationFrame(() => {
|
56
51
|
var _width = tempEl.offsetWidth;
|
57
52
|
_reactDom.default.unmountComponentAtNode(tempEl);
|
58
53
|
tempEl.remove();
|
@@ -60,7 +55,7 @@ var calcMinWidth = function calcMinWidth(_ref) {
|
|
60
55
|
});
|
61
56
|
}
|
62
57
|
};
|
63
|
-
var formatColumn =
|
58
|
+
var formatColumn = _ref2 => {
|
64
59
|
var column = _ref2.column,
|
65
60
|
originalObj = _ref2.originalObj,
|
66
61
|
rowKey = _ref2.rowKey,
|
@@ -89,45 +84,48 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
89
84
|
onDiff = column.onDiff,
|
90
85
|
otherProps = (0, _objectWithoutProperties2.default)(column, _excluded);
|
91
86
|
otherProps.scroll = scroll;
|
87
|
+
|
92
88
|
// 仅在 {x: 'max-content', y: 300 } 且 column无指定 width minWidth 情况下 才开启 minWidth的自动计算
|
93
|
-
var isMaxContentOverFlow = (0,
|
89
|
+
var isMaxContentOverFlow = (0, _lodash.isObject)(scroll) ? (scroll === null || scroll === void 0 ? void 0 : scroll.x) === 'max-content' && Reflect.ownKeys(scroll).includes('y') : false;
|
94
90
|
calcMinWidth({
|
95
|
-
minWidth
|
96
|
-
width
|
97
|
-
title
|
98
|
-
isMaxContentOverFlow
|
91
|
+
minWidth,
|
92
|
+
width,
|
93
|
+
title,
|
94
|
+
isMaxContentOverFlow,
|
99
95
|
callback: onUpdateMinWidth
|
100
96
|
});
|
101
97
|
var _toolTipProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, toolTipProps), wrapToolTipProps);
|
98
|
+
|
102
99
|
// 前缀处理
|
103
|
-
var prefixNode =
|
100
|
+
var prefixNode = (value, record, index) => {
|
104
101
|
if (!prefix) {
|
105
102
|
if (valueType === 'thousandthCNY') {
|
106
103
|
return 'CNY';
|
107
104
|
}
|
108
105
|
return '';
|
109
106
|
}
|
110
|
-
if ((0,
|
107
|
+
if ((0, _lodash.isString)(prefix) || /*#__PURE__*/(0, _react.isValidElement)(prefix)) {
|
111
108
|
return prefix;
|
112
109
|
}
|
113
|
-
if ((0,
|
110
|
+
if ((0, _lodash.isFunction)(prefix)) {
|
114
111
|
return prefix(value, record, index);
|
115
112
|
}
|
116
113
|
};
|
114
|
+
|
117
115
|
// 后缀处理
|
118
|
-
var suffixNode =
|
119
|
-
if ((0,
|
116
|
+
var suffixNode = (value, record, index) => {
|
117
|
+
if ((0, _lodash.isString)(suffix) || /*#__PURE__*/(0, _react.isValidElement)(suffix)) {
|
120
118
|
return suffix;
|
121
119
|
}
|
122
|
-
if ((0,
|
120
|
+
if ((0, _lodash.isFunction)(suffix)) {
|
123
121
|
return suffix(value, record, index);
|
124
122
|
}
|
125
123
|
};
|
126
|
-
if (column
|
124
|
+
if (column !== null && column !== void 0 && column.render) {
|
127
125
|
var originalRender = column.render; // 保存原始的 render 方法
|
128
126
|
// 自定义render 手动重载下
|
129
|
-
column.render =
|
130
|
-
var isFn = (0,
|
127
|
+
column.render = (value, record, index) => {
|
128
|
+
var isFn = (0, _lodash.isFunction)(originalRender);
|
131
129
|
var _value = isFn ? originalRender === null || originalRender === void 0 ? void 0 : originalRender(value, record !== null && record !== void 0 ? record : {}, index) : null;
|
132
130
|
var originalResult = (0, _utils2.getOriginalValue)(value, record !== null && record !== void 0 ? record : {}, originalObj, rowKey, dataIndex);
|
133
131
|
var originalValue = originalResult.originalValue;
|
@@ -138,17 +136,17 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
138
136
|
otherProps.isChanged = isChanged;
|
139
137
|
if (Array.isArray(diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.originalDataSource)) {
|
140
138
|
// 存在比对
|
141
|
-
if ((0,
|
139
|
+
if ((0, _lodash.isFunction)(otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewRender)) {
|
142
140
|
var _originalObj$record$r;
|
143
141
|
var diffResult = otherProps.viewRender({
|
144
142
|
originValue: originalValue,
|
145
143
|
originRecord: (_originalObj$record$r = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r !== void 0 ? _originalObj$record$r : {},
|
146
|
-
value
|
147
|
-
record
|
148
|
-
index
|
144
|
+
value,
|
145
|
+
record,
|
146
|
+
index
|
149
147
|
});
|
150
148
|
// viewRender 返回值为 false 时,不显示对比
|
151
|
-
if ((0,
|
149
|
+
if ((0, _lodash.isBoolean)(diffResult)) {
|
152
150
|
if (!diffResult) {
|
153
151
|
otherProps.isChanged = false;
|
154
152
|
_isAddCell = false;
|
@@ -175,14 +173,14 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
175
173
|
originalValue = diffResult;
|
176
174
|
}
|
177
175
|
// 存在自定义onDiff比对
|
178
|
-
if ((0,
|
176
|
+
if ((0, _lodash.isFunction)(onDiff)) {
|
179
177
|
var _originalObj$record$r2;
|
180
178
|
var _diffResult = onDiff({
|
181
179
|
originValue: originalValue,
|
182
180
|
originRecord: (_originalObj$record$r2 = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r2 !== void 0 ? _originalObj$record$r2 : {},
|
183
|
-
value
|
184
|
-
record
|
185
|
-
index
|
181
|
+
value,
|
182
|
+
record,
|
183
|
+
index
|
186
184
|
});
|
187
185
|
if (_diffResult === 'changed') {
|
188
186
|
_isAddCell = false;
|
@@ -198,7 +196,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
198
196
|
}
|
199
197
|
}
|
200
198
|
}
|
201
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
199
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
202
200
|
valueType: valueType,
|
203
201
|
originalValue: (0, _utils3.isEmpty)(originalValue) ? null : originalValue,
|
204
202
|
ellipsis: ellipsis,
|
@@ -215,7 +213,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
215
213
|
return;
|
216
214
|
}
|
217
215
|
if (tooltip) {
|
218
|
-
column.title = (0, _jsxRuntime.jsx)(_TooltipTitle.default, {
|
216
|
+
column.title = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipTitle.default, {
|
219
217
|
title: title,
|
220
218
|
tooltip: tooltip
|
221
219
|
});
|
@@ -230,7 +228,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
230
228
|
}
|
231
229
|
// 百分比、千分比
|
232
230
|
if (['percentage', 'permillage'].includes(valueType)) {
|
233
|
-
column.render =
|
231
|
+
column.render = (value, record, index) => {
|
234
232
|
var multiple = valueType === 'percentage' ? 100 : 1000;
|
235
233
|
var realValue = _utils.tools.calc(Number(value !== null && value !== void 0 ? value : 0), '*', multiple);
|
236
234
|
var renderValue = (0, _utils2.getDecimalDigits)(value) > valueTypePrecision ? realValue : realValue.toFixed(valueTypePrecision);
|
@@ -245,19 +243,19 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
245
243
|
originalRenderValue = '-';
|
246
244
|
}
|
247
245
|
if (!value && value !== 0 && renderValue === originalRenderValue) {
|
248
|
-
return (0, _jsxRuntime.jsx)("div", {
|
246
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
249
247
|
style: {
|
250
|
-
minWidth
|
248
|
+
minWidth
|
251
249
|
},
|
252
250
|
children: "-"
|
253
251
|
});
|
254
252
|
}
|
255
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
253
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
256
254
|
size: 8,
|
257
255
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
258
256
|
});
|
259
257
|
var isInNewRowFlag = isInNewRow(record);
|
260
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
258
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
261
259
|
valueType: valueType,
|
262
260
|
originalValue: originalValue === null ? null : originalRenderValue,
|
263
261
|
ellipsis: ellipsis,
|
@@ -273,33 +271,33 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
273
271
|
};
|
274
272
|
// 千分位, 千分位带CNY前缀
|
275
273
|
} else if (['thousandth', 'thousandthCNY'].includes(valueType)) {
|
276
|
-
column.render =
|
277
|
-
var valueStr = valueTypePrecision || valueTypePrecision === 0 ?
|
274
|
+
column.render = (value, record, index) => {
|
275
|
+
var valueStr = valueTypePrecision || valueTypePrecision === 0 ? `${Number(value).toFixed(valueTypePrecision)}` : `${value}`;
|
278
276
|
var renderValue = valueStr.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
279
277
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
280
278
|
var isChanged = originalResult.isChanged,
|
281
279
|
originalValue = originalResult.originalValue,
|
282
280
|
isAddCell = originalResult.isAddCell;
|
283
281
|
otherProps.isChanged = isChanged;
|
284
|
-
var originalRealValue = valueTypePrecision ?
|
282
|
+
var originalRealValue = valueTypePrecision ? `${Number(originalValue).toFixed(valueTypePrecision)}` : `${originalValue}`;
|
285
283
|
var originalRenderValue = originalRealValue.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
286
284
|
if ((0, _utils3.isEmpty)(originalValue)) {
|
287
285
|
originalRenderValue = '-';
|
288
286
|
}
|
289
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
287
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
290
288
|
size: 8,
|
291
289
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
292
290
|
});
|
293
291
|
if (!value && value !== 0 && renderValue === originalRenderValue) {
|
294
|
-
(0, _jsxRuntime.jsx)("div", {
|
292
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
295
293
|
style: {
|
296
|
-
minWidth
|
294
|
+
minWidth
|
297
295
|
},
|
298
296
|
children: "-"
|
299
297
|
});
|
300
298
|
}
|
301
299
|
var isInNewRowFlag = isInNewRow(record);
|
302
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
300
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
303
301
|
valueType: valueType,
|
304
302
|
originalValue: originalValue === null ? null : originalRenderValue,
|
305
303
|
ellipsis: ellipsis,
|
@@ -314,7 +312,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
314
312
|
}));
|
315
313
|
};
|
316
314
|
} else if (['datePicker', 'date', 'dateTime', 'dateStartTime', 'dateEndTime', 'dateStartEndTime'].includes(valueType)) {
|
317
|
-
column.render =
|
315
|
+
column.render = (value, record, index) => {
|
318
316
|
var _moment, _moment2, _moment3, _moment4, _moment5, _moment6, _moment7, _moment8, _moment9, _moment10, _moment11, _moment12, _moment13, _moment14;
|
319
317
|
var renderValue = (_moment = (0, _moment15.default)(value)) === null || _moment === void 0 ? void 0 : _moment.format(format);
|
320
318
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
@@ -333,16 +331,16 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
333
331
|
originalRenderValue = (_moment6 = (0, _moment15.default)(originalValue)) === null || _moment6 === void 0 ? void 0 : _moment6.format('YYYY-MM-DD HH:mm:ss');
|
334
332
|
break;
|
335
333
|
case 'dateStartTime':
|
336
|
-
renderValue =
|
337
|
-
originalRenderValue =
|
334
|
+
renderValue = `${(_moment7 = (0, _moment15.default)(value)) === null || _moment7 === void 0 ? void 0 : _moment7.format('YYYY-MM-DD')} 00:00:00`;
|
335
|
+
originalRenderValue = `${(_moment8 = (0, _moment15.default)(originalValue)) === null || _moment8 === void 0 ? void 0 : _moment8.format('YYYY-MM-DD')} 00:00:00`;
|
338
336
|
break;
|
339
337
|
case 'dateEndTime':
|
340
|
-
renderValue =
|
341
|
-
originalRenderValue =
|
338
|
+
renderValue = `${(_moment9 = (0, _moment15.default)(value)) === null || _moment9 === void 0 ? void 0 : _moment9.format('YYYY-MM-DD')} 23:59:59`;
|
339
|
+
originalRenderValue = `${(_moment10 = (0, _moment15.default)(originalValue)) === null || _moment10 === void 0 ? void 0 : _moment10.format('YYYY-MM-DD')} 23:59:59`;
|
342
340
|
break;
|
343
341
|
case 'dateStartEndTime':
|
344
|
-
renderValue =
|
345
|
-
originalRenderValue =
|
342
|
+
renderValue = `${(_moment11 = (0, _moment15.default)(value === null || value === void 0 ? void 0 : value[0])) === null || _moment11 === void 0 ? void 0 : _moment11.format('YYYY-MM-DD')} 00:00:00~${(_moment12 = (0, _moment15.default)(value === null || value === void 0 ? void 0 : value[1])) === null || _moment12 === void 0 ? void 0 : _moment12.format('YYYY-MM-DD')} 23:59:59`;
|
343
|
+
originalRenderValue = `${(_moment13 = (0, _moment15.default)(originalValue === null || originalValue === void 0 ? void 0 : originalValue[0])) === null || _moment13 === void 0 ? void 0 : _moment13.format('YYYY-MM-DD')} 00:00:00~${(_moment14 = (0, _moment15.default)(originalValue === null || originalValue === void 0 ? void 0 : originalValue[1])) === null || _moment14 === void 0 ? void 0 : _moment14.format('YYYY-MM-DD')} 23:59:59`;
|
346
344
|
break;
|
347
345
|
}
|
348
346
|
if (!value) {
|
@@ -351,20 +349,20 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
351
349
|
if (!originalValue) {
|
352
350
|
originalRenderValue = '-';
|
353
351
|
}
|
354
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
352
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
355
353
|
size: 8,
|
356
354
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
357
355
|
});
|
358
356
|
if (!value && renderValue === originalRenderValue) {
|
359
|
-
(0, _jsxRuntime.jsx)("div", {
|
357
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
360
358
|
style: {
|
361
|
-
minWidth
|
359
|
+
minWidth
|
362
360
|
},
|
363
361
|
children: "-"
|
364
362
|
});
|
365
363
|
}
|
366
364
|
var isInNewRowFlag = isInNewRow(record);
|
367
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
365
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
368
366
|
valueType: valueType,
|
369
367
|
originalValue: originalValue === null ? null : originalRenderValue,
|
370
368
|
ellipsis: ellipsis,
|
@@ -379,7 +377,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
379
377
|
}));
|
380
378
|
};
|
381
379
|
} else if (['enumName', 'enumCodeName'].includes(valueType)) {
|
382
|
-
column.render =
|
380
|
+
column.render = (value, record, index) => {
|
383
381
|
var realCode = typeof code === 'function' ? code(value, record) : code;
|
384
382
|
var renderValue = (0, _getEnumLabel.default)(realCode, value, valueType === 'enumCodeName');
|
385
383
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
@@ -390,26 +388,24 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
390
388
|
var originalRenderValue = (0, _getEnumLabel.default)(realCode, originalValue, valueType === 'enumCodeName');
|
391
389
|
if (Array.isArray(column === null || column === void 0 ? void 0 : column.codeValues) && !realCode) {
|
392
390
|
var _column$codeValues$fi;
|
393
|
-
var labelName = column === null || column === void 0
|
394
|
-
return item.value === value;
|
395
|
-
})) === null || _column$codeValues$fi === void 0 ? void 0 : _column$codeValues$fi.label;
|
391
|
+
var labelName = column === null || column === void 0 || (_column$codeValues$fi = column.codeValues.find(item => item.value === value)) === null || _column$codeValues$fi === void 0 ? void 0 : _column$codeValues$fi.label;
|
396
392
|
if (valueType === 'enumName') {
|
397
|
-
renderValue = (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
393
|
+
renderValue = /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
398
394
|
children: labelName || '-'
|
399
395
|
});
|
400
396
|
}
|
401
397
|
if (valueType === 'enumCodeName') {
|
402
|
-
renderValue = (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
403
|
-
children: labelName ?
|
398
|
+
renderValue = /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
399
|
+
children: labelName ? `${value}-${labelName}` : labelName
|
404
400
|
});
|
405
401
|
}
|
406
402
|
}
|
407
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
403
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
408
404
|
size: 8,
|
409
405
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
410
406
|
});
|
411
407
|
var isInNewRowFlag = isInNewRow(record);
|
412
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
408
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
413
409
|
valueType: valueType,
|
414
410
|
originalValue: originalValue === null ? null : originalRenderValue,
|
415
411
|
ellipsis: ellipsis,
|
@@ -424,7 +420,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
424
420
|
}));
|
425
421
|
};
|
426
422
|
} else if (precision || prefix || suffix) {
|
427
|
-
column.render =
|
423
|
+
column.render = (value, record, index) => {
|
428
424
|
var renderValue = value === 'number' ? value.toFixed(precision) : value;
|
429
425
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
430
426
|
var isChanged = originalResult.isChanged,
|
@@ -432,7 +428,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
432
428
|
isAddCell = originalResult.isAddCell;
|
433
429
|
otherProps.isChanged = isChanged;
|
434
430
|
var originalRenderValue = originalValue === 'number' ? originalValue.toFixed(precision) : originalValue;
|
435
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
431
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
436
432
|
size: 8,
|
437
433
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
438
434
|
});
|
@@ -440,15 +436,15 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
440
436
|
originalRenderValue = '-';
|
441
437
|
}
|
442
438
|
if (!value && value !== 0 && renderValue === originalRenderValue) {
|
443
|
-
(0, _jsxRuntime.jsx)("div", {
|
439
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
444
440
|
style: {
|
445
|
-
minWidth
|
441
|
+
minWidth
|
446
442
|
},
|
447
443
|
children: "-"
|
448
444
|
});
|
449
445
|
}
|
450
446
|
var isInNewRowFlag = isInNewRow(record);
|
451
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
447
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
452
448
|
valueType: valueType,
|
453
449
|
originalValue: originalValue === null ? null : originalRenderValue,
|
454
450
|
ellipsis: ellipsis,
|
@@ -463,7 +459,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
463
459
|
}));
|
464
460
|
};
|
465
461
|
} else if (valueType === 'address') {
|
466
|
-
column.render =
|
462
|
+
column.render = (value, record, index) => {
|
467
463
|
var _realValue$filter;
|
468
464
|
var realValue = transform ? transform(value, record) : value;
|
469
465
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
@@ -472,13 +468,11 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
472
468
|
isAddCell = originalResult.isAddCell;
|
473
469
|
otherProps.isChanged = isChanged;
|
474
470
|
var originalRealValue = transform ? transform(originalValue, record) : originalValue;
|
475
|
-
var isEmpty = !realValue || Array.isArray(realValue) && (realValue === null || realValue === void 0
|
476
|
-
|
477
|
-
|
478
|
-
if ((0, _isEqual2.default)(value, originalValue) && isEmpty) {
|
479
|
-
(0, _jsxRuntime.jsx)("div", {
|
471
|
+
var isEmpty = !realValue || Array.isArray(realValue) && (realValue === null || realValue === void 0 || (_realValue$filter = realValue.filter(item => !!item)) === null || _realValue$filter === void 0 ? void 0 : _realValue$filter.length) === 0;
|
472
|
+
if ((0, _lodash.isEqual)(value, originalValue) && isEmpty) {
|
473
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
480
474
|
style: {
|
481
|
-
minWidth
|
475
|
+
minWidth
|
482
476
|
},
|
483
477
|
children: "-"
|
484
478
|
});
|
@@ -486,19 +480,19 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
486
480
|
var className = (0, _classnames.default)({
|
487
481
|
'empty-cell': isEmpty
|
488
482
|
});
|
489
|
-
var renderValue = (0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
483
|
+
var renderValue = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
490
484
|
isView: true,
|
491
485
|
mode: "address",
|
492
486
|
code: code,
|
493
487
|
value: realValue
|
494
488
|
});
|
495
|
-
var originalRenderValue = (0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
489
|
+
var originalRenderValue = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
496
490
|
isView: true,
|
497
491
|
mode: "address",
|
498
492
|
code: code,
|
499
493
|
value: originalRealValue
|
500
494
|
});
|
501
|
-
var renderNode = (0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
495
|
+
var renderNode = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProForm.default.ProCascader, {
|
502
496
|
className: className,
|
503
497
|
isView: true,
|
504
498
|
mode: "address",
|
@@ -507,7 +501,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
507
501
|
tooltip: false
|
508
502
|
});
|
509
503
|
var isInNewRowFlag = isInNewRow(record);
|
510
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
504
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
511
505
|
valueType: valueType,
|
512
506
|
originalValue: originalValue === null ? null : originalRenderValue,
|
513
507
|
ellipsis: ellipsis,
|
@@ -522,11 +516,11 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
522
516
|
}));
|
523
517
|
};
|
524
518
|
} else if (copyable) {
|
525
|
-
column.render =
|
519
|
+
column.render = (value, record, index) => {
|
526
520
|
var isInNewRowFlag = isInNewRow(record);
|
527
|
-
return (0, _jsxRuntime.jsxs)(_space.default, {
|
521
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
528
522
|
size: 8,
|
529
|
-
children: [prefixNode(value, record, index), (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
523
|
+
children: [prefixNode(value, record, index), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
530
524
|
valueType: valueType,
|
531
525
|
copyable: copyable,
|
532
526
|
ellipsis: ellipsis,
|
@@ -541,24 +535,24 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
541
535
|
});
|
542
536
|
};
|
543
537
|
} else if (ellipsis) {
|
544
|
-
column.render =
|
538
|
+
column.render = (value, record, index) => {
|
545
539
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
546
540
|
var isChanged = originalResult.isChanged,
|
547
541
|
originalValue = originalResult.originalValue,
|
548
542
|
isAddCell = originalResult.isAddCell;
|
549
543
|
otherProps.isChanged = isChanged;
|
550
544
|
if (!value && value !== 0 && value === originalValue) {
|
551
|
-
(0, _jsxRuntime.jsx)("div", {
|
545
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
552
546
|
style: {
|
553
|
-
minWidth
|
547
|
+
minWidth
|
554
548
|
},
|
555
549
|
children: "-"
|
556
550
|
});
|
557
551
|
}
|
558
552
|
var isInNewRowFlag = isInNewRow(record);
|
559
|
-
return (0, _jsxRuntime.jsxs)(_space.default, {
|
553
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
560
554
|
size: 8,
|
561
|
-
children: [prefixNode(value, record, index), (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
555
|
+
children: [prefixNode(value, record, index), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
562
556
|
valueType: valueType,
|
563
557
|
originalValue: originalValue === null ? null : originalValue || '-',
|
564
558
|
ellipsis: ellipsis,
|
@@ -574,26 +568,26 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
574
568
|
});
|
575
569
|
};
|
576
570
|
} else {
|
577
|
-
column.render =
|
571
|
+
column.render = (value, record, index) => {
|
578
572
|
var originalResult = (0, _utils2.getOriginalValue)(value, record, originalObj, rowKey, dataIndex);
|
579
573
|
var isChanged = originalResult.isChanged,
|
580
574
|
originalValue = originalResult.originalValue,
|
581
575
|
isAddCell = originalResult.isAddCell;
|
582
576
|
otherProps.isChanged = isChanged;
|
583
|
-
var node = (0, _jsxRuntime.jsxs)(_space.default, {
|
577
|
+
var node = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default, {
|
584
578
|
size: 8,
|
585
579
|
children: [prefixNode(value, record, index), value, suffixNode(value, record, index)]
|
586
580
|
});
|
587
581
|
if (!value && value !== 0 && value === originalValue) {
|
588
|
-
(0, _jsxRuntime.jsx)("div", {
|
582
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
589
583
|
style: {
|
590
|
-
minWidth
|
584
|
+
minWidth
|
591
585
|
},
|
592
586
|
children: "-"
|
593
587
|
});
|
594
588
|
}
|
595
589
|
var isInNewRowFlag = isInNewRow(record);
|
596
|
-
return (0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
590
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderColumn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
|
597
591
|
valueType: valueType,
|
598
592
|
originalValue: originalValue === null ? null : originalValue || '-',
|
599
593
|
ellipsis: ellipsis,
|
@@ -609,6 +603,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
609
603
|
};
|
610
604
|
}
|
611
605
|
};
|
606
|
+
|
612
607
|
/**
|
613
608
|
* 查找最近的父级className
|
614
609
|
* @param element 当前node节点
|
@@ -616,20 +611,21 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
616
611
|
* @param name string class或者id的值
|
617
612
|
* @returns ReactNode 父级element
|
618
613
|
*/
|
614
|
+
exports.formatColumn = formatColumn;
|
619
615
|
var getParentElement = exports.getParentElement = function getParentElement(element, name) {
|
620
616
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'className';
|
621
|
-
var result = (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
|
617
|
+
var result = /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
|
622
618
|
if (!element || !name) {
|
623
619
|
return result;
|
624
620
|
}
|
625
|
-
var
|
621
|
+
var searchDom = function searchDom(element, name) {
|
626
622
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'className';
|
627
623
|
if (element.parentElement[type] === name) {
|
628
624
|
result = element.parentElement;
|
629
625
|
return false;
|
630
626
|
}
|
631
|
-
|
627
|
+
searchDom(element.parentElement, name, type = 'className');
|
632
628
|
};
|
633
|
-
|
629
|
+
searchDom(element, name, type = 'className');
|
634
630
|
return result;
|
635
631
|
};
|
@@ -9,12 +9,12 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
9
9
|
require("antd/es/table/style");
|
10
10
|
var _table = _interopRequireDefault(require("antd/es/table"));
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
13
12
|
var _react = require("react");
|
14
13
|
var _index = require("../../../index");
|
15
14
|
require("../../../../style/index.less");
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
16
16
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
17
|
-
var BaseTable =
|
17
|
+
var BaseTable = _ref => {
|
18
18
|
var dataSource = _ref.dataSource,
|
19
19
|
tableProps = _ref.tableProps,
|
20
20
|
draggableProps = _ref.draggableProps,
|
@@ -25,21 +25,19 @@ var BaseTable = function BaseTable(_ref) {
|
|
25
25
|
renderRowSelection = tableProps.renderRowSelection,
|
26
26
|
rowClassName = tableProps.rowClassName,
|
27
27
|
resizeColumn = tableProps.resizeColumn;
|
28
|
-
var renderComponents =
|
28
|
+
var renderComponents = () => {
|
29
29
|
if (resizeColumn) {
|
30
30
|
return _index.TableResizable.components;
|
31
31
|
}
|
32
32
|
return null;
|
33
33
|
};
|
34
|
-
return (0, _jsxRuntime.jsx)(_table.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
35
35
|
components: renderComponents(),
|
36
36
|
columns: columns,
|
37
37
|
locale: {
|
38
38
|
emptyText: (0, _index.RenderEmptyText)(emptyTextProps)
|
39
39
|
},
|
40
|
-
summary:
|
41
|
-
return (0, _index.RenderSummary)(summaryProps);
|
42
|
-
},
|
40
|
+
summary: () => (0, _index.RenderSummary)(summaryProps),
|
43
41
|
rowClassName: rowClassName
|
44
42
|
}, tableProps), {}, {
|
45
43
|
dataSource: dataSource,
|