@box/metadata-editor 0.92.0 → 0.92.2

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 (48) hide show
  1. package/chunks/metadata-instance-form-card-wrapper.js +43 -40
  2. package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +30 -27
  3. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +93 -85
  4. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +11 -11
  5. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +3 -11
  6. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +33 -42
  7. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.js +22 -0
  8. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js +46 -0
  9. package/i18n/bn-IN.js +7 -3
  10. package/i18n/da-DK.js +7 -3
  11. package/i18n/de-DE.js +7 -3
  12. package/i18n/en-AU.js +7 -3
  13. package/i18n/en-CA.js +7 -3
  14. package/i18n/en-GB.js +7 -3
  15. package/i18n/en-US.js +4 -2
  16. package/i18n/en-US.properties +8 -4
  17. package/i18n/en-x-pseudo.js +7 -3
  18. package/i18n/es-419.js +7 -3
  19. package/i18n/es-ES.js +7 -3
  20. package/i18n/fi-FI.js +7 -3
  21. package/i18n/fr-CA.js +7 -3
  22. package/i18n/fr-FR.js +7 -3
  23. package/i18n/hi-IN.js +7 -3
  24. package/i18n/it-IT.js +7 -3
  25. package/i18n/ja-JP.js +7 -3
  26. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.json +1 -1
  27. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.json +1 -0
  28. package/i18n/ko-KR.js +7 -3
  29. package/i18n/nb-NO.js +7 -3
  30. package/i18n/nl-NL.js +7 -3
  31. package/i18n/pl-PL.js +7 -3
  32. package/i18n/pt-BR.js +7 -3
  33. package/i18n/ru-RU.js +7 -3
  34. package/i18n/sv-SE.js +7 -3
  35. package/i18n/tr-TR.js +7 -3
  36. package/i18n/zh-CN.js +7 -3
  37. package/i18n/zh-TW.js +7 -3
  38. package/package.json +2 -2
  39. package/styles/autofill-overlay.css +1 -1
  40. package/styles/metadata-instance-form-card-wrapper.css +1 -1
  41. package/styles/metadata-instance-form-footer.css +1 -1
  42. package/styles/metadata-instance-form-inline-notice.css +1 -0
  43. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -0
  44. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.d.ts +0 -10
  45. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +1 -1
  46. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +1 -0
  47. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.d.ts +23 -0
  48. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.d.ts +5 -0
@@ -1,56 +1,59 @@
1
- import C from "clsx";
1
+ import y from "clsx";
2
2
  import { Card as S } from "@box/blueprint-web";
3
- import { TEMPLATE_CUSTOM_PROPERTIES as A } from "../esm/lib/constants.js";
4
- import { MetadataInstanceFormFooter as E } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js";
5
- import { MetadataInstanceFormHeader as M } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
- import { jsx as e, jsxs as b } from "react/jsx-runtime";
7
- import '../styles/metadata-instance-form-card-wrapper.css';const y = "_metadataInstanceForm_6uz9p_1", D = "_wrapperGradient_6uz9p_7", I = "_suggestionsFetching_6uz9p_12", N = "_metadataInstanceFormContent_6uz9p_18", s = {
8
- metadataInstanceForm: y,
9
- wrapperGradient: D,
10
- suggestionsFetching: I,
11
- metadataInstanceFormContent: N
12
- }, R = (n) => {
3
+ import { TEMPLATE_CUSTOM_PROPERTIES as w } from "../esm/lib/constants.js";
4
+ import { MetadataInstanceFormFooter as A } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js";
5
+ import { MetadataInstanceFormHeader as E } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
+ import { jsx as t, jsxs as M } from "react/jsx-runtime";
7
+ import '../styles/metadata-instance-form-card-wrapper.css';const b = "_metadataInstanceForm_1ae95_1", v = "_wrapperGradient_1ae95_7", D = "_suggestionsFetching_1ae95_12", I = "_metadataInstanceFormContent_1ae95_18", L = "_showOverlay_1ae95_25", s = {
8
+ metadataInstanceForm: b,
9
+ wrapperGradient: v,
10
+ suggestionsFetching: D,
11
+ metadataInstanceFormContent: I,
12
+ showOverlay: L
13
+ }, j = (n) => {
13
14
  const {
14
15
  areAiSuggestionsAvailable: o,
15
16
  children: r,
16
17
  className: i,
17
- formRef: m,
18
- isAiSuggestionsFeatureEnabled: g,
18
+ formRef: g,
19
+ isAiSuggestionsFeatureEnabled: m,
19
20
  isBetaLanguageEnabled: d,
20
- isDeleteButtonDisabled: c,
21
- suggestions: u,
22
- isFetchingSuggestions: a,
23
- isFormDirty: p = !1,
24
- selectedTemplateInstance: t,
25
- getAiSuggestions: l,
26
- handleCancel: F,
27
- handleDelete: _
28
- } = n, f = (t == null ? void 0 : t.templateKey) === A, h = !!u[t == null ? void 0 : t.templateKey];
29
- return /* @__PURE__ */ e("div", {
30
- className: a && s.wrapperGradient,
31
- children: /* @__PURE__ */ b(S, {
32
- ref: m,
33
- className: C(i, {
34
- [s.suggestionsFetching]: a
21
+ isLargeFile: c,
22
+ isDeleteButtonDisabled: l,
23
+ suggestions: F,
24
+ isFetchingSuggestions: e,
25
+ isFormDirty: u = !1,
26
+ selectedTemplateInstance: a,
27
+ getAiSuggestions: _,
28
+ handleCancel: p,
29
+ handleDelete: h
30
+ } = n, f = (a == null ? void 0 : a.templateKey) === w, C = !!F[a == null ? void 0 : a.templateKey];
31
+ return /* @__PURE__ */ t("div", {
32
+ className: e && s.wrapperGradient,
33
+ children: /* @__PURE__ */ M(S, {
34
+ ref: g,
35
+ className: y(i, {
36
+ [s.suggestionsFetching]: e
35
37
  }),
36
- children: [/* @__PURE__ */ e(M, {
38
+ children: [/* @__PURE__ */ t(E, {
37
39
  areAiSuggestionsAvailable: o,
38
- hasSuggestions: h,
39
- isAiSuggestionsFeatureEnabled: g && !f,
40
+ hasSuggestions: C,
41
+ isAiSuggestionsFeatureEnabled: m && !f,
40
42
  isBetaLanguageEnabled: d,
41
- isLoading: a,
42
- onAutofill: l,
43
- templateName: t == null ? void 0 : t.displayName
44
- }), t && r, /* @__PURE__ */ e(E, {
45
- isDeleteButtonDisabled: c,
46
- isLoading: a,
47
- onCancel: () => F(p),
48
- onDelete: _
43
+ isLargeFile: c,
44
+ isLoading: e,
45
+ onAutofill: _,
46
+ templateName: a == null ? void 0 : a.displayName
47
+ }), a && r, /* @__PURE__ */ t(A, {
48
+ isDeleteButtonDisabled: l,
49
+ isLoading: e,
50
+ onCancel: () => p(u),
51
+ onDelete: h
49
52
  })]
50
53
  })
51
54
  });
52
55
  };
53
56
  export {
54
- R as M,
57
+ j as M,
55
58
  s
56
59
  };
@@ -1,50 +1,53 @@
1
1
  import { useState as d } from "react";
2
- import { LoadingIndicator as v, Text as n, TextButton as g } from "@box/blueprint-web";
3
- import { u as p } from "../../../../../../chunks/index.js";
4
- import { AlertTriangle as y } from "@box/blueprint-web-assets/icons/Line";
5
- import { SurfaceStatusSurfaceError as _, Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
2
+ import { LoadingIndicator as y, Text as n, TextButton as g } from "@box/blueprint-web";
3
+ import { u as v } from "../../../../../../chunks/index.js";
4
+ import { AlertTriangle as _ } from "@box/blueprint-web-assets/icons/Line";
5
+ import { SurfaceStatusSurfaceError as p, Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
6
+ import h from "clsx";
6
7
  import e from "./messages.js";
7
- import { jsxs as O, jsx as i } from "react/jsx-runtime";
8
- import '../../../../../../styles/autofill-overlay.css';const T = "_autofillOverlay_vvkb0_1", b = "_autofillOverlayTitle_vvkb0_15", S = "_dismissButton_vvkb0_20", h = "_loadingIcon_vvkb0_24", B = "_testContainerStyle_vvkb0_29", s = {
9
- autofillOverlay: T,
10
- autofillOverlayTitle: b,
11
- dismissButton: S,
12
- loadingIcon: h,
13
- testContainerStyle: B
8
+ import { jsxs as b, jsx as i } from "react/jsx-runtime";
9
+ import '../../../../../../styles/autofill-overlay.css';const O = "_autofillOverlay_15bqk_1", T = "_withError_15bqk_15", S = "_autofillOverlayTitle_15bqk_19", x = "_dismissButton_15bqk_24", B = "_overlayIcon_15bqk_28", I = "_testContainerStyle_15bqk_34", a = {
10
+ autofillOverlay: O,
11
+ withError: T,
12
+ autofillOverlayTitle: S,
13
+ dismissButton: x,
14
+ overlayIcon: B,
15
+ testContainerStyle: I
14
16
  }, A = ({
15
- errorCode: a,
17
+ errorCode: s,
16
18
  isFetchingSuggestions: c,
17
- isLongLoading: o
19
+ isLongLoading: l
18
20
  }) => {
19
- const t = p(), [f, u] = d(!1);
20
- let l = t.formatMessage(e.defaultLoadingMessage);
21
- a && (l = t.formatMessage(e.errorTitle)), o && (l = t.formatMessage(e.longLoadingTitle));
22
- const r = o ? t.formatMessage(e.longLoadingDescription) : a && t.formatMessage(e.errorDescription);
23
- return !c && !a || f ? null : /* @__PURE__ */ O("div", {
24
- className: s.autofillOverlay,
25
- children: [a ? /* @__PURE__ */ i(y, {
26
- color: _,
21
+ const t = v(), [f, u] = d(!1);
22
+ let o = t.formatMessage(e.defaultLoadingMessage);
23
+ s && (o = t.formatMessage(e.errorTitle)), l && (o = t.formatMessage(e.longLoadingTitle));
24
+ const r = l ? t.formatMessage(e.longLoadingDescription) : s && t.formatMessage(e.errorDescription);
25
+ return !c && !s || f ? null : /* @__PURE__ */ b("div", {
26
+ className: h(a.autofillOverlay, s && a.withError),
27
+ children: [s ? /* @__PURE__ */ i(_, {
28
+ className: a.overlayIcon,
29
+ color: p,
27
30
  height: m,
28
31
  role: "presentation",
29
32
  width: m
30
- }) : /* @__PURE__ */ i(v, {
33
+ }) : /* @__PURE__ */ i(y, {
31
34
  "aria-label": t.formatMessage(e.loadingAriaLabel),
32
35
  "aria-live": "polite",
33
- className: s.loadingIcon,
36
+ className: a.overlayIcon,
34
37
  size: "large",
35
38
  variant: "default"
36
39
  }), /* @__PURE__ */ i(n, {
37
40
  as: "p",
38
- className: s.autofillOverlayTitle,
41
+ className: a.autofillOverlayTitle,
39
42
  variant: "subtitle",
40
- children: l
43
+ children: o
41
44
  }), r && /* @__PURE__ */ i(n, {
42
45
  as: "p",
43
46
  color: "textOnLightSecondary",
44
47
  variant: "bodyDefault",
45
48
  children: r
46
- }), a && /* @__PURE__ */ i(g, {
47
- className: s.dismissButton,
49
+ }), s && /* @__PURE__ */ i(g, {
50
+ className: a.dismissButton,
48
51
  onClick: () => u(!0),
49
52
  "data-target-id": "TextButton-dismissButton",
50
53
  children: t.formatMessage(e.dismissButton)
@@ -1,113 +1,121 @@
1
1
  import { Formik as _, Form as $ } from "formik";
2
- import { useState as p, useEffect as C, useRef as w, useMemo as J } from "react";
3
- import { TEMPLATE_CUSTOM_PROPERTIES as q } from "../../../../constants.js";
4
- import { AutofillOverlay as z } from "../autofill-overlay/autofill-overlay.js";
5
- import { useAutofill as G } from "../../../../utils/autofill-context.js";
6
- import { TemplateInstance as H } from "../../../metadata-editor-fields/metadata-editor-fields.js";
7
- import { MetadataEmptyState as Q } from "../../../metadata-empty-state/metadata-empty-state.js";
8
- import { UnsavedChangesModal as X } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
9
- import { CustomInstance as Y } from "../custom-instance/custom-instance.js";
10
- import { DeleteConfirmationModal as Z } from "../delete-confirmation-modal/delete-confirmation-modal.js";
11
- import { c as I } from "../../../../../../chunks/utils.js";
12
- import { s as h, M as T } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
13
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
14
- const po = (M) => {
2
+ import { useState as C, useEffect as F, useRef as J, useMemo as q } from "react";
3
+ import z from "clsx";
4
+ import { TEMPLATE_CUSTOM_PROPERTIES as G } from "../../../../constants.js";
5
+ import { AutofillOverlay as H } from "../autofill-overlay/autofill-overlay.js";
6
+ import { useAutofill as Q } from "../../../../utils/autofill-context.js";
7
+ import { TemplateInstance as X } from "../../../metadata-editor-fields/metadata-editor-fields.js";
8
+ import { MetadataEmptyState as Y } from "../../../metadata-empty-state/metadata-empty-state.js";
9
+ import { UnsavedChangesModal as Z } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
10
+ import { CustomInstance as I } from "../custom-instance/custom-instance.js";
11
+ import { DeleteConfirmationModal as T } from "../delete-confirmation-modal/delete-confirmation-modal.js";
12
+ import { c as oo } from "../../../../../../chunks/utils.js";
13
+ import { s as e, M as to } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
14
+ import { jsx as r, jsxs as M } from "react/jsx-runtime";
15
+ const Co = (E) => {
15
16
  const {
16
- areAiSuggestionsAvailable: E,
17
+ areAiSuggestionsAvailable: S,
17
18
  customRef: i,
18
- errorCode: F,
19
- isAiSuggestionsFeatureEnabled: n,
20
- isBetaLanguageEnabled: S,
21
- isDeleteButtonDisabled: y,
22
- isUnsavedChangesModalOpen: D = !1,
23
- MetadataInstanceFormCustomWrapper: b,
19
+ isLargeFile: y,
20
+ errorCode: m,
21
+ isAiSuggestionsFeatureEnabled: s,
22
+ isBetaLanguageEnabled: D,
23
+ isDeleteButtonDisabled: O,
24
+ isUnsavedChangesModalOpen: b = !1,
25
+ MetadataInstanceFormCustomWrapper: v,
24
26
  selectedTemplateInstance: o,
25
- onCancel: O,
26
- onDelete: A,
27
- onDiscardUnsavedChanges: v,
28
- onSubmit: x,
29
- setIsUnsavedChangesModalOpen: s,
30
- taxonomyOptionsFetcher: e
31
- } = M, L = b ?? T, [N, m] = p(!1), {
27
+ onCancel: A,
28
+ onDelete: x,
29
+ onDiscardUnsavedChanges: L,
30
+ onSubmit: N,
31
+ setIsUnsavedChangesModalOpen: l,
32
+ taxonomyOptionsFetcher: f
33
+ } = E, P = v ?? to, [R, u] = C(!1), {
32
34
  isFetchingSuggestions: a,
33
- isLongLoading: l,
34
- getAiSuggestions: P,
35
- clearSuggestions: u,
36
- suggestions: R
37
- } = G();
38
- C(() => () => {
39
- u();
40
- }, [u]);
41
- const f = (o == null ? void 0 : o.templateKey) === q, U = async (t) => {
42
- await x(t, I(t, o));
43
- }, B = (t) => {
44
- t ? s(!0) : O();
45
- }, K = () => {
46
- m(!0);
47
- }, W = {
35
+ isLongLoading: g,
36
+ getAiSuggestions: U,
37
+ clearSuggestions: d,
38
+ suggestions: B
39
+ } = Q();
40
+ F(() => () => {
41
+ d();
42
+ }, [d]);
43
+ const p = (o == null ? void 0 : o.templateKey) === G, w = async (t) => {
44
+ await N(t, oo(t, o));
45
+ }, K = (t) => {
46
+ t ? l(!0) : A();
47
+ }, W = () => {
48
+ u(!0);
49
+ }, j = {
48
50
  metadata: {
49
51
  ...o
50
52
  }
51
- }, g = w(null), [d, j] = p(null);
52
- C(() => {
53
- j(i ?? g.current);
53
+ }, h = J(null), [c, k] = C(null);
54
+ F(() => {
55
+ k(i ?? h.current);
54
56
  }, [i, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
55
- const k = J(() => {
57
+ const V = q(() => {
56
58
  const t = (o == null ? void 0 : o.fields.length) === 0;
57
- return f ? /* @__PURE__ */ r(Y, {
58
- isLoading: a
59
- }) : t ? /* @__PURE__ */ r(Q, {
60
- isBoxAiSuggestionsFeatureEnabled: n,
61
- level: "instance"
62
- }) : /* @__PURE__ */ c("div", {
63
- className: h.metadataInstanceFormContent,
64
- children: [/* @__PURE__ */ r(z, {
65
- errorCode: F,
59
+ if (p)
60
+ return /* @__PURE__ */ r(I, {
61
+ isLoading: a
62
+ });
63
+ if (t)
64
+ return /* @__PURE__ */ r(Y, {
65
+ isBoxAiSuggestionsFeatureEnabled: s,
66
+ level: "instance"
67
+ });
68
+ const n = !!(a || m);
69
+ return /* @__PURE__ */ M("div", {
70
+ className: z(e.metadataInstanceFormContent, n && e.showOverlay),
71
+ children: [/* @__PURE__ */ r(H, {
72
+ errorCode: m,
66
73
  isFetchingSuggestions: a,
67
- isLongLoading: l
68
- }), /* @__PURE__ */ r(H, {
74
+ isLongLoading: g
75
+ }), /* @__PURE__ */ r(X, {
69
76
  disableForm: a,
70
- portalElement: i ?? d,
71
- taxonomyOptionsFetcher: e
77
+ portalElement: i ?? c,
78
+ taxonomyOptionsFetcher: f
72
79
  })]
73
80
  });
74
- }, [o == null ? void 0 : o.fields.length, f, a, l, i, d, e, n]);
81
+ }, [o == null ? void 0 : o.fields.length, p, a, g, i, c, f, s]);
75
82
  return /* @__PURE__ */ r(_, {
76
- initialValues: W,
77
- onSubmit: U,
83
+ initialValues: j,
84
+ onSubmit: w,
78
85
  children: ({
79
86
  values: t,
80
- dirty: V
81
- }) => /* @__PURE__ */ c($, {
82
- children: [/* @__PURE__ */ r(L, {
83
- areAiSuggestionsAvailable: E,
84
- className: h.metadataInstanceForm,
85
- formRef: g,
87
+ dirty: n
88
+ }) => /* @__PURE__ */ M($, {
89
+ children: [/* @__PURE__ */ r(P, {
90
+ areAiSuggestionsAvailable: S,
91
+ className: e.metadataInstanceForm,
92
+ formRef: h,
86
93
  formValues: t,
87
- getAiSuggestions: P,
88
- handleCancel: B,
89
- handleDelete: K,
90
- isAiSuggestionsFeatureEnabled: n,
91
- isBetaLanguageEnabled: S,
92
- isDeleteButtonDisabled: y,
94
+ getAiSuggestions: U,
95
+ handleCancel: K,
96
+ handleDelete: W,
97
+ isAiSuggestionsFeatureEnabled: s,
98
+ isBetaLanguageEnabled: D,
99
+ isDeleteButtonDisabled: O,
93
100
  isFetchingSuggestions: a,
94
- isFormDirty: V,
101
+ isFormDirty: n,
102
+ isLargeFile: y,
95
103
  selectedTemplateInstance: o,
96
- suggestions: R,
97
- children: o && k
98
- }), /* @__PURE__ */ r(X, {
99
- onBackToEdit: () => s(!1),
100
- onDiscardChanges: v,
101
- open: D
104
+ suggestions: B,
105
+ children: o && V
102
106
  }), /* @__PURE__ */ r(Z, {
103
- onConfirm: () => A(o),
104
- onDismiss: () => m(!1),
105
- open: N,
107
+ onBackToEdit: () => l(!1),
108
+ onDiscardChanges: L,
109
+ open: b
110
+ }), /* @__PURE__ */ r(T, {
111
+ onConfirm: () => x(o),
112
+ onDismiss: () => u(!1),
113
+ open: R,
106
114
  templateName: o == null ? void 0 : o.displayName
107
115
  })]
108
116
  })
109
117
  }, `${o == null ? void 0 : o.scope}.${o == null ? void 0 : o.templateKey}`);
110
118
  };
111
119
  export {
112
- po as MetadataInstanceForm
120
+ Co as MetadataInstanceForm
113
121
  };
@@ -1,9 +1,9 @@
1
- import { TextButton as b, Button as r } from "@box/blueprint-web";
2
- import { useFormikContext as g } from "formik";
1
+ import { TextButton as g, Button as r } from "@box/blueprint-web";
2
+ import { useFormikContext as b } from "formik";
3
3
  import { u as B } from "../../../../../../chunks/index.js";
4
4
  import o from "./messages.js";
5
5
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
6
- import '../../../../../../styles/metadata-instance-form-footer.css';const F = "_metadataInstanceFormFooter_17478_1", f = "_buttonsContainer_17478_8", _ = "_buttons_17478_8", n = {
6
+ import '../../../../../../styles/metadata-instance-form-footer.css';const F = "_metadataInstanceFormFooter_15nrg_1", f = "_buttonsContainer_15nrg_7", _ = "_buttons_15nrg_7", a = {
7
7
  metadataInstanceFormFooter: F,
8
8
  buttonsContainer: f,
9
9
  buttons: _
@@ -16,27 +16,27 @@ import '../../../../../../styles/metadata-instance-form-footer.css';const F = "_
16
16
  const t = B(), {
17
17
  isSubmitting: s,
18
18
  submitForm: u
19
- } = g(), a = m || s;
19
+ } = b(), n = m || s;
20
20
  return /* @__PURE__ */ e("div", {
21
- className: n.metadataInstanceFormFooter,
21
+ className: a.metadataInstanceFormFooter,
22
22
  children: /* @__PURE__ */ i("div", {
23
- className: n.buttonsContainer,
24
- children: [/* @__PURE__ */ e(b, {
25
- disabled: a || d,
23
+ className: a.buttonsContainer,
24
+ children: [/* @__PURE__ */ e(g, {
25
+ disabled: n || d,
26
26
  onClick: l,
27
27
  "data-target-id": "TextButton-deleteButton",
28
28
  children: t.formatMessage(o.deleteButton)
29
29
  }), /* @__PURE__ */ i("div", {
30
- className: n.buttons,
30
+ className: a.buttons,
31
31
  children: [/* @__PURE__ */ e(r, {
32
- disabled: a,
32
+ disabled: n,
33
33
  onClick: c,
34
34
  size: "large",
35
35
  variant: "secondary",
36
36
  "data-target-id": "Button-cancelButton",
37
37
  children: t.formatMessage(o.cancelButton)
38
38
  }), /* @__PURE__ */ e(r, {
39
- disabled: a,
39
+ disabled: n,
40
40
  loading: s,
41
41
  loadingAriaLabel: t.formatMessage(o.loadingAriaLabel),
42
42
  onClick: u,
@@ -1,18 +1,10 @@
1
- import { d as e } from "../../../../../../chunks/index.js";
2
- const t = e({
1
+ import { d as a } from "../../../../../../chunks/index.js";
2
+ const e = a({
3
3
  customInstanceTitle: {
4
4
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.customInstanceTitle",
5
5
  defaultMessage: "Custom Metadata"
6
- },
7
- aiSuggestionNoticeHeader: {
8
- id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.aiSuggestionNoticeHeader",
9
- defaultMessage: "AI Autofill is in Beta"
10
- },
11
- aiSuggestionNoticeBody: {
12
- id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.aiSuggestionNoticeBody",
13
- defaultMessage: "Please check responses before saving."
14
6
  }
15
7
  });
16
8
  export {
17
- t as default
9
+ e as default
18
10
  };
@@ -1,50 +1,41 @@
1
- import { u as p } from "../../../../../../chunks/index.js";
2
- import { InlineNotice as g, Text as s } from "@box/blueprint-web";
3
- import h from "../../../interactive-header-text/interactive-header-text.js";
4
- import { MetadataInstanceFormAutofillButton as H } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
5
- import e from "./messages.js";
6
- import { jsxs as a, Fragment as x, jsx as o } from "react/jsx-runtime";
7
- import '../../../../../../styles/metadata-instance-form-header.css';const F = "_metadataInstanceFormHeader_13lxr_1", N = "_title_13lxr_9", i = {
8
- metadataInstanceFormHeader: F,
1
+ import { u as F } from "../../../../../../chunks/index.js";
2
+ import p from "../../../interactive-header-text/interactive-header-text.js";
3
+ import { MetadataInstanceFormAutofillButton as x } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
4
+ import H from "./messages.js";
5
+ import { MetadataInstanceFormInlineNotice as _ } from "../metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js";
6
+ import { jsxs as r, Fragment as u, jsx as t } from "react/jsx-runtime";
7
+ import '../../../../../../styles/metadata-instance-form-header.css';const M = "_metadataInstanceFormHeader_13lxr_1", N = "_title_13lxr_9", o = {
8
+ metadataInstanceFormHeader: M,
9
9
  title: N
10
- }, j = ({
11
- areAiSuggestionsAvailable: r,
12
- hasSuggestions: m,
13
- isAiSuggestionsFeatureEnabled: c,
14
- isBetaLanguageEnabled: n,
15
- isLoading: l,
16
- templateName: d,
17
- onAutofill: f
10
+ }, k = ({
11
+ areAiSuggestionsAvailable: e,
12
+ hasSuggestions: n,
13
+ isAiSuggestionsFeatureEnabled: m,
14
+ isBetaLanguageEnabled: a,
15
+ isLargeFile: s,
16
+ isLoading: c,
17
+ templateName: i,
18
+ onAutofill: l
18
19
  }) => {
19
- const t = p(), I = d ?? t.formatMessage(e.customInstanceTitle), u = m && r && n;
20
- return /* @__PURE__ */ a(x, {
21
- children: [/* @__PURE__ */ a("div", {
22
- className: i.metadataInstanceFormHeader,
23
- children: [/* @__PURE__ */ o(h, {
24
- className: i.title,
20
+ const d = F(), I = i ?? d.formatMessage(H.customInstanceTitle), f = n && e;
21
+ return /* @__PURE__ */ r(u, {
22
+ children: [/* @__PURE__ */ r("div", {
23
+ className: o.metadataInstanceFormHeader,
24
+ children: [/* @__PURE__ */ t(p, {
25
+ className: o.title,
25
26
  title: I
26
- }), c ? /* @__PURE__ */ o(H, {
27
- areAiSuggestionsAvailable: r,
28
- isBetaLanguageEnabled: n,
29
- isLoading: l,
30
- onAutofill: f
27
+ }), m ? /* @__PURE__ */ t(x, {
28
+ areAiSuggestionsAvailable: e,
29
+ isBetaLanguageEnabled: a,
30
+ isLoading: c,
31
+ onAutofill: l
31
32
  }) : null]
32
- }), u ? /* @__PURE__ */ o("div", {
33
- children: /* @__PURE__ */ a(g, {
34
- variant: "info",
35
- variantIconAriaLabel: t.formatMessage(e.aiSuggestionNoticeHeader),
36
- children: [/* @__PURE__ */ o(s, {
37
- as: "p",
38
- variant: "bodyDefaultBold",
39
- children: t.formatMessage(e.aiSuggestionNoticeHeader)
40
- }), /* @__PURE__ */ a(s, {
41
- as: "p",
42
- children: [t.formatMessage(e.aiSuggestionNoticeBody), " "]
43
- })]
44
- })
45
- }) : null]
33
+ }), f && /* @__PURE__ */ t(_, {
34
+ isBetaLanguageEnabled: a,
35
+ isLargeFile: s
36
+ })]
46
37
  });
47
38
  };
48
39
  export {
49
- j as MetadataInstanceFormHeader
40
+ k as MetadataInstanceFormHeader
50
41
  };
@@ -0,0 +1,22 @@
1
+ import { d as e } from "../../../../../../chunks/index.js";
2
+ const t = e({
3
+ autofillInBetaNoticeHeader: {
4
+ id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeHeader",
5
+ defaultMessage: "AI Autofill is in Beta"
6
+ },
7
+ autofillInBetaNoticeBody: {
8
+ id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeBody",
9
+ defaultMessage: "Please check responses before saving."
10
+ },
11
+ largeFileNoticeHeader: {
12
+ id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeHeader",
13
+ defaultMessage: "Text content is too large"
14
+ },
15
+ largeFileNoticeBody: {
16
+ id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeBody",
17
+ defaultMessage: "Box AI won’t be able to access the full text, which may impact metadata values"
18
+ }
19
+ });
20
+ export {
21
+ t as default
22
+ };
@@ -0,0 +1,46 @@
1
+ import { u as c } from "../../../../../../chunks/index.js";
2
+ import { InlineNotice as l, Text as t } from "@box/blueprint-web";
3
+ import a from "./messages.js";
4
+ import { jsxs as i, 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 = ({
8
+ isLargeFile: o,
9
+ isBetaLanguageEnabled: r
10
+ }) => {
11
+ const e = c();
12
+ return !r && !o ? null : /* @__PURE__ */ i(d, {
13
+ children: [o && /* @__PURE__ */ n("div", {
14
+ className: s.inlineNotice,
15
+ children: /* @__PURE__ */ i(l, {
16
+ variant: "warning",
17
+ variantIconAriaLabel: e.formatMessage(a.largeFileNoticeHeader),
18
+ children: [/* @__PURE__ */ n(t, {
19
+ as: "p",
20
+ variant: "bodyDefaultBold",
21
+ children: e.formatMessage(a.largeFileNoticeHeader)
22
+ }), /* @__PURE__ */ i(t, {
23
+ as: "p",
24
+ children: [e.formatMessage(a.largeFileNoticeBody), " "]
25
+ })]
26
+ })
27
+ }), r && /* @__PURE__ */ n("div", {
28
+ className: s.inlineNotice,
29
+ children: /* @__PURE__ */ i(l, {
30
+ variant: "info",
31
+ variantIconAriaLabel: e.formatMessage(a.autofillInBetaNoticeHeader),
32
+ children: [/* @__PURE__ */ n(t, {
33
+ as: "p",
34
+ variant: "bodyDefaultBold",
35
+ children: e.formatMessage(a.autofillInBetaNoticeHeader)
36
+ }), /* @__PURE__ */ i(t, {
37
+ as: "p",
38
+ children: [e.formatMessage(a.autofillInBetaNoticeBody), " "]
39
+ })]
40
+ })
41
+ })]
42
+ });
43
+ };
44
+ export {
45
+ p as MetadataInstanceFormInlineNotice
46
+ };