@box/metadata-view 1.54.8 → 1.54.10

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 (109) hide show
  1. package/dist/chunks/action-bar.js +48 -0
  2. package/dist/chunks/empty-state.js +24 -0
  3. package/dist/chunks/error-state.js +23 -0
  4. package/dist/chunks/filter-row.module.js +6 -8
  5. package/dist/chunks/filter-side-panel.js +65 -0
  6. package/dist/chunks/header.js +56 -0
  7. package/dist/chunks/inline-editing-cell.js +34 -0
  8. package/dist/chunks/item-action-menu.js +86 -0
  9. package/dist/chunks/metadata-grid.js +44 -0
  10. package/dist/chunks/metadata-location-field.js +35 -0
  11. package/dist/chunks/metadata-view.js +102 -0
  12. package/dist/chunks/pagination-controls.js +40 -0
  13. package/dist/chunks/table-row.js +72 -0
  14. package/dist/chunks/types.js +6 -11
  15. package/dist/chunks/types2.js +4 -0
  16. package/dist/chunks/zoom-button.js +20 -0
  17. package/dist/esm/index.js +29 -59
  18. package/dist/esm/lib/components/action-bar/action-bar.js +2 -62
  19. package/dist/esm/lib/components/action-bar/index.js +2 -4
  20. package/dist/esm/lib/components/action-bar/messages.js +22 -24
  21. package/dist/esm/lib/components/action-bar/zoom-button.js +2 -30
  22. package/dist/esm/lib/components/constants.js +14 -6
  23. package/dist/esm/lib/components/empty-state/empty-state.js +2 -30
  24. package/dist/esm/lib/components/empty-state/index.js +2 -4
  25. package/dist/esm/lib/components/empty-state/messages.js +10 -12
  26. package/dist/esm/lib/components/error-state/error-state.js +2 -31
  27. package/dist/esm/lib/components/error-state/index.js +2 -4
  28. package/dist/esm/lib/components/error-state/messages.js +10 -12
  29. package/dist/esm/lib/components/filter-row/advanced-field-content.js +30 -52
  30. package/dist/esm/lib/components/filter-row/advanced-filter-context.js +3 -6
  31. package/dist/esm/lib/components/filter-row/all-filters-chip.js +31 -49
  32. package/dist/esm/lib/components/filter-row/filter-row.js +35 -59
  33. package/dist/esm/lib/components/filter-row/form-filter-chip.js +84 -113
  34. package/dist/esm/lib/components/filter-row/index.js +6 -12
  35. package/dist/esm/lib/components/filter-row/initial-field-values.js +31 -51
  36. package/dist/esm/lib/components/filter-row/is-blank-or-not-blank-filter.js +2 -4
  37. package/dist/esm/lib/components/filter-row/is-filter-selected.js +37 -58
  38. package/dist/esm/lib/components/filter-row/messages.js +38 -40
  39. package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +74 -103
  40. package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +2 -6
  41. package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js +14 -21
  42. package/dist/esm/lib/components/filter-row/predefinedFilters/use-predefined-filter.js +58 -71
  43. package/dist/esm/lib/components/filter-row/select-filter-chip.js +41 -58
  44. package/dist/esm/lib/components/filter-row/use-form-filter-chip.js +36 -40
  45. package/dist/esm/lib/components/filter-sidepanel/filter-side-panel.js +2 -82
  46. package/dist/esm/lib/components/filter-sidepanel/filter.js +95 -140
  47. package/dist/esm/lib/components/filter-sidepanel/index.js +3 -6
  48. package/dist/esm/lib/components/filter-sidepanel/messages.js +18 -20
  49. package/dist/esm/lib/components/header/header.js +2 -82
  50. package/dist/esm/lib/components/header/index.js +2 -4
  51. package/dist/esm/lib/components/header/messages.js +14 -16
  52. package/dist/esm/lib/components/index.js +26 -53
  53. package/dist/esm/lib/components/item-action-menu/identifier.js +4 -7
  54. package/dist/esm/lib/components/item-action-menu/index.js +2 -4
  55. package/dist/esm/lib/components/item-action-menu/item-action-menu.js +2 -127
  56. package/dist/esm/lib/components/item-action-menu/messages.js +5 -9
  57. package/dist/esm/lib/components/metadata-grid/index.js +2 -4
  58. package/dist/esm/lib/components/metadata-grid/messages.js +5 -9
  59. package/dist/esm/lib/components/metadata-grid/metadata-grid.js +2 -62
  60. package/dist/esm/lib/components/metadata-table/actionColumn.js +3 -5
  61. package/dist/esm/lib/components/metadata-table/hooks/useInfiniteScrollTableItems.js +24 -29
  62. package/dist/esm/lib/components/metadata-table/index.js +4 -8
  63. package/dist/esm/lib/components/metadata-table/messages.js +14 -16
  64. package/dist/esm/lib/components/metadata-table/metadata-table.js +89 -127
  65. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-body.js +10 -19
  66. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/ghost-table-row.js +8 -19
  67. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/index.js +2 -4
  68. package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/index.js +2 -4
  69. package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +2 -56
  70. package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +135 -209
  71. package/dist/esm/lib/components/metadata-table/table-body/table-row/index.js +2 -4
  72. package/dist/esm/lib/components/metadata-table/table-body/table-row/table-row.js +2 -12
  73. package/dist/esm/lib/components/metadata-table/table-renderer.js +34 -55
  74. package/dist/esm/lib/components/metadata-value/index.js +6 -12
  75. package/dist/esm/lib/components/metadata-value/messages.js +15 -17
  76. package/dist/esm/lib/components/metadata-value/metadata-checkbox-field.js +24 -34
  77. package/dist/esm/lib/components/metadata-value/metadata-file-chip.js +14 -22
  78. package/dist/esm/lib/components/metadata-value/metadata-file-field.js +12 -19
  79. package/dist/esm/lib/components/metadata-value/metadata-location-field.js +2 -48
  80. package/dist/esm/lib/components/metadata-value/metadata-radio-field.js +26 -37
  81. package/dist/esm/lib/components/metadata-value/metadata-search-field.js +19 -30
  82. package/dist/esm/lib/components/pagination/index.js +4 -9
  83. package/dist/esm/lib/components/pagination/marker-based-pagination.js +12 -19
  84. package/dist/esm/lib/components/pagination/messages.js +19 -21
  85. package/dist/esm/lib/components/pagination/offset-based-pagination.js +22 -31
  86. package/dist/esm/lib/components/pagination/pagination-controls.js +2 -53
  87. package/dist/esm/lib/components/pagination/pagination.js +20 -35
  88. package/dist/esm/lib/components/pagination/utils.js +4 -6
  89. package/dist/esm/lib/components/sort-dropdown/index.js +2 -4
  90. package/dist/esm/lib/components/sort-dropdown/sort-dropdown.js +37 -56
  91. package/dist/esm/lib/components/switch-case/index.js +2 -5
  92. package/dist/esm/lib/components/switch-case/switch-case.js +4 -12
  93. package/dist/esm/lib/hooks/use-header.js +41 -37
  94. package/dist/esm/lib/index.js +28 -59
  95. package/dist/esm/lib/metadata-view.js +2 -151
  96. package/dist/styles/action-bar.css +1 -1
  97. package/dist/styles/empty-state.css +1 -1
  98. package/dist/styles/filter-row.css +1 -1
  99. package/dist/styles/header.css +1 -1
  100. package/dist/styles/inline-editing-cell.css +1 -1
  101. package/dist/styles/item-action-menu.css +1 -1
  102. package/dist/styles/metadata-grid.css +1 -1
  103. package/dist/styles/metadata-view.css +1 -1
  104. package/dist/styles/pagination-controls.css +1 -1
  105. package/dist/styles/table-row.css +1 -0
  106. package/dist/styles/zoom-button.css +1 -1
  107. package/package.json +17 -17
  108. package/dist/chunks/index.js +0 -105
  109. package/dist/styles/index.css +0 -1
@@ -1,10 +1,6 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const t = e({
3
- actionMenu: {
4
- id: "groupSharedFeatures.metadataView.itemActionMenu.actionMenu",
5
- defaultMessage: "Action menu"
6
- }
7
- });
8
- export {
9
- t as default
10
- };
2
+ var t = e({ actionMenu: {
3
+ id: "groupSharedFeatures.metadataView.itemActionMenu.actionMenu",
4
+ defaultMessage: "Action menu"
5
+ } });
6
+ export { t as default };
@@ -1,4 +1,2 @@
1
- import { MetadataGrid as t } from "./metadata-grid.js";
2
- export {
3
- t as MetadataGrid
4
- };
1
+ import { t as e } from "../../../../chunks/metadata-grid.js";
2
+ export { e as MetadataGrid };
@@ -1,10 +1,6 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const s = e({
3
- gridView: {
4
- id: "groupSharedFeatures.metadataView.gridList.gridView",
5
- defaultMessage: "Grid View"
6
- }
7
- });
8
- export {
9
- s as default
10
- };
2
+ var t = e({ gridView: {
3
+ id: "groupSharedFeatures.metadataView.gridList.gridView",
4
+ defaultMessage: "Grid View"
5
+ } });
6
+ export { t as default };
@@ -1,62 +1,2 @@
1
- import { GridList as i } from "@box/blueprint-web";
2
- import { ItemTypeIcon as u } from "@box/item-icon";
3
- import { useIntl as I } from "react-intl";
4
- import { V as h } from "../../../../chunks/types.js";
5
- import { THUMBNAIL_GRID_VIEW_SIZES as T } from "../constants.js";
6
- import b from "./messages.js";
7
- import { jsx as t, jsxs as E } from "react/jsx-runtime";
8
- import { ItemActionMenu as p } from "../item-action-menu/item-action-menu.js";
9
- import '../../../../styles/metadata-grid.css';const R = "_itemThumbnail_93ess_1", f = {
10
- itemThumbnail: R
11
- }, L = 188, M = 250, A = 8, G = 5, g = (r) => L + M * (A - r) / G, O = ({
12
- items: r,
13
- itemActionMenuProps: n,
14
- zoomLevel: o,
15
- areSelectionCheckboxesDisabled: l,
16
- ...a
17
- }) => {
18
- const {
19
- formatMessage: c
20
- } = I();
21
- return /* @__PURE__ */ t(i, {
22
- "aria-label": c(b.gridView),
23
- items: r,
24
- style: {
25
- gridTemplateColumns: `repeat(auto-fit, minmax(${g(T[o])}px, 1fr))`
26
- },
27
- ...a,
28
- children: (e) => {
29
- const {
30
- name: m,
31
- createdAt: _
32
- } = e, s = "thumbnailURLs" in e ? e.thumbnailURLs?.large || e.thumbnailURLs?.medium || e.thumbnailURLs?.small : void 0;
33
- return /* @__PURE__ */ E(i.Item, {
34
- textValue: m,
35
- children: [/* @__PURE__ */ t(i.Thumbnail, {
36
- className: f.itemThumbnail,
37
- children: s ? /* @__PURE__ */ t("img", {
38
- alt: m,
39
- src: s
40
- }) : /* @__PURE__ */ t(u, {
41
- item: e
42
- })
43
- }), /* @__PURE__ */ t(i.Header, {
44
- children: m
45
- }), /* @__PURE__ */ t(i.Subtitle, {
46
- children: _
47
- }), /* @__PURE__ */ t(i.Actions, {
48
- isSelectionCheckboxDisabled: l,
49
- children: n ? (d) => /* @__PURE__ */ t(p, {
50
- ...n,
51
- item: e,
52
- onOpenChange: d,
53
- viewMode: h.GRID
54
- }) : null
55
- })]
56
- });
57
- }
58
- });
59
- };
60
- export {
61
- O as MetadataGrid
62
- };
1
+ import { t as e } from "../../../../chunks/metadata-grid.js";
2
+ export { e as MetadataGrid };
@@ -1,6 +1,4 @@
1
- function n(e) {
2
- return !!e.HeaderActions || e?.selectionMode && e.selectionMode !== "none";
1
+ function e(e) {
2
+ return !!e.HeaderActions || e?.selectionMode && e.selectionMode !== "none";
3
3
  }
4
- export {
5
- n as getShouldRenderActionColumn
6
- };
4
+ export { e as getShouldRenderActionColumn };
@@ -1,30 +1,25 @@
1
- import { useRef as g, useMemo as S, useEffect as h } from "react";
2
- import { useVirtualizer as z } from "@tanstack/react-virtual";
3
- import { Size14 as T } from "@box/blueprint-web-assets/tokens/px-tokens";
4
- const p = parseInt(T, 10), K = ({
5
- items: t,
6
- hasNextPage: e = !1,
7
- isLoading: r = !1,
8
- parentRef: l,
9
- approximateRowHeight: m = p,
10
- onGetNextPage: o,
11
- placeholderRowsCount: c = 20
12
- }) => {
13
- const s = g(0), a = S(() => t.length + (r || e ? c : 0), [t, e, r, c]), u = z({
14
- count: a,
15
- getScrollElement: () => l.current,
16
- getItemKey: (I) => t[I]?.id || `table-item-${I}`,
17
- estimateSize: () => m
18
- }), n = u.getVirtualItems();
19
- h(() => {
20
- s.current = t.length;
21
- }, [t.length]), (t.length === 0 || t.length > 0 && s.current === 0) && l.current && (l.current.scrollTop = 0);
22
- const i = n[n.length - 1], f = !!i && i.index >= t.length - 1;
23
- return !r && f && e && o && o(), {
24
- totalVirtualSize: u.getTotalSize(),
25
- virtualItemsToDisplay: n
26
- };
27
- };
28
- export {
29
- K as useInfiniteScrollTableItems
1
+ import { useEffect as e, useMemo as t, useRef as n } from "react";
2
+ import { useVirtualizer as r } from "@tanstack/react-virtual";
3
+ import { Size14 as i } from "@box/blueprint-web-assets/tokens/px-tokens";
4
+ var a = parseInt(i, 10), o = ({ items: i, hasNextPage: o = !1, isLoading: s = !1, parentRef: c, approximateRowHeight: l = a, onGetNextPage: u, placeholderRowsCount: d = 20 }) => {
5
+ let f = n(0), p = r({
6
+ count: t(() => i.length + (s || o ? d : 0), [
7
+ i,
8
+ o,
9
+ s,
10
+ d
11
+ ]),
12
+ getScrollElement: () => c.current,
13
+ getItemKey: (e) => i[e]?.id || `table-item-${e}`,
14
+ estimateSize: () => l
15
+ }), m = p.getVirtualItems();
16
+ e(() => {
17
+ f.current = i.length;
18
+ }, [i.length]), (i.length === 0 || i.length > 0 && f.current === 0) && c.current && (c.current.scrollTop = 0);
19
+ let h = m[m.length - 1], g = !!h && h.index >= i.length - 1;
20
+ return !s && g && o && u && u(), {
21
+ totalVirtualSize: p.getTotalSize(),
22
+ virtualItemsToDisplay: m
23
+ };
30
24
  };
25
+ export { o as useInfiniteScrollTableItems };
@@ -1,8 +1,4 @@
1
- import { MetadataTable as o } from "./metadata-table.js";
2
- import { TableRenderer as a } from "./table-renderer.js";
3
- import { InlineEditingCell as n } from "./table-body/inline-editing-cell/inline-editing-cell.js";
4
- export {
5
- n as InlineEditingCell,
6
- o as MetadataTable,
7
- a as TableRenderer
8
- };
1
+ import { t as e } from "../../../../chunks/inline-editing-cell.js";
2
+ import { TableRenderer as t } from "./table-renderer.js";
3
+ import { MetadataTable as n } from "./metadata-table.js";
4
+ export { e as InlineEditingCell, n as MetadataTable, t as TableRenderer };
@@ -1,18 +1,16 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = e({
3
- listView: {
4
- id: "groupSharedFeatures.metadataView.itemList.listView",
5
- defaultMessage: "List view"
6
- },
7
- selectAll: {
8
- id: "groupSharedFeatures.metadataView.itemList.selectAll",
9
- defaultMessage: "Select all"
10
- },
11
- unselectedOptionLabel: {
12
- id: "groupSharedFeatures.metadataView.inlineEditingCell.unselectedOptionLabel",
13
- defaultMessage: "--"
14
- }
2
+ var t = e({
3
+ listView: {
4
+ id: "groupSharedFeatures.metadataView.itemList.listView",
5
+ defaultMessage: "List view"
6
+ },
7
+ selectAll: {
8
+ id: "groupSharedFeatures.metadataView.itemList.selectAll",
9
+ defaultMessage: "Select all"
10
+ },
11
+ unselectedOptionLabel: {
12
+ id: "groupSharedFeatures.metadataView.inlineEditingCell.unselectedOptionLabel",
13
+ defaultMessage: "--"
14
+ }
15
15
  });
16
- export {
17
- a as default
18
- };
16
+ export { t as default };
@@ -1,128 +1,90 @@
1
- import { useRef as O } from "react";
2
- import { useIntl as Z } from "react-intl";
3
- import { Text as _, ListCheckbox as q, DataTableWrapper as E, TableHeader as F, Column as G } from "@box/blueprint-web";
4
- import { useInfiniteScrollTableItems as J } from "./hooks/useInfiniteScrollTableItems.js";
5
- import { TableRenderer as R } from "./table-renderer.js";
6
- import { I as K } from "../../../../chunks/types.js";
7
- import { THUMBNAIL_WIDTHS as Q } from "../constants.js";
8
- import { s as i } from "../../../../chunks/index.js";
9
- import { getShouldRenderActionColumn as X } from "./actionColumn.js";
10
- import Y from "./messages.js";
11
- import { jsx as t, jsxs as $ } from "react/jsx-runtime";
12
- import "./table-body/inline-editing-cell/inline-editing-cell.js";
13
- const me = ({
14
- areSelectionCheckboxesDisabled: n = !1,
15
- columns: m,
16
- hasNextPage: b = !1,
17
- iconColumnVariant: d,
18
- isInfiniteScrollEnabled: T = !1,
19
- isLoading: s = !1,
20
- isSelectAllEnabled: W,
21
- itemActionMenuProps: w,
22
- items: c,
23
- maxActionColumnWidth: x,
24
- minActionColumnWidth: A,
25
- onGetNextPage: S,
26
- onInlineEditChange: g,
27
- onTableRowClick: C,
28
- placeholderRowsCount: N,
29
- zoomLevel: a,
30
- ...l
31
- }) => {
32
- const {
33
- formatMessage: f
34
- } = Z(), u = O(null), {
35
- virtualItemsToDisplay: y,
36
- totalVirtualSize: D
37
- } = J({
38
- items: c,
39
- hasNextPage: b,
40
- isLoading: s,
41
- parentRef: u,
42
- onGetNextPage: S,
43
- placeholderRowsCount: N
44
- }), r = [], M = 0;
45
- if (d === K.COLUMN) {
46
- a = a || M;
47
- const e = parseInt(Q[a], 10) + 24;
48
- r.push({
49
- id: "item-type-icon",
50
- isRowHeader: !1,
51
- hideHeader: !1,
52
- minWidth: e,
53
- maxWidth: e
54
- });
55
- }
56
- const j = m.map((e) => {
57
- const {
58
- id: h,
59
- isRowHeader: V,
60
- headerRenderer: H,
61
- textValue: o,
62
- type: I,
63
- allowsSorting: k,
64
- ...v
65
- } = e, B = I !== "multiSelect" && I !== "enum" && k === !0;
66
- return {
67
- ...v,
68
- children: H ? H(o, e) : /* @__PURE__ */ t(_, {
69
- as: "span",
70
- children: o
71
- }),
72
- isRowHeader: h === "name" || V,
73
- id: h,
74
- textValue: o,
75
- allowsSorting: B
76
- };
77
- });
78
- r.push(...j), X(l) && r.push({
79
- id: "actions",
80
- className: i.tableHeaderActions,
81
- children: /* @__PURE__ */ $("div", {
82
- className: i.tableHeaderActionsWrapper,
83
- children: [l.HeaderActions, W ? /* @__PURE__ */ t(q, {
84
- "aria-label": f(Y.selectAll),
85
- className: i.selectAllCheckbox,
86
- isDisabled: s || n
87
- }) : null]
88
- }),
89
- isRowHeader: !1,
90
- hideHeader: !1,
91
- allowsSorting: !1,
92
- maxWidth: x,
93
- minWidth: A
94
- });
95
- const U = /* @__PURE__ */ t(F, {
96
- columns: r,
97
- children: (e) => /* @__PURE__ */ t(G, {
98
- ...e
99
- })
100
- }), p = {
101
- columnCount: r.length,
102
- columns: m,
103
- formatMessage: f,
104
- iconColumnVariant: d,
105
- isLoading: s,
106
- areSelectionCheckboxesDisabled: n,
107
- itemActionMenuProps: w,
108
- items: c,
109
- onInlineEditChange: g,
110
- onTableRowClick: C,
111
- tableHeader: U,
112
- tableProps: l,
113
- zoomLevel: a
114
- };
115
- return T ? /* @__PURE__ */ t(E, {
116
- ref: u,
117
- children: /* @__PURE__ */ t(R, {
118
- ...p,
119
- totalVirtualSize: D,
120
- virtualItems: y
121
- })
122
- }) : /* @__PURE__ */ t(R, {
123
- ...p
124
- });
125
- };
126
- export {
127
- me as MetadataTable
1
+ import { t as e } from "../../../../chunks/types.js";
2
+ import { THUMBNAIL_WIDTHS as t } from "../constants.js";
3
+ import { useInfiniteScrollTableItems as n } from "./hooks/useInfiniteScrollTableItems.js";
4
+ import r from "./messages.js";
5
+ import { n as i } from "../../../../chunks/table-row.js";
6
+ import { getShouldRenderActionColumn as a } from "./actionColumn.js";
7
+ import { TableRenderer as o } from "./table-renderer.js";
8
+ import { Column as s, DataTableWrapper as c, ListCheckbox as l, TableHeader as u, Text as d } from "@box/blueprint-web";
9
+ import { useRef as f } from "react";
10
+ import { useIntl as p } from "react-intl";
11
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
12
+ var g = ({ areSelectionCheckboxesDisabled: g = !1, columns: _, hasNextPage: v = !1, iconColumnVariant: y, isInfiniteScrollEnabled: b = !1, isLoading: x = !1, isSelectAllEnabled: S, itemActionMenuProps: C, items: w, maxActionColumnWidth: T, minActionColumnWidth: E, onGetNextPage: D, onInlineEditChange: O, onTableRowClick: k, placeholderRowsCount: A, zoomLevel: j, ...M }) => {
13
+ let { formatMessage: N } = p(), P = f(null), { virtualItemsToDisplay: F, totalVirtualSize: I } = n({
14
+ items: w,
15
+ hasNextPage: v,
16
+ isLoading: x,
17
+ parentRef: P,
18
+ onGetNextPage: D,
19
+ placeholderRowsCount: A
20
+ }), L = [];
21
+ if (y === e.COLUMN) {
22
+ j ||= 0;
23
+ let e = parseInt(t[j], 10) + 24;
24
+ L.push({
25
+ id: "item-type-icon",
26
+ isRowHeader: !1,
27
+ hideHeader: !1,
28
+ minWidth: e,
29
+ maxWidth: e
30
+ });
31
+ }
32
+ let R = _.map((e) => {
33
+ let { id: t, isRowHeader: n, headerRenderer: r, textValue: i, type: a, allowsSorting: o, ...s } = e, c = a !== "multiSelect" && a !== "enum" && o === !0;
34
+ return {
35
+ ...s,
36
+ children: r ? r(i, e) : /* @__PURE__ */ m(d, {
37
+ as: "span",
38
+ children: i
39
+ }),
40
+ isRowHeader: t === "name" || n,
41
+ id: t,
42
+ textValue: i,
43
+ allowsSorting: c
44
+ };
45
+ });
46
+ L.push(...R), a(M) && L.push({
47
+ id: "actions",
48
+ className: i.tableHeaderActions,
49
+ children: /* @__PURE__ */ h("div", {
50
+ className: i.tableHeaderActionsWrapper,
51
+ children: [M.HeaderActions, S ? /* @__PURE__ */ m(l, {
52
+ "aria-label": N(r.selectAll),
53
+ className: i.selectAllCheckbox,
54
+ isDisabled: x || g
55
+ }) : null]
56
+ }),
57
+ isRowHeader: !1,
58
+ hideHeader: !1,
59
+ allowsSorting: !1,
60
+ maxWidth: T,
61
+ minWidth: E
62
+ });
63
+ let z = /* @__PURE__ */ m(u, {
64
+ columns: L,
65
+ children: (e) => /* @__PURE__ */ m(s, { ...e })
66
+ }), B = {
67
+ columnCount: L.length,
68
+ columns: _,
69
+ formatMessage: N,
70
+ iconColumnVariant: y,
71
+ isLoading: x,
72
+ areSelectionCheckboxesDisabled: g,
73
+ itemActionMenuProps: C,
74
+ items: w,
75
+ onInlineEditChange: O,
76
+ onTableRowClick: k,
77
+ tableHeader: z,
78
+ tableProps: M,
79
+ zoomLevel: j
80
+ };
81
+ return b ? /* @__PURE__ */ m(c, {
82
+ ref: P,
83
+ children: /* @__PURE__ */ m(o, {
84
+ ...B,
85
+ totalVirtualSize: I,
86
+ virtualItems: F
87
+ })
88
+ }) : /* @__PURE__ */ m(o, { ...B });
128
89
  };
90
+ export { g as MetadataTable };
@@ -1,20 +1,11 @@
1
- import { TableBody as l } from "@box/blueprint-web";
2
- import { jsx as r } from "react/jsx-runtime";
3
- import { GhostTableRow as s } from "./ghost-table-row/ghost-table-row.js";
4
- const y = 20, T = ({
5
- columnLength: e,
6
- rowLength: t = y
7
- }) => /* @__PURE__ */ r(l, {
8
- items: Array.from({
9
- length: t
10
- }, (o, m) => ({
11
- key: m
12
- })),
13
- children: (o) => /* @__PURE__ */ r(s, {
14
- columnLength: e,
15
- rowKey: o.key
16
- })
1
+ import { GhostTableRow as e } from "./ghost-table-row/ghost-table-row.js";
2
+ import { TableBody as t } from "@box/blueprint-web";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ var r = 20, i = ({ columnLength: i, rowLength: a = r }) => /* @__PURE__ */ n(t, {
5
+ items: Array.from({ length: a }, (e, t) => ({ key: t })),
6
+ children: (t) => /* @__PURE__ */ n(e, {
7
+ columnLength: i,
8
+ rowKey: t.key
9
+ })
17
10
  });
18
- export {
19
- T as GhostTableBody
20
- };
11
+ export { i as GhostTableBody };
@@ -1,20 +1,9 @@
1
- import { Row as h, Cell as i, Ghost as l } from "@box/blueprint-web";
2
- import { Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
1
+ import { Cell as e, Ghost as t, Row as n } from "@box/blueprint-web";
3
2
  import { jsx as r } from "react/jsx-runtime";
4
- const f = ({
5
- columnLength: o,
6
- rowKey: t = "ghost-row"
7
- }) => /* @__PURE__ */ r(h, {
8
- children: Array.from({
9
- length: o
10
- }, (n, e) => /* @__PURE__ */ r(i, {
11
- children: /* @__PURE__ */ r(l, {
12
- height: m,
13
- variant: "rectangle",
14
- width: "100%"
15
- })
16
- }, e))
17
- }, t);
18
- export {
19
- f as GhostTableRow
20
- };
3
+ import { Size5 as i } from "@box/blueprint-web-assets/tokens/tokens";
4
+ var a = ({ columnLength: a, rowKey: o = "ghost-row" }) => /* @__PURE__ */ r(n, { children: Array.from({ length: a }, (n, a) => /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(t, {
5
+ height: i,
6
+ variant: "rectangle",
7
+ width: "100%"
8
+ }) }, a)) }, o);
9
+ export { a as GhostTableRow };
@@ -1,4 +1,2 @@
1
- import { GhostTableRow as r } from "./ghost-table-row.js";
2
- export {
3
- r as GhostTableRow
4
- };
1
+ import { GhostTableRow as e } from "./ghost-table-row.js";
2
+ export { e as GhostTableRow };
@@ -1,4 +1,2 @@
1
- import { InlineEditingCell as l } from "./inline-editing-cell.js";
2
- export {
3
- l as InlineEditingCell
4
- };
1
+ import { t as e } from "../../../../../../chunks/inline-editing-cell.js";
2
+ export { e as InlineEditingCell };
@@ -1,56 +1,2 @@
1
- import { Cell as b, DropdownMenu as i, Button as v } from "@box/blueprint-web";
2
- import { CaretDown as E } from "@box/blueprint-web-assets/icons/Fill";
3
- import S from "lodash/get";
4
- import w from "lodash/isEqual";
5
- import { useIntl as x } from "react-intl";
6
- import y from "../../messages.js";
7
- import { jsx as t, jsxs as I } from "react/jsx-runtime";
8
- import '../../../../../../styles/inline-editing-cell.css';const O = "_inlineEditingCell_1iieg_1", j = {
9
- inlineEditingCell: O
10
- }, R = ({
11
- column: d,
12
- item: s,
13
- onInlineEditChange: c
14
- }) => {
15
- const {
16
- formatMessage: m
17
- } = x(), {
18
- type: a,
19
- inlineEditingOptions: f,
20
- id: u
21
- } = d, r = S(s, u), n = typeof r == "string" ? [r] : r || [], o = m(y.unselectedOptionLabel), g = [{
22
- value: null,
23
- label: o
24
- }, ...(f ?? []).map((e) => ({
25
- value: e,
26
- label: e
27
- }))], h = (e) => {
28
- if (!c)
29
- return;
30
- let l;
31
- a === "multiSelect" ? e === null ? l = [] : l = n.includes(e) ? n.filter((C) => C !== e) : [...n, e] : l = e, (a === "multiSelect" ? !w(l, n) : l !== n[0]) && c(s, l, u);
32
- }, p = (e) => e === null ? n.length === 0 : n.includes(e);
33
- return /* @__PURE__ */ t(b, {
34
- children: /* @__PURE__ */ I(i.Root, {
35
- children: [/* @__PURE__ */ t(i.Trigger, {
36
- children: /* @__PURE__ */ t(v, {
37
- className: j.inlineEditingCell,
38
- endIcon: E,
39
- variant: "secondary",
40
- children: n.length > 0 ? n.join(", ") : o
41
- })
42
- }), /* @__PURE__ */ t(i.Content, {
43
- align: "start",
44
- children: g.map((e) => /* @__PURE__ */ t(i.CheckboxItem, {
45
- checked: p(e.value),
46
- onSelect: () => h(e.value),
47
- children: e.label
48
- }, e.value ?? o))
49
- })]
50
- })
51
- });
52
- };
53
- export {
54
- R as InlineEditingCell,
55
- R as default
56
- };
1
+ import { t as e } from "../../../../../../chunks/inline-editing-cell.js";
2
+ export { e as InlineEditingCell, e as default };