@box/metadata-view 2.2.2 → 2.2.4

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,36 +1,40 @@
1
- import { formatAdvancedFilterLabel as e } from "./format-advanced-filter-label.js";
2
- import { useCallback as t, useMemo as n, useState as r } from "react";
3
- import { useIntl as i } from "react-intl";
4
- var a = ({ name: a, initialAdvancedFilterOption: o, filterValue: s }) => {
5
- let { formatDate: c, formatMessage: l } = i(), [u, d] = r(o), [f, p] = r(o), m = t((e) => {
6
- d(e);
7
- }, []), h = t(() => {
8
- p(u);
9
- }, [u]), g = t(() => {
10
- d(f);
11
- }, [f]), _ = t(() => {
12
- d(void 0), p(void 0);
1
+ import { extractAdvancedFilterOption as e } from "./is-filter-selected.js";
2
+ import { formatAdvancedFilterLabel as t } from "./format-advanced-filter-label.js";
3
+ import { useCallback as n, useMemo as r, useState as i } from "react";
4
+ import { useIntl as a } from "react-intl";
5
+ var o = ({ name: o, initialAdvancedFilterOption: s, filterValue: c }) => {
6
+ let { formatDate: l, formatMessage: u } = a(), [d, f] = i(s), [p, m] = i(s), h = n((e) => {
7
+ f(e);
8
+ }, []), g = n(() => {
9
+ m(d);
10
+ }, [d]), _ = n(() => {
11
+ f(p);
12
+ }, [p]), v = n(() => {
13
+ f(void 0), m(void 0);
13
14
  }, []);
14
15
  return {
15
- currentAdvancedFilterOption: u,
16
- appliedAdvancedFilterOption: f,
17
- dynamicDisplayName: n(() => e({
18
- name: a,
19
- advancedFilterOption: f,
20
- filterValue: s,
21
- formatDate: c,
22
- formatMessage: l
23
- }), [
24
- a,
25
- f,
26
- s,
16
+ currentAdvancedFilterOption: d,
17
+ appliedAdvancedFilterOption: p,
18
+ dynamicDisplayName: r(() => {
19
+ let n = c ? e(c) : void 0;
20
+ return t({
21
+ name: o,
22
+ advancedFilterOption: p ?? n,
23
+ filterValue: c,
24
+ formatDate: l,
25
+ formatMessage: u
26
+ });
27
+ }, [
28
+ o,
29
+ p,
27
30
  c,
28
- l
31
+ l,
32
+ u
29
33
  ]),
30
- handleAdvancedFilterOptionChange: m,
31
- handleApply: h,
32
- handleCancel: g,
33
- handleClear: _
34
+ handleAdvancedFilterOptionChange: h,
35
+ handleApply: g,
36
+ handleCancel: _,
37
+ handleClear: v
34
38
  };
35
39
  };
36
- export { a as useFormFilterChip };
40
+ export { o as useFormFilterChip };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@box/metadata-view",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^16.1.1",
7
- "@box/blueprint-web-assets": "^5.1.1",
8
- "@box/box-item-type-selector": "^2.1.1",
9
- "@box/content-field": "^2.1.1",
10
- "@box/item-icon": "^3.2.0",
11
- "@box/metadata-filter": "^2.1.2",
6
+ "@box/blueprint-web": "^16.1.2",
7
+ "@box/blueprint-web-assets": "^5.2.0",
8
+ "@box/box-item-type-selector": "^2.1.2",
9
+ "@box/content-field": "^2.1.2",
10
+ "@box/item-icon": "^3.2.1",
11
+ "@box/metadata-filter": "^2.1.3",
12
12
  "@box/types": "3.1.1",
13
13
  "@tanstack/react-virtual": "^3.10.8",
14
14
  "formik": "^2.4.5",
@@ -19,14 +19,14 @@
19
19
  "react-intl": "^6.4.2"
20
20
  },
21
21
  "devDependencies": {
22
- "@box/blueprint-web": "^16.1.1",
23
- "@box/blueprint-web-assets": "^5.1.1",
24
- "@box/box-item-type-selector": "^2.1.1",
25
- "@box/content-field": "^2.1.1",
22
+ "@box/blueprint-web": "^16.1.2",
23
+ "@box/blueprint-web-assets": "^5.2.0",
24
+ "@box/box-item-type-selector": "^2.1.2",
25
+ "@box/content-field": "^2.1.2",
26
26
  "@box/eslint-plugin-blueprint": "2.1.1",
27
- "@box/item-icon": "^3.2.0",
28
- "@box/metadata-filter": "^2.1.2",
29
- "@box/storybook-utils": "1.1.1",
27
+ "@box/item-icon": "^3.2.1",
28
+ "@box/metadata-filter": "^2.1.3",
29
+ "@box/storybook-utils": "1.1.2",
30
30
  "@box/types": "3.1.1",
31
31
  "@tanstack/react-virtual": "^3.10.8",
32
32
  "react-intl": "^6.4.2"