@box/item-icon 2.32.25 → 2.32.27
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/esm/index.js +7 -13
- package/dist/esm/lib/constants.js +187 -108
- package/dist/esm/lib/item-icon/index.js +2 -5
- package/dist/esm/lib/item-icon/item-icon.js +56 -68
- package/dist/esm/lib/item-type-icon/index.js +2 -4
- package/dist/esm/lib/item-type-icon/item-type-icon.js +14 -33
- package/dist/esm/lib/messages.js +34 -36
- package/dist/esm/lib/types/file-category.js +0 -1
- package/dist/esm/lib/types/index.js +0 -1
- package/dist/esm/lib/utils.js +10 -13
- package/package.json +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FILE_CATEGORY_COLORS as
|
|
3
|
-
import {
|
|
4
|
-
import { ItemTypeIcon as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
x as ItemIcon,
|
|
9
|
-
O as ItemTypeIcon,
|
|
10
|
-
t as getColorByExtension,
|
|
11
|
-
r as getFileCategoryByExtension,
|
|
12
|
-
p as itemIconTable
|
|
13
|
-
};
|
|
1
|
+
import { ItemIcon as e, itemIconTable as t } from "./lib/item-icon/item-icon.js";
|
|
2
|
+
import { FILE_CATEGORY_COLORS as n, FILE_EXTENSION_CATEGORIES as r } from "./lib/constants.js";
|
|
3
|
+
import { getColorByExtension as i, getFileCategoryByExtension as a } from "./lib/utils.js";
|
|
4
|
+
import { ItemTypeIcon as o } from "./lib/item-type-icon/item-type-icon.js";
|
|
5
|
+
import "./lib/item-type-icon/index.js";
|
|
6
|
+
import "./lib/types/index.js";
|
|
7
|
+
export { n as FILE_CATEGORY_COLORS, r as FILE_EXTENSION_CATEGORIES, e as ItemIcon, o as ItemTypeIcon, i as getColorByExtension, a as getFileCategoryByExtension, t as itemIconTable };
|
|
@@ -1,109 +1,188 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
1
|
+
var e = {
|
|
2
|
+
audio: [
|
|
3
|
+
"aac",
|
|
4
|
+
"aif",
|
|
5
|
+
"aifc",
|
|
6
|
+
"aiff",
|
|
7
|
+
"amr",
|
|
8
|
+
"au",
|
|
9
|
+
"flac",
|
|
10
|
+
"m3u",
|
|
11
|
+
"m4a",
|
|
12
|
+
"mid",
|
|
13
|
+
"mp3",
|
|
14
|
+
"ra",
|
|
15
|
+
"wav",
|
|
16
|
+
"wma",
|
|
17
|
+
"wpl"
|
|
18
|
+
],
|
|
19
|
+
boxcanvas: ["boxcanvas"],
|
|
20
|
+
boxnote: ["boxnote"],
|
|
21
|
+
code: /* @__PURE__ */ "as.as3.asm.aspx.bat.c.cc.cmake.cpp.cs.css.cxx.db.diff.erb.groovy.h.haml.hh.htm.html.java.js.json.less.m.make.md.ml.mm.php.pl.plist.properties.py.rb.rst.sass.scala.scm.script.sh.sml.sql.wabba.yaml".split("."),
|
|
22
|
+
document: [
|
|
23
|
+
"dot",
|
|
24
|
+
"dotx",
|
|
25
|
+
"msg",
|
|
26
|
+
"odt",
|
|
27
|
+
"rtf",
|
|
28
|
+
"wpd",
|
|
29
|
+
"xhtml",
|
|
30
|
+
"xml",
|
|
31
|
+
"xsd",
|
|
32
|
+
"xsl"
|
|
33
|
+
],
|
|
34
|
+
"docuworks-binder": ["xbd"],
|
|
35
|
+
"docuworks-file": ["xdw"],
|
|
36
|
+
dwg: ["dwg", "dwgzip"],
|
|
37
|
+
"excel-spreadsheet": [
|
|
38
|
+
"xls",
|
|
39
|
+
"xlsb",
|
|
40
|
+
"xlsm",
|
|
41
|
+
"xlsx"
|
|
42
|
+
],
|
|
43
|
+
"google-docs": ["gdoc"],
|
|
44
|
+
"google-sheets": ["gsheet"],
|
|
45
|
+
"google-slides": ["gslide", "gslides"],
|
|
46
|
+
illustrator: ["ai"],
|
|
47
|
+
image: [
|
|
48
|
+
"bmp",
|
|
49
|
+
"cr2",
|
|
50
|
+
"crw",
|
|
51
|
+
"dng",
|
|
52
|
+
"gdraw",
|
|
53
|
+
"gif",
|
|
54
|
+
"heic",
|
|
55
|
+
"heif",
|
|
56
|
+
"jpeg",
|
|
57
|
+
"jpg",
|
|
58
|
+
"nef",
|
|
59
|
+
"png",
|
|
60
|
+
"ps",
|
|
61
|
+
"raf",
|
|
62
|
+
"raw",
|
|
63
|
+
"svg",
|
|
64
|
+
"svs",
|
|
65
|
+
"tga",
|
|
66
|
+
"tif",
|
|
67
|
+
"tiff",
|
|
68
|
+
"webp"
|
|
69
|
+
],
|
|
70
|
+
indesign: [
|
|
71
|
+
"idml",
|
|
72
|
+
"indd",
|
|
73
|
+
"indt",
|
|
74
|
+
"inx"
|
|
75
|
+
],
|
|
76
|
+
keynote: ["key"],
|
|
77
|
+
numbers: ["numbers"],
|
|
78
|
+
pages: ["pages"],
|
|
79
|
+
pdf: ["pdf"],
|
|
80
|
+
photoshop: ["psb", "psd"],
|
|
81
|
+
"powerpoint-presentation": [
|
|
82
|
+
"ppt",
|
|
83
|
+
"pptm",
|
|
84
|
+
"pptx"
|
|
85
|
+
],
|
|
86
|
+
presentation: [
|
|
87
|
+
"odp",
|
|
88
|
+
"otp",
|
|
89
|
+
"pot",
|
|
90
|
+
"potx"
|
|
91
|
+
],
|
|
92
|
+
spreadsheet: [
|
|
93
|
+
"csv",
|
|
94
|
+
"ods",
|
|
95
|
+
"tsv",
|
|
96
|
+
"xlt",
|
|
97
|
+
"xltx"
|
|
98
|
+
],
|
|
99
|
+
text: [
|
|
100
|
+
"fdx",
|
|
101
|
+
"log",
|
|
102
|
+
"txt",
|
|
103
|
+
"vi",
|
|
104
|
+
"vim",
|
|
105
|
+
"vtt",
|
|
106
|
+
"webdoc"
|
|
107
|
+
],
|
|
108
|
+
threed: [
|
|
109
|
+
"3ds",
|
|
110
|
+
"box3d",
|
|
111
|
+
"dae",
|
|
112
|
+
"fbx",
|
|
113
|
+
"mtl",
|
|
114
|
+
"obj",
|
|
115
|
+
"ply",
|
|
116
|
+
"stl"
|
|
117
|
+
],
|
|
118
|
+
vector: ["eps"],
|
|
119
|
+
video: [
|
|
120
|
+
"3g2",
|
|
121
|
+
"3gp",
|
|
122
|
+
"avi",
|
|
123
|
+
"flv",
|
|
124
|
+
"m2ts",
|
|
125
|
+
"m2v",
|
|
126
|
+
"m4v",
|
|
127
|
+
"mkv",
|
|
128
|
+
"mov",
|
|
129
|
+
"mp4",
|
|
130
|
+
"mpeg",
|
|
131
|
+
"mpg",
|
|
132
|
+
"mts",
|
|
133
|
+
"ogg",
|
|
134
|
+
"qt",
|
|
135
|
+
"ts",
|
|
136
|
+
"wmv"
|
|
137
|
+
],
|
|
138
|
+
"word-document": [
|
|
139
|
+
"doc",
|
|
140
|
+
"docm",
|
|
141
|
+
"docx"
|
|
142
|
+
],
|
|
143
|
+
zip: [
|
|
144
|
+
"gz",
|
|
145
|
+
"rar",
|
|
146
|
+
"tgz",
|
|
147
|
+
"zip"
|
|
148
|
+
]
|
|
149
|
+
}, t = {
|
|
150
|
+
red: "var(--bp-watermelon-red-120, var(--watermelon-red-120))",
|
|
151
|
+
orange: "var(--bp-orange-130, var(--orange-120))",
|
|
152
|
+
green: "var(--bp-green-light-135, var(--green-light-120))",
|
|
153
|
+
lightBlue: "var(--bp-light-blue-115, var(--light-blue-110))",
|
|
154
|
+
darkBlue: "var(--bp-light-blue-135, var(--light-blue-120))",
|
|
155
|
+
purple: "var(--bp-purple-rain-100, var(--purple-rain-100))",
|
|
156
|
+
gray: "var(--bp-gray-100, var(--gray-100))"
|
|
157
|
+
}, n = {
|
|
158
|
+
audio: t.purple,
|
|
159
|
+
boxcanvas: t.orange,
|
|
160
|
+
boxnote: t.gray,
|
|
161
|
+
code: t.red,
|
|
162
|
+
document: t.gray,
|
|
163
|
+
"docuworks-binder": t.gray,
|
|
164
|
+
"docuworks-file": t.green,
|
|
165
|
+
dwg: t.lightBlue,
|
|
166
|
+
"excel-spreadsheet": t.green,
|
|
167
|
+
"google-docs": t.darkBlue,
|
|
168
|
+
"google-sheets": t.green,
|
|
169
|
+
"google-slides": t.orange,
|
|
170
|
+
illustrator: t.orange,
|
|
171
|
+
image: t.green,
|
|
172
|
+
indesign: t.gray,
|
|
173
|
+
keynote: t.lightBlue,
|
|
174
|
+
numbers: t.green,
|
|
175
|
+
pages: t.orange,
|
|
176
|
+
pdf: t.red,
|
|
177
|
+
photoshop: t.lightBlue,
|
|
178
|
+
"powerpoint-presentation": t.red,
|
|
179
|
+
presentation: t.orange,
|
|
180
|
+
spreadsheet: t.green,
|
|
181
|
+
text: t.darkBlue,
|
|
182
|
+
threed: t.orange,
|
|
183
|
+
vector: t.orange,
|
|
184
|
+
video: t.lightBlue,
|
|
185
|
+
"word-document": t.darkBlue,
|
|
186
|
+
zip: t.gray
|
|
109
187
|
};
|
|
188
|
+
export { n as FILE_CATEGORY_COLORS, e as FILE_EXTENSION_CATEGORIES };
|
|
@@ -1,70 +1,58 @@
|
|
|
1
1
|
import * as e from "@box/blueprint-web-assets/icons/Content";
|
|
2
|
-
import {
|
|
3
|
-
import { Element as
|
|
4
|
-
import { jsx as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return /* @__PURE__ */ f(s, {
|
|
58
|
-
"aria-hidden": l,
|
|
59
|
-
"aria-label": i,
|
|
60
|
-
className: r,
|
|
61
|
-
height: o,
|
|
62
|
-
title: d,
|
|
63
|
-
width: o
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
x as ItemIcon,
|
|
68
|
-
x as default,
|
|
69
|
-
h as itemIconTable
|
|
2
|
+
import { AgentCustomExtract as t, Form as n, RelayAdvanced as r } from "@box/blueprint-web-assets/icons/Logo";
|
|
3
|
+
import { Element as i } from "@box/blueprint-web-assets/icons/Medium";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
var o = {
|
|
6
|
+
archive: e.Archive,
|
|
7
|
+
audio: e.FileAudio,
|
|
8
|
+
bookmark: e.FileBookmark,
|
|
9
|
+
boxcanvas: e.FileCanvas,
|
|
10
|
+
boxnote: e.FileBoxNote,
|
|
11
|
+
code: e.FileCode,
|
|
12
|
+
default: e.FileDefault,
|
|
13
|
+
document: e.FileText,
|
|
14
|
+
"docuworks-binder": e.FileXbd,
|
|
15
|
+
"docuworks-file": e.FileXdw,
|
|
16
|
+
dwg: e.FileDwg,
|
|
17
|
+
"excel-spreadsheet": e.FileExcel,
|
|
18
|
+
extract_agent: t,
|
|
19
|
+
"file-variable": e.FileVariable,
|
|
20
|
+
"folder-archive": e.FolderArchive,
|
|
21
|
+
"folder-collab": e.FolderShared,
|
|
22
|
+
"folder-external": e.FolderExternal,
|
|
23
|
+
"folder-plain": e.FolderPersonal,
|
|
24
|
+
"folder-variable": e.FolderVariable,
|
|
25
|
+
form: n,
|
|
26
|
+
"google-docs": e.FileDocs,
|
|
27
|
+
"google-sheets": e.FileSheets,
|
|
28
|
+
"google-slides": e.FileSlides,
|
|
29
|
+
illustrator: e.FileIllustrator,
|
|
30
|
+
image: e.FileImage,
|
|
31
|
+
indesign: e.FileIndesign,
|
|
32
|
+
keynote: e.FileKeynote,
|
|
33
|
+
numbers: e.FileNumbers,
|
|
34
|
+
pages: e.FilePages,
|
|
35
|
+
pdf: e.FilePdf,
|
|
36
|
+
photoshop: e.FilePhotoshop,
|
|
37
|
+
"powerpoint-presentation": e.FilePowerpoint,
|
|
38
|
+
presentation: e.FilePresentation,
|
|
39
|
+
spreadsheet: e.FileSpreadsheet,
|
|
40
|
+
text: e.FileText,
|
|
41
|
+
threed: e.FileThreeD,
|
|
42
|
+
vector: e.FileVector,
|
|
43
|
+
video: e.FileVideo,
|
|
44
|
+
"word-document": e.FileWord,
|
|
45
|
+
workflow: r,
|
|
46
|
+
zip: e.FileZip
|
|
47
|
+
}, s = ({ ariaHidden: t, ariaLabel: n, className: r, dimension: s = 32, iconType: c, isAppItem: l, title: u }) => {
|
|
48
|
+
let d = l ? i : e.FileDefault;
|
|
49
|
+
return /* @__PURE__ */ a(o[c] || d, {
|
|
50
|
+
"aria-hidden": t,
|
|
51
|
+
"aria-label": n,
|
|
52
|
+
className: r,
|
|
53
|
+
height: s,
|
|
54
|
+
title: u,
|
|
55
|
+
width: s
|
|
56
|
+
});
|
|
70
57
|
};
|
|
58
|
+
export { s as ItemIcon, s as default, o as itemIconTable };
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
hasCollaborations: n,
|
|
15
|
-
isExternallyOwned: m,
|
|
16
|
-
type: l
|
|
17
|
-
} = i, {
|
|
18
|
-
extension: s = ""
|
|
19
|
-
} = i, {
|
|
20
|
-
formatMessage: p
|
|
21
|
-
} = x();
|
|
22
|
-
let e = "default", r = o.file;
|
|
23
|
-
return l === t.File ? (e = c(s.toLowerCase()), r = e === "default" ? o.file : o.fileExtension) : l === t.Folder ? a === "archive" ? (e = "archive", r = o.archive) : a === "folder_archive" ? (e = "folder-archive", r = o.archiveFolder) : m ? (e = "folder-external", r = o.externalFolder) : n ? (e = "folder-collab", r = o.collaboratedFolder) : (e = "folder-plain", r = o.personalFolder) : l === t.WebLink && (e = "bookmark", r = o.bookmark), /* @__PURE__ */ h(d, {
|
|
24
|
-
ariaLabel: p(r, {
|
|
25
|
-
extension: s.toUpperCase()
|
|
26
|
-
}),
|
|
27
|
-
iconType: e,
|
|
28
|
-
...f
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
u as ItemTypeIcon,
|
|
33
|
-
u as default
|
|
1
|
+
import { ItemIcon as e } from "../item-icon/item-icon.js";
|
|
2
|
+
import { getFileCategoryByExtension as t } from "../utils.js";
|
|
3
|
+
import n from "../messages.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { useIntl as i } from "react-intl";
|
|
6
|
+
import { ItemType as a } from "@box/types";
|
|
7
|
+
var o = ({ item: o, ...s }) => {
|
|
8
|
+
let { archiveType: c, hasCollaborations: l, isExternallyOwned: u, type: d } = o, { extension: f = "" } = o, { formatMessage: p } = i(), m = "default", h = n.file;
|
|
9
|
+
return d === a.File ? (m = t(f.toLowerCase()), h = m === "default" ? n.file : n.fileExtension) : d === a.Folder ? c === "archive" ? (m = "archive", h = n.archive) : c === "folder_archive" ? (m = "folder-archive", h = n.archiveFolder) : u ? (m = "folder-external", h = n.externalFolder) : l ? (m = "folder-collab", h = n.collaboratedFolder) : (m = "folder-plain", h = n.personalFolder) : d === a.WebLink && (m = "bookmark", h = n.bookmark), /* @__PURE__ */ r(e, {
|
|
10
|
+
ariaLabel: p(h, { extension: f.toUpperCase() }),
|
|
11
|
+
iconType: m,
|
|
12
|
+
...s
|
|
13
|
+
});
|
|
34
14
|
};
|
|
15
|
+
export { o as ItemTypeIcon, o as default };
|
package/dist/esm/lib/messages.js
CHANGED
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
archive: {
|
|
4
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.archive",
|
|
5
|
+
defaultMessage: "Archive"
|
|
6
|
+
},
|
|
7
|
+
archiveFolder: {
|
|
8
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.archiveFolder",
|
|
9
|
+
defaultMessage: "Archive folder"
|
|
10
|
+
},
|
|
11
|
+
bookmark: {
|
|
12
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.bookmark",
|
|
13
|
+
defaultMessage: "Bookmark"
|
|
14
|
+
},
|
|
15
|
+
collaboratedFolder: {
|
|
16
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.collaboratedFolder",
|
|
17
|
+
defaultMessage: "Collaborated folder"
|
|
18
|
+
},
|
|
19
|
+
externalFolder: {
|
|
20
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.externalFolder",
|
|
21
|
+
defaultMessage: "External folder"
|
|
22
|
+
},
|
|
23
|
+
file: {
|
|
24
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.file",
|
|
25
|
+
defaultMessage: "File"
|
|
26
|
+
},
|
|
27
|
+
fileExtension: {
|
|
28
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.fileExtension",
|
|
29
|
+
defaultMessage: "{extension} file"
|
|
30
|
+
},
|
|
31
|
+
personalFolder: {
|
|
32
|
+
id: "groupSharedFeatures.itemIcon.itemTypeIcon.personalFolder",
|
|
33
|
+
defaultMessage: "Personal folder"
|
|
34
|
+
}
|
|
35
35
|
});
|
|
36
|
-
export {
|
|
37
|
-
r as default
|
|
38
|
-
};
|
|
36
|
+
export { t as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/esm/lib/utils.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { FILE_CATEGORY_COLORS as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
export {
|
|
11
|
-
O as getColorByExtension,
|
|
12
|
-
i as getFileCategoryByExtension
|
|
13
|
-
};
|
|
1
|
+
import { FILE_CATEGORY_COLORS as e, FILE_EXTENSION_CATEGORIES as t } from "./constants.js";
|
|
2
|
+
var n = (e = "") => {
|
|
3
|
+
let n = {};
|
|
4
|
+
return Object.entries(t).forEach(([e, t]) => {
|
|
5
|
+
t.forEach((t) => {
|
|
6
|
+
n[t] = e;
|
|
7
|
+
});
|
|
8
|
+
}), n[e] || "default";
|
|
9
|
+
}, r = (t) => t ? e[t] : void 0;
|
|
10
|
+
export { r as getColorByExtension, n as getFileCategoryByExtension };
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/item-icon",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.27",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@box/blueprint-web": "^14.
|
|
6
|
-
"@box/blueprint-web-assets": "^4.112.
|
|
5
|
+
"@box/blueprint-web": "^14.7.0",
|
|
6
|
+
"@box/blueprint-web-assets": "^4.112.3",
|
|
7
7
|
"@box/types": "^2.1.15",
|
|
8
8
|
"react": "^17.0.0 || ^18.0.0",
|
|
9
9
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
10
10
|
"react-intl": "^6.4.2"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@box/blueprint-web": "^14.
|
|
14
|
-
"@box/blueprint-web-assets": "^4.112.
|
|
15
|
-
"@box/storybook-utils": "^0.17.
|
|
13
|
+
"@box/blueprint-web": "^14.7.0",
|
|
14
|
+
"@box/blueprint-web-assets": "^4.112.3",
|
|
15
|
+
"@box/storybook-utils": "^0.17.30",
|
|
16
16
|
"@box/types": "^2.1.15",
|
|
17
17
|
"react": "^18.3.0",
|
|
18
18
|
"react-dom": "^18.3.0",
|