@box/metadata-editor 1.52.4 → 1.53.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 (59) hide show
  1. package/dist/chunks/utils2.js +27 -26
  2. package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +81 -67
  3. package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +60 -59
  4. package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +24 -24
  5. package/dist/esm/lib/utils/confidence-score/get-fields-needing-review.js +4 -4
  6. package/dist/esm/lib/utils/confidence-score/index.js +10 -0
  7. package/dist/esm/lib/utils/confidence-score/is-confidence-score-needing-review.js +7 -0
  8. package/dist/i18n/bn-IN.js +6 -6
  9. package/dist/i18n/bn-IN.properties +12 -0
  10. package/dist/i18n/da-DK.js +6 -6
  11. package/dist/i18n/da-DK.properties +12 -0
  12. package/dist/i18n/de-DE.js +6 -6
  13. package/dist/i18n/de-DE.properties +12 -0
  14. package/dist/i18n/en-AU.properties +12 -0
  15. package/dist/i18n/en-CA.properties +12 -0
  16. package/dist/i18n/en-GB.properties +12 -0
  17. package/dist/i18n/en-x-pseudo.js +148 -148
  18. package/dist/i18n/en-x-pseudo.properties +154 -142
  19. package/dist/i18n/es-419.js +6 -6
  20. package/dist/i18n/es-419.properties +12 -0
  21. package/dist/i18n/es-ES.js +6 -6
  22. package/dist/i18n/es-ES.properties +12 -0
  23. package/dist/i18n/fi-FI.js +6 -6
  24. package/dist/i18n/fi-FI.properties +12 -0
  25. package/dist/i18n/fr-CA.js +6 -6
  26. package/dist/i18n/fr-CA.properties +12 -0
  27. package/dist/i18n/fr-FR.js +6 -6
  28. package/dist/i18n/fr-FR.properties +12 -0
  29. package/dist/i18n/hi-IN.js +6 -6
  30. package/dist/i18n/hi-IN.properties +12 -0
  31. package/dist/i18n/it-IT.js +6 -6
  32. package/dist/i18n/it-IT.properties +12 -0
  33. package/dist/i18n/ja-JP.js +6 -6
  34. package/dist/i18n/ja-JP.properties +12 -0
  35. package/dist/i18n/ko-KR.js +6 -6
  36. package/dist/i18n/ko-KR.properties +12 -0
  37. package/dist/i18n/nb-NO.js +6 -6
  38. package/dist/i18n/nb-NO.properties +12 -0
  39. package/dist/i18n/nl-NL.js +6 -6
  40. package/dist/i18n/nl-NL.properties +12 -0
  41. package/dist/i18n/pl-PL.js +6 -6
  42. package/dist/i18n/pl-PL.properties +12 -0
  43. package/dist/i18n/pt-BR.js +6 -6
  44. package/dist/i18n/pt-BR.properties +12 -0
  45. package/dist/i18n/ru-RU.js +6 -6
  46. package/dist/i18n/ru-RU.properties +12 -0
  47. package/dist/i18n/sv-SE.js +6 -6
  48. package/dist/i18n/sv-SE.properties +12 -0
  49. package/dist/i18n/tr-TR.js +6 -6
  50. package/dist/i18n/tr-TR.properties +12 -0
  51. package/dist/i18n/zh-CN.js +6 -6
  52. package/dist/i18n/zh-CN.properties +12 -0
  53. package/dist/i18n/zh-TW.js +6 -6
  54. package/dist/i18n/zh-TW.properties +12 -0
  55. package/dist/styles/utils.css +1 -1
  56. package/dist/types/lib/components/metadata-editor-fields/types.d.ts +1 -0
  57. package/dist/types/lib/utils/confidence-score/index.d.ts +4 -0
  58. package/dist/types/lib/utils/confidence-score/is-confidence-score-needing-review.d.ts +2 -0
  59. package/package.json +9 -9
@@ -1,49 +1,50 @@
1
- import { BoxAiLogo as i } from "@box/blueprint-web-assets/icons/Logo";
2
- import _ from "clsx";
3
- import b from "../esm/lib/components/interactive-text/interactive-text.js";
4
- import { convertISOStringtoRFC3339String as d } from "../esm/lib/utils/convertDate.js";
5
- import { jsxs as u, jsx as a } from "react/jsx-runtime";
6
- import '../styles/utils.css';const g = "_noAttributesText_6p6pr_2", m = "_fieldWrapper_6p6pr_6", x = "_hasSuggestion_6p6pr_11", T = "_dateField_6p6pr_33", f = "_suggestionApplied_6p6pr_37", h = "_labelWrapper_6p6pr_52", A = "_labelText_6p6pr_58", N = "_labelTruncated_6p6pr_61", S = "_labelIcon_6p6pr_68", l = {
7
- noAttributesText: g,
1
+ import { BoxAiLogo as b } from "@box/blueprint-web-assets/icons/Logo";
2
+ import g from "clsx";
3
+ import _ from "../esm/lib/components/interactive-text/interactive-text.js";
4
+ import { convertISOStringtoRFC3339String as p } from "../esm/lib/utils/convertDate.js";
5
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
6
+ import '../styles/utils.css';const u = "_noAttributesText_6bzgt_2", m = "_fieldWrapper_6bzgt_6", x = "_hasSuggestion_6bzgt_11", T = "_hasConfidenceReview_6bzgt_16", f = "_dateField_6bzgt_44", z = "_suggestionApplied_6bzgt_48", h = "_labelWrapper_6bzgt_95", A = "_labelText_6bzgt_101", N = "_labelTruncated_6bzgt_104", S = "_labelIcon_6bzgt_111", l = {
7
+ noAttributesText: u,
8
8
  fieldWrapper: m,
9
9
  hasSuggestion: x,
10
- dateField: T,
11
- suggestionApplied: f,
10
+ hasConfidenceReview: T,
11
+ dateField: f,
12
+ suggestionApplied: z,
12
13
  labelWrapper: h,
13
14
  labelText: A,
14
15
  labelTruncated: N,
15
16
  labelIcon: S
16
- }, y = (t, e, r = !1, o = "label") => (p) => {
17
+ }, w = (t, e, a = !1, o = "label") => (c) => {
17
18
  const {
18
- className: c,
19
- ...s
20
- } = p, n = _(c || l.labelText, l.labelTruncated);
21
- return /* @__PURE__ */ u("div", {
19
+ className: i,
20
+ ...n
21
+ } = c, r = g(i || l.labelText, l.labelTruncated);
22
+ return /* @__PURE__ */ d("div", {
22
23
  className: l.labelWrapper,
23
- children: [e ? /* @__PURE__ */ a(b, {
24
+ children: [e ? /* @__PURE__ */ s(_, {
24
25
  as: o,
25
- className: n,
26
+ className: r,
26
27
  tooltipText: e,
27
- ...s,
28
+ ...n,
28
29
  children: t
29
- }) : /* @__PURE__ */ a("label", {
30
- className: n,
31
- ...s,
30
+ }) : /* @__PURE__ */ s("label", {
31
+ className: r,
32
+ ...n,
32
33
  children: t
33
- }), r && /* @__PURE__ */ a(i, {
34
+ }), a && /* @__PURE__ */ s(b, {
34
35
  className: l.labelIcon
35
36
  })]
36
37
  });
37
- }, C = (t) => {
38
+ }, R = (t) => {
38
39
  try {
39
- const e = d(t), r = new Date(e);
40
- return isNaN(r.getTime()) ? null : e;
40
+ const e = p(t), a = new Date(e);
41
+ return isNaN(a.getTime()) ? null : e;
41
42
  } catch {
42
43
  return null;
43
44
  }
44
45
  };
45
46
  export {
46
- y as g,
47
+ w as g,
47
48
  l as s,
48
- C as t
49
+ R as t
49
50
  };
@@ -1,91 +1,105 @@
1
- import C from "clsx";
2
- import { useFormikContext as U } from "formik";
3
- import j from "lodash/isUndefined";
4
- import { forwardRef as E, useCallback as S, useEffect as I, useMemo as R } from "react";
5
- import { A as o } from "../../../../chunks/types.js";
6
- import { UpdateModeFieldWrapper as T } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
7
- import { editorFieldTypes as b } from "./editor-field-types.js";
1
+ import L from "clsx";
2
+ import { useFormikContext as T } from "formik";
3
+ import b from "lodash/isUndefined";
4
+ import { forwardRef as B, useCallback as r, useEffect as x, useMemo as q } from "react";
5
+ import { A as a } from "../../../../chunks/types.js";
6
+ import { UpdateModeFieldWrapper as z } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
7
+ import { editorFieldTypes as D } from "./editor-field-types.js";
8
8
  import { s as l } from "../../../../chunks/utils2.js";
9
- import { jsx as d, jsxs as B } from "react/jsx-runtime";
10
- import { AiSuggestionField as q } from "./components/ai-suggestion-field/ai-suggestion-field.js";
11
- const Z = /* @__PURE__ */ E(({
12
- disableForm: A,
13
- portalElement: f,
9
+ import { jsx as g, jsxs as G } from "react/jsx-runtime";
10
+ import { isConfidenceScoreNeedingReview as H } from "../../utils/confidence-score/is-confidence-score-needing-review.js";
11
+ import { AiSuggestionField as J } from "./components/ai-suggestion-field/ai-suggestion-field.js";
12
+ import { LowConfidenceSuggestionField as K } from "./components/low-confidence-suggestion-field/low-confidence-suggestion-field.js";
13
+ const ae = /* @__PURE__ */ B(({
14
+ disableForm: y,
15
+ portalElement: h,
14
16
  field: e,
15
- index: V,
16
- taxonomyOptionsFetcher: y,
17
- isExternallyOwned: h,
18
- isMultilevelTaxonomyFieldEnabled: F
19
- }, M) => {
17
+ index: M,
18
+ taxonomyOptionsFetcher: v,
19
+ isExternallyOwned: C,
20
+ isMultilevelTaxonomyFieldEnabled: w,
21
+ isConfidenceScoreReviewEnabled: I = !1
22
+ }, N) => {
20
23
  const {
21
- setFieldValue: s
22
- } = U(), u = e.aiSuggestionState || o.Initial, a = u === o.Pending, N = u === o.Applied, v = u === o.Initial, c = b[e.type], {
24
+ setFieldValue: o
25
+ } = T(), m = e.aiSuggestionState || a.Initial, n = m === a.Pending, V = m === a.Applied, $ = m === a.Initial, f = D[e.type], {
23
26
  aiSuggestion: t,
24
- type: x,
25
- value: r
26
- } = e, W = c && !e.hidden, k = !j(e.updateMode), i = `metadata.fields[${V}]`, P = e.type === "taxonomy" && e.optionsRules?.multiSelect, $ = C({
27
- [l.suggestionApplied]: N,
28
- [l.hasSuggestion]: a,
29
- [l.dateField]: x === "date"
30
- }), n = S((p) => {
31
- s(`${i}.aiSuggestionState`, p);
32
- }, [i, s]), g = S((p) => {
33
- s(`${i}.value`, p), n(o.Applied);
34
- }, [i, s, n]), m = S(() => {
35
- n(o.Initial), s(`${i}.aiSuggestion`, void 0);
36
- }, [n, s, i]);
37
- I(() => {
38
- a && (!r || Array.isArray(r) && r.length === 0) && g(t);
39
- }, [t, a, g]), I(() => {
40
- v && t && n(o.Pending);
41
- }, [v, t, n]);
42
- const w = R(() => t && r === t, [a]);
43
- return W ? k ? /* @__PURE__ */ d(T, {
27
+ type: d,
28
+ value: p
29
+ } = e, R = f && !e.hidden, W = !b(e.updateMode), i = `metadata.fields[${M}]`, k = e.type === "taxonomy" && e.optionsRules?.multiSelect, u = I && !!e.confidenceScore && H(e.confidenceScore), P = L({
30
+ [l.suggestionApplied]: V,
31
+ [l.hasSuggestion]: n,
32
+ [l.hasConfidenceReview]: !n && u,
33
+ [l.dateField]: d === "date"
34
+ }), c = r((s) => {
35
+ o(`${i}.aiSuggestionState`, s);
36
+ }, [i, o]), S = r((s) => {
37
+ o(`${i}.value`, s), c(a.Applied);
38
+ }, [i, o, c]), A = r(() => {
39
+ c(a.Initial), o(`${i}.aiSuggestion`, void 0);
40
+ }, [c, o, i]), E = r(() => {
41
+ o(`${i}.confidenceScore.isAccepted`, !0);
42
+ }, [i, o]), U = r(() => {
43
+ const s = d === "multiSelect" || d === "taxonomy" ? [] : "";
44
+ o(`${i}.value`, s), o(`${i}.confidenceScore`, void 0);
45
+ }, [i, o, d]), F = r(() => {
46
+ A(), u && o(`${i}.confidenceScore`, void 0);
47
+ }, [A, u, o, i]);
48
+ x(() => {
49
+ n && (!p || Array.isArray(p) && p.length === 0) && S(t);
50
+ }, [t, n, S]), x(() => {
51
+ $ && t && c(a.Pending);
52
+ }, [$, t, c]);
53
+ const j = q(() => t && p === t, [n]);
54
+ return R ? W ? /* @__PURE__ */ g(z, {
44
55
  fieldNamePrefix: i,
45
56
  fieldType: e.type,
46
- isTaxonomyMultiSelect: P,
47
- children: /* @__PURE__ */ d(c, {
48
- ref: M,
57
+ isTaxonomyMultiSelect: k,
58
+ children: /* @__PURE__ */ g(f, {
59
+ ref: N,
49
60
  description: e.description,
50
- disableForm: A,
61
+ disableForm: y,
51
62
  fieldNamePrefix: i,
52
63
  isAiSuggestionApplied: !1,
53
- isExternallyOwned: h,
54
- isMultilevelTaxonomyFieldEnabled: F,
64
+ isExternallyOwned: C,
65
+ isMultilevelTaxonomyFieldEnabled: w,
55
66
  label: e.displayName,
56
67
  levels: e.levels,
57
- onValueEdited: m,
58
- portalElement: f,
59
- taxonomyOptionsFetcher: y
68
+ onValueEdited: F,
69
+ portalElement: h,
70
+ taxonomyOptionsFetcher: v
60
71
  })
61
- }, e.key) : /* @__PURE__ */ B("div", {
72
+ }, e.key) : /* @__PURE__ */ G("div", {
62
73
  className: l.fieldWrapper,
63
- children: [/* @__PURE__ */ d(c, {
64
- ref: M,
65
- className: $,
74
+ children: [/* @__PURE__ */ g(f, {
75
+ ref: N,
76
+ className: P,
66
77
  description: e.description,
67
- disableForm: A,
78
+ disableForm: y,
68
79
  fieldNamePrefix: i,
69
- isAiSuggestionApplied: N,
70
- isExternallyOwned: h,
71
- isMultilevelTaxonomyFieldEnabled: F,
80
+ isAiSuggestionApplied: V,
81
+ isExternallyOwned: C,
82
+ isMultilevelTaxonomyFieldEnabled: w,
72
83
  label: e.displayName,
73
- onValueEdited: m,
74
- portalElement: f,
75
- taxonomyOptionsFetcher: y
76
- }), a && /* @__PURE__ */ d(q, {
84
+ onValueEdited: F,
85
+ portalElement: h,
86
+ taxonomyOptionsFetcher: v
87
+ }), n && /* @__PURE__ */ g(J, {
77
88
  aiSuggestion: t,
78
- isSameValue: w,
89
+ isSameValue: j,
79
90
  onAiSuggestionAppend: () => {
80
- const p = [...new Set([r, t].flat().filter(Boolean))];
81
- g(p);
91
+ const s = [...new Set([p, t].flat().filter(Boolean))];
92
+ S(s);
82
93
  },
83
- onAiSuggestionIgnore: m,
84
- onAiSuggestionReplace: () => g(t),
85
- type: x
94
+ onAiSuggestionIgnore: A,
95
+ onAiSuggestionReplace: () => S(t),
96
+ type: d
97
+ }), !n && u && /* @__PURE__ */ g(K, {
98
+ onAccept: E,
99
+ onClear: U
86
100
  })]
87
101
  }, e.key) : null;
88
102
  });
89
103
  export {
90
- Z as MetadataEditorFieldWrapper
104
+ ae as MetadataEditorFieldWrapper
91
105
  };
@@ -5,7 +5,7 @@ import "../metadata-instance-form-header/metadata-instance-form-header.js";
5
5
  import Q from "clsx";
6
6
  import { Formik as X, Form as Y } from "formik";
7
7
  import Z from "lodash/isEqual";
8
- import { useState as O, useEffect as S, useRef as v, useMemo as ee } from "react";
8
+ import { useState as S, useEffect as x, useRef as D, useMemo as ee } from "react";
9
9
  import { TEMPLATE_CUSTOM_PROPERTIES as te } from "../../../../constants.js";
10
10
  import { useAutofill as ae } from "../../../../utils/autofill-context.js";
11
11
  import { TemplateInstance as ne } from "../../../metadata-editor-fields/metadata-editor-fields.js";
@@ -13,15 +13,15 @@ import { MetadataEmptyState as oe } from "../../../metadata-empty-state/metadata
13
13
  import { AutofillOverlay as se } from "../autofill-overlay/autofill-overlay.js";
14
14
  import { CustomInstance as re } from "../custom-instance/custom-instance.js";
15
15
  import { c as ie } from "../../../../../../chunks/utils.js";
16
- import { s as c, M as le } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
17
- import { jsx as n, jsxs as x } from "react/jsx-runtime";
16
+ import { s as f, M as le } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
17
+ import { jsx as n, jsxs as v } from "react/jsx-runtime";
18
18
  import { UnsavedChangesModal as me } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
19
19
  const de = ({
20
20
  dirty: i,
21
21
  onChange: l,
22
22
  values: t
23
23
  }) => {
24
- const s = v(t);
24
+ const s = D(t);
25
25
  return i && !Z(s.current.metadata.fields, t.metadata.fields) && (s.current = t, l(t)), null;
26
26
  }, we = (i) => {
27
27
  const {
@@ -30,51 +30,51 @@ const de = ({
30
30
  isLargeFile: s,
31
31
  errorCode: m,
32
32
  isAiSuggestionsFeatureEnabled: d,
33
- isAdvancedExtractAgentEnabled: D = !1,
34
- isBetaLanguageEnabled: I,
35
- isDeleteButtonDisabled: w,
36
- isDeleteConfirmationModalCheckboxEnabled: A,
37
- isMultilevelTaxonomyFieldEnabled: f,
38
- isUnsavedChangesModalOpen: R = !1,
39
- MetadataInstanceFormCustomWrapper: T,
33
+ isAdvancedExtractAgentEnabled: I = !1,
34
+ isBetaLanguageEnabled: w,
35
+ isDeleteButtonDisabled: A,
36
+ isDeleteConfirmationModalCheckboxEnabled: R,
37
+ isMultilevelTaxonomyFieldEnabled: p,
38
+ isUnsavedChangesModalOpen: T = !1,
39
+ MetadataInstanceFormCustomWrapper: L,
40
40
  selectedTemplateInstance: e,
41
- onCancel: L,
42
- onChange: p,
43
- onDelete: k,
44
- onDiscardUnsavedChanges: N,
45
- onSubmit: P,
46
- onToggleReviewFilter: U,
47
- setIsUnsavedChangesModalOpen: u,
48
- shouldShowOnlyReviewFields: g = !1,
49
- taxonomyOptionsFetcher: h,
50
- isConfidenceScoreReviewEnabled: B = !1
51
- } = i, K = T ?? le, [V, E] = O(!1), {
41
+ onCancel: k,
42
+ onChange: u,
43
+ onDelete: N,
44
+ onDiscardUnsavedChanges: P,
45
+ onSubmit: U,
46
+ onToggleReviewFilter: B,
47
+ setIsUnsavedChangesModalOpen: g,
48
+ shouldShowOnlyReviewFields: h = !1,
49
+ taxonomyOptionsFetcher: E,
50
+ isConfidenceScoreReviewEnabled: c = !1
51
+ } = i, K = L ?? le, [V, C] = S(!1), {
52
52
  isFetchingSuggestions: o,
53
- isLongLoading: C,
53
+ isLongLoading: F,
54
54
  getAiSuggestions: W,
55
- clearState: F,
55
+ clearState: b,
56
56
  suggestions: j
57
57
  } = ae();
58
- S(() => () => {
59
- F();
60
- }, [F, e?.id]);
61
- const b = e?.templateKey === te, _ = async (a) => {
62
- await P(a, ie(a, e));
58
+ x(() => () => {
59
+ b();
60
+ }, [b, e?.id]);
61
+ const y = e?.templateKey === te, _ = async (a) => {
62
+ await U(a, ie(a, e));
63
63
  }, $ = (a) => {
64
- a ? u(!0) : L();
64
+ a ? g(!0) : k();
65
65
  }, q = () => {
66
- E(!0);
66
+ C(!0);
67
67
  }, J = {
68
68
  metadata: {
69
69
  ...e
70
70
  }
71
- }, y = v(null), [M, z] = O(null);
72
- S(() => {
73
- z(t ?? y.current);
71
+ }, M = D(null), [O, z] = S(null);
72
+ x(() => {
73
+ z(t ?? M.current);
74
74
  }, [t, e?.templateKey, e?.scope]);
75
75
  const G = ee(() => {
76
76
  const a = e?.fields.length === 0;
77
- if (b)
77
+ if (y)
78
78
  return /* @__PURE__ */ n(re, {
79
79
  isLoading: o
80
80
  });
@@ -84,61 +84,62 @@ const de = ({
84
84
  level: "instance"
85
85
  });
86
86
  const r = !!(o || m);
87
- return /* @__PURE__ */ x("div", {
88
- className: Q(c.metadataInstanceFormContent, r && c.showOverlay),
87
+ return /* @__PURE__ */ v("div", {
88
+ className: Q(f.metadataInstanceFormContent, r && f.showOverlay),
89
89
  children: [/* @__PURE__ */ n(se, {
90
90
  errorCode: m,
91
91
  isFetchingSuggestions: o,
92
- isLongLoading: C
92
+ isLongLoading: F
93
93
  }), /* @__PURE__ */ n(ne, {
94
94
  disableForm: o,
95
+ isConfidenceScoreReviewEnabled: c,
95
96
  isExternallyOwned: e?.isExternallyOwned,
96
- isMultilevelTaxonomyFieldEnabled: f,
97
- portalElement: t ?? M,
98
- taxonomyOptionsFetcher: h
97
+ isMultilevelTaxonomyFieldEnabled: p,
98
+ portalElement: t ?? O,
99
+ taxonomyOptionsFetcher: E
99
100
  })]
100
101
  });
101
- }, [e?.fields.length, e?.isExternallyOwned, b, o, C, t, M, h, d, f, m, g]);
102
+ }, [e?.fields.length, e?.isExternallyOwned, y, o, F, t, O, E, d, c, p, m, h]);
102
103
  return /* @__PURE__ */ n(X, {
103
104
  initialValues: J,
104
105
  onSubmit: _,
105
106
  children: ({
106
107
  values: a,
107
108
  dirty: r
108
- }) => /* @__PURE__ */ x(Y, {
109
+ }) => /* @__PURE__ */ v(Y, {
109
110
  children: [/* @__PURE__ */ n(K, {
110
111
  areAiSuggestionsAvailable: l,
111
- className: c.metadataInstanceForm,
112
- formRef: y,
112
+ className: f.metadataInstanceForm,
113
+ formRef: M,
113
114
  formValues: a,
114
115
  getAiSuggestions: W,
115
116
  handleCancel: $,
116
117
  handleDelete: q,
117
- isAdvancedExtractAgentEnabled: D,
118
+ isAdvancedExtractAgentEnabled: I,
118
119
  isAiSuggestionsFeatureEnabled: d,
119
- isBetaLanguageEnabled: I,
120
- isConfidenceScoreReviewEnabled: B,
121
- isDeleteButtonDisabled: w,
120
+ isBetaLanguageEnabled: w,
121
+ isConfidenceScoreReviewEnabled: c,
122
+ isDeleteButtonDisabled: A,
122
123
  isFetchingSuggestions: o,
123
124
  isFormDirty: r,
124
125
  isLargeFile: s,
125
- onToggleReviewFilter: U,
126
+ onToggleReviewFilter: B,
126
127
  selectedTemplateInstance: e,
127
- shouldShowOnlyReviewFields: g,
128
+ shouldShowOnlyReviewFields: h,
128
129
  suggestions: j,
129
130
  children: e && G
130
- }), p && /* @__PURE__ */ n(de, {
131
+ }), u && /* @__PURE__ */ n(de, {
131
132
  dirty: r,
132
- onChange: p,
133
+ onChange: u,
133
134
  values: a
134
135
  }), /* @__PURE__ */ n(me, {
135
- onBackToEdit: () => u(!1),
136
- onDiscardChanges: N,
137
- open: R
136
+ onBackToEdit: () => g(!1),
137
+ onDiscardChanges: P,
138
+ open: T
138
139
  }), /* @__PURE__ */ n(H, {
139
- isCheckboxEnabled: A,
140
- onConfirm: () => k(e),
141
- onDismiss: () => E(!1),
140
+ isCheckboxEnabled: R,
141
+ onConfirm: () => N(e),
142
+ onDismiss: () => C(!1),
142
143
  open: V,
143
144
  templateName: e?.displayName
144
145
  })]
@@ -1,19 +1,19 @@
1
- import { Tooltip as h, Status as _, Text as g } from "@box/blueprint-web";
1
+ import { Tooltip as _, Status as g, Text as h } from "@box/blueprint-web";
2
2
  import { AlertCircle as x } from "@box/blueprint-web-assets/icons/Medium";
3
3
  import { useIntl as C, FormattedDate as T } from "react-intl";
4
4
  import { convertISOStringToUTCDate as b } from "../../../../utils/convertDate.js";
5
- import { C as v } from "../../../../../../chunks/types.js";
6
- import { getConfidenceScoreTooltip as D } from "../../../../utils/confidence-score/get-confidence-score-tooltip.js";
7
- import E from "../../../interactive-text/interactive-text.js";
8
- import { MetadataEntryDisplay as L } from "./metadata-entry-display.js";
9
- import A from "./messages.js";
5
+ import D from "../../../interactive-text/interactive-text.js";
6
+ import { MetadataEntryDisplay as E } from "./metadata-entry-display.js";
7
+ import v from "./messages.js";
10
8
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
11
- import '../../../../../../styles/metadata-instance-entry.css';const M = "_metadataInstanceEntry_fr9av_1", N = "_name_fr9av_6", j = "_labelContainer_fr9av_14", O = "_confidenceScoreIcon_fr9av_20", r = {
12
- metadataInstanceEntry: M,
13
- name: N,
9
+ import { isConfidenceScoreNeedingReview as L } from "../../../../utils/confidence-score/is-confidence-score-needing-review.js";
10
+ import { getConfidenceScoreTooltip as N } from "../../../../utils/confidence-score/get-confidence-score-tooltip.js";
11
+ import '../../../../../../styles/metadata-instance-entry.css';const A = "_metadataInstanceEntry_fr9av_1", M = "_name_fr9av_6", j = "_labelContainer_fr9av_14", w = "_confidenceScoreIcon_fr9av_20", n = {
12
+ metadataInstanceEntry: A,
13
+ name: M,
14
14
  labelContainer: j,
15
- confidenceScoreIcon: O
16
- }, P = ({
15
+ confidenceScoreIcon: w
16
+ }, K = ({
17
17
  description: o,
18
18
  name: a,
19
19
  shouldHideEmptyValues: f,
@@ -23,10 +23,10 @@ import '../../../../../../styles/metadata-instance-entry.css';const M = "_metada
23
23
  taxonomyKey: p,
24
24
  scope: u,
25
25
  isExternallyOwned: y,
26
- confidenceScore: n,
26
+ confidenceScore: r,
27
27
  isConfidenceScoreReviewEnabled: S = !1
28
28
  }) => {
29
- const i = C(), s = S && !!n && n.level !== v.High && !n.isAccepted ? D(i.formatMessage, n) : null, l = (() => {
29
+ const i = C(), s = S && !!r && L(r) ? N(i.formatMessage, r) : null, l = (() => {
30
30
  if (typeof t == "number")
31
31
  return t.toString();
32
32
  if (!t)
@@ -45,27 +45,27 @@ import '../../../../../../styles/metadata-instance-entry.css';const M = "_metada
45
45
  return t;
46
46
  })();
47
47
  return f && !l ? null : /* @__PURE__ */ m("div", {
48
- className: r.metadataInstanceEntry,
48
+ className: n.metadataInstanceEntry,
49
49
  children: [/* @__PURE__ */ m("div", {
50
- className: r.labelContainer,
51
- children: [s && /* @__PURE__ */ e(h, {
50
+ className: n.labelContainer,
51
+ children: [s && /* @__PURE__ */ e(_, {
52
52
  content: s,
53
53
  children: /* @__PURE__ */ e("span", {
54
- className: r.confidenceScoreIcon,
55
- children: /* @__PURE__ */ e(_, {
54
+ className: n.confidenceScoreIcon,
55
+ children: /* @__PURE__ */ e(g, {
56
56
  color: "SurfaceStatusSurfaceGray",
57
57
  hideText: !0,
58
58
  icon: x,
59
59
  interactive: !0,
60
- text: i.formatMessage(A.confidenceScoreIconAriaLabel)
60
+ text: i.formatMessage(v.confidenceScoreIconAriaLabel)
61
61
  })
62
62
  })
63
- }), /* @__PURE__ */ e(g, {
63
+ }), /* @__PURE__ */ e(h, {
64
64
  as: "h5",
65
65
  color: "textOnLightSecondary",
66
66
  variant: "bodyDefaultBold",
67
- className: r.name,
68
- children: o ? /* @__PURE__ */ e(E, {
67
+ className: n.name,
68
+ children: o ? /* @__PURE__ */ e(D, {
69
69
  as: "span",
70
70
  color: "textOnLightSecondary",
71
71
  tooltipText: o,
@@ -73,7 +73,7 @@ import '../../../../../../styles/metadata-instance-entry.css';const M = "_metada
73
73
  children: a
74
74
  }) : a
75
75
  })]
76
- }), /* @__PURE__ */ e(L, {
76
+ }), /* @__PURE__ */ e(E, {
77
77
  formattedValue: l,
78
78
  isExternallyOwned: y,
79
79
  scope: u,
@@ -85,5 +85,5 @@ import '../../../../../../styles/metadata-instance-entry.css';const M = "_metada
85
85
  });
86
86
  };
87
87
  export {
88
- P as MetadataInstanceEntry
88
+ K as MetadataInstanceEntry
89
89
  };
@@ -1,7 +1,7 @@
1
- import { C as n } from "../../../../chunks/types.js";
2
- function i(c) {
3
- return c.filter((e) => !e.hidden && !!e.confidenceScore && e.confidenceScore.level !== n.High && !e.confidenceScore.isAccepted);
1
+ import { isConfidenceScoreNeedingReview as i } from "./is-confidence-score-needing-review.js";
2
+ function c(n) {
3
+ return n.filter((e) => !e.hidden && !!e.confidenceScore && i(e.confidenceScore));
4
4
  }
5
5
  export {
6
- i as getFieldsNeedingReview
6
+ c as getFieldsNeedingReview
7
7
  };
@@ -0,0 +1,10 @@
1
+ import { formatConfidenceScorePercent as r } from "./format-confidence-score-percent.js";
2
+ import { getConfidenceScoreTooltip as n } from "./get-confidence-score-tooltip.js";
3
+ import { getFieldsNeedingReview as f } from "./get-fields-needing-review.js";
4
+ import { isConfidenceScoreNeedingReview as d } from "./is-confidence-score-needing-review.js";
5
+ export {
6
+ r as formatConfidenceScorePercent,
7
+ n as getConfidenceScoreTooltip,
8
+ f as getFieldsNeedingReview,
9
+ d as isConfidenceScoreNeedingReview
10
+ };
@@ -0,0 +1,7 @@
1
+ import { C as i } from "../../../../chunks/types.js";
2
+ function o(e) {
3
+ return e.level !== i.High && !e.isAccepted;
4
+ }
5
+ export {
6
+ o as isConfidenceScoreNeedingReview
7
+ };
@@ -88,12 +88,12 @@ export default {
88
88
  "metadataEditor.instanceLevel.emptyState.heading": "এই টেমপ্লেটের কোনো মান নেই",
89
89
  "metadataEditor.instanceLevel.emptyState.noAttributes.heading": "এই টেমপ্লেটে কোনো অ্যাট্রিবিউট নেই",
90
90
  "metadataEditor.instanceLevel.emptyState.noEmptyValues.body": "এই টেমপ্লেটের কোনো মান নেই",
91
- "metadataEditor.lowConfidenceSuggestionField.acceptValueAriaLabel": "Accept extracted value",
92
- "metadataEditor.lowConfidenceSuggestionField.acceptValueTooltip": "Accept Value",
93
- "metadataEditor.lowConfidenceSuggestionField.clearValueAriaLabel": "Clear extracted value",
94
- "metadataEditor.lowConfidenceSuggestionField.clearValueTooltip": "Clear Value",
95
- "metadataEditor.lowConfidenceSuggestionField.description": "Box AI returned low confidence",
96
- "metadataEditor.lowConfidenceSuggestionField.needsReview": "Needs review",
91
+ "metadataEditor.lowConfidenceSuggestionField.acceptValueAriaLabel": "এক্সট্রাক্ট করা মান স্বীকার করুন",
92
+ "metadataEditor.lowConfidenceSuggestionField.acceptValueTooltip": "মান স্বীকার করুন",
93
+ "metadataEditor.lowConfidenceSuggestionField.clearValueAriaLabel": "এক্সট্রাক্ট করা মান পরিষ্কার করুন",
94
+ "metadataEditor.lowConfidenceSuggestionField.clearValueTooltip": "মান পরিষ্কার করুন",
95
+ "metadataEditor.lowConfidenceSuggestionField.description": "Box AI কম আত্মবিশ্বাস রিটার্ন করেছে",
96
+ "metadataEditor.lowConfidenceSuggestionField.needsReview": "পর্যালোচনা প্রয়োজন",
97
97
  "metadataEditor.managerLevel.emptyState.body": "মেটাডেটা প্রয়োগ ও সম্পাদনা করতে আপনার আইটেম ব্রাউজ করুন বা অনুসন্ধান করুন",
98
98
  "metadataEditor.managerLevel.emptyState.heading": "মেটাডেটা টেমপ্লেট প্রয়োগ করুন",
99
99
  "metadataEditor.metadataEditor.customIntanceNewField.addAttributeGroupAriaLabel": "কাস্টম মেটাডেটাতে নতুন অ্যাট্রিবিউট যোগ করুন",
@@ -176,6 +176,18 @@ metadataEditor.instanceLevel.emptyState.heading = এই টেমপ্লে
176
176
  metadataEditor.instanceLevel.emptyState.noAttributes.heading = এই টেমপ্লেটে কোনো অ্যাট্রিবিউট নেই
177
177
  # Caption about no empty values to be shown
178
178
  metadataEditor.instanceLevel.emptyState.noEmptyValues.body = এই টেমপ্লেটের কোনো মান নেই
179
+ # Aria label for the button that accepts the low confidence AI-extracted value
180
+ metadataEditor.lowConfidenceSuggestionField.acceptValueAriaLabel = এক্সট্রাক্ট করা মান স্বীকার করুন
181
+ # Tooltip for the button that accepts the low confidence value
182
+ metadataEditor.lowConfidenceSuggestionField.acceptValueTooltip = মান স্বীকার করুন
183
+ # Aria label for the button that clears the AI-extracted value and confidence score
184
+ metadataEditor.lowConfidenceSuggestionField.clearValueAriaLabel = এক্সট্রাক্ট করা মান পরিষ্কার করুন
185
+ # Tooltip for the button that clears the field value and confidence score
186
+ metadataEditor.lowConfidenceSuggestionField.clearValueTooltip = মান পরিষ্কার করুন
187
+ # Description text explaining why the field needs review
188
+ metadataEditor.lowConfidenceSuggestionField.description = Box AI কম আত্মবিশ্বাস রিটার্ন করেছে
189
+ # Title shown for low confidence AI extraction that needs user review
190
+ metadataEditor.lowConfidenceSuggestionField.needsReview = পর্যালোচনা প্রয়োজন
179
191
  # Description how metadata can be added
180
192
  metadataEditor.managerLevel.emptyState.body = মেটাডেটা প্রয়োগ ও সম্পাদনা করতে আপনার আইটেম ব্রাউজ করুন বা অনুসন্ধান করুন
181
193
  # Call to encourage user apply metadata templates