@box/metadata-view 0.58.1 → 0.59.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.
- package/dist/chunks/index.js +29 -27
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +26 -24
- package/dist/esm/lib/components/metadata-table/metadata-table.js +63 -61
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +64 -59
- package/dist/esm/lib/components/metadata-table/table-renderer.js +31 -29
- package/dist/esm/lib/metadata-view.js +66 -63
- package/dist/types/lib/components/metadata-grid/metadata-grid.d.ts +2 -1
- package/dist/types/lib/components/metadata-table/metadata-table.d.ts +2 -1
- package/dist/types/lib/components/metadata-table/table-body/table-body-with-data.d.ts +1 -1
- package/dist/types/lib/components/metadata-table/table-body/table-row/table-row.d.ts +2 -1
- package/dist/types/lib/components/metadata-table/table-renderer.d.ts +2 -1
- package/dist/types/lib/metadata-view.d.ts +2 -1
- package/package.json +5 -5
package/dist/chunks/index.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { Row as L, Cell as n, Text as s, ActionCell as
|
|
1
|
+
import { Row as L, Cell as n, Text as s, ActionCell as q } from "@box/blueprint-web";
|
|
2
2
|
import N from "lodash/get";
|
|
3
3
|
import { ItemTypeIcon as p } from "@box/item-icon";
|
|
4
|
-
import
|
|
4
|
+
import E from "clsx";
|
|
5
5
|
import { I as a } from "./types.js";
|
|
6
|
-
import { THUMBNAIL_LIST_VIEW_HEIGHTS as
|
|
6
|
+
import { THUMBNAIL_LIST_VIEW_HEIGHTS as y } from "../esm/lib/components/constants.js";
|
|
7
7
|
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
8
|
-
import { ItemActionMenu as
|
|
9
|
-
import '../styles/index.css';const
|
|
10
|
-
tableHeaderActionsWrapper:
|
|
11
|
-
tableHeaderActions:
|
|
12
|
-
tableRow:
|
|
8
|
+
import { ItemActionMenu as R } from "../esm/lib/components/item-action-menu/item-action-menu.js";
|
|
9
|
+
import '../styles/index.css';const g = "_tableHeaderActionsWrapper_169qr_1", w = "_tableHeaderActions_169qr_1", k = "_tableRow_169qr_33", U = "_selectAllCheckbox_169qr_42", B = "_tableNameCell_169qr_47", W = "_tableNameCellSubtitle_169qr_53", j = "_tableNameCellIconInline_169qr_58", F = "_infiniteScrollTableContainerFullHeight_169qr_62", M = "_iconCell_169qr_68", i = {
|
|
10
|
+
tableHeaderActionsWrapper: g,
|
|
11
|
+
tableHeaderActions: w,
|
|
12
|
+
tableRow: k,
|
|
13
13
|
selectAllCheckbox: U,
|
|
14
|
-
tableNameCell:
|
|
15
|
-
tableNameCellSubtitle:
|
|
16
|
-
tableNameCellIconInline:
|
|
17
|
-
infiniteScrollTableContainerFullHeight:
|
|
18
|
-
iconCell:
|
|
19
|
-
},
|
|
14
|
+
tableNameCell: B,
|
|
15
|
+
tableNameCellSubtitle: W,
|
|
16
|
+
tableNameCellIconInline: j,
|
|
17
|
+
infiniteScrollTableContainerFullHeight: F,
|
|
18
|
+
iconCell: M
|
|
19
|
+
}, Q = ({
|
|
20
20
|
item: l,
|
|
21
21
|
columns: h,
|
|
22
22
|
iconColumnVariant: t,
|
|
23
23
|
isSelectAllEnabled: C,
|
|
24
24
|
itemActionMenuProps: d,
|
|
25
|
-
|
|
25
|
+
areSelectionCheckboxesDisabled: u,
|
|
26
|
+
zoomLevel: T = 0
|
|
26
27
|
}) => /* @__PURE__ */ b(L, {
|
|
27
28
|
className: i.tableRow,
|
|
28
29
|
id: l.id,
|
|
29
30
|
children: [t === a.COLUMN ? /* @__PURE__ */ e(n, {
|
|
30
31
|
style: {
|
|
31
|
-
height:
|
|
32
|
+
height: y[T]
|
|
32
33
|
},
|
|
33
34
|
children: /* @__PURE__ */ e(p, {
|
|
34
35
|
className: i.iconCell,
|
|
@@ -38,11 +39,11 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
38
39
|
const {
|
|
39
40
|
cellRenderer: _,
|
|
40
41
|
id: o,
|
|
41
|
-
isItemMetadata:
|
|
42
|
-
subtitle:
|
|
43
|
-
textValue:
|
|
44
|
-
type:
|
|
45
|
-
} = r, c = `${
|
|
42
|
+
isItemMetadata: f,
|
|
43
|
+
subtitle: S,
|
|
44
|
+
textValue: H,
|
|
45
|
+
type: x
|
|
46
|
+
} = r, c = `${H}-${l.id}`, A = f ? o.split(".")[1] : o, I = N(l, A);
|
|
46
47
|
if (o === "name" && (t === a.INLINE || t === a.INLINE_SUBTITLE))
|
|
47
48
|
return /* @__PURE__ */ e(n, {
|
|
48
49
|
children: /* @__PURE__ */ b("div", {
|
|
@@ -50,7 +51,7 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
50
51
|
children: [/* @__PURE__ */ e(p, {
|
|
51
52
|
item: l
|
|
52
53
|
}), /* @__PURE__ */ b("div", {
|
|
53
|
-
className:
|
|
54
|
+
className: E({
|
|
54
55
|
[i.tableNameCellSubtitle]: t === a.INLINE_SUBTITLE
|
|
55
56
|
}),
|
|
56
57
|
children: [/* @__PURE__ */ e(s, {
|
|
@@ -59,7 +60,7 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
59
60
|
}), t === a.INLINE_SUBTITLE ? /* @__PURE__ */ e(s, {
|
|
60
61
|
as: "span",
|
|
61
62
|
color: "textOnLightSecondary",
|
|
62
|
-
children:
|
|
63
|
+
children: S
|
|
63
64
|
}) : null]
|
|
64
65
|
})]
|
|
65
66
|
})
|
|
@@ -68,7 +69,7 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
68
69
|
return /* @__PURE__ */ e(n, {
|
|
69
70
|
children: _(l, r)
|
|
70
71
|
}, c);
|
|
71
|
-
if (
|
|
72
|
+
if (x === "multiSelect") {
|
|
72
73
|
const m = N(l, o);
|
|
73
74
|
return /* @__PURE__ */ e(n, {
|
|
74
75
|
children: m ? m.join(" ") : ""
|
|
@@ -80,8 +81,9 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
80
81
|
children: I
|
|
81
82
|
})
|
|
82
83
|
}, c);
|
|
83
|
-
}), C && /* @__PURE__ */ e(
|
|
84
|
-
|
|
84
|
+
}), C && /* @__PURE__ */ e(q, {
|
|
85
|
+
isCheckboxDisabled: u,
|
|
86
|
+
children: (r) => d ? /* @__PURE__ */ e(R, {
|
|
85
87
|
...d,
|
|
86
88
|
item: l,
|
|
87
89
|
onOpenChange: r
|
|
@@ -89,6 +91,6 @@ import '../styles/index.css';const R = "_tableHeaderActionsWrapper_169qr_1", g =
|
|
|
89
91
|
})]
|
|
90
92
|
}, l.id);
|
|
91
93
|
export {
|
|
92
|
-
|
|
94
|
+
Q as T,
|
|
93
95
|
i as s
|
|
94
96
|
};
|
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
import { GridList as i } from "@box/blueprint-web";
|
|
2
|
-
import { ItemTypeIcon as
|
|
3
|
-
import { useIntl as
|
|
2
|
+
import { ItemTypeIcon as T } from "@box/item-icon";
|
|
3
|
+
import { useIntl as b } from "react-intl";
|
|
4
4
|
import { V as E } from "../../../../chunks/types.js";
|
|
5
|
-
import { THUMBNAIL_GRID_VIEW_SIZES as
|
|
6
|
-
import
|
|
7
|
-
import { jsx as t, jsxs as
|
|
8
|
-
import { ItemActionMenu as
|
|
9
|
-
import '../../../../styles/metadata-grid.css';const
|
|
10
|
-
itemThumbnail:
|
|
11
|
-
},
|
|
5
|
+
import { THUMBNAIL_GRID_VIEW_SIZES as p } from "../constants.js";
|
|
6
|
+
import R from "./messages.js";
|
|
7
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
import { ItemActionMenu as L } from "../item-action-menu/item-action-menu.js";
|
|
9
|
+
import '../../../../styles/metadata-grid.css';const M = "_itemThumbnail_93ess_1", A = {
|
|
10
|
+
itemThumbnail: M
|
|
11
|
+
}, G = 188, g = 250, x = 8, D = 5, S = (r) => G + g * (x - r) / D, N = ({
|
|
12
12
|
items: r,
|
|
13
13
|
itemActionMenuProps: n,
|
|
14
14
|
zoomLevel: c,
|
|
15
|
-
|
|
15
|
+
areSelectionCheckboxesDisabled: _,
|
|
16
|
+
...d
|
|
16
17
|
}) => {
|
|
17
18
|
const {
|
|
18
19
|
formatMessage: u
|
|
19
|
-
} =
|
|
20
|
+
} = b();
|
|
20
21
|
return /* @__PURE__ */ t(i, {
|
|
21
|
-
"aria-label": u(
|
|
22
|
+
"aria-label": u(R.gridView),
|
|
22
23
|
items: r,
|
|
23
24
|
style: {
|
|
24
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(${
|
|
25
|
+
gridTemplateColumns: `repeat(auto-fit, minmax(${S(p[c])}px, 1fr))`
|
|
25
26
|
},
|
|
26
|
-
...
|
|
27
|
+
...d,
|
|
27
28
|
children: (e) => {
|
|
28
|
-
var o,
|
|
29
|
+
var o, l, a;
|
|
29
30
|
const {
|
|
30
31
|
name: m,
|
|
31
|
-
createdAt:
|
|
32
|
-
} = e, s = "thumbnailURLs" in e ? ((o = e.thumbnailURLs) == null ? void 0 : o.large) || ((
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
createdAt: I
|
|
33
|
+
} = e, s = "thumbnailURLs" in e ? ((o = e.thumbnailURLs) == null ? void 0 : o.large) || ((l = e.thumbnailURLs) == null ? void 0 : l.medium) || ((a = e.thumbnailURLs) == null ? void 0 : a.small) : void 0;
|
|
34
|
+
return /* @__PURE__ */ f(i.Item, {
|
|
34
35
|
textValue: m,
|
|
35
36
|
children: [/* @__PURE__ */ t(i.Thumbnail, {
|
|
36
|
-
className:
|
|
37
|
+
className: A.itemThumbnail,
|
|
37
38
|
children: s ? /* @__PURE__ */ t("img", {
|
|
38
39
|
alt: m,
|
|
39
40
|
src: s
|
|
40
|
-
}) : /* @__PURE__ */ t(
|
|
41
|
+
}) : /* @__PURE__ */ t(T, {
|
|
41
42
|
item: e
|
|
42
43
|
})
|
|
43
44
|
}), /* @__PURE__ */ t(i.Header, {
|
|
44
45
|
children: m
|
|
45
46
|
}), /* @__PURE__ */ t(i.Subtitle, {
|
|
46
|
-
children:
|
|
47
|
+
children: I
|
|
47
48
|
}), /* @__PURE__ */ t(i.Actions, {
|
|
48
|
-
|
|
49
|
+
isSelectionCheckboxDisabled: _,
|
|
50
|
+
children: n ? (h) => /* @__PURE__ */ t(L, {
|
|
49
51
|
...n,
|
|
50
52
|
item: e,
|
|
51
|
-
onOpenChange:
|
|
53
|
+
onOpenChange: h,
|
|
52
54
|
viewMode: E.GRID
|
|
53
55
|
}) : null
|
|
54
56
|
})]
|
|
@@ -57,5 +59,5 @@ import '../../../../styles/metadata-grid.css';const L = "_itemThumbnail_93ess_1"
|
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
61
|
export {
|
|
60
|
-
|
|
62
|
+
N as MetadataGrid
|
|
61
63
|
};
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { useIntl as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { useInfiniteScrollTableItems as
|
|
5
|
-
import { TableRenderer as
|
|
6
|
-
import { I as
|
|
7
|
-
import { THUMBNAIL_WIDTHS as
|
|
1
|
+
import { useRef as E } from "react";
|
|
2
|
+
import { useIntl as B } from "react-intl";
|
|
3
|
+
import { Text as O, ListCheckbox as P, TableHeader as U, Column as j } from "@box/blueprint-web";
|
|
4
|
+
import { useInfiniteScrollTableItems as k } from "./hooks/useInfiniteScrollTableItems.js";
|
|
5
|
+
import { TableRenderer as R } from "./table-renderer.js";
|
|
6
|
+
import { I as F } from "../../../../chunks/types.js";
|
|
7
|
+
import { THUMBNAIL_WIDTHS as G } from "../constants.js";
|
|
8
8
|
import { s } from "../../../../chunks/index.js";
|
|
9
|
-
import
|
|
9
|
+
import L from "./messages.js";
|
|
10
10
|
import { jsx as e } from "react/jsx-runtime";
|
|
11
11
|
import "./table-body/inline-editing-cell/inline-editing-cell.js";
|
|
12
|
-
const
|
|
12
|
+
const V = 40, ae = ({
|
|
13
13
|
columns: o,
|
|
14
14
|
isLoading: l = !1,
|
|
15
15
|
iconColumnVariant: n,
|
|
16
16
|
isSelectAllEnabled: m,
|
|
17
17
|
items: d,
|
|
18
|
-
itemActionMenuProps:
|
|
18
|
+
itemActionMenuProps: w,
|
|
19
19
|
isInfiniteScrollEnabled: x = !1,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
areSelectionCheckboxesDisabled: c = !1,
|
|
21
|
+
hasNextPage: g = !1,
|
|
22
|
+
onInlineEditChange: y,
|
|
23
|
+
onGetNextPage: W,
|
|
24
|
+
placeholderRowsCount: A,
|
|
24
25
|
zoomLevel: r,
|
|
25
|
-
...
|
|
26
|
+
...C
|
|
26
27
|
}) => {
|
|
27
|
-
var
|
|
28
|
+
var H;
|
|
28
29
|
const {
|
|
29
|
-
formatMessage:
|
|
30
|
-
} =
|
|
31
|
-
virtualItemsToDisplay:
|
|
32
|
-
getTableHeight:
|
|
33
|
-
} =
|
|
30
|
+
formatMessage: f
|
|
31
|
+
} = B(), p = E(null), {
|
|
32
|
+
virtualItemsToDisplay: h,
|
|
33
|
+
getTableHeight: N
|
|
34
|
+
} = k({
|
|
34
35
|
items: d,
|
|
35
|
-
hasNextPage:
|
|
36
|
+
hasNextPage: g,
|
|
36
37
|
isLoading: l,
|
|
37
|
-
parentRef:
|
|
38
|
-
onGetNextPage:
|
|
39
|
-
placeholderRowsCount:
|
|
40
|
-
}), a = [],
|
|
41
|
-
if (n ===
|
|
42
|
-
r = r ||
|
|
43
|
-
const t = parseInt(
|
|
38
|
+
parentRef: p,
|
|
39
|
+
onGetNextPage: W,
|
|
40
|
+
placeholderRowsCount: A
|
|
41
|
+
}), a = [], _ = 0;
|
|
42
|
+
if (n === F.COLUMN) {
|
|
43
|
+
r = r || _;
|
|
44
|
+
const t = parseInt(G[r], 10) + 24;
|
|
44
45
|
a.push({
|
|
45
46
|
id: "item-type-icon",
|
|
46
47
|
isRowHeader: !1,
|
|
@@ -49,87 +50,88 @@ const L = 40, te = ({
|
|
|
49
50
|
maxWidth: t
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
const
|
|
53
|
+
const v = o.map((t) => {
|
|
53
54
|
const {
|
|
54
|
-
id:
|
|
55
|
-
isRowHeader:
|
|
56
|
-
headerRenderer:
|
|
55
|
+
id: b,
|
|
56
|
+
isRowHeader: M,
|
|
57
|
+
headerRenderer: T,
|
|
57
58
|
textValue: i,
|
|
58
|
-
type:
|
|
59
|
-
...
|
|
59
|
+
type: I,
|
|
60
|
+
...S
|
|
60
61
|
} = t;
|
|
61
62
|
return {
|
|
62
|
-
...
|
|
63
|
-
children:
|
|
63
|
+
...S,
|
|
64
|
+
children: T ? T(i, t) : /* @__PURE__ */ e(O, {
|
|
64
65
|
as: "span",
|
|
65
66
|
children: i
|
|
66
67
|
}),
|
|
67
|
-
isRowHeader:
|
|
68
|
-
id:
|
|
68
|
+
isRowHeader: b === "name" || M,
|
|
69
|
+
id: b,
|
|
69
70
|
textValue: i,
|
|
70
|
-
allowsSorting:
|
|
71
|
+
allowsSorting: I !== "multiSelect" && I !== "enum"
|
|
71
72
|
};
|
|
72
73
|
});
|
|
73
|
-
a.push(...
|
|
74
|
+
a.push(...v), m && a.push({
|
|
74
75
|
id: "actions",
|
|
75
76
|
className: s.tableHeaderActions,
|
|
76
77
|
children: /* @__PURE__ */ e("div", {
|
|
77
78
|
className: s.tableHeaderActionsWrapper,
|
|
78
|
-
children: /* @__PURE__ */ e(
|
|
79
|
-
"aria-label":
|
|
79
|
+
children: /* @__PURE__ */ e(P, {
|
|
80
|
+
"aria-label": f(L.selectAll),
|
|
80
81
|
className: s.selectAllCheckbox,
|
|
81
|
-
isDisabled: l
|
|
82
|
+
isDisabled: l || c
|
|
82
83
|
})
|
|
83
84
|
}),
|
|
84
85
|
isRowHeader: !1,
|
|
85
86
|
hideHeader: !1,
|
|
86
87
|
allowsSorting: !1
|
|
87
88
|
});
|
|
88
|
-
const
|
|
89
|
+
const D = /* @__PURE__ */ e(U, {
|
|
89
90
|
columns: a,
|
|
90
|
-
children: (t) => /* @__PURE__ */ e(
|
|
91
|
+
children: (t) => /* @__PURE__ */ e(j, {
|
|
91
92
|
...t
|
|
92
93
|
})
|
|
93
|
-
}),
|
|
94
|
+
}), u = {
|
|
94
95
|
columnCount: a.length,
|
|
95
96
|
columns: o,
|
|
96
|
-
formatMessage:
|
|
97
|
+
formatMessage: f,
|
|
97
98
|
iconColumnVariant: n,
|
|
98
99
|
isLoading: l,
|
|
99
100
|
isSelectAllEnabled: m,
|
|
100
|
-
|
|
101
|
+
areSelectionCheckboxesDisabled: c,
|
|
102
|
+
itemActionMenuProps: w,
|
|
101
103
|
items: d,
|
|
102
|
-
onInlineEditChange:
|
|
103
|
-
tableHeader:
|
|
104
|
-
tableProps:
|
|
104
|
+
onInlineEditChange: y,
|
|
105
|
+
tableHeader: D,
|
|
106
|
+
tableProps: C,
|
|
105
107
|
zoomLevel: r
|
|
106
108
|
};
|
|
107
109
|
return x ? /* @__PURE__ */ e("div", {
|
|
108
|
-
ref:
|
|
110
|
+
ref: p,
|
|
109
111
|
className: s.infiniteScrollTableContainerFullHeight,
|
|
110
112
|
children: /* @__PURE__ */ e("div", {
|
|
111
113
|
style: {
|
|
112
114
|
position: "relative",
|
|
113
115
|
width: "100%",
|
|
114
|
-
height:
|
|
116
|
+
height: N() + V
|
|
115
117
|
},
|
|
116
|
-
children: /* @__PURE__ */ e(
|
|
117
|
-
...
|
|
118
|
+
children: /* @__PURE__ */ e(R, {
|
|
119
|
+
...u,
|
|
118
120
|
style: {
|
|
119
121
|
position: "absolute",
|
|
120
122
|
top: 0,
|
|
121
123
|
left: 0,
|
|
122
124
|
width: "100%",
|
|
123
|
-
transform: `translateY(${((
|
|
125
|
+
transform: `translateY(${((H = h[0]) == null ? void 0 : H.start) || 0}px)`,
|
|
124
126
|
tableLayout: "fixed"
|
|
125
127
|
},
|
|
126
|
-
virtualItems:
|
|
128
|
+
virtualItems: h
|
|
127
129
|
})
|
|
128
130
|
})
|
|
129
|
-
}) : /* @__PURE__ */ e(
|
|
130
|
-
...
|
|
131
|
+
}) : /* @__PURE__ */ e(R, {
|
|
132
|
+
...u
|
|
131
133
|
});
|
|
132
134
|
};
|
|
133
135
|
export {
|
|
134
|
-
|
|
136
|
+
ae as MetadataTable
|
|
135
137
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { TableBody as T, Row as
|
|
1
|
+
import { TableBody as T, Row as g, Cell as m, ActionCell as x, Text as u } from "@box/blueprint-web";
|
|
2
2
|
import { ItemTypeIcon as y } from "@box/item-icon";
|
|
3
|
-
import
|
|
3
|
+
import R from "clsx";
|
|
4
4
|
import $ from "lodash/get";
|
|
5
5
|
import c from "react";
|
|
6
6
|
import { I as f } from "../../../../../chunks/types.js";
|
|
7
|
-
import { THUMBNAIL_LIST_VIEW_HEIGHTS as
|
|
8
|
-
import { s as h, T as
|
|
9
|
-
import { jsx as r, jsxs as
|
|
10
|
-
import { InlineEditingCell as
|
|
11
|
-
import { ItemActionMenu as
|
|
12
|
-
import { GhostTableRow as
|
|
7
|
+
import { THUMBNAIL_LIST_VIEW_HEIGHTS as S } from "../../constants.js";
|
|
8
|
+
import { s as h, T as w } from "../../../../../chunks/index.js";
|
|
9
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
10
|
+
import { InlineEditingCell as B } from "./inline-editing-cell/inline-editing-cell.js";
|
|
11
|
+
import { ItemActionMenu as _ } from "../../item-action-menu/item-action-menu.js";
|
|
12
|
+
import { GhostTableRow as k } from "./ghost-table-row/ghost-table-row.js";
|
|
13
13
|
const E = (t, e, l) => {
|
|
14
14
|
const n = l ? e.split(".")[1] : e;
|
|
15
15
|
return $(t, n);
|
|
16
|
-
},
|
|
16
|
+
}, M = /* @__PURE__ */ c.memo(({
|
|
17
17
|
item: t,
|
|
18
18
|
column: e,
|
|
19
19
|
iconColumnVariant: l
|
|
@@ -22,22 +22,22 @@ const E = (t, e, l) => {
|
|
|
22
22
|
id: n,
|
|
23
23
|
isItemMetadata: s,
|
|
24
24
|
subtitle: i,
|
|
25
|
-
textValue:
|
|
26
|
-
} = e, a = `${
|
|
27
|
-
return /* @__PURE__ */ r(
|
|
28
|
-
children: /* @__PURE__ */
|
|
25
|
+
textValue: I
|
|
26
|
+
} = e, a = `${I}-${t.id}`;
|
|
27
|
+
return /* @__PURE__ */ r(m, {
|
|
28
|
+
children: /* @__PURE__ */ C("div", {
|
|
29
29
|
className: h.tableNameCell,
|
|
30
30
|
children: [/* @__PURE__ */ r(y, {
|
|
31
31
|
className: h.tableNameCellIconInline,
|
|
32
32
|
item: t
|
|
33
|
-
}), /* @__PURE__ */
|
|
34
|
-
className:
|
|
33
|
+
}), /* @__PURE__ */ C("div", {
|
|
34
|
+
className: R({
|
|
35
35
|
[h.tableNameCellSubtitle]: l === f.INLINE_SUBTITLE
|
|
36
36
|
}),
|
|
37
|
-
children: [/* @__PURE__ */ r(
|
|
37
|
+
children: [/* @__PURE__ */ r(u, {
|
|
38
38
|
as: "span",
|
|
39
39
|
children: E(t, n, s)
|
|
40
|
-
}), l === f.INLINE_SUBTITLE && /* @__PURE__ */ r(
|
|
40
|
+
}), l === f.INLINE_SUBTITLE && /* @__PURE__ */ r(u, {
|
|
41
41
|
as: "span",
|
|
42
42
|
color: "textOnLightSecondary",
|
|
43
43
|
children: i
|
|
@@ -45,24 +45,24 @@ const E = (t, e, l) => {
|
|
|
45
45
|
})]
|
|
46
46
|
})
|
|
47
47
|
}, a);
|
|
48
|
-
}),
|
|
48
|
+
}), U = /* @__PURE__ */ c.memo(({
|
|
49
49
|
item: t,
|
|
50
50
|
column: e
|
|
51
51
|
}) => {
|
|
52
52
|
var n;
|
|
53
53
|
const l = `${e.textValue}-${t.id}`;
|
|
54
|
-
return /* @__PURE__ */ r(
|
|
54
|
+
return /* @__PURE__ */ r(m, {
|
|
55
55
|
children: (n = e.cellRenderer) == null ? void 0 : n.call(e, t, e)
|
|
56
56
|
}, l);
|
|
57
|
-
}),
|
|
57
|
+
}), W = /* @__PURE__ */ c.memo(({
|
|
58
58
|
item: t,
|
|
59
59
|
column: e
|
|
60
60
|
}) => {
|
|
61
61
|
const l = `${e.textValue}-${t.id}`, n = $(t, e.id);
|
|
62
|
-
return n ? /* @__PURE__ */ r(
|
|
62
|
+
return n ? /* @__PURE__ */ r(m, {
|
|
63
63
|
children: n.join(" ")
|
|
64
|
-
}, l) : /* @__PURE__ */ r(
|
|
65
|
-
}),
|
|
64
|
+
}, l) : /* @__PURE__ */ r(m, {}, l);
|
|
65
|
+
}), j = /* @__PURE__ */ c.memo(({
|
|
66
66
|
item: t,
|
|
67
67
|
column: e
|
|
68
68
|
}) => {
|
|
@@ -71,13 +71,13 @@ const E = (t, e, l) => {
|
|
|
71
71
|
isItemMetadata: n,
|
|
72
72
|
textValue: s
|
|
73
73
|
} = e, i = `${s}-${t.id}`;
|
|
74
|
-
return /* @__PURE__ */ r(
|
|
75
|
-
children: /* @__PURE__ */ r(
|
|
74
|
+
return /* @__PURE__ */ r(m, {
|
|
75
|
+
children: /* @__PURE__ */ r(u, {
|
|
76
76
|
as: "span",
|
|
77
77
|
children: E(t, l, n)
|
|
78
78
|
})
|
|
79
79
|
}, i);
|
|
80
|
-
}),
|
|
80
|
+
}), D = /* @__PURE__ */ c.memo(({
|
|
81
81
|
item: t,
|
|
82
82
|
column: e,
|
|
83
83
|
iconColumnVariant: l,
|
|
@@ -86,73 +86,77 @@ const E = (t, e, l) => {
|
|
|
86
86
|
const {
|
|
87
87
|
cellRenderer: s,
|
|
88
88
|
id: i,
|
|
89
|
-
isInlineEditingEnabled:
|
|
89
|
+
isInlineEditingEnabled: I,
|
|
90
90
|
type: a
|
|
91
91
|
} = e;
|
|
92
|
-
return i === "item.name" && (l === f.INLINE || l === f.INLINE_SUBTITLE) ? /* @__PURE__ */ r(
|
|
92
|
+
return i === "item.name" && (l === f.INLINE || l === f.INLINE_SUBTITLE) ? /* @__PURE__ */ r(M, {
|
|
93
93
|
column: e,
|
|
94
94
|
iconColumnVariant: l,
|
|
95
95
|
item: t
|
|
96
|
-
}) : s ? /* @__PURE__ */ r(
|
|
96
|
+
}) : s ? /* @__PURE__ */ r(U, {
|
|
97
97
|
column: e,
|
|
98
98
|
item: t
|
|
99
|
-
}) :
|
|
99
|
+
}) : I && (a === "multiSelect" || a === "enum") ? /* @__PURE__ */ r(B, {
|
|
100
100
|
column: e,
|
|
101
101
|
item: t,
|
|
102
102
|
onInlineEditChange: n
|
|
103
|
-
}, `${e.id}-${t.id}`) : a === "multiSelect" ? /* @__PURE__ */ r(
|
|
103
|
+
}, `${e.id}-${t.id}`) : a === "multiSelect" ? /* @__PURE__ */ r(W, {
|
|
104
104
|
column: e,
|
|
105
105
|
item: t
|
|
106
|
-
}) : /* @__PURE__ */ r(
|
|
106
|
+
}) : /* @__PURE__ */ r(j, {
|
|
107
107
|
column: e,
|
|
108
108
|
item: t
|
|
109
109
|
});
|
|
110
|
-
}),
|
|
110
|
+
}), G = /* @__PURE__ */ c.memo(({
|
|
111
111
|
item: t,
|
|
112
112
|
zoomLevel: e
|
|
113
|
-
}) => /* @__PURE__ */ r(
|
|
113
|
+
}) => /* @__PURE__ */ r(m, {
|
|
114
114
|
style: {
|
|
115
|
-
height:
|
|
115
|
+
height: S[e]
|
|
116
116
|
},
|
|
117
117
|
children: /* @__PURE__ */ r(y, {
|
|
118
118
|
className: h.iconCell,
|
|
119
119
|
item: t
|
|
120
120
|
})
|
|
121
|
-
}, `item-type-icon-${t.id}`)),
|
|
121
|
+
}, `item-type-icon-${t.id}`)), H = /* @__PURE__ */ c.memo(({
|
|
122
122
|
item: t,
|
|
123
|
-
itemActionMenuProps: e
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
itemActionMenuProps: e,
|
|
124
|
+
isCheckboxDisabled: l
|
|
125
|
+
}) => /* @__PURE__ */ r(x, {
|
|
126
|
+
isCheckboxDisabled: l,
|
|
127
|
+
children: (n) => e ? /* @__PURE__ */ r(_, {
|
|
126
128
|
...e,
|
|
127
129
|
item: t,
|
|
128
|
-
onOpenChange:
|
|
130
|
+
onOpenChange: n
|
|
129
131
|
}) : null
|
|
130
|
-
})),
|
|
132
|
+
})), z = ({
|
|
131
133
|
columns: t,
|
|
132
134
|
iconColumnVariant: e,
|
|
133
135
|
isSelectAllEnabled: l,
|
|
134
136
|
items: n,
|
|
135
137
|
itemActionMenuProps: s,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
areSelectionCheckboxesDisabled: i,
|
|
139
|
+
virtualItems: I,
|
|
140
|
+
columnCount: a,
|
|
141
|
+
zoomLevel: N,
|
|
142
|
+
onInlineEditChange: L
|
|
140
143
|
}) => {
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
const o = (d) => /* @__PURE__ */ r(
|
|
144
|
-
columnLength:
|
|
144
|
+
const b = e === f.COLUMN;
|
|
145
|
+
if (I) {
|
|
146
|
+
const o = (d) => /* @__PURE__ */ r(k, {
|
|
147
|
+
columnLength: a || 0,
|
|
145
148
|
rowKey: `ghost-${d}`
|
|
146
|
-
}), p = (d) => /* @__PURE__ */ r(
|
|
149
|
+
}), p = (d) => /* @__PURE__ */ r(w, {
|
|
150
|
+
areSelectionCheckboxesDisabled: i,
|
|
147
151
|
columns: t,
|
|
148
152
|
iconColumnVariant: e,
|
|
149
153
|
isSelectAllEnabled: l,
|
|
150
154
|
item: d,
|
|
151
155
|
itemActionMenuProps: s,
|
|
152
|
-
zoomLevel:
|
|
156
|
+
zoomLevel: N
|
|
153
157
|
});
|
|
154
158
|
return /* @__PURE__ */ r(T, {
|
|
155
|
-
items:
|
|
159
|
+
items: I,
|
|
156
160
|
children: ({
|
|
157
161
|
index: d
|
|
158
162
|
}) => d >= n.length ? o(d) : p(n[d])
|
|
@@ -163,18 +167,19 @@ const E = (t, e, l) => {
|
|
|
163
167
|
key: o.id,
|
|
164
168
|
...o
|
|
165
169
|
})),
|
|
166
|
-
children: (o) => /* @__PURE__ */
|
|
170
|
+
children: (o) => /* @__PURE__ */ C(g, {
|
|
167
171
|
className: h.tableRow,
|
|
168
172
|
id: o.id,
|
|
169
|
-
children: [
|
|
173
|
+
children: [b && /* @__PURE__ */ r(G, {
|
|
170
174
|
item: o,
|
|
171
|
-
zoomLevel:
|
|
172
|
-
}), t.map((p) => /* @__PURE__ */ r(
|
|
175
|
+
zoomLevel: N
|
|
176
|
+
}), t.map((p) => /* @__PURE__ */ r(D, {
|
|
173
177
|
column: p,
|
|
174
178
|
iconColumnVariant: e,
|
|
175
179
|
item: o,
|
|
176
|
-
onInlineEditChange:
|
|
177
|
-
}, `${p.textValue}-${o.id}`)), l && /* @__PURE__ */ r(
|
|
180
|
+
onInlineEditChange: L
|
|
181
|
+
}, `${p.textValue}-${o.id}`)), l && /* @__PURE__ */ r(H, {
|
|
182
|
+
isCheckboxDisabled: i,
|
|
178
183
|
item: o,
|
|
179
184
|
itemActionMenuProps: s
|
|
180
185
|
})]
|
|
@@ -182,5 +187,5 @@ const E = (t, e, l) => {
|
|
|
182
187
|
});
|
|
183
188
|
};
|
|
184
189
|
export {
|
|
185
|
-
|
|
190
|
+
z as default
|
|
186
191
|
};
|
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import { Table as
|
|
2
|
-
import { I as
|
|
3
|
-
import { GhostTableBody as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { jsxs as
|
|
7
|
-
const
|
|
1
|
+
import { Table as x } from "@box/blueprint-web";
|
|
2
|
+
import { I as B } from "../../../../chunks/types.js";
|
|
3
|
+
import { GhostTableBody as d } from "./table-body/ghost-table-body.js";
|
|
4
|
+
import j from "./table-body/table-body-with-data.js";
|
|
5
|
+
import y from "./messages.js";
|
|
6
|
+
import { jsxs as G, jsx as i } from "react/jsx-runtime";
|
|
7
|
+
const R = ({
|
|
8
8
|
tableHeader: s,
|
|
9
9
|
columns: t,
|
|
10
10
|
iconColumnVariant: e,
|
|
11
11
|
isSelectAllEnabled: r,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
areSelectionCheckboxesDisabled: c,
|
|
13
|
+
itemActionMenuProps: f,
|
|
14
|
+
items: h,
|
|
14
15
|
isLoading: m,
|
|
15
|
-
formatMessage:
|
|
16
|
-
tableProps:
|
|
16
|
+
formatMessage: C,
|
|
17
|
+
tableProps: g,
|
|
17
18
|
virtualItems: o,
|
|
18
|
-
style:
|
|
19
|
-
columnCount:
|
|
20
|
-
zoomLevel:
|
|
21
|
-
onInlineEditChange:
|
|
19
|
+
style: p,
|
|
20
|
+
columnCount: u,
|
|
21
|
+
zoomLevel: a,
|
|
22
|
+
onInlineEditChange: b
|
|
22
23
|
}) => {
|
|
23
|
-
const l =
|
|
24
|
+
const l = u || (() => {
|
|
24
25
|
let n = t.length;
|
|
25
|
-
return e ===
|
|
26
|
-
})(),
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
"aria-label":
|
|
26
|
+
return e === B.COLUMN && (n += 1), r && (n += 1), n;
|
|
27
|
+
})(), T = m && !(o != null && o.length);
|
|
28
|
+
return /* @__PURE__ */ G(x, {
|
|
29
|
+
"aria-label": C(y.listView),
|
|
29
30
|
selectionBehavior: "toggle",
|
|
30
|
-
style:
|
|
31
|
-
...
|
|
32
|
-
children: [s,
|
|
31
|
+
style: p,
|
|
32
|
+
...g,
|
|
33
|
+
children: [s, T ? /* @__PURE__ */ i(d, {
|
|
33
34
|
columnLength: l
|
|
34
|
-
}) : /* @__PURE__ */ i(
|
|
35
|
+
}) : /* @__PURE__ */ i(j, {
|
|
36
|
+
areSelectionCheckboxesDisabled: c,
|
|
35
37
|
columnCount: l,
|
|
36
38
|
columns: t,
|
|
37
39
|
iconColumnVariant: e,
|
|
38
40
|
isLoading: m,
|
|
39
41
|
isSelectAllEnabled: r,
|
|
40
|
-
itemActionMenuProps:
|
|
41
|
-
items:
|
|
42
|
-
onInlineEditChange:
|
|
42
|
+
itemActionMenuProps: f,
|
|
43
|
+
items: h,
|
|
44
|
+
onInlineEditChange: b,
|
|
43
45
|
virtualItems: o,
|
|
44
|
-
zoomLevel:
|
|
46
|
+
zoomLevel: a
|
|
45
47
|
})]
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
R as TableRenderer
|
|
50
52
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { ActionBar as
|
|
1
|
+
import { I as A, V as t } from "../../chunks/types.js";
|
|
2
|
+
import { ActionBar as Z } from "./components/action-bar/action-bar.js";
|
|
3
3
|
import "./components/filter-row/filter-row.js";
|
|
4
4
|
import "./components/filter-row/form-filter-chip.js";
|
|
5
5
|
import "./components/filter-row/metadata-filter-chip.js";
|
|
@@ -8,8 +8,8 @@ import "./components/filter-row/predefinedFilters/index.js";
|
|
|
8
8
|
import "./components/filter-sidepanel/filter.js";
|
|
9
9
|
import "./components/filter-sidepanel/filter-side-panel.js";
|
|
10
10
|
import "./components/item-action-menu/item-action-menu.js";
|
|
11
|
-
import { MetadataGrid as
|
|
12
|
-
import { MetadataTable as
|
|
11
|
+
import { MetadataGrid as k } from "./components/metadata-grid/metadata-grid.js";
|
|
12
|
+
import { MetadataTable as x } from "./components/metadata-table/metadata-table.js";
|
|
13
13
|
import "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
14
14
|
import "./components/metadata-table/table-renderer.js";
|
|
15
15
|
import "./components/metadata-value/metadata-file-chip.js";
|
|
@@ -17,98 +17,101 @@ import "./components/metadata-value/metadata-file-field.js";
|
|
|
17
17
|
import "./components/metadata-value/metadata-location-field.js";
|
|
18
18
|
import "./components/metadata-value/metadata-radio-field.js";
|
|
19
19
|
import "./components/metadata-value/metadata-search-field.js";
|
|
20
|
-
import { Pagination as
|
|
20
|
+
import { Pagination as z } from "./components/pagination/pagination.js";
|
|
21
21
|
import "./components/pagination/marker-based-pagination.js";
|
|
22
22
|
import "./components/pagination/offset-based-pagination.js";
|
|
23
23
|
import "./components/pagination/pagination-controls.js";
|
|
24
24
|
import "./components/sort-dropdown/sort-dropdown.js";
|
|
25
|
-
import { SwitchCase as
|
|
26
|
-
import { TooltipProvider as
|
|
27
|
-
import { useState as l, useRef as
|
|
28
|
-
import { jsx as o, jsxs as
|
|
29
|
-
import { ErrorState as
|
|
30
|
-
import
|
|
31
|
-
import '../../styles/metadata-view.css';const
|
|
32
|
-
container:
|
|
33
|
-
contentContainer:
|
|
25
|
+
import { SwitchCase as F, Case as s } from "./components/switch-case/switch-case.js";
|
|
26
|
+
import { TooltipProvider as U } from "@box/blueprint-web";
|
|
27
|
+
import { useState as l, useRef as q, useCallback as H } from "react";
|
|
28
|
+
import { jsx as o, jsxs as w, Fragment as J } from "react/jsx-runtime";
|
|
29
|
+
import { ErrorState as K } from "./components/error-state/error-state.js";
|
|
30
|
+
import O from "./components/empty-state/empty-state.js";
|
|
31
|
+
import '../../styles/metadata-view.css';const Q = "_container_1o9go_5", W = "_contentContainer_1o9go_15", T = {
|
|
32
|
+
container: Q,
|
|
33
|
+
contentContainer: W
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function Lo({
|
|
36
36
|
actionBarProps: m,
|
|
37
37
|
columns: d,
|
|
38
|
-
tableProps:
|
|
39
|
-
hasError:
|
|
40
|
-
onRefresh:
|
|
41
|
-
initialViewMode:
|
|
38
|
+
tableProps: n,
|
|
39
|
+
hasError: V,
|
|
40
|
+
onRefresh: L,
|
|
41
|
+
initialViewMode: _ = t.LIST,
|
|
42
42
|
paginationProps: C,
|
|
43
43
|
isLoading: f,
|
|
44
44
|
isSelectionEnabled: c,
|
|
45
|
+
areSelectionCheckboxesDisabled: h,
|
|
45
46
|
...a
|
|
46
47
|
}) {
|
|
47
|
-
const [
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
iconColumnVariant:
|
|
51
|
-
} =
|
|
52
|
-
column:
|
|
53
|
-
direction:
|
|
48
|
+
const [r, u] = l(_), [M, S] = l(void 0), [p, y] = l(0), g = q(null), D = () => {
|
|
49
|
+
r === t.LIST ? u(t.GRID) : u(t.LIST);
|
|
50
|
+
}, R = !f && a.items.length === 0, E = m && m.sortDropdownProps && d.filter((e) => e.type !== "multiSelect" && e.type !== "enum"), {
|
|
51
|
+
iconColumnVariant: I
|
|
52
|
+
} = n || {}, G = I && I === A.COLUMN, i = n == null ? void 0 : n.onSortChange, N = H(({
|
|
53
|
+
column: e,
|
|
54
|
+
direction: v
|
|
54
55
|
}) => {
|
|
55
|
-
|
|
56
|
-
column:
|
|
57
|
-
direction:
|
|
58
|
-
}),
|
|
59
|
-
column:
|
|
60
|
-
direction:
|
|
56
|
+
S({
|
|
57
|
+
column: e,
|
|
58
|
+
direction: v
|
|
59
|
+
}), i == null || i({
|
|
60
|
+
column: e,
|
|
61
|
+
direction: v
|
|
61
62
|
});
|
|
62
|
-
}, [
|
|
63
|
-
...
|
|
64
|
-
sortDescriptor:
|
|
65
|
-
onSortChange:
|
|
63
|
+
}, [i]), j = {
|
|
64
|
+
...n,
|
|
65
|
+
sortDescriptor: M,
|
|
66
|
+
onSortChange: N
|
|
66
67
|
};
|
|
67
|
-
return /* @__PURE__ */ o(
|
|
68
|
+
return /* @__PURE__ */ o(U, {
|
|
68
69
|
children: /* @__PURE__ */ o("div", {
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
71
|
-
children:
|
|
72
|
-
onRefresh:
|
|
73
|
-
}) : /* @__PURE__ */
|
|
74
|
-
children: [/* @__PURE__ */ o(
|
|
70
|
+
ref: g,
|
|
71
|
+
className: T.container,
|
|
72
|
+
children: V ? /* @__PURE__ */ o(K, {
|
|
73
|
+
onRefresh: L
|
|
74
|
+
}) : /* @__PURE__ */ w(J, {
|
|
75
|
+
children: [/* @__PURE__ */ o(Z, {
|
|
75
76
|
...m,
|
|
76
|
-
containerRef:
|
|
77
|
-
isIconColumnEnabled:
|
|
78
|
-
onSortDescriptorChange:
|
|
79
|
-
onViewModeClick:
|
|
80
|
-
onZoomLevelChange:
|
|
81
|
-
sortableColumns:
|
|
82
|
-
sortDescriptor:
|
|
83
|
-
viewMode:
|
|
77
|
+
containerRef: g,
|
|
78
|
+
isIconColumnEnabled: G,
|
|
79
|
+
onSortDescriptorChange: S,
|
|
80
|
+
onViewModeClick: D,
|
|
81
|
+
onZoomLevelChange: y,
|
|
82
|
+
sortableColumns: E,
|
|
83
|
+
sortDescriptor: M,
|
|
84
|
+
viewMode: r,
|
|
84
85
|
zoomLevel: p
|
|
85
86
|
}), /* @__PURE__ */ o("div", {
|
|
86
|
-
className:
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
className: T.contentContainer,
|
|
88
|
+
children: /* @__PURE__ */ w(F, {
|
|
88
89
|
children: [/* @__PURE__ */ o(s, {
|
|
89
|
-
condition:
|
|
90
|
-
children: /* @__PURE__ */ o(
|
|
90
|
+
condition: R,
|
|
91
|
+
children: /* @__PURE__ */ o(O, {})
|
|
91
92
|
}), /* @__PURE__ */ o(s, {
|
|
92
|
-
condition:
|
|
93
|
-
children: /* @__PURE__ */ o(
|
|
93
|
+
condition: r === t.LIST,
|
|
94
|
+
children: /* @__PURE__ */ o(x, {
|
|
95
|
+
areSelectionCheckboxesDisabled: h,
|
|
94
96
|
columns: d,
|
|
95
97
|
isLoading: f,
|
|
96
98
|
isSelectAllEnabled: c,
|
|
97
99
|
selectionMode: c ? "multiple" : "none",
|
|
98
100
|
zoomLevel: p,
|
|
99
101
|
...a,
|
|
100
|
-
...
|
|
102
|
+
...j
|
|
101
103
|
})
|
|
102
104
|
}), /* @__PURE__ */ o(s, {
|
|
103
|
-
condition:
|
|
104
|
-
children: /* @__PURE__ */ o(
|
|
105
|
+
condition: r === t.GRID,
|
|
106
|
+
children: /* @__PURE__ */ o(k, {
|
|
107
|
+
areSelectionCheckboxesDisabled: h,
|
|
105
108
|
selectionMode: c ? "multiple" : "none",
|
|
106
109
|
zoomLevel: p,
|
|
107
110
|
...a
|
|
108
111
|
})
|
|
109
112
|
})]
|
|
110
113
|
})
|
|
111
|
-
}), C && /* @__PURE__ */ o(
|
|
114
|
+
}), C && /* @__PURE__ */ o(z, {
|
|
112
115
|
...C
|
|
113
116
|
})]
|
|
114
117
|
})
|
|
@@ -116,6 +119,6 @@ function Vo({
|
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
121
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
Lo as MetadataView,
|
|
123
|
+
Lo as default
|
|
121
124
|
};
|
|
@@ -2,5 +2,6 @@ import { GridListProps } from '@box/blueprint-web';
|
|
|
2
2
|
import { MetadataProps } from '../../types';
|
|
3
3
|
export interface MetadataGridProps extends MetadataProps, Omit<GridListProps, 'items'> {
|
|
4
4
|
zoomLevel?: number;
|
|
5
|
+
areSelectionCheckboxesDisabled?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const MetadataGrid: ({ items, itemActionMenuProps, zoomLevel, ...rest }: MetadataGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const MetadataGrid: ({ items, itemActionMenuProps, zoomLevel, areSelectionCheckboxesDisabled, ...rest }: MetadataGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,10 +5,11 @@ export interface MetadataTableProps extends TableProps, MetadataProps, Pick<Inli
|
|
|
5
5
|
columns: Column[];
|
|
6
6
|
iconColumnVariant?: IconColumnVariant;
|
|
7
7
|
isSelectAllEnabled?: boolean;
|
|
8
|
+
areSelectionCheckboxesDisabled?: boolean;
|
|
8
9
|
isInfiniteScrollEnabled?: boolean;
|
|
9
10
|
hasNextPage?: boolean;
|
|
10
11
|
onGetNextPage?: () => void;
|
|
11
12
|
placeholderRowsCount?: number;
|
|
12
13
|
zoomLevel?: number;
|
|
13
14
|
}
|
|
14
|
-
export declare const MetadataTable: ({ columns, isLoading, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, isInfiniteScrollEnabled, hasNextPage, onInlineEditChange, onGetNextPage, placeholderRowsCount, zoomLevel, ...tableProps }: MetadataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const MetadataTable: ({ columns, isLoading, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, isInfiniteScrollEnabled, areSelectionCheckboxesDisabled, hasNextPage, onInlineEditChange, onGetNextPage, placeholderRowsCount, zoomLevel, ...tableProps }: MetadataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,5 +14,5 @@ type CellProps = {
|
|
|
14
14
|
iconColumnVariant: IconColumnVariant;
|
|
15
15
|
};
|
|
16
16
|
export type DataCellProps = CellProps & Pick<InlineEditingCellProps, 'onInlineEditChange'>;
|
|
17
|
-
declare const TableBodyWithData: ({ columns, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, virtualItems, columnCount, zoomLevel, onInlineEditChange, }: TableBodyWithDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const TableBodyWithData: ({ columns, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, areSelectionCheckboxesDisabled, virtualItems, columnCount, zoomLevel, onInlineEditChange, }: TableBodyWithDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export default TableBodyWithData;
|
|
@@ -6,6 +6,7 @@ export interface TableRowProps {
|
|
|
6
6
|
iconColumnVariant: MetadataTableProps['iconColumnVariant'];
|
|
7
7
|
isSelectAllEnabled: MetadataTableProps['isSelectAllEnabled'];
|
|
8
8
|
itemActionMenuProps: MetadataTableProps['itemActionMenuProps'];
|
|
9
|
+
areSelectionCheckboxesDisabled?: MetadataTableProps['areSelectionCheckboxesDisabled'];
|
|
9
10
|
zoomLevel?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare const TableRow: ({ item, columns, iconColumnVariant, isSelectAllEnabled, itemActionMenuProps, zoomLevel, }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const TableRow: ({ item, columns, iconColumnVariant, isSelectAllEnabled, itemActionMenuProps, areSelectionCheckboxesDisabled, zoomLevel, }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ export interface TableRendererProps extends Pick<InlineEditingCellProps, 'onInli
|
|
|
8
8
|
columns: Column[];
|
|
9
9
|
iconColumnVariant?: IconColumnVariant;
|
|
10
10
|
isSelectAllEnabled?: boolean;
|
|
11
|
+
areSelectionCheckboxesDisabled?: boolean;
|
|
11
12
|
itemActionMenuProps?: MetadataProps['itemActionMenuProps'];
|
|
12
13
|
items: MetadataProps['items'];
|
|
13
14
|
isLoading?: boolean;
|
|
@@ -18,4 +19,4 @@ export interface TableRendererProps extends Pick<InlineEditingCellProps, 'onInli
|
|
|
18
19
|
columnCount?: number;
|
|
19
20
|
zoomLevel?: number;
|
|
20
21
|
}
|
|
21
|
-
export declare const TableRenderer: ({ tableHeader, columns, iconColumnVariant, isSelectAllEnabled, itemActionMenuProps, items, isLoading, formatMessage, tableProps, virtualItems, style, columnCount: passedColumnCount, zoomLevel, onInlineEditChange, }: TableRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const TableRenderer: ({ tableHeader, columns, iconColumnVariant, isSelectAllEnabled, areSelectionCheckboxesDisabled, itemActionMenuProps, items, isLoading, formatMessage, tableProps, virtualItems, style, columnCount: passedColumnCount, zoomLevel, onInlineEditChange, }: TableRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,8 +10,9 @@ export interface MetadataViewProps extends MetadataProps {
|
|
|
10
10
|
onSelectionChange?: (keys: Selection) => void;
|
|
11
11
|
selectedKeys?: 'all' | Iterable<string | number>;
|
|
12
12
|
isSelectionEnabled?: boolean;
|
|
13
|
+
areSelectionCheckboxesDisabled?: boolean;
|
|
13
14
|
tableProps?: Omit<MetadataTableProps, 'columns' | 'isSelectAllEnabled' | 'items' | 'itemActionMenuProps' | 'onSelectionChange' | 'selectedKeys'>;
|
|
14
15
|
paginationProps?: PaginationProps;
|
|
15
16
|
}
|
|
16
|
-
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, paginationProps, isLoading, isSelectionEnabled, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, paginationProps, isLoading, isSelectionEnabled, areSelectionCheckboxesDisabled, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default MetadataView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^12.76.2",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"react-intl": "^6.4.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@box/blueprint-web": "^12.
|
|
21
|
+
"@box/blueprint-web": "^12.80.0",
|
|
22
22
|
"@box/blueprint-web-assets": "^4.71.0",
|
|
23
|
-
"@box/box-item-type-selector": "^0.76.
|
|
23
|
+
"@box/box-item-type-selector": "^0.76.3",
|
|
24
24
|
"@box/eslint-plugin-blueprint": "1.0.5",
|
|
25
|
-
"@box/item-icon": "^0.30.
|
|
26
|
-
"@box/metadata-filter": "^1.
|
|
25
|
+
"@box/item-icon": "^0.30.3",
|
|
26
|
+
"@box/metadata-filter": "^1.35.1",
|
|
27
27
|
"@box/storybook-utils": "0.14.7",
|
|
28
28
|
"@box/types": "0.2.1",
|
|
29
29
|
"@tanstack/react-virtual": "^3.10.8",
|