@box/metadata-editor 0.123.17 → 0.123.19
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,79 @@
|
|
|
1
1
|
import { ComboboxWithApiTreeView as w, ComboboxWithApiPagination as A } from "@box/combobox-with-api";
|
|
2
|
-
import { useFormikContext as K, getIn as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import { g as
|
|
7
|
-
import { jsx as
|
|
8
|
-
const
|
|
9
|
-
description:
|
|
10
|
-
disableForm:
|
|
11
|
-
isAiSuggestionApplied:
|
|
12
|
-
fieldNamePrefix:
|
|
13
|
-
label:
|
|
14
|
-
portalElement:
|
|
15
|
-
taxonomyOptionsFetcher:
|
|
16
|
-
updateModePrefix:
|
|
17
|
-
className:
|
|
18
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
setFieldValue:
|
|
22
|
-
values:
|
|
2
|
+
import { useFormikContext as K, getIn as V, Field as $ } from "formik";
|
|
3
|
+
import { forwardRef as j } from "react";
|
|
4
|
+
import { useIntl as D } from "react-intl";
|
|
5
|
+
import E from "../../../../messages.js";
|
|
6
|
+
import { g as v } from "../../../../../../chunks/utils2.js";
|
|
7
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
8
|
+
const H = /* @__PURE__ */ j(({
|
|
9
|
+
description: r,
|
|
10
|
+
disableForm: i,
|
|
11
|
+
isAiSuggestionApplied: m,
|
|
12
|
+
fieldNamePrefix: l,
|
|
13
|
+
label: a,
|
|
14
|
+
portalElement: d,
|
|
15
|
+
taxonomyOptionsFetcher: y,
|
|
16
|
+
updateModePrefix: C,
|
|
17
|
+
className: u,
|
|
18
|
+
isMultilevelTaxonomyFieldEnabled: F
|
|
19
|
+
}, h) => {
|
|
20
|
+
const T = D(), p = `${C ?? l}.value`, {
|
|
21
|
+
setFieldValue: b,
|
|
22
|
+
values: s
|
|
23
23
|
} = K(), {
|
|
24
24
|
metadata: {
|
|
25
|
-
templateKey:
|
|
26
|
-
scope:
|
|
25
|
+
templateKey: M,
|
|
26
|
+
scope: I
|
|
27
27
|
}
|
|
28
|
-
} =
|
|
29
|
-
key:
|
|
28
|
+
} = s, P = V(s, l), {
|
|
29
|
+
key: W,
|
|
30
30
|
optionsRules: {
|
|
31
|
-
multiSelect:
|
|
31
|
+
multiSelect: n,
|
|
32
32
|
selectableLevels: t
|
|
33
33
|
},
|
|
34
|
-
levels:
|
|
35
|
-
} =
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
levels: k
|
|
35
|
+
} = P, c = F && (t == null ? void 0 : t.some((o) => o > 1)), g = (o) => y(I, M, W, t == null ? void 0 : t[0], o), x = (o) => n || !(o != null && o.length) ? T.formatMessage(E.taxonomyPlaceholder) : void 0, f = (o) => {
|
|
36
|
+
b(p, o);
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ e("div", {
|
|
39
|
+
"data-testid": `${a}-field`,
|
|
38
40
|
onKeyDown: (o) => o.stopPropagation(),
|
|
39
41
|
role: "presentation",
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
-
name:
|
|
42
|
+
children: /* @__PURE__ */ e($, {
|
|
43
|
+
name: p,
|
|
42
44
|
children: ({
|
|
43
45
|
field: o
|
|
44
|
-
}) =>
|
|
45
|
-
ref:
|
|
46
|
-
className:
|
|
46
|
+
}) => c ? /* @__PURE__ */ e(w, {
|
|
47
|
+
ref: h,
|
|
48
|
+
className: u,
|
|
49
|
+
closeOnSelection: c,
|
|
47
50
|
dataTargetId: "ComboboxWithApiTreeView-MetadataEditorTaxonomyField",
|
|
48
|
-
defaultFetcher:
|
|
49
|
-
disabled:
|
|
50
|
-
label:
|
|
51
|
-
levels:
|
|
52
|
-
multiselect:
|
|
53
|
-
onValueChange:
|
|
54
|
-
placeholder:
|
|
55
|
-
portalElement:
|
|
51
|
+
defaultFetcher: g,
|
|
52
|
+
disabled: i,
|
|
53
|
+
label: v(a, r, m),
|
|
54
|
+
levels: k,
|
|
55
|
+
multiselect: n,
|
|
56
|
+
onValueChange: f,
|
|
57
|
+
placeholder: x(o.value),
|
|
58
|
+
portalElement: d,
|
|
56
59
|
selectableLevels: t,
|
|
57
60
|
value: o.value
|
|
58
|
-
}) : /* @__PURE__ */
|
|
59
|
-
ref:
|
|
60
|
-
className:
|
|
61
|
+
}) : /* @__PURE__ */ e(A, {
|
|
62
|
+
ref: h,
|
|
63
|
+
className: u,
|
|
61
64
|
dataTargetId: "ComboboxWithApiPagination-MetadataEditorTaxonomyField",
|
|
62
|
-
defaultFetcher:
|
|
63
|
-
disabled:
|
|
64
|
-
label:
|
|
65
|
-
multiselect:
|
|
66
|
-
onValueChange:
|
|
67
|
-
placeholder:
|
|
68
|
-
portalElement:
|
|
65
|
+
defaultFetcher: g,
|
|
66
|
+
disabled: i,
|
|
67
|
+
label: v(a, r, m),
|
|
68
|
+
multiselect: n,
|
|
69
|
+
onValueChange: f,
|
|
70
|
+
placeholder: x(o.value),
|
|
71
|
+
portalElement: d,
|
|
69
72
|
value: o.value
|
|
70
73
|
})
|
|
71
74
|
})
|
|
72
75
|
});
|
|
73
76
|
});
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
H as MetadataTaxonomyField
|
|
76
79
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "0.123.
|
|
3
|
+
"version": "0.123.19",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
6
|
"@box/box-ai-agent-selector": "^0.41.7",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^0.52.
|
|
18
|
+
"@box/box-ai-agent-selector": "^0.52.6",
|
|
19
19
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
|
20
|
-
"@box/blueprint-web": "^12.
|
|
20
|
+
"@box/blueprint-web": "^12.59.1",
|
|
21
21
|
"@box/blueprint-web-assets": "^4.63.0",
|
|
22
22
|
"@box/storybook-utils": "^0.13.18",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|