@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
|
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 {
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import { getFieldLabel as
|
7
|
-
import { jsx as t, jsxs as
|
8
|
-
const
|
9
|
-
className:
|
10
|
-
description:
|
11
|
-
disableForm:
|
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:
|
15
|
-
portalElement:
|
14
|
+
options: f,
|
15
|
+
portalElement: h,
|
16
16
|
updateModePrefix: v
|
17
17
|
}, g) => {
|
18
18
|
const {
|
19
|
-
setFieldValue:
|
20
|
-
values:
|
21
|
-
} = M(),
|
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),
|
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:
|
33
|
-
disabled:
|
34
|
-
label:
|
32
|
+
className: i,
|
33
|
+
disabled: p,
|
34
|
+
label: b(n, u),
|
35
35
|
onValueChange: (e) => {
|
36
|
-
|
36
|
+
E(m, e === r ? "" : e);
|
37
37
|
},
|
38
|
-
placeholder:
|
38
|
+
placeholder: c,
|
39
39
|
...a,
|
40
|
-
value: a.value ===
|
41
|
-
children: /* @__PURE__ */
|
42
|
-
container:
|
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:
|
45
|
-
value:
|
45
|
+
text: c,
|
46
|
+
value: r,
|
46
47
|
children: /* @__PURE__ */ t($, {
|
47
|
-
...
|
48
|
+
...d.selectValuePlaceholder
|
48
49
|
})
|
49
|
-
}),
|
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
|
-
|
61
|
-
|
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.
|
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": "
|
56
|
+
"gitHead": "322d297c0f3b9276c89abc74a8889e21150482e4"
|
57
57
|
}
|