@box/metadata-view 0.48.13 → 0.48.15
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.
|
@@ -1,60 +1,61 @@
|
|
|
1
1
|
import { GridList as i } from "@box/blueprint-web";
|
|
2
2
|
import { ItemTypeIcon as h } from "@box/item-icon";
|
|
3
3
|
import { useIntl as T } from "react-intl";
|
|
4
|
-
import { V as
|
|
5
|
-
import { THUMBNAIL_GRID_VIEW_SIZES as
|
|
6
|
-
import
|
|
7
|
-
import { jsx as
|
|
4
|
+
import { V as E } from "../../../../chunks/types.js";
|
|
5
|
+
import { THUMBNAIL_GRID_VIEW_SIZES as b } from "../constants.js";
|
|
6
|
+
import p from "./messages.js";
|
|
7
|
+
import { jsx as t, jsxs as R } from "react/jsx-runtime";
|
|
8
8
|
import { ItemActionMenu as f } from "../item-action-menu/item-action-menu.js";
|
|
9
9
|
import '../../../../styles/metadata-grid.css';const L = "_itemThumbnail_93ess_1", M = {
|
|
10
10
|
itemThumbnail: L
|
|
11
|
-
}, A = 188, G = 250, g = 8, x = 5, U = (r) => A + G * (g - r) / x,
|
|
11
|
+
}, A = 188, G = 250, g = 8, x = 5, U = (r) => A + G * (g - r) / x, y = ({
|
|
12
12
|
items: r,
|
|
13
13
|
itemActionMenuProps: n,
|
|
14
14
|
zoomLevel: c,
|
|
15
|
-
...
|
|
15
|
+
..._
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
|
-
formatMessage:
|
|
18
|
+
formatMessage: u
|
|
19
19
|
} = T();
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
"aria-label":
|
|
20
|
+
return /* @__PURE__ */ t(i, {
|
|
21
|
+
"aria-label": u(p.gridView),
|
|
22
|
+
items: r,
|
|
22
23
|
style: {
|
|
23
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(${U(
|
|
24
|
+
gridTemplateColumns: `repeat(auto-fit, minmax(${U(b[c])}px, 1fr))`
|
|
24
25
|
},
|
|
25
|
-
...
|
|
26
|
-
children:
|
|
26
|
+
..._,
|
|
27
|
+
children: (e) => {
|
|
27
28
|
var o, a, l;
|
|
28
29
|
const {
|
|
29
30
|
name: m,
|
|
30
|
-
createdAt:
|
|
31
|
-
} =
|
|
31
|
+
createdAt: d
|
|
32
|
+
} = e, s = "thumbnailURLs" in e ? ((o = e.thumbnailURLs) == null ? void 0 : o.large) || ((a = e.thumbnailURLs) == null ? void 0 : a.medium) || ((l = e.thumbnailURLs) == null ? void 0 : l.small) : void 0;
|
|
32
33
|
return /* @__PURE__ */ R(i.Item, {
|
|
33
34
|
textValue: m,
|
|
34
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ t(i.Thumbnail, {
|
|
35
36
|
className: M.itemThumbnail,
|
|
36
|
-
children: s ? /* @__PURE__ */
|
|
37
|
+
children: s ? /* @__PURE__ */ t("img", {
|
|
37
38
|
alt: m,
|
|
38
39
|
src: s
|
|
39
|
-
}) : /* @__PURE__ */
|
|
40
|
-
item:
|
|
40
|
+
}) : /* @__PURE__ */ t(h, {
|
|
41
|
+
item: e
|
|
41
42
|
})
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ t(i.Header, {
|
|
43
44
|
children: m
|
|
44
|
-
}), /* @__PURE__ */
|
|
45
|
-
children:
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
-
children: n ? (I) => /* @__PURE__ */
|
|
45
|
+
}), /* @__PURE__ */ t(i.Subtitle, {
|
|
46
|
+
children: d
|
|
47
|
+
}), /* @__PURE__ */ t(i.Actions, {
|
|
48
|
+
children: n ? (I) => /* @__PURE__ */ t(f, {
|
|
48
49
|
...n,
|
|
49
|
-
item:
|
|
50
|
+
item: e,
|
|
50
51
|
onOpenChange: I,
|
|
51
|
-
viewMode:
|
|
52
|
+
viewMode: E.GRID
|
|
52
53
|
}) : null
|
|
53
54
|
})]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
y as MetadataGrid
|
|
60
61
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.15",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^
|
|
7
|
-
"@box/blueprint-web-assets": "^4.
|
|
8
|
-
"@box/box-item-type-selector": "^0.
|
|
9
|
-
"@box/item-icon": "^0.
|
|
10
|
-
"@box/metadata-filter": "^1.
|
|
11
|
-
"@box/types": "0.1
|
|
6
|
+
"@box/blueprint-web": "^12.66.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.66.1",
|
|
8
|
+
"@box/box-item-type-selector": "^0.69.8",
|
|
9
|
+
"@box/item-icon": "^0.23.8",
|
|
10
|
+
"@box/metadata-filter": "^1.26.6",
|
|
11
|
+
"@box/types": "0.2.1",
|
|
12
12
|
"@tanstack/react-virtual": "^3.10.8",
|
|
13
13
|
"formik": "^2.4.5",
|
|
14
14
|
"lodash": "^4.17.15",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"react-intl": "^6.4.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@box/blueprint-web": "^
|
|
22
|
-
"@box/blueprint-web-assets": "^4.66.
|
|
21
|
+
"@box/blueprint-web": "^12.66.0",
|
|
22
|
+
"@box/blueprint-web-assets": "^4.66.1",
|
|
23
23
|
"@box/box-item-type-selector": "^0.69.8",
|
|
24
24
|
"@box/eslint-plugin-blueprint": "1.0.4",
|
|
25
25
|
"@box/item-icon": "^0.23.8",
|