@unicom-cloud/ui 0.8.67 → 0.8.68
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/Affix.js +15 -124
- package/Alert.js +13 -110
- package/Anchor.js +2 -2
- package/AutoComplete.js +15 -146
- package/Avatar.js +4 -154
- package/BackTop.js +14 -83
- package/Badge.js +12 -176
- package/Breadcrumb.js +12 -138
- package/Button.js +12 -149
- package/Calendar.js +12 -569
- package/Card.js +10 -136
- package/Carousel.js +13 -380
- package/Cascader.js +2 -2
- package/Checkbox.js +2 -2
- package/Collapse.js +2 -2
- package/ColorPicker.js +14 -582
- package/Comment.js +10 -71
- package/ConfigProvider.js +5 -6
- package/Copy.js +12 -61
- package/DatePicker.js +11 -2043
- package/Descriptions.js +11 -176
- package/Divider.js +7 -38
- package/Draggable.js +7 -90
- package/Drawer.js +2 -2
- package/Dropdown.js +15 -199
- package/Empty.js +2 -2
- package/Form.js +16 -1455
- package/Grid.js +9 -252
- package/Icon.js +7 -55
- package/IconHover.js +1 -1
- package/Image.js +6 -5
- package/Input.js +12 -12
- package/InputNumber.js +7 -5
- package/InputTag.js +2 -2
- package/Layout.js +16 -56
- package/Link.js +9 -60
- package/List.js +18 -312
- package/Loading.js +4 -59
- package/Mentions.js +12 -164
- package/Menu.js +8 -7
- package/Message.js +6 -5
- package/Modal.js +2 -2
- package/Notice.js +5 -6
- package/Notification.js +7 -6
- package/OverflowEllipsis.js +8 -98
- package/PageHeader.js +13 -113
- package/Pagination.js +2 -2
- package/Picker.js +4 -3
- package/Popconfirm.js +13 -128
- package/Popover.js +10 -76
- package/Portal.js +5 -25
- package/Progress.js +11 -363
- package/Radio.js +5 -6
- package/Rate.js +14 -125
- package/ResizeBox.js +16 -558
- package/Result.js +14 -1434
- package/Select.js +5 -4
- package/SelectView.js +9 -425
- package/Skeleton.js +11 -94
- package/Slider.js +21 -776
- package/Space.js +11 -94
- package/SpeechSynthesis.js +48 -64
- package/Spin.js +11 -94
- package/Statistic.js +15 -192
- package/Steps.js +11 -148
- package/SuspenseFallbackTest.js +3 -10
- package/Switch.js +13 -114
- package/Table.js +16 -2097
- package/Tabs.js +6 -6
- package/Tag.js +13 -134
- package/TimePicker.js +7 -274
- package/Timeline.js +4 -4
- package/Tooltip.js +12 -137
- package/Transfer.js +14 -450
- package/Tree.js +3 -2
- package/TreeSelect.js +3 -4
- package/Trigger.js +21 -809
- package/Typography.js +10 -756
- package/Upload.js +4 -4
- package/VerificationCode.js +2 -2
- package/VirtualList.js +2 -2
- package/Watermark.js +2 -2
- package/affix/index.js +126 -0
- package/affix/interface.js +1 -0
- package/alert/index.js +112 -0
- package/alert/interface.js +1 -0
- package/anchor/Anchor.js +198 -0
- package/anchor/Link.js +52 -0
- package/anchor/context.js +14 -0
- package/anchor/index.js +4 -0
- package/anchor/interface.js +1 -0
- package/anchor/util.js +50 -0
- package/auto-complete/index.js +149 -0
- package/auto-complete/interface.js +1 -0
- package/avatar/Avatar.js +83 -0
- package/avatar/Group.js +82 -0
- package/avatar/context.js +5 -0
- package/avatar/index.js +7 -0
- package/avatar/interface.js +1 -0
- package/back-top/index.js +85 -0
- package/back-top/interface.js +1 -0
- package/badge/Count.js +35 -0
- package/badge/index.js +151 -0
- package/badge/interface.js +1 -0
- package/breadcrumb/Item.js +67 -0
- package/breadcrumb/index.js +81 -0
- package/breadcrumb/interface.js +1 -0
- package/button/Group.js +13 -0
- package/button/index.js +146 -0
- package/button/interface.js +1 -0
- package/calendar/Month.js +12 -0
- package/calendar/WeekList.js +24 -0
- package/calendar/Year.js +74 -0
- package/calendar/index.js +320 -0
- package/calendar/interface.js +1 -0
- package/card/Grid.js +25 -0
- package/card/Meta.js +30 -0
- package/card/index.js +99 -0
- package/card/interface.js +1 -0
- package/carousel/Arrow.js +55 -0
- package/carousel/Indicator.js +66 -0
- package/carousel/index.js +278 -0
- package/carousel/interface.js +1 -0
- package/cascader/Cascader.js +26 -0
- package/cascader/index.js +4 -0
- package/cascader/interface.js +1 -0
- package/cascader/util.js +14 -0
- package/checkbox/Checkbox.js +16 -0
- package/checkbox/Group.js +14 -0
- package/checkbox/IconCheck.js +19 -0
- package/checkbox/index.js +4 -0
- package/checkbox/interface.js +1 -0
- package/checkbox/useCheckbox.js +45 -0
- package/chunk/{qFf1w_Jq.js → 5_U1CBIu.js} +2 -2
- package/chunk/B2yFlXke.js +6 -0
- package/chunk/B4JiMp8I.js +764 -0
- package/chunk/B4YRLi8r.js +11 -0
- package/chunk/B5RFT17G.js +15 -0
- package/chunk/{CNmmhbCn.js → B6X4lnd0.js} +32 -32
- package/chunk/B7M-FGia.js +41 -0
- package/chunk/{B7FlazNB.js → BBkdXHrJ.js} +7 -7
- package/chunk/{BHF15Dog.js → BDB0LByj.js} +20 -20
- package/chunk/BFTV6myl.js +19 -0
- package/chunk/BJ1soa2K.js +178 -0
- package/chunk/BKKEev13.js +11 -0
- package/chunk/BKT9BFf4.js +11 -0
- package/chunk/BSCrLtfQ.js +10 -0
- package/chunk/{WpO_DsK4.js → BSaQv6mx.js} +62 -60
- package/chunk/BXAeh0_V.js +16 -0
- package/chunk/Bfq4YEcr.js +23 -0
- package/chunk/Bg3uJGPu.js +10 -0
- package/chunk/{C_gJWGGh.js → Bi4UkwOR.js} +180 -168
- package/chunk/BibHFOCF.js +34 -0
- package/chunk/Biupwn8l.js +24 -0
- package/chunk/{BCftTxEy.js → BjpUSKM3.js} +184 -181
- package/chunk/{Cf5QNhkG.js → Bl7BnD1R.js} +15 -15
- package/chunk/BsY85n3_.js +14 -0
- package/chunk/C48SmsN-.js +38 -0
- package/chunk/C4OrxKE6.js +18 -0
- package/chunk/C98ks5S8.js +473 -0
- package/chunk/CC---6jO.js +110 -0
- package/chunk/{DleQ5HwG.js → CCv-5KFt.js} +58 -58
- package/chunk/CD3AUpzo.js +166 -0
- package/chunk/CIRG541s.js +22 -0
- package/chunk/CKyu68pu.js +312 -0
- package/chunk/CQ_WOOmf.js +8 -0
- package/chunk/{CKNyIitu.js → CVYWxu00.js} +10 -10
- package/chunk/CYhxqVkn.js +9 -0
- package/chunk/CbLaCJmG.js +26 -0
- package/chunk/CdaT1b_F.js +20 -0
- package/chunk/CftuXmo_.js +6 -0
- package/chunk/CgurXnoy.js +569 -0
- package/chunk/{DKr2_PYd.js → Clo26EcR.js} +10 -10
- package/chunk/ClqoGc3r.js +17 -0
- package/chunk/CmZzBtA4.js +16 -0
- package/chunk/CpGBWmuz.js +1461 -0
- package/chunk/CzQObzKd.js +1817 -0
- package/chunk/D-TPB2Do.js +56 -0
- package/chunk/D090jlwP.js +38 -0
- package/chunk/{CJ_o9tZM.js → D0ZWT7db.js} +1 -1
- package/chunk/DH7HTOV_.js +11 -0
- package/chunk/DKHXj8Kf.js +9 -0
- package/chunk/Dh7Osrvr.js +27 -0
- package/chunk/DonYzv30.js +14 -0
- package/chunk/DpoumMDw.js +50 -0
- package/chunk/Duezix3m.js +25 -0
- package/chunk/DxVvggX2.js +11 -0
- package/chunk/DzVH9IBy.js +1413 -0
- package/chunk/SSK90wgo.js +209 -0
- package/chunk/{CSC_V_25.js → URXCKjXr.js} +8 -8
- package/chunk/VSe_Wq1g.js +10 -0
- package/chunk/XTEsYGuF.js +17 -0
- package/chunk/b1e8awfs.js +31 -0
- package/chunk/hEWZQ8Zi.js +16 -0
- package/chunk/k-OUstoD.js +58 -0
- package/chunk/ll867Bf3.js +730 -0
- package/chunk/{CLiqJm_T.js → oopARUrq.js} +2 -2
- package/chunk/tamGhTJp.js +186 -0
- package/chunk/{CANgSlh3.js → uKZyjtff.js} +31 -31
- package/chunk/vmgkWLYf.js +843 -0
- package/chunk/yl4BU7Sd.js +1068 -0
- package/chunk/zmmqLCF4.js +20 -0
- package/collapse/Collapse.js +15 -0
- package/collapse/Item.js +11 -0
- package/collapse/index.js +4 -0
- package/collapse/interface.js +1 -0
- package/color-picker/ControlBar.js +63 -0
- package/color-picker/InputAlpha.js +22 -0
- package/color-picker/InputHex.js +55 -0
- package/color-picker/InputRgb.js +61 -0
- package/color-picker/Mode.js +10 -0
- package/color-picker/Palette.js +34 -0
- package/color-picker/Panel.js +268 -0
- package/color-picker/colors.js +37 -0
- package/color-picker/index.js +270 -0
- package/color-picker/interface.js +4 -0
- package/color-picker/utils.js +89 -0
- package/comment/index.js +73 -0
- package/comment/interface.js +1 -0
- package/config-provider/ConfigProvider.js +15 -0
- package/config-provider/context.js +8 -0
- package/config-provider/index.js +8 -0
- package/config-provider/interface.js +1 -0
- package/copy/index.js +63 -0
- package/copy/interface.js +1 -0
- package/date-picker/Picker.js +410 -0
- package/date-picker/PickerRange.js +24 -0
- package/date-picker/context.js +5 -0
- package/date-picker/index.js +50 -0
- package/date-picker/interface.js +1 -0
- package/date-picker/util.js +76 -0
- package/descriptions/index.js +178 -0
- package/descriptions/interface.js +1 -0
- package/divider/index.js +40 -0
- package/divider/interface.js +1 -0
- package/draggable/Item.js +67 -0
- package/draggable/index.js +32 -0
- package/draggable/interface.js +1 -0
- package/{chunk/CP0odX99.js → drawer/Drawer.js} +71 -71
- package/drawer/index.js +4 -0
- package/drawer/interface.js +1 -0
- package/dropdown/Button.js +11 -0
- package/dropdown/index.js +201 -0
- package/dropdown/interface.js +1 -0
- package/empty/index.js +9 -0
- package/empty/interface.js +1 -0
- package/form/Control.js +262 -0
- package/form/Form.js +160 -0
- package/form/FormItem.js +239 -0
- package/form/FormLabel.js +54 -0
- package/form/FormList.js +100 -0
- package/form/FormProvider.js +48 -0
- package/form/IconSymbol.js +20 -0
- package/form/context.js +43 -0
- package/form/index.js +107 -0
- package/form/interface.js +11 -0
- package/form/promisify.js +32 -0
- package/form/store.js +360 -0
- package/form/useForm.js +53 -0
- package/form/util.js +75 -0
- package/grid/Col.js +85 -0
- package/grid/Row.js +86 -0
- package/grid/context.js +9 -0
- package/grid/grid-item.js +75 -0
- package/grid/grid.js +103 -0
- package/grid/index.js +15 -0
- package/grid/interface.js +1 -0
- package/grid/util.js +51 -0
- package/hooks/index.js +38 -38
- package/hooks/useComputedState.js +2 -2
- package/hooks/useCreate.js +2 -2
- package/hooks/useForceUpdate.js +1 -1
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useInterval.js +2 -2
- package/hooks/useIsFirstRender.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOnlineStatus.js +2 -2
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useResizeObserver.js +2 -2
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useVerificationCode.js +10 -10
- package/hooks/useWatch.js +1 -1
- package/hooks/useWatermark.js +25 -25
- package/hooks/useWindowSize.js +1 -1
- package/icon/addFromIconFontCn.js +7 -0
- package/icon/index.js +57 -0
- package/icon-hover/index.js +7 -0
- package/image/Image.js +191 -0
- package/image/ImageFooter.js +8 -0
- package/image/ImagePreview.js +41 -0
- package/image/ImagePreviewArrow.js +46 -0
- package/image/ImagePreviewGroup.js +125 -0
- package/image/ImagePreviewToolbar.js +99 -0
- package/image/TriggerForToolbar.js +10 -0
- package/image/index.js +8 -0
- package/image/interface.js +1 -0
- package/image/previewGroupContext.js +17 -0
- package/index.js +592 -560
- package/input/Group.js +18 -0
- package/input/Input.js +688 -0
- package/input/InputElement.js +235 -0
- package/input/Number.js +4 -0
- package/input/Password.js +13 -0
- package/input/Search.js +14 -0
- package/input/Tag.js +4 -0
- package/input/Textarea.js +16 -0
- package/input/autoSizeTextAreaHeight.js +65 -0
- package/input/index.js +15 -0
- package/input/interface.js +1 -0
- package/input/useComposition.js +39 -0
- package/input-number/decimal.js +154 -0
- package/input-number/index.js +18 -0
- package/input-number/interface.js +1 -0
- package/input-number/useSelectionRange.js +26 -0
- package/input-number/util.js +57 -0
- package/input-tag/InputTag.js +384 -0
- package/input-tag/index.js +4 -0
- package/input-tag/interface.js +1 -0
- package/layout/Content.js +13 -0
- package/layout/Footer.js +13 -0
- package/layout/Header.js +13 -0
- package/{chunk/pZoNQ75H.js → layout/Sider.js} +31 -31
- package/layout/index.js +43 -0
- package/layout/interface.js +1 -0
- package/link/index.js +62 -0
- package/link/interface.js +1 -0
- package/list/Item.js +44 -0
- package/list/Meta.js +19 -0
- package/list/index.js +269 -0
- package/list/interface.js +1 -0
- package/loading/index.js +61 -0
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +146 -0
- package/mentions/interface.js +1 -0
- package/mentions/util.js +26 -0
- package/menu/Indent.js +17 -0
- package/menu/Item.js +125 -0
- package/menu/ItemGroup.js +39 -0
- package/menu/Menu.js +26 -0
- package/menu/OverflowWrap.js +10 -0
- package/menu/context.js +5 -0
- package/menu/index.js +11 -0
- package/menu/interface.js +1 -0
- package/menu/util.js +80 -0
- package/message/index.js +14 -0
- package/message/interface.js +1 -0
- package/message/useMessage.js +7 -0
- package/modal/Confirm.js +13 -0
- package/modal/Modal.js +21 -0
- package/modal/config.js +25 -0
- package/modal/index.js +4 -0
- package/modal/interface.js +1 -0
- package/notice/index.js +24 -0
- package/notification/index.js +16 -0
- package/notification/interface.js +1 -0
- package/notification/useNotification.js +6 -0
- package/notification/withNotification.js +49 -0
- package/overflow-ellipsis/OverflowItem.js +35 -0
- package/overflow-ellipsis/index.js +74 -0
- package/package.json +1 -1
- package/page-header/index.js +115 -0
- package/page-header/interface.js +1 -0
- package/pagination/PageItem.js +119 -0
- package/pagination/PageJumper.js +60 -0
- package/pagination/PageOption.js +47 -0
- package/pagination/Pagination.js +245 -0
- package/pagination/index.js +4 -0
- package/pagination/interface.js +1 -0
- package/picker/Input.js +130 -0
- package/picker/InputRange.js +158 -0
- package/picker/index.js +6 -0
- package/popconfirm/index.js +130 -0
- package/popconfirm/interface.js +1 -0
- package/popover/index.js +78 -0
- package/popover/interface.js +1 -0
- package/portal/Portal.js +15 -0
- package/portal/index.js +17 -0
- package/progress/CircleProgress.js +117 -0
- package/progress/LineProgess.js +103 -0
- package/progress/StepProgress.js +74 -0
- package/progress/index.js +99 -0
- package/progress/interface.js +1 -0
- package/radio/Group.js +16 -0
- package/radio/Radio.js +15 -0
- package/radio/index.js +8 -0
- package/radio/interface.js +1 -0
- package/rate/index.js +127 -0
- package/rate/interface.js +1 -0
- package/resize-box/ResizeTrigger.js +78 -0
- package/resize-box/Split.js +130 -0
- package/resize-box/SplitGroup.js +202 -0
- package/resize-box/index.js +182 -0
- package/resize-box/interface.js +1 -0
- package/result/403.js +695 -0
- package/result/404.js +513 -0
- package/result/500.js +166 -0
- package/result/index.js +77 -0
- package/result/interface.js +1 -0
- package/select/OptGroup.js +20 -0
- package/select/Option.js +95 -0
- package/select/Select.js +549 -0
- package/select/index.js +8 -0
- package/select/interface.js +1 -0
- package/select/util.js +141 -0
- package/select-view/Core.js +370 -0
- package/select-view/index.js +67 -0
- package/select-view/interface.js +1 -0
- package/skeleton/Image.js +24 -0
- package/skeleton/Text.js +27 -0
- package/skeleton/index.js +57 -0
- package/skeleton/interface.js +1 -0
- package/slider/Button.js +159 -0
- package/slider/Dot.js +43 -0
- package/slider/Input.js +75 -0
- package/slider/Mark.js +28 -0
- package/slider/Tick.js +44 -0
- package/slider/index.js +429 -0
- package/slider/interface.js +1 -0
- package/slider/util.js +63 -0
- package/space/index.js +90 -0
- package/space/interface.js +1 -0
- package/space/toArray.js +11 -0
- package/speech-synthesis/index.js +109 -0
- package/spin/DotLoading.js +24 -0
- package/spin/index.js +79 -0
- package/spin/interface.js +1 -0
- package/statistic/Countdown.js +55 -0
- package/statistic/index.js +120 -0
- package/statistic/interface.js +1 -0
- package/statistic/util.js +33 -0
- package/steps/Step.js +68 -0
- package/steps/index.js +89 -0
- package/steps/interface.js +1 -0
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +12 -0
- package/switch/index.js +116 -0
- package/switch/interface.js +1 -0
- package/table/ColGroup.js +59 -0
- package/table/Table.js +24 -0
- package/table/constant.js +42 -0
- package/table/index.js +103 -0
- package/table/interface.js +1 -0
- package/table/util.js +121 -0
- package/tabs/Tab.js +18 -0
- package/tabs/TabContent.js +8 -0
- package/tabs/TabPane.js +24 -0
- package/tabs/index.js +9 -0
- package/tabs/interface.js +1 -0
- package/tabs/util.js +22 -0
- package/tag/index.js +136 -0
- package/tag/interface.js +1 -0
- package/time-picker/Picker.js +219 -0
- package/time-picker/RangePicker.js +56 -0
- package/time-picker/TimeColumn.js +65 -0
- package/time-picker/TimePicker.js +240 -0
- package/time-picker/context.js +5 -0
- package/time-picker/index.js +20 -0
- package/time-picker/interface.js +1 -0
- package/time-picker/util.js +43 -0
- package/timeline/Item.js +92 -0
- package/timeline/Timeline.js +79 -0
- package/timeline/index.js +6 -0
- package/timeline/interface.js +1 -0
- package/tooltip/index.js +140 -0
- package/tooltip/interface.js +1 -0
- package/transfer/Item.js +106 -0
- package/transfer/List.js +186 -0
- package/transfer/index.js +182 -0
- package/transfer/interface.js +1 -0
- package/tree/Animation.js +11 -0
- package/tree/Context.js +5 -0
- package/tree/Node.js +16 -0
- package/tree/NodeList.js +82 -0
- package/tree/Tree.js +580 -0
- package/tree/index.js +6 -0
- package/tree/interface.js +1 -0
- package/tree/util.js +76 -0
- package/tree-select/List.js +124 -0
- package/tree-select/Select.js +395 -0
- package/tree-select/index.js +6 -0
- package/tree-select/interface.js +13 -0
- package/tree-select/util.js +9 -0
- package/trigger/getPopupStyle.js +192 -0
- package/trigger/index.js +626 -0
- package/trigger/interface.js +1 -0
- package/types/color-picker/ControlBar.d.ts +12 -5
- package/types/color-picker/Mode.d.ts +7 -0
- package/types/color-picker/Panel.d.ts +10 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +13 -11
- package/types/color-picker/hooks/useControlBlock.d.ts +10 -3
- package/types/color-picker/index.d.ts +1 -1
- package/types/color-picker/interface.d.ts +19 -7
- package/types/color-picker/utils.d.ts +23 -0
- package/types/form/Control.d.ts +54 -5
- package/types/index.d.ts +1 -2
- package/types/table/hook/useThResizable.d.ts +1 -1
- package/typography/Base.js +189 -0
- package/typography/EditContent.js +46 -0
- package/typography/Ellipsis.js +124 -0
- package/typography/Operations.js +78 -0
- package/typography/Paragraph.js +24 -0
- package/typography/Text.js +11 -0
- package/typography/Title.js +12 -0
- package/typography/Typography.js +13 -0
- package/typography/index.js +278 -0
- package/typography/interface.js +1 -0
- package/typography/useCssEllipsis.js +37 -0
- package/typography/useEllipsis.js +150 -0
- package/upload/TriggerNode.js +116 -0
- package/upload/Upload.js +627 -0
- package/upload/Uploader.js +206 -0
- package/upload/index.js +8 -0
- package/upload/interface.js +9 -0
- package/upload/request.js +51 -0
- package/upload/request_.js +64 -0
- package/upload/util.js +61 -0
- package/utils/CSSTransition.js +2 -2
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/dayjs.js +11 -11
- package/utils/dom.js +32 -32
- package/utils/fillNBSP.js +2 -2
- package/utils/getHighlightText.js +2 -2
- package/utils/getHotkeyHandler.js +2 -2
- package/utils/getStringLength.js +2 -2
- package/utils/include.js +2 -2
- package/utils/index.js +96 -96
- package/utils/is.js +53 -53
- package/utils/mergeProps.js +2 -2
- package/utils/mergedToString.js +2 -2
- package/utils/omit.js +2 -2
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -4
- package/utils/reactDOM.js +3 -3
- package/utils/resizeObserverEffect.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoView.js +2 -2
- package/utils/style.js +11 -11
- package/utils/throttleByRaf.js +8 -8
- package/utils/warning.js +5 -5
- package/{chunk/-UuKKT0Z.js → verification-code/VerificationCode.js} +32 -31
- package/verification-code/index.js +4 -0
- package/verification-code/interface.js +1 -0
- package/{Version.js → version/index.js} +1 -1
- package/virtual-list/Filler.js +31 -0
- package/virtual-list/VirtualList.js +493 -0
- package/virtual-list/index.js +4 -0
- package/{chunk/CaasmWg_.js → watermark/Watermark.js} +11 -10
- package/watermark/index.js +4 -0
- package/watermark/interface.js +1 -0
- package/chunk/B5gK1Idp.js +0 -19
- package/chunk/BBvWDeuZ.js +0 -334
- package/chunk/BGny4zSb.js +0 -166
- package/chunk/BJQ5UNa-.js +0 -1585
- package/chunk/BP9sYyk9.js +0 -8
- package/chunk/BUdtVdnv.js +0 -38
- package/chunk/BVQlOzTS.js +0 -11
- package/chunk/B__a_gb_.js +0 -519
- package/chunk/BbEYToV1.js +0 -10
- package/chunk/BbdDQAnm.js +0 -15
- package/chunk/BdUcgWdu.js +0 -11
- package/chunk/BfbXSG70.js +0 -26
- package/chunk/BndfNLK4.js +0 -186
- package/chunk/BoMCZV6K.js +0 -1098
- package/chunk/Br0B6y1T.js +0 -18
- package/chunk/BxUs8_Cr.js +0 -9
- package/chunk/C42LIMP9.js +0 -970
- package/chunk/C4YkFMzC.js +0 -778
- package/chunk/C9Wcraj7.js +0 -162
- package/chunk/CK5m7rLl.js +0 -166
- package/chunk/CPT-OZH2.js +0 -14
- package/chunk/CVSF8p0O.js +0 -698
- package/chunk/C_agcwLN.js +0 -31
- package/chunk/CkNSv2U7.js +0 -56
- package/chunk/Cp2f70gB.js +0 -9
- package/chunk/CpegYjdC.js +0 -16
- package/chunk/CucI3KZr.js +0 -20
- package/chunk/CwoFBTYz.js +0 -11
- package/chunk/D2KPqPhV.js +0 -17
- package/chunk/D7NyvE5f.js +0 -17
- package/chunk/D8oTPQ2H.js +0 -384
- package/chunk/DC1iHEiy.js +0 -912
- package/chunk/DFrfrmfK.js +0 -519
- package/chunk/DGTIZ_0O.js +0 -6
- package/chunk/DJfpiZn_.js +0 -25
- package/chunk/DNUz6zgo.js +0 -11
- package/chunk/DRtM649q.js +0 -11
- package/chunk/DS_mUWn6.js +0 -41
- package/chunk/DU6bs_19.js +0 -10
- package/chunk/DWdbwz22.js +0 -10
- package/chunk/DcveZuqd.js +0 -6
- package/chunk/DdVFknul.js +0 -24
- package/chunk/DgRfikwe.js +0 -16
- package/chunk/DkyR2EfG.js +0 -243
- package/chunk/DnrZEnQ_.js +0 -27
- package/chunk/DsRSHWtX.js +0 -1025
- package/chunk/Dz5BdmXo.js +0 -270
- package/chunk/EANe01DF.js +0 -1030
- package/chunk/GoNx5R4F.js +0 -873
- package/chunk/HDUQku8d.js +0 -20
- package/chunk/HrAP__Hi.js +0 -25
- package/chunk/SLWP34OR.js +0 -229
- package/chunk/VVKtwaGf.js +0 -278
- package/chunk/WPNpLxSI.js +0 -16
- package/chunk/fdU3ang6.js +0 -14
- package/chunk/fkclKOAL.js +0 -830
- package/chunk/flvYlqx3.js +0 -22
- package/chunk/kTDayEpF.js +0 -288
- package/chunk/w-kM1L5W.js +0 -445
- package/types/form/Control-old.d.ts +0 -56
- package/types/style/index.d.ts +0 -1
package/chunk/EANe01DF.js
DELETED
|
@@ -1,1030 +0,0 @@
|
|
|
1
|
-
import { jsxs as E, Fragment as z, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import O from "lodash/isFunction";
|
|
3
|
-
import ge from "lodash/isNumber";
|
|
4
|
-
import te, { useContext as M, forwardRef as Q, useState as A, useEffect as _, isValidElement as $e, useRef as ie, useImperativeHandle as he } from "react";
|
|
5
|
-
import { a as W, I as Ie } from "./BJQ5UNa-.js";
|
|
6
|
-
import { c as we } from "./B5gK1Idp.js";
|
|
7
|
-
import { m as X } from "./JPPo5nY_.js";
|
|
8
|
-
import { c as Ce } from "./BdUcgWdu.js";
|
|
9
|
-
import ue from "../utils/warning.js";
|
|
10
|
-
import { _ as Ne, N as ne } from "./DC1iHEiy.js";
|
|
11
|
-
import { a as Fe } from "./fkclKOAL.js";
|
|
12
|
-
import be from "@unicom-cloud/icons/IconUiDelete";
|
|
13
|
-
import Pe from "@unicom-cloud/icons/IconUiEye";
|
|
14
|
-
import Ee from "@unicom-cloud/icons/IconUiImageClose";
|
|
15
|
-
import oe from "@unicom-cloud/icons/IconUiUpload";
|
|
16
|
-
import { l as ve } from "./CTxjmYmx.js";
|
|
17
|
-
import { h as Y } from "./D2KPqPhV.js";
|
|
18
|
-
import "./CkNSv2U7.js";
|
|
19
|
-
import Le from "@unicom-cloud/icons/IconUiCheck";
|
|
20
|
-
import Re from "@unicom-cloud/icons/IconUiPause";
|
|
21
|
-
import De from "@unicom-cloud/icons/IconUiPlayArrowFill";
|
|
22
|
-
import Te from "../Progress.js";
|
|
23
|
-
import re from "../Tooltip.js";
|
|
24
|
-
import ae from "lodash/isPlainObject.js";
|
|
25
|
-
import ke from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
26
|
-
import Oe from "@unicom-cloud/icons/IconUiFile";
|
|
27
|
-
import Se from "@unicom-cloud/icons/IconUiFileAudio";
|
|
28
|
-
import ye from "@unicom-cloud/icons/IconUiFileImage";
|
|
29
|
-
import je from "@unicom-cloud/icons/IconUiFilePdf";
|
|
30
|
-
import qe from "@unicom-cloud/icons/IconUiFileVideo";
|
|
31
|
-
import { K as Ae } from "./CSC_V_25.js";
|
|
32
|
-
import le from "lodash/isPlainObject";
|
|
33
|
-
import me from "@unicom-cloud/icons/IconUiPlus";
|
|
34
|
-
import Ve from "../Button.js";
|
|
35
|
-
import He from "lodash/isArray";
|
|
36
|
-
import { o as p } from "./CJ_o9tZM.js";
|
|
37
|
-
const I = {
|
|
38
|
-
init: "init",
|
|
39
|
-
uploading: "uploading",
|
|
40
|
-
success: "done",
|
|
41
|
-
fail: "error"
|
|
42
|
-
}, Ue = (e) => {
|
|
43
|
-
var w, g, l, d, m, b;
|
|
44
|
-
const c = Y(), { file: u, prefixCls: s, progressProps: t, progressRender: r } = e, { locale: i } = M(W), { status: o, percent: v = 0 } = u, U = `${s}-list`, y = t && t.width ? { width: t.width } : {}, x = /* @__PURE__ */ E(z, { children: [
|
|
45
|
-
o === I.fail && e.reuploadIcon !== null && /* @__PURE__ */ n(
|
|
46
|
-
"span",
|
|
47
|
-
{
|
|
48
|
-
className: `${s}-list-reupload-icon`,
|
|
49
|
-
onClick: () => {
|
|
50
|
-
var a;
|
|
51
|
-
(a = e.onReupload) == null || a.call(e, u);
|
|
52
|
-
},
|
|
53
|
-
tabIndex: 0,
|
|
54
|
-
role: "button",
|
|
55
|
-
"aria-label": (w = i == null ? void 0 : i.Upload) == null ? void 0 : w.reupload,
|
|
56
|
-
...c({
|
|
57
|
-
onPressEnter: () => {
|
|
58
|
-
var a;
|
|
59
|
-
(a = e.onReupload) == null || a.call(e, u);
|
|
60
|
-
}
|
|
61
|
-
}),
|
|
62
|
-
children: e.reuploadIcon || (e.listType === "picture-card" ? /* @__PURE__ */ n(oe, {}) : (g = i == null ? void 0 : i.Upload) == null ? void 0 : g.reupload)
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
o === I.success && e.successIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-success-icon`, children: e.successIcon || /* @__PURE__ */ n(Le, {}) }),
|
|
66
|
-
o !== I.success && /* @__PURE__ */ E("div", { className: `${U}-status`, style: y, children: [
|
|
67
|
-
/* @__PURE__ */ n(
|
|
68
|
-
Te,
|
|
69
|
-
{
|
|
70
|
-
showText: !1,
|
|
71
|
-
className: `${U}-progress`,
|
|
72
|
-
type: "circle",
|
|
73
|
-
status: o === I.fail ? "error" : o === I.success ? "success" : "normal",
|
|
74
|
-
percent: v,
|
|
75
|
-
size: "mini",
|
|
76
|
-
...t
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
o === I.init && e.startIcon !== null && /* @__PURE__ */ n(
|
|
80
|
-
"span",
|
|
81
|
-
{
|
|
82
|
-
tabIndex: 0,
|
|
83
|
-
role: "button",
|
|
84
|
-
"aria-label": (l = i == null ? void 0 : i.Upload) == null ? void 0 : l.start,
|
|
85
|
-
className: `${s}-list-start-icon`,
|
|
86
|
-
onClick: () => {
|
|
87
|
-
var a;
|
|
88
|
-
(a = e.onUpload) == null || a.call(e, u);
|
|
89
|
-
},
|
|
90
|
-
...c({
|
|
91
|
-
onPressEnter: () => {
|
|
92
|
-
var a;
|
|
93
|
-
(a = e.onUpload) == null || a.call(e, u);
|
|
94
|
-
}
|
|
95
|
-
}),
|
|
96
|
-
children: e.startIcon || /* @__PURE__ */ n(re, { content: (d = i == null ? void 0 : i.Upload) == null ? void 0 : d.start, children: /* @__PURE__ */ n(De, {}) })
|
|
97
|
-
}
|
|
98
|
-
),
|
|
99
|
-
o === I.uploading && e.cancelIcon !== null && /* @__PURE__ */ n(
|
|
100
|
-
"span",
|
|
101
|
-
{
|
|
102
|
-
className: `${e.prefixCls}-list-cancel-icon`,
|
|
103
|
-
onClick: () => {
|
|
104
|
-
var a;
|
|
105
|
-
(a = e.onAbort) == null || a.call(e, u);
|
|
106
|
-
},
|
|
107
|
-
tabIndex: 0,
|
|
108
|
-
"aria-label": (m = i == null ? void 0 : i.Upload) == null ? void 0 : m.cancel,
|
|
109
|
-
...c({
|
|
110
|
-
onPressEnter: () => {
|
|
111
|
-
var a;
|
|
112
|
-
(a = e.onAbort) == null || a.call(e, u);
|
|
113
|
-
}
|
|
114
|
-
}),
|
|
115
|
-
children: e.cancelIcon || /* @__PURE__ */ n(re, { content: (b = i == null ? void 0 : i.Upload) == null ? void 0 : b.cancel, children: /* @__PURE__ */ n(Re, {}) })
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
] })
|
|
119
|
-
] });
|
|
120
|
-
return O(r) ? r(u, x) : x;
|
|
121
|
-
}, Ge = (e, c) => {
|
|
122
|
-
const { disabled: u, prefixCls: s, file: t, showUploadList: r, locale: i } = e, o = Y(), v = `${s}-list-item-picture`, { status: U, originFile: y } = t, [x, w] = A(t.url), g = ae(r) ? r : {};
|
|
123
|
-
return _(() => {
|
|
124
|
-
if (t.url !== void 0)
|
|
125
|
-
w(t.url);
|
|
126
|
-
else {
|
|
127
|
-
const l = t.originFile;
|
|
128
|
-
l && ve(l).then((d) => {
|
|
129
|
-
w(d);
|
|
130
|
-
}).catch((d) => {
|
|
131
|
-
console.error(d);
|
|
132
|
-
}).finally(() => {
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
return () => {
|
|
136
|
-
};
|
|
137
|
-
}, [t.url, t.originFile]), _(() => {
|
|
138
|
-
var l;
|
|
139
|
-
return (l = e.onChange) == null || l.call(e, { type: "url", data: x }), () => {
|
|
140
|
-
var d;
|
|
141
|
-
(d = e.onChange) == null || d.call(e, { type: "url", data: void 0 });
|
|
142
|
-
};
|
|
143
|
-
}, [x]), /* @__PURE__ */ n("div", { className: v, ref: c, children: U === I.uploading ? /* @__PURE__ */ n(
|
|
144
|
-
Ue,
|
|
145
|
-
{
|
|
146
|
-
onReupload: e.onReupload,
|
|
147
|
-
onUpload: e.onUpload,
|
|
148
|
-
onAbort: e.onAbort,
|
|
149
|
-
listType: "picture-card",
|
|
150
|
-
file: t,
|
|
151
|
-
prefixCls: s,
|
|
152
|
-
progressProps: e.progressProps,
|
|
153
|
-
...g
|
|
154
|
-
}
|
|
155
|
-
) : /* @__PURE__ */ E(z, { children: [
|
|
156
|
-
O(g.imageRender) ? g.imageRender(t) : /* @__PURE__ */ n("img", { src: x, alt: t.name }),
|
|
157
|
-
/* @__PURE__ */ E("div", { className: `${v}-mask`, role: "radiogroup", children: [
|
|
158
|
-
t.status === I.fail && /* @__PURE__ */ n("div", { className: `${v}-error-tip`, children: g.errorIcon !== null && /* @__PURE__ */ n("span", { className: `${s}-list-error-icon`, children: g.errorIcon || /* @__PURE__ */ n(Ee, {}) }) }),
|
|
159
|
-
/* @__PURE__ */ E("div", { className: `${v}-operation`, children: [
|
|
160
|
-
t.status !== I.fail && g.previewIcon !== null && /* @__PURE__ */ n(
|
|
161
|
-
"span",
|
|
162
|
-
{
|
|
163
|
-
className: `${s}-list-preview-icon`,
|
|
164
|
-
tabIndex: 0,
|
|
165
|
-
role: "button",
|
|
166
|
-
"aria-label": i.Upload.preview,
|
|
167
|
-
...o({
|
|
168
|
-
onPressEnter: () => {
|
|
169
|
-
var l;
|
|
170
|
-
(l = e.onPreview) == null || l.call(e, t);
|
|
171
|
-
}
|
|
172
|
-
}),
|
|
173
|
-
onClick: () => {
|
|
174
|
-
var l;
|
|
175
|
-
(l = e.onPreview) == null || l.call(e, t);
|
|
176
|
-
},
|
|
177
|
-
children: g.previewIcon || /* @__PURE__ */ n(Pe, {})
|
|
178
|
-
}
|
|
179
|
-
),
|
|
180
|
-
t.status === I.fail && g.reuploadIcon !== null && /* @__PURE__ */ n(
|
|
181
|
-
"span",
|
|
182
|
-
{
|
|
183
|
-
className: `${e.prefixCls}-list-reupload-icon`,
|
|
184
|
-
onClick: () => {
|
|
185
|
-
var l;
|
|
186
|
-
(l = e.onReupload) == null || l.call(e, t);
|
|
187
|
-
},
|
|
188
|
-
tabIndex: 0,
|
|
189
|
-
role: "button",
|
|
190
|
-
"aria-label": i.Upload.reupload,
|
|
191
|
-
...o({
|
|
192
|
-
onPressEnter: () => {
|
|
193
|
-
var l;
|
|
194
|
-
(l = e.onReupload) == null || l.call(e, t);
|
|
195
|
-
}
|
|
196
|
-
}),
|
|
197
|
-
children: g.reuploadIcon || /* @__PURE__ */ n(oe, {})
|
|
198
|
-
}
|
|
199
|
-
),
|
|
200
|
-
!u && g.removeIcon !== null && /* @__PURE__ */ n(
|
|
201
|
-
"span",
|
|
202
|
-
{
|
|
203
|
-
className: `${s}-list-remove-icon`,
|
|
204
|
-
onClick: () => {
|
|
205
|
-
var l;
|
|
206
|
-
(l = e.onRemove) == null || l.call(e, t);
|
|
207
|
-
},
|
|
208
|
-
role: "button",
|
|
209
|
-
"aria-label": i.Upload.delete,
|
|
210
|
-
tabIndex: 0,
|
|
211
|
-
...o({
|
|
212
|
-
onPressEnter: () => {
|
|
213
|
-
var l;
|
|
214
|
-
(l = e.onRemove) == null || l.call(e, t);
|
|
215
|
-
}
|
|
216
|
-
}),
|
|
217
|
-
children: g.removeIcon || /* @__PURE__ */ n(be, {})
|
|
218
|
-
}
|
|
219
|
-
)
|
|
220
|
-
] })
|
|
221
|
-
] })
|
|
222
|
-
] }) });
|
|
223
|
-
}, _e = Q(Ge), Be = (e) => {
|
|
224
|
-
let c = "";
|
|
225
|
-
if (e.originFile && e.originFile.type)
|
|
226
|
-
c = e.originFile.type;
|
|
227
|
-
else {
|
|
228
|
-
const s = (e.name || "").split(".").pop() || "";
|
|
229
|
-
c = s, ["png", "jpg", "jpeg", "bmp", "gif"].indexOf(s) > -1 ? c = "image" : ["mp4", "m2v", "mkv"].indexOf(s) > -1 ? c = "video" : ["mp3", "wav", "wmv"].indexOf(s) > -1 && (c = "audio");
|
|
230
|
-
}
|
|
231
|
-
return c.indexOf("image") > -1 ? ye : c.indexOf("pdf") > -1 ? je : c.indexOf("audio") > -1 ? Se : c.indexOf("video") > -1 ? qe : Oe;
|
|
232
|
-
}, Ke = (e, c) => {
|
|
233
|
-
const { prefixCls: u, disabled: s, file: t, locale: r } = e, i = `${u}-list-item-text`, o = Y(), v = Be(t), U = ae(e.showUploadList) ? e.showUploadList : {}, y = ae(U) ? U : {}, x = t.name || t.originFile && t.originFile.name, [w, g] = A(t.url);
|
|
234
|
-
let l = {};
|
|
235
|
-
return t.status !== I.fail && (l = {
|
|
236
|
-
popupVisible: !1
|
|
237
|
-
}), _(() => {
|
|
238
|
-
if (t.url !== void 0)
|
|
239
|
-
g(t.url);
|
|
240
|
-
else {
|
|
241
|
-
const d = t.originFile;
|
|
242
|
-
d && ve(d).then((m) => {
|
|
243
|
-
g(m);
|
|
244
|
-
}).catch((m) => {
|
|
245
|
-
console.error(m);
|
|
246
|
-
}).finally(() => {
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
return () => {
|
|
250
|
-
};
|
|
251
|
-
}, [t.url, t.originFile]), _(() => {
|
|
252
|
-
var d;
|
|
253
|
-
return (d = e.onChange) == null || d.call(e, { type: "url", data: w }), () => {
|
|
254
|
-
var m;
|
|
255
|
-
(m = e.onChange) == null || m.call(e, { type: "url", data: void 0 });
|
|
256
|
-
};
|
|
257
|
-
}, [w]), /* @__PURE__ */ E(
|
|
258
|
-
"div",
|
|
259
|
-
{
|
|
260
|
-
className: `${u}-list-item ${u}-list-item-${t.status}`,
|
|
261
|
-
ref: c,
|
|
262
|
-
children: [
|
|
263
|
-
/* @__PURE__ */ E("div", { className: i, children: [
|
|
264
|
-
e.listType === "picture-list" && /* @__PURE__ */ n("div", { className: `${i}-thumbnail`, children: O(U.imageRender) ? U.imageRender(t) : /* @__PURE__ */ n("img", { src: w }) }),
|
|
265
|
-
/* @__PURE__ */ E("div", { className: `${i}-content`, children: [
|
|
266
|
-
/* @__PURE__ */ E("div", { className: `${i}-name`, children: [
|
|
267
|
-
e.listType === "text" && y.fileIcon !== null && /* @__PURE__ */ n("span", { className: `${u}-list-file-icon`, children: y.fileIcon || /* @__PURE__ */ n(v, {}) }),
|
|
268
|
-
O(U.fileName) ? /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: U.fileName(t) }) : t.url ? /* @__PURE__ */ n(
|
|
269
|
-
"a",
|
|
270
|
-
{
|
|
271
|
-
href: t.url,
|
|
272
|
-
target: "_blank",
|
|
273
|
-
rel: "noreferrer",
|
|
274
|
-
className: `${i}-name-link`,
|
|
275
|
-
children: x
|
|
276
|
-
}
|
|
277
|
-
) : /* @__PURE__ */ n("span", { className: `${i}-name-text`, children: x }),
|
|
278
|
-
t.status === I.fail && y.errorIcon !== null && /* @__PURE__ */ n(
|
|
279
|
-
re,
|
|
280
|
-
{
|
|
281
|
-
content: (typeof t.response == "object" ? $e(t.response) && t.response : t.response) || r.Upload.error,
|
|
282
|
-
...l,
|
|
283
|
-
disabled: t.status !== I.fail,
|
|
284
|
-
children: /* @__PURE__ */ n("span", { className: `${e.prefixCls}-list-error-icon`, children: y.errorIcon || (e.listType === "picture-card" ? /* @__PURE__ */ n(ye, {}) : /* @__PURE__ */ n(ke, {})) })
|
|
285
|
-
}
|
|
286
|
-
)
|
|
287
|
-
] }),
|
|
288
|
-
/* @__PURE__ */ n(
|
|
289
|
-
Ue,
|
|
290
|
-
{
|
|
291
|
-
file: t,
|
|
292
|
-
prefixCls: u,
|
|
293
|
-
progressProps: e.progressProps,
|
|
294
|
-
onReupload: e.onReupload,
|
|
295
|
-
onUpload: e.onUpload,
|
|
296
|
-
onAbort: e.onAbort,
|
|
297
|
-
...y
|
|
298
|
-
}
|
|
299
|
-
)
|
|
300
|
-
] })
|
|
301
|
-
] }),
|
|
302
|
-
/* @__PURE__ */ n("div", { className: `${u}-list-item-operation`, children: !s && y.removeIcon !== null && /* @__PURE__ */ n(
|
|
303
|
-
Ie,
|
|
304
|
-
{
|
|
305
|
-
className: `${u}-list-remove-icon-hover`,
|
|
306
|
-
onClick: () => {
|
|
307
|
-
var d;
|
|
308
|
-
(d = e.onRemove) == null || d.call(e, t);
|
|
309
|
-
},
|
|
310
|
-
tabIndex: 0,
|
|
311
|
-
"aria-label": r.Upload.delete,
|
|
312
|
-
...o({
|
|
313
|
-
onPressEnter: () => {
|
|
314
|
-
var d;
|
|
315
|
-
(d = e.onRemove) == null || d.call(e, t);
|
|
316
|
-
}
|
|
317
|
-
}),
|
|
318
|
-
children: /* @__PURE__ */ n("span", { className: `${u}-list-remove-icon`, children: y.removeIcon || /* @__PURE__ */ n(be, {}) })
|
|
319
|
-
}
|
|
320
|
-
) })
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
);
|
|
324
|
-
}, ze = Q(Ke), xe = (e) => {
|
|
325
|
-
const { locale: c, rtl: u } = M(W), {
|
|
326
|
-
listType: s,
|
|
327
|
-
fileList: t,
|
|
328
|
-
renderUploadList: r,
|
|
329
|
-
renderUploadItem: i,
|
|
330
|
-
prefixCls: o,
|
|
331
|
-
...v
|
|
332
|
-
} = e, [U, y] = A(-1), [x, w] = A([]);
|
|
333
|
-
if (O(r))
|
|
334
|
-
return /* @__PURE__ */ n("div", { className: `${o}-list`, children: r(t, v) });
|
|
335
|
-
const g = (d) => {
|
|
336
|
-
e.imagePreview && y(d);
|
|
337
|
-
};
|
|
338
|
-
function l(d, m, b) {
|
|
339
|
-
(d == null ? void 0 : d.type) === "url" && [I.init, I.success].indexOf(b.status) > -1 && w((a) => {
|
|
340
|
-
const L = [...a];
|
|
341
|
-
return L[m] = d.data, L.filter(Boolean);
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
return _(() => () => {
|
|
345
|
-
}, []), /* @__PURE__ */ E(z, { children: [
|
|
346
|
-
/* @__PURE__ */ n(
|
|
347
|
-
Ne,
|
|
348
|
-
{
|
|
349
|
-
className: X(
|
|
350
|
-
`${o}-list`,
|
|
351
|
-
`${o}-list-type-${s}`,
|
|
352
|
-
{
|
|
353
|
-
[`${o}-list-rtl`]: u
|
|
354
|
-
}
|
|
355
|
-
),
|
|
356
|
-
children: t.map((d, m) => {
|
|
357
|
-
let b = s === "picture-card" ? /* @__PURE__ */ n(
|
|
358
|
-
"div",
|
|
359
|
-
{
|
|
360
|
-
className: `${o}-list-item ${o}-list-item-${d.status}`,
|
|
361
|
-
children: /* @__PURE__ */ n(
|
|
362
|
-
_e,
|
|
363
|
-
{
|
|
364
|
-
...e,
|
|
365
|
-
onPreview: (a) => {
|
|
366
|
-
var L;
|
|
367
|
-
g(m), (L = e.onPreview) == null || L.call(e, a);
|
|
368
|
-
},
|
|
369
|
-
file: d,
|
|
370
|
-
locale: c,
|
|
371
|
-
onChange: (a) => {
|
|
372
|
-
l(a, m, d);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
)
|
|
376
|
-
}
|
|
377
|
-
) : /* @__PURE__ */ n(
|
|
378
|
-
ze,
|
|
379
|
-
{
|
|
380
|
-
...e,
|
|
381
|
-
file: d,
|
|
382
|
-
locale: c,
|
|
383
|
-
onChange: (a) => {
|
|
384
|
-
l(a, m, d);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
);
|
|
388
|
-
return O(i) && (b = i(b, d, t)), s === "picture-card" ? /* @__PURE__ */ n(
|
|
389
|
-
ne,
|
|
390
|
-
{
|
|
391
|
-
timeout: { enter: 200, exit: 400 },
|
|
392
|
-
classNames: `${o}-slide-inline`,
|
|
393
|
-
onEntered: (a) => {
|
|
394
|
-
a && (a.style.width = "");
|
|
395
|
-
},
|
|
396
|
-
onExit: (a) => {
|
|
397
|
-
a && (a.style.width = `${a.scrollWidth}px`);
|
|
398
|
-
},
|
|
399
|
-
onExiting: (a) => {
|
|
400
|
-
a && (a.style.width = 0);
|
|
401
|
-
},
|
|
402
|
-
onExited: (a) => {
|
|
403
|
-
a && (a.style.width = 0);
|
|
404
|
-
},
|
|
405
|
-
children: b
|
|
406
|
-
},
|
|
407
|
-
d.uid
|
|
408
|
-
) : /* @__PURE__ */ n(
|
|
409
|
-
ne,
|
|
410
|
-
{
|
|
411
|
-
timeout: { enter: 200, exit: 400 },
|
|
412
|
-
classNames: `${o}-slide-up`,
|
|
413
|
-
onExit: (a) => {
|
|
414
|
-
a && (a.style.height = `${a.scrollHeight}px`);
|
|
415
|
-
},
|
|
416
|
-
onExiting: (a) => {
|
|
417
|
-
a && (a.style.height = 0);
|
|
418
|
-
},
|
|
419
|
-
onExited: (a) => {
|
|
420
|
-
a && (a.style.height = 0);
|
|
421
|
-
},
|
|
422
|
-
children: b
|
|
423
|
-
},
|
|
424
|
-
d.uid
|
|
425
|
-
);
|
|
426
|
-
})
|
|
427
|
-
}
|
|
428
|
-
),
|
|
429
|
-
s === "picture-card" && e.imagePreview && /* @__PURE__ */ n(
|
|
430
|
-
Fe,
|
|
431
|
-
{
|
|
432
|
-
srcList: x,
|
|
433
|
-
visible: U !== -1,
|
|
434
|
-
current: U,
|
|
435
|
-
onChange: g,
|
|
436
|
-
onVisibleChange: (d) => {
|
|
437
|
-
g(d ? U : -1);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
)
|
|
441
|
-
] });
|
|
442
|
-
};
|
|
443
|
-
xe.displayName = "FileList";
|
|
444
|
-
const se = (e, c) => {
|
|
445
|
-
const u = le(c) ? c == null ? void 0 : c.type : c;
|
|
446
|
-
if (!(le(c) && c.strict === !1) && u && e) {
|
|
447
|
-
const t = He(u) ? u : u.split(",").map((i) => i.trim()).filter((i) => i), r = (e.name.indexOf(".") > -1 ? `.${e.name.split(".").pop()}` : "").toLowerCase();
|
|
448
|
-
return t.some((i) => {
|
|
449
|
-
const o = i && i.toLowerCase(), v = (e.type || "").toLowerCase(), U = v.split("/")[0];
|
|
450
|
-
if (o === v || `${U}${r.replace(".", "/")}` === o || /^\*(\/\*)?$/.test(o))
|
|
451
|
-
return !0;
|
|
452
|
-
if (/\/\*/.test(o))
|
|
453
|
-
return v.replace(/\/.*$/, "") === o.replace(/\/.*$/, "");
|
|
454
|
-
if (/\..*/.test(o)) {
|
|
455
|
-
let y = [o];
|
|
456
|
-
return (o === ".jpg" || o === ".jpeg") && (y = [".jpg", ".jpeg"]), y.indexOf(r) > -1;
|
|
457
|
-
}
|
|
458
|
-
return !1;
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
return !!e;
|
|
462
|
-
}, Me = (e, c) => {
|
|
463
|
-
if (!e)
|
|
464
|
-
return;
|
|
465
|
-
let u = [].slice.call(e);
|
|
466
|
-
return c && (u = u.filter((s) => se(s, c))), u;
|
|
467
|
-
}, We = (e, c, u) => {
|
|
468
|
-
const s = [];
|
|
469
|
-
let t = 0;
|
|
470
|
-
const r = () => {
|
|
471
|
-
!t && u(s);
|
|
472
|
-
}, i = (v) => {
|
|
473
|
-
if (t += 1, v != null && v.isFile) {
|
|
474
|
-
v.file((U) => {
|
|
475
|
-
t -= 1, se(U, c) && (Object.defineProperty(U, "webkitRelativePath", {
|
|
476
|
-
value: v.fullPath.replace(/^\//, "")
|
|
477
|
-
}), s.push(U)), r();
|
|
478
|
-
});
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
if (v != null && v.isDirectory) {
|
|
482
|
-
const U = v.createReader();
|
|
483
|
-
let y = !1;
|
|
484
|
-
const x = () => {
|
|
485
|
-
U.readEntries((w) => {
|
|
486
|
-
y || (t -= 1, y = !0), w.length === 0 ? r() : (x(), w.forEach(i));
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
x();
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
t -= 1, r();
|
|
493
|
-
};
|
|
494
|
-
[].slice.call(e).forEach((v) => {
|
|
495
|
-
v.webkitGetAsEntry && i(v.webkitGetAsEntry());
|
|
496
|
-
});
|
|
497
|
-
}, Je = (e, c) => {
|
|
498
|
-
const u = Y(), { locale: s } = M(W), [t, r] = A(!1), [i, o] = A(0), {
|
|
499
|
-
tip: v,
|
|
500
|
-
children: U,
|
|
501
|
-
disabled: y,
|
|
502
|
-
drag: x,
|
|
503
|
-
listType: w,
|
|
504
|
-
prefixCls: g,
|
|
505
|
-
accept: l,
|
|
506
|
-
multiple: d
|
|
507
|
-
} = e, m = {
|
|
508
|
-
disabled: y
|
|
509
|
-
};
|
|
510
|
-
return _(() => {
|
|
511
|
-
o(0);
|
|
512
|
-
}, [t]), U === null ? null : /* @__PURE__ */ n(
|
|
513
|
-
"div",
|
|
514
|
-
{
|
|
515
|
-
className: `${g}-trigger`,
|
|
516
|
-
onClick: y ? void 0 : e.onClick,
|
|
517
|
-
...u({
|
|
518
|
-
onPressEnter: () => {
|
|
519
|
-
var b;
|
|
520
|
-
!y && ((b = e.onClick) == null || b.call(e));
|
|
521
|
-
}
|
|
522
|
-
}),
|
|
523
|
-
ref: c,
|
|
524
|
-
onDragEnter: () => {
|
|
525
|
-
o(i + 1);
|
|
526
|
-
},
|
|
527
|
-
onDragLeave: (b) => {
|
|
528
|
-
var a;
|
|
529
|
-
b.preventDefault(), i === 0 ? (r(!1), !y && ((a = e.onDragLeave) == null || a.call(e, b))) : o(i - 1);
|
|
530
|
-
},
|
|
531
|
-
onDrop: (b) => {
|
|
532
|
-
var a, L;
|
|
533
|
-
if (b.preventDefault(), !y && e.drag !== !1) {
|
|
534
|
-
if (r(!1), e.directory)
|
|
535
|
-
We(b.dataTransfer.items, l, (S) => {
|
|
536
|
-
var T;
|
|
537
|
-
(T = e.onDragFiles) == null || T.call(e, S);
|
|
538
|
-
});
|
|
539
|
-
else {
|
|
540
|
-
const S = [].slice.call(b.dataTransfer.items || []).reduce((j, q, B) => {
|
|
541
|
-
if (q.webkitGetAsEntry) {
|
|
542
|
-
const R = q.webkitGetAsEntry();
|
|
543
|
-
return R != null && R.isDirectory ? [...j, B] : j;
|
|
544
|
-
}
|
|
545
|
-
}, []), T = [].slice.call(b.dataTransfer.files || []).filter((j, q) => !S.includes(q)), V = Me(T, l);
|
|
546
|
-
V.length > 0 && ((a = e.onDragFiles) == null || a.call(e, d ? V : V.slice(0, 1)));
|
|
547
|
-
}
|
|
548
|
-
(L = e.onDrop) == null || L.call(e, b);
|
|
549
|
-
}
|
|
550
|
-
},
|
|
551
|
-
onDragOver: (b) => {
|
|
552
|
-
var a;
|
|
553
|
-
b.preventDefault(), !y && !t && (r(!0), (a = e.onDragOver) == null || a.call(e, b));
|
|
554
|
-
},
|
|
555
|
-
children: te.isValidElement(U) ? /* @__PURE__ */ n(
|
|
556
|
-
"div",
|
|
557
|
-
{
|
|
558
|
-
className: X({ [`${g}-trigger-custom-active`]: t }),
|
|
559
|
-
children: te.cloneElement(U, m)
|
|
560
|
-
}
|
|
561
|
-
) : w === "picture-card" ? /* @__PURE__ */ n("div", { className: `${g}-trigger-picture-wrapper`, children: /* @__PURE__ */ n(
|
|
562
|
-
"div",
|
|
563
|
-
{
|
|
564
|
-
className: `${g}-trigger-picture`,
|
|
565
|
-
tabIndex: 0,
|
|
566
|
-
"aria-label": s.Upload.upload,
|
|
567
|
-
children: /* @__PURE__ */ n("div", { className: `${g}-trigger-picture-text`, children: /* @__PURE__ */ n(me, {}) })
|
|
568
|
-
}
|
|
569
|
-
) }) : x ? /* @__PURE__ */ E(
|
|
570
|
-
"div",
|
|
571
|
-
{
|
|
572
|
-
className: X(`${g}-trigger-drag`, {
|
|
573
|
-
[`${g}-trigger-drag-active`]: t
|
|
574
|
-
}),
|
|
575
|
-
tabIndex: 0,
|
|
576
|
-
"aria-label": s.Upload.drag,
|
|
577
|
-
children: [
|
|
578
|
-
/* @__PURE__ */ n(me, {}),
|
|
579
|
-
/* @__PURE__ */ n("p", { className: `${g}-trigger-drag-text`, children: t ? s.Upload.dragHover : s.Upload.drag }),
|
|
580
|
-
v && /* @__PURE__ */ n("div", { className: `${g}-trigger-tip`, children: v })
|
|
581
|
-
]
|
|
582
|
-
}
|
|
583
|
-
) : /* @__PURE__ */ E(
|
|
584
|
-
Ve,
|
|
585
|
-
{
|
|
586
|
-
...m,
|
|
587
|
-
"aria-label": s.Upload.upload,
|
|
588
|
-
type: "primary",
|
|
589
|
-
className: `${g}-trigger-with-icon`,
|
|
590
|
-
children: [
|
|
591
|
-
/* @__PURE__ */ n(oe, {}),
|
|
592
|
-
s.Upload.upload
|
|
593
|
-
]
|
|
594
|
-
}
|
|
595
|
-
)
|
|
596
|
-
}
|
|
597
|
-
);
|
|
598
|
-
}, Xe = Q(
|
|
599
|
-
Je
|
|
600
|
-
);
|
|
601
|
-
function fe(e) {
|
|
602
|
-
const c = e.responseText || e.response;
|
|
603
|
-
if (!c)
|
|
604
|
-
return c;
|
|
605
|
-
try {
|
|
606
|
-
return JSON.parse(c);
|
|
607
|
-
} catch {
|
|
608
|
-
return c;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
const Qe = function(e) {
|
|
612
|
-
const {
|
|
613
|
-
onProgress: c = p,
|
|
614
|
-
onError: u = p,
|
|
615
|
-
onSuccess: s = p,
|
|
616
|
-
action: t,
|
|
617
|
-
method: r,
|
|
618
|
-
headers: i = {},
|
|
619
|
-
name: o,
|
|
620
|
-
file: v,
|
|
621
|
-
data: U = {},
|
|
622
|
-
withCredentials: y = !1
|
|
623
|
-
} = e;
|
|
624
|
-
function x(m) {
|
|
625
|
-
return typeof m == "function" ? m(v) : m;
|
|
626
|
-
}
|
|
627
|
-
const w = x(o), g = x(U), l = new XMLHttpRequest();
|
|
628
|
-
c && l.upload && (l.upload.onprogress = function(m) {
|
|
629
|
-
let b;
|
|
630
|
-
m.total > 0 && (b = m.loaded / m.total * 100), c(parseInt(b, 10), m);
|
|
631
|
-
}), l.onerror = function(b) {
|
|
632
|
-
u(b);
|
|
633
|
-
}, l.onload = function() {
|
|
634
|
-
if (l.status < 200 || l.status >= 300)
|
|
635
|
-
return u(fe(l));
|
|
636
|
-
s(fe(l));
|
|
637
|
-
};
|
|
638
|
-
const d = new FormData();
|
|
639
|
-
g && Object.keys(g).map((m) => d.append(m, g[m])), d.append(w || "file", v), l.open(r, t, !0), y && "withCredentials" in l && (l.withCredentials = !0);
|
|
640
|
-
for (const m in i)
|
|
641
|
-
Object.prototype.hasOwnProperty.call(i, m) && i[m] !== null && l.setRequestHeader(m, i[m]);
|
|
642
|
-
return l.send(d), {
|
|
643
|
-
abort() {
|
|
644
|
-
l.abort();
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
|
-
function Ye(e, c) {
|
|
649
|
-
const { toAuthor: u } = M(W), s = ie(null), [t, r] = A({ uploadRequests: {} });
|
|
650
|
-
function i(f) {
|
|
651
|
-
w(f);
|
|
652
|
-
}
|
|
653
|
-
function o(f) {
|
|
654
|
-
var F;
|
|
655
|
-
const $ = t.uploadRequests[f.uid];
|
|
656
|
-
$ && ((F = $.abort) == null || F.call($), y({
|
|
657
|
-
...f,
|
|
658
|
-
status: I.fail
|
|
659
|
-
}), U(f.uid));
|
|
660
|
-
}
|
|
661
|
-
function v(f) {
|
|
662
|
-
w({
|
|
663
|
-
...f,
|
|
664
|
-
percent: 0,
|
|
665
|
-
status: I.uploading
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
function U(f) {
|
|
669
|
-
const $ = { ...t.uploadRequests };
|
|
670
|
-
delete $[f], r({
|
|
671
|
-
uploadRequests: $
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
he(c, () => ({
|
|
675
|
-
// 提供 ref 调用
|
|
676
|
-
upload: i,
|
|
677
|
-
abort: o,
|
|
678
|
-
reupload: v,
|
|
679
|
-
// 删除上传(手动上传时,文件会出现在上传列表,但属于init状态)
|
|
680
|
-
delete: U
|
|
681
|
-
}));
|
|
682
|
-
function y(f, $ = e.fileList) {
|
|
683
|
-
const { onFileStatusChange: F } = e, h = "uid" in f ? "uid" : "name";
|
|
684
|
-
F == null || F(
|
|
685
|
-
$.map((C) => C[h] === f[h] ? f : C),
|
|
686
|
-
f
|
|
687
|
-
);
|
|
688
|
-
}
|
|
689
|
-
function x(f) {
|
|
690
|
-
const $ = "uid" in f ? "uid" : "name";
|
|
691
|
-
return e.fileList.find((h) => h[$] === f[$]);
|
|
692
|
-
}
|
|
693
|
-
async function w(f) {
|
|
694
|
-
const {
|
|
695
|
-
action: $,
|
|
696
|
-
headers: F,
|
|
697
|
-
name: h,
|
|
698
|
-
data: C,
|
|
699
|
-
withCredentials: N,
|
|
700
|
-
customRequest: P,
|
|
701
|
-
method: G
|
|
702
|
-
} = e, ce = {
|
|
703
|
-
onProgress: (K, D) => {
|
|
704
|
-
var de;
|
|
705
|
-
const J = x(f);
|
|
706
|
-
J && (J.status = I.uploading, J.percent = K, (de = e == null ? void 0 : e.onProgress) == null || de.call(e, J, D));
|
|
707
|
-
},
|
|
708
|
-
onSuccess: (K) => {
|
|
709
|
-
const D = x(f);
|
|
710
|
-
D && (D.status = I.success, D.response = K, y(D)), U(f.uid);
|
|
711
|
-
},
|
|
712
|
-
onError: (K) => {
|
|
713
|
-
const D = x(f);
|
|
714
|
-
D && (D.status = I.fail, D.response = K, y(D)), U(f.uid);
|
|
715
|
-
},
|
|
716
|
-
headers: F,
|
|
717
|
-
name: h,
|
|
718
|
-
file: f.originFile,
|
|
719
|
-
data: C,
|
|
720
|
-
withCredentials: N
|
|
721
|
-
};
|
|
722
|
-
y(f);
|
|
723
|
-
let Z;
|
|
724
|
-
P ? Z = await P(ce) : $ && (Z = Qe({ ...ce, action: $, method: G })), r({
|
|
725
|
-
uploadRequests: {
|
|
726
|
-
...t.uploadRequests,
|
|
727
|
-
[f.uid]: Z
|
|
728
|
-
}
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
function g(f) {
|
|
732
|
-
const { limit: $, fileList: F, onExceedLimit: h, autoUpload: C } = e;
|
|
733
|
-
if (ge($) && $ < F.length + f.length)
|
|
734
|
-
return h == null ? void 0 : h(f, F);
|
|
735
|
-
const N = (P, G) => {
|
|
736
|
-
const k = e.fileList || [], H = {
|
|
737
|
-
uid: `${String(+/* @__PURE__ */ new Date())}${G}`,
|
|
738
|
-
originFile: P,
|
|
739
|
-
percent: 0,
|
|
740
|
-
status: I.init,
|
|
741
|
-
name: P.name
|
|
742
|
-
};
|
|
743
|
-
y(H), k.push(H), y(H, k), C && setTimeout(() => {
|
|
744
|
-
w({
|
|
745
|
-
...H,
|
|
746
|
-
status: I.uploading
|
|
747
|
-
});
|
|
748
|
-
}, 0);
|
|
749
|
-
};
|
|
750
|
-
f.forEach((P, G) => {
|
|
751
|
-
se(P, e.accept) && (O(e.beforeUpload) ? Promise.resolve(e.beforeUpload(P, f)).then((k) => {
|
|
752
|
-
if (k !== !1) {
|
|
753
|
-
const H = Ae(k) ? k : P;
|
|
754
|
-
N(H, G);
|
|
755
|
-
}
|
|
756
|
-
}).catch((k) => {
|
|
757
|
-
console.error(k);
|
|
758
|
-
}) : N(P, G));
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
const {
|
|
762
|
-
accept: l,
|
|
763
|
-
multiple: d,
|
|
764
|
-
children: m,
|
|
765
|
-
prefixCls: b,
|
|
766
|
-
tip: a,
|
|
767
|
-
disabled: L,
|
|
768
|
-
drag: S,
|
|
769
|
-
listType: T,
|
|
770
|
-
hide: V,
|
|
771
|
-
directory: j,
|
|
772
|
-
onDrop: q,
|
|
773
|
-
onDragOver: B,
|
|
774
|
-
onDragLeave: R
|
|
775
|
-
} = e;
|
|
776
|
-
return /* @__PURE__ */ E(z, { children: [
|
|
777
|
-
/* @__PURE__ */ n(
|
|
778
|
-
"input",
|
|
779
|
-
{
|
|
780
|
-
ref: s,
|
|
781
|
-
style: {
|
|
782
|
-
visibility: "hidden",
|
|
783
|
-
opacity: 0,
|
|
784
|
-
position: "fixed",
|
|
785
|
-
top: "-227px",
|
|
786
|
-
left: "-227px",
|
|
787
|
-
zIndex: -999999
|
|
788
|
-
},
|
|
789
|
-
type: "file",
|
|
790
|
-
accept: le(l) ? l == null ? void 0 : l.type : l,
|
|
791
|
-
multiple: d,
|
|
792
|
-
...j ? { webkitdirectory: "true" } : {},
|
|
793
|
-
onChange: (f) => {
|
|
794
|
-
const $ = f.target.files;
|
|
795
|
-
$ && (g([].slice.call($)), s.current.value = "");
|
|
796
|
-
},
|
|
797
|
-
onClick: (f) => {
|
|
798
|
-
f.stopPropagation();
|
|
799
|
-
}
|
|
800
|
-
},
|
|
801
|
-
"trigger-input"
|
|
802
|
-
),
|
|
803
|
-
/* @__PURE__ */ n(
|
|
804
|
-
ne,
|
|
805
|
-
{
|
|
806
|
-
in: !V,
|
|
807
|
-
timeout: 100,
|
|
808
|
-
unmountOnExit: !0,
|
|
809
|
-
classNames: "fadeIn",
|
|
810
|
-
children: /* @__PURE__ */ n(
|
|
811
|
-
Xe,
|
|
812
|
-
{
|
|
813
|
-
directory: j,
|
|
814
|
-
tip: a,
|
|
815
|
-
multiple: d,
|
|
816
|
-
accept: l,
|
|
817
|
-
disabled: L,
|
|
818
|
-
drag: S,
|
|
819
|
-
listType: T,
|
|
820
|
-
onDrop: q,
|
|
821
|
-
onDragOver: B,
|
|
822
|
-
onDragLeave: R,
|
|
823
|
-
onDragFiles: g,
|
|
824
|
-
onClick: () => {
|
|
825
|
-
var f, $;
|
|
826
|
-
!L && (($ = (f = s.current) == null ? void 0 : f.click) == null || $.call(f));
|
|
827
|
-
},
|
|
828
|
-
prefixCls: b,
|
|
829
|
-
children: O(m) ? m({ fileList: e.fileList }) : m
|
|
830
|
-
}
|
|
831
|
-
)
|
|
832
|
-
},
|
|
833
|
-
"trigger-node"
|
|
834
|
-
),
|
|
835
|
-
a && T !== "picture-card" && !S ? /* @__PURE__ */ n("div", { className: `${b}-trigger-tip`, children: a }, "trigger-tip") : null
|
|
836
|
-
] });
|
|
837
|
-
}
|
|
838
|
-
const Ze = te.forwardRef(Ye), ee = function(e) {
|
|
839
|
-
const c = [].concat(e || []).filter(Boolean);
|
|
840
|
-
return c.reduce((u, s, t) => {
|
|
841
|
-
if (s.uid) {
|
|
842
|
-
const r = c.findIndex(
|
|
843
|
-
(o) => s.uid === o.uid && s !== o
|
|
844
|
-
);
|
|
845
|
-
ue(r !== -1, "[Upload]: duplicate uid");
|
|
846
|
-
const i = {
|
|
847
|
-
status: I.success,
|
|
848
|
-
percent: 100,
|
|
849
|
-
...s
|
|
850
|
-
};
|
|
851
|
-
r === -1 ? u.push(i) : u.splice(r, 1, i);
|
|
852
|
-
} else {
|
|
853
|
-
ue(!0, "[Upload]: uid is required");
|
|
854
|
-
const r = `${String(+/* @__PURE__ */ new Date())}${t}`;
|
|
855
|
-
u.push({
|
|
856
|
-
uid: r,
|
|
857
|
-
status: I.success,
|
|
858
|
-
percent: 100,
|
|
859
|
-
...s
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
return u;
|
|
863
|
-
}, []);
|
|
864
|
-
}, pe = {
|
|
865
|
-
listType: "text",
|
|
866
|
-
autoUpload: !0,
|
|
867
|
-
showUploadList: !0,
|
|
868
|
-
beforeUpload: () => !0,
|
|
869
|
-
method: "post"
|
|
870
|
-
}, et = (e, c) => {
|
|
871
|
-
const { getPrefixCls: u, componentConfig: s, rtl: t } = M(W), r = we(
|
|
872
|
-
e,
|
|
873
|
-
pe,
|
|
874
|
-
s == null ? void 0 : s.Upload
|
|
875
|
-
), i = u("upload"), o = ie(), v = ie(), [U, y] = A(() => "fileList" in r ? ee(r.fileList) : "defaultFileList" in r ? ee(r.defaultFileList) : []), x = "fileList" in r ? ee(r.fileList) : U, w = (h, C) => {
|
|
876
|
-
var N;
|
|
877
|
-
"fileList" in r || y(h), (N = r.onChange) == null || N.call(r, h, C);
|
|
878
|
-
}, g = (h) => {
|
|
879
|
-
h && setTimeout(() => {
|
|
880
|
-
o.current && o.current.upload(h);
|
|
881
|
-
}, 0);
|
|
882
|
-
}, l = (h) => {
|
|
883
|
-
var C;
|
|
884
|
-
o.current && o.current.reupload(h), (C = r.onReupload) == null || C.call(r, h);
|
|
885
|
-
}, d = (h) => {
|
|
886
|
-
if (h) {
|
|
887
|
-
const { onRemove: C } = r;
|
|
888
|
-
Promise.resolve(
|
|
889
|
-
O(C) ? C(h, x) : C
|
|
890
|
-
).then((N) => {
|
|
891
|
-
N !== !1 && (o.current && o.current.abort(h), w(
|
|
892
|
-
x.filter((P) => P.uid !== h.uid),
|
|
893
|
-
h
|
|
894
|
-
));
|
|
895
|
-
}).catch((N) => {
|
|
896
|
-
console.error(N);
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
}, m = (h) => {
|
|
900
|
-
h && o.current && o.current.abort(h);
|
|
901
|
-
};
|
|
902
|
-
he(c, () => ({
|
|
903
|
-
submit: (h) => {
|
|
904
|
-
let C = [];
|
|
905
|
-
h ? C = [h] : C = x.filter((N) => N.status === I.init), C.forEach((N) => {
|
|
906
|
-
g(N);
|
|
907
|
-
});
|
|
908
|
-
},
|
|
909
|
-
// file: fileList中的file对象
|
|
910
|
-
abort: (h) => {
|
|
911
|
-
m(h);
|
|
912
|
-
},
|
|
913
|
-
// file: fileList中的file对象
|
|
914
|
-
reupload: (h) => {
|
|
915
|
-
l(h);
|
|
916
|
-
},
|
|
917
|
-
getRootDOMNode: () => v.current
|
|
918
|
-
}));
|
|
919
|
-
const {
|
|
920
|
-
listType: b,
|
|
921
|
-
className: a,
|
|
922
|
-
style: L,
|
|
923
|
-
renderUploadItem: S,
|
|
924
|
-
showUploadList: T,
|
|
925
|
-
renderUploadList: V,
|
|
926
|
-
progressProps: j,
|
|
927
|
-
imagePreview: q,
|
|
928
|
-
...B
|
|
929
|
-
} = r, R = ge(r.limit) ? { hideOnExceedLimit: !0, maxCount: r.limit } : { hideOnExceedLimit: !0, ...r.limit }, f = R.maxCount && R.maxCount <= x.length, $ = "disabled" in r ? r.disabled : !R.hideOnExceedLimit && f, F = /* @__PURE__ */ n(
|
|
930
|
-
"div",
|
|
931
|
-
{
|
|
932
|
-
...Ce(B, [
|
|
933
|
-
"disabled",
|
|
934
|
-
"directory",
|
|
935
|
-
"onReupload",
|
|
936
|
-
"defaultFileList",
|
|
937
|
-
"fileList",
|
|
938
|
-
"autoUpload",
|
|
939
|
-
"error",
|
|
940
|
-
"action",
|
|
941
|
-
"method",
|
|
942
|
-
"multiple",
|
|
943
|
-
"name",
|
|
944
|
-
"accept",
|
|
945
|
-
"customRequest",
|
|
946
|
-
"children",
|
|
947
|
-
"autoUpload",
|
|
948
|
-
"limit",
|
|
949
|
-
"drag",
|
|
950
|
-
"tip",
|
|
951
|
-
"headers",
|
|
952
|
-
"data",
|
|
953
|
-
"withCredentials",
|
|
954
|
-
"onChange",
|
|
955
|
-
"onPreview",
|
|
956
|
-
"onRemove",
|
|
957
|
-
"onProgress",
|
|
958
|
-
"onExceedLimit",
|
|
959
|
-
"beforeUpload",
|
|
960
|
-
"onDrop",
|
|
961
|
-
"onDragOver",
|
|
962
|
-
"onDragLeave"
|
|
963
|
-
]),
|
|
964
|
-
className: X(
|
|
965
|
-
i,
|
|
966
|
-
{
|
|
967
|
-
[`${i}-type-${b}`]: b,
|
|
968
|
-
[`${i}-drag`]: r.drag,
|
|
969
|
-
[`${i}-disabled`]: $,
|
|
970
|
-
[`${i}-hide`]: R.hideOnExceedLimit && f,
|
|
971
|
-
[`${i}-rtl`]: t
|
|
972
|
-
},
|
|
973
|
-
a
|
|
974
|
-
),
|
|
975
|
-
style: L,
|
|
976
|
-
ref: v,
|
|
977
|
-
children: /* @__PURE__ */ n(
|
|
978
|
-
Ze,
|
|
979
|
-
{
|
|
980
|
-
ref: o,
|
|
981
|
-
...r,
|
|
982
|
-
limit: R.maxCount,
|
|
983
|
-
hide: R.hideOnExceedLimit && f,
|
|
984
|
-
disabled: $,
|
|
985
|
-
prefixCls: i,
|
|
986
|
-
fileList: x,
|
|
987
|
-
onProgress: (h, C) => {
|
|
988
|
-
var N;
|
|
989
|
-
h && ("fileList" in r || y(
|
|
990
|
-
x.map((P) => P.uid === h.uid ? h : P)
|
|
991
|
-
), (N = r.onProgress) == null || N.call(r, h, C));
|
|
992
|
-
},
|
|
993
|
-
onFileStatusChange: w
|
|
994
|
-
}
|
|
995
|
-
)
|
|
996
|
-
}
|
|
997
|
-
);
|
|
998
|
-
return /* @__PURE__ */ E(z, { children: [
|
|
999
|
-
b !== "picture-card" && F,
|
|
1000
|
-
T && /* @__PURE__ */ n(
|
|
1001
|
-
xe,
|
|
1002
|
-
{
|
|
1003
|
-
imagePreview: q,
|
|
1004
|
-
progressProps: j,
|
|
1005
|
-
showUploadList: T,
|
|
1006
|
-
disabled: r.disabled,
|
|
1007
|
-
listType: b,
|
|
1008
|
-
fileList: x,
|
|
1009
|
-
renderUploadItem: S,
|
|
1010
|
-
renderUploadList: V,
|
|
1011
|
-
onUpload: g,
|
|
1012
|
-
onAbort: m,
|
|
1013
|
-
onRemove: d,
|
|
1014
|
-
onReupload: l,
|
|
1015
|
-
onPreview: r.onPreview,
|
|
1016
|
-
prefixCls: i
|
|
1017
|
-
}
|
|
1018
|
-
),
|
|
1019
|
-
b === "picture-card" && F,
|
|
1020
|
-
r.tip && b === "picture-card" && /* @__PURE__ */ n("div", { className: `${i}-trigger-tip`, children: r.tip })
|
|
1021
|
-
] });
|
|
1022
|
-
}, tt = Q(
|
|
1023
|
-
et
|
|
1024
|
-
);
|
|
1025
|
-
tt.displayName = "Upload";
|
|
1026
|
-
export {
|
|
1027
|
-
xe as F,
|
|
1028
|
-
I as S,
|
|
1029
|
-
tt as U
|
|
1030
|
-
};
|