@box/metadata-view 0.24.7 → 0.24.9

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.
@@ -1,77 +1,142 @@
1
- import { TableBody as C, Row as x, Cell as c, Text as o, ActionCell as A } from "@box/blueprint-web";
2
- import h from "lodash/get";
3
- import { ItemTypeIcon as p } from "@box/item-icon";
4
- import f from "clsx";
5
- import { I as t } from "./types.js";
6
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
7
- import { ItemActionMenu as L } from "../esm/lib/components/item-action-menu/item-action-menu.js";
8
- import '../styles/table-body-with-data.css';const y = "_tableHeaderActionsWrapper_r2hj7_1", S = "_tableHeaderActions_r2hj7_1", j = "_selectAllCheckbox_r2hj7_33", E = "_tableNameCell_r2hj7_38", H = "_tableNameCellSubTitle_r2hj7_44", N = {
9
- tableHeaderActionsWrapper: y,
10
- tableHeaderActions: S,
11
- selectAllCheckbox: j,
12
- tableNameCell: E,
13
- tableNameCellSubTitle: H
14
- }, O = ({
15
- columns: m,
16
- iconColumnVariant: r,
17
- isSelectAllEnabled: _,
18
- items: I,
19
- itemActionMenuProps: i
20
- }) => /* @__PURE__ */ l(C, {
21
- items: I.map((e) => ({
22
- key: e.id,
23
- ...e
24
- })),
25
- children: (e) => /* @__PURE__ */ d(x, {
26
- id: e.id,
27
- children: [r === t.COLUMN ? /* @__PURE__ */ l(c, {
28
- children: /* @__PURE__ */ l(p, {
29
- item: e
30
- })
31
- }, `item-type-icon-${e.id}`) : null, m.map((a) => {
32
- const {
33
- cellRenderer: b,
34
- id: s,
35
- subTitle: T,
36
- textValue: u
37
- } = a, n = `${u}-${e.id}`;
38
- return s === "name" && (r === t.INLINE || r === t.INLINE_SUBTITLE) ? /* @__PURE__ */ l(c, {
39
- children: /* @__PURE__ */ d("div", {
40
- className: N.tableNameCell,
41
- children: [/* @__PURE__ */ l(p, {
42
- item: e
43
- }), /* @__PURE__ */ d("div", {
44
- className: f({
45
- [N.tableNameCellSubTitle]: r === t.INLINE_SUBTITLE
46
- }),
47
- children: [/* @__PURE__ */ l(o, {
48
- as: "span",
49
- children: h(e, s)
50
- }), r === t.INLINE_SUBTITLE ? /* @__PURE__ */ l(o, {
51
- as: "span",
52
- color: "textOnLightSecondary",
53
- children: T
54
- }) : null]
55
- })]
56
- })
57
- }, n) : b ? /* @__PURE__ */ l(c, {
58
- children: b(e, a)
59
- }, n) : /* @__PURE__ */ l(c, {
60
- children: /* @__PURE__ */ l(o, {
1
+ import { TableBody as N, Row as _, Cell as s, ActionCell as u, Text as h } from "@box/blueprint-web";
2
+ import I from "lodash/get";
3
+ import a from "react";
4
+ import { ItemTypeIcon as C } from "@box/item-icon";
5
+ import T from "clsx";
6
+ import { I as d } from "./types.js";
7
+ import { jsx as l, jsxs as m } from "react/jsx-runtime";
8
+ import { ItemActionMenu as x } from "../esm/lib/components/item-action-menu/item-action-menu.js";
9
+ import '../styles/table-body-with-data.css';const f = "_tableHeaderActionsWrapper_r2hj7_1", y = "_tableHeaderActions_r2hj7_1", A = "_selectAllCheckbox_r2hj7_33", S = "_tableNameCell_r2hj7_38", $ = "_tableNameCellSubTitle_r2hj7_44", p = {
10
+ tableHeaderActionsWrapper: f,
11
+ tableHeaderActions: y,
12
+ selectAllCheckbox: A,
13
+ tableNameCell: S,
14
+ tableNameCellSubTitle: $
15
+ }, L = /* @__PURE__ */ a.memo(({
16
+ item: t,
17
+ column: e,
18
+ iconColumnVariant: r
19
+ }) => {
20
+ const {
21
+ id: o,
22
+ subTitle: c
23
+ } = e, i = `${e.textValue}-${t.id}`;
24
+ return /* @__PURE__ */ l(s, {
25
+ children: /* @__PURE__ */ m("div", {
26
+ className: p.tableNameCell,
27
+ children: [/* @__PURE__ */ l(C, {
28
+ item: t
29
+ }), /* @__PURE__ */ m("div", {
30
+ className: T({
31
+ [p.tableNameCellSubTitle]: r === d.INLINE_SUBTITLE
32
+ }),
33
+ children: [/* @__PURE__ */ l(h, {
61
34
  as: "span",
62
- children: h(e, s)
63
- })
64
- }, n);
65
- }), _ && /* @__PURE__ */ l(A, {
66
- children: (a) => i ? /* @__PURE__ */ l(L, {
67
- ...i,
68
- item: e,
69
- onOpenChange: a
70
- }) : null
71
- })]
72
- }, e.id)
73
- });
35
+ children: I(t, o)
36
+ }), r === d.INLINE_SUBTITLE && /* @__PURE__ */ l(h, {
37
+ as: "span",
38
+ color: "textOnLightSecondary",
39
+ children: c
40
+ })]
41
+ })]
42
+ })
43
+ }, i);
44
+ }), j = /* @__PURE__ */ a.memo(({
45
+ item: t,
46
+ column: e
47
+ }) => {
48
+ var o;
49
+ const r = `${e.textValue}-${t.id}`;
50
+ return /* @__PURE__ */ l(s, {
51
+ children: (o = e.cellRenderer) == null ? void 0 : o.call(e, t, e)
52
+ }, r);
53
+ }), k = /* @__PURE__ */ a.memo(({
54
+ item: t,
55
+ column: e
56
+ }) => {
57
+ const r = `${e.textValue}-${t.id}`, o = I(t, e.id);
58
+ return o ? /* @__PURE__ */ l(s, {
59
+ children: o.join(" ")
60
+ }, r) : /* @__PURE__ */ l(s, {}, r);
61
+ }), E = /* @__PURE__ */ a.memo(({
62
+ item: t,
63
+ column: e
64
+ }) => {
65
+ const r = `${e.textValue}-${t.id}`;
66
+ return /* @__PURE__ */ l(s, {
67
+ children: /* @__PURE__ */ l(h, {
68
+ as: "span",
69
+ children: I(t, e.id)
70
+ })
71
+ }, r);
72
+ }), W = /* @__PURE__ */ a.memo(({
73
+ item: t,
74
+ column: e,
75
+ iconColumnVariant: r
76
+ }) => {
77
+ const {
78
+ cellRenderer: o,
79
+ id: c,
80
+ type: i
81
+ } = e;
82
+ return c === "name" && (r === d.INLINE || r === d.INLINE_SUBTITLE) ? /* @__PURE__ */ l(L, {
83
+ column: e,
84
+ iconColumnVariant: r,
85
+ item: t
86
+ }) : o ? /* @__PURE__ */ l(j, {
87
+ column: e,
88
+ item: t
89
+ }) : i === "multiSelect" ? /* @__PURE__ */ l(k, {
90
+ column: e,
91
+ item: t
92
+ }) : /* @__PURE__ */ l(E, {
93
+ column: e,
94
+ item: t
95
+ });
96
+ }), H = /* @__PURE__ */ a.memo(({
97
+ item: t
98
+ }) => /* @__PURE__ */ l(s, {
99
+ children: /* @__PURE__ */ l(C, {
100
+ item: t
101
+ })
102
+ }, `item-type-icon-${t.id}`)), B = /* @__PURE__ */ a.memo(({
103
+ item: t,
104
+ itemActionMenuProps: e
105
+ }) => /* @__PURE__ */ l(u, {
106
+ children: (r) => e ? /* @__PURE__ */ l(x, {
107
+ ...e,
108
+ item: t,
109
+ onOpenChange: r
110
+ }) : null
111
+ })), V = ({
112
+ columns: t,
113
+ iconColumnVariant: e,
114
+ isSelectAllEnabled: r,
115
+ items: o,
116
+ itemActionMenuProps: c
117
+ }) => {
118
+ const i = e === d.COLUMN;
119
+ return /* @__PURE__ */ l(N, {
120
+ items: o.map((n) => ({
121
+ key: n.id,
122
+ ...n
123
+ })),
124
+ children: (n) => /* @__PURE__ */ m(_, {
125
+ id: n.id,
126
+ children: [i && /* @__PURE__ */ l(H, {
127
+ item: n
128
+ }), t.map((b) => /* @__PURE__ */ l(W, {
129
+ column: b,
130
+ iconColumnVariant: e,
131
+ item: n
132
+ }, `${b.textValue}-${n.id}`)), r && /* @__PURE__ */ l(B, {
133
+ item: n,
134
+ itemActionMenuProps: c
135
+ })]
136
+ }, n.id)
137
+ });
138
+ };
74
139
  export {
75
- O as T,
76
- N as s
140
+ V as T,
141
+ p as s
77
142
  };
@@ -1,47 +1,48 @@
1
- import { Button as d } from "@box/blueprint-web";
2
- import { Grid as f } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as p } from "react-intl";
1
+ import { Button as f } from "@box/blueprint-web";
2
+ import { Grid as p } from "@box/blueprint-web-assets/icons/Fill";
3
+ import { useIntl as w } from "react-intl";
4
4
  import { V as s } from "../../../../chunks/types.js";
5
5
  import n from "./messages.js";
6
- import { SortDropdown as w } from "./sort-dropdown.js";
6
+ import { SortDropdown as _ } from "./sort-dropdown.js";
7
7
  import { jsxs as c, jsx as i } from "react/jsx-runtime";
8
- import { FilterRow as _ } from "../filter-row/filter-row.js";
9
- import '../../../../styles/action-bar.css';const R = "_actionBar_1jgp4_1", B = "_filterRow_1jgp4_8", g = "_additionalActions_1jgp4_13", o = {
10
- actionBar: R,
11
- filterRow: B,
12
- additionalActions: g
13
- }, y = ({
14
- onViewModeClick: e,
15
- viewMode: t,
16
- sortableColumnNames: m,
17
- sortDropdownProps: r,
18
- ...l
8
+ import { FilterRow as R } from "../filter-row/filter-row.js";
9
+ import '../../../../styles/action-bar.css';const B = "_actionBar_1jgp4_1", g = "_filterRow_1jgp4_8", h = "_additionalActions_1jgp4_13", o = {
10
+ actionBar: B,
11
+ filterRow: g,
12
+ additionalActions: h
13
+ }, I = ({
14
+ isViewModeButtonDisabled: e,
15
+ onViewModeClick: m,
16
+ sortableColumnNames: l,
17
+ sortDropdownProps: t,
18
+ viewMode: r,
19
+ ...d
19
20
  }) => {
20
21
  const {
21
22
  formatMessage: a
22
- } = p();
23
+ } = w();
23
24
  return /* @__PURE__ */ c("div", {
24
25
  className: o.actionBar,
25
26
  children: [/* @__PURE__ */ i("div", {
26
27
  className: o.filterRow,
27
- children: /* @__PURE__ */ i(_, {
28
- ...l
28
+ children: /* @__PURE__ */ i(R, {
29
+ ...d
29
30
  })
30
31
  }), /* @__PURE__ */ c("div", {
31
32
  className: o.additionalActions,
32
- children: [r && /* @__PURE__ */ i(w, {
33
- ...r,
34
- sortableColumnNames: m
35
- }), /* @__PURE__ */ i(d, {
36
- "aria-label": t === s.GRID ? a(n.switchToListView) : a(n.switchToGridView),
37
- icon: f,
38
- onClick: e,
39
- variant: t === s.GRID ? "primary" : "tertiary"
33
+ children: [t && /* @__PURE__ */ i(_, {
34
+ ...t,
35
+ sortableColumnNames: l
36
+ }), !e && /* @__PURE__ */ i(f, {
37
+ "aria-label": r === s.GRID ? a(n.switchToListView) : a(n.switchToGridView),
38
+ icon: p,
39
+ onClick: m,
40
+ variant: r === s.GRID ? "primary" : "tertiary"
40
41
  })]
41
42
  })]
42
43
  });
43
44
  };
44
45
  export {
45
- y as ActionBar,
46
- y as default
46
+ I as ActionBar,
47
+ I as default
47
48
  };
@@ -1,47 +1,47 @@
1
- import { useState as S, useRef as C } from "react";
1
+ import { useState as C, useRef as S } from "react";
2
2
  import { Formik as v, Form as G } from "formik";
3
3
  import { FilterChip as I } from "@box/blueprint-web";
4
4
  import R from "./all-filters-chip.js";
5
- import { getInitialFieldValues as b } from "./initial-field-values.js";
6
- import { MetadataFilterChip as g } from "./metadata-filter-chip.js";
7
- import { usePredefinedFilter as j } from "./use-predefined-filter.js";
8
- import { s as w } from "../../../../chunks/form-filter-chip.js";
9
- import { jsx as i, jsxs as x } from "react/jsx-runtime";
5
+ import { getInitialFieldValues as g } from "./initial-field-values.js";
6
+ import { MetadataFilterChip as j } from "./metadata-filter-chip.js";
7
+ import { usePredefinedFilter as w } from "./use-predefined-filter.js";
8
+ import { s as x } from "../../../../chunks/form-filter-chip.js";
9
+ import { jsx as i, jsxs as b } from "react/jsx-runtime";
10
10
  const z = ({
11
11
  disabledPredefinedFilters: n = [],
12
- filterGroups: a,
13
- isAllFiltersDisabled: d,
14
- onFilterSubmit: p
12
+ filterGroups: d = [],
13
+ isAllFiltersDisabled: p,
14
+ onFilterSubmit: l
15
15
  }) => {
16
- const [l, u] = S([]), c = j(n), f = ([e, t]) => {
16
+ const [s, c] = C([]), u = w(n), f = ([e, t]) => {
17
17
  var r;
18
18
  return ((r = t.value) == null ? void 0 : r.enum) && t.value.enum.length > 0;
19
- }, F = ({
19
+ }, h = ({
20
20
  metadata: {
21
21
  fields: e
22
22
  }
23
23
  }) => {
24
24
  const t = Object.entries(e).filter(f).map(([r]) => r);
25
- u(t), p(e);
26
- }, s = [...c, ...a], o = s.flatMap(({
25
+ c(t), l && l(e);
26
+ }, o = [...u, ...d], m = o.flatMap(({
27
27
  filters: e
28
- }) => e), h = b(o), m = C(null);
28
+ }) => e), F = g(m), a = S(null);
29
29
  return /* @__PURE__ */ i(v, {
30
- initialValues: h,
31
- onSubmit: F,
30
+ initialValues: F,
31
+ onSubmit: h,
32
32
  children: /* @__PURE__ */ i(G, {
33
- ref: m,
34
- children: /* @__PURE__ */ x(I.Group, {
35
- className: w.filterChipGroup,
33
+ ref: a,
34
+ children: /* @__PURE__ */ b(I.Group, {
35
+ className: x.filterChipGroup,
36
36
  name: "metadata-view-filters",
37
37
  type: "multiple",
38
- children: [d ? null : /* @__PURE__ */ i(R, {
39
- activeFilterCount: l.length,
40
- filterGroups: s
41
- }), o.filter((e) => e.shouldRenderChip).map((e) => /* @__PURE__ */ i(g, {
38
+ children: [p ? null : /* @__PURE__ */ i(R, {
39
+ activeFilterCount: s.length,
40
+ filterGroups: o
41
+ }), m.filter((e) => e.shouldRenderChip).map((e) => /* @__PURE__ */ i(j, {
42
42
  filterOption: e,
43
- formRef: m,
44
- selected: l.includes(e.id)
43
+ formRef: a,
44
+ selected: s.includes(e.id)
45
45
  }, e.id))]
46
46
  })
47
47
  })
@@ -4,18 +4,18 @@ import { useIntl as l } from "react-intl";
4
4
  import { V as s } from "../../../../chunks/types.js";
5
5
  import d from "./messages.js";
6
6
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
7
- import { ItemActionMenu as u } from "../item-action-menu/item-action-menu.js";
8
- import '../../../../styles/metadata-grid.css';const h = "_itemThumbnail_1j3e6_1", p = {
9
- itemThumbnail: h
7
+ import { ItemActionMenu as h } from "../item-action-menu/item-action-menu.js";
8
+ import '../../../../styles/metadata-grid.css';const u = "_itemThumbnail_1j3e6_1", p = {
9
+ itemThumbnail: u
10
10
  }, w = ({
11
11
  items: m,
12
12
  itemActionMenuProps: t
13
13
  }) => {
14
14
  const {
15
- formatMessage: n
15
+ formatMessage: o
16
16
  } = l();
17
17
  return /* @__PURE__ */ e(i, {
18
- "aria-label": n(d.gridView),
18
+ "aria-label": o(d.gridView),
19
19
  selectionMode: "multiple",
20
20
  children: m.map((r, f) => /* @__PURE__ */ c(i.Item, {
21
21
  children: [/* @__PURE__ */ e(i.Thumbnail, {
@@ -28,14 +28,14 @@ import '../../../../styles/metadata-grid.css';const h = "_itemThumbnail_1j3e6_1"
28
28
  children: r.name
29
29
  }), /* @__PURE__ */ e(i.Subtitle, {
30
30
  children: r.createdAt
31
- }), /* @__PURE__ */ e(i.Actions, {
32
- children: (o) => t ? /* @__PURE__ */ e(u, {
31
+ }), t ? /* @__PURE__ */ e(i.Actions, {
32
+ children: (n) => /* @__PURE__ */ e(h, {
33
33
  ...t,
34
34
  item: r,
35
- onOpenChange: o,
35
+ onOpenChange: n,
36
36
  viewMode: s.GRID
37
- }) : null
38
- })]
37
+ })
38
+ }) : null]
39
39
  }, r.id))
40
40
  });
41
41
  };
@@ -7,11 +7,11 @@ import h from "./messages.js";
7
7
  import { jsx as e, jsxs as R } from "react/jsx-runtime";
8
8
  const L = ({
9
9
  columns: l,
10
- isLoading: i,
10
+ isLoading: i = !1,
11
11
  iconColumnVariant: o,
12
12
  isSelectAllEnabled: d,
13
- items: p,
14
- itemActionMenuProps: f,
13
+ items: f,
14
+ itemActionMenuProps: p,
15
15
  ...u
16
16
  }) => {
17
17
  const {
@@ -72,8 +72,8 @@ const L = ({
72
72
  columns: l,
73
73
  iconColumnVariant: o,
74
74
  isSelectAllEnabled: d,
75
- itemActionMenuProps: f,
76
- items: p
75
+ itemActionMenuProps: p,
76
+ items: f
77
77
  })]
78
78
  });
79
79
  };
@@ -1,11 +1,12 @@
1
1
  import "@box/blueprint-web";
2
2
  import "lodash/get";
3
+ import "react";
3
4
  import "@box/item-icon";
4
5
  import "clsx";
5
6
  import "../../../../../chunks/types.js";
6
- import { T as d } from "../../../../../chunks/table-body-with-data.js";
7
+ import { T as l } from "../../../../../chunks/table-body-with-data.js";
7
8
  import "react/jsx-runtime";
8
9
  import "../../item-action-menu/item-action-menu.js";
9
10
  export {
10
- d as default
11
+ l as default
11
12
  };
@@ -2,66 +2,68 @@ import { useState as V } from "react";
2
2
  import u from "./components/error-state/error-state.js";
3
3
  import I from "./components/pagination/pagination.js";
4
4
  import { MetadataGrid as T } from "./components/metadata-grid/metadata-grid.js";
5
- import { SwitchCase as y, Case as i } from "./components/switch-case/switch-case.js";
5
+ import { SwitchCase as _, Case as a } from "./components/switch-case/switch-case.js";
6
6
  import { V as e } from "../../chunks/types.js";
7
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
8
- import { ActionBar as L } from "./components/action-bar/action-bar.js";
9
- import x from "./components/empty-state/empty-state.js";
10
- import g from "./components/metadata-table/metadata-table.js";
11
- import '../../styles/metadata-view.css';const v = "_contentContainer_19ns1_8", p = {
12
- contentContainer: v
7
+ import { jsx as t, jsxs as s, Fragment as x } from "react/jsx-runtime";
8
+ import { ActionBar as b } from "./components/action-bar/action-bar.js";
9
+ import k from "./components/empty-state/empty-state.js";
10
+ import v from "./components/metadata-table/metadata-table.js";
11
+ import '../../styles/metadata-view.css';const D = "_container_nykl3_5", E = "_contentContainer_nykl3_14", p = {
12
+ container: D,
13
+ contentContainer: E
13
14
  };
14
- function q({
15
- actionBarProps: a,
15
+ function H({
16
+ actionBarProps: i,
16
17
  columns: m,
17
- tableProps: d,
18
- hasError: f,
19
- onRefresh: h,
20
- initialViewMode: C = e.LIST,
18
+ tableProps: f,
19
+ hasError: h,
20
+ onRefresh: C,
21
+ initialViewMode: M = e.LIST,
21
22
  paginationProps: c,
23
+ isLoading: d,
22
24
  ...r
23
25
  }) {
24
- const [o, s] = V(C), M = () => {
25
- o === e.LIST ? s(e.GRID) : s(e.LIST);
26
- }, S = !d.isLoading && r.items.length === 0, w = a.sortDropdownProps && m.filter((n) => n.type !== "multiSelect" && n.type !== "enum").map((n) => n.textValue);
27
- return /* @__PURE__ */ l("div", {
26
+ const [n, l] = V(M), S = () => {
27
+ n === e.LIST ? l(e.GRID) : l(e.LIST);
28
+ }, w = !d && r.items.length === 0, y = i && i.sortDropdownProps && m.filter((o) => o.type !== "multiSelect" && o.type !== "enum").map((o) => o.textValue);
29
+ return /* @__PURE__ */ t("div", {
28
30
  className: p.container,
29
- children: [/* @__PURE__ */ t(L, {
30
- ...a,
31
- onViewModeClick: M,
32
- sortableColumnNames: w,
33
- viewMode: o
34
- }), /* @__PURE__ */ t("div", {
35
- className: p.contentContainer,
36
- children: /* @__PURE__ */ l(y, {
37
- children: [/* @__PURE__ */ t(i, {
38
- condition: f,
39
- children: /* @__PURE__ */ t(u, {
40
- onRefresh: h
41
- })
42
- }), /* @__PURE__ */ t(i, {
43
- condition: S,
44
- children: /* @__PURE__ */ t(x, {})
45
- }), /* @__PURE__ */ t(i, {
46
- condition: o === e.LIST,
47
- children: /* @__PURE__ */ t(g, {
48
- columns: m,
49
- ...r,
50
- ...d
51
- })
52
- }), /* @__PURE__ */ t(i, {
53
- condition: o === e.GRID,
54
- children: /* @__PURE__ */ t(T, {
55
- ...r
56
- })
57
- })]
58
- })
59
- }), c && /* @__PURE__ */ t(I, {
60
- ...c
61
- })]
31
+ children: h ? /* @__PURE__ */ t(u, {
32
+ onRefresh: C
33
+ }) : /* @__PURE__ */ s(x, {
34
+ children: [/* @__PURE__ */ t(b, {
35
+ ...i,
36
+ onViewModeClick: S,
37
+ sortableColumnNames: y,
38
+ viewMode: n
39
+ }), /* @__PURE__ */ t("div", {
40
+ className: p.contentContainer,
41
+ children: /* @__PURE__ */ s(_, {
42
+ children: [/* @__PURE__ */ t(a, {
43
+ condition: w,
44
+ children: /* @__PURE__ */ t(k, {})
45
+ }), /* @__PURE__ */ t(a, {
46
+ condition: n === e.LIST,
47
+ children: /* @__PURE__ */ t(v, {
48
+ columns: m,
49
+ isLoading: d,
50
+ ...r,
51
+ ...f
52
+ })
53
+ }), /* @__PURE__ */ t(a, {
54
+ condition: n === e.GRID,
55
+ children: /* @__PURE__ */ t(T, {
56
+ ...r
57
+ })
58
+ })]
59
+ })
60
+ }), c && /* @__PURE__ */ t(I, {
61
+ ...c
62
+ })]
63
+ })
62
64
  });
63
65
  }
64
66
  export {
65
- q as MetadataView,
66
- q as default
67
+ H as MetadataView,
68
+ H as default
67
69
  };
@@ -1 +1 @@
1
- ._contentContainer_19ns1_8{overflow:auto}
1
+ ._container_nykl3_5{display:flex;flex-direction:column;overflow:hidden}._contentContainer_nykl3_14{overflow:auto}
@@ -1,11 +1,14 @@
1
1
  import { FilterRowProps } from '../filter-row';
2
2
  import { ViewMode } from '../../types';
3
3
  import { SortDropdownProps } from './sort-dropdown';
4
- export interface ActionBarProps extends FilterRowProps {
4
+ import { FilterGroup } from '../filter-row/types';
5
+ export interface ActionBarProps extends Omit<FilterRowProps, 'filterGroups'> {
6
+ filterGroups?: FilterGroup[];
7
+ isViewModeButtonDisabled?: boolean;
5
8
  onViewModeClick?: () => void;
6
- viewMode?: ViewMode;
7
9
  sortableColumnNames: string[];
8
10
  sortDropdownProps?: SortDropdownProps;
11
+ viewMode?: ViewMode;
9
12
  }
10
- export declare const ActionBar: ({ onViewModeClick, viewMode, sortableColumnNames, sortDropdownProps, ...rest }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const ActionBar: ({ isViewModeButtonDisabled, onViewModeClick, sortableColumnNames, sortDropdownProps, viewMode, ...rest }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
11
14
  export default ActionBar;
@@ -2,9 +2,9 @@ import { MetadataTemplateField } from '@box/metadata-filter';
2
2
  import { FilterGroup, PredefinedFilterName } from './types';
3
3
  export interface FilterRowProps {
4
4
  disabledPredefinedFilters?: Array<PredefinedFilterName>;
5
- filterGroups: Array<FilterGroup>;
5
+ filterGroups?: Array<FilterGroup>;
6
6
  isAllFiltersDisabled?: boolean;
7
- onFilterSubmit: (fields: MetadataTemplateField[]) => void;
7
+ onFilterSubmit?: (fields: MetadataTemplateField[]) => void;
8
8
  }
9
9
  export declare const FilterRow: ({ disabledPredefinedFilters, filterGroups: customFilterGroups, isAllFiltersDisabled, onFilterSubmit, }: FilterRowProps) => import("react/jsx-runtime").JSX.Element;
10
10
  export default FilterRow;
@@ -3,13 +3,13 @@ import { PaginationProps } from './components/pagination/pagination';
3
3
  import { ActionBarProps } from './components/action-bar';
4
4
  import { ViewMode, Column, MetadataProps } from './types';
5
5
  export interface MetadataViewProps extends MetadataProps {
6
- columns: Column[];
7
6
  actionBarProps?: Omit<ActionBarProps, 'onViewModeClick' | 'viewMode' | 'sortableColumnNames'>;
7
+ columns: Column[];
8
8
  hasError?: boolean;
9
9
  initialViewMode?: ViewMode;
10
10
  onRefresh?: () => void;
11
- tableProps: Omit<MetadataTableProps, 'columns' | 'items' | 'itemActionMenuProps'>;
11
+ tableProps?: Omit<MetadataTableProps, 'columns' | 'items' | 'itemActionMenuProps'>;
12
12
  paginationProps?: PaginationProps;
13
13
  }
14
- export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, paginationProps, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, paginationProps, isLoading, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
15
15
  export default MetadataView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-view",
3
- "version": "0.24.7",
3
+ "version": "0.24.9",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^11.12.0",
@@ -19,8 +19,8 @@
19
19
  "@box/blueprint-web": "^11.12.0",
20
20
  "@box/blueprint-web-assets": "^4.58.0",
21
21
  "@box/eslint-plugin-blueprint": "*",
22
- "@box/item-icon": "^0.13.12",
23
- "@box/metadata-filter": "^1.15.7",
22
+ "@box/item-icon": "^0.13.13",
23
+ "@box/metadata-filter": "^1.15.8",
24
24
  "@box/storybook-utils": "0.13.12",
25
25
  "@box/types": "0.2.1",
26
26
  "react-intl": "^6.4.2"