@box/metadata-editor 1.29.5 → 1.31.0

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.
Files changed (61) hide show
  1. package/dist/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +54 -49
  2. package/dist/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +40 -37
  3. package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +71 -60
  4. package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +4 -0
  5. package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +20 -20
  6. package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.js +32 -20
  7. package/dist/i18n/bn-IN.js +1 -0
  8. package/dist/i18n/bn-IN.properties +2 -0
  9. package/dist/i18n/da-DK.js +1 -0
  10. package/dist/i18n/da-DK.properties +2 -0
  11. package/dist/i18n/de-DE.js +1 -0
  12. package/dist/i18n/de-DE.properties +2 -0
  13. package/dist/i18n/en-AU.js +1 -0
  14. package/dist/i18n/en-AU.properties +2 -0
  15. package/dist/i18n/en-CA.js +1 -0
  16. package/dist/i18n/en-CA.properties +2 -0
  17. package/dist/i18n/en-GB.js +1 -0
  18. package/dist/i18n/en-GB.properties +2 -0
  19. package/dist/i18n/en-US.js +1 -0
  20. package/dist/i18n/en-US.properties +2 -0
  21. package/dist/i18n/en-x-pseudo.js +130 -129
  22. package/dist/i18n/en-x-pseudo.properties +131 -129
  23. package/dist/i18n/es-419.js +1 -0
  24. package/dist/i18n/es-419.properties +2 -0
  25. package/dist/i18n/es-ES.js +1 -0
  26. package/dist/i18n/es-ES.properties +2 -0
  27. package/dist/i18n/fi-FI.js +1 -0
  28. package/dist/i18n/fi-FI.properties +2 -0
  29. package/dist/i18n/fr-CA.js +1 -0
  30. package/dist/i18n/fr-CA.properties +2 -0
  31. package/dist/i18n/fr-FR.js +1 -0
  32. package/dist/i18n/fr-FR.properties +2 -0
  33. package/dist/i18n/hi-IN.js +1 -0
  34. package/dist/i18n/hi-IN.properties +2 -0
  35. package/dist/i18n/it-IT.js +1 -0
  36. package/dist/i18n/it-IT.properties +2 -0
  37. package/dist/i18n/ja-JP.js +1 -0
  38. package/dist/i18n/ja-JP.properties +2 -0
  39. package/dist/i18n/json/src/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.json +1 -1
  40. package/dist/i18n/ko-KR.js +1 -0
  41. package/dist/i18n/ko-KR.properties +2 -0
  42. package/dist/i18n/nb-NO.js +1 -0
  43. package/dist/i18n/nb-NO.properties +2 -0
  44. package/dist/i18n/nl-NL.js +1 -0
  45. package/dist/i18n/nl-NL.properties +2 -0
  46. package/dist/i18n/pl-PL.js +1 -0
  47. package/dist/i18n/pl-PL.properties +2 -0
  48. package/dist/i18n/pt-BR.js +1 -0
  49. package/dist/i18n/pt-BR.properties +2 -0
  50. package/dist/i18n/ru-RU.js +1 -0
  51. package/dist/i18n/ru-RU.properties +2 -0
  52. package/dist/i18n/sv-SE.js +1 -0
  53. package/dist/i18n/sv-SE.properties +2 -0
  54. package/dist/i18n/tr-TR.js +1 -0
  55. package/dist/i18n/tr-TR.properties +2 -0
  56. package/dist/i18n/zh-CN.js +1 -0
  57. package/dist/i18n/zh-CN.properties +2 -0
  58. package/dist/i18n/zh-TW.js +1 -0
  59. package/dist/i18n/zh-TW.properties +2 -0
  60. package/dist/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.d.ts +5 -0
  61. package/package.json +9 -9
@@ -1,66 +1,71 @@
1
- import { Select as l, SELECT_EMPTY_VALUE as o } from "@box/blueprint-web";
2
- import { useFormikContext as C, getIn as L, Field as O } from "formik";
3
- import { forwardRef as P } from "react";
4
- import { useIntl as S, FormattedMessage as $ } from "react-intl";
5
- import i from "../../../../messages.js";
6
- import { g as b } from "../../../../../../chunks/utils2.js";
7
- import { jsx as t, jsxs as j } from "react/jsx-runtime";
8
- const U = /* @__PURE__ */ P(({
9
- className: m,
10
- isAiSuggestionApplied: c,
11
- description: u,
12
- disableForm: p,
13
- fieldNamePrefix: r,
14
- updateModePrefix: f,
15
- label: s,
16
- onValueEdited: g,
17
- options: h,
18
- portalElement: v
19
- }, E) => {
1
+ import { Select as l, SELECT_EMPTY_VALUE as r } from "@box/blueprint-web";
2
+ import { useFormikContext as _, getIn as A, Field as C } from "formik";
3
+ import { forwardRef as O } from "react";
4
+ import { useIntl as T, FormattedMessage as $ } from "react-intl";
5
+ import u from "../../../../messages.js";
6
+ import { g as I } from "../../../../../../chunks/utils2.js";
7
+ import { messages as P } from "../update-mode-field-wrapper/messages.js";
8
+ import { MULTI_VALUE_DEFAULT_VALUE as S } from "../update-mode-field-wrapper/mulitple-values-utils.js";
9
+ import { jsx as a, jsxs as j } from "react/jsx-runtime";
10
+ const B = /* @__PURE__ */ O(({
11
+ className: c,
12
+ isAiSuggestionApplied: p,
13
+ description: f,
14
+ disableForm: g,
15
+ fieldNamePrefix: s,
16
+ updateModePrefix: E,
17
+ label: n,
18
+ onValueEdited: h,
19
+ options: v,
20
+ portalElement: L
21
+ }, V) => {
20
22
  const {
21
23
  setFieldValue: F,
22
24
  values: M
23
- } = C(), x = S(), n = `${f ?? r}.value`, V = h || L(M, `${r}.options`, []).map(({
24
- key: a
25
- }) => a), d = x.formatMessage(i.selectValuePlaceholder);
26
- return /* @__PURE__ */ t("div", {
27
- "data-testid": `${s}-field`,
28
- children: /* @__PURE__ */ t(O, {
29
- name: n,
25
+ } = _(), {
26
+ formatMessage: i
27
+ } = T(), m = `${E ?? s}.value`, b = i(P.multipleValues), x = (v || A(M, `${s}.options`, [])).map((e) => typeof e == "string" ? e : e.key), d = i(u.selectValuePlaceholder), U = (e) => e === S ? b : e;
28
+ return /* @__PURE__ */ a("div", {
29
+ "data-testid": `${n}-field`,
30
+ children: /* @__PURE__ */ a(C, {
31
+ name: m,
30
32
  children: ({
31
- field: a
32
- }) => /* @__PURE__ */ t(l, {
33
- ref: E,
34
- className: m,
33
+ field: e
34
+ }) => /* @__PURE__ */ a(l, {
35
+ ref: V,
36
+ className: c,
35
37
  "data-target-id": "Select-MetadataEditorEnumField",
36
- disabled: p,
37
- label: b(s, u, c),
38
- onValueChange: (e) => {
39
- F(n, e === o ? "" : e), g();
38
+ disabled: g,
39
+ label: I(n, f, p),
40
+ onValueChange: (t) => {
41
+ F(m, t === r ? "" : t), h();
40
42
  },
41
43
  placeholder: d,
42
- ...a,
43
- value: a.value === o ? "" : a.value,
44
+ ...e,
45
+ value: e.value === r ? "" : e.value,
44
46
  children: /* @__PURE__ */ j(l.Content, {
45
- container: v,
46
- onEscapeKeyDown: (e) => e.stopPropagation(),
47
- children: [/* @__PURE__ */ t(l.Option, {
47
+ container: L,
48
+ onEscapeKeyDown: (t) => t.stopPropagation(),
49
+ children: [/* @__PURE__ */ a(l.Option, {
48
50
  text: d,
49
- value: o,
50
- children: /* @__PURE__ */ t($, {
51
- ...i.selectValuePlaceholder
51
+ value: r,
52
+ children: /* @__PURE__ */ a($, {
53
+ ...u.selectValuePlaceholder
52
54
  })
53
- }), V?.map((e) => /* @__PURE__ */ t(l.Option, {
54
- text: e,
55
- value: e,
56
- children: e
57
- }, e))]
55
+ }), x?.map((t) => {
56
+ const o = U(t);
57
+ return /* @__PURE__ */ a(l.Option, {
58
+ text: o,
59
+ value: t,
60
+ children: o
61
+ }, t);
62
+ })]
58
63
  })
59
64
  })
60
65
  })
61
66
  });
62
67
  });
63
68
  export {
64
- U as MetadataEnumField,
65
- U as default
69
+ B as MetadataEnumField,
70
+ B as default
66
71
  };
@@ -1,52 +1,55 @@
1
- import { Combobox as M } from "@box/blueprint-web";
2
- import { useFormikContext as x, getIn as V, Field as w } from "formik";
3
- import { forwardRef as $ } from "react";
4
- import { useIntl as I } from "react-intl";
5
- import S from "../../../../messages.js";
6
- import { g as j } from "../../../../../../chunks/utils2.js";
7
- import { jsx as t } from "react/jsx-runtime";
8
- const A = /* @__PURE__ */ $(({
9
- className: i,
1
+ import { Combobox as v } from "@box/blueprint-web";
2
+ import { useFormikContext as y, getIn as x, Field as E } from "formik";
3
+ import { forwardRef as U } from "react";
4
+ import { useIntl as $ } from "react-intl";
5
+ import w from "../../../../messages.js";
6
+ import { g as A } from "../../../../../../chunks/utils2.js";
7
+ import { messages as D } from "../update-mode-field-wrapper/messages.js";
8
+ import { MULTI_VALUE_DEFAULT_VALUE as I } from "../update-mode-field-wrapper/mulitple-values-utils.js";
9
+ import { jsx as l } from "react/jsx-runtime";
10
+ const G = /* @__PURE__ */ U(({
11
+ className: m,
10
12
  isAiSuggestionApplied: n,
11
- description: s,
12
- disableForm: m,
13
+ description: u,
14
+ disableForm: d,
13
15
  fieldNamePrefix: o,
14
16
  label: a,
15
- onValueEdited: d,
16
- options: u,
17
- portalElement: c,
18
- updateModePrefix: f
19
- }, p) => {
17
+ onValueEdited: p,
18
+ options: c,
19
+ portalElement: f,
20
+ updateModePrefix: g
21
+ }, V) => {
20
22
  const {
21
- setFieldValue: g,
22
- values: h
23
- } = x(), F = I(), l = `${f ?? o}.value`, b = u || V(h, `${o}.options`, []).map(({
24
- key: e
25
- }) => e), v = (e, r) => r.toLowerCase().includes(e.toLowerCase());
26
- return /* @__PURE__ */ t("div", {
23
+ setFieldValue: L,
24
+ values: F
25
+ } = y(), {
26
+ formatMessage: s
27
+ } = $(), r = `${g ?? o}.value`, h = s(D.multipleValues), b = (c || x(F, `${o}.options`, [])).map((e) => typeof e == "string" ? e : e.key), C = (e, i) => i.toLowerCase().includes(e.toLowerCase());
28
+ return /* @__PURE__ */ l("div", {
27
29
  "data-testid": `${a}-field`,
28
- children: /* @__PURE__ */ t(w, {
29
- name: l,
30
+ children: /* @__PURE__ */ l(E, {
31
+ name: r,
30
32
  children: ({
31
33
  field: e
32
34
  }) => {
33
- const C = (e.value?.length || 0) === 0 ? F.formatMessage(S.multiselectPlaceholder) : "";
34
- return /* @__PURE__ */ t(M, {
35
- ref: p,
35
+ const M = (e.value?.length || 0) === 0 ? s(w.multiselectPlaceholder) : "";
36
+ return /* @__PURE__ */ l(v, {
37
+ ref: V,
36
38
  as: "input",
37
- className: i,
39
+ className: m,
38
40
  "data-target-id": "Combobox-MetadataEditorMultiSelectField",
39
- disabled: m,
40
- filterFn: v,
41
- label: j(a, s, n),
41
+ disabled: d,
42
+ displayValue: (t) => t === I ? h : t,
43
+ filterFn: C,
44
+ label: A(a, u, n),
42
45
  multiselect: !0,
43
46
  name: e.name,
44
- onValueChange: (L) => {
45
- g(l, L), d();
47
+ onValueChange: (t) => {
48
+ L(r, t), p();
46
49
  },
47
50
  options: b,
48
- placeholder: C,
49
- portalElement: c,
51
+ placeholder: M,
52
+ portalElement: f,
50
53
  value: e.value
51
54
  });
52
55
  }
@@ -54,6 +57,6 @@ const A = /* @__PURE__ */ $(({
54
57
  });
55
58
  });
56
59
  export {
57
- A as MetadataMultiSelectField,
58
- A as default
60
+ G as MetadataMultiSelectField,
61
+ G as default
59
62
  };
@@ -1,79 +1,90 @@
1
1
  import { ComboboxWithApiTreeView as W, ComboboxWithApiPagination as w } from "@box/combobox-with-api";
2
- import { useFormikContext as A, getIn as K, Field as L } from "formik";
3
- import { forwardRef as $, useCallback as j } from "react";
4
- import { useIntl as D } from "react-intl";
5
- import E from "../../../../messages.js";
6
- import { g as y } from "../../../../../../chunks/utils2.js";
7
- import { jsx as t } from "react/jsx-runtime";
8
- const J = /* @__PURE__ */ $(({
9
- description: n,
10
- disableForm: r,
11
- isAiSuggestionApplied: i,
12
- fieldNamePrefix: s,
13
- label: a,
2
+ import { useFormikContext as _, getIn as $, Field as D } from "formik";
3
+ import { forwardRef as K, useCallback as j } from "react";
4
+ import { useIntl as R } from "react-intl";
5
+ import S from "../../../../messages.js";
6
+ import { g as A } from "../../../../../../chunks/utils2.js";
7
+ import { messages as q } from "../update-mode-field-wrapper/messages.js";
8
+ import { MULTI_VALUE_DEFAULT_VALUE as z } from "../update-mode-field-wrapper/mulitple-values-utils.js";
9
+ import { jsx as l } from "react/jsx-runtime";
10
+ const B = (a, o) => a === z ? o : a, ee = /* @__PURE__ */ K(({
11
+ description: a,
12
+ disableForm: o,
13
+ isAiSuggestionApplied: s,
14
+ fieldNamePrefix: n,
15
+ label: r,
16
+ onValueEdited: L,
14
17
  portalElement: m,
15
- taxonomyOptionsFetcher: d,
16
- updateModePrefix: F,
17
- className: u,
18
- isMultilevelTaxonomyFieldEnabled: V
18
+ taxonomyOptionsFetcher: u,
19
+ updateModePrefix: M,
20
+ className: d,
21
+ isMultilevelTaxonomyFieldEnabled: I
19
22
  }, c) => {
20
- const M = D(), h = `${F ?? s}.value`, {
23
+ const {
24
+ formatMessage: p
25
+ } = R(), g = `${M ?? n}.value`, {
21
26
  setFieldValue: k,
22
- values: p
23
- } = A(), {
27
+ values: h
28
+ } = _(), {
24
29
  metadata: {
25
- templateKey: g,
26
- scope: v
30
+ templateKey: V,
31
+ scope: b
27
32
  }
28
- } = p, I = K(p, s), {
29
- key: b,
33
+ } = h, E = $(h, n), {
34
+ key: v,
30
35
  optionsRules: {
31
- multiSelect: l,
32
- selectableLevels: o
36
+ multiSelect: i,
37
+ selectableLevels: t
33
38
  },
34
39
  levels: P
35
- } = I, x = V && o?.some((e) => e > 1), f = j((e) => d(v, g, b, o?.[0], e), [b, v, o, d, g]), C = (e) => l || !e?.length ? M.formatMessage(E.taxonomyPlaceholder) : void 0, T = (e) => {
36
- k(h, e);
40
+ } = E, U = p(q.multipleValues), y = I && t?.some((e) => e > 1), f = j((e) => u(b, V, v, t?.[0], e), [v, b, t, u, V]), x = (e) => i || !e?.length ? p(S.taxonomyPlaceholder) : void 0, T = (e) => {
41
+ k(g, e), L();
37
42
  };
38
- return /* @__PURE__ */ t("div", {
39
- "data-testid": `${a}-field`,
43
+ return /* @__PURE__ */ l("div", {
44
+ "data-testid": `${r}-field`,
40
45
  onKeyDown: (e) => e.stopPropagation(),
41
46
  role: "presentation",
42
- children: /* @__PURE__ */ t(L, {
43
- name: h,
47
+ children: /* @__PURE__ */ l(D, {
48
+ name: g,
44
49
  children: ({
45
50
  field: e
46
- }) => x ? /* @__PURE__ */ t(W, {
47
- ref: c,
48
- className: u,
49
- closeOnSelection: x,
50
- dataTargetId: "ComboboxWithApiTreeView-MetadataEditorTaxonomyField",
51
- defaultFetcher: f,
52
- disabled: r,
53
- label: y(a, n, i),
54
- levels: P,
55
- multiselect: l,
56
- onValueChange: T,
57
- placeholder: C(e.value),
58
- portalElement: m,
59
- selectableLevels: o,
60
- value: e.value
61
- }) : /* @__PURE__ */ t(w, {
62
- ref: c,
63
- className: u,
64
- dataTargetId: "ComboboxWithApiPagination-MetadataEditorTaxonomyField",
65
- defaultFetcher: f,
66
- disabled: r,
67
- label: y(a, n, i),
68
- multiselect: l,
69
- onValueChange: T,
70
- placeholder: C(e.value),
71
- portalElement: m,
72
- value: e.value
73
- })
51
+ }) => {
52
+ const C = Array.isArray(e.value) ? e.value.map((F) => ({
53
+ ...F,
54
+ displayValue: B(F.displayValue, U)
55
+ })) : e.value;
56
+ return y ? /* @__PURE__ */ l(W, {
57
+ ref: c,
58
+ className: d,
59
+ closeOnSelection: y,
60
+ dataTargetId: "ComboboxWithApiTreeView-MetadataEditorTaxonomyField",
61
+ defaultFetcher: f,
62
+ disabled: o,
63
+ label: A(r, a, s),
64
+ levels: P,
65
+ multiselect: i,
66
+ onValueChange: T,
67
+ placeholder: x(e.value),
68
+ portalElement: m,
69
+ selectableLevels: t,
70
+ value: C
71
+ }) : /* @__PURE__ */ l(w, {
72
+ ref: c,
73
+ className: d,
74
+ dataTargetId: "ComboboxWithApiPagination-MetadataEditorTaxonomyField",
75
+ defaultFetcher: f,
76
+ disabled: o,
77
+ label: A(r, a, s),
78
+ multiselect: i,
79
+ onValueChange: T,
80
+ placeholder: x(e.value),
81
+ portalElement: m,
82
+ value: C
83
+ });
84
+ }
74
85
  })
75
86
  });
76
87
  });
77
88
  export {
78
- J as MetadataTaxonomyField
89
+ ee as MetadataTaxonomyField
79
90
  };
@@ -1,5 +1,9 @@
1
1
  import { defineMessages as e } from "react-intl";
2
2
  const t = e({
3
+ multipleValues: {
4
+ id: "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues",
5
+ defaultMessage: "Multiple values"
6
+ },
3
7
  toggleUpdateModeSelectiorAriaLabel: {
4
8
  id: "groupSharedFeatures.metadataEditor.metadataEditorFields.toggleUpdateModeSelectiorAriaLabel",
5
9
  defaultMessage: "Toggle update mode selector"
@@ -5,8 +5,8 @@ import { forwardRef as U, useCallback as S, useEffect as v, useMemo as j } from
5
5
  import { A as o } from "../../../../chunks/types.js";
6
6
  import { UpdateModeFieldWrapper as R } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
7
7
  import { editorFieldTypes as T } from "./editor-field-types.js";
8
- import { s as g } from "../../../../chunks/utils2.js";
9
- import { jsx as l, jsxs as b } from "react/jsx-runtime";
8
+ import { s as l } from "../../../../chunks/utils2.js";
9
+ import { jsx as d, jsxs as b } from "react/jsx-runtime";
10
10
  import { AiSuggestionField as B } from "./components/ai-suggestion-field/ai-suggestion-field.js";
11
11
  const Y = /* @__PURE__ */ U(({
12
12
  disableForm: A,
@@ -18,32 +18,32 @@ const Y = /* @__PURE__ */ U(({
18
18
  }, x) => {
19
19
  const {
20
20
  setFieldValue: s
21
- } = C(), d = e.aiSuggestionState || o.Initial, a = d === o.Pending, F = d === o.Applied, M = d === o.Initial, u = T[e.type], {
21
+ } = C(), u = e.aiSuggestionState || o.Initial, a = u === o.Pending, F = u === o.Applied, M = u === o.Initial, c = T[e.type], {
22
22
  aiSuggestion: t,
23
23
  type: N,
24
- value: c
25
- } = e, V = u && !e.hidden, W = !E(e.updateMode), i = `metadata.fields[${I}]`, k = e.type === "taxonomy" && e.optionsRules?.multiSelect, w = $({
26
- [g.suggestionApplied]: F,
27
- [g.hasSuggestion]: a,
28
- [g.dateField]: N === "date"
24
+ value: r
25
+ } = e, V = c && !e.hidden, W = !E(e.updateMode), i = `metadata.fields[${I}]`, k = e.type === "taxonomy" && e.optionsRules?.multiSelect, w = $({
26
+ [l.suggestionApplied]: F,
27
+ [l.hasSuggestion]: a,
28
+ [l.dateField]: N === "date"
29
29
  }), n = S((p) => {
30
30
  s(`${i}.aiSuggestionState`, p);
31
- }, [i, s]), r = S((p) => {
31
+ }, [i, s]), g = S((p) => {
32
32
  s(`${i}.value`, p), n(o.Applied);
33
33
  }, [i, s, n]), m = S(() => {
34
34
  n(o.Initial), s(`${i}.aiSuggestion`, void 0);
35
35
  }, [n, s, i]);
36
36
  v(() => {
37
- a && !c && r(t);
38
- }, [t, a, r]), v(() => {
37
+ a && (!r || Array.isArray(r) && r.length === 0) && g(t);
38
+ }, [t, a, g]), v(() => {
39
39
  M && t && n(o.Pending);
40
40
  }, [M, t, n]);
41
- const P = j(() => t && c === t, [a]);
42
- return V ? W ? /* @__PURE__ */ l(R, {
41
+ const P = j(() => t && r === t, [a]);
42
+ return V ? W ? /* @__PURE__ */ d(R, {
43
43
  fieldNamePrefix: i,
44
44
  fieldType: e.type,
45
45
  isTaxonomyMultiSelect: k,
46
- children: /* @__PURE__ */ l(u, {
46
+ children: /* @__PURE__ */ d(c, {
47
47
  ref: x,
48
48
  description: e.description,
49
49
  disableForm: A,
@@ -57,8 +57,8 @@ const Y = /* @__PURE__ */ U(({
57
57
  taxonomyOptionsFetcher: y
58
58
  })
59
59
  }, e.key) : /* @__PURE__ */ b("div", {
60
- className: g.fieldWrapper,
61
- children: [/* @__PURE__ */ l(u, {
60
+ className: l.fieldWrapper,
61
+ children: [/* @__PURE__ */ d(c, {
62
62
  ref: x,
63
63
  className: w,
64
64
  description: e.description,
@@ -70,15 +70,15 @@ const Y = /* @__PURE__ */ U(({
70
70
  onValueEdited: m,
71
71
  portalElement: f,
72
72
  taxonomyOptionsFetcher: y
73
- }), a && /* @__PURE__ */ l(B, {
73
+ }), a && /* @__PURE__ */ d(B, {
74
74
  aiSuggestion: t,
75
75
  isSameValue: P,
76
76
  onAiSuggestionAppend: () => {
77
- const p = [...new Set([c, t].flat().filter(Boolean))];
78
- r(p);
77
+ const p = [...new Set([r, t].flat().filter(Boolean))];
78
+ g(p);
79
79
  },
80
80
  onAiSuggestionIgnore: m,
81
- onAiSuggestionReplace: () => r(t),
81
+ onAiSuggestionReplace: () => g(t),
82
82
  type: N
83
83
  })]
84
84
  }, e.key) : null;
@@ -1,23 +1,35 @@
1
- import { FilterChip as t } from "@box/blueprint-web";
2
- import { s as n, T as i } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
3
- import { jsx as o } from "react/jsx-runtime";
4
- const y = ({
1
+ import { FilterChip as i } from "@box/blueprint-web";
2
+ import { useIntl as p } from "react-intl";
3
+ import { messages as u } from "../../../../metadata-editor-fields/components/update-mode-field-wrapper/messages.js";
4
+ import { s as y, T as f } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
5
+ import { MULTI_VALUE_DEFAULT_VALUE as V } from "../../../../metadata-editor-fields/components/update-mode-field-wrapper/mulitple-values-utils.js";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ const g = ({
5
8
  value: r,
6
- taxonomyNodeFetcher: l,
7
- taxonomyKey: e,
8
- scope: s
9
- }) => !r || !Array.isArray(r) || !r.length ? null : /* @__PURE__ */ o(t.Group, {
10
- className: n.taxonomyValueGroup,
11
- name: void 0,
12
- type: "single",
13
- children: r.map((a) => /* @__PURE__ */ o(i, {
14
- displayValue: a.displayValue,
15
- scope: s,
16
- taxonomyKey: e,
17
- taxonomyNodeFetcher: l,
18
- value: a.value
19
- }, a.value))
20
- });
9
+ taxonomyNodeFetcher: s,
10
+ taxonomyKey: l,
11
+ scope: t
12
+ }) => {
13
+ const e = p();
14
+ if (!r || !Array.isArray(r) || !r.length)
15
+ return null;
16
+ const n = e.formatMessage(u.multipleValues);
17
+ return /* @__PURE__ */ a(i.Group, {
18
+ className: y.taxonomyValueGroup,
19
+ name: void 0,
20
+ type: "single",
21
+ children: r.map((o) => {
22
+ const m = o.displayValue === V ? n : o.displayValue;
23
+ return /* @__PURE__ */ a(f, {
24
+ displayValue: m,
25
+ scope: t,
26
+ taxonomyKey: l,
27
+ taxonomyNodeFetcher: s,
28
+ value: o.value
29
+ }, o.value);
30
+ })
31
+ });
32
+ };
21
33
  export {
22
- y as TaxonomyValue
34
+ g as TaxonomyValue
23
35
  };
@@ -13,6 +13,7 @@ export default {
13
13
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace": "সব মুছে ফেলুন ও প্রতিস্থাপন করুন",
14
14
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate": "নির্বাচিত তারিখ মুছে ফেলুন",
15
15
  "groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue": "অবৈধ ফিল্ড মান",
16
+ "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues": "Multiple values",
16
17
  "groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder": "মান নির্বাচন করুন",
17
18
  "groupSharedFeatures.metadataEditor.metadataEditorFields.noTemplateAtributesError": "এই টেমপ্লেটে কোনো অ্যাট্রিবিউট নেই।",
18
19
  "groupSharedFeatures.metadataEditor.metadataEditorFields.openCalendarLabel": "তারিখ বাছাই করার জন্য ক্যালেন্ডার খুলুন",
@@ -26,6 +26,8 @@ groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace = সব
26
26
  groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate = নির্বাচিত তারিখ মুছে ফেলুন
27
27
  # Error message shown for an invalid field value
28
28
  groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue = অবৈধ ফিল্ড মান
29
+ # Placeholder text displayed when editing metadata for multiple items and the selected items have different values for the field
30
+ groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues = Multiple values
29
31
  # Placeholder text for the multiselect field
30
32
  groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder = মান নির্বাচন করুন
31
33
  # Error message shown if no attributes are available in the template
@@ -13,6 +13,7 @@ export default {
13
13
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace": "Ryd alle og erstat",
14
14
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate": "Ryd den valgte dato",
15
15
  "groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue": "Ugyldig feltværdi",
16
+ "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues": "Multiple values",
16
17
  "groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder": "Vælg værdi(er)",
17
18
  "groupSharedFeatures.metadataEditor.metadataEditorFields.noTemplateAtributesError": "Der er ingen attributter i denne skabelon.",
18
19
  "groupSharedFeatures.metadataEditor.metadataEditorFields.openCalendarLabel": "Åbn kalenderen for at vælge en dato",
@@ -26,6 +26,8 @@ groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace = Ryd al
26
26
  groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate = Ryd den valgte dato
27
27
  # Error message shown for an invalid field value
28
28
  groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue = Ugyldig feltværdi
29
+ # Placeholder text displayed when editing metadata for multiple items and the selected items have different values for the field
30
+ groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues = Multiple values
29
31
  # Placeholder text for the multiselect field
30
32
  groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder = Vælg værdi(er)
31
33
  # Error message shown if no attributes are available in the template
@@ -13,6 +13,7 @@ export default {
13
13
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace": "Alles löschen und ersetzen",
14
14
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate": "Ausgewähltes Datum löschen",
15
15
  "groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue": "Ungültiger Feldwert",
16
+ "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues": "Multiple values",
16
17
  "groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder": "Wert(e) auswählen",
17
18
  "groupSharedFeatures.metadataEditor.metadataEditorFields.noTemplateAtributesError": "Diese Vorlage enthält keine Attribute.",
18
19
  "groupSharedFeatures.metadataEditor.metadataEditorFields.openCalendarLabel": "Kalender öffnen, um ein Datum auszuwählen",
@@ -26,6 +26,8 @@ groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace = Alles
26
26
  groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate = Ausgewähltes Datum löschen
27
27
  # Error message shown for an invalid field value
28
28
  groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue = Ungültiger Feldwert
29
+ # Placeholder text displayed when editing metadata for multiple items and the selected items have different values for the field
30
+ groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues = Multiple values
29
31
  # Placeholder text for the multiselect field
30
32
  groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder = Wert(e) auswählen
31
33
  # Error message shown if no attributes are available in the template
@@ -13,6 +13,7 @@ export default {
13
13
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace": "Clear All & Replace",
14
14
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate": "Clear selected date",
15
15
  "groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue": "Invalid field value",
16
+ "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues": "Multiple values",
16
17
  "groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder": "Select value(s)",
17
18
  "groupSharedFeatures.metadataEditor.metadataEditorFields.noTemplateAtributesError": "There are no attributes in this template.",
18
19
  "groupSharedFeatures.metadataEditor.metadataEditorFields.openCalendarLabel": "Open calendar to pick a date",
@@ -26,6 +26,8 @@ groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace = Clear
26
26
  groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate = Clear selected date
27
27
  # Error message shown for an invalid field value
28
28
  groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue = Invalid field value
29
+ # Placeholder text displayed when editing metadata for multiple items and the selected items have different values for the field
30
+ groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues = Multiple values
29
31
  # Placeholder text for the multiselect field
30
32
  groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder = Select value(s)
31
33
  # Error message shown if no attributes are available in the template
@@ -13,6 +13,7 @@ export default {
13
13
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace": "Clear All & Replace",
14
14
  "groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate": "Clear selected date",
15
15
  "groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue": "Invalid field value",
16
+ "groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues": "Multiple values",
16
17
  "groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder": "Select value(s)",
17
18
  "groupSharedFeatures.metadataEditor.metadataEditorFields.noTemplateAtributesError": "There are no attributes in this template.",
18
19
  "groupSharedFeatures.metadataEditor.metadataEditorFields.openCalendarLabel": "Open calendar to pick a date",
@@ -26,6 +26,8 @@ groupSharedFeatures.metadataEditor.metadataEditorFields.clearAndReplace = Clear
26
26
  groupSharedFeatures.metadataEditor.metadataEditorFields.clearSelectedDate = Clear selected date
27
27
  # Error message shown for an invalid field value
28
28
  groupSharedFeatures.metadataEditor.metadataEditorFields.floatFieldInvalidValue = Invalid field value
29
+ # Placeholder text displayed when editing metadata for multiple items and the selected items have different values for the field
30
+ groupSharedFeatures.metadataEditor.metadataEditorFields.multipleValues = Multiple values
29
31
  # Placeholder text for the multiselect field
30
32
  groupSharedFeatures.metadataEditor.metadataEditorFields.multiselectPlaceholder = Select value(s)
31
33
  # Error message shown if no attributes are available in the template