@box/metadata-view 1.54.9 → 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.
- package/dist/chunks/action-bar.js +48 -0
- package/dist/chunks/empty-state.js +24 -0
- package/dist/chunks/error-state.js +23 -0
- package/dist/chunks/filter-row.module.js +6 -8
- package/dist/chunks/filter-side-panel.js +65 -0
- package/dist/chunks/header.js +56 -0
- package/dist/chunks/inline-editing-cell.js +34 -0
- package/dist/chunks/item-action-menu.js +86 -0
- package/dist/chunks/metadata-grid.js +44 -0
- package/dist/chunks/metadata-location-field.js +35 -0
- package/dist/chunks/metadata-view.js +102 -0
- package/dist/chunks/pagination-controls.js +40 -0
- package/dist/chunks/table-row.js +72 -0
- package/dist/chunks/types.js +6 -11
- package/dist/chunks/types2.js +4 -0
- package/dist/chunks/zoom-button.js +20 -0
- package/dist/esm/index.js +29 -59
- package/dist/esm/lib/components/action-bar/action-bar.js +2 -62
- package/dist/esm/lib/components/action-bar/index.js +2 -4
- package/dist/esm/lib/components/action-bar/messages.js +22 -24
- package/dist/esm/lib/components/action-bar/zoom-button.js +2 -30
- package/dist/esm/lib/components/constants.js +14 -6
- package/dist/esm/lib/components/empty-state/empty-state.js +2 -30
- package/dist/esm/lib/components/empty-state/index.js +2 -4
- package/dist/esm/lib/components/empty-state/messages.js +10 -12
- package/dist/esm/lib/components/error-state/error-state.js +2 -31
- package/dist/esm/lib/components/error-state/index.js +2 -4
- package/dist/esm/lib/components/error-state/messages.js +10 -12
- package/dist/esm/lib/components/filter-row/advanced-field-content.js +30 -52
- package/dist/esm/lib/components/filter-row/advanced-filter-context.js +3 -6
- package/dist/esm/lib/components/filter-row/all-filters-chip.js +31 -49
- package/dist/esm/lib/components/filter-row/filter-row.js +35 -59
- package/dist/esm/lib/components/filter-row/form-filter-chip.js +84 -113
- package/dist/esm/lib/components/filter-row/index.js +6 -12
- package/dist/esm/lib/components/filter-row/initial-field-values.js +31 -51
- package/dist/esm/lib/components/filter-row/is-blank-or-not-blank-filter.js +2 -4
- package/dist/esm/lib/components/filter-row/is-filter-selected.js +37 -58
- package/dist/esm/lib/components/filter-row/messages.js +38 -40
- package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +74 -103
- package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +2 -6
- package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js +14 -21
- package/dist/esm/lib/components/filter-row/predefinedFilters/use-predefined-filter.js +58 -71
- package/dist/esm/lib/components/filter-row/select-filter-chip.js +41 -58
- package/dist/esm/lib/components/filter-row/use-form-filter-chip.js +36 -40
- package/dist/esm/lib/components/filter-sidepanel/filter-side-panel.js +2 -82
- package/dist/esm/lib/components/filter-sidepanel/filter.js +95 -140
- package/dist/esm/lib/components/filter-sidepanel/index.js +3 -6
- package/dist/esm/lib/components/filter-sidepanel/messages.js +18 -20
- package/dist/esm/lib/components/header/header.js +2 -82
- package/dist/esm/lib/components/header/index.js +2 -4
- package/dist/esm/lib/components/header/messages.js +14 -16
- package/dist/esm/lib/components/index.js +26 -53
- package/dist/esm/lib/components/item-action-menu/identifier.js +4 -7
- package/dist/esm/lib/components/item-action-menu/index.js +2 -4
- package/dist/esm/lib/components/item-action-menu/item-action-menu.js +2 -127
- package/dist/esm/lib/components/item-action-menu/messages.js +5 -9
- package/dist/esm/lib/components/metadata-grid/index.js +2 -4
- package/dist/esm/lib/components/metadata-grid/messages.js +5 -9
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +2 -62
- package/dist/esm/lib/components/metadata-table/actionColumn.js +3 -5
- package/dist/esm/lib/components/metadata-table/hooks/useInfiniteScrollTableItems.js +24 -29
- package/dist/esm/lib/components/metadata-table/index.js +4 -8
- package/dist/esm/lib/components/metadata-table/messages.js +14 -16
- package/dist/esm/lib/components/metadata-table/metadata-table.js +89 -127
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-body.js +10 -19
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/ghost-table-row.js +8 -19
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +2 -56
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +135 -209
- package/dist/esm/lib/components/metadata-table/table-body/table-row/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/table-row/table-row.js +2 -12
- package/dist/esm/lib/components/metadata-table/table-renderer.js +34 -55
- package/dist/esm/lib/components/metadata-value/index.js +6 -12
- package/dist/esm/lib/components/metadata-value/messages.js +15 -17
- package/dist/esm/lib/components/metadata-value/metadata-checkbox-field.js +24 -34
- package/dist/esm/lib/components/metadata-value/metadata-file-chip.js +14 -22
- package/dist/esm/lib/components/metadata-value/metadata-file-field.js +12 -19
- package/dist/esm/lib/components/metadata-value/metadata-location-field.js +2 -48
- package/dist/esm/lib/components/metadata-value/metadata-radio-field.js +26 -37
- package/dist/esm/lib/components/metadata-value/metadata-search-field.js +19 -30
- package/dist/esm/lib/components/pagination/index.js +4 -9
- package/dist/esm/lib/components/pagination/marker-based-pagination.js +12 -19
- package/dist/esm/lib/components/pagination/messages.js +19 -21
- package/dist/esm/lib/components/pagination/offset-based-pagination.js +22 -31
- package/dist/esm/lib/components/pagination/pagination-controls.js +2 -53
- package/dist/esm/lib/components/pagination/pagination.js +20 -35
- package/dist/esm/lib/components/pagination/utils.js +4 -6
- package/dist/esm/lib/components/sort-dropdown/index.js +2 -4
- package/dist/esm/lib/components/sort-dropdown/sort-dropdown.js +37 -56
- package/dist/esm/lib/components/switch-case/index.js +2 -5
- package/dist/esm/lib/components/switch-case/switch-case.js +4 -12
- package/dist/esm/lib/hooks/use-header.js +41 -37
- package/dist/esm/lib/index.js +28 -59
- package/dist/esm/lib/metadata-view.js +2 -151
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/empty-state.css +1 -1
- package/dist/styles/filter-row.css +1 -1
- package/dist/styles/header.css +1 -1
- package/dist/styles/inline-editing-cell.css +1 -1
- package/dist/styles/item-action-menu.css +1 -1
- package/dist/styles/metadata-grid.css +1 -1
- package/dist/styles/metadata-view.css +1 -1
- package/dist/styles/pagination-controls.css +1 -1
- package/dist/styles/table-row.css +1 -0
- package/dist/styles/zoom-button.css +1 -1
- package/package.json +14 -14
- package/dist/chunks/index.js +0 -105
- package/dist/styles/index.css +0 -1
|
@@ -1,210 +1,136 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
columnCount: l,
|
|
136
|
-
columns: n,
|
|
137
|
-
iconColumnVariant: r,
|
|
138
|
-
items: s,
|
|
139
|
-
itemActionMenuProps: d,
|
|
140
|
-
onInlineEditChange: f,
|
|
141
|
-
onTableRowClick: a,
|
|
142
|
-
shouldRenderActionColumn: u,
|
|
143
|
-
virtualItems: h,
|
|
144
|
-
totalVirtualSize: w,
|
|
145
|
-
zoomLevel: $
|
|
146
|
-
}) => {
|
|
147
|
-
const M = r === p.COLUMN;
|
|
148
|
-
if (h) {
|
|
149
|
-
const o = (i) => /* @__PURE__ */ t(k, {
|
|
150
|
-
columnLength: l || 0,
|
|
151
|
-
rowKey: `ghost-${i}`
|
|
152
|
-
}), N = (i) => /* @__PURE__ */ t(U, {
|
|
153
|
-
areSelectionCheckboxesDisabled: e,
|
|
154
|
-
columns: n,
|
|
155
|
-
iconColumnVariant: r,
|
|
156
|
-
item: i,
|
|
157
|
-
itemActionMenuProps: d,
|
|
158
|
-
onTableRowClick: a,
|
|
159
|
-
shouldRenderActionColumn: u,
|
|
160
|
-
zoomLevel: $
|
|
161
|
-
}), O = () => h[0]?.start || 0, R = () => {
|
|
162
|
-
const V = h[h.length - 1]?.end || 0;
|
|
163
|
-
return Math.max((w || 0) - V, 0);
|
|
164
|
-
}, b = O(), g = R();
|
|
165
|
-
return /* @__PURE__ */ T(x, {
|
|
166
|
-
children: [!!b && /* @__PURE__ */ t(C, {
|
|
167
|
-
isDisabled: !0,
|
|
168
|
-
style: {
|
|
169
|
-
height: `${b}px`
|
|
170
|
-
}
|
|
171
|
-
}), h.map(({
|
|
172
|
-
index: i
|
|
173
|
-
}) => i >= s.length ? o(i) : N(s[i])), !!g && /* @__PURE__ */ t(C, {
|
|
174
|
-
isDisabled: !0,
|
|
175
|
-
style: {
|
|
176
|
-
height: `${g}px`
|
|
177
|
-
}
|
|
178
|
-
})]
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
return /* @__PURE__ */ t(x, {
|
|
182
|
-
items: s.map((o) => ({
|
|
183
|
-
key: o.id,
|
|
184
|
-
...o
|
|
185
|
-
})),
|
|
186
|
-
children: (o) => /* @__PURE__ */ T(C, {
|
|
187
|
-
className: L(c.tableRow, {
|
|
188
|
-
[c.isClickable]: a
|
|
189
|
-
}),
|
|
190
|
-
id: o.id,
|
|
191
|
-
onAction: () => a?.(o),
|
|
192
|
-
children: [M && /* @__PURE__ */ t(q, {
|
|
193
|
-
item: o,
|
|
194
|
-
zoomLevel: $
|
|
195
|
-
}), n.map((N) => /* @__PURE__ */ t(K, {
|
|
196
|
-
column: N,
|
|
197
|
-
iconColumnVariant: r,
|
|
198
|
-
item: o,
|
|
199
|
-
onInlineEditChange: f
|
|
200
|
-
}, `${N.textValue}-${o.id}`)), u && /* @__PURE__ */ t(J, {
|
|
201
|
-
isCheckboxDisabled: e,
|
|
202
|
-
item: o,
|
|
203
|
-
itemActionMenuProps: d
|
|
204
|
-
})]
|
|
205
|
-
}, o.id)
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
export {
|
|
209
|
-
oe as default
|
|
1
|
+
import { t as e } from "../../../../../chunks/types.js";
|
|
2
|
+
import { t } from "../../../../../chunks/item-action-menu.js";
|
|
3
|
+
import { THUMBNAIL_LIST_VIEW_HEIGHTS as n } from "../../constants.js";
|
|
4
|
+
import { GhostTableRow as r } from "./ghost-table-row/ghost-table-row.js";
|
|
5
|
+
import { t as i } from "../../../../../chunks/inline-editing-cell.js";
|
|
6
|
+
import { n as a, t as o } from "../../../../../chunks/table-row.js";
|
|
7
|
+
import { ActionCell as s, Cell as c, Row as l, TableBody as u, Text as d } from "@box/blueprint-web";
|
|
8
|
+
import f from "react";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import { ItemTypeIcon as h } from "@box/item-icon";
|
|
11
|
+
import g from "clsx";
|
|
12
|
+
import _ from "lodash/get";
|
|
13
|
+
var v = (e, t, n) => _(e, n ? t.split(".")[1] : t), y = /* @__PURE__ */ f.memo(({ column: t, iconColumnVariant: n, item: r }) => {
|
|
14
|
+
let { id: i, isItemMetadata: o, subtitle: s, textValue: l } = t, u = `${l}-${r.id}`;
|
|
15
|
+
return /* @__PURE__ */ p(c, { children: /* @__PURE__ */ m("div", {
|
|
16
|
+
className: a.tableNameCell,
|
|
17
|
+
children: [/* @__PURE__ */ p(h, {
|
|
18
|
+
className: a.tableNameCellIconInline,
|
|
19
|
+
item: r
|
|
20
|
+
}), /* @__PURE__ */ m("div", {
|
|
21
|
+
className: g(a.tableNameCellTitle, { [a.hasSubtitle]: n === e.INLINE_SUBTITLE }),
|
|
22
|
+
children: [/* @__PURE__ */ p(d, {
|
|
23
|
+
as: "span",
|
|
24
|
+
className: a.tableNameCellText,
|
|
25
|
+
children: v(r, i, o)
|
|
26
|
+
}), n === e.INLINE_SUBTITLE && /* @__PURE__ */ p(d, {
|
|
27
|
+
as: "span",
|
|
28
|
+
className: a.tableNameCellText,
|
|
29
|
+
color: "textOnLightSecondary",
|
|
30
|
+
children: s
|
|
31
|
+
})]
|
|
32
|
+
})]
|
|
33
|
+
}) }, u);
|
|
34
|
+
}), b = /* @__PURE__ */ f.memo(({ column: e, item: t }) => {
|
|
35
|
+
let n = `${e.textValue}-${t.id}`;
|
|
36
|
+
return /* @__PURE__ */ p(c, { children: e.cellRenderer?.(t, e) }, n);
|
|
37
|
+
}), x = /* @__PURE__ */ f.memo(({ column: e, item: t }) => {
|
|
38
|
+
let n = `${e.textValue}-${t.id}`, r = _(t, e.id);
|
|
39
|
+
return r ? /* @__PURE__ */ p(c, { children: r.join(" ") }, n) : /* @__PURE__ */ p(c, {}, n);
|
|
40
|
+
}), S = /* @__PURE__ */ f.memo(({ column: e, item: t }) => {
|
|
41
|
+
let { id: n, isItemMetadata: r, textValue: i } = e, a = `${i}-${t.id}`;
|
|
42
|
+
return /* @__PURE__ */ p(c, { children: /* @__PURE__ */ p(d, {
|
|
43
|
+
as: "span",
|
|
44
|
+
children: v(t, n, r)
|
|
45
|
+
}) }, a);
|
|
46
|
+
}), C = /* @__PURE__ */ f.memo(({ column: t, iconColumnVariant: n, item: r, onInlineEditChange: a }) => {
|
|
47
|
+
let { cellRenderer: o, id: s, isInlineEditingEnabled: c, type: l } = t, u = s === "item.name" && (n === e.INLINE || n === e.INLINE_SUBTITLE);
|
|
48
|
+
return o ? /* @__PURE__ */ p(b, {
|
|
49
|
+
column: t,
|
|
50
|
+
item: r
|
|
51
|
+
}) : u ? /* @__PURE__ */ p(y, {
|
|
52
|
+
column: t,
|
|
53
|
+
iconColumnVariant: n,
|
|
54
|
+
item: r
|
|
55
|
+
}) : c && (l === "multiSelect" || l === "enum") ? /* @__PURE__ */ p(i, {
|
|
56
|
+
column: t,
|
|
57
|
+
item: r,
|
|
58
|
+
onInlineEditChange: a
|
|
59
|
+
}, `${t.id}-${r.id}`) : p(l === "multiSelect" ? x : S, {
|
|
60
|
+
column: t,
|
|
61
|
+
item: r
|
|
62
|
+
});
|
|
63
|
+
}), w = /* @__PURE__ */ f.memo(({ item: e, zoomLevel: t }) => /* @__PURE__ */ p(c, {
|
|
64
|
+
style: { height: n[t] },
|
|
65
|
+
children: /* @__PURE__ */ p(h, {
|
|
66
|
+
className: a.iconCell,
|
|
67
|
+
item: e
|
|
68
|
+
})
|
|
69
|
+
}, `item-type-icon-${e.id}`)), T = /* @__PURE__ */ f.memo(({ item: e, itemActionMenuProps: n, isCheckboxDisabled: r }) => /* @__PURE__ */ p(s, {
|
|
70
|
+
isCheckboxDisabled: r,
|
|
71
|
+
children: (r) => n ? /* @__PURE__ */ p(t, {
|
|
72
|
+
...n,
|
|
73
|
+
item: e,
|
|
74
|
+
onOpenChange: r
|
|
75
|
+
}) : null
|
|
76
|
+
})), E = ({ areSelectionCheckboxesDisabled: t, columnCount: n, columns: i, iconColumnVariant: s, items: c, itemActionMenuProps: d, onInlineEditChange: f, onTableRowClick: h, shouldRenderActionColumn: _, virtualItems: v, totalVirtualSize: y, zoomLevel: b }) => {
|
|
77
|
+
let x = s === e.COLUMN;
|
|
78
|
+
if (v) {
|
|
79
|
+
let e = (e) => /* @__PURE__ */ p(r, {
|
|
80
|
+
columnLength: n || 0,
|
|
81
|
+
rowKey: `ghost-${e}`
|
|
82
|
+
}), a = (e) => /* @__PURE__ */ p(o, {
|
|
83
|
+
areSelectionCheckboxesDisabled: t,
|
|
84
|
+
columns: i,
|
|
85
|
+
iconColumnVariant: s,
|
|
86
|
+
item: e,
|
|
87
|
+
itemActionMenuProps: d,
|
|
88
|
+
onTableRowClick: h,
|
|
89
|
+
shouldRenderActionColumn: _,
|
|
90
|
+
zoomLevel: b
|
|
91
|
+
}), f = () => v[0]?.start || 0, g = () => {
|
|
92
|
+
let e = v[v.length - 1]?.end || 0;
|
|
93
|
+
return Math.max((y || 0) - e, 0);
|
|
94
|
+
}, x = f(), S = g();
|
|
95
|
+
return /* @__PURE__ */ m(u, { children: [
|
|
96
|
+
!!x && /* @__PURE__ */ p(l, {
|
|
97
|
+
isDisabled: !0,
|
|
98
|
+
style: { height: `${x}px` }
|
|
99
|
+
}),
|
|
100
|
+
v.map(({ index: t }) => t >= c.length ? e(t) : a(c[t])),
|
|
101
|
+
!!S && /* @__PURE__ */ p(l, {
|
|
102
|
+
isDisabled: !0,
|
|
103
|
+
style: { height: `${S}px` }
|
|
104
|
+
})
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
return /* @__PURE__ */ p(u, {
|
|
108
|
+
items: c.map((e) => ({
|
|
109
|
+
key: e.id,
|
|
110
|
+
...e
|
|
111
|
+
})),
|
|
112
|
+
children: (e) => /* @__PURE__ */ m(l, {
|
|
113
|
+
className: g(a.tableRow, { [a.isClickable]: h }),
|
|
114
|
+
id: e.id,
|
|
115
|
+
onAction: () => h?.(e),
|
|
116
|
+
children: [
|
|
117
|
+
x && /* @__PURE__ */ p(w, {
|
|
118
|
+
item: e,
|
|
119
|
+
zoomLevel: b
|
|
120
|
+
}),
|
|
121
|
+
i.map((t) => /* @__PURE__ */ p(C, {
|
|
122
|
+
column: t,
|
|
123
|
+
iconColumnVariant: s,
|
|
124
|
+
item: e,
|
|
125
|
+
onInlineEditChange: f
|
|
126
|
+
}, `${t.textValue}-${e.id}`)),
|
|
127
|
+
_ && /* @__PURE__ */ p(T, {
|
|
128
|
+
isCheckboxDisabled: t,
|
|
129
|
+
item: e,
|
|
130
|
+
itemActionMenuProps: d
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}, e.id)
|
|
134
|
+
});
|
|
210
135
|
};
|
|
136
|
+
export { E as default };
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
import "@box/item-icon";
|
|
4
|
-
import "clsx";
|
|
5
|
-
import "../../../../../../chunks/types.js";
|
|
6
|
-
import "../../../constants.js";
|
|
7
|
-
import { T as f } from "../../../../../../chunks/index.js";
|
|
8
|
-
import "react/jsx-runtime";
|
|
9
|
-
import "../../../item-action-menu/item-action-menu.js";
|
|
10
|
-
export {
|
|
11
|
-
f as TableRow
|
|
12
|
-
};
|
|
1
|
+
import { t as e } from "../../../../../../chunks/table-row.js";
|
|
2
|
+
export { e as TableRow };
|
|
@@ -1,56 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getShouldRenderActionColumn as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...r,
|
|
35
|
-
children: [p, x ? /* @__PURE__ */ s(j, {
|
|
36
|
-
columnLength: i
|
|
37
|
-
}) : /* @__PURE__ */ s(y, {
|
|
38
|
-
areSelectionCheckboxesDisabled: a,
|
|
39
|
-
columnCount: i,
|
|
40
|
-
columns: t,
|
|
41
|
-
iconColumnVariant: e,
|
|
42
|
-
isLoading: n,
|
|
43
|
-
itemActionMenuProps: h,
|
|
44
|
-
items: C,
|
|
45
|
-
onInlineEditChange: f,
|
|
46
|
-
onTableRowClick: g,
|
|
47
|
-
shouldRenderActionColumn: m,
|
|
48
|
-
totalVirtualSize: b,
|
|
49
|
-
virtualItems: l,
|
|
50
|
-
zoomLevel: T
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
U as TableRenderer
|
|
1
|
+
import { t as e } from "../../../../chunks/types.js";
|
|
2
|
+
import { GhostTableBody as t } from "./table-body/ghost-table-body.js";
|
|
3
|
+
import n from "./messages.js";
|
|
4
|
+
import r from "./table-body/table-body-with-data.js";
|
|
5
|
+
import { getShouldRenderActionColumn as i } from "./actionColumn.js";
|
|
6
|
+
import { Table as a } from "@box/blueprint-web";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
var c = ({ columnCount: c, columns: l, formatMessage: u, iconColumnVariant: d, isLoading: f, areSelectionCheckboxesDisabled: p, itemActionMenuProps: m, items: h, onInlineEditChange: g, onTableRowClick: _, style: v, tableHeader: y, tableProps: b, virtualItems: x, totalVirtualSize: S, zoomLevel: C }) => {
|
|
9
|
+
let w = i(b), T = c || (() => {
|
|
10
|
+
let t = l.length;
|
|
11
|
+
return d === e.COLUMN && (t += 1), w && (t += 1), t;
|
|
12
|
+
})(), E = f && !x?.length;
|
|
13
|
+
return /* @__PURE__ */ s(a, {
|
|
14
|
+
"aria-label": u(n.listView),
|
|
15
|
+
selectionBehavior: "toggle",
|
|
16
|
+
style: v,
|
|
17
|
+
...b,
|
|
18
|
+
children: [y, E ? /* @__PURE__ */ o(t, { columnLength: T }) : /* @__PURE__ */ o(r, {
|
|
19
|
+
areSelectionCheckboxesDisabled: p,
|
|
20
|
+
columnCount: T,
|
|
21
|
+
columns: l,
|
|
22
|
+
iconColumnVariant: d,
|
|
23
|
+
isLoading: f,
|
|
24
|
+
itemActionMenuProps: m,
|
|
25
|
+
items: h,
|
|
26
|
+
onInlineEditChange: g,
|
|
27
|
+
onTableRowClick: _,
|
|
28
|
+
shouldRenderActionColumn: w,
|
|
29
|
+
totalVirtualSize: S,
|
|
30
|
+
virtualItems: x,
|
|
31
|
+
zoomLevel: C
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
56
34
|
};
|
|
35
|
+
export { c as TableRenderer };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
t as MetadataFileChip,
|
|
8
|
-
r as MetadataFileField,
|
|
9
|
-
i as MetadataLocationField,
|
|
10
|
-
p as MetadataRadioField,
|
|
11
|
-
f as MetadataSearchField
|
|
12
|
-
};
|
|
1
|
+
import { MetadataFileField as e } from "./metadata-file-field.js";
|
|
2
|
+
import { t } from "../../../../chunks/metadata-location-field.js";
|
|
3
|
+
import { MetadataRadioField as n } from "./metadata-radio-field.js";
|
|
4
|
+
import { MetadataSearchField as r } from "./metadata-search-field.js";
|
|
5
|
+
import { MetadataFileChip as i } from "./metadata-file-chip.js";
|
|
6
|
+
export { i as MetadataFileChip, e as MetadataFileField, t as MetadataLocationField, n as MetadataRadioField, r as MetadataSearchField };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { defineMessages as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { defineMessages as e } from "react-intl";
|
|
2
|
+
var t = e({
|
|
3
|
+
searchInputAriaLabel: {
|
|
4
|
+
id: "groupSharedFeatures.metadataView.metadataValue.metadataSearch.searchInputAriaLabel",
|
|
5
|
+
defaultMessage: "Search"
|
|
6
|
+
},
|
|
7
|
+
searchInputClearAriaLabel: {
|
|
8
|
+
id: "groupSharedFeatures.metadataView.metadataValue.metadataSearch.searchInputClearAriaLabel",
|
|
9
|
+
defaultMessage: "Clear"
|
|
10
|
+
},
|
|
11
|
+
selectFolderHint: {
|
|
12
|
+
id: "groupSharedFeatures.metadataView.metadataValue.metadataLocation.locationTriggerHint",
|
|
13
|
+
defaultMessage: "Select a folder"
|
|
14
|
+
}
|
|
15
15
|
});
|
|
16
|
-
export {
|
|
17
|
-
t as default
|
|
18
|
-
};
|
|
16
|
+
export { t as default };
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
label: e,
|
|
25
|
-
onCheckedChange: (t) => {
|
|
26
|
-
i(e, t === !0);
|
|
27
|
-
},
|
|
28
|
-
value: e
|
|
29
|
-
}, e);
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
p as MetadataCheckboxField
|
|
1
|
+
import { Checkbox as e } from "@box/blueprint-web";
|
|
2
|
+
import { useFormikContext as t } from "formik";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
var r = ({ id: r, name: i }) => {
|
|
5
|
+
let { values: a, setFieldValue: o } = t(), s = a.metadata.fields[r]?.options || [], c = a.metadata.fields[r]?.value?.enum || [], l = (e, t) => {
|
|
6
|
+
let n = new Set(c);
|
|
7
|
+
t ? n.add(e) : n.delete(e), o(`metadata.fields.${r}.value.enum`, Array.from(n));
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ n(e.Legend, {
|
|
10
|
+
header: i,
|
|
11
|
+
children: s.map(({ key: t }) => {
|
|
12
|
+
let i = c.includes(t);
|
|
13
|
+
return /* @__PURE__ */ n(e.Item, {
|
|
14
|
+
checked: i,
|
|
15
|
+
"data-target-id": `CheckboxItem-filter_${r}_${t}`,
|
|
16
|
+
label: t,
|
|
17
|
+
onCheckedChange: (e) => {
|
|
18
|
+
l(t, e === !0);
|
|
19
|
+
},
|
|
20
|
+
value: t
|
|
21
|
+
}, t);
|
|
22
|
+
})
|
|
23
|
+
});
|
|
35
24
|
};
|
|
25
|
+
export { r as MetadataCheckboxField };
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
applyButtonType: "submit",
|
|
15
|
-
onApply: (m) => {
|
|
16
|
-
l(`metadata.fields.${e}.value.enum`, m), o();
|
|
17
|
-
},
|
|
18
|
-
selected: a || []
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
c as MetadataFileChip
|
|
1
|
+
import { useFormikContext as e } from "formik";
|
|
2
|
+
import { BoxItemTypeSelectorQuickFilter as t } from "@box/box-item-type-selector";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
var r = ({ id: r }) => {
|
|
5
|
+
let { values: i, setFieldValue: a, submitForm: o } = e(), s = i.metadata.fields[r]?.value?.enum;
|
|
6
|
+
return /* @__PURE__ */ n(t, {
|
|
7
|
+
allowAllOptionsSelect: !0,
|
|
8
|
+
applyButtonType: "submit",
|
|
9
|
+
onApply: (e) => {
|
|
10
|
+
a(`metadata.fields.${r}.value.enum`, e), o();
|
|
11
|
+
},
|
|
12
|
+
selected: s || []
|
|
13
|
+
});
|
|
23
14
|
};
|
|
15
|
+
export { r as MetadataFileChip };
|