@reportportal/ui-kit 0.0.1-alpha.240 → 0.0.1-alpha.242
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
|
@@ -22,7 +22,7 @@ import { FilterItem as lo } from "./filterItem.js";
|
|
|
22
22
|
import { IssueList as fo } from "./issueList.js";
|
|
23
23
|
import { Modal as So } from "./modal.js";
|
|
24
24
|
import { MultipleAutocomplete as Do, SingleAutocomplete as Po } from "./autocompletes.js";
|
|
25
|
-
import { P as Ao } from "./pagination-
|
|
25
|
+
import { P as Ao } from "./pagination-32fc6458.js";
|
|
26
26
|
import { Popover as To } from "./popover.js";
|
|
27
27
|
import { R as bo, a as ho } from "./radioGroup-0c132c2e.js";
|
|
28
28
|
import { SegmentedControl as Mo } from "./segmentedControl.js";
|
|
@@ -31,7 +31,7 @@ import { S as Lo } from "./spinLoader-c4a53718.js";
|
|
|
31
31
|
import { SystemAlert as ko } from "./systemAlert.js";
|
|
32
32
|
import { S as No } from "./systemMessage-924fdaa6.js";
|
|
33
33
|
import { DragLayer as Ho, SortableItem as zo, SortableList as Go, TreeSortableContainer as Jo, TreeSortableItem as Vo } from "./sortable.js";
|
|
34
|
-
import { T as Wo } from "./table-
|
|
34
|
+
import { T as Wo } from "./table-8cdbfdfb.js";
|
|
35
35
|
import { T as jo } from "./themeProvider-46c2be7b.js";
|
|
36
36
|
import { T as Ko } from "./toggle-304107fa.js";
|
|
37
37
|
import { Tooltip as Yo } from "./tooltip.js";
|
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as _ } from "./bind-06a7ff84.js";
|
|
3
3
|
import { Tooltip as j } from "./tooltip.js";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as f } from "react";
|
|
5
5
|
import { Popover as A } from "./popover.js";
|
|
6
|
-
import { B as
|
|
6
|
+
import { B as w } from "./button-7ab874f3.js";
|
|
7
7
|
import { F as B } from "./fieldText-4a8e5496.js";
|
|
8
|
-
import { B as
|
|
8
|
+
import { B as y } from "./baseIconButton-251479f7.js";
|
|
9
9
|
import { S as z, a as S } from "./prevPage-87faf576.js";
|
|
10
10
|
const W = {
|
|
11
|
-
"item-counter": "_item-
|
|
12
|
-
"accent-total": "_accent-
|
|
13
|
-
"accent-total-tooltip-wrapper": "_accent-total-tooltip-
|
|
14
|
-
|
|
11
|
+
"item-counter": "_item-counter_1rgba_1",
|
|
12
|
+
"accent-total": "_accent-total_1rgba_12",
|
|
13
|
+
"accent-total-tooltip-wrapper": "_accent-total-tooltip-wrapper_1rgba_17",
|
|
14
|
+
"accent-total-tooltip": "_accent-total-tooltip_1rgba_17"
|
|
15
|
+
}, b = _.bind(W), P = ({
|
|
15
16
|
activePage: s,
|
|
16
17
|
pageSize: n,
|
|
17
18
|
totalItems: o,
|
|
18
|
-
ofText:
|
|
19
|
+
ofText: r,
|
|
19
20
|
itemsText: l,
|
|
20
21
|
limitExceeded: i = !1,
|
|
21
22
|
warningContent: c = null,
|
|
22
23
|
accentTotalTooltip: e
|
|
23
24
|
}) => {
|
|
24
|
-
const p = s * n,
|
|
25
|
-
return /* @__PURE__ */ d("div", { className:
|
|
26
|
-
`${
|
|
27
|
-
` ${
|
|
25
|
+
const p = s * n, a = p - n;
|
|
26
|
+
return /* @__PURE__ */ d("div", { className: b("item-counter"), children: [
|
|
27
|
+
`${a + 1} - ${p < o ? p : o}`,
|
|
28
|
+
` ${r} `,
|
|
28
29
|
e ? typeof window < "u" ? /* @__PURE__ */ t(
|
|
29
30
|
j,
|
|
30
31
|
{
|
|
31
32
|
content: e,
|
|
32
33
|
placement: "top",
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
dynamicWidth: !0,
|
|
35
|
+
wrapperClassName: b("accent-total-tooltip-wrapper"),
|
|
36
|
+
tooltipClassName: b("accent-total-tooltip"),
|
|
37
|
+
children: /* @__PURE__ */ t("span", { className: b("accent-total"), children: o })
|
|
35
38
|
}
|
|
36
|
-
) : /* @__PURE__ */ t("span", { className:
|
|
39
|
+
) : /* @__PURE__ */ t("span", { className: b("accent-total"), children: o }) : `${o}${i ? "+" : ""}`,
|
|
37
40
|
` ${l}`,
|
|
38
41
|
!e && c
|
|
39
42
|
] });
|
|
@@ -41,20 +44,20 @@ const W = {
|
|
|
41
44
|
"size-selector": "_size-selector_cjnvy_1",
|
|
42
45
|
"size-option": "_size-option_cjnvy_6",
|
|
43
46
|
selected: E
|
|
44
|
-
},
|
|
47
|
+
}, T = _.bind(M), V = ({
|
|
45
48
|
currentSize: s,
|
|
46
49
|
options: n,
|
|
47
50
|
onClickOption: o
|
|
48
|
-
}) => /* @__PURE__ */ t("div", { className:
|
|
51
|
+
}) => /* @__PURE__ */ t("div", { className: T("size-selector"), children: n.map((r) => /* @__PURE__ */ t(
|
|
49
52
|
"button",
|
|
50
53
|
{
|
|
51
|
-
className:
|
|
54
|
+
className: T("size-option", { selected: r === s }),
|
|
52
55
|
onClick: () => {
|
|
53
|
-
o(
|
|
56
|
+
o(r);
|
|
54
57
|
},
|
|
55
|
-
children:
|
|
58
|
+
children: r
|
|
56
59
|
},
|
|
57
|
-
|
|
60
|
+
r
|
|
58
61
|
)) }), D = {
|
|
59
62
|
"page-size-control": "_page-size-control_8rb7p_1",
|
|
60
63
|
"page-size-options": "_page-size-options_8rb7p_8",
|
|
@@ -63,10 +66,10 @@ const W = {
|
|
|
63
66
|
size: s,
|
|
64
67
|
sizeOptions: n,
|
|
65
68
|
perPageText: o,
|
|
66
|
-
changeSize:
|
|
69
|
+
changeSize: r
|
|
67
70
|
}) => {
|
|
68
|
-
const [l, i] =
|
|
69
|
-
|
|
71
|
+
const [l, i] = f(!1), c = (e) => {
|
|
72
|
+
r(e), i(!1);
|
|
70
73
|
};
|
|
71
74
|
return /* @__PURE__ */ d("div", { className: v("page-size-control"), children: [
|
|
72
75
|
/* @__PURE__ */ t(
|
|
@@ -77,7 +80,7 @@ const W = {
|
|
|
77
80
|
isOpened: l,
|
|
78
81
|
setIsOpened: i,
|
|
79
82
|
className: v("page-size-options"),
|
|
80
|
-
children: /* @__PURE__ */ t(
|
|
83
|
+
children: /* @__PURE__ */ t(w, { className: v("size-selector-button"), variant: "text", adjustWidthOn: "content", children: s })
|
|
81
84
|
}
|
|
82
85
|
),
|
|
83
86
|
` ${o}`
|
|
@@ -90,13 +93,13 @@ const W = {
|
|
|
90
93
|
totalPages: s,
|
|
91
94
|
pageText: n,
|
|
92
95
|
goActionText: o,
|
|
93
|
-
selectPage:
|
|
96
|
+
selectPage: r
|
|
94
97
|
}) => {
|
|
95
|
-
const [l, i] =
|
|
96
|
-
const
|
|
97
|
-
e(x), i(
|
|
98
|
-
},
|
|
99
|
-
|
|
98
|
+
const [l, i] = f(""), [c, e] = f(!0), p = (g) => {
|
|
99
|
+
const N = g.target.value.replace(/\D/g, ""), u = Number(N), x = u > 0 && u <= s;
|
|
100
|
+
e(x), i(N);
|
|
101
|
+
}, a = () => {
|
|
102
|
+
r(Number(l));
|
|
100
103
|
};
|
|
101
104
|
return /* @__PURE__ */ d("div", { className: $("page-selector"), children: [
|
|
102
105
|
/* @__PURE__ */ t("div", { className: $("field-wrapper"), children: /* @__PURE__ */ t(
|
|
@@ -111,24 +114,24 @@ const W = {
|
|
|
111
114
|
displayError: !1
|
|
112
115
|
}
|
|
113
116
|
) }),
|
|
114
|
-
/* @__PURE__ */ t(
|
|
117
|
+
/* @__PURE__ */ t(w, { onClick: a, disabled: !l || !c, className: $("apply-button"), children: o })
|
|
115
118
|
] });
|
|
116
119
|
}, L = {
|
|
117
120
|
"active-page": "_active-page_1gl9o_1",
|
|
118
121
|
"page-selector": "_page-selector_1gl9o_10",
|
|
119
122
|
"page-selector-button": "_page-selector-button_1gl9o_14"
|
|
120
|
-
},
|
|
123
|
+
}, C = _.bind(L), R = ({
|
|
121
124
|
activePage: s,
|
|
122
125
|
totalPages: n,
|
|
123
126
|
pageText: o,
|
|
124
|
-
goToText:
|
|
127
|
+
goToText: r,
|
|
125
128
|
goActionText: l,
|
|
126
129
|
changePage: i
|
|
127
130
|
}) => {
|
|
128
|
-
const [c, e] =
|
|
129
|
-
i(
|
|
131
|
+
const [c, e] = f(!1), p = (a) => {
|
|
132
|
+
i(a), e(!1);
|
|
130
133
|
};
|
|
131
|
-
return /* @__PURE__ */ d("div", { className:
|
|
134
|
+
return /* @__PURE__ */ d("div", { className: C("active-page"), children: [
|
|
132
135
|
`${o} `,
|
|
133
136
|
/* @__PURE__ */ t(
|
|
134
137
|
A,
|
|
@@ -142,12 +145,12 @@ const W = {
|
|
|
142
145
|
totalPages: n
|
|
143
146
|
}
|
|
144
147
|
),
|
|
145
|
-
title:
|
|
148
|
+
title: r,
|
|
146
149
|
placement: "top",
|
|
147
150
|
isOpened: c,
|
|
148
151
|
setIsOpened: e,
|
|
149
|
-
className:
|
|
150
|
-
children: /* @__PURE__ */ t(
|
|
152
|
+
className: C("page-selector"),
|
|
153
|
+
children: /* @__PURE__ */ t(w, { className: C("page-selector-button"), variant: "text", adjustWidthOn: "content", children: s })
|
|
151
154
|
}
|
|
152
155
|
)
|
|
153
156
|
] });
|
|
@@ -160,35 +163,35 @@ const W = {
|
|
|
160
163
|
tooltip: Q,
|
|
161
164
|
"tooltip-text": "_tooltip-text_y74hy_48",
|
|
162
165
|
"page-number": "_page-number_y74hy_52"
|
|
163
|
-
}, m = _.bind(U),
|
|
166
|
+
}, m = _.bind(U), O = 13, I = 260, X = ({
|
|
164
167
|
totalPages: s,
|
|
165
168
|
activePage: n,
|
|
166
169
|
changePage: o,
|
|
167
|
-
captions:
|
|
170
|
+
captions: r
|
|
168
171
|
}) => {
|
|
169
|
-
const l =
|
|
170
|
-
for (let
|
|
172
|
+
const l = I / s, i = Math.min(Math.ceil(I / O), s), c = Math.max(O, l), e = [];
|
|
173
|
+
for (let a = 1; a <= s; a++)
|
|
171
174
|
e.push({
|
|
172
|
-
end:
|
|
173
|
-
pageNumber:
|
|
175
|
+
end: a * l,
|
|
176
|
+
pageNumber: a
|
|
174
177
|
});
|
|
175
178
|
const p = Array.from({ length: i }, () => ({ pages: { from: void 0, to: void 0 } }));
|
|
176
|
-
return p.forEach((
|
|
177
|
-
for (
|
|
179
|
+
return p.forEach((a, g) => {
|
|
180
|
+
for (a.pages.from = e[0].pageNumber; c * (g + 1) > e[0].end; )
|
|
178
181
|
e.shift();
|
|
179
|
-
|
|
180
|
-
}), /* @__PURE__ */ t("div", { className: m("bar"), children: p.map((
|
|
182
|
+
a.pages.to = e[0].pageNumber, e.shift();
|
|
183
|
+
}), /* @__PURE__ */ t("div", { className: m("bar"), children: p.map((a, g) => /* @__PURE__ */ t(
|
|
181
184
|
"div",
|
|
182
185
|
{
|
|
183
186
|
className: m("section-with-tooltip"),
|
|
184
187
|
style: { width: c },
|
|
185
|
-
onClick: () =>
|
|
188
|
+
onClick: () => a.pages.from && o(a.pages.from),
|
|
186
189
|
children: /* @__PURE__ */ t(
|
|
187
190
|
j,
|
|
188
191
|
{
|
|
189
192
|
content: /* @__PURE__ */ d("div", { className: m("tooltip"), children: [
|
|
190
|
-
/* @__PURE__ */ t("div", { className: m("tooltip-text"), children:
|
|
191
|
-
/* @__PURE__ */ t("div", { className: m("page-number"), children:
|
|
193
|
+
/* @__PURE__ */ t("div", { className: m("tooltip-text"), children: r.goTo }),
|
|
194
|
+
/* @__PURE__ */ t("div", { className: m("page-number"), children: a.pages.from })
|
|
192
195
|
] }),
|
|
193
196
|
wrapperClassName: m("tooltip-wrapper"),
|
|
194
197
|
placement: "top",
|
|
@@ -196,7 +199,7 @@ const W = {
|
|
|
196
199
|
"div",
|
|
197
200
|
{
|
|
198
201
|
className: m("section", {
|
|
199
|
-
selected:
|
|
202
|
+
selected: a.pages.from && a.pages.to && a.pages.from <= n && n <= a.pages.to
|
|
200
203
|
})
|
|
201
204
|
}
|
|
202
205
|
)
|
|
@@ -214,7 +217,7 @@ const W = {
|
|
|
214
217
|
activePage: s,
|
|
215
218
|
changePage: n,
|
|
216
219
|
totalPages: o,
|
|
217
|
-
captions:
|
|
220
|
+
captions: r
|
|
218
221
|
}) => {
|
|
219
222
|
const l = () => {
|
|
220
223
|
n(1);
|
|
@@ -228,7 +231,7 @@ const W = {
|
|
|
228
231
|
return /* @__PURE__ */ d("div", { className: h("page-navigator"), children: [
|
|
229
232
|
/* @__PURE__ */ d("div", { className: h("page-buttons"), children: [
|
|
230
233
|
/* @__PURE__ */ t(
|
|
231
|
-
|
|
234
|
+
y,
|
|
232
235
|
{
|
|
233
236
|
className: h("page-button"),
|
|
234
237
|
onClick: l,
|
|
@@ -237,7 +240,7 @@ const W = {
|
|
|
237
240
|
}
|
|
238
241
|
),
|
|
239
242
|
/* @__PURE__ */ t(
|
|
240
|
-
|
|
243
|
+
y,
|
|
241
244
|
{
|
|
242
245
|
className: h("page-button"),
|
|
243
246
|
onClick: i,
|
|
@@ -252,12 +255,12 @@ const W = {
|
|
|
252
255
|
totalPages: o,
|
|
253
256
|
activePage: s,
|
|
254
257
|
changePage: n,
|
|
255
|
-
captions:
|
|
258
|
+
captions: r
|
|
256
259
|
}
|
|
257
260
|
),
|
|
258
261
|
/* @__PURE__ */ d("div", { className: h("page-buttons"), children: [
|
|
259
262
|
/* @__PURE__ */ t(
|
|
260
|
-
|
|
263
|
+
y,
|
|
261
264
|
{
|
|
262
265
|
className: h("page-button", "next"),
|
|
263
266
|
onClick: c,
|
|
@@ -266,7 +269,7 @@ const W = {
|
|
|
266
269
|
}
|
|
267
270
|
),
|
|
268
271
|
/* @__PURE__ */ t(
|
|
269
|
-
|
|
272
|
+
y,
|
|
270
273
|
{
|
|
271
274
|
className: h("page-button", "next"),
|
|
272
275
|
onClick: e,
|
|
@@ -279,17 +282,17 @@ const W = {
|
|
|
279
282
|
}, te = {
|
|
280
283
|
"page-controls": "_page-controls_thyf8_1",
|
|
281
284
|
"total-pages": "_total-pages_thyf8_8"
|
|
282
|
-
},
|
|
285
|
+
}, k = _.bind(te), oe = ({
|
|
283
286
|
activePage: s,
|
|
284
287
|
changePage: n,
|
|
285
288
|
captions: o,
|
|
286
|
-
totalPages:
|
|
287
|
-
}) => /* @__PURE__ */ d("div", { className:
|
|
289
|
+
totalPages: r
|
|
290
|
+
}) => /* @__PURE__ */ d("div", { className: k("page-controls"), children: [
|
|
288
291
|
/* @__PURE__ */ t(
|
|
289
292
|
R,
|
|
290
293
|
{
|
|
291
294
|
activePage: s,
|
|
292
|
-
totalPages:
|
|
295
|
+
totalPages: r,
|
|
293
296
|
changePage: n,
|
|
294
297
|
pageText: o.page,
|
|
295
298
|
goToText: o.goTo,
|
|
@@ -301,43 +304,43 @@ const W = {
|
|
|
301
304
|
{
|
|
302
305
|
changePage: n,
|
|
303
306
|
activePage: s,
|
|
304
|
-
totalPages:
|
|
307
|
+
totalPages: r,
|
|
305
308
|
captions: { goTo: o.goTo }
|
|
306
309
|
}
|
|
307
310
|
),
|
|
308
|
-
/* @__PURE__ */ d("span", { className:
|
|
311
|
+
/* @__PURE__ */ d("span", { className: k("total-pages"), children: [
|
|
309
312
|
`${o.of} `,
|
|
310
|
-
|
|
313
|
+
r
|
|
311
314
|
] })
|
|
312
315
|
] }), se = "_pagination_ax9ed_1", ne = {
|
|
313
316
|
pagination: se
|
|
314
|
-
},
|
|
317
|
+
}, ae = _.bind(ne), he = ({
|
|
315
318
|
activePage: s,
|
|
316
319
|
totalPages: n,
|
|
317
320
|
pageSize: o,
|
|
318
|
-
totalItems:
|
|
321
|
+
totalItems: r,
|
|
319
322
|
pageSizeOptions: l,
|
|
320
323
|
changePage: i,
|
|
321
324
|
changePageSize: c,
|
|
322
325
|
captions: e,
|
|
323
326
|
className: p,
|
|
324
|
-
warningContent:
|
|
327
|
+
warningContent: a,
|
|
325
328
|
limitExceeded: g = !1,
|
|
326
|
-
accentTotalTooltip:
|
|
329
|
+
accentTotalTooltip: N
|
|
327
330
|
}) => {
|
|
328
331
|
const u = (e == null ? void 0 : e.of) || "of", x = (e == null ? void 0 : e.page) || "Page";
|
|
329
|
-
return /* @__PURE__ */ d("div", { className:
|
|
332
|
+
return /* @__PURE__ */ d("div", { className: ae("pagination", p), children: [
|
|
330
333
|
/* @__PURE__ */ t(
|
|
331
334
|
P,
|
|
332
335
|
{
|
|
333
336
|
activePage: s,
|
|
334
337
|
pageSize: o,
|
|
335
|
-
totalItems:
|
|
338
|
+
totalItems: r,
|
|
336
339
|
ofText: u,
|
|
337
340
|
itemsText: (e == null ? void 0 : e.items) || "items",
|
|
338
341
|
limitExceeded: g,
|
|
339
|
-
warningContent:
|
|
340
|
-
accentTotalTooltip:
|
|
342
|
+
warningContent: a,
|
|
343
|
+
accentTotalTooltip: N
|
|
341
344
|
}
|
|
342
345
|
),
|
|
343
346
|
n > 1 && /* @__PURE__ */ t(
|
package/dist/pagination.js
CHANGED