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

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.
@@ -0,0 +1,129 @@
1
+ import { jsxs as s, jsx as a, Fragment as p } from "react/jsx-runtime";
2
+ import { useMemo as g, useCallback as u } from "react";
3
+ import { c as E } from "./bind-06a7ff84.js";
4
+ import { S as I } from "./close-4d480ef7.js";
5
+ import { b as j, g as k, a as A, S as M, d as P, e as B, c as d, f as b } from "./download-4950d639.js";
6
+ const F = (e) => {
7
+ var c;
8
+ const n = e.split(".");
9
+ return n.length > 1 && ((c = n.pop()) == null ? void 0 : c.toLowerCase()) || "";
10
+ }, O = (e) => e.length <= 15 ? e : e.slice(0, 4) + "..." + e.slice(-8), J = {
11
+ "attached-file": "_attached-file_1yz71_16",
12
+ "attached-file__file-name": "_attached-file__file-name_1yz71_29",
13
+ "attached-file__download-icon": "_attached-file__download-icon_1yz71_32",
14
+ "attached-file--bottom-placed": "_attached-file--bottom-placed_1yz71_35",
15
+ "attached-file__icon": "_attached-file__icon_1yz71_45",
16
+ "attached-file__file-icon": "_attached-file__file-icon_1yz71_52",
17
+ "attached-file--failed": "_attached-file--failed_1yz71_55",
18
+ "attached-file__name-text": "_attached-file__name-text_1yz71_59",
19
+ "attached-file--uploading": "_attached-file--uploading_1yz71_68",
20
+ "attached-file--full-width": "_attached-file--full-width_1yz71_80",
21
+ "attached-file__thumbnail": "_attached-file__thumbnail_1yz71_101",
22
+ "attached-file__info": "_attached-file__info_1yz71_108",
23
+ "attached-file__file-name--bottom-placed": "_attached-file__file-name--bottom-placed_1yz71_129",
24
+ "attached-file__file-details": "_attached-file__file-details_1yz71_159",
25
+ "attached-file__error-message": "_attached-file__error-message_1yz71_164",
26
+ "attached-file__upload-progress": "_attached-file__upload-progress_1yz71_169",
27
+ "attached-file__upload-progress-bar": "_attached-file__upload-progress-bar_1yz71_179",
28
+ "attached-file__remove-button": "_attached-file__remove-button_1yz71_183",
29
+ "attached-file__remove-button--disabled": "_attached-file__remove-button--disabled_1yz71_205"
30
+ }, t = E.bind(J), T = {
31
+ csv: M,
32
+ jar: P,
33
+ pdf: B,
34
+ jpg: d,
35
+ jpeg: d,
36
+ png: d,
37
+ gif: d,
38
+ svg: d,
39
+ webp: d,
40
+ xls: b,
41
+ xlsx: b
42
+ }, X = (e) => T[e.toLowerCase()] ?? j, Q = ({
43
+ fileName: e,
44
+ size: n,
45
+ uploadingProgress: c = 0,
46
+ isUploadFailed: _ = !1,
47
+ uploadFailedMessage: y,
48
+ isUploading: l = !1,
49
+ isFullWidth: v = !1,
50
+ onDownload: h,
51
+ onRemove: f,
52
+ withPreview: x = !1,
53
+ textPosition: z = "right",
54
+ imageSrc: m
55
+ }) => {
56
+ const o = g(() => F(e), [e]), C = o.toUpperCase(), L = g(() => X(o), [o]), S = h ? k : A, N = u(
57
+ (r) => {
58
+ r.stopPropagation(), l || f == null || f();
59
+ },
60
+ [l, f]
61
+ ), w = u(
62
+ (r) => {
63
+ r.stopPropagation(), !_ && !l && h && h();
64
+ },
65
+ [_, l, h]
66
+ ), i = z === "bottom";
67
+ return /* @__PURE__ */ s(
68
+ "div",
69
+ {
70
+ className: t("attached-file", {
71
+ "attached-file--failed": _,
72
+ "attached-file--uploading": l,
73
+ "attached-file--full-width": v,
74
+ "attached-file--bottom-placed": i
75
+ }),
76
+ children: [
77
+ /* @__PURE__ */ a("div", { className: t("attached-file__icon"), children: x && m ? /* @__PURE__ */ a("img", { className: t("attached-file__thumbnail"), src: m, alt: e }) : /* @__PURE__ */ a("div", { className: t("attached-file__file-icon"), children: /* @__PURE__ */ a(L, {}) }) }),
78
+ /* @__PURE__ */ s("div", { className: t("attached-file__info"), children: [
79
+ !i && h ? /* @__PURE__ */ s("button", { type: "button", className: t("attached-file__file-name"), onClick: w, children: [
80
+ /* @__PURE__ */ a("span", { className: t("attached-file__name-text"), children: e }),
81
+ !l && !_ && /* @__PURE__ */ a("span", { className: t("attached-file__download-icon"), children: /* @__PURE__ */ a(S, {}) })
82
+ ] }) : /* @__PURE__ */ a(
83
+ "div",
84
+ {
85
+ className: t("attached-file__file-name", {
86
+ "attached-file__file-name--bottom-placed": i
87
+ }),
88
+ children: /* @__PURE__ */ a("span", { className: t("attached-file__name-text"), children: i ? O(e) : e })
89
+ }
90
+ ),
91
+ i ? null : /* @__PURE__ */ s(p, { children: [
92
+ !_ && /* @__PURE__ */ s("div", { className: t("attached-file__file-details"), children: [
93
+ C,
94
+ ", ",
95
+ n,
96
+ " MB"
97
+ ] }),
98
+ _ && /* @__PURE__ */ a("div", { className: t("attached-file__error-message"), children: y })
99
+ ] })
100
+ ] }),
101
+ i ? null : /* @__PURE__ */ s(p, { children: [
102
+ f && /* @__PURE__ */ a(
103
+ "button",
104
+ {
105
+ type: "button",
106
+ className: t("attached-file__remove-button", {
107
+ "attached-file__remove-button--disabled": l
108
+ }),
109
+ disabled: l,
110
+ onClick: N,
111
+ children: /* @__PURE__ */ a(I, {})
112
+ }
113
+ ),
114
+ l && c > 0 && /* @__PURE__ */ a("div", { className: t("attached-file__upload-progress"), children: /* @__PURE__ */ a(
115
+ "div",
116
+ {
117
+ className: t("attached-file__upload-progress-bar"),
118
+ style: { width: `${c}%` }
119
+ }
120
+ ) })
121
+ ] })
122
+ ]
123
+ }
124
+ );
125
+ };
126
+ export {
127
+ Q as A,
128
+ F as g
129
+ };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AdaptiveTagList as B } from "./adaptiveTagList.js";
2
2
  import { A as v, a as w } from "./actionMenu-f8a2f5bb.js";
3
3
  import { ACTION_MENU_DIVIDER as E } from "./actionMenu.js";
4
- import { A as k } from "./index-d6e02727.js";
4
+ import { A as k } from "./index-e0731146.js";
5
5
  import { B as N } from "./baseIconButton-251479f7.js";
6
6
  import { B as H } from "./breadcrumbs-5730e318.js";
7
7
  import { B as G } from "./bubblesLoader-f3ffa240.js";
@@ -21,7 +21,7 @@ import { FiltersButton as Io } from "./filtersButton.js";
21
21
  import { FilterItem as xo } from "./filterItem.js";
22
22
  import { IssueList as uo } from "./issueList.js";
23
23
  import { Modal as Co } from "./modal.js";
24
- import { MultipleAutocomplete as Po, SingleAutocomplete as go } from "./autocompletes.js";
24
+ import { MultipleAutocomplete as Do, SingleAutocomplete as Po } from "./autocompletes.js";
25
25
  import { P as Fo } from "./pagination-4f6cbad8.js";
26
26
  import { Popover as bo } from "./popover.js";
27
27
  import { R as ho, a as Bo } from "./radioGroup-0c132c2e.js";
@@ -41,14 +41,14 @@ import "react-dnd";
41
41
  import "react-dnd-html5-backend";
42
42
  import { useTreeDropValidation as er } from "./common/hooks.js";
43
43
  import { u as nr } from "./useEllipsisTitle-462fa254.js";
44
- import { AddCsvIcon as cr, AddImageIcon as pr, AddJarIcon as ir, ArrowLeftIcon as mr, ArrowRightIcon as sr, BoltIcon as Ir, BreadcrumbsTreeIcon as lr, CalendarIcon as xr, CheckmarkIcon as fr, ChevronRightBreadcrumbsIcon as dr, CloseEyeIcon as ur, ConfigurationIcon as Sr, CopyIcon as Cr, CoverageFullIcon as Dr, CoveragePartialIcon as Pr, CoveredManuallyIcon as gr, CycleArrowsIcon as Ar, DeleteIcon as Fr, DiamondIcon as Tr, DownloadIcon as br, DragAndDropIcon as yr, DragNDropIcon as hr, DurationIcon as Br, EditIcon as Mr, ExportIcon as vr, FlagIcon as wr, FolderIcon as Lr, GroupByIcon as Er, HashIcon as Rr, HideIcon as kr, LatestExecutionsIcon as Or, LaunchTypeIcon as Nr, MailIcon as Ur, MaximizeIcon as Hr, MoveToFolderIcon as zr, OkIcon as Gr, OpenEyeIcon as Jr, PinFilledIcon as Vr, PinOutlineIcon as _r, PriorityBlockerIcon as Wr, PriorityCriticalIcon as Xr, PriorityHighIcon as jr, PriorityLowIcon as qr, PriorityMediumIcon as Kr, PriorityUnspecifiedIcon as Qr, RefreshIcon as Yr, RerunIcon as Zr, RocketIcon as $r, RunManualIcon as oe, SearchIcon as re, SortIcon as ee, StatusSuccessIcon as te, TestCaseIcon as ne, TestPlanIcon as ae, UserIcon as ce } from "./icons.js";
45
- import { S as ie, a as me, b as se } from "./resizeColumn-46b5b30f.js";
46
- import { S as le } from "./calendarArrow-44c7e60e.js";
47
- import { S as fe } from "./chevronDownDropdown-0260bb66.js";
48
- import { S as ue } from "./clear-53660571.js";
49
- import { b as Ce, S as De, a as Pe } from "./capslockIcon-b100b9d6.js";
50
- import { S as Ae } from "./close-4d480ef7.js";
51
- import { S as Te, a as be, b as ye, c as he, d as Be, e as Me, f as ve } from "./xls-995781cc.js";
44
+ import { AddCsvIcon as cr, AddImageIcon as pr, AddJarIcon as ir, ArrowLeftIcon as mr, ArrowRightIcon as sr, BoltIcon as Ir, BreadcrumbsTreeIcon as lr, CalendarIcon as xr, CheckmarkIcon as fr, ChevronRightBreadcrumbsIcon as dr, CloseEyeIcon as ur, ConfigurationIcon as Sr, CopyIcon as Cr, CoverageFullIcon as gr, CoveragePartialIcon as Dr, CoveredManuallyIcon as Pr, CycleArrowsIcon as Ar, DeleteIcon as Fr, DiamondIcon as Tr, DragAndDropIcon as br, DragNDropIcon as yr, DurationIcon as hr, EditIcon as Br, ExportIcon as Mr, FlagIcon as vr, FolderIcon as wr, GroupByIcon as Lr, HashIcon as Er, HideIcon as Rr, LatestExecutionsIcon as kr, LaunchTypeIcon as Or, MailIcon as Nr, MaximizeIcon as Ur, MoveToFolderIcon as Hr, OkIcon as zr, OpenEyeIcon as Gr, PinFilledIcon as Jr, PinOutlineIcon as Vr, PriorityBlockerIcon as _r, PriorityCriticalIcon as Wr, PriorityHighIcon as Xr, PriorityLowIcon as jr, PriorityMediumIcon as qr, PriorityUnspecifiedIcon as Kr, RefreshIcon as Qr, RerunIcon as Yr, RocketIcon as Zr, RunManualIcon as $r, SearchIcon as oe, SortIcon as re, StatusSuccessIcon as ee, TestCaseIcon as te, TestPlanIcon as ne, UserIcon as ae } from "./icons.js";
45
+ import { S as pe, a as ie, b as me } from "./resizeColumn-46b5b30f.js";
46
+ import { S as Ie } from "./calendarArrow-44c7e60e.js";
47
+ import { S as xe } from "./chevronDownDropdown-0260bb66.js";
48
+ import { S as de } from "./clear-53660571.js";
49
+ import { b as Se, S as Ce, a as ge } from "./capslockIcon-b100b9d6.js";
50
+ import { S as Pe } from "./close-4d480ef7.js";
51
+ import { S as Fe, g as Te, a as be, b as ye, c as he, d as Be, e as Me, f as ve } from "./download-4950d639.js";
52
52
  import { S as Le } from "./details-dbb1530b.js";
53
53
  import { S as Re } from "./dropdown-0260bb66.js";
54
54
  import { S as Oe, a as Ne, b as Ue } from "./success-8fd8bd2c.js";
@@ -88,10 +88,10 @@ export {
88
88
  cr as AddCsvIcon,
89
89
  pr as AddImageIcon,
90
90
  ir as AddJarIcon,
91
- ie as ArrowDownIcon,
91
+ pe as ArrowDownIcon,
92
92
  mr as ArrowLeftIcon,
93
93
  sr as ArrowRightIcon,
94
- me as ArrowUpIcon,
94
+ ie as ArrowUpIcon,
95
95
  k as AttachedFile,
96
96
  N as BaseIconButton,
97
97
  Ir as BoltIcon,
@@ -100,39 +100,39 @@ export {
100
100
  G as BubblesLoader,
101
101
  V as BulkPanel,
102
102
  W as Button,
103
- le as CalendarArrowIcon,
103
+ Ie as CalendarArrowIcon,
104
104
  xr as CalendarIcon,
105
- Ce as CapsLockIcon,
105
+ Se as CapsLockIcon,
106
106
  j as Checkbox,
107
107
  fr as CheckmarkIcon,
108
- fe as ChevronDownDropdownIcon,
108
+ xe as ChevronDownDropdownIcon,
109
109
  dr as ChevronRightBreadcrumbsIcon,
110
110
  K as Chip,
111
- ue as ClearIcon,
111
+ de as ClearIcon,
112
112
  ur as CloseEyeIcon,
113
- Ae as CloseIcon,
114
- De as ClosedEyeIcon,
113
+ Pe as CloseIcon,
114
+ Ce as ClosedEyeIcon,
115
115
  Sr as ConfigurationIcon,
116
116
  Cr as CopyIcon,
117
- Dr as CoverageFullIcon,
118
- Pr as CoveragePartialIcon,
119
- gr as CoveredManuallyIcon,
120
- Te as CsvIcon,
117
+ gr as CoverageFullIcon,
118
+ Dr as CoveragePartialIcon,
119
+ Pr as CoveredManuallyIcon,
120
+ Fe as CsvIcon,
121
121
  Ar as CycleArrowsIcon,
122
122
  Y as DatePicker,
123
123
  Fr as DeleteIcon,
124
124
  Le as DetailsIcon,
125
125
  Tr as DiamondIcon,
126
- br as DownloadIcon,
127
- yr as DragAndDropIcon,
126
+ Te as DownloadIcon,
127
+ br as DragAndDropIcon,
128
128
  zo as DragLayer,
129
- hr as DragNDropIcon,
129
+ yr as DragNDropIcon,
130
130
  $ as Dropdown,
131
131
  Re as DropdownIcon,
132
- Br as DurationIcon,
133
- Mr as EditIcon,
132
+ hr as DurationIcon,
133
+ Br as EditIcon,
134
134
  Oe as ErrorIcon,
135
- vr as ExportIcon,
135
+ Mr as ExportIcon,
136
136
  be as ExternalLinkIcon,
137
137
  ro as FieldLabel,
138
138
  to as FieldNumber,
@@ -144,71 +144,71 @@ export {
144
144
  xo as FilterItem,
145
145
  Ge as FilterOutlineIcon,
146
146
  Io as FiltersButton,
147
- wr as FlagIcon,
148
- Lr as FolderIcon,
149
- Er as GroupByIcon,
150
- Rr as HashIcon,
151
- kr as HideIcon,
147
+ vr as FlagIcon,
148
+ wr as FolderIcon,
149
+ Lr as GroupByIcon,
150
+ Er as HashIcon,
151
+ Rr as HideIcon,
152
152
  he as ImageIcon,
153
153
  Ne as InfoIcon,
154
154
  uo as IssueList,
155
155
  Be as JarIcon,
156
- Or as LatestExecutionsIcon,
157
- Nr as LaunchTypeIcon,
158
- Ur as MailIcon,
159
- Hr as MaximizeIcon,
156
+ kr as LatestExecutionsIcon,
157
+ Or as LaunchTypeIcon,
158
+ Nr as MailIcon,
159
+ Ur as MaximizeIcon,
160
160
  Ve as MeatballMenuIcon,
161
161
  Xe as MinusIcon,
162
162
  Co as Modal,
163
- zr as MoveToFolderIcon,
164
- Po as MultipleAutocomplete,
165
- Gr as OkIcon,
166
- Jr as OpenEyeIcon,
167
- Pe as OpenedEyeIcon,
163
+ Hr as MoveToFolderIcon,
164
+ Do as MultipleAutocomplete,
165
+ zr as OkIcon,
166
+ Gr as OpenEyeIcon,
167
+ ge as OpenedEyeIcon,
168
168
  Fo as Pagination,
169
169
  Me as PdfIcon,
170
- Vr as PinFilledIcon,
171
- _r as PinOutlineIcon,
170
+ Jr as PinFilledIcon,
171
+ Vr as PinOutlineIcon,
172
172
  qe as PlusIcon,
173
173
  bo as Popover,
174
174
  Qe as PrevChapterIcon,
175
175
  Ye as PrevPageIcon,
176
- Wr as PriorityBlockerIcon,
177
- Xr as PriorityCriticalIcon,
178
- jr as PriorityHighIcon,
179
- qr as PriorityLowIcon,
180
- Kr as PriorityMediumIcon,
181
- Qr as PriorityUnspecifiedIcon,
176
+ _r as PriorityBlockerIcon,
177
+ Wr as PriorityCriticalIcon,
178
+ Xr as PriorityHighIcon,
179
+ jr as PriorityLowIcon,
180
+ qr as PriorityMediumIcon,
181
+ Kr as PriorityUnspecifiedIcon,
182
182
  ho as Radio,
183
183
  Bo as RadioGroup,
184
- Yr as RefreshIcon,
185
- Zr as RerunIcon,
186
- se as ResizeColumnIcon,
187
- $r as RocketIcon,
188
- oe as RunManualIcon,
189
- re as SearchIcon,
184
+ Qr as RefreshIcon,
185
+ Yr as RerunIcon,
186
+ me as ResizeColumnIcon,
187
+ Zr as RocketIcon,
188
+ $r as RunManualIcon,
189
+ oe as SearchIcon,
190
190
  vo as SegmentedControl,
191
191
  Lo as Selection,
192
192
  or as SidePanel,
193
- go as SingleAutocomplete,
194
- ee as SortIcon,
193
+ Po as SingleAutocomplete,
194
+ re as SortIcon,
195
195
  Go as SortableItem,
196
196
  Jo as SortableList,
197
197
  Ro as SpinLoader,
198
- te as StatusSuccessIcon,
198
+ ee as StatusSuccessIcon,
199
199
  Ue as SuccessIcon,
200
200
  Oo as SystemAlert,
201
201
  Uo as SystemMessage,
202
202
  Xo as Table,
203
- ne as TestCaseIcon,
204
- ae as TestPlanIcon,
203
+ te as TestCaseIcon,
204
+ ne as TestPlanIcon,
205
205
  qo as ThemeProvider,
206
206
  Qo as Toggle,
207
207
  Zo as Tooltip,
208
208
  _e as TreeIcon,
209
209
  Vo as TreeSortableContainer,
210
210
  _o as TreeSortableItem,
211
- ce as UserIcon,
211
+ ae as UserIcon,
212
212
  $e as WarningIcon,
213
213
  ve as XlsIcon,
214
214
  nr as useEllipsisTitle,