@reportportal/ui-kit 0.0.1-alpha.249 → 0.0.1-alpha.250

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.
@@ -55,6 +55,7 @@ export interface TableComponentProps {
55
55
  bodyClassName?: string;
56
56
  rowClassName?: string;
57
57
  checkboxColumnClassName?: string;
58
+ expandColumnClassName?: string;
58
59
  selectedRowIds?: (string | number)[];
59
60
  sortingDirection?: SortingDirection;
60
61
  sortingColumn?: Column;
@@ -63,7 +64,11 @@ export interface TableComponentProps {
63
64
  isHorizontallyScrollable?: boolean;
64
65
  pinnedColumnKeys?: string[];
65
66
  isRowsExpandable?: boolean;
67
+ isExpandAllVisible?: boolean;
66
68
  expandedRowIds?: (string | number)[];
69
+ canExpandRow?: (row: RowData) => boolean;
70
+ rowExpansionMode?: 'cellContent' | 'detail';
71
+ renderExpandedRow?: (row: RowData) => ReactNode;
67
72
  isSelectAllCheckboxAlwaysVisible?: boolean;
68
73
  disabledRowIds?: (string | number)[];
69
74
  setExpandedRowIds?: Dispatch<SetStateAction<Set<string | number>>>;
@@ -77,7 +82,7 @@ export interface TableComponentProps {
77
82
  onToggleRowSelection?: (id: string | number) => void;
78
83
  onToggleAllRowsSelection?: () => void;
79
84
  onToggleRowExpansion?: (id: string | number) => void;
80
- onToggleAllRowsExpansion?: () => void;
85
+ onToggleAllRowsExpansion?: (expandableRowIds: (string | number)[]) => void;
81
86
  onColumnResize?: (columnKey: string, width: number) => void;
82
87
  getRowCheckboxTooltip?: (rowId: string | number) => ReactNode;
83
88
  externalScrollContainerRef?: RefObject<HTMLElement> | RefObject<Element> | null | undefined;
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import { S as Ro } from "./spinLoader-c4a53718.js";
31
31
  import { SystemAlert as Oo } from "./systemAlert.js";
32
32
  import { S as Uo } from "./systemMessage-924fdaa6.js";
33
33
  import { DragLayer as zo, SortableItem as Go, SortableList as Jo, TreeSortableContainer as Vo, TreeSortableItem as _o } from "./sortable.js";
34
- import { T as Xo } from "./table-8cdbfdfb.js";
34
+ import { T as Xo } from "./table-fc873b61.js";
35
35
  import { T as qo } from "./themeProvider-46c2be7b.js";
36
36
  import { T as Qo } from "./toggle-304107fa.js";
37
37
  import { Tooltip as Zo } from "./tooltip.js";
package/dist/modal.js CHANGED
@@ -1,19 +1,19 @@
1
- import { jsx as o, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
- import { useState as H, useRef as G, useCallback as A, useEffect as k, useMemo as K } from "react";
3
- import { Scrollbars as U } from "rc-scrollbars";
1
+ import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
+ import { useState as y, useRef as G, useCallback as M, useEffect as x, useMemo as U } from "react";
3
+ import { Scrollbars as X } from "rc-scrollbars";
4
4
  import { AnimatePresence as Y, motion as V } from "framer-motion";
5
5
  import { c as b } from "./bind-06a7ff84.js";
6
- import { u as X } from "./useOnClickOutside-8f7d68a1.js";
6
+ import { u as Z } from "./useOnClickOutside-8f7d68a1.js";
7
7
  import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
9
  import { u as q } from "./useWindowResize-a7e1ac92.js";
10
10
  import { A as J } from "./constants-85822a6b.js";
11
11
  import { a as Q } from "./dropdown-d2a05471.js";
12
- import { K as Z } from "./keyCodes-f63c0e11.js";
13
- import { B as x } from "./button-7ab874f3.js";
14
- import { Tooltip as oo } from "./tooltip.js";
15
- import { B as eo } from "./baseIconButton-251479f7.js";
16
- import { S as to } from "./close-4d480ef7.js";
12
+ import { K as ee } from "./keyCodes-f63c0e11.js";
13
+ import { B as R } from "./button-7ab874f3.js";
14
+ import { Tooltip as te } from "./tooltip.js";
15
+ import { B as oe } from "./baseIconButton-251479f7.js";
16
+ import { S as ne } from "./close-4d480ef7.js";
17
17
  import "react-dom";
18
18
  import "@floating-ui/react-dom";
19
19
  import "downshift";
@@ -26,154 +26,149 @@ import "./useEllipsisTitle-462fa254.js";
26
26
  import "./checkbox-76aa8f97.js";
27
27
  import "@floating-ui/react";
28
28
  import "./floatingUi-46f5b896.js";
29
- const no = {
29
+ const ae = {
30
30
  "modal-content": "_modal-content_ppzcb_1"
31
- }, lo = b.bind(no), C = ({ children: t }) => /* @__PURE__ */ o("div", { className: lo("modal-content"), children: t }), so = {
31
+ }, ie = b.bind(ae), C = ({ children: o }) => /* @__PURE__ */ e("div", { className: ie("modal-content"), children: o }), se = {
32
32
  "buttons-block": "_buttons-block_1mwne_1",
33
33
  "button-container": "_button-container_1mwne_7",
34
34
  "modal-footer": "_modal-footer_1mwne_12",
35
35
  "with-extra-node": "_with-extra-node_1mwne_19",
36
36
  "size-small": "_size-small_1mwne_23"
37
- }, h = b.bind(so), ao = ({
38
- footerNode: t,
39
- closeHandler: s,
40
- okButton: a,
41
- cancelButton: p,
42
- size: r
37
+ }, f = b.bind(se), le = ({
38
+ footerNode: o,
39
+ closeHandler: n,
40
+ okButton: i,
41
+ cancelButton: u,
42
+ size: s
43
43
  }) => {
44
- const { tooltipNode: f, ...m } = a || {}, v = () => {
45
- const _ = /* @__PURE__ */ o(x, { adjustWidthOn: r === "small" ? "parent" : "min-width", ...m });
46
- return f ? /* @__PURE__ */ o(oo, { content: f, placement: "top", width: 270, children: _ }) : _;
44
+ const { tooltipNode: p, ...m } = i || {}, v = () => {
45
+ const _ = /* @__PURE__ */ e(R, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...m });
46
+ return p ? /* @__PURE__ */ e(te, { content: p, placement: "top", width: 270, children: _ }) : _;
47
47
  };
48
- return /* @__PURE__ */ d("div", { className: h("modal-footer", { "with-extra-node": t, [`size-${r}`]: r }), children: [
49
- t && t,
50
- /* @__PURE__ */ d("div", { className: h("buttons-block"), children: [
51
- p && /* @__PURE__ */ o("div", { className: h("button-container"), children: /* @__PURE__ */ o(
52
- x,
48
+ return /* @__PURE__ */ d("div", { className: f("modal-footer", { "with-extra-node": o, [`size-${s}`]: s }), children: [
49
+ o && o,
50
+ /* @__PURE__ */ d("div", { className: f("buttons-block"), children: [
51
+ u && /* @__PURE__ */ e("div", { className: f("button-container"), children: /* @__PURE__ */ e(
52
+ R,
53
53
  {
54
54
  variant: "ghost",
55
- adjustWidthOn: r === "small" ? "parent" : "min-width",
56
- onClick: s,
57
- ...p
55
+ adjustWidthOn: s === "small" ? "parent" : "min-width",
56
+ onClick: n,
57
+ ...u
58
58
  }
59
59
  ) }),
60
- a && /* @__PURE__ */ o("div", { className: h("button-container"), children: v() })
60
+ i && /* @__PURE__ */ e("div", { className: f("button-container"), children: v() })
61
61
  ] })
62
62
  ] });
63
- }, ro = {
63
+ }, re = {
64
64
  "modal-header": "_modal-header_w4aaf_1",
65
65
  "width-description": "_width-description_w4aaf_10",
66
66
  "modal-header-content": "_modal-header-content_w4aaf_14",
67
67
  "modal-title": "_modal-title_w4aaf_20",
68
68
  "close-modal-icon": "_close-modal-icon_w4aaf_29"
69
- }, w = b.bind(ro), io = ({ title: t, onClose: s, withDescription: a = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": a }), children: [
70
- /* @__PURE__ */ o("div", { className: w("modal-header-content"), children: t && /* @__PURE__ */ o("div", { className: w("modal-title"), children: t }) }),
71
- /* @__PURE__ */ o(eo, { className: w("close-modal-icon"), onClick: s, children: /* @__PURE__ */ o(to, {}) })
72
- ] }), co = "_modal_npf1n_1", mo = "_description_npf1n_43", _o = {
73
- modal: co,
74
- "overlay-default": "_overlay-default_npf1n_12",
75
- "overlay-light-cyan": "_overlay-light-cyan_npf1n_16",
76
- "scrolling-content": "_scrolling-content_npf1n_20",
77
- "modal-window": "_modal-window_npf1n_26",
78
- description: mo,
79
- "scrollable-wrapper": "_scrollable-wrapper_npf1n_54",
80
- "scrollable-content": "_scrollable-content_npf1n_58",
81
- "scrollbars-scroll-view": "_scrollbars-scroll-view_npf1n_62",
82
- "scrollbars-scroll-track": "_scrollbars-scroll-track_npf1n_66",
83
- "size-default": "_size-default_npf1n_70",
84
- "size-small": "_size-small_npf1n_82",
85
- "size-large": "_size-large_npf1n_94"
86
- }, n = b.bind(_o), po = 0.9, fo = 32 + 24, uo = 32 + 8, ho = 36 + 16, wo = 32 * 2, Yo = ({
87
- title: t,
88
- children: s,
89
- footerNode: a,
90
- okButton: p,
91
- cancelButton: r,
92
- className: f,
69
+ }, w = b.bind(re), ce = ({ title: o, onClose: n, withDescription: i = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": i }), children: [
70
+ /* @__PURE__ */ e("div", { className: w("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: w("modal-title"), children: o }) }),
71
+ /* @__PURE__ */ e(oe, { className: w("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(ne, {}) })
72
+ ] }), de = "_modal_35896_1", me = "_description_35896_43", _e = {
73
+ modal: de,
74
+ "overlay-default": "_overlay-default_35896_12",
75
+ "overlay-light-cyan": "_overlay-light-cyan_35896_16",
76
+ "scrolling-content": "_scrolling-content_35896_20",
77
+ "modal-window": "_modal-window_35896_26",
78
+ description: me,
79
+ "scrollable-wrapper": "_scrollable-wrapper_35896_54",
80
+ "scrollable-content": "_scrollable-content_35896_58",
81
+ "size-default": "_size-default_35896_62",
82
+ "size-small": "_size-small_35896_74",
83
+ "size-large": "_size-large_35896_86"
84
+ }, c = b.bind(_e), ue = 0.9, pe = 32 + 24, he = 32 + 8, fe = 36 + 16, we = 32 * 2, be = "auto", k = ({ style: o, ...n }) => /* @__PURE__ */ e("div", { ...n, style: { ...o, zIndex: be } }), Ye = ({
85
+ title: o,
86
+ children: n,
87
+ footerNode: i,
88
+ okButton: u,
89
+ cancelButton: s,
90
+ className: p,
93
91
  size: m = "default",
94
92
  onClose: v = () => {
95
93
  },
96
94
  overlay: _ = "default",
97
- zIndex: R = 2,
98
- allowCloseOutside: D = !0,
95
+ zIndex: D = 2,
96
+ allowCloseOutside: S = !0,
99
97
  scrollable: z = !1,
100
98
  withoutFooter: N = !1,
101
- createFooter: E = null,
102
- description: i = null
99
+ createFooter: A = null,
100
+ description: l = null
103
101
  }) => {
104
- const [g, M] = H(!1), [S, I] = H(0), [L, $] = H(!1), l = G(null), T = q().height, P = T * po, O = (T - S) / 2, W = () => {
105
- let e = P - wo;
106
- return N || (e = e - ho), i ? e = e - uo : e = e - fo, e;
107
- }, c = A(() => {
108
- M(!1);
109
- }, []), y = A(
110
- (e) => {
111
- const { keyCode: u } = e;
112
- u === Z.ESCAPE_KEY_CODE && c();
102
+ const [O, E] = y(!1), [I, L] = y(0), [$, P] = y(!1), a = G(null), H = q().height, B = H * ue, g = (H - I) / 2, W = () => {
103
+ let t = B - we;
104
+ return N || (t = t - fe), l ? t = t - he : t = t - pe, t;
105
+ }, r = M(() => {
106
+ E(!1);
107
+ }, []), T = M(
108
+ (t) => {
109
+ const { keyCode: h } = t;
110
+ h === ee.ESCAPE_KEY_CODE && r();
113
111
  },
114
- [c]
115
- ), B = () => {
116
- var e;
117
- L || ((e = l.current) == null || e.focus(), $(!0));
112
+ [r]
113
+ ), K = () => {
114
+ var t;
115
+ $ || ((t = a.current) == null || t.focus(), P(!0));
118
116
  };
119
- k(() => {
120
- if (!g || !l.current)
117
+ x(() => {
118
+ if (!O || !a.current)
121
119
  return;
122
- const e = () => {
123
- l.current && I(l.current.clientHeight);
120
+ const t = () => {
121
+ a.current && L(a.current.clientHeight);
124
122
  };
125
- if (e(), typeof ResizeObserver > "u")
123
+ if (t(), typeof ResizeObserver > "u")
126
124
  return;
127
- const u = new ResizeObserver(e);
128
- return u.observe(l.current), () => u.disconnect();
129
- }, [g]), k(() => (M(!0), document.addEventListener("keydown", y, !1), () => document.removeEventListener("keydown", y, !1)), [y]);
130
- const j = K(
125
+ const h = new ResizeObserver(t);
126
+ return h.observe(a.current), () => h.disconnect();
127
+ }, [O]), x(() => (E(!0), document.addEventListener("keydown", T, !1), () => document.removeEventListener("keydown", T, !1)), [T]);
128
+ const j = U(
131
129
  () => ({
132
130
  ignoreSelectors: [`[${Q}]`, `[${J}]`]
133
131
  }),
134
132
  []
135
133
  );
136
- return X(l, D ? c : void 0, j), /* @__PURE__ */ o(Y, { onExitComplete: v, children: g && /* @__PURE__ */ o("div", { className: n("modal", { [`overlay-${_}`]: _ }), style: { zIndex: R }, children: /* @__PURE__ */ d(
134
+ return Z(a, S ? r : void 0, j), /* @__PURE__ */ e(Y, { onExitComplete: v, children: O && /* @__PURE__ */ e("div", { className: c("modal", { [`overlay-${_}`]: _ }), style: { zIndex: D }, children: /* @__PURE__ */ d(
137
135
  V.div,
138
136
  {
139
- className: n("modal-window", { [`size-${m}`]: m }, f),
140
- ref: l,
137
+ className: c("modal-window", { [`size-${m}`]: m }, p),
138
+ ref: a,
141
139
  tabIndex: 0,
142
- initial: { opacity: 0, marginTop: -O },
143
- animate: { opacity: 1, marginTop: O },
144
- exit: { opacity: 0, marginTop: -O },
140
+ initial: { opacity: 0, marginTop: -g },
141
+ animate: { opacity: 1, marginTop: g },
142
+ exit: { opacity: 0, marginTop: -g },
145
143
  transition: { duration: 0.3 },
146
- onAnimationStart: B,
144
+ onAnimationStart: K,
147
145
  children: [
148
- /* @__PURE__ */ o(io, { title: t, onClose: c, withDescription: !!i }),
149
- z ? /* @__PURE__ */ o("div", { className: n("scrollable-wrapper"), children: /* @__PURE__ */ o(
150
- U,
146
+ /* @__PURE__ */ e(ce, { title: o, onClose: r, withDescription: !!l }),
147
+ z ? /* @__PURE__ */ e("div", { className: c("scrollable-wrapper"), children: /* @__PURE__ */ e(
148
+ X,
151
149
  {
152
150
  autoHeight: !0,
153
151
  autoHeightMax: W(),
154
152
  hideTracksWhenNotNeeded: !0,
155
- classes: {
156
- view: n("scrollbars-scroll-view"),
157
- trackHorizontal: n("scrollbars-scroll-track"),
158
- trackVertical: n("scrollbars-scroll-track")
159
- },
160
- children: /* @__PURE__ */ d("div", { className: n("scrollable-content"), children: [
161
- i && /* @__PURE__ */ o("span", { className: n("description"), children: i }),
162
- /* @__PURE__ */ o(C, { children: s })
153
+ renderTrackHorizontal: k,
154
+ renderTrackVertical: k,
155
+ children: /* @__PURE__ */ d("div", { className: c("scrollable-content"), children: [
156
+ l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
157
+ /* @__PURE__ */ e(C, { children: n })
163
158
  ] })
164
159
  }
165
160
  ) }) : /* @__PURE__ */ d(F, { children: [
166
- i && /* @__PURE__ */ o("span", { className: n("description"), children: i }),
167
- /* @__PURE__ */ o(C, { children: s })
161
+ l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
162
+ /* @__PURE__ */ e(C, { children: n })
168
163
  ] }),
169
- !N && (E ? E(c) : /* @__PURE__ */ o(
170
- ao,
164
+ !N && (A ? A(r) : /* @__PURE__ */ e(
165
+ le,
171
166
  {
172
167
  size: m,
173
- footerNode: a,
174
- okButton: p,
175
- cancelButton: r,
176
- closeHandler: c
168
+ footerNode: i,
169
+ okButton: u,
170
+ cancelButton: s,
171
+ closeHandler: r
177
172
  }
178
173
  ))
179
174
  ]
@@ -182,8 +177,8 @@ const no = {
182
177
  ) }) });
183
178
  };
184
179
  export {
185
- Yo as Modal,
180
+ Ye as Modal,
186
181
  C as ModalContent,
187
- ao as ModalFooter,
188
- io as ModalHeader
182
+ le as ModalFooter,
183
+ ce as ModalHeader
189
184
  };