@box/metadata-view 0.48.4 → 0.48.6
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/all-filters-chip.js +22 -20
- package/dist/esm/lib/components/filter-row/filter-row.js +29 -26
- 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/filter-sidepanel/filter-side-panel.js +50 -48
- 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 +43 -40
- package/dist/types/lib/components/filter-row/all-filters-chip.d.ts +2 -1
- package/dist/types/lib/components/filter-row/filter-row.d.ts +2 -1
- 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/components/filter-sidepanel/filter-side-panel.d.ts +2 -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
|
};
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { FilterChip as e } from "@box/blueprint-web";
|
|
2
|
-
import { Filter as
|
|
3
|
-
import { useFormikContext as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { getInitialFieldValues as
|
|
7
|
-
import { isFilterSelected as
|
|
8
|
-
import
|
|
9
|
-
import { jsxs as a, Fragment as
|
|
10
|
-
import { FilterSidePanel as
|
|
11
|
-
const
|
|
2
|
+
import { Filter as f } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
+
import { useFormikContext as d } from "formik";
|
|
4
|
+
import { useState as u, useMemo as h } from "react";
|
|
5
|
+
import { useIntl as F } from "react-intl";
|
|
6
|
+
import { getInitialFieldValues as g } from "./initial-field-values.js";
|
|
7
|
+
import { isFilterSelected as S } from "./is-filter-selected.js";
|
|
8
|
+
import C from "./messages.js";
|
|
9
|
+
import { jsxs as a, Fragment as I, jsx as t } from "react/jsx-runtime";
|
|
10
|
+
import { FilterSidePanel as O } from "../filter-sidepanel/filter-side-panel.js";
|
|
11
|
+
const P = ({
|
|
12
|
+
containerRef: m,
|
|
12
13
|
filterGroups: l
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
15
|
-
formatMessage:
|
|
16
|
-
} =
|
|
16
|
+
formatMessage: p
|
|
17
|
+
} = F(), {
|
|
17
18
|
values: r
|
|
18
|
-
} =
|
|
19
|
-
return /* @__PURE__ */ a(
|
|
19
|
+
} = d(), [o, n] = u(!1), c = () => n(!0), s = h(() => Object.values(r.metadata.fields).filter((i) => S(i.value)).length, [r.metadata.fields]);
|
|
20
|
+
return /* @__PURE__ */ a(I, {
|
|
20
21
|
children: [
|
|
21
22
|
// We need to initialize the sidepanel state at the moment it is opened
|
|
22
|
-
o && /* @__PURE__ */ t(
|
|
23
|
+
o && /* @__PURE__ */ t(O, {
|
|
24
|
+
containerRef: m,
|
|
23
25
|
filterGroups: l,
|
|
24
|
-
getInitialFormValues: () =>
|
|
26
|
+
getInitialFormValues: () => g(l.flatMap(({
|
|
25
27
|
filters: i
|
|
26
28
|
}) => i)),
|
|
27
29
|
isOpen: o,
|
|
28
30
|
onIsOpenChange: n
|
|
29
31
|
}),
|
|
30
32
|
/* @__PURE__ */ a(e.ChipButton, {
|
|
31
|
-
onClick:
|
|
33
|
+
onClick: c,
|
|
32
34
|
value: "all-filters-chip-btn",
|
|
33
35
|
children: [/* @__PURE__ */ t(e.Icon, {
|
|
34
|
-
icon:
|
|
36
|
+
icon: f
|
|
35
37
|
}), /* @__PURE__ */ t(e.Label, {
|
|
36
|
-
children:
|
|
38
|
+
children: p(C.allFilters)
|
|
37
39
|
}), s > 0 ? /* @__PURE__ */ t(e.Status, {
|
|
38
40
|
children: s.toString()
|
|
39
41
|
}) : null]
|
|
@@ -42,5 +44,5 @@ const L = ({
|
|
|
42
44
|
});
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
P as default
|
|
46
48
|
};
|
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import { FilterChip as
|
|
2
|
-
import { Formik as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import { getInitialFieldValues as
|
|
6
|
-
import { MetadataFilterChip as
|
|
7
|
-
import { usePredefinedFilter as
|
|
8
|
-
import { s as
|
|
9
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { FilterChip as c } from "@box/blueprint-web";
|
|
2
|
+
import { Formik as h, Form as F } from "formik";
|
|
3
|
+
import { useRef as C } from "react";
|
|
4
|
+
import R from "./all-filters-chip.js";
|
|
5
|
+
import { getInitialFieldValues as G } from "./initial-field-values.js";
|
|
6
|
+
import { MetadataFilterChip as x } from "./metadata-filter-chip.js";
|
|
7
|
+
import { usePredefinedFilter as V } from "./predefinedFilters/use-predefined-filter.js";
|
|
8
|
+
import { s as b } from "../../../../chunks/form-filter-chip.js";
|
|
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,
|
|
15
|
+
filterGroups: p = [],
|
|
14
16
|
initialFilterValues: a,
|
|
15
|
-
isAllFiltersDisabled:
|
|
17
|
+
isAllFiltersDisabled: n,
|
|
16
18
|
onFilterSubmit: r
|
|
17
19
|
}) => {
|
|
18
|
-
const
|
|
20
|
+
const f = V(m), u = ({
|
|
19
21
|
metadata: {
|
|
20
22
|
fields: i
|
|
21
23
|
}
|
|
22
24
|
}) => {
|
|
23
25
|
r && r(i);
|
|
24
|
-
}, t = [...
|
|
26
|
+
}, t = [...f, ...p], o = t.flatMap(({
|
|
25
27
|
filters: i
|
|
26
|
-
}) => i),
|
|
27
|
-
return /* @__PURE__ */ e(
|
|
28
|
+
}) => i), d = G(o, a), l = C(null);
|
|
29
|
+
return /* @__PURE__ */ e(h, {
|
|
28
30
|
enableReinitialize: !0,
|
|
29
|
-
initialValues:
|
|
30
|
-
onSubmit:
|
|
31
|
-
children: /* @__PURE__ */ e(
|
|
32
|
-
ref:
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
className:
|
|
31
|
+
initialValues: d,
|
|
32
|
+
onSubmit: u,
|
|
33
|
+
children: /* @__PURE__ */ e(F, {
|
|
34
|
+
ref: l,
|
|
35
|
+
children: /* @__PURE__ */ j(c.Group, {
|
|
36
|
+
className: b.filterChipGroup,
|
|
35
37
|
name: "metadata-view-filters",
|
|
36
38
|
type: "multiple",
|
|
37
|
-
children: [
|
|
39
|
+
children: [n ? null : /* @__PURE__ */ e(R, {
|
|
40
|
+
containerRef: s,
|
|
38
41
|
filterGroups: t
|
|
39
|
-
}),
|
|
42
|
+
}), o.filter((i) => i.shouldRenderChip).map((i) => /* @__PURE__ */ e(x, {
|
|
40
43
|
filterOption: i,
|
|
41
|
-
formRef:
|
|
44
|
+
formRef: l
|
|
42
45
|
}, i.id))]
|
|
43
46
|
})
|
|
44
47
|
})
|
|
45
48
|
});
|
|
46
49
|
};
|
|
47
50
|
export {
|
|
48
|
-
|
|
51
|
+
S as FilterRow
|
|
49
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
|
};
|
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import { Filter as
|
|
1
|
+
import { Filter as B } from "./filter.js";
|
|
2
2
|
import { SidePanel as t, Accordion as c } from "@box/blueprint-web";
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import { useFormikContext as
|
|
5
|
-
import
|
|
6
|
-
import { useState as
|
|
7
|
-
import
|
|
8
|
-
import { jsx as e, jsxs as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { useIntl as k } from "react-intl";
|
|
4
|
+
import { useFormikContext as A } from "formik";
|
|
5
|
+
import P from "lodash/noop";
|
|
6
|
+
import { useState as u } from "react";
|
|
7
|
+
import o from "./messages.js";
|
|
8
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
const M = ({
|
|
10
|
+
containerRef: n,
|
|
11
|
+
filterGroups: i,
|
|
12
|
+
isOpen: p,
|
|
13
|
+
onIsOpenChange: s = P,
|
|
14
|
+
getInitialFormValues: C
|
|
14
15
|
}) => {
|
|
15
16
|
const {
|
|
16
|
-
formatMessage:
|
|
17
|
-
} =
|
|
18
|
-
handleSubmit:
|
|
19
|
-
resetForm:
|
|
20
|
-
values:
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
values:
|
|
17
|
+
formatMessage: r
|
|
18
|
+
} = k(), {
|
|
19
|
+
handleSubmit: F,
|
|
20
|
+
resetForm: m,
|
|
21
|
+
values: f
|
|
22
|
+
} = A(), [S] = u(f), [v, b] = u(null), y = () => {
|
|
23
|
+
m({
|
|
24
|
+
values: C()
|
|
24
25
|
});
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
values:
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
|
|
26
|
+
}, g = (l) => {
|
|
27
|
+
m({
|
|
28
|
+
values: S
|
|
29
|
+
}), s(l);
|
|
30
|
+
}, x = () => {
|
|
31
|
+
F(), s(!1);
|
|
31
32
|
};
|
|
32
33
|
return /* @__PURE__ */ e(t, {
|
|
33
|
-
onOpenChange:
|
|
34
|
-
open:
|
|
34
|
+
onOpenChange: g,
|
|
35
|
+
open: p,
|
|
35
36
|
variant: "overlay",
|
|
36
37
|
children: /* @__PURE__ */ e(t.Overlay, {
|
|
37
|
-
|
|
38
|
+
container: n == null ? void 0 : n.current,
|
|
39
|
+
children: /* @__PURE__ */ h(t.Content, {
|
|
38
40
|
children: [/* @__PURE__ */ e(t.Header, {
|
|
39
|
-
children:
|
|
41
|
+
children: r(o.filtersHeader)
|
|
40
42
|
}), /* @__PURE__ */ e(t.ScrollableContainer, {
|
|
41
|
-
ref:
|
|
43
|
+
ref: b,
|
|
42
44
|
children: /* @__PURE__ */ e(c, {
|
|
43
|
-
defaultValue:
|
|
45
|
+
defaultValue: i.map((l, a) => `item-${a}`),
|
|
44
46
|
type: "multiple",
|
|
45
|
-
children:
|
|
46
|
-
...
|
|
47
|
+
children: i.map((l, a) => /* @__PURE__ */ e(c.Item, {
|
|
48
|
+
...l.toggleable ? {} : {
|
|
47
49
|
fixed: "true"
|
|
48
50
|
},
|
|
49
|
-
title:
|
|
50
|
-
value: `item-${
|
|
51
|
-
children:
|
|
52
|
-
...
|
|
53
|
-
parentRef:
|
|
54
|
-
},
|
|
55
|
-
}, `accordion-item-${
|
|
51
|
+
title: l.title,
|
|
52
|
+
value: `item-${a}`,
|
|
53
|
+
children: l.filters.map((d) => /* @__PURE__ */ e(B, {
|
|
54
|
+
...d,
|
|
55
|
+
parentRef: v
|
|
56
|
+
}, d.id))
|
|
57
|
+
}, `accordion-item-${l.title || "unnamed"}`))
|
|
56
58
|
})
|
|
57
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ h(t.Footer, {
|
|
58
60
|
children: [/* @__PURE__ */ e(t.Footer.SecondaryButton, {
|
|
59
|
-
onClick:
|
|
60
|
-
children:
|
|
61
|
+
onClick: y,
|
|
62
|
+
children: r(o.clearAllButton)
|
|
61
63
|
}), /* @__PURE__ */ e(t.Footer.PrimaryButton, {
|
|
62
|
-
onClick:
|
|
63
|
-
children:
|
|
64
|
+
onClick: x,
|
|
65
|
+
children: r(o.showResultsButton)
|
|
64
66
|
})]
|
|
65
67
|
}), /* @__PURE__ */ e(t.Close, {
|
|
66
|
-
"aria-label":
|
|
68
|
+
"aria-label": r(o.closeAriaLabel)
|
|
67
69
|
})]
|
|
68
70
|
})
|
|
69
71
|
})
|
|
70
72
|
});
|
|
71
73
|
};
|
|
72
74
|
export {
|
|
73
|
-
|
|
75
|
+
M as FilterSidePanel
|
|
74
76
|
};
|
|
@@ -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
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { ActionBar as
|
|
1
|
+
import { I as _, V as o } from "../../chunks/types.js";
|
|
2
|
+
import { ActionBar as x } from "./components/action-bar/action-bar.js";
|
|
3
3
|
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";
|
|
10
|
-
import { MetadataGrid as
|
|
11
|
-
import { MetadataTable as
|
|
11
|
+
import { MetadataGrid as E } from "./components/metadata-grid/metadata-grid.js";
|
|
12
|
+
import { MetadataTable as N } from "./components/metadata-table/metadata-table.js";
|
|
12
13
|
import "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
13
14
|
import "./components/metadata-table/table-renderer.js";
|
|
14
15
|
import "./components/metadata-value/metadata-file-chip.js";
|
|
@@ -16,75 +17,77 @@ import "./components/metadata-value/metadata-file-field.js";
|
|
|
16
17
|
import "./components/metadata-value/metadata-location-field.js";
|
|
17
18
|
import "./components/metadata-value/metadata-radio-field.js";
|
|
18
19
|
import "./components/metadata-value/metadata-search-field.js";
|
|
19
|
-
import { Pagination as
|
|
20
|
+
import { Pagination as R } from "./components/pagination/pagination.js";
|
|
20
21
|
import "./components/pagination/marker-based-pagination.js";
|
|
21
22
|
import "./components/pagination/offset-based-pagination.js";
|
|
22
23
|
import "./components/pagination/pagination-controls.js";
|
|
23
24
|
import "./components/sort-dropdown/sort-dropdown.js";
|
|
24
25
|
import { SwitchCase as b, Case as a } from "./components/switch-case/switch-case.js";
|
|
25
26
|
import { TooltipProvider as g } from "@box/blueprint-web";
|
|
26
|
-
import { useState as
|
|
27
|
-
import { jsx as t, jsxs as
|
|
28
|
-
import { ErrorState as
|
|
29
|
-
import
|
|
30
|
-
import '../../styles/metadata-view.css';const
|
|
31
|
-
container:
|
|
32
|
-
contentContainer:
|
|
27
|
+
import { useState as h, useRef as k } from "react";
|
|
28
|
+
import { jsx as t, jsxs as u, Fragment as D } from "react/jsx-runtime";
|
|
29
|
+
import { ErrorState as G } from "./components/error-state/error-state.js";
|
|
30
|
+
import j from "./components/empty-state/empty-state.js";
|
|
31
|
+
import '../../styles/metadata-view.css';const Z = "_container_nykl3_5", z = "_contentContainer_nykl3_14", M = {
|
|
32
|
+
container: Z,
|
|
33
|
+
contentContainer: z
|
|
33
34
|
};
|
|
34
|
-
function
|
|
35
|
-
actionBarProps:
|
|
35
|
+
function ht({
|
|
36
|
+
actionBarProps: i,
|
|
36
37
|
columns: c,
|
|
37
38
|
tableProps: p,
|
|
38
|
-
hasError:
|
|
39
|
-
onRefresh:
|
|
40
|
-
initialViewMode:
|
|
39
|
+
hasError: I,
|
|
40
|
+
onRefresh: S,
|
|
41
|
+
initialViewMode: V = o.LIST,
|
|
41
42
|
paginationProps: l,
|
|
42
|
-
isLoading:
|
|
43
|
+
isLoading: s,
|
|
43
44
|
...r
|
|
44
45
|
}) {
|
|
45
|
-
const [e,
|
|
46
|
-
e === o.LIST ?
|
|
47
|
-
},
|
|
46
|
+
const [e, d] = h(V), [m, w] = h(0), f = k(null), v = () => {
|
|
47
|
+
e === o.LIST ? d(o.GRID) : d(o.LIST);
|
|
48
|
+
}, y = !s && r.items.length === 0, L = i && i.sortDropdownProps && c.filter((n) => n.type !== "multiSelect" && n.type !== "enum").map((n) => n.textValue), {
|
|
48
49
|
iconColumnVariant: C
|
|
49
|
-
} = p || {},
|
|
50
|
+
} = p || {}, T = C && C === _.COLUMN;
|
|
50
51
|
return /* @__PURE__ */ t(g, {
|
|
51
52
|
children: /* @__PURE__ */ t("div", {
|
|
53
|
+
ref: f,
|
|
52
54
|
className: M.container,
|
|
53
|
-
children:
|
|
54
|
-
onRefresh:
|
|
55
|
-
}) : /* @__PURE__ */
|
|
56
|
-
children: [/* @__PURE__ */ t(
|
|
57
|
-
...
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
children: I ? /* @__PURE__ */ t(G, {
|
|
56
|
+
onRefresh: S
|
|
57
|
+
}) : /* @__PURE__ */ u(D, {
|
|
58
|
+
children: [/* @__PURE__ */ t(x, {
|
|
59
|
+
...i,
|
|
60
|
+
containerRef: f,
|
|
61
|
+
isIconColumnEnabled: T,
|
|
62
|
+
onViewModeClick: v,
|
|
63
|
+
onZoomLevelChange: w,
|
|
64
|
+
sortableColumnNames: L,
|
|
62
65
|
viewMode: e,
|
|
63
66
|
zoomLevel: m
|
|
64
67
|
}), /* @__PURE__ */ t("div", {
|
|
65
68
|
className: M.contentContainer,
|
|
66
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ u(b, {
|
|
67
70
|
children: [/* @__PURE__ */ t(a, {
|
|
68
|
-
condition:
|
|
69
|
-
children: /* @__PURE__ */ t(
|
|
71
|
+
condition: y,
|
|
72
|
+
children: /* @__PURE__ */ t(j, {})
|
|
70
73
|
}), /* @__PURE__ */ t(a, {
|
|
71
74
|
condition: e === o.LIST,
|
|
72
|
-
children: /* @__PURE__ */ t(
|
|
75
|
+
children: /* @__PURE__ */ t(N, {
|
|
73
76
|
columns: c,
|
|
74
|
-
isLoading:
|
|
77
|
+
isLoading: s,
|
|
75
78
|
zoomLevel: m,
|
|
76
79
|
...r,
|
|
77
80
|
...p
|
|
78
81
|
})
|
|
79
82
|
}), /* @__PURE__ */ t(a, {
|
|
80
83
|
condition: e === o.GRID,
|
|
81
|
-
children: /* @__PURE__ */ t(
|
|
84
|
+
children: /* @__PURE__ */ t(E, {
|
|
82
85
|
zoomLevel: m,
|
|
83
86
|
...r
|
|
84
87
|
})
|
|
85
88
|
})]
|
|
86
89
|
})
|
|
87
|
-
}), l && /* @__PURE__ */ t(
|
|
90
|
+
}), l && /* @__PURE__ */ t(R, {
|
|
88
91
|
...l
|
|
89
92
|
})]
|
|
90
93
|
})
|
|
@@ -92,6 +95,6 @@ function st({
|
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
97
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
ht as MetadataView,
|
|
99
|
+
ht as default
|
|
97
100
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FilterGroup } from './types';
|
|
2
2
|
interface AllFiltersChipProps {
|
|
3
|
+
containerRef?: React.RefObject<HTMLElement>;
|
|
3
4
|
filterGroups: Array<FilterGroup>;
|
|
4
5
|
}
|
|
5
|
-
declare const AllFiltersChip: ({ filterGroups }: AllFiltersChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const AllFiltersChip: ({ containerRef, filterGroups }: AllFiltersChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default AllFiltersChip;
|
|
@@ -2,9 +2,10 @@ import { PredefinedFilterOptions } from './predefinedFilters/types';
|
|
|
2
2
|
import { FilterGroup, FilterValues, InitialFilterValues } from './types';
|
|
3
3
|
export interface FilterRowProps {
|
|
4
4
|
predefinedFilterOptions?: Partial<PredefinedFilterOptions>;
|
|
5
|
+
containerRef?: React.RefObject<HTMLElement>;
|
|
5
6
|
filterGroups?: Array<FilterGroup>;
|
|
6
7
|
initialFilterValues?: InitialFilterValues;
|
|
7
8
|
isAllFiltersDisabled?: boolean;
|
|
8
9
|
onFilterSubmit?: (fields: FilterValues) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare const FilterRow: ({ predefinedFilterOptions, filterGroups: customFilterGroups, initialFilterValues: customFilterValues, isAllFiltersDisabled, onFilterSubmit, }: FilterRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const FilterRow: ({ predefinedFilterOptions, containerRef, filterGroups: customFilterGroups, initialFilterValues: customFilterValues, isAllFiltersDisabled, onFilterSubmit, }: FilterRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FilterGroup } from '../filter-row/types';
|
|
2
2
|
export interface FilterSidePanelProps {
|
|
3
|
+
containerRef?: React.RefObject<HTMLElement>;
|
|
3
4
|
filterGroups: Array<FilterGroup>;
|
|
4
5
|
isOpen?: boolean;
|
|
5
6
|
onIsOpenChange?: (isOpen: boolean) => void;
|
|
6
7
|
getInitialFormValues: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const FilterSidePanel: ({ filterGroups, isOpen, onIsOpenChange, getInitialFormValues, }: FilterSidePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const FilterSidePanel: ({ containerRef, filterGroups, isOpen, onIsOpenChange, getInitialFormValues, }: FilterSidePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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.6",
|
|
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.4",
|
|
24
24
|
"@box/eslint-plugin-blueprint": "*",
|
|
25
|
-
"@box/item-icon": "^0.23.
|
|
26
|
-
"@box/metadata-filter": "^1.26.
|
|
25
|
+
"@box/item-icon": "^0.23.4",
|
|
26
|
+
"@box/metadata-filter": "^1.26.1",
|
|
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
|
-
};
|