@unicom-cloud/ui 0.8.61 → 0.8.62
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 +1 -1
- package/Alert.js +44 -40
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +1 -1
- package/BackTop.js +7 -7
- package/Badge.js +2 -2
- package/Breadcrumb.js +22 -22
- package/Button.js +2 -2
- package/Calendar.js +106 -104
- package/Card.js +1 -1
- package/Carousel.js +34 -33
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +12 -12
- package/Comment.js +1 -1
- package/ConfigProvider.js +2 -2
- package/Copy.js +16 -16
- package/DatePicker.js +165 -162
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +9 -9
- package/Empty.js +2 -2
- package/Form.js +60 -54
- package/Grid.js +2 -2
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +2 -2
- package/Link.js +14 -14
- package/List.js +3 -3
- package/Mentions.js +3 -3
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +9 -3
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +32 -32
- package/PageHeader.js +23 -22
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +7 -7
- package/Popover.js +1 -1
- package/Progress.js +14 -14
- package/Radio.js +2 -2
- package/Rate.js +43 -40
- package/ResizeBox.js +97 -96
- package/Result.js +15 -15
- package/Select.js +1 -1
- package/SelectView.js +295 -249
- package/Skeleton.js +1 -1
- package/Slider.js +25 -25
- package/Space.js +1 -1
- package/SpeechSynthesis.js +32 -29
- package/Spin.js +2 -2
- package/Statistic.js +1 -1
- package/Steps.js +11 -11
- package/Switch.js +3 -3
- package/Table.js +9 -9
- package/Tabs.js +1 -1
- package/Tag.js +68 -67
- package/TimePicker.js +17 -17
- package/Timeline.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +47 -46
- package/Tree.js +2 -2
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/Typography.js +1 -1
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{V6euPXVB.js → -Z968QpN.js} +257 -251
- package/chunk/{IooeSKJJ.js → AqH9yP_J.js} +19 -19
- package/chunk/{cZiP8FvM.js → B0oDiPqE.js} +1 -1
- package/chunk/{B16KHtX-.js → B4-WpgY2.js} +191 -185
- package/chunk/{CuOl4X0X.js → B8SZFOjt.js} +1 -1
- package/chunk/{CbiWdbr_.js → BXWxA-tS.js} +35 -34
- package/chunk/{DpfUGhi4.js → BlNFmhNa.js} +288 -283
- package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
- package/chunk/{Kbr6FzOG.js → BnqeQYIZ.js} +210 -186
- package/chunk/{BPZ-6HKJ.js → Bp3XomF8.js} +1 -2
- package/chunk/BsWphzcT.js +20 -0
- package/chunk/{RMBPs_Ry.js → C4eJ9vCf.js} +4 -3
- package/chunk/{BNHrEI0Y.js → C6fEFlPt.js} +52 -48
- package/chunk/C8o-VGyc.js +376 -0
- package/chunk/{eK7lxdak.js → CDJ1EnJ2.js} +8 -8
- package/chunk/{C5AQWbC4.js → CHyuuVxl.js} +1 -1
- package/chunk/{B2vORJQ8.js → CJnshq6A.js} +13 -13
- package/chunk/CT1lZ7ss.js +116 -0
- package/chunk/{Bdh4XVuf.js → CV1kLw5Z.js} +290 -281
- package/chunk/{DmUhn9ib.js → CazXy0r4.js} +54 -53
- package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
- package/chunk/{BJ_7JTqC.js → D3VMG9V1.js} +1 -1
- package/chunk/{D2HkyI6A.js → DGasAUHE.js} +2 -2
- package/chunk/{YIlBPVAs.js → DRQ1v6Ux.js} +1 -1
- package/chunk/{DhBo0pPJ.js → DRp7voqz.js} +119 -118
- package/chunk/{gIbzjQ-X.js → Dtm4BmKB.js} +2 -2
- package/chunk/{BEDYCG-I.js → KchYsivk.js} +18 -18
- package/chunk/{Cbd50gx8.js → Wum88vrW.js} +33 -33
- package/chunk/{BjSHZA0m.js → mfn4EgmQ.js} +1 -1
- package/chunk/{BYhtrDV3.js → nbEvdwT0.js} +152 -148
- package/chunk/{C1D7T29r.js → qpd2axxs.js} +83 -76
- package/chunk/{BVLwPZis.js → tOFzwzpT.js} +31 -30
- package/chunk/{DSGRHf-1.js → yESVS-qX.js} +157 -156
- package/hooks/useMergeValue.js +1 -1
- package/icons.js +4 -6001
- package/index.js +420 -392
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cascader/panel/Search.d.ts +1 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/form/interface.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/message/index.d.ts +2 -2
- package/types/notification/index.d.ts +2 -2
- package/types/notification-base/index.d.ts +2 -2
- package/types/select/interface.d.ts +1 -0
- package/types/select-view/interface.d.ts +1 -0
- package/types/tree/Context.d.ts +1 -0
- package/types/tree/Tree.d.ts +1 -1
- package/types/tree/index.d.ts +5 -4
- package/types/tree/interface.d.ts +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/lodash.d.ts +14 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/caseName.js +2 -18
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +220 -191
- package/utils/is.js +68 -67
- package/utils/lodash.js +32 -6
- package/utils/reactDOM.js +1 -1
- package/chunk/-LZOUh53.js +0 -29
- package/chunk/-jdfq71f.js +0 -23
- package/chunk/B0GOLsj_.js +0 -58
- package/chunk/B7Zsp3gO.js +0 -29
- package/chunk/BDjXkzNj.js +0 -23
- package/chunk/BHn4xgbv.js +0 -209
- package/chunk/BLSiP_gg.js +0 -32
- package/chunk/BMJfSSLX.js +0 -23
- package/chunk/B_nfMl0e.js +0 -116
- package/chunk/BcS17Pzy.js +0 -66
- package/chunk/BdiEwtQO.js +0 -41
- package/chunk/Bpug_KxP.js +0 -34
- package/chunk/C1u_ckwU.js +0 -29
- package/chunk/C43Hv2Bl.js +0 -34
- package/chunk/C9vsih_D.js +0 -29
- package/chunk/CAfR2wLq.js +0 -41
- package/chunk/CAfecMDF.js +0 -46
- package/chunk/CKp4rZnD.js +0 -207
- package/chunk/CV2Aqv9q.js +0 -52
- package/chunk/CYdarMv9.js +0 -32
- package/chunk/C_S5Mdvd.js +0 -379
- package/chunk/CmB-TL7C.js +0 -46
- package/chunk/D-ER56Sf.js +0 -29
- package/chunk/D-aYnb6u.js +0 -41
- package/chunk/D3xQFJcO.js +0 -23
- package/chunk/DJcEys80.js +0 -29
- package/chunk/DLIm6rRJ.js +0 -29
- package/chunk/DOWEHtqM.js +0 -41
- package/chunk/DT37l12z.js +0 -40
- package/chunk/DW-B7npC.js +0 -23
- package/chunk/D_MTFBb0.js +0 -38
- package/chunk/Dx_5J4fO.js +0 -29
- package/chunk/Dy487FZ1.js +0 -118
- package/chunk/Uz-rNulO.js +0 -98
- package/chunk/cDZI_t6o.js +0 -52
- package/chunk/sScV-J56.js +0 -206
- package/chunk/wI2I1qb0.js +0 -23
|
@@ -8,27 +8,34 @@ import Ze from "lodash/isUndefined";
|
|
|
8
8
|
import ie, { useContext as Pe, forwardRef as Ne, createContext as At, useState as M, useRef as U, useMemo as Se, useImperativeHandle as je, useCallback as $t, useEffect as $ } from "react";
|
|
9
9
|
import { useIsFirstRender as Ut } from "../hooks/useIsFirstRender.js";
|
|
10
10
|
import { useMergeValue as Me } from "../hooks/useMergeValue.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
11
|
+
import Be from "@unicom-cloud/icons/IconUiClose";
|
|
12
|
+
import Tt from "@unicom-cloud/icons/IconUiCopy";
|
|
13
|
+
import Rt from "@unicom-cloud/icons/IconUiFullscreen";
|
|
14
|
+
import He from "@unicom-cloud/icons/IconUiLeft";
|
|
15
|
+
import zt from "@unicom-cloud/icons/IconUiLoading";
|
|
16
|
+
import Et from "@unicom-cloud/icons/IconUiOriginalSize";
|
|
17
|
+
import _e from "@unicom-cloud/icons/IconUiRight";
|
|
18
|
+
import Dt from "@unicom-cloud/icons/IconUiRotateLeft";
|
|
19
|
+
import Ot from "@unicom-cloud/icons/IconUiRotateRight";
|
|
20
|
+
import Vt from "@unicom-cloud/icons/IconUiZoomIn";
|
|
21
|
+
import Yt from "@unicom-cloud/icons/IconUiZoomOut";
|
|
22
|
+
import { d as qe, a as Ft } from "./CV1kLw5Z.js";
|
|
16
23
|
import "lodash/isEqualWith";
|
|
17
24
|
import "../utils/is.js";
|
|
18
25
|
import { A as Xt, c as Bt, a as Gt, b as Wt, d as Zt } from "./C2lIz2F9.js";
|
|
19
26
|
import "lodash/isNumber";
|
|
20
27
|
import "lodash/merge";
|
|
21
|
-
import { isServerRendering as jt, on as Ce, off as
|
|
28
|
+
import { isServerRendering as jt, on as Ce, off as ke } from "../utils/dom.js";
|
|
22
29
|
import "../hooks/useIntersectionObserver.js";
|
|
23
30
|
import { useMergeProps as Ht } from "../hooks/useMergeProps.js";
|
|
24
31
|
import { useOverflowHidden as _t } from "../hooks/useOverflowHidden.js";
|
|
25
32
|
import { findDOMNode as qt } from "../utils/reactDOM.js";
|
|
26
33
|
import { useUpdateEffect as Kt } from "../hooks/useUpdateEffect.js";
|
|
27
34
|
import Jt from "../Portal.js";
|
|
28
|
-
import { P as Ge } from "./
|
|
35
|
+
import { P as Ge } from "./Bp3XomF8.js";
|
|
29
36
|
import { y as Y } from "./BzPkh4Zv.js";
|
|
30
37
|
import { s as Qt } from "./Cb_oWoGj.js";
|
|
31
|
-
import
|
|
38
|
+
import en from "@unicom-cloud/icons/IconUiMore";
|
|
32
39
|
import tn from "../Tooltip.js";
|
|
33
40
|
import nn from "../Trigger.js";
|
|
34
41
|
const on = (s) => {
|
|
@@ -85,15 +92,15 @@ const sn = (s, t) => {
|
|
|
85
92
|
...u.filter(v)
|
|
86
93
|
], b = u.filter(
|
|
87
94
|
(f) => !N.has(f.key)
|
|
88
|
-
), X = F.sort((f,
|
|
89
|
-
const L = c.indexOf(f.key), R = c.indexOf(
|
|
95
|
+
), X = F.sort((f, I) => {
|
|
96
|
+
const L = c.indexOf(f.key), R = c.indexOf(I.key);
|
|
90
97
|
return L > R ? 1 : -1;
|
|
91
98
|
});
|
|
92
99
|
if (N.has("extra")) {
|
|
93
100
|
const f = c.indexOf("extra");
|
|
94
101
|
X.splice(f, 0, ...b);
|
|
95
102
|
}
|
|
96
|
-
const T = (f,
|
|
103
|
+
const T = (f, I = !1) => {
|
|
97
104
|
const { content: L, disabled: R, key: C, name: P, getContainer: z, onClick: E, ...j } = f, D = /* @__PURE__ */ V(
|
|
98
105
|
"div",
|
|
99
106
|
{
|
|
@@ -109,7 +116,7 @@ const sn = (s, t) => {
|
|
|
109
116
|
...j,
|
|
110
117
|
children: [
|
|
111
118
|
L && /* @__PURE__ */ i("span", { className: `${n}-toolbar-action-content`, children: L }),
|
|
112
|
-
|
|
119
|
+
I && P && /* @__PURE__ */ i("span", { className: `${n}-toolbar-action-name`, children: P })
|
|
113
120
|
]
|
|
114
121
|
},
|
|
115
122
|
C
|
|
@@ -118,16 +125,16 @@ const sn = (s, t) => {
|
|
|
118
125
|
};
|
|
119
126
|
if (!X.length) return null;
|
|
120
127
|
const Z = X.map((f) => {
|
|
121
|
-
const
|
|
128
|
+
const I = T(f, r);
|
|
122
129
|
return !r && f.name && !f.getContainer ? /* @__PURE__ */ i(
|
|
123
130
|
tn,
|
|
124
131
|
{
|
|
125
132
|
content: f.name,
|
|
126
133
|
className: `${n}-toolbar-tooltip`,
|
|
127
|
-
children:
|
|
134
|
+
children: I
|
|
128
135
|
},
|
|
129
136
|
f.key
|
|
130
|
-
) :
|
|
137
|
+
) : I;
|
|
131
138
|
});
|
|
132
139
|
return /* @__PURE__ */ V(
|
|
133
140
|
"div",
|
|
@@ -253,7 +260,7 @@ function un(s) {
|
|
|
253
260
|
setStatus: o
|
|
254
261
|
};
|
|
255
262
|
}
|
|
256
|
-
const
|
|
263
|
+
const Ie = 90, fn = {
|
|
257
264
|
maskClosable: !0,
|
|
258
265
|
closable: !0,
|
|
259
266
|
breakPoint: 316,
|
|
@@ -296,7 +303,7 @@ function mn(s, t) {
|
|
|
296
303
|
defaultVisible: T,
|
|
297
304
|
maskClosable: Z,
|
|
298
305
|
closable: f,
|
|
299
|
-
breakPoint:
|
|
306
|
+
breakPoint: I,
|
|
300
307
|
actions: L,
|
|
301
308
|
actionsLayout: R,
|
|
302
309
|
getPopupContainer: C,
|
|
@@ -310,11 +317,11 @@ function mn(s, t) {
|
|
|
310
317
|
} = v, H = o ? n.get(r) : X, [G, Q] = M(H), [h, se] = Me(!1, {
|
|
311
318
|
defaultValue: T,
|
|
312
319
|
value: v.visible
|
|
313
|
-
}), ee = Pe(qe), { getPrefixCls: l, locale: m, rtl:
|
|
314
|
-
|
|
320
|
+
}), ee = Pe(qe), { getPrefixCls: l, locale: m, rtl: k } = ee, x = l("image"), p = `${x}-preview`, d = Y(
|
|
321
|
+
p,
|
|
315
322
|
{
|
|
316
|
-
[`${
|
|
317
|
-
[`${
|
|
323
|
+
[`${p}-hide`]: !h,
|
|
324
|
+
[`${p}-rtl`]: k
|
|
318
325
|
},
|
|
319
326
|
F
|
|
320
327
|
), _ = U(), et = U(), S = U(), Le = U(), ae = U(!1), K = U({
|
|
@@ -324,8 +331,8 @@ function mn(s, t) {
|
|
|
324
331
|
originY: 0
|
|
325
332
|
}), { isLoading: tt, isLoaded: nt, setStatus: ce } = un("loading"), [ot, rt] = M(!1), [A, le] = M({ x: 0, y: 0 }), [g, ue] = M(1), [Ae, $e] = M(!1), [te, fe] = M(0), [O, Ue] = M(!1), W = Se(() => new ln(z), []), {
|
|
326
333
|
onLoad: me,
|
|
327
|
-
onError:
|
|
328
|
-
onMouseDown:
|
|
334
|
+
onError: pe,
|
|
335
|
+
onMouseDown: de,
|
|
329
336
|
style: it,
|
|
330
337
|
className: st,
|
|
331
338
|
...at
|
|
@@ -357,10 +364,10 @@ function mn(s, t) {
|
|
|
357
364
|
Ee(r + 1);
|
|
358
365
|
}
|
|
359
366
|
function ut() {
|
|
360
|
-
fe(te === 0 ? 360 -
|
|
367
|
+
fe(te === 0 ? 360 - Ie : te - Ie);
|
|
361
368
|
}
|
|
362
369
|
function ft() {
|
|
363
|
-
fe((te +
|
|
370
|
+
fe((te + Ie) % 360);
|
|
364
371
|
}
|
|
365
372
|
const we = U(null), mt = () => {
|
|
366
373
|
!Ae && $e(!0), we.current && clearTimeout(we.current), we.current = setTimeout(() => {
|
|
@@ -377,10 +384,10 @@ function mn(s, t) {
|
|
|
377
384
|
const e = W.getNextScale(g, "zoomOut");
|
|
378
385
|
oe(e);
|
|
379
386
|
}
|
|
380
|
-
function
|
|
387
|
+
function pt(e) {
|
|
381
388
|
e.deltaY > 0 ? g >= W.minScale && xe() : g <= W.maxScale && ye();
|
|
382
389
|
}
|
|
383
|
-
function
|
|
390
|
+
function dt() {
|
|
384
391
|
oe(1);
|
|
385
392
|
}
|
|
386
393
|
function gt() {
|
|
@@ -404,7 +411,7 @@ function mn(s, t) {
|
|
|
404
411
|
}
|
|
405
412
|
function wt(e) {
|
|
406
413
|
if (e && e.length) {
|
|
407
|
-
const w = e[0].contentRect.width <
|
|
414
|
+
const w = e[0].contentRect.width < I;
|
|
408
415
|
rt(w);
|
|
409
416
|
}
|
|
410
417
|
}
|
|
@@ -425,7 +432,7 @@ function mn(s, t) {
|
|
|
425
432
|
var a;
|
|
426
433
|
if (h && O) {
|
|
427
434
|
(a = e.preventDefault) == null || a.call(e);
|
|
428
|
-
const { originX: w, originY: q, pageX: be, pageY:
|
|
435
|
+
const { originX: w, originY: q, pageX: be, pageY: It } = K.current, Pt = w + (e.pageX - be) / g, St = q + (e.pageY - It) / g;
|
|
429
436
|
le({
|
|
430
437
|
x: Pt,
|
|
431
438
|
y: St
|
|
@@ -439,16 +446,16 @@ function mn(s, t) {
|
|
|
439
446
|
ce("loaded"), me == null || me(e);
|
|
440
447
|
}
|
|
441
448
|
function xt(e) {
|
|
442
|
-
ce("error"),
|
|
449
|
+
ce("error"), pe == null || pe(e);
|
|
443
450
|
}
|
|
444
451
|
const bt = (e) => {
|
|
445
452
|
var w;
|
|
446
453
|
(w = e.preventDefault) == null || w.call(e), Ue(!0);
|
|
447
454
|
const a = e.type === "touchstart" ? e.touches[0] : e;
|
|
448
|
-
K.current.pageX = a.pageX, K.current.pageY = a.pageY, K.current.originX = A.x, K.current.originY = A.y,
|
|
455
|
+
K.current.pageX = a.pageX, K.current.pageY = a.pageY, K.current.originX = A.x, K.current.originY = A.y, de == null || de(e);
|
|
449
456
|
};
|
|
450
457
|
$(() => (h && O && (Ce(document, "mousemove", Ye, !1), Ce(document, "mouseup", Fe, !1)), () => {
|
|
451
|
-
|
|
458
|
+
ke(document, "mousemove", Ye, !1), ke(document, "mouseup", Fe, !1);
|
|
452
459
|
}), [h, O]), $(() => {
|
|
453
460
|
J && !O && Ve();
|
|
454
461
|
}, [O, A]), $(() => {
|
|
@@ -481,7 +488,7 @@ function mn(s, t) {
|
|
|
481
488
|
}
|
|
482
489
|
};
|
|
483
490
|
return h && !O && !ae.current && (ae.current = !0, Ce(document, "keydown", e)), () => {
|
|
484
|
-
ae.current = !1,
|
|
491
|
+
ae.current = !1, ke(document, "keydown", e);
|
|
485
492
|
};
|
|
486
493
|
}, [h, E, O, r, g]);
|
|
487
494
|
const Ct = [
|
|
@@ -489,39 +496,39 @@ function mn(s, t) {
|
|
|
489
496
|
{
|
|
490
497
|
key: "rotateRight",
|
|
491
498
|
name: m.ImagePreview.rotateRight,
|
|
492
|
-
content: /* @__PURE__ */ i(
|
|
499
|
+
content: /* @__PURE__ */ i(Ot, {}),
|
|
493
500
|
onClick: ft
|
|
494
501
|
},
|
|
495
502
|
{
|
|
496
503
|
key: "rotateLeft",
|
|
497
504
|
name: m.ImagePreview.rotateLeft,
|
|
498
|
-
content: /* @__PURE__ */ i(
|
|
505
|
+
content: /* @__PURE__ */ i(Dt, {}),
|
|
499
506
|
onClick: ut
|
|
500
507
|
},
|
|
501
508
|
{
|
|
502
509
|
key: "zoomIn",
|
|
503
510
|
name: m.ImagePreview.zoomIn,
|
|
504
|
-
content: /* @__PURE__ */ i(
|
|
511
|
+
content: /* @__PURE__ */ i(Vt, {}),
|
|
505
512
|
onClick: ye,
|
|
506
513
|
disabled: g === W.maxScale
|
|
507
514
|
},
|
|
508
515
|
{
|
|
509
516
|
key: "zoomOut",
|
|
510
517
|
name: m.ImagePreview.zoomOut,
|
|
511
|
-
content: /* @__PURE__ */ i(
|
|
518
|
+
content: /* @__PURE__ */ i(Yt, {}),
|
|
512
519
|
onClick: xe,
|
|
513
520
|
disabled: g === W.minScale
|
|
514
521
|
},
|
|
515
522
|
{
|
|
516
523
|
key: "originalSize",
|
|
517
524
|
name: m.ImagePreview.originalSize,
|
|
518
|
-
content: /* @__PURE__ */ i(
|
|
519
|
-
onClick:
|
|
525
|
+
content: /* @__PURE__ */ i(Et, {}),
|
|
526
|
+
onClick: dt
|
|
520
527
|
},
|
|
521
528
|
{
|
|
522
529
|
key: "maximize",
|
|
523
530
|
name: "最大化",
|
|
524
|
-
content: /* @__PURE__ */ i(
|
|
531
|
+
content: /* @__PURE__ */ i(Rt, {}),
|
|
525
532
|
onClick: gt
|
|
526
533
|
},
|
|
527
534
|
!!o && {
|
|
@@ -541,7 +548,7 @@ function mn(s, t) {
|
|
|
541
548
|
{
|
|
542
549
|
key: "copy",
|
|
543
550
|
name: "复制",
|
|
544
|
-
content: /* @__PURE__ */ i(
|
|
551
|
+
content: /* @__PURE__ */ i(Tt, {}),
|
|
545
552
|
onClick: ht
|
|
546
553
|
},
|
|
547
554
|
{
|
|
@@ -558,14 +565,14 @@ function mn(s, t) {
|
|
|
558
565
|
S.current && ((a = e == null ? void 0 : e.unobserve) == null || a.call(e, S.current)), (w = e == null ? void 0 : e.disconnect) == null || w.call(e), e = null;
|
|
559
566
|
};
|
|
560
567
|
}, [S.current]);
|
|
561
|
-
const
|
|
568
|
+
const kt = () => {
|
|
562
569
|
const e = /* @__PURE__ */ i(
|
|
563
570
|
"img",
|
|
564
571
|
{
|
|
565
|
-
onWheel:
|
|
572
|
+
onWheel: pt,
|
|
566
573
|
ref: _,
|
|
567
|
-
className: Y(st, `${
|
|
568
|
-
[`${
|
|
574
|
+
className: Y(st, `${p}-img`, {
|
|
575
|
+
[`${p}-img-moving`]: O
|
|
569
576
|
}),
|
|
570
577
|
style: {
|
|
571
578
|
...it,
|
|
@@ -591,7 +598,7 @@ function mn(s, t) {
|
|
|
591
598
|
children: /* @__PURE__ */ V(
|
|
592
599
|
"div",
|
|
593
600
|
{
|
|
594
|
-
className:
|
|
601
|
+
className: d,
|
|
595
602
|
style: {
|
|
596
603
|
...b || {},
|
|
597
604
|
...lt ? {} : { zIndex: "inherit", position: "absolute" }
|
|
@@ -613,26 +620,26 @@ function mn(s, t) {
|
|
|
613
620
|
onExited: (e) => {
|
|
614
621
|
e && (e.parentNode.style.display = "", e.style.display = "none");
|
|
615
622
|
},
|
|
616
|
-
children: /* @__PURE__ */ i("div", { className: `${
|
|
623
|
+
children: /* @__PURE__ */ i("div", { className: `${p}-mask`, onClick: vt })
|
|
617
624
|
}
|
|
618
625
|
),
|
|
619
626
|
h && /* @__PURE__ */ V(
|
|
620
627
|
"div",
|
|
621
628
|
{
|
|
622
629
|
ref: S,
|
|
623
|
-
className: `${
|
|
630
|
+
className: `${p}-wrapper`,
|
|
624
631
|
onClick: De,
|
|
625
632
|
children: [
|
|
626
633
|
/* @__PURE__ */ V(
|
|
627
634
|
"div",
|
|
628
635
|
{
|
|
629
636
|
ref: et,
|
|
630
|
-
className: `${
|
|
637
|
+
className: `${p}-img-container`,
|
|
631
638
|
style: { transform: `scale(${g}, ${g})` },
|
|
632
639
|
onClick: De,
|
|
633
640
|
children: [
|
|
634
|
-
|
|
635
|
-
tt && /* @__PURE__ */ i("div", { className: `${
|
|
641
|
+
kt(),
|
|
642
|
+
tt && /* @__PURE__ */ i("div", { className: `${p}-loading`, children: /* @__PURE__ */ i(zt, {}) })
|
|
636
643
|
]
|
|
637
644
|
}
|
|
638
645
|
),
|
|
@@ -644,7 +651,7 @@ function mn(s, t) {
|
|
|
644
651
|
appear: !0,
|
|
645
652
|
classNames: "fadeImage",
|
|
646
653
|
unmountOnExit: !0,
|
|
647
|
-
children: /* @__PURE__ */ V("div", { className: `${
|
|
654
|
+
children: /* @__PURE__ */ V("div", { className: `${p}-scale-value`, children: [
|
|
648
655
|
(g * 100).toFixed(0),
|
|
649
656
|
"%"
|
|
650
657
|
] })
|
|
@@ -654,7 +661,7 @@ function mn(s, t) {
|
|
|
654
661
|
an,
|
|
655
662
|
{
|
|
656
663
|
prefixCls: x,
|
|
657
|
-
previewPrefixCls:
|
|
664
|
+
previewPrefixCls: p,
|
|
658
665
|
actions: L,
|
|
659
666
|
actionsLayout: R,
|
|
660
667
|
defaultActions: Ct,
|
|
@@ -664,7 +671,7 @@ function mn(s, t) {
|
|
|
664
671
|
f && /* @__PURE__ */ i(
|
|
665
672
|
"div",
|
|
666
673
|
{
|
|
667
|
-
className: `${
|
|
674
|
+
className: `${p}-close-btn`,
|
|
668
675
|
onClick: Oe,
|
|
669
676
|
children: /* @__PURE__ */ i(Be, {})
|
|
670
677
|
}
|
|
@@ -695,7 +702,7 @@ const Qe = Ne(
|
|
|
695
702
|
mn
|
|
696
703
|
);
|
|
697
704
|
Qe.displayName = "ImagePreview";
|
|
698
|
-
function
|
|
705
|
+
function pn(s, t) {
|
|
699
706
|
const {
|
|
700
707
|
children: o,
|
|
701
708
|
srcList: n,
|
|
@@ -714,11 +721,11 @@ function dn(s, t) {
|
|
|
714
721
|
}), f = Se(
|
|
715
722
|
() => n ? new Map(n.map((l, m) => [m, { url: l, preview: !0 }])) : null,
|
|
716
723
|
[n]
|
|
717
|
-
),
|
|
724
|
+
), I = Ut(), L = () => f ? new Map(f) : /* @__PURE__ */ new Map(), [R, C] = M(L()), P = U(), z = P.current || /* @__PURE__ */ new Map(), E = (l) => {
|
|
718
725
|
P.current = l(P.current);
|
|
719
726
|
};
|
|
720
727
|
$(() => {
|
|
721
|
-
|
|
728
|
+
I || C(L());
|
|
722
729
|
}, [f]);
|
|
723
730
|
const j = new Map(
|
|
724
731
|
Array.from(R).filter(([, { preview: l }]) => l).map(([l, { url: m }]) => [l, m])
|
|
@@ -726,26 +733,26 @@ function dn(s, t) {
|
|
|
726
733
|
value: u,
|
|
727
734
|
defaultValue: c
|
|
728
735
|
});
|
|
729
|
-
function J(l, m,
|
|
736
|
+
function J(l, m, k) {
|
|
730
737
|
return f || C(
|
|
731
738
|
(x) => new Map(x).set(l, {
|
|
732
739
|
url: m,
|
|
733
|
-
preview:
|
|
740
|
+
preview: k
|
|
734
741
|
})
|
|
735
742
|
), function() {
|
|
736
|
-
f || C((
|
|
737
|
-
const
|
|
738
|
-
return
|
|
743
|
+
f || C((p) => {
|
|
744
|
+
const d = new Map(p);
|
|
745
|
+
return d.delete(l) ? d : p;
|
|
739
746
|
});
|
|
740
747
|
};
|
|
741
748
|
}
|
|
742
749
|
function H(l, m) {
|
|
743
750
|
return E(
|
|
744
|
-
(
|
|
751
|
+
(k) => new Map(k).set(l, Lt(m) ? m : {})
|
|
745
752
|
), function() {
|
|
746
753
|
E((x) => {
|
|
747
|
-
const
|
|
748
|
-
return
|
|
754
|
+
const p = new Map(x);
|
|
755
|
+
return p.delete(l) ? p : x;
|
|
749
756
|
});
|
|
750
757
|
};
|
|
751
758
|
}
|
|
@@ -756,19 +763,19 @@ function dn(s, t) {
|
|
|
756
763
|
}
|
|
757
764
|
}));
|
|
758
765
|
const Q = (l, m) => {
|
|
759
|
-
const
|
|
760
|
-
b == null || b(l,
|
|
766
|
+
const k = Ze(m) ? T : m;
|
|
767
|
+
b == null || b(l, k), Z(l);
|
|
761
768
|
}, h = (l) => {
|
|
762
769
|
y == null || y(l), B(l);
|
|
763
770
|
}, se = (l) => {
|
|
764
771
|
let m = 0;
|
|
765
|
-
const
|
|
766
|
-
const
|
|
767
|
-
children:
|
|
768
|
-
}) :
|
|
769
|
-
return !We(x) && ie.Children.count(x) === 1 ?
|
|
772
|
+
const k = (x) => {
|
|
773
|
+
const p = ie.Children.map(x, (d) => d && d.props && d.type && d.type.displayName === "Image" ? ie.cloneElement(d, { _index: m++ }) : d && d.props && d.props.children ? ie.cloneElement(d, {
|
|
774
|
+
children: k(d.props.children)
|
|
775
|
+
}) : d);
|
|
776
|
+
return !We(x) && ie.Children.count(x) === 1 ? p[0] : p;
|
|
770
777
|
};
|
|
771
|
-
return
|
|
778
|
+
return k(l);
|
|
772
779
|
}, ee = () => {
|
|
773
780
|
const l = Array.from(j.values());
|
|
774
781
|
return l.length > 0 ? /* @__PURE__ */ i("div", { style: { display: "none" }, children: l.map((m) => /* @__PURE__ */ i("img", { src: m }, m)) }) : null;
|
|
@@ -806,12 +813,12 @@ function dn(s, t) {
|
|
|
806
813
|
}
|
|
807
814
|
);
|
|
808
815
|
}
|
|
809
|
-
const
|
|
810
|
-
|
|
816
|
+
const dn = Ne(pn);
|
|
817
|
+
dn.displayName = "ImagePreviewGroup";
|
|
811
818
|
export {
|
|
812
819
|
Qe as P,
|
|
813
820
|
on as T,
|
|
814
|
-
|
|
821
|
+
dn as a,
|
|
815
822
|
Ke as b,
|
|
816
823
|
un as u
|
|
817
824
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as K } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import j from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import q from "@unicom-cloud/icons/IconUiRight";
|
|
3
4
|
import X from "lodash/isArray";
|
|
4
5
|
import y from "lodash/isNumber";
|
|
5
6
|
import { createContext as Y, forwardRef as Z, useContext as ee, useState as re, useRef as A, useEffect as F, useMemo as te } from "react";
|
|
6
|
-
import { d as ie } from "./
|
|
7
|
+
import { d as ie } from "./CV1kLw5Z.js";
|
|
7
8
|
import { useMergeValue as se } from "../hooks/useMergeValue.js";
|
|
8
9
|
import oe from "../ResizeBox.js";
|
|
9
10
|
import { y as H } from "./BzPkh4Zv.js";
|
|
@@ -11,57 +12,57 @@ import L, { responsiveMap as ne } from "../utils/responsiveObserve.js";
|
|
|
11
12
|
const le = Y({
|
|
12
13
|
siderCollapsed: !1,
|
|
13
14
|
collapsedWidth: 64
|
|
14
|
-
}),
|
|
15
|
+
}), ce = /* @__PURE__ */ (() => {
|
|
15
16
|
let i = 0;
|
|
16
17
|
return (f = "") => (i += 1, `${f}${i}`);
|
|
17
18
|
})();
|
|
18
|
-
function
|
|
19
|
+
function de(i, f) {
|
|
19
20
|
var T;
|
|
20
21
|
const {
|
|
21
22
|
children: D,
|
|
22
23
|
className: E,
|
|
23
24
|
style: G,
|
|
24
25
|
theme: N = "light",
|
|
25
|
-
trigger:
|
|
26
|
-
reverseArrow:
|
|
26
|
+
trigger: m,
|
|
27
|
+
reverseArrow: R,
|
|
27
28
|
collapsedWidth: r = 48,
|
|
28
|
-
width:
|
|
29
|
+
width: g = 200,
|
|
29
30
|
collapsible: h,
|
|
30
|
-
resizeDirections:
|
|
31
|
+
resizeDirections: d,
|
|
31
32
|
onSiderMount: v,
|
|
32
33
|
onSiderUnmount: C,
|
|
33
|
-
breakpoint:
|
|
34
|
+
breakpoint: W,
|
|
34
35
|
onBreakpoint: O,
|
|
35
|
-
onCollapse:
|
|
36
|
+
onCollapse: a,
|
|
36
37
|
resizeBoxProps: t = {}
|
|
37
|
-
} = i,
|
|
38
|
+
} = i, _ = ce("pqb-sider-"), { getPrefixCls: P } = ee(ie), s = P("layout-sider"), [e, I] = se(!1, {
|
|
38
39
|
value: "collapsed" in i ? i.collapsed : void 0,
|
|
39
40
|
defaultValue: i.defaultCollapsed
|
|
40
|
-
}), $ = y(
|
|
41
|
+
}), $ = y(g) ? `${g}px` : String(g), Q = y(r) ? `${r}` : String(r), [p, k] = re(
|
|
41
42
|
e ? Q : $
|
|
42
43
|
), b = A(null), M = A(null);
|
|
43
44
|
M.current = {
|
|
44
|
-
breakpoint:
|
|
45
|
+
breakpoint: W,
|
|
45
46
|
collapsed: e,
|
|
46
|
-
onCollapse:
|
|
47
|
+
onCollapse: a,
|
|
47
48
|
onBreakpoint: O
|
|
48
|
-
}, F(() => (v == null || v(
|
|
49
|
+
}, F(() => (v == null || v(_), h && W in ne && (b.current = L.subscribe(
|
|
49
50
|
(o, l) => {
|
|
50
|
-
const { breakpoint:
|
|
51
|
-
if (!l || l ===
|
|
52
|
-
const u = !o[
|
|
53
|
-
u !== J && (
|
|
51
|
+
const { breakpoint: c, collapsed: J, onCollapse: S, onBreakpoint: w } = M.current;
|
|
52
|
+
if (!l || l === c) {
|
|
53
|
+
const u = !o[c];
|
|
54
|
+
u !== J && (I(u), S == null || S(u, "responsive")), w == null || w(u);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
)), () => {
|
|
57
|
-
C == null || C(
|
|
58
|
+
C == null || C(_), b.current && L.unsubscribe(b.current);
|
|
58
59
|
}), []), F(() => {
|
|
59
60
|
const o = y(r) ? `${r}px` : String(r);
|
|
60
61
|
k(e ? o : $);
|
|
61
62
|
}, [e, $, r]);
|
|
62
|
-
const x =
|
|
63
|
-
const o =
|
|
64
|
-
return h &&
|
|
63
|
+
const x = d && X(d) || ((T = t.directions) == null ? void 0 : T.length), U = x ? oe : "aside", z = () => {
|
|
64
|
+
const o = m || (e ? R ? /* @__PURE__ */ n(j, {}) : /* @__PURE__ */ n(q, {}) : R ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(j, {}));
|
|
65
|
+
return h && m !== null ? /* @__PURE__ */ n(
|
|
65
66
|
"div",
|
|
66
67
|
{
|
|
67
68
|
style: { width: p },
|
|
@@ -69,7 +70,7 @@ function ce(i, f) {
|
|
|
69
70
|
[`${s}-trigger-light`]: N === "light"
|
|
70
71
|
}),
|
|
71
72
|
onClick: () => {
|
|
72
|
-
|
|
73
|
+
I(!e), a == null || a(!e, "clickTrigger");
|
|
73
74
|
},
|
|
74
75
|
children: o
|
|
75
76
|
}
|
|
@@ -78,12 +79,12 @@ function ce(i, f) {
|
|
|
78
79
|
component: "aside",
|
|
79
80
|
...t,
|
|
80
81
|
width: p,
|
|
81
|
-
directions:
|
|
82
|
+
directions: d,
|
|
82
83
|
onMoving: (o, l) => {
|
|
83
|
-
var
|
|
84
|
-
k(`${l.width}px`), (
|
|
84
|
+
var c;
|
|
85
|
+
k(`${l.width}px`), (c = t == null ? void 0 : t.onMoving) == null || c.call(t, o, l);
|
|
85
86
|
}
|
|
86
|
-
} : {}, [x,
|
|
87
|
+
} : {}, [x, d, p, t]);
|
|
87
88
|
return /* @__PURE__ */ n(
|
|
88
89
|
le.Provider,
|
|
89
90
|
{
|
|
@@ -103,7 +104,7 @@ function ce(i, f) {
|
|
|
103
104
|
s,
|
|
104
105
|
{
|
|
105
106
|
[`${s}-light`]: N === "light",
|
|
106
|
-
[`${s}-has-trigger`]:
|
|
107
|
+
[`${s}-has-trigger`]: m !== null && h,
|
|
107
108
|
[`${s}-collapsed`]: e
|
|
108
109
|
},
|
|
109
110
|
E
|
|
@@ -118,7 +119,7 @@ function ce(i, f) {
|
|
|
118
119
|
}
|
|
119
120
|
);
|
|
120
121
|
}
|
|
121
|
-
const
|
|
122
|
+
const ae = Z(de), V = ae;
|
|
122
123
|
V.displayName = "LayoutSider";
|
|
123
124
|
V.__PQB_SIGN__ = "sider";
|
|
124
125
|
export {
|