@reportportal/ui-kit 0.0.1-alpha.145 → 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.
@@ -1,69 +1,69 @@
1
- import { jsx as l, jsxs as g, Fragment as M } from "react/jsx-runtime";
2
- import { useRef as Z, useState as v, useCallback as m, useMemo as h, useEffect as S } from "react";
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 P } from "./button-97d9e587.js";
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-wrapper_1yg21_16",
9
- "tag-list-wrapper--show-all-view": "_tag-list-wrapper--show-all-view_1yg21_19",
10
- "tag-list": "_tag-list_1yg21_16",
11
- "tag-list--full-width": "_tag-list--full-width_1yg21_31",
12
- "tag-list--show-all-view": "_tag-list--show-all-view_1yg21_34",
13
- "tag-list--expanded": "_tag-list--expanded_1yg21_40",
14
- "tag-list--no-tags": "_tag-list--no-tags_1yg21_45",
15
- "tag-list__item": "_tag-list__item_1yg21_49",
16
- "tag-list__item-title": "_tag-list__item-title_1yg21_78",
17
- "tag-list__item--is-editable": "_tag-list__item--is-editable_1yg21_93",
18
- "tag-list__item-remove": "_tag-list__item-remove_1yg21_99",
19
- "tag-list__item--count": "_tag-list__item--count_1yg21_123",
20
- "tag-list__item--button-show-all-view": "_tag-list__item--button-show-all-view_1yg21_137",
21
- "tag-list__item--button-wrapper": "_tag-list__item--button-wrapper_1yg21_141",
22
- "no-tags-message": "_no-tags-message_1yg21_158"
23
- }, a = A.bind(lt), pt = ({
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: c,
28
- noTagsMessage: R = "No tags added",
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), [E, b] = v(0), [o, $] = v(!1), [j, w] = v(/* @__PURE__ */ new Set()), [B, Y] = v(!1), U = m(
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(), c == null || c(n);
35
+ t.stopPropagation(), r == null || r(n);
36
36
  },
37
- [c]
38
- ), k = m(() => {
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
- (r) => !r.classList.contains("tag-list__item--button")
43
+ (c) => !c.classList.contains("tag-list__item--button")
44
44
  );
45
45
  if (i.length === 0)
46
46
  return;
47
- const p = i[0].offsetTop, x = t.getBoundingClientRect().right;
48
- let u = 0;
49
- i.forEach((r, f) => {
50
- const T = r.getBoundingClientRect(), Q = r.offsetTop !== p, X = T.right > x;
51
- (Q || X) && (n.add(f), u += 1);
52
- }), w(n), b(u);
53
- }, []), D = m(() => {
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
- (f) => !f.classList.contains("tag-list__item--button")
58
+ (u) => !u.classList.contains("tag-list__item--button")
59
59
  );
60
60
  if (i.length === 0)
61
61
  return;
62
- const p = i[0].offsetTop, _ = i[0].offsetHeight, x = p + _ * (s - 1);
63
- let u = 0, r = !1;
64
- i.forEach((f, T) => {
65
- f.offsetTop > x + ot && (n.add(T), u += 1, r = !0);
66
- }), w(n), b(u), Y(r);
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 ? D() : k();
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
- D,
84
- E
84
+ v
85
85
  ]);
86
- const N = m(() => {
87
- $((t) => !t);
86
+ const x = m(() => {
87
+ R((t) => !t);
88
88
  }, []), z = (t) => {
89
- t.stopPropagation(), N();
90
- }, y = m(
89
+ t.stopPropagation(), x();
90
+ }, E = m(
91
91
  (t) => {
92
- t.stopPropagation(), N();
92
+ t.stopPropagation(), x();
93
93
  },
94
- [N]
95
- ), J = h(() => E > 0 && !o, [E, o]), F = 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
- ), G = h(() => /* @__PURE__ */ l("div", { className: a("tag-list__item--button-wrapper"), children: /* @__PURE__ */ l(
99
- P,
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: y,
102
+ onClick: E,
103
103
  variant: "text",
104
104
  children: I
105
105
  }
106
- ) }), [y, I]), W = h(() => /* @__PURE__ */ l("div", { className: a({ "tag-list__item--button-wrapper": e }), children: /* @__PURE__ */ l(
107
- P,
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: y,
112
+ onClick: E,
113
113
  variant: "text",
114
114
  children: e && s ? H : O
115
115
  }
116
- ) }), [y, e, s, H, O]), K = m((t, n) => {
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: R }) }) }) : /* @__PURE__ */ g("div", { className: a("tag-list-wrapper", { "tag-list-wrapper--show-all-view": e }), 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 && j.has(n), p = !e && i;
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": !!c }),
135
+ className: a("tag-list__item", { "tag-list__item--is-editable": !!r }),
136
136
  style: {
137
- display: p ? "none" : "flex"
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
- c && /* @__PURE__ */ l(
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(M, { children: [
163
- o && W,
164
- F && G
162
+ !e && /* @__PURE__ */ g(W, { children: [
163
+ o && G,
164
+ D && F
165
165
  ] })
166
166
  ]
167
167
  }
168
168
  ),
169
- e && /* @__PURE__ */ g(M, { children: [
170
- o && W,
171
- F && G
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
- E
181
+ v
182
182
  ]
183
183
  }
184
184
  ) : null
185
185
  ] });
186
186
  };
187
187
  export {
188
- pt as AdaptiveTagList
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 = 216;
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-893c692c.js";
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) => {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-f8e0df24.js";
2
- import { r as E } from "./datePicker-f8e0df24.js";
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-893c692c.js";
14
+ import "./dropdown-798def53.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";