@reportportal/ui-kit 0.0.1-alpha.145 → 0.0.1-alpha.147
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/adaptiveTagList.js +69 -69
- package/dist/components/dropdown/constants.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/{datePicker-f8e0df24.js → datePicker-eaf5d130.js} +1 -1
- package/dist/datePicker.js +3 -3
- package/dist/dropdown-798def53.js +638 -0
- package/dist/dropdown.js +2 -2
- package/dist/index.js +3 -3
- package/dist/modal.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-a67da002.js → table-b4364f2c.js} +155 -153
- package/dist/table.js +1 -1
- package/package.json +1 -1
- package/dist/dropdown-893c692c.js +0 -634
package/dist/adaptiveTagList.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { jsx as l, jsxs as g, Fragment as
|
|
2
|
-
import { useRef as Z, useState as
|
|
1
|
+
import { jsx as l, jsxs as g, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Z, useState as N, useCallback as m, useMemo as h, useEffect as S } from "react";
|
|
3
3
|
import { c as A } from "./bind-06a7ff84.js";
|
|
4
|
-
import { B as
|
|
4
|
+
import { B as M } from "./button-97d9e587.js";
|
|
5
5
|
import { S as V } from "./close-4d480ef7.js";
|
|
6
6
|
import { i as tt } from "./isEmpty-ccacb5ff.js";
|
|
7
7
|
const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
8
|
-
"tag-list-wrapper": "_tag-list-
|
|
9
|
-
"tag-list-wrapper--show-all-view": "_tag-list-wrapper--show-all-
|
|
10
|
-
"tag-list": "_tag-
|
|
11
|
-
"tag-list--full-width": "_tag-list--full-
|
|
12
|
-
"tag-list--show-all-view": "_tag-list--show-all-
|
|
13
|
-
"tag-list--expanded": "_tag-list--
|
|
14
|
-
"tag-list--no-tags": "_tag-list--no-
|
|
15
|
-
"tag-list__item": "_tag-
|
|
16
|
-
"tag-list__item-title": "_tag-list__item-
|
|
17
|
-
"tag-list__item--is-editable": "_tag-list__item--is-
|
|
18
|
-
"tag-list__item-remove": "_tag-list__item-
|
|
19
|
-
"tag-list__item--count": "_tag-list__item--
|
|
20
|
-
"tag-list__item--button-show-all-view": "_tag-list__item--button-show-all-
|
|
21
|
-
"tag-list__item--button-wrapper": "_tag-list__item--button-
|
|
22
|
-
"no-tags-message": "_no-tags-
|
|
23
|
-
}, a = A.bind(lt),
|
|
8
|
+
"tag-list-wrapper": "_tag-list-wrapper_fcsvj_16",
|
|
9
|
+
"tag-list-wrapper--show-all-view": "_tag-list-wrapper--show-all-view_fcsvj_19",
|
|
10
|
+
"tag-list": "_tag-list_fcsvj_16",
|
|
11
|
+
"tag-list--full-width": "_tag-list--full-width_fcsvj_31",
|
|
12
|
+
"tag-list--show-all-view": "_tag-list--show-all-view_fcsvj_34",
|
|
13
|
+
"tag-list--expanded": "_tag-list--expanded_fcsvj_40",
|
|
14
|
+
"tag-list--no-tags": "_tag-list--no-tags_fcsvj_45",
|
|
15
|
+
"tag-list__item": "_tag-list__item_fcsvj_49",
|
|
16
|
+
"tag-list__item-title": "_tag-list__item-title_fcsvj_78",
|
|
17
|
+
"tag-list__item--is-editable": "_tag-list__item--is-editable_fcsvj_93",
|
|
18
|
+
"tag-list__item-remove": "_tag-list__item-remove_fcsvj_99",
|
|
19
|
+
"tag-list__item--count": "_tag-list__item--count_fcsvj_126",
|
|
20
|
+
"tag-list__item--button-show-all-view": "_tag-list__item--button-show-all-view_fcsvj_140",
|
|
21
|
+
"tag-list__item--button-wrapper": "_tag-list__item--button-wrapper_fcsvj_144",
|
|
22
|
+
"no-tags-message": "_no-tags-message_fcsvj_161"
|
|
23
|
+
}, a = A.bind(lt), ft = ({
|
|
24
24
|
tags: C,
|
|
25
25
|
isShowAllView: e = !1,
|
|
26
26
|
defaultVisibleLines: s = et,
|
|
27
|
-
onRemoveTag:
|
|
28
|
-
noTagsMessage:
|
|
27
|
+
onRemoveTag: r,
|
|
28
|
+
noTagsMessage: P = "No tags added",
|
|
29
29
|
showAllText: I = "Show all",
|
|
30
30
|
hideAllText: H = "Hide all",
|
|
31
31
|
showLessText: O = "Show less"
|
|
32
32
|
}) => {
|
|
33
|
-
const d = Z(null), [
|
|
33
|
+
const d = Z(null), [v, b] = N(0), [o, R] = N(!1), [$, w] = N(/* @__PURE__ */ new Set()), [B, Y] = N(!1), U = m(
|
|
34
34
|
(t, n) => {
|
|
35
|
-
t.stopPropagation(),
|
|
35
|
+
t.stopPropagation(), r == null || r(n);
|
|
36
36
|
},
|
|
37
|
-
[
|
|
38
|
-
),
|
|
37
|
+
[r]
|
|
38
|
+
), y = m(() => {
|
|
39
39
|
const t = d.current, n = /* @__PURE__ */ new Set();
|
|
40
40
|
if (!t)
|
|
41
41
|
return;
|
|
42
42
|
const i = [...t.children].filter(
|
|
43
|
-
(
|
|
43
|
+
(c) => !c.classList.contains("tag-list__item--button")
|
|
44
44
|
);
|
|
45
45
|
if (i.length === 0)
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
i.forEach((
|
|
50
|
-
const
|
|
51
|
-
(Q || X) && (n.add(
|
|
52
|
-
}), w(n), b(
|
|
53
|
-
}, []),
|
|
47
|
+
const f = i[0].offsetTop, T = t.getBoundingClientRect().right;
|
|
48
|
+
let p = 0;
|
|
49
|
+
i.forEach((c, u) => {
|
|
50
|
+
const j = c.getBoundingClientRect(), Q = c.offsetTop !== f, X = j.right > T;
|
|
51
|
+
(Q || X) && (n.add(u), p += 1);
|
|
52
|
+
}), w(n), b(p);
|
|
53
|
+
}, []), k = m(() => {
|
|
54
54
|
const t = d.current, n = /* @__PURE__ */ new Set();
|
|
55
55
|
if (!t || !s)
|
|
56
56
|
return;
|
|
57
57
|
const i = [...t.children].filter(
|
|
58
|
-
(
|
|
58
|
+
(u) => !u.classList.contains("tag-list__item--button")
|
|
59
59
|
);
|
|
60
60
|
if (i.length === 0)
|
|
61
61
|
return;
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
i.forEach((
|
|
65
|
-
|
|
66
|
-
}), w(n), b(
|
|
62
|
+
const f = i[0].offsetTop, _ = i[0].offsetHeight, T = f + _ * (s - 1);
|
|
63
|
+
let p = 0, c = !1;
|
|
64
|
+
i.forEach((u, j) => {
|
|
65
|
+
u.offsetTop > T + ot && (n.add(j), p += 1, c = !0);
|
|
66
|
+
}), w(n), b(p), Y(c);
|
|
67
67
|
}, [s]), q = h(() => e && s && !o ? {
|
|
68
68
|
maxHeight: `${st * s + nt * (s - 1)}px`,
|
|
69
69
|
overflow: "hidden"
|
|
@@ -72,51 +72,51 @@ const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
|
72
72
|
if (!d.current)
|
|
73
73
|
return;
|
|
74
74
|
const i = setTimeout(() => {
|
|
75
|
-
e && s ?
|
|
75
|
+
e && s ? k() : y();
|
|
76
76
|
}, e && s ? it : at);
|
|
77
77
|
return () => clearTimeout(i);
|
|
78
78
|
}, [
|
|
79
79
|
d,
|
|
80
80
|
e,
|
|
81
81
|
s,
|
|
82
|
+
y,
|
|
82
83
|
k,
|
|
83
|
-
|
|
84
|
-
E
|
|
84
|
+
v
|
|
85
85
|
]);
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const x = m(() => {
|
|
87
|
+
R((t) => !t);
|
|
88
88
|
}, []), z = (t) => {
|
|
89
|
-
t.stopPropagation(),
|
|
90
|
-
},
|
|
89
|
+
t.stopPropagation(), x();
|
|
90
|
+
}, E = m(
|
|
91
91
|
(t) => {
|
|
92
|
-
t.stopPropagation(),
|
|
92
|
+
t.stopPropagation(), x();
|
|
93
93
|
},
|
|
94
|
-
[
|
|
95
|
-
), J = h(() =>
|
|
94
|
+
[x]
|
|
95
|
+
), J = h(() => v > 0 && !o, [v, o]), D = h(
|
|
96
96
|
() => e && s && B && !o,
|
|
97
97
|
[e, s, B, o]
|
|
98
|
-
),
|
|
99
|
-
|
|
98
|
+
), F = h(() => /* @__PURE__ */ l("div", { className: a("tag-list__item--button-wrapper"), children: /* @__PURE__ */ l(
|
|
99
|
+
M,
|
|
100
100
|
{
|
|
101
101
|
className: a("tag-list__item--button", "tag-list__item--button-show-all-view"),
|
|
102
|
-
onClick:
|
|
102
|
+
onClick: E,
|
|
103
103
|
variant: "text",
|
|
104
104
|
children: I
|
|
105
105
|
}
|
|
106
|
-
) }), [
|
|
107
|
-
|
|
106
|
+
) }), [E, I]), G = h(() => /* @__PURE__ */ l("div", { className: a({ "tag-list__item--button-wrapper": e }), children: /* @__PURE__ */ l(
|
|
107
|
+
M,
|
|
108
108
|
{
|
|
109
109
|
className: a("tag-list__item--button", {
|
|
110
110
|
"tag-list__item--button-show-all-view": e && s
|
|
111
111
|
}),
|
|
112
|
-
onClick:
|
|
112
|
+
onClick: E,
|
|
113
113
|
variant: "text",
|
|
114
114
|
children: e && s ? H : O
|
|
115
115
|
}
|
|
116
|
-
) }), [
|
|
116
|
+
) }), [E, e, s, H, O]), K = m((t, n) => {
|
|
117
117
|
t && (t.scrollWidth > t.clientWidth ? t.setAttribute("title", n) : t.removeAttribute("title"));
|
|
118
118
|
}, []);
|
|
119
|
-
return tt(C) ? /* @__PURE__ */ l("div", { className: a("tag-list-wrapper"), children: /* @__PURE__ */ l("div", { className: a("tag-list", "tag-list--no-tags", "tag-list--full-width"), children: /* @__PURE__ */ l("div", { className: a("no-tags-message"), children:
|
|
119
|
+
return tt(C) ? /* @__PURE__ */ l("div", { className: a("tag-list-wrapper"), children: /* @__PURE__ */ l("div", { className: a("tag-list", "tag-list--no-tags", "tag-list--full-width"), children: /* @__PURE__ */ l("div", { className: a("no-tags-message"), children: P }) }) }) : /* @__PURE__ */ g("div", { className: a("tag-list-wrapper", { "tag-list-wrapper--show-all-view": e }), children: [
|
|
120
120
|
/* @__PURE__ */ g(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
@@ -128,13 +128,13 @@ const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
|
128
128
|
ref: d,
|
|
129
129
|
children: [
|
|
130
130
|
C.map((t, n) => {
|
|
131
|
-
const i = !o &&
|
|
131
|
+
const i = !o && $.has(n), f = !e && i;
|
|
132
132
|
return /* @__PURE__ */ g(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
|
-
className: a("tag-list__item", { "tag-list__item--is-editable": !!
|
|
135
|
+
className: a("tag-list__item", { "tag-list__item--is-editable": !!r }),
|
|
136
136
|
style: {
|
|
137
|
-
display:
|
|
137
|
+
display: f ? "none" : "flex"
|
|
138
138
|
},
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ l(
|
|
@@ -145,7 +145,7 @@ const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
|
145
145
|
children: t
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
|
|
148
|
+
r && /* @__PURE__ */ l(
|
|
149
149
|
"button",
|
|
150
150
|
{
|
|
151
151
|
type: "button",
|
|
@@ -159,16 +159,16 @@ const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
|
159
159
|
`${n}-${t}`
|
|
160
160
|
);
|
|
161
161
|
}),
|
|
162
|
-
!e && /* @__PURE__ */ g(
|
|
163
|
-
o &&
|
|
164
|
-
|
|
162
|
+
!e && /* @__PURE__ */ g(W, { children: [
|
|
163
|
+
o && G,
|
|
164
|
+
D && F
|
|
165
165
|
] })
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
|
-
e && /* @__PURE__ */ g(
|
|
170
|
-
o &&
|
|
171
|
-
|
|
169
|
+
e && /* @__PURE__ */ g(W, { children: [
|
|
170
|
+
o && G,
|
|
171
|
+
D && F
|
|
172
172
|
] }),
|
|
173
173
|
J && !e ? /* @__PURE__ */ g(
|
|
174
174
|
"button",
|
|
@@ -178,12 +178,12 @@ const et = 3, st = 22, nt = 8, it = 0, at = 100, ot = 20, lt = {
|
|
|
178
178
|
onClick: z,
|
|
179
179
|
children: [
|
|
180
180
|
"+",
|
|
181
|
-
|
|
181
|
+
v
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
) : null
|
|
185
185
|
] });
|
|
186
186
|
};
|
|
187
187
|
export {
|
|
188
|
-
|
|
188
|
+
ft as AdaptiveTagList
|
|
189
189
|
};
|
|
@@ -6,6 +6,6 @@ export declare enum EventName {
|
|
|
6
6
|
ON_KEY_DOWN = "onKeyDown",
|
|
7
7
|
ON_CLICK = "onClick"
|
|
8
8
|
}
|
|
9
|
-
export declare const SCROLLBARS_AUTO_HEIGHT_MAX =
|
|
9
|
+
export declare const SCROLLBARS_AUTO_HEIGHT_MAX = 240;
|
|
10
10
|
export declare const DROPDOWN_PORTAL_MENU_ATTR = "data-dropdown-portal-menu";
|
|
11
11
|
export declare const DEFAULT_VISIBLE_TAG_LINES = 10;
|
|
@@ -53,5 +53,7 @@ export interface DropdownProps {
|
|
|
53
53
|
menuPortalRoot?: Element;
|
|
54
54
|
/** Whether to render selected values as tags using AdaptiveTagList (only for multiSelect mode) */
|
|
55
55
|
isMultiSelectWithTags?: boolean;
|
|
56
|
+
/** Message to display when no options match the search term */
|
|
57
|
+
noMatchesMessage?: string;
|
|
56
58
|
}
|
|
57
59
|
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -3,7 +3,7 @@ import B from "react-datepicker/dist/es/index.js";
|
|
|
3
3
|
import { c as R } from "./bind-06a7ff84.js";
|
|
4
4
|
import { useMemo as P, useRef as D } from "react";
|
|
5
5
|
import { F as I } from "./fieldText-1749da7a.js";
|
|
6
|
-
import { D as E } from "./dropdown-
|
|
6
|
+
import { D as E } from "./dropdown-798def53.js";
|
|
7
7
|
import { S as T } from "./calendarArrow-44c7e60e.js";
|
|
8
8
|
import { registerLocale as j } from "react-datepicker";
|
|
9
9
|
const ie = (n, s) => {
|
package/dist/datePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as E } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-eaf5d130.js";
|
|
2
|
+
import { r as E } from "./datePicker-eaf5d130.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-datepicker/dist/es/index.js";
|
|
5
5
|
import "./bind-06a7ff84.js";
|
|
@@ -11,7 +11,7 @@ import "./baseIconButton-251479f7.js";
|
|
|
11
11
|
import "./spinLoader-c4a53718.js";
|
|
12
12
|
import "./maxValueDisplay-9be01a75.js";
|
|
13
13
|
import "./fieldLabel.js";
|
|
14
|
-
import "./dropdown-
|
|
14
|
+
import "./dropdown-798def53.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "@floating-ui/react-dom";
|
|
17
17
|
import "downshift";
|