@unicom-cloud/ui 0.8.66 → 0.8.67
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 +79 -79
- package/Alert.js +46 -46
- package/Anchor.js +1 -1
- package/AutoComplete.js +74 -74
- package/Avatar.js +36 -36
- package/BackTop.js +35 -35
- package/Badge.js +55 -55
- package/Breadcrumb.js +42 -42
- package/Button.js +24 -24
- package/Calendar.js +230 -230
- package/Card.js +18 -18
- package/Carousel.js +165 -165
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +26 -26
- package/Comment.js +18 -18
- package/ConfigProvider.js +2 -2
- package/Copy.js +28 -27
- package/DatePicker.js +872 -871
- package/Descriptions.js +34 -34
- package/Divider.js +19 -19
- package/Draggable.js +27 -26
- package/Drawer.js +1 -1
- package/Dropdown.js +110 -110
- package/Empty.js +3 -3
- package/Form.js +984 -945
- package/Grid.js +34 -34
- package/Icon.js +16 -16
- package/IconHover.js +2 -2
- package/Image.js +2 -2
- package/Input.js +7 -6
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +24 -24
- package/Link.js +30 -30
- package/List.js +95 -95
- package/Mentions.js +85 -84
- package/Menu.js +2 -2
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +14 -3
- package/Notification.js +9 -7
- package/OverflowEllipsis.js +64 -62
- package/PageHeader.js +73 -73
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +60 -60
- package/Popover.js +31 -31
- package/Portal.js +23 -31
- package/Progress.js +22 -22
- package/Radio.js +2 -2
- package/Rate.js +24 -24
- package/ResizeBox.js +274 -271
- package/Result.js +3 -3
- package/Select.js +4 -4
- package/SelectView.js +257 -238
- package/Skeleton.js +46 -46
- package/Slider.js +286 -283
- package/Space.js +28 -28
- package/SpeechSynthesis.js +62 -55
- package/Spin.js +23 -23
- package/Statistic.js +80 -80
- package/Steps.js +67 -67
- package/Switch.js +47 -47
- package/Table.js +1445 -1380
- package/Tabs.js +5 -5
- package/Tag.js +45 -45
- package/TimePicker.js +154 -154
- package/Timeline.js +2 -2
- package/Tooltip.js +80 -79
- package/Transfer.js +103 -102
- package/Tree.js +3 -2
- package/TreeSelect.js +2 -2
- package/Trigger.js +699 -772
- package/Typography.js +756 -6
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{BHgJ5Y3T.js → -UuKKT0Z.js} +29 -29
- package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
- package/chunk/B5gK1Idp.js +19 -0
- package/chunk/B7FlazNB.js +24 -0
- package/chunk/{DTBtQQ2H.js → BBvWDeuZ.js} +67 -67
- package/chunk/BCftTxEy.js +626 -0
- package/chunk/{CZOP_ZHJ.js → BGny4zSb.js} +60 -60
- package/chunk/BHF15Dog.js +98 -0
- package/chunk/BJQ5UNa-.js +1585 -0
- package/chunk/BP9sYyk9.js +8 -0
- package/chunk/BUdtVdnv.js +38 -0
- package/chunk/BVQlOzTS.js +11 -0
- package/chunk/B__a_gb_.js +519 -0
- package/chunk/BbEYToV1.js +10 -0
- package/chunk/BbdDQAnm.js +15 -0
- package/chunk/BdUcgWdu.js +11 -0
- package/chunk/BfbXSG70.js +26 -0
- package/chunk/BndfNLK4.js +186 -0
- package/chunk/BoMCZV6K.js +1098 -0
- package/chunk/Br0B6y1T.js +18 -0
- package/chunk/BrOW642m.js +130 -0
- package/chunk/BxUs8_Cr.js +9 -0
- package/chunk/{CcV4wQB1.js → C42LIMP9.js} +244 -242
- package/chunk/C4YkFMzC.js +778 -0
- package/chunk/{Bh23P4l7.js → C9Wcraj7.js} +21 -21
- package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
- package/chunk/CJ_o9tZM.js +5 -0
- package/chunk/{DNAigumg.js → CK5m7rLl.js} +36 -36
- package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
- package/chunk/CLiqJm_T.js +10 -0
- package/chunk/{BnSVm1YC.js → CNmmhbCn.js} +32 -32
- package/chunk/{BFipyA67.js → CP0odX99.js} +51 -51
- package/chunk/CPT-OZH2.js +14 -0
- package/chunk/CVSF8p0O.js +698 -0
- package/chunk/C_agcwLN.js +31 -0
- package/chunk/{jhQQCFMn.js → C_gJWGGh.js} +201 -201
- package/chunk/{Bc7t9jkb.js → CaasmWg_.js} +11 -11
- package/chunk/Ce1j9KTi.js +6 -0
- package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
- package/chunk/CkNSv2U7.js +56 -0
- package/chunk/Cp2f70gB.js +9 -0
- package/chunk/CpegYjdC.js +16 -0
- package/chunk/CucI3KZr.js +20 -0
- package/chunk/CwoFBTYz.js +11 -0
- package/chunk/D2KPqPhV.js +17 -0
- package/chunk/D7NyvE5f.js +17 -0
- package/chunk/D8oTPQ2H.js +384 -0
- package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
- package/chunk/{DnvO8A0Z.js → DFrfrmfK.js} +120 -119
- package/chunk/DGTIZ_0O.js +6 -0
- package/chunk/DJfpiZn_.js +25 -0
- package/chunk/DKr2_PYd.js +34 -0
- package/chunk/DNUz6zgo.js +11 -0
- package/chunk/DRtM649q.js +11 -0
- package/chunk/DS_mUWn6.js +41 -0
- package/chunk/DU6bs_19.js +10 -0
- package/chunk/DWdbwz22.js +10 -0
- package/chunk/DcveZuqd.js +6 -0
- package/chunk/DdVFknul.js +24 -0
- package/chunk/DgRfikwe.js +16 -0
- package/chunk/{znkyQ-HR.js → DkyR2EfG.js} +66 -66
- package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
- package/chunk/DnrZEnQ_.js +27 -0
- package/chunk/DsRSHWtX.js +1025 -0
- package/chunk/Dz5BdmXo.js +270 -0
- package/chunk/EANe01DF.js +1030 -0
- package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
- package/chunk/GoNx5R4F.js +873 -0
- package/chunk/HDUQku8d.js +20 -0
- package/chunk/HrAP__Hi.js +25 -0
- package/chunk/JPPo5nY_.js +9 -0
- package/chunk/{Du-bw6qA.js → SLWP34OR.js} +90 -85
- package/chunk/VVKtwaGf.js +278 -0
- package/chunk/WPNpLxSI.js +16 -0
- package/chunk/{CPvvjMwZ.js → WpO_DsK4.js} +49 -48
- package/chunk/fdU3ang6.js +14 -0
- package/chunk/{DQAot004.js → fkclKOAL.js} +298 -292
- package/chunk/flvYlqx3.js +22 -0
- package/chunk/kTDayEpF.js +288 -0
- package/chunk/{CssIjN1g.js → pZoNQ75H.js} +31 -31
- package/chunk/qFf1w_Jq.js +8 -0
- package/chunk/{CHnFKgbk.js → w-kM1L5W.js} +155 -155
- package/hooks/index.js +53 -49
- package/hooks/useComputedState.js +2 -10
- package/hooks/useCreate.js +2 -7
- package/hooks/useForceUpdate.js +2 -7
- package/hooks/useId.js +2 -10
- package/hooks/useInView.js +2 -30
- package/hooks/useIntersectionObserver.js +2 -23
- package/hooks/useInterval.js +2 -17
- package/hooks/useIsFirstRender.js +2 -9
- package/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/hooks/useKeyboardEvent.js +2 -16
- package/hooks/useMedia.js +2 -15
- package/hooks/useMergeProps.js +2 -18
- package/hooks/useMergeValue.js +2 -19
- package/hooks/useOnlineStatus.js +4 -0
- package/hooks/useOverflowHidden.js +2 -25
- package/hooks/useOverrideRef.js +2 -13
- package/hooks/usePersistCallback.js +2 -13
- package/hooks/usePrefersColorSchemeDark.js +4 -0
- package/hooks/usePrevious.js +2 -9
- package/hooks/useRefs.js +2 -9
- package/hooks/useResizeObserver.js +2 -15
- package/hooks/useStateCallback.js +2 -15
- package/hooks/useStateWithPromise.js +2 -24
- package/hooks/useUpdateEffect.js +2 -9
- package/hooks/useVerificationCode.js +73 -0
- package/hooks/useWatch.js +2 -10
- package/hooks/{use-watermark.js → useWatermark.js} +27 -26
- package/hooks/useWindowSize.js +2 -20
- package/index.js +571 -584
- package/locale/en-US.js +4 -2
- package/locale/interface.js +1 -4
- package/locale/ja-JP.js +3 -1
- package/locale/tr-TR.js +1 -1
- package/locale/zh-CN.js +3 -1
- package/locale/zh-HK.js +3 -1
- package/locale/zh-TW.js +3 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -1
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
- package/types/form/Control-old.d.ts +56 -0
- package/types/form/Control.d.ts +6 -54
- package/types/form/FormItem.d.ts +1 -1
- package/types/form/store.d.ts +0 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/useComputedState.d.ts +1 -4
- package/types/hooks/useCreate.d.ts +1 -2
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useId.d.ts +1 -2
- package/types/hooks/useInView.d.ts +1 -11
- package/types/hooks/useIntersectionObserver.d.ts +1 -7
- package/types/hooks/useInterval.d.ts +1 -2
- package/types/hooks/useIsFirstRender.d.ts +1 -2
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/hooks/useKeyboardEvent.d.ts +1 -8
- package/types/hooks/useMedia.d.ts +1 -2
- package/types/hooks/useMergeProps.d.ts +1 -5
- package/types/hooks/useMergeValue.d.ts +1 -6
- package/types/hooks/useOnlineStatus.d.ts +1 -0
- package/types/hooks/useOverflowHidden.d.ts +1 -5
- package/types/hooks/useOverrideRef.d.ts +1 -6
- package/types/hooks/usePersistCallback.d.ts +1 -2
- package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
- package/types/hooks/usePrevious.d.ts +1 -3
- package/types/hooks/useRefs.d.ts +1 -2
- package/types/hooks/useResizeObserver.d.ts +1 -6
- package/types/hooks/useStateCallback.d.ts +1 -5
- package/types/hooks/useStateWithPromise.d.ts +1 -2
- package/types/hooks/useUpdateEffect.d.ts +1 -3
- package/types/hooks/useWatch.d.ts +1 -3
- package/types/hooks/useWindowSize.d.ts +1 -5
- package/types/image/interface.d.ts +1 -0
- package/types/index.d.ts +157 -86
- package/types/input/Input.d.ts +1 -1
- package/types/input/Textarea.d.ts +2 -2
- package/types/locale/en-US.d.ts +2 -0
- package/types/locale/interface.d.ts +1 -2
- package/types/locale/ja-JP.d.ts +2 -0
- package/types/locale/zh-CN.d.ts +2 -0
- package/types/locale/zh-HK.d.ts +2 -0
- package/types/locale/zh-TW.d.ts +2 -0
- package/types/menu/context.d.ts +1 -1
- package/types/message/index.d.ts +14 -14
- package/types/message/interface.d.ts +2 -0
- package/types/modal/config.d.ts +0 -1
- package/types/modal/interface.d.ts +0 -1
- package/types/notice/index.d.ts +2 -27
- package/types/notification/index.d.ts +15 -16
- package/types/notification/interface.d.ts +2 -0
- package/types/notification/withNotification.d.ts +2 -0
- package/types/select/util.d.ts +1 -2
- package/types/select-view/interface.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +1 -1
- package/types/table/constant.d.ts +2 -0
- package/types/table/hook/useThResizable.d.ts +7 -0
- package/types/table/index.d.ts +10 -1
- package/types/table/style/index.d.ts +1 -0
- package/types/table/th-resizable/index.d.ts +2 -0
- package/types/table/thead/Column.d.ts +1 -2
- package/types/tree/Tree.d.ts +12 -67
- package/types/tree-select/Select.d.ts +2 -2
- package/types/trigger/index.d.ts +2 -120
- package/types/trigger/interface.d.ts +2 -1
- package/types/utils/CSSTransition.d.ts +2 -3
- package/types/utils/caseName.d.ts +1 -1
- package/types/utils/className.d.ts +1 -1
- package/types/utils/constant.d.ts +2 -2
- package/types/utils/copy.d.ts +1 -1
- package/types/utils/dayjs.d.ts +1 -21
- package/types/utils/dom.d.ts +1 -6
- package/types/utils/fileToURL.d.ts +1 -1
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/getHighlightText.d.ts +1 -5
- package/types/utils/getHotkeyHandler.d.ts +1 -8
- package/types/utils/getStringLength.d.ts +1 -1
- package/types/utils/include.d.ts +1 -1
- package/types/utils/index.d.ts +3 -4
- package/types/utils/is.d.ts +1 -16
- package/types/utils/keyboardCode.d.ts +3 -0
- package/types/utils/lodash.d.ts +1 -17
- package/types/utils/mergeProps.d.ts +1 -1
- package/types/utils/mergedToString.d.ts +1 -1
- package/types/utils/omit.d.ts +1 -1
- package/types/utils/pad.d.ts +1 -2
- package/types/utils/pick.d.ts +2 -4
- package/types/utils/reactDOM.d.ts +1 -7
- package/types/utils/resizeObserverEffect.d.ts +2 -0
- package/types/utils/saveAs.d.ts +1 -1
- package/types/utils/screenfull.d.ts +2 -0
- package/types/utils/scrollIntoView.d.ts +1 -2
- package/types/utils/style.d.ts +1 -3
- package/types/utils/throttleByRaf.d.ts +1 -5
- package/types/utils/throttleByRaf2.d.ts +1 -0
- package/types/utils/warning.d.ts +1 -2
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +2 -6
- package/utils/className.js +2 -2
- package/utils/constant.js +8 -9
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/dayjs.js +14 -173
- package/utils/dom.js +33 -29
- package/utils/fillNBSP.js +2 -4
- package/utils/getHighlightText.js +2 -38
- package/utils/getHotkeyHandler.js +2 -25
- package/utils/getStringLength.js +2 -7
- package/utils/include.js +2 -7
- package/utils/index.js +237 -240
- package/utils/is.js +116 -156
- package/utils/keyboardCode.js +27 -0
- package/utils/mergeProps.js +2 -9
- package/utils/mergedToString.js +2 -13
- package/utils/omit.js +2 -9
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -15
- package/utils/reactDOM.js +3 -54
- package/utils/resizeObserverEffect.js +4 -0
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +4 -0
- package/utils/scrollIntoView.js +2 -21
- package/utils/style.js +12 -11
- package/utils/throttleByRaf.js +13 -12
- package/utils/throttleByRaf2.js +5 -0
- package/utils/warning.js +5 -4
- package/NotificationBase.js +0 -53
- package/chunk/-zpSUpGE.js +0 -1501
- package/chunk/BAWsPQBM.js +0 -11
- package/chunk/BIT0j3HT.js +0 -269
- package/chunk/BbLKnaNO.js +0 -871
- package/chunk/Bfhv56O2.js +0 -638
- package/chunk/C2lIz2F9.js +0 -60
- package/chunk/C6QWSzsM.js +0 -376
- package/chunk/CVkHTbic.js +0 -995
- package/chunk/CeGEvXby.js +0 -278
- package/chunk/D3NFxdmG.js +0 -518
- package/chunk/DApXtulb.js +0 -1102
- package/chunk/DPByB1ab.js +0 -698
- package/chunk/DV1Ab_cG.js +0 -284
- package/chunk/dBnNCOIU.js +0 -778
- package/chunk/it8qlDZ3.js +0 -1032
- package/chunk/l0sNRNKZ.js +0 -1
- package/chunk/te_43YrB.js +0 -776
- package/hooks/use-verification-code.js +0 -73
- package/types/notification-base/index.d.ts +0 -15
- package/types/notification-base/style/index.d.ts +0 -2
- package/types/trigger/Portal.d.ts +0 -7
- package/types/utils/keyCode.d.ts +0 -45
- package/types/utils/raf.d.ts +0 -3
- package/types/utils/throttleByRafV2.d.ts +0 -5
- package/utils/keyCode.js +0 -12
- package/utils/raf.js +0 -19
- package/utils/throttleByRafV2.js +0 -16
package/ResizeBox.js
CHANGED
|
@@ -1,271 +1,272 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import Wt, { useContext as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { on as
|
|
9
|
-
import
|
|
1
|
+
import { jsx as m, jsxs as ut } from "react/jsx-runtime";
|
|
2
|
+
import wt from "lodash/isNumber";
|
|
3
|
+
import Wt, { useContext as mt, useRef as Y, useEffect as ft, forwardRef as zt, useState as st, useImperativeHandle as Ct } from "react";
|
|
4
|
+
import { a as gt } from "./chunk/BJQ5UNa-.js";
|
|
5
|
+
import { c as Yt } from "./chunk/B5gK1Idp.js";
|
|
6
|
+
import { R as Tt } from "./chunk/HDUQku8d.js";
|
|
7
|
+
import { m as P } from "./chunk/JPPo5nY_.js";
|
|
8
|
+
import { on as $, off as y } from "./utils/dom.js";
|
|
9
|
+
import { c as Ot } from "./chunk/BdUcgWdu.js";
|
|
10
10
|
import Ft from "@unicom-cloud/icons/IconUiCaretDown";
|
|
11
11
|
import bt from "@unicom-cloud/icons/IconUiCaretLeft";
|
|
12
12
|
import It from "@unicom-cloud/icons/IconUiCaretRight";
|
|
13
13
|
import kt from "@unicom-cloud/icons/IconUiCaretUp";
|
|
14
14
|
import Ut from "@unicom-cloud/icons/IconUiDragDot";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import "./
|
|
15
|
+
import _t from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
16
|
+
import lt from "lodash/isFunction";
|
|
17
|
+
import "./chunk/CkNSv2U7.js";
|
|
18
|
+
import { l as Vt } from "./chunk/flvYlqx3.js";
|
|
18
19
|
import St from "lodash/isPlainObject.js";
|
|
19
|
-
import {
|
|
20
|
+
import { s as Gt } from "./chunk/DcveZuqd.js";
|
|
20
21
|
import it from "lodash/isPlainObject";
|
|
21
22
|
import Lt from "lodash/isString";
|
|
22
23
|
import Pt from "lodash/isUndefined";
|
|
23
24
|
function Nt(r) {
|
|
24
25
|
const {
|
|
25
|
-
className:
|
|
26
|
+
className: nt,
|
|
26
27
|
direction: g,
|
|
27
|
-
icon:
|
|
28
|
-
onMouseDown:
|
|
29
|
-
onResize:
|
|
30
|
-
children:
|
|
31
|
-
collapsible:
|
|
32
|
-
resizable:
|
|
28
|
+
icon: j,
|
|
29
|
+
onMouseDown: q,
|
|
30
|
+
onResize: w,
|
|
31
|
+
children: J,
|
|
32
|
+
collapsible: C = {},
|
|
33
|
+
resizable: A = !0,
|
|
33
34
|
renderChildren: b,
|
|
34
|
-
...
|
|
35
|
-
} = r, { getPrefixCls:
|
|
35
|
+
...K
|
|
36
|
+
} = r, { getPrefixCls: ot, rtl: O } = mt(gt), d = ot("resizebox-trigger"), D = g === "horizontal", N = O && !D, T = P(
|
|
36
37
|
d,
|
|
37
38
|
`${d}-${D ? "horizontal" : "vertical"}`,
|
|
38
|
-
{ [`${d}-not-resizable`]: !
|
|
39
|
-
{ [`${d}-rtl`]:
|
|
40
|
-
|
|
41
|
-
), l =
|
|
42
|
-
...
|
|
43
|
-
icon:
|
|
44
|
-
} : {}, E = St(
|
|
45
|
-
...
|
|
46
|
-
icon:
|
|
47
|
-
} : {},
|
|
39
|
+
{ [`${d}-not-resizable`]: !A },
|
|
40
|
+
{ [`${d}-rtl`]: O },
|
|
41
|
+
nt
|
|
42
|
+
), l = Y(), F = N ? [/* @__PURE__ */ m(It, {}, "prev"), /* @__PURE__ */ m(bt, {}, "next")] : [/* @__PURE__ */ m(bt, {}, "prev"), /* @__PURE__ */ m(It, {}, "next")], I = St(C.prev) ? {
|
|
43
|
+
...C.prev,
|
|
44
|
+
icon: C.prev.icon || (D ? /* @__PURE__ */ m(kt, {}) : F[0])
|
|
45
|
+
} : {}, E = St(C.next) ? {
|
|
46
|
+
...C.next,
|
|
47
|
+
icon: C.next.icon || (D ? /* @__PURE__ */ m(Ft, {}) : F[1])
|
|
48
|
+
} : {}, k = () => I.icon && !I.collapsed || E.collapsed ? /* @__PURE__ */ m(
|
|
48
49
|
"span",
|
|
49
50
|
{
|
|
50
51
|
className: P(`${d}-icon`, P(`${d}-prev`)),
|
|
51
52
|
onClick: I.onClick,
|
|
52
53
|
children: I.icon
|
|
53
54
|
}
|
|
54
|
-
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }),
|
|
55
|
+
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), Q = () => E.icon && !E.collapsed || I.collapsed ? /* @__PURE__ */ m(
|
|
55
56
|
"span",
|
|
56
57
|
{
|
|
57
58
|
className: P(`${d}-icon`, P(`${d}-next`)),
|
|
58
59
|
onClick: E.onClick,
|
|
59
60
|
children: E.icon
|
|
60
61
|
}
|
|
61
|
-
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }),
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), p = () => A ? /* @__PURE__ */ m("span", { className: `${d}-icon`, children: j || (D ? /* @__PURE__ */ m(Ut, {}) : /* @__PURE__ */ m(_t, {})) }) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), M = k(), a = p(), h = Q(), U = () => /* @__PURE__ */ ut("div", { className: `${d}-icon-wrapper`, children: [
|
|
63
|
+
M,
|
|
64
|
+
a,
|
|
64
65
|
h
|
|
65
66
|
] });
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
return A ? (ft(() => {
|
|
68
|
+
if (!lt(w)) return;
|
|
69
|
+
const u = Vt([l.current], w);
|
|
70
|
+
return () => {
|
|
71
|
+
u();
|
|
71
72
|
};
|
|
72
|
-
}, [l.current]), /* @__PURE__ */ m(
|
|
73
|
+
}, [l.current, w]), /* @__PURE__ */ m(
|
|
73
74
|
"div",
|
|
74
75
|
{
|
|
75
76
|
ref: l,
|
|
76
|
-
...
|
|
77
|
+
...Ot(K, ["style"]),
|
|
77
78
|
className: T,
|
|
78
|
-
onMouseDown:
|
|
79
|
-
children:
|
|
79
|
+
onMouseDown: q,
|
|
80
|
+
children: lt(b) ? b(M, a, h) : J || U()
|
|
80
81
|
}
|
|
81
|
-
)) : /* @__PURE__ */ m("div", { className: T, children:
|
|
82
|
+
)) : /* @__PURE__ */ m("div", { className: T, children: lt(b) ? b(M, a, h) : J || U() });
|
|
82
83
|
}
|
|
83
|
-
const
|
|
84
|
-
function
|
|
84
|
+
const ht = "horizontal", Dt = "vertical";
|
|
85
|
+
function jt(r, nt) {
|
|
85
86
|
const {
|
|
86
87
|
style: g,
|
|
87
|
-
className:
|
|
88
|
-
component:
|
|
89
|
-
direction:
|
|
90
|
-
icon:
|
|
91
|
-
size:
|
|
92
|
-
min:
|
|
88
|
+
className: j,
|
|
89
|
+
component: q = "div",
|
|
90
|
+
direction: w = "horizontal",
|
|
91
|
+
icon: J,
|
|
92
|
+
size: C = 0.5,
|
|
93
|
+
min: A,
|
|
93
94
|
max: b,
|
|
94
|
-
panes:
|
|
95
|
-
disabled:
|
|
96
|
-
trigger:
|
|
97
|
-
} = r, { getPrefixCls: d, rtl: D } =
|
|
95
|
+
panes: K,
|
|
96
|
+
disabled: ot,
|
|
97
|
+
trigger: O
|
|
98
|
+
} = r, { getPrefixCls: d, rtl: D } = mt(gt), N = d("resizebox-split"), T = w.includes(ht), l = w.includes("reverse"), F = T && D, I = !T, E = P(
|
|
98
99
|
N,
|
|
99
|
-
`${N}-${T ?
|
|
100
|
+
`${N}-${T ? ht : Dt}`,
|
|
100
101
|
{ [`${N}-rtl`]: D },
|
|
101
|
-
|
|
102
|
-
), [
|
|
102
|
+
j
|
|
103
|
+
), [k, Q] = K, p = typeof C == "string", [M, a] = st(parseFloat(C)), [h, U] = st(0), u = Y({
|
|
103
104
|
startX: 0,
|
|
104
105
|
startY: 0,
|
|
105
106
|
startWidth: 0,
|
|
106
107
|
startHeight: 0,
|
|
107
108
|
startOffset: 0,
|
|
108
109
|
moving: !1
|
|
109
|
-
}),
|
|
110
|
-
|
|
111
|
-
function
|
|
110
|
+
}), Z = Y(), rt = Y([]);
|
|
111
|
+
Ct(nt, () => Z.current, []);
|
|
112
|
+
function _(t, e) {
|
|
112
113
|
return parseFloat(t) / parseFloat(e);
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
const s = typeof
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
let
|
|
119
|
-
t * e + (o - n) *
|
|
115
|
+
function X(t, e, n, o) {
|
|
116
|
+
const s = typeof A == "string" ? _(parseFloat(A), t) : A || 0, c = typeof b == "string" ? _(parseFloat(b), t) : b || 1;
|
|
117
|
+
let f = l ? -1 : 1;
|
|
118
|
+
f *= F ? -1 : 1;
|
|
119
|
+
let H = p ? e + (o - n) * f : _(
|
|
120
|
+
t * e + (o - n) * f,
|
|
120
121
|
t
|
|
121
122
|
);
|
|
122
|
-
const
|
|
123
|
-
return
|
|
123
|
+
const et = p ? s * t : s, B = p ? c * t : c;
|
|
124
|
+
return H = Math.max(H, et), H = Math.min(H, B), H;
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function V(t) {
|
|
126
127
|
var e, n, o;
|
|
127
|
-
(e = r.onMovingStart) == null || e.call(r),
|
|
128
|
+
(e = r.onMovingStart) == null || e.call(r), u.current.moving = !0, u.current.startX = t.pageX, u.current.startY = t.pageY, u.current.startWidth = (n = Z.current) == null ? void 0 : n.offsetWidth, u.current.startHeight = (o = Z.current) == null ? void 0 : o.offsetHeight, u.current.startOffset = M, $(window, "mousemove", G), $(window, "touchmove", G), $(window, "mouseup", L), $(window, "touchend", L), $(window, "contextmenu", L), document.body.style.cursor = I ? "row-resize" : "col-resize";
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function G(t) {
|
|
130
131
|
var e;
|
|
131
|
-
if (
|
|
132
|
-
const n = T ?
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
if (u.current.moving) {
|
|
133
|
+
const n = T ? X(
|
|
134
|
+
u.current.startWidth,
|
|
135
|
+
u.current.startOffset,
|
|
136
|
+
u.current.startX,
|
|
136
137
|
t.pageX
|
|
137
|
-
) :
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
) : X(
|
|
139
|
+
u.current.startHeight,
|
|
140
|
+
u.current.startOffset,
|
|
141
|
+
u.current.startY,
|
|
141
142
|
t.pageY
|
|
142
143
|
);
|
|
143
|
-
|
|
144
|
+
a(n), (e = r.onMoving) == null || e.call(r, t, p ? `${n}px` : n);
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function L() {
|
|
147
148
|
var t;
|
|
148
|
-
|
|
149
|
+
u.current.moving = !1, y(window, "mousemove", G), y(window, "touchmove", G), y(window, "mouseup", L), y(window, "touchend", L), y(window, "contextmenu", L), document.body.style.cursor = "default", (t = r.onMovingEnd) == null || t.call(r);
|
|
149
150
|
}
|
|
150
151
|
function ct(t) {
|
|
151
152
|
const { contentRect: e } = t[0], n = e[I ? "height" : "width"];
|
|
152
|
-
|
|
153
|
+
U(n);
|
|
153
154
|
}
|
|
154
155
|
function i() {
|
|
155
|
-
const t =
|
|
156
|
-
return
|
|
156
|
+
const t = p ? "px" : "%";
|
|
157
|
+
return M ? `calc(${p ? M : M * 100}${t} - ${h / 2}px)` : `0${t}`;
|
|
157
158
|
}
|
|
158
|
-
|
|
159
|
+
ft(() => {
|
|
159
160
|
var t;
|
|
160
|
-
(t = r.onPaneResize) == null || t.call(r,
|
|
161
|
-
}, [
|
|
162
|
-
const t = parseFloat(
|
|
163
|
-
|
|
164
|
-
}, [
|
|
165
|
-
const v =
|
|
161
|
+
(t = r.onPaneResize) == null || t.call(r, rt.current);
|
|
162
|
+
}, [M, h]), Gt(() => {
|
|
163
|
+
const t = parseFloat(C);
|
|
164
|
+
M !== t && a(t);
|
|
165
|
+
}, [C]);
|
|
166
|
+
const v = q, x = /* @__PURE__ */ m(
|
|
166
167
|
"div",
|
|
167
168
|
{
|
|
168
169
|
className: P(`${N}-pane`, "first-pane"),
|
|
169
170
|
style: { flexBasis: i() },
|
|
170
171
|
ref: (t) => {
|
|
171
|
-
|
|
172
|
+
rt.current[0] = t;
|
|
172
173
|
},
|
|
173
|
-
children:
|
|
174
|
+
children: k
|
|
174
175
|
}
|
|
175
176
|
), R = /* @__PURE__ */ m(
|
|
176
177
|
"div",
|
|
177
178
|
{
|
|
178
179
|
className: P(`${N}-pane`, "second-pane"),
|
|
179
180
|
ref: (t) => {
|
|
180
|
-
|
|
181
|
+
rt.current[1] = t;
|
|
181
182
|
},
|
|
182
|
-
children:
|
|
183
|
+
children: Q
|
|
183
184
|
}
|
|
184
|
-
), S = l ? [R,
|
|
185
|
-
return /* @__PURE__ */
|
|
185
|
+
), S = l ? [R, x] : [x, R];
|
|
186
|
+
return /* @__PURE__ */ ut(v, { style: g, className: E, ref: Z, children: [
|
|
186
187
|
S[0],
|
|
187
|
-
!
|
|
188
|
+
!ot && /* @__PURE__ */ m(
|
|
188
189
|
Nt,
|
|
189
190
|
{
|
|
190
191
|
className: `${N}-trigger`,
|
|
191
|
-
direction: I ?
|
|
192
|
-
icon:
|
|
193
|
-
onMouseDown:
|
|
192
|
+
direction: I ? ht : Dt,
|
|
193
|
+
icon: J,
|
|
194
|
+
onMouseDown: V,
|
|
194
195
|
onResize: ct,
|
|
195
|
-
children:
|
|
196
|
+
children: O
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
199
|
S[1]
|
|
199
200
|
] });
|
|
200
201
|
}
|
|
201
|
-
const Ht =
|
|
202
|
+
const Ht = zt(jt);
|
|
202
203
|
Ht.displayName = "ResizeBoxSplit";
|
|
203
|
-
const
|
|
204
|
-
function
|
|
204
|
+
const vt = "horizontal", Et = "vertical";
|
|
205
|
+
function Zt(r, nt) {
|
|
205
206
|
const {
|
|
206
207
|
panes: g,
|
|
207
|
-
style:
|
|
208
|
-
className:
|
|
209
|
-
component:
|
|
210
|
-
direction:
|
|
211
|
-
icon:
|
|
212
|
-
...
|
|
213
|
-
} = r, { getPrefixCls: b, rtl:
|
|
208
|
+
style: j,
|
|
209
|
+
className: q,
|
|
210
|
+
component: w = "div",
|
|
211
|
+
direction: J = "horizontal",
|
|
212
|
+
icon: C,
|
|
213
|
+
...A
|
|
214
|
+
} = r, { getPrefixCls: b, rtl: K } = mt(gt), ot = 1 / g.length, O = Y(), d = Y(
|
|
214
215
|
new Array(g.length).fill({
|
|
215
216
|
moving: !1,
|
|
216
217
|
startOffset: 0,
|
|
217
218
|
startPosition: 0
|
|
218
219
|
})
|
|
219
|
-
), D =
|
|
220
|
-
new Array(g.length).fill(
|
|
221
|
-
), [I, E] = st(!1), [
|
|
220
|
+
), D = Y([]), N = Y(0), T = Y([]), [l, F] = st(
|
|
221
|
+
new Array(g.length).fill(ot)
|
|
222
|
+
), [I, E] = st(!1), [k, Q] = st(
|
|
222
223
|
new Array(g.length).fill(0)
|
|
223
|
-
), [
|
|
224
|
+
), [p, M] = st(
|
|
224
225
|
new Array(Math.max(g.length - 1, 0)).fill({ prev: !1, next: !1 })
|
|
225
|
-
),
|
|
226
|
-
|
|
227
|
-
`${
|
|
228
|
-
{ [`${
|
|
229
|
-
{ [`${
|
|
230
|
-
|
|
231
|
-
),
|
|
226
|
+
), a = b("resizebox-split-group"), h = J === vt, U = h && K, u = !h, Z = P(
|
|
227
|
+
a,
|
|
228
|
+
`${a}-${h ? vt : Et}`,
|
|
229
|
+
{ [`${a}-moving`]: I },
|
|
230
|
+
{ [`${a}-rtl`]: K },
|
|
231
|
+
q
|
|
232
|
+
), rt = w, _ = () => {
|
|
232
233
|
let t = [];
|
|
233
234
|
g.forEach((s) => {
|
|
234
|
-
const { size:
|
|
235
|
-
Pt(
|
|
235
|
+
const { size: c } = s;
|
|
236
|
+
Pt(c) ? t.push(void 0) : t.push(V(c));
|
|
236
237
|
});
|
|
237
|
-
const e = t.filter((s) => !s), o = (1 - t.reduce((s,
|
|
238
|
+
const e = t.filter((s) => !s), o = (1 - t.reduce((s, c) => (s || 0) + (c || 0), 0)) / e.length;
|
|
238
239
|
return t = t.map((s) => Pt(s) ? o : s), t;
|
|
239
|
-
},
|
|
240
|
-
const e =
|
|
240
|
+
}, X = (t) => {
|
|
241
|
+
const e = k[t - 1] || 0, n = k[t];
|
|
241
242
|
return `calc(${l[t] * 100}% - ${(e + n) / 2}px)`;
|
|
242
243
|
};
|
|
243
|
-
function
|
|
244
|
-
const e = h ?
|
|
245
|
-
if (!t ||
|
|
244
|
+
function V(t) {
|
|
245
|
+
const e = h ? O.current.offsetWidth : O.current.offsetHeight;
|
|
246
|
+
if (!t || wt(t) && t < 0)
|
|
246
247
|
return 0;
|
|
247
248
|
const n = Lt(t) ? parseFloat(t) / e : t;
|
|
248
249
|
return Math.min(n, 1);
|
|
249
250
|
}
|
|
250
|
-
const
|
|
251
|
-
const e = Math.min(t + 1, g.length - 1), n = l[t] + l[e], o =
|
|
252
|
-
let s =
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
return s = Math.min(n -
|
|
251
|
+
const G = (t) => {
|
|
252
|
+
const e = Math.min(t + 1, g.length - 1), n = l[t] + l[e], o = V(g[t].min) || 0;
|
|
253
|
+
let s = V(g[t].max) || n;
|
|
254
|
+
const c = V(g[e].min) || 0;
|
|
255
|
+
let f = V(g[e].max) || n;
|
|
256
|
+
return s = Math.min(n - c, s), f = Math.min(n - o, f), {
|
|
256
257
|
currentMin: o,
|
|
257
258
|
currentMax: s,
|
|
258
|
-
nextMin:
|
|
259
|
-
nextMax:
|
|
259
|
+
nextMin: c,
|
|
260
|
+
nextMax: f
|
|
260
261
|
};
|
|
261
|
-
},
|
|
262
|
-
const o = N.current, s = o + 1,
|
|
263
|
-
let
|
|
264
|
-
return
|
|
262
|
+
}, L = (t, e, n) => {
|
|
263
|
+
const o = N.current, s = o + 1, c = [...l], f = U ? -1 : 1, tt = l[o], H = l[s], et = tt + H, { currentMin: B, currentMax: z } = G(o);
|
|
264
|
+
let W = t + V(`${(n - e) * f}px`);
|
|
265
|
+
return W = Math.max(B, W), W = Math.min(z, W), c[o] = W, c[s] = et - W, c;
|
|
265
266
|
};
|
|
266
267
|
function ct(t, e) {
|
|
267
|
-
const { contentRect: n } = t[0], o = n[
|
|
268
|
-
s[e] = o,
|
|
268
|
+
const { contentRect: n } = t[0], o = n[u ? "height" : "width"], s = [...k];
|
|
269
|
+
s[e] = o, Q(s);
|
|
269
270
|
}
|
|
270
271
|
const i = (t) => {
|
|
271
272
|
let e = g[t].collapsible;
|
|
@@ -273,30 +274,30 @@ function jt(r, ot) {
|
|
|
273
274
|
const { prev: n, next: o } = e;
|
|
274
275
|
if (!n && !o)
|
|
275
276
|
return {};
|
|
276
|
-
if (!
|
|
277
|
+
if (!p[t])
|
|
277
278
|
return {};
|
|
278
|
-
const s = !!n || !n &&
|
|
279
|
-
return { hasPrev: s, hasNext:
|
|
279
|
+
const s = !!n || !n && p[t].next, c = !!o || !o && p[t].prev;
|
|
280
|
+
return { hasPrev: s, hasNext: c };
|
|
280
281
|
};
|
|
281
282
|
function v(t, e) {
|
|
282
283
|
var o;
|
|
283
284
|
(o = r.onMovingStart) == null || o.call(r, e), N.current = e;
|
|
284
285
|
const n = d.current[e];
|
|
285
|
-
n.moving = !0, n.startOffset = l[e], n.startPosition = h ? t.pageX : t.pageY, E(!0),
|
|
286
|
+
n.moving = !0, n.startOffset = l[e], n.startPosition = h ? t.pageX : t.pageY, E(!0), $(window, "mousemove", x), $(window, "touchmove", x), $(window, "mouseup", R), $(window, "touchend", R), $(window, "contextmenu", R), document.body.style.cursor = u ? "row-resize" : "col-resize";
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function x(t) {
|
|
288
289
|
var s;
|
|
289
|
-
const e = N.current, n = d.current[e], o = h ?
|
|
290
|
+
const e = N.current, n = d.current[e], o = h ? O.current.offsetWidth : O.current.offsetHeight;
|
|
290
291
|
if (n.moving) {
|
|
291
|
-
const
|
|
292
|
+
const c = L(
|
|
292
293
|
n.startOffset,
|
|
293
294
|
n.startPosition,
|
|
294
295
|
h ? t.pageX : t.pageY
|
|
295
296
|
);
|
|
296
|
-
|
|
297
|
+
F(c), T.current = c, (s = r == null ? void 0 : r.onMoving) == null || s.call(
|
|
297
298
|
r,
|
|
298
299
|
t,
|
|
299
|
-
|
|
300
|
+
c.map((f) => `${f * o}px`),
|
|
300
301
|
e
|
|
301
302
|
);
|
|
302
303
|
}
|
|
@@ -304,79 +305,79 @@ function jt(r, ot) {
|
|
|
304
305
|
function R() {
|
|
305
306
|
var e;
|
|
306
307
|
const t = N.current;
|
|
307
|
-
d.current[t].moving = !1, E(!1),
|
|
308
|
+
d.current[t].moving = !1, E(!1), y(window, "mousemove", x), y(window, "touchmove", x), y(window, "mouseup", R), y(window, "touchend", R), y(window, "contextmenu", R), document.body.style.cursor = "default", (e = r.onMovingEnd) == null || e.call(r, t);
|
|
308
309
|
}
|
|
309
310
|
function S(t, e, n, o) {
|
|
310
|
-
var
|
|
311
|
-
const s = e + 1,
|
|
312
|
-
let
|
|
313
|
-
n === "prev" ? (
|
|
311
|
+
var $t, yt;
|
|
312
|
+
const s = e + 1, c = [...l], f = l[e], tt = l[s], H = f + tt, et = h ? O.current.offsetWidth : O.current.offsetHeight, { currentMin: B, nextMin: z } = G(e);
|
|
313
|
+
let W = T.current[e], at = T.current[s], dt = p[e][n];
|
|
314
|
+
n === "prev" ? (tt !== z || at === z) && (W = B, at = H - B, dt = !0) : (f !== B || W === B) && (W = H - z, at = z, dt = !0), c[e] = W, c[s] = at, ($t = r == null ? void 0 : r.onMoving) == null || $t.call(
|
|
314
315
|
r,
|
|
315
316
|
t,
|
|
316
|
-
|
|
317
|
+
c.map((Bt) => `${Bt * et}px`),
|
|
317
318
|
e
|
|
318
|
-
), (
|
|
319
|
+
), (yt = r.onMovingEnd) == null || yt.call(r, e), F(c), lt(o) && o(t, e, n, dt);
|
|
319
320
|
}
|
|
320
|
-
return
|
|
321
|
-
const t =
|
|
322
|
-
|
|
323
|
-
}, [JSON.stringify(g.map((t) => t.size))]),
|
|
321
|
+
return ft(() => {
|
|
322
|
+
const t = _();
|
|
323
|
+
F(t), T.current = t;
|
|
324
|
+
}, [JSON.stringify(g.map((t) => t.size))]), Ct(nt, () => O.current, []), ft(() => {
|
|
324
325
|
const t = [];
|
|
325
326
|
l.forEach((e, n) => {
|
|
326
|
-
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin:
|
|
327
|
-
e ===
|
|
328
|
-
}),
|
|
327
|
+
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: c, nextMin: f } = G(n);
|
|
328
|
+
e === c ? o.prev = !0 : l[s] === f && (o.next = !0), t.push(o);
|
|
329
|
+
}), M(t);
|
|
329
330
|
}, [l]), /* @__PURE__ */ m(
|
|
330
|
-
|
|
331
|
+
rt,
|
|
331
332
|
{
|
|
332
|
-
...
|
|
333
|
+
...Ot(A, [
|
|
333
334
|
"onMovingStart",
|
|
334
335
|
"onPaneResize",
|
|
335
336
|
"onMoving",
|
|
336
337
|
"onMovingEnd"
|
|
337
338
|
]),
|
|
338
|
-
style:
|
|
339
|
-
className:
|
|
340
|
-
ref:
|
|
339
|
+
style: j,
|
|
340
|
+
className: Z,
|
|
341
|
+
ref: O,
|
|
341
342
|
children: g.map((t, e) => {
|
|
342
343
|
const {
|
|
343
344
|
content: n,
|
|
344
345
|
disabled: o,
|
|
345
346
|
trigger: s,
|
|
346
|
-
resizable:
|
|
347
|
-
collapsible:
|
|
348
|
-
} = t, { hasPrev:
|
|
349
|
-
return /* @__PURE__ */
|
|
347
|
+
resizable: c = !0,
|
|
348
|
+
collapsible: f = {}
|
|
349
|
+
} = t, { hasPrev: tt, hasNext: H } = i(e), et = it(f) && it(f.prev) ? f.prev : {}, B = it(f) && it(f.next) ? f.next : {};
|
|
350
|
+
return /* @__PURE__ */ ut(Wt.Fragment, { children: [
|
|
350
351
|
/* @__PURE__ */ m(
|
|
351
352
|
"div",
|
|
352
353
|
{
|
|
353
|
-
className: `${
|
|
354
|
-
style: { flexBasis:
|
|
355
|
-
ref: (
|
|
354
|
+
className: `${a}-pane`,
|
|
355
|
+
style: { flexBasis: X(e) },
|
|
356
|
+
ref: (z) => D.current[e] = z,
|
|
356
357
|
children: n
|
|
357
358
|
}
|
|
358
359
|
),
|
|
359
360
|
!o && e !== g.length - 1 && /* @__PURE__ */ m(
|
|
360
361
|
Nt,
|
|
361
362
|
{
|
|
362
|
-
className: `${
|
|
363
|
-
direction:
|
|
364
|
-
icon:
|
|
365
|
-
onResize: (
|
|
366
|
-
onMouseDown: (
|
|
363
|
+
className: `${a}-trigger`,
|
|
364
|
+
direction: u ? vt : Et,
|
|
365
|
+
icon: C,
|
|
366
|
+
onResize: (z) => ct(z, e),
|
|
367
|
+
onMouseDown: (z) => v(z, e),
|
|
367
368
|
collapsible: {
|
|
368
|
-
prev:
|
|
369
|
-
onClick: (
|
|
370
|
-
icon:
|
|
371
|
-
collapsed:
|
|
369
|
+
prev: tt ? {
|
|
370
|
+
onClick: (z) => S(z, e, "prev", et.onClick),
|
|
371
|
+
icon: et.icon,
|
|
372
|
+
collapsed: p[e].prev
|
|
372
373
|
} : void 0,
|
|
373
|
-
next:
|
|
374
|
-
onClick: (
|
|
375
|
-
icon:
|
|
376
|
-
collapsed:
|
|
374
|
+
next: H ? {
|
|
375
|
+
onClick: (z) => S(z, e, "next", B.onClick),
|
|
376
|
+
icon: B.icon,
|
|
377
|
+
collapsed: p[e].next
|
|
377
378
|
} : void 0
|
|
378
379
|
},
|
|
379
|
-
resizable:
|
|
380
|
+
resizable: c,
|
|
380
381
|
renderChildren: s
|
|
381
382
|
}
|
|
382
383
|
)
|
|
@@ -385,19 +386,19 @@ function jt(r, ot) {
|
|
|
385
386
|
}
|
|
386
387
|
);
|
|
387
388
|
}
|
|
388
|
-
const At =
|
|
389
|
+
const At = zt(Zt);
|
|
389
390
|
At.displayName = "ResizeBoxSplitGroup";
|
|
390
|
-
const Xt = "left", pt = "right", xt = "top", Rt = "bottom",
|
|
391
|
+
const Xt = "left", pt = "right", xt = "top", Rt = "bottom", qt = [
|
|
391
392
|
Xt,
|
|
392
393
|
pt,
|
|
393
394
|
xt,
|
|
394
395
|
Rt
|
|
395
|
-
],
|
|
396
|
+
], Jt = {
|
|
396
397
|
component: "div",
|
|
397
398
|
directions: ["right"],
|
|
398
399
|
resizeIcons: {},
|
|
399
400
|
resizeTriggers: {}
|
|
400
|
-
},
|
|
401
|
+
}, Kt = (r) => {
|
|
401
402
|
switch (r) {
|
|
402
403
|
case "left":
|
|
403
404
|
return "right";
|
|
@@ -407,23 +408,23 @@ const Xt = "left", pt = "right", xt = "top", Rt = "bottom", Zt = [
|
|
|
407
408
|
return r;
|
|
408
409
|
}
|
|
409
410
|
};
|
|
410
|
-
function
|
|
411
|
-
const { getPrefixCls: g, componentConfig:
|
|
411
|
+
function Qt(r, nt) {
|
|
412
|
+
const { getPrefixCls: g, componentConfig: j, rtl: q } = mt(gt), w = Yt(
|
|
412
413
|
r,
|
|
413
|
-
|
|
414
|
-
|
|
414
|
+
Jt,
|
|
415
|
+
j == null ? void 0 : j.ResizeBox
|
|
415
416
|
), {
|
|
416
|
-
style:
|
|
417
|
-
className:
|
|
418
|
-
component:
|
|
417
|
+
style: J,
|
|
418
|
+
className: C,
|
|
419
|
+
component: A,
|
|
419
420
|
directions: b,
|
|
420
|
-
resizeIcons:
|
|
421
|
-
children:
|
|
422
|
-
resizeTriggers:
|
|
421
|
+
resizeIcons: K,
|
|
422
|
+
children: ot,
|
|
423
|
+
resizeTriggers: O,
|
|
423
424
|
width: d,
|
|
424
425
|
height: D,
|
|
425
426
|
...N
|
|
426
|
-
} =
|
|
427
|
+
} = w, T = q ? b.map((i) => Kt(i)) : b, l = g("resizebox"), F = P(l, { [`${l}-rtl`]: q }, C), [I, E] = st({}), [k, Q] = Tt(void 0, { value: d }), [p, M] = Tt(void 0, { value: D }), a = Y({
|
|
427
428
|
startX: 0,
|
|
428
429
|
startY: 0,
|
|
429
430
|
startWidth: 0,
|
|
@@ -436,108 +437,110 @@ function Kt(r, ot) {
|
|
|
436
437
|
left: 0,
|
|
437
438
|
right: 0
|
|
438
439
|
}
|
|
439
|
-
}), h =
|
|
440
|
-
|
|
441
|
-
function
|
|
440
|
+
}), h = Y();
|
|
441
|
+
Ct(nt, () => h.current, []);
|
|
442
|
+
function U(i) {
|
|
442
443
|
return [xt, Rt].indexOf(i) > -1;
|
|
443
444
|
}
|
|
444
|
-
function
|
|
445
|
-
if (i === 0)
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
function u(i, v) {
|
|
446
|
+
if (i === 0)
|
|
447
|
+
return 0;
|
|
448
|
+
const x = i - v;
|
|
449
|
+
return x <= 0 ? 0 : x;
|
|
448
450
|
}
|
|
449
|
-
function
|
|
451
|
+
function Z(i) {
|
|
450
452
|
const v = "data-pqb-origin-cursor";
|
|
451
453
|
if (i)
|
|
452
454
|
document.body.setAttribute(v, document.body.style.cursor), document.body.style.cursor = i;
|
|
453
455
|
else {
|
|
454
|
-
const
|
|
455
|
-
document.body.style.cursor =
|
|
456
|
+
const x = document.body.getAttribute(v);
|
|
457
|
+
document.body.style.cursor = x || "", document.body.removeAttribute(v);
|
|
456
458
|
}
|
|
457
459
|
}
|
|
458
|
-
function
|
|
460
|
+
function rt(i, v) {
|
|
459
461
|
var e, n, o;
|
|
460
|
-
(e =
|
|
461
|
-
const { top:
|
|
462
|
-
|
|
462
|
+
(e = w.onMovingStart) == null || e.call(w), a.current.moving = !0, a.current.startX = v.pageX, a.current.startY = v.pageY, a.current.direction = i;
|
|
463
|
+
const { top: x, left: R, right: S, bottom: t } = a.current.padding;
|
|
464
|
+
a.current.startWidth = u(
|
|
463
465
|
(n = h.current) == null ? void 0 : n.clientWidth,
|
|
464
466
|
R + S
|
|
465
|
-
),
|
|
467
|
+
), a.current.startHeight = u(
|
|
466
468
|
(o = h.current) == null ? void 0 : o.clientHeight,
|
|
467
|
-
|
|
468
|
-
),
|
|
469
|
-
|
|
469
|
+
x + t
|
|
470
|
+
), $(window, "mousemove", _), $(window, "touchmove", _), $(window, "mouseup", X), $(window, "touchend", X), $(window, "contextmenu", X), Z(
|
|
471
|
+
U(i) ? "row-resize" : "col-resize"
|
|
470
472
|
);
|
|
471
473
|
}
|
|
472
|
-
function
|
|
474
|
+
function _(i) {
|
|
473
475
|
var s;
|
|
474
|
-
if (!
|
|
475
|
-
|
|
476
|
+
if (!a.current.moving)
|
|
477
|
+
return !1;
|
|
478
|
+
const { startX: v, startY: x, startWidth: R, startHeight: S } = a.current;
|
|
476
479
|
let t = R, e = S;
|
|
477
|
-
const n = i.pageX - v, o = i.pageY -
|
|
478
|
-
switch (
|
|
480
|
+
const n = i.pageX - v, o = i.pageY - x;
|
|
481
|
+
switch (a.current.direction) {
|
|
479
482
|
case Xt:
|
|
480
|
-
t = R - n,
|
|
483
|
+
t = R - n, Q(t);
|
|
481
484
|
break;
|
|
482
485
|
case pt:
|
|
483
|
-
t = R + n,
|
|
486
|
+
t = R + n, Q(t);
|
|
484
487
|
break;
|
|
485
488
|
case xt:
|
|
486
|
-
e = S - o,
|
|
489
|
+
e = S - o, M(e);
|
|
487
490
|
break;
|
|
488
491
|
case Rt:
|
|
489
|
-
e = S + o,
|
|
492
|
+
e = S + o, M(e);
|
|
490
493
|
break;
|
|
491
494
|
}
|
|
492
|
-
(s =
|
|
495
|
+
(s = w.onMoving) == null || s.call(w, i, {
|
|
493
496
|
width: t,
|
|
494
497
|
height: e
|
|
495
498
|
});
|
|
496
499
|
}
|
|
497
|
-
function
|
|
500
|
+
function X() {
|
|
498
501
|
var i;
|
|
499
|
-
|
|
502
|
+
a.current.moving = !1, V(), Z(), (i = w.onMovingEnd) == null || i.call(w);
|
|
500
503
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
504
|
+
function V() {
|
|
505
|
+
y(window, "mousemove", _), y(window, "touchmove", _), y(window, "mouseup", X), y(window, "touchend", X), y(window, "contextmenu", X);
|
|
503
506
|
}
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
+
function G(i, v) {
|
|
508
|
+
const x = U(i), { contentRect: R } = v[0], S = `${i.slice(0, 1).toUpperCase()}${i.slice(1)}`, t = R[x ? "height" : "width"];
|
|
509
|
+
a.current.padding[i] = t, E((e) => ({
|
|
507
510
|
...e,
|
|
508
511
|
[`padding${S}`]: t
|
|
509
512
|
}));
|
|
510
513
|
}
|
|
511
|
-
const
|
|
514
|
+
const L = {
|
|
512
515
|
...I,
|
|
513
|
-
...
|
|
514
|
-
...
|
|
515
|
-
...
|
|
516
|
+
...J || {},
|
|
517
|
+
...wt(k) ? { width: k } : {},
|
|
518
|
+
...wt(p) ? { height: p } : {}
|
|
516
519
|
};
|
|
517
|
-
return /* @__PURE__ */
|
|
518
|
-
|
|
520
|
+
return /* @__PURE__ */ ut(
|
|
521
|
+
A,
|
|
519
522
|
{
|
|
520
|
-
...
|
|
521
|
-
style:
|
|
522
|
-
className:
|
|
523
|
+
...Ot(N, ["onMovingStart", "onMoving", "onMovingEnd"]),
|
|
524
|
+
style: L,
|
|
525
|
+
className: F,
|
|
523
526
|
ref: h,
|
|
524
527
|
children: [
|
|
525
|
-
|
|
528
|
+
ot,
|
|
526
529
|
T.map((i) => {
|
|
527
|
-
if (
|
|
530
|
+
if (qt.indexOf(i) !== -1)
|
|
528
531
|
return /* @__PURE__ */ m(
|
|
529
532
|
Nt,
|
|
530
533
|
{
|
|
531
534
|
className: `${l}-direction-${i}`,
|
|
532
|
-
direction:
|
|
533
|
-
icon:
|
|
535
|
+
direction: U(i) ? "horizontal" : "vertical",
|
|
536
|
+
icon: K[i],
|
|
534
537
|
onMouseDown: (v) => {
|
|
535
|
-
|
|
538
|
+
rt(i, v);
|
|
536
539
|
},
|
|
537
540
|
onResize: (v) => {
|
|
538
|
-
|
|
541
|
+
G(i, v);
|
|
539
542
|
},
|
|
540
|
-
children:
|
|
543
|
+
children: O[i]
|
|
541
544
|
},
|
|
542
545
|
i
|
|
543
546
|
);
|
|
@@ -546,12 +549,12 @@ function Kt(r, ot) {
|
|
|
546
549
|
}
|
|
547
550
|
);
|
|
548
551
|
}
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
552
|
+
const te = zt(Qt), Mt = te;
|
|
553
|
+
Mt.Split = Ht;
|
|
554
|
+
Mt.SplitGroup = At;
|
|
555
|
+
Mt.displayName = "ResizeBox";
|
|
553
556
|
export {
|
|
554
557
|
Ht as ResizeBoxSplit,
|
|
555
558
|
At as ResizeBoxSplitGroup,
|
|
556
|
-
|
|
559
|
+
Mt as default
|
|
557
560
|
};
|