@unicom-cloud/ui 0.8.55 → 0.8.56
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 +36 -36
- package/Alert.js +41 -45
- package/Anchor.js +1 -1
- package/AutoComplete.js +40 -40
- package/Avatar.js +36 -36
- package/BackTop.js +26 -26
- package/Badge.js +43 -43
- package/Breadcrumb.js +17 -17
- package/Button.js +42 -42
- package/Calendar.js +54 -56
- package/Card.js +28 -28
- package/Carousel.js +42 -43
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +11 -580
- package/Comment.js +14 -14
- package/ConfigProvider.js +2 -2
- package/Copy.js +26 -26
- package/DatePicker.js +661 -670
- package/Descriptions.js +53 -53
- package/Divider.js +15 -15
- package/Draggable.js +16 -16
- package/Drawer.js +1 -1
- package/Dropdown.js +10 -10
- package/Empty.js +3 -3
- package/Form.js +10 -1410
- package/Grid.js +49 -49
- package/Icon.js +10 -10
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +7 -7
- package/InputTag.js +1 -1
- package/Layout.js +34 -34
- package/Link.js +26 -26
- package/List.js +39 -39
- package/Mentions.js +17 -17
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +4 -10
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +18 -18
- package/PageHeader.js +26 -27
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +15 -15
- package/Popover.js +22 -22
- package/Progress.js +18 -18
- package/Radio.js +2 -2
- package/Rate.js +40 -43
- package/ResizeBox.js +191 -192
- package/Result.js +17 -17
- package/Select.js +1 -1
- package/SelectView.js +56 -56
- package/Skeleton.js +35 -35
- package/Slider.js +81 -81
- package/Space.js +27 -27
- package/SpeechSynthesis.js +29 -32
- package/Spin.js +15 -15
- package/Statistic.js +54 -54
- package/Steps.js +44 -44
- package/Switch.js +39 -38
- package/Table.js +488 -488
- package/Tabs.js +1 -1
- package/Tag.js +13 -14
- package/TimePicker.js +68 -68
- package/Timeline.js +1 -1
- package/Tooltip.js +27 -28
- package/Transfer.js +29 -30
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +53 -52
- package/Typography.js +2 -737
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/1mEO29GP.js +23 -0
- package/chunk/5pZ3ayqs.js +29 -0
- package/chunk/9Gh1afjL.js +23 -0
- package/chunk/B1S1OEw6.js +29 -0
- package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
- package/chunk/B45v5S9k.js +209 -0
- package/chunk/B6fn5y_s.js +23 -0
- package/chunk/B9PsJar0.js +118 -0
- package/chunk/BA02BFUV.js +41 -0
- package/chunk/BCk8e9fj.js +29 -0
- package/chunk/BHK9zpXn.js +207 -0
- package/chunk/BHLTzWzi.js +29 -0
- package/chunk/BK1FKNAX.js +41 -0
- package/chunk/BM6dpkeM.js +32 -0
- package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
- package/chunk/BWx1cVT_.js +66 -0
- package/chunk/BbI3gqVr.js +23 -0
- package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
- package/chunk/Be7oeWU8.js +34 -0
- package/chunk/BeM2hfks.js +88 -0
- package/chunk/BkHxm4sv.js +41 -0
- package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
- package/chunk/BlKc_pDZ.js +678 -0
- package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
- package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
- package/chunk/BqxwlITu.js +52 -0
- package/chunk/BuEC_zcc.js +278 -0
- package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
- package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
- package/chunk/C2fspJbE.js +23 -0
- package/chunk/C7Okdv4u.js +34 -0
- package/chunk/C95ipQ6b.js +41 -0
- package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
- package/chunk/CPl52AZh.js +206 -0
- package/chunk/CXNW5Y2a.js +23 -0
- package/chunk/Cb_oWoGj.js +40 -0
- package/chunk/CcX2pBUh.js +46 -0
- package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
- package/chunk/CilQ012k.js +1796 -0
- package/chunk/CkAOsst1.js +73 -0
- package/chunk/CnY8SvgY.js +126 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
- package/chunk/D6mVoX-C.js +116 -0
- package/chunk/D9TqtOhq.js +40 -0
- package/chunk/{CZ8iz63Z.js → DBJ8d0o0.js} +210 -217
- package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
- package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -0
- package/chunk/DRJO1GfY.js +855 -0
- package/chunk/DUxWiN2U.js +1465 -0
- package/chunk/DYZzQ2uT.js +29 -0
- package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
- package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
- package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
- package/chunk/DhLbnw3R.js +29 -0
- package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
- package/chunk/Do1aMgY3.js +12 -0
- package/chunk/Dtnux4qL.js +38 -0
- package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
- package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/JnyGFb5j.js +284 -0
- package/chunk/Lk60-jkf.js +1098 -0
- package/chunk/V_IcWDFx.js +49 -0
- package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
- package/chunk/bsawGxt8.js +32 -0
- package/chunk/cUuQh7L_.js +46 -0
- package/chunk/fqgc8r6C.js +29 -0
- package/chunk/m_kOQCiU.js +29 -0
- package/chunk/sl8s35SK.js +29 -0
- package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
- package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
- package/hooks/index.js +52 -246
- package/hooks/useForceUpdate.js +6 -6
- package/hooks/useIntersectionObserver.js +12 -10
- package/hooks/useKeyboardEvent.js +7 -7
- package/hooks/useMedia.js +9 -12
- package/hooks/useMergeValue.js +10 -8
- package/hooks/useResizeObserver.js +16 -0
- package/hooks/useUpdateEffect.js +7 -9
- package/hooks/useWindowSize.js +16 -20
- package/icons.js +6003 -0
- package/index.js +377 -472
- package/locale/en-US.js +20 -6
- package/locale/ja-JP.js +4 -2
- package/locale/ko-KR.js +2 -2
- package/locale/pt-BR.js +3 -3
- package/locale/pt-PT.js +3 -3
- package/locale/tr-TR.js +11 -3
- package/locale/zh-CN.js +6 -0
- package/locale/zh-HK.js +2 -0
- package/locale/zh-TW.js +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -0
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/hooks/index.d.ts +3 -101
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMergeProps.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +5 -0
- package/types/hooks/useUpdateEffect.d.ts +2 -3
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/icons.d.ts +4 -0
- package/types/index.d.ts +12 -2
- package/types/locale/en-US.d.ts +4 -0
- package/types/locale/interface.d.ts +2 -0
- package/types/locale/ja-JP.d.ts +4 -0
- package/types/locale/zh-CN.d.ts +4 -0
- package/types/locale/zh-HK.d.ts +4 -0
- package/types/locale/zh-TW.d.ts +4 -0
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/className.js +2 -3
- package/utils/contextHolder.js +2 -2
- package/utils/copy.js +2 -3
- package/utils/is.js +127 -90
- package/utils/reactDOM.js +17 -15
- package/utils/responsiveObserve.js +16 -16
- package/utils/saveAs.js +2 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BdYAMaw9.js +0 -6
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DdtfPvgk.js +0 -272
- package/chunk/I4RV9SKZ.js +0 -135
- package/chunk/TXCrI0jN.js +0 -20
- package/chunk/i1A7W8Qt.js +0 -277
- package/chunk/xPzFRQJn.js +0 -740
- package/hooks/useAsync.js +0 -13
- package/hooks/useAsyncFn.js +0 -15
- package/hooks/useAsyncRetry.js +0 -17
- package/hooks/useAudio.js +0 -5
- package/hooks/useBeforeUnload.js +0 -18
- package/hooks/useBoolean.js +0 -4
- package/hooks/useClickAway.js +0 -22
- package/hooks/useCopyToClipboard.js +0 -51
- package/hooks/useCounter.js +0 -45
- package/hooks/useCreation.js +0 -17
- package/hooks/useCustomCompareEffect.js +0 -15
- package/hooks/useDebounce.js +0 -9
- package/hooks/useDefault.js +0 -10
- package/hooks/useDrop.js +0 -44
- package/hooks/useDropArea.js +0 -45
- package/hooks/useEffectOnce.js +0 -7
- package/hooks/useEffectState.js +0 -9
- package/hooks/useEnsuredForwardedRef.js +0 -17
- package/hooks/useError.js +0 -13
- package/hooks/useEvent.js +0 -13
- package/hooks/useEventListener.js +0 -39
- package/hooks/useFavicon.js +0 -16
- package/hooks/useFirstMountState.js +0 -8
- package/hooks/useFullscreen.js +0 -39
- package/hooks/useGeolocation.js +0 -38
- package/hooks/useGetSet.js +0 -18
- package/hooks/useGetSetState.js +0 -12
- package/hooks/useHash.js +0 -26
- package/hooks/useHover.js +0 -16
- package/hooks/useHoverDirty.js +0 -17
- package/hooks/useIdle.js +0 -34
- package/hooks/useIntersection.js +0 -19
- package/hooks/useIsomorphicLayoutEffect2.js +0 -6
- package/hooks/useKey.js +0 -16
- package/hooks/useKeyPress.js +0 -13
- package/hooks/useKeyPressEvent.js +0 -11
- package/hooks/useLatest.js +0 -8
- package/hooks/useLifecycles.js +0 -9
- package/hooks/useList.js +0 -67
- package/hooks/useLocalStorage.js +0 -42
- package/hooks/useLocation.js +0 -51
- package/hooks/useLockBodyScroll.js +0 -55
- package/hooks/useLogger.js +0 -10
- package/hooks/useLongPress.js +0 -24
- package/hooks/useMap.js +0 -31
- package/hooks/useMeasure.js +0 -34
- package/hooks/useMeasureDirty.js +0 -24
- package/hooks/useMediaDevices.js +0 -26
- package/hooks/useMediatedState.js +0 -14
- package/hooks/useMethods.js +0 -14
- package/hooks/useMotion.js +0 -56
- package/hooks/useMount.js +0 -9
- package/hooks/useMountedState.js +0 -10
- package/hooks/useMouse.js +0 -44
- package/hooks/useMouseHovered.js +0 -9
- package/hooks/useMouseWheel.js +0 -14
- package/hooks/useMultiStateValidator.js +0 -19
- package/hooks/useNetworkState.js +0 -31
- package/hooks/useNumber.js +0 -4
- package/hooks/useObservable.js +0 -12
- package/hooks/useOrientation.js +0 -30
- package/hooks/usePageLeave.js +0 -19
- package/hooks/usePermission.js +0 -19
- package/hooks/usePinchZoom.js +0 -40
- package/hooks/usePreviousDistinct.js +0 -10
- package/hooks/usePromise.js +0 -19
- package/hooks/useQueue.js +0 -25
- package/hooks/useRaf.js +0 -24
- package/hooks/useRafLoop.js +0 -24
- package/hooks/useRafState.js +0 -15
- package/hooks/useReactive.js +0 -21
- package/hooks/useRendersCount.js +0 -7
- package/hooks/useScroll.js +0 -27
- package/hooks/useScrolling.js +0 -23
- package/hooks/useSearchParam.js +0 -18
- package/hooks/useSessionStorage.js +0 -29
- package/hooks/useSet.js +0 -15
- package/hooks/useSetState.js +0 -16
- package/hooks/useSize.js +0 -58
- package/hooks/useSlider.js +0 -48
- package/hooks/useSpeech.js +0 -45
- package/hooks/useStartTyping.js +0 -30
- package/hooks/useStateList.js +0 -37
- package/hooks/useStateValidator.js +0 -17
- package/hooks/useStateWithHistory.js +0 -46
- package/hooks/useSyncState.js +0 -14
- package/hooks/useThrottle.js +0 -21
- package/hooks/useThrottleFn.js +0 -21
- package/hooks/useTimeout.js +0 -17
- package/hooks/useTimeoutFn.js +0 -16
- package/hooks/useTitle.js +0 -18
- package/hooks/useToggle.js +0 -5
- package/hooks/useTween.js +0 -11
- package/hooks/useUnmount.js +0 -9
- package/hooks/useUnmountPromise.js +0 -20
- package/hooks/useUpdate.js +0 -10
- package/hooks/useUpdateTimeout.js +0 -9
- package/hooks/useUpsert.js +0 -16
- package/hooks/useVibrate.js +0 -21
- package/hooks/useVideo.js +0 -5
- package/hooks/useWindowScroll.js +0 -29
- package/types/hooks/component/UseKey.d.ts +0 -2
- package/types/hooks/factory/createBreakpoint.d.ts +0 -4
- package/types/hooks/factory/createGlobalState.d.ts +0 -7
- package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
- package/types/hooks/factory/createMemo.d.ts +0 -2
- package/types/hooks/factory/createReducer.d.ts +0 -8
- package/types/hooks/factory/createReducerContext.d.ts +0 -5
- package/types/hooks/factory/createRenderProp.d.ts +0 -1
- package/types/hooks/factory/createRouter.d.ts +0 -7
- package/types/hooks/factory/createStateContext.d.ts +0 -5
- package/types/hooks/misc/hookState.d.ts +0 -8
- package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
- package/types/hooks/misc/types.d.ts +0 -2
- package/types/hooks/misc/util.d.ts +0 -5
- package/types/hooks/useAsync.d.ts +0 -20
- package/types/hooks/useAsyncFn.d.ts +0 -23
- package/types/hooks/useAsyncRetry.d.ts +0 -27
- package/types/hooks/useAudio.d.ts +0 -11
- package/types/hooks/useBeforeUnload.d.ts +0 -2
- package/types/hooks/useBoolean.d.ts +0 -2
- package/types/hooks/useClickAway.d.ts +0 -3
- package/types/hooks/useCopyToClipboard.d.ts +0 -7
- package/types/hooks/useCounter.d.ts +0 -9
- package/types/hooks/useCreation.d.ts +0 -2
- package/types/hooks/useCustomCompareEffect.d.ts +0 -4
- package/types/hooks/useDebounce.d.ts +0 -3
- package/types/hooks/useDefault.d.ts +0 -2
- package/types/hooks/useDrop.d.ts +0 -17
- package/types/hooks/useDropArea.d.ts +0 -18
- package/types/hooks/useEffectOnce.d.ts +0 -3
- package/types/hooks/useEffectState.d.ts +0 -2
- package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
- package/types/hooks/useError.d.ts +0 -2
- package/types/hooks/useEvent.d.ts +0 -13
- package/types/hooks/useEventListener.d.ts +0 -2
- package/types/hooks/useFavicon.d.ts +0 -2
- package/types/hooks/useFirstMountState.d.ts +0 -1
- package/types/hooks/useFullscreen.d.ts +0 -10
- package/types/hooks/useGeolocation.d.ts +0 -21
- package/types/hooks/useGetSet.d.ts +0 -3
- package/types/hooks/useGetSetState.d.ts +0 -2
- package/types/hooks/useHash.d.ts +0 -2
- package/types/hooks/useHover.d.ts +0 -4
- package/types/hooks/useHoverDirty.d.ts +0 -3
- package/types/hooks/useIdle.d.ts +0 -2
- package/types/hooks/useIntersection.d.ts +0 -3
- package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
- package/types/hooks/useKey.d.ts +0 -12
- package/types/hooks/useKeyPress.d.ts +0 -3
- package/types/hooks/useKeyPressEvent.d.ts +0 -3
- package/types/hooks/useLatest.d.ts +0 -4
- package/types/hooks/useLifecycles.d.ts +0 -2
- package/types/hooks/useList.d.ts +0 -18
- package/types/hooks/useLocalStorage.d.ts +0 -10
- package/types/hooks/useLocation.d.ts +0 -16
- package/types/hooks/useLockBodyScroll.d.ts +0 -8
- package/types/hooks/useLogger.d.ts +0 -2
- package/types/hooks/useLongPress.d.ts +0 -12
- package/types/hooks/useMap.d.ts +0 -11
- package/types/hooks/useMeasure.d.ts +0 -9
- package/types/hooks/useMeasureDirty.d.ts +0 -11
- package/types/hooks/useMediaDevices.d.ts +0 -2
- package/types/hooks/useMediatedState.d.ts +0 -9
- package/types/hooks/useMethods.d.ts +0 -8
- package/types/hooks/useMotion.d.ts +0 -20
- package/types/hooks/useMount.d.ts +0 -2
- package/types/hooks/useMountedState.d.ts +0 -1
- package/types/hooks/useMouse.d.ts +0 -13
- package/types/hooks/useMouseHovered.d.ts +0 -8
- package/types/hooks/useMouseWheel.d.ts +0 -2
- package/types/hooks/useMultiStateValidator.d.ts +0 -9
- package/types/hooks/useNetworkState.d.ts +0 -22
- package/types/hooks/useNumber.d.ts +0 -2
- package/types/hooks/useObservable.d.ts +0 -8
- package/types/hooks/useOrientation.d.ts +0 -6
- package/types/hooks/usePageLeave.d.ts +0 -2
- package/types/hooks/usePermission.d.ts +0 -16
- package/types/hooks/usePinchZoom.d.ts +0 -18
- package/types/hooks/usePreviousDistinct.d.ts +0 -2
- package/types/hooks/usePromise.d.ts +0 -3
- package/types/hooks/useQueue.d.ts +0 -9
- package/types/hooks/useRaf.d.ts +0 -2
- package/types/hooks/useRafLoop.d.ts +0 -2
- package/types/hooks/useRafState.d.ts +0 -3
- package/types/hooks/useReactive.d.ts +0 -2
- package/types/hooks/useRendersCount.d.ts +0 -1
- package/types/hooks/useScroll.d.ts +0 -7
- package/types/hooks/useScrolling.d.ts +0 -3
- package/types/hooks/useSearchParam.d.ts +0 -3
- package/types/hooks/useSessionStorage.d.ts +0 -2
- package/types/hooks/useSet.d.ts +0 -11
- package/types/hooks/useSetState.d.ts +0 -2
- package/types/hooks/useSize.d.ts +0 -8
- package/types/hooks/useSlider.d.ts +0 -15
- package/types/hooks/useSpeech.d.ts +0 -16
- package/types/hooks/useStartTyping.d.ts +0 -2
- package/types/hooks/useStateList.d.ts +0 -9
- package/types/hooks/useStateValidator.d.ts +0 -8
- package/types/hooks/useStateWithHistory.d.ts +0 -18
- package/types/hooks/useSyncState.d.ts +0 -3
- package/types/hooks/useThrottle.d.ts +0 -2
- package/types/hooks/useThrottleFn.d.ts +0 -2
- package/types/hooks/useTimeout.d.ts +0 -2
- package/types/hooks/useTimeoutFn.d.ts +0 -2
- package/types/hooks/useTitle.d.ts +0 -6
- package/types/hooks/useToggle.d.ts +0 -2
- package/types/hooks/useTween.d.ts +0 -3
- package/types/hooks/useUnmount.d.ts +0 -2
- package/types/hooks/useUnmountPromise.d.ts +0 -3
- package/types/hooks/useUpdate.d.ts +0 -2
- package/types/hooks/useUpdateTimeout.d.ts +0 -2
- package/types/hooks/useUpsert.d.ts +0 -6
- package/types/hooks/useVibrate.d.ts +0 -4
- package/types/hooks/useVideo.d.ts +0 -11
- package/types/hooks/useWindowScroll.d.ts +0 -6
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as w, jsxs as ot, Fragment as wt } from "react/jsx-runtime";
|
|
2
2
|
import ee from "lodash/isArray";
|
|
3
|
-
import
|
|
4
|
-
import te, { useContext as Vt, useState as ye, useMemo as
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
3
|
+
import kt from "lodash/isFunction";
|
|
4
|
+
import te, { useContext as Vt, useState as ye, useMemo as Ze, useRef as K, useCallback as Ue, useEffect as j, useImperativeHandle as St } from "react";
|
|
5
|
+
import { C as it } from "./DJmWXheU.js";
|
|
6
|
+
import { b as At } from "./DUxWiN2U.js";
|
|
7
|
+
import Et from "../hooks/useId.js";
|
|
8
|
+
import Lt from "../hooks/useMergeProps.js";
|
|
9
|
+
import ze from "../hooks/useMergeValue.js";
|
|
10
|
+
import $t from "../SelectView.js";
|
|
11
11
|
import It from "../Trigger.js";
|
|
12
|
-
import ce from "
|
|
13
|
-
import
|
|
12
|
+
import { y as ce } from "./Do1aMgY3.js";
|
|
13
|
+
import Nt from "../utils/getHotkeyHandler.js";
|
|
14
14
|
import "../utils/is.js";
|
|
15
|
-
import { Esc as Tt, Enter as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { V as
|
|
19
|
-
import {
|
|
15
|
+
import { Esc as Tt, Enter as et, Tab as tt, ArrowUp as Pt, ArrowDown as Ft } from "../utils/keyCode.js";
|
|
16
|
+
import Re from "../utils/omit.js";
|
|
17
|
+
import Ut from "../utils/warning.js";
|
|
18
|
+
import { V as Rt } from "./CiEln_Q1.js";
|
|
19
|
+
import { V as Mt } from "./BeM2hfks.js";
|
|
20
20
|
import ie from "lodash/get";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
21
|
+
import Dt from "lodash/isNil";
|
|
22
|
+
import Gt from "lodash/isNumber";
|
|
23
|
+
import x from "lodash/isPlainObject";
|
|
24
|
+
import Ht from "lodash/isString";
|
|
25
25
|
import Kt from "../utils/fillNBSP.js";
|
|
26
|
-
import
|
|
27
|
-
function
|
|
28
|
-
const { prefixCls:
|
|
29
|
-
return /* @__PURE__ */
|
|
26
|
+
import jt from "../utils/getHighlightText.js";
|
|
27
|
+
function Bt(l, b) {
|
|
28
|
+
const { prefixCls: k, label: C, ...R } = l;
|
|
29
|
+
return /* @__PURE__ */ w(
|
|
30
30
|
"li",
|
|
31
31
|
{
|
|
32
32
|
ref: b,
|
|
33
|
-
className: `${
|
|
34
|
-
...
|
|
33
|
+
className: `${k}-group-title`,
|
|
34
|
+
...Re(R, ["_key", "children", "isSelectOptGroup"]),
|
|
35
35
|
children: C
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
function
|
|
39
|
+
const Qt = te.forwardRef(Bt), st = Qt;
|
|
40
|
+
st.__PQB_SELECT_OPTGROUP__ = !0;
|
|
41
|
+
function Wt(l, b) {
|
|
42
42
|
const {
|
|
43
|
-
style:
|
|
43
|
+
style: k,
|
|
44
44
|
className: C,
|
|
45
45
|
wrapperClassName: R,
|
|
46
|
-
disabled:
|
|
46
|
+
disabled: F,
|
|
47
47
|
prefixCls: u,
|
|
48
|
-
rtl:
|
|
48
|
+
rtl: $,
|
|
49
49
|
value: M,
|
|
50
50
|
children: D,
|
|
51
51
|
_isMultipleMode: J,
|
|
@@ -53,26 +53,26 @@ function qt(l, b) {
|
|
|
53
53
|
_isUserCreatingOption: v,
|
|
54
54
|
_valueActive: G,
|
|
55
55
|
_valueSelect: Q,
|
|
56
|
-
_onMouseEnter:
|
|
56
|
+
_onMouseEnter: I,
|
|
57
57
|
_onMouseLeave: H,
|
|
58
|
-
_onClick:
|
|
58
|
+
_onClick: V,
|
|
59
59
|
...o
|
|
60
60
|
} = l, f = "value" in l ? M : `${D}`, s = "children" in l ? D : `${M}`, a = J ? Q.indexOf(f) !== -1 : Q === f, O = {
|
|
61
|
-
style:
|
|
61
|
+
style: k,
|
|
62
62
|
className: ce(
|
|
63
63
|
`${u}-option`,
|
|
64
64
|
{
|
|
65
65
|
[`${u}-option-selected`]: a,
|
|
66
|
-
[`${u}-option-disabled`]:
|
|
66
|
+
[`${u}-option-disabled`]: F,
|
|
67
67
|
[`${u}-option-hover`]: f === G,
|
|
68
68
|
[`${u}-option-empty`]: !s && s !== 0 || typeof s == "string" && /^\s*$/.test(s),
|
|
69
|
-
[`${u}-option-rtl`]:
|
|
69
|
+
[`${u}-option-rtl`]: $
|
|
70
70
|
},
|
|
71
71
|
C
|
|
72
72
|
),
|
|
73
73
|
onMouseEnter: (N) => {
|
|
74
74
|
var y;
|
|
75
|
-
|
|
75
|
+
I == null || I(f), (y = o.onMouseEnter) == null || y.call(o, N);
|
|
76
76
|
},
|
|
77
77
|
onMouseLeave: (N) => {
|
|
78
78
|
var y;
|
|
@@ -80,9 +80,9 @@ function qt(l, b) {
|
|
|
80
80
|
},
|
|
81
81
|
onClick: (N) => {
|
|
82
82
|
var y;
|
|
83
|
-
|
|
83
|
+
V == null || V(f, F), (y = o.onClick) == null || y.call(o, N);
|
|
84
84
|
},
|
|
85
|
-
...
|
|
85
|
+
...Re(o, [
|
|
86
86
|
"_key",
|
|
87
87
|
"extra",
|
|
88
88
|
"isSelectOption",
|
|
@@ -95,7 +95,7 @@ function qt(l, b) {
|
|
|
95
95
|
role: "option",
|
|
96
96
|
"aria-selected": a
|
|
97
97
|
};
|
|
98
|
-
return B && Object.assign(S, { "data-user-created": !0 }), v && Object.assign(S, { "data-user-creating": !0 }), J ? /* @__PURE__ */
|
|
98
|
+
return B && Object.assign(S, { "data-user-created": !0 }), v && Object.assign(S, { "data-user-creating": !0 }), J ? /* @__PURE__ */ ot(
|
|
99
99
|
"li",
|
|
100
100
|
{
|
|
101
101
|
...S,
|
|
@@ -103,56 +103,56 @@ function qt(l, b) {
|
|
|
103
103
|
`${u}-option-wrapper`,
|
|
104
104
|
{
|
|
105
105
|
[`${u}-option-wrapper-selected`]: a,
|
|
106
|
-
[`${u}-option-wrapper-disabled`]:
|
|
106
|
+
[`${u}-option-wrapper-disabled`]: F
|
|
107
107
|
},
|
|
108
108
|
R
|
|
109
109
|
),
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
111
|
+
/* @__PURE__ */ w(
|
|
112
|
+
it,
|
|
113
113
|
{
|
|
114
114
|
"aria-hidden": "true",
|
|
115
115
|
className: `${u}-checkbox`,
|
|
116
116
|
checked: a,
|
|
117
|
-
disabled:
|
|
117
|
+
disabled: F,
|
|
118
118
|
onChange: O.onClick
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ w("span", { ...O, children: s })
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
|
-
) : /* @__PURE__ */
|
|
124
|
+
) : /* @__PURE__ */ w("li", { ...S, ...O, children: s });
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
function
|
|
126
|
+
const qt = te.forwardRef(Wt), Me = qt;
|
|
127
|
+
Me.__PQB_SELECT_OPTION__ = !0;
|
|
128
|
+
function Jt(l) {
|
|
129
129
|
l && l.preventDefault();
|
|
130
130
|
}
|
|
131
131
|
function _e(l, b) {
|
|
132
|
-
return b ? !ee(l) ||
|
|
132
|
+
return b ? !ee(l) || Mt(l) : Dt(l);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
136
|
-
(C) =>
|
|
137
|
-
) : l : l =
|
|
134
|
+
function nt(l, b, k) {
|
|
135
|
+
return k && (b ? l = Array.isArray(l) ? l.map(
|
|
136
|
+
(C) => x(C) && "label" in C ? C.value : C
|
|
137
|
+
) : l : l = x(l) && "label" in l ? l.value : l), _e(l, b) ? b ? Array.isArray(l) ? l : [] : void 0 : l;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function lt(l) {
|
|
140
140
|
return ie(l, "props.isSelectOption") || ie(l, "type.__PQB_SELECT_OPTION__");
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function at(l) {
|
|
143
143
|
return ie(l, "props.isSelectOptGroup") || ie(l, "type.__PQB_SELECT_OPTGROUP__");
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ut({
|
|
146
146
|
children: l,
|
|
147
147
|
options: b,
|
|
148
|
-
filterOption:
|
|
148
|
+
filterOption: k
|
|
149
149
|
}, {
|
|
150
150
|
inputValue: C = "",
|
|
151
151
|
userCreatedOptions: R,
|
|
152
|
-
userCreatingOption:
|
|
152
|
+
userCreatingOption: F,
|
|
153
153
|
prefixCls: u
|
|
154
154
|
}, {
|
|
155
|
-
optionInfoMap:
|
|
155
|
+
optionInfoMap: $ = /* @__PURE__ */ new Map(),
|
|
156
156
|
optionValueList: M = [],
|
|
157
157
|
customNodeCount: D = 0
|
|
158
158
|
} = {}) {
|
|
@@ -160,16 +160,16 @@ function pt({
|
|
|
160
160
|
const Q = (o) => {
|
|
161
161
|
const f = ie(o, "props.value"), s = ie(o, "props.children");
|
|
162
162
|
return f === void 0 && s !== null && s !== void 0 ? s.toString() : f;
|
|
163
|
-
},
|
|
163
|
+
}, I = ({ label: o, value: f }, s, a) => !o && !f && !s ? (D++, `custom_node_${D}`) : a ? s || `group_${o}` : s || `${typeof f}_${f}` || `${o}_${$.size}`, H = (o, f) => {
|
|
164
164
|
const s = Q(o);
|
|
165
165
|
let a = !0;
|
|
166
|
-
|
|
167
|
-
const O =
|
|
166
|
+
k === !0 ? a = s !== void 0 && String(s).toLowerCase().indexOf(C.toLowerCase()) !== -1 : typeof k == "function" && (a = !C || k(C, o));
|
|
167
|
+
const O = $.get(s), S = (O == null ? void 0 : O._origin) === "userCreatedOptions" || (O == null ? void 0 : O._origin) === "userCreatingOption";
|
|
168
168
|
if (!O || S) {
|
|
169
169
|
"_key" in o.props || (o = te.cloneElement(o, {
|
|
170
|
-
_key:
|
|
170
|
+
_key: I(o.props, o.key)
|
|
171
171
|
}));
|
|
172
|
-
const N =
|
|
172
|
+
const N = $.size, y = {
|
|
173
173
|
child: o,
|
|
174
174
|
...o.props,
|
|
175
175
|
value: s,
|
|
@@ -177,7 +177,7 @@ function pt({
|
|
|
177
177
|
_origin: f,
|
|
178
178
|
_valid: a
|
|
179
179
|
};
|
|
180
|
-
if (
|
|
180
|
+
if ($.set(s, y), S) {
|
|
181
181
|
const ne = v.findIndex(
|
|
182
182
|
(se) => {
|
|
183
183
|
var de;
|
|
@@ -189,16 +189,16 @@ function pt({
|
|
|
189
189
|
M.push(s), a && (v.push(o), y.disabled || G.push(N));
|
|
190
190
|
}
|
|
191
191
|
typeof o.props.children != "string" && (B = !0);
|
|
192
|
-
},
|
|
192
|
+
}, V = (o, f) => {
|
|
193
193
|
f && ee(o) && o.length && o.forEach((s) => {
|
|
194
|
-
(
|
|
194
|
+
(Ht(s) || Gt(s)) && (s = {
|
|
195
195
|
label: s,
|
|
196
196
|
value: s
|
|
197
197
|
});
|
|
198
|
-
const a = /* @__PURE__ */
|
|
199
|
-
|
|
198
|
+
const a = /* @__PURE__ */ w(
|
|
199
|
+
Me,
|
|
200
200
|
{
|
|
201
|
-
_key:
|
|
201
|
+
_key: I(s),
|
|
202
202
|
value: s.value,
|
|
203
203
|
disabled: s.disabled === !0,
|
|
204
204
|
extra: s.extra,
|
|
@@ -208,58 +208,58 @@ function pt({
|
|
|
208
208
|
H(a, f);
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
|
-
return
|
|
212
|
-
if (
|
|
211
|
+
return F && V([F], "userCreatingOption"), l && te.Children.map(l, (o) => {
|
|
212
|
+
if (at(o)) {
|
|
213
213
|
const { children: f, options: s } = o.props, {
|
|
214
214
|
childrenList: a,
|
|
215
215
|
optionIndexListForArrowKey: O,
|
|
216
216
|
hasComplexLabelInOptions: S
|
|
217
|
-
} =
|
|
218
|
-
{ children: f, options: s, filterOption:
|
|
217
|
+
} = ut(
|
|
218
|
+
{ children: f, options: s, filterOption: k },
|
|
219
219
|
{ inputValue: C, prefixCls: u },
|
|
220
|
-
{ optionInfoMap:
|
|
220
|
+
{ optionInfoMap: $, optionValueList: M, customNodeCount: D }
|
|
221
221
|
);
|
|
222
222
|
a.length && (v.push(
|
|
223
223
|
te.cloneElement(o, {
|
|
224
224
|
children: null,
|
|
225
|
-
_key:
|
|
225
|
+
_key: I(o.props, o.key, !0)
|
|
226
226
|
})
|
|
227
227
|
), v = v.concat(a), G = G.concat(
|
|
228
228
|
O
|
|
229
229
|
), J = !0, B = B || S);
|
|
230
|
-
} else
|
|
230
|
+
} else lt(o) ? H(o, "children") : x(o) && o.props && v.push(
|
|
231
231
|
te.cloneElement(o, {
|
|
232
|
-
_key:
|
|
232
|
+
_key: I(o.props, o.key)
|
|
233
233
|
})
|
|
234
234
|
);
|
|
235
|
-
}),
|
|
236
|
-
childrenList:
|
|
235
|
+
}), V(b, "options"), V(R, "userCreatedOptions"), {
|
|
236
|
+
childrenList: jt({
|
|
237
237
|
nodeList: v,
|
|
238
238
|
pattern: C,
|
|
239
239
|
highlightClassName: `${u}-highlight`
|
|
240
240
|
}),
|
|
241
|
-
optionInfoMap:
|
|
241
|
+
optionInfoMap: $,
|
|
242
242
|
optionValueList: M,
|
|
243
243
|
optionIndexListForArrowKey: G,
|
|
244
244
|
hasOptGroup: J,
|
|
245
245
|
hasComplexLabelInOptions: B
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const rt = "userCreatingOption", Xt = {
|
|
249
249
|
trigger: "click",
|
|
250
250
|
bordered: !0,
|
|
251
251
|
filterOption: !0,
|
|
252
252
|
unmountOnExit: !0,
|
|
253
253
|
defaultActiveFirstOption: !0
|
|
254
|
-
},
|
|
255
|
-
function
|
|
256
|
-
var
|
|
257
|
-
const { getPrefixCls:
|
|
254
|
+
}, Yt = { bottom: 4 };
|
|
255
|
+
function Zt(l, b) {
|
|
256
|
+
var Je;
|
|
257
|
+
const { getPrefixCls: k, renderEmpty: C, componentConfig: R, rtl: F } = Vt(At), u = Lt(
|
|
258
258
|
l,
|
|
259
|
-
|
|
259
|
+
Xt,
|
|
260
260
|
R == null ? void 0 : R.Select
|
|
261
261
|
), {
|
|
262
|
-
children:
|
|
262
|
+
children: $,
|
|
263
263
|
renderFormat: M,
|
|
264
264
|
defaultActiveFirstOption: D,
|
|
265
265
|
disabled: J,
|
|
@@ -267,9 +267,9 @@ function zt(l, b) {
|
|
|
267
267
|
notFoundContent: v,
|
|
268
268
|
showSearch: G,
|
|
269
269
|
tokenSeparators: Q,
|
|
270
|
-
options:
|
|
270
|
+
options: I,
|
|
271
271
|
filterOption: H,
|
|
272
|
-
labelInValue:
|
|
272
|
+
labelInValue: V,
|
|
273
273
|
getPopupContainer: o,
|
|
274
274
|
trigger: f,
|
|
275
275
|
triggerElement: s,
|
|
@@ -284,54 +284,54 @@ function zt(l, b) {
|
|
|
284
284
|
onDeselect: de,
|
|
285
285
|
onClear: be,
|
|
286
286
|
onSearch: ve,
|
|
287
|
-
onFocus:
|
|
287
|
+
onFocus: pt,
|
|
288
288
|
onBlur: xe,
|
|
289
289
|
onPopupScroll: we,
|
|
290
290
|
onVisibleChange: ke,
|
|
291
|
-
onInputValueChange:
|
|
292
|
-
onPaste:
|
|
291
|
+
onInputValueChange: Ve,
|
|
292
|
+
onPaste: Se,
|
|
293
293
|
onKeyDown: Ae
|
|
294
294
|
} = u;
|
|
295
295
|
let { mode: Ee, allowCreate: _ } = u;
|
|
296
|
-
Ee === "tags" && (Ee = "multiple", _ = !0,
|
|
296
|
+
Ee === "tags" && (Ee = "multiple", _ = !0, Ut(
|
|
297
297
|
!0,
|
|
298
298
|
`[Pqb Select] The 'tags' mode will be removed in the next major version, please use {mode: "multiple", allowCreate: true} instead.`
|
|
299
299
|
));
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
), i = "value" in u ?
|
|
300
|
+
const A = k("select"), g = Ee === "multiple", [ct, Le] = ye(
|
|
301
|
+
nt(u.defaultValue, g, V)
|
|
302
|
+
), i = "value" in u ? nt(u.value, g, V) : ct, [E, dt, ft] = ze("", {
|
|
303
303
|
value: "inputValue" in u ? u.inputValue || "" : void 0
|
|
304
|
-
}), [
|
|
304
|
+
}), [T, mt] = ze(!1, {
|
|
305
305
|
defaultValue: u.defaultPopupVisible,
|
|
306
306
|
value: "popupVisible" in u ? u.popupVisible : a && "popupVisible" in a ? a.popupVisible : void 0
|
|
307
|
-
}), [le,
|
|
307
|
+
}), [le, gt] = ye(null), [ae, ht] = ye([]), [U, re] = ye(
|
|
308
308
|
ee(i) ? i[0] : i
|
|
309
309
|
), {
|
|
310
310
|
childrenList: $e,
|
|
311
311
|
optionInfoMap: m,
|
|
312
312
|
optionValueList: W,
|
|
313
313
|
optionIndexListForArrowKey: X,
|
|
314
|
-
hasOptGroup:
|
|
315
|
-
hasComplexLabelInOptions:
|
|
316
|
-
} =
|
|
317
|
-
{ children:
|
|
314
|
+
hasOptGroup: Ct,
|
|
315
|
+
hasComplexLabelInOptions: Ot
|
|
316
|
+
} = Ze(() => ut(
|
|
317
|
+
{ children: $, options: I, filterOption: H },
|
|
318
318
|
{
|
|
319
|
-
prefixCls:
|
|
320
|
-
inputValue:
|
|
319
|
+
prefixCls: A,
|
|
320
|
+
inputValue: E,
|
|
321
321
|
userCreatedOptions: ae,
|
|
322
322
|
userCreatingOption: le
|
|
323
323
|
}
|
|
324
324
|
), [
|
|
325
|
-
L,
|
|
326
325
|
$,
|
|
326
|
+
I,
|
|
327
327
|
H,
|
|
328
|
-
|
|
328
|
+
E,
|
|
329
329
|
le,
|
|
330
330
|
ae
|
|
331
|
-
]),
|
|
331
|
+
]), Ie = K(null), Ge = K(null), L = K(null), Y = K([]), q = K(null), He = K(E), Ne = K(null), fe = K(0), Te = K(!1), Ke = Et(`${A}-popup-`), me = _e(i, g), je = Ze(() => {
|
|
332
332
|
var e, t;
|
|
333
333
|
if (D) {
|
|
334
|
-
const n = ee(i) ? i[0] : i, r = !me && ((e = m.get(n)) == null ? void 0 : e._valid), c = ((t = m == null ? void 0 : m.get(W[0])) == null ? void 0 : t._origin) ===
|
|
334
|
+
const n = ee(i) ? i[0] : i, r = !me && ((e = m.get(n)) == null ? void 0 : e._valid), c = ((t = m == null ? void 0 : m.get(W[0])) == null ? void 0 : t._origin) === rt;
|
|
335
335
|
return r && !c ? n : W[X[0]];
|
|
336
336
|
}
|
|
337
337
|
}, [
|
|
@@ -345,39 +345,39 @@ function zt(l, b) {
|
|
|
345
345
|
(e, t) => {
|
|
346
346
|
var r;
|
|
347
347
|
const n = m.get(e);
|
|
348
|
-
|
|
348
|
+
Ie.current && ((r = n == null ? void 0 : n.child) != null && r.props) && Ie.current.scrollTo({
|
|
349
349
|
key: n.child.props._key,
|
|
350
350
|
options: t
|
|
351
351
|
});
|
|
352
352
|
},
|
|
353
353
|
[m]
|
|
354
354
|
), he = Ue(
|
|
355
|
-
(e, t = !1) =>
|
|
355
|
+
(e, t = !1) => x(_) && typeof (_ == null ? void 0 : _.formatter) == "function" ? _.formatter(e, t) : e,
|
|
356
356
|
[_]
|
|
357
357
|
), Z = (e, t) => {
|
|
358
|
-
(e !==
|
|
358
|
+
(e !== He.current || t !== Ne.current) && (dt(e), He.current = e, Ne.current = t, Ve == null || Ve(e, t));
|
|
359
359
|
}, oe = (e) => {
|
|
360
360
|
var t;
|
|
361
|
-
|
|
361
|
+
T !== e && (mt(e), ke == null || ke(e), (t = a == null ? void 0 : a.onVisibleChange) == null || t.call(a, e));
|
|
362
362
|
};
|
|
363
|
-
|
|
363
|
+
j(() => {
|
|
364
364
|
g ? Array.isArray(i) || Le(i === void 0 ? [] : [i]) : Array.isArray(i) && Le(i.length === 0 ? void 0 : i[0]);
|
|
365
|
-
}, [g, i]),
|
|
366
|
-
if (
|
|
367
|
-
re(
|
|
365
|
+
}, [g, i]), j(() => {
|
|
366
|
+
if (T) {
|
|
367
|
+
re(je);
|
|
368
368
|
const e = ee(i) ? i[0] : i;
|
|
369
369
|
!me && m.has(e) && setTimeout(() => ge(e));
|
|
370
370
|
}
|
|
371
|
-
}, [
|
|
372
|
-
(q.current === "up" || q.current === "down") && (ge(
|
|
373
|
-
}, [
|
|
374
|
-
re(
|
|
371
|
+
}, [T]), j(() => {
|
|
372
|
+
(q.current === "up" || q.current === "down") && (ge(U), q.current = "none");
|
|
373
|
+
}, [U]), j(() => {
|
|
374
|
+
re(je);
|
|
375
375
|
}, [JSON.stringify($e.map((e) => {
|
|
376
376
|
var t;
|
|
377
377
|
return (t = e == null ? void 0 : e.props) == null ? void 0 : t.value;
|
|
378
|
-
}))]),
|
|
378
|
+
}))]), j(() => {
|
|
379
379
|
Y.current = Y.current.filter((e) => g ? ee(i) && i.indexOf(e.value) > -1 : e.value === i);
|
|
380
|
-
}, [i, g]),
|
|
380
|
+
}, [i, g]), j(() => {
|
|
381
381
|
if (_) {
|
|
382
382
|
let e;
|
|
383
383
|
if (_e(i, g))
|
|
@@ -386,26 +386,26 @@ function zt(l, b) {
|
|
|
386
386
|
const n = Array.isArray(i) ? i : [i], r = n.filter((p) => {
|
|
387
387
|
var P;
|
|
388
388
|
const h = m.get(p) || ((P = Y.current.find((d) => d.value === p)) == null ? void 0 : P.option);
|
|
389
|
-
return !h || h._origin ===
|
|
389
|
+
return !h || h._origin === rt;
|
|
390
390
|
}).map((p) => he(p));
|
|
391
391
|
e = ae.filter((p) => {
|
|
392
|
-
const h =
|
|
392
|
+
const h = x(p) ? p.value : p;
|
|
393
393
|
return n.indexOf(h) !== -1;
|
|
394
394
|
}).concat(
|
|
395
395
|
r
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
|
-
const t = (n) => n.map((r) =>
|
|
399
|
-
t(e) !== t(ae) &&
|
|
398
|
+
const t = (n) => n.map((r) => x(r) ? r.value : r).toString();
|
|
399
|
+
t(e) !== t(ae) && ht(e);
|
|
400
400
|
}
|
|
401
|
-
}, [i, _, g, he]),
|
|
402
|
-
_ &&
|
|
403
|
-
|
|
401
|
+
}, [i, _, g, he]), j(() => {
|
|
402
|
+
_ && gt(
|
|
403
|
+
E && !m.has(E) ? he(E, !0) : null
|
|
404
404
|
);
|
|
405
|
-
}, [
|
|
406
|
-
const { current: e } =
|
|
407
|
-
|
|
408
|
-
}, [
|
|
405
|
+
}, [E, he]), j(() => {
|
|
406
|
+
const { current: e } = Ne;
|
|
407
|
+
ft === E && (e === "manual" || e === "optionListHide") && (ve == null || ve(E, e));
|
|
408
|
+
}, [E]);
|
|
409
409
|
const ue = Ue(
|
|
410
410
|
(e) => {
|
|
411
411
|
const t = m.get(e);
|
|
@@ -419,26 +419,26 @@ function zt(l, b) {
|
|
|
419
419
|
return n && n.option;
|
|
420
420
|
},
|
|
421
421
|
[m]
|
|
422
|
-
),
|
|
422
|
+
), Be = (e) => {
|
|
423
423
|
if (!X.length)
|
|
424
424
|
return;
|
|
425
|
-
if (
|
|
425
|
+
if (U === void 0 || !m.has(U))
|
|
426
426
|
return W[X[0]];
|
|
427
|
-
const n = m.get(
|
|
427
|
+
const n = m.get(U)._index, r = X.indexOf(n), c = X.length;
|
|
428
428
|
return W[X[((e === "up" ? r - 1 : r + 1) + c) % c]];
|
|
429
429
|
}, Ce = (e, t = _e(e, g)) => {
|
|
430
430
|
let n = e;
|
|
431
431
|
const r = e === void 0 ? void 0 : Array.isArray(e) ? e.map(ue) : ue(e);
|
|
432
|
-
if (
|
|
432
|
+
if (V && !t) {
|
|
433
433
|
const c = (p, h) => {
|
|
434
434
|
if (h)
|
|
435
435
|
return h.children;
|
|
436
436
|
const P = "value" in u ? u.value : "defaultValue" in u ? u.defaultValue : null;
|
|
437
437
|
if (Array.isArray(P)) {
|
|
438
438
|
for (const d of P)
|
|
439
|
-
if (
|
|
439
|
+
if (x(d) && d.value === p)
|
|
440
440
|
return d.label;
|
|
441
|
-
} else if (
|
|
441
|
+
} else if (x(P) && P.value === p)
|
|
442
442
|
return P.label;
|
|
443
443
|
};
|
|
444
444
|
Array.isArray(e) ? n = e.map((p, h) => ({
|
|
@@ -455,7 +455,7 @@ function zt(l, b) {
|
|
|
455
455
|
const t = Ce(e);
|
|
456
456
|
ne(t.value, t.option);
|
|
457
457
|
}
|
|
458
|
-
},
|
|
458
|
+
}, Qe = (e, t) => {
|
|
459
459
|
if (t === "remove" || t === "add" && m.get(e)) {
|
|
460
460
|
const n = t === "add" ? i.concat(e) : i.filter((c) => c !== e), r = t === "add" ? se : de;
|
|
461
461
|
if (z(n), typeof r == "function") {
|
|
@@ -469,62 +469,62 @@ function zt(l, b) {
|
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
},
|
|
473
|
-
t || (g ? (
|
|
472
|
+
}, We = (e, t) => {
|
|
473
|
+
t || (g ? (Qe(
|
|
474
474
|
e,
|
|
475
475
|
i.indexOf(e) === -1 ? "add" : "remove"
|
|
476
|
-
), (!
|
|
476
|
+
), (!x(G) || !G.retainInputValueWhileSelect) && Z("", "optionChecked")) : (e !== i && z(e), setTimeout(() => {
|
|
477
477
|
oe(!1);
|
|
478
478
|
})));
|
|
479
|
-
}, Oe =
|
|
479
|
+
}, Oe = Nt(
|
|
480
480
|
/* @__PURE__ */ new Map([
|
|
481
481
|
[Tt.key, () => oe(!1)],
|
|
482
482
|
[
|
|
483
|
-
|
|
483
|
+
et.key,
|
|
484
484
|
() => {
|
|
485
|
-
if (
|
|
486
|
-
const e = m.get(
|
|
487
|
-
e &&
|
|
485
|
+
if (T) {
|
|
486
|
+
const e = m.get(U);
|
|
487
|
+
e && We(U, e.disabled);
|
|
488
488
|
} else
|
|
489
489
|
oe(!0);
|
|
490
490
|
}
|
|
491
491
|
],
|
|
492
492
|
[
|
|
493
|
-
|
|
493
|
+
tt.key,
|
|
494
494
|
// 按tab键切换,关闭开启的弹出框
|
|
495
495
|
() => oe(!1)
|
|
496
496
|
],
|
|
497
497
|
[
|
|
498
|
-
|
|
498
|
+
Pt.key,
|
|
499
499
|
() => {
|
|
500
|
-
if (
|
|
501
|
-
return q.current = "up", re(
|
|
500
|
+
if (T)
|
|
501
|
+
return q.current = "up", re(Be("up")), !1;
|
|
502
502
|
}
|
|
503
503
|
],
|
|
504
504
|
[
|
|
505
|
-
|
|
505
|
+
Ft.key,
|
|
506
506
|
() => {
|
|
507
|
-
if (
|
|
508
|
-
return q.current = "down", re(
|
|
507
|
+
if (T)
|
|
508
|
+
return q.current = "down", re(Be("down")), !1;
|
|
509
509
|
}
|
|
510
510
|
]
|
|
511
511
|
])
|
|
512
|
-
),
|
|
512
|
+
), yt = () => {
|
|
513
513
|
var h, P;
|
|
514
|
-
const e = (a == null ? void 0 : a.autoAlignPopupWidth) === !1 && (!((h = a == null ? void 0 : a.style) != null && h.width) || ((P = a == null ? void 0 : a.style) == null ? void 0 : P.width) === "auto"), t = e &&
|
|
515
|
-
|
|
514
|
+
const e = (a == null ? void 0 : a.autoAlignPopupWidth) === !1 && (!((h = a == null ? void 0 : a.style) != null && h.width) || ((P = a == null ? void 0 : a.style) == null ? void 0 : P.width) === "auto"), t = e && Ot, n = "notFoundContent" in u ? v : C("Select"), r = $e.length ? /* @__PURE__ */ w(
|
|
515
|
+
Rt,
|
|
516
516
|
{
|
|
517
517
|
id: Ke,
|
|
518
518
|
role: "listbox",
|
|
519
519
|
style: S,
|
|
520
|
-
className: ce(`${
|
|
521
|
-
ref:
|
|
520
|
+
className: ce(`${A}-popup-inner`, N),
|
|
521
|
+
ref: Ie,
|
|
522
522
|
data: $e,
|
|
523
523
|
height: null,
|
|
524
|
-
isStaticItemHeight: !
|
|
524
|
+
isStaticItemHeight: !Ct,
|
|
525
525
|
measureLongestItem: e,
|
|
526
526
|
itemKey: (d) => d.props._key,
|
|
527
|
-
onMouseDown:
|
|
527
|
+
onMouseDown: Jt,
|
|
528
528
|
onMouseMove: () => {
|
|
529
529
|
q.current = null;
|
|
530
530
|
},
|
|
@@ -532,21 +532,21 @@ function zt(l, b) {
|
|
|
532
532
|
...y,
|
|
533
533
|
threshold: t ? null : y == null ? void 0 : y.threshold,
|
|
534
534
|
children: (d) => {
|
|
535
|
-
var
|
|
536
|
-
if (
|
|
537
|
-
return /* @__PURE__ */
|
|
538
|
-
if (
|
|
539
|
-
const
|
|
540
|
-
(pe) =>
|
|
541
|
-
),
|
|
542
|
-
prefixCls:
|
|
543
|
-
rtl:
|
|
544
|
-
_valueActive:
|
|
535
|
+
var Xe;
|
|
536
|
+
if (at(d))
|
|
537
|
+
return /* @__PURE__ */ w(d.type, { ...d.props, prefixCls: A });
|
|
538
|
+
if (lt(d)) {
|
|
539
|
+
const Ye = (Xe = d.props) == null ? void 0 : Xe.value, bt = x(le) ? le.value : le, vt = ae.map(
|
|
540
|
+
(pe) => x(pe) ? pe.value : pe
|
|
541
|
+
), xt = {
|
|
542
|
+
prefixCls: A,
|
|
543
|
+
rtl: F,
|
|
544
|
+
_valueActive: U,
|
|
545
545
|
_valueSelect: i,
|
|
546
546
|
_isMultipleMode: g,
|
|
547
|
-
_isUserCreatingOption: _ &&
|
|
548
|
-
_isUserCreatedOption: _ &&
|
|
549
|
-
_onClick:
|
|
547
|
+
_isUserCreatingOption: _ && bt === Ye,
|
|
548
|
+
_isUserCreatedOption: _ && vt.indexOf(Ye) > -1,
|
|
549
|
+
_onClick: We,
|
|
550
550
|
_onMouseEnter: (pe) => {
|
|
551
551
|
q.current === null && re(pe);
|
|
552
552
|
},
|
|
@@ -554,34 +554,34 @@ function zt(l, b) {
|
|
|
554
554
|
q.current === null && re(void 0);
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
|
-
return d && /* @__PURE__ */
|
|
557
|
+
return d && /* @__PURE__ */ w(d.type, { ...d.props, ...xt });
|
|
558
558
|
}
|
|
559
559
|
return d;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
) : null, p = n && !(_ &&
|
|
562
|
+
) : null, p = n && !(_ && E) ? /* @__PURE__ */ w(
|
|
563
563
|
"div",
|
|
564
564
|
{
|
|
565
565
|
style: S,
|
|
566
|
-
className: ce(`${
|
|
566
|
+
className: ce(`${A}-popup-inner`, N),
|
|
567
567
|
children: n
|
|
568
568
|
}
|
|
569
569
|
) : null;
|
|
570
|
-
return /* @__PURE__ */
|
|
570
|
+
return /* @__PURE__ */ ot(
|
|
571
571
|
"div",
|
|
572
572
|
{
|
|
573
|
-
className: ce(`${
|
|
574
|
-
[`${
|
|
575
|
-
[`${
|
|
573
|
+
className: ce(`${A}-popup`, {
|
|
574
|
+
[`${A}-popup-hidden`]: r === null && p === null,
|
|
575
|
+
[`${A}-popup-multiple`]: g
|
|
576
576
|
}),
|
|
577
577
|
tabIndex: -1,
|
|
578
578
|
onKeyDown: (d) => Oe(d),
|
|
579
579
|
children: [
|
|
580
|
-
!!g && !!r && /* @__PURE__ */
|
|
581
|
-
|
|
580
|
+
!!g && !!r && /* @__PURE__ */ w(wt, { children: /* @__PURE__ */ w(
|
|
581
|
+
it,
|
|
582
582
|
{
|
|
583
583
|
"aria-hidden": "true",
|
|
584
|
-
className: `${
|
|
584
|
+
className: `${A}-checkbox ${A}-checkbox-all`,
|
|
585
585
|
checked: W.length === i.length,
|
|
586
586
|
indeterminate: W.length !== i.length && i.length !== 0,
|
|
587
587
|
onChange: (d) => {
|
|
@@ -594,7 +594,7 @@ function zt(l, b) {
|
|
|
594
594
|
]
|
|
595
595
|
}
|
|
596
596
|
);
|
|
597
|
-
},
|
|
597
|
+
}, Pe = (e) => {
|
|
598
598
|
if (fe.current = null, g && ee(Q) && Q.length) {
|
|
599
599
|
const t = e.split(new RegExp(`[${Q.join("")}]`));
|
|
600
600
|
if (t.length > 1) {
|
|
@@ -609,31 +609,31 @@ function zt(l, b) {
|
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
return !!fe.current;
|
|
612
|
-
},
|
|
613
|
-
onFocus:
|
|
612
|
+
}, _t = {
|
|
613
|
+
onFocus: pt,
|
|
614
614
|
onBlur: (e) => {
|
|
615
|
-
xe == null || xe(e), !
|
|
615
|
+
xe == null || xe(e), !T && !Te.current && Z("", "optionListHide");
|
|
616
616
|
},
|
|
617
617
|
onKeyDown: (e) => {
|
|
618
618
|
if (e.target.tagName === "INPUT" && e.target.value) {
|
|
619
|
-
const t = e.key ===
|
|
619
|
+
const t = e.key === tt.key, n = e.key === et.key;
|
|
620
620
|
if (n || t) {
|
|
621
621
|
const r = n ? `
|
|
622
622
|
` : t ? " " : "";
|
|
623
|
-
|
|
623
|
+
Pe(e.target.value + r) && Z("", "tokenSeparator");
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
Oe(e), Ae == null || Ae(e);
|
|
627
627
|
},
|
|
628
628
|
onChangeInputValue: (e, { nativeEvent: { inputType: t } }) => {
|
|
629
|
-
t !== "insertFromPaste" &&
|
|
629
|
+
t !== "insertFromPaste" && Pe(e), fe.current ? Z("", "tokenSeparator") : Z(e, "manual"), !T && e && oe(!0);
|
|
630
630
|
},
|
|
631
631
|
onPaste: (e) => {
|
|
632
|
-
|
|
632
|
+
Pe(e.clipboardData.getData("text")), Se == null || Se(e);
|
|
633
633
|
},
|
|
634
634
|
// Option Items
|
|
635
635
|
onRemoveCheckedItem: (e, t, n) => {
|
|
636
|
-
n.stopPropagation(),
|
|
636
|
+
n.stopPropagation(), Qe(i[t], "remove");
|
|
637
637
|
},
|
|
638
638
|
onClear: (e) => {
|
|
639
639
|
if (e.stopPropagation(), g) {
|
|
@@ -644,85 +644,85 @@ function zt(l, b) {
|
|
|
644
644
|
z(t);
|
|
645
645
|
} else
|
|
646
646
|
z(void 0);
|
|
647
|
-
Z("", "manual"), be == null || be(
|
|
647
|
+
Z("", "manual"), be == null || be(T);
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
|
-
|
|
650
|
+
St(
|
|
651
651
|
b,
|
|
652
652
|
() => {
|
|
653
653
|
var e;
|
|
654
654
|
return {
|
|
655
|
-
dom: (e =
|
|
655
|
+
dom: (e = L.current) == null ? void 0 : e.dom,
|
|
656
656
|
focus() {
|
|
657
|
-
|
|
657
|
+
L.current && L.current.focus();
|
|
658
658
|
},
|
|
659
659
|
blur() {
|
|
660
|
-
|
|
660
|
+
L.current && L.current.blur();
|
|
661
661
|
},
|
|
662
662
|
hotkeyHandler: Oe,
|
|
663
|
-
activeOptionValue:
|
|
663
|
+
activeOptionValue: U,
|
|
664
664
|
getOptionInfoByValue: ue,
|
|
665
665
|
getOptionInfoList: () => [...m.values()].filter((t) => t._valid),
|
|
666
666
|
scrollIntoView: ge,
|
|
667
667
|
getRootDOMNode() {
|
|
668
668
|
var t, n;
|
|
669
|
-
return (n = (t =
|
|
669
|
+
return (n = (t = L.current) == null ? void 0 : t.getRootDOMNode) == null ? void 0 : n.call(t);
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
672
|
},
|
|
673
673
|
[
|
|
674
674
|
Oe,
|
|
675
675
|
m,
|
|
676
|
-
|
|
676
|
+
U,
|
|
677
677
|
ue,
|
|
678
678
|
ge
|
|
679
679
|
]
|
|
680
680
|
);
|
|
681
|
-
const
|
|
681
|
+
const qe = (e) => /* @__PURE__ */ w(
|
|
682
682
|
It,
|
|
683
683
|
{
|
|
684
|
-
ref: (t) =>
|
|
685
|
-
popup:
|
|
684
|
+
ref: (t) => Ge.current = t,
|
|
685
|
+
popup: yt,
|
|
686
686
|
trigger: f,
|
|
687
687
|
disabled: J,
|
|
688
688
|
getPopupContainer: o,
|
|
689
689
|
classNames: "slideDynamicOrigin",
|
|
690
690
|
autoAlignPopupWidth: !0,
|
|
691
|
-
popupAlign:
|
|
692
|
-
popupVisible:
|
|
691
|
+
popupAlign: Yt,
|
|
692
|
+
popupVisible: T,
|
|
693
693
|
unmountOnExit: B,
|
|
694
694
|
onVisibleChange: oe,
|
|
695
695
|
__onExit: () => {
|
|
696
|
-
|
|
696
|
+
Te.current = !0;
|
|
697
697
|
},
|
|
698
698
|
__onExited: () => {
|
|
699
|
-
|
|
699
|
+
Te.current = !1, Z("", "optionListHide");
|
|
700
700
|
},
|
|
701
|
-
...
|
|
701
|
+
...Re(a, ["popupVisible", "onVisibleChange"]),
|
|
702
702
|
children: e
|
|
703
703
|
}
|
|
704
704
|
), Fe = typeof s == "function" ? s(Ce(i)) : s;
|
|
705
|
-
return
|
|
705
|
+
return j(() => {
|
|
706
706
|
var t;
|
|
707
707
|
let e;
|
|
708
|
-
return (t =
|
|
708
|
+
return (t = L.current) != null && t.dom && (e = new ResizeObserver(() => {
|
|
709
709
|
var n, r;
|
|
710
|
-
(r = (n =
|
|
711
|
-
}), e.observe(
|
|
710
|
+
(r = (n = Ge.current) == null ? void 0 : n.updatePopupPosition) == null || r.call(n);
|
|
711
|
+
}), e.observe(L.current.dom)), () => {
|
|
712
712
|
var n, r, c;
|
|
713
|
-
(n =
|
|
713
|
+
(n = L.current) != null && n.dom && ((r = e == null ? void 0 : e.unobserve) == null || r.call(e, L.current.dom)), (c = e == null ? void 0 : e.disconnect) == null || c.call(e), e = null;
|
|
714
714
|
};
|
|
715
|
-
}, [(
|
|
716
|
-
|
|
715
|
+
}, [(Je = L.current) == null ? void 0 : Je.dom]), Fe != null ? qe(Fe) : /* @__PURE__ */ w(
|
|
716
|
+
$t,
|
|
717
717
|
{
|
|
718
718
|
...u,
|
|
719
|
-
...
|
|
720
|
-
ref:
|
|
719
|
+
..._t,
|
|
720
|
+
ref: L,
|
|
721
721
|
value: i,
|
|
722
|
-
inputValue:
|
|
723
|
-
popupVisible:
|
|
724
|
-
rtl:
|
|
725
|
-
prefixCls:
|
|
722
|
+
inputValue: E,
|
|
723
|
+
popupVisible: T,
|
|
724
|
+
rtl: F,
|
|
725
|
+
prefixCls: A,
|
|
726
726
|
allowCreate: !!_,
|
|
727
727
|
ariaControls: Ke,
|
|
728
728
|
isEmptyValue: me,
|
|
@@ -731,7 +731,7 @@ function zt(l, b) {
|
|
|
731
731
|
renderText: (e) => {
|
|
732
732
|
const t = ue(e);
|
|
733
733
|
let n = e;
|
|
734
|
-
if (
|
|
734
|
+
if (kt(M)) {
|
|
735
735
|
const r = Ce(e, !1);
|
|
736
736
|
n = M(
|
|
737
737
|
r.option || null,
|
|
@@ -739,14 +739,14 @@ function zt(l, b) {
|
|
|
739
739
|
);
|
|
740
740
|
} else {
|
|
741
741
|
let r = !1;
|
|
742
|
-
if (
|
|
742
|
+
if (V) {
|
|
743
743
|
const c = u.value || u.defaultValue;
|
|
744
744
|
if (Array.isArray(c)) {
|
|
745
745
|
const p = c.find(
|
|
746
|
-
(h) =>
|
|
746
|
+
(h) => x(h) && h.value === e
|
|
747
747
|
);
|
|
748
748
|
p && (n = p.label, r = !0);
|
|
749
|
-
} else
|
|
749
|
+
} else x(c) && (n = c.label, r = !0);
|
|
750
750
|
}
|
|
751
751
|
!r && t && "children" in t && (n = t.children);
|
|
752
752
|
}
|
|
@@ -755,16 +755,16 @@ function zt(l, b) {
|
|
|
755
755
|
disabled: t && t.disabled
|
|
756
756
|
};
|
|
757
757
|
},
|
|
758
|
-
renderView:
|
|
758
|
+
renderView: qe
|
|
759
759
|
}
|
|
760
760
|
);
|
|
761
761
|
}
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
762
|
+
const zt = te.forwardRef(Zt), De = zt;
|
|
763
|
+
De.displayName = "Select";
|
|
764
|
+
De.Option = Me;
|
|
765
|
+
De.OptGroup = st;
|
|
766
766
|
export {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
767
|
+
De as S,
|
|
768
|
+
at as a,
|
|
769
|
+
lt as i
|
|
770
770
|
};
|