@box/metadata-view 0.48.5 → 0.48.7
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/esm/index.js +41 -39
- package/dist/esm/lib/components/filter-row/filter-row.js +10 -9
- package/dist/esm/lib/components/filter-row/index.js +6 -4
- package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +6 -0
- package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js +20 -3
- package/dist/esm/lib/components/filter-row/predefinedFilters/use-predefined-filter.js +6 -5
- package/dist/esm/lib/components/index.js +39 -37
- package/dist/esm/lib/components/metadata-table/metadata-table.js +55 -52
- package/dist/esm/lib/index.js +41 -39
- package/dist/esm/lib/metadata-view.js +4 -3
- package/dist/types/lib/components/filter-row/index.d.ts +1 -0
- package/dist/types/lib/components/filter-row/predefinedFilters/index.d.ts +1 -0
- package/dist/types/lib/components/filter-row/predefinedFilters/types.d.ts +1 -1
- package/dist/types/lib/types.d.ts +1 -1
- package/package.json +4 -4
- package/dist/chunks/predefined-filter-options-factory.js +0 -25
package/dist/esm/index.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { MetadataView as
|
|
1
|
+
import { MetadataView as o } from "./lib/metadata-view.js";
|
|
2
2
|
import { I as a, V as i } from "../chunks/types.js";
|
|
3
3
|
import { ActionBar as m } from "./lib/components/action-bar/action-bar.js";
|
|
4
4
|
import { FilterRow as x } from "./lib/components/filter-row/filter-row.js";
|
|
5
5
|
import { F as n } from "../chunks/form-filter-chip.js";
|
|
6
6
|
import { MetadataFilterChip as F } from "./lib/components/filter-row/metadata-filter-chip.js";
|
|
7
7
|
import { SelectFilterChip as s } from "./lib/components/filter-row/select-filter-chip.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
8
|
+
import { PredefinedFilterName as c } from "./lib/components/filter-row/predefinedFilters/index.js";
|
|
9
|
+
import { Filter as P } from "./lib/components/filter-sidepanel/filter.js";
|
|
10
|
+
import { FilterSidePanel as w } from "./lib/components/filter-sidepanel/filter-side-panel.js";
|
|
11
|
+
import { ItemActionMenu as I } from "./lib/components/item-action-menu/item-action-menu.js";
|
|
12
|
+
import { MetadataGrid as B } from "./lib/components/metadata-grid/metadata-grid.js";
|
|
13
|
+
import { MetadataTable as b } from "./lib/components/metadata-table/metadata-table.js";
|
|
14
|
+
import { InlineEditingCell as A } from "./lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
15
|
+
import { TableRenderer as k } from "./lib/components/metadata-table/table-renderer.js";
|
|
16
|
+
import { MetadataFileChip as E } from "./lib/components/metadata-value/metadata-file-chip.js";
|
|
17
|
+
import { MetadataFileField as L } from "./lib/components/metadata-value/metadata-file-field.js";
|
|
18
|
+
import { MetadataLocationField as O } from "./lib/components/metadata-value/metadata-location-field.js";
|
|
19
|
+
import { MetadataRadioField as q } from "./lib/components/metadata-value/metadata-radio-field.js";
|
|
20
|
+
import { MetadataSearchField as y } from "./lib/components/metadata-value/metadata-search-field.js";
|
|
21
|
+
import { Pagination as H } from "./lib/components/pagination/pagination.js";
|
|
22
|
+
import { MarkerBasedPagination as K } from "./lib/components/pagination/marker-based-pagination.js";
|
|
23
|
+
import { OffsetBasedPagination as U } from "./lib/components/pagination/offset-based-pagination.js";
|
|
24
|
+
import { PaginationControls as X } from "./lib/components/pagination/pagination-controls.js";
|
|
25
|
+
import { SortDropdown as Z } from "./lib/components/sort-dropdown/sort-dropdown.js";
|
|
26
|
+
import { Case as $, SwitchCase as ee } from "./lib/components/switch-case/switch-case.js";
|
|
26
27
|
export {
|
|
27
28
|
m as ActionBar,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
$ as Case,
|
|
30
|
+
P as Filter,
|
|
30
31
|
x as FilterRow,
|
|
31
|
-
|
|
32
|
+
w as FilterSidePanel,
|
|
32
33
|
n as FormFilterChip,
|
|
33
34
|
a as IconColumnVariant,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
A as InlineEditingCell,
|
|
36
|
+
I as ItemActionMenu,
|
|
37
|
+
K as MarkerBasedPagination,
|
|
38
|
+
E as MetadataFileChip,
|
|
39
|
+
L as MetadataFileField,
|
|
39
40
|
F as MetadataFilterChip,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
B as MetadataGrid,
|
|
42
|
+
O as MetadataLocationField,
|
|
43
|
+
q as MetadataRadioField,
|
|
44
|
+
y as MetadataSearchField,
|
|
45
|
+
b as MetadataTable,
|
|
46
|
+
o as MetadataView,
|
|
47
|
+
U as OffsetBasedPagination,
|
|
48
|
+
H as Pagination,
|
|
49
|
+
X as PaginationControls,
|
|
50
|
+
c as PredefinedFilterName,
|
|
49
51
|
s as SelectFilterChip,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
Z as SortDropdown,
|
|
53
|
+
ee as SwitchCase,
|
|
54
|
+
k as TableRenderer,
|
|
53
55
|
i as ViewMode
|
|
54
56
|
};
|
|
@@ -8,11 +8,12 @@ import { usePredefinedFilter as V } from "./predefinedFilters/use-predefined-fil
|
|
|
8
8
|
import { s as b } from "../../../../chunks/form-filter-chip.js";
|
|
9
9
|
import { jsx as e, jsxs as j } from "react/jsx-runtime";
|
|
10
10
|
import "./select-filter-chip.js";
|
|
11
|
-
|
|
11
|
+
import "./predefinedFilters/index.js";
|
|
12
|
+
const S = ({
|
|
12
13
|
predefinedFilterOptions: m,
|
|
13
14
|
containerRef: s,
|
|
14
|
-
filterGroups:
|
|
15
|
-
initialFilterValues:
|
|
15
|
+
filterGroups: p = [],
|
|
16
|
+
initialFilterValues: a,
|
|
16
17
|
isAllFiltersDisabled: n,
|
|
17
18
|
onFilterSubmit: r
|
|
18
19
|
}) => {
|
|
@@ -22,15 +23,15 @@ const P = ({
|
|
|
22
23
|
}
|
|
23
24
|
}) => {
|
|
24
25
|
r && r(i);
|
|
25
|
-
}, t = [...f, ...
|
|
26
|
+
}, t = [...f, ...p], o = t.flatMap(({
|
|
26
27
|
filters: i
|
|
27
|
-
}) => i), d = G(
|
|
28
|
+
}) => i), d = G(o, a), l = C(null);
|
|
28
29
|
return /* @__PURE__ */ e(h, {
|
|
29
30
|
enableReinitialize: !0,
|
|
30
31
|
initialValues: d,
|
|
31
32
|
onSubmit: u,
|
|
32
33
|
children: /* @__PURE__ */ e(F, {
|
|
33
|
-
ref:
|
|
34
|
+
ref: l,
|
|
34
35
|
children: /* @__PURE__ */ j(c.Group, {
|
|
35
36
|
className: b.filterChipGroup,
|
|
36
37
|
name: "metadata-view-filters",
|
|
@@ -38,14 +39,14 @@ const P = ({
|
|
|
38
39
|
children: [n ? null : /* @__PURE__ */ e(R, {
|
|
39
40
|
containerRef: s,
|
|
40
41
|
filterGroups: t
|
|
41
|
-
}),
|
|
42
|
+
}), o.filter((i) => i.shouldRenderChip).map((i) => /* @__PURE__ */ e(x, {
|
|
42
43
|
filterOption: i,
|
|
43
|
-
formRef:
|
|
44
|
+
formRef: l
|
|
44
45
|
}, i.id))]
|
|
45
46
|
})
|
|
46
47
|
})
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
S as FilterRow
|
|
51
52
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FilterRow as t } from "./filter-row.js";
|
|
2
2
|
import { F as i } from "../../../../chunks/form-filter-chip.js";
|
|
3
|
-
import { MetadataFilterChip as
|
|
4
|
-
import { SelectFilterChip as
|
|
3
|
+
import { MetadataFilterChip as m } from "./metadata-filter-chip.js";
|
|
4
|
+
import { SelectFilterChip as f } from "./select-filter-chip.js";
|
|
5
|
+
import { PredefinedFilterName as a } from "./predefinedFilters/index.js";
|
|
5
6
|
export {
|
|
6
7
|
t as FilterRow,
|
|
7
8
|
i as FormFilterChip,
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
m as MetadataFilterChip,
|
|
10
|
+
a as PredefinedFilterName,
|
|
11
|
+
f as SelectFilterChip
|
|
10
12
|
};
|
package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import "lodash/merge";
|
|
2
|
-
import {
|
|
1
|
+
import o from "lodash/merge";
|
|
2
|
+
import { PredefinedFilterName as e } from "./index.js";
|
|
3
|
+
function a(r = {}) {
|
|
4
|
+
const i = {
|
|
5
|
+
[e.KeywordSearchFilterGroup]: {
|
|
6
|
+
isDisabled: !1
|
|
7
|
+
},
|
|
8
|
+
[e.FileTypeFilterGroup]: {
|
|
9
|
+
isDisabled: !1
|
|
10
|
+
},
|
|
11
|
+
[e.LocationFilterGroup]: {
|
|
12
|
+
isDisabled: !1,
|
|
13
|
+
triggerCallback: () => {
|
|
14
|
+
console.error("Custom callback needs to be provided");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return o(i, r);
|
|
19
|
+
}
|
|
3
20
|
export {
|
|
4
|
-
|
|
21
|
+
a as predefinedFilterOptionsFactory
|
|
5
22
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useIntl as l } from "react-intl";
|
|
2
2
|
import o from "../messages.js";
|
|
3
|
-
import {
|
|
3
|
+
import { predefinedFilterOptionsFactory as a } from "./predefined-filter-options-factory.js";
|
|
4
|
+
import { PredefinedFilterName as i } from "./index.js";
|
|
4
5
|
const p = {
|
|
5
6
|
fieldType: "string",
|
|
6
7
|
id: "keyword-filter",
|
|
@@ -47,7 +48,7 @@ const p = {
|
|
|
47
48
|
title: e(o.fileTypeFilterTitle),
|
|
48
49
|
toggleable: !0
|
|
49
50
|
}];
|
|
50
|
-
},
|
|
51
|
+
}, m = ({
|
|
51
52
|
isDisabled: t,
|
|
52
53
|
...e
|
|
53
54
|
}) => {
|
|
@@ -62,10 +63,10 @@ const p = {
|
|
|
62
63
|
title: r(o.locationFilterTitle),
|
|
63
64
|
toggleable: !0
|
|
64
65
|
}];
|
|
65
|
-
},
|
|
66
|
-
const e = a(t), r = d(e[i.KeywordSearchFilterGroup]), n = u(e[i.FileTypeFilterGroup]), s =
|
|
66
|
+
}, h = (t = {}) => {
|
|
67
|
+
const e = a(t), r = d(e[i.KeywordSearchFilterGroup]), n = u(e[i.FileTypeFilterGroup]), s = m(e[i.LocationFilterGroup]);
|
|
67
68
|
return [...r, ...n, ...s];
|
|
68
69
|
};
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
h as usePredefinedFilter
|
|
71
72
|
};
|
|
@@ -3,47 +3,49 @@ import { FilterRow as a } from "./filter-row/filter-row.js";
|
|
|
3
3
|
import { F as p } from "../../../chunks/form-filter-chip.js";
|
|
4
4
|
import { MetadataFilterChip as m } from "./filter-row/metadata-filter-chip.js";
|
|
5
5
|
import { SelectFilterChip as d } from "./filter-row/select-filter-chip.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
6
|
+
import { PredefinedFilterName as n } from "./filter-row/predefinedFilters/index.js";
|
|
7
|
+
import { Filter as M } from "./filter-sidepanel/filter.js";
|
|
8
|
+
import { FilterSidePanel as s } from "./filter-sidepanel/filter-side-panel.js";
|
|
9
|
+
import { ItemActionMenu as h } from "./item-action-menu/item-action-menu.js";
|
|
10
|
+
import { MetadataGrid as g } from "./metadata-grid/metadata-grid.js";
|
|
11
|
+
import { MetadataTable as w } from "./metadata-table/metadata-table.js";
|
|
12
|
+
import { InlineEditingCell as R } from "./metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
13
|
+
import { TableRenderer as A } from "./metadata-table/table-renderer.js";
|
|
14
|
+
import { MetadataFileChip as T } from "./metadata-value/metadata-file-chip.js";
|
|
15
|
+
import { MetadataFileField as u } from "./metadata-value/metadata-file-field.js";
|
|
16
|
+
import { MetadataLocationField as E } from "./metadata-value/metadata-location-field.js";
|
|
17
|
+
import { MetadataRadioField as L } from "./metadata-value/metadata-radio-field.js";
|
|
18
|
+
import { MetadataSearchField as O } from "./metadata-value/metadata-search-field.js";
|
|
19
|
+
import { Pagination as q } from "./pagination/pagination.js";
|
|
20
|
+
import { MarkerBasedPagination as y } from "./pagination/marker-based-pagination.js";
|
|
21
|
+
import { OffsetBasedPagination as H } from "./pagination/offset-based-pagination.js";
|
|
22
|
+
import { PaginationControls as K } from "./pagination/pagination-controls.js";
|
|
23
|
+
import { SortDropdown as U } from "./sort-dropdown/sort-dropdown.js";
|
|
24
|
+
import { Case as W, SwitchCase as X } from "./switch-case/switch-case.js";
|
|
24
25
|
export {
|
|
25
26
|
o as ActionBar,
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
W as Case,
|
|
28
|
+
M as Filter,
|
|
28
29
|
a as FilterRow,
|
|
29
|
-
|
|
30
|
+
s as FilterSidePanel,
|
|
30
31
|
p as FormFilterChip,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
R as InlineEditingCell,
|
|
33
|
+
h as ItemActionMenu,
|
|
34
|
+
y as MarkerBasedPagination,
|
|
35
|
+
T as MetadataFileChip,
|
|
36
|
+
u as MetadataFileField,
|
|
36
37
|
m as MetadataFilterChip,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
g as MetadataGrid,
|
|
39
|
+
E as MetadataLocationField,
|
|
40
|
+
L as MetadataRadioField,
|
|
41
|
+
O as MetadataSearchField,
|
|
42
|
+
w as MetadataTable,
|
|
43
|
+
H as OffsetBasedPagination,
|
|
44
|
+
q as Pagination,
|
|
45
|
+
K as PaginationControls,
|
|
46
|
+
n as PredefinedFilterName,
|
|
45
47
|
d as SelectFilterChip,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
U as SortDropdown,
|
|
49
|
+
X as SwitchCase,
|
|
50
|
+
A as TableRenderer
|
|
49
51
|
};
|
|
@@ -1,46 +1,46 @@
|
|
|
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 k } from "react-intl";
|
|
3
|
+
import { Text as B, ListCheckbox as O, TableHeader as P, Column as U } from "@box/blueprint-web";
|
|
4
|
+
import { useInfiniteScrollTableItems as j } from "./hooks/useInfiniteScrollTableItems.js";
|
|
5
|
+
import { TableRenderer as T } 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: i = !1,
|
|
15
15
|
iconColumnVariant: n,
|
|
16
|
-
isSelectAllEnabled:
|
|
17
|
-
items:
|
|
18
|
-
itemActionMenuProps:
|
|
19
|
-
isInfiniteScrollEnabled:
|
|
20
|
-
hasNextPage:
|
|
21
|
-
onInlineEditChange:
|
|
22
|
-
onGetNextPage:
|
|
23
|
-
placeholderRowsCount:
|
|
16
|
+
isSelectAllEnabled: m,
|
|
17
|
+
items: d,
|
|
18
|
+
itemActionMenuProps: R,
|
|
19
|
+
isInfiniteScrollEnabled: x = !1,
|
|
20
|
+
hasNextPage: w = !1,
|
|
21
|
+
onInlineEditChange: g,
|
|
22
|
+
onGetNextPage: y,
|
|
23
|
+
placeholderRowsCount: C,
|
|
24
24
|
zoomLevel: r,
|
|
25
|
-
...
|
|
25
|
+
...W
|
|
26
26
|
}) => {
|
|
27
27
|
var u;
|
|
28
28
|
const {
|
|
29
29
|
formatMessage: c
|
|
30
|
-
} =
|
|
30
|
+
} = k(), f = E(null), {
|
|
31
31
|
virtualItemsToDisplay: p,
|
|
32
|
-
getTableHeight:
|
|
33
|
-
} =
|
|
34
|
-
items:
|
|
35
|
-
hasNextPage:
|
|
32
|
+
getTableHeight: A
|
|
33
|
+
} = j({
|
|
34
|
+
items: d,
|
|
35
|
+
hasNextPage: w,
|
|
36
36
|
isLoading: i,
|
|
37
37
|
parentRef: f,
|
|
38
|
-
onGetNextPage:
|
|
39
|
-
placeholderRowsCount:
|
|
40
|
-
}), a = [],
|
|
41
|
-
if (n ===
|
|
42
|
-
r = r ||
|
|
43
|
-
const t = parseInt(
|
|
38
|
+
onGetNextPage: y,
|
|
39
|
+
placeholderRowsCount: C
|
|
40
|
+
}), a = [], N = 0;
|
|
41
|
+
if (n === F.COLUMN) {
|
|
42
|
+
r = r || N;
|
|
43
|
+
const t = parseInt(G[r], 10) + 24;
|
|
44
44
|
a.push({
|
|
45
45
|
id: "item-type-icon",
|
|
46
46
|
isRowHeader: !1,
|
|
@@ -49,32 +49,35 @@ const G = 40, ee = ({
|
|
|
49
49
|
maxWidth: t
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const D = o.map((t) => {
|
|
53
53
|
const {
|
|
54
54
|
id: H,
|
|
55
|
-
isItemMetadata:
|
|
55
|
+
isItemMetadata: S,
|
|
56
|
+
isRowHeader: _,
|
|
56
57
|
headerRenderer: b,
|
|
57
58
|
textValue: l,
|
|
58
|
-
|
|
59
|
+
type: I,
|
|
60
|
+
...v
|
|
59
61
|
} = t;
|
|
60
62
|
return {
|
|
61
|
-
|
|
63
|
+
...v,
|
|
64
|
+
children: b ? b(l, t) : /* @__PURE__ */ e(B, {
|
|
62
65
|
as: "span",
|
|
63
66
|
children: l
|
|
64
67
|
}),
|
|
65
|
-
isRowHeader: H === "name",
|
|
66
|
-
id:
|
|
68
|
+
isRowHeader: H === "name" || _,
|
|
69
|
+
id: S ? "item.{id}" : H,
|
|
67
70
|
textValue: l,
|
|
68
|
-
|
|
71
|
+
allowsSorting: I !== "multiSelect" && I !== "enum"
|
|
69
72
|
};
|
|
70
73
|
});
|
|
71
|
-
a.push(...
|
|
74
|
+
a.push(...D), m && a.push({
|
|
72
75
|
id: "actions",
|
|
73
76
|
className: s.tableHeaderActions,
|
|
74
77
|
children: /* @__PURE__ */ e("div", {
|
|
75
78
|
className: s.tableHeaderActionsWrapper,
|
|
76
|
-
children: /* @__PURE__ */ e(
|
|
77
|
-
"aria-label": c(
|
|
79
|
+
children: /* @__PURE__ */ e(O, {
|
|
80
|
+
"aria-label": c(L.selectAll),
|
|
78
81
|
className: s.selectAllCheckbox,
|
|
79
82
|
isDisabled: i
|
|
80
83
|
})
|
|
@@ -83,9 +86,9 @@ const G = 40, ee = ({
|
|
|
83
86
|
hideHeader: !1,
|
|
84
87
|
allowsSorting: !1
|
|
85
88
|
});
|
|
86
|
-
const
|
|
89
|
+
const M = /* @__PURE__ */ e(P, {
|
|
87
90
|
columns: a,
|
|
88
|
-
children: (t) => /* @__PURE__ */ e(
|
|
91
|
+
children: (t) => /* @__PURE__ */ e(U, {
|
|
89
92
|
...t
|
|
90
93
|
})
|
|
91
94
|
}), h = {
|
|
@@ -94,24 +97,24 @@ const G = 40, ee = ({
|
|
|
94
97
|
formatMessage: c,
|
|
95
98
|
iconColumnVariant: n,
|
|
96
99
|
isLoading: i,
|
|
97
|
-
isSelectAllEnabled:
|
|
98
|
-
itemActionMenuProps:
|
|
99
|
-
items:
|
|
100
|
-
onInlineEditChange:
|
|
101
|
-
tableHeader:
|
|
102
|
-
tableProps:
|
|
100
|
+
isSelectAllEnabled: m,
|
|
101
|
+
itemActionMenuProps: R,
|
|
102
|
+
items: d,
|
|
103
|
+
onInlineEditChange: g,
|
|
104
|
+
tableHeader: M,
|
|
105
|
+
tableProps: W,
|
|
103
106
|
zoomLevel: r
|
|
104
107
|
};
|
|
105
|
-
return
|
|
108
|
+
return x ? /* @__PURE__ */ e("div", {
|
|
106
109
|
ref: f,
|
|
107
110
|
className: s.infiniteScrollTableContainerFullHeight,
|
|
108
111
|
children: /* @__PURE__ */ e("div", {
|
|
109
112
|
style: {
|
|
110
113
|
position: "relative",
|
|
111
114
|
width: "100%",
|
|
112
|
-
height:
|
|
115
|
+
height: A() + V
|
|
113
116
|
},
|
|
114
|
-
children: /* @__PURE__ */ e(
|
|
117
|
+
children: /* @__PURE__ */ e(T, {
|
|
115
118
|
...h,
|
|
116
119
|
style: {
|
|
117
120
|
position: "absolute",
|
|
@@ -124,10 +127,10 @@ const G = 40, ee = ({
|
|
|
124
127
|
virtualItems: p
|
|
125
128
|
})
|
|
126
129
|
})
|
|
127
|
-
}) : /* @__PURE__ */ e(
|
|
130
|
+
}) : /* @__PURE__ */ e(T, {
|
|
128
131
|
...h
|
|
129
132
|
});
|
|
130
133
|
};
|
|
131
134
|
export {
|
|
132
|
-
|
|
135
|
+
ae as MetadataTable
|
|
133
136
|
};
|
package/dist/esm/lib/index.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { MetadataView as
|
|
1
|
+
import { MetadataView as o } from "./metadata-view.js";
|
|
2
2
|
import { I as a, V as i } from "../../chunks/types.js";
|
|
3
3
|
import { ActionBar as m } from "./components/action-bar/action-bar.js";
|
|
4
4
|
import { FilterRow as x } from "./components/filter-row/filter-row.js";
|
|
5
5
|
import { F as n } from "../../chunks/form-filter-chip.js";
|
|
6
6
|
import { MetadataFilterChip as F } from "./components/filter-row/metadata-filter-chip.js";
|
|
7
7
|
import { SelectFilterChip as s } from "./components/filter-row/select-filter-chip.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
8
|
+
import { PredefinedFilterName as c } from "./components/filter-row/predefinedFilters/index.js";
|
|
9
|
+
import { Filter as P } from "./components/filter-sidepanel/filter.js";
|
|
10
|
+
import { FilterSidePanel as w } from "./components/filter-sidepanel/filter-side-panel.js";
|
|
11
|
+
import { ItemActionMenu as I } from "./components/item-action-menu/item-action-menu.js";
|
|
12
|
+
import { MetadataGrid as B } from "./components/metadata-grid/metadata-grid.js";
|
|
13
|
+
import { MetadataTable as b } from "./components/metadata-table/metadata-table.js";
|
|
14
|
+
import { InlineEditingCell as A } from "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
15
|
+
import { TableRenderer as k } from "./components/metadata-table/table-renderer.js";
|
|
16
|
+
import { MetadataFileChip as E } from "./components/metadata-value/metadata-file-chip.js";
|
|
17
|
+
import { MetadataFileField as L } from "./components/metadata-value/metadata-file-field.js";
|
|
18
|
+
import { MetadataLocationField as O } from "./components/metadata-value/metadata-location-field.js";
|
|
19
|
+
import { MetadataRadioField as q } from "./components/metadata-value/metadata-radio-field.js";
|
|
20
|
+
import { MetadataSearchField as y } from "./components/metadata-value/metadata-search-field.js";
|
|
21
|
+
import { Pagination as H } from "./components/pagination/pagination.js";
|
|
22
|
+
import { MarkerBasedPagination as K } from "./components/pagination/marker-based-pagination.js";
|
|
23
|
+
import { OffsetBasedPagination as U } from "./components/pagination/offset-based-pagination.js";
|
|
24
|
+
import { PaginationControls as X } from "./components/pagination/pagination-controls.js";
|
|
25
|
+
import { SortDropdown as Z } from "./components/sort-dropdown/sort-dropdown.js";
|
|
26
|
+
import { Case as $, SwitchCase as ee } from "./components/switch-case/switch-case.js";
|
|
26
27
|
export {
|
|
27
28
|
m as ActionBar,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
$ as Case,
|
|
30
|
+
P as Filter,
|
|
30
31
|
x as FilterRow,
|
|
31
|
-
|
|
32
|
+
w as FilterSidePanel,
|
|
32
33
|
n as FormFilterChip,
|
|
33
34
|
a as IconColumnVariant,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
A as InlineEditingCell,
|
|
36
|
+
I as ItemActionMenu,
|
|
37
|
+
K as MarkerBasedPagination,
|
|
38
|
+
E as MetadataFileChip,
|
|
39
|
+
L as MetadataFileField,
|
|
39
40
|
F as MetadataFilterChip,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
B as MetadataGrid,
|
|
42
|
+
O as MetadataLocationField,
|
|
43
|
+
q as MetadataRadioField,
|
|
44
|
+
y as MetadataSearchField,
|
|
45
|
+
b as MetadataTable,
|
|
46
|
+
o as MetadataView,
|
|
47
|
+
U as OffsetBasedPagination,
|
|
48
|
+
H as Pagination,
|
|
49
|
+
X as PaginationControls,
|
|
50
|
+
c as PredefinedFilterName,
|
|
49
51
|
s as SelectFilterChip,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
Z as SortDropdown,
|
|
53
|
+
ee as SwitchCase,
|
|
54
|
+
k as TableRenderer,
|
|
53
55
|
i as ViewMode
|
|
54
56
|
};
|
|
@@ -4,6 +4,7 @@ import "./components/filter-row/filter-row.js";
|
|
|
4
4
|
import "../../chunks/form-filter-chip.js";
|
|
5
5
|
import "./components/filter-row/metadata-filter-chip.js";
|
|
6
6
|
import "./components/filter-row/select-filter-chip.js";
|
|
7
|
+
import "./components/filter-row/predefinedFilters/index.js";
|
|
7
8
|
import "./components/filter-sidepanel/filter.js";
|
|
8
9
|
import "./components/filter-sidepanel/filter-side-panel.js";
|
|
9
10
|
import "./components/item-action-menu/item-action-menu.js";
|
|
@@ -31,7 +32,7 @@ import '../../styles/metadata-view.css';const Z = "_container_nykl3_5", z = "_co
|
|
|
31
32
|
container: Z,
|
|
32
33
|
contentContainer: z
|
|
33
34
|
};
|
|
34
|
-
function
|
|
35
|
+
function ht({
|
|
35
36
|
actionBarProps: i,
|
|
36
37
|
columns: c,
|
|
37
38
|
tableProps: p,
|
|
@@ -94,6 +95,6 @@ function Ct({
|
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
ht as MetadataView,
|
|
99
|
+
ht as default
|
|
99
100
|
};
|
|
@@ -6,4 +6,5 @@ export { MetadataFilterChip } from './metadata-filter-chip';
|
|
|
6
6
|
export type { MetadataFilterChipProps } from './metadata-filter-chip';
|
|
7
7
|
export { SelectFilterChip } from './select-filter-chip';
|
|
8
8
|
export type { SelectFilterChipProps } from './select-filter-chip';
|
|
9
|
+
export * from './predefinedFilters';
|
|
9
10
|
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -9,7 +9,7 @@ export interface PredefinedFilterOption {
|
|
|
9
9
|
renderer?: (originalComponent: ReactNode) => ReactNode;
|
|
10
10
|
}
|
|
11
11
|
interface LocationFilterOptionDefinition extends PredefinedFilterOption {
|
|
12
|
-
triggerCallback
|
|
12
|
+
triggerCallback?: (folderId: string, folderName: string, isFolderShared?: boolean) => void;
|
|
13
13
|
}
|
|
14
14
|
export type LocationFilterOption = {
|
|
15
15
|
isDisabled: true;
|
|
@@ -12,7 +12,7 @@ export interface Column extends Partial<ColumnProps> {
|
|
|
12
12
|
inlineEditingOptions?: string[];
|
|
13
13
|
subtitle?: string;
|
|
14
14
|
textValue?: string;
|
|
15
|
-
type
|
|
15
|
+
type: MetadataFieldType;
|
|
16
16
|
}
|
|
17
17
|
export declare enum IconColumnVariant {
|
|
18
18
|
INLINE = "inline",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.7",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^11.12.0",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@box/blueprint-web": "^11.12.0",
|
|
22
22
|
"@box/blueprint-web-assets": "^4.65.0",
|
|
23
|
-
"@box/box-item-type-selector": "^0.69.
|
|
23
|
+
"@box/box-item-type-selector": "^0.69.5",
|
|
24
24
|
"@box/eslint-plugin-blueprint": "*",
|
|
25
|
-
"@box/item-icon": "^0.23.
|
|
26
|
-
"@box/metadata-filter": "^1.26.
|
|
25
|
+
"@box/item-icon": "^0.23.5",
|
|
26
|
+
"@box/metadata-filter": "^1.26.2",
|
|
27
27
|
"@box/storybook-utils": "0.14.1",
|
|
28
28
|
"@box/types": "0.2.1",
|
|
29
29
|
"@tanstack/react-virtual": "^3.10.8",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import i from "lodash/merge";
|
|
2
|
-
let e = /* @__PURE__ */ function(r) {
|
|
3
|
-
return r.KeywordSearchFilterGroup = "KeywordSearchFilterGroup", r.FileTypeFilterGroup = "FileTypeFilterGroup", r.LocationFilterGroup = "LocationFilterGroup", r;
|
|
4
|
-
}({});
|
|
5
|
-
function l(r = {}) {
|
|
6
|
-
const o = {
|
|
7
|
-
[e.KeywordSearchFilterGroup]: {
|
|
8
|
-
isDisabled: !1
|
|
9
|
-
},
|
|
10
|
-
[e.FileTypeFilterGroup]: {
|
|
11
|
-
isDisabled: !1
|
|
12
|
-
},
|
|
13
|
-
[e.LocationFilterGroup]: {
|
|
14
|
-
isDisabled: !1,
|
|
15
|
-
triggerCallback: () => {
|
|
16
|
-
console.error("Custom callback needs to be provided");
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return i(o, r);
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
e as P,
|
|
24
|
-
l as p
|
|
25
|
-
};
|