@zat-design/sisyphus-react 3.0.16-beta.2 → 3.1.4
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/README.md +7 -7
- package/dist/index.esm.css +1556 -933
- package/es/ProAction/index.d.ts +7 -0
- package/es/ProAction/index.js +220 -0
- package/es/ProAction/index.less +7 -0
- package/es/ProAction/propsType.d.ts +38 -0
- package/es/ProConfigProvider/index.d.ts +5 -4
- package/es/ProConfigProvider/index.js +9 -5
- package/es/ProDownload/index.d.ts +4 -2
- package/es/ProDownload/index.js +71 -58
- package/es/ProDownload/propsType.d.ts +18 -6
- package/es/ProDownload/style/index.less +7 -0
- package/es/ProDownload/utils.d.ts +55 -0
- package/es/ProDownload/{DownloadHelper.js → utils.js} +96 -74
- package/es/ProDrawerForm/components/ProDrawer/index.js +53 -42
- package/es/ProDrawerForm/components/ProModal/index.js +49 -30
- package/es/ProDrawerForm/index.js +43 -19
- package/es/ProDrawerForm/propsType.d.ts +7 -3
- package/es/ProDrawerForm/style/index.less +33 -23
- package/es/ProEditLabel/components/RenderProForm.js +25 -19
- package/es/ProEditLabel/index.js +23 -16
- package/es/ProEditLabel/propsType.d.ts +3 -3
- package/es/ProEditLabel/style/index.less +10 -12
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -2
- package/es/ProEditTable/components/ActionButton/index.js +83 -45
- package/es/ProEditTable/components/DndWrapper/index.js +44 -32
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -2
- package/es/ProEditTable/components/RenderField/index.js +158 -134
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -2
- package/es/ProEditTable/components/RenderToolbar/index.js +42 -31
- package/es/ProEditTable/components/Summary/index.d.ts +1 -2
- package/es/ProEditTable/components/Summary/index.js +21 -14
- package/es/ProEditTable/components/Validator/index.d.ts +3 -3
- package/es/ProEditTable/components/Validator/index.js +19 -15
- package/es/ProEditTable/index.js +126 -69
- package/es/ProEditTable/propsType.d.ts +47 -14
- package/es/ProEditTable/style/index.less +143 -53
- package/es/ProEditTable/utils/config.d.ts +2 -3
- package/es/ProEditTable/utils/config.js +53 -40
- package/es/ProEditTable/utils/index.d.ts +1 -2
- package/es/ProEditTable/utils/index.js +97 -82
- package/es/ProEditTable/utils/transform.d.ts +2 -2
- package/es/ProEditTable/utils/transform.js +1 -1
- package/es/ProEnum/components/Tag.d.ts +7 -0
- package/es/ProEnum/components/Tag.js +40 -0
- package/es/ProEnum/hooks/useEnum.d.ts +21 -0
- package/es/ProEnum/{useEnum.js → hooks/useEnum.js} +15 -19
- package/es/ProEnum/hooks/useEnumRequest.d.ts +4 -0
- package/es/ProEnum/hooks/useEnumRequest.js +287 -0
- package/es/ProEnum/index.d.ts +4 -4
- package/es/ProEnum/index.js +85 -40
- package/es/ProEnum/propsType.d.ts +17 -6
- package/es/ProEnum/propsType.js +6 -0
- package/es/ProEnum/style/index.less +23 -0
- package/es/ProEnum/utils/eventCenter.d.ts +1 -0
- package/es/ProEnum/utils/eventCenter.js +39 -0
- package/es/ProEnum/utils/getEnumLabel.d.ts +2 -0
- package/es/ProEnum/utils/getEnumLabel.js +81 -0
- package/{lib/ProEnum/utils.d.ts → es/ProEnum/utils/index.d.ts} +1 -1
- package/es/ProForm/components/Container.js +14 -10
- package/es/ProForm/components/FormFooter/index.d.ts +1 -0
- package/es/ProForm/components/FormFooter/index.js +50 -14
- package/es/ProForm/components/FormFooter/propsType.d.ts +3 -1
- package/es/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/es/ProForm/components/base/Checkbox/index.js +18 -13
- package/es/ProForm/components/base/DatePicker/index.d.ts +6 -5
- package/es/ProForm/components/base/DatePicker/index.js +16 -15
- package/es/ProForm/components/base/Input/index.d.ts +1 -2
- package/es/ProForm/components/base/Input/index.js +9 -7
- package/es/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/es/ProForm/components/base/InputNumber/index.js +96 -46
- package/es/ProForm/components/base/ProCascader/index.d.ts +14 -0
- package/es/ProForm/components/base/ProCascader/index.js +72 -0
- package/es/ProForm/components/base/Radio/index.js +13 -11
- package/es/ProForm/components/base/RangePicker/index.d.ts +4 -3
- package/es/ProForm/components/base/RangePicker/index.js +16 -11
- package/es/ProForm/components/base/Select/index.d.ts +1 -0
- package/es/ProForm/components/base/Select/index.js +18 -11
- package/es/ProForm/components/base/Switch/index.js +10 -7
- package/es/ProForm/components/base/SwitchCheckbox/index.js +25 -17
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -3
- package/es/ProForm/components/base/TextArea/index.d.ts +2 -1
- package/es/ProForm/components/base/TextArea/index.js +19 -11
- package/es/ProForm/components/base/TextArea/index.less +11 -0
- package/es/ProForm/components/base/TimePicker/index.d.ts +13 -0
- package/es/ProForm/components/base/TimePicker/index.js +42 -0
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -0
- package/es/ProForm/components/combination/Container/index.d.ts +4 -0
- package/es/ProForm/components/combination/Container/index.js +58 -0
- package/es/ProForm/components/combination/Container/propsType.d.ts +10 -0
- package/es/ProForm/components/combination/Container/style/index.less +37 -0
- package/{lib/ProForm/components/base → es/ProForm/components/combination}/FormList/components/ActionButton.d.ts +6 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +242 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +19 -0
- package/es/ProForm/components/{base → combination}/FormList/components/BlockFields.js +34 -30
- package/es/ProForm/components/{base → combination}/FormList/components/BlockTitle.d.ts +2 -4
- package/es/ProForm/components/{base → combination}/FormList/components/BlockTitle.js +6 -4
- package/es/ProForm/components/{base → combination}/FormList/components/LineFields.d.ts +7 -4
- package/es/ProForm/components/combination/FormList/components/LineFields.js +85 -0
- package/{lib/ProForm/components/base → es/ProForm/components/combination}/FormList/components/ToolbarButton.d.ts +3 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +107 -0
- package/es/ProForm/components/combination/FormList/index.d.ts +4 -0
- package/es/ProForm/components/combination/FormList/index.js +129 -0
- package/es/ProForm/components/combination/FormList/propsType.d.ts +62 -0
- package/es/ProForm/components/combination/FormList/style/index.less +71 -0
- package/es/ProForm/components/combination/Group/index.d.ts +4 -0
- package/es/ProForm/components/combination/Group/index.js +71 -0
- package/es/ProForm/components/combination/Group/propsType.d.ts +25 -0
- package/es/ProForm/components/combination/Group/style/index.less +107 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +10 -0
- package/es/ProForm/components/combination/Group/utils.js +49 -0
- package/es/ProForm/components/combination/ProAddressBar/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProAddressBar/index.js +73 -53
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -0
- package/es/ProForm/components/combination/ProCombination/index.js +43 -37
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +163 -100
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +28 -9
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +60 -53
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -32
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.js +40 -47
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +2 -1
- package/es/ProForm/components/index.d.ts +7 -3
- package/es/ProForm/components/index.js +7 -3
- package/es/ProForm/components/old/EnumSelect/index.js +63 -55
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +1 -1
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -2
- package/es/ProForm/components/old/InputRange/index.js +45 -44
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -2
- package/es/ProForm/components/old/InputWithSuffix/index.js +22 -20
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +3 -3
- package/es/ProForm/components/old/ProAddress/index.js +79 -67
- package/es/ProForm/components/old/ProCertNo/index.d.ts +2 -2
- package/es/ProForm/components/old/ProCertNo/index.js +34 -29
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +1 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +2 -2
- package/es/ProForm/components/old/ProCertValidity/index.js +40 -34
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +2 -2
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +65 -57
- package/es/ProForm/components/render/Render.js +157 -96
- package/es/ProForm/components/render/RenderFields.d.ts +3 -1
- package/es/ProForm/components/render/RenderFields.js +54 -29
- package/es/ProForm/components/render/propsType.d.ts +64 -8
- package/es/ProForm/components/render/propsType.js +0 -6
- package/es/ProForm/index.js +102 -66
- package/es/ProForm/propsType.d.ts +7 -2
- package/es/ProForm/style/index.less +77 -75
- package/es/ProForm/utils/index.d.ts +27 -2
- package/es/ProForm/utils/index.js +139 -31
- package/es/ProForm/utils/rulesCreator.d.ts +1 -1
- package/es/ProForm/utils/rulesCreator.js +12 -2
- package/es/ProForm/utils/transformNames.d.ts +1 -1
- package/es/ProForm/utils/transformValue.js +6 -9
- package/es/ProForm/utils/useChanged.js +6 -2
- package/es/ProForm/utils/useFieldProps.d.ts +4 -0
- package/es/ProForm/utils/useFieldProps.js +6 -0
- package/es/ProForm/utils/useForm.js +32 -48
- package/es/ProForm/utils/useRules.d.ts +16 -0
- package/es/ProForm/utils/useRules.js +62 -0
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -1
- package/es/ProForm/utils/useShouldUpdate.js +23 -22
- package/es/ProForm/utils/valueType.js +1 -1
- package/es/ProIcon/index.js +26 -26
- package/es/ProIcon/style/index.less +15 -0
- package/es/ProIcon/symbolIcon.js +6 -6
- package/es/ProLayout/components/Layout/Header/index.js +20 -13
- package/es/ProLayout/components/Layout/Header/style/index.less +6 -6
- package/es/ProLayout/components/Layout/Icon/Icon.js +8 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +83 -72
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +8 -8
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -2
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +76 -50
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +2 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +23 -12
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +22 -17
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +5 -4
- package/es/ProLayout/components/Layout/Menu/index.js +36 -34
- package/es/ProLayout/components/Layout/Menu/style/index.less +22 -3
- package/es/ProLayout/components/Layout/Notice/index.js +15 -13
- package/es/ProLayout/components/Layout/Notice/style/index.less +3 -3
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +1 -1
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -2
- package/es/ProLayout/components/ProCollapse/index.js +57 -43
- package/es/ProLayout/components/ProCollapse/style/index.less +10 -4
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/es/ProLayout/components/ProFooter/index.js +10 -6
- package/es/ProLayout/components/ProFooter/style/index.less +2 -2
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +30 -7
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +4 -7
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.js +253 -158
- package/es/ProLayout/components/ProHeader/style/index.less +29 -14
- package/es/ProLayout/index.d.ts +10 -6
- package/es/ProLayout/index.js +44 -26
- package/es/ProLayout/propTypes.d.ts +2 -0
- package/es/ProLayout/style/index.less +156 -1
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +4 -0
- package/es/ProSelect/components/AdaptiveTooltip.js +46 -0
- package/es/ProSelect/index.d.ts +2 -1
- package/es/ProSelect/index.js +85 -59
- package/es/ProSelect/index.less +8 -0
- package/es/ProSelect/propsType.d.ts +19 -9
- package/es/ProStep/components/Anchor/index.d.ts +1 -2
- package/es/ProStep/components/Anchor/index.js +45 -34
- package/es/ProStep/components/Item/index.d.ts +2 -6
- package/es/ProStep/components/Item/index.js +23 -7
- package/es/ProStep/components/Step/index.d.ts +1 -2
- package/es/ProStep/components/Step/index.js +19 -14
- package/es/ProStep/index.d.ts +5 -9
- package/es/ProStep/index.js +94 -20
- package/es/ProStep/propsType.d.ts +11 -1
- package/es/ProStep/style/index.less +10 -24
- package/es/ProTable/components/RenderColumn/index.d.ts +14 -0
- package/es/ProTable/components/RenderColumn/index.js +75 -0
- package/es/ProTable/components/ResizableLine/index.d.ts +1 -2
- package/es/ProTable/components/ResizableLine/index.js +2 -2
- package/es/ProTable/components/TableResizable/index.d.ts +1 -2
- package/es/ProTable/components/TableResizable/index.js +16 -12
- package/es/ProTable/components/TooltipTitle/index.d.ts +11 -0
- package/es/ProTable/components/TooltipTitle/index.js +23 -0
- package/es/ProTable/index.d.ts +3 -3
- package/es/ProTable/index.js +137 -112
- package/es/ProTable/propsType.d.ts +41 -27
- package/es/ProTable/style/index.less +66 -32
- package/es/ProTable/useAntdTable.d.ts +11 -7
- package/es/ProTable/useAntdTable.js +106 -50
- package/es/ProTable/utils.d.ts +8 -0
- package/es/ProTable/utils.js +167 -110
- package/es/ProTabs/components/Card/index.d.ts +1 -2
- package/es/ProTabs/components/Card/index.js +45 -17
- package/es/ProTabs/index.d.ts +1 -1
- package/es/ProTabs/index.js +38 -27
- package/es/ProTabs/propType.d.ts +5 -0
- package/es/ProTabs/style/index.less +15 -3
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -2
- package/es/ProThemeTools/component/PrdTools/index.js +215 -136
- package/es/ProThemeTools/component/PrdTools/style/index.less +7 -3
- package/es/ProThemeTools/index.d.ts +1 -2
- package/es/ProThemeTools/index.js +62 -49
- package/es/ProThemeTools/propsType.d.ts +16 -3
- package/es/ProThemeTools/utils/index.d.ts +10 -0
- package/es/ProThemeTools/utils/index.js +45 -0
- package/es/ProTooltip/index.d.ts +1 -2
- package/es/ProTooltip/index.js +232 -46
- package/es/ProTooltip/propsType.d.ts +3 -0
- package/es/ProTooltip/style/index.less +19 -8
- package/es/ProTree/components/CloseIcon.d.ts +3 -0
- package/es/ProTree/components/CloseIcon.js +30 -0
- package/es/ProTree/components/List.d.ts +17 -0
- package/es/ProTree/components/List.js +68 -0
- package/es/ProTree/components/ProTree.d.ts +4 -0
- package/es/ProTree/components/ProTree.js +446 -0
- package/es/ProTree/components/SearchTitle.d.ts +9 -0
- package/es/ProTree/components/SearchTitle.js +42 -0
- package/es/ProTree/components/Tree.d.ts +27 -0
- package/es/ProTree/components/Tree.js +344 -0
- package/es/ProTree/components/index.d.ts +4 -0
- package/es/ProTree/components/index.js +5 -0
- package/es/ProTree/index.d.ts +3 -0
- package/es/ProTree/index.js +25 -0
- package/es/ProTree/propsType.d.ts +217 -0
- package/es/ProTree/propsType.js +1 -0
- package/es/ProTree/style/index.less +289 -0
- package/es/ProTree/utils.d.ts +37 -0
- package/es/ProTree/utils.js +183 -0
- package/es/ProTreeModal/components/Cascader.d.ts +14 -0
- package/es/ProTreeModal/components/Cascader.js +99 -0
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -2
- package/es/ProTreeModal/components/CloseIcon.js +25 -20
- package/es/ProTreeModal/components/List.d.ts +11 -3
- package/es/ProTreeModal/components/List.js +184 -36
- package/es/ProTreeModal/components/SearchTitle.d.ts +3 -3
- package/es/ProTreeModal/components/SearchTitle.js +16 -9
- package/es/{ProTransferModal/components/SortableItem/index.d.ts → ProTreeModal/components/SortableItem.d.ts} +1 -0
- package/es/ProTreeModal/components/SortableItem.js +60 -0
- package/es/ProTreeModal/components/Tree.d.ts +14 -4
- package/es/ProTreeModal/components/Tree.js +165 -94
- package/es/ProTreeModal/components/Trigger.d.ts +5 -2
- package/es/ProTreeModal/components/Trigger.js +46 -21
- package/es/ProTreeModal/components/index.d.ts +1 -0
- package/es/ProTreeModal/components/index.js +2 -1
- package/es/ProTreeModal/index.d.ts +2 -2
- package/es/ProTreeModal/index.js +513 -146
- package/es/ProTreeModal/propsType.d.ts +71 -14
- package/es/ProTreeModal/style/index.less +231 -50
- package/es/ProTreeModal/utils.d.ts +26 -14
- package/es/ProTreeModal/utils.js +103 -40
- package/es/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTreeSelect/index.js +181 -74
- package/es/ProTreeSelect/propsType.d.ts +11 -9
- package/es/ProTreeSelect/style/index.less +94 -90
- package/es/ProUpload/components/ButtonRender.d.ts +18 -0
- package/es/ProUpload/components/ButtonRender.js +71 -0
- package/es/ProUpload/components/DragRender.d.ts +20 -0
- package/es/ProUpload/components/DragRender.js +179 -0
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -0
- package/es/ProUpload/components/DraggableUploadListItem.js +29 -0
- package/es/ProUpload/components/Example.d.ts +10 -0
- package/es/ProUpload/components/Example.js +40 -0
- package/{lib/ProUpload → es/ProUpload/components}/FileItem.d.ts +2 -2
- package/es/ProUpload/components/FileItem.js +212 -0
- package/es/ProUpload/components/ImageRender.d.ts +18 -0
- package/es/ProUpload/components/ImageRender.js +267 -0
- package/es/ProUpload/index.js +183 -301
- package/es/ProUpload/propsType.d.ts +61 -7
- package/es/ProUpload/style/fileItem.less +126 -138
- package/es/ProUpload/style/index.less +185 -115
- package/es/ProUpload/uitls.d.ts +3 -0
- package/es/ProUpload/uitls.js +14 -0
- package/es/ProUtils/utils/index.js +1 -1
- package/es/ProViewer/index.d.ts +1 -1
- package/es/ProViewer/index.js +35 -29
- package/es/ProWaterMark/index.js +9 -7
- package/es/assets/delete.svg +1 -1
- package/es/{ProUpload/style → assets}/download.svg +1 -1
- package/es/assets/input-search.svg +11 -0
- package/es/global.less +2 -2
- package/es/index.d.ts +2 -3
- package/es/index.js +4 -4
- package/es/old/ProBackBtn/index.js +6 -5
- package/es/old/ProCertValidity/index.d.ts +3 -3
- package/es/old/ProCertValidity/index.js +70 -65
- package/es/old/ProCertValidity/propsType.d.ts +2 -2
- package/es/old/ProEditableTable/index.d.ts +1 -1
- package/es/old/ProEditableTable/index.js +90 -68
- package/es/old/ProEditableTable/propsType.d.ts +3 -3
- package/es/old/ProEditableTable/utils.js +141 -125
- package/es/style/components.less +3 -4
- package/es/style/theme/antd.less +11 -5
- package/es/style/theme/index.less +80 -161
- package/es/style/theme/tokens.less +88 -0
- package/es/tokens.d.ts +83 -0
- package/es/tokens.js +2 -3
- package/lib/ProAction/index.d.ts +7 -0
- package/lib/ProAction/index.js +224 -0
- package/lib/ProAction/index.less +7 -0
- package/lib/ProAction/propsType.d.ts +38 -0
- package/lib/ProConfigProvider/index.d.ts +5 -4
- package/lib/ProConfigProvider/index.js +11 -10
- package/lib/ProDownload/index.d.ts +4 -2
- package/lib/ProDownload/index.js +73 -60
- package/lib/ProDownload/propsType.d.ts +18 -6
- package/lib/ProDownload/style/index.less +7 -0
- package/lib/ProDownload/utils.d.ts +55 -0
- package/lib/ProDownload/{DownloadHelper.js → utils.js} +98 -78
- package/lib/ProDrawerForm/components/ProDrawer/index.js +54 -44
- package/lib/ProDrawerForm/components/ProModal/index.js +49 -31
- package/lib/ProDrawerForm/index.js +44 -21
- package/lib/ProDrawerForm/propsType.d.ts +7 -3
- package/lib/ProDrawerForm/style/index.less +33 -23
- package/lib/ProDrawerForm/utils/index.js +2 -3
- package/lib/ProEditLabel/components/RenderProForm.js +26 -22
- package/lib/ProEditLabel/index.js +24 -18
- package/lib/ProEditLabel/propsType.d.ts +3 -3
- package/lib/ProEditLabel/style/index.less +10 -12
- package/lib/ProEditLabel/utils/index.js +2 -3
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -2
- package/lib/ProEditTable/components/ActionButton/index.js +84 -47
- package/lib/ProEditTable/components/DndWrapper/index.js +46 -36
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -2
- package/lib/ProEditTable/components/RenderField/index.js +158 -135
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -2
- package/lib/ProEditTable/components/RenderToolbar/index.js +43 -33
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -2
- package/lib/ProEditTable/components/Summary/index.js +22 -16
- package/lib/ProEditTable/components/Validator/index.d.ts +3 -3
- package/lib/ProEditTable/components/Validator/index.js +20 -18
- package/lib/ProEditTable/index.js +124 -71
- package/lib/ProEditTable/propsType.d.ts +47 -14
- package/lib/ProEditTable/style/index.less +143 -53
- package/lib/ProEditTable/utils/config.d.ts +2 -3
- package/lib/ProEditTable/utils/config.js +61 -55
- package/lib/ProEditTable/utils/index.d.ts +1 -2
- package/lib/ProEditTable/utils/index.js +98 -84
- package/lib/ProEditTable/utils/tools.js +7 -13
- package/lib/ProEditTable/utils/transform.d.ts +2 -2
- package/lib/ProEditTable/utils/transform.js +3 -4
- package/lib/ProEnum/components/Tag.d.ts +7 -0
- package/lib/ProEnum/components/Tag.js +47 -0
- package/lib/ProEnum/hooks/useEnum.d.ts +21 -0
- package/lib/ProEnum/{useEnum.js → hooks/useEnum.js} +18 -24
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +4 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +294 -0
- package/lib/ProEnum/index.d.ts +4 -4
- package/lib/ProEnum/index.js +86 -42
- package/lib/ProEnum/propsType.d.ts +17 -6
- package/lib/ProEnum/propsType.js +7 -1
- package/lib/ProEnum/style/index.less +23 -0
- package/lib/ProEnum/utils/eventCenter.d.ts +1 -0
- package/lib/ProEnum/utils/eventCenter.js +42 -0
- package/lib/ProEnum/utils/getEnumLabel.d.ts +2 -0
- package/lib/ProEnum/utils/getEnumLabel.js +88 -0
- package/{es/ProEnum/utils.d.ts → lib/ProEnum/utils/index.d.ts} +1 -1
- package/lib/ProForm/components/Container.js +15 -12
- package/lib/ProForm/components/FormFooter/index.d.ts +1 -0
- package/lib/ProForm/components/FormFooter/index.js +52 -18
- package/lib/ProForm/components/FormFooter/propsType.d.ts +3 -1
- package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/lib/ProForm/components/base/Checkbox/index.js +19 -15
- package/lib/ProForm/components/base/DatePicker/index.d.ts +6 -5
- package/lib/ProForm/components/base/DatePicker/index.js +18 -18
- package/lib/ProForm/components/base/Input/index.d.ts +1 -2
- package/lib/ProForm/components/base/Input/index.js +11 -10
- package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/lib/ProForm/components/base/InputNumber/index.js +98 -50
- package/lib/ProForm/components/base/ProCascader/index.d.ts +14 -0
- package/lib/ProForm/components/base/ProCascader/index.js +78 -0
- package/lib/ProForm/components/base/Radio/index.js +14 -13
- package/lib/ProForm/components/base/RangePicker/index.d.ts +4 -3
- package/lib/ProForm/components/base/RangePicker/index.js +13 -11
- package/lib/ProForm/components/base/Select/index.d.ts +1 -0
- package/lib/ProForm/components/base/Select/index.js +20 -14
- package/lib/ProForm/components/base/Switch/index.js +12 -10
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +26 -20
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -3
- package/lib/ProForm/components/base/TextArea/index.d.ts +2 -1
- package/lib/ProForm/components/base/TextArea/index.js +21 -14
- package/lib/ProForm/components/base/TextArea/index.less +11 -0
- package/lib/ProForm/components/base/TimePicker/index.d.ts +13 -0
- package/lib/ProForm/components/base/TimePicker/index.js +48 -0
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -0
- package/lib/ProForm/components/combination/Container/index.d.ts +4 -0
- package/lib/ProForm/components/combination/Container/index.js +65 -0
- package/lib/ProForm/components/combination/Container/propsType.d.ts +10 -0
- package/lib/ProForm/components/combination/Container/style/index.less +37 -0
- package/{es/ProForm/components/base → lib/ProForm/components/combination}/FormList/components/ActionButton.d.ts +6 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +243 -0
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +19 -0
- package/lib/ProForm/components/{base → combination}/FormList/components/BlockFields.js +35 -33
- package/lib/ProForm/components/{base → combination}/FormList/components/BlockTitle.d.ts +2 -4
- package/lib/ProForm/components/{base → combination}/FormList/components/BlockTitle.js +7 -6
- package/lib/ProForm/components/{base → combination}/FormList/components/LineFields.d.ts +7 -4
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +91 -0
- package/{es/ProForm/components/base → lib/ProForm/components/combination}/FormList/components/ToolbarButton.d.ts +3 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +111 -0
- package/lib/ProForm/components/combination/FormList/index.d.ts +4 -0
- package/lib/ProForm/components/combination/FormList/index.js +135 -0
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +62 -0
- package/lib/ProForm/components/combination/FormList/style/index.less +71 -0
- package/lib/ProForm/components/{base → combination}/FormList/utils.js +2 -3
- package/lib/ProForm/components/combination/Group/index.d.ts +4 -0
- package/lib/ProForm/components/combination/Group/index.js +75 -0
- package/lib/ProForm/components/combination/Group/propsType.d.ts +25 -0
- package/lib/ProForm/components/combination/Group/style/index.less +107 -0
- package/lib/ProForm/components/combination/Group/utils.d.ts +10 -0
- package/lib/ProForm/components/combination/Group/utils.js +56 -0
- package/lib/ProForm/components/combination/ProAddressBar/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.js +75 -57
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -0
- package/lib/ProForm/components/combination/ProCombination/index.js +46 -43
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +161 -99
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +28 -9
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +61 -55
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +44 -36
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +1 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +41 -50
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +2 -1
- package/lib/ProForm/components/index.d.ts +7 -3
- package/lib/ProForm/components/index.js +40 -13
- package/lib/ProForm/components/old/EnumSelect/index.js +64 -58
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +1 -1
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -2
- package/lib/ProForm/components/old/InputRange/index.js +46 -47
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -2
- package/lib/ProForm/components/old/InputWithSuffix/index.js +23 -22
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +3 -3
- package/lib/ProForm/components/old/ProAddress/index.js +81 -72
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +2 -2
- package/lib/ProForm/components/old/ProCertNo/index.js +36 -34
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +2 -2
- package/lib/ProForm/components/old/ProCertValidity/index.js +39 -38
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +2 -2
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +65 -57
- package/lib/ProForm/components/render/Render.js +152 -95
- package/lib/ProForm/components/render/RenderFields.d.ts +3 -1
- package/lib/ProForm/components/render/RenderFields.js +54 -30
- package/lib/ProForm/components/render/propsType.d.ts +64 -8
- package/lib/ProForm/components/render/propsType.js +1 -7
- package/lib/ProForm/index.js +101 -66
- package/lib/ProForm/propsType.d.ts +7 -2
- package/lib/ProForm/propsType.js +1 -2
- package/lib/ProForm/style/index.less +77 -75
- package/lib/ProForm/utils/contrastOriginal.js +2 -3
- package/lib/ProForm/utils/index.d.ts +27 -2
- package/lib/ProForm/utils/index.js +154 -61
- package/lib/ProForm/utils/rulesCreator.d.ts +1 -1
- package/lib/ProForm/utils/rulesCreator.js +15 -5
- package/lib/ProForm/utils/transformNames.d.ts +1 -1
- package/lib/ProForm/utils/transformNames.js +1 -2
- package/lib/ProForm/utils/transformValue.js +7 -12
- package/lib/ProForm/utils/useChanged.js +8 -5
- package/lib/ProForm/utils/useFieldProps.d.ts +4 -0
- package/lib/ProForm/utils/useFieldProps.js +13 -0
- package/lib/ProForm/utils/useForm.js +32 -49
- package/lib/ProForm/utils/useRules.d.ts +16 -0
- package/lib/ProForm/utils/useRules.js +69 -0
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -1
- package/lib/ProForm/utils/useShouldUpdate.js +23 -23
- package/lib/ProForm/utils/valueType.js +3 -4
- package/lib/ProIcon/index.js +27 -29
- package/lib/ProIcon/style/index.less +15 -0
- package/lib/ProIcon/symbolIcon.js +6 -6
- package/lib/ProLayout/components/Layout/Header/index.js +21 -15
- package/lib/ProLayout/components/Layout/Header/style/index.less +6 -6
- package/lib/ProLayout/components/Layout/Icon/Icon.js +9 -9
- package/lib/ProLayout/components/Layout/Icon/index.js +1 -2
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +84 -74
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +8 -8
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -2
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +78 -54
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +2 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +23 -12
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +23 -20
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +5 -4
- package/lib/ProLayout/components/Layout/Menu/index.js +37 -36
- package/lib/ProLayout/components/Layout/Menu/style/index.less +22 -3
- package/lib/ProLayout/components/Layout/Notice/index.js +16 -15
- package/lib/ProLayout/components/Layout/Notice/style/index.less +3 -3
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +1 -1
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -2
- package/lib/ProLayout/components/ProCollapse/index.js +58 -45
- package/lib/ProLayout/components/ProCollapse/style/index.less +10 -4
- package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/lib/ProLayout/components/ProFooter/index.js +11 -9
- package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +30 -7
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +5 -9
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.js +251 -161
- package/lib/ProLayout/components/ProHeader/style/index.less +29 -14
- package/lib/ProLayout/index.d.ts +10 -6
- package/lib/ProLayout/index.js +45 -30
- package/lib/ProLayout/propTypes.d.ts +2 -0
- package/lib/ProLayout/style/index.less +156 -1
- package/lib/ProLayout/utils/index.js +5 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +4 -0
- package/lib/ProSelect/components/AdaptiveTooltip.js +52 -0
- package/lib/ProSelect/index.d.ts +2 -1
- package/lib/ProSelect/index.js +88 -62
- package/lib/ProSelect/index.less +8 -0
- package/lib/ProSelect/propsType.d.ts +19 -9
- package/lib/ProStep/components/Anchor/index.d.ts +1 -2
- package/lib/ProStep/components/Anchor/index.js +47 -38
- package/lib/ProStep/components/Item/index.d.ts +2 -6
- package/lib/ProStep/components/Item/index.js +25 -10
- package/lib/ProStep/components/Listener/index.js +2 -3
- package/lib/ProStep/components/Step/index.d.ts +1 -2
- package/lib/ProStep/components/Step/index.js +21 -18
- package/lib/ProStep/index.d.ts +5 -9
- package/lib/ProStep/index.js +97 -27
- package/lib/ProStep/propsType.d.ts +11 -1
- package/lib/ProStep/style/index.less +10 -24
- package/lib/ProStep/utils/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +14 -0
- package/lib/ProTable/components/RenderColumn/index.js +81 -0
- package/lib/ProTable/components/ResizableLine/index.d.ts +1 -2
- package/lib/ProTable/components/ResizableLine/index.js +3 -5
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -2
- package/lib/ProTable/components/TableResizable/index.js +18 -16
- package/lib/ProTable/components/TooltipTitle/index.d.ts +11 -0
- package/lib/ProTable/components/TooltipTitle/index.js +29 -0
- package/lib/ProTable/index.d.ts +3 -3
- package/lib/ProTable/index.js +141 -120
- package/lib/ProTable/propsType.d.ts +41 -27
- package/lib/ProTable/style/index.less +66 -32
- package/lib/ProTable/useAntdTable.d.ts +11 -7
- package/lib/ProTable/useAntdTable.js +105 -51
- package/lib/ProTable/utils.d.ts +8 -0
- package/lib/ProTable/utils.js +169 -113
- package/lib/ProTabs/components/Card/index.d.ts +1 -2
- package/lib/ProTabs/components/Card/index.js +42 -20
- package/lib/ProTabs/index.d.ts +1 -1
- package/lib/ProTabs/index.js +39 -30
- package/lib/ProTabs/propType.d.ts +5 -0
- package/lib/ProTabs/style/index.less +15 -3
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -2
- package/lib/ProThemeTools/component/PrdTools/index.js +215 -138
- package/lib/ProThemeTools/component/PrdTools/style/index.less +7 -3
- package/lib/ProThemeTools/index.d.ts +1 -2
- package/lib/ProThemeTools/index.js +62 -51
- package/lib/ProThemeTools/propsType.d.ts +16 -3
- package/lib/ProThemeTools/utils/index.d.ts +10 -0
- package/lib/ProThemeTools/utils/index.js +49 -7
- package/lib/ProTooltip/index.d.ts +1 -2
- package/lib/ProTooltip/index.js +231 -47
- package/lib/ProTooltip/propsType.d.ts +3 -0
- package/lib/ProTooltip/style/index.less +19 -8
- package/lib/ProTree/components/CloseIcon.d.ts +3 -0
- package/lib/ProTree/components/CloseIcon.js +37 -0
- package/lib/ProTree/components/List.d.ts +17 -0
- package/lib/ProTree/components/List.js +74 -0
- package/lib/ProTree/components/ProTree.d.ts +4 -0
- package/lib/ProTree/components/ProTree.js +446 -0
- package/lib/ProTree/components/SearchTitle.d.ts +9 -0
- package/lib/ProTree/components/SearchTitle.js +47 -0
- package/lib/ProTree/components/Tree.d.ts +27 -0
- package/lib/ProTree/components/Tree.js +349 -0
- package/lib/ProTree/components/index.d.ts +4 -0
- package/lib/ProTree/components/index.js +34 -0
- package/lib/ProTree/index.d.ts +3 -0
- package/lib/ProTree/index.js +32 -0
- package/lib/ProTree/propsType.d.ts +217 -0
- package/lib/ProTree/propsType.js +5 -0
- package/lib/ProTree/style/index.less +289 -0
- package/lib/ProTree/utils.d.ts +37 -0
- package/lib/ProTree/utils.js +195 -0
- package/lib/ProTreeModal/components/Cascader.d.ts +14 -0
- package/lib/ProTreeModal/components/Cascader.js +105 -0
- package/lib/ProTreeModal/components/CloseIcon.d.ts +2 -2
- package/lib/ProTreeModal/components/CloseIcon.js +26 -22
- package/lib/ProTreeModal/components/List.d.ts +11 -3
- package/lib/ProTreeModal/components/List.js +181 -37
- package/lib/ProTreeModal/components/SearchTitle.d.ts +3 -3
- package/lib/ProTreeModal/components/SearchTitle.js +17 -12
- package/lib/{ProTransferModal/components/SortableItem/index.d.ts → ProTreeModal/components/SortableItem.d.ts} +1 -0
- package/lib/{ProTransferModal/components/SortableItem/index.js → ProTreeModal/components/SortableItem.js} +29 -26
- package/lib/ProTreeModal/components/Tree.d.ts +14 -4
- package/lib/ProTreeModal/components/Tree.js +164 -95
- package/lib/ProTreeModal/components/Trigger.d.ts +5 -2
- package/lib/ProTreeModal/components/Trigger.js +47 -23
- package/lib/ProTreeModal/components/index.d.ts +1 -0
- package/lib/ProTreeModal/components/index.js +8 -1
- package/lib/ProTreeModal/index.d.ts +2 -2
- package/lib/ProTreeModal/index.js +507 -146
- package/lib/ProTreeModal/propsType.d.ts +71 -14
- package/lib/ProTreeModal/style/index.less +231 -50
- package/lib/ProTreeModal/utils.d.ts +26 -14
- package/lib/ProTreeModal/utils.js +107 -43
- package/lib/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTreeSelect/index.js +183 -81
- package/lib/ProTreeSelect/propsType.d.ts +11 -9
- package/lib/ProTreeSelect/style/index.less +94 -90
- package/lib/ProUpload/components/ButtonRender.d.ts +18 -0
- package/lib/ProUpload/components/ButtonRender.js +75 -0
- package/lib/ProUpload/components/DragRender.d.ts +20 -0
- package/lib/ProUpload/components/DragRender.js +185 -0
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +2 -0
- package/lib/ProUpload/components/DraggableUploadListItem.js +36 -0
- package/lib/ProUpload/components/Example.d.ts +10 -0
- package/lib/ProUpload/components/Example.js +47 -0
- package/{es/ProUpload → lib/ProUpload/components}/FileItem.d.ts +2 -2
- package/lib/ProUpload/components/FileItem.js +215 -0
- package/lib/ProUpload/components/ImageRender.d.ts +18 -0
- package/lib/ProUpload/components/ImageRender.js +265 -0
- package/lib/ProUpload/index.js +185 -298
- package/lib/ProUpload/propsType.d.ts +61 -7
- package/lib/ProUpload/style/fileItem.less +126 -138
- package/lib/ProUpload/style/index.less +185 -115
- package/lib/ProUpload/uitls.d.ts +3 -0
- package/lib/ProUpload/uitls.js +20 -0
- package/lib/ProUtils/utils/index.js +3 -4
- package/lib/ProViewer/index.d.ts +1 -1
- package/lib/ProViewer/index.js +36 -31
- package/lib/ProWaterMark/index.js +10 -9
- package/lib/assets/delete.svg +1 -1
- package/lib/{ProUpload/style → assets}/download.svg +1 -1
- package/lib/assets/input-search.svg +11 -0
- package/lib/global.less +2 -2
- package/lib/index.d.ts +2 -3
- package/lib/index.js +21 -25
- package/lib/old/ProBackBtn/index.js +7 -8
- package/lib/old/ProCertValidity/index.d.ts +3 -3
- package/lib/old/ProCertValidity/index.js +68 -68
- package/lib/old/ProCertValidity/propsType.d.ts +2 -2
- package/lib/old/ProEditableTable/index.d.ts +1 -1
- package/lib/old/ProEditableTable/index.js +91 -71
- package/lib/old/ProEditableTable/propsType.d.ts +3 -3
- package/lib/old/ProEditableTable/utils.js +147 -136
- package/lib/style/components.less +3 -4
- package/lib/style/theme/antd.less +11 -5
- package/lib/style/theme/index.less +80 -161
- package/lib/style/theme/tokens.less +88 -0
- package/lib/tokens.d.ts +83 -0
- package/lib/tokens.js +6 -3
- package/package.json +18 -12
- package/typings.d.ts +14 -3
- package/es/ProDownload/DownloadHelper.d.ts +0 -32
- package/es/ProEnum/getEnumLabel.d.ts +0 -3
- package/es/ProEnum/getEnumLabel.js +0 -62
- package/es/ProEnum/useEnum.d.ts +0 -14
- package/es/ProEnum/useEnumRequest.d.ts +0 -3
- package/es/ProEnum/useEnumRequest.js +0 -227
- package/es/ProForm/components/base/FormList/components/ActionButton.js +0 -169
- package/es/ProForm/components/base/FormList/components/BlockFields.d.ts +0 -16
- package/es/ProForm/components/base/FormList/components/LineFields.js +0 -46
- package/es/ProForm/components/base/FormList/components/ToolbarButton.js +0 -79
- package/es/ProForm/components/base/FormList/index.d.ts +0 -44
- package/es/ProForm/components/base/FormList/index.js +0 -99
- package/es/ProForm/components/base/FormList/style/index.less +0 -39
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +0 -12
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +0 -36
- package/es/ProForm/components/old/CertNo/index.d.ts +0 -19
- package/es/ProForm/components/old/CertNo/index.js +0 -63
- package/es/ProForm/components/old/CertNo/propsType.d.ts +0 -13
- package/es/ProLayout/images/pack.png +0 -0
- package/es/ProTransferModal/components/SortableItem/index.js +0 -56
- package/es/ProTransferModal/index.d.ts +0 -4
- package/es/ProTransferModal/index.js +0 -338
- package/es/ProTransferModal/propsType.d.ts +0 -34
- package/es/ProTransferModal/style/index.less +0 -169
- package/es/ProTreeModal/data/datasource.d.ts +0 -5
- package/es/ProTreeModal/data/datasource.js +0 -17
- package/es/ProTreeModal/data/mock.d.ts +0 -9
- package/es/ProTreeModal/data/mock.js +0 -39
- package/es/ProUpload/Example.d.ts +0 -7
- package/es/ProUpload/Example.js +0 -40
- package/es/ProUpload/FileItem.js +0 -207
- package/es/ProUpload/style/delete.svg +0 -1
- package/es/old/ProCustomColumn/LeftBody.d.ts +0 -4
- package/es/old/ProCustomColumn/LeftBody.js +0 -206
- package/es/old/ProCustomColumn/RightBody.d.ts +0 -9
- package/es/old/ProCustomColumn/RightBody.js +0 -145
- package/es/old/ProCustomColumn/index.d.ts +0 -4
- package/es/old/ProCustomColumn/index.js +0 -165
- package/es/old/ProCustomColumn/propsType.d.ts +0 -39
- package/es/old/ProCustomColumn/style/LeftBody.less +0 -74
- package/es/old/ProCustomColumn/style/RightBody.less +0 -25
- package/es/old/ProCustomColumn/style/index.less +0 -88
- package/es/old/ProEnumSelectModal/hooks/useRequestList.d.ts +0 -32
- package/es/old/ProEnumSelectModal/hooks/useRequestList.js +0 -110
- package/es/old/ProEnumSelectModal/index.d.ts +0 -12
- package/es/old/ProEnumSelectModal/index.js +0 -222
- package/es/old/ProEnumSelectModal/propsType.d.ts +0 -22
- package/es/old/ProEnumSelectModal/style/index.less +0 -98
- package/lib/ProDownload/DownloadHelper.d.ts +0 -32
- package/lib/ProEnum/getEnumLabel.d.ts +0 -3
- package/lib/ProEnum/getEnumLabel.js +0 -70
- package/lib/ProEnum/useEnum.d.ts +0 -14
- package/lib/ProEnum/useEnumRequest.d.ts +0 -3
- package/lib/ProEnum/useEnumRequest.js +0 -236
- package/lib/ProForm/components/base/FormList/components/ActionButton.js +0 -173
- package/lib/ProForm/components/base/FormList/components/BlockFields.d.ts +0 -16
- package/lib/ProForm/components/base/FormList/components/LineFields.js +0 -53
- package/lib/ProForm/components/base/FormList/components/ToolbarButton.js +0 -85
- package/lib/ProForm/components/base/FormList/index.d.ts +0 -44
- package/lib/ProForm/components/base/FormList/index.js +0 -107
- package/lib/ProForm/components/base/FormList/style/index.less +0 -39
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +0 -12
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +0 -44
- package/lib/ProForm/components/old/CertNo/index.d.ts +0 -19
- package/lib/ProForm/components/old/CertNo/index.js +0 -69
- package/lib/ProForm/components/old/CertNo/propsType.d.ts +0 -13
- package/lib/ProLayout/images/pack.png +0 -0
- package/lib/ProTransferModal/index.d.ts +0 -4
- package/lib/ProTransferModal/index.js +0 -334
- package/lib/ProTransferModal/propsType.d.ts +0 -34
- package/lib/ProTransferModal/style/index.less +0 -169
- package/lib/ProTreeModal/data/datasource.d.ts +0 -5
- package/lib/ProTreeModal/data/datasource.js +0 -24
- package/lib/ProTreeModal/data/mock.d.ts +0 -9
- package/lib/ProTreeModal/data/mock.js +0 -47
- package/lib/ProUpload/Example.d.ts +0 -7
- package/lib/ProUpload/Example.js +0 -50
- package/lib/ProUpload/FileItem.js +0 -216
- package/lib/ProUpload/style/delete.svg +0 -1
- package/lib/old/ProCustomColumn/LeftBody.d.ts +0 -4
- package/lib/old/ProCustomColumn/LeftBody.js +0 -212
- package/lib/old/ProCustomColumn/RightBody.d.ts +0 -9
- package/lib/old/ProCustomColumn/RightBody.js +0 -150
- package/lib/old/ProCustomColumn/index.d.ts +0 -4
- package/lib/old/ProCustomColumn/index.js +0 -171
- package/lib/old/ProCustomColumn/propsType.d.ts +0 -39
- package/lib/old/ProCustomColumn/style/LeftBody.less +0 -74
- package/lib/old/ProCustomColumn/style/RightBody.less +0 -25
- package/lib/old/ProCustomColumn/style/index.less +0 -88
- package/lib/old/ProEnumSelectModal/hooks/useRequestList.d.ts +0 -32
- package/lib/old/ProEnumSelectModal/hooks/useRequestList.js +0 -117
- package/lib/old/ProEnumSelectModal/index.d.ts +0 -12
- package/lib/old/ProEnumSelectModal/index.js +0 -220
- package/lib/old/ProEnumSelectModal/propsType.d.ts +0 -22
- package/lib/old/ProEnumSelectModal/style/index.less +0 -98
- /package/es/{ProForm/components/old/CertNo → ProAction}/propsType.js +0 -0
- /package/es/ProEnum/{utils.js → utils/index.js} +0 -0
- /package/es/{ProTransferModal → ProForm/components/combination/Container}/propsType.js +0 -0
- /package/es/{old/ProCustomColumn → ProForm/components/combination/FormList}/propsType.js +0 -0
- /package/es/ProForm/components/{base → combination}/FormList/utils.d.ts +0 -0
- /package/es/ProForm/components/{base → combination}/FormList/utils.js +0 -0
- /package/es/{old/ProEnumSelectModal → ProForm/components/combination/Group}/propsType.js +0 -0
- /package/es/{ProUpload/style → assets}/look.svg +0 -0
- /package/lib/{ProForm/components/old/CertNo → ProAction}/propsType.js +0 -0
- /package/lib/ProEnum/{utils.js → utils/index.js} +0 -0
- /package/lib/{ProTransferModal → ProForm/components/combination/Container}/propsType.js +0 -0
- /package/lib/{old/ProCustomColumn → ProForm/components/combination/FormList}/propsType.js +0 -0
- /package/lib/ProForm/components/{base → combination}/FormList/utils.d.ts +0 -0
- /package/lib/{old/ProEnumSelectModal → ProForm/components/combination/Group}/propsType.js +0 -0
- /package/lib/{ProUpload/style → assets}/look.svg +0 -0
package/es/ProTreeModal/index.js
CHANGED
|
@@ -1,38 +1,78 @@
|
|
|
1
|
+
import "antd/es/button/style";
|
|
2
|
+
import _Button from "antd/es/button";
|
|
3
|
+
import "antd/es/input/style";
|
|
4
|
+
import _Input from "antd/es/input";
|
|
5
|
+
import "antd/es/checkbox/style";
|
|
6
|
+
import _Checkbox from "antd/es/checkbox";
|
|
1
7
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
8
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
9
|
import "antd/es/message/style";
|
|
3
10
|
import _message from "antd/es/message";
|
|
4
11
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
12
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
import "
|
|
7
|
-
import
|
|
8
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
9
|
-
import React, { useEffect } from 'react';
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
10
15
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc } from 'ahooks';
|
|
11
|
-
import { ProDrawerForm, useProConfig } from 'zat-design-pro-component';
|
|
12
16
|
import { cloneDeep, isFunction } from 'lodash';
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
17
|
+
import { ReactSVG } from 'react-svg';
|
|
18
|
+
import classNames from 'classnames';
|
|
19
|
+
import { ProDrawerForm, useProConfig } from '../index';
|
|
20
|
+
import { Trigger, ListView, TreeView, Cascader } from './components';
|
|
21
|
+
import { getFlatTreeData, filterCheckedNodes, getChildrenKeys, findTreeNodeByKey, getAllKeys, transformMessage } from './utils';
|
|
22
|
+
import searchSVG from '../assets/input-search.svg';
|
|
15
23
|
import './style/index.less';
|
|
16
|
-
var
|
|
24
|
+
var LIST = 'LIST';
|
|
25
|
+
var TREE = 'TREE';
|
|
26
|
+
export var CASCADER = 'CASCADER';
|
|
17
27
|
var ProTreeModal = function ProTreeModal(props) {
|
|
28
|
+
var _props$otherProps, _props$otherProps2;
|
|
18
29
|
var _useProConfig = useProConfig('ProEnum'),
|
|
19
30
|
_useProConfig$dics = _useProConfig.dics,
|
|
20
31
|
dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
|
|
21
|
-
var
|
|
32
|
+
var listRef = useRef();
|
|
33
|
+
var open = props.open,
|
|
34
|
+
value = props.value,
|
|
22
35
|
onChange = props.onChange,
|
|
23
36
|
dataSource = props.dataSource,
|
|
24
37
|
trigger = props.trigger,
|
|
25
38
|
_props$mode = props.mode,
|
|
26
|
-
mode = _props$mode === void 0 ? '
|
|
39
|
+
mode = _props$mode === void 0 ? 'tree' : _props$mode,
|
|
27
40
|
enumCode = props.code,
|
|
28
41
|
_props$title = props.title,
|
|
29
42
|
title = _props$title === void 0 ? '请选择' : _props$title,
|
|
30
43
|
useRequest = props.useRequest,
|
|
44
|
+
allValue = props.allValue,
|
|
31
45
|
_props$showCodeName = props.showCodeName,
|
|
32
46
|
showCodeName = _props$showCodeName === void 0 ? false : _props$showCodeName,
|
|
47
|
+
_props$checkStrictly = props.checkStrictly,
|
|
48
|
+
checkStrictly = _props$checkStrictly === void 0 ? false : _props$checkStrictly,
|
|
49
|
+
tags = props.tags,
|
|
50
|
+
placeholder = props.placeholder,
|
|
51
|
+
_props$labelInValue = props.labelInValue,
|
|
52
|
+
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
53
|
+
_props$style = props.style,
|
|
54
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
55
|
+
min = props.min,
|
|
56
|
+
max = props.max,
|
|
57
|
+
draggable = props.draggable,
|
|
58
|
+
span = props.span,
|
|
59
|
+
_props$fieldNames = props.fieldNames,
|
|
60
|
+
fieldNames = _props$fieldNames === void 0 ? {
|
|
61
|
+
label: 'label',
|
|
62
|
+
value: 'value',
|
|
63
|
+
children: 'children'
|
|
64
|
+
} : _props$fieldNames,
|
|
33
65
|
_props$disabled = props.disabled,
|
|
34
|
-
disabled = _props$disabled === void 0 ?
|
|
35
|
-
|
|
66
|
+
disabled = _props$disabled === void 0 ? props.disabled || (props === null || props === void 0 ? void 0 : (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
|
|
67
|
+
_props$isView = props.isView,
|
|
68
|
+
isView = _props$isView === void 0 ? (props === null || props === void 0 ? void 0 : (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
|
|
69
|
+
transformResponse = props.transformResponse,
|
|
70
|
+
optionRender = props.optionRender,
|
|
71
|
+
openChange = props.openChange,
|
|
72
|
+
maxMessage = props.maxMessage;
|
|
73
|
+
var modeType = mode.toUpperCase();
|
|
74
|
+
var fieldNameLabel = fieldNames.label;
|
|
75
|
+
var fieldNameValue = fieldNames.value;
|
|
36
76
|
var _useSetState = useSetState({
|
|
37
77
|
open: false,
|
|
38
78
|
checkedValues: [],
|
|
@@ -40,7 +80,9 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
40
80
|
treeViewData: [],
|
|
41
81
|
originalTreeData: [],
|
|
42
82
|
flatTreeData: [],
|
|
43
|
-
searchStr: ''
|
|
83
|
+
searchStr: '',
|
|
84
|
+
checkAll: false,
|
|
85
|
+
allKeys: []
|
|
44
86
|
}),
|
|
45
87
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
46
88
|
state = _useSetState2[0],
|
|
@@ -48,28 +90,23 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
48
90
|
var fetchFunction = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread({
|
|
49
91
|
manual: true,
|
|
50
92
|
onSuccess: function onSuccess(res) {
|
|
93
|
+
var _res$status = res.status,
|
|
94
|
+
status = _res$status === void 0 ? 200 : _res$status,
|
|
95
|
+
msg = res.message;
|
|
96
|
+
var responseData = res === null || res === void 0 ? void 0 : res.data;
|
|
51
97
|
if (transformResponse && typeof transformResponse === 'function') {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
} else {
|
|
59
|
-
var _res$status = res.status,
|
|
60
|
-
status = _res$status === void 0 ? 200 : _res$status,
|
|
61
|
-
msg = res.message,
|
|
62
|
-
data = res.data;
|
|
63
|
-
if (status !== 200) {
|
|
64
|
-
_message.error(msg);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
setState({
|
|
68
|
-
treeData: data,
|
|
69
|
-
originalTreeData: data,
|
|
70
|
-
flatTreeData: getFlatTreeData(data)
|
|
71
|
-
});
|
|
98
|
+
responseData = transformResponse(res);
|
|
99
|
+
}
|
|
100
|
+
if (status !== 200) {
|
|
101
|
+
_message.error(msg);
|
|
102
|
+
return;
|
|
72
103
|
}
|
|
104
|
+
setState({
|
|
105
|
+
treeData: responseData,
|
|
106
|
+
originalTreeData: responseData,
|
|
107
|
+
flatTreeData: getFlatTreeData(responseData, fieldNames, modeType),
|
|
108
|
+
allKeys: getAllKeys(responseData, fieldNames)
|
|
109
|
+
});
|
|
73
110
|
},
|
|
74
111
|
debounceWait: 300
|
|
75
112
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options));
|
|
@@ -78,7 +115,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
78
115
|
setState({
|
|
79
116
|
treeData: dataSource,
|
|
80
117
|
originalTreeData: cloneDeep(dataSource),
|
|
81
|
-
flatTreeData: getFlatTreeData(dataSource)
|
|
118
|
+
flatTreeData: getFlatTreeData(dataSource, fieldNames),
|
|
119
|
+
allKeys: getAllKeys(dataSource, fieldNames)
|
|
82
120
|
});
|
|
83
121
|
} else if (enumCode) {
|
|
84
122
|
var dictEnum = dics[enumCode] || [];
|
|
@@ -94,7 +132,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
94
132
|
setState({
|
|
95
133
|
treeData: dictEnum,
|
|
96
134
|
originalTreeData: cloneDeep(dictEnum),
|
|
97
|
-
flatTreeData: getFlatTreeData(dictEnum)
|
|
135
|
+
flatTreeData: getFlatTreeData(dictEnum, fieldNames),
|
|
136
|
+
allKeys: getAllKeys(dictEnum, fieldNames)
|
|
98
137
|
});
|
|
99
138
|
}
|
|
100
139
|
}, [dataSource, enumCode]);
|
|
@@ -116,23 +155,112 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
116
155
|
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
|
117
156
|
useEffect(function () {
|
|
118
157
|
setState({
|
|
119
|
-
|
|
158
|
+
open: open
|
|
120
159
|
});
|
|
121
|
-
}, [
|
|
160
|
+
}, [open]);
|
|
161
|
+
useEffect(function () {
|
|
162
|
+
if (value) {
|
|
163
|
+
var checkedValues = [];
|
|
164
|
+
var treeData = state.treeData,
|
|
165
|
+
allKeys = state.allKeys,
|
|
166
|
+
originalTreeData = state.originalTreeData;
|
|
167
|
+
var treeViewData = [];
|
|
168
|
+
if (allValue && typeof value === 'string') {
|
|
169
|
+
if (modeType === LIST) {
|
|
170
|
+
checkedValues = treeData.map(function (item) {
|
|
171
|
+
return item[fieldNameValue];
|
|
172
|
+
}) || [];
|
|
173
|
+
} else if (modeType === TREE) {
|
|
174
|
+
checkedValues = allKeys;
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
if (!Array.isArray(value)) {
|
|
178
|
+
console.error('Please pass in the array');
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// 开启 labelInValue [{ label:xx, value: ""}] 形式、需要取出来 value
|
|
182
|
+
if (labelInValue) {
|
|
183
|
+
var isObjectArray = value.every(function (element) {
|
|
184
|
+
return _typeof(element) === 'object' && element !== null;
|
|
185
|
+
});
|
|
186
|
+
if (!isObjectArray) {
|
|
187
|
+
console.error('Please enter an array object');
|
|
188
|
+
checkedValues = [];
|
|
189
|
+
}
|
|
190
|
+
checkedValues = value.map(function (item) {
|
|
191
|
+
return item[fieldNameValue];
|
|
192
|
+
});
|
|
193
|
+
} else {
|
|
194
|
+
checkedValues = value;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
|
198
|
+
setState({
|
|
199
|
+
checkedValues: checkedValues,
|
|
200
|
+
checkAll: checkedValues.length === allKeys.length,
|
|
201
|
+
treeViewData: treeViewData
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}, [value, state.allKeys]);
|
|
122
205
|
var handleClick = function handleClick() {
|
|
123
206
|
setState({
|
|
124
207
|
open: true
|
|
125
208
|
});
|
|
209
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(true);
|
|
126
210
|
};
|
|
127
|
-
var handleClearValue = function handleClearValue() {};
|
|
128
211
|
/**
|
|
129
212
|
* close Drawer and onChange(values)
|
|
130
213
|
*/
|
|
131
214
|
var handleFinish = function handleFinish() {
|
|
132
|
-
|
|
215
|
+
// 全选的时候返回 allValue 标记即可
|
|
216
|
+
if (allValue !== undefined && state.checkAll && !draggable) {
|
|
217
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(allValue);
|
|
218
|
+
} else if (draggable && span) {
|
|
219
|
+
var _listRef$current;
|
|
220
|
+
// 开启 draggable 使用拖拽后的顺序
|
|
221
|
+
var checkedList = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.onChange();
|
|
222
|
+
onChange(checkedList);
|
|
223
|
+
} else {
|
|
224
|
+
var values = [];
|
|
225
|
+
if (labelInValue) {
|
|
226
|
+
state.checkedValues.forEach(function (val) {
|
|
227
|
+
var option = state.flatTreeData.find(function (item) {
|
|
228
|
+
return item[fieldNameValue] === val;
|
|
229
|
+
});
|
|
230
|
+
option && values.push(option);
|
|
231
|
+
});
|
|
232
|
+
} else {
|
|
233
|
+
values = state.checkedValues;
|
|
234
|
+
}
|
|
235
|
+
if (min) {
|
|
236
|
+
if (values.length < min) {
|
|
237
|
+
_message.error("\u6700\u5C11\u9009\u62E9".concat(min, "\u4E2A"));
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(values);
|
|
242
|
+
}
|
|
133
243
|
setState({
|
|
134
244
|
open: false
|
|
135
245
|
});
|
|
246
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* clear all checked
|
|
250
|
+
*/
|
|
251
|
+
var handleClearAll = function handleClearAll() {
|
|
252
|
+
var _state$flatTreeData$f;
|
|
253
|
+
// 处理 ProTable 场景下 disabled 的不需要被清理
|
|
254
|
+
var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(function (item) {
|
|
255
|
+
return item.disabled;
|
|
256
|
+
})) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(function (item) {
|
|
257
|
+
return item[fieldNameValue];
|
|
258
|
+
}) : [];
|
|
259
|
+
setState({
|
|
260
|
+
checkedValues: _checkedValues,
|
|
261
|
+
treeViewData: [],
|
|
262
|
+
checkAll: false
|
|
263
|
+
});
|
|
136
264
|
};
|
|
137
265
|
/**
|
|
138
266
|
* Drawer close
|
|
@@ -141,39 +269,81 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
141
269
|
setState({
|
|
142
270
|
open: false
|
|
143
271
|
});
|
|
272
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
144
273
|
};
|
|
145
274
|
/**
|
|
146
|
-
* checkbox/
|
|
275
|
+
* checkbox/list selected change values
|
|
147
276
|
* @param values
|
|
148
277
|
*/
|
|
149
|
-
var
|
|
278
|
+
var handleListCheckChange = function handleListCheckChange(e, code) {
|
|
150
279
|
var checkedValues = _toConsumableArray(state.checkedValues);
|
|
151
280
|
var checked = e.target.checked;
|
|
152
281
|
if (!checked) {
|
|
153
282
|
checkedValues = checkedValues.filter(function (value) {
|
|
154
283
|
return value !== code;
|
|
155
284
|
});
|
|
285
|
+
} else if (draggable && span) {
|
|
286
|
+
// 固定在右侧的情况
|
|
287
|
+
var fixedOption = state.flatTreeData.find(function (item) {
|
|
288
|
+
return item.fixed === 'right';
|
|
289
|
+
}) || {};
|
|
290
|
+
var fixedIdx = checkedValues.findIndex(function (value) {
|
|
291
|
+
return value === fixedOption[fieldNameValue];
|
|
292
|
+
});
|
|
293
|
+
if (fixedIdx >= 0) {
|
|
294
|
+
checkedValues.splice(fixedIdx, 0, code);
|
|
295
|
+
} else {
|
|
296
|
+
checkedValues.push(code);
|
|
297
|
+
}
|
|
156
298
|
} else {
|
|
157
299
|
checkedValues.push(code);
|
|
158
300
|
}
|
|
301
|
+
if (max && checkedValues.length > max) {
|
|
302
|
+
_message.error(maxMessage ? transformMessage({
|
|
303
|
+
max: max
|
|
304
|
+
}, maxMessage) : "\u6700\u591A\u9009\u62E9".concat(max, "\u4E2A"));
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
setState({
|
|
308
|
+
checkedValues: checkedValues,
|
|
309
|
+
checkAll: checkedValues.length === state.flatTreeData.length
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
var handleDragEndChange = function handleDragEndChange(checkedValues) {
|
|
159
313
|
setState({
|
|
160
314
|
checkedValues: checkedValues
|
|
161
315
|
});
|
|
162
316
|
};
|
|
163
317
|
var onCheck = function onCheck(checkedKeys, info) {
|
|
164
318
|
var checkedValues = _toConsumableArray(state.checkedValues);
|
|
319
|
+
var originalTreeData = state.originalTreeData;
|
|
165
320
|
// 此时应该取消掉自身并包含它所有的子集
|
|
166
|
-
if (!info.checked) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
});
|
|
170
|
-
// 把所有的子节点也要取消
|
|
321
|
+
if (!info.checked && !checkStrictly) {
|
|
322
|
+
// 1. 取消自身
|
|
323
|
+
// 2. 把所有的子节点也要取消
|
|
171
324
|
var childrenkeys = [];
|
|
172
|
-
getChildrenKeys(info.node, childrenkeys);
|
|
325
|
+
getChildrenKeys(info.node, childrenkeys, fieldNames, 'treeCheck');
|
|
173
326
|
checkedValues = checkedValues.filter(function (key) {
|
|
174
327
|
return !childrenkeys.includes(key);
|
|
175
328
|
});
|
|
329
|
+
// 3. 取消父节点
|
|
330
|
+
var parentNodes = findTreeNodeByKey(originalTreeData, info.node.key, fieldNames);
|
|
331
|
+
var parentKeys = parentNodes.reduce(function (prev, curr) {
|
|
332
|
+
return prev.concat(curr[fieldNameValue]);
|
|
333
|
+
}, []);
|
|
334
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
335
|
+
return !parentKeys.includes(key);
|
|
336
|
+
});
|
|
176
337
|
} else {
|
|
338
|
+
// checkStrictly 模式下取 checkedKeys.checked 或者自身的 key
|
|
339
|
+
if (checkStrictly) {
|
|
340
|
+
if (!info.checked) {
|
|
341
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
342
|
+
return key !== info.node.key;
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
checkedKeys = checkedKeys.checked || [];
|
|
346
|
+
}
|
|
177
347
|
checkedKeys.forEach(function (key) {
|
|
178
348
|
var exist = checkedValues.includes(key);
|
|
179
349
|
if (info.checked && !exist) {
|
|
@@ -182,11 +352,24 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
182
352
|
});
|
|
183
353
|
}
|
|
184
354
|
// 根据选中的筛选出 viewTreeData
|
|
185
|
-
var
|
|
186
|
-
|
|
355
|
+
var treeViewData = [];
|
|
356
|
+
if (!checkStrictly) {
|
|
357
|
+
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
|
358
|
+
} else {
|
|
359
|
+
treeViewData = state.flatTreeData.filter(function (item) {
|
|
360
|
+
return checkedValues.includes(item[fieldNameValue]);
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
if (max && checkedValues.length > max) {
|
|
364
|
+
_message.error(maxMessage ? transformMessage({
|
|
365
|
+
max: max
|
|
366
|
+
}, maxMessage) : "\u6700\u591A\u9009\u62E9".concat(max, "\u4E2A"));
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
187
369
|
setState({
|
|
188
370
|
checkedValues: checkedValues,
|
|
189
|
-
treeViewData: treeViewData
|
|
371
|
+
treeViewData: treeViewData,
|
|
372
|
+
checkAll: state.allKeys.length === checkedValues.length
|
|
190
373
|
});
|
|
191
374
|
};
|
|
192
375
|
/**
|
|
@@ -197,7 +380,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
197
380
|
setState({
|
|
198
381
|
checkedValues: state.checkedValues.filter(function (value) {
|
|
199
382
|
return value !== fileNameValue;
|
|
200
|
-
})
|
|
383
|
+
}),
|
|
384
|
+
checkAll: false
|
|
201
385
|
});
|
|
202
386
|
};
|
|
203
387
|
/**
|
|
@@ -207,47 +391,55 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
207
391
|
*/
|
|
208
392
|
var treeFilterClose = function treeFilterClose(fileNamekey, node) {
|
|
209
393
|
var checkedValues = _toConsumableArray(state.checkedValues);
|
|
394
|
+
var treeViewData = [];
|
|
210
395
|
var originalTreeData = state.originalTreeData;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
396
|
+
if (checkStrictly) {
|
|
397
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
398
|
+
return key !== fileNamekey;
|
|
399
|
+
});
|
|
400
|
+
// handleFilterClose
|
|
401
|
+
treeViewData = state.flatTreeData.filter(function (item) {
|
|
402
|
+
return checkedValues.includes(item[fieldNameValue]);
|
|
403
|
+
});
|
|
404
|
+
} else {
|
|
405
|
+
// 1. 取消自身
|
|
406
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
407
|
+
return key !== fileNamekey;
|
|
408
|
+
});
|
|
409
|
+
// 2. 把所有的子节点也要取消
|
|
410
|
+
var childrenkeys = [];
|
|
411
|
+
getChildrenKeys(node, childrenkeys, fieldNames, 'treeClose');
|
|
412
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
413
|
+
return !childrenkeys.includes(key);
|
|
414
|
+
});
|
|
415
|
+
// 3. 取消父节点
|
|
416
|
+
var parentNodes = findTreeNodeByKey(originalTreeData, fileNamekey, fieldNames);
|
|
417
|
+
var parentKeys = parentNodes.reduce(function (prev, curr) {
|
|
418
|
+
return prev.concat(curr[fieldNames.value]);
|
|
419
|
+
}, []);
|
|
420
|
+
checkedValues = checkedValues.filter(function (key) {
|
|
421
|
+
return !parentKeys.includes(key);
|
|
422
|
+
});
|
|
423
|
+
// 根据选中的筛选出 viewTreeData
|
|
424
|
+
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
|
425
|
+
}
|
|
229
426
|
setState({
|
|
230
427
|
checkedValues: checkedValues,
|
|
231
|
-
treeViewData: treeViewData
|
|
232
|
-
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* clear all checked
|
|
236
|
-
*/
|
|
237
|
-
var handleClearAll = function handleClearAll() {
|
|
238
|
-
setState({
|
|
239
|
-
checkedValues: [],
|
|
240
|
-
treeViewData: []
|
|
428
|
+
treeViewData: treeViewData,
|
|
429
|
+
checkAll: false
|
|
241
430
|
});
|
|
242
431
|
};
|
|
243
|
-
var onSearch = function onSearch(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
432
|
+
var onSearch = function onSearch(e) {
|
|
433
|
+
var str = e.target.value;
|
|
434
|
+
if (modeType === LIST || modeType === CASCADER) {
|
|
435
|
+
var isCASCADER = modeType === CASCADER;
|
|
436
|
+
var data = state.flatTreeData.filter(function (item) {
|
|
437
|
+
var title = isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel];
|
|
438
|
+
return title.includes(str);
|
|
247
439
|
});
|
|
248
440
|
setState({
|
|
249
441
|
searchStr: str,
|
|
250
|
-
treeData: data
|
|
442
|
+
treeData: !str ? state.originalTreeData : data
|
|
251
443
|
});
|
|
252
444
|
} else {
|
|
253
445
|
setState({
|
|
@@ -260,74 +452,249 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
260
452
|
* default example and you can customize trigger={<Button>打开</Button>}
|
|
261
453
|
* @returns
|
|
262
454
|
*/
|
|
263
|
-
var
|
|
455
|
+
var TriggerComponent = useMemo(function () {
|
|
264
456
|
if (trigger && /*#__PURE__*/React.isValidElement(trigger)) {
|
|
265
|
-
return
|
|
266
|
-
onClick: handleClick
|
|
267
|
-
|
|
457
|
+
return _jsx("div", {
|
|
458
|
+
onClick: handleClick,
|
|
459
|
+
children: trigger
|
|
460
|
+
});
|
|
268
461
|
}
|
|
269
|
-
return
|
|
462
|
+
return _jsx(Trigger, {
|
|
270
463
|
checkedValues: state.checkedValues,
|
|
271
464
|
value: value,
|
|
272
465
|
handleClick: handleClick,
|
|
273
|
-
handleClearAll: handleClearAll
|
|
466
|
+
handleClearAll: handleClearAll,
|
|
467
|
+
checkAll: state.checkAll,
|
|
468
|
+
triggerStyle: style,
|
|
469
|
+
disabled: disabled,
|
|
470
|
+
isView: isView
|
|
471
|
+
});
|
|
472
|
+
}, [state.checkedValues, state.checkAll, style, disabled, isView]);
|
|
473
|
+
/**
|
|
474
|
+
* 全选操作
|
|
475
|
+
*/
|
|
476
|
+
var handleAllCheck = function handleAllCheck(e) {
|
|
477
|
+
var checked = e.target.checked;
|
|
478
|
+
var checkedValues = [];
|
|
479
|
+
var treeViewData = [];
|
|
480
|
+
if (modeType === LIST || modeType === CASCADER) {
|
|
481
|
+
if (checked) {
|
|
482
|
+
checkedValues = state.flatTreeData.map(function (item) {
|
|
483
|
+
return item[fieldNameValue];
|
|
484
|
+
});
|
|
485
|
+
} else if (!checked && span) {
|
|
486
|
+
// ProTable 场景下 disabled 不取消掉
|
|
487
|
+
checkedValues = state.flatTreeData.filter(function (item) {
|
|
488
|
+
return item.disabled;
|
|
489
|
+
}).map(function (item) {
|
|
490
|
+
return item[fieldNameValue];
|
|
491
|
+
});
|
|
492
|
+
} else if (!checked) {
|
|
493
|
+
checkedValues = [];
|
|
494
|
+
}
|
|
495
|
+
} else if (modeType === TREE) {
|
|
496
|
+
checkedValues = checked ? state.allKeys : [];
|
|
497
|
+
if (checkStrictly) {
|
|
498
|
+
treeViewData = _toConsumableArray(state.flatTreeData);
|
|
499
|
+
} else {
|
|
500
|
+
treeViewData = filterCheckedNodes(state.originalTreeData, checkedValues, '', fieldNames);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
if (max && checkedValues.length > max) {
|
|
504
|
+
_message.error(maxMessage ? transformMessage({
|
|
505
|
+
max: max
|
|
506
|
+
}, maxMessage) : "\u6700\u591A\u9009\u62E9".concat(max, "\u4E2A"));
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
setState({
|
|
510
|
+
checkedValues: checkedValues,
|
|
511
|
+
checkAll: checked,
|
|
512
|
+
treeViewData: treeViewData
|
|
274
513
|
});
|
|
275
514
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
515
|
+
/**
|
|
516
|
+
* 左侧容器、分为三种 list、tree、Cascader
|
|
517
|
+
* @returns
|
|
518
|
+
*/
|
|
519
|
+
var renderContainer = function renderContainer() {
|
|
520
|
+
if (state.treeData.length === 0 && state.searchStr) {
|
|
521
|
+
return _jsx("div", {
|
|
522
|
+
className: "pro-tree-modal-no-checks",
|
|
523
|
+
children: "\u8BF6\u5440\uFF0C\u6CA1\u6709\u627E\u5230\u60A8\u8981\u67E5\u8BE2\u7684\u5185\u5BB9"
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
switch (modeType) {
|
|
527
|
+
case LIST:
|
|
528
|
+
return _jsx(ListView, {
|
|
529
|
+
treeData: state.treeData,
|
|
530
|
+
optionRender: optionRender,
|
|
531
|
+
checkedValues: state.checkedValues,
|
|
532
|
+
handleOnChange: handleListCheckChange,
|
|
533
|
+
searchStr: state.searchStr,
|
|
534
|
+
showCodeName: showCodeName,
|
|
535
|
+
disabled: disabled || isView,
|
|
536
|
+
fieldNames: fieldNames,
|
|
537
|
+
span: span
|
|
538
|
+
});
|
|
539
|
+
case TREE:
|
|
540
|
+
return _jsx(TreeView, {
|
|
541
|
+
treeData: state.treeData,
|
|
542
|
+
originalTreeData: state.originalTreeData,
|
|
543
|
+
flatTreeData: state.flatTreeData,
|
|
544
|
+
checkedValues: state.checkedValues,
|
|
545
|
+
onCheck: onCheck,
|
|
546
|
+
optionRender: optionRender,
|
|
547
|
+
searchStr: state.searchStr,
|
|
548
|
+
showCodeName: showCodeName,
|
|
549
|
+
disabled: disabled || isView,
|
|
550
|
+
checkStrictly: checkStrictly,
|
|
551
|
+
tags: tags,
|
|
552
|
+
fieldNames: fieldNames
|
|
553
|
+
});
|
|
554
|
+
case CASCADER:
|
|
555
|
+
if (state.searchStr && state.treeData.length) {
|
|
556
|
+
return _jsx(ListView, {
|
|
557
|
+
treeData: state.treeData,
|
|
558
|
+
modeType: CASCADER,
|
|
559
|
+
optionRender: optionRender,
|
|
560
|
+
checkedValues: state.checkedValues,
|
|
561
|
+
handleOnChange: handleListCheckChange,
|
|
562
|
+
searchStr: state.searchStr,
|
|
563
|
+
showCodeName: showCodeName,
|
|
564
|
+
disabled: disabled || isView,
|
|
565
|
+
fieldNames: fieldNames
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
return _jsx(Cascader, {
|
|
569
|
+
dataSource: state.treeData,
|
|
570
|
+
fieldNames: fieldNames,
|
|
571
|
+
checkedValues: state.checkedValues,
|
|
572
|
+
searchStr: state.searchStr,
|
|
573
|
+
showCodeName: showCodeName,
|
|
574
|
+
handleOnChange: handleListCheckChange,
|
|
575
|
+
optionRender: optionRender
|
|
576
|
+
});
|
|
577
|
+
default:
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
var listTreeData = useMemo(function () {
|
|
582
|
+
var checkListOptions = [];
|
|
583
|
+
state.checkedValues.forEach(function (key) {
|
|
584
|
+
var option = state.flatTreeData.find(function (item) {
|
|
585
|
+
return item[fieldNameValue] === key;
|
|
586
|
+
});
|
|
587
|
+
if (option) {
|
|
588
|
+
checkListOptions.push(option);
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
return checkListOptions;
|
|
592
|
+
}, [state.checkedValues, state.flatTreeData]);
|
|
593
|
+
/**
|
|
594
|
+
* 勾选后的右侧展示
|
|
595
|
+
* @returns
|
|
596
|
+
*/
|
|
597
|
+
var renderView = function renderView() {
|
|
598
|
+
if (state.checkedValues.length === 0) {
|
|
599
|
+
return _jsx("div", {
|
|
600
|
+
className: "pro-tree-modal-no-checks",
|
|
601
|
+
children: "\u6682\u65E0\u5DF2\u9009"
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
switch (modeType) {
|
|
605
|
+
case LIST:
|
|
606
|
+
case CASCADER:
|
|
607
|
+
return _jsx(ListView, {
|
|
608
|
+
mode: "view",
|
|
609
|
+
showCodeName: showCodeName,
|
|
610
|
+
treeData: listTreeData,
|
|
611
|
+
fieldNames: fieldNames,
|
|
612
|
+
disabled: disabled || isView,
|
|
613
|
+
draggable: draggable,
|
|
614
|
+
flatTreeData: state.flatTreeData,
|
|
615
|
+
span: span,
|
|
616
|
+
ref: listRef,
|
|
617
|
+
optionRender: optionRender,
|
|
618
|
+
handleFilterClose: handleFilterClose,
|
|
619
|
+
handleDragEndChange: handleDragEndChange
|
|
620
|
+
});
|
|
621
|
+
case TREE:
|
|
622
|
+
return _jsx(TreeView, {
|
|
623
|
+
mode: "view",
|
|
624
|
+
checkStrictly: checkStrictly,
|
|
625
|
+
showCodeName: showCodeName,
|
|
626
|
+
treeData: checkStrictly ? listTreeData : state.treeViewData,
|
|
627
|
+
tags: tags,
|
|
628
|
+
fieldNames: fieldNames,
|
|
629
|
+
disabled: disabled || isView,
|
|
630
|
+
draggable: draggable,
|
|
631
|
+
min: min,
|
|
632
|
+
max: max,
|
|
633
|
+
ref: listRef,
|
|
634
|
+
handleFilterClose: treeFilterClose,
|
|
635
|
+
optionRender: optionRender,
|
|
636
|
+
handleDragEndChange: handleDragEndChange
|
|
637
|
+
});
|
|
638
|
+
default:
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
return _jsx(_Fragment, {
|
|
643
|
+
children: _jsxs("div", {
|
|
644
|
+
className: "pro-tree-modal",
|
|
645
|
+
children: [open === undefined ? TriggerComponent : null, _jsx(ProDrawerForm, {
|
|
646
|
+
onOk: handleFinish,
|
|
647
|
+
onCancel: handleClose,
|
|
648
|
+
okDisabled: disabled,
|
|
649
|
+
open: state.open,
|
|
650
|
+
title: title,
|
|
651
|
+
showType: "Modal",
|
|
652
|
+
className: "pro-tree-modal-container",
|
|
653
|
+
extraLeft: allValue !== undefined ? _jsx(_Checkbox, {
|
|
654
|
+
checked: state.checkAll,
|
|
655
|
+
disabled: disabled,
|
|
656
|
+
onChange: handleAllCheck,
|
|
657
|
+
children: "\u5168\u9009"
|
|
658
|
+
}) : null,
|
|
659
|
+
children: _jsxs("div", {
|
|
660
|
+
className: "pro-tree-modal-content",
|
|
661
|
+
children: [_jsxs("div", {
|
|
662
|
+
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box' : ''),
|
|
663
|
+
children: [_jsx(_Input, {
|
|
664
|
+
disabled: disabled,
|
|
665
|
+
allowClear: true,
|
|
666
|
+
value: state.searchStr,
|
|
667
|
+
placeholder: placeholder || '请输入',
|
|
668
|
+
className: "pro-tree-modal-search",
|
|
669
|
+
onChange: onSearch,
|
|
670
|
+
prefix: _jsx(ReactSVG, {
|
|
671
|
+
className: "viewSvg",
|
|
672
|
+
src: searchSVG
|
|
673
|
+
})
|
|
674
|
+
}), _jsx("div", {
|
|
675
|
+
className: "pro-tree-modal-tree-warp",
|
|
676
|
+
children: renderContainer()
|
|
677
|
+
})]
|
|
678
|
+
}), _jsxs("div", {
|
|
679
|
+
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box-view' : ''),
|
|
680
|
+
children: [_jsxs("div", {
|
|
681
|
+
className: "pro-tree-modal-box-header",
|
|
682
|
+
children: [_jsxs("span", {
|
|
683
|
+
children: ["\u5DF2\u9009 (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
|
|
684
|
+
}), _jsx(_Button, {
|
|
685
|
+
disabled: disabled,
|
|
686
|
+
type: "link",
|
|
687
|
+
onClick: handleClearAll,
|
|
688
|
+
children: "\u6E05\u7A7A\u5168\u90E8"
|
|
689
|
+
})]
|
|
690
|
+
}), _jsx("div", {
|
|
691
|
+
className: "pro-tree-modal-tree-warp pro-transfer-right",
|
|
692
|
+
children: renderView()
|
|
693
|
+
})]
|
|
694
|
+
})]
|
|
695
|
+
})
|
|
696
|
+
})]
|
|
697
|
+
})
|
|
698
|
+
});
|
|
332
699
|
};
|
|
333
700
|
export default ProTreeModal;
|