@box/metadata-view 0.42.0 → 0.42.2
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-row.js → index.js} +1 -1
- package/dist/esm/index.js +52 -5
- package/dist/esm/lib/components/action-bar/action-bar.js +5 -6
- package/dist/esm/lib/components/error-state/error-state.js +6 -6
- package/dist/esm/lib/components/error-state/index.js +4 -0
- package/dist/esm/lib/components/filter-row/all-filters-chip.js +10 -10
- package/dist/esm/lib/components/filter-row/filter-row.js +19 -19
- package/dist/esm/lib/components/filter-row/form-filter-chip.js +2 -3
- package/dist/esm/lib/components/filter-row/index.js +8 -2
- package/dist/esm/lib/components/filter-sidepanel/{filter-sidepanel.js → filter-side-panel.js} +28 -28
- package/dist/esm/lib/components/filter-sidepanel/filter.js +5 -5
- package/dist/esm/lib/components/filter-sidepanel/index.js +6 -0
- package/dist/esm/lib/components/index.js +49 -0
- package/dist/esm/lib/components/metadata-grid/index.js +4 -1
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +15 -16
- package/dist/esm/lib/components/metadata-table/index.js +6 -2
- package/dist/esm/lib/components/metadata-table/metadata-table.js +19 -18
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-body.js +7 -7
- package/dist/esm/lib/components/metadata-table/table-body/{ghost-row/ghost-row.js → ghost-table-row/ghost-table-row.js} +5 -5
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/index.js +4 -0
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/index.js +2 -2
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +1 -0
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +8 -8
- package/dist/esm/lib/components/metadata-table/table-body/table-row/index.js +4 -0
- package/dist/esm/lib/components/metadata-table/table-body/table-row/table-row.js +2 -2
- package/dist/esm/lib/components/metadata-table/table-renderer.js +14 -14
- package/dist/esm/lib/components/metadata-value/index.js +12 -0
- package/dist/esm/lib/components/pagination/index.js +8 -8
- package/dist/esm/lib/components/pagination/marker-based-pagination.js +1 -1
- package/dist/esm/lib/components/pagination/offset-based-pagination.js +1 -1
- package/dist/esm/lib/components/pagination/pagination-controls.js +1 -1
- package/dist/esm/lib/components/pagination/pagination.js +12 -12
- package/dist/esm/lib/components/switch-case/index.js +5 -0
- package/dist/esm/lib/index.js +54 -0
- package/dist/esm/lib/metadata-view.js +58 -40
- package/dist/types/index.d.ts +1 -2
- package/dist/types/lib/components/action-bar/action-bar.d.ts +1 -1
- package/dist/types/lib/components/action-bar/index.d.ts +2 -1
- package/dist/types/lib/components/error-state/error-state.d.ts +2 -3
- package/dist/types/lib/components/error-state/index.d.ts +1 -0
- package/dist/types/lib/components/filter-row/filter-row.d.ts +0 -1
- package/dist/types/lib/components/filter-row/form-filter-chip.d.ts +0 -1
- package/dist/types/lib/components/filter-row/index.d.ts +9 -1
- package/dist/types/lib/components/filter-sidepanel/filter-side-panel.d.ts +8 -0
- package/dist/types/lib/components/filter-sidepanel/filter.d.ts +2 -2
- package/dist/types/lib/components/filter-sidepanel/index.d.ts +3 -0
- package/dist/types/lib/components/index.d.ts +10 -0
- package/dist/types/lib/components/item-action-menu/index.d.ts +2 -1
- package/dist/types/lib/components/metadata-grid/index.d.ts +2 -0
- package/dist/types/lib/components/metadata-grid/metadata-grid.d.ts +0 -1
- package/dist/types/lib/components/metadata-table/index.d.ts +5 -2
- package/dist/types/lib/components/metadata-table/metadata-table.d.ts +2 -3
- package/dist/types/lib/components/metadata-table/table-body/ghost-table-body.d.ts +1 -2
- package/dist/types/lib/components/metadata-table/table-body/ghost-table-row/ghost-table-row.d.ts +5 -0
- package/dist/types/lib/components/metadata-table/table-body/ghost-table-row/index.d.ts +2 -0
- package/dist/types/lib/components/metadata-table/table-body/inline-editing-cell/index.d.ts +2 -1
- package/dist/types/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.d.ts +1 -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/index.d.ts +2 -0
- package/dist/types/lib/components/metadata-table/table-body/table-row/table-row.d.ts +2 -3
- package/dist/types/lib/components/metadata-table/table-renderer.d.ts +2 -3
- package/dist/types/lib/components/metadata-value/index.d.ts +10 -0
- package/dist/types/lib/components/metadata-value/metadata-file-chip.d.ts +1 -2
- package/dist/types/lib/components/metadata-value/metadata-file-field.d.ts +1 -2
- package/dist/types/lib/components/metadata-value/metadata-location-field.d.ts +1 -1
- package/dist/types/lib/components/metadata-value/metadata-radio-field.d.ts +2 -3
- package/dist/types/lib/components/metadata-value/metadata-search-field.d.ts +1 -2
- package/dist/types/lib/components/pagination/index.d.ts +6 -6
- package/dist/types/lib/components/pagination/pagination-controls.d.ts +1 -2
- package/dist/types/lib/components/pagination/pagination.d.ts +1 -2
- package/dist/types/lib/components/sort-dropdown/index.d.ts +2 -1
- package/dist/types/lib/components/switch-case/index.d.ts +1 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/dist/types/lib/metadata-view.d.ts +1 -3
- package/package.json +6 -6
- package/dist/types/lib/components/filter-sidepanel/filter-sidepanel.d.ts +0 -9
- package/dist/types/lib/components/metadata-table/table-body/ghost-row/ghost-row.d.ts +0 -6
- /package/dist/styles/{table-row.css → index.css} +0 -0
|
@@ -2,18 +2,19 @@ import { useRef as v } from "react";
|
|
|
2
2
|
import { useIntl as M } from "react-intl";
|
|
3
3
|
import { Text as E, ListCheckbox as S, TableHeader as k, Column as B } from "@box/blueprint-web";
|
|
4
4
|
import { useInfiniteScrollTableItems as O } from "./hooks/useInfiniteScrollTableItems.js";
|
|
5
|
-
import T from "./table-renderer.js";
|
|
5
|
+
import { TableRenderer as T } from "./table-renderer.js";
|
|
6
6
|
import { I as P } from "../../../../chunks/types.js";
|
|
7
7
|
import { THUMBNAIL_WIDTHS as U } from "../constants.js";
|
|
8
|
-
import { s } from "../../../../chunks/
|
|
8
|
+
import { s } from "../../../../chunks/index.js";
|
|
9
9
|
import j 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 F = 40, z = ({
|
|
12
13
|
columns: o,
|
|
13
|
-
isLoading:
|
|
14
|
+
isLoading: i = !1,
|
|
14
15
|
iconColumnVariant: n,
|
|
15
|
-
isSelectAllEnabled:
|
|
16
|
-
items:
|
|
16
|
+
isSelectAllEnabled: m,
|
|
17
|
+
items: d,
|
|
17
18
|
itemActionMenuProps: I,
|
|
18
19
|
isInfiniteScrollEnabled: R = !1,
|
|
19
20
|
hasNextPage: x = !1,
|
|
@@ -30,9 +31,9 @@ const F = 40, Q = ({
|
|
|
30
31
|
virtualItemsToDisplay: p,
|
|
31
32
|
getTableHeight: y
|
|
32
33
|
} = O({
|
|
33
|
-
items:
|
|
34
|
+
items: d,
|
|
34
35
|
hasNextPage: x,
|
|
35
|
-
isLoading:
|
|
36
|
+
isLoading: i,
|
|
36
37
|
parentRef: f,
|
|
37
38
|
onGetNextPage: W,
|
|
38
39
|
placeholderRowsCount: g
|
|
@@ -52,21 +53,21 @@ const F = 40, Q = ({
|
|
|
52
53
|
const {
|
|
53
54
|
id: H,
|
|
54
55
|
headerRenderer: b,
|
|
55
|
-
textValue:
|
|
56
|
+
textValue: l,
|
|
56
57
|
..._
|
|
57
58
|
} = t;
|
|
58
59
|
return {
|
|
59
|
-
children: b ? b(
|
|
60
|
+
children: b ? b(l, t) : /* @__PURE__ */ e(E, {
|
|
60
61
|
as: "span",
|
|
61
|
-
children:
|
|
62
|
+
children: l
|
|
62
63
|
}),
|
|
63
64
|
isRowHeader: H === "name",
|
|
64
65
|
id: H,
|
|
65
|
-
textValue:
|
|
66
|
+
textValue: l,
|
|
66
67
|
..._
|
|
67
68
|
};
|
|
68
69
|
});
|
|
69
|
-
a.push(...N),
|
|
70
|
+
a.push(...N), m && a.push({
|
|
70
71
|
id: "actions",
|
|
71
72
|
className: s.tableHeaderActions,
|
|
72
73
|
children: /* @__PURE__ */ e("div", {
|
|
@@ -74,7 +75,7 @@ const F = 40, Q = ({
|
|
|
74
75
|
children: /* @__PURE__ */ e(S, {
|
|
75
76
|
"aria-label": c(j.selectAll),
|
|
76
77
|
className: s.selectAllCheckbox,
|
|
77
|
-
isDisabled:
|
|
78
|
+
isDisabled: i
|
|
78
79
|
})
|
|
79
80
|
}),
|
|
80
81
|
isRowHeader: !1,
|
|
@@ -91,10 +92,10 @@ const F = 40, Q = ({
|
|
|
91
92
|
columns: o,
|
|
92
93
|
formatMessage: c,
|
|
93
94
|
iconColumnVariant: n,
|
|
94
|
-
isLoading:
|
|
95
|
-
isSelectAllEnabled:
|
|
95
|
+
isLoading: i,
|
|
96
|
+
isSelectAllEnabled: m,
|
|
96
97
|
itemActionMenuProps: I,
|
|
97
|
-
items:
|
|
98
|
+
items: d,
|
|
98
99
|
onInlineEditChange: C,
|
|
99
100
|
tableHeader: D,
|
|
100
101
|
tableProps: w,
|
|
@@ -127,5 +128,5 @@ const F = 40, Q = ({
|
|
|
127
128
|
});
|
|
128
129
|
};
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
z as MetadataTable
|
|
131
132
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { TableBody as
|
|
2
|
-
import l from "./ghost-row/ghost-row.js";
|
|
1
|
+
import { TableBody as l } from "@box/blueprint-web";
|
|
3
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
|
|
3
|
+
import { GhostTableRow as s } from "./ghost-table-row/ghost-table-row.js";
|
|
4
|
+
const y = 20, T = ({
|
|
5
5
|
columnLength: e,
|
|
6
|
-
rowLength: t =
|
|
7
|
-
}) => /* @__PURE__ */ r(
|
|
6
|
+
rowLength: t = y
|
|
7
|
+
}) => /* @__PURE__ */ r(l, {
|
|
8
8
|
items: Array.from({
|
|
9
9
|
length: t
|
|
10
10
|
}, (o, m) => ({
|
|
11
11
|
key: m
|
|
12
12
|
})),
|
|
13
|
-
children: (o) => /* @__PURE__ */ r(
|
|
13
|
+
children: (o) => /* @__PURE__ */ r(s, {
|
|
14
14
|
columnLength: e,
|
|
15
15
|
rowKey: o.key
|
|
16
16
|
})
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
T as GhostTableBody
|
|
20
20
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Row as h, Cell as i, Ghost as l } from "@box/blueprint-web";
|
|
2
|
-
import { Size5 as
|
|
2
|
+
import { Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
const
|
|
4
|
+
const f = ({
|
|
5
5
|
columnLength: o,
|
|
6
6
|
rowKey: t = "ghost-row"
|
|
7
7
|
}) => /* @__PURE__ */ r(h, {
|
|
8
8
|
children: Array.from({
|
|
9
9
|
length: o
|
|
10
|
-
}, (
|
|
10
|
+
}, (n, e) => /* @__PURE__ */ r(i, {
|
|
11
11
|
children: /* @__PURE__ */ r(l, {
|
|
12
|
-
height:
|
|
12
|
+
height: m,
|
|
13
13
|
variant: "rectangle",
|
|
14
14
|
width: "100%"
|
|
15
15
|
})
|
|
16
16
|
}, e))
|
|
17
17
|
}, t);
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as GhostTableRow
|
|
20
20
|
};
|
|
@@ -5,11 +5,11 @@ import T from "lodash/get";
|
|
|
5
5
|
import i from "react";
|
|
6
6
|
import { I as h } from "../../../../../chunks/types.js";
|
|
7
7
|
import { THUMBNAIL_LIST_VIEW_HEIGHTS as x } from "../../constants.js";
|
|
8
|
-
import R from "
|
|
9
|
-
import { s as f, T as g } from "../../../../../chunks/table-row.js";
|
|
8
|
+
import { s as f, T as R } from "../../../../../chunks/index.js";
|
|
10
9
|
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
11
|
-
import
|
|
12
|
-
import { ItemActionMenu as
|
|
10
|
+
import { InlineEditingCell as g } from "./inline-editing-cell/inline-editing-cell.js";
|
|
11
|
+
import { ItemActionMenu as w } from "../../item-action-menu/item-action-menu.js";
|
|
12
|
+
import { GhostTableRow as B } from "./ghost-table-row/ghost-table-row.js";
|
|
13
13
|
const _ = /* @__PURE__ */ i.memo(({
|
|
14
14
|
item: t,
|
|
15
15
|
column: e,
|
|
@@ -86,7 +86,7 @@ const _ = /* @__PURE__ */ i.memo(({
|
|
|
86
86
|
}) : d ? /* @__PURE__ */ r(k, {
|
|
87
87
|
column: e,
|
|
88
88
|
item: t
|
|
89
|
-
}) : p && (c === "multiSelect" || c === "enum") ? /* @__PURE__ */ r(
|
|
89
|
+
}) : p && (c === "multiSelect" || c === "enum") ? /* @__PURE__ */ r(g, {
|
|
90
90
|
column: e,
|
|
91
91
|
item: t,
|
|
92
92
|
onInlineEditChange: n
|
|
@@ -112,7 +112,7 @@ const _ = /* @__PURE__ */ i.memo(({
|
|
|
112
112
|
item: t,
|
|
113
113
|
itemActionMenuProps: e
|
|
114
114
|
}) => /* @__PURE__ */ r(S, {
|
|
115
|
-
children: (l) => e ? /* @__PURE__ */ r(
|
|
115
|
+
children: (l) => e ? /* @__PURE__ */ r(w, {
|
|
116
116
|
...e,
|
|
117
117
|
item: t,
|
|
118
118
|
onOpenChange: l
|
|
@@ -130,10 +130,10 @@ const _ = /* @__PURE__ */ i.memo(({
|
|
|
130
130
|
}) => {
|
|
131
131
|
const E = e === h.COLUMN;
|
|
132
132
|
if (a) {
|
|
133
|
-
const o = (s) => /* @__PURE__ */ r(
|
|
133
|
+
const o = (s) => /* @__PURE__ */ r(B, {
|
|
134
134
|
columnLength: p || 0,
|
|
135
135
|
rowKey: `ghost-${s}`
|
|
136
|
-
}), m = (s) => /* @__PURE__ */ r(
|
|
136
|
+
}), m = (s) => /* @__PURE__ */ r(R, {
|
|
137
137
|
columns: t,
|
|
138
138
|
iconColumnVariant: e,
|
|
139
139
|
isSelectAllEnabled: l,
|
|
@@ -4,9 +4,9 @@ import "@box/item-icon";
|
|
|
4
4
|
import "clsx";
|
|
5
5
|
import "../../../../../../chunks/types.js";
|
|
6
6
|
import "../../../constants.js";
|
|
7
|
-
import { T as
|
|
7
|
+
import { T as f } from "../../../../../../chunks/index.js";
|
|
8
8
|
import "react/jsx-runtime";
|
|
9
9
|
import "../../../item-action-menu/item-action-menu.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
f as TableRow
|
|
12
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table as T } from "@box/blueprint-web";
|
|
2
2
|
import { I as d } from "../../../../chunks/types.js";
|
|
3
|
-
import x from "./table-body/ghost-table-body.js";
|
|
3
|
+
import { GhostTableBody as x } from "./table-body/ghost-table-body.js";
|
|
4
4
|
import B from "./table-body/table-body-with-data.js";
|
|
5
5
|
import j from "./messages.js";
|
|
6
6
|
import { jsxs as y, jsx as i } from "react/jsx-runtime";
|
|
@@ -12,24 +12,24 @@ const O = ({
|
|
|
12
12
|
itemActionMenuProps: c,
|
|
13
13
|
items: f,
|
|
14
14
|
isLoading: l,
|
|
15
|
-
formatMessage:
|
|
16
|
-
tableProps:
|
|
15
|
+
formatMessage: h,
|
|
16
|
+
tableProps: p,
|
|
17
17
|
virtualItems: o,
|
|
18
|
-
style:
|
|
19
|
-
columnCount:
|
|
20
|
-
zoomLevel:
|
|
21
|
-
onInlineEditChange:
|
|
18
|
+
style: u,
|
|
19
|
+
columnCount: C,
|
|
20
|
+
zoomLevel: g,
|
|
21
|
+
onInlineEditChange: a
|
|
22
22
|
}) => {
|
|
23
|
-
const m =
|
|
23
|
+
const m = C || (() => {
|
|
24
24
|
let e = t.length;
|
|
25
25
|
return n === d.COLUMN && (e += 1), r && (e += 1), e;
|
|
26
26
|
})(), b = l && !(o != null && o.length);
|
|
27
27
|
return /* @__PURE__ */ y(T, {
|
|
28
|
-
"aria-label":
|
|
28
|
+
"aria-label": h(j.listView),
|
|
29
29
|
selectionBehavior: "toggle",
|
|
30
30
|
selectionMode: "multiple",
|
|
31
|
-
style:
|
|
32
|
-
...
|
|
31
|
+
style: u,
|
|
32
|
+
...p,
|
|
33
33
|
children: [s, b ? /* @__PURE__ */ i(x, {
|
|
34
34
|
columnLength: m
|
|
35
35
|
}) : /* @__PURE__ */ i(B, {
|
|
@@ -40,12 +40,12 @@ const O = ({
|
|
|
40
40
|
isSelectAllEnabled: r,
|
|
41
41
|
itemActionMenuProps: c,
|
|
42
42
|
items: f,
|
|
43
|
-
onInlineEditChange:
|
|
43
|
+
onInlineEditChange: a,
|
|
44
44
|
virtualItems: o,
|
|
45
|
-
zoomLevel:
|
|
45
|
+
zoomLevel: g
|
|
46
46
|
})]
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
export {
|
|
50
|
-
O as
|
|
50
|
+
O as TableRenderer
|
|
51
51
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MetadataFileChip as t } from "./metadata-file-chip.js";
|
|
2
|
+
import { MetadataFileField as r } from "./metadata-file-field.js";
|
|
3
|
+
import { MetadataLocationField as i } from "./metadata-location-field.js";
|
|
4
|
+
import { MetadataRadioField as p } from "./metadata-radio-field.js";
|
|
5
|
+
import { MetadataSearchField as f } from "./metadata-search-field.js";
|
|
6
|
+
export {
|
|
7
|
+
t as MetadataFileChip,
|
|
8
|
+
r as MetadataFileField,
|
|
9
|
+
i as MetadataLocationField,
|
|
10
|
+
p as MetadataRadioField,
|
|
11
|
+
f as MetadataSearchField
|
|
12
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { OffsetBasedPagination as
|
|
4
|
-
import {
|
|
1
|
+
import { Pagination as r } from "./pagination.js";
|
|
2
|
+
import { MarkerBasedPagination as n } from "./marker-based-pagination.js";
|
|
3
|
+
import { OffsetBasedPagination as i } from "./offset-based-pagination.js";
|
|
4
|
+
import { PaginationControls as g } from "./pagination-controls.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
n as MarkerBasedPagination,
|
|
7
|
+
i as OffsetBasedPagination,
|
|
8
|
+
r as Pagination,
|
|
9
|
+
g as PaginationControls
|
|
10
10
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { MarkerBasedPagination as g } from "./marker-based-pagination.js";
|
|
2
2
|
import { OffsetBasedPagination as p } from "./offset-based-pagination.js";
|
|
3
|
-
import { jsx as
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
4
|
import "./pagination-controls.js";
|
|
5
|
-
const
|
|
5
|
+
const c = ({
|
|
6
6
|
type: e,
|
|
7
|
-
...
|
|
7
|
+
...r
|
|
8
8
|
}) => {
|
|
9
9
|
if (e === "marker") {
|
|
10
10
|
const {
|
|
11
11
|
hasNextMarker: s,
|
|
12
12
|
hasPrevMarker: f,
|
|
13
13
|
onMarkerBasedPageChange: m
|
|
14
|
-
} =
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
} = r;
|
|
15
|
+
return /* @__PURE__ */ a(g, {
|
|
16
16
|
hasNextMarker: s,
|
|
17
17
|
hasPrevMarker: f,
|
|
18
18
|
onMarkerBasedPageChange: m
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
const {
|
|
22
|
-
offset:
|
|
23
|
-
onOffsetChange:
|
|
22
|
+
offset: o,
|
|
23
|
+
onOffsetChange: t,
|
|
24
24
|
pageSize: n,
|
|
25
25
|
totalCount: i
|
|
26
|
-
} =
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
offset:
|
|
29
|
-
onOffsetChange:
|
|
26
|
+
} = r;
|
|
27
|
+
return /* @__PURE__ */ a(p, {
|
|
28
|
+
offset: o,
|
|
29
|
+
onOffsetChange: t,
|
|
30
30
|
pageSize: n,
|
|
31
31
|
totalCount: i
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
c as Pagination
|
|
36
36
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { MetadataView as r } from "./metadata-view.js";
|
|
2
|
+
import { I as a, V as i } from "../../chunks/types.js";
|
|
3
|
+
import { ActionBar as m } from "./components/action-bar/action-bar.js";
|
|
4
|
+
import { FilterRow as x } from "./components/filter-row/filter-row.js";
|
|
5
|
+
import { F as n } from "../../chunks/form-filter-chip.js";
|
|
6
|
+
import { MetadataFilterChip as F } from "./components/filter-row/metadata-filter-chip.js";
|
|
7
|
+
import { SelectFilterChip as s } from "./components/filter-row/select-filter-chip.js";
|
|
8
|
+
import { Filter as c } from "./components/filter-sidepanel/filter.js";
|
|
9
|
+
import { FilterSidePanel as g } from "./components/filter-sidepanel/filter-side-panel.js";
|
|
10
|
+
import { ItemActionMenu as P } from "./components/item-action-menu/item-action-menu.js";
|
|
11
|
+
import { MetadataGrid as I } from "./components/metadata-grid/metadata-grid.js";
|
|
12
|
+
import { MetadataTable as B } from "./components/metadata-table/metadata-table.js";
|
|
13
|
+
import { InlineEditingCell as b } from "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
14
|
+
import { TableRenderer as A } from "./components/metadata-table/table-renderer.js";
|
|
15
|
+
import { MetadataFileChip as k } from "./components/metadata-value/metadata-file-chip.js";
|
|
16
|
+
import { MetadataFileField as E } from "./components/metadata-value/metadata-file-field.js";
|
|
17
|
+
import { MetadataLocationField as L } from "./components/metadata-value/metadata-location-field.js";
|
|
18
|
+
import { MetadataRadioField as j } from "./components/metadata-value/metadata-radio-field.js";
|
|
19
|
+
import { MetadataSearchField as v } from "./components/metadata-value/metadata-search-field.js";
|
|
20
|
+
import { Pagination as z } from "./components/pagination/pagination.js";
|
|
21
|
+
import { MarkerBasedPagination as J } from "./components/pagination/marker-based-pagination.js";
|
|
22
|
+
import { OffsetBasedPagination as N } from "./components/pagination/offset-based-pagination.js";
|
|
23
|
+
import { PaginationControls as U } from "./components/pagination/pagination-controls.js";
|
|
24
|
+
import { SortDropdown as X } from "./components/sort-dropdown/sort-dropdown.js";
|
|
25
|
+
import { Case as Z, SwitchCase as _ } from "./components/switch-case/switch-case.js";
|
|
26
|
+
export {
|
|
27
|
+
m as ActionBar,
|
|
28
|
+
Z as Case,
|
|
29
|
+
c as Filter,
|
|
30
|
+
x as FilterRow,
|
|
31
|
+
g as FilterSidePanel,
|
|
32
|
+
n as FormFilterChip,
|
|
33
|
+
a as IconColumnVariant,
|
|
34
|
+
b as InlineEditingCell,
|
|
35
|
+
P as ItemActionMenu,
|
|
36
|
+
J as MarkerBasedPagination,
|
|
37
|
+
k as MetadataFileChip,
|
|
38
|
+
E as MetadataFileField,
|
|
39
|
+
F as MetadataFilterChip,
|
|
40
|
+
I as MetadataGrid,
|
|
41
|
+
L as MetadataLocationField,
|
|
42
|
+
j as MetadataRadioField,
|
|
43
|
+
v as MetadataSearchField,
|
|
44
|
+
B as MetadataTable,
|
|
45
|
+
r as MetadataView,
|
|
46
|
+
N as OffsetBasedPagination,
|
|
47
|
+
z as Pagination,
|
|
48
|
+
U as PaginationControls,
|
|
49
|
+
s as SelectFilterChip,
|
|
50
|
+
X as SortDropdown,
|
|
51
|
+
_ as SwitchCase,
|
|
52
|
+
A as TableRenderer,
|
|
53
|
+
i as ViewMode
|
|
54
|
+
};
|
|
@@ -1,79 +1,97 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as T, V as o } from "../../chunks/types.js";
|
|
2
|
+
import { ActionBar as _ } from "./components/action-bar/action-bar.js";
|
|
3
|
+
import "./components/filter-row/filter-row.js";
|
|
4
|
+
import "../../chunks/form-filter-chip.js";
|
|
5
|
+
import "./components/filter-row/metadata-filter-chip.js";
|
|
6
|
+
import "./components/filter-row/select-filter-chip.js";
|
|
7
|
+
import "./components/filter-sidepanel/filter.js";
|
|
8
|
+
import "./components/filter-sidepanel/filter-side-panel.js";
|
|
9
|
+
import "./components/item-action-menu/item-action-menu.js";
|
|
10
|
+
import { MetadataGrid as x } from "./components/metadata-grid/metadata-grid.js";
|
|
11
|
+
import { MetadataTable as E } from "./components/metadata-table/metadata-table.js";
|
|
12
|
+
import "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
13
|
+
import "./components/metadata-table/table-renderer.js";
|
|
14
|
+
import "./components/metadata-value/metadata-file-chip.js";
|
|
15
|
+
import "./components/metadata-value/metadata-file-field.js";
|
|
16
|
+
import "./components/metadata-value/metadata-location-field.js";
|
|
17
|
+
import "./components/metadata-value/metadata-radio-field.js";
|
|
18
|
+
import "./components/metadata-value/metadata-search-field.js";
|
|
19
|
+
import { Pagination as N } from "./components/pagination/pagination.js";
|
|
20
|
+
import "./components/pagination/marker-based-pagination.js";
|
|
21
|
+
import "./components/pagination/offset-based-pagination.js";
|
|
22
|
+
import "./components/pagination/pagination-controls.js";
|
|
23
|
+
import "./components/sort-dropdown/sort-dropdown.js";
|
|
24
|
+
import { SwitchCase as b, Case as a } from "./components/switch-case/switch-case.js";
|
|
25
|
+
import { TooltipProvider as g } from "@box/blueprint-web";
|
|
2
26
|
import { useState as f } from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { SwitchCase as N, Case as m } from "./components/switch-case/switch-case.js";
|
|
7
|
-
import { I as b, V as o } from "../../chunks/types.js";
|
|
8
|
-
import { jsx as t, jsxs as h, Fragment as g } from "react/jsx-runtime";
|
|
9
|
-
import { ActionBar as k } from "./components/action-bar/action-bar.js";
|
|
10
|
-
import D from "./components/empty-state/empty-state.js";
|
|
11
|
-
import G from "./components/metadata-table/metadata-table.js";
|
|
27
|
+
import { jsx as t, jsxs as h, Fragment as k } from "react/jsx-runtime";
|
|
28
|
+
import { ErrorState as D } from "./components/error-state/error-state.js";
|
|
29
|
+
import G from "./components/empty-state/empty-state.js";
|
|
12
30
|
import '../../styles/metadata-view.css';const j = "_container_nykl3_5", R = "_contentContainer_nykl3_14", M = {
|
|
13
31
|
container: j,
|
|
14
32
|
contentContainer: R
|
|
15
33
|
};
|
|
16
|
-
function
|
|
17
|
-
actionBarProps:
|
|
34
|
+
function st({
|
|
35
|
+
actionBarProps: n,
|
|
18
36
|
columns: c,
|
|
19
|
-
tableProps:
|
|
37
|
+
tableProps: p,
|
|
20
38
|
hasError: u,
|
|
21
39
|
onRefresh: I,
|
|
22
40
|
initialViewMode: S = o.LIST,
|
|
23
|
-
paginationProps:
|
|
24
|
-
isLoading:
|
|
41
|
+
paginationProps: l,
|
|
42
|
+
isLoading: d,
|
|
25
43
|
...r
|
|
26
44
|
}) {
|
|
27
|
-
const [e,
|
|
28
|
-
e === o.LIST ?
|
|
29
|
-
}, v = !
|
|
45
|
+
const [e, s] = f(S), [m, V] = f(0), w = () => {
|
|
46
|
+
e === o.LIST ? s(o.GRID) : s(o.LIST);
|
|
47
|
+
}, v = !d && r.items.length === 0, y = n && n.sortDropdownProps && c.filter((i) => i.type !== "multiSelect" && i.type !== "enum").map((i) => i.textValue), {
|
|
30
48
|
iconColumnVariant: C
|
|
31
|
-
} =
|
|
32
|
-
return /* @__PURE__ */ t(
|
|
49
|
+
} = p || {}, L = C && C === T.COLUMN;
|
|
50
|
+
return /* @__PURE__ */ t(g, {
|
|
33
51
|
children: /* @__PURE__ */ t("div", {
|
|
34
52
|
className: M.container,
|
|
35
|
-
children: u ? /* @__PURE__ */ t(
|
|
53
|
+
children: u ? /* @__PURE__ */ t(D, {
|
|
36
54
|
onRefresh: I
|
|
37
|
-
}) : /* @__PURE__ */ h(
|
|
38
|
-
children: [/* @__PURE__ */ t(
|
|
39
|
-
...
|
|
55
|
+
}) : /* @__PURE__ */ h(k, {
|
|
56
|
+
children: [/* @__PURE__ */ t(_, {
|
|
57
|
+
...n,
|
|
40
58
|
isIconColumnEnabled: L,
|
|
41
59
|
onViewModeClick: w,
|
|
42
60
|
onZoomLevelChange: V,
|
|
43
61
|
sortableColumnNames: y,
|
|
44
62
|
viewMode: e,
|
|
45
|
-
zoomLevel:
|
|
63
|
+
zoomLevel: m
|
|
46
64
|
}), /* @__PURE__ */ t("div", {
|
|
47
65
|
className: M.contentContainer,
|
|
48
|
-
children: /* @__PURE__ */ h(
|
|
49
|
-
children: [/* @__PURE__ */ t(
|
|
66
|
+
children: /* @__PURE__ */ h(b, {
|
|
67
|
+
children: [/* @__PURE__ */ t(a, {
|
|
50
68
|
condition: v,
|
|
51
|
-
children: /* @__PURE__ */ t(
|
|
52
|
-
}), /* @__PURE__ */ t(
|
|
69
|
+
children: /* @__PURE__ */ t(G, {})
|
|
70
|
+
}), /* @__PURE__ */ t(a, {
|
|
53
71
|
condition: e === o.LIST,
|
|
54
|
-
children: /* @__PURE__ */ t(
|
|
72
|
+
children: /* @__PURE__ */ t(E, {
|
|
55
73
|
columns: c,
|
|
56
|
-
isLoading:
|
|
57
|
-
zoomLevel:
|
|
74
|
+
isLoading: d,
|
|
75
|
+
zoomLevel: m,
|
|
58
76
|
...r,
|
|
59
|
-
...
|
|
77
|
+
...p
|
|
60
78
|
})
|
|
61
|
-
}), /* @__PURE__ */ t(
|
|
79
|
+
}), /* @__PURE__ */ t(a, {
|
|
62
80
|
condition: e === o.GRID,
|
|
63
|
-
children: /* @__PURE__ */ t(
|
|
64
|
-
zoomLevel:
|
|
81
|
+
children: /* @__PURE__ */ t(x, {
|
|
82
|
+
zoomLevel: m,
|
|
65
83
|
...r
|
|
66
84
|
})
|
|
67
85
|
})]
|
|
68
86
|
})
|
|
69
|
-
}),
|
|
70
|
-
...
|
|
87
|
+
}), l && /* @__PURE__ */ t(N, {
|
|
88
|
+
...l
|
|
71
89
|
})]
|
|
72
90
|
})
|
|
73
91
|
})
|
|
74
92
|
});
|
|
75
93
|
}
|
|
76
94
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
95
|
+
st as MetadataView,
|
|
96
|
+
st as default
|
|
79
97
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './lib
|
|
2
|
-
export * from './lib/types';
|
|
1
|
+
export * from './lib';
|
|
@@ -16,4 +16,4 @@ interface ActionBarInternalProps extends ActionBarProps {
|
|
|
16
16
|
sortableColumnNames: string[];
|
|
17
17
|
}
|
|
18
18
|
export declare const ActionBar: ({ isIconColumnEnabled, isViewModeButtonDisabled, onViewModeClick, onZoomLevelChange, sortableColumnNames, sortDropdownProps, viewMode, zoomLevel, ...rest }: ActionBarInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export
|
|
19
|
+
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ActionBar } from './action-bar';
|
|
2
|
+
export type { ActionBarProps } from './action-bar';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
interface ErrorStateProps {
|
|
1
|
+
export interface ErrorStateProps {
|
|
2
2
|
onRefresh?: () => void;
|
|
3
3
|
}
|
|
4
|
-
declare const ErrorState: ({ onRefresh }: ErrorStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export default ErrorState;
|
|
4
|
+
export declare const ErrorState: ({ onRefresh }: ErrorStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorState } from './error-state';
|
|
@@ -8,4 +8,3 @@ export interface FilterRowProps {
|
|
|
8
8
|
onFilterSubmit?: (fields: FilterValues) => void;
|
|
9
9
|
}
|
|
10
10
|
export declare const FilterRow: ({ predefinedFilterOptions, filterGroups: customFilterGroups, initialFilterValues: customFilterValues, isAllFiltersDisabled, onFilterSubmit, }: FilterRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default FilterRow;
|