@reportportal/ui-kit 0.0.1-alpha.144 → 0.0.1-alpha.146
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/autocompletes.js +63 -62
- package/dist/components/dropdown/constants.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/table/hooks/index.d.ts +1 -0
- package/dist/components/table/hooks/useColumnResize.d.ts +18 -0
- package/dist/components/table/resizeHandle/index.d.ts +1 -0
- package/dist/components/table/resizeHandle/resizeHandle.d.ts +2 -0
- package/dist/components/table/types.d.ts +4 -0
- package/dist/components/table/utils.d.ts +1 -1
- 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/icons.js +38 -37
- package/dist/index.js +136 -134
- package/dist/modal.js +1 -1
- package/dist/{chevronDownDropdown-66f5b1af.js → resizeColumn-d4107941.js} +3 -2
- package/dist/style.css +1 -1
- package/dist/table-a67da002.js +586 -0
- package/dist/table.js +3 -2
- package/package.json +4 -2
- package/dist/dropdown-893c692c.js +0 -634
- package/dist/table-c172f35e.js +0 -504
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
|
};
|
package/dist/autocompletes.js
CHANGED
|
@@ -36,8 +36,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
36
36
|
error: d = !1,
|
|
37
37
|
editItem: v,
|
|
38
38
|
editable: p = !1,
|
|
39
|
-
getAdditionalCreationCondition:
|
|
40
|
-
storedOption:
|
|
39
|
+
getAdditionalCreationCondition: y = () => !0,
|
|
40
|
+
storedOption: g = !0,
|
|
41
41
|
highlightUnStoredItem: f = !1,
|
|
42
42
|
variant: k = "light",
|
|
43
43
|
getItemName: x,
|
|
@@ -45,12 +45,12 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
45
45
|
className: R,
|
|
46
46
|
textClassName: I
|
|
47
47
|
}) => {
|
|
48
|
-
const [
|
|
49
|
-
!c && p && !
|
|
48
|
+
const [w, b] = re(!1), [C, B] = re(""), [l, a] = re(!1), s = xe(null), i = () => {
|
|
49
|
+
!c && p && !g && (B((x == null ? void 0 : x(t)) || (n == null ? void 0 : n(t)) || ""), b(!0));
|
|
50
50
|
}, _ = (S) => {
|
|
51
51
|
B(S.target.value);
|
|
52
52
|
}, O = (S) => {
|
|
53
|
-
const j =
|
|
53
|
+
const j = y(C);
|
|
54
54
|
S.key === "Enter" && j && (v(t, C), b(!1), B(""));
|
|
55
55
|
}, H = () => {
|
|
56
56
|
b(!1), B("");
|
|
@@ -82,11 +82,11 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
82
82
|
[`validation-${d}`]: d,
|
|
83
83
|
disabled: c,
|
|
84
84
|
"mobile-disabled": r,
|
|
85
|
-
"highlight-un-stored-item": f && !
|
|
85
|
+
"highlight-un-stored-item": f && !g
|
|
86
86
|
},
|
|
87
87
|
R
|
|
88
88
|
);
|
|
89
|
-
return
|
|
89
|
+
return w ? /* @__PURE__ */ o(
|
|
90
90
|
"input",
|
|
91
91
|
{
|
|
92
92
|
autoFocus: !0,
|
|
@@ -129,8 +129,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
129
129
|
renderCustomSelectedItem: d,
|
|
130
130
|
selectedItemSingleLine: v,
|
|
131
131
|
selectedItemClassName: p,
|
|
132
|
-
selectedItemTextClassName:
|
|
133
|
-
...
|
|
132
|
+
selectedItemTextClassName: y,
|
|
133
|
+
...g
|
|
134
134
|
}) => t.map((f) => d ? d(f) : /* @__PURE__ */ o(
|
|
135
135
|
Xe,
|
|
136
136
|
{
|
|
@@ -141,8 +141,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
141
141
|
highlightUnStoredItem: n,
|
|
142
142
|
singleLine: v,
|
|
143
143
|
className: p,
|
|
144
|
-
textClassName:
|
|
145
|
-
...
|
|
144
|
+
textClassName: y,
|
|
145
|
+
...g
|
|
146
146
|
},
|
|
147
147
|
e == null ? void 0 : e(f)
|
|
148
148
|
)), Je = "_prompt_1xfmd_16", Qe = {
|
|
@@ -168,7 +168,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
168
168
|
newItemButtonText: v = "",
|
|
169
169
|
...p
|
|
170
170
|
}) => {
|
|
171
|
-
const
|
|
171
|
+
const y = () => v || (d === "key-variant" ? "New key" : "New value");
|
|
172
172
|
return c ? /* @__PURE__ */ $(ce, { children: [
|
|
173
173
|
/* @__PURE__ */ o("div", { className: ee("divider") }),
|
|
174
174
|
/* @__PURE__ */ $(
|
|
@@ -189,7 +189,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
189
189
|
className: ee({ "button-active": t }),
|
|
190
190
|
icon: /* @__PURE__ */ o(je, {}),
|
|
191
191
|
variant: "text",
|
|
192
|
-
children:
|
|
192
|
+
children: y()
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
]
|
|
@@ -219,8 +219,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
219
219
|
createWithoutConfirmation: d,
|
|
220
220
|
customEmptyListMessage: v,
|
|
221
221
|
customNoMatchesMessage: p,
|
|
222
|
-
optionVariant:
|
|
223
|
-
newItemButtonText:
|
|
222
|
+
optionVariant: y,
|
|
223
|
+
newItemButtonText: g,
|
|
224
224
|
renderOption: f,
|
|
225
225
|
getUniqKey: k,
|
|
226
226
|
getItemProps: x,
|
|
@@ -229,16 +229,16 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
229
229
|
(s, i, _ = !1) => f ? f(s, i, _, x) : /* @__PURE__ */ o(
|
|
230
230
|
ye,
|
|
231
231
|
{
|
|
232
|
-
optionVariant:
|
|
232
|
+
optionVariant: y,
|
|
233
233
|
...x({ item: s, index: i }),
|
|
234
234
|
isNew: _,
|
|
235
|
-
newItemButtonText:
|
|
235
|
+
newItemButtonText: g,
|
|
236
236
|
children: u(s)
|
|
237
237
|
},
|
|
238
238
|
(k == null ? void 0 : k(s)) || u(s)
|
|
239
239
|
),
|
|
240
|
-
[x, k,
|
|
241
|
-
),
|
|
240
|
+
[x, k, g, y, u, f]
|
|
241
|
+
), w = V(
|
|
242
242
|
(s) => s.length ? s.map((i, _) => I(i, _)) : "",
|
|
243
243
|
[I]
|
|
244
244
|
), b = V(
|
|
@@ -247,15 +247,16 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
247
247
|
return /* @__PURE__ */ o("div", { className: _e({ container: !i }), children: /* @__PURE__ */ o(
|
|
248
248
|
ye,
|
|
249
249
|
{
|
|
250
|
-
optionVariant:
|
|
250
|
+
optionVariant: y,
|
|
251
251
|
isNew: !0,
|
|
252
|
+
newItemButtonText: g,
|
|
252
253
|
...x({ item: r, index: i }),
|
|
253
254
|
children: u(r)
|
|
254
255
|
},
|
|
255
256
|
u(r)
|
|
256
257
|
) });
|
|
257
258
|
},
|
|
258
|
-
[x, r, g, u]
|
|
259
|
+
[x, r, g, y, u]
|
|
259
260
|
), C = V(
|
|
260
261
|
(s) => n ? /* @__PURE__ */ $(ce, { children: [
|
|
261
262
|
/* @__PURE__ */ o(Ue, { children: /* @__PURE__ */ o(Pe, {}) }),
|
|
@@ -267,7 +268,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
267
268
|
return /* @__PURE__ */ o("div", { className: _e("empty-list-message"), children: s });
|
|
268
269
|
}, [v, p, e == null ? void 0 : e.length]), l = c ? e : R(), a = C(e);
|
|
269
270
|
return a || /* @__PURE__ */ $("div", { className: _e({ container: e.length }), children: [
|
|
270
|
-
/* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? B() :
|
|
271
|
+
/* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? B() : w(l) }),
|
|
271
272
|
!d && b(l)
|
|
272
273
|
] });
|
|
273
274
|
}, it = "_menu_f64z5_16", dt = "_opened_f64z5_34", ut = "_dark_f64z5_37", mt = {
|
|
@@ -311,8 +312,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
311
312
|
children: d,
|
|
312
313
|
customizeNewSelectedValue: v = (f) => f,
|
|
313
314
|
getOptionUniqKey: p,
|
|
314
|
-
getOptionUniqKeyValue:
|
|
315
|
-
...
|
|
315
|
+
getOptionUniqKeyValue: y,
|
|
316
|
+
...g
|
|
316
317
|
}) => {
|
|
317
318
|
const [f, k] = re(n), x = (l, a) => {
|
|
318
319
|
const s = {
|
|
@@ -337,23 +338,23 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
337
338
|
}, I = (l, a) => {
|
|
338
339
|
const s = c.indexOf(l), i = [...c];
|
|
339
340
|
i.splice(s, 1, a), e == null || e(i, null);
|
|
340
|
-
},
|
|
341
|
+
}, w = (l, a) => {
|
|
341
342
|
const s = c.filter((_) => !ae(_, l));
|
|
342
343
|
e == null || e(s, a), u(l, (_) => r == null ? void 0 : r(s, _));
|
|
343
344
|
}, b = (l, a) => {
|
|
344
345
|
l && R(l, a);
|
|
345
346
|
}, C = (l) => ({
|
|
346
|
-
removeItem:
|
|
347
|
+
removeItem: w,
|
|
347
348
|
editItem: I,
|
|
348
349
|
handleChange: e,
|
|
349
|
-
getOptionUniqKeyValue:
|
|
350
|
+
getOptionUniqKeyValue: y,
|
|
350
351
|
storedItemsMap: f,
|
|
351
352
|
...l
|
|
352
353
|
});
|
|
353
354
|
return /* @__PURE__ */ o(
|
|
354
355
|
le,
|
|
355
356
|
{
|
|
356
|
-
...
|
|
357
|
+
...g,
|
|
357
358
|
stateReducer: (l, a) => {
|
|
358
359
|
switch (a.type) {
|
|
359
360
|
case le.stateChangeTypes.keyDownEnter:
|
|
@@ -398,8 +399,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
398
399
|
placeholder: d = "",
|
|
399
400
|
error: v = "",
|
|
400
401
|
touched: p = !1,
|
|
401
|
-
creatable:
|
|
402
|
-
editable:
|
|
402
|
+
creatable: y = !1,
|
|
403
|
+
editable: g = !1,
|
|
403
404
|
onChange: f = () => {
|
|
404
405
|
},
|
|
405
406
|
onFocus: k = () => {
|
|
@@ -409,7 +410,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
409
410
|
disabled: u = !1,
|
|
410
411
|
isDropdownMode: R = !1,
|
|
411
412
|
mobileDisabled: I = !1,
|
|
412
|
-
inputProps:
|
|
413
|
+
inputProps: w = {},
|
|
413
414
|
parseValueToString: b = (h) => h == null ? "" : String(h),
|
|
414
415
|
maxLength: C = null,
|
|
415
416
|
async: B = !1,
|
|
@@ -441,33 +442,33 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
441
442
|
ke(() => {
|
|
442
443
|
i();
|
|
443
444
|
}, [i, n]);
|
|
444
|
-
const oe = (h,
|
|
445
|
-
f(h,
|
|
446
|
-
}, ue = (h,
|
|
445
|
+
const oe = (h, N) => {
|
|
446
|
+
f(h, N);
|
|
447
|
+
}, ue = (h, N, E) => ({ item: m, index: q, ...A }) => h({
|
|
447
448
|
item: m,
|
|
448
449
|
index: q,
|
|
449
450
|
isSelected: E.some((U) => ae(U, m)),
|
|
450
451
|
...A,
|
|
451
|
-
isActive:
|
|
452
|
+
isActive: N === q
|
|
452
453
|
}), me = ({
|
|
453
454
|
event: h,
|
|
454
|
-
removeItem:
|
|
455
|
+
removeItem: N,
|
|
455
456
|
inputValue: E
|
|
456
457
|
}) => {
|
|
457
|
-
h.key === "Backspace" && !E && n.length &&
|
|
458
|
+
h.key === "Backspace" && !E && n.length && N(n[n.length - 1], null);
|
|
458
459
|
}, Y = ({
|
|
459
460
|
inputValue: h,
|
|
460
|
-
selectItem:
|
|
461
|
+
selectItem: N,
|
|
461
462
|
clearSelection: E
|
|
462
463
|
}) => {
|
|
463
464
|
if (H) {
|
|
464
465
|
const m = H(h);
|
|
465
|
-
(m.length ? m : [h]).forEach((A) =>
|
|
466
|
+
(m.length ? m : [h]).forEach((A) => N(A)), E();
|
|
466
467
|
} else
|
|
467
|
-
|
|
468
|
-
}, fe = (h) => (
|
|
469
|
-
h(
|
|
470
|
-
}, pe = e.filter((h) => n.every((
|
|
468
|
+
N(h), E();
|
|
469
|
+
}, fe = (h) => (N) => {
|
|
470
|
+
h(N, null), z.current && z.current.focus();
|
|
471
|
+
}, pe = e.filter((h) => n.every((N) => !ae(N, h)));
|
|
471
472
|
return /* @__PURE__ */ o(
|
|
472
473
|
ht,
|
|
473
474
|
{
|
|
@@ -481,7 +482,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
481
482
|
customizeNewSelectedValue: te,
|
|
482
483
|
children: ({
|
|
483
484
|
getInputProps: h,
|
|
484
|
-
getItemProps:
|
|
485
|
+
getItemProps: N,
|
|
485
486
|
isOpen: E,
|
|
486
487
|
inputValue: m = "",
|
|
487
488
|
highlightedIndex: q,
|
|
@@ -529,7 +530,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
529
530
|
getItemValidationErrorType: s,
|
|
530
531
|
renderCustomSelectedItem: S,
|
|
531
532
|
editItem: U,
|
|
532
|
-
editable:
|
|
533
|
+
editable: g,
|
|
533
534
|
getAdditionalCreationCondition: _,
|
|
534
535
|
storedItemsMap: De,
|
|
535
536
|
highlightUnStoredItem: O,
|
|
@@ -549,21 +550,21 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
549
550
|
R && se(), k();
|
|
550
551
|
},
|
|
551
552
|
onKeyDown: (F) => {
|
|
552
|
-
F.key === Re && m &&
|
|
553
|
+
F.key === Re && m && y && _(m) && Y({
|
|
553
554
|
inputValue: m,
|
|
554
555
|
selectItem: be,
|
|
555
556
|
clearSelection: ve
|
|
556
557
|
}), me({ event: F, removeItem: A, inputValue: m });
|
|
557
558
|
},
|
|
558
559
|
onBlur: () => {
|
|
559
|
-
x(), m &&
|
|
560
|
+
x(), m && y && _(m) && Y({
|
|
560
561
|
inputValue: m,
|
|
561
562
|
selectItem: be,
|
|
562
563
|
clearSelection: ve
|
|
563
564
|
});
|
|
564
565
|
},
|
|
565
566
|
disabled: u,
|
|
566
|
-
...
|
|
567
|
+
...w
|
|
567
568
|
}),
|
|
568
569
|
className: X("input", { disabled: u }),
|
|
569
570
|
"data-automation-id": W
|
|
@@ -572,14 +573,14 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
572
573
|
]
|
|
573
574
|
}
|
|
574
575
|
),
|
|
575
|
-
(
|
|
576
|
+
(w == null ? void 0 : w.clearable) && !he(n) && /* @__PURE__ */ o(
|
|
576
577
|
"button",
|
|
577
578
|
{
|
|
578
579
|
type: "button",
|
|
579
580
|
className: X("clear-icon", { "clear-icon--disabled": u }),
|
|
580
581
|
onClick: () => {
|
|
581
582
|
var F;
|
|
582
|
-
return !u && ((F =
|
|
583
|
+
return !u && ((F = w == null ? void 0 : w.onClear) == null ? void 0 : F.call(w));
|
|
583
584
|
},
|
|
584
585
|
onMouseDown: (F) => F.preventDefault(),
|
|
585
586
|
children: /* @__PURE__ */ o(We, {})
|
|
@@ -612,7 +613,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
612
613
|
isDropdownMode: R,
|
|
613
614
|
style: ie,
|
|
614
615
|
inputValue: qe.trim(),
|
|
615
|
-
getItemProps: ue(
|
|
616
|
+
getItemProps: ue(N, q, n),
|
|
616
617
|
parseValueToString: b,
|
|
617
618
|
createWithoutConfirmation: a,
|
|
618
619
|
options: pe,
|
|
@@ -640,15 +641,15 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
640
641
|
onBlur: v = () => {
|
|
641
642
|
},
|
|
642
643
|
disabled: p = !1,
|
|
643
|
-
inputProps:
|
|
644
|
-
parseValueToString:
|
|
644
|
+
inputProps: y = {},
|
|
645
|
+
parseValueToString: g = (D) => D === null ? "" : String(D),
|
|
645
646
|
minLength: f = 1,
|
|
646
647
|
skipOptionCreation: k = !1,
|
|
647
648
|
maxLength: x = null,
|
|
648
649
|
optionVariant: u = "",
|
|
649
650
|
isRequired: R = !1,
|
|
650
651
|
error: I = "",
|
|
651
|
-
touched:
|
|
652
|
+
touched: w = !1,
|
|
652
653
|
setTouch: b = () => {
|
|
653
654
|
},
|
|
654
655
|
createWithoutConfirmation: C = !1,
|
|
@@ -679,7 +680,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
679
680
|
le,
|
|
680
681
|
{
|
|
681
682
|
onChange: n,
|
|
682
|
-
itemToString:
|
|
683
|
+
itemToString: g,
|
|
683
684
|
selectedItem: c,
|
|
684
685
|
onStateChange: O,
|
|
685
686
|
defaultHighlightedIndex: It,
|
|
@@ -699,7 +700,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
699
700
|
const oe = de(void 0, { suppressRefError: !0 }), ue = {
|
|
700
701
|
...oe,
|
|
701
702
|
ref: (m) => (J.setReference(m), oe.ref(m))
|
|
702
|
-
}, me = Z ?? "", { onClear: Y, clearable: fe, ...pe } =
|
|
703
|
+
}, me = Z ?? "", { onClear: Y, clearable: fe, ...pe } = y, N = fe && c !== null, E = (...m) => {
|
|
703
704
|
z(null), Y == null || Y(...m);
|
|
704
705
|
};
|
|
705
706
|
return /* @__PURE__ */ o(ce, { children: /* @__PURE__ */ $("div", { className: Ne("input-wrapper"), ...ue, children: [
|
|
@@ -717,19 +718,19 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
717
718
|
m.key === Re && m.preventDefault(), Z && M && j(m, K);
|
|
718
719
|
},
|
|
719
720
|
onBlur: (m) => {
|
|
720
|
-
const q = me.trim(), A = !he(q), U = A ? e.find((se) =>
|
|
721
|
+
const q = me.trim(), A = !he(q), U = A ? e.find((se) => g(se) === q) : void 0;
|
|
721
722
|
z(U || (!k && C && A ? q : null)), v(m), s == null || s(
|
|
722
|
-
A ? !e.some((se) =>
|
|
723
|
+
A ? !e.some((se) => g(se) === q) : null
|
|
723
724
|
), a && M && T(), b == null || b(!0);
|
|
724
725
|
},
|
|
725
726
|
disabled: p,
|
|
726
727
|
defaultWidth: !1,
|
|
727
728
|
isRequired: R,
|
|
728
|
-
touched:
|
|
729
|
+
touched: w,
|
|
729
730
|
error: I,
|
|
730
731
|
...pe,
|
|
731
|
-
clearable:
|
|
732
|
-
onClear:
|
|
732
|
+
clearable: N,
|
|
733
|
+
onClear: N ? E : Y,
|
|
733
734
|
endIcon: a && !l ? /* @__PURE__ */ o(
|
|
734
735
|
"button",
|
|
735
736
|
{
|
|
@@ -755,7 +756,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
|
|
|
755
756
|
minLength: f,
|
|
756
757
|
inputValue: (Z || "").trim(),
|
|
757
758
|
getItemProps: S(L, ie, c),
|
|
758
|
-
parseValueToString:
|
|
759
|
+
parseValueToString: g,
|
|
759
760
|
optionVariant: u,
|
|
760
761
|
createWithoutConfirmation: C,
|
|
761
762
|
className: B,
|
|
@@ -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>;
|
|
@@ -52,6 +52,7 @@ export { default as PriorityLowIcon } from './svg/priorityLow.svg';
|
|
|
52
52
|
export { default as PriorityMediumIcon } from './svg/priorityMedium.svg';
|
|
53
53
|
export { default as PriorityUnspecifiedIcon } from './svg/priorityUnspecified.svg';
|
|
54
54
|
export { default as RefreshIcon } from './svg/refresh.svg';
|
|
55
|
+
export { default as ResizeColumnIcon } from './svg/resizeColumn.svg';
|
|
55
56
|
export { default as RerunIcon } from './svg/rerun.svg';
|
|
56
57
|
export { default as SearchIcon } from './svg/search.svg';
|
|
57
58
|
export { default as SortIcon } from './svg/sort.svg';
|