@unicom-cloud/ui 0.8.60 → 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 +994 -991
- 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/table/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
|
@@ -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 "./CV1kLw5Z.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 "./CazXy0r4.js";
|
|
16
|
+
import { S as fe } from "./nbEvdwT0.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,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as z, Fragment as F, jsx as C } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import O from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import tt from "lodash/isFunction";
|
|
4
4
|
import ot, { useRef as N, useState as A, useImperativeHandle as et, useEffect as T } from "react";
|
|
5
5
|
import { useKeyboardEvent as nt } from "../hooks/useKeyboardEvent.js";
|
|
6
|
-
import { I as rt } from "./
|
|
6
|
+
import { I as rt } from "./CV1kLw5Z.js";
|
|
7
7
|
import { y as V } from "./BzPkh4Zv.js";
|
|
8
8
|
import it from "../utils/fillNBSP.js";
|
|
9
9
|
import "../utils/is.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as q, jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import oe from "@unicom-cloud/icons/IconUiClose";
|
|
3
3
|
import U from "lodash/isArray";
|
|
4
4
|
import { forwardRef as fe, useContext as te, useRef as b, useState as se, useImperativeHandle as ne } from "react";
|
|
5
|
-
import { d as re, I as me } from "./
|
|
5
|
+
import { d as re, I as me } from "./CV1kLw5Z.js";
|
|
6
6
|
import { y as G } from "./BzPkh4Zv.js";
|
|
7
7
|
import { E as ie, T as Ne } from "./C2lIz2F9.js";
|
|
8
8
|
import $e from "../utils/omit.js";
|
|
@@ -25,16 +25,16 @@ function ue({
|
|
|
25
25
|
suffixIcon: D,
|
|
26
26
|
prefix: d,
|
|
27
27
|
onChange: w,
|
|
28
|
-
popupVisible:
|
|
28
|
+
popupVisible: T,
|
|
29
29
|
isPlaceholder: B,
|
|
30
30
|
inputProps: c,
|
|
31
|
-
...
|
|
31
|
+
...x
|
|
32
32
|
}, R) {
|
|
33
33
|
const {
|
|
34
34
|
getPrefixCls: t,
|
|
35
35
|
size: K,
|
|
36
|
-
locale:
|
|
37
|
-
rtl:
|
|
36
|
+
locale: E,
|
|
37
|
+
rtl: I
|
|
38
38
|
} = te(re), O = b(null), [P, H] = se(!1), p = F || K, u = b(null);
|
|
39
39
|
ne(R, () => ({
|
|
40
40
|
focus() {
|
|
@@ -56,8 +56,8 @@ function ue({
|
|
|
56
56
|
(n = c == null ? void 0 : c.onChange) == null || n.call(c, f), w == null || w(f);
|
|
57
57
|
}
|
|
58
58
|
let h = "";
|
|
59
|
-
z !== void 0 ? h = z : N && !U(N) && (h = typeof v == "function" ? v(N) : N.locale(
|
|
60
|
-
const M = _ ? {} : { readOnly: !0 }, s = V || t("picker"), C = Y || ($ ? "error" : void 0), W = P ||
|
|
59
|
+
z !== void 0 ? h = z : N && !U(N) && (h = typeof v == "function" ? v(N) : N.locale(E.dayjsLocale).format(v));
|
|
60
|
+
const M = _ ? {} : { readOnly: !0 }, s = V || t("picker"), C = Y || ($ ? "error" : void 0), W = P || T, A = G(
|
|
61
61
|
s,
|
|
62
62
|
`${s}-size-${p}`,
|
|
63
63
|
{
|
|
@@ -65,7 +65,7 @@ function ue({
|
|
|
65
65
|
[`${s}-disabled`]: k,
|
|
66
66
|
[`${s}-has-prefix`]: d,
|
|
67
67
|
[`${s}-${C}`]: C,
|
|
68
|
-
[`${s}-rtl`]:
|
|
68
|
+
[`${s}-rtl`]: I
|
|
69
69
|
},
|
|
70
70
|
Q
|
|
71
71
|
);
|
|
@@ -75,7 +75,7 @@ function ue({
|
|
|
75
75
|
style: J,
|
|
76
76
|
className: A,
|
|
77
77
|
ref: u,
|
|
78
|
-
...$e(
|
|
78
|
+
...$e(x, ["onChange", "onPressEnter"]),
|
|
79
79
|
children: [
|
|
80
80
|
d && /* @__PURE__ */ m("div", { className: `${s}-prefix`, children: d }),
|
|
81
81
|
/* @__PURE__ */ m(
|
|
@@ -144,22 +144,22 @@ function Ce({
|
|
|
144
144
|
onPressTab: D,
|
|
145
145
|
onChange: d,
|
|
146
146
|
separator: w,
|
|
147
|
-
suffixIcon:
|
|
147
|
+
suffixIcon: T,
|
|
148
148
|
changeFocusedInputIndex: B,
|
|
149
149
|
focusedInputIndex: c,
|
|
150
|
-
isPlaceholder:
|
|
150
|
+
isPlaceholder: x,
|
|
151
151
|
prefix: R,
|
|
152
152
|
inputProps: t = [],
|
|
153
153
|
onBlur: K,
|
|
154
|
-
...
|
|
155
|
-
},
|
|
154
|
+
...E
|
|
155
|
+
}, I) {
|
|
156
156
|
const {
|
|
157
157
|
getPrefixCls: O,
|
|
158
158
|
size: P,
|
|
159
159
|
locale: H,
|
|
160
160
|
rtl: p
|
|
161
161
|
} = te(re), u = b(null), S = b(null), L = b(null), [h, M] = se([!1, !1]), s = U($) ? $[0] : $, C = U($) ? $[1] : $;
|
|
162
|
-
ne(
|
|
162
|
+
ne(I, () => ({
|
|
163
163
|
focus(e) {
|
|
164
164
|
var o, i;
|
|
165
165
|
(c === 0 && !s || c === 1 && !C) && ((i = (o = ((typeof e == "number" ? e : c) === 0 ? u : S).current) == null ? void 0 : o.focus) == null || i.call(o));
|
|
@@ -210,7 +210,7 @@ function Ce({
|
|
|
210
210
|
function ae(e) {
|
|
211
211
|
return G(`${r}-input`, {
|
|
212
212
|
[`${r}-input-active`]: c === e,
|
|
213
|
-
[`${r}-input-placeholder`]:
|
|
213
|
+
[`${r}-input-placeholder`]: x && c === e
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
return /* @__PURE__ */ q(
|
|
@@ -219,7 +219,7 @@ function Ce({
|
|
|
219
219
|
style: X,
|
|
220
220
|
ref: L,
|
|
221
221
|
className: he,
|
|
222
|
-
...$e(
|
|
222
|
+
...$e(E, ["onChange", "onPressEnter"]),
|
|
223
223
|
children: [
|
|
224
224
|
R && /* @__PURE__ */ m("div", { className: `${r}-prefix`, children: R }),
|
|
225
225
|
/* @__PURE__ */ m("div", { className: ae(0), children: /* @__PURE__ */ m(
|
|
@@ -265,7 +265,7 @@ function Ce({
|
|
|
265
265
|
children: /* @__PURE__ */ m(oe, {})
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
/* @__PURE__ */ m("span", { className: `${r}-suffix-icon`, children:
|
|
268
|
+
/* @__PURE__ */ m("span", { className: `${r}-suffix-icon`, children: T })
|
|
269
269
|
] })
|
|
270
270
|
]
|
|
271
271
|
}
|