@reportportal/ui-kit 0.0.1-alpha.193 → 0.0.1-alpha.195

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/bulkPanel.js CHANGED
@@ -1,26 +1,26 @@
1
- import { jsx as n, jsxs as s, Fragment as y } from "react/jsx-runtime";
2
- import { useState as k, useRef as U, useMemo as P, useCallback as _, useEffect as z } from "react";
3
- import { createPortal as H } from "react-dom";
4
- import { c as J } from "./bind-06a7ff84.js";
5
- import { Scrollbars as Q } from "rc-scrollbars";
6
- import { u as X } from "./useOnClickOutside-8f7d68a1.js";
1
+ import { jsx as n, jsxs as a, Fragment as P } from "react/jsx-runtime";
2
+ import { useState as k, useRef as z, useMemo as G, useCallback as _, useEffect as H } from "react";
3
+ import { createPortal as J } from "react-dom";
4
+ import { c as Q } from "./bind-06a7ff84.js";
5
+ import { Scrollbars as X } from "rc-scrollbars";
6
+ import { u as Z } from "./useOnClickOutside-8f7d68a1.js";
7
7
  import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
- import { K as Z } from "./keyCodes-f63c0e11.js";
10
- import { S as ee } from "./selection-da1a3528.js";
11
- import { Chip as ne } from "./chip.js";
9
+ import { K as ee } from "./keyCodes-f63c0e11.js";
10
+ import { S as ne } from "./selection-da1a3528.js";
11
+ import { Chip as le } from "./chip.js";
12
12
  import { B } from "./button-7ab874f3.js";
13
- import { Tooltip as le } from "./tooltip.js";
14
- import { S as te } from "./chevronDownDropdown-0260bb66.js";
15
- import { S as ie } from "./warning-537ead32.js";
13
+ import { Tooltip as te } from "./tooltip.js";
14
+ import { S as ie } from "./chevronDownDropdown-0260bb66.js";
15
+ import { S as se } from "./warning-537ead32.js";
16
16
  import "./close-4d480ef7.js";
17
17
  import "@floating-ui/react";
18
18
  import "./floatingUi-41f8c7b5.js";
19
- const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119", ce = "_tab_ue1t9_119", re = "_active_ue1t9_146", de = "_item_ue1t9_99", me = {
19
+ const ae = "_expanded_ue1t9_6", oe = "_header_ue1t9_32", ce = "_tabs_ue1t9_119", re = "_tab_ue1t9_119", de = "_active_ue1t9_146", me = "_item_ue1t9_99", pe = {
20
20
  "bulk-panel": "_bulk-panel_ue1t9_1",
21
21
  expanded: ae,
22
22
  "panel-content": "_panel-content_ue1t9_16",
23
- header: se,
23
+ header: oe,
24
24
  "header-actions": "_header-actions_ue1t9_43",
25
25
  "warning-icon": "_warning-icon_ue1t9_49",
26
26
  "info-message-container": "_info-message-container_ue1t9_58",
@@ -29,21 +29,21 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
29
29
  "expand-icon": "_expand-icon_ue1t9_87",
30
30
  "items-section": "_items-section_ue1t9_99",
31
31
  "items-header": "_items-header_ue1t9_110",
32
- tabs: oe,
33
- tab: ce,
32
+ tabs: ce,
33
+ tab: re,
34
34
  "tab-count": "_tab-count_ue1t9_142",
35
- active: re,
35
+ active: de,
36
36
  "items-scroll": "_items-scroll_ue1t9_162",
37
37
  "items-list": "_items-list_ue1t9_167",
38
- item: de,
38
+ item: me,
39
39
  "tooltip-wrapper": "_tooltip-wrapper_ue1t9_179"
40
- }, l = J.bind(me), pe = {
40
+ }, l = Q.bind(pe), ue = {
41
41
  selected: "selected",
42
42
  clearSelection: "Clear selection",
43
43
  selectedItems: "Selected items",
44
44
  eligibleTab: "Eligible Items",
45
45
  ineligibleTab: "Ineligible Items",
46
- ineligibleInfoMessage: (t) => /* @__PURE__ */ s(y, { children: [
46
+ ineligibleInfoMessage: (t) => /* @__PURE__ */ a(P, { children: [
47
47
  "You have ",
48
48
  /* @__PURE__ */ n("b", { children: t }),
49
49
  " ineligible item",
@@ -61,16 +61,17 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
61
61
  infoMessage: x,
62
62
  className: K,
63
63
  portalRoot: f,
64
+ zIndex: M = 2,
64
65
  onRemoveItem: w,
65
- onClearSelection: M
66
+ onClearSelection: O
66
67
  }) => {
67
- const r = { ...pe, ...D }, [o, v] = k(!1), [I, C] = k(u.INELIGIBLE), [i, E] = k(null), S = U(null), d = i !== null, { eligibleItems: b, ineligibleItems: h } = P(() => {
68
+ const r = { ...ue, ...D }, [o, v] = k(!1), [I, C] = k(u.INELIGIBLE), [i, E] = k(null), S = z(null), d = i !== null, { eligibleItems: b, ineligibleItems: h } = G(() => {
68
69
  var g;
69
70
  if (!i)
70
71
  return { eligibleItems: [], ineligibleItems: [] };
71
- const e = ((g = i.onValidate) == null ? void 0 : g.call(i, t)) ?? [], a = new Set(e.map((L) => L.id));
72
- return { eligibleItems: t.filter((L) => !a.has(L.id)), ineligibleItems: e };
73
- }, [t, i]), m = b.length, p = h.length, O = d && m > 0, T = d && p > 0 ? r.ineligibleInfoMessage(p) : null, F = P(() => d ? p === 0 ? b : m === 0 ? h : I === u.ELIGIBLE ? b : h : t, [
72
+ const e = ((g = i.onValidate) == null ? void 0 : g.call(i, t)) ?? [], s = new Set(e.map((L) => L.id));
73
+ return { eligibleItems: t.filter((L) => !s.has(L.id)), ineligibleItems: e };
74
+ }, [t, i]), m = b.length, p = h.length, F = d && m > 0, T = d && p > 0 ? r.ineligibleInfoMessage(p) : null, V = G(() => d ? p === 0 ? b : m === 0 ? h : I === u.ELIGIBLE ? b : h : t, [
74
75
  d,
75
76
  t,
76
77
  b,
@@ -82,79 +83,80 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
82
83
  requestAnimationFrame(() => {
83
84
  v(!1);
84
85
  });
85
- }, []), V = _(
86
+ }, []), j = _(
86
87
  (e) => {
87
88
  var N, g;
88
89
  (N = e.onClick) == null || N.call(e), (((g = e.onValidate) == null ? void 0 : g.call(e, t)) ?? []).length === 0 ? (e.onProceed(t, !0), c()) : (E(e), C(u.INELIGIBLE), v(!0));
89
90
  },
90
91
  [t, c]
91
- ), j = _(() => {
92
+ ), W = _(() => {
92
93
  const e = i == null ? void 0 : i.onCancel;
93
94
  E(null), c(), e == null || e();
94
- }, [i, c]), W = _(() => {
95
+ }, [i, c]), Y = _(() => {
95
96
  i == null || i.onProceed(b), E(null), c();
96
- }, [i, b, c]), Y = _(() => {
97
+ }, [i, b, c]), q = _(() => {
97
98
  v((e) => !e);
98
- }, []), q = _(
99
+ }, []), A = _(
99
100
  (e) => {
100
101
  w(e);
101
102
  },
102
103
  [w]
103
104
  );
104
- if (z(() => {
105
+ if (H(() => {
105
106
  if (!o)
106
107
  return;
107
- const e = (a) => {
108
- a.keyCode === Z.ESCAPE_KEY_CODE && c();
108
+ const e = (s) => {
109
+ s.keyCode === ee.ESCAPE_KEY_CODE && c();
109
110
  };
110
111
  return document.addEventListener("keydown", e, !1), () => document.removeEventListener("keydown", e, !1);
111
- }, [o, c]), X(S, o ? c : void 0), t.length === 0)
112
+ }, [o, c]), Z(S, o ? c : void 0), t.length === 0)
112
113
  return null;
113
- const A = (e) => h.some((a) => a.id === e.id), R = (e) => {
114
- const a = /* @__PURE__ */ n(
115
- ne,
114
+ const R = (e) => h.some((s) => s.id === e.id), U = (e) => {
115
+ const s = /* @__PURE__ */ n(
116
+ le,
116
117
  {
117
- onRemove: () => q(e.id),
118
- variant: A(e) && d ? "error" : "default",
118
+ onRemove: () => A(e.id),
119
+ variant: R(e) && d ? "error" : "default",
119
120
  children: e.label ?? e.name
120
121
  },
121
122
  e.id
122
123
  );
123
124
  return /* @__PURE__ */ n("div", { className: l("item"), children: e.tooltipContent ? /* @__PURE__ */ n(
124
- le,
125
+ te,
125
126
  {
126
127
  wrapperClassName: l("tooltip-wrapper"),
127
128
  content: e.tooltipContent,
128
129
  placement: "top",
129
130
  width: 270,
130
131
  portalRoot: f,
131
- children: a
132
+ children: s
132
133
  },
133
134
  e.id
134
- ) : a }, e.id);
135
- }, G = /* @__PURE__ */ n(
135
+ ) : s }, e.id);
136
+ }, y = /* @__PURE__ */ n(
136
137
  "div",
137
138
  {
138
139
  className: l("bulk-panel", { expanded: o }, K),
139
140
  role: "region",
140
141
  "aria-label": "Bulk actions panel",
141
- children: /* @__PURE__ */ s("div", { className: l("panel-content", { expanded: o }), ref: S, children: [
142
- /* @__PURE__ */ s("div", { className: l("header"), children: [
143
- /* @__PURE__ */ s("div", { className: l("selection-info"), children: [
142
+ style: o ? { zIndex: M } : void 0,
143
+ children: /* @__PURE__ */ a("div", { className: l("panel-content", { expanded: o }), ref: S, children: [
144
+ /* @__PURE__ */ a("div", { className: l("header"), children: [
145
+ /* @__PURE__ */ a("div", { className: l("selection-info"), children: [
144
146
  /* @__PURE__ */ n(
145
147
  "button",
146
148
  {
147
- onClick: Y,
149
+ onClick: q,
148
150
  "aria-label": o ? "Collapse panel" : "Expand panel",
149
151
  "aria-expanded": o,
150
- children: /* @__PURE__ */ n("span", { className: l("expand-icon", { expanded: o }), children: /* @__PURE__ */ n(te, {}) })
152
+ children: /* @__PURE__ */ n("span", { className: l("expand-icon", { expanded: o }), children: /* @__PURE__ */ n(ie, {}) })
151
153
  }
152
154
  ),
153
155
  /* @__PURE__ */ n(
154
- ee,
156
+ ne,
155
157
  {
156
158
  selectedCount: t.length,
157
- onClearSelection: M,
159
+ onClearSelection: O,
158
160
  captions: {
159
161
  selected: r.selected,
160
162
  buttonCaption: r.clearSelection
@@ -162,29 +164,29 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
162
164
  }
163
165
  )
164
166
  ] }),
165
- /* @__PURE__ */ s("div", { className: l("header-actions"), children: [
166
- (T || x) && /* @__PURE__ */ s("div", { className: l("info-message-container"), children: [
167
- /* @__PURE__ */ n("i", { className: l("warning-icon"), children: /* @__PURE__ */ n(ie, {}) }),
167
+ /* @__PURE__ */ a("div", { className: l("header-actions"), children: [
168
+ (T || x) && /* @__PURE__ */ a("div", { className: l("info-message-container"), children: [
169
+ /* @__PURE__ */ n("i", { className: l("warning-icon"), children: /* @__PURE__ */ n(se, {}) }),
168
170
  /* @__PURE__ */ n("div", { className: l("info-message"), children: T || x })
169
171
  ] }),
170
- /* @__PURE__ */ n("div", { className: l("buttons-container"), children: d ? /* @__PURE__ */ s(y, { children: [
171
- /* @__PURE__ */ n(B, { variant: "ghost", onClick: j, children: r.cancelButton((i == null ? void 0 : i.label) ?? "") }),
172
- O && /* @__PURE__ */ n(B, { variant: "primary", onClick: W, children: r.proceedButton(m) })
173
- ] }) : $.map((e, a) => /* @__PURE__ */ n(
172
+ /* @__PURE__ */ n("div", { className: l("buttons-container"), children: d ? /* @__PURE__ */ a(P, { children: [
173
+ /* @__PURE__ */ n(B, { variant: "ghost", onClick: W, children: r.cancelButton((i == null ? void 0 : i.label) ?? "") }),
174
+ F && /* @__PURE__ */ n(B, { variant: "primary", onClick: Y, children: r.proceedButton(m) })
175
+ ] }) : $.map((e, s) => /* @__PURE__ */ n(
174
176
  B,
175
177
  {
176
178
  variant: e.variant,
177
- onClick: () => V(e),
179
+ onClick: () => j(e),
178
180
  disabled: e.disabled,
179
181
  children: e.label
180
182
  },
181
- `${e.label}-${a}`
183
+ `${e.label}-${s}`
182
184
  )) })
183
185
  ] })
184
186
  ] }),
185
- /* @__PURE__ */ s("div", { className: l("items-section"), children: [
186
- /* @__PURE__ */ n("div", { className: l("items-header"), children: d ? /* @__PURE__ */ s("div", { className: l("tabs"), children: [
187
- p > 0 && /* @__PURE__ */ s(
187
+ /* @__PURE__ */ a("div", { className: l("items-section"), children: [
188
+ /* @__PURE__ */ n("div", { className: l("items-header"), children: d ? /* @__PURE__ */ a("div", { className: l("tabs"), children: [
189
+ p > 0 && /* @__PURE__ */ a(
188
190
  "button",
189
191
  {
190
192
  className: l("tab", {
@@ -197,7 +199,7 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
197
199
  ]
198
200
  }
199
201
  ),
200
- m > 0 && /* @__PURE__ */ s(
202
+ m > 0 && /* @__PURE__ */ a(
201
203
  "button",
202
204
  {
203
205
  className: l("tab", {
@@ -211,12 +213,12 @@ const ae = "_expanded_ue1t9_6", se = "_header_ue1t9_32", oe = "_tabs_ue1t9_119",
211
213
  }
212
214
  )
213
215
  ] }) : r.selectedItems }),
214
- /* @__PURE__ */ n("div", { className: l("items-scroll"), children: /* @__PURE__ */ n(Q, { hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ n("div", { className: l("items-list"), children: F.map((e) => R(e)) }) }) })
216
+ /* @__PURE__ */ n("div", { className: l("items-scroll"), children: /* @__PURE__ */ n(X, { hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ n("div", { className: l("items-list"), children: V.map((e) => U(e)) }) }) })
215
217
  ] })
216
218
  ] })
217
219
  }
218
220
  );
219
- return o && f ? H(G, f) : G;
221
+ return o && f ? J(y, f) : y;
220
222
  };
221
223
  export {
222
224
  Ge as BulkPanel
@@ -1,3 +1,3 @@
1
1
  import { BulkPanelProps } from './types';
2
2
 
3
- export declare const BulkPanel: ({ items, actions, captions: captionsProp, infoMessage, className, portalRoot, onRemoveItem, onClearSelection, }: BulkPanelProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ export declare const BulkPanel: ({ items, actions, captions: captionsProp, infoMessage, className, portalRoot, zIndex, onRemoveItem, onClearSelection, }: BulkPanelProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -41,6 +41,7 @@ export interface BulkPanelProps {
41
41
  infoMessage?: ReactNode;
42
42
  className?: string;
43
43
  portalRoot?: Element;
44
+ zIndex?: number;
44
45
  onRemoveItem: (id: string | number) => void;
45
46
  onClearSelection: () => void;
46
47
  }
@@ -3,7 +3,7 @@ import { useMemo as E, forwardRef as G, useRef as V } from "react";
3
3
  import v from "react-datepicker/dist/es/index.js";
4
4
  import { c as L } from "./bind-06a7ff84.js";
5
5
  import { F as W } from "./fieldText-1749da7a.js";
6
- import { D as x } from "./dropdown-1c7e1b67.js";
6
+ import { D as x } from "./dropdown-aec82d1f.js";
7
7
  import { S as I } from "./calendarArrow-44c7e60e.js";
8
8
  import { registerLocale as q } from "react-datepicker";
9
9
  const De = (t, n) => {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-b9a14640.js";
2
- import { r as E } from "./datePicker-b9a14640.js";
1
+ import { D as t } from "./datePicker-954bd00b.js";
2
+ import { r as E } from "./datePicker-954bd00b.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-datepicker/dist/es/index.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-1c7e1b67.js";
14
+ import "./dropdown-aec82d1f.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";