@zat-design/sisyphus-react 3.13.14-deta.2 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +34 -1
- package/dist/index.esm.css +557 -341
- package/dist/less.esm.css +527 -309
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/FormsProvider/index.js +4 -2
- package/es/ProAction/components/CheckModalContent/index.js +9 -16
- package/es/ProAction/index.js +39 -40
- package/es/ProAction/index.less +2 -2
- package/es/ProConfigProvider/index.d.ts +21 -4
- package/es/ProConfigProvider/index.js +62 -28
- package/es/ProDownload/index.js +57 -65
- package/es/ProDownload/style/index.less +2 -2
- package/es/ProDownload/utils.js +17 -14
- package/es/ProDrawerForm/components/ProDrawer/index.js +40 -38
- package/es/ProDrawerForm/components/ProModal/index.js +25 -31
- package/es/ProDrawerForm/components/index.js +2 -2
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +16 -16
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +8 -14
- package/es/ProEditLabel/components/RenderProForm.js +26 -23
- package/es/ProEditLabel/index.js +32 -29
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +32 -27
- package/es/ProEditTable/components/RcTable/BaseTable.js +77 -58
- package/es/ProEditTable/components/RcTable/DraggableTable.js +78 -58
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +2 -4
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +32 -25
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +456 -301
- package/es/ProEditTable/components/RenderToolbar/index.js +17 -15
- package/es/ProEditTable/components/Summary/index.js +14 -15
- package/es/ProEditTable/components/Validator/index.js +8 -10
- package/es/ProEditTable/components/index.js +5 -5
- package/es/ProEditTable/index.d.ts +1 -1
- package/es/ProEditTable/index.js +163 -150
- package/es/ProEditTable/propsType.d.ts +1 -7
- package/es/ProEditTable/style/index.less +3 -7
- package/es/ProEditTable/utils/config.js +24 -21
- package/es/ProEditTable/utils/diffOriginal.js +8 -6
- package/es/ProEditTable/utils/getDefaultProps.js +8 -8
- package/es/ProEditTable/utils/index.js +76 -60
- package/es/ProEditTable/utils/tools.js +61 -55
- package/es/ProEditTable/utils/useEditTableError.js +25 -6
- package/es/ProEnum/components/Group.js +6 -6
- package/es/ProEnum/components/Tag.js +8 -6
- package/es/ProEnum/hooks/useEnum.js +26 -4
- package/es/ProEnum/hooks/useEnumRequest.js +23 -21
- package/es/ProEnum/index.js +52 -60
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProEnum/utils/eventCenter.js +6 -4
- package/es/ProEnum/utils/getEnumLabel.js +9 -10
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +12 -6
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +8 -7
- package/es/ProForm/components/FormFooter/index.js +20 -18
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +12 -10
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +25 -23
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/es/ProForm/components/base/Input/index.js +21 -26
- package/es/ProForm/components/base/InputNumber/index.js +43 -42
- package/es/ProForm/components/base/Radio/index.js +10 -9
- package/es/ProForm/components/base/RangePicker/index.js +24 -25
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +12 -11
- package/es/ProForm/components/base/Switch/index.js +13 -13
- package/es/ProForm/components/base/SwitchCheckbox/index.js +16 -16
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/es/ProForm/components/base/TextArea/index.js +15 -15
- package/es/ProForm/components/base/TextArea/index.less +12 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +11 -11
- package/es/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/es/ProForm/components/combination/Container/index.js +14 -12
- package/es/ProForm/components/combination/Container/style/index.less +2 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +40 -35
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +15 -17
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +6 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +16 -14
- package/es/ProForm/components/combination/FormList/components/LineFields.js +13 -13
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +20 -22
- package/es/ProForm/components/combination/FormList/index.js +23 -23
- package/es/ProForm/components/combination/FormList/style/index.less +38 -2
- package/es/ProForm/components/combination/FormList/utils.js +5 -3
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
- package/es/ProForm/components/combination/Group/component/ComRender.js +19 -15
- package/es/ProForm/components/combination/Group/hooks/index.js +19 -16
- package/es/ProForm/components/combination/Group/index.d.ts +2 -8
- package/es/ProForm/components/combination/Group/index.js +27 -20
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +24 -17
- package/es/ProForm/components/combination/ProCascader/index.js +51 -48
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/es/ProForm/components/combination/ProCascader/utils/index.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +15 -9
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +99 -100
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +31 -27
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +69 -49
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +54 -45
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/es/ProForm/components/index.d.ts +2 -8
- package/es/ProForm/components/index.js +31 -36
- package/es/ProForm/components/render/ChangedWrapper.js +23 -18
- package/es/ProForm/components/render/ConfirmWrapper.js +15 -16
- package/es/ProForm/components/render/Render.js +95 -76
- package/es/ProForm/components/render/RenderFields.js +42 -27
- package/es/ProForm/components/render/propsType.d.ts +2 -6
- package/es/ProForm/components/render/propsType.js +25 -0
- package/es/ProForm/index.js +54 -67
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/propsType.js +5 -1
- package/es/ProForm/style/index.less +6 -16
- package/es/ProForm/utils/diffOriginal.js +9 -7
- package/es/ProForm/utils/getDefaultProps.js +7 -7
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +126 -52
- package/es/ProForm/utils/processDependencies.js +11 -0
- package/es/ProForm/utils/rulesCreator.js +12 -13
- package/es/ProForm/utils/transformNames.js +5 -4
- package/es/ProForm/utils/transformValue.js +11 -6
- package/es/ProForm/utils/useDeepCompareMemo.js +8 -6
- package/es/ProForm/utils/useForm.js +47 -37
- package/es/ProForm/utils/useRules.js +11 -9
- package/es/ProForm/utils/useShouldUpdate.js +39 -37
- package/es/ProForm/utils/useWatch.js +25 -3
- package/es/ProForm/utils/valueType.js +6 -3
- package/es/ProIcon/config/index.js +2 -0
- package/es/ProIcon/index.js +38 -31
- package/es/ProIcon/style/index.less +2 -2
- package/es/ProIcon/utils/index.js +4 -5
- package/es/ProLayout/components/Layout/Header/index.js +13 -11
- package/es/ProLayout/components/Layout/Icon/Icon.js +3 -3
- package/es/ProLayout/components/Layout/Icon/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +33 -27
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +32 -28
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +7 -6
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/es/ProLayout/components/Layout/Menu/index.js +12 -10
- package/es/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Notice/index.js +9 -8
- package/es/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/es/ProLayout/components/Layout/index.js +4 -4
- package/es/ProLayout/components/ProCollapse/index.js +35 -47
- package/es/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/es/ProLayout/components/ProFooter/index.js +5 -6
- package/es/ProLayout/components/ProFooter/style/index.less +2 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +8 -9
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -6
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/es/ProLayout/components/ProHeader/components/index.js +2 -2
- package/es/ProLayout/components/ProHeader/index.js +117 -108
- package/es/ProLayout/components/ProHeader/style/index.less +2 -2
- package/es/ProLayout/components/index.js +3 -3
- package/es/ProLayout/index.d.ts +1 -1
- package/es/ProLayout/index.js +24 -19
- package/es/ProLayout/style/index.less +4 -3
- package/es/ProLayout/utils/index.js +21 -18
- package/es/ProSelect/components/AdaptiveTooltip.js +6 -6
- package/es/ProSelect/index.js +48 -57
- package/es/ProSelect/index.less +2 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProSelect/utils/index.js +5 -4
- package/es/ProStep/components/Anchor/index.d.ts +1 -0
- package/es/ProStep/components/Anchor/index.js +20 -20
- package/es/ProStep/components/Item/index.d.ts +1 -0
- package/es/ProStep/components/Item/index.js +16 -11
- package/es/ProStep/components/Listener/index.js +5 -5
- package/es/ProStep/components/Step/index.js +16 -14
- package/es/ProStep/index.js +31 -27
- package/es/ProStep/style/index.less +4 -4
- package/es/ProStep/utils/index.js +6 -5
- package/es/ProStepTab/index.js +32 -9
- package/es/ProTable/components/FormatColumn/index.js +85 -81
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +4 -6
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +31 -25
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +10 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +6 -8
- package/es/ProTable/components/RcTable/index.js +2 -2
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +38 -37
- package/es/ProTable/components/RenderEmptyText/index.js +7 -6
- package/es/ProTable/components/RenderFooter/index.js +2 -2
- package/es/ProTable/components/RenderSummary/index.js +12 -12
- package/es/ProTable/components/RenderTableHeader/index.js +16 -15
- package/es/ProTable/components/RenderTabs/index.js +9 -11
- package/es/ProTable/components/TableResizable/index.js +10 -8
- package/es/ProTable/components/TooltipTitle/index.js +7 -7
- package/es/ProTable/components/index.js +11 -6
- package/es/ProTable/hooks/useAntdTable.d.ts +0 -3
- package/es/ProTable/hooks/useAntdTable.js +97 -122
- package/es/ProTable/index.d.ts +0 -3
- package/es/ProTable/index.js +57 -55
- package/es/ProTable/propsType.d.ts +2 -4
- package/es/ProTable/style/index.less +5 -5
- package/es/ProTable/utils/index.js +12 -5
- package/es/ProTabs/components/Card/index.js +13 -17
- package/es/ProTabs/components/index.js +1 -1
- package/es/ProTabs/index.js +10 -10
- package/es/ProTabs/style/index.less +2 -2
- package/es/ProThemeTools/component/ProTools/index.js +50 -53
- package/es/ProThemeTools/component/index.js +1 -1
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -1
- package/es/ProThemeTools/index.js +97 -48
- package/es/ProThemeTools/style/index.less +3 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +37 -24
- package/es/ProTooltip/index.js +35 -28
- package/es/ProTooltip/style/index.less +2 -2
- package/es/ProTree/components/AdaptiveTooltip.js +4 -5
- package/es/ProTree/components/CloseIcon.js +5 -5
- package/es/ProTree/components/List.js +16 -15
- package/es/ProTree/components/ProTree.js +51 -52
- package/es/ProTree/components/ProTreeSelect/index.js +97 -81
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/SearchTitle.js +10 -9
- package/es/ProTree/components/Tree.js +46 -52
- package/es/ProTree/components/index.js +4 -4
- package/es/ProTree/index.js +4 -11
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +10 -6
- package/es/ProTree/utils.js +21 -14
- package/es/ProTreeModal/components/Cascader.js +24 -23
- package/es/ProTreeModal/components/CloseIcon.js +5 -5
- package/es/ProTreeModal/components/List.js +43 -42
- package/es/ProTreeModal/components/SearchTitle.js +5 -4
- package/es/ProTreeModal/components/SortableItem.js +11 -10
- package/es/ProTreeModal/components/Tree.js +38 -37
- package/es/ProTreeModal/components/Trigger.js +24 -28
- package/es/ProTreeModal/components/index.js +6 -6
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +90 -80
- package/es/ProTreeModal/style/index.less +14 -3
- package/es/ProTreeModal/utils.js +22 -18
- package/es/ProUpload/components/ButtonRender.js +28 -30
- package/es/ProUpload/components/DragRender.js +43 -37
- package/es/ProUpload/components/DraggableUploadListItem.js +3 -2
- package/es/ProUpload/components/Example.js +10 -9
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +53 -54
- package/es/ProUpload/components/ImageRender.js +85 -94
- package/es/ProUpload/index.js +25 -21
- package/es/ProUpload/style/index.less +173 -12
- package/es/ProUpload/uitls.js +1 -1
- package/es/ProViewer/index.js +40 -41
- package/es/ProViewer/propsType.js +3 -1
- package/es/ProViewer/style/index.less +2 -2
- package/es/ProWaterMark/index.js +5 -5
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +5 -3
- package/es/index.js +38 -30
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +18 -4
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/theme/antd.less +38 -48
- package/es/style/theme/base.less +89 -0
- package/es/style/theme/index.less +2 -89
- package/es/tokens.js +1 -0
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +28 -2
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/FormsProvider/index.js +53 -29
- package/lib/ProAction/components/CheckModalContent/index.js +27 -42
- package/lib/ProAction/index.js +155 -201
- package/lib/ProAction/index.less +2 -2
- package/lib/ProAction/propsType.js +16 -4
- package/lib/ProConfigProvider/index.d.ts +21 -4
- package/lib/ProConfigProvider/index.js +144 -97
- package/lib/ProDownload/index.js +123 -197
- package/lib/ProDownload/propsType.js +16 -4
- package/lib/ProDownload/style/index.less +2 -2
- package/lib/ProDownload/utils.js +145 -188
- package/lib/ProDrawerForm/components/ProDrawer/index.js +170 -242
- package/lib/ProDrawerForm/components/ProModal/index.js +134 -196
- package/lib/ProDrawerForm/components/index.js +39 -17
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +86 -72
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/propsType.js +16 -4
- package/lib/ProDrawerForm/style/index.less +8 -14
- package/lib/ProDrawerForm/utils/index.js +31 -13
- package/lib/ProEditLabel/components/RenderProForm.js +60 -59
- package/lib/ProEditLabel/index.js +183 -243
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/propsType.js +16 -4
- package/lib/ProEditLabel/style/index.less +4 -3
- package/lib/ProEditLabel/utils/index.js +31 -15
- package/lib/ProEditTable/components/ActionButton/index.js +172 -156
- package/lib/ProEditTable/components/RcTable/BaseTable.js +115 -98
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +174 -183
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +39 -24
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +184 -181
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +604 -562
- package/lib/ProEditTable/components/RenderToolbar/index.js +105 -125
- package/lib/ProEditTable/components/Summary/index.js +61 -70
- package/lib/ProEditTable/components/Validator/index.js +48 -31
- package/lib/ProEditTable/components/index.js +48 -38
- package/lib/ProEditTable/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +376 -437
- package/lib/ProEditTable/propsType.d.ts +1 -7
- package/lib/ProEditTable/propsType.js +16 -4
- package/lib/ProEditTable/style/index.less +3 -7
- package/lib/ProEditTable/utils/config.js +180 -239
- package/lib/ProEditTable/utils/diffOriginal.js +59 -50
- package/lib/ProEditTable/utils/getDefaultProps.js +44 -29
- package/lib/ProEditTable/utils/index.js +259 -326
- package/lib/ProEditTable/utils/tools.js +252 -442
- package/lib/ProEditTable/utils/transform.js +28 -19
- package/lib/ProEditTable/utils/useEditTableError.js +62 -56
- package/lib/ProEnum/components/Group.js +78 -54
- package/lib/ProEnum/components/Tag.js +55 -40
- package/lib/ProEnum/hooks/useEnum.js +53 -53
- package/lib/ProEnum/hooks/useEnumRequest.js +198 -271
- package/lib/ProEnum/index.js +235 -251
- package/lib/ProEnum/propsType.js +16 -4
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProEnum/utils/eventCenter.js +25 -37
- package/lib/ProEnum/utils/getEnumLabel.js +65 -63
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +68 -91
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +45 -33
- package/lib/ProForm/components/FormFooter/index.js +80 -63
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/FormFooter/propsType.js +16 -4
- package/lib/ProForm/components/base/Checkbox/index.js +62 -66
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +82 -71
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +31 -18
- package/lib/ProForm/components/base/Input/index.js +74 -69
- package/lib/ProForm/components/base/Input/propsType.js +16 -4
- package/lib/ProForm/components/base/InputNumber/index.js +177 -228
- package/lib/ProForm/components/base/Radio/index.js +69 -60
- package/lib/ProForm/components/base/RangePicker/index.js +90 -77
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +46 -28
- package/lib/ProForm/components/base/Select/index.js +69 -61
- package/lib/ProForm/components/base/Switch/index.js +59 -43
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +63 -63
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/lib/ProForm/components/base/TextArea/index.js +67 -53
- package/lib/ProForm/components/base/TextArea/index.less +12 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +59 -44
- package/lib/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/lib/ProForm/components/combination/Container/index.js +77 -62
- package/lib/ProForm/components/combination/Container/propsType.js +16 -4
- package/lib/ProForm/components/combination/Container/style/index.less +2 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +195 -245
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +108 -84
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +44 -25
- package/lib/ProForm/components/combination/FormList/components/Empty.js +55 -93
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +120 -95
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +103 -140
- package/lib/ProForm/components/combination/FormList/index.js +168 -143
- package/lib/ProForm/components/combination/FormList/propsType.js +16 -4
- package/lib/ProForm/components/combination/FormList/style/index.less +38 -2
- package/lib/ProForm/components/combination/FormList/utils.js +54 -33
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +38 -21
- package/lib/ProForm/components/combination/Group/component/ComRender.js +74 -76
- package/lib/ProForm/components/combination/Group/hooks/index.js +136 -130
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -8
- package/lib/ProForm/components/combination/Group/index.js +117 -102
- package/lib/ProForm/components/combination/Group/propsType.js +16 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +113 -129
- package/lib/ProForm/components/combination/ProCascader/index.js +195 -250
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +35 -24
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +121 -116
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +498 -686
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +45 -22
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +166 -184
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +16 -4
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +151 -159
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.js +17 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +58 -25
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +131 -143
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/lib/ProForm/components/index.d.ts +2 -8
- package/lib/ProForm/components/index.js +115 -254
- package/lib/ProForm/components/render/ChangedWrapper.js +146 -133
- package/lib/ProForm/components/render/ConfirmWrapper.js +78 -123
- package/lib/ProForm/components/render/Render.js +348 -421
- package/lib/ProForm/components/render/RenderFields.js +186 -188
- package/lib/ProForm/components/render/propsType.d.ts +2 -6
- package/lib/ProForm/components/render/propsType.js +16 -5
- package/lib/ProForm/index.js +239 -300
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.js +38 -5
- package/lib/ProForm/style/index.less +6 -16
- package/lib/ProForm/utils/diffOriginal.js +56 -44
- package/lib/ProForm/utils/getDefaultProps.js +44 -28
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +287 -290
- package/lib/ProForm/utils/processDependencies.js +44 -52
- package/lib/ProForm/utils/rulesCreator.js +84 -61
- package/lib/ProForm/utils/transformNames.js +38 -27
- package/lib/ProForm/utils/transformValue.js +51 -48
- package/lib/ProForm/utils/useDeepCompareMemo.js +36 -16
- package/lib/ProForm/utils/useFieldProps.js +42 -11
- package/lib/ProForm/utils/useForm.js +122 -222
- package/lib/ProForm/utils/useRules.js +67 -60
- package/lib/ProForm/utils/useShouldUpdate.js +105 -177
- package/lib/ProForm/utils/useWatch.js +93 -100
- package/lib/ProForm/utils/valueType.js +157 -224
- package/lib/ProIcon/config/index.js +365 -276
- package/lib/ProIcon/index.js +193 -221
- package/lib/ProIcon/propsTypes.js +16 -4
- package/lib/ProIcon/style/index.less +2 -2
- package/lib/ProIcon/symbolIcon.js +23 -30
- package/lib/ProIcon/utils/index.js +66 -57
- package/lib/ProLayout/components/Layout/Header/index.js +59 -42
- package/lib/ProLayout/components/Layout/Icon/Icon.js +49 -30
- package/lib/ProLayout/components/Layout/Icon/index.js +34 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +112 -118
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +118 -124
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +16 -4
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +59 -42
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +76 -56
- package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Notice/index.js +39 -31
- package/lib/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/index.js +45 -31
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProCollapse/index.js +132 -151
- package/lib/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/lib/ProLayout/components/ProFooter/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProFooter/index.js +58 -45
- package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.js +16 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +53 -26
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +48 -28
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +16 -4
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/lib/ProLayout/components/ProHeader/components/index.js +39 -17
- package/lib/ProLayout/components/ProHeader/index.js +281 -462
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/utils/index.js +32 -14
- package/lib/ProLayout/components/index.js +42 -24
- package/lib/ProLayout/index.d.ts +1 -1
- package/lib/ProLayout/index.js +127 -123
- package/lib/ProLayout/propTypes.js +16 -4
- package/lib/ProLayout/style/index.less +4 -3
- package/lib/ProLayout/utils/index.js +92 -103
- package/lib/ProSelect/components/AdaptiveTooltip.js +46 -41
- package/lib/ProSelect/index.js +218 -260
- package/lib/ProSelect/index.less +2 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProSelect/propsType.js +16 -4
- package/lib/ProSelect/utils/index.js +80 -78
- package/lib/ProStep/components/Anchor/index.d.ts +1 -0
- package/lib/ProStep/components/Anchor/index.js +108 -102
- package/lib/ProStep/components/Item/index.d.ts +1 -0
- package/lib/ProStep/components/Item/index.js +83 -74
- package/lib/ProStep/components/Listener/index.js +62 -73
- package/lib/ProStep/components/Step/index.js +76 -66
- package/lib/ProStep/index.js +167 -233
- package/lib/ProStep/propsType.js +16 -4
- package/lib/ProStep/style/index.less +4 -4
- package/lib/ProStep/utils/index.js +59 -52
- package/lib/ProStepTab/index.js +179 -298
- package/lib/ProStepTab/propsType.js +16 -4
- package/lib/ProTable/components/FormatColumn/index.js +446 -494
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +53 -42
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +139 -198
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +116 -95
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +16 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +80 -61
- package/lib/ProTable/components/RcTable/index.js +39 -17
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +194 -203
- package/lib/ProTable/components/RenderEmptyText/index.js +27 -25
- package/lib/ProTable/components/RenderFooter/index.js +33 -17
- package/lib/ProTable/components/RenderSummary/index.js +46 -57
- package/lib/ProTable/components/RenderTableHeader/index.js +68 -61
- package/lib/ProTable/components/RenderTabs/index.js +89 -81
- package/lib/ProTable/components/TableResizable/index.js +88 -86
- package/lib/ProTable/components/TooltipTitle/index.js +40 -27
- package/lib/ProTable/components/index.js +51 -45
- package/lib/ProTable/hooks/useAntdTable.d.ts +0 -3
- package/lib/ProTable/hooks/useAntdTable.js +315 -409
- package/lib/ProTable/index.d.ts +0 -3
- package/lib/ProTable/index.js +351 -390
- package/lib/ProTable/propsType.d.ts +2 -4
- package/lib/ProTable/propsType.js +16 -4
- package/lib/ProTable/style/index.less +5 -5
- package/lib/ProTable/utils/index.js +84 -84
- package/lib/ProTabs/components/Card/index.js +30 -56
- package/lib/ProTabs/components/index.js +36 -10
- package/lib/ProTabs/index.js +92 -86
- package/lib/ProTabs/propType.js +16 -4
- package/lib/ProTabs/style/index.less +2 -2
- package/lib/ProThemeTools/component/ProTools/index.js +202 -246
- package/lib/ProThemeTools/component/index.js +36 -10
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +135 -0
- package/lib/ProThemeTools/index.d.ts +4 -1
- package/lib/ProThemeTools/index.js +200 -173
- package/lib/ProThemeTools/propsType.js +16 -4
- package/lib/ProThemeTools/style/index.less +3 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +94 -84
- package/lib/ProTooltip/index.js +220 -219
- package/lib/ProTooltip/propsType.js +16 -4
- package/lib/ProTooltip/style/index.less +2 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +33 -24
- package/lib/ProTree/components/CloseIcon.js +36 -31
- package/lib/ProTree/components/List.js +68 -73
- package/lib/ProTree/components/ProTree.js +262 -369
- package/lib/ProTree/components/ProTreeSelect/index.js +369 -475
- package/lib/ProTree/components/ProTreeSelect/propsType.js +16 -4
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/SearchTitle.js +47 -50
- package/lib/ProTree/components/Tree.js +232 -311
- package/lib/ProTree/components/index.js +45 -31
- package/lib/ProTree/index.js +45 -30
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/propsType.js +16 -4
- package/lib/ProTree/style/index.less +10 -6
- package/lib/ProTree/utils.js +83 -135
- package/lib/ProTreeModal/components/Cascader.js +97 -94
- package/lib/ProTreeModal/components/CloseIcon.js +36 -31
- package/lib/ProTreeModal/components/List.js +194 -269
- package/lib/ProTreeModal/components/SearchTitle.js +30 -22
- package/lib/ProTreeModal/components/SortableItem.js +60 -60
- package/lib/ProTreeModal/components/Tree.js +162 -181
- package/lib/ProTreeModal/components/Trigger.js +108 -131
- package/lib/ProTreeModal/components/index.js +51 -45
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +464 -584
- package/lib/ProTreeModal/propsType.js +16 -4
- package/lib/ProTreeModal/style/index.less +14 -3
- package/lib/ProTreeModal/utils.js +105 -158
- package/lib/ProUpload/components/ButtonRender.js +86 -111
- package/lib/ProUpload/components/DragRender.js +120 -168
- package/lib/ProUpload/components/DraggableUploadListItem.js +50 -32
- package/lib/ProUpload/components/Example.js +56 -38
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +115 -210
- package/lib/ProUpload/components/ImageRender.js +176 -255
- package/lib/ProUpload/index.js +204 -216
- package/lib/ProUpload/propsType.js +16 -4
- package/lib/ProUpload/style/index.less +173 -12
- package/lib/ProUpload/uitls.js +34 -10
- package/lib/ProUtils/utils/index.js +38 -26
- package/lib/ProViewer/index.js +175 -209
- package/lib/ProViewer/propsType.js +16 -4
- package/lib/ProViewer/style/index.less +2 -2
- package/lib/ProWaterMark/index.js +38 -19
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/ProWaterMark/propsType.js +16 -4
- package/lib/global.less +2 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.js +123 -252
- package/lib/locale/en_US.js +146 -128
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +59 -29
- package/lib/locale/zh_CN.js +146 -128
- package/lib/style/components.less +0 -3
- package/lib/style/theme/antd.less +38 -48
- package/lib/style/theme/base.less +89 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/tokens.js +103 -86
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +100 -48
- package/package.json +37 -23
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -8
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -204
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -108
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -272
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -100
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -46
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -298
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -188
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -97
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProForm/utils/_useChanged.d.ts +0 -8
- package/es/ProForm/utils/_useChanged.js +0 -25
- package/es/ProForm/utils/_useListChanged.d.ts +0 -16
- package/es/ProForm/utils/_useListChanged.js +0 -93
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -188
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -323
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -213
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/propsType.js +0 -5
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -115
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -279
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -306
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -73
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -193
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProForm/utils/_useChanged.d.ts +0 -8
- package/lib/ProForm/utils/_useChanged.js +0 -32
- package/lib/ProForm/utils/_useListChanged.d.ts +0 -16
- package/lib/ProForm/utils/_useListChanged.js +0 -100
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -193
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -601
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -330
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
package/es/ProTreeModal/utils.js
CHANGED
@@ -30,6 +30,7 @@ export function getFlatTreeData(originalTreeData, fieldNames) {
|
|
30
30
|
loop(originalTreeData, '');
|
31
31
|
return dataList;
|
32
32
|
}
|
33
|
+
|
33
34
|
/**
|
34
35
|
* 获取 tree 所有的 keys 集合
|
35
36
|
* @param data
|
@@ -50,6 +51,7 @@ export function getAllKeys(data, fieldNames) {
|
|
50
51
|
loop(data);
|
51
52
|
return keys;
|
52
53
|
}
|
54
|
+
|
53
55
|
/**
|
54
56
|
* 获取展开的key
|
55
57
|
* @param key
|
@@ -57,7 +59,7 @@ export function getAllKeys(data, fieldNames) {
|
|
57
59
|
* @param fieldNames
|
58
60
|
* @returns
|
59
61
|
*/
|
60
|
-
var
|
62
|
+
export var getParentKey = function getParentKey(key, tree, fieldNames) {
|
61
63
|
var parentKey;
|
62
64
|
for (var i = 0; i < tree.length; i++) {
|
63
65
|
var node = tree[i];
|
@@ -66,17 +68,16 @@ var _getParentKey = function getParentKey(key, tree, fieldNames) {
|
|
66
68
|
return item[fieldNames.value] === key;
|
67
69
|
})) {
|
68
70
|
parentKey = node[fieldNames.value];
|
69
|
-
} else if (
|
70
|
-
parentKey =
|
71
|
+
} else if (getParentKey(key, node[fieldNames.children], fieldNames)) {
|
72
|
+
parentKey = getParentKey(key, node[fieldNames.children], fieldNames);
|
71
73
|
}
|
72
74
|
}
|
73
75
|
}
|
74
76
|
return parentKey;
|
75
77
|
};
|
76
|
-
export { _getParentKey as getParentKey };
|
77
78
|
export function findTreeNodeByKey(treeData, key, fieldNames) {
|
78
79
|
var result = [];
|
79
|
-
var
|
80
|
+
var traverse = function traverse(node, parents) {
|
80
81
|
if (node[fieldNames.value] === key) {
|
81
82
|
result.push.apply(result, [node].concat(_toConsumableArray(parents)));
|
82
83
|
return true;
|
@@ -87,7 +88,7 @@ export function findTreeNodeByKey(treeData, key, fieldNames) {
|
|
87
88
|
try {
|
88
89
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
89
90
|
var child = _step.value;
|
90
|
-
if (
|
91
|
+
if (traverse(child, [node].concat(_toConsumableArray(parents)))) {
|
91
92
|
return true;
|
92
93
|
}
|
93
94
|
}
|
@@ -103,7 +104,7 @@ export function findTreeNodeByKey(treeData, key, fieldNames) {
|
|
103
104
|
try {
|
104
105
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
105
106
|
var node = _step2.value;
|
106
|
-
|
107
|
+
traverse(node, []);
|
107
108
|
}
|
108
109
|
} catch (err) {
|
109
110
|
_iterator2.e(err);
|
@@ -112,6 +113,7 @@ export function findTreeNodeByKey(treeData, key, fieldNames) {
|
|
112
113
|
}
|
113
114
|
return result;
|
114
115
|
}
|
116
|
+
|
115
117
|
/**
|
116
118
|
* 根据所选的 checkedKeys 筛选出展示的 treeData
|
117
119
|
* @param data
|
@@ -122,35 +124,36 @@ export function filterCheckedNodes(data, checkedKeys) {
|
|
122
124
|
var searchStr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
123
125
|
var fieldNames = arguments.length > 3 ? arguments[3] : undefined;
|
124
126
|
var result = [];
|
125
|
-
var
|
127
|
+
var traverse = function traverse(node) {
|
126
128
|
var _node$fieldNames$chil3;
|
127
129
|
var title = node[fieldNames.value] + node[fieldNames.label];
|
128
130
|
if (!searchStr) {
|
129
131
|
if (checkedKeys.includes(node[fieldNames.value])) {
|
130
132
|
var _node$fieldNames$chil;
|
131
|
-
var _children = (node === null || node === void 0
|
133
|
+
var _children = (node === null || node === void 0 || (_node$fieldNames$chil = node[fieldNames.children]) === null || _node$fieldNames$chil === void 0 ? void 0 : _node$fieldNames$chil.map(traverse).filter(Boolean)) || [];
|
132
134
|
return _objectSpread(_objectSpread({}, node), {}, _defineProperty({}, fieldNames.children, _children));
|
133
135
|
}
|
134
136
|
} else if (title.indexOf(searchStr) > -1) {
|
135
137
|
var _node$fieldNames$chil2;
|
136
|
-
var _children2 = ((_node$fieldNames$chil2 = node[fieldNames.children]) === null || _node$fieldNames$chil2 === void 0 ? void 0 : _node$fieldNames$chil2.map(
|
138
|
+
var _children2 = ((_node$fieldNames$chil2 = node[fieldNames.children]) === null || _node$fieldNames$chil2 === void 0 ? void 0 : _node$fieldNames$chil2.map(traverse).filter(Boolean)) || [];
|
137
139
|
return _objectSpread(_objectSpread({}, node), {}, {
|
138
140
|
children: _children2
|
139
141
|
});
|
140
142
|
}
|
141
|
-
var children = (_node$fieldNames$chil3 = node[fieldNames.children]) === null || _node$fieldNames$chil3 === void 0 ? void 0 : _node$fieldNames$chil3.map(
|
143
|
+
var children = (_node$fieldNames$chil3 = node[fieldNames.children]) === null || _node$fieldNames$chil3 === void 0 ? void 0 : _node$fieldNames$chil3.map(traverse).filter(Boolean);
|
142
144
|
if (children && children.length > 0) {
|
143
145
|
return _objectSpread(_objectSpread({}, node), {}, _defineProperty({}, fieldNames.children, children));
|
144
146
|
}
|
145
147
|
return null;
|
146
148
|
};
|
149
|
+
|
147
150
|
// eslint-disable-next-line no-restricted-syntax
|
148
151
|
var _iterator3 = _createForOfIteratorHelper(data),
|
149
152
|
_step3;
|
150
153
|
try {
|
151
154
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
152
155
|
var node = _step3.value;
|
153
|
-
var filtered =
|
156
|
+
var filtered = traverse(node);
|
154
157
|
if (filtered) {
|
155
158
|
result.push(filtered);
|
156
159
|
}
|
@@ -162,6 +165,7 @@ export function filterCheckedNodes(data, checkedKeys) {
|
|
162
165
|
}
|
163
166
|
return result;
|
164
167
|
}
|
168
|
+
|
165
169
|
/**
|
166
170
|
* 获取 tree 当前选中节点下的所有子节点的 keys
|
167
171
|
* @param node
|
@@ -172,7 +176,7 @@ export function getChildrenKeys(node, childrenKeys, fieldNames, type) {
|
|
172
176
|
// 当为 tree 触发 onChck 此时就是 key 为 children
|
173
177
|
if (type === 'treeCheck') {
|
174
178
|
var _node$children;
|
175
|
-
node === null || node === void 0
|
179
|
+
node === null || node === void 0 || (_node$children = node.children) === null || _node$children === void 0 || _node$children.forEach(function (item) {
|
176
180
|
childrenKeys.push(item.key);
|
177
181
|
if (item.children && item.children.length > 0) {
|
178
182
|
getChildrenKeys(item, childrenKeys, fieldNames, type);
|
@@ -181,7 +185,7 @@ export function getChildrenKeys(node, childrenKeys, fieldNames, type) {
|
|
181
185
|
} else {
|
182
186
|
var _node$fieldNames$chil4;
|
183
187
|
// 这个时候的值为我们的值
|
184
|
-
node === null || node === void 0
|
188
|
+
node === null || node === void 0 || (_node$fieldNames$chil4 = node[fieldNames.children]) === null || _node$fieldNames$chil4 === void 0 || _node$fieldNames$chil4.forEach(function (item) {
|
185
189
|
childrenKeys.push(item[fieldNames.value]);
|
186
190
|
if (item[fieldNames.children] && item[fieldNames.children].length > 0) {
|
187
191
|
getChildrenKeys(item, childrenKeys, fieldNames, type);
|
@@ -189,6 +193,7 @@ export function getChildrenKeys(node, childrenKeys, fieldNames, type) {
|
|
189
193
|
});
|
190
194
|
}
|
191
195
|
}
|
196
|
+
|
192
197
|
// 提示信息替换
|
193
198
|
export var transformMessage = function transformMessage(obj, message) {
|
194
199
|
var keys = Object.keys(obj);
|
@@ -198,7 +203,7 @@ export var transformMessage = function transformMessage(obj, message) {
|
|
198
203
|
});
|
199
204
|
return _message;
|
200
205
|
};
|
201
|
-
var
|
206
|
+
export var addLevelAndParentId = function addLevelAndParentId() {
|
202
207
|
var tree = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
203
208
|
var fieldNames = arguments.length > 1 ? arguments[1] : undefined;
|
204
209
|
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
@@ -212,9 +217,8 @@ var _addLevelAndParentId = function addLevelAndParentId() {
|
|
212
217
|
newNode.level = currentLevel;
|
213
218
|
newNode.parentId = currentParentId;
|
214
219
|
if (node[children]) {
|
215
|
-
newNode[children] =
|
220
|
+
newNode[children] = addLevelAndParentId(node[children], fieldNames, currentLevel + 1, newNode[value]);
|
216
221
|
}
|
217
222
|
return newNode;
|
218
223
|
});
|
219
|
-
};
|
220
|
-
export { _addLevelAndParentId as addLevelAndParentId };
|
224
|
+
};
|
@@ -1,17 +1,15 @@
|
|
1
|
-
import "antd/es/button/style";
|
2
|
-
import _Button from "antd/es/button";
|
3
|
-
import "antd/es/upload/style";
|
4
|
-
import _Upload from "antd/es/upload";
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
6
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
7
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
8
|
-
import {
|
4
|
+
import { Button, Upload } from 'antd';
|
9
5
|
import { DndContext } from '@dnd-kit/core';
|
10
6
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
11
7
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
12
|
-
import { FileItem } from
|
13
|
-
import { DraggableUploadListItem } from
|
14
|
-
import locale from
|
8
|
+
import { FileItem } from "./FileItem";
|
9
|
+
import { DraggableUploadListItem } from "./DraggableUploadListItem";
|
10
|
+
import locale from "../../locale";
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
13
|
/* 按钮类型 */
|
16
14
|
var ButtonRender = function ButtonRender(props) {
|
17
15
|
var _locale$ProUpload;
|
@@ -27,28 +25,29 @@ var ButtonRender = function ButtonRender(props) {
|
|
27
25
|
extraTipText = props.extraTipText,
|
28
26
|
afterRender = props.afterRender,
|
29
27
|
_props$buttonText = props.buttonText,
|
30
|
-
buttonText = _props$buttonText === void 0 ? locale === null || locale === void 0
|
28
|
+
buttonText = _props$buttonText === void 0 ? locale === null || locale === void 0 || (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.buttonText : _props$buttonText,
|
31
29
|
isConfirmDelete = props.isConfirmDelete,
|
32
|
-
|
30
|
+
onRemove = props.onRemove;
|
31
|
+
|
33
32
|
// 按钮类型的props
|
34
33
|
var buttonUploadProps = _objectSpread(_objectSpread({}, baseUploadProps), {}, {
|
35
34
|
fileList: fileList,
|
36
35
|
itemRender: function itemRender(originNode, file, fileList, actions) {
|
37
|
-
return _jsx(DraggableUploadListItem, {
|
36
|
+
return /*#__PURE__*/_jsx(DraggableUploadListItem, {
|
38
37
|
file: file,
|
39
|
-
children: _jsx(FileItem, {
|
38
|
+
children: /*#__PURE__*/_jsx(FileItem, {
|
40
39
|
disabled: disabled || isView,
|
41
40
|
file: file,
|
42
41
|
isConfirmDelete: isConfirmDelete,
|
43
42
|
onPreview: onPreview,
|
44
|
-
onRemove: function () {
|
45
|
-
var
|
43
|
+
onRemove: ( /*#__PURE__*/function () {
|
44
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
46
45
|
var res;
|
47
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
48
47
|
while (1) switch (_context.prev = _context.next) {
|
49
48
|
case 0:
|
50
49
|
_context.next = 2;
|
51
|
-
return
|
50
|
+
return onRemove === null || onRemove === void 0 ? void 0 : onRemove(file);
|
52
51
|
case 2:
|
53
52
|
res = _context.sent;
|
54
53
|
if (!(res === false)) {
|
@@ -64,33 +63,32 @@ var ButtonRender = function ButtonRender(props) {
|
|
64
63
|
}
|
65
64
|
}, _callee);
|
66
65
|
}));
|
67
|
-
function
|
68
|
-
return
|
69
|
-
}
|
70
|
-
|
71
|
-
}(),
|
66
|
+
return function (_x) {
|
67
|
+
return _ref.apply(this, arguments);
|
68
|
+
};
|
69
|
+
}()),
|
72
70
|
onDownload: onDownload
|
73
71
|
})
|
74
72
|
});
|
75
73
|
}
|
76
74
|
});
|
77
|
-
return _jsxs("div", {
|
75
|
+
return /*#__PURE__*/_jsxs("div", {
|
78
76
|
className: "pro-upload-button",
|
79
|
-
children: [_jsx(DndContext, {
|
77
|
+
children: [/*#__PURE__*/_jsx(DndContext, {
|
80
78
|
sensors: [sensor],
|
81
79
|
onDragEnd: onDragEnd,
|
82
|
-
children: _jsx(SortableContext, {
|
80
|
+
children: /*#__PURE__*/_jsx(SortableContext, {
|
83
81
|
items: fileList.map(function (i) {
|
84
82
|
return i.uid;
|
85
83
|
}),
|
86
84
|
strategy: rectSortingStrategy,
|
87
|
-
children: _jsx(
|
88
|
-
children: !isView && _jsxs("div", {
|
85
|
+
children: /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({}, buttonUploadProps), {}, {
|
86
|
+
children: !isView && /*#__PURE__*/_jsxs("div", {
|
89
87
|
className: "pro-upload-button-inner",
|
90
|
-
children: [_jsxs(
|
88
|
+
children: [/*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
91
89
|
disabled: disabled || isView,
|
92
|
-
children: [_jsx(CloudUploadOutlined, {}), buttonText]
|
93
|
-
})), afterRender ? _jsx("div", {
|
90
|
+
children: [/*#__PURE__*/_jsx(CloudUploadOutlined, {}), buttonText]
|
91
|
+
})), afterRender ? /*#__PURE__*/_jsx("div", {
|
94
92
|
className: "pro-upload-button-inner-right",
|
95
93
|
onClick: function onClick(e) {
|
96
94
|
return e.stopPropagation();
|
@@ -100,9 +98,9 @@ var ButtonRender = function ButtonRender(props) {
|
|
100
98
|
})
|
101
99
|
}))
|
102
100
|
})
|
103
|
-
}), extraTipText && _jsx("div", {
|
101
|
+
}), extraTipText && /*#__PURE__*/_jsx("div", {
|
104
102
|
className: "upload-tip-txt",
|
105
|
-
children: extraTipText
|
103
|
+
children: typeof extraTipText === 'function' ? extraTipText() : extraTipText
|
106
104
|
})]
|
107
105
|
});
|
108
106
|
};
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/upload/style";
|
3
|
-
import _Upload from "antd/es/upload";
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
5
2
|
import { useRef } from 'react';
|
3
|
+
import { Upload } from 'antd';
|
6
4
|
import { DndContext } from '@dnd-kit/core';
|
7
5
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
8
6
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
9
|
-
import { DragSingleFileItem, FileItem, getFileExt, getFileIcon } from
|
10
|
-
import { DraggableUploadListItem } from
|
11
|
-
import locale from
|
12
|
-
|
7
|
+
import { DragSingleFileItem, FileItem, getFileExt, getFileIcon } from "./FileItem";
|
8
|
+
import { DraggableUploadListItem } from "./DraggableUploadListItem";
|
9
|
+
import locale from "../../locale";
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
+
var Dragger = Upload.Dragger;
|
13
13
|
var DragRender = function DragRender(props) {
|
14
14
|
var _locale$ProUpload3, _locale$ProUpload4, _locale$ProUpload5, _locale$ProUpload6;
|
15
15
|
var isView = props.isView,
|
@@ -27,9 +27,12 @@ var DragRender = function DragRender(props) {
|
|
27
27
|
setFileList = props.setFileList,
|
28
28
|
onChange = props.onChange;
|
29
29
|
var refReSelect = useRef();
|
30
|
+
|
30
31
|
// if (isView) return <>-</>;
|
32
|
+
|
31
33
|
// 拖拽模式下单个文件可用
|
32
34
|
var showDraggerSingleRender = maxCount === 1 && fileList[0];
|
35
|
+
|
33
36
|
/**
|
34
37
|
* @description: 文件删除
|
35
38
|
* @param {UploadFile} file
|
@@ -43,6 +46,7 @@ var DragRender = function DragRender(props) {
|
|
43
46
|
setFileList(_List);
|
44
47
|
onChange && onChange(_List);
|
45
48
|
};
|
49
|
+
|
46
50
|
/**
|
47
51
|
* @description: 重新选择 拖拽模式下单个文件可用
|
48
52
|
* @param {UploadFile} file
|
@@ -55,6 +59,7 @@ var DragRender = function DragRender(props) {
|
|
55
59
|
refReSelect.current.click();
|
56
60
|
}, 1);
|
57
61
|
};
|
62
|
+
|
58
63
|
/**
|
59
64
|
* @description: 处理预览按钮
|
60
65
|
* @param {UploadFile} file
|
@@ -67,6 +72,7 @@ var DragRender = function DragRender(props) {
|
|
67
72
|
window.open(file.url || file.thumbUrl);
|
68
73
|
}
|
69
74
|
};
|
75
|
+
|
70
76
|
/**
|
71
77
|
* @description: 单个拖拽上传界面
|
72
78
|
* @param {UploadFile} file
|
@@ -76,32 +82,32 @@ var DragRender = function DragRender(props) {
|
|
76
82
|
var _locale$ProUpload, _locale$ProUpload2;
|
77
83
|
var _fileExt = getFileExt(file.name);
|
78
84
|
var _fileIcon = getFileIcon(_fileExt);
|
79
|
-
return _jsxs("div", {
|
85
|
+
return /*#__PURE__*/_jsxs("div", {
|
80
86
|
className: "dragger-single-file",
|
81
|
-
children: [_jsx("div", {
|
87
|
+
children: [/*#__PURE__*/_jsx("div", {
|
82
88
|
className: "file-type-icon",
|
83
|
-
children: _jsx("img", {
|
89
|
+
children: /*#__PURE__*/_jsx("img", {
|
84
90
|
src: _fileIcon
|
85
91
|
})
|
86
|
-
}), _jsx(DragSingleFileItem, {
|
92
|
+
}), /*#__PURE__*/_jsx(DragSingleFileItem, {
|
87
93
|
file: file,
|
88
94
|
disabled: disabled,
|
89
95
|
onDownload: onDownload,
|
90
96
|
onPreview: onPreview
|
91
|
-
}), file.status !== 'uploading' && _jsxs("div", {
|
97
|
+
}), file.status !== 'uploading' && /*#__PURE__*/_jsxs("div", {
|
92
98
|
className: "file-action-box",
|
93
|
-
children: [!isView && !disabled && _jsx("div", {
|
99
|
+
children: [!isView && !disabled && /*#__PURE__*/_jsx("div", {
|
94
100
|
className: "file-name",
|
95
101
|
onClick: function onClick() {
|
96
102
|
handleReSelect(file);
|
97
103
|
},
|
98
|
-
children: locale === null || locale === void 0
|
99
|
-
}), !isView && !disabled && _jsx("div", {
|
104
|
+
children: locale === null || locale === void 0 || (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.draggerSelect
|
105
|
+
}), !isView && !disabled && /*#__PURE__*/_jsx("div", {
|
100
106
|
className: "file-del",
|
101
107
|
onClick: function onClick() {
|
102
108
|
handleDelFile(file);
|
103
109
|
},
|
104
|
-
children: locale === null || locale === void 0
|
110
|
+
children: locale === null || locale === void 0 || (_locale$ProUpload2 = locale.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.draggerDelete
|
105
111
|
})]
|
106
112
|
})]
|
107
113
|
});
|
@@ -112,58 +118,58 @@ var DragRender = function DragRender(props) {
|
|
112
118
|
disabled: disabled,
|
113
119
|
openFileDialogOnClick: !showDraggerSingleRender
|
114
120
|
});
|
115
|
-
return _jsxs("div", {
|
121
|
+
return /*#__PURE__*/_jsxs("div", {
|
116
122
|
className: "pro-upload-dragger",
|
117
|
-
children: [_jsxs("div", {
|
123
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
118
124
|
className: "pro-upload-handle-box",
|
119
|
-
children: [_jsx("div", {
|
125
|
+
children: [/*#__PURE__*/_jsx("div", {
|
120
126
|
className: "pro-upload-dragger-header",
|
121
127
|
children: headerRender()
|
122
|
-
}), _jsx(Dragger, _objectSpread(_objectSpread({}, dragUploadProps), {}, {
|
123
|
-
children: _jsxs("div", {
|
128
|
+
}), /*#__PURE__*/_jsx(Dragger, _objectSpread(_objectSpread({}, dragUploadProps), {}, {
|
129
|
+
children: /*#__PURE__*/_jsxs("div", {
|
124
130
|
className: "drag-upload-inner",
|
125
131
|
ref: refReSelect,
|
126
|
-
children: [!showDraggerSingleRender && _jsxs("div", {
|
132
|
+
children: [!showDraggerSingleRender && /*#__PURE__*/_jsxs("div", {
|
127
133
|
className: "upload-dragger-control",
|
128
|
-
children: [_jsxs("div", {
|
134
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
129
135
|
className: "dragger-txt-line1",
|
130
|
-
children: [_jsx("i", {
|
136
|
+
children: [/*#__PURE__*/_jsx("i", {
|
131
137
|
className: "icon-upload",
|
132
|
-
children: _jsx(CloudUploadOutlined, {})
|
133
|
-
}), _jsxs("p", {
|
138
|
+
children: /*#__PURE__*/_jsx(CloudUploadOutlined, {})
|
139
|
+
}), /*#__PURE__*/_jsxs("p", {
|
134
140
|
className: "dragger-txt",
|
135
|
-
children: [locale === null || locale === void 0
|
141
|
+
children: [locale === null || locale === void 0 || (_locale$ProUpload3 = locale.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.draggerTips, /*#__PURE__*/_jsxs("span", {
|
136
142
|
className: "click-txt",
|
137
|
-
children: [locale === null || locale === void 0
|
143
|
+
children: [locale === null || locale === void 0 || (_locale$ProUpload4 = locale.ProUpload) === null || _locale$ProUpload4 === void 0 ? void 0 : _locale$ProUpload4.draggerBtnTxt, " "]
|
138
144
|
})]
|
139
145
|
})]
|
140
|
-
}), _jsxs("p", {
|
146
|
+
}), /*#__PURE__*/_jsxs("p", {
|
141
147
|
className: "file-ext",
|
142
|
-
children: [locale === null || locale === void 0
|
148
|
+
children: [locale === null || locale === void 0 || (_locale$ProUpload5 = locale.ProUpload) === null || _locale$ProUpload5 === void 0 ? void 0 : _locale$ProUpload5.draggerFileExt, "\uFF1A", extExt.length > 0 ? extExt.join('、') : "".concat(locale === null || locale === void 0 || (_locale$ProUpload6 = locale.ProUpload) === null || _locale$ProUpload6 === void 0 ? void 0 : _locale$ProUpload6.draggerLimitless)]
|
143
149
|
})]
|
144
|
-
}), _jsx("div", {
|
150
|
+
}), /*#__PURE__*/_jsx("div", {
|
145
151
|
className: "dragger-file-show",
|
146
152
|
children: showDraggerSingleRender && draggerSingleRender(fileList[0])
|
147
153
|
})]
|
148
154
|
})
|
149
|
-
})), _jsx("div", {
|
155
|
+
})), /*#__PURE__*/_jsx("div", {
|
150
156
|
className: "pro-upload-dragger-footer",
|
151
157
|
children: footerRender()
|
152
158
|
})]
|
153
|
-
}), _jsx("div", {
|
159
|
+
}), /*#__PURE__*/_jsx("div", {
|
154
160
|
className: "pro-upload-file-list",
|
155
|
-
children: _jsx(DndContext, {
|
161
|
+
children: /*#__PURE__*/_jsx(DndContext, {
|
156
162
|
sensors: [sensor],
|
157
163
|
onDragEnd: onDragEnd,
|
158
|
-
children: _jsx(SortableContext, {
|
164
|
+
children: /*#__PURE__*/_jsx(SortableContext, {
|
159
165
|
items: fileList.map(function (i) {
|
160
166
|
return i.uid;
|
161
167
|
}),
|
162
168
|
strategy: rectSortingStrategy,
|
163
169
|
children: maxCount > 1 && fileList.map(function (file) {
|
164
|
-
return _jsx(DraggableUploadListItem, {
|
170
|
+
return /*#__PURE__*/_jsx(DraggableUploadListItem, {
|
165
171
|
file: file,
|
166
|
-
children: _jsx(FileItem, {
|
172
|
+
children: /*#__PURE__*/_jsx(FileItem, {
|
167
173
|
file: file,
|
168
174
|
disabled: disabled || isView,
|
169
175
|
onPreview: onPreview,
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import
|
2
|
+
import React from 'react';
|
3
3
|
import { CSS } from '@dnd-kit/utilities';
|
4
4
|
import { useSortable } from '@dnd-kit/sortable';
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
export var DraggableUploadListItem = function DraggableUploadListItem(_ref) {
|
6
7
|
var file = _ref.file,
|
7
8
|
children = _ref.children;
|
@@ -20,7 +21,7 @@ export var DraggableUploadListItem = function DraggableUploadListItem(_ref) {
|
|
20
21
|
zIndex: 10,
|
21
22
|
position: 'relative'
|
22
23
|
};
|
23
|
-
return _jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
24
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
24
25
|
ref: setNodeRef,
|
25
26
|
style: style
|
26
27
|
}, attributes), listeners), {}, {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
3
|
+
import React, { useState } from 'react';
|
4
|
+
import ProDrawerForm from "../../ProDrawerForm";
|
5
|
+
import locale from "../../locale";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
8
|
export var Example = function Example(props) {
|
8
9
|
var _locale$ProUpload;
|
9
10
|
var exampleContent = props.exampleContent,
|
@@ -20,12 +21,12 @@ export var Example = function Example(props) {
|
|
20
21
|
var handleCancel = function handleCancel() {
|
21
22
|
setVisible(false);
|
22
23
|
};
|
23
|
-
return _jsxs("div", {
|
24
|
+
return /*#__PURE__*/_jsxs("div", {
|
24
25
|
className: className,
|
25
|
-
children: [_jsx("div", {
|
26
|
+
children: [/*#__PURE__*/_jsx("div", {
|
26
27
|
onClick: handleShowModal,
|
27
|
-
children: locale === null || locale === void 0
|
28
|
-
}), _jsx(ProDrawerForm, {
|
28
|
+
children: locale === null || locale === void 0 || (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.exampleTitle
|
29
|
+
}), /*#__PURE__*/_jsx(ProDrawerForm, {
|
29
30
|
title: exampleTitle,
|
30
31
|
width: "600",
|
31
32
|
open: visible,
|
@@ -33,7 +34,7 @@ export var Example = function Example(props) {
|
|
33
34
|
onCancel: handleCancel,
|
34
35
|
modalProps: _objectSpread({}, exampleModalProps),
|
35
36
|
disabled: true,
|
36
|
-
children: _jsx("div", {
|
37
|
+
children: /*#__PURE__*/_jsx("div", {
|
37
38
|
className: "pro-upload-example",
|
38
39
|
children: exampleContent
|
39
40
|
})
|