@unicom-cloud/ui 0.8.61 → 0.8.63
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 +1021 -1008
- package/Descriptions.js +10 -10
- 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 +32 -32
- 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/{DhBo0pPJ.js → B5gIo-hD.js} +119 -118
- package/chunk/{eK7lxdak.js → B9w_puFP.js} +8 -8
- package/chunk/{RMBPs_Ry.js → BEB_A9eY.js} +4 -3
- package/chunk/{CuOl4X0X.js → BLLKKgZJ.js} +1 -1
- package/chunk/{cZiP8FvM.js → BcwdVUDs.js} +1 -1
- package/chunk/{C1xMmQIZ.js → BmO1y0vr.js} +34 -34
- package/chunk/{DmUhn9ib.js → Bn2-vqTg.js} +54 -53
- package/chunk/{Kbr6FzOG.js → BnLshM9R.js} +210 -186
- package/chunk/{BJ_7JTqC.js → BoDdbbF_.js} +1 -1
- package/chunk/BsWphzcT.js +20 -0
- package/chunk/{Bdh4XVuf.js → C5S_amaH.js} +290 -281
- package/chunk/{YIlBPVAs.js → C6Zb_-OE.js} +1 -1
- package/chunk/{CbiWdbr_.js → CAxIyiy6.js} +35 -34
- package/chunk/CD7dGcUa.js +376 -0
- package/chunk/{BPZ-6HKJ.js → CLBavO5c.js} +24 -22
- package/chunk/{B2vORJQ8.js → CZ1wrD_H.js} +13 -13
- package/chunk/{DpfUGhi4.js → CfTcP6nF.js} +288 -283
- package/chunk/{BNHrEI0Y.js → CfZWOhnc.js} +52 -48
- package/chunk/{BjSHZA0m.js → CgDayZDE.js} +1 -1
- package/chunk/{BYhtrDV3.js → Co3idurS.js} +152 -148
- package/chunk/{BBVjSFnw.js → Cqyp4qni.js} +23 -19
- package/chunk/{Cbd50gx8.js → CvlD3aiv.js} +33 -33
- package/chunk/{IooeSKJJ.js → D3dcFbex.js} +19 -19
- package/chunk/{C5AQWbC4.js → DDDuw0Zi.js} +1 -1
- package/chunk/{gIbzjQ-X.js → DXZ8-ha7.js} +2 -2
- package/chunk/{C1D7T29r.js → DbLgopUR.js} +83 -76
- package/chunk/{BVLwPZis.js → DbPYtS7-.js} +31 -30
- package/chunk/{V6euPXVB.js → Dk6hL04k.js} +257 -251
- package/chunk/{BEDYCG-I.js → Dpzgtdt-.js} +18 -18
- package/chunk/{B16KHtX-.js → JpKOcIfl.js} +191 -185
- package/chunk/{D2HkyI6A.js → QFkhCtUr.js} +11 -11
- package/chunk/aqSmxUbY.js +116 -0
- package/chunk/{DSGRHf-1.js → rlfmXePI.js} +157 -156
- package/hooks/useMergeValue.js +1 -1
- package/icons.js +4 -6001
- package/index.js +439 -393
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/locale/zh-CN.js +8 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cascader/panel/Search.d.ts +1 -1
- package/types/color-picker/hooks/useColorPicker.d.ts +3 -8
- package/types/config-provider/interface.d.ts +1 -1
- package/types/date-picker/index.d.ts +7 -0
- package/types/form/interface.d.ts +1 -1
- package/types/index.d.ts +3 -3
- package/types/locale/interface.d.ts +1 -0
- package/types/locale/zh-CN.d.ts +14 -0
- 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/space/index.d.ts +2 -1
- 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/is.d.ts +2 -0
- package/types/utils/lodash.d.ts +14 -1
- package/types/verification-code/VerificationCode.d.ts +2 -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/dayjs.js +50 -49
- package/utils/index.js +227 -185
- package/utils/is.js +125 -111
- 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
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import W, { useContext as O, useState as Oe, useRef as
|
|
3
|
-
import { d as A } from "./
|
|
1
|
+
import { jsx as i, jsxs as _, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
+
import W, { useContext as O, useState as Oe, useRef as ge, useEffect as te, forwardRef as Ae, createElement as J } from "react";
|
|
3
|
+
import { d as A } from "./C5S_amaH.js";
|
|
4
4
|
import { useMergeProps as Fe } from "../hooks/useMergeProps.js";
|
|
5
5
|
import { useMergeValue as le } from "../hooks/useMergeValue.js";
|
|
6
6
|
import { y as q } from "./BzPkh4Zv.js";
|
|
7
7
|
import { pickDataAttributes as _e } from "../utils/pick.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import Le from "@unicom-cloud/icons/IconUiLeft";
|
|
9
|
+
import Te from "@unicom-cloud/icons/IconUiMore";
|
|
10
|
+
import Ue from "@unicom-cloud/icons/IconUiRight";
|
|
10
11
|
import { useKeyboardEvent as pe } from "../hooks/useKeyboardEvent.js";
|
|
11
12
|
import Be from "lodash/isFunction";
|
|
12
13
|
import Ke from "lodash/isPlainObject";
|
|
13
14
|
import ce from "lodash/isUndefined";
|
|
14
|
-
import { I as Ve } from "./
|
|
15
|
-
import { S as fe } from "./
|
|
15
|
+
import { I as Ve } from "./Bn2-vqTg.js";
|
|
16
|
+
import { S as fe } from "./Co3idurS.js";
|
|
16
17
|
var R = /* @__PURE__ */ ((e) => (e[e.previous = 0] = "previous", e[e.next = 1] = "next", e))(R || {});
|
|
17
18
|
function De(e) {
|
|
18
19
|
var M, h, t;
|
|
19
|
-
const { locale: n } = O(A),
|
|
20
|
-
pageNum:
|
|
20
|
+
const { locale: n } = O(A), s = pe(), {
|
|
21
|
+
pageNum: a,
|
|
21
22
|
current: f,
|
|
22
23
|
rootPrefixCls: u,
|
|
23
24
|
pageItemStyle: C,
|
|
24
25
|
activePageItemStyle: r,
|
|
25
26
|
itemRender: y
|
|
26
|
-
} = e, $ = `${u}-item`, P = f ===
|
|
27
|
-
let
|
|
28
|
-
P && (
|
|
29
|
-
const k = P ? { "aria-current": !0 } : {}, v = (
|
|
27
|
+
} = e, $ = `${u}-item`, P = f === a, m = q($, P ? `${$}-active` : "");
|
|
28
|
+
let g = C;
|
|
29
|
+
P && (g = { ...g, ...r });
|
|
30
|
+
const k = P ? { "aria-current": !0 } : {}, v = (o) => {
|
|
30
31
|
const { pageNum: l, onClick: S, disabled: d } = e;
|
|
31
|
-
|
|
32
|
+
o.currentTarget.dataset.active !== "true" && (o.stopPropagation(), d || S == null || S(l));
|
|
32
33
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ i(
|
|
34
35
|
"li",
|
|
35
36
|
{
|
|
36
|
-
style:
|
|
37
|
-
className:
|
|
37
|
+
style: g,
|
|
38
|
+
className: m,
|
|
38
39
|
onClick: v,
|
|
39
40
|
tabIndex: e.disabled ? -1 : 0,
|
|
40
|
-
"aria-label": (t = (h = (M = n == null ? void 0 : n.Pagination) == null ? void 0 : M.currentPage) == null ? void 0 : h.replace) == null ? void 0 : t.call(h, "{0}",
|
|
41
|
-
...
|
|
41
|
+
"aria-label": (t = (h = (M = n == null ? void 0 : n.Pagination) == null ? void 0 : M.currentPage) == null ? void 0 : h.replace) == null ? void 0 : t.call(h, "{0}", a),
|
|
42
|
+
...s({ onPressEnter: v }),
|
|
42
43
|
...k,
|
|
43
|
-
children: y ? y(
|
|
44
|
+
children: y ? y(a, "page", a) : a
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
47
|
}
|
|
47
48
|
function ne(e, n) {
|
|
48
49
|
switch (e) {
|
|
49
50
|
case "prev":
|
|
50
|
-
return n && n.prev ? n.prev : /* @__PURE__ */
|
|
51
|
+
return n && n.prev ? n.prev : /* @__PURE__ */ i(Le, {});
|
|
51
52
|
case "next":
|
|
52
|
-
return n && n.next ? n.next : /* @__PURE__ */
|
|
53
|
+
return n && n.next ? n.next : /* @__PURE__ */ i(Ue, {});
|
|
53
54
|
case "more":
|
|
54
|
-
return n && n.more ? n.more : /* @__PURE__ */
|
|
55
|
+
return n && n.more ? n.more : /* @__PURE__ */ i(Te, {});
|
|
55
56
|
default:
|
|
56
57
|
return null;
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
const Z = (e) => {
|
|
60
|
-
var t,
|
|
61
|
+
var t, o, l, S, d, b;
|
|
61
62
|
const { locale: n } = O(A), {
|
|
62
|
-
rootPrefixCls:
|
|
63
|
-
current:
|
|
63
|
+
rootPrefixCls: s,
|
|
64
|
+
current: a,
|
|
64
65
|
allPages: f,
|
|
65
66
|
jumpPage: u,
|
|
66
67
|
icons: C,
|
|
67
68
|
disabled: r,
|
|
68
69
|
pageItemStyle: y,
|
|
69
70
|
itemRender: $
|
|
70
|
-
} = e, P = f > 0 ? 1 : 0,
|
|
71
|
+
} = e, P = f > 0 ? 1 : 0, m = Math.min(f, Math.max(P, a + u)), g = `${s}-item ${s}-item-jumper`, k = q(g), v = () => {
|
|
71
72
|
var L;
|
|
72
|
-
!r && ((L = e.onClick) == null || L.call(e,
|
|
73
|
-
}, M = ne("more", C), h = u > 0 ? (l = (
|
|
74
|
-
return /* @__PURE__ */
|
|
73
|
+
!r && ((L = e.onClick) == null || L.call(e, m));
|
|
74
|
+
}, M = ne("more", C), h = u > 0 ? (l = (o = (t = n == null ? void 0 : n.Pagination) == null ? void 0 : t.nextSomePages) == null ? void 0 : o.replace) == null ? void 0 : l.call(o, "{0}", u) : (b = (d = (S = n == null ? void 0 : n.Pagination) == null ? void 0 : S.prevSomePages) == null ? void 0 : d.replace) == null ? void 0 : b.call(d, "{0}", -u);
|
|
75
|
+
return /* @__PURE__ */ i(
|
|
75
76
|
"li",
|
|
76
77
|
{
|
|
77
78
|
style: y,
|
|
@@ -82,7 +83,7 @@ const Z = (e) => {
|
|
|
82
83
|
}
|
|
83
84
|
);
|
|
84
85
|
}, D = (e) => {
|
|
85
|
-
const { locale: n, rtl:
|
|
86
|
+
const { locale: n, rtl: s } = O(A), a = pe(), {
|
|
86
87
|
rootPrefixCls: f,
|
|
87
88
|
current: u,
|
|
88
89
|
allPages: C,
|
|
@@ -90,20 +91,20 @@ const Z = (e) => {
|
|
|
90
91
|
icons: y,
|
|
91
92
|
disabled: $,
|
|
92
93
|
pageItemStyle: P,
|
|
93
|
-
itemRender:
|
|
94
|
-
} = e,
|
|
94
|
+
itemRender: m
|
|
95
|
+
} = e, g = `${f}-item`, [k, v] = s ? ["next", "prev"] : ["prev", "next"], M = ne(r === 0 ? k : v, y);
|
|
95
96
|
let h = !1;
|
|
96
97
|
C === 0 ? h = !0 : r === 0 ? h = u <= 1 : h = u === C;
|
|
97
98
|
const t = $ || h;
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
const l = r === 0 ? "prev" : "next", S = q(
|
|
101
|
-
[`${
|
|
99
|
+
let o = u + (r === 0 ? -1 : 1);
|
|
100
|
+
o = Math.max(0, Math.min(C, o));
|
|
101
|
+
const l = r === 0 ? "prev" : "next", S = q(g, `${g}-${l}`, {
|
|
102
|
+
[`${g}-disabled`]: t
|
|
102
103
|
}), d = () => {
|
|
103
104
|
var b;
|
|
104
|
-
t || (b = e.onClick) == null || b.call(e,
|
|
105
|
+
t || (b = e.onClick) == null || b.call(e, o);
|
|
105
106
|
};
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ i(
|
|
107
108
|
"li",
|
|
108
109
|
{
|
|
109
110
|
style: P,
|
|
@@ -111,60 +112,60 @@ const Z = (e) => {
|
|
|
111
112
|
onClick: d,
|
|
112
113
|
tabIndex: t ? -1 : 0,
|
|
113
114
|
"aria-label": n.Pagination[l],
|
|
114
|
-
...
|
|
115
|
+
...a({
|
|
115
116
|
onPressEnter: d
|
|
116
117
|
}),
|
|
117
|
-
children:
|
|
118
|
+
children: m ? m(void 0, l, M) : M
|
|
118
119
|
}
|
|
119
120
|
);
|
|
120
121
|
}, G = W.memo(De);
|
|
121
122
|
function ue(e) {
|
|
122
123
|
var h, t;
|
|
123
|
-
const n = e.simple ? e.current : void 0, { locale:
|
|
124
|
+
const n = e.simple ? e.current : void 0, { locale: s } = O(A), [a, f] = Oe(n), u = ge();
|
|
124
125
|
te(() => {
|
|
125
126
|
e.simple && f(e.current);
|
|
126
127
|
}, [e.simple, e.current]);
|
|
127
|
-
const C = (
|
|
128
|
-
const l = parseInt(
|
|
128
|
+
const C = (o) => {
|
|
129
|
+
const l = parseInt(o, 10);
|
|
129
130
|
f(isNaN(l) ? void 0 : l);
|
|
130
131
|
}, r = () => {
|
|
131
|
-
const { onPageChange:
|
|
132
|
-
if (ce(
|
|
132
|
+
const { onPageChange: o, totalPages: l, current: S, simple: d } = e;
|
|
133
|
+
if (ce(a))
|
|
133
134
|
return;
|
|
134
|
-
if (
|
|
135
|
+
if (a === S) {
|
|
135
136
|
d || f(void 0);
|
|
136
137
|
return;
|
|
137
138
|
}
|
|
138
|
-
let b = isNaN(Number(
|
|
139
|
-
b < 1 ? b = 1 : b > l && (b = l), f(d ? b : void 0), Be(
|
|
139
|
+
let b = isNaN(Number(a)) ? S : Number(a);
|
|
140
|
+
b < 1 ? b = 1 : b > l && (b = l), f(d ? b : void 0), Be(o) && o(b);
|
|
140
141
|
}, y = () => {
|
|
141
|
-
const
|
|
142
|
-
String(
|
|
143
|
-
}, { rootPrefixCls: $, totalPages: P, simple:
|
|
142
|
+
const o = u.current.dom;
|
|
143
|
+
String(a) && o && o.setSelectionRange(0, String(a).length);
|
|
144
|
+
}, { rootPrefixCls: $, totalPages: P, simple: m, size: g, disabled: k } = e, v = `${$}-jumper`, M = {
|
|
144
145
|
showJumper: !0,
|
|
145
|
-
...Ke(
|
|
146
|
+
...Ke(m) ? m : {}
|
|
146
147
|
};
|
|
147
148
|
return /* @__PURE__ */ _("div", { className: `${v}`, children: [
|
|
148
|
-
!
|
|
149
|
-
M.showJumper ? /* @__PURE__ */
|
|
149
|
+
!m && /* @__PURE__ */ i("span", { className: `${v}-text-goto`, children: (h = s == null ? void 0 : s.Pagination) == null ? void 0 : h.goto }),
|
|
150
|
+
M.showJumper ? /* @__PURE__ */ i(
|
|
150
151
|
Ve,
|
|
151
152
|
{
|
|
152
153
|
_ignorePropsFromGlobal: !0,
|
|
153
|
-
ref: (
|
|
154
|
+
ref: (o) => u.current = o,
|
|
154
155
|
className: `${v}-input`,
|
|
155
|
-
value: ce(
|
|
156
|
-
size:
|
|
156
|
+
value: ce(a) ? void 0 : a.toString(),
|
|
157
|
+
size: g,
|
|
157
158
|
disabled: k || !P,
|
|
158
159
|
onChange: C,
|
|
159
160
|
onPressEnter: r,
|
|
160
161
|
onFocus: y,
|
|
161
162
|
onBlur: r
|
|
162
163
|
}
|
|
163
|
-
) : /* @__PURE__ */
|
|
164
|
-
!
|
|
165
|
-
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
164
|
+
) : /* @__PURE__ */ i("span", { children: a }),
|
|
165
|
+
!m && /* @__PURE__ */ i("span", { className: `${v}-text-goto-suffix`, children: (t = s == null ? void 0 : s.Pagination) == null ? void 0 : t.page }),
|
|
166
|
+
m && /* @__PURE__ */ _(Je, { children: [
|
|
167
|
+
/* @__PURE__ */ i("span", { className: `${v}-separator`, children: "/" }),
|
|
168
|
+
/* @__PURE__ */ i("span", { children: P })
|
|
168
169
|
] })
|
|
169
170
|
] });
|
|
170
171
|
}
|
|
@@ -172,8 +173,8 @@ const Ge = () => {
|
|
|
172
173
|
}, We = fe.Option, qe = [10, 20, 30, 40, 50];
|
|
173
174
|
function He(e) {
|
|
174
175
|
var P;
|
|
175
|
-
const n =
|
|
176
|
-
onPageSizeChange:
|
|
176
|
+
const n = ge(null), { locale: s } = O(A), {
|
|
177
|
+
onPageSizeChange: a = Ge,
|
|
177
178
|
rootPrefixCls: f,
|
|
178
179
|
sizeOptions: u = qe,
|
|
179
180
|
pageSize: C = 10,
|
|
@@ -181,26 +182,26 @@ function He(e) {
|
|
|
181
182
|
selectProps: y,
|
|
182
183
|
disabled: $
|
|
183
184
|
} = e;
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
+
return /* @__PURE__ */ i(
|
|
185
186
|
"div",
|
|
186
187
|
{
|
|
187
188
|
ref: n,
|
|
188
189
|
className: `${f}-option`,
|
|
189
|
-
"aria-label": (P =
|
|
190
|
-
children: /* @__PURE__ */
|
|
190
|
+
"aria-label": (P = s == null ? void 0 : s.Pagination) == null ? void 0 : P.pageSize,
|
|
191
|
+
children: /* @__PURE__ */ i(
|
|
191
192
|
fe,
|
|
192
193
|
{
|
|
193
194
|
value: u.indexOf(C) !== -1 ? C : u[0],
|
|
194
|
-
onChange: (
|
|
195
|
-
|
|
195
|
+
onChange: (m) => {
|
|
196
|
+
a(m);
|
|
196
197
|
},
|
|
197
198
|
size: r,
|
|
198
199
|
getPopupContainer: () => n.current,
|
|
199
200
|
disabled: $,
|
|
200
201
|
...y,
|
|
201
|
-
children: u.map((
|
|
202
|
-
var
|
|
203
|
-
return /* @__PURE__ */
|
|
202
|
+
children: u.map((m) => {
|
|
203
|
+
var g;
|
|
204
|
+
return /* @__PURE__ */ i(We, { value: m, children: `${m} ${(g = s == null ? void 0 : s.Pagination) == null ? void 0 : g.countPerPage}` }, m);
|
|
204
205
|
})
|
|
205
206
|
}
|
|
206
207
|
)
|
|
@@ -212,10 +213,10 @@ function ee(e = de, n) {
|
|
|
212
213
|
return Math.ceil(n / e);
|
|
213
214
|
}
|
|
214
215
|
function Ye(e, n) {
|
|
215
|
-
const
|
|
216
|
-
return Math.min(f,
|
|
216
|
+
const a = Math.floor(n / 2) - 1, f = Math.max(e, 0);
|
|
217
|
+
return Math.min(f, a);
|
|
217
218
|
}
|
|
218
|
-
function
|
|
219
|
+
function me(e) {
|
|
219
220
|
return e && e.length ? e[0] : de;
|
|
220
221
|
}
|
|
221
222
|
const Ze = {
|
|
@@ -224,10 +225,10 @@ const Ze = {
|
|
|
224
225
|
bufferSize: 2
|
|
225
226
|
};
|
|
226
227
|
function et(e, n) {
|
|
227
|
-
var
|
|
228
|
+
var ie, K, ae;
|
|
228
229
|
const {
|
|
229
|
-
getPrefixCls:
|
|
230
|
-
size:
|
|
230
|
+
getPrefixCls: s,
|
|
231
|
+
size: a,
|
|
231
232
|
locale: f,
|
|
232
233
|
componentConfig: u,
|
|
233
234
|
rtl: C
|
|
@@ -239,23 +240,23 @@ function et(e, n) {
|
|
|
239
240
|
total: y,
|
|
240
241
|
pageSize: $,
|
|
241
242
|
current: P,
|
|
242
|
-
showMore:
|
|
243
|
-
sizeOptions:
|
|
243
|
+
showMore: m,
|
|
244
|
+
sizeOptions: g,
|
|
244
245
|
pageSizeChangeResetCurrent: k,
|
|
245
246
|
defaultCurrent: v,
|
|
246
247
|
defaultPageSize: M,
|
|
247
248
|
pageOption: h = {}
|
|
248
249
|
// 潘启宝添加
|
|
249
|
-
} = r, [t,
|
|
250
|
+
} = r, [t, o] = le(Xe, {
|
|
250
251
|
defaultValue: v,
|
|
251
252
|
value: P
|
|
252
253
|
}), [l, S] = le(
|
|
253
|
-
|
|
254
|
+
me(g),
|
|
254
255
|
{
|
|
255
256
|
defaultValue: M,
|
|
256
257
|
value: $
|
|
257
258
|
}
|
|
258
|
-
), d = y, b = !!
|
|
259
|
+
), d = y, b = !!m;
|
|
259
260
|
P && !r.onChange && console.warn(
|
|
260
261
|
"Warning: you have provide current prop for pagination but without onChange handler , this will cause no-change when you change page. "
|
|
261
262
|
);
|
|
@@ -264,13 +265,13 @@ function et(e, n) {
|
|
|
264
265
|
return t > p ? p : t;
|
|
265
266
|
}
|
|
266
267
|
te(() => {
|
|
267
|
-
if (
|
|
268
|
-
const z =
|
|
268
|
+
if (g && !g.includes(l)) {
|
|
269
|
+
const z = me(g);
|
|
269
270
|
"pageSize" in r || S(z);
|
|
270
271
|
}
|
|
271
|
-
}, [
|
|
272
|
+
}, [g]), te(() => {
|
|
272
273
|
const c = L(l, d);
|
|
273
|
-
c !== t && !("current" in r) &&
|
|
274
|
+
c !== t && !("current" in r) && o(c);
|
|
274
275
|
}, [d, t, l]);
|
|
275
276
|
const re = (c = t, z = l) => {
|
|
276
277
|
const { onChange: p } = r;
|
|
@@ -279,9 +280,9 @@ function et(e, n) {
|
|
|
279
280
|
const { onPageSizeChange: z } = r, p = ee(c, d), N = {
|
|
280
281
|
pageSize: c
|
|
281
282
|
};
|
|
282
|
-
k ? N.current = 1 : N.current = t > p ? p : t, "pageSize" in r || S(N.pageSize), !("current" in r) && t !== N.current &&
|
|
283
|
+
k ? N.current = 1 : N.current = t > p ? p : t, "pageSize" in r || S(N.pageSize), !("current" in r) && t !== N.current && o(N.current), z == null || z(c, N.current), re(k ? 1 : N.current, c);
|
|
283
284
|
}, H = (c) => {
|
|
284
|
-
"current" in r ||
|
|
285
|
+
"current" in r || o(c), re(c);
|
|
285
286
|
}, {
|
|
286
287
|
className: he,
|
|
287
288
|
style: xe,
|
|
@@ -297,8 +298,8 @@ function et(e, n) {
|
|
|
297
298
|
icons: ye,
|
|
298
299
|
disabled: F,
|
|
299
300
|
itemRender: $e,
|
|
300
|
-
hideOnSinglePage:
|
|
301
|
-
} = r,
|
|
301
|
+
hideOnSinglePage: we
|
|
302
|
+
} = r, Ie = r.size || a, x = s("pagination"), B = ze ? "mini" : Ie, Me = q(
|
|
302
303
|
x,
|
|
303
304
|
`${x}-size-${B}`,
|
|
304
305
|
{
|
|
@@ -309,15 +310,15 @@ function et(e, n) {
|
|
|
309
310
|
he
|
|
310
311
|
);
|
|
311
312
|
let X;
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
313
|
+
const w = [], I = ee(l, d), E = Ye(r.bufferSize, I);
|
|
314
|
+
if (we && I <= 1)
|
|
314
315
|
return null;
|
|
315
316
|
const j = {
|
|
316
317
|
onClick: H,
|
|
317
318
|
rootPrefixCls: x,
|
|
318
319
|
simple: U,
|
|
319
320
|
current: t,
|
|
320
|
-
allPages:
|
|
321
|
+
allPages: I,
|
|
321
322
|
icons: ye,
|
|
322
323
|
disabled: F,
|
|
323
324
|
pageItemStyle: Ce,
|
|
@@ -327,13 +328,13 @@ function et(e, n) {
|
|
|
327
328
|
if (U) {
|
|
328
329
|
const c = `${x}-item-simple`;
|
|
329
330
|
X = /* @__PURE__ */ _("ul", { className: `${x}-list`, children: [
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ i(D, { ...j, type: R.previous }, "previous"),
|
|
332
|
+
/* @__PURE__ */ i("li", { className: `${c}-pager`, children: /* @__PURE__ */ i(
|
|
332
333
|
ue,
|
|
333
334
|
{
|
|
334
335
|
disabled: F,
|
|
335
336
|
rootPrefixCls: x,
|
|
336
|
-
totalPages:
|
|
337
|
+
totalPages: I,
|
|
337
338
|
current: t,
|
|
338
339
|
onPageChange: H,
|
|
339
340
|
simple: {
|
|
@@ -342,21 +343,21 @@ function et(e, n) {
|
|
|
342
343
|
size: B
|
|
343
344
|
}
|
|
344
345
|
) }),
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ i(D, { ...j, type: R.next }, "next")
|
|
346
347
|
] });
|
|
347
348
|
} else {
|
|
348
|
-
const c = 3 + E, z =
|
|
349
|
+
const c = 3 + E, z = I - 2 - E;
|
|
349
350
|
if (
|
|
350
351
|
// beginPage(1 page) + bufferSize * 2 + endPage(1 page) + ...(2 pages)
|
|
351
|
-
|
|
352
|
+
I <= 4 + E * 2 || t === c && t === z
|
|
352
353
|
)
|
|
353
|
-
for (let p = 1; p <=
|
|
354
|
-
|
|
354
|
+
for (let p = 1; p <= I; p++)
|
|
355
|
+
w.push(/* @__PURE__ */ J(G, { ...j, key: p, pageNum: p }));
|
|
355
356
|
else {
|
|
356
|
-
let p = 1, N =
|
|
357
|
-
t > c && t < z ? (N = t + E, p = t - E) : t <= c ? (
|
|
357
|
+
let p = 1, N = I, oe = !0, se = !0;
|
|
358
|
+
t > c && t < z ? (N = t + E, p = t - E) : t <= c ? (oe = !1, p = 1, N = Math.max(c, E + t)) : t >= z && (se = !1, N = I, p = Math.min(z, t - E));
|
|
358
359
|
for (let V = p; V <= N; V++)
|
|
359
|
-
|
|
360
|
+
w.push(/* @__PURE__ */ i(G, { pageNum: V, ...j }, V));
|
|
360
361
|
const je = /* @__PURE__ */ J(
|
|
361
362
|
Z,
|
|
362
363
|
{
|
|
@@ -373,33 +374,33 @@ function et(e, n) {
|
|
|
373
374
|
type: R.next,
|
|
374
375
|
jumpPage: E * 2 + 1
|
|
375
376
|
}
|
|
376
|
-
), Ee = /* @__PURE__ */
|
|
377
|
-
|
|
377
|
+
), Ee = /* @__PURE__ */ i(G, { pageNum: 1, ...j }, 1), Re = /* @__PURE__ */ J(G, { ...j, key: I, pageNum: I });
|
|
378
|
+
oe && (w[0] = W.cloneElement(w[0], {
|
|
378
379
|
className: `${x}-item-after-pre`
|
|
379
|
-
}),
|
|
380
|
-
|
|
380
|
+
}), w.unshift(je), w.unshift(Ee)), se && (w[w.length - 1] = W.cloneElement(
|
|
381
|
+
w[w.length - 1],
|
|
381
382
|
{
|
|
382
383
|
className: `${x}-item-before-next`
|
|
383
384
|
}
|
|
384
|
-
),
|
|
385
|
+
), w.push(ke), w.push(Re));
|
|
385
386
|
}
|
|
386
387
|
X = /* @__PURE__ */ _("ul", { className: `${x}-list`, children: [
|
|
387
388
|
/* @__PURE__ */ J(D, { ...j, key: "previous", type: R.previous }),
|
|
388
|
-
|
|
389
|
+
w,
|
|
389
390
|
b && /* @__PURE__ */ J(
|
|
390
391
|
Z,
|
|
391
392
|
{
|
|
392
393
|
...j,
|
|
393
|
-
key:
|
|
394
|
+
key: I + 1,
|
|
394
395
|
type: R.next,
|
|
395
396
|
jumpPage: E * 2 + 1
|
|
396
397
|
}
|
|
397
398
|
),
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ i(D, { ...j, type: R.next }, "next")
|
|
399
400
|
] });
|
|
400
401
|
}
|
|
401
402
|
let Y = null;
|
|
402
|
-
return typeof T == "boolean" && T && (Y = /* @__PURE__ */
|
|
403
|
+
return typeof T == "boolean" && T && (Y = /* @__PURE__ */ i("div", { className: `${x}-total-text`, children: (ae = (K = (ie = f == null ? void 0 : f.Pagination) == null ? void 0 : ie.total) == null ? void 0 : K.replace) == null ? void 0 : ae.call(K, "{0}", d) })), typeof T == "function" && (Y = /* @__PURE__ */ i("div", { className: `${x}-total-text`, children: T(d, [(t - 1) * l + 1, t * l]) })), /* @__PURE__ */ _(
|
|
403
404
|
"div",
|
|
404
405
|
{
|
|
405
406
|
..._e(r),
|
|
@@ -409,7 +410,7 @@ function et(e, n) {
|
|
|
409
410
|
children: [
|
|
410
411
|
Y,
|
|
411
412
|
X,
|
|
412
|
-
!!h && /* @__PURE__ */
|
|
413
|
+
!!h && /* @__PURE__ */ i(
|
|
413
414
|
Qe,
|
|
414
415
|
{
|
|
415
416
|
disabled: F,
|
|
@@ -422,12 +423,12 @@ function et(e, n) {
|
|
|
422
423
|
selectProps: Ne
|
|
423
424
|
}
|
|
424
425
|
),
|
|
425
|
-
!U && Q && /* @__PURE__ */
|
|
426
|
+
!U && Q && /* @__PURE__ */ i(
|
|
426
427
|
ue,
|
|
427
428
|
{
|
|
428
429
|
disabled: F,
|
|
429
430
|
rootPrefixCls: x,
|
|
430
|
-
totalPages:
|
|
431
|
+
totalPages: I,
|
|
431
432
|
current: t,
|
|
432
433
|
onPageChange: H,
|
|
433
434
|
size: B
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as b, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as b, jsxs as E, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import q from "@unicom-cloud/icons/IconUiCheck";
|
|
3
|
+
import B from "@unicom-cloud/icons/IconUiMinus";
|
|
4
|
+
import I from "lodash/isFunction";
|
|
5
5
|
import J from "lodash/isNil";
|
|
6
6
|
import G, { createContext as K, useState as j, useContext as R, useCallback as F, useMemo as M, useRef as Q, useEffect as X } from "react";
|
|
7
|
-
import { d as U, I as Y } from "./
|
|
7
|
+
import { d as U, I as Y } from "./C5S_amaH.js";
|
|
8
8
|
import { useMergeProps as Z } from "../hooks/useMergeProps.js";
|
|
9
9
|
import { useMergeValue as z } from "../hooks/useMergeValue.js";
|
|
10
10
|
import { y as D } from "./BzPkh4Zv.js";
|
|
@@ -176,7 +176,7 @@ function ce(t, g) {
|
|
|
176
176
|
), T = G.useCallback(
|
|
177
177
|
(m) => {
|
|
178
178
|
var N;
|
|
179
|
-
|
|
179
|
+
I(r.children) && (m.preventDefault(), i.current && i.current.click()), (N = c.onClick) == null || N.call(c, m);
|
|
180
180
|
},
|
|
181
181
|
[r.children, c.onClick]
|
|
182
182
|
), O = { strokeWidth: 10 };
|
|
@@ -196,7 +196,7 @@ function ce(t, g) {
|
|
|
196
196
|
className: `${s}-mask-icon`,
|
|
197
197
|
style: { ...O }
|
|
198
198
|
}
|
|
199
|
-
)), /* @__PURE__ */
|
|
199
|
+
)), /* @__PURE__ */ E(
|
|
200
200
|
"label",
|
|
201
201
|
{
|
|
202
202
|
ref: g,
|
|
@@ -218,7 +218,7 @@ function ce(t, g) {
|
|
|
218
218
|
type: "checkbox"
|
|
219
219
|
}
|
|
220
220
|
),
|
|
221
|
-
|
|
221
|
+
I(x) ? x({ checked: o, indeterminate: l }) : /* @__PURE__ */ E(W, { children: [
|
|
222
222
|
/* @__PURE__ */ b(
|
|
223
223
|
Y,
|
|
224
224
|
{
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs as w, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import U from "@unicom-cloud/icons/IconUiCaretLeft";
|
|
3
|
+
import L from "@unicom-cloud/icons/IconUiCaretRight";
|
|
3
4
|
import V from "lodash/isFunction";
|
|
4
5
|
import M, { useContext as K, useRef as A, createContext as B } from "react";
|
|
5
|
-
import { d as T, I as S } from "./
|
|
6
|
+
import { d as T, I as S } from "./C5S_amaH.js";
|
|
6
7
|
import { useMergeProps as q } from "../hooks/useMergeProps.js";
|
|
7
8
|
import { useMergeValue as D } from "../hooks/useMergeValue.js";
|
|
8
9
|
import { y as u } from "./BzPkh4Zv.js";
|
|
9
10
|
import G from "../utils/omit.js";
|
|
10
|
-
import { h as J } from "./
|
|
11
|
+
import { h as J } from "./CLBavO5c.js";
|
|
11
12
|
import { useKeyboardEvent as Q } from "../hooks/useKeyboardEvent.js";
|
|
12
13
|
import { off as W, on as X } from "../utils/dom.js";
|
|
13
14
|
function Y(l, g) {
|
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as z, Fragment as O } from "react/jsx-runtime";
|
|
|
2
2
|
import j from "lodash/isFunction";
|
|
3
3
|
import w from "lodash/isNil";
|
|
4
4
|
import B, { createContext as H, useContext as G, useRef as L } from "react";
|
|
5
|
-
import { d as A, I as Q } from "./
|
|
5
|
+
import { d as A, I as Q } from "./C5S_amaH.js";
|
|
6
6
|
import { useMergeProps as D } from "../hooks/useMergeProps.js";
|
|
7
7
|
import { useMergeValue as F } from "../hooks/useMergeValue.js";
|
|
8
8
|
import { y as I } from "./BzPkh4Zv.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as z } from "react/jsx-runtime";
|
|
|
2
2
|
import Q from "lodash/isNumber";
|
|
3
3
|
import U from "lodash/isPlainObject";
|
|
4
4
|
import { createContext as L, forwardRef as T, useContext as H, useMemo as W, useState as X, useRef as Y, useEffect as Z } from "react";
|
|
5
|
-
import { d as D } from "./
|
|
5
|
+
import { d as D } from "./C5S_amaH.js";
|
|
6
6
|
import { useMergeProps as F } from "../hooks/useMergeProps.js";
|
|
7
7
|
import { y as q } from "./BzPkh4Zv.js";
|
|
8
8
|
import _ from "../utils/omit.js";
|