@box/metadata-view 1.22.0 → 1.24.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.
@@ -1,96 +1,95 @@
1
- import { Row as E, Cell as n, Text as r, ActionCell as y } from "@box/blueprint-web";
2
- import I from "lodash/get";
3
- import { ItemTypeIcon as C } from "@box/item-icon";
4
- import R from "clsx";
5
- import { I as o } from "./types.js";
6
- import { THUMBNAIL_LIST_VIEW_HEIGHTS as g } from "../esm/lib/components/constants.js";
1
+ import { Row as S, Cell as s, Text as i, ActionCell as q } from "@box/blueprint-web";
2
+ import f from "lodash/get";
3
+ import { ItemTypeIcon as I } from "@box/item-icon";
4
+ import E from "clsx";
5
+ import { I as n } from "./types.js";
6
+ import { THUMBNAIL_LIST_VIEW_HEIGHTS as H } from "../esm/lib/components/constants.js";
7
7
  import { jsxs as b, jsx as e } from "react/jsx-runtime";
8
- import { ItemActionMenu as w } from "../esm/lib/components/item-action-menu/item-action-menu.js";
9
- import '../styles/index.css';const k = "_tableHeaderActionsWrapper_1a999_1", U = "_tableHeaderActions_1a999_1", B = "_tableRow_1a999_33", W = "_selectAllCheckbox_1a999_42", j = "_tableNameCell_1a999_47", F = "_tableNameCellTitle_1a999_53", M = "_hasSubtitle_1a999_57", $ = "_tableNameCellText_1a999_62", v = "_tableNameCellIconInline_1a999_67", O = "_infiniteScrollTableContainerFullHeight_1a999_71", D = "_iconCell_1a999_77", t = {
10
- tableHeaderActionsWrapper: k,
11
- tableHeaderActions: U,
12
- tableRow: B,
13
- selectAllCheckbox: W,
14
- tableNameCell: j,
15
- tableNameCellTitle: F,
8
+ import { ItemActionMenu as y } from "../esm/lib/components/item-action-menu/item-action-menu.js";
9
+ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_gffqj_1", w = "_tableHeaderActions_gffqj_1", k = "_tableRow_gffqj_33", U = "_selectAllCheckbox_gffqj_42", B = "_tableNameCell_gffqj_47", W = "_tableNameCellTitle_gffqj_53", M = "_hasSubtitle_gffqj_57", $ = "_tableNameCellText_gffqj_62", v = "_tableNameCellIconInline_gffqj_67", O = "_iconCell_gffqj_71", t = {
10
+ tableHeaderActionsWrapper: R,
11
+ tableHeaderActions: w,
12
+ tableRow: k,
13
+ selectAllCheckbox: U,
14
+ tableNameCell: B,
15
+ tableNameCellTitle: W,
16
16
  hasSubtitle: M,
17
17
  tableNameCellText: $,
18
18
  tableNameCellIconInline: v,
19
- infiniteScrollTableContainerFullHeight: O,
20
- iconCell: D
21
- }, Z = ({
22
- areSelectionCheckboxesDisabled: h,
23
- columns: T,
19
+ iconCell: O
20
+ }, Y = ({
21
+ areSelectionCheckboxesDisabled: C,
22
+ columns: h,
24
23
  iconColumnVariant: a,
25
24
  item: l,
26
25
  itemActionMenuProps: _,
27
26
  onTableRowClick: p,
28
- shouldRenderActionColumn: u,
27
+ shouldRenderActionColumn: T,
29
28
  zoomLevel: x = 0
30
- }) => /* @__PURE__ */ b(E, {
29
+ }) => /* @__PURE__ */ b(S, {
31
30
  className: t.tableRow,
32
31
  id: l.id,
33
32
  onAction: () => p(l),
34
- children: [a === o.COLUMN ? /* @__PURE__ */ e(n, {
33
+ children: [a === n.COLUMN ? /* @__PURE__ */ e(s, {
35
34
  style: {
36
- height: g[x]
35
+ height: H[x]
37
36
  },
38
- children: /* @__PURE__ */ e(C, {
37
+ children: /* @__PURE__ */ e(I, {
39
38
  className: t.iconCell,
40
39
  item: l
41
40
  })
42
- }, `item-type-icon-${l.id}`) : null, T.map((c) => {
41
+ }, `item-type-icon-${l.id}`) : null, h.map((c) => {
43
42
  const {
44
43
  cellRenderer: d,
45
- id: s,
46
- isItemMetadata: f,
47
- subtitle: S,
48
- textValue: A,
49
- type: H
50
- } = c, i = `${A}-${l.id}`;
44
+ id: o,
45
+ isItemMetadata: u,
46
+ subtitle: g,
47
+ textValue: j,
48
+ type: A
49
+ } = c, r = `${j}-${l.id}`;
51
50
  if (d)
52
- return /* @__PURE__ */ e(n, {
51
+ return /* @__PURE__ */ e(s, {
53
52
  children: d(l, c)
54
- }, i);
55
- const L = f ? s.split(".")[1] : s, m = I(l, L);
56
- if (s === "name" && (a === o.INLINE || a === o.INLINE_SUBTITLE))
57
- return /* @__PURE__ */ e(n, {
53
+ }, r);
54
+ const L = u ? o.split(".")[1] : o, m = f(l, L);
55
+ if (o === "name" && (a === n.INLINE || a === n.INLINE_SUBTITLE))
56
+ return /* @__PURE__ */ e(s, {
58
57
  children: /* @__PURE__ */ b("div", {
59
58
  className: t.tableNameCell,
60
- children: [/* @__PURE__ */ e(C, {
59
+ children: [/* @__PURE__ */ e(I, {
61
60
  item: l
62
61
  }), /* @__PURE__ */ b("div", {
63
- className: R(t.tableNameCellTitle, {
64
- [t.hasSubtitle]: a === o.INLINE_SUBTITLE
62
+ className: E(t.tableNameCellTitle, {
63
+ [t.hasSubtitle]: a === n.INLINE_SUBTITLE
65
64
  }),
66
- children: [/* @__PURE__ */ e(r, {
65
+ children: [/* @__PURE__ */ e(i, {
67
66
  as: "span",
68
67
  className: t.tableNameCellText,
69
68
  children: m
70
- }), a === o.INLINE_SUBTITLE ? /* @__PURE__ */ e(r, {
69
+ }), a === n.INLINE_SUBTITLE ? /* @__PURE__ */ e(i, {
71
70
  as: "span",
72
71
  className: t.tableNameCellText,
73
72
  color: "textOnLightSecondary",
74
- children: S
73
+ children: g
75
74
  }) : null]
76
75
  })]
77
76
  })
78
- }, i);
79
- if (H === "multiSelect") {
80
- const N = I(l, s);
81
- return /* @__PURE__ */ e(n, {
77
+ }, r);
78
+ if (A === "multiSelect") {
79
+ const N = f(l, o);
80
+ return /* @__PURE__ */ e(s, {
82
81
  children: N ? N.join(" ") : ""
83
- }, i);
82
+ }, r);
84
83
  }
85
- return /* @__PURE__ */ e(n, {
86
- children: /* @__PURE__ */ e(r, {
84
+ return /* @__PURE__ */ e(s, {
85
+ children: /* @__PURE__ */ e(i, {
87
86
  as: "span",
88
87
  children: m
89
88
  })
90
- }, i);
91
- }), u && /* @__PURE__ */ e(y, {
92
- isCheckboxDisabled: h,
93
- children: (c) => _ ? /* @__PURE__ */ e(w, {
89
+ }, r);
90
+ }), T && /* @__PURE__ */ e(q, {
91
+ isCheckboxDisabled: C,
92
+ children: (c) => _ ? /* @__PURE__ */ e(y, {
94
93
  ..._,
95
94
  item: l,
96
95
  onOpenChange: c
@@ -98,6 +97,6 @@ import '../styles/index.css';const k = "_tableHeaderActionsWrapper_1a999_1", U =
98
97
  })]
99
98
  }, l.id);
100
99
  export {
101
- Z as T,
100
+ Y as T,
102
101
  t as s
103
102
  };
@@ -1,117 +1,126 @@
1
- import { useMemo as $ } from "react";
2
- import { useIntl as x } from "react-intl";
3
- import { IconButton as f, DropdownMenu as r, GridList as g } from "@box/blueprint-web";
4
- import { Ellipsis as T } from "@box/blueprint-web-assets/icons/Fill";
1
+ import T, { useMemo as j } from "react";
2
+ import { useIntl as y } from "react-intl";
3
+ import { IconButton as f, Tooltip as z, DropdownMenu as a, GridList as h } from "@box/blueprint-web";
4
+ import { Ellipsis as R } from "@box/blueprint-web-assets/icons/Fill";
5
5
  import { V as M } from "../../../../chunks/types.js";
6
- import _ from "./messages.js";
7
- import { getDataTargetId as d } from "./identifier.js";
8
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
9
- import '../../../../styles/item-action-menu.css';const A = "_tableActionBar_akgtp_1", N = "_actionItemIcon_akgtp_6", B = {
10
- tableActionBar: A,
11
- actionItemIcon: N
6
+ import { getDataTargetId as m } from "./identifier.js";
7
+ import $ from "./messages.js";
8
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
9
+ import '../../../../styles/item-action-menu.css';const G = "_tableActionBar_akgtp_1", V = "_actionItemIcon_akgtp_6", k = {
10
+ tableActionBar: G,
11
+ actionItemIcon: V
12
12
  };
13
- function b(c) {
13
+ function A(c) {
14
14
  return (t) => {
15
15
  t.stopPropagation(), c();
16
16
  };
17
17
  }
18
- function L({
18
+ function x({
19
19
  item: c,
20
20
  label: t,
21
21
  onClick: l,
22
- icon: o,
23
- isDisabled: m
22
+ icon: r,
23
+ isDisabled: d
24
24
  }) {
25
- const i = b(() => {
25
+ const i = A(() => {
26
26
  l(c);
27
- }), I = $(() => (m == null ? void 0 : m(c)) ?? !1, [m, c]);
28
- return /* @__PURE__ */ p(r.Item, {
29
- "data-target-id": d(r.Item, t),
27
+ }), I = j(() => (d == null ? void 0 : d(c)) ?? !1, [d, c]);
28
+ return /* @__PURE__ */ p(a.Item, {
29
+ "data-target-id": m(a.Item, t),
30
30
  disabled: I,
31
31
  onClick: i,
32
- children: [/* @__PURE__ */ a(o, {
33
- className: B.actionItemIcon
32
+ children: [/* @__PURE__ */ o(r, {
33
+ className: k.actionItemIcon
34
34
  }), t]
35
35
  }, t);
36
36
  }
37
- function W({
37
+ function K({
38
38
  actions: c,
39
39
  inlineActions: t,
40
40
  isDisabled: l,
41
- item: o,
42
- onOpenChange: m,
41
+ item: r,
42
+ onOpenChange: d,
43
43
  subMenuActions: i,
44
44
  subMenuTrigger: I,
45
- viewMode: h = M.LIST
45
+ viewMode: S = M.LIST
46
46
  }) {
47
47
  const {
48
- formatMessage: k
49
- } = x(), {
50
- label: s,
51
- icon: C
48
+ formatMessage: s
49
+ } = y(), {
50
+ label: N,
51
+ icon: _
52
52
  } = I || {};
53
53
  return /* @__PURE__ */ p("div", {
54
- className: B.tableActionBar,
55
- children: [h === M.LIST && (t == null ? void 0 : t.map(({
54
+ className: k.tableActionBar,
55
+ children: [S === M.LIST && (t == null ? void 0 : t.map(({
56
56
  onClick: n,
57
57
  label: e,
58
- icon: S,
59
- isDisabled: u
60
- }) => /* @__PURE__ */ a(f, {
61
- "aria-label": e,
62
- "data-target-id": d(f, e),
63
- disabled: (u == null ? void 0 : u(o)) ?? !1,
64
- icon: S,
65
- onClick: b(() => n(o)),
66
- size: "large"
67
- }, `${o.id}-${e}`))), c ? /* @__PURE__ */ p(r.Root, {
68
- onOpenChange: m,
69
- children: [/* @__PURE__ */ a(r.Trigger, {
70
- children: h === M.LIST ? /* @__PURE__ */ a(f, {
71
- "aria-label": k(_.actionMenu),
72
- "data-target-id": d(f, "openActionMenu"),
58
+ icon: g,
59
+ isDisabled: u,
60
+ getTooltipContent: B
61
+ }) => {
62
+ const b = B == null ? void 0 : B(r), L = `${r.id}-${e}`, C = /* @__PURE__ */ o(f, {
63
+ "aria-label": e,
64
+ "data-target-id": m(f, e),
65
+ disabled: (u == null ? void 0 : u(r)) ?? !1,
66
+ icon: g,
67
+ onClick: A(() => n(r)),
68
+ size: "large"
69
+ });
70
+ return b ? /* @__PURE__ */ o(z, {
71
+ content: b,
72
+ children: C
73
+ }, L) : /* @__PURE__ */ o(T.Fragment, {
74
+ children: C
75
+ }, L);
76
+ })), c ? /* @__PURE__ */ p(a.Root, {
77
+ onOpenChange: d,
78
+ children: [/* @__PURE__ */ o(a.Trigger, {
79
+ children: S === M.LIST ? /* @__PURE__ */ o(f, {
80
+ "aria-label": s($.actionMenu),
81
+ "data-target-id": m(f, "openActionMenu"),
73
82
  disabled: l,
74
- icon: T,
83
+ icon: R,
75
84
  size: "large"
76
- }) : /* @__PURE__ */ a(g.ActionIconButton, {
77
- "aria-label": k(_.actionMenu),
78
- "data-target-id": d(g.ActionIconButton, "openActionMenu"),
85
+ }) : /* @__PURE__ */ o(h.ActionIconButton, {
86
+ "aria-label": s($.actionMenu),
87
+ "data-target-id": m(h.ActionIconButton, "openActionMenu"),
79
88
  disabled: l,
80
- icon: T
89
+ icon: R
81
90
  })
82
- }), /* @__PURE__ */ p(r.Content, {
91
+ }), /* @__PURE__ */ p(a.Content, {
83
92
  align: "start",
84
- children: [c.map((n) => /* @__PURE__ */ a(L, {
85
- item: o,
93
+ children: [c.map((n) => /* @__PURE__ */ o(x, {
94
+ item: r,
86
95
  ...n
87
- }, n.label)), i && I && /* @__PURE__ */ p(r.SubMenuRoot, {
88
- children: [/* @__PURE__ */ p(r.SubMenuTrigger, {
89
- "data-target-id": d(r.SubMenuTrigger, "openActionSubmenu"),
90
- children: [C && /* @__PURE__ */ a(C, {
91
- className: B.actionItemIcon
92
- }), s]
93
- }), /* @__PURE__ */ a(r.SubMenuContent, {
94
- children: i.map((n) => /* @__PURE__ */ a(L, {
95
- item: o,
96
+ }, n.label)), i && I && /* @__PURE__ */ p(a.SubMenuRoot, {
97
+ children: [/* @__PURE__ */ p(a.SubMenuTrigger, {
98
+ "data-target-id": m(a.SubMenuTrigger, "openActionSubmenu"),
99
+ children: [_ && /* @__PURE__ */ o(_, {
100
+ className: k.actionItemIcon
101
+ }), N]
102
+ }), /* @__PURE__ */ o(a.SubMenuContent, {
103
+ children: i.map((n) => /* @__PURE__ */ o(x, {
104
+ item: r,
96
105
  ...n
97
106
  }, n.label))
98
107
  })]
99
108
  })]
100
109
  })]
101
- }) : null, h === M.GRID && (t == null ? void 0 : t.map(({
110
+ }) : null, S === M.GRID && (t == null ? void 0 : t.map(({
102
111
  onClick: n,
103
112
  label: e,
104
- icon: S,
113
+ icon: g,
105
114
  isDisabled: u
106
- }) => /* @__PURE__ */ a(g.ActionIconButton, {
115
+ }) => /* @__PURE__ */ o(h.ActionIconButton, {
107
116
  "aria-label": e,
108
- "data-target-id": d(g.ActionIconButton, e),
109
- disabled: (u == null ? void 0 : u(o)) ?? !1,
110
- icon: S,
111
- onClick: () => n(o)
112
- }, `${o.id}-${e}`)))]
117
+ "data-target-id": m(h.ActionIconButton, e),
118
+ disabled: (u == null ? void 0 : u(r)) ?? !1,
119
+ icon: g,
120
+ onClick: () => n(r)
121
+ }, `${r.id}-${e}`)))]
113
122
  });
114
123
  }
115
124
  export {
116
- W as ItemActionMenu
125
+ K as ItemActionMenu
117
126
  };
@@ -1,33 +1,33 @@
1
- import { useRef as h, useMemo as S, useEffect as T } from "react";
2
- import { useVirtualizer as b } from "@tanstack/react-virtual";
1
+ import { useVirtualizer as S } from "@tanstack/react-virtual";
2
+ import { useRef as h, useMemo as z, useEffect as T } from "react";
3
3
  import { Size14 as p } from "@box/blueprint-web-assets/tokens/px-tokens";
4
- const z = parseInt(p, 10), V = ({
5
- items: e,
6
- hasNextPage: t = !1,
4
+ const b = parseInt(p, 10), _ = ({
5
+ items: t,
6
+ hasNextPage: e = !1,
7
7
  isLoading: r = !1,
8
- parentRef: n,
9
- approximateRowHeight: g = z,
8
+ parentRef: l,
9
+ approximateRowHeight: a = b,
10
10
  onGetNextPage: o,
11
11
  placeholderRowsCount: c = 20
12
12
  }) => {
13
- const s = h(0), f = S(() => e.length + (r || t ? c : 0), [e, t, r, c]), u = b({
13
+ const s = h(0), f = z(() => t.length + (r || e ? c : 0), [t, e, r, c]), u = S({
14
14
  count: f,
15
- getScrollElement: () => n.current,
15
+ getScrollElement: () => l.current,
16
16
  getItemKey: (I) => {
17
17
  var m;
18
- return ((m = e[I]) == null ? void 0 : m.id) || `table-item-${I}`;
18
+ return ((m = t[I]) == null ? void 0 : m.id) || `table-item-${I}`;
19
19
  },
20
- estimateSize: () => g
21
- }), l = u.getVirtualItems();
20
+ estimateSize: () => a
21
+ }), n = u.getVirtualItems();
22
22
  T(() => {
23
- s.current = e.length;
24
- }, [e.length]), (e.length === 0 || e.length > 0 && s.current === 0) && n.current && (n.current.scrollTop = 0);
25
- const i = l[l.length - 1], a = !!i && i.index >= e.length - 1;
26
- return !r && a && t && o && o(), {
27
- getTableHeight: u.getTotalSize,
28
- virtualItemsToDisplay: l
23
+ s.current = t.length;
24
+ }, [t.length]), (t.length === 0 || t.length > 0 && s.current === 0) && l.current && (l.current.scrollTop = 0);
25
+ const i = n[n.length - 1], g = !!i && i.index >= t.length - 1;
26
+ return !r && g && e && o && o(), {
27
+ totalVirtualSize: u.getTotalSize(),
28
+ virtualItemsToDisplay: n
29
29
  };
30
30
  };
31
31
  export {
32
- V as useInfiniteScrollTableItems
32
+ _ as useInfiniteScrollTableItems
33
33
  };
@@ -1,144 +1,128 @@
1
- import { useRef as O } from "react";
2
- import { useIntl as U } from "react-intl";
3
- import { Text as k, ListCheckbox as F, TableHeader as G, Column as L } from "@box/blueprint-web";
4
- import V from "lodash/noop";
5
- import { useInfiniteScrollTableItems as X } from "./hooks/useInfiniteScrollTableItems.js";
6
- import { TableRenderer as I } from "./table-renderer.js";
7
- import { I as Y } from "../../../../chunks/types.js";
8
- import { THUMBNAIL_WIDTHS as Z } from "../constants.js";
9
- import { s } from "../../../../chunks/index.js";
10
- import $ from "./messages.js";
11
- import { getShouldRenderActionColumn as q } from "./actionColumn.js";
12
- import { jsx as e, jsxs as J } from "react/jsx-runtime";
1
+ import { useRef as v } from "react";
2
+ import { useIntl as B } from "react-intl";
3
+ import { Text as O, ListCheckbox as Z, DataTableWrapper as _, TableHeader as q, Column as E } from "@box/blueprint-web";
4
+ import F from "lodash/noop";
5
+ import { useInfiniteScrollTableItems as G } from "./hooks/useInfiniteScrollTableItems.js";
6
+ import { TableRenderer as R } from "./table-renderer.js";
7
+ import { I as J } from "../../../../chunks/types.js";
8
+ import { THUMBNAIL_WIDTHS as K } from "../constants.js";
9
+ import { s as i } from "../../../../chunks/index.js";
10
+ import { getShouldRenderActionColumn as Q } from "./actionColumn.js";
11
+ import X from "./messages.js";
12
+ import { jsx as t, jsxs as Y } from "react/jsx-runtime";
13
13
  import "./table-body/inline-editing-cell/inline-editing-cell.js";
14
- const K = 40, de = ({
14
+ const me = ({
15
15
  areSelectionCheckboxesDisabled: n = !1,
16
16
  columns: m,
17
- hasNextPage: x = !1,
17
+ hasNextPage: b = !1,
18
18
  iconColumnVariant: d,
19
- isInfiniteScrollEnabled: A = !1,
20
- isLoading: i = !1,
19
+ isInfiniteScrollEnabled: T = !1,
20
+ isLoading: s = !1,
21
21
  isSelectAllEnabled: W,
22
- itemActionMenuProps: g,
22
+ itemActionMenuProps: x,
23
23
  items: c,
24
- maxActionColumnWidth: w,
25
- minActionColumnWidth: y,
24
+ maxActionColumnWidth: A,
25
+ minActionColumnWidth: w,
26
26
  onGetNextPage: C,
27
- onInlineEditChange: N,
28
- onTableRowClick: S = V,
29
- placeholderRowsCount: _,
27
+ onInlineEditChange: S,
28
+ onTableRowClick: N = F,
29
+ placeholderRowsCount: g,
30
30
  zoomLevel: a,
31
31
  ...l
32
32
  }) => {
33
- var H;
34
33
  const {
35
34
  formatMessage: f
36
- } = U(), p = O(null), {
37
- virtualItemsToDisplay: h,
38
- getTableHeight: v
39
- } = X({
35
+ } = B(), p = v(null), {
36
+ virtualItemsToDisplay: y,
37
+ totalVirtualSize: D
38
+ } = G({
40
39
  items: c,
41
- hasNextPage: x,
42
- isLoading: i,
40
+ hasNextPage: b,
41
+ isLoading: s,
43
42
  parentRef: p,
44
43
  onGetNextPage: C,
45
- placeholderRowsCount: _
46
- }), r = [], D = 0;
47
- if (d === Y.COLUMN) {
48
- a = a || D;
49
- const t = parseInt(Z[a], 10) + 24;
44
+ placeholderRowsCount: g
45
+ }), r = [], M = 0;
46
+ if (d === J.COLUMN) {
47
+ a = a || M;
48
+ const e = parseInt(K[a], 10) + 24;
50
49
  r.push({
51
50
  id: "item-type-icon",
52
51
  isRowHeader: !1,
53
52
  hideHeader: !1,
54
- minWidth: t,
55
- maxWidth: t
53
+ minWidth: e,
54
+ maxWidth: e
56
55
  });
57
56
  }
58
- const E = m.map((t) => {
57
+ const j = m.map((e) => {
59
58
  const {
60
- id: b,
61
- isRowHeader: j,
62
- headerRenderer: R,
59
+ id: h,
60
+ isRowHeader: V,
61
+ headerRenderer: H,
63
62
  textValue: o,
64
- type: T,
65
- ...B
66
- } = t;
63
+ type: I,
64
+ ...k
65
+ } = e;
67
66
  return {
68
- ...B,
69
- children: R ? R(o, t) : /* @__PURE__ */ e(k, {
67
+ ...k,
68
+ children: H ? H(o, e) : /* @__PURE__ */ t(O, {
70
69
  as: "span",
71
70
  children: o
72
71
  }),
73
- isRowHeader: b === "name" || j,
74
- id: b,
72
+ isRowHeader: h === "name" || V,
73
+ id: h,
75
74
  textValue: o,
76
- allowsSorting: T !== "multiSelect" && T !== "enum"
75
+ allowsSorting: I !== "multiSelect" && I !== "enum"
77
76
  };
78
77
  });
79
- r.push(...E), q(l) && r.push({
78
+ r.push(...j), Q(l) && r.push({
80
79
  id: "actions",
81
- className: s.tableHeaderActions,
82
- children: /* @__PURE__ */ J("div", {
83
- className: s.tableHeaderActionsWrapper,
84
- children: [l.HeaderActions, W ? /* @__PURE__ */ e(F, {
85
- "aria-label": f($.selectAll),
86
- className: s.selectAllCheckbox,
87
- isDisabled: i || n
80
+ className: i.tableHeaderActions,
81
+ children: /* @__PURE__ */ Y("div", {
82
+ className: i.tableHeaderActionsWrapper,
83
+ children: [l.HeaderActions, W ? /* @__PURE__ */ t(Z, {
84
+ "aria-label": f(X.selectAll),
85
+ className: i.selectAllCheckbox,
86
+ isDisabled: s || n
88
87
  }) : null]
89
88
  }),
90
89
  isRowHeader: !1,
91
90
  hideHeader: !1,
92
91
  allowsSorting: !1,
93
- maxWidth: w,
94
- minWidth: y
92
+ maxWidth: A,
93
+ minWidth: w
95
94
  });
96
- const M = /* @__PURE__ */ e(G, {
95
+ const U = /* @__PURE__ */ t(q, {
97
96
  columns: r,
98
- children: (t) => /* @__PURE__ */ e(L, {
99
- ...t
97
+ children: (e) => /* @__PURE__ */ t(E, {
98
+ ...e
100
99
  })
101
100
  }), u = {
102
101
  columnCount: r.length,
103
102
  columns: m,
104
103
  formatMessage: f,
105
104
  iconColumnVariant: d,
106
- isLoading: i,
105
+ isLoading: s,
107
106
  areSelectionCheckboxesDisabled: n,
108
- itemActionMenuProps: g,
107
+ itemActionMenuProps: x,
109
108
  items: c,
110
- onInlineEditChange: N,
111
- onTableRowClick: S,
112
- tableHeader: M,
109
+ onInlineEditChange: S,
110
+ onTableRowClick: N,
111
+ tableHeader: U,
113
112
  tableProps: l,
114
113
  zoomLevel: a
115
114
  };
116
- return A ? /* @__PURE__ */ e("div", {
115
+ return T ? /* @__PURE__ */ t(_, {
117
116
  ref: p,
118
- className: s.infiniteScrollTableContainerFullHeight,
119
- children: /* @__PURE__ */ e("div", {
120
- style: {
121
- position: "relative",
122
- width: "100%",
123
- height: v() + K
124
- },
125
- children: /* @__PURE__ */ e(I, {
126
- ...u,
127
- style: {
128
- position: "absolute",
129
- top: 0,
130
- left: 0,
131
- width: "100%",
132
- transform: `translateY(${((H = h[0]) == null ? void 0 : H.start) || 0}px)`,
133
- tableLayout: "fixed"
134
- },
135
- virtualItems: h
136
- })
117
+ children: /* @__PURE__ */ t(R, {
118
+ ...u,
119
+ totalVirtualSize: D,
120
+ virtualItems: y
137
121
  })
138
- }) : /* @__PURE__ */ e(I, {
122
+ }) : /* @__PURE__ */ t(R, {
139
123
  ...u
140
124
  });
141
125
  };
142
126
  export {
143
- de as MetadataTable
127
+ me as MetadataTable
144
128
  };
@@ -1,196 +1,212 @@
1
- import { TableBody as $, Row as S, Cell as m, ActionCell as g, Text as T } from "@box/blueprint-web";
2
- import { ItemTypeIcon as b } from "@box/item-icon";
3
- import w from "clsx";
4
- import E from "lodash/get";
5
- import I from "react";
6
- import { I as N } from "../../../../../chunks/types.js";
7
- import { THUMBNAIL_LIST_VIEW_HEIGHTS as R } from "../../constants.js";
8
- import { s as d, T as B } from "../../../../../chunks/index.js";
9
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
- import { InlineEditingCell as _ } from "./inline-editing-cell/inline-editing-cell.js";
11
- import { ItemActionMenu as M } from "../../item-action-menu/item-action-menu.js";
12
- import { GhostTableRow as U } from "./ghost-table-row/ghost-table-row.js";
13
- const x = (e, t, r) => {
14
- const n = r ? t.split(".")[1] : t;
15
- return E(e, n);
16
- }, k = /* @__PURE__ */ I.memo(({
1
+ import { TableBody as x, Row as y, Cell as f, ActionCell as _, Text as $ } from "@box/blueprint-web";
2
+ import { ItemTypeIcon as E } from "@box/item-icon";
3
+ import D from "clsx";
4
+ import L from "lodash/get";
5
+ import h from "react";
6
+ import { I as p } from "../../../../../chunks/types.js";
7
+ import { THUMBNAIL_LIST_VIEW_HEIGHTS as U } from "../../constants.js";
8
+ import { s as c, T as k } from "../../../../../chunks/index.js";
9
+ import { jsxs as C, jsx as t } from "react/jsx-runtime";
10
+ import { InlineEditingCell as W } from "./inline-editing-cell/inline-editing-cell.js";
11
+ import { ItemActionMenu as j } from "../../item-action-menu/item-action-menu.js";
12
+ import { GhostTableRow as G } from "./ghost-table-row/ghost-table-row.js";
13
+ const S = (e, n, l) => {
14
+ const o = l ? n.split(".")[1] : n;
15
+ return L(e, o);
16
+ }, H = /* @__PURE__ */ h.memo(({
17
17
  column: e,
18
- iconColumnVariant: t,
19
- item: r
18
+ iconColumnVariant: n,
19
+ item: l
20
20
  }) => {
21
21
  const {
22
- id: n,
23
- isItemMetadata: o,
24
- subtitle: a,
25
- textValue: h
26
- } = e, i = `${h}-${r.id}`;
27
- return /* @__PURE__ */ l(m, {
28
- children: /* @__PURE__ */ u("div", {
29
- className: d.tableNameCell,
30
- children: [/* @__PURE__ */ l(b, {
31
- className: d.tableNameCellIconInline,
32
- item: r
33
- }), /* @__PURE__ */ u("div", {
34
- className: w(d.tableNameCellTitle, {
35
- [d.hasSubtitle]: t === N.INLINE_SUBTITLE
22
+ id: o,
23
+ isItemMetadata: a,
24
+ subtitle: d,
25
+ textValue: m
26
+ } = e, i = `${m}-${l.id}`;
27
+ return /* @__PURE__ */ t(f, {
28
+ children: /* @__PURE__ */ C("div", {
29
+ className: c.tableNameCell,
30
+ children: [/* @__PURE__ */ t(E, {
31
+ className: c.tableNameCellIconInline,
32
+ item: l
33
+ }), /* @__PURE__ */ C("div", {
34
+ className: D(c.tableNameCellTitle, {
35
+ [c.hasSubtitle]: n === p.INLINE_SUBTITLE
36
36
  }),
37
- children: [/* @__PURE__ */ l(T, {
37
+ children: [/* @__PURE__ */ t($, {
38
38
  as: "span",
39
- className: d.tableNameCellText,
40
- children: x(r, n, o)
41
- }), t === N.INLINE_SUBTITLE && /* @__PURE__ */ l(T, {
39
+ className: c.tableNameCellText,
40
+ children: S(l, o, a)
41
+ }), n === p.INLINE_SUBTITLE && /* @__PURE__ */ t($, {
42
42
  as: "span",
43
- className: d.tableNameCellText,
43
+ className: c.tableNameCellText,
44
44
  color: "textOnLightSecondary",
45
- children: a
45
+ children: d
46
46
  })]
47
47
  })]
48
48
  })
49
49
  }, i);
50
- }), W = /* @__PURE__ */ I.memo(({
50
+ }), A = /* @__PURE__ */ h.memo(({
51
51
  column: e,
52
- item: t
52
+ item: n
53
53
  }) => {
54
- var n;
55
- const r = `${e.textValue}-${t.id}`;
56
- return /* @__PURE__ */ l(m, {
57
- children: (n = e.cellRenderer) == null ? void 0 : n.call(e, t, e)
58
- }, r);
59
- }), j = /* @__PURE__ */ I.memo(({
54
+ var o;
55
+ const l = `${e.textValue}-${n.id}`;
56
+ return /* @__PURE__ */ t(f, {
57
+ children: (o = e.cellRenderer) == null ? void 0 : o.call(e, n, e)
58
+ }, l);
59
+ }), F = /* @__PURE__ */ h.memo(({
60
60
  column: e,
61
- item: t
61
+ item: n
62
62
  }) => {
63
- const r = `${e.textValue}-${t.id}`, n = E(t, e.id);
64
- return n ? /* @__PURE__ */ l(m, {
65
- children: n.join(" ")
66
- }, r) : /* @__PURE__ */ l(m, {}, r);
67
- }), D = /* @__PURE__ */ I.memo(({
63
+ const l = `${e.textValue}-${n.id}`, o = L(n, e.id);
64
+ return o ? /* @__PURE__ */ t(f, {
65
+ children: o.join(" ")
66
+ }, l) : /* @__PURE__ */ t(f, {}, l);
67
+ }), K = /* @__PURE__ */ h.memo(({
68
68
  column: e,
69
- item: t
69
+ item: n
70
70
  }) => {
71
71
  const {
72
- id: r,
73
- isItemMetadata: n,
74
- textValue: o
75
- } = e, a = `${o}-${t.id}`;
76
- return /* @__PURE__ */ l(m, {
77
- children: /* @__PURE__ */ l(T, {
72
+ id: l,
73
+ isItemMetadata: o,
74
+ textValue: a
75
+ } = e, d = `${a}-${n.id}`;
76
+ return /* @__PURE__ */ t(f, {
77
+ children: /* @__PURE__ */ t($, {
78
78
  as: "span",
79
- children: x(t, r, n)
79
+ children: S(n, l, o)
80
80
  })
81
- }, a);
82
- }), G = /* @__PURE__ */ I.memo(({
81
+ }, d);
82
+ }), q = /* @__PURE__ */ h.memo(({
83
83
  column: e,
84
- iconColumnVariant: t,
85
- item: r,
86
- onInlineEditChange: n
84
+ iconColumnVariant: n,
85
+ item: l,
86
+ onInlineEditChange: o
87
87
  }) => {
88
88
  const {
89
- cellRenderer: o,
90
- id: a,
91
- isInlineEditingEnabled: h,
89
+ cellRenderer: a,
90
+ id: d,
91
+ isInlineEditingEnabled: m,
92
92
  type: i
93
- } = e, f = a === "item.name" && (t === N.INLINE || t === N.INLINE_SUBTITLE);
94
- return o ? /* @__PURE__ */ l(W, {
93
+ } = e, N = d === "item.name" && (n === p.INLINE || n === p.INLINE_SUBTITLE);
94
+ return a ? /* @__PURE__ */ t(A, {
95
95
  column: e,
96
- item: r
97
- }) : f ? /* @__PURE__ */ l(k, {
96
+ item: l
97
+ }) : N ? /* @__PURE__ */ t(H, {
98
98
  column: e,
99
- iconColumnVariant: t,
100
- item: r
101
- }) : h && (i === "multiSelect" || i === "enum") ? /* @__PURE__ */ l(_, {
99
+ iconColumnVariant: n,
100
+ item: l
101
+ }) : m && (i === "multiSelect" || i === "enum") ? /* @__PURE__ */ t(W, {
102
102
  column: e,
103
- item: r,
104
- onInlineEditChange: n
105
- }, `${e.id}-${r.id}`) : i === "multiSelect" ? /* @__PURE__ */ l(j, {
103
+ item: l,
104
+ onInlineEditChange: o
105
+ }, `${e.id}-${l.id}`) : i === "multiSelect" ? /* @__PURE__ */ t(F, {
106
106
  column: e,
107
- item: r
108
- }) : /* @__PURE__ */ l(D, {
107
+ item: l
108
+ }) : /* @__PURE__ */ t(K, {
109
109
  column: e,
110
- item: r
110
+ item: l
111
111
  });
112
- }), H = /* @__PURE__ */ I.memo(({
112
+ }), J = /* @__PURE__ */ h.memo(({
113
113
  item: e,
114
- zoomLevel: t
115
- }) => /* @__PURE__ */ l(m, {
114
+ zoomLevel: n
115
+ }) => /* @__PURE__ */ t(f, {
116
116
  style: {
117
- height: R[t]
117
+ height: U[n]
118
118
  },
119
- children: /* @__PURE__ */ l(b, {
120
- className: d.iconCell,
119
+ children: /* @__PURE__ */ t(E, {
120
+ className: c.iconCell,
121
121
  item: e
122
122
  })
123
- }, `item-type-icon-${e.id}`)), A = /* @__PURE__ */ I.memo(({
123
+ }, `item-type-icon-${e.id}`)), Q = /* @__PURE__ */ h.memo(({
124
124
  item: e,
125
- itemActionMenuProps: t,
126
- isCheckboxDisabled: r
127
- }) => /* @__PURE__ */ l(g, {
128
- isCheckboxDisabled: r,
129
- children: (n) => t ? /* @__PURE__ */ l(M, {
130
- ...t,
125
+ itemActionMenuProps: n,
126
+ isCheckboxDisabled: l
127
+ }) => /* @__PURE__ */ t(_, {
128
+ isCheckboxDisabled: l,
129
+ children: (o) => n ? /* @__PURE__ */ t(j, {
130
+ ...n,
131
131
  item: e,
132
- onOpenChange: n
132
+ onOpenChange: o
133
133
  }) : null
134
- })), P = ({
134
+ })), re = ({
135
135
  areSelectionCheckboxesDisabled: e,
136
- columnCount: t,
137
- columns: r,
138
- iconColumnVariant: n,
139
- items: o,
140
- itemActionMenuProps: a,
141
- onInlineEditChange: h,
136
+ columnCount: n,
137
+ columns: l,
138
+ iconColumnVariant: o,
139
+ items: a,
140
+ itemActionMenuProps: d,
141
+ onInlineEditChange: m,
142
142
  onTableRowClick: i,
143
- shouldRenderActionColumn: f,
144
- virtualItems: C,
145
- zoomLevel: y
143
+ shouldRenderActionColumn: N,
144
+ virtualItems: I,
145
+ totalVirtualSize: w,
146
+ zoomLevel: b
146
147
  }) => {
147
- const L = n === N.COLUMN;
148
- if (C) {
149
- const s = (c) => /* @__PURE__ */ l(U, {
150
- columnLength: t || 0,
151
- rowKey: `ghost-${c}`
152
- }), p = (c) => /* @__PURE__ */ l(B, {
148
+ const B = o === p.COLUMN;
149
+ if (I) {
150
+ const s = (r) => /* @__PURE__ */ t(G, {
151
+ columnLength: n || 0,
152
+ rowKey: `ghost-${r}`
153
+ }), T = (r) => /* @__PURE__ */ t(k, {
153
154
  areSelectionCheckboxesDisabled: e,
154
- columns: r,
155
- iconColumnVariant: n,
156
- item: c,
157
- itemActionMenuProps: a,
155
+ columns: l,
156
+ iconColumnVariant: o,
157
+ item: r,
158
+ itemActionMenuProps: d,
158
159
  onTableRowClick: i,
159
- shouldRenderActionColumn: f,
160
- zoomLevel: y
161
- });
162
- return /* @__PURE__ */ l($, {
163
- items: C,
164
- children: ({
165
- index: c
166
- }) => c >= o.length ? s(c) : p(o[c])
160
+ shouldRenderActionColumn: N,
161
+ zoomLevel: b
162
+ }), R = () => {
163
+ const r = I[0];
164
+ return (r == null ? void 0 : r.start) || 0;
165
+ }, M = () => {
166
+ const r = I[I.length - 1], O = (r == null ? void 0 : r.end) || 0;
167
+ return Math.max((w || 0) - O, 0);
168
+ }, u = R(), g = M();
169
+ return /* @__PURE__ */ C(x, {
170
+ children: [!!u && /* @__PURE__ */ t(y, {
171
+ isDisabled: !0,
172
+ style: {
173
+ height: `${u}px`
174
+ }
175
+ }), I.map(({
176
+ index: r
177
+ }) => r >= a.length ? s(r) : T(a[r])), !!g && /* @__PURE__ */ t(y, {
178
+ isDisabled: !0,
179
+ style: {
180
+ height: `${g}px`
181
+ }
182
+ })]
167
183
  });
168
184
  }
169
- return /* @__PURE__ */ l($, {
170
- items: o.map((s) => ({
185
+ return /* @__PURE__ */ t(x, {
186
+ items: a.map((s) => ({
171
187
  key: s.id,
172
188
  ...s
173
189
  })),
174
- children: (s) => /* @__PURE__ */ u(S, {
175
- className: d.tableRow,
190
+ children: (s) => /* @__PURE__ */ C(y, {
191
+ className: c.tableRow,
176
192
  id: s.id,
177
193
  onAction: () => i(s),
178
- children: [L && /* @__PURE__ */ l(H, {
194
+ children: [B && /* @__PURE__ */ t(J, {
179
195
  item: s,
180
- zoomLevel: y
181
- }), r.map((p) => /* @__PURE__ */ l(G, {
182
- column: p,
183
- iconColumnVariant: n,
196
+ zoomLevel: b
197
+ }), l.map((T) => /* @__PURE__ */ t(q, {
198
+ column: T,
199
+ iconColumnVariant: o,
184
200
  item: s,
185
- onInlineEditChange: h
186
- }, `${p.textValue}-${s.id}`)), f && /* @__PURE__ */ l(A, {
201
+ onInlineEditChange: m
202
+ }, `${T.textValue}-${s.id}`)), N && /* @__PURE__ */ t(Q, {
187
203
  isCheckboxDisabled: e,
188
204
  item: s,
189
- itemActionMenuProps: a
205
+ itemActionMenuProps: d
190
206
  })]
191
207
  }, s.id)
192
208
  });
193
209
  };
194
210
  export {
195
- P as default
211
+ re as default
196
212
  };
@@ -1,11 +1,11 @@
1
- import { Table as x } from "@box/blueprint-web";
2
- import { I as B } from "../../../../chunks/types.js";
3
- import { GhostTableBody as R } from "./table-body/ghost-table-body.js";
4
- import j from "./table-body/table-body-with-data.js";
5
- import y from "./messages.js";
1
+ import { Table as B } from "@box/blueprint-web";
2
+ import { I as R } from "../../../../chunks/types.js";
3
+ import { GhostTableBody as j } from "./table-body/ghost-table-body.js";
4
+ import y from "./table-body/table-body-with-data.js";
6
5
  import { getShouldRenderActionColumn as A } from "./actionColumn.js";
7
- import { jsxs as G, jsx as c } from "react/jsx-runtime";
8
- const U = ({
6
+ import G from "./messages.js";
7
+ import { jsxs as V, jsx as c } from "react/jsx-runtime";
8
+ const W = ({
9
9
  columnCount: s,
10
10
  columns: e,
11
11
  formatMessage: u,
@@ -20,20 +20,21 @@ const U = ({
20
20
  tableHeader: a,
21
21
  tableProps: l,
22
22
  virtualItems: o,
23
- zoomLevel: b
23
+ totalVirtualSize: b,
24
+ zoomLevel: T
24
25
  }) => {
25
26
  const m = A(l), i = s || (() => {
26
27
  let n = e.length;
27
- return t === B.COLUMN && (n += 1), m && (n += 1), n;
28
- })(), T = r && !(o != null && o.length);
29
- return /* @__PURE__ */ G(x, {
30
- "aria-label": u(y.listView),
28
+ return t === R.COLUMN && (n += 1), m && (n += 1), n;
29
+ })(), x = r && !(o != null && o.length);
30
+ return /* @__PURE__ */ V(B, {
31
+ "aria-label": u(G.listView),
31
32
  selectionBehavior: "toggle",
32
33
  style: p,
33
34
  ...l,
34
- children: [a, T ? /* @__PURE__ */ c(R, {
35
+ children: [a, x ? /* @__PURE__ */ c(j, {
35
36
  columnLength: i
36
- }) : /* @__PURE__ */ c(j, {
37
+ }) : /* @__PURE__ */ c(y, {
37
38
  areSelectionCheckboxesDisabled: h,
38
39
  columnCount: i,
39
40
  columns: e,
@@ -44,11 +45,12 @@ const U = ({
44
45
  onInlineEditChange: g,
45
46
  onTableRowClick: d,
46
47
  shouldRenderActionColumn: m,
48
+ totalVirtualSize: b,
47
49
  virtualItems: o,
48
- zoomLevel: b
50
+ zoomLevel: T
49
51
  })]
50
52
  });
51
53
  };
52
54
  export {
53
- U as TableRenderer
55
+ W as TableRenderer
54
56
  };
@@ -1 +1 @@
1
- ._tableHeaderActionsWrapper_1a999_1{position:absolute;top:0;right:var(--size-4);bottom:0;display:flex;gap:var(--space-2);align-items:center;justify-content:center;padding:0 var(--space-2);background:var(--item-background);margin-block:var(--space-2)}._tableHeaderActionsWrapper_1a999_1:before{position:absolute;left:0;z-index:0;display:block;width:0;height:50%;box-shadow:-.25rem 0 .625rem .625rem var(--item-background);content:""}._tableHeaderActions_1a999_1{position:sticky;right:0;width:var(--size-6);padding:0}._tableRow_1a999_33:after{height:100%!important}._tableRow_1a999_33[aria-selected=true]:after{height:100%!important}._selectAllCheckbox_1a999_42 svg{transform:none!important}._tableNameCell_1a999_47{display:flex;gap:var(--space-3);align-items:center}._tableNameCellTitle_1a999_53{overflow:hidden;text-overflow:ellipsis}._tableNameCellTitle_1a999_53._hasSubtitle_1a999_57{display:flex;flex-direction:column}._tableNameCellText_1a999_62{overflow:hidden;text-overflow:ellipsis}._tableNameCellIconInline_1a999_67{flex-shrink:0}._infiniteScrollTableContainerFullHeight_1a999_71{width:100%;height:100%;overflow:auto}._iconCell_1a999_77{width:100%!important;height:100%!important}
1
+ ._tableHeaderActionsWrapper_gffqj_1{position:absolute;top:0;right:var(--size-4);bottom:0;display:flex;gap:var(--space-2);align-items:center;justify-content:center;padding:0 var(--space-2);background:var(--item-background);margin-block:var(--space-2)}._tableHeaderActionsWrapper_gffqj_1:before{position:absolute;left:0;z-index:0;display:block;width:0;height:50%;box-shadow:-.25rem 0 .625rem .625rem var(--item-background);content:""}._tableHeaderActions_gffqj_1{position:sticky;right:0;width:var(--size-6);padding:0}._tableRow_gffqj_33:after{height:100%!important}._tableRow_gffqj_33[aria-selected=true]:after{height:100%!important}._selectAllCheckbox_gffqj_42 svg{transform:none!important}._tableNameCell_gffqj_47{display:flex;gap:var(--space-3);align-items:center}._tableNameCellTitle_gffqj_53{overflow:hidden;text-overflow:ellipsis}._tableNameCellTitle_gffqj_53._hasSubtitle_gffqj_57{display:flex;flex-direction:column}._tableNameCellText_gffqj_62{overflow:hidden;text-overflow:ellipsis}._tableNameCellIconInline_gffqj_67{flex-shrink:0}._iconCell_gffqj_71{width:100%!important;height:100%!important}
@@ -7,9 +7,12 @@ export interface ItemAction {
7
7
  icon: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
8
8
  isDisabled?: (item: Item) => boolean;
9
9
  }
10
+ export interface ItemInlineAction extends ItemAction {
11
+ getTooltipContent?: (item: Item) => string;
12
+ }
10
13
  export interface ItemActionMenuProps {
11
14
  actions?: ItemAction[];
12
- inlineActions?: ItemAction[];
15
+ inlineActions?: ItemInlineAction[];
13
16
  isDisabled?: boolean;
14
17
  item: Item;
15
18
  onOpenChange: (open: boolean) => void;
@@ -9,7 +9,7 @@ type UseInfiniteScrollTableItemsProps = {
9
9
  placeholderRowsCount?: number;
10
10
  };
11
11
  export declare const useInfiniteScrollTableItems: ({ items, hasNextPage, isLoading, parentRef, approximateRowHeight, onGetNextPage, placeholderRowsCount, }: UseInfiniteScrollTableItemsProps) => {
12
- getTableHeight: () => number;
12
+ totalVirtualSize: number;
13
13
  virtualItemsToDisplay: import('@tanstack/virtual-core').VirtualItem[];
14
14
  };
15
15
  export {};
@@ -7,6 +7,7 @@ import { InlineEditingCellProps } from './inline-editing-cell';
7
7
  interface TableBodyWithDataProps extends Omit<MetadataTableProps, keyof TableProps>, Pick<InlineEditingCellProps, 'onInlineEditChange'> {
8
8
  columnCount?: number;
9
9
  shouldRenderActionColumn?: boolean;
10
+ totalVirtualSize?: number;
10
11
  virtualItems?: VirtualItem[];
11
12
  }
12
13
  type CellProps = {
@@ -15,5 +16,5 @@ type CellProps = {
15
16
  iconColumnVariant: IconColumnVariant;
16
17
  };
17
18
  export type DataCellProps = CellProps & Pick<InlineEditingCellProps, 'onInlineEditChange'>;
18
- declare const TableBodyWithData: ({ areSelectionCheckboxesDisabled, columnCount, columns, iconColumnVariant, items, itemActionMenuProps, onInlineEditChange, onTableRowClick, shouldRenderActionColumn, virtualItems, zoomLevel, }: TableBodyWithDataProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const TableBodyWithData: ({ areSelectionCheckboxesDisabled, columnCount, columns, iconColumnVariant, items, itemActionMenuProps, onInlineEditChange, onTableRowClick, shouldRenderActionColumn, virtualItems, totalVirtualSize, zoomLevel, }: TableBodyWithDataProps) => import("react/jsx-runtime").JSX.Element;
19
20
  export default TableBodyWithData;
@@ -18,6 +18,7 @@ export interface TableRendererProps extends Pick<InlineEditingCellProps, 'onInli
18
18
  tableHeader: React.ReactNode;
19
19
  tableProps: TableProps;
20
20
  virtualItems?: VirtualItem[];
21
+ totalVirtualSize?: number;
21
22
  zoomLevel?: number;
22
23
  }
23
- export declare const TableRenderer: ({ columnCount: passedColumnCount, columns, formatMessage, iconColumnVariant, isLoading, areSelectionCheckboxesDisabled, itemActionMenuProps, items, onInlineEditChange, onTableRowClick, style, tableHeader, tableProps, virtualItems, zoomLevel, }: TableRendererProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const TableRenderer: ({ columnCount: passedColumnCount, columns, formatMessage, iconColumnVariant, isLoading, areSelectionCheckboxesDisabled, itemActionMenuProps, items, onInlineEditChange, onTableRowClick, style, tableHeader, tableProps, virtualItems, totalVirtualSize, zoomLevel, }: TableRendererProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-view",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^12.76.2",