@box/metadata-editor 1.67.5 → 1.68.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 (54) hide show
  1. package/dist/chunks/interactive-text.module.js +5 -0
  2. package/dist/chunks/metadata-instance-entry.js +1 -1
  3. package/dist/chunks/utils.js +67 -37
  4. package/dist/esm/lib/components/interactive-text/interactive-text.js +18 -2
  5. package/dist/i18n/bn-IN.js +1 -1
  6. package/dist/i18n/bn-IN.properties +1 -1
  7. package/dist/i18n/da-DK.js +1 -1
  8. package/dist/i18n/da-DK.properties +1 -1
  9. package/dist/i18n/de-DE.js +1 -1
  10. package/dist/i18n/de-DE.properties +1 -1
  11. package/dist/i18n/en-AU.js +1 -1
  12. package/dist/i18n/en-AU.properties +1 -1
  13. package/dist/i18n/en-GB.js +1 -1
  14. package/dist/i18n/en-GB.properties +1 -1
  15. package/dist/i18n/en-x-pseudo.js +156 -156
  16. package/dist/i18n/en-x-pseudo.properties +156 -156
  17. package/dist/i18n/es-419.js +1 -1
  18. package/dist/i18n/es-419.properties +1 -1
  19. package/dist/i18n/es-ES.js +1 -1
  20. package/dist/i18n/es-ES.properties +1 -1
  21. package/dist/i18n/fi-FI.js +1 -1
  22. package/dist/i18n/fi-FI.properties +1 -1
  23. package/dist/i18n/fr-CA.js +1 -1
  24. package/dist/i18n/fr-CA.properties +1 -1
  25. package/dist/i18n/fr-FR.js +1 -1
  26. package/dist/i18n/fr-FR.properties +1 -1
  27. package/dist/i18n/hi-IN.js +1 -1
  28. package/dist/i18n/hi-IN.properties +1 -1
  29. package/dist/i18n/it-IT.js +1 -1
  30. package/dist/i18n/it-IT.properties +1 -1
  31. package/dist/i18n/ko-KR.js +1 -1
  32. package/dist/i18n/ko-KR.properties +1 -1
  33. package/dist/i18n/nl-NL.js +1 -1
  34. package/dist/i18n/nl-NL.properties +1 -1
  35. package/dist/i18n/pl-PL.js +1 -1
  36. package/dist/i18n/pl-PL.properties +1 -1
  37. package/dist/i18n/pt-BR.js +1 -1
  38. package/dist/i18n/pt-BR.properties +1 -1
  39. package/dist/i18n/ru-RU.js +1 -1
  40. package/dist/i18n/ru-RU.properties +1 -1
  41. package/dist/i18n/sv-SE.js +1 -1
  42. package/dist/i18n/sv-SE.properties +1 -1
  43. package/dist/i18n/tr-TR.js +1 -1
  44. package/dist/i18n/tr-TR.properties +1 -1
  45. package/dist/i18n/zh-CN.js +1 -1
  46. package/dist/i18n/zh-CN.properties +1 -1
  47. package/dist/i18n/zh-TW.js +1 -1
  48. package/dist/i18n/zh-TW.properties +1 -1
  49. package/dist/styles/interactive-text.css +1 -1
  50. package/dist/styles/utils.css +1 -1
  51. package/dist/types/lib/test-utils/index.d.ts +1 -0
  52. package/dist/types/lib/test-utils/mock-resize-observer.d.ts +5 -0
  53. package/package.json +4 -4
  54. package/dist/chunks/interactive-text.js +0 -17
@@ -0,0 +1,5 @@
1
+ import '../styles/interactive-text.css';var e = {
2
+ interactiveText: "_interactiveText_1szjz_1",
3
+ interactiveTextHint: "_interactiveTextHint_1szjz_6"
4
+ };
5
+ export { e as t };
@@ -4,7 +4,7 @@ import { checkIfHasBoundingBoxes as n } from "../esm/lib/utils/check-if-has-boun
4
4
  import { getConfidenceScoreTooltip as r } from "../esm/lib/utils/confidence-score/get-confidence-score-tooltip.js";
5
5
  import { t as i } from "./shared-field-styles.module.js";
6
6
  import { convertISOStringToUTCDate as a } from "../esm/lib/utils/convertDate.js";
7
- import { t as o } from "./interactive-text.js";
7
+ import o from "../esm/lib/components/interactive-text/interactive-text.js";
8
8
  import s from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/messages.js";
9
9
  import { MetadataEntryDisplay as c } from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.js";
10
10
  import { Status as l, Text as u, Tooltip as d } from "@box/blueprint-web";
@@ -1,53 +1,83 @@
1
1
  import { isConfidenceScoreNeedingReview as e } from "../esm/lib/utils/confidence-score/is-confidence-score-needing-review.js";
2
2
  import { convertISOStringtoRFC3339String as t } from "../esm/lib/utils/convertDate.js";
3
- import { t as n } from "./interactive-text.js";
3
+ import { t as n } from "./interactive-text.module.js";
4
4
  import { AiLogoBadge as r } from "../esm/lib/components/metadata-editor-fields/components/ai-logo-badge/ai-logo-badge.js";
5
5
  import { LowConfidenceBadge as i } from "../esm/lib/components/metadata-editor-fields/components/low-confidence-badge/low-confidence-badge.js";
6
- import { createElement as a, memo as o } from "react";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import l from "clsx";
9
- import '../styles/utils.css';var u = {
10
- noAttributesText: "_noAttributesText_1lpn0_2",
11
- fieldWrapper: "_fieldWrapper_1lpn0_6",
12
- hasSuggestion: "_hasSuggestion_1lpn0_11",
13
- hasConfidenceReview: "_hasConfidenceReview_1lpn0_16",
14
- error: "_error_1lpn0_25",
15
- dateField: "_dateField_1lpn0_44",
16
- aiApproved: "_aiApproved_1lpn0_49",
17
- comboboxContainer: "_comboboxContainer_1lpn0_49",
18
- labelWrapper: "_labelWrapper_1lpn0_95",
19
- labelText: "_labelText_1lpn0_101",
20
- labelTruncated: "_labelTruncated_1lpn0_104",
21
- labelIcon: "_labelIcon_1lpn0_111"
22
- }, d = /* @__PURE__ */ o(function({ fieldName: t, fieldDescription: o, isAiSuggestionApplied: d, as: f, confidenceScore: p, labelProps: m }) {
23
- let { className: h, ...g } = m, _ = l(h || u.labelText, u.labelTruncated), v = !!p && e(p), y = () => p && v ? /* @__PURE__ */ s(i, {}) : d || p ? /* @__PURE__ */ s(r, {
24
- className: u.labelIcon,
25
- confidenceScore: p
26
- }) : null;
27
- return /* @__PURE__ */ c("div", {
28
- className: u.labelWrapper,
29
- children: [o ? /* @__PURE__ */ s(n, {
30
- as: f,
31
- className: _,
32
- tooltipText: o,
33
- ...g,
34
- children: t
35
- }) : /* @__PURE__ */ a(f, {
36
- className: _,
37
- ...g
38
- }, t), y()]
6
+ import { Tooltip as a, useForkRef as o, useIsEllipsized as s } from "@box/blueprint-web";
7
+ import { createElement as c, memo as l, useRef as u } from "react";
8
+ import { Focusable as d } from "@ariakit/react";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ import m from "clsx";
11
+ import '../styles/utils.css';var h = {
12
+ noAttributesText: "_noAttributesText_19lyy_2",
13
+ fieldWrapper: "_fieldWrapper_19lyy_6",
14
+ hasSuggestion: "_hasSuggestion_19lyy_11",
15
+ hasConfidenceReview: "_hasConfidenceReview_19lyy_16",
16
+ error: "_error_19lyy_25",
17
+ dateField: "_dateField_19lyy_44",
18
+ aiApproved: "_aiApproved_19lyy_49",
19
+ comboboxContainer: "_comboboxContainer_19lyy_49",
20
+ labelWrapper: "_labelWrapper_19lyy_95",
21
+ labelText: "_labelText_19lyy_101",
22
+ labelTruncated: "_labelTruncated_19lyy_104",
23
+ labelIcon: "_labelIcon_19lyy_111",
24
+ labelTooltipStack: "_labelTooltipStack_19lyy_118"
25
+ };
26
+ function g({ as: e, fieldDescription: t, fieldName: r, labelClassName: i, labelRef: l, ...h }) {
27
+ let g = u(null), _ = o(g, l);
28
+ return /* @__PURE__ */ f(a, {
29
+ content: s(g) ? /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", { children: r }), /* @__PURE__ */ f("div", { children: t })] }) : t,
30
+ children: /* @__PURE__ */ f(d, { render: /* @__PURE__ */ c(e, {
31
+ className: m(i, n.interactiveTextHint),
32
+ ...h,
33
+ ref: _
34
+ }, r) })
35
+ });
36
+ }
37
+ function _({ as: e, fieldName: t, labelClassName: n, labelRef: r, ...i }) {
38
+ let l = u(null), p = o(l, r), m = s(l) ? t : void 0, h = /* @__PURE__ */ c(e, {
39
+ className: n,
40
+ ...i,
41
+ ref: p
42
+ }, t);
43
+ return m ? /* @__PURE__ */ f(a, {
44
+ content: m,
45
+ children: /* @__PURE__ */ f(d, { render: h })
46
+ }) : h;
47
+ }
48
+ var v = /* @__PURE__ */ l(function({ fieldName: t, fieldDescription: n, isAiSuggestionApplied: a, as: o, confidenceScore: s, labelProps: c }) {
49
+ let { className: l, ref: u, ...d } = c, v = m(l || h.labelText, h.labelTruncated), y = !!s && e(s), b = () => s && y ? /* @__PURE__ */ f(i, {}) : a || s ? /* @__PURE__ */ f(r, {
50
+ className: h.labelIcon,
51
+ confidenceScore: s
52
+ }) : null, x = n ? /* @__PURE__ */ f(g, {
53
+ as: o,
54
+ fieldDescription: n,
55
+ fieldName: t,
56
+ labelClassName: v,
57
+ labelRef: u,
58
+ ...d
59
+ }) : /* @__PURE__ */ f(_, {
60
+ as: o,
61
+ fieldName: t,
62
+ labelClassName: v,
63
+ labelRef: u,
64
+ ...d
65
+ });
66
+ return /* @__PURE__ */ p("div", {
67
+ className: h.labelWrapper,
68
+ children: [x, b()]
39
69
  });
40
70
  }, (e, t) => {
41
71
  let n = e.labelProps, r = t.labelProps;
42
72
  return e.fieldName === t.fieldName && e.fieldDescription === t.fieldDescription && e.isAiSuggestionApplied === t.isAiSuggestionApplied && e.confidenceScore === t.confidenceScore && e.as === t.as && n.className === r.className && n.htmlFor === r.htmlFor && n.id === r.id;
43
- }), f = (e, t, n = !1, r = "label", i) => (a) => /* @__PURE__ */ s(d, {
73
+ }), y = (e, t, n = !1, r = "label", i) => (a) => /* @__PURE__ */ f(v, {
44
74
  as: r,
45
75
  confidenceScore: i,
46
76
  fieldDescription: t,
47
77
  fieldName: e,
48
78
  isAiSuggestionApplied: n,
49
79
  labelProps: a
50
- }), p = (e) => {
80
+ }), b = (e) => {
51
81
  try {
52
82
  let n = t(e), r = new Date(n);
53
83
  return isNaN(r.getTime()) ? null : n;
@@ -55,4 +85,4 @@ import '../styles/utils.css';var u = {
55
85
  return null;
56
86
  }
57
87
  };
58
- export { p as n, u as r, f as t };
88
+ export { b as n, h as r, y as t };
@@ -1,2 +1,18 @@
1
- import { t as e } from "../../../../chunks/interactive-text.js";
2
- export { e as default };
1
+ import { t as e } from "../../../../chunks/interactive-text.module.js";
2
+ import { Text as t, Tooltip as n } from "@box/blueprint-web";
3
+ import { Focusable as r } from "@ariakit/react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import a from "clsx";
6
+ var o = ({ tooltipText: o, className: s, children: c, ...l }) => {
7
+ let { as: u = "span" } = l;
8
+ return /* @__PURE__ */ i(n, {
9
+ content: o,
10
+ children: /* @__PURE__ */ i(r, { render: /* @__PURE__ */ i(t, {
11
+ as: u,
12
+ className: a(e.interactiveText, s),
13
+ ...l,
14
+ children: c
15
+ }) })
16
+ });
17
+ };
18
+ export { o as default };
@@ -6,7 +6,7 @@ export default {
6
6
  "comboboxWithApiPagination.loadingAriaLabel": "লোড করা হচ্ছে...",
7
7
  "comboboxWithApiPagination.loadingMoreAriaLabel": "আরও লোড করা হচ্ছে...",
8
8
  "comboboxWithApiPagination.noResults": "কোনো ফলাফল পাওয়া যায়নি",
9
- "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI ক্রমাগত বিবর্তিত হচ্ছে। অনুগ্রহ করে সমস্ত AI-জেনারেট করা তথ্য যাচাই করুন।",
9
+ "groupSharedFeatures.metadataEditor.aiDisclaimer": "ব্যবহার করার আগে Box AI আউটপুট পর্যালোচনা যাচাই করা উচিত।",
10
10
  "groupSharedFeatures.metadataEditor.loading": "লোড করা হচ্ছে",
11
11
  "groupSharedFeatures.metadataEditor.metadataEditorFields.afterDateValidationError": "{date} তারিখের পরের তারিখ লিখুন",
12
12
  "groupSharedFeatures.metadataEditor.metadataEditorFields.append": "সংযুক্ত করুন",
@@ -13,7 +13,7 @@ comboboxWithApiPagination.loadingMoreAriaLabel = আরও লোড করা
13
13
  # Message displayed when no results are found in the combobox
14
14
  comboboxWithApiPagination.noResults = কোনো ফলাফল পাওয়া যায়নি
15
15
  # Disclaimer shown when at least one metadata field has been autofilled by AI
16
- groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI ক্রমাগত বিবর্তিত হচ্ছে। অনুগ্রহ করে সমস্ত AI-জেনারেট করা তথ্য যাচাই করুন।
16
+ groupSharedFeatures.metadataEditor.aiDisclaimer = ব্যবহার করার আগে Box AI আউটপুট পর্যালোচনা যাচাই করা উচিত।
17
17
  # Aria label indicating that content is loading or in progress
18
18
  groupSharedFeatures.metadataEditor.loading = লোড করা হচ্ছে
19
19
  # Error message shown if an invalid after date is entered. {date} represents the date entered by the user.
@@ -6,7 +6,7 @@ export default {
6
6
  "comboboxWithApiPagination.loadingAriaLabel": "Indlæser...",
7
7
  "comboboxWithApiPagination.loadingMoreAriaLabel": "Indlæser mere...",
8
8
  "comboboxWithApiPagination.noResults": "Ingen resultater fundet",
9
- "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI udvikler sig hele tiden. Sørg for at bekræfte alle AI-genererede oplysninger.",
9
+ "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI-outputs bør gennemgås og bekræftes før brug.",
10
10
  "groupSharedFeatures.metadataEditor.loading": "indlæser",
11
11
  "groupSharedFeatures.metadataEditor.metadataEditorFields.afterDateValidationError": "Indtast en dato efter den {date}",
12
12
  "groupSharedFeatures.metadataEditor.metadataEditorFields.append": "Tilføj",
@@ -13,7 +13,7 @@ comboboxWithApiPagination.loadingMoreAriaLabel = Indlæser mere...
13
13
  # Message displayed when no results are found in the combobox
14
14
  comboboxWithApiPagination.noResults = Ingen resultater fundet
15
15
  # Disclaimer shown when at least one metadata field has been autofilled by AI
16
- groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI udvikler sig hele tiden. Sørg for at bekræfte alle AI-genererede oplysninger.
16
+ groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI-outputs bør gennemgås og bekræftes før brug.
17
17
  # Aria label indicating that content is loading or in progress
18
18
  groupSharedFeatures.metadataEditor.loading = indlæser
19
19
  # Error message shown if an invalid after date is entered. {date} represents the date entered by the user.
@@ -6,7 +6,7 @@ export default {
6
6
  "comboboxWithApiPagination.loadingAriaLabel": "Laden …",
7
7
  "comboboxWithApiPagination.loadingMoreAriaLabel": "Mehr wird geladen ...",
8
8
  "comboboxWithApiPagination.noResults": "Keine Ergebnisse gefunden",
9
- "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI entwickelt sich kontinuierlich weiter. Bitte überprüfen Sie alle KI-generierten Informationen.",
9
+ "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI-Ausgaben sollten vor der Verwendung überprüft und verifiziert werden.",
10
10
  "groupSharedFeatures.metadataEditor.loading": "Beladen",
11
11
  "groupSharedFeatures.metadataEditor.metadataEditorFields.afterDateValidationError": "Ein Datum nach {date} eingeben",
12
12
  "groupSharedFeatures.metadataEditor.metadataEditorFields.append": "Anfügen",
@@ -13,7 +13,7 @@ comboboxWithApiPagination.loadingMoreAriaLabel = Mehr wird geladen ...
13
13
  # Message displayed when no results are found in the combobox
14
14
  comboboxWithApiPagination.noResults = Keine Ergebnisse gefunden
15
15
  # Disclaimer shown when at least one metadata field has been autofilled by AI
16
- groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI entwickelt sich kontinuierlich weiter. Bitte überprüfen Sie alle KI-generierten Informationen.
16
+ groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI-Ausgaben sollten vor der Verwendung überprüft und verifiziert werden.
17
17
  # Aria label indicating that content is loading or in progress
18
18
  groupSharedFeatures.metadataEditor.loading = Beladen
19
19
  # Error message shown if an invalid after date is entered. {date} represents the date entered by the user.
@@ -6,7 +6,7 @@ export default {
6
6
  "comboboxWithApiPagination.loadingAriaLabel": "Loading...",
7
7
  "comboboxWithApiPagination.loadingMoreAriaLabel": "Loading more...",
8
8
  "comboboxWithApiPagination.noResults": "No results found",
9
- "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI is continuously evolving. Please verify all AI-generated information.",
9
+ "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI outputs should be reviewed and verified before use.",
10
10
  "groupSharedFeatures.metadataEditor.loading": "loading",
11
11
  "groupSharedFeatures.metadataEditor.metadataEditorFields.afterDateValidationError": "Enter a date after {date}",
12
12
  "groupSharedFeatures.metadataEditor.metadataEditorFields.append": "Append",
@@ -13,7 +13,7 @@ comboboxWithApiPagination.loadingMoreAriaLabel = Loading more...
13
13
  # Message displayed when no results are found in the combobox
14
14
  comboboxWithApiPagination.noResults = No results found
15
15
  # Disclaimer shown when at least one metadata field has been autofilled by AI
16
- groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI is continuously evolving. Please verify all AI-generated information.
16
+ groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI outputs should be reviewed and verified before use.
17
17
  # Aria label indicating that content is loading or in progress
18
18
  groupSharedFeatures.metadataEditor.loading = loading
19
19
  # Error message shown if an invalid after date is entered. {date} represents the date entered by the user.
@@ -6,7 +6,7 @@ export default {
6
6
  "comboboxWithApiPagination.loadingAriaLabel": "Loading...",
7
7
  "comboboxWithApiPagination.loadingMoreAriaLabel": "Loading more...",
8
8
  "comboboxWithApiPagination.noResults": "No results found",
9
- "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI is continuously evolving. Please verify all AI-generated information.",
9
+ "groupSharedFeatures.metadataEditor.aiDisclaimer": "Box AI outputs should be reviewed and verified before use.",
10
10
  "groupSharedFeatures.metadataEditor.loading": "loading",
11
11
  "groupSharedFeatures.metadataEditor.metadataEditorFields.afterDateValidationError": "Enter a date after {date}",
12
12
  "groupSharedFeatures.metadataEditor.metadataEditorFields.append": "Append",
@@ -13,7 +13,7 @@ comboboxWithApiPagination.loadingMoreAriaLabel = Loading more...
13
13
  # Message displayed when no results are found in the combobox
14
14
  comboboxWithApiPagination.noResults = No results found
15
15
  # Disclaimer shown when at least one metadata field has been autofilled by AI
16
- groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI is continuously evolving. Please verify all AI-generated information.
16
+ groupSharedFeatures.metadataEditor.aiDisclaimer = Box AI outputs should be reviewed and verified before use.
17
17
  # Aria label indicating that content is loading or in progress
18
18
  groupSharedFeatures.metadataEditor.loading = loading
19
19
  # Error message shown if an invalid after date is entered. {date} represents the date entered by the user.