@zat-design/sisyphus-react 4.2.0-beta.1 → 4.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.js +7 -7
- package/es/ProAction/components/CheckModalContent/index.js +5 -5
- package/es/ProAction/index.js +98 -164
- package/es/ProConfigProvider/index.js +71 -60
- package/es/ProDownload/index.js +97 -184
- package/es/ProDownload/utils.js +98 -149
- package/es/ProDrawerForm/components/ProDrawer/index.js +100 -177
- package/es/ProDrawerForm/components/ProModal/index.js +73 -140
- package/es/ProDrawerForm/index.js +36 -54
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +29 -35
- package/es/ProEditLabel/index.js +97 -167
- package/es/ProEditLabel/utils/index.js +1 -1
- package/es/ProEditTable/components/ActionButton/index.js +61 -56
- package/es/ProEditTable/components/RcTable/BaseTable.js +51 -65
- package/es/ProEditTable/components/RcTable/DraggableTable.js +112 -106
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +107 -98
- package/es/ProEditTable/components/RenderField/index.js +465 -598
- package/es/ProEditTable/components/RenderToolbar/index.js +71 -90
- package/es/ProEditTable/components/Summary/index.js +40 -35
- package/es/ProEditTable/components/Validator/index.js +7 -6
- package/es/ProEditTable/index.js +256 -307
- package/es/ProEditTable/utils/config.js +158 -184
- package/es/ProEditTable/utils/diffOriginal.js +45 -37
- package/es/ProEditTable/utils/getDefaultProps.js +23 -19
- package/es/ProEditTable/utils/index.js +189 -215
- package/es/ProEditTable/utils/tools.js +213 -344
- package/es/ProEditTable/utils/transform.js +10 -14
- package/es/ProEditTable/utils/useEditTableError.js +18 -29
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +55 -63
- package/es/ProEnum/components/Group.js +17 -25
- package/es/ProEnum/components/Tag.js +12 -19
- package/es/ProEnum/hooks/useEnum.js +54 -72
- package/es/ProEnum/hooks/useEnumRequest.js +226 -341
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +49 -69
- package/es/ProEnum/index.js +127 -137
- package/es/ProEnum/utils/eventCenter.js +2 -2
- package/es/ProEnum/utils/frequentEnum.js +55 -74
- package/es/ProEnum/utils/getEnumLabel.js +29 -29
- package/es/ProEnum/utils/index.js +107 -239
- package/es/ProForm/components/Container.js +10 -8
- package/es/ProForm/components/FormFooter/index.js +42 -44
- package/es/ProForm/components/base/Checkbox/index.js +29 -34
- package/es/ProForm/components/base/DatePicker/index.js +41 -39
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +2 -11
- package/es/ProForm/components/base/Input/index.js +54 -55
- package/es/ProForm/components/base/InputNumber/index.js +115 -136
- package/es/ProForm/components/base/Radio/index.js +26 -32
- package/es/ProForm/components/base/RangePicker/index.js +63 -57
- package/es/ProForm/components/base/RangePicker/useDateRange.js +11 -19
- package/es/ProForm/components/base/Select/index.js +44 -50
- package/es/ProForm/components/base/Switch/index.js +21 -24
- package/es/ProForm/components/base/SwitchCheckbox/index.js +26 -29
- package/es/ProForm/components/base/TextArea/index.js +25 -29
- package/es/ProForm/components/base/TimePicker/index.js +24 -28
- package/es/ProForm/components/combination/Container/index.js +34 -33
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +181 -207
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +30 -29
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +12 -10
- package/es/ProForm/components/combination/FormList/components/Empty.js +32 -60
- package/es/ProForm/components/combination/FormList/components/LineFields.js +42 -42
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +98 -120
- package/es/ProForm/components/combination/FormList/index.js +78 -70
- package/es/ProForm/components/combination/FormList/utils.js +13 -13
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +6 -4
- package/es/ProForm/components/combination/Group/component/ComRender.js +77 -69
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +101 -105
- package/es/ProForm/components/combination/Group/hooks/index.js +101 -99
- package/es/ProForm/components/combination/Group/index.js +83 -80
- package/es/ProForm/components/combination/Group/utils/index.d.ts +11 -11
- package/es/ProForm/components/combination/Group/utils/index.js +155 -163
- package/es/ProForm/components/combination/ProCascader/index.js +145 -169
- package/es/ProForm/components/combination/ProCascader/utils/index.js +15 -18
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +65 -90
- package/es/ProForm/components/combination/ProModalSelect/index.js +384 -502
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +11 -11
- package/es/ProForm/components/combination/ProNumberRange/index.js +64 -72
- package/es/ProForm/components/combination/ProRangeLimit/index.js +82 -109
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +10 -18
- package/es/ProForm/components/combination/ProTimeLimit/index.js +78 -88
- package/es/ProForm/components/render/ChangedWrapper.js +71 -64
- package/es/ProForm/components/render/ConfirmWrapper.js +52 -109
- package/es/ProForm/components/render/CustomComponentViewWrapper.js +42 -45
- package/es/ProForm/components/render/Render.js +202 -220
- package/es/ProForm/components/render/RenderFields.js +99 -93
- package/es/ProForm/components/render/propsType.js +1 -1
- package/es/ProForm/index.js +128 -143
- package/es/ProForm/propsType.js +1 -1
- package/es/ProForm/utils/diffOriginal.js +39 -33
- package/es/ProForm/utils/getDefaultProps.js +24 -19
- package/es/ProForm/utils/index.js +115 -132
- package/es/ProForm/utils/processDependencies.js +7 -3
- package/es/ProForm/utils/rulesCreator.js +28 -36
- package/es/ProForm/utils/transformNames.js +18 -19
- package/es/ProForm/utils/transformValue.js +16 -25
- package/es/ProForm/utils/useDeepCompareMemo.js +7 -7
- package/es/ProForm/utils/useFieldProps.js +3 -3
- package/es/ProForm/utils/useForm.js +106 -190
- package/es/ProForm/utils/useRules.js +23 -20
- package/es/ProForm/utils/useShouldUpdate.js +107 -110
- package/es/ProForm/utils/useWatch.js +30 -37
- package/es/ProForm/utils/valueType.js +122 -143
- package/es/ProIcon/config/index.js +3 -3
- package/es/ProIcon/index.js +152 -167
- package/es/ProIcon/utils/index.js +28 -27
- package/es/ProLayout/components/Layout/Header/index.js +28 -36
- package/es/ProLayout/components/Layout/Icon/Icon.js +10 -9
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +61 -55
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +57 -66
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +18 -14
- package/es/ProLayout/components/Layout/Menu/index.js +30 -40
- package/es/ProLayout/components/Layout/Notice/index.js +6 -4
- package/es/ProLayout/components/ProCollapse/index.js +63 -68
- package/es/ProLayout/components/ProFooter/index.js +16 -22
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +6 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +5 -5
- package/es/ProLayout/components/ProHeader/index.js +132 -149
- package/es/ProLayout/components/ProHeader/utils/index.js +5 -5
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +20 -31
- package/es/ProLayout/components/TabsManager/components/TabItem.js +18 -18
- package/es/ProLayout/components/TabsManager/components/TabsContext.js +1 -1
- package/es/ProLayout/components/TabsManager/components/TabsHeader.js +9 -17
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +2 -2
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +1 -1
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +15 -15
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +103 -119
- package/es/ProLayout/components/TabsManager/index.js +51 -60
- package/es/ProLayout/components/TabsManager/propTypes.js +1 -1
- package/es/ProLayout/components/TabsManager/utils/index.js +20 -21
- package/es/ProLayout/index.js +84 -98
- package/es/ProLayout/propTypes.js +2 -4
- package/es/ProLayout/utils/index.js +66 -85
- package/es/ProSelect/components/AdaptiveTooltip.js +8 -16
- package/es/ProSelect/index.js +168 -186
- package/es/ProSelect/utils/index.js +49 -77
- package/es/ProStep/components/Anchor/index.js +21 -19
- package/es/ProStep/components/Item/index.js +32 -39
- package/es/ProStep/components/Listener/index.js +36 -60
- package/es/ProStep/components/Step/index.js +26 -40
- package/es/ProStep/index.js +104 -192
- package/es/ProStep/utils/index.js +20 -23
- package/es/ProStepTab/index.js +117 -235
- package/es/ProTable/components/FormatColumn/index.js +246 -219
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +21 -25
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +111 -143
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +52 -60
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +28 -30
- package/es/ProTable/components/RenderColumn/index.js +58 -66
- package/es/ProTable/components/RenderEmptyText/index.js +7 -7
- package/es/ProTable/components/RenderFooter/index.js +10 -8
- package/es/ProTable/components/RenderSummary/index.js +31 -30
- package/es/ProTable/components/RenderTableHeader/index.js +19 -17
- package/es/ProTable/components/RenderTabs/index.js +31 -45
- package/es/ProTable/components/TableResizable/index.js +33 -50
- package/es/ProTable/components/TooltipTitle/index.js +10 -7
- package/es/ProTable/hooks/useAntdTable.js +214 -267
- package/es/ProTable/index.js +192 -234
- package/es/ProTable/utils/index.js +23 -31
- package/es/ProTabs/components/Card/index.js +10 -8
- package/es/ProTabs/index.js +51 -61
- package/es/ProThemeTools/component/ProTools/index.js +65 -71
- package/es/ProThemeTools/context/ThemeContext.js +97 -93
- package/es/ProThemeTools/index.js +79 -91
- package/es/ProThemeTools/utils/index.js +49 -71
- package/es/ProTooltip/index.js +110 -120
- package/es/ProTree/components/AdaptiveTooltip.js +3 -2
- package/es/ProTree/components/CloseIcon.js +3 -7
- package/es/ProTree/components/List.js +21 -27
- package/es/ProTree/components/ProTree.js +162 -204
- package/es/ProTree/components/ProTreeSelect/index.js +250 -265
- package/es/ProTree/components/SearchTitle.js +18 -17
- package/es/ProTree/components/Tree.js +109 -148
- package/es/ProTree/index.js +15 -15
- package/es/ProTree/utils.js +48 -83
- package/es/ProTreeModal/components/Cascader.js +28 -41
- package/es/ProTreeModal/components/CloseIcon.js +3 -7
- package/es/ProTreeModal/components/List.js +90 -96
- package/es/ProTreeModal/components/SearchTitle.js +9 -8
- package/es/ProTreeModal/components/SortableItem.js +40 -37
- package/es/ProTreeModal/components/Tree.js +53 -69
- package/es/ProTreeModal/components/Trigger.js +55 -67
- package/es/ProTreeModal/index.js +203 -217
- package/es/ProTreeModal/utils.js +61 -101
- package/es/ProUpload/components/ButtonRender.js +31 -58
- package/es/ProUpload/components/DragRender.js +41 -42
- package/es/ProUpload/components/DraggableUploadListItem.js +19 -21
- package/es/ProUpload/components/Example.js +14 -25
- package/es/ProUpload/components/FileItem.js +39 -38
- package/es/ProUpload/components/ImageRender.js +59 -100
- package/es/ProUpload/index.js +129 -131
- package/es/ProUpload/uitls.js +3 -3
- package/es/ProUtils/utils/index.js +6 -10
- package/es/ProViewer/index.js +66 -102
- package/es/ProWaterMark/index.js +8 -10
- package/es/locale/index.js +5 -5
- package/es/tokens.js +1 -1
- package/es/utils/index.js +11 -20
- package/package.json +10 -10
- package/.claudeignore +0 -40
- package/lib/FormsProvider/index.d.ts +0 -18
- package/lib/FormsProvider/index.js +0 -44
- package/lib/ProAction/components/CheckModalContent/index.css +0 -22
- package/lib/ProAction/components/CheckModalContent/index.d.ts +0 -8
- package/lib/ProAction/components/CheckModalContent/index.js +0 -34
- package/lib/ProAction/components/CheckModalContent/index.less +0 -28
- package/lib/ProAction/index.d.ts +0 -7
- package/lib/ProAction/index.js +0 -232
- package/lib/ProAction/index.less +0 -8
- package/lib/ProAction/propsType.d.ts +0 -45
- package/lib/ProAction/propsType.js +0 -5
- package/lib/ProConfigProvider/index.d.ts +0 -9
- package/lib/ProConfigProvider/index.js +0 -158
- package/lib/ProConfigProvider/propsType.d.ts +0 -55
- package/lib/ProConfigProvider/propsType.js +0 -5
- package/lib/ProDownload/index.d.ts +0 -6
- package/lib/ProDownload/index.js +0 -208
- package/lib/ProDownload/propsType.d.ts +0 -71
- package/lib/ProDownload/propsType.js +0 -5
- package/lib/ProDownload/style/index.less +0 -9
- package/lib/ProDownload/utils.d.ts +0 -60
- package/lib/ProDownload/utils.js +0 -213
- package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +0 -7
- package/lib/ProDrawerForm/components/ProDrawer/index.js +0 -287
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +0 -7
- package/lib/ProDrawerForm/components/ProModal/index.js +0 -222
- package/lib/ProDrawerForm/components/index.d.ts +0 -2
- package/lib/ProDrawerForm/components/index.js +0 -20
- package/lib/ProDrawerForm/index.d.ts +0 -6
- package/lib/ProDrawerForm/index.js +0 -106
- package/lib/ProDrawerForm/propsType.d.ts +0 -100
- package/lib/ProDrawerForm/propsType.js +0 -5
- package/lib/ProDrawerForm/style/index.less +0 -172
- package/lib/ProDrawerForm/utils/index.d.ts +0 -6
- package/lib/ProDrawerForm/utils/index.js +0 -23
- package/lib/ProEditLabel/components/RenderProForm.d.ts +0 -4
- package/lib/ProEditLabel/components/RenderProForm.js +0 -87
- package/lib/ProEditLabel/index.d.ts +0 -4
- package/lib/ProEditLabel/index.js +0 -361
- package/lib/ProEditLabel/propsType.d.ts +0 -163
- package/lib/ProEditLabel/propsType.js +0 -5
- package/lib/ProEditLabel/style/index.less +0 -135
- package/lib/ProEditLabel/utils/index.d.ts +0 -7
- package/lib/ProEditLabel/utils/index.js +0 -24
- package/lib/ProEditTable/components/ActionButton/index.d.ts +0 -2
- package/lib/ProEditTable/components/ActionButton/index.js +0 -189
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +0 -6
- package/lib/ProEditTable/components/RcTable/BaseTable.js +0 -125
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +0 -7
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +0 -219
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -4
- package/lib/ProEditTable/components/RcTable/index.js +0 -20
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.d.ts +0 -17
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +0 -244
- package/lib/ProEditTable/components/RenderField/index.d.ts +0 -3
- package/lib/ProEditTable/components/RenderField/index.js +0 -1169
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +0 -2
- package/lib/ProEditTable/components/RenderToolbar/index.js +0 -148
- package/lib/ProEditTable/components/Summary/index.d.ts +0 -12
- package/lib/ProEditTable/components/Summary/index.js +0 -89
- package/lib/ProEditTable/components/Validator/index.d.ts +0 -10
- package/lib/ProEditTable/components/Validator/index.js +0 -34
- package/lib/ProEditTable/components/index.d.ts +0 -5
- package/lib/ProEditTable/components/index.js +0 -41
- package/lib/ProEditTable/index.d.ts +0 -4
- package/lib/ProEditTable/index.js +0 -535
- package/lib/ProEditTable/propsType.d.ts +0 -439
- package/lib/ProEditTable/propsType.js +0 -5
- package/lib/ProEditTable/style/index.less +0 -448
- package/lib/ProEditTable/utils/config.d.ts +0 -25
- package/lib/ProEditTable/utils/config.js +0 -293
- package/lib/ProEditTable/utils/diffOriginal.d.ts +0 -22
- package/lib/ProEditTable/utils/diffOriginal.js +0 -142
- package/lib/ProEditTable/utils/getDefaultProps.d.ts +0 -1
- package/lib/ProEditTable/utils/getDefaultProps.js +0 -39
- package/lib/ProEditTable/utils/index.d.ts +0 -9
- package/lib/ProEditTable/utils/index.js +0 -473
- package/lib/ProEditTable/utils/tools.d.ts +0 -93
- package/lib/ProEditTable/utils/tools.js +0 -572
- package/lib/ProEditTable/utils/transform.d.ts +0 -13
- package/lib/ProEditTable/utils/transform.js +0 -50
- package/lib/ProEditTable/utils/useEditTableError.d.ts +0 -7
- package/lib/ProEditTable/utils/useEditTableError.js +0 -108
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +0 -16
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +0 -174
- package/lib/ProEnum/components/Group.d.ts +0 -10
- package/lib/ProEnum/components/Group.js +0 -76
- package/lib/ProEnum/components/Tag.d.ts +0 -7
- package/lib/ProEnum/components/Tag.js +0 -52
- package/lib/ProEnum/hooks/useEnum.d.ts +0 -29
- package/lib/ProEnum/hooks/useEnum.js +0 -282
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +0 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +0 -422
- package/lib/ProEnum/hooks/useFrequentEnumRequest.d.ts +0 -14
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +0 -91
- package/lib/ProEnum/index.d.ts +0 -8
- package/lib/ProEnum/index.js +0 -304
- package/lib/ProEnum/propsType.d.ts +0 -310
- package/lib/ProEnum/propsType.js +0 -5
- package/lib/ProEnum/style/index.less +0 -109
- package/lib/ProEnum/utils/eventCenter.d.ts +0 -1
- package/lib/ProEnum/utils/eventCenter.js +0 -33
- package/lib/ProEnum/utils/frequentEnum.d.ts +0 -40
- package/lib/ProEnum/utils/frequentEnum.js +0 -165
- package/lib/ProEnum/utils/getEnumLabel.d.ts +0 -2
- package/lib/ProEnum/utils/getEnumLabel.js +0 -83
- package/lib/ProEnum/utils/index.d.ts +0 -69
- package/lib/ProEnum/utils/index.js +0 -406
- package/lib/ProForm/components/Container.d.ts +0 -9
- package/lib/ProForm/components/Container.js +0 -40
- package/lib/ProForm/components/FormFooter/index.d.ts +0 -5
- package/lib/ProForm/components/FormFooter/index.js +0 -98
- package/lib/ProForm/components/FormFooter/propsType.d.ts +0 -22
- package/lib/ProForm/components/FormFooter/propsType.js +0 -5
- package/lib/ProForm/components/base/Checkbox/index.d.ts +0 -14
- package/lib/ProForm/components/base/Checkbox/index.js +0 -88
- package/lib/ProForm/components/base/DatePicker/index.d.ts +0 -11
- package/lib/ProForm/components/base/DatePicker/index.js +0 -110
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +0 -3
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +0 -23
- package/lib/ProForm/components/base/Input/index.d.ts +0 -3
- package/lib/ProForm/components/base/Input/index.js +0 -137
- package/lib/ProForm/components/base/Input/propsType.d.ts +0 -21
- package/lib/ProForm/components/base/Input/propsType.js +0 -5
- package/lib/ProForm/components/base/InputNumber/index.d.ts +0 -11
- package/lib/ProForm/components/base/InputNumber/index.js +0 -317
- package/lib/ProForm/components/base/Radio/index.d.ts +0 -15
- package/lib/ProForm/components/base/Radio/index.js +0 -78
- package/lib/ProForm/components/base/RangePicker/index.d.ts +0 -19
- package/lib/ProForm/components/base/RangePicker/index.js +0 -201
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +0 -15
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +0 -45
- package/lib/ProForm/components/base/Select/index.d.ts +0 -11
- package/lib/ProForm/components/base/Select/index.js +0 -122
- package/lib/ProForm/components/base/Switch/index.d.ts +0 -10
- package/lib/ProForm/components/base/Switch/index.js +0 -53
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +0 -10
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +0 -78
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -13
- package/lib/ProForm/components/base/TextArea/index.d.ts +0 -11
- package/lib/ProForm/components/base/TextArea/index.js +0 -63
- package/lib/ProForm/components/base/TextArea/index.less +0 -28
- package/lib/ProForm/components/base/TimePicker/index.d.ts +0 -13
- package/lib/ProForm/components/base/TimePicker/index.js +0 -56
- package/lib/ProForm/components/base/TimePicker/style/index.less +0 -6
- package/lib/ProForm/components/combination/Container/index.d.ts +0 -4
- package/lib/ProForm/components/combination/Container/index.js +0 -79
- package/lib/ProForm/components/combination/Container/propsType.d.ts +0 -13
- package/lib/ProForm/components/combination/Container/propsType.js +0 -5
- package/lib/ProForm/components/combination/Container/style/index.less +0 -47
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +0 -24
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +0 -378
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +0 -23
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +0 -148
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.d.ts +0 -13
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +0 -36
- package/lib/ProForm/components/combination/FormList/components/Empty.d.ts +0 -13
- package/lib/ProForm/components/combination/FormList/components/Empty.js +0 -105
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +0 -20
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +0 -108
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +0 -12
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +0 -186
- package/lib/ProForm/components/combination/FormList/index.d.ts +0 -4
- package/lib/ProForm/components/combination/FormList/index.js +0 -204
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +0 -69
- package/lib/ProForm/components/combination/FormList/propsType.js +0 -5
- package/lib/ProForm/components/combination/FormList/style/index.less +0 -175
- package/lib/ProForm/components/combination/FormList/utils.d.ts +0 -18
- package/lib/ProForm/components/combination/FormList/utils.js +0 -60
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +0 -9
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +0 -26
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.less +0 -10
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +0 -28
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -165
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +0 -10
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +0 -414
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +0 -34
- package/lib/ProForm/components/combination/Group/hooks/index.js +0 -284
- package/lib/ProForm/components/combination/Group/index.d.ts +0 -9
- package/lib/ProForm/components/combination/Group/index.js +0 -202
- package/lib/ProForm/components/combination/Group/propsType.d.ts +0 -99
- package/lib/ProForm/components/combination/Group/propsType.js +0 -5
- package/lib/ProForm/components/combination/Group/style/index.less +0 -525
- package/lib/ProForm/components/combination/Group/utils/index.d.ts +0 -154
- package/lib/ProForm/components/combination/Group/utils/index.js +0 -444
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +0 -4
- package/lib/ProForm/components/combination/ProCascader/index.js +0 -373
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +0 -48
- package/lib/ProForm/components/combination/ProCascader/propsType.js +0 -5
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -28
- package/lib/ProForm/components/combination/ProCascader/utils/index.d.ts +0 -14
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +0 -43
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +0 -167
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +0 -4
- package/lib/ProForm/components/combination/ProModalSelect/index.js +0 -885
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +0 -106
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +0 -5
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +0 -182
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.d.ts +0 -1
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +0 -32
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +0 -4
- package/lib/ProForm/components/combination/ProNumberRange/index.js +0 -270
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +0 -85
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +0 -5
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +0 -50
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +0 -4
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +0 -228
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +0 -23
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.js +0 -5
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +0 -9
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +0 -49
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +0 -33
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +0 -189
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +0 -99
- package/lib/ProForm/components/index.d.ts +0 -29
- package/lib/ProForm/components/index.js +0 -194
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +0 -17
- package/lib/ProForm/components/render/ChangedWrapper.js +0 -152
- package/lib/ProForm/components/render/ConfirmWrapper.d.ts +0 -10
- package/lib/ProForm/components/render/ConfirmWrapper.js +0 -131
- package/lib/ProForm/components/render/CustomComponentViewWrapper.d.ts +0 -30
- package/lib/ProForm/components/render/CustomComponentViewWrapper.js +0 -127
- package/lib/ProForm/components/render/Render.d.ts +0 -4
- package/lib/ProForm/components/render/Render.js +0 -590
- package/lib/ProForm/components/render/RenderFields.d.ts +0 -26
- package/lib/ProForm/components/render/RenderFields.js +0 -265
- package/lib/ProForm/components/render/propsType.d.ts +0 -296
- package/lib/ProForm/components/render/propsType.js +0 -31
- package/lib/ProForm/index.d.ts +0 -6
- package/lib/ProForm/index.js +0 -334
- package/lib/ProForm/propsType.d.ts +0 -131
- package/lib/ProForm/propsType.js +0 -13
- package/lib/ProForm/style/index.less +0 -567
- package/lib/ProForm/utils/diffOriginal.d.ts +0 -10
- package/lib/ProForm/utils/diffOriginal.js +0 -129
- package/lib/ProForm/utils/getDefaultProps.d.ts +0 -1
- package/lib/ProForm/utils/getDefaultProps.js +0 -39
- package/lib/ProForm/utils/index.d.ts +0 -119
- package/lib/ProForm/utils/index.js +0 -544
- package/lib/ProForm/utils/processDependencies.d.ts +0 -29
- package/lib/ProForm/utils/processDependencies.js +0 -72
- package/lib/ProForm/utils/rulesCreator.d.ts +0 -7
- package/lib/ProForm/utils/rulesCreator.js +0 -96
- package/lib/ProForm/utils/transformNames.d.ts +0 -10
- package/lib/ProForm/utils/transformNames.js +0 -39
- package/lib/ProForm/utils/transformValue.d.ts +0 -6
- package/lib/ProForm/utils/transformValue.js +0 -73
- package/lib/ProForm/utils/useDeepCompareMemo.d.ts +0 -2
- package/lib/ProForm/utils/useDeepCompareMemo.js +0 -23
- package/lib/ProForm/utils/useFieldProps.d.ts +0 -4
- package/lib/ProForm/utils/useFieldProps.js +0 -13
- package/lib/ProForm/utils/useForm.d.ts +0 -22
- package/lib/ProForm/utils/useForm.js +0 -276
- package/lib/ProForm/utils/useRules.d.ts +0 -16
- package/lib/ProForm/utils/useRules.js +0 -86
- package/lib/ProForm/utils/useShouldUpdate.d.ts +0 -27
- package/lib/ProForm/utils/useShouldUpdate.js +0 -399
- package/lib/ProForm/utils/useWatch.d.ts +0 -12
- package/lib/ProForm/utils/useWatch.js +0 -196
- package/lib/ProForm/utils/valueType.d.ts +0 -70
- package/lib/ProForm/utils/valueType.js +0 -323
- package/lib/ProIcon/config/index.d.ts +0 -19
- package/lib/ProIcon/config/index.js +0 -281
- package/lib/ProIcon/index.d.ts +0 -4
- package/lib/ProIcon/index.js +0 -405
- package/lib/ProIcon/propsTypes.d.ts +0 -181
- package/lib/ProIcon/propsTypes.js +0 -5
- package/lib/ProIcon/style/index.less +0 -27
- package/lib/ProIcon/utils/index.d.ts +0 -6
- package/lib/ProIcon/utils/index.js +0 -95
- package/lib/ProLayout/components/Layout/Header/index.d.ts +0 -4
- package/lib/ProLayout/components/Layout/Header/index.js +0 -188
- package/lib/ProLayout/components/Layout/Header/style/index.less +0 -277
- package/lib/ProLayout/components/Layout/Icon/Icon.d.ts +0 -10
- package/lib/ProLayout/components/Layout/Icon/Icon.js +0 -41
- package/lib/ProLayout/components/Layout/Icon/index.d.ts +0 -2
- package/lib/ProLayout/components/Layout/Icon/index.js +0 -9
- package/lib/ProLayout/components/Layout/Icon/style/index.less +0 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +0 -3
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +0 -212
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +0 -111
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +0 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +0 -214
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +0 -15
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +0 -5
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -177
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +0 -47
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +0 -124
- package/lib/ProLayout/components/Layout/Menu/index.d.ts +0 -4
- package/lib/ProLayout/components/Layout/Menu/index.js +0 -178
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -136
- package/lib/ProLayout/components/Layout/Notice/index.d.ts +0 -4
- package/lib/ProLayout/components/Layout/Notice/index.js +0 -37
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -37
- package/lib/ProLayout/components/Layout/index.d.ts +0 -4
- package/lib/ProLayout/components/Layout/index.js +0 -34
- package/lib/ProLayout/components/Layout/index.less +0 -4
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +0 -98
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +0 -5
- package/lib/ProLayout/components/ProCollapse/index.d.ts +0 -3
- package/lib/ProLayout/components/ProCollapse/index.js +0 -200
- package/lib/ProLayout/components/ProCollapse/style/index.less +0 -357
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +0 -27
- package/lib/ProLayout/components/ProFooter/PropTypes.js +0 -5
- package/lib/ProLayout/components/ProFooter/index.d.ts +0 -4
- package/lib/ProLayout/components/ProFooter/index.js +0 -59
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -12
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +0 -206
- package/lib/ProLayout/components/ProHeader/PropTypes.js +0 -5
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +0 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +0 -29
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.d.ts +0 -9
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +0 -35
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.d.ts +0 -4
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +0 -5
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +0 -23
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +0 -2
- package/lib/ProLayout/components/ProHeader/components/index.js +0 -20
- package/lib/ProLayout/components/ProHeader/index.d.ts +0 -4
- package/lib/ProLayout/components/ProHeader/index.js +0 -559
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -416
- package/lib/ProLayout/components/ProHeader/utils/index.d.ts +0 -5
- package/lib/ProLayout/components/ProHeader/utils/index.js +0 -21
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +0 -7
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +0 -106
- package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +0 -26
- package/lib/ProLayout/components/TabsManager/components/TabItem.js +0 -75
- package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +0 -6
- package/lib/ProLayout/components/TabsManager/components/TabsContext.js +0 -11
- package/lib/ProLayout/components/TabsManager/components/TabsHeader.d.ts +0 -12
- package/lib/ProLayout/components/TabsManager/components/TabsHeader.js +0 -58
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +0 -6
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +0 -20
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +0 -18
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +0 -31
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +0 -31
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +0 -103
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +0 -5
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -417
- package/lib/ProLayout/components/TabsManager/index.d.ts +0 -7
- package/lib/ProLayout/components/TabsManager/index.js +0 -196
- package/lib/ProLayout/components/TabsManager/propTypes.d.ts +0 -75
- package/lib/ProLayout/components/TabsManager/propTypes.js +0 -21
- package/lib/ProLayout/components/TabsManager/style/index.less +0 -310
- package/lib/ProLayout/components/TabsManager/utils/index.d.ts +0 -41
- package/lib/ProLayout/components/TabsManager/utils/index.js +0 -126
- package/lib/ProLayout/components/index.d.ts +0 -3
- package/lib/ProLayout/components/index.js +0 -27
- package/lib/ProLayout/images/close.png +0 -0
- package/lib/ProLayout/images/logoImg.png +0 -0
- package/lib/ProLayout/images/tipMsg.png +0 -0
- package/lib/ProLayout/index.d.ts +0 -20
- package/lib/ProLayout/index.js +0 -285
- package/lib/ProLayout/propTypes.d.ts +0 -435
- package/lib/ProLayout/propTypes.js +0 -46
- package/lib/ProLayout/style/index.less +0 -344
- package/lib/ProLayout/utils/index.d.ts +0 -43
- package/lib/ProLayout/utils/index.js +0 -278
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +0 -4
- package/lib/ProSelect/components/AdaptiveTooltip.js +0 -54
- package/lib/ProSelect/index.d.ts +0 -5
- package/lib/ProSelect/index.js +0 -524
- package/lib/ProSelect/propsType.d.ts +0 -160
- package/lib/ProSelect/propsType.js +0 -5
- package/lib/ProSelect/style/index.less +0 -21
- package/lib/ProSelect/utils/index.d.ts +0 -4
- package/lib/ProSelect/utils/index.js +0 -146
- package/lib/ProStep/components/Anchor/index.d.ts +0 -4
- package/lib/ProStep/components/Anchor/index.js +0 -117
- package/lib/ProStep/components/Item/index.d.ts +0 -3
- package/lib/ProStep/components/Item/index.js +0 -104
- package/lib/ProStep/components/Listener/index.d.ts +0 -4
- package/lib/ProStep/components/Listener/index.js +0 -80
- package/lib/ProStep/components/Step/index.d.ts +0 -5
- package/lib/ProStep/components/Step/index.js +0 -99
- package/lib/ProStep/index.d.ts +0 -11
- package/lib/ProStep/index.js +0 -266
- package/lib/ProStep/propsType.d.ts +0 -222
- package/lib/ProStep/propsType.js +0 -5
- package/lib/ProStep/style/index.less +0 -220
- package/lib/ProStep/utils/index.d.ts +0 -22
- package/lib/ProStep/utils/index.js +0 -78
- package/lib/ProStepTab/index.d.ts +0 -22
- package/lib/ProStepTab/index.js +0 -384
- package/lib/ProStepTab/propsType.d.ts +0 -114
- package/lib/ProStepTab/propsType.js +0 -5
- package/lib/ProTable/components/FormatColumn/index.d.ts +0 -20
- package/lib/ProTable/components/FormatColumn/index.js +0 -699
- package/lib/ProTable/components/FormatColumn/propsType.d.ts +0 -29
- package/lib/ProTable/components/FormatColumn/propsType.js +0 -5
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -10
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +0 -49
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +0 -18
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +0 -205
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.d.ts +0 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +0 -182
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.d.ts +0 -61
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +0 -5
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -10
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +0 -65
- package/lib/ProTable/components/RcTable/index.d.ts +0 -4
- package/lib/ProTable/components/RcTable/index.js +0 -20
- package/lib/ProTable/components/RenderColumn/index.d.ts +0 -22
- package/lib/ProTable/components/RenderColumn/index.js +0 -278
- package/lib/ProTable/components/RenderEmptyText/index.d.ts +0 -3
- package/lib/ProTable/components/RenderEmptyText/index.js +0 -28
- package/lib/ProTable/components/RenderFooter/index.d.ts +0 -2
- package/lib/ProTable/components/RenderFooter/index.js +0 -20
- package/lib/ProTable/components/RenderSummary/index.d.ts +0 -3
- package/lib/ProTable/components/RenderSummary/index.js +0 -60
- package/lib/ProTable/components/RenderTableHeader/index.d.ts +0 -2
- package/lib/ProTable/components/RenderTableHeader/index.js +0 -67
- package/lib/ProTable/components/RenderTabs/index.d.ts +0 -4
- package/lib/ProTable/components/RenderTabs/index.js +0 -97
- package/lib/ProTable/components/TableResizable/index.d.ts +0 -13
- package/lib/ProTable/components/TableResizable/index.js +0 -109
- package/lib/ProTable/components/TooltipTitle/index.d.ts +0 -11
- package/lib/ProTable/components/TooltipTitle/index.js +0 -26
- package/lib/ProTable/components/index.d.ts +0 -30
- package/lib/ProTable/components/index.js +0 -48
- package/lib/ProTable/hooks/useAntdTable.d.ts +0 -7
- package/lib/ProTable/hooks/useAntdTable.js +0 -581
- package/lib/ProTable/index.d.ts +0 -16
- package/lib/ProTable/index.js +0 -476
- package/lib/ProTable/propsType.d.ts +0 -757
- package/lib/ProTable/propsType.js +0 -5
- package/lib/ProTable/style/index.less +0 -644
- package/lib/ProTable/utils/index.d.ts +0 -38
- package/lib/ProTable/utils/index.js +0 -142
- package/lib/ProTabs/components/Card/index.d.ts +0 -3
- package/lib/ProTabs/components/Card/index.js +0 -54
- package/lib/ProTabs/components/index.d.ts +0 -1
- package/lib/ProTabs/components/index.js +0 -13
- package/lib/ProTabs/index.d.ts +0 -4
- package/lib/ProTabs/index.js +0 -138
- package/lib/ProTabs/propType.d.ts +0 -94
- package/lib/ProTabs/propType.js +0 -5
- package/lib/ProTabs/style/index.less +0 -157
- package/lib/ProThemeTools/component/ProTools/index.d.ts +0 -3
- package/lib/ProThemeTools/component/ProTools/index.js +0 -301
- package/lib/ProThemeTools/component/ProTools/style/index.less +0 -178
- package/lib/ProThemeTools/component/index.d.ts +0 -1
- package/lib/ProThemeTools/component/index.js +0 -13
- package/lib/ProThemeTools/context/ThemeContext.d.ts +0 -43
- package/lib/ProThemeTools/context/ThemeContext.js +0 -291
- package/lib/ProThemeTools/index.d.ts +0 -9
- package/lib/ProThemeTools/index.js +0 -302
- package/lib/ProThemeTools/propsType.d.ts +0 -170
- package/lib/ProThemeTools/propsType.js +0 -5
- package/lib/ProThemeTools/style/index.less +0 -74
- package/lib/ProThemeTools/utils/index.d.ts +0 -51
- package/lib/ProThemeTools/utils/index.js +0 -261
- package/lib/ProTooltip/index.d.ts +0 -3
- package/lib/ProTooltip/index.js +0 -309
- package/lib/ProTooltip/propsType.d.ts +0 -57
- package/lib/ProTooltip/propsType.js +0 -5
- package/lib/ProTooltip/style/index.less +0 -34
- package/lib/ProTree/components/AdaptiveTooltip.d.ts +0 -4
- package/lib/ProTree/components/AdaptiveTooltip.js +0 -23
- package/lib/ProTree/components/CloseIcon.d.ts +0 -2
- package/lib/ProTree/components/CloseIcon.js +0 -38
- package/lib/ProTree/components/List.d.ts +0 -17
- package/lib/ProTree/components/List.js +0 -79
- package/lib/ProTree/components/ProTree.d.ts +0 -3
- package/lib/ProTree/components/ProTree.js +0 -505
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +0 -5
- package/lib/ProTree/components/ProTreeSelect/index.js +0 -770
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +0 -439
- package/lib/ProTree/components/ProTreeSelect/propsType.js +0 -5
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -119
- package/lib/ProTree/components/SearchTitle.d.ts +0 -11
- package/lib/ProTree/components/SearchTitle.js +0 -60
- package/lib/ProTree/components/Tree.d.ts +0 -27
- package/lib/ProTree/components/Tree.js +0 -393
- package/lib/ProTree/components/index.d.ts +0 -4
- package/lib/ProTree/components/index.js +0 -34
- package/lib/ProTree/index.d.ts +0 -3
- package/lib/ProTree/index.js +0 -30
- package/lib/ProTree/propsType.d.ts +0 -812
- package/lib/ProTree/propsType.js +0 -5
- package/lib/ProTree/style/index.less +0 -393
- package/lib/ProTree/utils.d.ts +0 -43
- package/lib/ProTree/utils.js +0 -221
- package/lib/ProTreeModal/components/Cascader.d.ts +0 -14
- package/lib/ProTreeModal/components/Cascader.js +0 -110
- package/lib/ProTreeModal/components/CloseIcon.d.ts +0 -2
- package/lib/ProTreeModal/components/CloseIcon.js +0 -38
- package/lib/ProTreeModal/components/List.d.ts +0 -21
- package/lib/ProTreeModal/components/List.js +0 -294
- package/lib/ProTreeModal/components/SearchTitle.d.ts +0 -7
- package/lib/ProTreeModal/components/SearchTitle.js +0 -27
- package/lib/ProTreeModal/components/SortableItem.d.ts +0 -12
- package/lib/ProTreeModal/components/SortableItem.js +0 -80
- package/lib/ProTreeModal/components/Tree.d.ts +0 -25
- package/lib/ProTreeModal/components/Tree.js +0 -241
- package/lib/ProTreeModal/components/Trigger.d.ts +0 -21
- package/lib/ProTreeModal/components/Trigger.js +0 -195
- package/lib/ProTreeModal/components/index.d.ts +0 -6
- package/lib/ProTreeModal/components/index.js +0 -48
- package/lib/ProTreeModal/index.d.ts +0 -4
- package/lib/ProTreeModal/index.js +0 -837
- package/lib/ProTreeModal/propsType.d.ts +0 -298
- package/lib/ProTreeModal/propsType.js +0 -5
- package/lib/ProTreeModal/style/index.less +0 -414
- package/lib/ProTreeModal/utils.d.ts +0 -39
- package/lib/ProTreeModal/utils.js +0 -243
- package/lib/ProUpload/components/ButtonRender.d.ts +0 -20
- package/lib/ProUpload/components/ButtonRender.js +0 -114
- package/lib/ProUpload/components/DragRender.d.ts +0 -21
- package/lib/ProUpload/components/DragRender.js +0 -196
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +0 -2
- package/lib/ProUpload/components/DraggableUploadListItem.js +0 -42
- package/lib/ProUpload/components/Example.d.ts +0 -10
- package/lib/ProUpload/components/Example.js +0 -61
- package/lib/ProUpload/components/FileItem.d.ts +0 -33
- package/lib/ProUpload/components/FileItem.js +0 -238
- package/lib/ProUpload/components/ImageRender.d.ts +0 -19
- package/lib/ProUpload/components/ImageRender.js +0 -279
- package/lib/ProUpload/index.d.ts +0 -4
- package/lib/ProUpload/index.js +0 -311
- package/lib/ProUpload/propsType.d.ts +0 -264
- package/lib/ProUpload/propsType.js +0 -5
- package/lib/ProUpload/style/icon-PDF.png +0 -0
- package/lib/ProUpload/style/icon-TXT.png +0 -0
- package/lib/ProUpload/style/icon-excel.png +0 -0
- package/lib/ProUpload/style/icon-pic.png +0 -0
- package/lib/ProUpload/style/icon-word.png +0 -0
- package/lib/ProUpload/style/index.less +0 -480
- package/lib/ProUpload/uitls.d.ts +0 -3
- package/lib/ProUpload/uitls.js +0 -22
- package/lib/ProUtils/utils/index.d.ts +0 -6
- package/lib/ProUtils/utils/index.js +0 -26
- package/lib/ProViewer/index.d.ts +0 -4
- package/lib/ProViewer/index.js +0 -229
- package/lib/ProViewer/propsType.d.ts +0 -35
- package/lib/ProViewer/propsType.js +0 -3
- package/lib/ProViewer/style/index.less +0 -10
- package/lib/ProWaterMark/index.d.ts +0 -4
- package/lib/ProWaterMark/index.js +0 -26
- package/lib/ProWaterMark/propsType.d.ts +0 -6
- package/lib/ProWaterMark/propsType.js +0 -5
- package/lib/assets/apps.svg +0 -23
- package/lib/assets/arrow.svg +0 -1
- package/lib/assets/catalog.svg +0 -30
- package/lib/assets/close.svg +0 -1
- package/lib/assets/close2.svg +0 -1
- package/lib/assets/copy.svg +0 -1
- package/lib/assets/customColumn.svg +0 -2
- package/lib/assets/delete.svg +0 -1
- package/lib/assets/disabled.svg +0 -18
- package/lib/assets/download.svg +0 -1
- package/lib/assets/drag.svg +0 -1
- package/lib/assets/empty.png +0 -0
- package/lib/assets/fold.svg +0 -27
- package/lib/assets/header_bg.png +0 -0
- package/lib/assets/input-search.svg +0 -11
- package/lib/assets/look.svg +0 -1
- package/lib/assets/reset.svg +0 -11
- package/lib/assets/search.svg +0 -1
- package/lib/assets/setting.svg +0 -14
- package/lib/assets/view.svg +0 -20
- package/lib/global.less +0 -57
- package/lib/index.d.ts +0 -47
- package/lib/index.js +0 -276
- package/lib/locale/en_US.d.ts +0 -176
- package/lib/locale/en_US.js +0 -181
- package/lib/locale/index.d.ts +0 -15
- package/lib/locale/index.js +0 -65
- package/lib/locale/zh_CN.d.ts +0 -176
- package/lib/locale/zh_CN.js +0 -181
- package/lib/style/components.less +0 -27
- package/lib/style/core/compatible.less +0 -5
- package/lib/style/core/index.less +0 -3
- package/lib/style/core/mixins.less +0 -77
- package/lib/style/core/normalize.less +0 -251
- package/lib/style/index.less +0 -2
- package/lib/style/less.less +0 -2
- package/lib/style/theme/antd.less +0 -743
- package/lib/style/theme/base.less +0 -90
- package/lib/style/theme/index.less +0 -2
- package/lib/style/theme/tokens.less +0 -90
- package/lib/style/variables.less +0 -2
- package/lib/tokens.d.ts +0 -83
- package/lib/tokens.js +0 -91
- package/lib/utils/index.d.ts +0 -21
- package/lib/utils/index.js +0 -116
- package/typings.d.ts +0 -17
package/es/ProTreeModal/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
11
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
|
+
import _isFunction from "lodash/isFunction";
|
|
2
|
+
import _cloneDeep from "lodash/cloneDeep";
|
|
12
3
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
13
4
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc, useDebounceFn } from 'ahooks';
|
|
14
5
|
import { Button, Checkbox, Input, message } from 'antd';
|
|
15
|
-
import { cloneDeep, isFunction } from 'lodash';
|
|
16
6
|
import { ReactSVG } from 'react-svg';
|
|
17
7
|
import classNames from 'classnames';
|
|
18
8
|
import { ProDrawerForm, useProConfig } from "../index";
|
|
@@ -22,72 +12,67 @@ import { transformTreeToArray, treeNodeFind } from "../ProTable/components/RcTab
|
|
|
22
12
|
import searchSVG from "../assets/input-search.svg";
|
|
23
13
|
import locale, { formatMessage } from "../locale";
|
|
24
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
value
|
|
36
|
-
onChange
|
|
37
|
-
dataSource
|
|
38
|
-
trigger
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
max = props.max,
|
|
57
|
-
draggable = props.draggable,
|
|
58
|
-
span = props.span,
|
|
59
|
-
appoint = props.appoint,
|
|
60
|
-
appointProps = props.appointProps,
|
|
61
|
-
_props$fieldNames = props.fieldNames,
|
|
62
|
-
fieldNames = _props$fieldNames === void 0 ? {
|
|
15
|
+
const LIST = 'LIST';
|
|
16
|
+
const TREE = 'TREE';
|
|
17
|
+
export const CASCADER = 'CASCADER';
|
|
18
|
+
const ProTreeModal = props => {
|
|
19
|
+
const {
|
|
20
|
+
dics = {}
|
|
21
|
+
} = useProConfig('ProEnum');
|
|
22
|
+
const listRef = useRef(null);
|
|
23
|
+
const {
|
|
24
|
+
open,
|
|
25
|
+
value,
|
|
26
|
+
onChange,
|
|
27
|
+
dataSource,
|
|
28
|
+
trigger,
|
|
29
|
+
mode = 'tree',
|
|
30
|
+
code: enumCode,
|
|
31
|
+
title = locale?.ProTreeModal?.select,
|
|
32
|
+
useRequest,
|
|
33
|
+
showCodeName = false,
|
|
34
|
+
checkStrictly = false,
|
|
35
|
+
tags,
|
|
36
|
+
placeholder,
|
|
37
|
+
labelInValue = false,
|
|
38
|
+
style = {},
|
|
39
|
+
min,
|
|
40
|
+
max,
|
|
41
|
+
draggable,
|
|
42
|
+
span,
|
|
43
|
+
appoint,
|
|
44
|
+
appointProps,
|
|
45
|
+
fieldNames = {
|
|
63
46
|
label: 'label',
|
|
64
47
|
value: 'value',
|
|
65
48
|
children: 'children'
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
49
|
+
},
|
|
50
|
+
disabled = props.disabled || props.isView || props?.otherProps?.isView || false,
|
|
51
|
+
isView = props.isView || props?.otherProps?.isView || false,
|
|
52
|
+
transformResponse,
|
|
53
|
+
optionRender,
|
|
54
|
+
openChange,
|
|
55
|
+
maxMessage
|
|
56
|
+
} = props;
|
|
57
|
+
let {
|
|
58
|
+
allValue
|
|
59
|
+
} = props;
|
|
60
|
+
const modeType = mode.toUpperCase();
|
|
61
|
+
const fieldNameLabel = fieldNames.label;
|
|
62
|
+
const fieldNameValue = fieldNames.value;
|
|
63
|
+
const fieldNameChildren = fieldNames.children;
|
|
64
|
+
const normalizeFixedDisabled = (items = []) => {
|
|
82
65
|
if (!Array.isArray(items)) {
|
|
83
66
|
return [];
|
|
84
67
|
}
|
|
85
68
|
return items.map(item => {
|
|
86
|
-
|
|
69
|
+
const nextItem = {
|
|
70
|
+
...item
|
|
71
|
+
};
|
|
87
72
|
if (nextItem.fixed && !nextItem.disabled) {
|
|
88
73
|
nextItem.disabled = true;
|
|
89
74
|
}
|
|
90
|
-
|
|
75
|
+
const children = nextItem[fieldNameChildren];
|
|
91
76
|
if (Array.isArray(children) && children.length) {
|
|
92
77
|
nextItem[fieldNameChildren] = normalizeFixedDisabled(children);
|
|
93
78
|
}
|
|
@@ -98,30 +83,28 @@ var ProTreeModal = props => {
|
|
|
98
83
|
console.error('allValue must be input');
|
|
99
84
|
allValue = 'all';
|
|
100
85
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
state = _useSetState2[0],
|
|
117
|
-
setState = _useSetState2[1];
|
|
118
|
-
var fetchFunction = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread({
|
|
86
|
+
const [state, setState] = useSetState({
|
|
87
|
+
open: false,
|
|
88
|
+
checkedValues: [],
|
|
89
|
+
beforeClearAllValues: [],
|
|
90
|
+
// 点击清空全部并点击关闭、此时数据回显示不正确
|
|
91
|
+
treeData: [],
|
|
92
|
+
treeViewData: [],
|
|
93
|
+
originalTreeData: [],
|
|
94
|
+
flatTreeData: [],
|
|
95
|
+
searchStr: '',
|
|
96
|
+
checkAll: false,
|
|
97
|
+
allKeys: [],
|
|
98
|
+
transformedTree: []
|
|
99
|
+
});
|
|
100
|
+
const fetchFunction = useRequestFunc(useRequest?.service, {
|
|
119
101
|
manual: true,
|
|
120
102
|
onSuccess: res => {
|
|
121
|
-
|
|
122
|
-
status =
|
|
123
|
-
msg
|
|
124
|
-
|
|
103
|
+
const {
|
|
104
|
+
status = 200,
|
|
105
|
+
message: msg
|
|
106
|
+
} = res;
|
|
107
|
+
let responseData = res?.data;
|
|
125
108
|
if (transformResponse && typeof transformResponse === 'function') {
|
|
126
109
|
responseData = transformResponse(res);
|
|
127
110
|
}
|
|
@@ -136,34 +119,34 @@ var ProTreeModal = props => {
|
|
|
136
119
|
allKeys: getAllKeys(responseData, fieldNames)
|
|
137
120
|
});
|
|
138
121
|
},
|
|
139
|
-
debounceWait: 300
|
|
140
|
-
|
|
122
|
+
debounceWait: 300,
|
|
123
|
+
...useRequest?.options
|
|
124
|
+
});
|
|
141
125
|
useDeepCompareEffect(() => {
|
|
142
126
|
if (dataSource && dataSource.length) {
|
|
143
|
-
|
|
144
|
-
|
|
127
|
+
const normalizedDataSource = normalizeFixedDisabled(dataSource);
|
|
128
|
+
const flatTreeData = getFlatTreeData(normalizedDataSource, fieldNames);
|
|
145
129
|
setState({
|
|
146
130
|
treeData: normalizedDataSource,
|
|
147
|
-
originalTreeData:
|
|
131
|
+
originalTreeData: _cloneDeep(normalizedDataSource),
|
|
148
132
|
flatTreeData,
|
|
149
133
|
allKeys: getAllKeys(normalizedDataSource, fieldNames)
|
|
150
134
|
});
|
|
151
135
|
} else if (enumCode) {
|
|
152
|
-
|
|
136
|
+
let dictEnum = dics[enumCode] || [];
|
|
153
137
|
// transform dictEnum
|
|
154
|
-
if (transformResponse &&
|
|
138
|
+
if (transformResponse && _isFunction(transformResponse)) {
|
|
155
139
|
dictEnum = transformResponse(dictEnum);
|
|
156
140
|
}
|
|
157
141
|
// check dictEnum isArray
|
|
158
142
|
if (!dictEnum || !Array.isArray(dictEnum)) {
|
|
159
|
-
|
|
160
|
-
console.error(locale === null || locale === void 0 || (_locale$ProTreeModal2 = locale.ProTreeModal) === null || _locale$ProTreeModal2 === void 0 ? void 0 : _locale$ProTreeModal2.errorArrayMessage);
|
|
143
|
+
console.error(locale?.ProTreeModal?.errorArrayMessage);
|
|
161
144
|
dictEnum = [];
|
|
162
145
|
}
|
|
163
|
-
|
|
146
|
+
const normalizedDictEnum = normalizeFixedDisabled(dictEnum);
|
|
164
147
|
setState({
|
|
165
148
|
treeData: normalizedDictEnum,
|
|
166
|
-
originalTreeData:
|
|
149
|
+
originalTreeData: _cloneDeep(normalizedDictEnum),
|
|
167
150
|
flatTreeData: getFlatTreeData(normalizedDictEnum, fieldNames),
|
|
168
151
|
allKeys: getAllKeys(normalizedDictEnum, fieldNames)
|
|
169
152
|
});
|
|
@@ -176,16 +159,17 @@ var ProTreeModal = props => {
|
|
|
176
159
|
if (dataSource) {
|
|
177
160
|
return undefined;
|
|
178
161
|
}
|
|
179
|
-
|
|
180
|
-
defaultParams
|
|
181
|
-
manual
|
|
182
|
-
|
|
162
|
+
const {
|
|
163
|
+
defaultParams,
|
|
164
|
+
manual
|
|
165
|
+
} = useRequest?.options || {};
|
|
166
|
+
const params = Array.isArray(defaultParams) ? defaultParams?.[0] : defaultParams || {};
|
|
183
167
|
if (manual) {
|
|
184
168
|
return;
|
|
185
169
|
}
|
|
186
170
|
// 执行用户配置的枚举服务,拉取枚举数据进行更新
|
|
187
171
|
fetchFunction.run(params);
|
|
188
|
-
}, [useRequest
|
|
172
|
+
}, [useRequest?.options]);
|
|
189
173
|
useEffect(() => {
|
|
190
174
|
setState({
|
|
191
175
|
open
|
|
@@ -193,11 +177,13 @@ var ProTreeModal = props => {
|
|
|
193
177
|
}, [open]);
|
|
194
178
|
useEffect(() => {
|
|
195
179
|
if (value) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
180
|
+
let checkedValues = [];
|
|
181
|
+
const {
|
|
182
|
+
treeData,
|
|
183
|
+
allKeys,
|
|
184
|
+
originalTreeData
|
|
185
|
+
} = state;
|
|
186
|
+
let treeViewData = [];
|
|
201
187
|
if (allValue && typeof value === 'string' && allValue === value) {
|
|
202
188
|
if (modeType === LIST) {
|
|
203
189
|
checkedValues = treeData.map(item => item[fieldNameValue]) || [];
|
|
@@ -211,7 +197,7 @@ var ProTreeModal = props => {
|
|
|
211
197
|
}
|
|
212
198
|
// 开启 labelInValue [{ label:xx, value: ""}] 形式、需要取出来 value
|
|
213
199
|
if (labelInValue) {
|
|
214
|
-
|
|
200
|
+
const isObjectArray = value.every(element => typeof element === 'object' && element !== null);
|
|
215
201
|
if (!isObjectArray) {
|
|
216
202
|
console.error('Please enter an array object');
|
|
217
203
|
checkedValues = [];
|
|
@@ -230,54 +216,53 @@ var ProTreeModal = props => {
|
|
|
230
216
|
});
|
|
231
217
|
} else if (modeType === LIST && state.flatTreeData && state.flatTreeData.length > 0) {
|
|
232
218
|
// mode: 'list' 下,如果没有 value prop,自动将 fixed 的项加入到 checkedValues
|
|
233
|
-
|
|
219
|
+
const fixedItems = state.flatTreeData.filter(item => item.fixed === 'right').map(item => item[fieldNameValue]);
|
|
234
220
|
if (fixedItems.length > 0 && state.checkedValues.length === 0) {
|
|
235
221
|
// 只有当 checkedValues 为空时才自动添加 fixed 项,避免覆盖已有的选中状态
|
|
236
|
-
|
|
222
|
+
const treeViewData = filterCheckedNodes(state.originalTreeData, fixedItems, '', fieldNames);
|
|
237
223
|
setState({
|
|
238
224
|
checkedValues: fixedItems,
|
|
239
225
|
checkAll: fixedItems.length === state.allKeys.length,
|
|
240
|
-
treeViewData
|
|
226
|
+
treeViewData,
|
|
241
227
|
beforeClearAllValues: fixedItems
|
|
242
228
|
});
|
|
243
229
|
}
|
|
244
230
|
}
|
|
245
231
|
}, [value, state.allKeys, state.open, state.flatTreeData, state.originalTreeData, modeType, fieldNameValue]);
|
|
246
232
|
useDeepCompareEffect(() => {
|
|
247
|
-
|
|
233
|
+
const transformedTree = addLevelAndParentId(state.treeData, fieldNames);
|
|
248
234
|
setState({
|
|
249
235
|
transformedTree
|
|
250
236
|
});
|
|
251
237
|
}, [state.treeData]);
|
|
252
|
-
|
|
238
|
+
const handleClick = () => {
|
|
253
239
|
setState({
|
|
254
240
|
open: true
|
|
255
241
|
});
|
|
256
|
-
openChange
|
|
242
|
+
openChange?.(true);
|
|
257
243
|
};
|
|
258
244
|
|
|
259
245
|
/**
|
|
260
246
|
* close Drawer and onChange(values)
|
|
261
247
|
*/
|
|
262
|
-
|
|
248
|
+
const handleFinish = () => {
|
|
263
249
|
// 全选的时候返回 allValue 标记即可
|
|
264
250
|
// 3.3.2 版本全选的时候返回所有值的合集 list
|
|
265
251
|
if (allValue !== undefined && state.checkAll && !draggable) {
|
|
266
252
|
if (labelInValue) {
|
|
267
|
-
onChange
|
|
253
|
+
onChange?.(state.flatTreeData);
|
|
268
254
|
} else {
|
|
269
|
-
onChange
|
|
255
|
+
onChange?.(state.flatTreeData.map(item => item[fieldNameValue]));
|
|
270
256
|
}
|
|
271
257
|
} else if (draggable && span) {
|
|
272
|
-
var _listRef$current;
|
|
273
258
|
// 开启 draggable 使用拖拽后的顺序
|
|
274
|
-
|
|
259
|
+
const checkedList = listRef.current?.onChange();
|
|
275
260
|
onChange(checkedList);
|
|
276
261
|
} else {
|
|
277
|
-
|
|
262
|
+
let values = [];
|
|
278
263
|
if (labelInValue) {
|
|
279
264
|
state.checkedValues.forEach(val => {
|
|
280
|
-
|
|
265
|
+
const option = state.flatTreeData.find(item => item[fieldNameValue] === val);
|
|
281
266
|
option && values.push(option);
|
|
282
267
|
});
|
|
283
268
|
} else {
|
|
@@ -285,34 +270,32 @@ var ProTreeModal = props => {
|
|
|
285
270
|
}
|
|
286
271
|
if (min) {
|
|
287
272
|
if (values.length < min) {
|
|
288
|
-
|
|
289
|
-
message.error(formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal3 = locale.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
|
|
273
|
+
message.error(formatMessage(locale?.ProTreeModal?.selectMin, {
|
|
290
274
|
min
|
|
291
275
|
}));
|
|
292
276
|
return;
|
|
293
277
|
}
|
|
294
278
|
}
|
|
295
|
-
onChange
|
|
279
|
+
onChange?.(values);
|
|
296
280
|
}
|
|
297
281
|
// fix: 当有 openChange 时候、点击确定应该由关闭 openChange 控制
|
|
298
282
|
if (!openChange || open === undefined) {
|
|
299
283
|
setState({
|
|
300
284
|
open: false
|
|
301
285
|
});
|
|
302
|
-
openChange
|
|
286
|
+
openChange?.(false);
|
|
303
287
|
}
|
|
304
288
|
if (openChange && open !== undefined) {
|
|
305
|
-
openChange
|
|
289
|
+
openChange?.(true);
|
|
306
290
|
}
|
|
307
291
|
};
|
|
308
292
|
|
|
309
293
|
/**
|
|
310
294
|
* clear all checked
|
|
311
295
|
*/
|
|
312
|
-
|
|
313
|
-
var _state$flatTreeData$f;
|
|
296
|
+
const handleClearAll = () => {
|
|
314
297
|
// 处理 ProTable 场景下 disabled 的不需要被清理
|
|
315
|
-
|
|
298
|
+
const _checkedValues = span ? state.flatTreeData.filter(item => item.disabled)?.map(item => item[fieldNameValue]) : [];
|
|
316
299
|
setState({
|
|
317
300
|
checkedValues: _checkedValues,
|
|
318
301
|
beforeClearAllValues: state.checkedValues,
|
|
@@ -322,37 +305,39 @@ var ProTreeModal = props => {
|
|
|
322
305
|
});
|
|
323
306
|
// 通知父组件更新 value prop,确保清空操作被正确保存
|
|
324
307
|
if (labelInValue) {
|
|
325
|
-
onChange
|
|
308
|
+
onChange?.([]);
|
|
326
309
|
} else {
|
|
327
|
-
onChange
|
|
310
|
+
onChange?.(_checkedValues);
|
|
328
311
|
}
|
|
329
312
|
};
|
|
330
313
|
|
|
331
314
|
/**
|
|
332
315
|
* Drawer close
|
|
333
316
|
*/
|
|
334
|
-
|
|
317
|
+
const handleClose = () => {
|
|
335
318
|
setState({
|
|
336
319
|
open: false,
|
|
337
320
|
checkedValues: state.beforeClearAllValues,
|
|
338
321
|
beforeClearAllValues: []
|
|
339
322
|
});
|
|
340
|
-
openChange
|
|
323
|
+
openChange?.(false);
|
|
341
324
|
};
|
|
342
325
|
|
|
343
326
|
/**
|
|
344
327
|
* checkbox/list selected change values
|
|
345
328
|
* @param values
|
|
346
329
|
*/
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
330
|
+
const handleListCheckChange = (e, code) => {
|
|
331
|
+
let checkedValues = [...state.checkedValues];
|
|
332
|
+
const {
|
|
333
|
+
checked
|
|
334
|
+
} = e.target;
|
|
350
335
|
if (!checked) {
|
|
351
336
|
checkedValues = checkedValues.filter(value => value !== code);
|
|
352
337
|
} else if (draggable && span) {
|
|
353
338
|
// 固定在右侧的情况
|
|
354
|
-
|
|
355
|
-
|
|
339
|
+
const fixedOption = state.flatTreeData.find(item => item.fixed === 'right') || {};
|
|
340
|
+
const fixedIdx = checkedValues.findIndex(value => value === fixedOption[fieldNameValue]);
|
|
356
341
|
if (fixedIdx >= 0) {
|
|
357
342
|
checkedValues.splice(fixedIdx, 0, code);
|
|
358
343
|
} else {
|
|
@@ -362,10 +347,9 @@ var ProTreeModal = props => {
|
|
|
362
347
|
checkedValues.push(code);
|
|
363
348
|
}
|
|
364
349
|
if (max && checkedValues.length > max) {
|
|
365
|
-
var _locale$ProTreeModal4;
|
|
366
350
|
message.error(maxMessage ? transformMessage({
|
|
367
351
|
max
|
|
368
|
-
}, maxMessage) : formatMessage(locale
|
|
352
|
+
}, maxMessage) : formatMessage(locale?.ProTreeModal?.selectMax, {
|
|
369
353
|
max
|
|
370
354
|
}));
|
|
371
355
|
return;
|
|
@@ -375,39 +359,41 @@ var ProTreeModal = props => {
|
|
|
375
359
|
checkAll: checkedValues.length === state.flatTreeData.length
|
|
376
360
|
});
|
|
377
361
|
};
|
|
378
|
-
|
|
362
|
+
const handleDragEndChange = checkedValues => {
|
|
379
363
|
setState({
|
|
380
364
|
checkedValues
|
|
381
365
|
});
|
|
382
366
|
};
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
367
|
+
const onCheck = (checkedKeys, info) => {
|
|
368
|
+
let checkedValues = [...state.checkedValues];
|
|
369
|
+
const {
|
|
370
|
+
originalTreeData
|
|
371
|
+
} = state;
|
|
386
372
|
|
|
387
373
|
// 如果有检索则自管理
|
|
388
374
|
if (state.searchStr) {
|
|
389
|
-
|
|
390
|
-
|
|
375
|
+
const {
|
|
376
|
+
node
|
|
377
|
+
} = info;
|
|
391
378
|
// 从完整树中找到当前节点
|
|
392
|
-
|
|
379
|
+
const activeNode = treeNodeFind(state.transformedTree, t => t[fieldNameValue] === node[fieldNameValue], {
|
|
393
380
|
childrenKey: fieldNames.children
|
|
394
381
|
});
|
|
395
|
-
|
|
382
|
+
const allChildren = transformTreeToArray([activeNode], {
|
|
396
383
|
childrenKey: fieldNames.children
|
|
397
|
-
})
|
|
384
|
+
})?.map(item => item[fieldNameValue]);
|
|
398
385
|
// 子项合并勾选
|
|
399
386
|
checkedValues = checkedValues.concat(allChildren);
|
|
400
387
|
// 从完整树中拿到父节点 只要存在父节点,那么就判断当前children是否全被勾选 若全被勾选就合并当前key到勾选队列
|
|
401
|
-
|
|
388
|
+
const _recourse = findNode => {
|
|
402
389
|
if (findNode.parentId) {
|
|
403
|
-
|
|
404
|
-
var parentNode = treeNodeFind(state.transformedTree, t => t[fieldNameValue] === findNode.parentId, {
|
|
390
|
+
const parentNode = treeNodeFind(state.transformedTree, t => t[fieldNameValue] === findNode.parentId, {
|
|
405
391
|
childrenKey: fieldNames.children
|
|
406
392
|
});
|
|
407
|
-
|
|
393
|
+
const parentChildrenKeys = transformTreeToArray([parentNode], {
|
|
408
394
|
childrenKey: fieldNames.children
|
|
409
|
-
})
|
|
410
|
-
|
|
395
|
+
})?.map(item => item[fieldNameValue]);
|
|
396
|
+
const parentChildrenAllChecked = parentChildrenKeys.every(key => {
|
|
411
397
|
return checkedValues.includes(key);
|
|
412
398
|
});
|
|
413
399
|
if (parentChildrenAllChecked) {
|
|
@@ -422,19 +408,19 @@ var ProTreeModal = props => {
|
|
|
422
408
|
};
|
|
423
409
|
_recourse(activeNode);
|
|
424
410
|
}
|
|
425
|
-
|
|
411
|
+
const _checkStrictly = state.searchStr ? true : checkStrictly;
|
|
426
412
|
|
|
427
413
|
// 此时应该取消掉自身并包含它所有的子集
|
|
428
414
|
if (!info.checked && !_checkStrictly) {
|
|
429
415
|
// 1. 取消自身
|
|
430
416
|
// 2. 把所有的子节点也要取消
|
|
431
|
-
|
|
417
|
+
const childrenkeys = [];
|
|
432
418
|
getChildrenKeys(info.node, childrenkeys, fieldNames, 'treeCheck');
|
|
433
419
|
checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
|
|
434
420
|
|
|
435
421
|
// 3. 取消父节点
|
|
436
|
-
|
|
437
|
-
|
|
422
|
+
const parentNodes = findTreeNodeByKey(originalTreeData, info.node.key, fieldNames);
|
|
423
|
+
const parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNameValue]), []);
|
|
438
424
|
checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
|
|
439
425
|
} else {
|
|
440
426
|
// _checkStrictly 模式下取 checkedKeys.checked 或者自身的 key
|
|
@@ -445,7 +431,7 @@ var ProTreeModal = props => {
|
|
|
445
431
|
checkedKeys = checkedKeys.checked || [];
|
|
446
432
|
}
|
|
447
433
|
checkedKeys.forEach(key => {
|
|
448
|
-
|
|
434
|
+
const exist = checkedValues.includes(key);
|
|
449
435
|
if (info.checked && !exist) {
|
|
450
436
|
checkedValues.push(key);
|
|
451
437
|
}
|
|
@@ -453,7 +439,7 @@ var ProTreeModal = props => {
|
|
|
453
439
|
}
|
|
454
440
|
|
|
455
441
|
// 根据选中的筛选出 viewTreeData
|
|
456
|
-
|
|
442
|
+
let treeViewData = [];
|
|
457
443
|
if (!checkStrictly) {
|
|
458
444
|
treeViewData = filterCheckedNodes(originalTreeData, checkedValues, '', fieldNames);
|
|
459
445
|
} else {
|
|
@@ -462,10 +448,9 @@ var ProTreeModal = props => {
|
|
|
462
448
|
});
|
|
463
449
|
}
|
|
464
450
|
if (max && checkedValues.length > max) {
|
|
465
|
-
var _locale$ProTreeModal5;
|
|
466
451
|
message.error(maxMessage ? transformMessage({
|
|
467
452
|
max
|
|
468
|
-
}, maxMessage) : formatMessage(locale
|
|
453
|
+
}, maxMessage) : formatMessage(locale?.ProTreeModal?.selectMax, {
|
|
469
454
|
max
|
|
470
455
|
}));
|
|
471
456
|
return;
|
|
@@ -481,7 +466,7 @@ var ProTreeModal = props => {
|
|
|
481
466
|
* filter checkbox by fileNameValue
|
|
482
467
|
* @param fileNameValue
|
|
483
468
|
*/
|
|
484
|
-
|
|
469
|
+
const handleFilterClose = fileNameValue => {
|
|
485
470
|
setState({
|
|
486
471
|
checkedValues: state.checkedValues.filter(value => value !== fileNameValue),
|
|
487
472
|
checkAll: false
|
|
@@ -493,10 +478,12 @@ var ProTreeModal = props => {
|
|
|
493
478
|
* @param fileNamekey
|
|
494
479
|
* @param node
|
|
495
480
|
*/
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
481
|
+
const treeFilterClose = (fileNamekey, node) => {
|
|
482
|
+
let checkedValues = [...state.checkedValues];
|
|
483
|
+
let treeViewData = [];
|
|
484
|
+
const {
|
|
485
|
+
originalTreeData
|
|
486
|
+
} = state;
|
|
500
487
|
if (checkStrictly) {
|
|
501
488
|
checkedValues = checkedValues.filter(key => key !== fileNamekey);
|
|
502
489
|
// handleFilterClose
|
|
@@ -507,13 +494,13 @@ var ProTreeModal = props => {
|
|
|
507
494
|
// 1. 取消自身
|
|
508
495
|
checkedValues = checkedValues.filter(key => key !== fileNamekey);
|
|
509
496
|
// 2. 把所有的子节点也要取消
|
|
510
|
-
|
|
497
|
+
const childrenkeys = [];
|
|
511
498
|
getChildrenKeys(node, childrenkeys, fieldNames, 'treeClose');
|
|
512
499
|
checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
|
|
513
500
|
|
|
514
501
|
// 3. 取消父节点
|
|
515
|
-
|
|
516
|
-
|
|
502
|
+
const parentNodes = findTreeNodeByKey(originalTreeData, fileNamekey, fieldNames);
|
|
503
|
+
const parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNames.value]), []);
|
|
517
504
|
checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
|
|
518
505
|
|
|
519
506
|
// 根据选中的筛选出 viewTreeData
|
|
@@ -525,22 +512,23 @@ var ProTreeModal = props => {
|
|
|
525
512
|
checkAll: false
|
|
526
513
|
});
|
|
527
514
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
515
|
+
const {
|
|
516
|
+
run: onSearch
|
|
517
|
+
} = useDebounceFn(str => {
|
|
518
|
+
if (modeType === LIST || modeType === CASCADER) {
|
|
519
|
+
const isCASCADER = modeType === CASCADER;
|
|
520
|
+
const data = state.flatTreeData.filter(item => {
|
|
521
|
+
const title = isCASCADER ? item?.title : item[fieldNameLabel];
|
|
522
|
+
return title.includes(str);
|
|
523
|
+
});
|
|
524
|
+
setState({
|
|
525
|
+
treeData: !str ? state.originalTreeData : data
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}, {
|
|
529
|
+
wait: 0
|
|
530
|
+
});
|
|
531
|
+
const handleSetSearchStr = str => {
|
|
544
532
|
setState({
|
|
545
533
|
searchStr: str
|
|
546
534
|
});
|
|
@@ -551,20 +539,20 @@ var ProTreeModal = props => {
|
|
|
551
539
|
* 指定模式下的操作
|
|
552
540
|
* @param appoint
|
|
553
541
|
*/
|
|
554
|
-
|
|
542
|
+
const appointChange = appoint => {
|
|
555
543
|
if (appoint) {
|
|
556
|
-
onChange
|
|
544
|
+
onChange?.(allValue);
|
|
557
545
|
setState({
|
|
558
546
|
checkAll: true
|
|
559
547
|
});
|
|
560
548
|
} else {
|
|
561
|
-
onChange
|
|
549
|
+
onChange?.([]);
|
|
562
550
|
setState({
|
|
563
551
|
checkAll: false,
|
|
564
552
|
open: true
|
|
565
553
|
});
|
|
566
554
|
if (appoint) {
|
|
567
|
-
openChange
|
|
555
|
+
openChange?.(true);
|
|
568
556
|
}
|
|
569
557
|
}
|
|
570
558
|
};
|
|
@@ -574,8 +562,7 @@ var ProTreeModal = props => {
|
|
|
574
562
|
* default example and you can customize trigger={<Button>打开</Button>}
|
|
575
563
|
* @returns
|
|
576
564
|
*/
|
|
577
|
-
|
|
578
|
-
var _props$otherProps3;
|
|
565
|
+
const TriggerComponent = useMemo(() => {
|
|
579
566
|
if (trigger && /*#__PURE__*/React.isValidElement(trigger)) {
|
|
580
567
|
return /*#__PURE__*/_jsx("div", {
|
|
581
568
|
onClick: handleClick,
|
|
@@ -591,7 +578,7 @@ var ProTreeModal = props => {
|
|
|
591
578
|
isView: isView,
|
|
592
579
|
appoint: appoint,
|
|
593
580
|
allValue: allValue,
|
|
594
|
-
label: props
|
|
581
|
+
label: props?.otherProps?.label,
|
|
595
582
|
handleClick: handleClick,
|
|
596
583
|
handleClearAll: handleClearAll,
|
|
597
584
|
appointChange: appointChange,
|
|
@@ -602,10 +589,12 @@ var ProTreeModal = props => {
|
|
|
602
589
|
/**
|
|
603
590
|
* 全选操作
|
|
604
591
|
*/
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
592
|
+
const handleAllCheck = e => {
|
|
593
|
+
const {
|
|
594
|
+
checked
|
|
595
|
+
} = e.target;
|
|
596
|
+
let checkedValues = [];
|
|
597
|
+
let treeViewData = [];
|
|
609
598
|
if (modeType === LIST || modeType === CASCADER) {
|
|
610
599
|
if (checked) {
|
|
611
600
|
checkedValues = state.flatTreeData.map(item => item[fieldNameValue]);
|
|
@@ -624,10 +613,9 @@ var ProTreeModal = props => {
|
|
|
624
613
|
}
|
|
625
614
|
}
|
|
626
615
|
if (max && checkedValues.length > max) {
|
|
627
|
-
var _locale$ProTreeModal6;
|
|
628
616
|
message.error(maxMessage ? transformMessage({
|
|
629
617
|
max
|
|
630
|
-
}, maxMessage) : formatMessage(locale
|
|
618
|
+
}, maxMessage) : formatMessage(locale?.ProTreeModal?.selectMax, {
|
|
631
619
|
max
|
|
632
620
|
}));
|
|
633
621
|
return;
|
|
@@ -643,12 +631,11 @@ var ProTreeModal = props => {
|
|
|
643
631
|
* 左侧容器、分为三种 list、tree、Cascader
|
|
644
632
|
* @returns
|
|
645
633
|
*/
|
|
646
|
-
|
|
634
|
+
const renderContainer = () => {
|
|
647
635
|
if (state.treeData.length === 0 && state.searchStr) {
|
|
648
|
-
var _locale$ProTreeModal7;
|
|
649
636
|
return /*#__PURE__*/_jsx("div", {
|
|
650
637
|
className: "pro-tree-modal-no-checks",
|
|
651
|
-
children: locale
|
|
638
|
+
children: locale?.ProTreeModal?.noFinal
|
|
652
639
|
});
|
|
653
640
|
}
|
|
654
641
|
switch (modeType) {
|
|
@@ -706,10 +693,10 @@ var ProTreeModal = props => {
|
|
|
706
693
|
break;
|
|
707
694
|
}
|
|
708
695
|
};
|
|
709
|
-
|
|
710
|
-
|
|
696
|
+
const listTreeData = useMemo(() => {
|
|
697
|
+
const checkListOptions = [];
|
|
711
698
|
state.checkedValues.forEach(key => {
|
|
712
|
-
|
|
699
|
+
const option = state.flatTreeData.find(item => item[fieldNameValue] === key);
|
|
713
700
|
if (option) {
|
|
714
701
|
checkListOptions.push(option);
|
|
715
702
|
}
|
|
@@ -721,12 +708,11 @@ var ProTreeModal = props => {
|
|
|
721
708
|
* 勾选后的右侧展示
|
|
722
709
|
* @returns
|
|
723
710
|
*/
|
|
724
|
-
|
|
711
|
+
const renderView = () => {
|
|
725
712
|
if (state.checkedValues.length === 0) {
|
|
726
|
-
var _locale$ProTreeModal8;
|
|
727
713
|
return /*#__PURE__*/_jsx("div", {
|
|
728
714
|
className: "pro-tree-modal-no-checks",
|
|
729
|
-
children: locale
|
|
715
|
+
children: locale?.ProTreeModal?.noCheck
|
|
730
716
|
});
|
|
731
717
|
}
|
|
732
718
|
switch (modeType) {
|
|
@@ -782,7 +768,7 @@ var ProTreeModal = props => {
|
|
|
782
768
|
checked: state.checkAll,
|
|
783
769
|
disabled: disabled,
|
|
784
770
|
onChange: handleAllCheck,
|
|
785
|
-
children: locale
|
|
771
|
+
children: locale?.ProTreeModal?.checkAll
|
|
786
772
|
}) : null,
|
|
787
773
|
children: /*#__PURE__*/_jsxs("div", {
|
|
788
774
|
className: "pro-tree-modal-content",
|
|
@@ -792,7 +778,7 @@ var ProTreeModal = props => {
|
|
|
792
778
|
disabled: disabled,
|
|
793
779
|
allowClear: true,
|
|
794
780
|
value: state.searchStr,
|
|
795
|
-
placeholder: placeholder ||
|
|
781
|
+
placeholder: placeholder || locale?.ProTreeModal?.input,
|
|
796
782
|
className: "pro-tree-modal-search",
|
|
797
783
|
onChange: e => handleSetSearchStr(e.target.value),
|
|
798
784
|
prefix: /*#__PURE__*/_jsx(ReactSVG, {
|
|
@@ -808,12 +794,12 @@ var ProTreeModal = props => {
|
|
|
808
794
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
809
795
|
className: "pro-tree-modal-box-header",
|
|
810
796
|
children: [/*#__PURE__*/_jsxs("span", {
|
|
811
|
-
children: [locale
|
|
797
|
+
children: [locale?.ProTreeModal?.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
|
|
812
798
|
}), !isView ? /*#__PURE__*/_jsx(Button, {
|
|
813
799
|
disabled: disabled,
|
|
814
800
|
type: "link",
|
|
815
801
|
onClick: handleClearAll,
|
|
816
|
-
children: locale
|
|
802
|
+
children: locale?.ProTreeModal?.clearAll
|
|
817
803
|
}) : null]
|
|
818
804
|
}), /*#__PURE__*/_jsx("div", {
|
|
819
805
|
className: "pro-tree-modal-tree-warp pro-transfer-right",
|