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