@reportportal/ui-kit 0.0.1-alpha.215 → 0.0.1-alpha.217
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/{actionMenu-e78f9615.js → actionMenu-6a964512.js} +28 -26
- package/dist/actionMenu.js +1 -1
- package/dist/components/actionMenu/actionMenu.d.ts +2 -2
- package/dist/components/tooltip/tooltip.d.ts +1 -0
- package/dist/filterItem.js +1 -1
- package/dist/index.js +1 -1
- package/dist/tooltip.js +50 -49
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { S as
|
|
4
|
-
import { B as
|
|
5
|
-
import { Popover as
|
|
6
|
-
import { c as
|
|
7
|
-
const
|
|
2
|
+
import { useState as V, useRef as w, useCallback as C, useEffect as F, isValidElement as K, Fragment as R } from "react";
|
|
3
|
+
import { S as U } from "./details-dbb1530b.js";
|
|
4
|
+
import { B as z } from "./baseIconButton-251479f7.js";
|
|
5
|
+
import { Popover as G } from "./popover.js";
|
|
6
|
+
import { c as H } from "./bind-06a7ff84.js";
|
|
7
|
+
const J = "_disabled_gfti4_69", L = "_divider_gfti4_76", m = {
|
|
8
8
|
"action-menu": "_action-menu_gfti4_16",
|
|
9
9
|
"actions-popover": "_actions-popover_gfti4_20",
|
|
10
10
|
"action-dropdown": "_action-dropdown_gfti4_24",
|
|
11
11
|
"action-menu-button": "_action-menu-button_gfti4_29",
|
|
12
12
|
"action-item": "_action-item_gfti4_42",
|
|
13
|
-
disabled:
|
|
14
|
-
divider:
|
|
15
|
-
}, l =
|
|
13
|
+
disabled: J,
|
|
14
|
+
divider: L
|
|
15
|
+
}, l = H.bind(m), ne = ({
|
|
16
16
|
className: p,
|
|
17
17
|
children: b,
|
|
18
18
|
...h
|
|
19
|
-
}) => /* @__PURE__ */ i("div", { className: l("action-item", p), tabIndex: -1, ...h, children: b }),
|
|
19
|
+
}) => /* @__PURE__ */ i("div", { className: l("action-item", p), tabIndex: -1, ...h, children: b }), te = ({
|
|
20
20
|
placement: p = "bottom-end",
|
|
21
21
|
items: b = [],
|
|
22
22
|
cleanupDividers: h = !0,
|
|
@@ -27,15 +27,16 @@ const H = "_disabled_gfti4_69", J = "_divider_gfti4_76", m = {
|
|
|
27
27
|
menuClassName: M,
|
|
28
28
|
ariaLabel: S,
|
|
29
29
|
trigger: v,
|
|
30
|
-
disabled: a = !1
|
|
30
|
+
disabled: a = !1,
|
|
31
|
+
shouldUsePortal: O
|
|
31
32
|
}) => {
|
|
32
|
-
const [u, f] =
|
|
33
|
+
const [u, f] = V(!1), c = w(null), _ = w(/* @__PURE__ */ new Map()), q = C(
|
|
33
34
|
(e) => {
|
|
34
35
|
a || f(e);
|
|
35
36
|
},
|
|
36
37
|
[a]
|
|
37
38
|
);
|
|
38
|
-
|
|
39
|
+
F(() => {
|
|
39
40
|
u && c.current && requestAnimationFrame(() => {
|
|
40
41
|
requestAnimationFrame(() => {
|
|
41
42
|
var n;
|
|
@@ -46,7 +47,7 @@ const H = "_disabled_gfti4_69", J = "_divider_gfti4_76", m = {
|
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
49
|
}, [u]);
|
|
49
|
-
const s = (e) => !!(e && typeof e == "object" && "type" in e && e.type === "divider"),
|
|
50
|
+
const s = (e) => !!(e && typeof e == "object" && "type" in e && e.type === "divider"), $ = (e) => s(e) ? !0 : typeof e == "object" && e !== null && "hasPermission" in e ? e.hasPermission !== !1 : !0, j = (e) => {
|
|
50
51
|
var r, I, d, k, x, D;
|
|
51
52
|
const n = Array.from(
|
|
52
53
|
((r = c.current) == null ? void 0 : r.querySelectorAll(
|
|
@@ -75,7 +76,7 @@ const H = "_disabled_gfti4_69", J = "_divider_gfti4_76", m = {
|
|
|
75
76
|
o && ((D = c.current) != null && D.contains(o)) && (o.click(), f(!1));
|
|
76
77
|
} else
|
|
77
78
|
e.key === "Escape" && (e.preventDefault(), f(!1));
|
|
78
|
-
},
|
|
79
|
+
}, B = (e) => {
|
|
79
80
|
const n = e.target, t = n.closest(`[role="menuitem"], .${m["action-item"]}`);
|
|
80
81
|
if (t && !t.hasAttribute("disabled")) {
|
|
81
82
|
if (n === t) {
|
|
@@ -86,7 +87,7 @@ const H = "_disabled_gfti4_69", J = "_divider_gfti4_76", m = {
|
|
|
86
87
|
}
|
|
87
88
|
f(!1);
|
|
88
89
|
}
|
|
89
|
-
},
|
|
90
|
+
}, P = (e, n) => s(e) ? /* @__PURE__ */ i("div", { className: l("divider") }, `divider-${n}`) : K(e) ? /* @__PURE__ */ i(R, { children: e }, n) : typeof e == "object" && e !== null && "label" in e ? e.hasPermission === !1 ? null : /* @__PURE__ */ i(
|
|
90
91
|
"button",
|
|
91
92
|
{
|
|
92
93
|
ref: (t) => {
|
|
@@ -114,42 +115,43 @@ const H = "_disabled_gfti4_69", J = "_divider_gfti4_76", m = {
|
|
|
114
115
|
n.shift();
|
|
115
116
|
for (; n.length > 0 && s(n[n.length - 1]); )
|
|
116
117
|
n.pop();
|
|
117
|
-
return n = n.filter((t, r) => !s(t) || r === 0 ? !0 : !s(n[r - 1])), n = n.filter((t, r) => s(t) ? n.slice(r + 1).some((d) =>
|
|
118
|
-
})(b).map(
|
|
118
|
+
return n = n.filter((t, r) => !s(t) || r === 0 ? !0 : !s(n[r - 1])), n = n.filter((t, r) => s(t) ? n.slice(r + 1).some((d) => $(d)) : !0), n;
|
|
119
|
+
})(b).map(P).filter(Boolean);
|
|
119
120
|
return y.length === 0 ? null : /* @__PURE__ */ i("div", { className: l("action-menu", A), children: /* @__PURE__ */ i(
|
|
120
|
-
|
|
121
|
+
G,
|
|
121
122
|
{
|
|
122
123
|
placement: p,
|
|
123
124
|
isOpened: a ? !1 : u,
|
|
124
|
-
setIsOpened:
|
|
125
|
+
setIsOpened: q,
|
|
126
|
+
shouldUsePortal: O,
|
|
125
127
|
content: /* @__PURE__ */ i(
|
|
126
128
|
"div",
|
|
127
129
|
{
|
|
128
130
|
ref: c,
|
|
129
131
|
role: "menu",
|
|
130
132
|
tabIndex: -1,
|
|
131
|
-
onKeyDown:
|
|
132
|
-
onClick:
|
|
133
|
+
onKeyDown: j,
|
|
134
|
+
onClick: B,
|
|
133
135
|
className: l("action-dropdown", M, N),
|
|
134
136
|
children: y
|
|
135
137
|
}
|
|
136
138
|
),
|
|
137
139
|
className: l("actions-popover", E),
|
|
138
140
|
children: v ? /* @__PURE__ */ i("div", { className: g, children: v }) : /* @__PURE__ */ i(
|
|
139
|
-
|
|
141
|
+
z,
|
|
140
142
|
{
|
|
141
143
|
className: l("action-menu-button", g),
|
|
142
144
|
disabled: a,
|
|
143
145
|
"aria-label": S || "Actions menu",
|
|
144
146
|
"aria-expanded": u,
|
|
145
147
|
"aria-haspopup": "menu",
|
|
146
|
-
children: /* @__PURE__ */ i(
|
|
148
|
+
children: /* @__PURE__ */ i(U, {})
|
|
147
149
|
}
|
|
148
150
|
)
|
|
149
151
|
}
|
|
150
152
|
) });
|
|
151
153
|
};
|
|
152
154
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
te as A,
|
|
156
|
+
ne as a
|
|
155
157
|
};
|
package/dist/actionMenu.js
CHANGED
|
@@ -18,7 +18,7 @@ export declare const ActionMenuItem: ({ className, children, ...props }: {
|
|
|
18
18
|
className?: string | undefined;
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export interface ActionMenuProps extends Pick<PopoverProps, 'placement'> {
|
|
21
|
+
export interface ActionMenuProps extends Pick<PopoverProps, 'placement' | 'shouldUsePortal'> {
|
|
22
22
|
items?: MenuItem[];
|
|
23
23
|
cleanupDividers?: boolean;
|
|
24
24
|
className?: string;
|
|
@@ -30,4 +30,4 @@ export interface ActionMenuProps extends Pick<PopoverProps, 'placement'> {
|
|
|
30
30
|
trigger?: ReactNode;
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
}
|
|
33
|
-
export declare const ActionMenu: ({ placement, items, cleanupDividers, className, contentClassName, buttonClassName, popoverClassName, menuClassName, ariaLabel, trigger, disabled, }: ActionMenuProps) => ReactElement | null;
|
|
33
|
+
export declare const ActionMenu: ({ placement, items, cleanupDividers, className, contentClassName, buttonClassName, popoverClassName, menuClassName, ariaLabel, trigger, disabled, shouldUsePortal, }: ActionMenuProps) => ReactElement | null;
|
package/dist/filterItem.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as K } from "./bind-06a7ff84.js";
|
|
|
4
4
|
import "react-dnd";
|
|
5
5
|
import "react-dnd-html5-backend";
|
|
6
6
|
import { u as L } from "./useEllipsisTitle-462fa254.js";
|
|
7
|
-
import { A as M } from "./actionMenu-
|
|
7
|
+
import { A as M } from "./actionMenu-6a964512.js";
|
|
8
8
|
import "./details-dbb1530b.js";
|
|
9
9
|
import "./baseIconButton-251479f7.js";
|
|
10
10
|
import "./popover.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptiveTagList as y } from "./adaptiveTagList.js";
|
|
2
|
-
import { A as h, a as M } from "./actionMenu-
|
|
2
|
+
import { A as h, a as M } from "./actionMenu-6a964512.js";
|
|
3
3
|
import { ACTION_MENU_DIVIDER as w } from "./actionMenu.js";
|
|
4
4
|
import { A as R } from "./index-d6e02727.js";
|
|
5
5
|
import { B as k } from "./baseIconButton-251479f7.js";
|
package/dist/tooltip.js
CHANGED
|
@@ -1,82 +1,83 @@
|
|
|
1
|
-
import { jsxs as u, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useFloating as
|
|
6
|
-
import { T as h, g as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as u, Fragment as R, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as G, useRef as f } from "react";
|
|
3
|
+
import { createPortal as j } from "react-dom";
|
|
4
|
+
import { c as k } from "./bind-06a7ff84.js";
|
|
5
|
+
import { useFloating as $, offset as B, flip as C, arrow as U, autoUpdate as Y, FloatingArrow as Z } from "@floating-ui/react";
|
|
6
|
+
import { T as h, g as q, a as z, b as J } from "./floatingUi-46f5b896.js";
|
|
7
|
+
const K = {
|
|
8
8
|
"tooltip-wrapper": "_tooltip-wrapper_1n6ya_16",
|
|
9
9
|
"tooltip-content": "_tooltip-content_1n6ya_26"
|
|
10
|
-
}, i =
|
|
10
|
+
}, i = k.bind(K), Q = 300, V = 100, it = ({
|
|
11
11
|
content: g,
|
|
12
12
|
wrapperClassName: x,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
wrapperTabIndex: T = 0,
|
|
14
|
+
tooltipClassName: w,
|
|
15
|
+
contentClassName: _,
|
|
16
|
+
dynamicWidth: A,
|
|
17
|
+
width: E,
|
|
18
|
+
minWidth: b = 120,
|
|
19
|
+
safeZone: y = 4,
|
|
20
|
+
zIndex: I = 9,
|
|
21
|
+
placement: N = "bottom",
|
|
22
|
+
arrowColor: F = "rgba(34, 34, 34, 0.91)",
|
|
23
|
+
dataAutomationId: O,
|
|
24
|
+
mainAxis: S = !0,
|
|
25
|
+
children: W,
|
|
25
26
|
portalRoot: r,
|
|
26
|
-
isFloating:
|
|
27
|
+
isFloating: v = !0
|
|
27
28
|
}) => {
|
|
28
|
-
const [a, l] =
|
|
29
|
+
const [a, l] = G(!1), c = f(null), e = f(), { refs: m, floatingStyles: L, context: M } = $({
|
|
29
30
|
open: a,
|
|
30
|
-
placement:
|
|
31
|
+
placement: N,
|
|
31
32
|
middleware: [
|
|
32
|
-
|
|
33
|
-
mainAxis:
|
|
34
|
-
alignmentAxis:
|
|
33
|
+
B(({ rects: t, placement: P }) => ({
|
|
34
|
+
mainAxis: y + h,
|
|
35
|
+
alignmentAxis: q(t, P)
|
|
35
36
|
})),
|
|
36
|
-
|
|
37
|
-
mainAxis:
|
|
37
|
+
v && C({
|
|
38
|
+
mainAxis: S,
|
|
38
39
|
fallbackAxisSideDirection: "start",
|
|
39
|
-
fallbackPlacements:
|
|
40
|
+
fallbackPlacements: z
|
|
40
41
|
}),
|
|
41
|
-
|
|
42
|
+
U({
|
|
42
43
|
element: c
|
|
43
44
|
})
|
|
44
45
|
],
|
|
45
|
-
whileElementsMounted:
|
|
46
|
-
}), o =
|
|
46
|
+
whileElementsMounted: Y
|
|
47
|
+
}), o = A ? null : { width: `${E}px` }, D = document.documentElement.clientWidth, H = o || D - V, n = () => {
|
|
47
48
|
e.current && clearTimeout(e.current), l(!1);
|
|
48
49
|
}, d = () => {
|
|
49
|
-
e.current = setTimeout(() => l(!0),
|
|
50
|
+
e.current = setTimeout(() => l(!0), Q);
|
|
50
51
|
}, p = () => /* @__PURE__ */ u(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
54
|
ref: m.setFloating,
|
|
54
55
|
style: {
|
|
55
|
-
...
|
|
56
|
+
...L,
|
|
56
57
|
...o,
|
|
57
|
-
minWidth:
|
|
58
|
-
zIndex:
|
|
58
|
+
minWidth: b,
|
|
59
|
+
zIndex: I,
|
|
59
60
|
pointerEvents: "none"
|
|
60
61
|
},
|
|
61
|
-
"data-automation-id":
|
|
62
|
-
className: i(
|
|
62
|
+
"data-automation-id": O,
|
|
63
|
+
className: i(w),
|
|
63
64
|
children: [
|
|
64
65
|
/* @__PURE__ */ s(
|
|
65
|
-
|
|
66
|
+
Z,
|
|
66
67
|
{
|
|
67
68
|
ref: c,
|
|
68
|
-
context:
|
|
69
|
-
width:
|
|
69
|
+
context: M,
|
|
70
|
+
width: J,
|
|
70
71
|
height: h,
|
|
71
|
-
fill:
|
|
72
|
+
fill: F
|
|
72
73
|
}
|
|
73
74
|
),
|
|
74
75
|
/* @__PURE__ */ s(
|
|
75
76
|
"div",
|
|
76
77
|
{
|
|
77
|
-
className: i("tooltip-content",
|
|
78
|
+
className: i("tooltip-content", _),
|
|
78
79
|
style: {
|
|
79
|
-
maxWidth: `${
|
|
80
|
+
maxWidth: `${H}px`
|
|
80
81
|
},
|
|
81
82
|
children: g
|
|
82
83
|
}
|
|
@@ -84,7 +85,7 @@ const J = {
|
|
|
84
85
|
]
|
|
85
86
|
}
|
|
86
87
|
);
|
|
87
|
-
return /* @__PURE__ */ u(
|
|
88
|
+
return /* @__PURE__ */ u(R, { children: [
|
|
88
89
|
/* @__PURE__ */ s(
|
|
89
90
|
"div",
|
|
90
91
|
{
|
|
@@ -97,13 +98,13 @@ const J = {
|
|
|
97
98
|
t.target === t.currentTarget && d();
|
|
98
99
|
},
|
|
99
100
|
onBlur: n,
|
|
100
|
-
tabIndex:
|
|
101
|
-
children:
|
|
101
|
+
tabIndex: T,
|
|
102
|
+
children: W
|
|
102
103
|
}
|
|
103
104
|
),
|
|
104
|
-
a && (r ?
|
|
105
|
+
a && (r ? j(p(), r) : p())
|
|
105
106
|
] });
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
it as Tooltip
|
|
109
110
|
};
|