@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
package/es/ProTreeModal/index.js
CHANGED
@@ -4,30 +4,29 @@ import "antd/es/input/style";
|
|
4
4
|
import _Input from "antd/es/input";
|
5
5
|
import "antd/es/checkbox/style";
|
6
6
|
import _Checkbox from "antd/es/checkbox";
|
7
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
8
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
9
7
|
import "antd/es/message/style";
|
10
8
|
import _message from "antd/es/message";
|
11
9
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
12
10
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
13
|
-
import _isFunction from "lodash/isFunction";
|
14
|
-
import _cloneDeep from "lodash/cloneDeep";
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
16
11
|
import React, { useEffect, useMemo, useRef } from 'react';
|
17
12
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc, useDebounceFn } from 'ahooks';
|
13
|
+
import { cloneDeep, isFunction } from 'lodash';
|
18
14
|
import { ReactSVG } from 'react-svg';
|
19
15
|
import classNames from 'classnames';
|
20
|
-
import { ProDrawerForm, useProConfig } from
|
21
|
-
import { Trigger, ListView, TreeView, Cascader } from
|
22
|
-
import { getFlatTreeData, filterCheckedNodes, getChildrenKeys, findTreeNodeByKey, getAllKeys, transformMessage, addLevelAndParentId } from
|
23
|
-
import { transformTreeToArray, treeNodeFind } from
|
24
|
-
import searchSVG from
|
25
|
-
import locale, { formatMessage } from
|
26
|
-
import
|
16
|
+
import { ProDrawerForm, useProConfig } from "../index";
|
17
|
+
import { Trigger, ListView, TreeView, Cascader } from "./components";
|
18
|
+
import { getFlatTreeData, filterCheckedNodes, getChildrenKeys, findTreeNodeByKey, getAllKeys, transformMessage, addLevelAndParentId } from "./utils";
|
19
|
+
import { transformTreeToArray, treeNodeFind } from "../ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index";
|
20
|
+
import searchSVG from "../assets/input-search.svg";
|
21
|
+
import locale, { formatMessage } from "../locale";
|
22
|
+
import "./style/index.less";
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
25
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
27
26
|
var LIST = 'LIST';
|
28
27
|
var TREE = 'TREE';
|
29
28
|
export var CASCADER = 'CASCADER';
|
30
|
-
var ProTreeModal =
|
29
|
+
var ProTreeModal = props => {
|
31
30
|
var _locale$ProTreeModal, _props$otherProps, _props$otherProps2, _locale$ProTreeModal9, _locale$ProTreeModal10, _locale$ProTreeModal11, _locale$ProTreeModal12;
|
32
31
|
var _useProConfig = useProConfig('ProEnum'),
|
33
32
|
_useProConfig$dics = _useProConfig.dics,
|
@@ -42,7 +41,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
42
41
|
mode = _props$mode === void 0 ? 'tree' : _props$mode,
|
43
42
|
enumCode = props.code,
|
44
43
|
_props$title = props.title,
|
45
|
-
title = _props$title === void 0 ? locale === null || locale === void 0
|
44
|
+
title = _props$title === void 0 ? locale === null || locale === void 0 || (_locale$ProTreeModal = locale.ProTreeModal) === null || _locale$ProTreeModal === void 0 ? void 0 : _locale$ProTreeModal.select : _props$title,
|
46
45
|
useRequest = props.useRequest,
|
47
46
|
_props$showCodeName = props.showCodeName,
|
48
47
|
showCodeName = _props$showCodeName === void 0 ? false : _props$showCodeName,
|
@@ -67,9 +66,9 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
67
66
|
children: 'children'
|
68
67
|
} : _props$fieldNames,
|
69
68
|
_props$disabled = props.disabled,
|
70
|
-
disabled = _props$disabled === void 0 ? props.disabled || props.isView || (props === null || props === void 0
|
69
|
+
disabled = _props$disabled === void 0 ? props.disabled || props.isView || (props === null || props === void 0 || (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
|
71
70
|
_props$isView = props.isView,
|
72
|
-
isView = _props$isView === void 0 ? props.isView || (props === null || props === void 0
|
71
|
+
isView = _props$isView === void 0 ? props.isView || (props === null || props === void 0 || (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
|
73
72
|
transformResponse = props.transformResponse,
|
74
73
|
optionRender = props.optionRender,
|
75
74
|
openChange = props.openChange,
|
@@ -86,6 +85,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
86
85
|
open: false,
|
87
86
|
checkedValues: [],
|
88
87
|
beforeClearAllValues: [],
|
88
|
+
// 点击清空全部并点击关闭、此时数据回显示不正确
|
89
89
|
treeData: [],
|
90
90
|
treeViewData: [],
|
91
91
|
originalTreeData: [],
|
@@ -100,7 +100,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
100
100
|
setState = _useSetState2[1];
|
101
101
|
var fetchFunction = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread({
|
102
102
|
manual: true,
|
103
|
-
onSuccess:
|
103
|
+
onSuccess: res => {
|
104
104
|
var _res$status = res.status,
|
105
105
|
status = _res$status === void 0 ? 200 : _res$status,
|
106
106
|
msg = res.message;
|
@@ -121,35 +121,35 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
121
121
|
},
|
122
122
|
debounceWait: 300
|
123
123
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options));
|
124
|
-
useDeepCompareEffect(
|
124
|
+
useDeepCompareEffect(() => {
|
125
125
|
if (dataSource && dataSource.length) {
|
126
126
|
setState({
|
127
127
|
treeData: dataSource,
|
128
|
-
originalTreeData:
|
128
|
+
originalTreeData: cloneDeep(dataSource),
|
129
129
|
flatTreeData: getFlatTreeData(dataSource, fieldNames),
|
130
130
|
allKeys: getAllKeys(dataSource, fieldNames)
|
131
131
|
});
|
132
132
|
} else if (enumCode) {
|
133
133
|
var dictEnum = dics[enumCode] || [];
|
134
134
|
// transform dictEnum
|
135
|
-
if (transformResponse &&
|
135
|
+
if (transformResponse && isFunction(transformResponse)) {
|
136
136
|
dictEnum = transformResponse(dictEnum);
|
137
137
|
}
|
138
138
|
// check dictEnum isArray
|
139
139
|
if (!dictEnum || !Array.isArray(dictEnum)) {
|
140
140
|
var _locale$ProTreeModal2;
|
141
|
-
console.error(locale === null || locale === void 0
|
141
|
+
console.error(locale === null || locale === void 0 || (_locale$ProTreeModal2 = locale.ProTreeModal) === null || _locale$ProTreeModal2 === void 0 ? void 0 : _locale$ProTreeModal2.errorArrayMessage);
|
142
142
|
dictEnum = [];
|
143
143
|
}
|
144
144
|
setState({
|
145
145
|
treeData: dictEnum,
|
146
|
-
originalTreeData:
|
146
|
+
originalTreeData: cloneDeep(dictEnum),
|
147
147
|
flatTreeData: getFlatTreeData(dictEnum, fieldNames),
|
148
148
|
allKeys: getAllKeys(dictEnum, fieldNames)
|
149
149
|
});
|
150
150
|
}
|
151
151
|
}, [dataSource, enumCode]);
|
152
|
-
useDeepCompareEffect(
|
152
|
+
useDeepCompareEffect(() => {
|
153
153
|
if (enumCode) {
|
154
154
|
return undefined;
|
155
155
|
}
|
@@ -166,12 +166,12 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
166
166
|
// 执行用户配置的枚举服务,拉取枚举数据进行更新
|
167
167
|
fetchFunction.run(params);
|
168
168
|
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
169
|
-
useEffect(
|
169
|
+
useEffect(() => {
|
170
170
|
setState({
|
171
|
-
open
|
171
|
+
open
|
172
172
|
});
|
173
173
|
}, [open]);
|
174
|
-
useEffect(
|
174
|
+
useEffect(() => {
|
175
175
|
if (value) {
|
176
176
|
var checkedValues = [];
|
177
177
|
var treeData = state.treeData,
|
@@ -180,9 +180,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
180
180
|
var treeViewData = [];
|
181
181
|
if (allValue && typeof value === 'string' && allValue === value) {
|
182
182
|
if (modeType === LIST) {
|
183
|
-
checkedValues = treeData.map(
|
184
|
-
return item[fieldNameValue];
|
185
|
-
}) || [];
|
183
|
+
checkedValues = treeData.map(item => item[fieldNameValue]) || [];
|
186
184
|
} else if (modeType === TREE) {
|
187
185
|
checkedValues = allKeys;
|
188
186
|
}
|
@@ -193,54 +191,49 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
193
191
|
}
|
194
192
|
// 开启 labelInValue [{ label:xx, value: ""}] 形式、需要取出来 value
|
195
193
|
if (labelInValue) {
|
196
|
-
var isObjectArray = value.every(
|
197
|
-
return _typeof(element) === 'object' && element !== null;
|
198
|
-
});
|
194
|
+
var isObjectArray = value.every(element => typeof element === 'object' && element !== null);
|
199
195
|
if (!isObjectArray) {
|
200
196
|
console.error('Please enter an array object');
|
201
197
|
checkedValues = [];
|
202
198
|
}
|
203
|
-
checkedValues = value.map(
|
204
|
-
return item[fieldNameValue];
|
205
|
-
});
|
199
|
+
checkedValues = value.map(item => item[fieldNameValue]);
|
206
200
|
} else {
|
207
201
|
checkedValues = value;
|
208
202
|
}
|
209
203
|
}
|
210
204
|
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
211
205
|
setState({
|
212
|
-
checkedValues
|
206
|
+
checkedValues,
|
213
207
|
checkAll: checkedValues.length === allKeys.length,
|
214
|
-
treeViewData
|
208
|
+
treeViewData,
|
215
209
|
beforeClearAllValues: checkedValues
|
216
210
|
});
|
217
211
|
}
|
218
212
|
}, [value, state.allKeys, state.open]);
|
219
|
-
useDeepCompareEffect(
|
213
|
+
useDeepCompareEffect(() => {
|
220
214
|
var transformedTree = addLevelAndParentId(state.treeData, fieldNames);
|
221
215
|
setState({
|
222
|
-
transformedTree
|
216
|
+
transformedTree
|
223
217
|
});
|
224
218
|
}, [state.treeData]);
|
225
|
-
var handleClick =
|
219
|
+
var handleClick = () => {
|
226
220
|
setState({
|
227
221
|
open: true
|
228
222
|
});
|
229
|
-
openChange === null || openChange === void 0
|
223
|
+
openChange === null || openChange === void 0 || openChange(true);
|
230
224
|
};
|
225
|
+
|
231
226
|
/**
|
232
227
|
* close Drawer and onChange(values)
|
233
228
|
*/
|
234
|
-
var handleFinish =
|
229
|
+
var handleFinish = () => {
|
235
230
|
// 全选的时候返回 allValue 标记即可
|
236
231
|
// 3.3.2 版本全选的时候返回所有值的合集 list
|
237
232
|
if (allValue !== undefined && state.checkAll && !draggable) {
|
238
233
|
if (labelInValue) {
|
239
|
-
onChange === null || onChange === void 0
|
234
|
+
onChange === null || onChange === void 0 || onChange(state.flatTreeData);
|
240
235
|
} else {
|
241
|
-
onChange === null || onChange === void 0
|
242
|
-
return item[fieldNameValue];
|
243
|
-
}));
|
236
|
+
onChange === null || onChange === void 0 || onChange(state.flatTreeData.map(item => item[fieldNameValue]));
|
244
237
|
}
|
245
238
|
} else if (draggable && span) {
|
246
239
|
var _listRef$current;
|
@@ -250,10 +243,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
250
243
|
} else {
|
251
244
|
var values = [];
|
252
245
|
if (labelInValue) {
|
253
|
-
state.checkedValues.forEach(
|
254
|
-
var option = state.flatTreeData.find(
|
255
|
-
return item[fieldNameValue] === val;
|
256
|
-
});
|
246
|
+
state.checkedValues.forEach(val => {
|
247
|
+
var option = state.flatTreeData.find(item => item[fieldNameValue] === val);
|
257
248
|
option && values.push(option);
|
258
249
|
});
|
259
250
|
} else {
|
@@ -262,75 +253,69 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
262
253
|
if (min) {
|
263
254
|
if (values.length < min) {
|
264
255
|
var _locale$ProTreeModal3;
|
265
|
-
_message.error(formatMessage(locale === null || locale === void 0
|
266
|
-
min
|
256
|
+
_message.error(formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal3 = locale.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
|
257
|
+
min
|
267
258
|
}));
|
268
259
|
return;
|
269
260
|
}
|
270
261
|
}
|
271
|
-
onChange === null || onChange === void 0
|
262
|
+
onChange === null || onChange === void 0 || onChange(values);
|
272
263
|
}
|
273
264
|
// fix: 当有 openChange 时候、点击确定应该由关闭 openChange 控制
|
274
265
|
if (!openChange || open === undefined) {
|
275
266
|
setState({
|
276
267
|
open: false
|
277
268
|
});
|
278
|
-
openChange === null || openChange === void 0
|
269
|
+
openChange === null || openChange === void 0 || openChange(false);
|
279
270
|
}
|
280
271
|
if (openChange && open !== undefined) {
|
281
|
-
openChange === null || openChange === void 0
|
272
|
+
openChange === null || openChange === void 0 || openChange(true);
|
282
273
|
}
|
283
274
|
};
|
275
|
+
|
284
276
|
/**
|
285
277
|
* clear all checked
|
286
278
|
*/
|
287
|
-
var handleClearAll =
|
279
|
+
var handleClearAll = () => {
|
288
280
|
var _state$flatTreeData$f;
|
289
281
|
// 处理 ProTable 场景下 disabled 的不需要被清理
|
290
|
-
var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(
|
291
|
-
|
292
|
-
})) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(function (item) {
|
293
|
-
return item[fieldNameValue];
|
294
|
-
}) : [];
|
295
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([]);
|
282
|
+
var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(item => item.disabled)) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(item => item[fieldNameValue]) : [];
|
283
|
+
onChange === null || onChange === void 0 || onChange([]);
|
296
284
|
setState({
|
297
285
|
checkedValues: _checkedValues,
|
298
286
|
beforeClearAllValues: state.checkedValues,
|
287
|
+
// 把清空全部之前的数据记录下
|
299
288
|
treeViewData: [],
|
300
289
|
checkAll: false
|
301
290
|
});
|
302
291
|
};
|
292
|
+
|
303
293
|
/**
|
304
294
|
* Drawer close
|
305
295
|
*/
|
306
|
-
var handleClose =
|
296
|
+
var handleClose = () => {
|
307
297
|
setState({
|
308
298
|
open: false,
|
309
299
|
checkedValues: state.beforeClearAllValues,
|
310
300
|
beforeClearAllValues: []
|
311
301
|
});
|
312
302
|
// onChange?.(state.beforeClearAllValues);
|
313
|
-
openChange === null || openChange === void 0
|
303
|
+
openChange === null || openChange === void 0 || openChange(false);
|
314
304
|
};
|
305
|
+
|
315
306
|
/**
|
316
307
|
* checkbox/list selected change values
|
317
308
|
* @param values
|
318
309
|
*/
|
319
|
-
var handleListCheckChange =
|
320
|
-
var checkedValues =
|
310
|
+
var handleListCheckChange = (e, code) => {
|
311
|
+
var checkedValues = [...state.checkedValues];
|
321
312
|
var checked = e.target.checked;
|
322
313
|
if (!checked) {
|
323
|
-
checkedValues = checkedValues.filter(
|
324
|
-
return value !== code;
|
325
|
-
});
|
314
|
+
checkedValues = checkedValues.filter(value => value !== code);
|
326
315
|
} else if (draggable && span) {
|
327
316
|
// 固定在右侧的情况
|
328
|
-
var fixedOption = state.flatTreeData.find(
|
329
|
-
|
330
|
-
}) || {};
|
331
|
-
var fixedIdx = checkedValues.findIndex(function (value) {
|
332
|
-
return value === fixedOption[fieldNameValue];
|
333
|
-
});
|
317
|
+
var fixedOption = state.flatTreeData.find(item => item.fixed === 'right') || {};
|
318
|
+
var fixedIdx = checkedValues.findIndex(value => value === fixedOption[fieldNameValue]);
|
334
319
|
if (fixedIdx >= 0) {
|
335
320
|
checkedValues.splice(fixedIdx, 0, code);
|
336
321
|
} else {
|
@@ -342,57 +327,50 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
342
327
|
if (max && checkedValues.length > max) {
|
343
328
|
var _locale$ProTreeModal4;
|
344
329
|
_message.error(maxMessage ? transformMessage({
|
345
|
-
max
|
346
|
-
}, maxMessage) : formatMessage(locale === null || locale === void 0
|
347
|
-
max
|
330
|
+
max
|
331
|
+
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal4 = locale.ProTreeModal) === null || _locale$ProTreeModal4 === void 0 ? void 0 : _locale$ProTreeModal4.selectMax, {
|
332
|
+
max
|
348
333
|
}));
|
349
334
|
return;
|
350
335
|
}
|
351
336
|
setState({
|
352
|
-
checkedValues
|
337
|
+
checkedValues,
|
353
338
|
checkAll: checkedValues.length === state.flatTreeData.length
|
354
339
|
});
|
355
340
|
};
|
356
|
-
var handleDragEndChange =
|
341
|
+
var handleDragEndChange = checkedValues => {
|
357
342
|
setState({
|
358
|
-
checkedValues
|
343
|
+
checkedValues
|
359
344
|
});
|
360
345
|
};
|
361
|
-
var onCheck =
|
362
|
-
var checkedValues =
|
346
|
+
var onCheck = (checkedKeys, info) => {
|
347
|
+
var checkedValues = [...state.checkedValues];
|
363
348
|
var originalTreeData = state.originalTreeData;
|
349
|
+
|
364
350
|
// 如果有检索则自管理
|
365
351
|
if (state.searchStr) {
|
366
352
|
var _transformTreeToArray;
|
367
353
|
var node = info.node;
|
368
354
|
// 从完整树中找到当前节点
|
369
|
-
var activeNode = treeNodeFind(state.transformedTree,
|
370
|
-
return t[fieldNameValue] === node[fieldNameValue];
|
371
|
-
}, {
|
355
|
+
var activeNode = treeNodeFind(state.transformedTree, t => t[fieldNameValue] === node[fieldNameValue], {
|
372
356
|
childrenKey: fieldNames.children
|
373
357
|
});
|
374
358
|
var allChildren = (_transformTreeToArray = transformTreeToArray([activeNode], {
|
375
359
|
childrenKey: fieldNames.children
|
376
|
-
})) === null || _transformTreeToArray === void 0 ? void 0 : _transformTreeToArray.map(
|
377
|
-
return item[fieldNameValue];
|
378
|
-
});
|
360
|
+
})) === null || _transformTreeToArray === void 0 ? void 0 : _transformTreeToArray.map(item => item[fieldNameValue]);
|
379
361
|
// 子项合并勾选
|
380
362
|
checkedValues = checkedValues.concat(allChildren);
|
381
363
|
// 从完整树中拿到父节点 只要存在父节点,那么就判断当前children是否全被勾选 若全被勾选就合并当前key到勾选队列
|
382
|
-
var
|
364
|
+
var _recourse = findNode => {
|
383
365
|
if (findNode.parentId) {
|
384
366
|
var _transformTreeToArray2;
|
385
|
-
var parentNode = treeNodeFind(state.transformedTree,
|
386
|
-
return t[fieldNameValue] === findNode.parentId;
|
387
|
-
}, {
|
367
|
+
var parentNode = treeNodeFind(state.transformedTree, t => t[fieldNameValue] === findNode.parentId, {
|
388
368
|
childrenKey: fieldNames.children
|
389
369
|
});
|
390
370
|
var parentChildrenKeys = (_transformTreeToArray2 = transformTreeToArray([parentNode], {
|
391
371
|
childrenKey: fieldNames.children
|
392
|
-
})) === null || _transformTreeToArray2 === void 0 ? void 0 : _transformTreeToArray2.map(
|
393
|
-
|
394
|
-
});
|
395
|
-
var parentChildrenAllChecked = parentChildrenKeys.every(function (key) {
|
372
|
+
})) === null || _transformTreeToArray2 === void 0 ? void 0 : _transformTreeToArray2.map(item => item[fieldNameValue]);
|
373
|
+
var parentChildrenAllChecked = parentChildrenKeys.every(key => {
|
396
374
|
return checkedValues.includes(key);
|
397
375
|
});
|
398
376
|
if (parentChildrenAllChecked) {
|
@@ -400,133 +378,120 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
400
378
|
checkedValues = checkedValues.concat([parentNode[fieldNameValue]]);
|
401
379
|
// 继续向上查找
|
402
380
|
if (parentNode.parentId) {
|
403
|
-
|
381
|
+
_recourse(parentNode);
|
404
382
|
}
|
405
383
|
}
|
406
384
|
}
|
407
385
|
};
|
408
|
-
|
386
|
+
_recourse(activeNode);
|
409
387
|
}
|
410
388
|
var _checkStrictly = state.searchStr ? true : checkStrictly;
|
389
|
+
|
411
390
|
// 此时应该取消掉自身并包含它所有的子集
|
412
391
|
if (!info.checked && !_checkStrictly) {
|
413
392
|
// 1. 取消自身
|
414
393
|
// 2. 把所有的子节点也要取消
|
415
394
|
var childrenkeys = [];
|
416
395
|
getChildrenKeys(info.node, childrenkeys, fieldNames, 'treeCheck');
|
417
|
-
checkedValues = checkedValues.filter(
|
418
|
-
|
419
|
-
});
|
396
|
+
checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
|
397
|
+
|
420
398
|
// 3. 取消父节点
|
421
399
|
var parentNodes = findTreeNodeByKey(originalTreeData, info.node.key, fieldNames);
|
422
|
-
var parentKeys = parentNodes.reduce(
|
423
|
-
|
424
|
-
}, []);
|
425
|
-
checkedValues = checkedValues.filter(function (key) {
|
426
|
-
return !parentKeys.includes(key);
|
427
|
-
});
|
400
|
+
var parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNameValue]), []);
|
401
|
+
checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
|
428
402
|
} else {
|
429
403
|
// _checkStrictly 模式下取 checkedKeys.checked 或者自身的 key
|
430
404
|
if (_checkStrictly) {
|
431
405
|
if (!info.checked) {
|
432
|
-
checkedValues = checkedValues.filter(
|
433
|
-
return key !== info.node.key;
|
434
|
-
});
|
406
|
+
checkedValues = checkedValues.filter(key => key !== info.node.key);
|
435
407
|
}
|
436
408
|
checkedKeys = checkedKeys.checked || [];
|
437
409
|
}
|
438
|
-
checkedKeys.forEach(
|
410
|
+
checkedKeys.forEach(key => {
|
439
411
|
var exist = checkedValues.includes(key);
|
440
412
|
if (info.checked && !exist) {
|
441
413
|
checkedValues.push(key);
|
442
414
|
}
|
443
415
|
});
|
444
416
|
}
|
417
|
+
|
445
418
|
// 根据选中的筛选出 viewTreeData
|
446
419
|
var treeViewData = [];
|
447
420
|
if (!checkStrictly) {
|
448
421
|
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
449
422
|
} else {
|
450
|
-
treeViewData = state.flatTreeData.filter(
|
423
|
+
treeViewData = state.flatTreeData.filter(item => {
|
451
424
|
return checkedValues.includes(item[fieldNameValue]);
|
452
425
|
});
|
453
426
|
}
|
454
427
|
if (max && checkedValues.length > max) {
|
455
428
|
var _locale$ProTreeModal5;
|
456
429
|
_message.error(maxMessage ? transformMessage({
|
457
|
-
max
|
458
|
-
}, maxMessage) : formatMessage(locale === null || locale === void 0
|
459
|
-
max
|
430
|
+
max
|
431
|
+
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal5 = locale.ProTreeModal) === null || _locale$ProTreeModal5 === void 0 ? void 0 : _locale$ProTreeModal5.selectMax, {
|
432
|
+
max
|
460
433
|
}));
|
461
434
|
return;
|
462
435
|
}
|
463
436
|
setState({
|
464
|
-
checkedValues
|
465
|
-
treeViewData
|
437
|
+
checkedValues,
|
438
|
+
treeViewData,
|
466
439
|
checkAll: state.allKeys.length === checkedValues.length
|
467
440
|
});
|
468
441
|
};
|
442
|
+
|
469
443
|
/**
|
470
444
|
* filter checkbox by fileNameValue
|
471
445
|
* @param fileNameValue
|
472
446
|
*/
|
473
|
-
var handleFilterClose =
|
447
|
+
var handleFilterClose = fileNameValue => {
|
474
448
|
setState({
|
475
|
-
checkedValues: state.checkedValues.filter(
|
476
|
-
return value !== fileNameValue;
|
477
|
-
}),
|
449
|
+
checkedValues: state.checkedValues.filter(value => value !== fileNameValue),
|
478
450
|
checkAll: false
|
479
451
|
});
|
480
452
|
};
|
453
|
+
|
481
454
|
/**
|
482
455
|
* tree close
|
483
456
|
* @param fileNamekey
|
484
457
|
* @param node
|
485
458
|
*/
|
486
|
-
var treeFilterClose =
|
487
|
-
var checkedValues =
|
459
|
+
var treeFilterClose = (fileNamekey, node) => {
|
460
|
+
var checkedValues = [...state.checkedValues];
|
488
461
|
var treeViewData = [];
|
489
462
|
var originalTreeData = state.originalTreeData;
|
490
463
|
if (checkStrictly) {
|
491
|
-
checkedValues = checkedValues.filter(
|
492
|
-
return key !== fileNamekey;
|
493
|
-
});
|
464
|
+
checkedValues = checkedValues.filter(key => key !== fileNamekey);
|
494
465
|
// handleFilterClose
|
495
|
-
treeViewData = state.flatTreeData.filter(
|
466
|
+
treeViewData = state.flatTreeData.filter(item => {
|
496
467
|
return checkedValues.includes(item[fieldNameValue]);
|
497
468
|
});
|
498
469
|
} else {
|
499
470
|
// 1. 取消自身
|
500
|
-
checkedValues = checkedValues.filter(
|
501
|
-
return key !== fileNamekey;
|
502
|
-
});
|
471
|
+
checkedValues = checkedValues.filter(key => key !== fileNamekey);
|
503
472
|
// 2. 把所有的子节点也要取消
|
504
473
|
var childrenkeys = [];
|
505
474
|
getChildrenKeys(node, childrenkeys, fieldNames, 'treeClose');
|
506
|
-
checkedValues = checkedValues.filter(
|
507
|
-
|
508
|
-
});
|
475
|
+
checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
|
476
|
+
|
509
477
|
// 3. 取消父节点
|
510
478
|
var parentNodes = findTreeNodeByKey(originalTreeData, fileNamekey, fieldNames);
|
511
|
-
var parentKeys = parentNodes.reduce(
|
512
|
-
|
513
|
-
|
514
|
-
checkedValues = checkedValues.filter(function (key) {
|
515
|
-
return !parentKeys.includes(key);
|
516
|
-
});
|
479
|
+
var parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNames.value]), []);
|
480
|
+
checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
|
481
|
+
|
517
482
|
// 根据选中的筛选出 viewTreeData
|
518
483
|
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
519
484
|
}
|
520
485
|
setState({
|
521
|
-
checkedValues
|
522
|
-
treeViewData
|
486
|
+
checkedValues,
|
487
|
+
treeViewData,
|
523
488
|
checkAll: false
|
524
489
|
});
|
525
490
|
};
|
526
|
-
var _useDebounceFn = useDebounceFn(
|
491
|
+
var _useDebounceFn = useDebounceFn(str => {
|
527
492
|
if (modeType === LIST || modeType === CASCADER) {
|
528
493
|
var isCASCADER = modeType === CASCADER;
|
529
|
-
var data = state.flatTreeData.filter(
|
494
|
+
var data = state.flatTreeData.filter(item => {
|
530
495
|
var title = isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel];
|
531
496
|
return title.includes(str);
|
532
497
|
});
|
@@ -538,47 +503,49 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
538
503
|
wait: 0
|
539
504
|
}),
|
540
505
|
onSearch = _useDebounceFn.run;
|
541
|
-
var handleSetSearchStr =
|
506
|
+
var handleSetSearchStr = str => {
|
542
507
|
setState({
|
543
508
|
searchStr: str
|
544
509
|
});
|
545
510
|
onSearch(str);
|
546
511
|
};
|
512
|
+
|
547
513
|
/**
|
548
514
|
* 指定模式下的操作
|
549
515
|
* @param appoint
|
550
516
|
*/
|
551
|
-
var appointChange =
|
517
|
+
var appointChange = appoint => {
|
552
518
|
if (appoint) {
|
553
|
-
onChange === null || onChange === void 0
|
519
|
+
onChange === null || onChange === void 0 || onChange(allValue);
|
554
520
|
setState({
|
555
521
|
checkAll: true
|
556
522
|
});
|
557
523
|
} else {
|
558
|
-
onChange === null || onChange === void 0
|
524
|
+
onChange === null || onChange === void 0 || onChange([]);
|
559
525
|
setState({
|
560
526
|
checkAll: false,
|
561
527
|
open: true
|
562
528
|
});
|
563
529
|
if (appoint) {
|
564
|
-
openChange === null || openChange === void 0
|
530
|
+
openChange === null || openChange === void 0 || openChange(true);
|
565
531
|
}
|
566
532
|
}
|
567
533
|
};
|
534
|
+
|
568
535
|
/**
|
569
536
|
* Trigger the container opened by Drawer
|
570
537
|
* default example and you can customize trigger={<Button>打开</Button>}
|
571
538
|
* @returns
|
572
539
|
*/
|
573
|
-
var TriggerComponent = useMemo(
|
540
|
+
var TriggerComponent = useMemo(() => {
|
574
541
|
var _props$otherProps3;
|
575
542
|
if (trigger && /*#__PURE__*/React.isValidElement(trigger)) {
|
576
|
-
return _jsx("div", {
|
543
|
+
return /*#__PURE__*/_jsx("div", {
|
577
544
|
onClick: handleClick,
|
578
545
|
children: trigger
|
579
546
|
});
|
580
547
|
}
|
581
|
-
return _jsx(Trigger, {
|
548
|
+
return /*#__PURE__*/_jsx(Trigger, {
|
582
549
|
checkedValues: state.checkedValues,
|
583
550
|
value: value,
|
584
551
|
checkAll: state.checkAll,
|
@@ -587,39 +554,34 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
587
554
|
isView: isView,
|
588
555
|
appoint: appoint,
|
589
556
|
allValue: allValue,
|
590
|
-
label: props === null || props === void 0
|
557
|
+
label: props === null || props === void 0 || (_props$otherProps3 = props.otherProps) === null || _props$otherProps3 === void 0 ? void 0 : _props$otherProps3.label,
|
591
558
|
handleClick: handleClick,
|
592
559
|
handleClearAll: handleClearAll,
|
593
560
|
appointChange: appointChange,
|
594
561
|
appointProps: appointProps
|
595
562
|
});
|
596
563
|
}, [state.checkedValues, state.checkAll, style, disabled, isView, value]);
|
564
|
+
|
597
565
|
/**
|
598
566
|
* 全选操作
|
599
567
|
*/
|
600
|
-
var handleAllCheck =
|
568
|
+
var handleAllCheck = e => {
|
601
569
|
var checked = e.target.checked;
|
602
570
|
var checkedValues = [];
|
603
571
|
var treeViewData = [];
|
604
572
|
if (modeType === LIST || modeType === CASCADER) {
|
605
573
|
if (checked) {
|
606
|
-
checkedValues = state.flatTreeData.map(
|
607
|
-
return item[fieldNameValue];
|
608
|
-
});
|
574
|
+
checkedValues = state.flatTreeData.map(item => item[fieldNameValue]);
|
609
575
|
} else if (!checked && span) {
|
610
576
|
// ProTable 场景下 disabled 不取消掉
|
611
|
-
checkedValues = state.flatTreeData.filter(
|
612
|
-
return item.disabled;
|
613
|
-
}).map(function (item) {
|
614
|
-
return item[fieldNameValue];
|
615
|
-
});
|
577
|
+
checkedValues = state.flatTreeData.filter(item => item.disabled).map(item => item[fieldNameValue]);
|
616
578
|
} else if (!checked) {
|
617
579
|
checkedValues = [];
|
618
580
|
}
|
619
581
|
} else if (modeType === TREE) {
|
620
582
|
checkedValues = checked ? state.allKeys : [];
|
621
583
|
if (checkStrictly) {
|
622
|
-
treeViewData =
|
584
|
+
treeViewData = [...state.flatTreeData];
|
623
585
|
} else {
|
624
586
|
treeViewData = filterCheckedNodes(state.originalTreeData, checkedValues, '', fieldNames);
|
625
587
|
}
|
@@ -627,33 +589,34 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
627
589
|
if (max && checkedValues.length > max) {
|
628
590
|
var _locale$ProTreeModal6;
|
629
591
|
_message.error(maxMessage ? transformMessage({
|
630
|
-
max
|
631
|
-
}, maxMessage) : formatMessage(locale === null || locale === void 0
|
632
|
-
max
|
592
|
+
max
|
593
|
+
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal6 = locale.ProTreeModal) === null || _locale$ProTreeModal6 === void 0 ? void 0 : _locale$ProTreeModal6.selectMax, {
|
594
|
+
max
|
633
595
|
}));
|
634
596
|
return;
|
635
597
|
}
|
636
598
|
setState({
|
637
|
-
checkedValues
|
599
|
+
checkedValues,
|
638
600
|
checkAll: checked,
|
639
|
-
treeViewData
|
601
|
+
treeViewData
|
640
602
|
});
|
641
603
|
};
|
604
|
+
|
642
605
|
/**
|
643
606
|
* 左侧容器、分为三种 list、tree、Cascader
|
644
607
|
* @returns
|
645
608
|
*/
|
646
|
-
var renderContainer =
|
609
|
+
var renderContainer = () => {
|
647
610
|
if (state.treeData.length === 0 && state.searchStr) {
|
648
611
|
var _locale$ProTreeModal7;
|
649
|
-
return _jsx("div", {
|
612
|
+
return /*#__PURE__*/_jsx("div", {
|
650
613
|
className: "pro-tree-modal-no-checks",
|
651
|
-
children: locale === null || locale === void 0
|
614
|
+
children: locale === null || locale === void 0 || (_locale$ProTreeModal7 = locale.ProTreeModal) === null || _locale$ProTreeModal7 === void 0 ? void 0 : _locale$ProTreeModal7.noFinal
|
652
615
|
});
|
653
616
|
}
|
654
617
|
switch (modeType) {
|
655
618
|
case LIST:
|
656
|
-
return _jsx(ListView, {
|
619
|
+
return /*#__PURE__*/_jsx(ListView, {
|
657
620
|
treeData: state.treeData,
|
658
621
|
optionRender: optionRender,
|
659
622
|
checkedValues: state.checkedValues,
|
@@ -665,7 +628,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
665
628
|
span: span
|
666
629
|
});
|
667
630
|
case TREE:
|
668
|
-
return _jsx(TreeView, {
|
631
|
+
return /*#__PURE__*/_jsx(TreeView, {
|
669
632
|
treeData: state.transformedTree,
|
670
633
|
originalTreeData: state.originalTreeData,
|
671
634
|
flatTreeData: state.flatTreeData,
|
@@ -681,7 +644,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
681
644
|
});
|
682
645
|
case CASCADER:
|
683
646
|
if (state.searchStr && state.treeData.length) {
|
684
|
-
return _jsx(ListView, {
|
647
|
+
return /*#__PURE__*/_jsx(ListView, {
|
685
648
|
treeData: state.treeData,
|
686
649
|
modeType: CASCADER,
|
687
650
|
optionRender: optionRender,
|
@@ -693,7 +656,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
693
656
|
fieldNames: fieldNames
|
694
657
|
});
|
695
658
|
}
|
696
|
-
return _jsx(Cascader, {
|
659
|
+
return /*#__PURE__*/_jsx(Cascader, {
|
697
660
|
dataSource: state.treeData,
|
698
661
|
fieldNames: fieldNames,
|
699
662
|
checkedValues: state.checkedValues,
|
@@ -706,34 +669,33 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
706
669
|
break;
|
707
670
|
}
|
708
671
|
};
|
709
|
-
var listTreeData = useMemo(
|
672
|
+
var listTreeData = useMemo(() => {
|
710
673
|
var checkListOptions = [];
|
711
|
-
state.checkedValues.forEach(
|
712
|
-
var option = state.flatTreeData.find(
|
713
|
-
return item[fieldNameValue] === key;
|
714
|
-
});
|
674
|
+
state.checkedValues.forEach(key => {
|
675
|
+
var option = state.flatTreeData.find(item => item[fieldNameValue] === key);
|
715
676
|
if (option) {
|
716
677
|
checkListOptions.push(option);
|
717
678
|
}
|
718
679
|
});
|
719
680
|
return checkListOptions;
|
720
681
|
}, [state.checkedValues, state.flatTreeData]);
|
682
|
+
|
721
683
|
/**
|
722
684
|
* 勾选后的右侧展示
|
723
685
|
* @returns
|
724
686
|
*/
|
725
|
-
var renderView =
|
687
|
+
var renderView = () => {
|
726
688
|
if (state.checkedValues.length === 0) {
|
727
689
|
var _locale$ProTreeModal8;
|
728
|
-
return _jsx("div", {
|
690
|
+
return /*#__PURE__*/_jsx("div", {
|
729
691
|
className: "pro-tree-modal-no-checks",
|
730
|
-
children: locale === null || locale === void 0
|
692
|
+
children: locale === null || locale === void 0 || (_locale$ProTreeModal8 = locale.ProTreeModal) === null || _locale$ProTreeModal8 === void 0 ? void 0 : _locale$ProTreeModal8.noCheck
|
731
693
|
});
|
732
694
|
}
|
733
695
|
switch (modeType) {
|
734
696
|
case LIST:
|
735
697
|
case CASCADER:
|
736
|
-
return _jsx(ListView, {
|
698
|
+
return /*#__PURE__*/_jsx(ListView, {
|
737
699
|
mode: "view",
|
738
700
|
showCodeName: showCodeName,
|
739
701
|
treeData: listTreeData,
|
@@ -748,7 +710,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
748
710
|
handleDragEndChange: handleDragEndChange
|
749
711
|
});
|
750
712
|
case TREE:
|
751
|
-
return _jsx(TreeView, {
|
713
|
+
return /*#__PURE__*/_jsx(TreeView, {
|
752
714
|
mode: "view",
|
753
715
|
checkStrictly: checkStrictly,
|
754
716
|
showCodeName: showCodeName,
|
@@ -768,10 +730,10 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
768
730
|
break;
|
769
731
|
}
|
770
732
|
};
|
771
|
-
return _jsx(_Fragment, {
|
772
|
-
children: _jsxs("div", {
|
733
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
734
|
+
children: /*#__PURE__*/_jsxs("div", {
|
773
735
|
className: "pro-tree-modal",
|
774
|
-
children: [open === undefined && TriggerComponent, _jsx(ProDrawerForm, {
|
736
|
+
children: [open === undefined && TriggerComponent, /*#__PURE__*/_jsx(ProDrawerForm, {
|
775
737
|
onOk: handleFinish,
|
776
738
|
onCancel: handleClose,
|
777
739
|
okDisabled: disabled,
|
@@ -779,46 +741,44 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
779
741
|
title: title,
|
780
742
|
showType: "Modal",
|
781
743
|
className: "pro-tree-modal-container",
|
782
|
-
extraLeft: allValue !== undefined ? _jsx(_Checkbox, {
|
744
|
+
extraLeft: allValue !== undefined ? /*#__PURE__*/_jsx(_Checkbox, {
|
783
745
|
checked: state.checkAll,
|
784
746
|
disabled: disabled,
|
785
747
|
onChange: handleAllCheck,
|
786
|
-
children: locale === null || locale === void 0
|
748
|
+
children: locale === null || locale === void 0 || (_locale$ProTreeModal9 = locale.ProTreeModal) === null || _locale$ProTreeModal9 === void 0 ? void 0 : _locale$ProTreeModal9.checkAll
|
787
749
|
}) : null,
|
788
|
-
children: _jsxs("div", {
|
750
|
+
children: /*#__PURE__*/_jsxs("div", {
|
789
751
|
className: "pro-tree-modal-content",
|
790
|
-
children: [_jsxs("div", {
|
752
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
791
753
|
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box' : ''),
|
792
|
-
children: [_jsx(_Input, {
|
754
|
+
children: [/*#__PURE__*/_jsx(_Input, {
|
793
755
|
disabled: disabled,
|
794
756
|
allowClear: true,
|
795
757
|
value: state.searchStr,
|
796
|
-
placeholder: placeholder || (locale === null || locale === void 0
|
758
|
+
placeholder: placeholder || (locale === null || locale === void 0 || (_locale$ProTreeModal10 = locale.ProTreeModal) === null || _locale$ProTreeModal10 === void 0 ? void 0 : _locale$ProTreeModal10.input),
|
797
759
|
className: "pro-tree-modal-search",
|
798
|
-
onChange:
|
799
|
-
|
800
|
-
},
|
801
|
-
prefix: _jsx(ReactSVG, {
|
760
|
+
onChange: e => handleSetSearchStr(e.target.value),
|
761
|
+
prefix: /*#__PURE__*/_jsx(ReactSVG, {
|
802
762
|
className: "pro-tree-modal-search-svg",
|
803
763
|
src: searchSVG
|
804
764
|
})
|
805
|
-
}), _jsx("div", {
|
765
|
+
}), /*#__PURE__*/_jsx("div", {
|
806
766
|
className: "pro-tree-modal-tree-warp",
|
807
767
|
children: renderContainer()
|
808
768
|
})]
|
809
|
-
}), _jsxs("div", {
|
769
|
+
}), /*#__PURE__*/_jsxs("div", {
|
810
770
|
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box-view' : ''),
|
811
|
-
children: [_jsxs("div", {
|
771
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
812
772
|
className: "pro-tree-modal-box-header",
|
813
|
-
children: [_jsxs("span", {
|
814
|
-
children: [locale === null || locale === void 0
|
815
|
-
}), _jsx(_Button, {
|
773
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
774
|
+
children: [locale === null || locale === void 0 || (_locale$ProTreeModal11 = locale.ProTreeModal) === null || _locale$ProTreeModal11 === void 0 ? void 0 : _locale$ProTreeModal11.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
|
775
|
+
}), /*#__PURE__*/_jsx(_Button, {
|
816
776
|
disabled: disabled,
|
817
777
|
type: "link",
|
818
778
|
onClick: handleClearAll,
|
819
|
-
children: locale === null || locale === void 0
|
779
|
+
children: locale === null || locale === void 0 || (_locale$ProTreeModal12 = locale.ProTreeModal) === null || _locale$ProTreeModal12 === void 0 ? void 0 : _locale$ProTreeModal12.clearAll
|
820
780
|
})]
|
821
|
-
}), _jsx("div", {
|
781
|
+
}), /*#__PURE__*/_jsx("div", {
|
822
782
|
className: "pro-tree-modal-tree-warp pro-transfer-right",
|
823
783
|
children: renderView()
|
824
784
|
})]
|