@reportportal/ui-kit 0.0.1-alpha.102 → 0.0.1-alpha.103
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/attachedFile.js +1 -1
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +2 -2
- package/dist/components/fileDropArea/types.d.ts +1 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +1 -1
- package/dist/fileDropArea.js +160 -155
- package/dist/index-803576c3.js +110 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-e27a72a8.js +0 -99
package/package.json
CHANGED
package/dist/index-e27a72a8.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as r, useCallback as m } from "react";
|
|
3
|
-
import { c as w } from "./bind-06a7ff84.js";
|
|
4
|
-
import { S as C } from "./close-4d480ef7.js";
|
|
5
|
-
import { a as S, b as E, S as j, d as y, e as I, c as l, f as p } from "./xls-995781cc.js";
|
|
6
|
-
const k = (t) => {
|
|
7
|
-
var i;
|
|
8
|
-
const s = t.split(".");
|
|
9
|
-
return s.length > 1 && ((i = s.at(-1)) == null ? void 0 : i.toLowerCase()) || "";
|
|
10
|
-
}, L = {
|
|
11
|
-
"attached-file": "_attached-file_1od33_16",
|
|
12
|
-
"attached-file__file-name": "_attached-file__file-name_1od33_28",
|
|
13
|
-
"attached-file--failed": "_attached-file--failed_1od33_31",
|
|
14
|
-
"attached-file__name-text": "_attached-file__name-text_1od33_34",
|
|
15
|
-
"attached-file__icon": "_attached-file__icon_1od33_37",
|
|
16
|
-
"attached-file--uploading": "_attached-file--uploading_1od33_40",
|
|
17
|
-
"attached-file--full-width": "_attached-file--full-width_1od33_49",
|
|
18
|
-
"attached-file__file-icon": "_attached-file__file-icon_1od33_58",
|
|
19
|
-
"attached-file__info": "_attached-file__info_1od33_70",
|
|
20
|
-
"attached-file__download-icon": "_attached-file__download-icon_1od33_94",
|
|
21
|
-
"attached-file__file-details": "_attached-file__file-details_1od33_113",
|
|
22
|
-
"attached-file__error-message": "_attached-file__error-message_1od33_118",
|
|
23
|
-
"attached-file__upload-progress": "_attached-file__upload-progress_1od33_123",
|
|
24
|
-
"attached-file__upload-progress-bar": "_attached-file__upload-progress-bar_1od33_132",
|
|
25
|
-
"attached-file__remove-button": "_attached-file__remove-button_1od33_136"
|
|
26
|
-
}, e = w.bind(L), A = {
|
|
27
|
-
csv: j,
|
|
28
|
-
jar: y,
|
|
29
|
-
pdf: I,
|
|
30
|
-
jpg: l,
|
|
31
|
-
jpeg: l,
|
|
32
|
-
png: l,
|
|
33
|
-
gif: l,
|
|
34
|
-
svg: l,
|
|
35
|
-
webp: l,
|
|
36
|
-
xls: p,
|
|
37
|
-
xlsx: p
|
|
38
|
-
}, M = (t) => A[t.toLowerCase()] ?? E, X = ({
|
|
39
|
-
fileName: t,
|
|
40
|
-
size: s,
|
|
41
|
-
uploadingProgress: i = 0,
|
|
42
|
-
isUploadFailed: _ = !1,
|
|
43
|
-
uploadFailedMessage: g,
|
|
44
|
-
isUploading: c = !1,
|
|
45
|
-
isFullWidth: u = !1,
|
|
46
|
-
onDownload: h = () => {
|
|
47
|
-
},
|
|
48
|
-
onRemove: d
|
|
49
|
-
}) => {
|
|
50
|
-
const f = r(() => k(t), [t]), v = f.toUpperCase(), x = r(() => M(f), [f]), b = m(
|
|
51
|
-
(n) => {
|
|
52
|
-
n.stopPropagation(), d == null || d();
|
|
53
|
-
},
|
|
54
|
-
[d]
|
|
55
|
-
), N = m(
|
|
56
|
-
(n) => {
|
|
57
|
-
n.stopPropagation(), !_ && !c && h();
|
|
58
|
-
},
|
|
59
|
-
[_, c, h]
|
|
60
|
-
);
|
|
61
|
-
return /* @__PURE__ */ o(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
className: e("attached-file", {
|
|
65
|
-
"attached-file--failed": _,
|
|
66
|
-
"attached-file--uploading": c,
|
|
67
|
-
"attached-file--full-width": u
|
|
68
|
-
}),
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ a("div", { className: e("attached-file__icon"), children: /* @__PURE__ */ a("div", { className: e("attached-file__file-icon"), children: /* @__PURE__ */ a(x, {}) }) }),
|
|
71
|
-
/* @__PURE__ */ o("div", { className: e("attached-file__info"), children: [
|
|
72
|
-
/* @__PURE__ */ o("button", { type: "button", className: e("attached-file__file-name"), onClick: N, children: [
|
|
73
|
-
/* @__PURE__ */ a("span", { className: e("attached-file__name-text"), children: t }),
|
|
74
|
-
!c && !_ && /* @__PURE__ */ a("span", { className: e("attached-file__download-icon"), children: /* @__PURE__ */ a(S, {}) })
|
|
75
|
-
] }),
|
|
76
|
-
!_ && /* @__PURE__ */ o("div", { className: e("attached-file__file-details"), children: [
|
|
77
|
-
v,
|
|
78
|
-
", ",
|
|
79
|
-
s,
|
|
80
|
-
" MB"
|
|
81
|
-
] }),
|
|
82
|
-
_ && /* @__PURE__ */ a("div", { className: e("attached-file__error-message"), children: g })
|
|
83
|
-
] }),
|
|
84
|
-
d && /* @__PURE__ */ a("button", { type: "button", className: e("attached-file__remove-button"), onClick: b, children: /* @__PURE__ */ a(C, {}) }),
|
|
85
|
-
c && i > 0 && /* @__PURE__ */ a("div", { className: e("attached-file__upload-progress"), children: /* @__PURE__ */ a(
|
|
86
|
-
"div",
|
|
87
|
-
{
|
|
88
|
-
className: e("attached-file__upload-progress-bar"),
|
|
89
|
-
style: { width: `${i}%` }
|
|
90
|
-
}
|
|
91
|
-
) })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
};
|
|
96
|
-
export {
|
|
97
|
-
X as A,
|
|
98
|
-
k as g
|
|
99
|
-
};
|