@unicom-cloud/ui 0.8.109 → 0.8.111
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 +2 -2
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +6 -4
- package/Countdown.js +42 -8
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +42 -6
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +43 -7
- package/Form.js +21 -16
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +2 -2
- package/LiquidFill.js +12 -10
- package/List.js +1 -1
- package/Loading.js +42 -6
- package/Marquee.js +12 -10
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +41 -5
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +12 -10
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +19 -0
- package/Segmented.js +42 -7
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +43 -7
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +2 -2
- package/Tooltip.js +1 -1
- package/Tour.js +13 -11
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/affix/index.js +2 -2
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +2 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +2 -2
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +3 -3
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +2 -2
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/BDMqvmVH.js +4239 -0
- package/chunk/BDgzrqDN.js +154 -0
- package/chunk/BG6j6Ct7.js +30 -0
- package/chunk/BGJspFG9.js +56 -0
- package/chunk/BO_5qdS_.js +13 -0
- package/chunk/{DblEjsQ8.js → BUNoUPLs.js} +1 -1
- package/chunk/B_c0gPsX.js +83 -0
- package/chunk/BcEZk8pT.js +837 -0
- package/chunk/{DGSfSsAY.js → BeHcDey_.js} +1 -1
- package/chunk/{B9YvSTvI.js → BlflTd2i.js} +695 -856
- package/chunk/{Bm3gJPkz.js → BnUWOu3_.js} +5 -5
- package/chunk/Bvxzb1wd.js +16 -0
- package/chunk/{DryCfcSV.js → CFyN9Eio.js} +4 -4
- package/chunk/CN7NKv_2.js +11 -0
- package/chunk/{BDKb_-wj.js → COsRZOz1.js} +4 -4
- package/chunk/CT7ury1Z.js +13 -0
- package/chunk/Ca6eMq_Y.js +8 -0
- package/chunk/{p9jiLDTk.js → CgN4U7Ou.js} +2 -2
- package/chunk/{Bg3uJGPu.js → CsqGBZv1.js} +1 -1
- package/chunk/CylJZkp8.js +6 -0
- package/chunk/{9WWq1a0I.js → DSqW_efI.js} +1 -1
- package/chunk/{Bz3KT4sO.js → Dbw0YUY1.js} +81 -47
- package/chunk/Dh-zFF65.js +15 -0
- package/chunk/Di5KBCVQ.js +4 -0
- package/chunk/{DjPTURUf.js → Lyh0cz3R.js} +3 -3
- package/chunk/{DgWzb7M5.js → Y_GQsZUt.js} +1 -1
- package/chunk/{BfBHo0RR.js → n1tirBXA.js} +7 -7
- package/chunk/{DYc9a7tm.js → qsVvkBLU.js} +1 -1
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +10 -8
- package/countdown/index.js +67 -33
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +74 -38
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +63 -29
- package/form/Form.js +3 -3
- package/form/FormItem.js +1 -1
- package/form/index.js +85 -77
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +123 -129
- package/hooks/useCreation.js +4 -0
- package/hooks/useId.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWatch.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +3 -3
- package/image/ImagePreview.js +44 -9
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +470 -470
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +3 -3
- package/input/InputElement.js +2 -2
- package/input/Password.js +2 -2
- package/input/Search.js +1 -1
- package/input/Textarea.js +2 -2
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +2 -2
- package/liquid-fill/index.js +17 -15
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +54 -18
- package/marquee/index.js +19 -17
- package/marquee-/index.js +17 -15
- package/mentions/index.js +1 -1
- package/menu/Menu.js +4 -4
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +4 -3
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +41 -5
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +120 -81
- package/pagination/PageItem.js +2 -2
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +2 -2
- package/progress/index.js +1 -1
- package/qr-code/index.js +15 -13
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/constant.js +5 -0
- package/rich-text/core.js +11 -0
- package/rich-text/index.js +119 -0
- package/rich-text/interface.js +1 -0
- package/rich-text/rich.js +1877 -0
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/segmented/index.js +145 -110
- package/select/Option.js +1 -1
- package/select/Select.js +235 -227
- package/select-view/Core.js +2 -2
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/index.js +1 -1
- package/space/index.js +51 -15
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +2 -2
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +3 -3
- package/table/index.js +41 -39
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +2 -2
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +20 -18
- package/transfer/Item.js +3 -3
- package/transfer/List.js +3 -3
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +4 -4
- package/tree-select/index.js +1 -1
- package/trigger/index.js +1 -1
- package/types/common/hooks/src/index.d.ts +1 -5
- package/types/common/hooks/src/use-url-state/index.d.ts +1 -1
- package/types/common/hooks/useId.d.ts +1 -1
- package/types/common/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/common/hooks/useKeyboardEvent.d.ts +1 -1
- package/types/common/hooks/{useListenResize.d.ts → useListenWindowResize.d.ts} +4 -6
- package/types/common/hooks/useWatch.d.ts +1 -1
- package/types/common/hooks/useWindowSize.d.ts +2 -2
- package/types/common/utils/index.d.ts +47 -0
- package/types/common/utils/keyboardCode.d.ts +4 -0
- package/types/common/utils/math.d.ts +1 -0
- package/types/common/utils/mitt.d.ts +1 -0
- package/types/common/utils/pinyin.d.ts +1 -0
- package/types/common/utils/reactTransitionGroup.d.ts +1 -0
- package/types/common/utils/uuid.d.ts +1 -0
- package/types/common/utils/validate.d.ts +1 -0
- package/types/pc/config-provider/interface.d.ts +2 -0
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/form/index.d.ts +6 -1
- package/types/pc/hooks/index.d.ts +2 -2
- package/types/pc/hooks/useCreation.d.ts +1 -0
- package/types/pc/hooks/useListenWindowResize.d.ts +1 -0
- package/types/pc/index.d.ts +2 -0
- package/types/pc/message/index.d.ts +1 -0
- package/types/pc/message/interface.d.ts +2 -2
- package/types/pc/page-header/interface.d.ts +3 -0
- package/types/pc/rich-text/blots/block.d.ts +34 -0
- package/types/pc/rich-text/blots/break.d.ts +8 -0
- package/types/pc/rich-text/blots/container.d.ts +4 -0
- package/types/pc/rich-text/blots/cursor.d.ts +26 -0
- package/types/pc/rich-text/blots/embed.d.ts +18 -0
- package/types/pc/rich-text/blots/inline.d.ts +12 -0
- package/types/pc/rich-text/blots/scroll.d.ts +49 -0
- package/types/pc/rich-text/blots/text.d.ts +5 -0
- package/types/pc/rich-text/constant.d.ts +1 -0
- package/types/pc/rich-text/core/composition.d.ts +12 -0
- package/types/pc/rich-text/core/editor.d.ts +28 -0
- package/types/pc/rich-text/core/emitter.d.ts +37 -0
- package/types/pc/rich-text/core/instances.d.ts +3 -0
- package/types/pc/rich-text/core/logger.d.ts +7 -0
- package/types/pc/rich-text/core/module.d.ts +8 -0
- package/types/pc/rich-text/core/rich.d.ts +217 -0
- package/types/pc/rich-text/core/selection.d.ts +74 -0
- package/types/pc/rich-text/core/theme.d.ts +32 -0
- package/types/pc/rich-text/core/utils/createRegistryWithFormats.d.ts +5 -0
- package/types/pc/rich-text/core/utils/scrollRectIntoView.d.ts +11 -0
- package/types/pc/rich-text/core.d.ts +7 -0
- package/types/pc/rich-text/delta/AttributeMap.d.ts +10 -0
- package/types/pc/rich-text/delta/Op.d.ts +11 -0
- package/types/pc/rich-text/delta/OpIterator.d.ts +13 -0
- package/types/pc/rich-text/delta/index.d.ts +45 -0
- package/types/pc/rich-text/formats/align.d.ts +5 -0
- package/types/pc/rich-text/formats/background.d.ts +5 -0
- package/types/pc/rich-text/formats/blockquote.d.ts +6 -0
- package/types/pc/rich-text/formats/bold.d.ts +11 -0
- package/types/pc/rich-text/formats/code.d.ts +15 -0
- package/types/pc/rich-text/formats/color.d.ts +7 -0
- package/types/pc/rich-text/formats/direction.d.ts +5 -0
- package/types/pc/rich-text/formats/font.d.ts +7 -0
- package/types/pc/rich-text/formats/formula.d.ts +10 -0
- package/types/pc/rich-text/formats/header.d.ts +7 -0
- package/types/pc/rich-text/formats/image.d.ts +13 -0
- package/types/pc/rich-text/formats/indent.d.ts +8 -0
- package/types/pc/rich-text/formats/italic.d.ts +6 -0
- package/types/pc/rich-text/formats/link.d.ts +13 -0
- package/types/pc/rich-text/formats/list.d.ts +13 -0
- package/types/pc/rich-text/formats/script.d.ts +8 -0
- package/types/pc/rich-text/formats/size.d.ts +4 -0
- package/types/pc/rich-text/formats/strike.d.ts +6 -0
- package/types/pc/rich-text/formats/table.d.ts +45 -0
- package/types/pc/rich-text/formats/underline.d.ts +6 -0
- package/types/pc/rich-text/formats/video.d.ts +14 -0
- package/types/pc/rich-text/index.d.ts +6 -0
- package/types/pc/rich-text/interface.d.ts +17 -0
- package/types/pc/rich-text/modules/clipboard.d.ts +43 -0
- package/types/pc/rich-text/modules/history.d.ts +36 -0
- package/types/pc/rich-text/modules/input.d.ts +10 -0
- package/types/pc/rich-text/modules/keyboard.d.ts +58 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/index.d.ts +2 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
- package/types/pc/rich-text/modules/syntax.d.ts +50 -0
- package/types/pc/rich-text/modules/table.d.ts +20 -0
- package/types/pc/rich-text/modules/tableEmbed.d.ts +27 -0
- package/types/pc/rich-text/modules/toolbar.d.ts +24 -0
- package/types/pc/rich-text/modules/uiNode.d.ts +19 -0
- package/types/pc/rich-text/modules/uploader.d.ts +15 -0
- package/types/pc/rich-text/parchment/attributor/attributor.d.ts +17 -0
- package/types/pc/rich-text/parchment/attributor/class.d.ts +8 -0
- package/types/pc/rich-text/parchment/attributor/store.d.ts +15 -0
- package/types/pc/rich-text/parchment/attributor/style.d.ts +8 -0
- package/types/pc/rich-text/parchment/blot/abstract/blot.d.ts +115 -0
- package/types/pc/rich-text/parchment/blot/abstract/container.d.ts +18 -0
- package/types/pc/rich-text/parchment/blot/abstract/leaf.d.ts +29 -0
- package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +50 -0
- package/types/pc/rich-text/parchment/blot/abstract/shadow.d.ts +37 -0
- package/types/pc/rich-text/parchment/blot/block.d.ts +25 -0
- package/types/pc/rich-text/parchment/blot/embed.d.ts +11 -0
- package/types/pc/rich-text/parchment/blot/inline.d.ts +28 -0
- package/types/pc/rich-text/parchment/blot/scroll.d.ts +34 -0
- package/types/pc/rich-text/parchment/blot/text.d.ts +26 -0
- package/types/pc/rich-text/parchment/collection/linked-list.d.ts +21 -0
- package/types/pc/rich-text/parchment/collection/linked-node.d.ts +6 -0
- package/types/pc/rich-text/parchment/error.d.ts +6 -0
- package/types/pc/rich-text/parchment/index.d.ts +21 -0
- package/types/pc/rich-text/parchment/registry.d.ts +21 -0
- package/types/pc/rich-text/parchment/scope.d.ts +14 -0
- package/types/pc/rich-text/rich.d.ts +5 -0
- package/types/pc/rich-text/themes/base.d.ts +35 -0
- package/types/pc/rich-text/themes/bubble.d.ts +18 -0
- package/types/pc/rich-text/themes/snow.d.ts +9 -0
- package/types/pc/rich-text/ui/color-picker.d.ts +7 -0
- package/types/pc/rich-text/ui/icon-picker.d.ts +7 -0
- package/types/pc/rich-text/ui/icons.d.ts +51 -0
- package/types/pc/rich-text/ui/picker.d.ts +16 -0
- package/types/pc/rich-text/ui/tooltip.d.ts +12 -0
- package/types/pc/select/interface.d.ts +4 -0
- package/types/pc/utils/index.d.ts +2 -0
- package/types/pc/utils/mitt.d.ts +1 -0
- package/types/pc/utils/names.d.ts +107 -91
- package/types/pc/utils/pinyin.d.ts +1 -0
- package/types/pc/version/index.d.ts +1 -1
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +5 -3
- package/typography/Operations.js +6 -4
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +2 -2
- package/upload/Upload.js +2 -2
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +167 -163
- package/utils/mitt.js +5 -0
- package/utils/names.js +12 -2
- package/utils/pinyin.js +5 -0
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +2 -2
- package/watermark/Watermark.js +1 -1
- package/chunk/5_U1CBIu.js +0 -8
- package/chunk/BLOlsa0k.js +0 -11
- package/chunk/BTLlOOe9.js +0 -189
- package/chunk/C6Aw3qIJ.js +0 -16
- package/chunk/CMl7m9nA.js +0 -6
- package/chunk/COqvRD0G.js +0 -11
- package/chunk/DXlwLh0Y.js +0 -806
- package/chunk/DlSv5Vu0.js +0 -16
- package/chunk/DmDh7NRL.js +0 -14
- package/chunk/Duezix3m.js +0 -25
- package/chunk/siEVY1s5.js +0 -33
- package/hooks/useCreate.js +0 -4
- package/types/common/hooks/src/use-dynamic-list/index.d.ts +0 -18
- package/types/common/hooks/src/use-event-emitter/index.d.ts +0 -11
- package/types/common/hooks/src/use-map/index.d.ts +0 -8
- package/types/common/hooks/src/use-set/index.d.ts +0 -6
- package/types/common/hooks/useCreate.d.ts +0 -2
- package/types/pc/hooks/useCreate.d.ts +0 -1
- package/types/pc/hooks/useListenResize.d.ts +0 -1
- /package/hooks/{useListenResize.js → useListenWindowResize.js} +0 -0
package/select/Select.js
CHANGED
|
@@ -1,114 +1,115 @@
|
|
|
1
|
-
import { jsx as E, jsxs as
|
|
1
|
+
import { jsx as E, jsxs as Ot } from "react/jsx-runtime";
|
|
2
2
|
import m from "lodash/isArray";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { C as
|
|
6
|
-
import { a as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { g as
|
|
3
|
+
import vt from "lodash/isFunction";
|
|
4
|
+
import bt, { useContext as Vt, useState as j, useMemo as Ee, useRef as V, useCallback as oe, useEffect as O, useImperativeHandle as yt } from "react";
|
|
5
|
+
import { C as wt } from "../chunk/qsVvkBLU.js";
|
|
6
|
+
import { a as kt } from "../chunk/BcEZk8pT.js";
|
|
7
|
+
import { u as xt } from "../chunk/BGJspFG9.js";
|
|
8
|
+
import { u as St } from "../chunk/FgWHhRFz.js";
|
|
9
|
+
import { u as Me } from "../chunk/2vdCeheu.js";
|
|
10
|
+
import It from "../select-view/index.js";
|
|
11
|
+
import Pt from "../trigger/index.js";
|
|
12
|
+
import re from "@unicom-cloud/utils/class-name";
|
|
13
|
+
import { g as _t } from "../chunk/Dh7Osrvr.js";
|
|
14
14
|
import "../chunk/DsaQZE4X.js";
|
|
15
|
-
import { Esc as
|
|
16
|
-
import { o as
|
|
17
|
-
import { r as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { getValidValue as
|
|
23
|
-
import { isPlainObject as
|
|
24
|
-
const
|
|
15
|
+
import { Esc as Et, Enter as Fe, Tab as Ae, ArrowUp as Mt, ArrowDown as Ft } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
16
|
+
import { o as At } from "../chunk/BKKEev13.js";
|
|
17
|
+
import { r as Nt } from "../chunk/B8W1N4er.js";
|
|
18
|
+
import Lt from "../utils/warning.js";
|
|
19
|
+
import Tt from "../virtual-list/VirtualList.js";
|
|
20
|
+
import Dt from "./OptGroup.js";
|
|
21
|
+
import Ut from "./Option.js";
|
|
22
|
+
import { getValidValue as Ne, flatChildren as Rt, isEmpty as ie, preventDefaultEvent as Ht, isSelectOptGroup as $t, isSelectOption as Gt } from "./util.js";
|
|
23
|
+
import { isPlainObject as v } from "@unicom-cloud/utils/is";
|
|
24
|
+
const Le = "userCreatingOption", Kt = {
|
|
25
25
|
trigger: "click",
|
|
26
26
|
bordered: !0,
|
|
27
27
|
filterOption: !0,
|
|
28
28
|
unmountOnExit: !0,
|
|
29
29
|
defaultActiveFirstOption: !0,
|
|
30
30
|
allowCheckAll: !0
|
|
31
|
-
},
|
|
32
|
-
function
|
|
33
|
-
const { getPrefixCls:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
}, jt = { bottom: 4 };
|
|
32
|
+
function Wt(Te, De) {
|
|
33
|
+
const { getPrefixCls: Ue, renderEmpty: Re, componentConfig: He, rtl: se } = Vt(kt), a = St(
|
|
34
|
+
Te,
|
|
35
|
+
Kt,
|
|
36
|
+
He?.Select
|
|
37
37
|
), {
|
|
38
|
-
children:
|
|
39
|
-
renderFormat:
|
|
40
|
-
defaultActiveFirstOption:
|
|
41
|
-
disabled:
|
|
42
|
-
unmountOnExit:
|
|
43
|
-
notFoundContent:
|
|
44
|
-
showSearch:
|
|
38
|
+
children: ae,
|
|
39
|
+
renderFormat: ue,
|
|
40
|
+
defaultActiveFirstOption: pe,
|
|
41
|
+
disabled: $e,
|
|
42
|
+
unmountOnExit: Ge,
|
|
43
|
+
notFoundContent: Ke,
|
|
44
|
+
showSearch: ce,
|
|
45
45
|
tokenSeparators: W,
|
|
46
|
-
options:
|
|
47
|
-
filterOption:
|
|
48
|
-
labelInValue:
|
|
49
|
-
getPopupContainer:
|
|
50
|
-
trigger:
|
|
46
|
+
options: fe,
|
|
47
|
+
filterOption: de,
|
|
48
|
+
labelInValue: D,
|
|
49
|
+
getPopupContainer: je,
|
|
50
|
+
trigger: We,
|
|
51
51
|
triggerElement: B,
|
|
52
52
|
triggerProps: y,
|
|
53
|
-
dropdownRender:
|
|
54
|
-
dropdownMenuStyle:
|
|
55
|
-
dropdownMenuClassName:
|
|
56
|
-
virtualListProps:
|
|
53
|
+
dropdownRender: me,
|
|
54
|
+
dropdownMenuStyle: ge,
|
|
55
|
+
dropdownMenuClassName: he,
|
|
56
|
+
virtualListProps: Ce,
|
|
57
|
+
immediateTriggerChangeOnMount: Be,
|
|
57
58
|
// events
|
|
58
|
-
onChange:
|
|
59
|
-
onSelect:
|
|
60
|
-
onDeselect:
|
|
61
|
-
onClear:
|
|
62
|
-
onSearch:
|
|
63
|
-
onFocus:
|
|
64
|
-
onBlur:
|
|
65
|
-
onPopupScroll:
|
|
66
|
-
onVisibleChange:
|
|
67
|
-
onInputValueChange:
|
|
68
|
-
onPaste:
|
|
69
|
-
onKeyDown:
|
|
70
|
-
} = a;
|
|
71
|
-
let { mode:
|
|
72
|
-
|
|
59
|
+
onChange: Oe,
|
|
60
|
+
onSelect: ze,
|
|
61
|
+
onDeselect: Je,
|
|
62
|
+
onClear: qe,
|
|
63
|
+
onSearch: Qe,
|
|
64
|
+
onFocus: Xe,
|
|
65
|
+
onBlur: Ye,
|
|
66
|
+
onPopupScroll: Ze,
|
|
67
|
+
onVisibleChange: et,
|
|
68
|
+
onInputValueChange: tt,
|
|
69
|
+
onPaste: nt,
|
|
70
|
+
onKeyDown: ot
|
|
71
|
+
} = a, z = "value" in a, ve = "defaultValue" in a, rt = "inputValue" in a, it = "popupVisible" in a, lt = "notFoundContent" in a;
|
|
72
|
+
let { mode: J, allowCheckAll: be, allowCreate: c } = a;
|
|
73
|
+
J === "tags" && (J = "multiple", c = !0, Lt(
|
|
73
74
|
!0,
|
|
74
75
|
`[Select] The 'tags' mode will be removed in the next major version, please use {mode: "multiple", allowCreate: true} instead.`
|
|
75
76
|
));
|
|
76
|
-
const f =
|
|
77
|
-
u || (
|
|
78
|
-
const [
|
|
79
|
-
|
|
80
|
-
), n =
|
|
81
|
-
value:
|
|
82
|
-
}), [g,
|
|
77
|
+
const f = Ue?.("select"), u = J === "multiple";
|
|
78
|
+
u || (be = !1);
|
|
79
|
+
const [st, q] = j(
|
|
80
|
+
Ne(a.defaultValue, u, D)
|
|
81
|
+
), n = z ? Ne(a.value, u, D) : st, [d, at, ut] = Me("", {
|
|
82
|
+
value: rt ? a.inputValue || "" : void 0
|
|
83
|
+
}), [g, pt] = Me(!1, {
|
|
83
84
|
defaultValue: a.defaultPopupVisible,
|
|
84
|
-
value:
|
|
85
|
-
}), [
|
|
85
|
+
value: it ? a.popupVisible : y && "popupVisible" in y ? y.popupVisible : void 0
|
|
86
|
+
}), [A, ct] = j(null), [N, ft] = j([]), [h, M] = j(
|
|
86
87
|
m(n) ? n[0] : n
|
|
87
88
|
), {
|
|
88
|
-
childrenList:
|
|
89
|
+
childrenList: Q,
|
|
89
90
|
optionInfoMap: p,
|
|
90
91
|
optionValueList: w,
|
|
91
92
|
optionIndexListForArrowKey: S,
|
|
92
|
-
hasOptGroup:
|
|
93
|
-
hasComplexLabelInOptions:
|
|
94
|
-
} =
|
|
95
|
-
{ children:
|
|
93
|
+
hasOptGroup: dt,
|
|
94
|
+
hasComplexLabelInOptions: mt
|
|
95
|
+
} = Ee(() => Rt(
|
|
96
|
+
{ children: ae, options: fe, filterOption: de },
|
|
96
97
|
{
|
|
97
98
|
prefixCls: f,
|
|
98
99
|
inputValue: d,
|
|
99
|
-
userCreatedOptions:
|
|
100
|
-
userCreatingOption:
|
|
100
|
+
userCreatedOptions: N,
|
|
101
|
+
userCreatingOption: A
|
|
101
102
|
}
|
|
102
103
|
), [
|
|
103
|
-
|
|
104
|
-
ce,
|
|
104
|
+
ae,
|
|
105
105
|
fe,
|
|
106
|
+
de,
|
|
106
107
|
d,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
]),
|
|
110
|
-
if (
|
|
111
|
-
const e = m(n) ? n[0] : n, t = !R && p.get(e)?._valid, r = p?.get(w[0])?._origin ===
|
|
108
|
+
A,
|
|
109
|
+
N
|
|
110
|
+
]), X = V(null), Ve = V(null), b = V(null), I = V([]), k = V(null), ye = V(d), Y = V(null), U = V(0), Z = V(!1), we = xt(`${f}-popup`), R = ie(n, u), ke = Ee(() => {
|
|
111
|
+
if (pe) {
|
|
112
|
+
const e = m(n) ? n[0] : n, t = !R && p.get(e)?._valid, r = p?.get(w[0])?._origin === Le;
|
|
112
113
|
return t && !r ? e : w[S[0]];
|
|
113
114
|
}
|
|
114
115
|
}, [
|
|
@@ -116,68 +117,68 @@ function Dt(Fe, Le) {
|
|
|
116
117
|
p,
|
|
117
118
|
w,
|
|
118
119
|
S,
|
|
119
|
-
|
|
120
|
+
pe,
|
|
120
121
|
R
|
|
121
|
-
]), H =
|
|
122
|
+
]), H = oe(
|
|
122
123
|
(e, t) => {
|
|
123
124
|
const r = p.get(e);
|
|
124
|
-
|
|
125
|
+
X.current && r?.child?.props && X.current.scrollTo({
|
|
125
126
|
key: r.child.props._key,
|
|
126
127
|
options: t
|
|
127
128
|
});
|
|
128
129
|
},
|
|
129
130
|
[p]
|
|
130
|
-
), $ =
|
|
131
|
-
(e, t = !1) =>
|
|
131
|
+
), $ = oe(
|
|
132
|
+
(e, t = !1) => v(c) && typeof c?.formatter == "function" ? c.formatter(e, t) : e,
|
|
132
133
|
[c]
|
|
133
134
|
), P = (e, t) => {
|
|
134
|
-
(e !==
|
|
135
|
-
},
|
|
136
|
-
g !== e && (
|
|
135
|
+
(e !== ye.current || t !== Y.current) && (at(e), ye.current = e, Y.current = t, tt?.(e, t));
|
|
136
|
+
}, F = (e) => {
|
|
137
|
+
g !== e && (pt(e), et?.(e), y?.onVisibleChange?.(e));
|
|
137
138
|
};
|
|
138
|
-
|
|
139
|
-
u ? m(n) ||
|
|
140
|
-
}, [u, n]),
|
|
139
|
+
O(() => {
|
|
140
|
+
u ? m(n) || q(n === void 0 ? [] : [n]) : m(n) && q(n.length === 0 ? void 0 : n[0]);
|
|
141
|
+
}, [u, n]), O(() => {
|
|
141
142
|
if (g) {
|
|
142
|
-
M(
|
|
143
|
+
M(ke);
|
|
143
144
|
const e = m(n) ? n[0] : n;
|
|
144
145
|
!R && p.has(e) && setTimeout(() => H(e));
|
|
145
146
|
}
|
|
146
|
-
}, [g]),
|
|
147
|
+
}, [g]), O(() => {
|
|
147
148
|
(k.current === "up" || k.current === "down") && (H(h), k.current = "none");
|
|
148
|
-
}, [h]),
|
|
149
|
-
M(
|
|
150
|
-
}, [JSON.stringify(
|
|
149
|
+
}, [h]), O(() => {
|
|
150
|
+
M(ke);
|
|
151
|
+
}, [JSON.stringify(Q.map((e) => e?.props?.value))]), O(() => {
|
|
151
152
|
I.current = I.current.filter((e) => u ? m(n) && n.indexOf(e.value) > -1 : e.value === n);
|
|
152
|
-
}, [n, u]),
|
|
153
|
+
}, [n, u]), O(() => {
|
|
153
154
|
if (c) {
|
|
154
155
|
let e;
|
|
155
|
-
if (
|
|
156
|
+
if (ie(n, u))
|
|
156
157
|
e = [];
|
|
157
158
|
else {
|
|
158
159
|
const r = m(n) ? n : [n], o = r.filter((i, l, C) => {
|
|
159
|
-
const x = p.get(i) || I.current.find((
|
|
160
|
-
return !x || x._origin ===
|
|
160
|
+
const x = p.get(i) || I.current.find((ne) => ne.value === i)?.option;
|
|
161
|
+
return !x || x._origin === Le;
|
|
161
162
|
}).map((i) => $(i));
|
|
162
|
-
e =
|
|
163
|
-
const l =
|
|
163
|
+
e = N.filter((i) => {
|
|
164
|
+
const l = v(i) ? i.value : i;
|
|
164
165
|
return r.indexOf(l) !== -1;
|
|
165
166
|
}).concat(
|
|
166
167
|
o
|
|
167
168
|
);
|
|
168
169
|
}
|
|
169
|
-
const t = (r) => r.map((o) =>
|
|
170
|
-
t(e) !== t(
|
|
170
|
+
const t = (r) => r.map((o) => v(o) ? o.value : o).toString();
|
|
171
|
+
t(e) !== t(N) && ft(e);
|
|
171
172
|
}
|
|
172
|
-
}, [n, c, u, $]),
|
|
173
|
-
c &&
|
|
173
|
+
}, [n, c, u, $]), O(() => {
|
|
174
|
+
c && ct(
|
|
174
175
|
d && !p.has(d) ? $(d, !0) : null
|
|
175
176
|
);
|
|
176
|
-
}, [d, $]),
|
|
177
|
-
const { current: e } =
|
|
178
|
-
|
|
177
|
+
}, [d, $]), O(() => {
|
|
178
|
+
const { current: e } = Y;
|
|
179
|
+
ut === d && (e === "manual" || e === "optionListHide") && Qe?.(d, e);
|
|
179
180
|
}, [d]);
|
|
180
|
-
const
|
|
181
|
+
const L = oe(
|
|
181
182
|
(e) => {
|
|
182
183
|
const t = p.get(e);
|
|
183
184
|
if (t) {
|
|
@@ -190,26 +191,26 @@ function Dt(Fe, Le) {
|
|
|
190
191
|
return r && r.option;
|
|
191
192
|
},
|
|
192
193
|
[p]
|
|
193
|
-
),
|
|
194
|
+
), xe = (e) => {
|
|
194
195
|
if (!S.length)
|
|
195
196
|
return;
|
|
196
197
|
if (h === void 0 || !p.has(h))
|
|
197
198
|
return w[S[0]];
|
|
198
199
|
const r = p.get(h)._index, o = S.indexOf(r), s = S.length;
|
|
199
200
|
return w[S[((e === "up" ? o - 1 : o + 1) + s) % s]];
|
|
200
|
-
}, G = (e, t =
|
|
201
|
+
}, G = (e, t = ie(e, u)) => {
|
|
201
202
|
let r = e;
|
|
202
|
-
const o = e === void 0 ? void 0 : m(e) ? e.map(
|
|
203
|
-
if (
|
|
203
|
+
const o = e === void 0 ? void 0 : m(e) ? e.map(L) : L(e);
|
|
204
|
+
if (D && !t) {
|
|
204
205
|
const s = (i, l) => {
|
|
205
206
|
if (l)
|
|
206
207
|
return l.children;
|
|
207
|
-
const C =
|
|
208
|
+
const C = z ? a.value : ve ? a.defaultValue : null;
|
|
208
209
|
if (m(C)) {
|
|
209
210
|
for (const x of C)
|
|
210
|
-
if (
|
|
211
|
+
if (v(x) && x.value === i)
|
|
211
212
|
return x.label;
|
|
212
|
-
} else if (
|
|
213
|
+
} else if (v(C) && C.value === i)
|
|
213
214
|
return C.label;
|
|
214
215
|
};
|
|
215
216
|
m(e) ? r = e.map((i, l) => ({
|
|
@@ -221,14 +222,18 @@ function Dt(Fe, Le) {
|
|
|
221
222
|
};
|
|
222
223
|
}
|
|
223
224
|
return { option: o, value: r };
|
|
224
|
-
}
|
|
225
|
-
|
|
225
|
+
};
|
|
226
|
+
function Se(e) {
|
|
227
|
+
if (Oe) {
|
|
226
228
|
const t = G(e);
|
|
227
|
-
|
|
229
|
+
Oe(t.value, t.option);
|
|
228
230
|
}
|
|
229
|
-
}
|
|
231
|
+
}
|
|
232
|
+
const _ = (e) => {
|
|
233
|
+
q(e), Se(e);
|
|
234
|
+
}, Ie = (e, t) => {
|
|
230
235
|
if (t === "remove" || t === "add" && p.get(e)) {
|
|
231
|
-
const r = t === "add" ? n.concat(e) : n.filter((s, i, l) => s !== e), o = t === "add" ?
|
|
236
|
+
const r = t === "add" ? n.concat(e) : n.filter((s, i, l) => s !== e), o = t === "add" ? ze : Je;
|
|
232
237
|
if (_(r), typeof o == "function") {
|
|
233
238
|
const s = G(
|
|
234
239
|
e,
|
|
@@ -240,82 +245,82 @@ function Dt(Fe, Le) {
|
|
|
240
245
|
);
|
|
241
246
|
}
|
|
242
247
|
}
|
|
243
|
-
},
|
|
244
|
-
t || (u ? (
|
|
248
|
+
}, Pe = (e, t) => {
|
|
249
|
+
t || (u ? (Ie(
|
|
245
250
|
e,
|
|
246
251
|
n.indexOf(e) === -1 ? "add" : "remove"
|
|
247
|
-
), (!
|
|
248
|
-
|
|
252
|
+
), (!v(ce) || !ce.retainInputValueWhileSelect) && P("", "optionChecked")) : (e !== n && _(e), setTimeout(() => {
|
|
253
|
+
F(!1);
|
|
249
254
|
})));
|
|
250
|
-
}, K =
|
|
255
|
+
}, K = _t(
|
|
251
256
|
/* @__PURE__ */ new Map([
|
|
252
|
-
[
|
|
257
|
+
[Et.key, () => F(!1)],
|
|
253
258
|
[
|
|
254
|
-
|
|
259
|
+
Fe.key,
|
|
255
260
|
() => {
|
|
256
261
|
if (g) {
|
|
257
262
|
const e = p.get(h);
|
|
258
|
-
e &&
|
|
263
|
+
e && Pe(h, e.disabled);
|
|
259
264
|
} else
|
|
260
|
-
|
|
265
|
+
F(!0);
|
|
261
266
|
}
|
|
262
267
|
],
|
|
263
268
|
[
|
|
264
|
-
|
|
269
|
+
Ae.key,
|
|
265
270
|
// 按tab键切换,关闭开启的弹出框
|
|
266
|
-
() =>
|
|
271
|
+
() => F(!1)
|
|
267
272
|
],
|
|
268
273
|
[
|
|
269
|
-
|
|
274
|
+
Mt.key,
|
|
270
275
|
() => {
|
|
271
276
|
if (g)
|
|
272
|
-
return k.current = "up", M(
|
|
277
|
+
return k.current = "up", M(xe("up")), !1;
|
|
273
278
|
}
|
|
274
279
|
],
|
|
275
280
|
[
|
|
276
|
-
|
|
281
|
+
Ft.key,
|
|
277
282
|
() => {
|
|
278
283
|
if (g)
|
|
279
|
-
return k.current = "down", M(
|
|
284
|
+
return k.current = "down", M(xe("down")), !1;
|
|
280
285
|
}
|
|
281
286
|
]
|
|
282
287
|
])
|
|
283
|
-
),
|
|
284
|
-
const e = y?.autoAlignPopupWidth === !1 && (!y?.style?.width || y?.style?.width === "auto"), t = e &&
|
|
285
|
-
|
|
288
|
+
), gt = () => {
|
|
289
|
+
const e = y?.autoAlignPopupWidth === !1 && (!y?.style?.width || y?.style?.width === "auto"), t = e && mt, r = lt ? Ke : Re("Select"), o = Q.length ? /* @__PURE__ */ E(
|
|
290
|
+
Tt,
|
|
286
291
|
{
|
|
287
|
-
id:
|
|
292
|
+
id: we,
|
|
288
293
|
role: "listbox",
|
|
289
|
-
style:
|
|
290
|
-
className:
|
|
291
|
-
ref:
|
|
292
|
-
data:
|
|
294
|
+
style: ge,
|
|
295
|
+
className: re(`${f}-popup-inner`, he),
|
|
296
|
+
ref: X,
|
|
297
|
+
data: Q,
|
|
293
298
|
height: null,
|
|
294
|
-
isStaticItemHeight: !
|
|
299
|
+
isStaticItemHeight: !dt,
|
|
295
300
|
measureLongestItem: e,
|
|
296
301
|
itemKey: (l) => l.props._key,
|
|
297
|
-
onMouseDown:
|
|
302
|
+
onMouseDown: Ht,
|
|
298
303
|
onMouseMove: () => {
|
|
299
304
|
k.current = null;
|
|
300
305
|
},
|
|
301
|
-
onScroll: (l) =>
|
|
302
|
-
...
|
|
303
|
-
threshold: t ? null :
|
|
306
|
+
onScroll: (l) => Ze?.(l.target),
|
|
307
|
+
...Ce,
|
|
308
|
+
threshold: t ? null : Ce?.threshold,
|
|
304
309
|
children: (l) => {
|
|
305
|
-
if (
|
|
310
|
+
if ($t(l))
|
|
306
311
|
return /* @__PURE__ */ E(l.type, { ...l.props, prefixCls: f });
|
|
307
|
-
if (
|
|
308
|
-
const C = l.props?.value, x =
|
|
309
|
-
(T) =>
|
|
310
|
-
),
|
|
312
|
+
if (Gt(l)) {
|
|
313
|
+
const C = l.props?.value, x = v(A) ? A.value : A, ne = N.map(
|
|
314
|
+
(T) => v(T) ? T.value : T
|
|
315
|
+
), Ct = {
|
|
311
316
|
prefixCls: f,
|
|
312
|
-
rtl:
|
|
317
|
+
rtl: se,
|
|
313
318
|
_valueActive: h,
|
|
314
319
|
_valueSelect: n,
|
|
315
320
|
_isMultipleMode: u,
|
|
316
321
|
_isUserCreatingOption: c && x === C,
|
|
317
|
-
_isUserCreatedOption: c &&
|
|
318
|
-
_onClick:
|
|
322
|
+
_isUserCreatedOption: c && ne.indexOf(C) > -1,
|
|
323
|
+
_onClick: Pe,
|
|
319
324
|
_onMouseEnter: (T) => {
|
|
320
325
|
k.current === null && M(T);
|
|
321
326
|
},
|
|
@@ -323,7 +328,7 @@ function Dt(Fe, Le) {
|
|
|
323
328
|
k.current === null && M(void 0);
|
|
324
329
|
}
|
|
325
330
|
};
|
|
326
|
-
return l && /* @__PURE__ */ E(l.type, { ...l.props, ...
|
|
331
|
+
return l && /* @__PURE__ */ E(l.type, { ...l.props, ...Ct });
|
|
327
332
|
}
|
|
328
333
|
return l;
|
|
329
334
|
}
|
|
@@ -331,24 +336,24 @@ function Dt(Fe, Le) {
|
|
|
331
336
|
) : null, i = r && !(c && d) ? /* @__PURE__ */ E(
|
|
332
337
|
"div",
|
|
333
338
|
{
|
|
334
|
-
style:
|
|
335
|
-
className:
|
|
339
|
+
style: ge,
|
|
340
|
+
className: re(`${f}-popup-inner`, he),
|
|
336
341
|
children: r
|
|
337
342
|
}
|
|
338
343
|
) : null;
|
|
339
|
-
return /* @__PURE__ */
|
|
344
|
+
return /* @__PURE__ */ Ot(
|
|
340
345
|
"div",
|
|
341
346
|
{
|
|
342
|
-
className:
|
|
347
|
+
className: re(`${f}-popup`, {
|
|
343
348
|
[`${f}-popup-hidden`]: o === null && i === null,
|
|
344
349
|
[`${f}-popup-multiple`]: u
|
|
345
350
|
}),
|
|
346
351
|
tabIndex: -1,
|
|
347
352
|
onKeyDown: (l) => K(l),
|
|
348
353
|
children: [
|
|
349
|
-
!!u && !!o && !!
|
|
354
|
+
!!u && !!o && !!be && // 潘启宝添加
|
|
350
355
|
/* @__PURE__ */ E(
|
|
351
|
-
|
|
356
|
+
wt,
|
|
352
357
|
{
|
|
353
358
|
"aria-hidden": "true",
|
|
354
359
|
className: `${f}-checkbox ${f}-checkbox-all`,
|
|
@@ -360,15 +365,15 @@ function Dt(Fe, Le) {
|
|
|
360
365
|
children: "全选"
|
|
361
366
|
}
|
|
362
367
|
),
|
|
363
|
-
typeof
|
|
368
|
+
typeof me == "function" ? me(o || i) : o || i
|
|
364
369
|
]
|
|
365
370
|
}
|
|
366
371
|
);
|
|
367
|
-
},
|
|
368
|
-
if (
|
|
372
|
+
}, ee = (e) => {
|
|
373
|
+
if (U.current = null, u && m(W) && W.length) {
|
|
369
374
|
const t = e.split(new RegExp(`[${W.join("")}]`));
|
|
370
375
|
if (t.length > 1) {
|
|
371
|
-
|
|
376
|
+
U.current = Date.now();
|
|
372
377
|
const r = t.filter(
|
|
373
378
|
(i, l) => i && t.indexOf(i) === l
|
|
374
379
|
), o = n.slice(0);
|
|
@@ -378,32 +383,32 @@ function Dt(Fe, Le) {
|
|
|
378
383
|
}), s && _(o);
|
|
379
384
|
}
|
|
380
385
|
}
|
|
381
|
-
return !!
|
|
382
|
-
},
|
|
383
|
-
onFocus:
|
|
386
|
+
return !!U.current;
|
|
387
|
+
}, ht = {
|
|
388
|
+
onFocus: Xe,
|
|
384
389
|
onBlur: (e) => {
|
|
385
|
-
|
|
390
|
+
Ye?.(e), !g && !Z.current && P("", "optionListHide");
|
|
386
391
|
},
|
|
387
392
|
onKeyDown: (e) => {
|
|
388
393
|
if (e.target.tagName === "INPUT" && e.target.value) {
|
|
389
|
-
const t = e.key ===
|
|
394
|
+
const t = e.key === Ae.key, r = e.key === Fe.key;
|
|
390
395
|
if (r || t) {
|
|
391
396
|
const o = r ? `
|
|
392
397
|
` : t ? " " : "";
|
|
393
|
-
|
|
398
|
+
ee(e.target.value + o) && P("", "tokenSeparator");
|
|
394
399
|
}
|
|
395
400
|
}
|
|
396
|
-
K(e),
|
|
401
|
+
K(e), ot?.(e);
|
|
397
402
|
},
|
|
398
403
|
onChangeInputValue: (e, { nativeEvent: { inputType: t } }) => {
|
|
399
|
-
t !== "insertFromPaste" &&
|
|
404
|
+
t !== "insertFromPaste" && ee(e), U.current ? P("", "tokenSeparator") : P(e, "manual"), !g && e && F(!0);
|
|
400
405
|
},
|
|
401
406
|
onPaste: (e) => {
|
|
402
|
-
|
|
407
|
+
ee(e.clipboardData.getData("text")), nt?.(e);
|
|
403
408
|
},
|
|
404
409
|
// Option Items
|
|
405
410
|
onRemoveCheckedItem: (e, t, r) => {
|
|
406
|
-
r.stopPropagation(),
|
|
411
|
+
r.stopPropagation(), Ie(n[t], "remove");
|
|
407
412
|
},
|
|
408
413
|
onClear: (e) => {
|
|
409
414
|
if (e.stopPropagation(), u) {
|
|
@@ -414,102 +419,105 @@ function Dt(Fe, Le) {
|
|
|
414
419
|
_(t);
|
|
415
420
|
} else
|
|
416
421
|
_(void 0);
|
|
417
|
-
P("", "manual"),
|
|
422
|
+
P("", "manual"), qe?.(g);
|
|
418
423
|
}
|
|
419
424
|
};
|
|
420
|
-
|
|
421
|
-
|
|
425
|
+
yt(
|
|
426
|
+
De,
|
|
422
427
|
() => ({
|
|
423
|
-
dom:
|
|
428
|
+
dom: b.current?.dom,
|
|
424
429
|
focus() {
|
|
425
|
-
|
|
430
|
+
b.current && b.current.focus();
|
|
426
431
|
},
|
|
427
432
|
blur() {
|
|
428
|
-
|
|
433
|
+
b.current && b.current.blur();
|
|
429
434
|
},
|
|
430
435
|
hotkeyHandler: K,
|
|
431
436
|
activeOptionValue: h,
|
|
432
|
-
getOptionInfoByValue:
|
|
437
|
+
getOptionInfoByValue: L,
|
|
433
438
|
getOptionInfoList: () => [...p.values()].filter((e) => e._valid),
|
|
434
439
|
scrollIntoView: H,
|
|
435
440
|
getRootDOMNode() {
|
|
436
|
-
return
|
|
441
|
+
return b.current?.getRootDOMNode?.();
|
|
437
442
|
}
|
|
438
443
|
}),
|
|
439
444
|
[
|
|
440
445
|
K,
|
|
441
446
|
p,
|
|
442
447
|
h,
|
|
443
|
-
|
|
448
|
+
L,
|
|
444
449
|
H
|
|
445
450
|
]
|
|
446
451
|
);
|
|
447
|
-
const
|
|
448
|
-
|
|
452
|
+
const _e = (e) => /* @__PURE__ */ E(
|
|
453
|
+
Pt,
|
|
449
454
|
{
|
|
450
|
-
ref:
|
|
451
|
-
popup:
|
|
452
|
-
trigger:
|
|
453
|
-
disabled:
|
|
454
|
-
getPopupContainer:
|
|
455
|
+
ref: Ve,
|
|
456
|
+
popup: gt,
|
|
457
|
+
trigger: We,
|
|
458
|
+
disabled: $e,
|
|
459
|
+
getPopupContainer: je,
|
|
455
460
|
classNames: "slideDynamicOrigin",
|
|
456
461
|
autoAlignPopupWidth: !0,
|
|
457
|
-
popupAlign:
|
|
462
|
+
popupAlign: jt,
|
|
458
463
|
popupVisible: g,
|
|
459
|
-
unmountOnExit:
|
|
460
|
-
onVisibleChange:
|
|
464
|
+
unmountOnExit: Ge,
|
|
465
|
+
onVisibleChange: F,
|
|
461
466
|
__onExit: () => {
|
|
462
|
-
|
|
467
|
+
Z.current = !0;
|
|
463
468
|
},
|
|
464
469
|
__onExited: () => {
|
|
465
|
-
|
|
470
|
+
Z.current = !1, P("", "optionListHide");
|
|
466
471
|
},
|
|
467
|
-
...
|
|
472
|
+
...At(y, ["popupVisible", "onVisibleChange"]),
|
|
468
473
|
children: e
|
|
469
474
|
}
|
|
470
|
-
),
|
|
471
|
-
return
|
|
472
|
-
const e =
|
|
473
|
-
|
|
475
|
+
), te = typeof B == "function" ? B(G(n)) : B;
|
|
476
|
+
return O(() => {
|
|
477
|
+
const e = Nt([b.current?.dom], () => {
|
|
478
|
+
Ve.current?.updatePopupPosition?.();
|
|
474
479
|
});
|
|
475
480
|
return () => {
|
|
476
481
|
e();
|
|
477
482
|
};
|
|
478
|
-
}, [
|
|
479
|
-
|
|
483
|
+
}, [b.current?.dom]), O(() => (Be && (z || ve) && Se(
|
|
484
|
+
a.value ?? a.defaultValue
|
|
485
|
+
), () => {
|
|
486
|
+
}), []), te != null ? _e(te) : /* @__PURE__ */ E(
|
|
487
|
+
It,
|
|
480
488
|
{
|
|
481
489
|
...a,
|
|
482
|
-
...
|
|
483
|
-
ref:
|
|
490
|
+
...ht,
|
|
491
|
+
ref: b,
|
|
484
492
|
value: n,
|
|
485
493
|
inputValue: d,
|
|
486
494
|
popupVisible: g,
|
|
487
|
-
rtl:
|
|
495
|
+
rtl: se,
|
|
488
496
|
prefixCls: f,
|
|
489
497
|
allowCreate: !!c,
|
|
490
|
-
ariaControls:
|
|
498
|
+
ariaControls: we,
|
|
491
499
|
isEmptyValue: R,
|
|
492
500
|
isMultiple: u,
|
|
493
501
|
onSort: _,
|
|
494
502
|
renderText: (e) => {
|
|
495
|
-
const t =
|
|
503
|
+
const t = L(e);
|
|
496
504
|
let r = e;
|
|
497
|
-
if (
|
|
505
|
+
if (vt(ue)) {
|
|
498
506
|
const o = G(e, !1);
|
|
499
|
-
r =
|
|
507
|
+
r = ue(
|
|
500
508
|
o.option || null,
|
|
501
509
|
o.value
|
|
502
510
|
);
|
|
503
511
|
} else {
|
|
504
512
|
let o = !1;
|
|
505
|
-
if (
|
|
513
|
+
if (D) {
|
|
506
514
|
const s = a.value || a.defaultValue;
|
|
507
515
|
if (m(s)) {
|
|
508
516
|
const i = s.find(
|
|
509
|
-
(l) =>
|
|
517
|
+
(l) => v(l) && l.value === e
|
|
510
518
|
);
|
|
511
519
|
i && (r = i.label, o = !0);
|
|
512
|
-
} else
|
|
520
|
+
} else v(s) && (r = s.label, o = !0);
|
|
513
521
|
}
|
|
514
522
|
!o && t && "children" in t && (r = t.children);
|
|
515
523
|
}
|
|
@@ -518,16 +526,16 @@ function Dt(Fe, Le) {
|
|
|
518
526
|
disabled: t && t.disabled
|
|
519
527
|
};
|
|
520
528
|
},
|
|
521
|
-
renderView:
|
|
529
|
+
renderView: _e
|
|
522
530
|
}
|
|
523
531
|
);
|
|
524
532
|
}
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
533
|
+
const Bt = bt.forwardRef(Wt), le = Bt;
|
|
534
|
+
le.displayName = "Select";
|
|
535
|
+
le.Option = Ut;
|
|
536
|
+
le.OptGroup = Dt;
|
|
529
537
|
export {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
538
|
+
Ut as SelectOption,
|
|
539
|
+
Dt as SelectOptionGroup,
|
|
540
|
+
le as default
|
|
533
541
|
};
|