@box/metadata-view 0.48.5 → 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 CHANGED
@@ -1,54 +1,56 @@
1
- import { MetadataView as r } from "./lib/metadata-view.js";
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 { 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";
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
- Z as Case,
29
- c as Filter,
29
+ $ as Case,
30
+ P as Filter,
30
31
  x as FilterRow,
31
- g as FilterSidePanel,
32
+ w as FilterSidePanel,
32
33
  n as FormFilterChip,
33
34
  a as IconColumnVariant,
34
- b as InlineEditingCell,
35
- P as ItemActionMenu,
36
- J as MarkerBasedPagination,
37
- k as MetadataFileChip,
38
- E as MetadataFileField,
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
- 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,
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
- X as SortDropdown,
51
- _ as SwitchCase,
52
- A as TableRenderer,
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
- const P = ({
11
+ import "./predefinedFilters/index.js";
12
+ const S = ({
12
13
  predefinedFilterOptions: m,
13
14
  containerRef: s,
14
- filterGroups: a = [],
15
- initialFilterValues: p,
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, ...a], l = t.flatMap(({
26
+ }, t = [...f, ...p], o = t.flatMap(({
26
27
  filters: i
27
- }) => i), d = G(l, p), o = C(null);
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: o,
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
- }), l.filter((i) => i.shouldRenderChip).map((i) => /* @__PURE__ */ e(x, {
42
+ }), o.filter((i) => i.shouldRenderChip).map((i) => /* @__PURE__ */ e(x, {
42
43
  filterOption: i,
43
- formRef: o
44
+ formRef: l
44
45
  }, i.id))]
45
46
  })
46
47
  })
47
48
  });
48
49
  };
49
50
  export {
50
- P as FilterRow
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 F } from "./metadata-filter-chip.js";
4
- import { SelectFilterChip as m } from "./select-filter-chip.js";
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
- F as MetadataFilterChip,
9
- m as SelectFilterChip
9
+ m as MetadataFilterChip,
10
+ a as PredefinedFilterName,
11
+ f as SelectFilterChip
10
12
  };
@@ -0,0 +1,6 @@
1
+ let o = /* @__PURE__ */ function(r) {
2
+ return r.KeywordSearchFilterGroup = "KeywordSearchFilterGroup", r.FileTypeFilterGroup = "FileTypeFilterGroup", r.LocationFilterGroup = "LocationFilterGroup", r;
3
+ }({});
4
+ export {
5
+ o as PredefinedFilterName
6
+ };
@@ -1,5 +1,22 @@
1
- import "lodash/merge";
2
- import { p } from "../../../../../chunks/predefined-filter-options-factory.js";
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
- p as predefinedFilterOptionsFactory
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 { p as a, P as i } from "../../../../../chunks/predefined-filter-options-factory.js";
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
- }, F = ({
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
- }, g = (t = {}) => {
66
- const e = a(t), r = d(e[i.KeywordSearchFilterGroup]), n = u(e[i.FileTypeFilterGroup]), s = F(e[i.LocationFilterGroup]);
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
- g as usePredefinedFilter
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 { 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";
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
- U as Case,
27
- n as Filter,
27
+ W as Case,
28
+ M as Filter,
28
29
  a as FilterRow,
29
- M as FilterSidePanel,
30
+ s as FilterSidePanel,
30
31
  p as FormFilterChip,
31
- w as InlineEditingCell,
32
- s as ItemActionMenu,
33
- v as MarkerBasedPagination,
34
- A as MetadataFileChip,
35
- T as MetadataFileField,
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
- 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,
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
- N as SortDropdown,
47
- V as SwitchCase,
48
- R as TableRenderer
48
+ U as SortDropdown,
49
+ X as SwitchCase,
50
+ A as TableRenderer
49
51
  };
@@ -1,46 +1,46 @@
1
- import { useRef as v } from "react";
2
- import { useIntl as E } from "react-intl";
3
- import { Text as S, ListCheckbox as k, TableHeader as B, Column as O } from "@box/blueprint-web";
4
- import { useInfiniteScrollTableItems as P } from "./hooks/useInfiniteScrollTableItems.js";
5
- import { TableRenderer as I } from "./table-renderer.js";
6
- import { I as U } from "../../../../chunks/types.js";
7
- import { THUMBNAIL_WIDTHS as j } from "../constants.js";
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 F from "./messages.js";
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 G = 40, ee = ({
12
+ const V = 40, ae = ({
13
13
  columns: o,
14
14
  isLoading: i = !1,
15
15
  iconColumnVariant: n,
16
- isSelectAllEnabled: d,
17
- items: m,
18
- itemActionMenuProps: T,
19
- isInfiniteScrollEnabled: R = !1,
20
- hasNextPage: x = !1,
21
- onInlineEditChange: C,
22
- onGetNextPage: W,
23
- placeholderRowsCount: g,
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
- ...w
25
+ ...W
26
26
  }) => {
27
27
  var u;
28
28
  const {
29
29
  formatMessage: c
30
- } = E(), f = v(null), {
30
+ } = k(), f = E(null), {
31
31
  virtualItemsToDisplay: p,
32
- getTableHeight: y
33
- } = P({
34
- items: m,
35
- hasNextPage: x,
32
+ getTableHeight: A
33
+ } = j({
34
+ items: d,
35
+ hasNextPage: w,
36
36
  isLoading: i,
37
37
  parentRef: f,
38
- onGetNextPage: W,
39
- placeholderRowsCount: g
40
- }), a = [], A = 0;
41
- if (n === U.COLUMN) {
42
- r = r || A;
43
- const t = parseInt(j[r], 10) + 24;
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 N = o.map((t) => {
52
+ const D = o.map((t) => {
53
53
  const {
54
54
  id: H,
55
- isItemMetadata: M,
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
- children: b ? b(l, t) : /* @__PURE__ */ e(S, {
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: M ? "item.{id}" : H,
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(...N), d && 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(k, {
77
- "aria-label": c(F.selectAll),
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 D = /* @__PURE__ */ e(B, {
89
+ const M = /* @__PURE__ */ e(P, {
87
90
  columns: a,
88
- children: (t) => /* @__PURE__ */ e(O, {
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: d,
98
- itemActionMenuProps: T,
99
- items: m,
100
- onInlineEditChange: C,
101
- tableHeader: D,
102
- tableProps: w,
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 R ? /* @__PURE__ */ e("div", {
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: y() + G
115
+ height: A() + V
113
116
  },
114
- children: /* @__PURE__ */ e(I, {
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(I, {
130
+ }) : /* @__PURE__ */ e(T, {
128
131
  ...h
129
132
  });
130
133
  };
131
134
  export {
132
- ee as MetadataTable
135
+ ae as MetadataTable
133
136
  };
@@ -1,54 +1,56 @@
1
- import { MetadataView as r } from "./metadata-view.js";
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 { Filter as c } from "./components/filter-sidepanel/filter.js";
9
- import { FilterSidePanel as g } from "./components/filter-sidepanel/filter-side-panel.js";
10
- import { ItemActionMenu as P } from "./components/item-action-menu/item-action-menu.js";
11
- import { MetadataGrid as I } from "./components/metadata-grid/metadata-grid.js";
12
- import { MetadataTable as B } from "./components/metadata-table/metadata-table.js";
13
- import { InlineEditingCell as b } from "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
14
- import { TableRenderer as A } from "./components/metadata-table/table-renderer.js";
15
- import { MetadataFileChip as k } from "./components/metadata-value/metadata-file-chip.js";
16
- import { MetadataFileField as E } from "./components/metadata-value/metadata-file-field.js";
17
- import { MetadataLocationField as L } from "./components/metadata-value/metadata-location-field.js";
18
- import { MetadataRadioField as j } from "./components/metadata-value/metadata-radio-field.js";
19
- import { MetadataSearchField as v } from "./components/metadata-value/metadata-search-field.js";
20
- import { Pagination as z } from "./components/pagination/pagination.js";
21
- import { MarkerBasedPagination as J } from "./components/pagination/marker-based-pagination.js";
22
- import { OffsetBasedPagination as N } from "./components/pagination/offset-based-pagination.js";
23
- import { PaginationControls as U } from "./components/pagination/pagination-controls.js";
24
- import { SortDropdown as X } from "./components/sort-dropdown/sort-dropdown.js";
25
- import { Case as Z, SwitchCase as _ } from "./components/switch-case/switch-case.js";
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
- Z as Case,
29
- c as Filter,
29
+ $ as Case,
30
+ P as Filter,
30
31
  x as FilterRow,
31
- g as FilterSidePanel,
32
+ w as FilterSidePanel,
32
33
  n as FormFilterChip,
33
34
  a as IconColumnVariant,
34
- b as InlineEditingCell,
35
- P as ItemActionMenu,
36
- J as MarkerBasedPagination,
37
- k as MetadataFileChip,
38
- E as MetadataFileField,
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
- 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,
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
- X as SortDropdown,
51
- _ as SwitchCase,
52
- A as TableRenderer,
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 Ct({
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
- Ct as MetadataView,
98
- Ct as default
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: (folderId: string, folderName: string, isFolderShared?: boolean) => void;
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?: MetadataFieldType;
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.5",
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.3",
23
+ "@box/box-item-type-selector": "^0.69.4",
24
24
  "@box/eslint-plugin-blueprint": "*",
25
- "@box/item-icon": "^0.23.3",
26
- "@box/metadata-filter": "^1.26.0",
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
- };