@reportportal/ui-kit 0.0.1-alpha.173 → 0.0.1-alpha.175
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/common/hooks/useTreeSortable.d.ts +1 -1
- package/dist/common/hooks.js +1 -1
- package/dist/common/types/sortableTypes.d.ts +3 -2
- package/dist/components/sortable/treeSortableItem/treeSortableItem.d.ts +1 -1
- package/dist/filtersButton.js +30 -30
- package/dist/index.js +1 -1
- package/dist/segmentedControl.js +28 -28
- package/dist/sortable.js +166 -163
- package/dist/style.css +2 -2
- package/dist/useTreeSortable-694cfbbc.js +184 -0
- package/package.json +1 -1
- package/dist/useTreeSortable-70a9c8f5.js +0 -179
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UseTreeSortableOptions, UseTreeSortableReturn } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, canDropOn, onDrop, hideDefaultPreview, }: UseTreeSortableOptions) => UseTreeSortableReturn;
|
|
3
|
+
export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, onDrop, hideDefaultPreview, }: UseTreeSortableOptions) => UseTreeSortableReturn;
|
package/dist/common/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as E } from "../useOnClickOutside-8f7d68a1.js";
|
|
2
|
-
import { u as A, a as R } from "../useTreeSortable-
|
|
2
|
+
import { u as A, a as R } from "../useTreeSortable-694cfbbc.js";
|
|
3
3
|
import { useCallback as D } from "react";
|
|
4
4
|
import { i as x } from "../isEmpty-ccacb5ff.js";
|
|
5
5
|
import { u as W } from "../useWindowResize-a7e1ac92.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react';
|
|
1
|
+
import { ReactNode, Ref, CSSProperties } from 'react';
|
|
2
2
|
import { XYCoord, ConnectDragSource, ConnectDropTarget, ConnectDragPreview } from 'react-dnd';
|
|
3
3
|
|
|
4
4
|
export interface SortableItemData {
|
|
@@ -101,6 +101,7 @@ export interface UseTreeSortableOptions {
|
|
|
101
101
|
type?: string;
|
|
102
102
|
isDisabled?: boolean;
|
|
103
103
|
acceptDrop?: boolean;
|
|
104
|
+
isLast?: boolean;
|
|
104
105
|
canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
|
|
105
106
|
onDrop?: TreeDropHandler;
|
|
106
107
|
hideDefaultPreview?: boolean;
|
|
@@ -126,8 +127,8 @@ export interface TreeSortableItemProps {
|
|
|
126
127
|
acceptDrop?: boolean;
|
|
127
128
|
isLast?: boolean;
|
|
128
129
|
canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
|
|
129
|
-
depth?: number;
|
|
130
130
|
className?: string;
|
|
131
|
+
style?: CSSProperties;
|
|
131
132
|
draggingClassName?: string;
|
|
132
133
|
dropBeforeClassName?: string;
|
|
133
134
|
dropInsideClassName?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TreeSortableItemProps } from '../../../common/types';
|
|
2
2
|
|
|
3
|
-
export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, className, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, className, style, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/filtersButton.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { S
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N } from "react";
|
|
3
|
+
import { c as g } from "./bind-06a7ff84.js";
|
|
4
|
+
import { S } from "./clear-53660571.js";
|
|
5
5
|
import { S as D, a as k } from "./filterOutline-819b4b0d.js";
|
|
6
6
|
import "react-dnd";
|
|
7
7
|
import "react-dnd-html5-backend";
|
|
8
8
|
import { u as x } from "./useEllipsisTitle-462fa254.js";
|
|
9
|
-
const F = "
|
|
10
|
-
"filters-icon-container": "_filters-icon-
|
|
11
|
-
"filter-icon": "_filter-
|
|
9
|
+
const F = "_opened_1ytvw_37", T = "_icon_1ytvw_95", j = "_disabled_1ytvw_112", E = {
|
|
10
|
+
"filters-icon-container": "_filters-icon-container_1ytvw_16",
|
|
11
|
+
"filter-icon": "_filter-icon_1ytvw_34",
|
|
12
12
|
opened: F,
|
|
13
|
-
"with-applied": "_with-
|
|
14
|
-
"filters-count": "_filters-
|
|
15
|
-
"clear-wrapper": "_clear-
|
|
13
|
+
"with-applied": "_with-applied_1ytvw_43",
|
|
14
|
+
"filters-count": "_filters-count_1ytvw_51",
|
|
15
|
+
"clear-wrapper": "_clear-wrapper_1ytvw_86",
|
|
16
16
|
icon: T,
|
|
17
|
-
"clear-icon": "_clear-
|
|
17
|
+
"clear-icon": "_clear-icon_1ytvw_95",
|
|
18
18
|
disabled: j
|
|
19
|
-
},
|
|
19
|
+
}, o = g.bind(E), q = N(
|
|
20
20
|
({
|
|
21
21
|
appliedFiltersCount: l = 0,
|
|
22
22
|
isOpen: f = !1,
|
|
23
23
|
className: _,
|
|
24
24
|
type: d = "button",
|
|
25
|
-
text:
|
|
25
|
+
text: n,
|
|
26
26
|
filtersLabelClassName: c,
|
|
27
|
-
clearable:
|
|
27
|
+
clearable: m = !1,
|
|
28
28
|
onClear: i,
|
|
29
|
-
clearButtonAriaLabel:
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
"with-applied":
|
|
29
|
+
clearButtonAriaLabel: w = "Clear filters",
|
|
30
|
+
...v
|
|
31
|
+
}, u) => {
|
|
32
|
+
const s = l > 0, r = n !== void 0 && n !== "", y = r ? n : s ? l : void 0, { ref: a, title: p } = x(y), b = o("filters-icon-container", _, {
|
|
33
|
+
"with-applied": s || r,
|
|
34
34
|
opened: f
|
|
35
35
|
});
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ e("span", { className:
|
|
38
|
-
|
|
36
|
+
return /* @__PURE__ */ h("button", { type: d, className: b, ref: u, ...v, children: [
|
|
37
|
+
/* @__PURE__ */ e("span", { className: o("filter-icon"), children: s ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(k, {}) }),
|
|
38
|
+
r ? /* @__PURE__ */ e(
|
|
39
39
|
"span",
|
|
40
40
|
{
|
|
41
41
|
ref: a,
|
|
42
42
|
title: p,
|
|
43
|
-
className:
|
|
44
|
-
children:
|
|
43
|
+
className: o("filters-count", c),
|
|
44
|
+
children: n
|
|
45
45
|
}
|
|
46
|
-
) :
|
|
46
|
+
) : s ? /* @__PURE__ */ e(
|
|
47
47
|
"span",
|
|
48
48
|
{
|
|
49
49
|
ref: a,
|
|
50
50
|
title: p,
|
|
51
|
-
className:
|
|
51
|
+
className: o("filters-count", c),
|
|
52
52
|
children: l
|
|
53
53
|
}
|
|
54
54
|
) : null,
|
|
55
|
-
|
|
55
|
+
m && (s || r) && /* @__PURE__ */ e("div", { className: o("clear-wrapper"), children: /* @__PURE__ */ e(
|
|
56
56
|
"span",
|
|
57
57
|
{
|
|
58
58
|
role: "button",
|
|
59
59
|
tabIndex: 0,
|
|
60
|
-
"aria-label":
|
|
61
|
-
className:
|
|
60
|
+
"aria-label": w,
|
|
61
|
+
className: o("clear-icon"),
|
|
62
62
|
onClick: (t) => {
|
|
63
63
|
t.stopPropagation(), i == null || i();
|
|
64
64
|
},
|
|
@@ -66,7 +66,7 @@ const F = "_opened_ntvuh_37", T = "_icon_ntvuh_98", j = "_disabled_ntvuh_115", E
|
|
|
66
66
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), i == null || i());
|
|
67
67
|
},
|
|
68
68
|
onMouseDown: (t) => t.preventDefault(),
|
|
69
|
-
children: /* @__PURE__ */ e(
|
|
69
|
+
children: /* @__PURE__ */ e(S, {})
|
|
70
70
|
}
|
|
71
71
|
) })
|
|
72
72
|
] });
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ import "./useWindowResize-a7e1ac92.js";
|
|
|
75
75
|
import "@floating-ui/react";
|
|
76
76
|
import "./floatingUi-41f8c7b5.js";
|
|
77
77
|
import "es-toolkit";
|
|
78
|
-
import "./useTreeSortable-
|
|
78
|
+
import "./useTreeSortable-694cfbbc.js";
|
|
79
79
|
import "./common.js";
|
|
80
80
|
import "react-resizable";
|
|
81
81
|
export {
|
package/dist/segmentedControl.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as o, useEffect as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
5
|
-
"segmented-control": "_segmented-
|
|
6
|
-
"full-width": "_full-
|
|
7
|
-
button:
|
|
8
|
-
disabled:
|
|
9
|
-
active:
|
|
10
|
-
icon:
|
|
11
|
-
}, c =
|
|
1
|
+
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as o, useEffect as v } from "react";
|
|
3
|
+
import { c as z } from "./bind-06a7ff84.js";
|
|
4
|
+
const f = "_button_8evzz_29", N = "_disabled_8evzz_50", w = "_active_8evzz_50", x = "_icon_8evzz_74", h = {
|
|
5
|
+
"segmented-control": "_segmented-control_8evzz_16",
|
|
6
|
+
"full-width": "_full-width_8evzz_24",
|
|
7
|
+
button: f,
|
|
8
|
+
disabled: N,
|
|
9
|
+
active: w,
|
|
10
|
+
icon: x
|
|
11
|
+
}, c = z.bind(h), S = ({
|
|
12
12
|
options: s,
|
|
13
13
|
onChange: l,
|
|
14
|
-
className:
|
|
15
|
-
fullWidth:
|
|
16
|
-
ariaLabel:
|
|
14
|
+
className: n,
|
|
15
|
+
fullWidth: i = !1,
|
|
16
|
+
ariaLabel: _
|
|
17
17
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const [t, d] = o(s);
|
|
19
|
+
v(() => {
|
|
20
|
+
d(s);
|
|
21
21
|
}, [s]);
|
|
22
|
-
const
|
|
22
|
+
const b = (e) => {
|
|
23
23
|
if (!e.disabled && !e.selected) {
|
|
24
|
-
const
|
|
24
|
+
const m = t.map((a) => ({
|
|
25
25
|
...a,
|
|
26
26
|
selected: a.value === e.value
|
|
27
27
|
}));
|
|
28
|
-
|
|
28
|
+
d(m), l == null || l(e.value);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ r(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
className: c("segmented-control",
|
|
35
|
-
"full-width":
|
|
34
|
+
className: c("segmented-control", n, {
|
|
35
|
+
"full-width": i
|
|
36
36
|
}),
|
|
37
37
|
role: "group",
|
|
38
|
-
"aria-label":
|
|
39
|
-
children:
|
|
38
|
+
"aria-label": _,
|
|
39
|
+
children: t.map((e) => /* @__PURE__ */ u(
|
|
40
40
|
"button",
|
|
41
41
|
{
|
|
42
42
|
type: "button",
|
|
@@ -44,11 +44,11 @@ const N = "_button_188ud_28", w = "_disabled_188ud_53", x = "_active_188ud_53",
|
|
|
44
44
|
active: e.selected,
|
|
45
45
|
disabled: e.disabled
|
|
46
46
|
}),
|
|
47
|
-
onClick: () =>
|
|
47
|
+
onClick: () => b(e),
|
|
48
48
|
disabled: e.disabled,
|
|
49
49
|
"aria-pressed": e.selected,
|
|
50
50
|
children: [
|
|
51
|
-
e.icon && /* @__PURE__ */
|
|
51
|
+
e.icon && /* @__PURE__ */ r("span", { className: c("icon"), children: e.icon }),
|
|
52
52
|
e.label
|
|
53
53
|
]
|
|
54
54
|
},
|
|
@@ -58,5 +58,5 @@ const N = "_button_188ud_28", w = "_disabled_188ud_53", x = "_active_188ud_53",
|
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
S as SegmentedControl
|
|
62
62
|
};
|