@unicom-cloud/ui 0.8.55 → 0.8.57
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/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/{BC0PujUD.js → BMvZCjSU.js} +118 -120
- 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/CR4u270n.js +284 -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/CkAOsst1.js +73 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{RRWbBHK-.js → D5p8q9Pa.js} +221 -221
- 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/{Niaq_og8.js → DMWMrXg1.js} +220 -226
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -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/Dbk4DVhB.js +855 -0
- 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/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/HlP8inLK.js +1796 -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/{Dki1RB5p.js → aM2ePYrq.js} +154 -155
- 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/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/chunk/BdYAMaw9.js +0 -6
- 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,40 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var d = (t, e, n) =>
|
|
4
|
-
import { jsxs as X, Fragment as
|
|
5
|
-
import
|
|
6
|
-
import Ue from "
|
|
7
|
-
import We from "
|
|
8
|
-
import Ke from "
|
|
9
|
-
import
|
|
10
|
-
import _e from "lodash/isArray";
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var He = (t, e, n) => e in t ? Fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var d = (t, e, n) => He(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsxs as X, Fragment as re, jsx as g } from "react/jsx-runtime";
|
|
5
|
+
import { I as Be } from "./CXNW5Y2a.js";
|
|
6
|
+
import { a as Ue, I as je } from "./D9TqtOhq.js";
|
|
7
|
+
import { e as We } from "./B45v5S9k.js";
|
|
8
|
+
import { G as Ke, V as ze } from "./BeM2hfks.js";
|
|
9
|
+
import we from "lodash/isArray";
|
|
11
10
|
import W from "lodash/isFunction";
|
|
12
|
-
import
|
|
11
|
+
import ne from "lodash/isPlainObject";
|
|
13
12
|
import Y from "lodash/isString";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
13
|
+
import qe, { useRef as z, useState as se, useCallback as ae, useEffect as Z, forwardRef as Ge, useContext as Je, useImperativeHandle as Qe } from "react";
|
|
14
|
+
import { b as Xe } from "./DUxWiN2U.js";
|
|
16
15
|
import ue from "../hooks/useForceUpdate.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
16
|
+
import Ye from "../hooks/useId.js";
|
|
17
|
+
import Ze from "../hooks/useMergeProps.js";
|
|
19
18
|
import ve from "../hooks/useMergeValue.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import q from "
|
|
24
|
-
import { Enter as he, ArrowLeft as
|
|
25
|
-
import { b as
|
|
19
|
+
import le from "../hooks/useUpdateEffect.js";
|
|
20
|
+
import et from "../SelectView.js";
|
|
21
|
+
import tt from "../Trigger.js";
|
|
22
|
+
import { y as q } from "./Do1aMgY3.js";
|
|
23
|
+
import { Enter as he, ArrowLeft as nt, ArrowRight as rt, ArrowUp as _e, ArrowDown as ie, Esc as fe, Tab as lt } from "../utils/keyCode.js";
|
|
24
|
+
import { b as st, P as at } from "./BP7xX86Q.js";
|
|
26
25
|
import me from "lodash/isEqualWith";
|
|
27
26
|
import ee from "lodash/get";
|
|
28
|
-
import { y as
|
|
29
|
-
import { C as
|
|
30
|
-
import
|
|
31
|
-
import { on as
|
|
27
|
+
import { y as it } from "./CiZVOdJ3.js";
|
|
28
|
+
import { C as Oe } from "./DJmWXheU.js";
|
|
29
|
+
import ct from "../hooks/useIsFirstRender.js";
|
|
30
|
+
import { on as Le, off as de } from "../utils/dom.js";
|
|
32
31
|
import "../utils/is.js";
|
|
33
|
-
import { V as
|
|
34
|
-
import
|
|
35
|
-
function
|
|
32
|
+
import { V as Pe } from "./CiEln_Q1.js";
|
|
33
|
+
import ot from "../hooks/useRefs.js";
|
|
34
|
+
function dt(t, e) {
|
|
36
35
|
const n = z(null), l = ue();
|
|
37
|
-
return n.current || (n.current = t()),
|
|
36
|
+
return n.current || (n.current = t()), le(() => {
|
|
38
37
|
n.current = t(), l();
|
|
39
38
|
}, [...e]), n.current;
|
|
40
39
|
}
|
|
@@ -67,7 +66,7 @@ class ge {
|
|
|
67
66
|
// 保存暴露给外部的属性
|
|
68
67
|
d(this, "_data");
|
|
69
68
|
d(this, "_initNode", (e, n = null) => {
|
|
70
|
-
const { showEmptyChildren: l, lazyload: a } = this.config, c = {
|
|
69
|
+
const { showEmptyChildren: l, lazyload: a } = this.config, c = { ...$e, ...this.config.fieldNames }, r = ee(e, c.children) || e[c.children];
|
|
71
70
|
let k = Array.isArray(r) ? l ? !1 : r.length === 0 : !0;
|
|
72
71
|
a && (c.isLeaf in e ? k = !!ee(e, c.isLeaf) || !!e[c.isLeaf] : k = !1);
|
|
73
72
|
const _ = ee(e, c.value) || e[c.value], I = ee(e, c.label) || e[c.label], b = {
|
|
@@ -172,7 +171,7 @@ class ge {
|
|
|
172
171
|
this.config = n || {}, this._initNode(e, l || null);
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
|
-
class
|
|
174
|
+
class ut {
|
|
176
175
|
constructor(e, n, l) {
|
|
177
176
|
d(this, "nodes", []);
|
|
178
177
|
d(this, "flatNodes", []);
|
|
@@ -184,7 +183,7 @@ class ht {
|
|
|
184
183
|
const e = !this.config.changeOnSelect;
|
|
185
184
|
this.flatNodes = [];
|
|
186
185
|
const n = (l) => {
|
|
187
|
-
l && ((!e || l.isLeaf) && this.flatNodes.push(l),
|
|
186
|
+
l && ((!e || l.isLeaf) && this.flatNodes.push(l), we(l.children) && l.children.forEach((a) => {
|
|
188
187
|
n(a);
|
|
189
188
|
}));
|
|
190
189
|
};
|
|
@@ -198,12 +197,12 @@ class ht {
|
|
|
198
197
|
* @memberof Store
|
|
199
198
|
*/
|
|
200
199
|
d(this, "setNodeCheckedByValue", (e) => {
|
|
201
|
-
const n =
|
|
200
|
+
const n = ce(e);
|
|
202
201
|
this.flatNodes.forEach((l) => {
|
|
203
202
|
let a = !1;
|
|
204
203
|
this.config.showParent ? l.pathValue.some(
|
|
205
|
-
(c, r, k) =>
|
|
206
|
-
) && (a = !0) :
|
|
204
|
+
(c, r, k) => G(n, k.slice(0, r + 1))
|
|
205
|
+
) && (a = !0) : G(n, l.pathValue) && (a = !0), l.setCheckedStateIgnoreDisabled(a);
|
|
207
206
|
});
|
|
208
207
|
});
|
|
209
208
|
/**
|
|
@@ -253,62 +252,62 @@ class ht {
|
|
|
253
252
|
this.nodes = this._calcNodes(e, null), this._updateFlatNodes(), this.setNodeCheckedByValue(a);
|
|
254
253
|
}
|
|
255
254
|
}
|
|
256
|
-
const
|
|
255
|
+
const J = "__pqb_cascader__", ht = "parent", ft = "child", ye = {
|
|
257
256
|
cascader: "cascader",
|
|
258
257
|
select: "select"
|
|
259
258
|
};
|
|
260
|
-
function
|
|
259
|
+
function xe(t) {
|
|
261
260
|
return {
|
|
262
261
|
showEmptyChildren: t.showEmptyChildren,
|
|
263
262
|
changeOnSelect: t.changeOnSelect,
|
|
264
263
|
lazyload: !!t.loadMore,
|
|
265
264
|
fieldNames: t.fieldNames,
|
|
266
265
|
filterOption: t.filterOption,
|
|
267
|
-
showParent: t.mode === "multiple" && !t.changeOnSelect && t.checkedStrategy ===
|
|
266
|
+
showParent: t.mode === "multiple" && !t.changeOnSelect && t.checkedStrategy === ht
|
|
268
267
|
};
|
|
269
268
|
}
|
|
270
|
-
function
|
|
269
|
+
function mt(t, e) {
|
|
271
270
|
const n = e ? Array.isArray(e[0]) ? e : [e] : [];
|
|
272
|
-
return new
|
|
271
|
+
return new ut(t.options || [], n, xe(t));
|
|
273
272
|
}
|
|
274
|
-
const
|
|
273
|
+
const ce = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(J)), l), /* @__PURE__ */ new Set()), G = (t, e) => {
|
|
275
274
|
const n = e || [];
|
|
276
|
-
return t.has(n.join(
|
|
277
|
-
},
|
|
275
|
+
return t.has(n.join(J));
|
|
276
|
+
}, gt = (t, e) => {
|
|
278
277
|
const n = e || [];
|
|
279
|
-
return t.delete(n.join(
|
|
278
|
+
return t.delete(n.join(J));
|
|
280
279
|
}, te = (t, e, n) => {
|
|
281
280
|
let l = [];
|
|
282
281
|
if (t === void 0 ? l = [] : e ? l = t : l = [t], n && n.config.showParent) {
|
|
283
|
-
const a = n.getCheckedNodes(), c =
|
|
282
|
+
const a = n.getCheckedNodes(), c = ce(
|
|
284
283
|
a.map((_) => _.pathValue)
|
|
285
284
|
), r = [], k = {};
|
|
286
285
|
return l.map((_) => {
|
|
287
286
|
_.some((I, b, x) => {
|
|
288
|
-
const N = x.slice(0, b + 1), E =
|
|
289
|
-
return E && !k[N.join(
|
|
287
|
+
const N = x.slice(0, b + 1), E = G(c, N);
|
|
288
|
+
return E && !k[N.join(J)] && (r.push(N), k[N.join(J)] = 1), E;
|
|
290
289
|
});
|
|
291
290
|
}), r;
|
|
292
291
|
}
|
|
293
292
|
return l;
|
|
294
|
-
},
|
|
293
|
+
}, pt = (t) => {
|
|
295
294
|
const e = (n) => Array.isArray(n) ? n.every((l) => l._checked || l.disabled ? !0 : e(l.children)) : !1;
|
|
296
295
|
return t._halfChecked && e(t == null ? void 0 : t.children);
|
|
297
|
-
},
|
|
298
|
-
const a = l &&
|
|
296
|
+
}, Ee = (t, e, n, l) => {
|
|
297
|
+
const a = l && pt(n) ? !1 : l, c = e.getCheckedNodes().reduce((b, x) => (b.add(x.pathValue.join(J)), b), /* @__PURE__ */ new Set());
|
|
299
298
|
n.setCheckedState(a);
|
|
300
|
-
const k = e.getCheckedNodes().map((b) => b.pathValue), _ =
|
|
299
|
+
const k = e.getCheckedNodes().map((b) => b.pathValue), _ = ce(k), I = /* @__PURE__ */ new Set();
|
|
301
300
|
return t.filter((b) => {
|
|
302
|
-
if (!
|
|
303
|
-
return I.add(b.join(
|
|
301
|
+
if (!G(c, b) || G(_, b))
|
|
302
|
+
return I.add(b.join(J)), !0;
|
|
304
303
|
}).concat(
|
|
305
|
-
k.filter((b) => !
|
|
304
|
+
k.filter((b) => !G(I, b))
|
|
306
305
|
);
|
|
307
|
-
},
|
|
306
|
+
}, Ct = (t) => {
|
|
308
307
|
const { prefixCls: e, multiple: n, option: l, renderOption: a, selected: c, icons: r } = t, k = l.disabled || n && l.disableCheckbox;
|
|
309
|
-
return /* @__PURE__ */ X(
|
|
308
|
+
return /* @__PURE__ */ X(re, { children: [
|
|
310
309
|
n ? /* @__PURE__ */ g(
|
|
311
|
-
|
|
310
|
+
Oe,
|
|
312
311
|
{
|
|
313
312
|
disabled: k,
|
|
314
313
|
checked: l._checked,
|
|
@@ -331,7 +330,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
331
330
|
}
|
|
332
331
|
)
|
|
333
332
|
] });
|
|
334
|
-
},
|
|
333
|
+
}, kt = (t) => {
|
|
335
334
|
for (let e = 0; e < t.length; e++)
|
|
336
335
|
if (!t[e].disabled)
|
|
337
336
|
return t[e];
|
|
@@ -343,9 +342,9 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
343
342
|
return e;
|
|
344
343
|
}
|
|
345
344
|
return t;
|
|
346
|
-
}, Ve = (t, e) => t < 0 ? e : t > e ? 0 : t,
|
|
345
|
+
}, Ve = (t, e) => t < 0 ? e : t > e ? 0 : t, bt = (t) => {
|
|
347
346
|
var $;
|
|
348
|
-
const [e, n] =
|
|
347
|
+
const [e, n] = ot(), l = ue(), {
|
|
349
348
|
store: a,
|
|
350
349
|
prefixCls: c,
|
|
351
350
|
value: r,
|
|
@@ -357,9 +356,9 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
357
356
|
renderEmpty: N,
|
|
358
357
|
rtl: E,
|
|
359
358
|
icons: T
|
|
360
|
-
} = t, [h, V] =
|
|
359
|
+
} = t, [h, V] = se(
|
|
361
360
|
a.findNodeByValue(r && r[r.length - 1]) || null
|
|
362
|
-
), O = a.getOptions(),
|
|
361
|
+
), O = a.getOptions(), U = (s) => {
|
|
363
362
|
var u;
|
|
364
363
|
(u = t.onChange) == null || u.call(t, s);
|
|
365
364
|
}, S = async (s) => {
|
|
@@ -377,11 +376,11 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
377
376
|
s.setLoading(!1), l();
|
|
378
377
|
}
|
|
379
378
|
}, f = async (s, u = !0) => {
|
|
380
|
-
!s || s.disabled || (V(s), S(s), !k && u && (t.changeOnSelect || s.isLeaf) &&
|
|
379
|
+
!s || s.disabled || (V(s), S(s), !k && u && (t.changeOnSelect || s.isLeaf) && U([s.pathValue]));
|
|
381
380
|
}, L = (s, u) => {
|
|
382
|
-
const C =
|
|
383
|
-
s === h && l(), V(s), t.changeOnSelect || S(s),
|
|
384
|
-
}, P =
|
|
381
|
+
const C = Ee(t.value, a, s, u);
|
|
382
|
+
s === h && l(), V(s), t.changeOnSelect || S(s), U(C);
|
|
383
|
+
}, P = ae(
|
|
385
384
|
(s = h) => {
|
|
386
385
|
var C;
|
|
387
386
|
let u = s;
|
|
@@ -392,7 +391,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
392
391
|
}), u = u._level < 1 ? null : u.parent;
|
|
393
392
|
},
|
|
394
393
|
[h]
|
|
395
|
-
), p =
|
|
394
|
+
), p = ae(
|
|
396
395
|
(s) => {
|
|
397
396
|
var o;
|
|
398
397
|
const u = s.key;
|
|
@@ -402,24 +401,24 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
402
401
|
s.preventDefault(), (o = t.onEsc) == null || o.call(t);
|
|
403
402
|
break;
|
|
404
403
|
}
|
|
405
|
-
case
|
|
406
|
-
case
|
|
404
|
+
case ie.key:
|
|
405
|
+
case _e.key: {
|
|
407
406
|
if (!h)
|
|
408
|
-
C =
|
|
407
|
+
C = kt(O);
|
|
409
408
|
else {
|
|
410
|
-
const A = Ne(h),
|
|
409
|
+
const A = Ne(h), j = A.parent && A.parent.children || O, F = u === ie.key ? 1 : -1;
|
|
411
410
|
let K = Ve(
|
|
412
411
|
A._index + F,
|
|
413
|
-
|
|
412
|
+
j.length - 1
|
|
414
413
|
);
|
|
415
|
-
for (; K !== A._index && (C =
|
|
416
|
-
K = Ve(K + F,
|
|
414
|
+
for (; K !== A._index && (C = j[K], C.disabled); )
|
|
415
|
+
K = Ve(K + F, j.length - 1);
|
|
417
416
|
}
|
|
418
417
|
return P(C), f(C, !1), s.preventDefault(), !1;
|
|
419
418
|
}
|
|
420
|
-
case
|
|
419
|
+
case rt.key:
|
|
421
420
|
return h && !h.disabled && (C = (h.children || [])[0] || h, f(C, !1)), s.preventDefault(), !1;
|
|
422
|
-
case
|
|
421
|
+
case nt.key: {
|
|
423
422
|
if (h) {
|
|
424
423
|
const A = Ne(h);
|
|
425
424
|
C = A.parent || A;
|
|
@@ -432,7 +431,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
432
431
|
},
|
|
433
432
|
[h]
|
|
434
433
|
);
|
|
435
|
-
|
|
434
|
+
le(() => {
|
|
436
435
|
V((s) => {
|
|
437
436
|
let u;
|
|
438
437
|
if (s && s.pathValue && s.pathValue.length) {
|
|
@@ -450,7 +449,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
450
449
|
}, [t.popupVisible]), Z(() => {
|
|
451
450
|
const s = t.getTriggerElement();
|
|
452
451
|
if (s)
|
|
453
|
-
return t.popupVisible ?
|
|
452
|
+
return t.popupVisible ? Le(s, "keydown", p) : de(s, "keydown", p), () => {
|
|
454
453
|
de(s, "keydown", p);
|
|
455
454
|
};
|
|
456
455
|
}, [t.popupVisible, p]);
|
|
@@ -460,10 +459,10 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
460
459
|
C && C.children && s.push(C.children);
|
|
461
460
|
}), s;
|
|
462
461
|
})(), w = W(t.dropdownColumnRender) ? t.dropdownColumnRender : (s) => s;
|
|
463
|
-
return !D.length || !(($ = D[0]) != null && $.length) ? /* @__PURE__ */ g(
|
|
462
|
+
return !D.length || !(($ = D[0]) != null && $.length) ? /* @__PURE__ */ g(re, { children: N() }) : /* @__PURE__ */ g(st, { component: qe.Fragment, children: D.map((s, u) => {
|
|
464
463
|
const C = _ ? _(u, h || null) : null;
|
|
465
464
|
return s.length === 0 && !b ? null : /* @__PURE__ */ g(
|
|
466
|
-
|
|
465
|
+
at,
|
|
467
466
|
{
|
|
468
467
|
timeout: {
|
|
469
468
|
enter: 300,
|
|
@@ -499,14 +498,14 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
499
498
|
}),
|
|
500
499
|
children: [
|
|
501
500
|
s.length === 0 ? N == null ? void 0 : N(t.virtualListProps ? "100%" : 120) : /* @__PURE__ */ g(
|
|
502
|
-
|
|
501
|
+
Pe,
|
|
503
502
|
{
|
|
504
503
|
needFiller: !1,
|
|
505
504
|
threshold: t.virtualListProps ? 100 : null,
|
|
506
505
|
data: s,
|
|
507
506
|
isStaticItemHeight: !0,
|
|
508
507
|
itemKey: "value",
|
|
509
|
-
...
|
|
508
|
+
...ne(t.virtualListProps) ? t.virtualListProps : {},
|
|
510
509
|
wrapper: "ul",
|
|
511
510
|
role: "menu",
|
|
512
511
|
ref: (o) => n(o, u),
|
|
@@ -534,7 +533,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
534
533
|
[`${c}-list-item-disabled`]: o.disabled
|
|
535
534
|
}),
|
|
536
535
|
children: /* @__PURE__ */ g(
|
|
537
|
-
|
|
536
|
+
Ct,
|
|
538
537
|
{
|
|
539
538
|
prefixCls: c,
|
|
540
539
|
rtl: E,
|
|
@@ -549,8 +548,8 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
549
548
|
onClickOption: () => {
|
|
550
549
|
o.isLeaf && k && !o.disableCheckbox ? L(o, !o._checked) : f(o);
|
|
551
550
|
},
|
|
552
|
-
onMultipleChecked: (
|
|
553
|
-
L(o,
|
|
551
|
+
onMultipleChecked: (j) => {
|
|
552
|
+
L(o, j);
|
|
554
553
|
},
|
|
555
554
|
onDoubleClickOption: t.onDoubleClickOption
|
|
556
555
|
}
|
|
@@ -582,13 +581,13 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
582
581
|
u
|
|
583
582
|
);
|
|
584
583
|
}) });
|
|
585
|
-
}, Se = (t, e) => t < 0 ? e : t > e ? 0 : t,
|
|
584
|
+
}, Se = (t, e) => t < 0 ? e : t > e ? 0 : t, vt = (t, e, n) => {
|
|
586
585
|
let l = e;
|
|
587
586
|
if (Y(e)) {
|
|
588
587
|
const a = e.toUpperCase().indexOf(t.toUpperCase());
|
|
589
588
|
if (a > -1) {
|
|
590
589
|
const c = e.substring(0, a + 1), r = e.substring(a + t.length);
|
|
591
|
-
l = /* @__PURE__ */ X(
|
|
590
|
+
l = /* @__PURE__ */ X(re, { children: [
|
|
592
591
|
c,
|
|
593
592
|
/* @__PURE__ */ g("span", { className: `${n}-highlight`, children: e.substring(a, t.length + 1) }),
|
|
594
593
|
r
|
|
@@ -596,7 +595,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
596
595
|
}
|
|
597
596
|
}
|
|
598
597
|
return l;
|
|
599
|
-
},
|
|
598
|
+
}, yt = (t) => {
|
|
600
599
|
const {
|
|
601
600
|
store: e,
|
|
602
601
|
prefixCls: n,
|
|
@@ -608,14 +607,14 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
608
607
|
defaultActiveFirstOption: _,
|
|
609
608
|
rtl: I,
|
|
610
609
|
icons: b
|
|
611
|
-
} = t, x = t.value || [], [N, E] =
|
|
610
|
+
} = t, x = t.value || [], [N, E] = se(
|
|
612
611
|
e.searchNodeByLabel(c) || []
|
|
613
|
-
), T = z(), h = z(), V =
|
|
612
|
+
), T = z(), h = z(), V = ct(), [O, U] = se(
|
|
614
613
|
_ ? 0 : -1
|
|
615
614
|
), S = (f, L, P) => {
|
|
616
615
|
if (P.stopPropagation(), !f.disabled)
|
|
617
616
|
if (l) {
|
|
618
|
-
const p =
|
|
617
|
+
const p = Ee(
|
|
619
618
|
t.value,
|
|
620
619
|
e,
|
|
621
620
|
f,
|
|
@@ -625,10 +624,10 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
625
624
|
} else
|
|
626
625
|
a == null || a([f.pathValue]);
|
|
627
626
|
};
|
|
628
|
-
return
|
|
627
|
+
return le(() => {
|
|
629
628
|
E(e.searchNodeByLabel(c));
|
|
630
|
-
}, [c, e]),
|
|
631
|
-
|
|
629
|
+
}, [c, e]), le(() => {
|
|
630
|
+
U((f) => f > N.length - 1 ? _ ? 0 : -1 : f);
|
|
632
631
|
}, [N]), Z(() => {
|
|
633
632
|
const f = t.getTriggerElement();
|
|
634
633
|
if (!f)
|
|
@@ -640,17 +639,17 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
640
639
|
switch (p) {
|
|
641
640
|
case fe.key:
|
|
642
641
|
return (D = t.onEsc) == null || D.call(t), !1;
|
|
643
|
-
case
|
|
644
|
-
case
|
|
642
|
+
case ie.key:
|
|
643
|
+
case _e.key: {
|
|
645
644
|
h.current = !0;
|
|
646
|
-
const w =
|
|
645
|
+
const w = ie.key === p ? 1 : -1;
|
|
647
646
|
let $ = Se(
|
|
648
647
|
O + w,
|
|
649
648
|
N.length - 1
|
|
650
649
|
);
|
|
651
650
|
for (; $ !== O && N[$].disabled; )
|
|
652
651
|
$ = Se($ + w, N.length - 1);
|
|
653
|
-
return
|
|
652
|
+
return U($), !1;
|
|
654
653
|
}
|
|
655
654
|
case he.key: {
|
|
656
655
|
const w = N[O];
|
|
@@ -662,20 +661,20 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
662
661
|
}
|
|
663
662
|
}
|
|
664
663
|
};
|
|
665
|
-
return
|
|
664
|
+
return Le(f, "keydown", L), () => {
|
|
666
665
|
de(f, "keydown", L);
|
|
667
666
|
};
|
|
668
667
|
}, [N, O, x]), Z(() => {
|
|
669
668
|
var L;
|
|
670
669
|
const f = T.current;
|
|
671
|
-
f && (h.current || V) &&
|
|
670
|
+
f && (h.current || V) && it(f, {
|
|
672
671
|
behavior: "instant",
|
|
673
672
|
block: "nearest",
|
|
674
673
|
scrollMode: "if-needed",
|
|
675
674
|
boundary: (L = f.parentNode) == null ? void 0 : L.parentNode
|
|
676
675
|
});
|
|
677
676
|
}, [O, N]), T.current = null, N.length ? /* @__PURE__ */ g("div", { className: `${n}-list-wrapper`, children: /* @__PURE__ */ g(
|
|
678
|
-
|
|
677
|
+
Pe,
|
|
679
678
|
{
|
|
680
679
|
needFiller: !1,
|
|
681
680
|
wrapper: "ul",
|
|
@@ -684,7 +683,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
684
683
|
data: N,
|
|
685
684
|
isStaticItemHeight: !0,
|
|
686
685
|
threshold: t.virtualListProps ? 100 : null,
|
|
687
|
-
...
|
|
686
|
+
...ne(t.virtualListProps) ? t.virtualListProps : {},
|
|
688
687
|
onMouseMove: () => {
|
|
689
688
|
h.current = !1;
|
|
690
689
|
},
|
|
@@ -696,7 +695,7 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
696
695
|
const p = f.getPathNodes().map((s) => /* @__PURE__ */ X("span", { children: [
|
|
697
696
|
s.label,
|
|
698
697
|
s.isLeaf ? "" : " / "
|
|
699
|
-
] }, `${s.label}_${s._level}`)), D = f._checked, w = { checked: D }, $ = W(t.renderOption) ? t.renderOption(c, f._data, w) :
|
|
698
|
+
] }, `${s.label}_${s._level}`)), D = f._checked, w = { checked: D }, $ = W(t.renderOption) ? t.renderOption(c, f._data, w) : vt(c, p, n);
|
|
700
699
|
return /* @__PURE__ */ g(
|
|
701
700
|
"li",
|
|
702
701
|
{
|
|
@@ -715,12 +714,12 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
715
714
|
S(f, !D, s);
|
|
716
715
|
},
|
|
717
716
|
onMouseEnter: () => {
|
|
718
|
-
!h.current && !f.disabled &&
|
|
717
|
+
!h.current && !f.disabled && U(L);
|
|
719
718
|
},
|
|
720
719
|
onMouseLeave: () => {
|
|
721
|
-
!h.current && !f.disabled &&
|
|
720
|
+
!h.current && !f.disabled && U(_ ? 0 : -1);
|
|
722
721
|
},
|
|
723
|
-
children: /* @__PURE__ */ g("div", { className: `${n}-list-item-label`, children: W(t.renderOption) ? $ : l ? /* @__PURE__ */ g(
|
|
722
|
+
children: /* @__PURE__ */ g("div", { className: `${n}-list-item-label`, children: W(t.renderOption) ? $ : l ? /* @__PURE__ */ g(Oe, { checked: D, disabled: f.disabled, children: $ }) : /* @__PURE__ */ X(re, { children: [
|
|
724
723
|
$,
|
|
725
724
|
D && /* @__PURE__ */ g("span", { className: `${n}-check-icon`, children: b.checked })
|
|
726
725
|
] }) })
|
|
@@ -729,26 +728,26 @@ const ie = (t) => (t || []).reduce((l, a) => (l.add([].concat(a).join(G)), l), /
|
|
|
729
728
|
);
|
|
730
729
|
}
|
|
731
730
|
}
|
|
732
|
-
) }) : /* @__PURE__ */ g(
|
|
733
|
-
},
|
|
731
|
+
) }) : /* @__PURE__ */ g(re, { children: r == null ? void 0 : r() });
|
|
732
|
+
}, $e = {
|
|
734
733
|
label: "label",
|
|
735
734
|
value: "value",
|
|
736
735
|
isLeaf: "isLeaf",
|
|
737
736
|
children: "children",
|
|
738
737
|
disabled: "disabled"
|
|
739
|
-
},
|
|
738
|
+
}, Nt = {
|
|
740
739
|
options: [],
|
|
741
740
|
bordered: !0,
|
|
742
|
-
fieldNames:
|
|
741
|
+
fieldNames: $e,
|
|
743
742
|
trigger: "click",
|
|
744
743
|
expandTrigger: "click",
|
|
745
|
-
checkedStrategy:
|
|
744
|
+
checkedStrategy: ft,
|
|
746
745
|
defaultActiveFirstOption: !0
|
|
747
|
-
},
|
|
748
|
-
function
|
|
749
|
-
const { getPrefixCls: n, renderEmpty: l, componentConfig: a, rtl: c } =
|
|
746
|
+
}, Vt = { bottom: 4 };
|
|
747
|
+
function St(t, e) {
|
|
748
|
+
const { getPrefixCls: n, renderEmpty: l, componentConfig: a, rtl: c } = Je(Xe), r = Ze(
|
|
750
749
|
t,
|
|
751
|
-
|
|
750
|
+
Nt,
|
|
752
751
|
a == null ? void 0 : a.Cascader
|
|
753
752
|
), {
|
|
754
753
|
disabled: k,
|
|
@@ -760,25 +759,25 @@ function wt(t, e) {
|
|
|
760
759
|
icons: E
|
|
761
760
|
} = r, T = {
|
|
762
761
|
loading: (E == null ? void 0 : E.loading) || /* @__PURE__ */ g(We, {}),
|
|
763
|
-
checked: (E == null ? void 0 : E.checked) || /* @__PURE__ */ g(
|
|
764
|
-
next: (E == null ? void 0 : E.next) || (c ? /* @__PURE__ */ g(Ue, {}) : /* @__PURE__ */ g(
|
|
765
|
-
}, h = n("cascader"), V = r.mode === "multiple", O = z(null),
|
|
762
|
+
checked: (E == null ? void 0 : E.checked) || /* @__PURE__ */ g(Be, {}),
|
|
763
|
+
next: (E == null ? void 0 : E.next) || (c ? /* @__PURE__ */ g(Ue, {}) : /* @__PURE__ */ g(je, {}))
|
|
764
|
+
}, h = n("cascader"), V = r.mode === "multiple", O = z(null), U = ue(), S = dt(() => mt(
|
|
766
765
|
r,
|
|
767
766
|
te(
|
|
768
767
|
"value" in r ? r.value : r.defaultValue,
|
|
769
768
|
V
|
|
770
769
|
)
|
|
771
|
-
), [JSON.stringify(
|
|
770
|
+
), [JSON.stringify(xe(r)), r.options]), [f, L] = se(() => "value" in r ? te(r.value, V, S) : "defaultValue" in r ? te(r.defaultValue, V, S) : []), P = "value" in r ? te(r.value, V, S) : f, [p, D] = ve(!1, {
|
|
772
771
|
value: r.popupVisible,
|
|
773
772
|
defaultValue: r.defaultPopupVisible
|
|
774
773
|
}), [w, $, s] = ve("", {
|
|
775
774
|
value: "inputValue" in r ? r.inputValue || "" : void 0
|
|
776
|
-
}), u = z(w), C = z(null), o = z(null), A = z((S == null ? void 0 : S.getCheckedNodes()) || []),
|
|
775
|
+
}), u = z(w), C = z(null), o = z(null), A = z((S == null ? void 0 : S.getCheckedNodes()) || []), j = Ye(`${h}-popup-`), F = (i, m) => {
|
|
777
776
|
var v;
|
|
778
777
|
i !== u.current && ($(i), u.current = i, C.current = m, (v = r.onInputValueChange) == null || v.call(r, i, m));
|
|
779
778
|
};
|
|
780
779
|
function K(i) {
|
|
781
|
-
return
|
|
780
|
+
return Ke(i) || ze(i);
|
|
782
781
|
}
|
|
783
782
|
Z(() => {
|
|
784
783
|
var m;
|
|
@@ -793,36 +792,36 @@ function wt(t, e) {
|
|
|
793
792
|
}, 200)), () => {
|
|
794
793
|
i();
|
|
795
794
|
};
|
|
796
|
-
}, [p]),
|
|
795
|
+
}, [p]), le(() => {
|
|
797
796
|
if ("value" in r && r.value !== f) {
|
|
798
797
|
const i = te(r.value, V);
|
|
799
798
|
S.setNodeCheckedByValue(i), L(i);
|
|
800
799
|
}
|
|
801
|
-
}, [r.value, V]),
|
|
802
|
-
const
|
|
800
|
+
}, [r.value, V]), Qe(e, () => o.current, []);
|
|
801
|
+
const Ae = (i) => {
|
|
803
802
|
A.current = Array.from(
|
|
804
803
|
new Set([].concat(i, A.current))
|
|
805
804
|
);
|
|
806
805
|
}, pe = (i) => {
|
|
807
|
-
const m = [], v =
|
|
806
|
+
const m = [], v = ce(i), M = (y) => {
|
|
808
807
|
y.some((R) => {
|
|
809
|
-
if (
|
|
808
|
+
if (G(v, R.pathValue) && (m.push(R.getPathNodes().map((B) => B._data)), gt(v, R.pathValue)), !v.size)
|
|
810
809
|
return !0;
|
|
811
810
|
});
|
|
812
811
|
};
|
|
813
812
|
return M(S.getCheckedNodes()), v.size && M(A.current), m;
|
|
814
|
-
}, H =
|
|
813
|
+
}, H = ae(
|
|
815
814
|
(i) => {
|
|
816
815
|
var m;
|
|
817
816
|
i !== p && ((m = r.onVisibleChange) == null || m.call(r, i), "popupVisible" in r || D(i));
|
|
818
817
|
},
|
|
819
818
|
[r.onVisibleChange, p]
|
|
820
|
-
),
|
|
819
|
+
), Me = ae(
|
|
821
820
|
(i) => {
|
|
822
821
|
var y;
|
|
823
822
|
const m = pe([i])[0] || [];
|
|
824
|
-
let v, M =
|
|
825
|
-
return m.length && (M = m.map((R) => R.label)), W(_) ? v = _(M) : M.every((R) => Y(R)) ? v = M.join(" / ") : v = M.reduce((R, B,
|
|
823
|
+
let v, M = we(i) ? i.map((R) => String(R)) : [];
|
|
824
|
+
return m.length && (M = m.map((R) => R.label)), W(_) ? v = _(M) : M.every((R) => Y(R)) ? v = M.join(" / ") : v = M.reduce((R, B, oe) => R.concat(oe === 0 ? [B] : [" / ", B]), []), {
|
|
826
825
|
text: v || "",
|
|
827
826
|
disabled: (y = m[m.length - 1]) == null ? void 0 : y.disabled
|
|
828
827
|
};
|
|
@@ -830,16 +829,16 @@ function wt(t, e) {
|
|
|
830
829
|
[S, _]
|
|
831
830
|
), Q = (i, m) => {
|
|
832
831
|
var be;
|
|
833
|
-
m === "panel" &&
|
|
832
|
+
m === "panel" && ne(r.showSearch) && !r.showSearch.retainInputValueWhileSelect && V && F("", "optionChecked");
|
|
834
833
|
const { onChange: v, changeOnSelect: M, expandTrigger: y } = r;
|
|
835
834
|
if (P === i)
|
|
836
835
|
return;
|
|
837
|
-
V || S.setNodeCheckedByValue(i),
|
|
838
|
-
const B = pe(i),
|
|
839
|
-
V || (w || B[0] && ((be = B[0][B[0].length - 1]) != null && be.isLeaf) || M && y === "hover") && H(!1), "value" in r ? (S.setNodeCheckedByValue(P),
|
|
836
|
+
V || S.setNodeCheckedByValue(i), Ae(S.getCheckedNodes());
|
|
837
|
+
const B = pe(i), oe = V ? i : i[0], Te = V ? B : B[0];
|
|
838
|
+
V || (w || B[0] && ((be = B[0][B[0].length - 1]) != null && be.isLeaf) || M && y === "hover") && H(!1), "value" in r ? (S.setNodeCheckedByValue(P), U()) : L(i), v == null || v(oe, Te, {
|
|
840
839
|
dropdownVisible: p
|
|
841
840
|
});
|
|
842
|
-
},
|
|
841
|
+
}, De = (i, m, v) => {
|
|
843
842
|
if (v.stopPropagation(), i.disabled)
|
|
844
843
|
return;
|
|
845
844
|
const M = P.filter((y, R) => R !== m);
|
|
@@ -854,12 +853,12 @@ function wt(t, e) {
|
|
|
854
853
|
children: r.notFoundContent || l("Cascader")
|
|
855
854
|
}
|
|
856
855
|
);
|
|
857
|
-
},
|
|
858
|
-
const i =
|
|
856
|
+
}, Ie = () => {
|
|
857
|
+
const i = ne(r.showSearch) ? r.showSearch.panelMode : void 0, m = i === ye.select ? !0 : i === ye.cascader ? !1 : !W(r.onSearch) && !!w, v = o.current && o.current.getWidth(), M = W(r.dropdownRender) ? r.dropdownRender : (y) => y;
|
|
859
858
|
return /* @__PURE__ */ g(
|
|
860
859
|
"div",
|
|
861
860
|
{
|
|
862
|
-
id:
|
|
861
|
+
id: j,
|
|
863
862
|
className: q(`${h}-popup`, r.dropdownMenuClassName, {
|
|
864
863
|
[`${h}-popup-trigger-hover`]: r.expandTrigger === "hover"
|
|
865
864
|
}),
|
|
@@ -870,7 +869,7 @@ function wt(t, e) {
|
|
|
870
869
|
className: `${h}-popup-inner`,
|
|
871
870
|
onMouseDown: (y) => y.preventDefault(),
|
|
872
871
|
children: m ? /* @__PURE__ */ g(
|
|
873
|
-
|
|
872
|
+
yt,
|
|
874
873
|
{
|
|
875
874
|
style: { minWidth: v },
|
|
876
875
|
store: S,
|
|
@@ -885,7 +884,7 @@ function wt(t, e) {
|
|
|
885
884
|
onEsc: () => {
|
|
886
885
|
H(!1);
|
|
887
886
|
},
|
|
888
|
-
renderOption:
|
|
887
|
+
renderOption: ne(r.showSearch) && r.showSearch.renderOption || void 0,
|
|
889
888
|
getTriggerElement: () => {
|
|
890
889
|
var y;
|
|
891
890
|
return (y = o.current) == null ? void 0 : y.dom;
|
|
@@ -896,7 +895,7 @@ function wt(t, e) {
|
|
|
896
895
|
icons: T
|
|
897
896
|
}
|
|
898
897
|
) : /* @__PURE__ */ g(
|
|
899
|
-
|
|
898
|
+
bt,
|
|
900
899
|
{
|
|
901
900
|
dropdownMenuColumnStyle: r.dropdownMenuColumnStyle,
|
|
902
901
|
virtualListProps: r.virtualListProps,
|
|
@@ -935,18 +934,18 @@ function wt(t, e) {
|
|
|
935
934
|
)
|
|
936
935
|
}
|
|
937
936
|
);
|
|
938
|
-
},
|
|
937
|
+
}, Re = (i) => {
|
|
939
938
|
Q(i);
|
|
940
939
|
}, ke = (i) => /* @__PURE__ */ g(
|
|
941
|
-
|
|
940
|
+
tt,
|
|
942
941
|
{
|
|
943
|
-
popup:
|
|
942
|
+
popup: Ie,
|
|
944
943
|
trigger: r.trigger,
|
|
945
944
|
disabled: k,
|
|
946
945
|
getPopupContainer: I,
|
|
947
946
|
position: c ? "br" : "bl",
|
|
948
947
|
classNames: "slideDynamicOrigin",
|
|
949
|
-
popupAlign:
|
|
948
|
+
popupAlign: Vt,
|
|
950
949
|
unmountOnExit: "unmountOnExit" in r ? r.unmountOnExit : !W(r.loadMore),
|
|
951
950
|
popupVisible: p,
|
|
952
951
|
...x,
|
|
@@ -955,11 +954,11 @@ function wt(t, e) {
|
|
|
955
954
|
}
|
|
956
955
|
);
|
|
957
956
|
return b ? ke(b) : /* @__PURE__ */ g(
|
|
958
|
-
|
|
957
|
+
et,
|
|
959
958
|
{
|
|
960
959
|
...r,
|
|
961
960
|
ref: o,
|
|
962
|
-
ariaControls:
|
|
961
|
+
ariaControls: j,
|
|
963
962
|
popupVisible: p,
|
|
964
963
|
value: V ? P : P && P[0],
|
|
965
964
|
inputValue: w,
|
|
@@ -967,9 +966,9 @@ function wt(t, e) {
|
|
|
967
966
|
isEmptyValue: K(P),
|
|
968
967
|
prefixCls: h,
|
|
969
968
|
isMultiple: V,
|
|
970
|
-
renderText:
|
|
971
|
-
onRemoveCheckedItem:
|
|
972
|
-
onSort:
|
|
969
|
+
renderText: Me,
|
|
970
|
+
onRemoveCheckedItem: De,
|
|
971
|
+
onSort: Re,
|
|
973
972
|
renderView: ke,
|
|
974
973
|
onClear: (i) => {
|
|
975
974
|
var m;
|
|
@@ -987,7 +986,7 @@ function wt(t, e) {
|
|
|
987
986
|
return;
|
|
988
987
|
i.stopPropagation();
|
|
989
988
|
const m = i.key;
|
|
990
|
-
m === fe.key && p && (H(!1), i.preventDefault()), m === he.key && !p && (H(!0), i.preventDefault()), m ===
|
|
989
|
+
m === fe.key && p && (H(!1), i.preventDefault()), m === he.key && !p && (H(!0), i.preventDefault()), m === lt.key && p && H(!1), (v = r.onKeyDown) == null || v.call(r, i);
|
|
991
990
|
},
|
|
992
991
|
onChangeInputValue: (i) => {
|
|
993
992
|
F(i, "manual"), p || H(!0);
|
|
@@ -995,10 +994,10 @@ function wt(t, e) {
|
|
|
995
994
|
}
|
|
996
995
|
);
|
|
997
996
|
}
|
|
998
|
-
const
|
|
999
|
-
|
|
997
|
+
const wt = Ge(
|
|
998
|
+
St
|
|
1000
999
|
);
|
|
1001
|
-
|
|
1000
|
+
wt.displayName = "Cascader";
|
|
1002
1001
|
export {
|
|
1003
|
-
|
|
1002
|
+
wt as C
|
|
1004
1003
|
};
|