@box/metadata-view 0.24.10 → 0.25.0

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.
Files changed (49) hide show
  1. package/dist/chunks/table-body-with-data.js +93 -82
  2. package/dist/esm/lib/components/action-bar/action-bar.js +48 -37
  3. package/dist/esm/lib/components/action-bar/messages.js +14 -2
  4. package/dist/esm/lib/components/action-bar/zoom-button.js +30 -0
  5. package/dist/esm/lib/components/constants.js +6 -0
  6. package/dist/esm/lib/components/metadata-grid/metadata-grid.js +34 -29
  7. package/dist/esm/lib/components/metadata-table/metadata-table.js +62 -55
  8. package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +3 -2
  9. package/dist/esm/lib/metadata-view.js +70 -60
  10. package/dist/i18n/bn-IN.js +3 -0
  11. package/dist/i18n/da-DK.js +3 -0
  12. package/dist/i18n/de-DE.js +3 -0
  13. package/dist/i18n/en-AU.js +3 -0
  14. package/dist/i18n/en-CA.js +3 -0
  15. package/dist/i18n/en-GB.js +3 -0
  16. package/dist/i18n/en-US.js +3 -0
  17. package/dist/i18n/en-US.properties +6 -0
  18. package/dist/i18n/en-x-pseudo.js +3 -0
  19. package/dist/i18n/es-419.js +3 -0
  20. package/dist/i18n/es-ES.js +3 -0
  21. package/dist/i18n/fi-FI.js +3 -0
  22. package/dist/i18n/fr-CA.js +3 -0
  23. package/dist/i18n/fr-FR.js +3 -0
  24. package/dist/i18n/hi-IN.js +3 -0
  25. package/dist/i18n/it-IT.js +3 -0
  26. package/dist/i18n/ja-JP.js +3 -0
  27. package/dist/i18n/json/src/lib/components/action-bar/messages.json +1 -1
  28. package/dist/i18n/ko-KR.js +3 -0
  29. package/dist/i18n/nb-NO.js +3 -0
  30. package/dist/i18n/nl-NL.js +3 -0
  31. package/dist/i18n/pl-PL.js +3 -0
  32. package/dist/i18n/pt-BR.js +3 -0
  33. package/dist/i18n/ru-RU.js +3 -0
  34. package/dist/i18n/sv-SE.js +3 -0
  35. package/dist/i18n/tr-TR.js +3 -0
  36. package/dist/i18n/zh-CN.js +3 -0
  37. package/dist/i18n/zh-TW.js +3 -0
  38. package/dist/styles/action-bar.css +1 -1
  39. package/dist/styles/table-body-with-data.css +1 -1
  40. package/dist/styles/zoom-button.css +1 -0
  41. package/dist/types/lib/components/action-bar/action-bar.d.ts +6 -3
  42. package/dist/types/lib/components/action-bar/messages.d.ts +15 -0
  43. package/dist/types/lib/components/action-bar/zoom-button.d.ts +6 -0
  44. package/dist/types/lib/components/constants.d.ts +3 -0
  45. package/dist/types/lib/components/metadata-grid/metadata-grid.d.ts +4 -2
  46. package/dist/types/lib/components/metadata-table/metadata-table.d.ts +2 -1
  47. package/dist/types/lib/components/metadata-table/table-body/table-body-with-data.d.ts +1 -1
  48. package/dist/types/lib/metadata-view.d.ts +1 -1
  49. package/package.json +2 -2
@@ -1,39 +1,42 @@
1
- import { TableBody as N, Row as _, Cell as s, ActionCell as u, Text as h } from "@box/blueprint-web";
2
- import I from "lodash/get";
3
- import a from "react";
4
- import { ItemTypeIcon as C } from "@box/item-icon";
5
- import T from "clsx";
1
+ import { TableBody as N, Row as y, Cell as n, ActionCell as T, Text as I } from "@box/blueprint-web";
2
+ import C from "lodash/get";
3
+ import s from "react";
4
+ import { ItemTypeIcon as p } from "@box/item-icon";
5
+ import u from "clsx";
6
6
  import { I as d } from "./types.js";
7
- import { jsx as l, jsxs as m } from "react/jsx-runtime";
7
+ import { THUMBNAIL_LIST_VIEW_HEIGHTS as f } from "../esm/lib/components/constants.js";
8
+ import { jsx as t, jsxs as b } from "react/jsx-runtime";
8
9
  import { ItemActionMenu as x } from "../esm/lib/components/item-action-menu/item-action-menu.js";
9
- import '../styles/table-body-with-data.css';const f = "_tableHeaderActionsWrapper_r2hj7_1", y = "_tableHeaderActions_r2hj7_1", A = "_selectAllCheckbox_r2hj7_33", S = "_tableNameCell_r2hj7_38", $ = "_tableNameCellSubTitle_r2hj7_44", p = {
10
- tableHeaderActionsWrapper: f,
11
- tableHeaderActions: y,
12
- selectAllCheckbox: A,
13
- tableNameCell: S,
14
- tableNameCellSubTitle: $
15
- }, L = /* @__PURE__ */ a.memo(({
16
- item: t,
10
+ import '../styles/table-body-with-data.css';const S = "_tableHeaderActionsWrapper_rsay7_1", A = "_tableHeaderActions_rsay7_1", L = "_tableRow_rsay7_33", $ = "_selectAllCheckbox_rsay7_42", E = "_tableNameCell_rsay7_47", H = "_tableNameCellSubTitle_rsay7_53", k = "_iconCell_rsay7_58", m = {
11
+ tableHeaderActionsWrapper: S,
12
+ tableHeaderActions: A,
13
+ tableRow: L,
14
+ selectAllCheckbox: $,
15
+ tableNameCell: E,
16
+ tableNameCellSubTitle: H,
17
+ iconCell: k
18
+ }, R = /* @__PURE__ */ s.memo(({
19
+ item: l,
17
20
  column: e,
18
21
  iconColumnVariant: r
19
22
  }) => {
20
23
  const {
21
24
  id: o,
22
25
  subTitle: c
23
- } = e, i = `${e.textValue}-${t.id}`;
24
- return /* @__PURE__ */ l(s, {
25
- children: /* @__PURE__ */ m("div", {
26
- className: p.tableNameCell,
27
- children: [/* @__PURE__ */ l(C, {
28
- item: t
29
- }), /* @__PURE__ */ m("div", {
30
- className: T({
31
- [p.tableNameCellSubTitle]: r === d.INLINE_SUBTITLE
26
+ } = e, i = `${e.textValue}-${l.id}`;
27
+ return /* @__PURE__ */ t(n, {
28
+ children: /* @__PURE__ */ b("div", {
29
+ className: m.tableNameCell,
30
+ children: [/* @__PURE__ */ t(p, {
31
+ item: l
32
+ }), /* @__PURE__ */ b("div", {
33
+ className: u({
34
+ [m.tableNameCellSubTitle]: r === d.INLINE_SUBTITLE
32
35
  }),
33
- children: [/* @__PURE__ */ l(h, {
36
+ children: [/* @__PURE__ */ t(I, {
34
37
  as: "span",
35
- children: I(t, o)
36
- }), r === d.INLINE_SUBTITLE && /* @__PURE__ */ l(h, {
38
+ children: C(l, o)
39
+ }), r === d.INLINE_SUBTITLE && /* @__PURE__ */ t(I, {
37
40
  as: "span",
38
41
  color: "textOnLightSecondary",
39
42
  children: c
@@ -41,36 +44,36 @@ import '../styles/table-body-with-data.css';const f = "_tableHeaderActionsWrappe
41
44
  })]
42
45
  })
43
46
  }, i);
44
- }), j = /* @__PURE__ */ a.memo(({
45
- item: t,
47
+ }), W = /* @__PURE__ */ s.memo(({
48
+ item: l,
46
49
  column: e
47
50
  }) => {
48
51
  var o;
49
- const r = `${e.textValue}-${t.id}`;
50
- return /* @__PURE__ */ l(s, {
51
- children: (o = e.cellRenderer) == null ? void 0 : o.call(e, t, e)
52
+ const r = `${e.textValue}-${l.id}`;
53
+ return /* @__PURE__ */ t(n, {
54
+ children: (o = e.cellRenderer) == null ? void 0 : o.call(e, l, e)
52
55
  }, r);
53
- }), k = /* @__PURE__ */ a.memo(({
54
- item: t,
56
+ }), w = /* @__PURE__ */ s.memo(({
57
+ item: l,
55
58
  column: e
56
59
  }) => {
57
- const r = `${e.textValue}-${t.id}`, o = I(t, e.id);
58
- return o ? /* @__PURE__ */ l(s, {
60
+ const r = `${e.textValue}-${l.id}`, o = C(l, e.id);
61
+ return o ? /* @__PURE__ */ t(n, {
59
62
  children: o.join(" ")
60
- }, r) : /* @__PURE__ */ l(s, {}, r);
61
- }), E = /* @__PURE__ */ a.memo(({
62
- item: t,
63
+ }, r) : /* @__PURE__ */ t(n, {}, r);
64
+ }), B = /* @__PURE__ */ s.memo(({
65
+ item: l,
63
66
  column: e
64
67
  }) => {
65
- const r = `${e.textValue}-${t.id}`;
66
- return /* @__PURE__ */ l(s, {
67
- children: /* @__PURE__ */ l(h, {
68
+ const r = `${e.textValue}-${l.id}`;
69
+ return /* @__PURE__ */ t(n, {
70
+ children: /* @__PURE__ */ t(I, {
68
71
  as: "span",
69
- children: I(t, e.id)
72
+ children: C(l, e.id)
70
73
  })
71
74
  }, r);
72
- }), W = /* @__PURE__ */ a.memo(({
73
- item: t,
75
+ }), U = /* @__PURE__ */ s.memo(({
76
+ item: l,
74
77
  column: e,
75
78
  iconColumnVariant: r
76
79
  }) => {
@@ -79,64 +82,72 @@ import '../styles/table-body-with-data.css';const f = "_tableHeaderActionsWrappe
79
82
  id: c,
80
83
  type: i
81
84
  } = e;
82
- return c === "name" && (r === d.INLINE || r === d.INLINE_SUBTITLE) ? /* @__PURE__ */ l(L, {
85
+ return c === "name" && (r === d.INLINE || r === d.INLINE_SUBTITLE) ? /* @__PURE__ */ t(R, {
83
86
  column: e,
84
87
  iconColumnVariant: r,
85
- item: t
86
- }) : o ? /* @__PURE__ */ l(j, {
88
+ item: l
89
+ }) : o ? /* @__PURE__ */ t(W, {
87
90
  column: e,
88
- item: t
89
- }) : i === "multiSelect" ? /* @__PURE__ */ l(k, {
91
+ item: l
92
+ }) : i === "multiSelect" ? /* @__PURE__ */ t(w, {
90
93
  column: e,
91
- item: t
92
- }) : /* @__PURE__ */ l(E, {
94
+ item: l
95
+ }) : /* @__PURE__ */ t(B, {
93
96
  column: e,
94
- item: t
97
+ item: l
95
98
  });
96
- }), H = /* @__PURE__ */ a.memo(({
97
- item: t
98
- }) => /* @__PURE__ */ l(s, {
99
- children: /* @__PURE__ */ l(C, {
100
- item: t
99
+ }), g = /* @__PURE__ */ s.memo(({
100
+ item: l,
101
+ zoomLevel: e
102
+ }) => /* @__PURE__ */ t(n, {
103
+ style: {
104
+ height: f[e]
105
+ },
106
+ children: /* @__PURE__ */ t(p, {
107
+ className: m.iconCell,
108
+ item: l
101
109
  })
102
- }, `item-type-icon-${t.id}`)), B = /* @__PURE__ */ a.memo(({
103
- item: t,
110
+ }, `item-type-icon-${l.id}`)), j = /* @__PURE__ */ s.memo(({
111
+ item: l,
104
112
  itemActionMenuProps: e
105
- }) => /* @__PURE__ */ l(u, {
106
- children: (r) => e ? /* @__PURE__ */ l(x, {
113
+ }) => /* @__PURE__ */ t(T, {
114
+ children: (r) => e ? /* @__PURE__ */ t(x, {
107
115
  ...e,
108
- item: t,
116
+ item: l,
109
117
  onOpenChange: r
110
118
  }) : null
111
- })), V = ({
112
- columns: t,
119
+ })), J = ({
120
+ columns: l,
113
121
  iconColumnVariant: e,
114
122
  isSelectAllEnabled: r,
115
123
  items: o,
116
- itemActionMenuProps: c
124
+ itemActionMenuProps: c,
125
+ zoomLevel: i
117
126
  }) => {
118
- const i = e === d.COLUMN;
119
- return /* @__PURE__ */ l(N, {
120
- items: o.map((n) => ({
121
- key: n.id,
122
- ...n
127
+ const _ = e === d.COLUMN;
128
+ return /* @__PURE__ */ t(N, {
129
+ items: o.map((a) => ({
130
+ key: a.id,
131
+ ...a
123
132
  })),
124
- children: (n) => /* @__PURE__ */ m(_, {
125
- id: n.id,
126
- children: [i && /* @__PURE__ */ l(H, {
127
- item: n
128
- }), t.map((b) => /* @__PURE__ */ l(W, {
129
- column: b,
133
+ children: (a) => /* @__PURE__ */ b(y, {
134
+ className: m.tableRow,
135
+ id: a.id,
136
+ children: [_ && /* @__PURE__ */ t(g, {
137
+ item: a,
138
+ zoomLevel: i
139
+ }), l.map((h) => /* @__PURE__ */ t(U, {
140
+ column: h,
130
141
  iconColumnVariant: e,
131
- item: n
132
- }, `${b.textValue}-${n.id}`)), r && /* @__PURE__ */ l(B, {
133
- item: n,
142
+ item: a
143
+ }, `${h.textValue}-${a.id}`)), r && /* @__PURE__ */ t(j, {
144
+ item: a,
134
145
  itemActionMenuProps: c
135
146
  })]
136
- }, n.id)
147
+ }, a.id)
137
148
  });
138
149
  };
139
150
  export {
140
- V as T,
141
- p as s
151
+ J as T,
152
+ m as s
142
153
  };
@@ -1,48 +1,59 @@
1
- import { Button as f } from "@box/blueprint-web";
1
+ import { Button as B } from "@box/blueprint-web";
2
2
  import { Grid as p } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as w } from "react-intl";
4
- import { V as s } from "../../../../chunks/types.js";
5
- import n from "./messages.js";
6
- import { SortDropdown as _ } from "./sort-dropdown.js";
7
- import { jsxs as c, jsx as i } from "react/jsx-runtime";
8
- import { FilterRow as R } from "../filter-row/filter-row.js";
9
- import '../../../../styles/action-bar.css';const B = "_actionBar_1jgp4_1", g = "_filterRow_1jgp4_8", h = "_additionalActions_1jgp4_13", o = {
10
- actionBar: B,
11
- filterRow: g,
12
- additionalActions: h
13
- }, I = ({
14
- isViewModeButtonDisabled: e,
3
+ import { useIntl as u } from "react-intl";
4
+ import { V as r } from "../../../../chunks/types.js";
5
+ import { SortDropdown as R } from "./sort-dropdown.js";
6
+ import { ZoomButton as v } from "./zoom-button.js";
7
+ import s from "./messages.js";
8
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
9
+ import { FilterRow as h } from "../filter-row/filter-row.js";
10
+ import '../../../../styles/action-bar.css';const b = "_actionBar_dsa2b_1", A = "_filterRow_dsa2b_8", C = "_additionalActions_dsa2b_13", G = "_viewModeButtonContainer_dsa2b_24", t = {
11
+ actionBar: b,
12
+ filterRow: A,
13
+ additionalActions: C,
14
+ viewModeButtonContainer: G
15
+ }, T = ({
16
+ isIconColumnEnabled: c,
17
+ isViewModeButtonDisabled: d,
15
18
  onViewModeClick: m,
16
- sortableColumnNames: l,
17
- sortDropdownProps: t,
18
- viewMode: r,
19
- ...d
19
+ onZoomLevelChange: l,
20
+ sortableColumnNames: f,
21
+ sortDropdownProps: a,
22
+ viewMode: i,
23
+ zoomLevel: w,
24
+ ..._
20
25
  }) => {
21
26
  const {
22
- formatMessage: a
23
- } = w();
24
- return /* @__PURE__ */ c("div", {
25
- className: o.actionBar,
26
- children: [/* @__PURE__ */ i("div", {
27
- className: o.filterRow,
28
- children: /* @__PURE__ */ i(R, {
29
- ...d
27
+ formatMessage: n
28
+ } = u();
29
+ return /* @__PURE__ */ e("div", {
30
+ className: t.actionBar,
31
+ children: [/* @__PURE__ */ o("div", {
32
+ className: t.filterRow,
33
+ children: /* @__PURE__ */ o(h, {
34
+ ..._
30
35
  })
31
- }), /* @__PURE__ */ c("div", {
32
- className: o.additionalActions,
33
- children: [t && /* @__PURE__ */ i(_, {
34
- ...t,
35
- sortableColumnNames: l
36
- }), !e && /* @__PURE__ */ i(f, {
37
- "aria-label": r === s.GRID ? a(n.switchToListView) : a(n.switchToGridView),
38
- icon: p,
39
- onClick: m,
40
- variant: r === s.GRID ? "primary" : "tertiary"
36
+ }), /* @__PURE__ */ e("div", {
37
+ className: t.additionalActions,
38
+ children: [a && /* @__PURE__ */ o(R, {
39
+ ...a,
40
+ sortableColumnNames: f
41
+ }), (c || i === r.GRID) && /* @__PURE__ */ o(v, {
42
+ onZoomLevelChange: l,
43
+ zoomLevel: w
44
+ }), !d && /* @__PURE__ */ o("div", {
45
+ className: t.viewModeButtonContainer,
46
+ children: /* @__PURE__ */ o(B, {
47
+ "aria-label": i === r.GRID ? n(s.switchToListView) : n(s.switchToGridView),
48
+ icon: p,
49
+ onClick: m,
50
+ variant: i === r.GRID ? "primary" : "tertiary"
51
+ })
41
52
  })]
42
53
  })]
43
54
  });
44
55
  };
45
56
  export {
46
- I as ActionBar,
47
- I as default
57
+ T as ActionBar,
58
+ T as default
48
59
  };
@@ -1,5 +1,5 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const t = e({
2
+ const i = e({
3
3
  switchToGridView: {
4
4
  id: "groupSharedFeatures.metadataView.actionBar.switchToGridView",
5
5
  defaultMessage: "Switch to Grid View"
@@ -7,8 +7,20 @@ const t = e({
7
7
  switchToListView: {
8
8
  id: "groupSharedFeatures.metadataView.actionBar.switchToListView",
9
9
  defaultMessage: "Switch to List View"
10
+ },
11
+ sliderDecreaseSize: {
12
+ id: "groupSharedFeatures.metadataView.actionBar.sliderDecreaseSize",
13
+ defaultMessage: "Decrease"
14
+ },
15
+ sliderIncreaseSize: {
16
+ id: "groupSharedFeatures.metadataView.actionBar.sliderIncreaseSize",
17
+ defaultMessage: "Increase"
18
+ },
19
+ sliderLabel: {
20
+ id: "groupSharedFeatures.metadataView.actionBar.sliderLabel",
21
+ defaultMessage: "Slider"
10
22
  }
11
23
  });
12
24
  export {
13
- t as default
25
+ i as default
14
26
  };
@@ -0,0 +1,30 @@
1
+ import { useIntl as o } from "react-intl";
2
+ import { Slider as i } from "@box/blueprint-web";
3
+ import r from "./messages.js";
4
+ import { jsx as s } from "react/jsx-runtime";
5
+ import '../../../../styles/zoom-button.css';const a = "_sliderContainer_1entc_1", l = {
6
+ sliderContainer: a
7
+ }, f = ({
8
+ onZoomLevelChange: t,
9
+ zoomLevel: n
10
+ }) => {
11
+ const {
12
+ formatMessage: e
13
+ } = o();
14
+ return /* @__PURE__ */ s("div", {
15
+ className: l.sliderContainer,
16
+ children: /* @__PURE__ */ s(i, {
17
+ max: 2,
18
+ min: 0,
19
+ minusButtonLabel: e(r.sliderDecreaseSize),
20
+ onValueChange: t,
21
+ plusButtonLabel: e(r.sliderIncreaseSize),
22
+ sliderLabel: e(r.sliderLabel),
23
+ value: n
24
+ })
25
+ });
26
+ };
27
+ export {
28
+ f as ZoomButton,
29
+ f as default
30
+ };
@@ -0,0 +1,6 @@
1
+ const I = [8, 5, 3], p = ["36px", "84px", "111px"], x = ["36px", "111px", "147px"];
2
+ export {
3
+ I as THUMBNAIL_GRID_VIEW_SIZES,
4
+ p as THUMBNAIL_LIST_VIEW_HEIGHTS,
5
+ x as THUMBNAIL_WIDTHS
6
+ };
@@ -1,45 +1,50 @@
1
- import { GridList as i } from "@box/blueprint-web";
1
+ import { GridList as t } from "@box/blueprint-web";
2
2
  import { ItemTypeIcon as a } from "@box/item-icon";
3
3
  import { useIntl as l } from "react-intl";
4
- import { V as s } from "../../../../chunks/types.js";
5
- import d from "./messages.js";
6
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
7
- import { ItemActionMenu as h } from "../item-action-menu/item-action-menu.js";
8
- import '../../../../styles/metadata-grid.css';const u = "_itemThumbnail_1j3e6_1", p = {
9
- itemThumbnail: u
10
- }, w = ({
4
+ import { V as d } from "../../../../chunks/types.js";
5
+ import { THUMBNAIL_GRID_VIEW_SIZES as c } from "../constants.js";
6
+ import _ from "./messages.js";
7
+ import { jsx as e, jsxs as I } from "react/jsx-runtime";
8
+ import { ItemActionMenu as T } from "../item-action-menu/item-action-menu.js";
9
+ import '../../../../styles/metadata-grid.css';const p = "_itemThumbnail_1j3e6_1", u = {
10
+ itemThumbnail: p
11
+ }, E = 188, f = 250, M = 8, h = 5, A = (m) => E + f * (M - m) / h, C = ({
11
12
  items: m,
12
- itemActionMenuProps: t
13
+ itemActionMenuProps: o,
14
+ zoomLevel: r
13
15
  }) => {
14
16
  const {
15
- formatMessage: o
17
+ formatMessage: n
16
18
  } = l();
17
- return /* @__PURE__ */ e(i, {
18
- "aria-label": o(d.gridView),
19
+ return /* @__PURE__ */ e(t, {
20
+ "aria-label": n(_.gridView),
19
21
  selectionMode: "multiple",
20
- children: m.map((r, f) => /* @__PURE__ */ c(i.Item, {
21
- children: [/* @__PURE__ */ e(i.Thumbnail, {
22
- className: p.itemThumbnail,
22
+ style: {
23
+ gridTemplateColumns: `repeat(auto-fit, minmax(${A(c[r])}px, 1fr))`
24
+ },
25
+ children: m.map((i, G) => /* @__PURE__ */ I(t.Item, {
26
+ children: [/* @__PURE__ */ e(t.Thumbnail, {
27
+ className: u.itemThumbnail,
23
28
  children: /* @__PURE__ */ e(a, {
24
29
  dimension: 128,
25
- item: r
30
+ item: i
26
31
  })
27
- }), /* @__PURE__ */ e(i.Header, {
28
- children: r.name
29
- }), /* @__PURE__ */ e(i.Subtitle, {
30
- children: r.createdAt
31
- }), t ? /* @__PURE__ */ e(i.Actions, {
32
- children: (n) => /* @__PURE__ */ e(h, {
33
- ...t,
34
- item: r,
35
- onOpenChange: n,
36
- viewMode: s.GRID
32
+ }), /* @__PURE__ */ e(t.Header, {
33
+ children: i.name
34
+ }), /* @__PURE__ */ e(t.Subtitle, {
35
+ children: i.createdAt
36
+ }), o ? /* @__PURE__ */ e(t.Actions, {
37
+ children: (s) => /* @__PURE__ */ e(T, {
38
+ ...o,
39
+ item: i,
40
+ onOpenChange: s,
41
+ viewMode: d.GRID
37
42
  })
38
43
  }) : null]
39
- }, r.id))
44
+ }, i.id))
40
45
  });
41
46
  };
42
47
  export {
43
- w as MetadataGrid,
44
- w as default
48
+ C as MetadataGrid,
49
+ C as default
45
50
  };
@@ -1,82 +1,89 @@
1
- import { Text as x, ListCheckbox as T, Table as g, TableHeader as w, Column as W } from "@box/blueprint-web";
2
- import { useIntl as y } from "react-intl";
3
- import C from "./table-body/ghost-table-body.js";
4
- import { s as r, T as M } from "../../../../chunks/table-body-with-data.js";
5
- import { I as N } from "../../../../chunks/types.js";
6
- import h from "./messages.js";
7
- import { jsx as e, jsxs as R } from "react/jsx-runtime";
8
- const L = ({
1
+ import { Text as W, ListCheckbox as g, Table as I, TableHeader as w, Column as C } from "@box/blueprint-web";
2
+ import { useIntl as M } from "react-intl";
3
+ import N from "./table-body/ghost-table-body.js";
4
+ import { s as i, T as y } from "../../../../chunks/table-body-with-data.js";
5
+ import { I as A } from "../../../../chunks/types.js";
6
+ import { THUMBNAIL_WIDTHS as B } from "../constants.js";
7
+ import f from "./messages.js";
8
+ import { jsx as a, jsxs as D } from "react/jsx-runtime";
9
+ const S = ({
9
10
  columns: l,
10
- isLoading: i = !1,
11
- iconColumnVariant: o,
11
+ isLoading: o = !1,
12
+ iconColumnVariant: n,
12
13
  isSelectAllEnabled: d,
13
- items: f,
14
- itemActionMenuProps: p,
15
- ...u
14
+ items: p,
15
+ itemActionMenuProps: u,
16
+ zoomLevel: t,
17
+ ...H
16
18
  }) => {
17
19
  const {
18
20
  formatMessage: m
19
- } = y(), a = [];
20
- o === N.COLUMN && a.push({
21
- id: "item-type-icon",
22
- isRowHeader: !1,
23
- hideHeader: !1,
24
- maxWidth: 60,
25
- minWidth: 60
26
- });
27
- const b = l.map((s) => {
21
+ } = M(), s = [], b = 0;
22
+ if (n === A.COLUMN) {
23
+ t = t || b;
24
+ const e = parseInt(B[t], 10) + 24;
25
+ s.push({
26
+ id: "item-type-icon",
27
+ isRowHeader: !1,
28
+ hideHeader: !1,
29
+ minWidth: e,
30
+ maxWidth: e
31
+ });
32
+ }
33
+ const T = l.map((e) => {
28
34
  const {
29
- id: n,
30
- headerRenderer: c,
31
- textValue: t,
32
- ...H
33
- } = s;
35
+ id: c,
36
+ headerRenderer: h,
37
+ textValue: r,
38
+ ...x
39
+ } = e;
34
40
  return {
35
- children: c ? c(t, s) : /* @__PURE__ */ e(x, {
41
+ children: h ? h(r, e) : /* @__PURE__ */ a(W, {
36
42
  as: "span",
37
- children: t
43
+ children: r
38
44
  }),
39
- isRowHeader: n === "name",
40
- id: n,
41
- textValue: t,
42
- ...H
45
+ isRowHeader: c === "name",
46
+ id: c,
47
+ textValue: r,
48
+ ...x
43
49
  };
44
50
  });
45
- return a.push(...b), d && a.push({
51
+ return s.push(...T), d && s.push({
46
52
  id: "actions",
47
- className: r.tableHeaderActions,
48
- children: /* @__PURE__ */ e("div", {
49
- className: r.tableHeaderActionsWrapper,
50
- children: /* @__PURE__ */ e(T, {
51
- "aria-label": m(h.selectAll),
52
- className: r.selectAllCheckbox,
53
- isDisabled: i
53
+ className: i.tableHeaderActions,
54
+ children: /* @__PURE__ */ a("div", {
55
+ className: i.tableHeaderActionsWrapper,
56
+ children: /* @__PURE__ */ a(g, {
57
+ "aria-label": m(f.selectAll),
58
+ className: i.selectAllCheckbox,
59
+ isDisabled: o
54
60
  })
55
61
  }),
56
62
  isRowHeader: !1,
57
63
  hideHeader: !1,
58
64
  allowsSorting: !1
59
- }), /* @__PURE__ */ R(g, {
60
- "aria-label": m(h.listView),
65
+ }), /* @__PURE__ */ D(I, {
66
+ "aria-label": m(f.listView),
61
67
  selectionBehavior: "toggle",
62
68
  selectionMode: "multiple",
63
- ...u,
64
- children: [/* @__PURE__ */ e(w, {
65
- columns: a,
66
- children: (s) => /* @__PURE__ */ e(W, {
67
- ...s
69
+ ...H,
70
+ children: [/* @__PURE__ */ a(w, {
71
+ columns: s,
72
+ children: (e) => /* @__PURE__ */ a(C, {
73
+ ...e
68
74
  })
69
- }), i ? /* @__PURE__ */ e(C, {
70
- columnLength: a.length
71
- }) : /* @__PURE__ */ e(M, {
75
+ }), o ? /* @__PURE__ */ a(N, {
76
+ columnLength: s.length
77
+ }) : /* @__PURE__ */ a(y, {
72
78
  columns: l,
73
- iconColumnVariant: o,
79
+ iconColumnVariant: n,
74
80
  isSelectAllEnabled: d,
75
- itemActionMenuProps: p,
76
- items: f
81
+ itemActionMenuProps: u,
82
+ items: p,
83
+ zoomLevel: t
77
84
  })]
78
85
  });
79
86
  };
80
87
  export {
81
- L as default
88
+ S as default
82
89
  };
@@ -4,9 +4,10 @@ import "react";
4
4
  import "@box/item-icon";
5
5
  import "clsx";
6
6
  import "../../../../../chunks/types.js";
7
- import { T as l } from "../../../../../chunks/table-body-with-data.js";
7
+ import "../../constants.js";
8
+ import { T as s } from "../../../../../chunks/table-body-with-data.js";
8
9
  import "react/jsx-runtime";
9
10
  import "../../item-action-menu/item-action-menu.js";
10
11
  export {
11
- l as default
12
+ s as default
12
13
  };