@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
|
@@ -6,7 +6,7 @@ import { I as n } from "./types.js";
|
|
|
6
6
|
import { THUMBNAIL_LIST_VIEW_HEIGHTS as x } from "../esm/lib/components/constants.js";
|
|
7
7
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
8
8
|
import { ItemActionMenu as E } from "../esm/lib/components/item-action-menu/item-action-menu.js";
|
|
9
|
-
import '../styles/
|
|
9
|
+
import '../styles/index.css';const q = "_tableHeaderActionsWrapper_zlqta_1", z = "_tableHeaderActions_zlqta_1", y = "_tableRow_zlqta_33", R = "_selectAllCheckbox_zlqta_42", g = "_tableNameCell_zlqta_47", w = "_tableNameCellSubtitle_zlqta_53", U = "_infiniteScrollTableContainerFullHeight_zlqta_58", k = "_iconCell_zlqta_64", i = {
|
|
10
10
|
tableHeaderActionsWrapper: q,
|
|
11
11
|
tableHeaderActions: z,
|
|
12
12
|
tableRow: y,
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,54 @@
|
|
|
1
|
-
import { MetadataView as
|
|
2
|
-
import { I as
|
|
1
|
+
import { MetadataView as r } from "./lib/metadata-view.js";
|
|
2
|
+
import { I as a, V as i } from "../chunks/types.js";
|
|
3
|
+
import { ActionBar as m } from "./lib/components/action-bar/action-bar.js";
|
|
4
|
+
import { FilterRow as x } from "./lib/components/filter-row/filter-row.js";
|
|
5
|
+
import { F as n } from "../chunks/form-filter-chip.js";
|
|
6
|
+
import { MetadataFilterChip as F } from "./lib/components/filter-row/metadata-filter-chip.js";
|
|
7
|
+
import { SelectFilterChip as s } from "./lib/components/filter-row/select-filter-chip.js";
|
|
8
|
+
import { Filter as c } from "./lib/components/filter-sidepanel/filter.js";
|
|
9
|
+
import { FilterSidePanel as g } from "./lib/components/filter-sidepanel/filter-side-panel.js";
|
|
10
|
+
import { ItemActionMenu as P } from "./lib/components/item-action-menu/item-action-menu.js";
|
|
11
|
+
import { MetadataGrid as I } from "./lib/components/metadata-grid/metadata-grid.js";
|
|
12
|
+
import { MetadataTable as B } from "./lib/components/metadata-table/metadata-table.js";
|
|
13
|
+
import { InlineEditingCell as b } from "./lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
14
|
+
import { TableRenderer as A } from "./lib/components/metadata-table/table-renderer.js";
|
|
15
|
+
import { MetadataFileChip as k } from "./lib/components/metadata-value/metadata-file-chip.js";
|
|
16
|
+
import { MetadataFileField as E } from "./lib/components/metadata-value/metadata-file-field.js";
|
|
17
|
+
import { MetadataLocationField as L } from "./lib/components/metadata-value/metadata-location-field.js";
|
|
18
|
+
import { MetadataRadioField as j } from "./lib/components/metadata-value/metadata-radio-field.js";
|
|
19
|
+
import { MetadataSearchField as v } from "./lib/components/metadata-value/metadata-search-field.js";
|
|
20
|
+
import { Pagination as z } from "./lib/components/pagination/pagination.js";
|
|
21
|
+
import { MarkerBasedPagination as J } from "./lib/components/pagination/marker-based-pagination.js";
|
|
22
|
+
import { OffsetBasedPagination as N } from "./lib/components/pagination/offset-based-pagination.js";
|
|
23
|
+
import { PaginationControls as U } from "./lib/components/pagination/pagination-controls.js";
|
|
24
|
+
import { SortDropdown as X } from "./lib/components/sort-dropdown/sort-dropdown.js";
|
|
25
|
+
import { Case as Z, SwitchCase as _ } from "./lib/components/switch-case/switch-case.js";
|
|
3
26
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
7
54
|
};
|
|
@@ -14,8 +14,8 @@ import '../../../../styles/action-bar.css';const b = "_actionBar_dsa2b_1", A = "
|
|
|
14
14
|
viewModeButtonContainer: G
|
|
15
15
|
}, T = ({
|
|
16
16
|
isIconColumnEnabled: c,
|
|
17
|
-
isViewModeButtonDisabled:
|
|
18
|
-
onViewModeClick:
|
|
17
|
+
isViewModeButtonDisabled: m,
|
|
18
|
+
onViewModeClick: d,
|
|
19
19
|
onZoomLevelChange: l,
|
|
20
20
|
sortableColumnNames: f,
|
|
21
21
|
sortDropdownProps: a,
|
|
@@ -41,12 +41,12 @@ import '../../../../styles/action-bar.css';const b = "_actionBar_dsa2b_1", A = "
|
|
|
41
41
|
}), (c || i === r.GRID) && /* @__PURE__ */ o(R, {
|
|
42
42
|
onZoomLevelChange: l,
|
|
43
43
|
zoomLevel: w
|
|
44
|
-
}), !
|
|
44
|
+
}), !m && /* @__PURE__ */ o("div", {
|
|
45
45
|
className: t.viewModeButtonContainer,
|
|
46
46
|
children: /* @__PURE__ */ o(B, {
|
|
47
47
|
"aria-label": i === r.GRID ? n(s.switchToListView) : n(s.switchToGridView),
|
|
48
48
|
icon: p,
|
|
49
|
-
onClick:
|
|
49
|
+
onClick: d,
|
|
50
50
|
variant: i === r.GRID ? "primary" : "tertiary"
|
|
51
51
|
})
|
|
52
52
|
})]
|
|
@@ -54,6 +54,5 @@ import '../../../../styles/action-bar.css';const b = "_actionBar_dsa2b_1", A = "
|
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
T as ActionBar
|
|
58
|
-
T as default
|
|
57
|
+
T as ActionBar
|
|
59
58
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EmptyState as r, Text as
|
|
2
|
-
import { Unplugged as
|
|
1
|
+
import { EmptyState as r, Text as s } from "@box/blueprint-web";
|
|
2
|
+
import { Unplugged as a } from "@box/blueprint-web-assets/illustrations/Medium";
|
|
3
3
|
import { useIntl as i } from "react-intl";
|
|
4
4
|
import o from "./messages.js";
|
|
5
5
|
import { jsx as t } from "react/jsx-runtime";
|
|
6
6
|
import '../../../../styles/error-state.css';const m = "_emptyStateContainer_qf21p_1", p = {
|
|
7
7
|
emptyStateContainer: m
|
|
8
|
-
},
|
|
8
|
+
}, S = ({
|
|
9
9
|
onRefresh: n
|
|
10
10
|
}) => {
|
|
11
11
|
const {
|
|
@@ -14,11 +14,11 @@ import '../../../../styles/error-state.css';const m = "_emptyStateContainer_qf21
|
|
|
14
14
|
return /* @__PURE__ */ t("div", {
|
|
15
15
|
className: p.emptyStateContainer,
|
|
16
16
|
children: /* @__PURE__ */ t(r, {
|
|
17
|
-
body: /* @__PURE__ */ t(
|
|
17
|
+
body: /* @__PURE__ */ t(s, {
|
|
18
18
|
as: "p",
|
|
19
19
|
children: e(o.errorMessage)
|
|
20
20
|
}),
|
|
21
|
-
illustration:
|
|
21
|
+
illustration: a,
|
|
22
22
|
children: /* @__PURE__ */ t(r.PrimaryAction, {
|
|
23
23
|
onClick: n,
|
|
24
24
|
children: e(o.refreshButton)
|
|
@@ -27,5 +27,5 @@ import '../../../../styles/error-state.css';const m = "_emptyStateContainer_qf21
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
S as ErrorState
|
|
31
31
|
};
|
|
@@ -3,11 +3,11 @@ import { Filter as c } from "@box/blueprint-web-assets/icons/Line";
|
|
|
3
3
|
import { useFormikContext as f } from "formik";
|
|
4
4
|
import { useState as d, useMemo as u } from "react";
|
|
5
5
|
import { useIntl as h } from "react-intl";
|
|
6
|
-
import F from "
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import C from "
|
|
10
|
-
import {
|
|
6
|
+
import { getInitialFieldValues as F } from "./initial-field-values.js";
|
|
7
|
+
import { isFilterSelected as g } from "./is-filter-selected.js";
|
|
8
|
+
import S from "./messages.js";
|
|
9
|
+
import { jsxs as a, Fragment as C, jsx as t } from "react/jsx-runtime";
|
|
10
|
+
import { FilterSidePanel as I } from "../filter-sidepanel/filter-side-panel.js";
|
|
11
11
|
const L = ({
|
|
12
12
|
filterGroups: l
|
|
13
13
|
}) => {
|
|
@@ -15,13 +15,13 @@ const L = ({
|
|
|
15
15
|
formatMessage: m
|
|
16
16
|
} = h(), {
|
|
17
17
|
values: r
|
|
18
|
-
} = f(), [o, n] = d(!1), p = () => n(!0), s = u(() => Object.values(r.metadata.fields).filter((i) =>
|
|
19
|
-
return /* @__PURE__ */ a(
|
|
18
|
+
} = f(), [o, n] = d(!1), p = () => n(!0), s = u(() => Object.values(r.metadata.fields).filter((i) => g(i.value)).length, [r.metadata.fields]);
|
|
19
|
+
return /* @__PURE__ */ a(C, {
|
|
20
20
|
children: [
|
|
21
21
|
// We need to initialize the sidepanel state at the moment it is opened
|
|
22
|
-
o && /* @__PURE__ */ t(
|
|
22
|
+
o && /* @__PURE__ */ t(I, {
|
|
23
23
|
filterGroups: l,
|
|
24
|
-
getInitialFormValues: () =>
|
|
24
|
+
getInitialFormValues: () => F(l.flatMap(({
|
|
25
25
|
filters: i
|
|
26
26
|
}) => i)),
|
|
27
27
|
isOpen: o,
|
|
@@ -33,7 +33,7 @@ const L = ({
|
|
|
33
33
|
children: [/* @__PURE__ */ t(e.Icon, {
|
|
34
34
|
icon: c
|
|
35
35
|
}), /* @__PURE__ */ t(e.Label, {
|
|
36
|
-
children: m(
|
|
36
|
+
children: m(S.allFilters)
|
|
37
37
|
}), s > 0 ? /* @__PURE__ */ t(e.Status, {
|
|
38
38
|
children: s.toString()
|
|
39
39
|
}) : null]
|
|
@@ -6,44 +6,44 @@ import { getInitialFieldValues as R } from "./initial-field-values.js";
|
|
|
6
6
|
import { MetadataFilterChip as G } from "./metadata-filter-chip.js";
|
|
7
7
|
import { usePredefinedFilter as x } from "./predefinedFilters/use-predefined-filter.js";
|
|
8
8
|
import { s as V } from "../../../../chunks/form-filter-chip.js";
|
|
9
|
-
import { jsx as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { jsx as e, jsxs as b } from "react/jsx-runtime";
|
|
10
|
+
import "./select-filter-chip.js";
|
|
11
|
+
const N = ({
|
|
12
|
+
predefinedFilterOptions: m,
|
|
13
|
+
filterGroups: s = [],
|
|
13
14
|
initialFilterValues: a,
|
|
14
15
|
isAllFiltersDisabled: p,
|
|
15
16
|
onFilterSubmit: r
|
|
16
17
|
}) => {
|
|
17
|
-
const
|
|
18
|
+
const n = x(m), f = ({
|
|
18
19
|
metadata: {
|
|
19
|
-
fields:
|
|
20
|
+
fields: i
|
|
20
21
|
}
|
|
21
22
|
}) => {
|
|
22
|
-
r && r(
|
|
23
|
-
}, t = [...
|
|
24
|
-
filters:
|
|
25
|
-
}) =>
|
|
26
|
-
return /* @__PURE__ */
|
|
23
|
+
r && r(i);
|
|
24
|
+
}, t = [...n, ...s], l = t.flatMap(({
|
|
25
|
+
filters: i
|
|
26
|
+
}) => i), u = R(l, a), o = F(null);
|
|
27
|
+
return /* @__PURE__ */ e(c, {
|
|
27
28
|
enableReinitialize: !0,
|
|
28
29
|
initialValues: u,
|
|
29
|
-
onSubmit:
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
onSubmit: f,
|
|
31
|
+
children: /* @__PURE__ */ e(h, {
|
|
31
32
|
ref: o,
|
|
32
33
|
children: /* @__PURE__ */ b(d.Group, {
|
|
33
34
|
className: V.filterChipGroup,
|
|
34
35
|
name: "metadata-view-filters",
|
|
35
36
|
type: "multiple",
|
|
36
|
-
children: [p ? null : /* @__PURE__ */
|
|
37
|
+
children: [p ? null : /* @__PURE__ */ e(C, {
|
|
37
38
|
filterGroups: t
|
|
38
|
-
}), l.filter((
|
|
39
|
-
filterOption:
|
|
39
|
+
}), l.filter((i) => i.shouldRenderChip).map((i) => /* @__PURE__ */ e(G, {
|
|
40
|
+
filterOption: i,
|
|
40
41
|
formRef: o
|
|
41
|
-
},
|
|
42
|
+
}, i.id))]
|
|
42
43
|
})
|
|
43
44
|
})
|
|
44
45
|
});
|
|
45
46
|
};
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
-
I as default
|
|
48
|
+
N as FilterRow
|
|
49
49
|
};
|
|
@@ -2,12 +2,11 @@ import "@box/blueprint-web";
|
|
|
2
2
|
import "formik";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-intl";
|
|
5
|
-
import { F as
|
|
5
|
+
import { F as h } from "../../../../chunks/form-filter-chip.js";
|
|
6
6
|
import "./initial-field-values.js";
|
|
7
7
|
import "./is-filter-selected.js";
|
|
8
8
|
import "./messages.js";
|
|
9
9
|
import "react/jsx-runtime";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
s as default
|
|
11
|
+
h as FormFilterChip
|
|
13
12
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { FilterRow as
|
|
1
|
+
import { FilterRow as t } from "./filter-row.js";
|
|
2
|
+
import { F as i } from "../../../../chunks/form-filter-chip.js";
|
|
3
|
+
import { MetadataFilterChip as F } from "./metadata-filter-chip.js";
|
|
4
|
+
import { SelectFilterChip as m } from "./select-filter-chip.js";
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
t as FilterRow,
|
|
7
|
+
i as FormFilterChip,
|
|
8
|
+
F as MetadataFilterChip,
|
|
9
|
+
m as SelectFilterChip
|
|
4
10
|
};
|
package/dist/esm/lib/components/filter-sidepanel/{filter-sidepanel.js → filter-side-panel.js}
RENAMED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import R from "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { Filter as x } from "./filter.js";
|
|
2
|
+
import { SidePanel as t, Accordion as c } from "@box/blueprint-web";
|
|
3
|
+
import { useIntl as B } from "react-intl";
|
|
4
|
+
import { useFormikContext as R } from "formik";
|
|
5
|
+
import k from "lodash/noop";
|
|
6
|
+
import { useState as d } from "react";
|
|
7
7
|
import n from "./messages.js";
|
|
8
8
|
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
const w = ({
|
|
10
10
|
filterGroups: a,
|
|
11
|
-
isOpen:
|
|
12
|
-
onIsOpenChange: i =
|
|
13
|
-
getInitialFormValues:
|
|
11
|
+
isOpen: h,
|
|
12
|
+
onIsOpenChange: i = k,
|
|
13
|
+
getInitialFormValues: p
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
|
-
formatMessage:
|
|
17
|
-
} =
|
|
16
|
+
formatMessage: l
|
|
17
|
+
} = B(), {
|
|
18
18
|
handleSubmit: f,
|
|
19
19
|
resetForm: s,
|
|
20
20
|
values: C
|
|
21
|
-
} =
|
|
21
|
+
} = R(), [F] = d(C), [S, v] = d(null), b = () => {
|
|
22
22
|
s({
|
|
23
|
-
values:
|
|
23
|
+
values: p()
|
|
24
24
|
});
|
|
25
|
-
}, y = (
|
|
25
|
+
}, y = (r) => {
|
|
26
26
|
s({
|
|
27
27
|
values: F
|
|
28
|
-
}), i(
|
|
28
|
+
}), i(r);
|
|
29
29
|
}, g = () => {
|
|
30
30
|
f(), i(!1);
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ e(t, {
|
|
33
33
|
onOpenChange: y,
|
|
34
|
-
open:
|
|
34
|
+
open: h,
|
|
35
35
|
variant: "overlay",
|
|
36
36
|
children: /* @__PURE__ */ e(t.Overlay, {
|
|
37
37
|
children: /* @__PURE__ */ u(t.Content, {
|
|
38
38
|
children: [/* @__PURE__ */ e(t.Header, {
|
|
39
|
-
children:
|
|
39
|
+
children: l(n.filtersHeader)
|
|
40
40
|
}), /* @__PURE__ */ e(t.ScrollableContainer, {
|
|
41
41
|
ref: v,
|
|
42
|
-
children: /* @__PURE__ */ e(
|
|
43
|
-
defaultValue: a.map((
|
|
42
|
+
children: /* @__PURE__ */ e(c, {
|
|
43
|
+
defaultValue: a.map((r, o) => `item-${o}`),
|
|
44
44
|
type: "multiple",
|
|
45
|
-
children: a.map((
|
|
46
|
-
...
|
|
45
|
+
children: a.map((r, o) => /* @__PURE__ */ e(c.Item, {
|
|
46
|
+
...r.toggleable ? {} : {
|
|
47
47
|
fixed: "true"
|
|
48
48
|
},
|
|
49
|
-
title:
|
|
49
|
+
title: r.title,
|
|
50
50
|
value: `item-${o}`,
|
|
51
|
-
children:
|
|
51
|
+
children: r.filters.map((m) => /* @__PURE__ */ e(x, {
|
|
52
52
|
...m,
|
|
53
53
|
parentRef: S
|
|
54
54
|
}, m.id))
|
|
55
|
-
}, `accordion-item-${
|
|
55
|
+
}, `accordion-item-${r.title || "unnamed"}`))
|
|
56
56
|
})
|
|
57
57
|
}), /* @__PURE__ */ u(t.Footer, {
|
|
58
58
|
children: [/* @__PURE__ */ e(t.Footer.SecondaryButton, {
|
|
59
59
|
onClick: b,
|
|
60
|
-
children:
|
|
60
|
+
children: l(n.clearAllButton)
|
|
61
61
|
}), /* @__PURE__ */ e(t.Footer.PrimaryButton, {
|
|
62
62
|
onClick: g,
|
|
63
|
-
children:
|
|
63
|
+
children: l(n.showResultsButton)
|
|
64
64
|
})]
|
|
65
65
|
}), /* @__PURE__ */ e(t.Close, {
|
|
66
|
-
"aria-label":
|
|
66
|
+
"aria-label": l(n.closeAriaLabel)
|
|
67
67
|
})]
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
|
-
w as
|
|
73
|
+
w as FilterSidePanel
|
|
74
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MetadataStringField as
|
|
1
|
+
import { MetadataStringField as u, MetadataMultiSelectField as f, MetadataEnumField as s, MetadataDateField as m } from "@box/metadata-filter";
|
|
2
2
|
import { useIntl as n } from "react-intl";
|
|
3
3
|
import { MetadataFileField as F } from "../metadata-value/metadata-file-field.js";
|
|
4
4
|
import { MetadataLocationField as M } from "../metadata-value/metadata-location-field.js";
|
|
@@ -20,7 +20,7 @@ const i = (e) => `metadata.fields.${e}`, b = ({
|
|
|
20
20
|
});
|
|
21
21
|
case "default":
|
|
22
22
|
default:
|
|
23
|
-
return /* @__PURE__ */ t(
|
|
23
|
+
return /* @__PURE__ */ t(u, {
|
|
24
24
|
fieldNamePrefix: i(e),
|
|
25
25
|
label: a || ""
|
|
26
26
|
});
|
|
@@ -53,7 +53,7 @@ const i = (e) => `metadata.fields.${e}`, b = ({
|
|
|
53
53
|
triggerCallback: d
|
|
54
54
|
}) => {
|
|
55
55
|
const {
|
|
56
|
-
locale:
|
|
56
|
+
locale: o
|
|
57
57
|
} = n();
|
|
58
58
|
switch (r) {
|
|
59
59
|
case "file":
|
|
@@ -72,7 +72,7 @@ const i = (e) => `metadata.fields.${e}`, b = ({
|
|
|
72
72
|
return /* @__PURE__ */ t(s, {
|
|
73
73
|
fieldNamePrefix: i(e),
|
|
74
74
|
label: a || "",
|
|
75
|
-
locale:
|
|
75
|
+
locale: o,
|
|
76
76
|
portalElement: l
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -121,5 +121,5 @@ const i = (e) => `metadata.fields.${e}`, b = ({
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
export {
|
|
124
|
-
k as
|
|
124
|
+
k as Filter
|
|
125
125
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ActionBar as o } from "./action-bar/action-bar.js";
|
|
2
|
+
import { FilterRow as a } from "./filter-row/filter-row.js";
|
|
3
|
+
import { F as p } from "../../../chunks/form-filter-chip.js";
|
|
4
|
+
import { MetadataFilterChip as m } from "./filter-row/metadata-filter-chip.js";
|
|
5
|
+
import { SelectFilterChip as d } from "./filter-row/select-filter-chip.js";
|
|
6
|
+
import { Filter as n } from "./filter-sidepanel/filter.js";
|
|
7
|
+
import { FilterSidePanel as M } from "./filter-sidepanel/filter-side-panel.js";
|
|
8
|
+
import { ItemActionMenu as s } from "./item-action-menu/item-action-menu.js";
|
|
9
|
+
import { MetadataGrid as h } from "./metadata-grid/metadata-grid.js";
|
|
10
|
+
import { MetadataTable as P } from "./metadata-table/metadata-table.js";
|
|
11
|
+
import { InlineEditingCell as w } from "./metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
12
|
+
import { TableRenderer as R } from "./metadata-table/table-renderer.js";
|
|
13
|
+
import { MetadataFileChip as A } from "./metadata-value/metadata-file-chip.js";
|
|
14
|
+
import { MetadataFileField as T } from "./metadata-value/metadata-file-field.js";
|
|
15
|
+
import { MetadataLocationField as u } from "./metadata-value/metadata-location-field.js";
|
|
16
|
+
import { MetadataRadioField as E } from "./metadata-value/metadata-radio-field.js";
|
|
17
|
+
import { MetadataSearchField as L } from "./metadata-value/metadata-search-field.js";
|
|
18
|
+
import { Pagination as j } from "./pagination/pagination.js";
|
|
19
|
+
import { MarkerBasedPagination as v } from "./pagination/marker-based-pagination.js";
|
|
20
|
+
import { OffsetBasedPagination as z } from "./pagination/offset-based-pagination.js";
|
|
21
|
+
import { PaginationControls as J } from "./pagination/pagination-controls.js";
|
|
22
|
+
import { SortDropdown as N } from "./sort-dropdown/sort-dropdown.js";
|
|
23
|
+
import { Case as U, SwitchCase as V } from "./switch-case/switch-case.js";
|
|
24
|
+
export {
|
|
25
|
+
o as ActionBar,
|
|
26
|
+
U as Case,
|
|
27
|
+
n as Filter,
|
|
28
|
+
a as FilterRow,
|
|
29
|
+
M as FilterSidePanel,
|
|
30
|
+
p as FormFilterChip,
|
|
31
|
+
w as InlineEditingCell,
|
|
32
|
+
s as ItemActionMenu,
|
|
33
|
+
v as MarkerBasedPagination,
|
|
34
|
+
A as MetadataFileChip,
|
|
35
|
+
T as MetadataFileField,
|
|
36
|
+
m as MetadataFilterChip,
|
|
37
|
+
h as MetadataGrid,
|
|
38
|
+
u as MetadataLocationField,
|
|
39
|
+
E as MetadataRadioField,
|
|
40
|
+
L as MetadataSearchField,
|
|
41
|
+
P as MetadataTable,
|
|
42
|
+
z as OffsetBasedPagination,
|
|
43
|
+
j as Pagination,
|
|
44
|
+
J as PaginationControls,
|
|
45
|
+
d as SelectFilterChip,
|
|
46
|
+
N as SortDropdown,
|
|
47
|
+
V as SwitchCase,
|
|
48
|
+
R as TableRenderer
|
|
49
|
+
};
|
|
@@ -4,10 +4,10 @@ import { useIntl as T } from "react-intl";
|
|
|
4
4
|
import { V as p } from "../../../../chunks/types.js";
|
|
5
5
|
import { THUMBNAIL_GRID_VIEW_SIZES as E } from "../constants.js";
|
|
6
6
|
import b from "./messages.js";
|
|
7
|
-
import { jsx as e, jsxs as
|
|
8
|
-
import { ItemActionMenu as
|
|
9
|
-
import '../../../../styles/metadata-grid.css';const
|
|
10
|
-
itemThumbnail:
|
|
7
|
+
import { jsx as e, jsxs as M } from "react/jsx-runtime";
|
|
8
|
+
import { ItemActionMenu as R } from "../item-action-menu/item-action-menu.js";
|
|
9
|
+
import '../../../../styles/metadata-grid.css';const f = "_itemThumbnail_93ess_1", L = {
|
|
10
|
+
itemThumbnail: f
|
|
11
11
|
}, A = 188, G = 250, g = 8, x = 5, U = (m) => A + G * (g - m) / x, N = ({
|
|
12
12
|
items: m,
|
|
13
13
|
itemActionMenuProps: n,
|
|
@@ -15,36 +15,36 @@ import '../../../../styles/metadata-grid.css';const R = "_itemThumbnail_93ess_1"
|
|
|
15
15
|
...d
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
|
-
formatMessage:
|
|
18
|
+
formatMessage: _
|
|
19
19
|
} = T();
|
|
20
20
|
return /* @__PURE__ */ e(i, {
|
|
21
|
-
"aria-label":
|
|
21
|
+
"aria-label": _(b.gridView),
|
|
22
22
|
selectionMode: "multiple",
|
|
23
23
|
style: {
|
|
24
24
|
gridTemplateColumns: `repeat(auto-fit, minmax(${U(E[c])}px, 1fr))`
|
|
25
25
|
},
|
|
26
26
|
...d,
|
|
27
27
|
children: m.map((t, D) => {
|
|
28
|
-
var
|
|
28
|
+
var s, l, a;
|
|
29
29
|
const {
|
|
30
30
|
name: r,
|
|
31
|
-
createdAt:
|
|
32
|
-
} = t,
|
|
33
|
-
return /* @__PURE__ */
|
|
31
|
+
createdAt: u
|
|
32
|
+
} = t, o = "thumbnailURLs" in t ? ((s = t.thumbnailURLs) == null ? void 0 : s.large) || ((l = t.thumbnailURLs) == null ? void 0 : l.medium) || ((a = t.thumbnailURLs) == null ? void 0 : a.small) : void 0;
|
|
33
|
+
return /* @__PURE__ */ M(i.Item, {
|
|
34
34
|
children: [/* @__PURE__ */ e(i.Thumbnail, {
|
|
35
35
|
className: L.itemThumbnail,
|
|
36
|
-
children:
|
|
36
|
+
children: o ? /* @__PURE__ */ e("img", {
|
|
37
37
|
alt: r,
|
|
38
|
-
src:
|
|
38
|
+
src: o
|
|
39
39
|
}) : /* @__PURE__ */ e(h, {
|
|
40
40
|
item: t
|
|
41
41
|
})
|
|
42
42
|
}), /* @__PURE__ */ e(i.Header, {
|
|
43
43
|
children: r
|
|
44
44
|
}), /* @__PURE__ */ e(i.Subtitle, {
|
|
45
|
-
children:
|
|
45
|
+
children: u
|
|
46
46
|
}), n ? /* @__PURE__ */ e(i.Actions, {
|
|
47
|
-
children: (I) => /* @__PURE__ */ e(
|
|
47
|
+
children: (I) => /* @__PURE__ */ e(R, {
|
|
48
48
|
...n,
|
|
49
49
|
item: t,
|
|
50
50
|
onOpenChange: I,
|
|
@@ -56,6 +56,5 @@ import '../../../../styles/metadata-grid.css';const R = "_itemThumbnail_93ess_1"
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
N as MetadataGrid
|
|
60
|
-
N as default
|
|
59
|
+
N as MetadataGrid
|
|
61
60
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MetadataTable as o } from "./metadata-table.js";
|
|
2
|
+
import { TableRenderer as a } from "./table-renderer.js";
|
|
3
|
+
import { InlineEditingCell as n } from "./table-body/inline-editing-cell/inline-editing-cell.js";
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
n as InlineEditingCell,
|
|
6
|
+
o as MetadataTable,
|
|
7
|
+
a as TableRenderer
|
|
4
8
|
};
|