@box/metadata-view 1.6.1 → 1.6.3

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,76 +1,82 @@
1
- import { Filter as B } from "./filter.js";
2
- import { SidePanel as t, Accordion as c } from "@box/blueprint-web";
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";
1
+ import { Filter as x } from "./filter.js";
2
+ import { SidePanel as t, Accordion as u } from "@box/blueprint-web";
3
+ import { useIntl as j } from "react-intl";
4
+ import { useFormikContext as B } from "formik";
5
+ import k from "lodash/noop";
6
+ import { useState as p } from "react";
7
+ import l from "./messages.js";
8
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
9
+ import '../../../../styles/filter-side-panel.css';const A = "_sidePanelContent_1j6pr_1", N = "_staticPosition_1j6pr_1", a = {
10
+ sidePanelContent: A,
11
+ staticPosition: N
12
+ }, q = ({
13
+ containerRef: s,
14
+ filterGroups: r,
15
+ isOpen: C,
16
+ onIsOpenChange: c = k,
17
+ getInitialFormValues: P
15
18
  }) => {
16
19
  const {
17
- formatMessage: r
18
- } = k(), {
20
+ formatMessage: o
21
+ } = j(), {
19
22
  handleSubmit: F,
20
23
  resetForm: m,
21
24
  values: f
22
- } = A(), [S] = u(f), [v, b] = u(null), y = () => {
25
+ } = B(), [S] = p(f), [v, y] = p(null), _ = () => {
23
26
  m({
24
- values: C()
27
+ values: P()
25
28
  });
26
- }, g = (l) => {
29
+ }, b = (n) => {
27
30
  m({
28
31
  values: S
29
- }), s(l);
30
- }, x = () => {
31
- F(), s(!1);
32
+ }), c(n);
33
+ }, g = () => {
34
+ F(), c(!1);
32
35
  };
33
36
  return /* @__PURE__ */ e(t, {
34
- onOpenChange: g,
35
- open: p,
37
+ onOpenChange: b,
38
+ open: C,
36
39
  variant: "overlay",
37
40
  children: /* @__PURE__ */ e(t.Overlay, {
38
- container: n == null ? void 0 : n.current,
41
+ container: s == null ? void 0 : s.current,
39
42
  children: /* @__PURE__ */ h(t.Content, {
43
+ className: a.sidePanelContent,
40
44
  children: [/* @__PURE__ */ e(t.Header, {
41
- children: r(o.filtersHeader)
45
+ className: a.staticPosition,
46
+ children: o(l.filtersHeader)
42
47
  }), /* @__PURE__ */ e(t.ScrollableContainer, {
43
- ref: b,
44
- children: /* @__PURE__ */ e(c, {
45
- defaultValue: i.map((l, a) => `item-${a}`),
48
+ ref: y,
49
+ children: /* @__PURE__ */ e(u, {
50
+ defaultValue: r.map((n, i) => `item-${i}`),
46
51
  type: "multiple",
47
- children: i.map((l, a) => /* @__PURE__ */ e(c.Item, {
48
- ...l.toggleable ? {} : {
52
+ children: r.map((n, i) => /* @__PURE__ */ e(u.Item, {
53
+ ...n.toggleable ? {} : {
49
54
  fixed: "true"
50
55
  },
51
- title: l.title,
52
- value: `item-${a}`,
53
- children: l.filters.map((d) => /* @__PURE__ */ e(B, {
56
+ title: n.title,
57
+ value: `item-${i}`,
58
+ children: n.filters.map((d) => /* @__PURE__ */ e(x, {
54
59
  ...d,
55
60
  parentRef: v
56
61
  }, d.id))
57
- }, `accordion-item-${l.title || "unnamed"}`))
62
+ }, `accordion-item-${n.title || "unnamed"}`))
58
63
  })
59
64
  }), /* @__PURE__ */ h(t.Footer, {
65
+ className: a.staticPosition,
60
66
  children: [/* @__PURE__ */ e(t.Footer.SecondaryButton, {
61
- onClick: y,
62
- children: r(o.clearAllButton)
67
+ onClick: _,
68
+ children: o(l.clearAllButton)
63
69
  }), /* @__PURE__ */ e(t.Footer.PrimaryButton, {
64
- onClick: x,
65
- children: r(o.showResultsButton)
70
+ onClick: g,
71
+ children: o(l.showResultsButton)
66
72
  })]
67
73
  }), /* @__PURE__ */ e(t.Close, {
68
- "aria-label": r(o.closeAriaLabel)
74
+ "aria-label": o(l.closeAriaLabel)
69
75
  })]
70
76
  })
71
77
  })
72
78
  });
73
79
  };
74
80
  export {
75
- M as FilterSidePanel
81
+ q as FilterSidePanel
76
82
  };
@@ -0,0 +1 @@
1
+ ._sidePanelContent_1j6pr_1 ._staticPosition_1j6pr_1{position:static}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-view",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^12.76.2",
@@ -18,12 +18,12 @@
18
18
  "react-intl": "^6.4.2"
19
19
  },
20
20
  "devDependencies": {
21
- "@box/blueprint-web": "^12.89.1",
21
+ "@box/blueprint-web": "^12.89.2",
22
22
  "@box/blueprint-web-assets": "^4.75.0",
23
- "@box/box-item-type-selector": "^1.2.5",
23
+ "@box/box-item-type-selector": "^1.2.6",
24
24
  "@box/eslint-plugin-blueprint": "1.0.5",
25
- "@box/item-icon": "^1.3.5",
26
- "@box/metadata-filter": "^1.39.5",
25
+ "@box/item-icon": "^1.3.6",
26
+ "@box/metadata-filter": "^1.39.6",
27
27
  "@box/storybook-utils": "0.14.11",
28
28
  "@box/types": "1.0.0",
29
29
  "@tanstack/react-virtual": "^3.10.8",