@reportportal/ui-kit 0.0.1-alpha.152 → 0.0.1-alpha.153
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/chip.js +72 -0
- package/dist/components/chip/chip.d.ts +15 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/issueList/constants.d.ts +5 -0
- package/dist/components/issueList/index.d.ts +2 -0
- package/dist/components/issueList/issueList.d.ts +18 -0
- package/dist/index.js +142 -138
- package/dist/issueList.js +125 -0
- package/dist/style.css +1 -1
- package/dist/{table-2c659767.js → table-65ae1c11.js} +301 -301
- package/dist/table.js +1 -1
- package/package.json +1 -1
package/dist/chip.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as k, Fragment as w, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as N } from "./bind-06a7ff84.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { S as x } from "./close-4d480ef7.js";
|
|
5
|
+
const D = "_chip_a59ru_16", j = "_clickable_a59ru_34", K = "_disabled_a59ru_40", S = "_label_a59ru_51", v = "_error_a59ru_82", E = "_warning_a59ru_87", F = "_link_a59ru_91", I = {
|
|
6
|
+
chip: D,
|
|
7
|
+
clickable: j,
|
|
8
|
+
disabled: K,
|
|
9
|
+
label: S,
|
|
10
|
+
"remove-button": "_remove-button_a59ru_57",
|
|
11
|
+
error: v,
|
|
12
|
+
warning: E,
|
|
13
|
+
link: F
|
|
14
|
+
}, c = N.bind(I), A = ({
|
|
15
|
+
children: u,
|
|
16
|
+
variant: b = "default",
|
|
17
|
+
link: s,
|
|
18
|
+
onClick: t,
|
|
19
|
+
onRemove: e,
|
|
20
|
+
className: p,
|
|
21
|
+
maxWidth: l,
|
|
22
|
+
title: f,
|
|
23
|
+
disabled: a = !1
|
|
24
|
+
}) => {
|
|
25
|
+
const o = !!t && !a, h = o ? "button" : void 0, m = o ? 0 : void 0, i = c("chip", b, p, {
|
|
26
|
+
disabled: a,
|
|
27
|
+
clickable: !!t || !!s,
|
|
28
|
+
removable: !!e
|
|
29
|
+
}), d = (r) => {
|
|
30
|
+
r.stopPropagation(), r.preventDefault(), e == null || e(r);
|
|
31
|
+
}, g = (r) => {
|
|
32
|
+
a || t == null || t(r);
|
|
33
|
+
}, y = (r) => {
|
|
34
|
+
a || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
|
|
35
|
+
}, _ = /* @__PURE__ */ k(w, { children: [
|
|
36
|
+
/* @__PURE__ */ n("span", { className: c("label"), style: l ? { maxWidth: l } : void 0, title: f, children: u }),
|
|
37
|
+
e && !a && /* @__PURE__ */ n(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
className: c("remove-button"),
|
|
42
|
+
onClick: d,
|
|
43
|
+
"aria-label": "Remove",
|
|
44
|
+
children: /* @__PURE__ */ n(x, {})
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
return s && !a ? /* @__PURE__ */ n(
|
|
49
|
+
"a",
|
|
50
|
+
{
|
|
51
|
+
href: s,
|
|
52
|
+
className: i,
|
|
53
|
+
onClick: t,
|
|
54
|
+
target: "_blank",
|
|
55
|
+
rel: "noopener noreferrer",
|
|
56
|
+
children: _
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ n(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
className: i,
|
|
62
|
+
onClick: g,
|
|
63
|
+
onKeyDown: y,
|
|
64
|
+
role: h,
|
|
65
|
+
tabIndex: m,
|
|
66
|
+
children: _
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
A as Chip
|
|
72
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, MouseEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ChipVariant = 'default' | 'error' | 'warning' | 'link';
|
|
4
|
+
export interface ChipProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
variant?: ChipVariant;
|
|
7
|
+
link?: string;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
9
|
+
onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
title?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const Chip: ({ children, variant, link, onClick, onRemove, className, maxWidth, title, disabled, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export { Breadcrumbs } from './breadcrumbs';
|
|
|
5
5
|
export { BubblesLoader } from './bubblesLoader';
|
|
6
6
|
export { Button } from './button';
|
|
7
7
|
export { Checkbox } from './checkbox';
|
|
8
|
+
export { Chip } from './chip';
|
|
8
9
|
export { DatePicker } from './datePicker';
|
|
9
10
|
export { Dropdown } from './dropdown';
|
|
10
11
|
export { FieldLabel } from './fieldLabel';
|
|
@@ -13,6 +14,7 @@ export { FieldText } from './fieldText';
|
|
|
13
14
|
export { FieldTextFlex } from './fieldTextFlex';
|
|
14
15
|
export { FileDropArea } from './fileDropArea';
|
|
15
16
|
export { FiltersButton } from './filtersButton';
|
|
17
|
+
export { IssueList } from './issueList';
|
|
16
18
|
export { Modal } from './modal';
|
|
17
19
|
export { MultipleAutocomplete } from './autocompletes/multipleAutocomplete';
|
|
18
20
|
export { Pagination } from './pagination';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface Issue {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
link?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IssueListProps {
|
|
9
|
+
issues: Issue[];
|
|
10
|
+
isExpanded?: boolean;
|
|
11
|
+
onIssueClick?: (issue: Issue) => void;
|
|
12
|
+
onIssueRemove?: (issue: Issue) => void;
|
|
13
|
+
onCounterClick?: () => void;
|
|
14
|
+
renderTooltip?: (issue: Issue) => ReactNode;
|
|
15
|
+
tooltipPortalRoot?: Element;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const IssueList: ({ issues, isExpanded, onIssueClick, onIssueRemove, onCounterClick, renderTooltip, tooltipPortalRoot, className, }: IssueListProps) => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/index.js
CHANGED
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import { AdaptiveTagList as D } from "./adaptiveTagList.js";
|
|
2
2
|
import { A as y } from "./index-1a874a8b.js";
|
|
3
|
-
import { B as
|
|
4
|
-
import { B
|
|
3
|
+
import { B as h } from "./baseIconButton-251479f7.js";
|
|
4
|
+
import { B } from "./breadcrumbs-8e5ca8d7.js";
|
|
5
5
|
import { B as M } from "./bubblesLoader-f3ffa240.js";
|
|
6
|
-
import { B as
|
|
6
|
+
import { B as w } from "./button-97d9e587.js";
|
|
7
7
|
import { C as k } from "./checkbox-ed6cc375.js";
|
|
8
|
-
import {
|
|
8
|
+
import { Chip as O } from "./chip.js";
|
|
9
|
+
import { D as z } from "./datePicker-3881a2d6.js";
|
|
9
10
|
import "react-datepicker";
|
|
10
|
-
import { D as
|
|
11
|
-
import { FieldLabel as
|
|
12
|
-
import { F as
|
|
13
|
-
import { F as
|
|
14
|
-
import { F as
|
|
15
|
-
import { FileDropArea as
|
|
16
|
-
import { FiltersButton as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { S as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { T as
|
|
29
|
-
import { T as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { S as Tr } from "./
|
|
35
|
-
import { S as
|
|
36
|
-
import { S as
|
|
37
|
-
import { S as
|
|
38
|
-
import { S as
|
|
39
|
-
import { S as Gr } from "./
|
|
40
|
-
import { S as
|
|
41
|
-
import { S as Qr, a as Vr } from "./
|
|
42
|
-
import { S as
|
|
43
|
-
import { S as
|
|
44
|
-
import { S as
|
|
45
|
-
import { S as
|
|
11
|
+
import { D as J } from "./dropdown-b63f2137.js";
|
|
12
|
+
import { FieldLabel as G } from "./fieldLabel.js";
|
|
13
|
+
import { F as X } from "./fieldNumber-d1b5a7a1.js";
|
|
14
|
+
import { F as q } from "./fieldText-1749da7a.js";
|
|
15
|
+
import { F as Q } from "./fieldTextFlex-2f51c173.js";
|
|
16
|
+
import { FileDropArea as Y } from "./fileDropArea.js";
|
|
17
|
+
import { FiltersButton as _ } from "./filtersButton.js";
|
|
18
|
+
import { IssueList as oo } from "./issueList.js";
|
|
19
|
+
import { Modal as eo } from "./modal.js";
|
|
20
|
+
import { MultipleAutocomplete as ao, SingleAutocomplete as no } from "./autocompletes.js";
|
|
21
|
+
import { P as po } from "./pagination-a3dee614.js";
|
|
22
|
+
import { Popover as mo } from "./popover.js";
|
|
23
|
+
import { R as Io } from "./radio-62546efa.js";
|
|
24
|
+
import { S as xo } from "./selection-9124d029.js";
|
|
25
|
+
import { S as uo } from "./spinLoader-c4a53718.js";
|
|
26
|
+
import { SystemAlert as Co } from "./systemAlert.js";
|
|
27
|
+
import { S as go } from "./systemMessage-924fdaa6.js";
|
|
28
|
+
import { DragLayer as Do, SortableItem as bo, SortableList as yo } from "./sortable.js";
|
|
29
|
+
import { T as ho } from "./table-65ae1c11.js";
|
|
30
|
+
import { T as Bo } from "./themeProvider-46c2be7b.js";
|
|
31
|
+
import { T as Mo } from "./toggle-304107fa.js";
|
|
32
|
+
import { Tooltip as wo } from "./tooltip.js";
|
|
33
|
+
import { SidePanel as ko } from "./sidePanel.js";
|
|
34
|
+
import { AddCsvIcon as Oo, AddImageIcon as Uo, AddJarIcon as zo, BreadcrumbsTreeIcon as Ho, CalendarIcon as Jo, CheckmarkIcon as No, ChevronRightBreadcrumbsIcon as Go, ConfigurationIcon as Wo, CopyIcon as Xo, CoverageFullIcon as jo, CoveragePartialIcon as qo, CoveredManuallyIcon as Ko, DeleteIcon as Qo, DragAndDropIcon as Vo, DragNDropIcon as Yo, DurationIcon as Zo, EditIcon as _o, ExportIcon as $o, FlagIcon as or, GroupByIcon as rr, HideIcon as er, LaunchTypeIcon as tr, MaximizeIcon as ar, MoveToFolderIcon as nr, PinFilledIcon as cr, PinOutlineIcon as pr, PriorityBlockerIcon as ir, PriorityCriticalIcon as mr, PriorityHighIcon as sr, PriorityLowIcon as Ir, PriorityMediumIcon as lr, PriorityUnspecifiedIcon as xr, RefreshIcon as fr, RerunIcon as dr, RunManualIcon as ur, SearchIcon as Sr, SortIcon as Cr, StatusSuccessIcon as Pr, TestPlanIcon as gr, UserIcon as Fr, WarningIcon as Dr } from "./icons.js";
|
|
35
|
+
import { S as yr, a as Tr, b as hr, c as Ar } from "./resizeColumn-d4107941.js";
|
|
36
|
+
import { S as vr } from "./calendarArrow-44c7e60e.js";
|
|
37
|
+
import { S as Lr } from "./clear-53660571.js";
|
|
38
|
+
import { S as Rr, a as kr } from "./openEye-950159cb.js";
|
|
39
|
+
import { S as Or } from "./close-4d480ef7.js";
|
|
40
|
+
import { S as zr, a as Hr, b as Jr, c as Nr, d as Gr, e as Wr, f as Xr } from "./xls-995781cc.js";
|
|
41
|
+
import { S as qr } from "./dropdown-0260bb66.js";
|
|
42
|
+
import { S as Qr, a as Vr, b as Yr } from "./success-8fd8bd2c.js";
|
|
43
|
+
import { S as _r, a as $r } from "./filterOutline-819b4b0d.js";
|
|
44
|
+
import { S as re, a as ee } from "./tree-c3dd3d45.js";
|
|
45
|
+
import { S as ae } from "./minus-2857540f.js";
|
|
46
|
+
import { S as ce } from "./plus-199fb2a8.js";
|
|
47
|
+
import { S as ie, a as me } from "./prevPage-87faf576.js";
|
|
46
48
|
import "react/jsx-runtime";
|
|
47
49
|
import "react";
|
|
48
50
|
import "./bind-06a7ff84.js";
|
|
@@ -64,105 +66,107 @@ import "./common.js";
|
|
|
64
66
|
import "react-resizable";
|
|
65
67
|
export {
|
|
66
68
|
D as AdaptiveTagList,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
Oo as AddCsvIcon,
|
|
70
|
+
Uo as AddImageIcon,
|
|
71
|
+
zo as AddJarIcon,
|
|
72
|
+
yr as ArrowDownIcon,
|
|
73
|
+
Tr as ArrowUpIcon,
|
|
72
74
|
y as AttachedFile,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
h as BaseIconButton,
|
|
76
|
+
B as Breadcrumbs,
|
|
77
|
+
Ho as BreadcrumbsTreeIcon,
|
|
76
78
|
M as BubblesLoader,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
w as Button,
|
|
80
|
+
vr as CalendarArrowIcon,
|
|
81
|
+
Jo as CalendarIcon,
|
|
80
82
|
k as Checkbox,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
G as
|
|
107
|
-
X as
|
|
108
|
-
q as
|
|
109
|
-
Q as
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
83
|
+
No as CheckmarkIcon,
|
|
84
|
+
hr as ChevronDownDropdownIcon,
|
|
85
|
+
Go as ChevronRightBreadcrumbsIcon,
|
|
86
|
+
O as Chip,
|
|
87
|
+
Lr as ClearIcon,
|
|
88
|
+
Rr as CloseEyeIcon,
|
|
89
|
+
Or as CloseIcon,
|
|
90
|
+
Wo as ConfigurationIcon,
|
|
91
|
+
Xo as CopyIcon,
|
|
92
|
+
jo as CoverageFullIcon,
|
|
93
|
+
qo as CoveragePartialIcon,
|
|
94
|
+
Ko as CoveredManuallyIcon,
|
|
95
|
+
zr as CsvIcon,
|
|
96
|
+
z as DatePicker,
|
|
97
|
+
Qo as DeleteIcon,
|
|
98
|
+
Vo as DragAndDropIcon,
|
|
99
|
+
Do as DragLayer,
|
|
100
|
+
Yo as DragNDropIcon,
|
|
101
|
+
J as Dropdown,
|
|
102
|
+
qr as DropdownIcon,
|
|
103
|
+
Zo as DurationIcon,
|
|
104
|
+
_o as EditIcon,
|
|
105
|
+
Qr as ErrorIcon,
|
|
106
|
+
$o as ExportIcon,
|
|
107
|
+
Hr as ExternalLinkIcon,
|
|
108
|
+
G as FieldLabel,
|
|
109
|
+
X as FieldNumber,
|
|
110
|
+
q as FieldText,
|
|
111
|
+
Q as FieldTextFlex,
|
|
112
|
+
Y as FileDropArea,
|
|
113
|
+
Jr as FileOtherIcon,
|
|
114
|
+
_r as FilterFilledIcon,
|
|
115
|
+
$r as FilterOutlineIcon,
|
|
116
|
+
_ as FiltersButton,
|
|
117
|
+
or as FlagIcon,
|
|
118
|
+
rr as GroupByIcon,
|
|
119
|
+
er as HideIcon,
|
|
120
|
+
Nr as ImageIcon,
|
|
121
|
+
Vr as InfoIcon,
|
|
122
|
+
oo as IssueList,
|
|
123
|
+
Gr as JarIcon,
|
|
124
|
+
tr as LaunchTypeIcon,
|
|
125
|
+
ar as MaximizeIcon,
|
|
126
|
+
re as MeatballMenuIcon,
|
|
127
|
+
ae as MinusIcon,
|
|
128
|
+
eo as Modal,
|
|
129
|
+
nr as MoveToFolderIcon,
|
|
130
|
+
ao as MultipleAutocomplete,
|
|
131
|
+
kr as OpenEyeIcon,
|
|
132
|
+
po as Pagination,
|
|
133
|
+
Wr as PdfIcon,
|
|
134
|
+
cr as PinFilledIcon,
|
|
135
|
+
pr as PinOutlineIcon,
|
|
136
|
+
ce as PlusIcon,
|
|
137
|
+
mo as Popover,
|
|
138
|
+
ie as PrevChapterIcon,
|
|
139
|
+
me as PrevPageIcon,
|
|
140
|
+
ir as PriorityBlockerIcon,
|
|
141
|
+
mr as PriorityCriticalIcon,
|
|
142
|
+
sr as PriorityHighIcon,
|
|
143
|
+
Ir as PriorityLowIcon,
|
|
144
|
+
lr as PriorityMediumIcon,
|
|
145
|
+
xr as PriorityUnspecifiedIcon,
|
|
146
|
+
Io as Radio,
|
|
147
|
+
fr as RefreshIcon,
|
|
148
|
+
dr as RerunIcon,
|
|
149
|
+
Ar as ResizeColumnIcon,
|
|
150
|
+
ur as RunManualIcon,
|
|
151
|
+
Sr as SearchIcon,
|
|
152
|
+
xo as Selection,
|
|
153
|
+
ko as SidePanel,
|
|
154
|
+
no as SingleAutocomplete,
|
|
155
|
+
Cr as SortIcon,
|
|
156
|
+
bo as SortableItem,
|
|
157
|
+
yo as SortableList,
|
|
158
|
+
uo as SpinLoader,
|
|
159
|
+
Pr as StatusSuccessIcon,
|
|
160
|
+
Yr as SuccessIcon,
|
|
161
|
+
Co as SystemAlert,
|
|
162
|
+
go as SystemMessage,
|
|
163
|
+
ho as Table,
|
|
164
|
+
gr as TestPlanIcon,
|
|
165
|
+
Bo as ThemeProvider,
|
|
166
|
+
Mo as Toggle,
|
|
167
|
+
wo as Tooltip,
|
|
168
|
+
ee as TreeIcon,
|
|
169
|
+
Fr as UserIcon,
|
|
170
|
+
Dr as WarningIcon,
|
|
171
|
+
Xr as XlsIcon
|
|
168
172
|
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { jsxs as H, jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as v, useState as E, useCallback as N, useEffect as I } from "react";
|
|
3
|
+
import { c as q } from "./bind-06a7ff84.js";
|
|
4
|
+
import { Chip as F } from "./chip.js";
|
|
5
|
+
import { Tooltip as B } from "./tooltip.js";
|
|
6
|
+
import { i as J } from "./isEmpty-ccacb5ff.js";
|
|
7
|
+
import "./close-4d480ef7.js";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
import "@floating-ui/react";
|
|
10
|
+
import "./floatingUi-41f8c7b5.js";
|
|
11
|
+
const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_issue_ypfdt_16", tt = "_counter_ypfdt_36", et = "_hidden_ypfdt_55", nt = "_ellipsis_ypfdt_61", rt = {
|
|
12
|
+
"issue-list": "_issue-list_ypfdt_16",
|
|
13
|
+
expanded: $,
|
|
14
|
+
issue: C,
|
|
15
|
+
"counter-wrapper": "_counter-wrapper_ypfdt_36",
|
|
16
|
+
counter: tt,
|
|
17
|
+
"tooltip-wrapper": "_tooltip-wrapper_ypfdt_50",
|
|
18
|
+
hidden: et,
|
|
19
|
+
ellipsis: nt
|
|
20
|
+
}, a = q.bind(rt), ht = ({
|
|
21
|
+
issues: n,
|
|
22
|
+
isExpanded: W = !1,
|
|
23
|
+
onIssueClick: i,
|
|
24
|
+
onIssueRemove: T,
|
|
25
|
+
onCounterClick: d,
|
|
26
|
+
renderTooltip: L,
|
|
27
|
+
tooltipPortalRoot: S,
|
|
28
|
+
className: j
|
|
29
|
+
}) => {
|
|
30
|
+
const p = v(null), x = v(null), O = v(/* @__PURE__ */ new Map()), D = v(/* @__PURE__ */ new Map()), [M, c] = E(n.length), [o, k] = E(W), [w, l] = E(!1), z = N((t, r) => {
|
|
31
|
+
r && O.current.set(t, r);
|
|
32
|
+
}, []), f = N(() => {
|
|
33
|
+
var _;
|
|
34
|
+
const t = p.current;
|
|
35
|
+
if (!t || n.length === 0)
|
|
36
|
+
return;
|
|
37
|
+
const r = t.offsetWidth, u = ((_ = x.current) == null ? void 0 : _.offsetWidth) || Q, h = n.map((e, m) => {
|
|
38
|
+
const g = O.current.get(e.key);
|
|
39
|
+
if (!g)
|
|
40
|
+
return 0;
|
|
41
|
+
const s = g.offsetWidth;
|
|
42
|
+
return m === 0 && w ? D.current.get(e.key) || s : (D.current.set(e.key, s), s);
|
|
43
|
+
});
|
|
44
|
+
if (h.reduce((e, m) => e + m, 0) + (n.length - 1) * R <= r) {
|
|
45
|
+
l(!1), c(n.length);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
for (let e = n.length - 1; e >= 1; e--) {
|
|
49
|
+
if (h.slice(0, e).reduce((s, Y) => s + Y, 0) + e * R + u <= r) {
|
|
50
|
+
c(e), l(!1);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (e === 1) {
|
|
54
|
+
r - R - u <= X ? (c(0), l(!1)) : (c(1), l(!0));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, [n, w]);
|
|
59
|
+
I(() => {
|
|
60
|
+
k(W);
|
|
61
|
+
}, [W]), I(() => {
|
|
62
|
+
if (o)
|
|
63
|
+
return;
|
|
64
|
+
const t = setTimeout(f, K);
|
|
65
|
+
return () => clearTimeout(t);
|
|
66
|
+
}, [f, n, o]), I(() => {
|
|
67
|
+
if (o)
|
|
68
|
+
return;
|
|
69
|
+
const t = new ResizeObserver(() => {
|
|
70
|
+
f();
|
|
71
|
+
});
|
|
72
|
+
return p.current && t.observe(p.current), () => t.disconnect();
|
|
73
|
+
}, [f, o]);
|
|
74
|
+
const G = N(() => {
|
|
75
|
+
k(!0), c(n.length), l(!1), d == null || d();
|
|
76
|
+
}, [n.length, d]), P = N(
|
|
77
|
+
(t) => {
|
|
78
|
+
i == null || i(t);
|
|
79
|
+
},
|
|
80
|
+
[i]
|
|
81
|
+
);
|
|
82
|
+
if (J(n))
|
|
83
|
+
return null;
|
|
84
|
+
const A = n.length - M, U = A > 0 && !o, V = (t, r) => {
|
|
85
|
+
const u = !o && r >= M, h = !o && r === 0 && w, b = /* @__PURE__ */ y(
|
|
86
|
+
F,
|
|
87
|
+
{
|
|
88
|
+
variant: "link",
|
|
89
|
+
link: t.link,
|
|
90
|
+
onClick: i ? () => P(t) : void 0,
|
|
91
|
+
onRemove: T ? () => T(t) : void 0,
|
|
92
|
+
children: t.name
|
|
93
|
+
}
|
|
94
|
+
), _ = L ? /* @__PURE__ */ y(
|
|
95
|
+
B,
|
|
96
|
+
{
|
|
97
|
+
content: L(t),
|
|
98
|
+
width: Z,
|
|
99
|
+
portalRoot: S,
|
|
100
|
+
wrapperClassName: a("tooltip-wrapper"),
|
|
101
|
+
placement: "top",
|
|
102
|
+
children: b
|
|
103
|
+
}
|
|
104
|
+
) : b;
|
|
105
|
+
return /* @__PURE__ */ y(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
ref: (e) => z(t.key, e),
|
|
109
|
+
className: a("issue", { hidden: u, ellipsis: h }),
|
|
110
|
+
children: _
|
|
111
|
+
},
|
|
112
|
+
t.key
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
return /* @__PURE__ */ H("div", { ref: p, className: a("issue-list", j, { expanded: o }), children: [
|
|
116
|
+
n.map((t, r) => V(t, r)),
|
|
117
|
+
/* @__PURE__ */ y("div", { ref: x, className: a("counter-wrapper", { hidden: !U }), children: /* @__PURE__ */ H(F, { className: a("counter"), variant: "link", onClick: G, children: [
|
|
118
|
+
"+",
|
|
119
|
+
A
|
|
120
|
+
] }) })
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
ht as IssueList
|
|
125
|
+
};
|