@reportportal/ui-kit 0.0.1-alpha.43 → 0.0.1-alpha.45
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/dist/index.js +1 -1
- package/dist/pagination-4ae395bd.js +347 -0
- package/dist/pagination.js +1 -1
- package/package.json +1 -1
- package/dist/pagination-f087f454.js +0 -346
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { F as L1 } from "./fieldTextFlex-5bddf46a.js";
|
|
|
13
13
|
import { R as u1 } from "./radio-bccc84f2.js";
|
|
14
14
|
import { Tooltip as M1 } from "./tooltip.js";
|
|
15
15
|
import { Popover as I1 } from "./popover.js";
|
|
16
|
-
import { P as S1, a as _1, S as Z1 } from "./pagination-
|
|
16
|
+
import { P as S1, a as _1, S as Z1 } from "./pagination-4ae395bd.js";
|
|
17
17
|
import { S as F1, a as A1, T as H1 } from "./table-9bf4ddab.js";
|
|
18
18
|
import { D as b1 } from "./datePicker-543e9043.js";
|
|
19
19
|
import { D as N1 } from "./datePicker-0d4910b6.js";
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "./bind-06a7ff84.js";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { useState as b } from "react";
|
|
5
|
+
import { Popover as I } from "./popover.js";
|
|
6
|
+
import { B as v } from "./button-33c88abf.js";
|
|
7
|
+
import { F as O } from "./fieldText-65e4c614.js";
|
|
8
|
+
import { B as u } from "./baseIconButton-b6adc843.js";
|
|
9
|
+
import { Tooltip as k } from "./tooltip.js";
|
|
10
|
+
const y = (t) => /* @__PURE__ */ f.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ f.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), T = (t) => /* @__PURE__ */ f.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ f.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), E = {
|
|
11
|
+
"item-counter": "_item-counter_4g6do_1"
|
|
12
|
+
}, M = m.bind(E), P = ({
|
|
13
|
+
activePage: t,
|
|
14
|
+
pageSize: n,
|
|
15
|
+
totalItems: s,
|
|
16
|
+
ofText: r,
|
|
17
|
+
itemsText: a
|
|
18
|
+
}) => {
|
|
19
|
+
const c = t * n, i = c - n;
|
|
20
|
+
return /* @__PURE__ */ p("div", { className: M("item-counter"), children: [
|
|
21
|
+
`${i + 1} - ${c < s ? c : s}`,
|
|
22
|
+
` ${r} ${s} ${a}`
|
|
23
|
+
] });
|
|
24
|
+
}, R = "_selected_183l8_32", V = {
|
|
25
|
+
"size-selector": "_size-selector_183l8_1",
|
|
26
|
+
"size-option": "_size-option_183l8_6",
|
|
27
|
+
selected: R
|
|
28
|
+
}, C = m.bind(V), W = ({
|
|
29
|
+
currentSize: t,
|
|
30
|
+
options: n,
|
|
31
|
+
onClickOption: s
|
|
32
|
+
}) => /* @__PURE__ */ o("div", { className: C("size-selector"), children: n.map((r) => /* @__PURE__ */ o(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
className: C("size-option", { selected: r === t }),
|
|
36
|
+
onClick: () => {
|
|
37
|
+
s(r);
|
|
38
|
+
},
|
|
39
|
+
children: r
|
|
40
|
+
},
|
|
41
|
+
r
|
|
42
|
+
)) }), D = {
|
|
43
|
+
"page-size-control": "_page-size-control_1y4na_1",
|
|
44
|
+
"size-selector-button": "_size-selector-button_1y4na_10"
|
|
45
|
+
}, S = m.bind(D), F = ({
|
|
46
|
+
size: t,
|
|
47
|
+
sizeOptions: n,
|
|
48
|
+
perPageText: s,
|
|
49
|
+
changeSize: r
|
|
50
|
+
}) => {
|
|
51
|
+
const [a, c] = b(!1), i = (e) => {
|
|
52
|
+
r(e), c(!1);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ p("div", { className: S("page-size-control"), children: [
|
|
55
|
+
/* @__PURE__ */ o(
|
|
56
|
+
I,
|
|
57
|
+
{
|
|
58
|
+
content: /* @__PURE__ */ o(W, { options: n, onClickOption: i, currentSize: t }),
|
|
59
|
+
placement: "top",
|
|
60
|
+
isOpened: a,
|
|
61
|
+
setIsOpened: c,
|
|
62
|
+
children: /* @__PURE__ */ o(v, { className: S("size-selector-button"), variant: "text", children: t })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
` ${s}`
|
|
66
|
+
] });
|
|
67
|
+
}, Z = {
|
|
68
|
+
"page-selector": "_page-selector_rtho4_1",
|
|
69
|
+
"field-wrapper": "_field-wrapper_rtho4_6",
|
|
70
|
+
"apply-button": "_apply-button_rtho4_10"
|
|
71
|
+
}, N = m.bind(Z), j = ({
|
|
72
|
+
totalPages: t,
|
|
73
|
+
pageText: n,
|
|
74
|
+
goActionText: s,
|
|
75
|
+
selectPage: r
|
|
76
|
+
}) => {
|
|
77
|
+
const [a, c] = b(""), [i, e] = b(!0), d = (h) => {
|
|
78
|
+
const w = h.target.value.replace(/\D/g, ""), $ = Number(w), L = $ > 0 && $ <= t;
|
|
79
|
+
e(L), c(w);
|
|
80
|
+
}, l = () => {
|
|
81
|
+
r(Number(a));
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ p("div", { className: N("page-selector"), children: [
|
|
84
|
+
/* @__PURE__ */ o("div", { className: N("field-wrapper"), children: /* @__PURE__ */ o(
|
|
85
|
+
O,
|
|
86
|
+
{
|
|
87
|
+
onChange: d,
|
|
88
|
+
value: a,
|
|
89
|
+
placeholder: n,
|
|
90
|
+
error: i ? "" : "Error",
|
|
91
|
+
touched: !0,
|
|
92
|
+
defaultWidth: !1,
|
|
93
|
+
displayError: !1
|
|
94
|
+
}
|
|
95
|
+
) }),
|
|
96
|
+
/* @__PURE__ */ o(v, { onClick: l, disabled: !a || !i, className: N("apply-button"), children: s })
|
|
97
|
+
] });
|
|
98
|
+
}, G = {
|
|
99
|
+
"active-page": "_active-page_rmw5h_1",
|
|
100
|
+
"page-selector": "_page-selector_rmw5h_10",
|
|
101
|
+
"page-selector-button": "_page-selector-button_rmw5h_14"
|
|
102
|
+
}, x = m.bind(G), H = ({
|
|
103
|
+
activePage: t,
|
|
104
|
+
totalPages: n,
|
|
105
|
+
pageText: s,
|
|
106
|
+
goToText: r,
|
|
107
|
+
goActionText: a,
|
|
108
|
+
changePage: c
|
|
109
|
+
}) => {
|
|
110
|
+
const [i, e] = b(!1), d = (l) => {
|
|
111
|
+
c(l), e(!1);
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ p("div", { className: x("active-page"), children: [
|
|
114
|
+
`${s} `,
|
|
115
|
+
/* @__PURE__ */ o(
|
|
116
|
+
I,
|
|
117
|
+
{
|
|
118
|
+
content: /* @__PURE__ */ o(
|
|
119
|
+
j,
|
|
120
|
+
{
|
|
121
|
+
pageText: s,
|
|
122
|
+
goActionText: a,
|
|
123
|
+
selectPage: d,
|
|
124
|
+
totalPages: n
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
title: r,
|
|
128
|
+
placement: "top",
|
|
129
|
+
isOpened: i,
|
|
130
|
+
setIsOpened: e,
|
|
131
|
+
className: x("page-selector"),
|
|
132
|
+
children: /* @__PURE__ */ o(v, { className: x("page-selector-button"), variant: "text", children: t })
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] });
|
|
136
|
+
}, q = "_bar_dfnmf_1", J = "_section_dfnmf_9", K = "_selected_dfnmf_33", Q = "_tooltip_dfnmf_37", U = {
|
|
137
|
+
bar: q,
|
|
138
|
+
"section-with-tooltip": "_section-with-tooltip_dfnmf_9",
|
|
139
|
+
section: J,
|
|
140
|
+
selected: K,
|
|
141
|
+
"tooltip-wrapper": "_tooltip-wrapper_dfnmf_37",
|
|
142
|
+
tooltip: Q,
|
|
143
|
+
"tooltip-text": "_tooltip-text_dfnmf_48",
|
|
144
|
+
"page-number": "_page-number_dfnmf_52"
|
|
145
|
+
}, g = m.bind(U), z = 13, A = 260, X = ({
|
|
146
|
+
totalPages: t,
|
|
147
|
+
activePage: n,
|
|
148
|
+
changePage: s,
|
|
149
|
+
captions: r
|
|
150
|
+
}) => {
|
|
151
|
+
const a = A / t, c = Math.min(Math.ceil(A / z), t), i = Math.max(z, a), e = [];
|
|
152
|
+
for (let l = 1; l <= t; l++)
|
|
153
|
+
e.push({
|
|
154
|
+
end: l * a,
|
|
155
|
+
pageNumber: l
|
|
156
|
+
});
|
|
157
|
+
const d = Array.from({ length: c }, () => ({ pages: { from: void 0, to: void 0 } }));
|
|
158
|
+
return d.forEach((l, h) => {
|
|
159
|
+
for (l.pages.from = e[0].pageNumber; i * (h + 1) > e[0].end; )
|
|
160
|
+
e.shift();
|
|
161
|
+
l.pages.to = e[0].pageNumber, e.shift();
|
|
162
|
+
}), /* @__PURE__ */ o("div", { className: g("bar"), children: d.map((l, h) => /* @__PURE__ */ o(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: g("section-with-tooltip"),
|
|
166
|
+
style: { width: i },
|
|
167
|
+
onClick: () => l.pages.from && s(l.pages.from),
|
|
168
|
+
children: /* @__PURE__ */ o(
|
|
169
|
+
k,
|
|
170
|
+
{
|
|
171
|
+
content: /* @__PURE__ */ p("div", { className: g("tooltip"), children: [
|
|
172
|
+
/* @__PURE__ */ o("div", { className: g("tooltip-text"), children: r.goTo }),
|
|
173
|
+
/* @__PURE__ */ o("div", { className: g("page-number"), children: l.pages.from })
|
|
174
|
+
] }),
|
|
175
|
+
wrapperClassName: g("tooltip-wrapper"),
|
|
176
|
+
placement: "top",
|
|
177
|
+
children: /* @__PURE__ */ o(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: g("section", {
|
|
181
|
+
selected: l.pages.from && l.pages.to && l.pages.from <= n && n <= l.pages.to
|
|
182
|
+
})
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
},
|
|
188
|
+
h
|
|
189
|
+
)) });
|
|
190
|
+
}, Y = "_next_1p2t5_18", ee = {
|
|
191
|
+
"page-navigator": "_page-navigator_1p2t5_1",
|
|
192
|
+
"page-buttons": "_page-buttons_1p2t5_6",
|
|
193
|
+
"page-button": "_page-button_1p2t5_6",
|
|
194
|
+
next: Y
|
|
195
|
+
}, _ = m.bind(ee), te = ({
|
|
196
|
+
activePage: t,
|
|
197
|
+
changePage: n,
|
|
198
|
+
totalPages: s,
|
|
199
|
+
captions: r
|
|
200
|
+
}) => {
|
|
201
|
+
const a = () => {
|
|
202
|
+
n(1);
|
|
203
|
+
}, c = () => {
|
|
204
|
+
n(t - 1);
|
|
205
|
+
}, i = () => {
|
|
206
|
+
n(t + 1);
|
|
207
|
+
}, e = () => {
|
|
208
|
+
n(s);
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ p("div", { className: _("page-navigator"), children: [
|
|
211
|
+
/* @__PURE__ */ p("div", { className: _("page-buttons"), children: [
|
|
212
|
+
/* @__PURE__ */ o(
|
|
213
|
+
u,
|
|
214
|
+
{
|
|
215
|
+
className: _("page-button"),
|
|
216
|
+
onClick: a,
|
|
217
|
+
disabled: t === 1,
|
|
218
|
+
children: /* @__PURE__ */ o(T, {})
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
/* @__PURE__ */ o(
|
|
222
|
+
u,
|
|
223
|
+
{
|
|
224
|
+
className: _("page-button"),
|
|
225
|
+
onClick: c,
|
|
226
|
+
disabled: t === 1,
|
|
227
|
+
children: /* @__PURE__ */ o(y, {})
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ o(
|
|
232
|
+
X,
|
|
233
|
+
{
|
|
234
|
+
totalPages: s,
|
|
235
|
+
activePage: t,
|
|
236
|
+
changePage: n,
|
|
237
|
+
captions: r
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ p("div", { className: _("page-buttons"), children: [
|
|
241
|
+
/* @__PURE__ */ o(
|
|
242
|
+
u,
|
|
243
|
+
{
|
|
244
|
+
className: _("page-button", "next"),
|
|
245
|
+
onClick: i,
|
|
246
|
+
disabled: t === s,
|
|
247
|
+
children: /* @__PURE__ */ o(y, {})
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
/* @__PURE__ */ o(
|
|
251
|
+
u,
|
|
252
|
+
{
|
|
253
|
+
className: _("page-button", "next"),
|
|
254
|
+
onClick: e,
|
|
255
|
+
disabled: t === s,
|
|
256
|
+
children: /* @__PURE__ */ o(T, {})
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
] })
|
|
260
|
+
] });
|
|
261
|
+
}, oe = {
|
|
262
|
+
"page-controls": "_page-controls_thyf8_1",
|
|
263
|
+
"total-pages": "_total-pages_thyf8_8"
|
|
264
|
+
}, B = m.bind(oe), se = ({
|
|
265
|
+
activePage: t,
|
|
266
|
+
changePage: n,
|
|
267
|
+
captions: s,
|
|
268
|
+
totalPages: r
|
|
269
|
+
}) => /* @__PURE__ */ p("div", { className: B("page-controls"), children: [
|
|
270
|
+
/* @__PURE__ */ o(
|
|
271
|
+
H,
|
|
272
|
+
{
|
|
273
|
+
activePage: t,
|
|
274
|
+
totalPages: r,
|
|
275
|
+
changePage: n,
|
|
276
|
+
pageText: s.page,
|
|
277
|
+
goToText: s.goTo,
|
|
278
|
+
goActionText: s.goAction
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
/* @__PURE__ */ o(
|
|
282
|
+
te,
|
|
283
|
+
{
|
|
284
|
+
changePage: n,
|
|
285
|
+
activePage: t,
|
|
286
|
+
totalPages: r,
|
|
287
|
+
captions: { goTo: s.goTo }
|
|
288
|
+
}
|
|
289
|
+
),
|
|
290
|
+
/* @__PURE__ */ p("span", { className: B("total-pages"), children: [
|
|
291
|
+
`${s.of} `,
|
|
292
|
+
r
|
|
293
|
+
] })
|
|
294
|
+
] }), ne = "_pagination_wi26a_1", re = {
|
|
295
|
+
pagination: ne
|
|
296
|
+
}, le = m.bind(re), he = ({
|
|
297
|
+
activePage: t,
|
|
298
|
+
totalPages: n,
|
|
299
|
+
pageSize: s,
|
|
300
|
+
totalItems: r,
|
|
301
|
+
pageSizeOptions: a,
|
|
302
|
+
changePage: c,
|
|
303
|
+
changePageSize: i,
|
|
304
|
+
captions: e
|
|
305
|
+
}) => {
|
|
306
|
+
const d = (e == null ? void 0 : e.of) || "of", l = (e == null ? void 0 : e.page) || "Page";
|
|
307
|
+
return /* @__PURE__ */ p("div", { className: le("pagination"), children: [
|
|
308
|
+
/* @__PURE__ */ o(
|
|
309
|
+
P,
|
|
310
|
+
{
|
|
311
|
+
activePage: t,
|
|
312
|
+
pageSize: s,
|
|
313
|
+
totalItems: r,
|
|
314
|
+
ofText: d,
|
|
315
|
+
itemsText: (e == null ? void 0 : e.items) || "items"
|
|
316
|
+
}
|
|
317
|
+
),
|
|
318
|
+
n > 1 && /* @__PURE__ */ o(
|
|
319
|
+
se,
|
|
320
|
+
{
|
|
321
|
+
activePage: t,
|
|
322
|
+
totalPages: n,
|
|
323
|
+
changePage: c,
|
|
324
|
+
captions: {
|
|
325
|
+
page: l,
|
|
326
|
+
of: d,
|
|
327
|
+
goTo: (e == null ? void 0 : e.goTo) || "Go to page",
|
|
328
|
+
goAction: (e == null ? void 0 : e.goAction) || "Go"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
),
|
|
332
|
+
/* @__PURE__ */ o(
|
|
333
|
+
F,
|
|
334
|
+
{
|
|
335
|
+
size: s,
|
|
336
|
+
sizeOptions: a,
|
|
337
|
+
changeSize: i,
|
|
338
|
+
perPageText: (e == null ? void 0 : e.perPage) || "per page"
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
] });
|
|
342
|
+
};
|
|
343
|
+
export {
|
|
344
|
+
he as P,
|
|
345
|
+
y as S,
|
|
346
|
+
T as a
|
|
347
|
+
};
|
package/dist/pagination.js
CHANGED
package/package.json
CHANGED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "./bind-06a7ff84.js";
|
|
3
|
-
import * as b from "react";
|
|
4
|
-
import { useState as x } from "react";
|
|
5
|
-
import { Popover as B } from "./popover.js";
|
|
6
|
-
import { B as w } from "./button-33c88abf.js";
|
|
7
|
-
import { F as I } from "./fieldText-65e4c614.js";
|
|
8
|
-
import { B as f } from "./baseIconButton-b6adc843.js";
|
|
9
|
-
import { Tooltip as E } from "./tooltip.js";
|
|
10
|
-
const y = (e) => /* @__PURE__ */ b.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), T = (e) => /* @__PURE__ */ b.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), k = {
|
|
11
|
-
"item-counter": "_item-counter_4g6do_1"
|
|
12
|
-
}, M = m.bind(k), P = ({
|
|
13
|
-
activePage: e,
|
|
14
|
-
pageSize: n,
|
|
15
|
-
totalItems: s,
|
|
16
|
-
ofText: r,
|
|
17
|
-
itemsText: c
|
|
18
|
-
}) => {
|
|
19
|
-
const a = e * n, i = a - n;
|
|
20
|
-
return /* @__PURE__ */ d("div", { className: M("item-counter"), children: [
|
|
21
|
-
`${i + 1} - ${a < s ? a : s}`,
|
|
22
|
-
` ${r} ${s} ${c}`
|
|
23
|
-
] });
|
|
24
|
-
}, R = "_selected_183l8_32", V = {
|
|
25
|
-
"size-selector": "_size-selector_183l8_1",
|
|
26
|
-
"size-option": "_size-option_183l8_6",
|
|
27
|
-
selected: R
|
|
28
|
-
}, C = m.bind(V), W = ({
|
|
29
|
-
currentSize: e,
|
|
30
|
-
options: n,
|
|
31
|
-
onClickOption: s
|
|
32
|
-
}) => /* @__PURE__ */ t("div", { className: C("size-selector"), children: n.map((r) => /* @__PURE__ */ t(
|
|
33
|
-
"button",
|
|
34
|
-
{
|
|
35
|
-
className: C("size-option", { selected: r === e }),
|
|
36
|
-
onClick: () => {
|
|
37
|
-
s(r);
|
|
38
|
-
},
|
|
39
|
-
children: r
|
|
40
|
-
},
|
|
41
|
-
r
|
|
42
|
-
)) }), D = {
|
|
43
|
-
"page-size-control": "_page-size-control_1y4na_1",
|
|
44
|
-
"size-selector-button": "_size-selector-button_1y4na_10"
|
|
45
|
-
}, S = m.bind(D), F = ({
|
|
46
|
-
size: e,
|
|
47
|
-
sizeOptions: n,
|
|
48
|
-
perPageText: s,
|
|
49
|
-
changeSize: r
|
|
50
|
-
}) => {
|
|
51
|
-
const [c, a] = x(!1), i = (o) => {
|
|
52
|
-
r(o), a(!1);
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ d("div", { className: S("page-size-control"), children: [
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
B,
|
|
57
|
-
{
|
|
58
|
-
content: /* @__PURE__ */ t(W, { options: n, onClickOption: i, currentSize: e }),
|
|
59
|
-
placement: "top",
|
|
60
|
-
isOpened: c,
|
|
61
|
-
setIsOpened: a,
|
|
62
|
-
children: /* @__PURE__ */ t(w, { className: S("size-selector-button"), variant: "text", children: e })
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
` ${s}`
|
|
66
|
-
] });
|
|
67
|
-
}, Z = {
|
|
68
|
-
"page-selector": "_page-selector_rtho4_1",
|
|
69
|
-
"field-wrapper": "_field-wrapper_rtho4_6",
|
|
70
|
-
"apply-button": "_apply-button_rtho4_10"
|
|
71
|
-
}, N = m.bind(Z), j = ({
|
|
72
|
-
totalPages: e,
|
|
73
|
-
pageText: n,
|
|
74
|
-
goActionText: s,
|
|
75
|
-
selectPage: r
|
|
76
|
-
}) => {
|
|
77
|
-
const [c, a] = x(""), [i, o] = x(!0), p = (u) => {
|
|
78
|
-
const h = u.target.value.replace(/\D/g, ""), $ = Number(h), O = $ > 0 && $ <= e;
|
|
79
|
-
o(O), a(h);
|
|
80
|
-
}, l = () => {
|
|
81
|
-
r(Number(c));
|
|
82
|
-
};
|
|
83
|
-
return /* @__PURE__ */ d("div", { className: N("page-selector"), children: [
|
|
84
|
-
/* @__PURE__ */ t("div", { className: N("field-wrapper"), children: /* @__PURE__ */ t(
|
|
85
|
-
I,
|
|
86
|
-
{
|
|
87
|
-
onChange: p,
|
|
88
|
-
value: c,
|
|
89
|
-
placeholder: n,
|
|
90
|
-
error: i ? "" : "Error",
|
|
91
|
-
touched: !0,
|
|
92
|
-
defaultWidth: !1,
|
|
93
|
-
displayError: !1
|
|
94
|
-
}
|
|
95
|
-
) }),
|
|
96
|
-
/* @__PURE__ */ t(w, { onClick: l, disabled: !c || !i, className: N("apply-button"), children: s })
|
|
97
|
-
] });
|
|
98
|
-
}, G = {
|
|
99
|
-
"active-page": "_active-page_rmw5h_1",
|
|
100
|
-
"page-selector": "_page-selector_rmw5h_10",
|
|
101
|
-
"page-selector-button": "_page-selector-button_rmw5h_14"
|
|
102
|
-
}, v = m.bind(G), H = ({
|
|
103
|
-
activePage: e,
|
|
104
|
-
totalPages: n,
|
|
105
|
-
pageText: s,
|
|
106
|
-
goToText: r,
|
|
107
|
-
goActionText: c,
|
|
108
|
-
changePage: a
|
|
109
|
-
}) => {
|
|
110
|
-
const [i, o] = x(!1), p = (l) => {
|
|
111
|
-
a(l), o(!1);
|
|
112
|
-
};
|
|
113
|
-
return /* @__PURE__ */ d("div", { className: v("active-page"), children: [
|
|
114
|
-
`${s} `,
|
|
115
|
-
/* @__PURE__ */ t(
|
|
116
|
-
B,
|
|
117
|
-
{
|
|
118
|
-
content: /* @__PURE__ */ t(
|
|
119
|
-
j,
|
|
120
|
-
{
|
|
121
|
-
pageText: s,
|
|
122
|
-
goActionText: c,
|
|
123
|
-
selectPage: p,
|
|
124
|
-
totalPages: n
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
title: r,
|
|
128
|
-
placement: "top",
|
|
129
|
-
isOpened: i,
|
|
130
|
-
setIsOpened: o,
|
|
131
|
-
className: v("page-selector"),
|
|
132
|
-
children: /* @__PURE__ */ t(w, { className: v("page-selector-button"), variant: "text", children: e })
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
] });
|
|
136
|
-
}, q = "_bar_dfnmf_1", J = "_section_dfnmf_9", K = "_selected_dfnmf_33", Q = "_tooltip_dfnmf_37", U = {
|
|
137
|
-
bar: q,
|
|
138
|
-
"section-with-tooltip": "_section-with-tooltip_dfnmf_9",
|
|
139
|
-
section: J,
|
|
140
|
-
selected: K,
|
|
141
|
-
"tooltip-wrapper": "_tooltip-wrapper_dfnmf_37",
|
|
142
|
-
tooltip: Q,
|
|
143
|
-
"tooltip-text": "_tooltip-text_dfnmf_48",
|
|
144
|
-
"page-number": "_page-number_dfnmf_52"
|
|
145
|
-
}, g = m.bind(U), z = 13, A = 260, X = ({
|
|
146
|
-
totalPages: e,
|
|
147
|
-
activePage: n,
|
|
148
|
-
changePage: s,
|
|
149
|
-
captions: r
|
|
150
|
-
}) => {
|
|
151
|
-
const c = A / e, a = Math.min(Math.ceil(A / z), e), i = Math.max(z, c), o = [];
|
|
152
|
-
for (let l = 1; l <= e; l++)
|
|
153
|
-
o.push({
|
|
154
|
-
end: l * c,
|
|
155
|
-
pageNumber: l
|
|
156
|
-
});
|
|
157
|
-
const p = Array.from({ length: a }, () => ({ pages: { from: void 0, to: void 0 } }));
|
|
158
|
-
return o.forEach((l) => {
|
|
159
|
-
const u = Math.ceil(l.end / i) - 1, h = p[u].pages;
|
|
160
|
-
h.from || (h.from = l.pageNumber), h.to = l.pageNumber;
|
|
161
|
-
}), /* @__PURE__ */ t("div", { className: g("bar"), children: p.map((l, u) => /* @__PURE__ */ t(
|
|
162
|
-
"div",
|
|
163
|
-
{
|
|
164
|
-
className: g("section-with-tooltip"),
|
|
165
|
-
style: { width: i },
|
|
166
|
-
onClick: () => l.pages.from && s(l.pages.from),
|
|
167
|
-
children: /* @__PURE__ */ t(
|
|
168
|
-
E,
|
|
169
|
-
{
|
|
170
|
-
content: /* @__PURE__ */ d("div", { className: g("tooltip"), children: [
|
|
171
|
-
/* @__PURE__ */ t("div", { className: g("tooltip-text"), children: r.goTo }),
|
|
172
|
-
/* @__PURE__ */ t("div", { className: g("page-number"), children: l.pages.from })
|
|
173
|
-
] }),
|
|
174
|
-
wrapperClassName: g("tooltip-wrapper"),
|
|
175
|
-
placement: "top",
|
|
176
|
-
children: /* @__PURE__ */ t(
|
|
177
|
-
"div",
|
|
178
|
-
{
|
|
179
|
-
className: g("section", {
|
|
180
|
-
selected: l.pages.from && l.pages.to && l.pages.from <= n && n <= l.pages.to
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
)
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
},
|
|
187
|
-
u
|
|
188
|
-
)) });
|
|
189
|
-
}, Y = "_next_1p2t5_18", ee = {
|
|
190
|
-
"page-navigator": "_page-navigator_1p2t5_1",
|
|
191
|
-
"page-buttons": "_page-buttons_1p2t5_6",
|
|
192
|
-
"page-button": "_page-button_1p2t5_6",
|
|
193
|
-
next: Y
|
|
194
|
-
}, _ = m.bind(ee), te = ({
|
|
195
|
-
activePage: e,
|
|
196
|
-
changePage: n,
|
|
197
|
-
totalPages: s,
|
|
198
|
-
captions: r
|
|
199
|
-
}) => {
|
|
200
|
-
const c = () => {
|
|
201
|
-
n(1);
|
|
202
|
-
}, a = () => {
|
|
203
|
-
n(e - 1);
|
|
204
|
-
}, i = () => {
|
|
205
|
-
n(e + 1);
|
|
206
|
-
}, o = () => {
|
|
207
|
-
n(s);
|
|
208
|
-
};
|
|
209
|
-
return /* @__PURE__ */ d("div", { className: _("page-navigator"), children: [
|
|
210
|
-
/* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
|
|
211
|
-
/* @__PURE__ */ t(
|
|
212
|
-
f,
|
|
213
|
-
{
|
|
214
|
-
className: _("page-button"),
|
|
215
|
-
onClick: c,
|
|
216
|
-
disabled: e === 1,
|
|
217
|
-
children: /* @__PURE__ */ t(T, {})
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
/* @__PURE__ */ t(
|
|
221
|
-
f,
|
|
222
|
-
{
|
|
223
|
-
className: _("page-button"),
|
|
224
|
-
onClick: a,
|
|
225
|
-
disabled: e === 1,
|
|
226
|
-
children: /* @__PURE__ */ t(y, {})
|
|
227
|
-
}
|
|
228
|
-
)
|
|
229
|
-
] }),
|
|
230
|
-
/* @__PURE__ */ t(
|
|
231
|
-
X,
|
|
232
|
-
{
|
|
233
|
-
totalPages: s,
|
|
234
|
-
activePage: e,
|
|
235
|
-
changePage: n,
|
|
236
|
-
captions: r
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
|
|
240
|
-
/* @__PURE__ */ t(
|
|
241
|
-
f,
|
|
242
|
-
{
|
|
243
|
-
className: _("page-button", "next"),
|
|
244
|
-
onClick: i,
|
|
245
|
-
disabled: e === s,
|
|
246
|
-
children: /* @__PURE__ */ t(y, {})
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
/* @__PURE__ */ t(
|
|
250
|
-
f,
|
|
251
|
-
{
|
|
252
|
-
className: _("page-button", "next"),
|
|
253
|
-
onClick: o,
|
|
254
|
-
disabled: e === s,
|
|
255
|
-
children: /* @__PURE__ */ t(T, {})
|
|
256
|
-
}
|
|
257
|
-
)
|
|
258
|
-
] })
|
|
259
|
-
] });
|
|
260
|
-
}, oe = {
|
|
261
|
-
"page-controls": "_page-controls_thyf8_1",
|
|
262
|
-
"total-pages": "_total-pages_thyf8_8"
|
|
263
|
-
}, L = m.bind(oe), se = ({
|
|
264
|
-
activePage: e,
|
|
265
|
-
changePage: n,
|
|
266
|
-
captions: s,
|
|
267
|
-
totalPages: r
|
|
268
|
-
}) => /* @__PURE__ */ d("div", { className: L("page-controls"), children: [
|
|
269
|
-
/* @__PURE__ */ t(
|
|
270
|
-
H,
|
|
271
|
-
{
|
|
272
|
-
activePage: e,
|
|
273
|
-
totalPages: r,
|
|
274
|
-
changePage: n,
|
|
275
|
-
pageText: s.page,
|
|
276
|
-
goToText: s.goTo,
|
|
277
|
-
goActionText: s.goAction
|
|
278
|
-
}
|
|
279
|
-
),
|
|
280
|
-
/* @__PURE__ */ t(
|
|
281
|
-
te,
|
|
282
|
-
{
|
|
283
|
-
changePage: n,
|
|
284
|
-
activePage: e,
|
|
285
|
-
totalPages: r,
|
|
286
|
-
captions: { goTo: s.goTo }
|
|
287
|
-
}
|
|
288
|
-
),
|
|
289
|
-
/* @__PURE__ */ d("span", { className: L("total-pages"), children: [
|
|
290
|
-
`${s.of} `,
|
|
291
|
-
r
|
|
292
|
-
] })
|
|
293
|
-
] }), ne = "_pagination_wi26a_1", re = {
|
|
294
|
-
pagination: ne
|
|
295
|
-
}, le = m.bind(re), he = ({
|
|
296
|
-
activePage: e,
|
|
297
|
-
totalPages: n,
|
|
298
|
-
pageSize: s,
|
|
299
|
-
totalItems: r,
|
|
300
|
-
pageSizeOptions: c,
|
|
301
|
-
changePage: a,
|
|
302
|
-
changePageSize: i,
|
|
303
|
-
captions: o
|
|
304
|
-
}) => {
|
|
305
|
-
const p = (o == null ? void 0 : o.of) || "of", l = (o == null ? void 0 : o.page) || "Page";
|
|
306
|
-
return /* @__PURE__ */ d("div", { className: le("pagination"), children: [
|
|
307
|
-
/* @__PURE__ */ t(
|
|
308
|
-
P,
|
|
309
|
-
{
|
|
310
|
-
activePage: e,
|
|
311
|
-
pageSize: s,
|
|
312
|
-
totalItems: r,
|
|
313
|
-
ofText: p,
|
|
314
|
-
itemsText: (o == null ? void 0 : o.items) || "items"
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
n > 1 && /* @__PURE__ */ t(
|
|
318
|
-
se,
|
|
319
|
-
{
|
|
320
|
-
activePage: e,
|
|
321
|
-
totalPages: n,
|
|
322
|
-
changePage: a,
|
|
323
|
-
captions: {
|
|
324
|
-
page: l,
|
|
325
|
-
of: p,
|
|
326
|
-
goTo: (o == null ? void 0 : o.goTo) || "Go to page",
|
|
327
|
-
goAction: (o == null ? void 0 : o.goAction) || "Go"
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
),
|
|
331
|
-
/* @__PURE__ */ t(
|
|
332
|
-
F,
|
|
333
|
-
{
|
|
334
|
-
size: s,
|
|
335
|
-
sizeOptions: c,
|
|
336
|
-
changeSize: i,
|
|
337
|
-
perPageText: (o == null ? void 0 : o.perPage) || "per page"
|
|
338
|
-
}
|
|
339
|
-
)
|
|
340
|
-
] });
|
|
341
|
-
};
|
|
342
|
-
export {
|
|
343
|
-
he as P,
|
|
344
|
-
y as S,
|
|
345
|
-
T as a
|
|
346
|
-
};
|