@box/metadata-editor 0.66.0 → 0.66.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,26 +1,26 @@
1
- import { Select as l, SELECT_EMPTY_VALUE as o } from "@box/blueprint-web";
1
+ import { Select as l, SELECT_EMPTY_VALUE as r } from "@box/blueprint-web";
2
2
  import { useFormikContext as M, getIn as V, Field as C } from "formik";
3
- import { useIntl as L, FormattedMessage as $ } from "react-intl";
4
- import { forwardRef as b } from "react";
5
- import c from "../../../../messages.js";
6
- import { getFieldLabel as j } from "../../utils.js";
7
- import { jsx as t, jsxs as I } from "react/jsx-runtime";
8
- const U = /* @__PURE__ */ b(({
9
- className: u,
10
- description: i,
11
- disableForm: f,
3
+ import { forwardRef as L } from "react";
4
+ import { useIntl as P, FormattedMessage as $ } from "react-intl";
5
+ import d from "../../../../messages.js";
6
+ import { getFieldLabel as b } from "../../utils.js";
7
+ import { jsx as t, jsxs as j } from "react/jsx-runtime";
8
+ const O = /* @__PURE__ */ L(({
9
+ className: i,
10
+ description: u,
11
+ disableForm: p,
12
12
  fieldNamePrefix: s,
13
13
  label: n,
14
- options: h,
15
- portalElement: p,
14
+ options: f,
15
+ portalElement: h,
16
16
  updateModePrefix: v
17
17
  }, g) => {
18
18
  const {
19
- setFieldValue: F,
20
- values: x
21
- } = M(), E = L(), m = `${v ?? s}.value`, r = h || V(x, `${s}.options`, []).map(({
19
+ setFieldValue: E,
20
+ values: F
21
+ } = M(), x = P(), m = `${v ?? s}.value`, o = f || V(F, `${s}.options`, []).map(({
22
22
  key: a
23
- }) => a), d = E.formatMessage(c.selectValuePlaceholder);
23
+ }) => a), c = x.formatMessage(d.selectValuePlaceholder);
24
24
  return /* @__PURE__ */ t("div", {
25
25
  "data-testid": `${n}-field`,
26
26
  children: /* @__PURE__ */ t(C, {
@@ -29,24 +29,25 @@ const U = /* @__PURE__ */ b(({
29
29
  field: a
30
30
  }) => /* @__PURE__ */ t(l, {
31
31
  ref: g,
32
- className: u,
33
- disabled: f,
34
- label: j(n, i),
32
+ className: i,
33
+ disabled: p,
34
+ label: b(n, u),
35
35
  onValueChange: (e) => {
36
- F(m, e === o ? "" : e);
36
+ E(m, e === r ? "" : e);
37
37
  },
38
- placeholder: d,
38
+ placeholder: c,
39
39
  ...a,
40
- value: a.value === o ? "" : a.value,
41
- children: /* @__PURE__ */ I(l.Content, {
42
- container: p,
40
+ value: a.value === r ? "" : a.value,
41
+ children: /* @__PURE__ */ j(l.Content, {
42
+ container: h,
43
+ onEscapeKeyDown: (e) => e.stopPropagation(),
43
44
  children: [/* @__PURE__ */ t(l.Option, {
44
- text: d,
45
- value: o,
45
+ text: c,
46
+ value: r,
46
47
  children: /* @__PURE__ */ t($, {
47
- ...c.selectValuePlaceholder
48
+ ...d.selectValuePlaceholder
48
49
  })
49
- }), r == null ? void 0 : r.map((e) => /* @__PURE__ */ t(l.Option, {
50
+ }), o == null ? void 0 : o.map((e) => /* @__PURE__ */ t(l.Option, {
50
51
  text: e,
51
52
  value: e,
52
53
  children: e
@@ -57,6 +58,6 @@ const U = /* @__PURE__ */ b(({
57
58
  });
58
59
  });
59
60
  export {
60
- U as MetadataEnumField,
61
- U as default
61
+ O as MetadataEnumField,
62
+ O as default
62
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "0.66.0",
3
+ "version": "0.66.1",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.5",
6
6
  "@box/blueprint-web": "^7.30.3",
@@ -53,5 +53,5 @@
53
53
  "**/*.css"
54
54
  ],
55
55
  "license": "SEE LICENSE IN LICENSE",
56
- "gitHead": "fec5f60d64cecfdab83b9ec202aa14114171031f"
56
+ "gitHead": "322d297c0f3b9276c89abc74a8889e21150482e4"
57
57
  }