@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,54 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as L, Fragment as nn } from "react/jsx-runtime";
|
|
2
|
+
import { b as we, a as tn, c as on, d as rn, I as ln } from "./B45v5S9k.js";
|
|
3
|
+
import ye from "lodash/isFunction";
|
|
4
|
+
import sn, { forwardRef as Ie, useState as I, useImperativeHandle as an, useRef as g, useContext as cn, useCallback as S, useEffect as oe } from "react";
|
|
5
|
+
import Te from "../Button.js";
|
|
6
|
+
import { h as T, C as $e, i as un, m as dn, o as mn, s as fn, b as pn, q as y, I as Cn } from "./DUxWiN2U.js";
|
|
7
7
|
import "lodash/isEqualWith";
|
|
8
|
-
import
|
|
8
|
+
import hn from "../hooks/useMergeValue.js";
|
|
9
9
|
import "../utils/is.js";
|
|
10
|
-
import { Esc as
|
|
10
|
+
import { Esc as bn } from "../utils/keyCode.js";
|
|
11
11
|
import "lodash/isNumber";
|
|
12
12
|
import "lodash/merge";
|
|
13
|
-
import { isServerRendering as
|
|
14
|
-
import "@unicom-cloud/utils/clipboard-copy";
|
|
15
|
-
import "@unicom-cloud/utils/screenfull";
|
|
16
|
-
import "lodash/throttle";
|
|
13
|
+
import { isServerRendering as gn, contains as vn } from "../utils/dom.js";
|
|
17
14
|
import "../hooks/useIntersectionObserver.js";
|
|
18
|
-
import
|
|
19
|
-
import "../hooks/
|
|
20
|
-
import
|
|
21
|
-
import "../hooks/
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import "
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import En from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
30
|
-
import Mn from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
31
|
-
import Pe from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
32
|
-
import wn from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
33
|
-
function Tn(n) {
|
|
34
|
-
const { prefixCls: l, simple: c } = sn();
|
|
35
|
-
return /* @__PURE__ */ s(y, { prefixCls: l, simple: c, ...n, children: n.content });
|
|
15
|
+
import xn from "../hooks/useMergeProps.js";
|
|
16
|
+
import kn from "../hooks/useOverflowHidden.js";
|
|
17
|
+
import { render as En, findDOMNode as Mn } from "../utils/reactDOM.js";
|
|
18
|
+
import wn from "../hooks/useUpdateEffect.js";
|
|
19
|
+
import yn from "../Portal.js";
|
|
20
|
+
import { P as Pe } from "./BP7xX86Q.js";
|
|
21
|
+
import { y as Ne } from "./Do1aMgY3.js";
|
|
22
|
+
import Tn from "../utils/omit.js";
|
|
23
|
+
function Pn(n) {
|
|
24
|
+
const { prefixCls: l, simple: c } = dn();
|
|
25
|
+
return /* @__PURE__ */ i(M, { prefixCls: l, simple: c, ...n, children: n.content });
|
|
36
26
|
}
|
|
37
27
|
const V = (n) => {
|
|
38
28
|
let l = n.icon;
|
|
39
|
-
if (!l && l !== null && (l = /* @__PURE__ */
|
|
29
|
+
if (!l && l !== null && (l = /* @__PURE__ */ i(we, {}), n.isNotice))
|
|
40
30
|
switch (n.noticeType) {
|
|
41
31
|
case "info":
|
|
42
|
-
l = /* @__PURE__ */
|
|
32
|
+
l = /* @__PURE__ */ i(rn, {});
|
|
43
33
|
break;
|
|
44
34
|
case "success":
|
|
45
|
-
l = /* @__PURE__ */
|
|
35
|
+
l = /* @__PURE__ */ i(on, {});
|
|
46
36
|
break;
|
|
47
37
|
case "warning":
|
|
48
|
-
l = /* @__PURE__ */
|
|
38
|
+
l = /* @__PURE__ */ i(we, {});
|
|
49
39
|
break;
|
|
50
40
|
case "error":
|
|
51
|
-
l = /* @__PURE__ */
|
|
41
|
+
l = /* @__PURE__ */ i(tn, {});
|
|
52
42
|
break;
|
|
53
43
|
}
|
|
54
44
|
return n.noticeType === "show" && (l = n.icon), n.isNotice && (n.hideCancel = !0), n.title = l === null && n.title === null ? null : /* @__PURE__ */ L("span", { children: [
|
|
@@ -58,14 +48,14 @@ const V = (n) => {
|
|
|
58
48
|
};
|
|
59
49
|
function le(n, l) {
|
|
60
50
|
let c;
|
|
61
|
-
const
|
|
62
|
-
document.body.appendChild(
|
|
63
|
-
const f =
|
|
64
|
-
function
|
|
65
|
-
const C = /* @__PURE__ */
|
|
66
|
-
c ? c.render(C) : c =
|
|
51
|
+
const s = document.createElement("div");
|
|
52
|
+
document.body.appendChild(s);
|
|
53
|
+
const f = un();
|
|
54
|
+
function v(a) {
|
|
55
|
+
const C = /* @__PURE__ */ i($e, { ...f, children: /* @__PURE__ */ i(Pn, { ...a, onCancel: h }) });
|
|
56
|
+
c ? c.render(C) : c = En(C, s);
|
|
67
57
|
}
|
|
68
|
-
const o =
|
|
58
|
+
const o = v;
|
|
69
59
|
let r = {
|
|
70
60
|
...n,
|
|
71
61
|
visible: !1
|
|
@@ -84,18 +74,18 @@ function le(n, l) {
|
|
|
84
74
|
};
|
|
85
75
|
r.onOk = u, r = V(r), r.visible = !0, o(r);
|
|
86
76
|
function x() {
|
|
87
|
-
c = c == null ? void 0 : c._unmount(),
|
|
77
|
+
c = c == null ? void 0 : c._unmount(), s.parentNode && s.parentNode.removeChild(s);
|
|
88
78
|
for (let a = 0; a < T.length; a++)
|
|
89
|
-
if (T[a] ===
|
|
79
|
+
if (T[a] === k) {
|
|
90
80
|
T.splice(a, 1);
|
|
91
81
|
break;
|
|
92
82
|
}
|
|
93
83
|
}
|
|
94
84
|
function h(a) {
|
|
95
85
|
var C;
|
|
96
|
-
!a && ((C = n.onCancel) == null || C.call(n)),
|
|
86
|
+
!a && ((C = n.onCancel) == null || C.call(n)), k();
|
|
97
87
|
}
|
|
98
|
-
function
|
|
88
|
+
function w(a) {
|
|
99
89
|
r = {
|
|
100
90
|
...r,
|
|
101
91
|
title: n.title,
|
|
@@ -103,51 +93,51 @@ function le(n, l) {
|
|
|
103
93
|
...a
|
|
104
94
|
}, r = V(r), o(r);
|
|
105
95
|
}
|
|
106
|
-
function
|
|
96
|
+
function k() {
|
|
107
97
|
r.visible = !1, r.afterClose = () => {
|
|
108
98
|
var a;
|
|
109
99
|
(a = n.afterClose) == null || a.call(n), x();
|
|
110
100
|
}, o(r);
|
|
111
101
|
}
|
|
112
|
-
return T.push(
|
|
113
|
-
close:
|
|
114
|
-
update:
|
|
102
|
+
return T.push(k), {
|
|
103
|
+
close: k,
|
|
104
|
+
update: w
|
|
115
105
|
};
|
|
116
106
|
}
|
|
117
107
|
function Nn(n, l) {
|
|
118
|
-
const [c,
|
|
119
|
-
|
|
108
|
+
const [c, s] = I(!0), [f, v] = I(n);
|
|
109
|
+
an(l, () => ({
|
|
120
110
|
update: (u) => {
|
|
121
|
-
|
|
111
|
+
v(u);
|
|
122
112
|
},
|
|
123
113
|
close: () => {
|
|
124
|
-
|
|
114
|
+
s(!1);
|
|
125
115
|
}
|
|
126
116
|
}));
|
|
127
117
|
function o() {
|
|
128
118
|
var x;
|
|
129
119
|
const u = (x = f.onOk) == null ? void 0 : x.call(f);
|
|
130
|
-
u && u.then && (
|
|
120
|
+
u && u.then && (v((h) => ({
|
|
131
121
|
...h,
|
|
132
122
|
confirmLoading: !0
|
|
133
123
|
})), u.then(
|
|
134
124
|
() => {
|
|
135
|
-
|
|
125
|
+
s(!1);
|
|
136
126
|
},
|
|
137
127
|
(h) => {
|
|
138
|
-
console.error(h),
|
|
139
|
-
...
|
|
128
|
+
console.error(h), v((w) => ({
|
|
129
|
+
...w,
|
|
140
130
|
confirmLoading: !1
|
|
141
131
|
}));
|
|
142
132
|
}
|
|
143
|
-
)), u ||
|
|
133
|
+
)), u || s(!1);
|
|
144
134
|
}
|
|
145
135
|
function r() {
|
|
146
136
|
var u;
|
|
147
|
-
(u = f.onCancel) == null || u.call(f),
|
|
137
|
+
(u = f.onCancel) == null || u.call(f), s(!1);
|
|
148
138
|
}
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
|
|
139
|
+
return /* @__PURE__ */ i(
|
|
140
|
+
M,
|
|
151
141
|
{
|
|
152
142
|
unmountOnExit: !0,
|
|
153
143
|
simple: !0,
|
|
@@ -159,20 +149,20 @@ function Nn(n, l) {
|
|
|
159
149
|
}
|
|
160
150
|
);
|
|
161
151
|
}
|
|
162
|
-
const
|
|
163
|
-
function
|
|
164
|
-
const n =
|
|
152
|
+
const In = Ie(Nn);
|
|
153
|
+
function $n() {
|
|
154
|
+
const n = g(), l = /* @__PURE__ */ i(mn, { ref: n });
|
|
165
155
|
let c = 0;
|
|
166
|
-
function
|
|
156
|
+
function s(o) {
|
|
167
157
|
var C;
|
|
168
158
|
c += 1;
|
|
169
159
|
let r, u = { ...o };
|
|
170
160
|
function x() {
|
|
171
161
|
var p;
|
|
172
|
-
(p = o.afterClose) == null || p.call(o),
|
|
162
|
+
(p = o.afterClose) == null || p.call(o), w();
|
|
173
163
|
}
|
|
174
|
-
const h = /* @__PURE__ */
|
|
175
|
-
|
|
164
|
+
const h = /* @__PURE__ */ i(
|
|
165
|
+
In,
|
|
176
166
|
{
|
|
177
167
|
ref: (p) => {
|
|
178
168
|
r = p;
|
|
@@ -183,11 +173,11 @@ function Dn() {
|
|
|
183
173
|
c
|
|
184
174
|
);
|
|
185
175
|
(C = n.current) == null || C.addInstance(h);
|
|
186
|
-
function
|
|
176
|
+
function w() {
|
|
187
177
|
var p;
|
|
188
178
|
(p = n.current) == null || p.removeInstance(h);
|
|
189
179
|
}
|
|
190
|
-
function
|
|
180
|
+
function k() {
|
|
191
181
|
r == null || r.close();
|
|
192
182
|
}
|
|
193
183
|
function a(p) {
|
|
@@ -196,31 +186,31 @@ function Dn() {
|
|
|
196
186
|
...p
|
|
197
187
|
}, r == null || r.update(V({ ...u }));
|
|
198
188
|
}
|
|
199
|
-
return T.push(
|
|
200
|
-
close:
|
|
189
|
+
return T.push(k), {
|
|
190
|
+
close: k,
|
|
201
191
|
update: a
|
|
202
192
|
};
|
|
203
193
|
}
|
|
204
194
|
function f(o) {
|
|
205
|
-
return
|
|
195
|
+
return s({
|
|
206
196
|
...o
|
|
207
197
|
});
|
|
208
198
|
}
|
|
209
|
-
const
|
|
199
|
+
const v = {
|
|
210
200
|
confirm: f,
|
|
211
201
|
show: f
|
|
212
202
|
// 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
|
|
213
203
|
};
|
|
214
204
|
return ["info", "success", "warning", "error"].forEach((o) => {
|
|
215
|
-
|
|
205
|
+
v[o] = (r) => s({
|
|
216
206
|
...r,
|
|
217
207
|
isNotice: !0,
|
|
218
208
|
noticeType: o
|
|
219
209
|
});
|
|
220
|
-
}), [
|
|
210
|
+
}), [v, l];
|
|
221
211
|
}
|
|
222
|
-
let re = null,
|
|
223
|
-
|
|
212
|
+
let re = null, Dn = 0;
|
|
213
|
+
gn || document.documentElement.addEventListener(
|
|
224
214
|
"click",
|
|
225
215
|
(n) => {
|
|
226
216
|
re = {
|
|
@@ -232,7 +222,7 @@ pn || document.documentElement.addEventListener(
|
|
|
232
222
|
},
|
|
233
223
|
!0
|
|
234
224
|
);
|
|
235
|
-
const
|
|
225
|
+
const On = {
|
|
236
226
|
mask: !0,
|
|
237
227
|
maskClosable: !0,
|
|
238
228
|
mountOnEnter: !0,
|
|
@@ -240,161 +230,164 @@ const In = {
|
|
|
240
230
|
getPopupContainer: () => document.body,
|
|
241
231
|
alignCenter: !0
|
|
242
232
|
};
|
|
243
|
-
function
|
|
244
|
-
var
|
|
245
|
-
l || (l =
|
|
246
|
-
const c =
|
|
233
|
+
function Rn(n, l) {
|
|
234
|
+
var Me;
|
|
235
|
+
l || (l = g());
|
|
236
|
+
const c = cn(pn), s = xn(
|
|
247
237
|
n,
|
|
248
|
-
|
|
249
|
-
(
|
|
238
|
+
On,
|
|
239
|
+
(Me = c.componentConfig) == null ? void 0 : Me.Modal
|
|
250
240
|
), {
|
|
251
241
|
className: f,
|
|
252
|
-
style:
|
|
242
|
+
style: v,
|
|
253
243
|
visible: o,
|
|
254
244
|
simple: r,
|
|
255
245
|
title: u,
|
|
256
246
|
subtitle: x,
|
|
257
247
|
children: h,
|
|
258
|
-
cancelText:
|
|
259
|
-
okText:
|
|
248
|
+
cancelText: w,
|
|
249
|
+
okText: k,
|
|
260
250
|
okButtonProps: a,
|
|
261
251
|
cancelButtonProps: C,
|
|
262
252
|
getPopupContainer: p = () => document.body,
|
|
263
253
|
footer: H,
|
|
264
254
|
afterClose: z,
|
|
265
|
-
confirmLoading:
|
|
255
|
+
confirmLoading: De,
|
|
266
256
|
mountOnEnter: q,
|
|
267
257
|
unmountOnExit: W,
|
|
268
258
|
afterOpen: Z,
|
|
269
259
|
hideCancel: Oe,
|
|
270
260
|
maskClosable: Re,
|
|
271
|
-
mask:
|
|
261
|
+
mask: X,
|
|
272
262
|
alignCenter: Le,
|
|
273
|
-
getChildrenPopupContainer:
|
|
263
|
+
getChildrenPopupContainer: se,
|
|
274
264
|
wrapClassName: He,
|
|
275
265
|
escToExit: j,
|
|
276
|
-
modalRender:
|
|
277
|
-
maskStyle:
|
|
278
|
-
wrapStyle:
|
|
266
|
+
modalRender: ie,
|
|
267
|
+
maskStyle: Xe,
|
|
268
|
+
wrapStyle: Ye,
|
|
279
269
|
closeIcon: ae,
|
|
280
|
-
fullscreenable:
|
|
270
|
+
fullscreenable: Ln,
|
|
271
|
+
hidePreviousModal: Be,
|
|
281
272
|
...ce
|
|
282
|
-
} =
|
|
273
|
+
} = s, $ = g(null), ue = g(null), E = g(null), [de, me] = I(), [fe, Fe] = I(), Y = g(null), D = g(!1), [Ue, pe] = I(""), [Ce, he] = I(""), A = g(!0);
|
|
283
274
|
o && A.current && (A.current = !1);
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
const [
|
|
275
|
+
const B = g();
|
|
276
|
+
B.current || (B.current = Dn++);
|
|
277
|
+
const [Se, K] = hn(!1, {
|
|
287
278
|
defaultValue: !1,
|
|
288
|
-
value:
|
|
289
|
-
}), d = c.getPrefixCls("modal",
|
|
290
|
-
|
|
279
|
+
value: De
|
|
280
|
+
}), d = c.getPrefixCls("modal", s.prefixCls), { locale: G, rtl: be } = c, Ve = !r || ce.noticeType === "show", ze = "closable" in s ? s.closable : Ve, qe = S(() => Mn(p()), [p]);
|
|
281
|
+
kn(qe, { hidden: o && X });
|
|
291
282
|
function J(e) {
|
|
292
283
|
e.stopPropagation(), Q();
|
|
293
284
|
}
|
|
294
285
|
function Q() {
|
|
295
286
|
var e;
|
|
296
|
-
(e =
|
|
287
|
+
(e = s.onCancel) == null || e.call(s);
|
|
297
288
|
}
|
|
298
|
-
const
|
|
299
|
-
j && o && e.key ===
|
|
300
|
-
}, _ =
|
|
301
|
-
|
|
289
|
+
const We = (e) => {
|
|
290
|
+
j && o && e.key === bn.key && (e.stopPropagation(), Q());
|
|
291
|
+
}, _ = g(!1), Ze = (e) => {
|
|
292
|
+
D.current && (D.current = !1, !_.current && Re && X && e.target === e.currentTarget && setTimeout(() => {
|
|
302
293
|
Q();
|
|
303
294
|
}, 100));
|
|
304
|
-
},
|
|
295
|
+
}, je = (e) => {
|
|
305
296
|
var m;
|
|
306
|
-
const t = (m =
|
|
297
|
+
const t = (m = s.onOk ?? s.onConfirm) == null ? void 0 : m(e);
|
|
307
298
|
t != null && t.then && (K(!0), t.then(
|
|
308
299
|
() => {
|
|
309
300
|
K(!1);
|
|
310
301
|
},
|
|
311
|
-
(
|
|
312
|
-
K(!1), console.error(
|
|
302
|
+
(b) => {
|
|
303
|
+
K(!1), console.error(b);
|
|
313
304
|
}
|
|
314
305
|
));
|
|
315
306
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
307
|
+
wn(() => {
|
|
308
|
+
var t, m;
|
|
309
|
+
let e = l == null ? void 0 : l.current;
|
|
310
|
+
if (!e)
|
|
311
|
+
return () => {
|
|
312
|
+
};
|
|
313
|
+
if (o) {
|
|
314
|
+
if (Be)
|
|
315
|
+
for (const b of y)
|
|
316
|
+
b instanceof HTMLElement && b.style.setProperty("display", "none");
|
|
317
|
+
y.push(e);
|
|
318
|
+
} else
|
|
319
|
+
e = y.pop();
|
|
320
|
+
return e = ((m = (t = y).at) == null ? void 0 : m.call(t, -1)) ?? y[y.length - 1], e instanceof HTMLElement && e.style.removeProperty("display"), () => {
|
|
328
321
|
};
|
|
329
322
|
}, [o, l == null ? void 0 : l.current]), oe(() => {
|
|
330
323
|
let e = null;
|
|
331
324
|
return j && (e = setTimeout(() => {
|
|
332
325
|
var t;
|
|
333
|
-
|
|
326
|
+
vn(document.body, $.current) && ((t = $.current) == null || t.focus());
|
|
334
327
|
})), () => {
|
|
335
328
|
e && clearTimeout(e);
|
|
336
329
|
};
|
|
337
330
|
}, [o, j]);
|
|
338
|
-
const
|
|
331
|
+
const Ae = () => {
|
|
339
332
|
var e;
|
|
340
333
|
if (o && fe === void 0 && $.current) {
|
|
341
334
|
const t = +((e = window.getComputedStyle($.current, null)) == null ? void 0 : e.zIndex);
|
|
342
|
-
isNaN(t) ||
|
|
335
|
+
isNaN(t) || Fe(t + 1);
|
|
343
336
|
}
|
|
344
|
-
},
|
|
337
|
+
}, Ke = () => {
|
|
345
338
|
if (H === null) return;
|
|
346
|
-
const e = /* @__PURE__ */
|
|
347
|
-
|
|
339
|
+
const e = /* @__PURE__ */ i(Te, { onClick: J, ...C, children: w || G.Modal.cancelText }), t = /* @__PURE__ */ i(
|
|
340
|
+
Te,
|
|
348
341
|
{
|
|
349
|
-
loading:
|
|
350
|
-
onClick:
|
|
342
|
+
loading: Se,
|
|
343
|
+
onClick: je,
|
|
351
344
|
type: "primary",
|
|
352
345
|
...a,
|
|
353
|
-
children:
|
|
346
|
+
children: k || G.Modal.okText
|
|
354
347
|
}
|
|
355
|
-
), m =
|
|
348
|
+
), m = ye(H) ? H(e, t) : H || /* @__PURE__ */ L(nn, { children: [
|
|
356
349
|
!Oe && e,
|
|
357
350
|
t
|
|
358
351
|
] });
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
-
}, ee =
|
|
361
|
-
|
|
362
|
-
),
|
|
363
|
-
var m,
|
|
364
|
-
if (!
|
|
352
|
+
return /* @__PURE__ */ i("div", { className: `${d}-footer`, children: m });
|
|
353
|
+
}, ee = g(
|
|
354
|
+
xe()
|
|
355
|
+
), Ge = S((e) => {
|
|
356
|
+
var m, b, P, N, U;
|
|
357
|
+
if (!E.current)
|
|
365
358
|
return;
|
|
366
359
|
e.preventDefault();
|
|
367
360
|
const t = ee.current;
|
|
368
|
-
t.screenX = e.screenX, t.screenY = e.screenY, t.prewTranslateX = t.translateX, t.prewTranslateY = t.translateY, t.boundingClientRect = ((
|
|
369
|
-
}, []), ge =
|
|
361
|
+
t.screenX = e.screenX, t.screenY = e.screenY, t.prewTranslateX = t.translateX, t.prewTranslateY = t.translateY, t.boundingClientRect = ((b = (m = E.current) == null ? void 0 : m.getBoundingClientRect) == null ? void 0 : b.call(m)) ?? {}, t.offsetParentBoundingClientRect = ((U = (N = (P = E.current) == null ? void 0 : P.offsetParent) == null ? void 0 : N.getBoundingClientRect) == null ? void 0 : U.call(N)) ?? {}, F(), Je();
|
|
362
|
+
}, []), ge = S((e) => {
|
|
370
363
|
e.preventDefault();
|
|
371
|
-
const t = ee.current, { left: m, right:
|
|
364
|
+
const t = ee.current, { left: m, right: b, top: P, bottom: N } = t.boundingClientRect ?? {}, { width: U, height: en } = t.offsetParentBoundingClientRect ?? {};
|
|
372
365
|
let O = Math.max(e.screenX - t.screenX, -m);
|
|
373
|
-
O = Math.min(O,
|
|
374
|
-
let R = Math.max(e.screenY - t.screenY, -
|
|
375
|
-
R = Math.min(R,
|
|
376
|
-
}, []),
|
|
377
|
-
e.preventDefault(),
|
|
366
|
+
O = Math.min(O, U - b);
|
|
367
|
+
let R = Math.max(e.screenY - t.screenY, -P);
|
|
368
|
+
R = Math.min(R, en - N), O += t.prewTranslateX, R += t.prewTranslateY, t.translateX = O, t.translateY = R, pe(`translate(${O}px, ${R}px)`);
|
|
369
|
+
}, []), ve = S((e) => {
|
|
370
|
+
e.preventDefault(), F();
|
|
378
371
|
}, []);
|
|
379
|
-
function
|
|
372
|
+
function Je() {
|
|
380
373
|
document.documentElement.addEventListener(
|
|
381
374
|
"mousemove",
|
|
382
375
|
ge
|
|
383
376
|
), document.documentElement.addEventListener(
|
|
384
377
|
"mouseup",
|
|
385
|
-
|
|
378
|
+
ve
|
|
386
379
|
);
|
|
387
380
|
}
|
|
388
|
-
function
|
|
381
|
+
function F() {
|
|
389
382
|
document.documentElement.removeEventListener(
|
|
390
383
|
"mousemove",
|
|
391
384
|
ge
|
|
392
385
|
), document.documentElement.removeEventListener(
|
|
393
386
|
"mouseup",
|
|
394
|
-
|
|
387
|
+
ve
|
|
395
388
|
);
|
|
396
389
|
}
|
|
397
|
-
function
|
|
390
|
+
function xe() {
|
|
398
391
|
return {
|
|
399
392
|
screenX: 0,
|
|
400
393
|
screenY: 0,
|
|
@@ -407,100 +400,100 @@ function On(n, l) {
|
|
|
407
400
|
};
|
|
408
401
|
}
|
|
409
402
|
function ne() {
|
|
410
|
-
ee.current =
|
|
403
|
+
ee.current = xe(), pe(""), he("");
|
|
411
404
|
}
|
|
412
405
|
oe(() => () => {
|
|
413
|
-
ne(),
|
|
414
|
-
}, []), oe(() => (
|
|
415
|
-
}), [
|
|
416
|
-
const
|
|
406
|
+
ne(), F();
|
|
407
|
+
}, []), oe(() => (E.current || (ne(), F()), () => {
|
|
408
|
+
}), [E.current]);
|
|
409
|
+
const Qe = /* @__PURE__ */ L(
|
|
417
410
|
$e,
|
|
418
411
|
{
|
|
419
412
|
...c,
|
|
420
|
-
prefixCls:
|
|
413
|
+
prefixCls: s.prefixCls || c.prefixCls,
|
|
421
414
|
locale: G,
|
|
422
415
|
zIndex: fe || 1050,
|
|
423
|
-
getPopupContainer: (e) => typeof
|
|
416
|
+
getPopupContainer: (e) => typeof se == "function" ? se(e) : ue.current,
|
|
424
417
|
children: [
|
|
425
418
|
(!!u || !!x) && /* @__PURE__ */ L("div", { className: `${d}-header`, children: [
|
|
426
|
-
!!u && /* @__PURE__ */
|
|
419
|
+
!!u && /* @__PURE__ */ i(
|
|
427
420
|
"div",
|
|
428
421
|
{
|
|
429
422
|
className: `${d}-title`,
|
|
430
|
-
id: `pqb-dialog-${
|
|
423
|
+
id: `pqb-dialog-${B.current}`,
|
|
431
424
|
children: u
|
|
432
425
|
}
|
|
433
426
|
),
|
|
434
|
-
!!x && /* @__PURE__ */
|
|
427
|
+
!!x && /* @__PURE__ */ i("div", { className: `${d}-subtitle`, children: x })
|
|
435
428
|
] }),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
|
|
438
|
-
!
|
|
429
|
+
/* @__PURE__ */ i("div", { ref: ue, className: `${d}-content`, children: h }),
|
|
430
|
+
Ke(),
|
|
431
|
+
!s.fullscreenable && s.draggable !== !1 && /* @__PURE__ */ i(
|
|
439
432
|
"div",
|
|
440
433
|
{
|
|
441
434
|
className: `${d}-drag-icon`,
|
|
442
|
-
onMouseDown:
|
|
435
|
+
onMouseDown: Ge,
|
|
443
436
|
onDoubleClick: ne
|
|
444
437
|
}
|
|
445
438
|
),
|
|
446
|
-
(
|
|
439
|
+
(ze || !!s.fullscreenable) && (ae !== void 0 ? /* @__PURE__ */ i(
|
|
447
440
|
"span",
|
|
448
441
|
{
|
|
449
442
|
className: `${d}-close-icon`,
|
|
450
443
|
onClick: J,
|
|
451
444
|
children: ae
|
|
452
445
|
}
|
|
453
|
-
) : /* @__PURE__ */
|
|
454
|
-
|
|
446
|
+
) : /* @__PURE__ */ i(
|
|
447
|
+
Cn,
|
|
455
448
|
{
|
|
456
449
|
tabIndex: -1,
|
|
457
450
|
className: `${d}-close-icon`,
|
|
458
451
|
onClick: J,
|
|
459
452
|
role: "button",
|
|
460
453
|
"aria-label": "Close",
|
|
461
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ i(ln, {})
|
|
462
455
|
}
|
|
463
456
|
))
|
|
464
457
|
]
|
|
465
458
|
}
|
|
466
|
-
),
|
|
459
|
+
), _e = u ? { "aria-labelledby": `pqb-dialog-${B.current}` } : {}, ke = /* @__PURE__ */ i(
|
|
467
460
|
"div",
|
|
468
461
|
{
|
|
469
462
|
role: "dialog",
|
|
470
463
|
"aria-modal": "true",
|
|
471
|
-
...
|
|
464
|
+
..._e,
|
|
472
465
|
className: Ne(
|
|
473
466
|
d,
|
|
474
467
|
{
|
|
475
468
|
[`${d}-simple`]: r,
|
|
476
469
|
[`${d}-rtl`]: be,
|
|
477
|
-
[`${d}-fullscreenable`]:
|
|
470
|
+
[`${d}-fullscreenable`]: s.fullscreenable
|
|
478
471
|
},
|
|
479
472
|
f
|
|
480
473
|
),
|
|
481
474
|
style: {
|
|
482
|
-
...
|
|
483
|
-
transform:
|
|
475
|
+
...v,
|
|
476
|
+
transform: Ue,
|
|
484
477
|
transformOrigin: Ce
|
|
485
478
|
},
|
|
486
|
-
ref:
|
|
487
|
-
children:
|
|
479
|
+
ref: E,
|
|
480
|
+
children: Qe
|
|
488
481
|
}
|
|
489
482
|
), te = (e) => {
|
|
490
483
|
if (Ce)
|
|
491
484
|
return;
|
|
492
485
|
let t = "";
|
|
493
|
-
if (
|
|
494
|
-
const m = e.getBoundingClientRect(), { left:
|
|
495
|
-
t = `${
|
|
486
|
+
if (Y.current) {
|
|
487
|
+
const m = e.getBoundingClientRect(), { left: b, top: P } = Y.current;
|
|
488
|
+
t = `${b - m.left}px ${P - m.top}px`;
|
|
496
489
|
}
|
|
497
490
|
he(t);
|
|
498
|
-
},
|
|
499
|
-
return o ||
|
|
500
|
-
|
|
491
|
+
}, Ee = A.current ? !q : !!E.current;
|
|
492
|
+
return o || Ee ? /* @__PURE__ */ i(
|
|
493
|
+
yn,
|
|
501
494
|
{
|
|
502
495
|
visible: o,
|
|
503
|
-
forceRender:
|
|
496
|
+
forceRender: Ee,
|
|
504
497
|
getContainer: p,
|
|
505
498
|
children: /* @__PURE__ */ L(
|
|
506
499
|
"div",
|
|
@@ -508,8 +501,8 @@ function On(n, l) {
|
|
|
508
501
|
ref: l,
|
|
509
502
|
className: `${d}-container`,
|
|
510
503
|
children: [
|
|
511
|
-
|
|
512
|
-
|
|
504
|
+
X ? /* @__PURE__ */ i(
|
|
505
|
+
Pe,
|
|
513
506
|
{
|
|
514
507
|
in: o,
|
|
515
508
|
timeout: 400,
|
|
@@ -523,20 +516,20 @@ function On(n, l) {
|
|
|
523
516
|
onExited: (e) => {
|
|
524
517
|
e && (e.style.display = "none");
|
|
525
518
|
},
|
|
526
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ i(
|
|
527
520
|
"div",
|
|
528
521
|
{
|
|
529
522
|
"aria-hidden": !0,
|
|
530
523
|
className: `${d}-mask`,
|
|
531
|
-
style:
|
|
524
|
+
style: Xe
|
|
532
525
|
}
|
|
533
526
|
)
|
|
534
527
|
}
|
|
535
528
|
) : null,
|
|
536
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ i(
|
|
537
530
|
"div",
|
|
538
531
|
{
|
|
539
|
-
...
|
|
532
|
+
...Tn(ce, [
|
|
540
533
|
"content",
|
|
541
534
|
"icon",
|
|
542
535
|
"showIcon",
|
|
@@ -550,30 +543,30 @@ function On(n, l) {
|
|
|
550
543
|
]),
|
|
551
544
|
tabIndex: -1,
|
|
552
545
|
ref: (e) => {
|
|
553
|
-
$.current = e,
|
|
546
|
+
$.current = e, Ae();
|
|
554
547
|
},
|
|
555
548
|
className: Ne(
|
|
556
549
|
`${d}-wrapper`,
|
|
557
550
|
{
|
|
558
|
-
[`${d}-wrapper-no-mask`]: !
|
|
551
|
+
[`${d}-wrapper-no-mask`]: !X,
|
|
559
552
|
[`${d}-wrapper-align-center`]: Le,
|
|
560
553
|
[`${d}-wrapper-rtl`]: be
|
|
561
554
|
},
|
|
562
555
|
He
|
|
563
556
|
),
|
|
564
557
|
style: {
|
|
565
|
-
...
|
|
558
|
+
...Ye || {},
|
|
566
559
|
// 必须 visible=false,立即设置display:none,否则modal加载react-monaco-editor的时候,编辑器显示异常
|
|
567
560
|
display: o || de ? "block" : "none",
|
|
568
561
|
overflow: !o && de ? "hidden" : ""
|
|
569
562
|
},
|
|
570
|
-
onKeyDown:
|
|
563
|
+
onKeyDown: We,
|
|
571
564
|
onMouseDown: (e) => {
|
|
572
|
-
|
|
565
|
+
D.current = e.target === e.currentTarget;
|
|
573
566
|
},
|
|
574
|
-
onClick:
|
|
575
|
-
children: /* @__PURE__ */
|
|
576
|
-
|
|
567
|
+
onClick: Ze,
|
|
568
|
+
children: /* @__PURE__ */ i(
|
|
569
|
+
Pe,
|
|
577
570
|
{
|
|
578
571
|
in: o,
|
|
579
572
|
timeout: 400,
|
|
@@ -582,25 +575,25 @@ function On(n, l) {
|
|
|
582
575
|
unmountOnExit: W,
|
|
583
576
|
mountOnEnter: q,
|
|
584
577
|
onEnter: (e) => {
|
|
585
|
-
e && (me(!0),
|
|
578
|
+
e && (me(!0), Y.current = re, te(e), E.current = e);
|
|
586
579
|
},
|
|
587
580
|
onEntered: (e) => {
|
|
588
|
-
e && (te(e),
|
|
581
|
+
e && (te(e), Y.current = null, Z == null || Z());
|
|
589
582
|
},
|
|
590
583
|
onExit: () => {
|
|
591
584
|
_.current = !0;
|
|
592
585
|
},
|
|
593
586
|
onExited: (e) => {
|
|
594
|
-
e && (me(!1), te(e), z == null || z(), _.current = !1, W && (
|
|
587
|
+
e && (me(!1), te(e), z == null || z(), _.current = !1, W && (E.current = null));
|
|
595
588
|
},
|
|
596
|
-
children:
|
|
597
|
-
|
|
589
|
+
children: sn.cloneElement(
|
|
590
|
+
ye(ie) ? ie(ke) : ke,
|
|
598
591
|
{
|
|
599
592
|
onMouseDown: () => {
|
|
600
|
-
|
|
593
|
+
D.current = !1;
|
|
601
594
|
},
|
|
602
595
|
onMouseUp: () => {
|
|
603
|
-
|
|
596
|
+
D.current = !1;
|
|
604
597
|
}
|
|
605
598
|
}
|
|
606
599
|
)
|
|
@@ -614,28 +607,28 @@ function On(n, l) {
|
|
|
614
607
|
}
|
|
615
608
|
) : null;
|
|
616
609
|
}
|
|
617
|
-
const
|
|
618
|
-
|
|
610
|
+
const M = Ie(
|
|
611
|
+
Rn
|
|
619
612
|
);
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
613
|
+
M.displayName = "Modal";
|
|
614
|
+
M.config = fn;
|
|
615
|
+
M.show = (n) => le({ ...n, noticeType: "show" });
|
|
616
|
+
M.confirm = (n) => le(n);
|
|
617
|
+
M.useModal = $n;
|
|
625
618
|
["info", "success", "warning", "error"].forEach((n) => {
|
|
626
|
-
|
|
619
|
+
M[n] = (l) => le({
|
|
627
620
|
...l,
|
|
628
621
|
isNotice: !0,
|
|
629
622
|
noticeType: n
|
|
630
623
|
});
|
|
631
624
|
});
|
|
632
|
-
|
|
625
|
+
M.destroyAll = () => {
|
|
633
626
|
for (; T.length; ) {
|
|
634
627
|
const n = T.pop();
|
|
635
628
|
n && n();
|
|
636
629
|
}
|
|
637
|
-
|
|
630
|
+
y.length = 0;
|
|
638
631
|
};
|
|
639
632
|
export {
|
|
640
|
-
|
|
633
|
+
M as E
|
|
641
634
|
};
|