@box/metadata-editor 1.48.0 → 1.49.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.
@@ -1,64 +1,70 @@
1
- import { useBlueprintModernization as A, Card as E } from "@box/blueprint-web";
1
+ import { useBlueprintModernization as v, Card as A } from "@box/blueprint-web";
2
2
  import M from "clsx";
3
- import { TEMPLATE_CUSTOM_PROPERTIES as S } from "../esm/lib/constants.js";
4
- import { MetadataInstanceFormFooter as b } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js";
5
- import { MetadataInstanceFormHeader as w } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
- import { jsx as a, jsxs as v } from "react/jsx-runtime";
7
- import '../styles/metadata-instance-form-card-wrapper.css';const x = "_metadataInstanceForm_moyil_1", D = "_wrapperGradient_moyil_7", L = "_suggestionsFetching_moyil_17", N = "_metadataInstanceFormContent_moyil_23", O = "_showOverlay_moyil_30", s = {
3
+ import { TEMPLATE_CUSTOM_PROPERTIES as b } from "../esm/lib/constants.js";
4
+ import { MetadataInstanceFormFooter as O } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js";
5
+ import { MetadataInstanceFormHeader as R } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
+ import { jsx as a, jsxs as T } from "react/jsx-runtime";
7
+ import '../styles/metadata-instance-form-card-wrapper.css';const x = "_metadataInstanceForm_moyil_1", D = "_wrapperGradient_moyil_7", L = "_suggestionsFetching_moyil_17", N = "_metadataInstanceFormContent_moyil_23", G = "_showOverlay_moyil_30", s = {
8
8
  metadataInstanceForm: x,
9
9
  wrapperGradient: D,
10
10
  suggestionsFetching: L,
11
11
  metadataInstanceFormContent: N,
12
- showOverlay: O
13
- }, z = (n) => {
12
+ showOverlay: G
13
+ }, U = (n) => {
14
14
  const {
15
15
  areAiSuggestionsAvailable: o,
16
16
  children: i,
17
17
  className: r,
18
- formRef: m,
19
- isAdvancedExtractAgentEnabled: l = !1,
18
+ formRef: l,
19
+ isAdvancedExtractAgentEnabled: m = !1,
20
20
  isAiSuggestionsFeatureEnabled: d,
21
21
  isBetaLanguageEnabled: c,
22
- isLargeFile: g = !1,
23
- isDeleteButtonDisabled: p,
24
- suggestions: u,
22
+ isConfidenceScoreReviewEnabled: g = !1,
23
+ isLargeFile: p = !1,
24
+ isDeleteButtonDisabled: u,
25
+ onToggleReviewFilter: F,
26
+ shouldShowOnlyReviewFields: _ = !1,
27
+ suggestions: f,
25
28
  isFetchingSuggestions: e,
26
- isFormDirty: F = !1,
29
+ isFormDirty: h = !1,
27
30
  selectedTemplateInstance: t,
28
- getAiSuggestions: _,
29
- handleCancel: h,
30
- handleDelete: f
31
+ getAiSuggestions: y,
32
+ handleCancel: w,
33
+ handleDelete: C
31
34
  } = n, {
32
- enableModernizedComponents: y
33
- } = A(), I = t?.templateKey === S, C = !!u[t?.templateKey];
35
+ enableModernizedComponents: I
36
+ } = v(), E = t?.templateKey === b, S = !!f[t?.templateKey];
34
37
  return /* @__PURE__ */ a("div", {
35
38
  className: e && s.wrapperGradient,
36
- "data-modern": y,
37
- children: /* @__PURE__ */ v(E, {
38
- ref: m,
39
+ "data-modern": I,
40
+ children: /* @__PURE__ */ T(A, {
41
+ ref: l,
39
42
  className: M(r, {
40
43
  [s.suggestionsFetching]: e
41
44
  }),
42
- children: [/* @__PURE__ */ a(w, {
45
+ children: [/* @__PURE__ */ a(R, {
43
46
  areAiSuggestionsAvailable: o,
44
- hasSuggestions: C,
45
- isAdvancedExtractAgentEnabled: l,
46
- isAiSuggestionsFeatureEnabled: d && !I,
47
+ hasSuggestions: S,
48
+ isAdvancedExtractAgentEnabled: m,
49
+ isAiSuggestionsFeatureEnabled: d && !E,
47
50
  isBetaLanguageEnabled: c,
48
- isLargeFile: g,
51
+ isConfidenceScoreReviewEnabled: g,
52
+ isLargeFile: p,
49
53
  isLoading: e,
50
- onAutofill: _,
54
+ onAutofill: y,
55
+ onToggleReviewFilter: F,
56
+ shouldShowOnlyReviewFields: _,
51
57
  templateName: t?.displayName
52
- }), t && i, /* @__PURE__ */ a(b, {
53
- isDeleteButtonDisabled: p,
58
+ }), t && i, /* @__PURE__ */ a(O, {
59
+ isDeleteButtonDisabled: u,
54
60
  isLoading: e,
55
- onCancel: () => h(F),
56
- onDelete: f
61
+ onCancel: () => w(h),
62
+ onDelete: C
57
63
  })]
58
64
  })
59
65
  });
60
66
  };
61
67
  export {
62
- z as M,
68
+ U as M,
63
69
  s
64
70
  };
@@ -1,145 +1,150 @@
1
1
  import "../custom-instance-new-field/custom-instance-new-field.js";
2
- import { DeleteConfirmationModal as J } from "../delete-confirmation-modal/delete-confirmation-modal.js";
2
+ import { DeleteConfirmationModal as H } from "../delete-confirmation-modal/delete-confirmation-modal.js";
3
3
  import "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
4
4
  import "../metadata-instance-form-header/metadata-instance-form-header.js";
5
- import z from "clsx";
6
- import { Formik as G, Form as H } from "formik";
7
- import Q from "lodash/isEqual";
8
- import { useState as y, useEffect as O, useRef as x, useMemo as X } from "react";
9
- import { TEMPLATE_CUSTOM_PROPERTIES as Y } from "../../../../constants.js";
10
- import { useAutofill as Z } from "../../../../utils/autofill-context.js";
11
- import { TemplateInstance as ee } from "../../../metadata-editor-fields/metadata-editor-fields.js";
12
- import { MetadataEmptyState as te } from "../../../metadata-empty-state/metadata-empty-state.js";
13
- import { AutofillOverlay as ae } from "../autofill-overlay/autofill-overlay.js";
14
- import { CustomInstance as ne } from "../custom-instance/custom-instance.js";
15
- import { c as oe } from "../../../../../../chunks/utils.js";
16
- import { s as d, M as se } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
17
- import { jsx as n, jsxs as S } from "react/jsx-runtime";
18
- import { UnsavedChangesModal as re } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
19
- const ie = ({
5
+ import Q from "clsx";
6
+ import { Formik as X, Form as Y } from "formik";
7
+ import Z from "lodash/isEqual";
8
+ import { useState as O, useEffect as S, useRef as v, useMemo as ee } from "react";
9
+ import { TEMPLATE_CUSTOM_PROPERTIES as te } from "../../../../constants.js";
10
+ import { useAutofill as ae } from "../../../../utils/autofill-context.js";
11
+ import { TemplateInstance as ne } from "../../../metadata-editor-fields/metadata-editor-fields.js";
12
+ import { MetadataEmptyState as oe } from "../../../metadata-empty-state/metadata-empty-state.js";
13
+ import { AutofillOverlay as se } from "../autofill-overlay/autofill-overlay.js";
14
+ import { CustomInstance as re } from "../custom-instance/custom-instance.js";
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";
18
+ import { UnsavedChangesModal as me } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
19
+ const de = ({
20
20
  dirty: i,
21
21
  onChange: l,
22
22
  values: t
23
23
  }) => {
24
- const s = x(t);
25
- return i && !Q(s.current.metadata.fields, t.metadata.fields) && (s.current = t, l(t)), null;
26
- }, Ie = (i) => {
24
+ const s = v(t);
25
+ return i && !Z(s.current.metadata.fields, t.metadata.fields) && (s.current = t, l(t)), null;
26
+ }, we = (i) => {
27
27
  const {
28
28
  areAiSuggestionsAvailable: l,
29
29
  customRef: t,
30
30
  isLargeFile: s,
31
31
  errorCode: m,
32
- isAiSuggestionsFeatureEnabled: c,
32
+ isAiSuggestionsFeatureEnabled: d,
33
33
  isAdvancedExtractAgentEnabled: D = !1,
34
34
  isBetaLanguageEnabled: I,
35
- isDeleteButtonDisabled: v,
35
+ isDeleteButtonDisabled: w,
36
36
  isDeleteConfirmationModalCheckboxEnabled: A,
37
- isMultilevelTaxonomyFieldEnabled: p,
38
- isUnsavedChangesModalOpen: T = !1,
39
- MetadataInstanceFormCustomWrapper: w,
37
+ isMultilevelTaxonomyFieldEnabled: f,
38
+ isUnsavedChangesModalOpen: R = !1,
39
+ MetadataInstanceFormCustomWrapper: T,
40
40
  selectedTemplateInstance: e,
41
- onCancel: R,
42
- onChange: f,
43
- onDelete: L,
44
- onDiscardUnsavedChanges: k,
45
- onSubmit: N,
41
+ onCancel: L,
42
+ onChange: p,
43
+ onDelete: k,
44
+ onDiscardUnsavedChanges: N,
45
+ onSubmit: P,
46
+ onToggleReviewFilter: U,
46
47
  setIsUnsavedChangesModalOpen: u,
47
- taxonomyOptionsFetcher: g,
48
- isConfidenceScoreReviewEnabled: le = !1
49
- } = i, P = w ?? se, [U, E] = y(!1), {
48
+ shouldShowOnlyReviewFields: g = !1,
49
+ taxonomyOptionsFetcher: h,
50
+ isConfidenceScoreReviewEnabled: B = !1
51
+ } = i, K = T ?? le, [V, E] = O(!1), {
50
52
  isFetchingSuggestions: o,
51
53
  isLongLoading: C,
52
- getAiSuggestions: B,
53
- clearState: h,
54
- suggestions: K
55
- } = Z();
56
- O(() => () => {
57
- h();
58
- }, [h, e?.id]);
59
- const b = e?.templateKey === Y, V = async (a) => {
60
- await N(a, oe(a, e));
61
- }, W = (a) => {
62
- a ? u(!0) : R();
63
- }, j = () => {
54
+ getAiSuggestions: W,
55
+ clearState: F,
56
+ suggestions: j
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));
63
+ }, $ = (a) => {
64
+ a ? u(!0) : L();
65
+ }, q = () => {
64
66
  E(!0);
65
- }, _ = {
67
+ }, J = {
66
68
  metadata: {
67
69
  ...e
68
70
  }
69
- }, F = x(null), [M, $] = y(null);
70
- O(() => {
71
- $(t ?? F.current);
71
+ }, y = v(null), [M, z] = O(null);
72
+ S(() => {
73
+ z(t ?? y.current);
72
74
  }, [t, e?.templateKey, e?.scope]);
73
- const q = X(() => {
75
+ const G = ee(() => {
74
76
  const a = e?.fields.length === 0;
75
77
  if (b)
76
- return /* @__PURE__ */ n(ne, {
78
+ return /* @__PURE__ */ n(re, {
77
79
  isLoading: o
78
80
  });
79
81
  if (a)
80
- return /* @__PURE__ */ n(te, {
81
- isBoxAiSuggestionsFeatureEnabled: c,
82
+ return /* @__PURE__ */ n(oe, {
83
+ isBoxAiSuggestionsFeatureEnabled: d,
82
84
  level: "instance"
83
85
  });
84
86
  const r = !!(o || m);
85
- return /* @__PURE__ */ S("div", {
86
- className: z(d.metadataInstanceFormContent, r && d.showOverlay),
87
- children: [/* @__PURE__ */ n(ae, {
87
+ return /* @__PURE__ */ x("div", {
88
+ className: Q(c.metadataInstanceFormContent, r && c.showOverlay),
89
+ children: [/* @__PURE__ */ n(se, {
88
90
  errorCode: m,
89
91
  isFetchingSuggestions: o,
90
92
  isLongLoading: C
91
- }), /* @__PURE__ */ n(ee, {
93
+ }), /* @__PURE__ */ n(ne, {
92
94
  disableForm: o,
93
95
  isExternallyOwned: e?.isExternallyOwned,
94
- isMultilevelTaxonomyFieldEnabled: p,
96
+ isMultilevelTaxonomyFieldEnabled: f,
95
97
  portalElement: t ?? M,
96
- taxonomyOptionsFetcher: g
98
+ taxonomyOptionsFetcher: h
97
99
  })]
98
100
  });
99
- }, [e?.fields.length, b, o, C, t, M, g, c, p, m, e?.isExternallyOwned]);
100
- return /* @__PURE__ */ n(G, {
101
- initialValues: _,
102
- onSubmit: V,
101
+ }, [e?.fields.length, e?.isExternallyOwned, b, o, C, t, M, h, d, f, m, g]);
102
+ return /* @__PURE__ */ n(X, {
103
+ initialValues: J,
104
+ onSubmit: _,
103
105
  children: ({
104
106
  values: a,
105
107
  dirty: r
106
- }) => /* @__PURE__ */ S(H, {
107
- children: [/* @__PURE__ */ n(P, {
108
+ }) => /* @__PURE__ */ x(Y, {
109
+ children: [/* @__PURE__ */ n(K, {
108
110
  areAiSuggestionsAvailable: l,
109
- className: d.metadataInstanceForm,
110
- formRef: F,
111
+ className: c.metadataInstanceForm,
112
+ formRef: y,
111
113
  formValues: a,
112
- getAiSuggestions: B,
113
- handleCancel: W,
114
- handleDelete: j,
114
+ getAiSuggestions: W,
115
+ handleCancel: $,
116
+ handleDelete: q,
115
117
  isAdvancedExtractAgentEnabled: D,
116
- isAiSuggestionsFeatureEnabled: c,
118
+ isAiSuggestionsFeatureEnabled: d,
117
119
  isBetaLanguageEnabled: I,
118
- isDeleteButtonDisabled: v,
120
+ isConfidenceScoreReviewEnabled: B,
121
+ isDeleteButtonDisabled: w,
119
122
  isFetchingSuggestions: o,
120
123
  isFormDirty: r,
121
124
  isLargeFile: s,
125
+ onToggleReviewFilter: U,
122
126
  selectedTemplateInstance: e,
123
- suggestions: K,
124
- children: e && q
125
- }), f && /* @__PURE__ */ n(ie, {
127
+ shouldShowOnlyReviewFields: g,
128
+ suggestions: j,
129
+ children: e && G
130
+ }), p && /* @__PURE__ */ n(de, {
126
131
  dirty: r,
127
- onChange: f,
132
+ onChange: p,
128
133
  values: a
129
- }), /* @__PURE__ */ n(re, {
134
+ }), /* @__PURE__ */ n(me, {
130
135
  onBackToEdit: () => u(!1),
131
- onDiscardChanges: k,
132
- open: T
133
- }), /* @__PURE__ */ n(J, {
136
+ onDiscardChanges: N,
137
+ open: R
138
+ }), /* @__PURE__ */ n(H, {
134
139
  isCheckboxEnabled: A,
135
- onConfirm: () => L(e),
140
+ onConfirm: () => k(e),
136
141
  onDismiss: () => E(!1),
137
- open: U,
142
+ open: V,
138
143
  templateName: e?.displayName
139
144
  })]
140
145
  })
141
146
  }, `${e?.scope}.${e?.templateKey}`);
142
147
  };
143
148
  export {
144
- Ie as MetadataInstanceForm
149
+ we as MetadataInstanceForm
145
150
  };
@@ -1,43 +1,58 @@
1
- import { useIntl as p } from "react-intl";
2
- import H from "../../../interactive-header-text/interactive-header-text.js";
3
- import { MetadataInstanceFormAutofillButton as _ } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
4
- import { MetadataInstanceFormInlineNotice as h } from "../metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js";
5
- import u from "./messages.js";
6
- import { jsxs as o, Fragment as x, jsx as t } from "react/jsx-runtime";
7
- import '../../../../../../styles/metadata-instance-form-header.css';const M = "_metadataInstanceFormHeader_1hzt2_1", N = "_title_1hzt2_9", n = {
8
- metadataInstanceFormHeader: M,
9
- title: N
10
- }, k = ({
11
- areAiSuggestionsAvailable: e,
12
- hasSuggestions: r,
13
- isAdvancedExtractAgentEnabled: m = !1,
14
- isAiSuggestionsFeatureEnabled: s,
15
- isBetaLanguageEnabled: a,
16
- isLargeFile: c,
17
- isLoading: i,
18
- templateName: l,
19
- onAutofill: d
1
+ import { useFormikContext as M } from "formik";
2
+ import { useMemo as h } from "react";
3
+ import { useIntl as v } from "react-intl";
4
+ import { getFieldsNeedingReview as w } from "../../../../utils/confidence-score/get-fields-needing-review.js";
5
+ import W from "../../../interactive-header-text/interactive-header-text.js";
6
+ import { MetadataInstanceReviewNotice as g } from "../../../metadata-instance-review-notice/metadata-instance-review-notice.js";
7
+ import { MetadataInstanceFormAutofillButton as T } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
8
+ import { MetadataInstanceFormInlineNotice as j } from "../metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js";
9
+ import k from "./messages.js";
10
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
11
+ import '../../../../../../styles/metadata-instance-form-header.css';const y = "_metadataInstanceFormHeaderWrapper_3nbmr_1", C = "_metadataInstanceFormHeader_3nbmr_1", R = "_title_3nbmr_15", a = {
12
+ metadataInstanceFormHeaderWrapper: y,
13
+ metadataInstanceFormHeader: C,
14
+ title: R
15
+ }, O = ({
16
+ areAiSuggestionsAvailable: r,
17
+ hasSuggestions: i,
18
+ isAdvancedExtractAgentEnabled: d = !1,
19
+ isAiSuggestionsFeatureEnabled: l,
20
+ isBetaLanguageEnabled: o,
21
+ isConfidenceScoreReviewEnabled: e = !1,
22
+ isLargeFile: p,
23
+ isLoading: f,
24
+ onToggleReviewFilter: m,
25
+ shouldShowOnlyReviewFields: I = !1,
26
+ templateName: F,
27
+ onAutofill: u
20
28
  }) => {
21
- const I = p(), f = l ?? I.formatMessage(u.customInstanceTitle), F = r && e;
22
- return /* @__PURE__ */ o(x, {
23
- children: [/* @__PURE__ */ o("div", {
24
- className: n.metadataInstanceFormHeader,
25
- children: [/* @__PURE__ */ t(H, {
26
- className: n.title,
27
- title: f
28
- }), s ? /* @__PURE__ */ t(_, {
29
- areAiSuggestionsAvailable: e,
30
- isAdvancedExtractAgentEnabled: m,
31
- isBetaLanguageEnabled: a,
32
- isLoading: i,
33
- onAutofill: d
29
+ const H = v(), {
30
+ values: n
31
+ } = M(), s = h(() => e ? w(n.metadata?.fields ?? []).length : 0, [n.metadata?.fields, e]), N = F ?? H.formatMessage(k.customInstanceTitle), _ = i && r, x = e && s > 0 && m !== void 0;
32
+ return /* @__PURE__ */ c("div", {
33
+ className: a.metadataInstanceFormHeaderWrapper,
34
+ children: [/* @__PURE__ */ c("div", {
35
+ className: a.metadataInstanceFormHeader,
36
+ children: [/* @__PURE__ */ t(W, {
37
+ className: a.title,
38
+ title: N
39
+ }), l ? /* @__PURE__ */ t(T, {
40
+ areAiSuggestionsAvailable: r,
41
+ isAdvancedExtractAgentEnabled: d,
42
+ isBetaLanguageEnabled: o,
43
+ isLoading: f,
44
+ onAutofill: u
34
45
  }) : null]
35
- }), F && /* @__PURE__ */ t(h, {
36
- isBetaLanguageEnabled: a,
37
- isLargeFile: c
46
+ }), _ && /* @__PURE__ */ t(j, {
47
+ isBetaLanguageEnabled: o,
48
+ isLargeFile: p
49
+ }), x && /* @__PURE__ */ t(g, {
50
+ fieldsNeedingReviewCount: s,
51
+ isLowScoreFilteringEnabled: I,
52
+ onTextToggleClick: m
38
53
  })]
39
54
  });
40
55
  };
41
56
  export {
42
- k as MetadataInstanceFormHeader
57
+ O as MetadataInstanceFormHeader
43
58
  };
@@ -1,43 +1,35 @@
1
- import { useIntl as c } from "react-intl";
2
- import { InlineNotice as l, Text as t } from "@box/blueprint-web";
3
- import i from "./messages.js";
4
- import { jsxs as a, Fragment as d, jsx as n } from "react/jsx-runtime";
5
- import '../../../../../../styles/metadata-instance-form-inline-notice.css';const m = "_inlineNotice_j1wao_1", s = {
6
- inlineNotice: m
7
- }, p = ({
1
+ import { useIntl as s } from "react-intl";
2
+ import { InlineNotice as n, Text as t } from "@box/blueprint-web";
3
+ import a from "./messages.js";
4
+ import { jsxs as r, Fragment as c, jsx as l } from "react/jsx-runtime";
5
+ const p = ({
8
6
  isLargeFile: o,
9
- isBetaLanguageEnabled: r
7
+ isBetaLanguageEnabled: i
10
8
  }) => {
11
- const e = c();
12
- return !r && !o ? null : /* @__PURE__ */ a(d, {
13
- children: [o && /* @__PURE__ */ n("div", {
14
- className: s.inlineNotice,
15
- children: /* @__PURE__ */ a(l, {
16
- variant: "warning",
17
- variantIconAriaLabel: e.formatMessage(i.largeFileNoticeHeader),
18
- children: [/* @__PURE__ */ n(t, {
19
- as: "p",
20
- variant: "bodyDefaultBold",
21
- children: e.formatMessage(i.largeFileNoticeHeader)
22
- }), /* @__PURE__ */ a(t, {
23
- as: "p",
24
- children: [e.formatMessage(i.largeFileNoticeBody), " "]
25
- })]
26
- })
27
- }), r && /* @__PURE__ */ n("div", {
28
- className: s.inlineNotice,
29
- children: /* @__PURE__ */ a(l, {
30
- variant: "info",
31
- variantIconAriaLabel: e.formatMessage(i.autofillInBetaNoticeHeader),
32
- children: [/* @__PURE__ */ n(t, {
33
- as: "p",
34
- variant: "bodyDefaultBold",
35
- children: e.formatMessage(i.autofillInBetaNoticeHeader)
36
- }), /* @__PURE__ */ a(t, {
37
- as: "p",
38
- children: [e.formatMessage(i.autofillInBetaNoticeBody), " "]
39
- })]
40
- })
9
+ const e = s();
10
+ return !i && !o ? null : /* @__PURE__ */ r(c, {
11
+ children: [o && /* @__PURE__ */ r(n, {
12
+ variant: "warning",
13
+ variantIconAriaLabel: e.formatMessage(a.largeFileNoticeHeader),
14
+ children: [/* @__PURE__ */ l(t, {
15
+ as: "p",
16
+ variant: "bodyDefaultBold",
17
+ children: e.formatMessage(a.largeFileNoticeHeader)
18
+ }), /* @__PURE__ */ r(t, {
19
+ as: "p",
20
+ children: [e.formatMessage(a.largeFileNoticeBody), " "]
21
+ })]
22
+ }), i && /* @__PURE__ */ r(n, {
23
+ variant: "info",
24
+ variantIconAriaLabel: e.formatMessage(a.autofillInBetaNoticeHeader),
25
+ children: [/* @__PURE__ */ l(t, {
26
+ as: "p",
27
+ variant: "bodyDefaultBold",
28
+ children: e.formatMessage(a.autofillInBetaNoticeHeader)
29
+ }), /* @__PURE__ */ r(t, {
30
+ as: "p",
31
+ children: [e.formatMessage(a.autofillInBetaNoticeBody), " "]
32
+ })]
41
33
  })]
42
34
  });
43
35
  };
@@ -1 +1 @@
1
- ._metadataInstanceFormHeader_1hzt2_1{display:flex;gap:var(--space-2);align-items:center;justify-content:space-between;padding-block-end:var(--space-4);border-block-end:solid var(--gray-10) var(--border-1)}._metadataInstanceFormHeader_1hzt2_1 ._title_1hzt2_9{width:100%}
1
+ ._metadataInstanceFormHeaderWrapper_3nbmr_1{display:flex;flex-direction:column;gap:var(--bp-space-040)}._metadataInstanceFormHeader_3nbmr_1{display:flex;gap:var(--bp-space-020);align-items:center;justify-content:space-between;padding-block-end:var(--bp-space-040);border-block-end:solid var(--bp-gray-10) var(--bp-border-01)}._metadataInstanceFormHeader_3nbmr_1 ._title_3nbmr_15{width:100%}
@@ -21,7 +21,9 @@ export type MetadataInstanceFormProps = {
21
21
  /** Callback invoked when clicking Discard Changes button on the UnsavedChangesModal - can be used to reset form values */
22
22
  onDiscardUnsavedChanges?: () => void;
23
23
  onSubmit: (values: FormValues, operations: JSONPatchOperations) => Promise<void>;
24
+ onToggleReviewFilter?: () => void;
24
25
  setIsUnsavedChangesModalOpen: (isUnsavedChangesModalOpen: boolean) => void;
26
+ shouldShowOnlyReviewFields?: boolean;
25
27
  taxonomyOptionsFetcher: TaxonomyOptionsFetcher;
26
28
  customRef?: HTMLDivElement | null;
27
29
  MetadataInstanceFormCustomWrapper?: React.ComponentType<MetadataInstanceFormWrapperProps<null>>;
@@ -35,11 +37,14 @@ export type MetadataInstanceFormWrapperProps<T> = {
35
37
  isAdvancedExtractAgentEnabled?: boolean;
36
38
  isAiSuggestionsFeatureEnabled: boolean;
37
39
  isBetaLanguageEnabled: boolean;
40
+ isConfidenceScoreReviewEnabled?: boolean;
38
41
  isLargeFile?: boolean;
39
42
  isDeleteButtonDisabled: boolean;
40
43
  isFetchingSuggestions: boolean;
41
44
  isFormDirty: boolean;
45
+ onToggleReviewFilter?: () => void;
42
46
  selectedTemplateInstance: MetadataTemplateInstance | null;
47
+ shouldShowOnlyReviewFields?: boolean;
43
48
  suggestions: AutofillSuggestions;
44
49
  handleDelete: () => void;
45
50
  handleCancel: (isDirty: boolean) => void;
@@ -1,2 +1,2 @@
1
1
  import { MetadataInstanceFormHeaderProps } from './types';
2
- export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAdvancedExtractAgentEnabled, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, isLargeFile, isLoading, templateName, onAutofill, }: MetadataInstanceFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAdvancedExtractAgentEnabled, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, isConfidenceScoreReviewEnabled, isLargeFile, isLoading, onToggleReviewFilter, shouldShowOnlyReviewFields, templateName, onAutofill, }: MetadataInstanceFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,11 @@ export type MetadataInstanceFormHeaderProps = {
5
5
  isAdvancedExtractAgentEnabled?: boolean;
6
6
  isAiSuggestionsFeatureEnabled: boolean;
7
7
  isBetaLanguageEnabled: boolean;
8
+ isConfidenceScoreReviewEnabled?: boolean;
8
9
  isLargeFile: boolean;
9
10
  isLoading: boolean;
10
11
  onAutofill?: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
12
+ onToggleReviewFilter?: () => void;
13
+ shouldShowOnlyReviewFields?: boolean;
11
14
  templateName?: string;
12
15
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "1.48.0",
3
+ "version": "1.49.0",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/box-ai-agent-selector": "^1.38.0",
7
7
  "@box/blueprint-web": "^13.3.0",
8
8
  "@box/blueprint-web-assets": "^4.101.14",
9
- "@box/combobox-with-api": "^1.41.0",
9
+ "@box/combobox-with-api": "^1.41.1",
10
10
  "formik": "^2.0.3",
11
11
  "lodash": "^4.17.15",
12
12
  "react": "^17.0.0 || ^18.0.0",
@@ -1 +0,0 @@
1
- ._inlineNotice_j1wao_1{padding-top:var(--space-4)}