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