@box/metadata-editor 0.74.7 → 0.75.1

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,57 +1,57 @@
1
- import { useFormikContext as I, getIn as M, Field as R } from "formik";
2
- import { forwardRef as V } from "react";
3
- import { useIntl as $ } from "react-intl";
4
- import j from "../../../../messages.js";
5
- import { ComboboxWithApiPagination as w } from "../../../combobox-with-api-pagination/combobox-with-api-pagination.js";
6
- import { g as A } from "../../../../../../chunks/utils.js";
7
- import { jsx as o } from "react/jsx-runtime";
8
- const B = /* @__PURE__ */ V(({
9
- description: m,
10
- disableForm: n,
1
+ import { useFormikContext as M, getIn as P, Field as R } from "formik";
2
+ import { forwardRef as $ } from "react";
3
+ import { useIntl as j } from "react-intl";
4
+ import w from "../../../../messages.js";
5
+ import { ComboboxWithApiPagination as A } from "../../../combobox-with-api-pagination/combobox-with-api-pagination.js";
6
+ import { g as K } from "../../../../../../chunks/utils.js";
7
+ import { jsx as e } from "react/jsx-runtime";
8
+ const E = /* @__PURE__ */ $(({
9
+ description: l,
10
+ disableForm: d,
11
11
  isAiSuggestionApplied: s,
12
12
  fieldNamePrefix: r,
13
13
  label: a,
14
- portalElement: d,
15
- taxonomyOptionsFetcher: c,
14
+ portalElement: c,
15
+ taxonomyOptionsFetcher: p,
16
16
  updateModePrefix: u,
17
17
  className: f
18
- }, p) => {
19
- const g = $(), i = `${u ?? r}.value`, {
20
- setFieldValue: h,
21
- values: l
22
- } = I(), {
18
+ }, g) => {
19
+ const h = j(), n = `${u ?? r}.value`, {
20
+ setFieldValue: F,
21
+ values: i
22
+ } = M(), {
23
23
  metadata: {
24
- templateKey: F,
24
+ templateKey: v,
25
25
  scope: x
26
26
  }
27
- } = l, v = M(l, r), {
28
- key: y,
27
+ } = i, y = P(i, r), {
28
+ key: b,
29
29
  optionsRules: {
30
- multiSelect: b,
31
- selectableLevels: e
30
+ multiSelect: m,
31
+ selectableLevels: t
32
32
  }
33
- } = v, k = (t) => c(x, F, y, e == null ? void 0 : e[0], t);
34
- return /* @__PURE__ */ o("div", {
33
+ } = y, k = (o) => p(x, v, b, t == null ? void 0 : t[0], o), C = (o) => m || !(o != null && o.length) ? h.formatMessage(w.taxonomyPlaceholder) : void 0;
34
+ return /* @__PURE__ */ e("div", {
35
35
  "data-testid": `${a}-field`,
36
- children: /* @__PURE__ */ o(R, {
37
- name: i,
36
+ children: /* @__PURE__ */ e(R, {
37
+ name: n,
38
38
  children: ({
39
- field: t
40
- }) => /* @__PURE__ */ o(w, {
41
- ref: p,
39
+ field: o
40
+ }) => /* @__PURE__ */ e(A, {
41
+ ref: g,
42
42
  className: f,
43
43
  defaultFetcher: k,
44
- disabled: n,
45
- label: A(a, m, s),
46
- multiselect: b,
47
- onValueChange: (C) => h(i, C),
48
- placeholder: g.formatMessage(j.taxonomyPlaceholder),
49
- portalElement: d,
50
- value: t.value
44
+ disabled: d,
45
+ label: K(a, l, s),
46
+ multiselect: m,
47
+ onValueChange: (I) => F(n, I),
48
+ placeholder: C(o.value),
49
+ portalElement: c,
50
+ value: o.value
51
51
  })
52
52
  })
53
53
  });
54
54
  });
55
55
  export {
56
- B as MetadataTaxonomyField
56
+ E as MetadataTaxonomyField
57
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "0.74.7",
3
+ "version": "0.75.1",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.5",
6
6
  "@box/blueprint-web": "^7.30.3",
@@ -14,7 +14,7 @@
14
14
  "devDependencies": {
15
15
  "@ariakit/react": "0.4.5",
16
16
  "@box/babel-plugin-target-attributes": "1.3.0",
17
- "@box/blueprint-web": "^8.7.0",
17
+ "@box/blueprint-web": "^8.7.1",
18
18
  "@box/blueprint-web-assets": "^4.29.0",
19
19
  "@box/storybook-utils": "^0.7.0",
20
20
  "@testing-library/react": "^15.0.6",
@@ -53,5 +53,5 @@
53
53
  "**/*.css"
54
54
  ],
55
55
  "license": "SEE LICENSE IN LICENSE",
56
- "gitHead": "c6aecbdc9ecebff79bc52370ed1d612ff2eec44b"
56
+ "gitHead": "08cead4b10a66b448ac22ef4ad6393b696a0371b"
57
57
  }