@box/metadata-editor 2.2.9 → 2.2.10

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.
@@ -8,7 +8,7 @@ import { InfoBadge as s } from "@box/blueprint-web-assets/icons/Line";
8
8
  import '../styles/metadata-instance-form-ai-disclaimer.css';var c = {
9
9
  aiDisclaimer: "_aiDisclaimer_6i2mf_1",
10
10
  infoBadgeIcon: "_infoBadgeIcon_6i2mf_7"
11
- }, l = (e) => e.some((e) => !!e.confidenceScore), u = ({ fields: u, isLoading: d, isConfidenceScoreReviewEnabled: f }) => {
11
+ }, l = (e) => e.some((e) => !!e.confidenceScore || !!e.isExtracted), u = ({ fields: u, isLoading: d, isBoundingBoxOrConfidenceScoreReviewEnabled: f }) => {
12
12
  let p = r(), m = n(() => l(u), [u]);
13
13
  return !f || !m || d ? null : /* @__PURE__ */ a("div", {
14
14
  className: c.aiDisclaimer,
@@ -13,39 +13,39 @@ import '../styles/metadata-instance-form-card-wrapper.css';var l = {
13
13
  metadataInstanceFormContentReducedGap: "_metadataInstanceFormContentReducedGap_ztv76_30",
14
14
  showOverlay: "_showOverlay_ztv76_34"
15
15
  }, u = (u) => {
16
- let { areAiSuggestionsAvailable: d, children: f, className: p, formRef: m, formValues: h, isAdvancedExtractAgentEnabled: g = !1, isAiSuggestionsFeatureEnabled: _, isBetaLanguageEnabled: v, isConfidenceScoreReviewEnabled: y = !1, isLargeFile: b = !1, isDeleteButtonDisabled: x, onToggleReviewFilter: S, shouldShowOnlyReviewFields: C = !1, suggestions: w, isFetchingSuggestions: T, isFormDirty: E = !1, selectedTemplateInstance: D, getAiSuggestions: O, handleCancel: k, handleDelete: A } = u, { enableModernizedComponents: j } = a(), M = D?.templateKey === e, N = !!w[D?.templateKey];
16
+ let { areAiSuggestionsAvailable: d, children: f, className: p, formRef: m, formValues: h, isAdvancedExtractAgentEnabled: g = !1, isAiSuggestionsFeatureEnabled: _, isBetaLanguageEnabled: v, isConfidenceScoreReviewEnabled: y = !1, isBoundingBoxEnabled: b = !1, isLargeFile: x = !1, isDeleteButtonDisabled: S, onToggleReviewFilter: C, shouldShowOnlyReviewFields: w = !1, suggestions: T, isFetchingSuggestions: E, isFormDirty: D = !1, selectedTemplateInstance: O, getAiSuggestions: k, handleCancel: A, handleDelete: j } = u, { enableModernizedComponents: M } = a(), N = O?.templateKey === e, P = !!T[O?.templateKey], F = y || b;
17
17
  return /* @__PURE__ */ o("div", {
18
- className: T && l.wrapperGradient,
19
- "data-modern": j,
18
+ className: E && l.wrapperGradient,
19
+ "data-modern": M,
20
20
  children: /* @__PURE__ */ s(i, {
21
21
  ref: m,
22
- className: c(p, { [l.suggestionsFetching]: T }),
22
+ className: c(p, { [l.suggestionsFetching]: E }),
23
23
  children: [
24
24
  /* @__PURE__ */ o(r, {
25
25
  areAiSuggestionsAvailable: d,
26
- hasSuggestions: N,
26
+ hasSuggestions: P,
27
27
  isAdvancedExtractAgentEnabled: g,
28
- isAiSuggestionsFeatureEnabled: _ && !M,
28
+ isAiSuggestionsFeatureEnabled: _ && !N,
29
29
  isBetaLanguageEnabled: v,
30
30
  isConfidenceScoreReviewEnabled: y,
31
- isLargeFile: b,
32
- isLoading: T,
33
- onAutofill: O,
34
- onToggleReviewFilter: S,
35
- shouldShowOnlyReviewFields: C,
36
- templateName: D?.displayName
31
+ isLargeFile: x,
32
+ isLoading: E,
33
+ onAutofill: k,
34
+ onToggleReviewFilter: C,
35
+ shouldShowOnlyReviewFields: w,
36
+ templateName: O?.displayName
37
37
  }),
38
- D && f,
38
+ O && f,
39
39
  /* @__PURE__ */ o(t, {
40
- isLoading: T,
41
- isConfidenceScoreReviewEnabled: y,
40
+ isLoading: E,
41
+ isBoundingBoxOrConfidenceScoreReviewEnabled: F,
42
42
  fields: h.metadata?.fields ?? []
43
43
  }),
44
44
  /* @__PURE__ */ o(n, {
45
- isDeleteButtonDisabled: x,
46
- isLoading: T,
47
- onCancel: () => k(E),
48
- onDelete: A
45
+ isDeleteButtonDisabled: S,
46
+ isLoading: E,
47
+ onCancel: () => A(D),
48
+ onDelete: j
49
49
  })
50
50
  ]
51
51
  })
@@ -6,7 +6,7 @@ var t = e({
6
6
  },
7
7
  aiExtractedBadgeTooltip: {
8
8
  id: "metadataEditor.fieldLabel.aiExtractedBadgeTooltip",
9
- defaultMessage: "Extraction value returned by Box AI"
9
+ defaultMessage: "Auto-extracted with Box AI"
10
10
  }
11
11
  });
12
12
  export { t as default };
@@ -101,6 +101,7 @@ var y = ({ dirty: e, onChange: t, values: n }) => {
101
101
  isAiSuggestionsFeatureEnabled: w,
102
102
  isBetaLanguageEnabled: re,
103
103
  isConfidenceScoreReviewEnabled: V,
104
+ isBoundingBoxEnabled: H,
104
105
  isDeleteButtonDisabled: ie,
105
106
  isFetchingSuggestions: q,
106
107
  isFormDirty: t,
@@ -82,7 +82,7 @@ export default {
82
82
  "metadataEditor.editInstance.deleteConfirmationModal.dismissButton": "Dismiss",
83
83
  "metadataEditor.editInstance.deleteConfirmationModal.header": "Delete \"{templateName}\"",
84
84
  "metadataEditor.editInstance.deleteConfirmationModal.headerAriaLabel": "Delete Metadata Template",
85
- "metadataEditor.fieldLabel.aiExtractedBadgeTooltip": "Extraction value returned by Box AI",
85
+ "metadataEditor.fieldLabel.aiExtractedBadgeTooltip": "Auto-extracted with Box AI",
86
86
  "metadataEditor.fieldLabel.lowConfidenceBadge": "Low",
87
87
  "metadataEditor.fileLevel.emptyState.boxAiEnabled.body": "Use the power of Box AI to quickly capture document metadata, with ever-increasing accuracy.",
88
88
  "metadataEditor.fileLevel.emptyState.boxAiEnabled.heading": "Autofill Metadata with Box AI",
@@ -165,7 +165,7 @@ metadataEditor.editInstance.deleteConfirmationModal.header = Delete "{templateNa
165
165
  # Aria label for header informing that template will be deleted
166
166
  metadataEditor.editInstance.deleteConfirmationModal.headerAriaLabel = Delete Metadata Template
167
167
  # Tooltip shown on the Box AI badge when a value was extracted by Box AI
168
- metadataEditor.fieldLabel.aiExtractedBadgeTooltip = Extraction value returned by Box AI
168
+ metadataEditor.fieldLabel.aiExtractedBadgeTooltip = Auto-extracted with Box AI
169
169
  # Badge shown on field label indicating a low confidence AI extraction
170
170
  metadataEditor.fieldLabel.lowConfidenceBadge = Low
171
171
  # Description of Box AI features
@@ -1 +1 @@
1
- [{"id":"metadataEditor.fieldLabel.lowConfidenceBadge","description":"Badge shown on field label indicating a low confidence AI extraction","defaultMessage":"Low"},{"id":"metadataEditor.fieldLabel.aiExtractedBadgeTooltip","description":"Tooltip shown on the Box AI badge when a value was extracted by Box AI","defaultMessage":"Extraction value returned by Box AI"}]
1
+ [{"id":"metadataEditor.fieldLabel.lowConfidenceBadge","description":"Badge shown on field label indicating a low confidence AI extraction","defaultMessage":"Low"},{"id":"metadataEditor.fieldLabel.aiExtractedBadgeTooltip","description":"Tooltip shown on the Box AI badge when a value was extracted by Box AI","defaultMessage":"Auto-extracted with Box AI"}]
@@ -45,6 +45,7 @@ export type MetadataInstanceFormWrapperProps<T> = {
45
45
  isAiSuggestionsFeatureEnabled: boolean;
46
46
  isBetaLanguageEnabled: boolean;
47
47
  isConfidenceScoreReviewEnabled?: boolean;
48
+ isBoundingBoxEnabled?: boolean;
48
49
  isLargeFile?: boolean;
49
50
  isDeleteButtonDisabled: boolean;
50
51
  isFetchingSuggestions: boolean;
@@ -2,7 +2,7 @@ import { MetadataTemplateField } from '../../../../types';
2
2
  type MetadataInstanceFormAiDisclaimerProps = {
3
3
  fields: MetadataTemplateField[];
4
4
  isLoading: boolean;
5
- isConfidenceScoreReviewEnabled: boolean;
5
+ isBoundingBoxOrConfidenceScoreReviewEnabled: boolean;
6
6
  };
7
- export declare const MetadataInstanceFormAiDisclaimer: ({ fields, isLoading, isConfidenceScoreReviewEnabled, }: MetadataInstanceFormAiDisclaimerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const MetadataInstanceFormAiDisclaimer: ({ fields, isLoading, isBoundingBoxOrConfidenceScoreReviewEnabled, }: MetadataInstanceFormAiDisclaimerProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.21",
6
6
  "@box/blueprint-web": "^16.4.0",