@box/metadata-editor 0.86.1 → 0.87.1

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 (49) hide show
  1. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.js +31 -29
  2. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +62 -60
  3. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +6 -2
  4. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +34 -33
  5. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +32 -30
  6. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +21 -20
  7. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +4 -0
  8. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +20 -19
  9. package/i18n/bn-IN.js +2 -0
  10. package/i18n/da-DK.js +2 -0
  11. package/i18n/de-DE.js +2 -0
  12. package/i18n/en-AU.js +2 -0
  13. package/i18n/en-CA.js +2 -0
  14. package/i18n/en-GB.js +2 -0
  15. package/i18n/en-US.js +2 -0
  16. package/i18n/en-US.properties +4 -0
  17. package/i18n/en-x-pseudo.js +113 -111
  18. package/i18n/en-x-pseudo.properties +111 -111
  19. package/i18n/es-419.js +2 -0
  20. package/i18n/es-ES.js +2 -0
  21. package/i18n/fi-FI.js +2 -0
  22. package/i18n/fr-CA.js +2 -0
  23. package/i18n/fr-FR.js +2 -0
  24. package/i18n/hi-IN.js +2 -0
  25. package/i18n/it-IT.js +2 -0
  26. package/i18n/ja-JP.js +6 -4
  27. package/i18n/ja-JP.properties +4 -4
  28. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.json +1 -1
  29. package/i18n/json/src/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.json +1 -1
  30. package/i18n/ko-KR.js +2 -0
  31. package/i18n/nb-NO.js +2 -0
  32. package/i18n/nl-NL.js +2 -0
  33. package/i18n/pl-PL.js +2 -0
  34. package/i18n/pt-BR.js +2 -0
  35. package/i18n/ru-RU.js +2 -0
  36. package/i18n/sv-SE.js +2 -0
  37. package/i18n/tr-TR.js +2 -0
  38. package/i18n/zh-CN.js +2 -0
  39. package/i18n/zh-TW.js +2 -0
  40. package/package.json +2 -2
  41. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -0
  42. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.d.ts +5 -0
  43. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.d.ts +1 -1
  44. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/types.d.ts +1 -0
  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-list/subcomponents/metadata-instance-header/messages.d.ts +5 -0
  48. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.d.ts +1 -1
  49. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/types.d.ts +1 -0
@@ -1,42 +1,44 @@
1
- import { Card as A } from "@box/blueprint-web";
1
+ import { Card as E } from "@box/blueprint-web";
2
2
  import { TEMPLATE_CUSTOM_PROPERTIES as h } from "../../../../constants.js";
3
3
  import { MetadataInstanceFormFooter as C } from "../metadata-instance-form-footer/metadata-instance-form-footer.js";
4
- import { MetadataInstanceFormHeader as E } from "../metadata-instance-form-header/metadata-instance-form-header.js";
5
- import { jsxs as M, jsx as a } from "react/jsx-runtime";
6
- const L = (t) => {
4
+ import { MetadataInstanceFormHeader as M } from "../metadata-instance-form-header/metadata-instance-form-header.js";
5
+ import { jsxs as b, jsx as i } from "react/jsx-runtime";
6
+ const N = (t) => {
7
7
  const {
8
- areAiSuggestionsAvailable: r,
9
- children: e,
8
+ areAiSuggestionsAvailable: e,
9
+ children: r,
10
10
  className: s,
11
11
  formRef: n,
12
12
  isAiSuggestionsFeatureEnabled: g,
13
- isDeleteButtonDisabled: m,
14
- suggestions: u,
15
- isFetchingSuggestions: i,
16
- isFormDirty: d = !1,
17
- selectedTemplateInstance: o,
18
- getAiSuggestions: l,
19
- handleCancel: f,
20
- handleDelete: F
21
- } = t, S = (o == null ? void 0 : o.templateKey) === h, p = !!u[o == null ? void 0 : o.templateKey];
22
- return /* @__PURE__ */ M(A, {
13
+ iaBetaLanguageEnabled: m,
14
+ isDeleteButtonDisabled: u,
15
+ suggestions: d,
16
+ isFetchingSuggestions: o,
17
+ isFormDirty: l = !1,
18
+ selectedTemplateInstance: a,
19
+ getAiSuggestions: f,
20
+ handleCancel: F,
21
+ handleDelete: S
22
+ } = t, p = (a == null ? void 0 : a.templateKey) === h, A = !!d[a == null ? void 0 : a.templateKey];
23
+ return /* @__PURE__ */ b(E, {
23
24
  ref: n,
24
25
  className: s,
25
- children: [/* @__PURE__ */ a(E, {
26
- areAiSuggestionsAvailable: r,
27
- hasSuggestions: p,
28
- isAiSuggestionsFeatureEnabled: g && !S,
29
- isLoading: i,
30
- onAutofill: l,
31
- templateName: o == null ? void 0 : o.displayName
32
- }), o && e, /* @__PURE__ */ a(C, {
33
- isDeleteButtonDisabled: m,
34
- isLoading: i,
35
- onCancel: () => f(d),
36
- onDelete: F
26
+ children: [/* @__PURE__ */ i(M, {
27
+ areAiSuggestionsAvailable: e,
28
+ hasSuggestions: A,
29
+ iaBetaLanguageEnabled: m,
30
+ isAiSuggestionsFeatureEnabled: g && !p,
31
+ isLoading: o,
32
+ onAutofill: f,
33
+ templateName: a == null ? void 0 : a.displayName
34
+ }), a && r, /* @__PURE__ */ i(C, {
35
+ isDeleteButtonDisabled: u,
36
+ isLoading: o,
37
+ onCancel: () => F(l),
38
+ onDelete: S
37
39
  })]
38
40
  });
39
41
  };
40
42
  export {
41
- L as MetadataInstanceFormCardWrapper
43
+ N as MetadataInstanceFormCardWrapper
42
44
  };
@@ -1,103 +1,105 @@
1
- import { Formik as K, Form as W } from "formik";
1
+ import { Formik as L, Form as W } from "formik";
2
2
  import { useState as d, useEffect as p, useRef as j, useMemo as k } from "react";
3
- import { TEMPLATE_CUSTOM_PROPERTIES as L } from "../../../../constants.js";
4
- import { useAutofill as V } from "../../../../utils/autofill-context.js";
5
- import { TemplateInstance as $ } from "../../../metadata-editor-fields/metadata-editor-fields.js";
6
- import { MetadataEmptyState as w } from "../../../metadata-empty-state/metadata-empty-state.js";
7
- import { UnsavedChangesModal as J } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
8
- import { CustomInstance as q } from "../custom-instance/custom-instance.js";
9
- import { DeleteConfirmationModal as z } from "../delete-confirmation-modal/delete-confirmation-modal.js";
10
- import { c as G } from "../../../../../../chunks/utils.js";
11
- import { MetadataInstanceFormCardWrapper as H } from "./metadata-instance-form-card-wrapper.js";
12
- import { jsx as a, jsxs as Q } from "react/jsx-runtime";
13
- import '../../../../../../styles/metadata-instance-form.css';const X = "_metadataInstanceForm_1hu4u_1", Y = {
14
- metadataInstanceForm: X
15
- }, uo = (c) => {
3
+ import { TEMPLATE_CUSTOM_PROPERTIES as V } from "../../../../constants.js";
4
+ import { useAutofill as $ } from "../../../../utils/autofill-context.js";
5
+ import { TemplateInstance as w } from "../../../metadata-editor-fields/metadata-editor-fields.js";
6
+ import { MetadataEmptyState as J } from "../../../metadata-empty-state/metadata-empty-state.js";
7
+ import { UnsavedChangesModal as q } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
8
+ import { CustomInstance as z } from "../custom-instance/custom-instance.js";
9
+ import { DeleteConfirmationModal as G } from "../delete-confirmation-modal/delete-confirmation-modal.js";
10
+ import { c as H } from "../../../../../../chunks/utils.js";
11
+ import { MetadataInstanceFormCardWrapper as Q } from "./metadata-instance-form-card-wrapper.js";
12
+ import { jsx as a, jsxs as X } from "react/jsx-runtime";
13
+ import '../../../../../../styles/metadata-instance-form.css';const Y = "_metadataInstanceForm_1hu4u_1", Z = {
14
+ metadataInstanceForm: Y
15
+ }, fo = (c) => {
16
16
  const {
17
17
  areAiSuggestionsAvailable: h,
18
18
  customRef: r,
19
- isAiSuggestionsFeatureEnabled: s,
20
- isDeleteButtonDisabled: C,
21
- isUnsavedChangesModalOpen: F = !1,
19
+ isAiSuggestionsFeatureEnabled: i,
20
+ iaBetaLanguageEnabled: C,
21
+ isDeleteButtonDisabled: F,
22
+ isUnsavedChangesModalOpen: E = !1,
22
23
  MetadataInstanceFormCustomWrapper: M,
23
24
  selectedTemplateInstance: o,
24
25
  onCancel: S,
25
- onDelete: E,
26
- onDiscardUnsavedChanges: D,
27
- onSubmit: y,
28
- setIsUnsavedChangesModalOpen: i,
26
+ onDelete: D,
27
+ onDiscardUnsavedChanges: y,
28
+ onSubmit: b,
29
+ setIsUnsavedChangesModalOpen: s,
29
30
  taxonomyOptionsFetcher: e
30
- } = c, b = M ?? H, [O, m] = d(!1), {
31
+ } = c, O = M ?? Q, [A, m] = d(!1), {
31
32
  isFetchingSuggestions: n,
32
- getAiSuggestions: A,
33
+ getAiSuggestions: v,
33
34
  clearSuggestions: u,
34
- suggestions: v
35
- } = V();
35
+ suggestions: x
36
+ } = $();
36
37
  p(() => () => {
37
38
  u();
38
39
  }, [u]);
39
- const f = (o == null ? void 0 : o.templateKey) === L, x = async (t) => {
40
- await y(t, G(t, o));
41
- }, P = (t) => {
42
- t ? i(!0) : S();
43
- }, R = () => {
40
+ const f = (o == null ? void 0 : o.templateKey) === V, P = async (t) => {
41
+ await b(t, H(t, o));
42
+ }, R = (t) => {
43
+ t ? s(!0) : S();
44
+ }, U = () => {
44
45
  m(!0);
45
- }, U = {
46
+ }, _ = {
46
47
  metadata: {
47
48
  ...o
48
49
  }
49
- }, l = j(null), [g, _] = d(null);
50
+ }, l = j(null), [g, B] = d(null);
50
51
  p(() => {
51
- _(r ?? l.current);
52
+ B(r ?? l.current);
52
53
  }, [r, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
53
54
  const N = k(() => {
54
55
  const t = (o == null ? void 0 : o.fields.length) === 0;
55
- return f ? /* @__PURE__ */ a(q, {
56
+ return f ? /* @__PURE__ */ a(z, {
56
57
  isLoading: n
57
- }) : t ? /* @__PURE__ */ a(w, {
58
- isBoxAiSuggestionsFeatureEnabled: s,
58
+ }) : t ? /* @__PURE__ */ a(J, {
59
+ isBoxAiSuggestionsFeatureEnabled: i,
59
60
  level: "instance"
60
- }) : /* @__PURE__ */ a($, {
61
+ }) : /* @__PURE__ */ a(w, {
61
62
  disableForm: n,
62
63
  portalElement: r ?? g,
63
64
  taxonomyOptionsFetcher: e
64
65
  });
65
- }, [o == null ? void 0 : o.fields.length, f, n, r, g, e, s]);
66
- return /* @__PURE__ */ a(K, {
67
- initialValues: U,
68
- onSubmit: x,
66
+ }, [o == null ? void 0 : o.fields.length, f, n, r, g, e, i]);
67
+ return /* @__PURE__ */ a(L, {
68
+ initialValues: _,
69
+ onSubmit: P,
69
70
  children: ({
70
71
  values: t,
71
- dirty: B
72
- }) => /* @__PURE__ */ Q(W, {
73
- children: [/* @__PURE__ */ a(b, {
72
+ dirty: K
73
+ }) => /* @__PURE__ */ X(W, {
74
+ children: [/* @__PURE__ */ a(O, {
74
75
  areAiSuggestionsAvailable: h,
75
- className: Y.metadataInstanceForm,
76
+ className: Z.metadataInstanceForm,
76
77
  formRef: l,
77
78
  formValues: t,
78
- getAiSuggestions: A,
79
- handleCancel: P,
80
- handleDelete: R,
81
- isAiSuggestionsFeatureEnabled: s,
82
- isDeleteButtonDisabled: C,
79
+ getAiSuggestions: v,
80
+ handleCancel: R,
81
+ handleDelete: U,
82
+ iaBetaLanguageEnabled: C,
83
+ isAiSuggestionsFeatureEnabled: i,
84
+ isDeleteButtonDisabled: F,
83
85
  isFetchingSuggestions: n,
84
- isFormDirty: B,
86
+ isFormDirty: K,
85
87
  selectedTemplateInstance: o,
86
- suggestions: v,
88
+ suggestions: x,
87
89
  children: o && N
88
- }), /* @__PURE__ */ a(J, {
89
- onBackToEdit: () => i(!1),
90
- onDiscardChanges: D,
91
- open: F
92
- }), /* @__PURE__ */ a(z, {
93
- onConfirm: () => E(o),
90
+ }), /* @__PURE__ */ a(q, {
91
+ onBackToEdit: () => s(!1),
92
+ onDiscardChanges: y,
93
+ open: E
94
+ }), /* @__PURE__ */ a(G, {
95
+ onConfirm: () => D(o),
94
96
  onDismiss: () => m(!1),
95
- open: O,
97
+ open: A,
96
98
  templateName: o == null ? void 0 : o.displayName
97
99
  })]
98
100
  })
99
101
  }, `${o == null ? void 0 : o.scope}.${o == null ? void 0 : o.templateKey}`);
100
102
  };
101
103
  export {
102
- uo as MetadataInstanceForm
104
+ fo as MetadataInstanceForm
103
105
  };
@@ -1,5 +1,5 @@
1
- import { d as a } from "../../../../../../chunks/index.js";
2
- const e = a({
1
+ import { d as t } from "../../../../../../chunks/index.js";
2
+ const e = t({
3
3
  autofillButton: {
4
4
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButton",
5
5
  defaultMessage: "Autofill"
@@ -12,6 +12,10 @@ const e = a({
12
12
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButtonTooltip",
13
13
  defaultMessage: "Autofill with Box AI (Beta)"
14
14
  },
15
+ autofillButtonTooltipGA: {
16
+ id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButtonTooltipGA",
17
+ defaultMessage: "Autofill with Box AI"
18
+ },
15
19
  loadingButtonAriaLabel: {
16
20
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.loadingButtonAriaLabel",
17
21
  defaultMessage: "Loading..."
@@ -1,65 +1,66 @@
1
- import { LoadingIndicator as M, IconButton as v, Tooltip as L, Button as k } from "@box/blueprint-web";
1
+ import { LoadingIndicator as v, IconButton as L, Tooltip as k, Button as x } from "@box/blueprint-web";
2
2
  import { BoxAiLogo as p } from "@box/blueprint-web-assets/icons/Logo";
3
- import { useFormikContext as x, getIn as i } from "formik";
4
- import { useEffect as K } from "react";
5
- import { u as h } from "../../../../../../chunks/index.js";
6
- import { useAutofill as C } from "../../../../utils/autofill-context.js";
7
- import n from "./messages.js";
3
+ import { useFormikContext as K, getIn as i } from "formik";
4
+ import { useEffect as h } from "react";
5
+ import { u as C } from "../../../../../../chunks/index.js";
6
+ import { useAutofill as F } from "../../../../utils/autofill-context.js";
7
+ import o from "./messages.js";
8
8
  import { jsx as l } from "react/jsx-runtime";
9
- import '../../../../../../styles/metadata-instance-form-autofill-button.css';const F = "_loadingIndicator_1vv9u_1", _ = {
10
- loadingIndicator: F
9
+ import '../../../../../../styles/metadata-instance-form-autofill-button.css';const T = "_loadingIndicator_1vv9u_1", _ = {
10
+ loadingIndicator: T
11
11
  }, w = ({
12
12
  areAiSuggestionsAvailable: B,
13
+ iaBetaLanguageEnabled: b,
13
14
  isLoading: r,
14
- variant: b = "secondary-button",
15
+ variant: A = "secondary-button",
15
16
  onAutofill: I
16
17
  }) => {
17
18
  const {
18
19
  isSubmitting: y,
19
20
  values: e,
20
- setFieldValue: u
21
- } = x(), t = h(), {
22
- suggestions: o
23
- } = C();
24
- K(() => {
25
- if (o) {
26
- const a = i(e, "metadata.fields"), s = i(e, "metadata.templateKey");
27
- u("metadata.fields", a == null ? void 0 : a.map((c) => {
21
+ setFieldValue: c
22
+ } = K(), t = C(), {
23
+ suggestions: a
24
+ } = F();
25
+ h(() => {
26
+ if (a) {
27
+ const n = i(e, "metadata.fields"), s = i(e, "metadata.templateKey");
28
+ c("metadata.fields", n == null ? void 0 : n.map((u) => {
28
29
  var g;
29
- const f = (g = o == null ? void 0 : o[s]) == null ? void 0 : g[c.key];
30
+ const f = (g = a == null ? void 0 : a[s]) == null ? void 0 : g[u.key];
30
31
  return f ? {
31
- ...c,
32
+ ...u,
32
33
  aiSuggestion: f
33
- } : c;
34
+ } : u;
34
35
  }));
35
36
  }
36
- }, [o, u]);
37
+ }, [a, c]);
37
38
  const m = () => {
38
- const a = i(e, "metadata.templateKey"), s = i(e, "metadata.scope");
39
- I(a, s);
40
- }, d = !B || y || r, A = r ? /* @__PURE__ */ l(M, {
41
- "aria-label": t.formatMessage(n.loadingButtonAriaLabel),
39
+ const n = i(e, "metadata.templateKey"), s = i(e, "metadata.scope");
40
+ I(n, s);
41
+ }, d = !B || y || r, M = r ? /* @__PURE__ */ l(v, {
42
+ "aria-label": t.formatMessage(o.loadingButtonAriaLabel),
42
43
  className: _.loadingIndicator
43
- }) : /* @__PURE__ */ l(v, {
44
- "aria-label": t.formatMessage(n.autofillButtonAriaLabel),
44
+ }) : /* @__PURE__ */ l(L, {
45
+ "aria-label": t.formatMessage(o.autofillButtonAriaLabel),
45
46
  disabled: d,
46
47
  icon: p,
47
48
  onClick: m,
48
49
  variant: "icon-logo",
49
50
  "data-target-id": "IconButton-autofillButtonAriaLabel"
50
51
  });
51
- return /* @__PURE__ */ l(L, {
52
- content: t.formatMessage(n.autofillButtonTooltip),
53
- children: b === "secondary-button" ? /* @__PURE__ */ l(k, {
52
+ return /* @__PURE__ */ l(k, {
53
+ content: b ? t.formatMessage(o.autofillButtonTooltip) : t.formatMessage(o.autofillButtonTooltipGA),
54
+ children: A === "secondary-button" ? /* @__PURE__ */ l(x, {
54
55
  disabled: d,
55
56
  icon: p,
56
57
  loading: r,
57
- loadingAriaLabel: t.formatMessage(n.loadingButtonAriaLabel),
58
+ loadingAriaLabel: t.formatMessage(o.loadingButtonAriaLabel),
58
59
  onClick: m,
59
60
  variant: "secondary",
60
61
  "data-target-id": "Button-autofillButton",
61
- children: t.formatMessage(n.autofillButton)
62
- }) : A
62
+ children: t.formatMessage(o.autofillButton)
63
+ }) : M
63
64
  });
64
65
  };
65
66
  export {
@@ -1,41 +1,43 @@
1
- import { u } from "../../../../../../chunks/index.js";
2
- import { InlineNotice as I, Text as o } from "@box/blueprint-web";
3
- import g from "../../../interactive-header-text/interactive-header-text.js";
4
- import { MetadataInstanceFormAutofillButton as p } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
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
5
  import e from "./messages.js";
6
- import { jsxs as a, Fragment as H, jsx as r } from "react/jsx-runtime";
7
- import '../../../../../../styles/metadata-instance-form-header.css';const x = "_metadataInstanceFormHeader_13lxr_1", F = "_title_13lxr_9", s = {
8
- metadataInstanceFormHeader: x,
9
- title: F
10
- }, B = ({
11
- areAiSuggestionsAvailable: n,
12
- hasSuggestions: i,
13
- isAiSuggestionsFeatureEnabled: m,
14
- isLoading: c,
15
- templateName: l,
16
- onAutofill: d
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,
9
+ title: N
10
+ }, j = ({
11
+ areAiSuggestionsAvailable: r,
12
+ hasSuggestions: m,
13
+ isAiSuggestionsFeatureEnabled: c,
14
+ iaBetaLanguageEnabled: n,
15
+ isLoading: l,
16
+ templateName: d,
17
+ onAutofill: f
17
18
  }) => {
18
- const t = u(), f = l ?? t.formatMessage(e.customInstanceTitle);
19
- return /* @__PURE__ */ a(H, {
19
+ const t = p(), I = d ?? t.formatMessage(e.customInstanceTitle), u = m && r && n;
20
+ return /* @__PURE__ */ a(x, {
20
21
  children: [/* @__PURE__ */ a("div", {
21
- className: s.metadataInstanceFormHeader,
22
- children: [/* @__PURE__ */ r(g, {
23
- className: s.title,
24
- title: f
25
- }), m ? /* @__PURE__ */ r(p, {
26
- areAiSuggestionsAvailable: n,
27
- isLoading: c,
28
- onAutofill: d
22
+ className: i.metadataInstanceFormHeader,
23
+ children: [/* @__PURE__ */ o(h, {
24
+ className: i.title,
25
+ title: I
26
+ }), c ? /* @__PURE__ */ o(H, {
27
+ areAiSuggestionsAvailable: r,
28
+ iaBetaLanguageEnabled: n,
29
+ isLoading: l,
30
+ onAutofill: f
29
31
  }) : null]
30
- }), i && n ? /* @__PURE__ */ r("div", {
31
- children: /* @__PURE__ */ a(I, {
32
+ }), u ? /* @__PURE__ */ o("div", {
33
+ children: /* @__PURE__ */ a(g, {
32
34
  variant: "info",
33
35
  variantIconAriaLabel: t.formatMessage(e.aiSuggestionNoticeHeader),
34
- children: [/* @__PURE__ */ r(o, {
36
+ children: [/* @__PURE__ */ o(s, {
35
37
  as: "p",
36
38
  variant: "bodyDefaultBold",
37
39
  children: t.formatMessage(e.aiSuggestionNoticeHeader)
38
- }), /* @__PURE__ */ a(o, {
40
+ }), /* @__PURE__ */ a(s, {
39
41
  as: "p",
40
42
  children: [t.formatMessage(e.aiSuggestionNoticeBody), " "]
41
43
  })]
@@ -44,5 +46,5 @@ import '../../../../../../styles/metadata-instance-form-header.css';const x = "_
44
46
  });
45
47
  };
46
48
  export {
47
- B as MetadataInstanceFormHeader
49
+ j as MetadataInstanceFormHeader
48
50
  };
@@ -1,58 +1,59 @@
1
1
  import { Card as A, Divider as u } from "@box/blueprint-web";
2
2
  import { useState as D } from "react";
3
- import { useAutofill as S } from "../../../../utils/autofill-context.js";
3
+ import { useAutofill as g } from "../../../../utils/autofill-context.js";
4
4
  import { MetadataEmptyState as b } from "../../../metadata-empty-state/metadata-empty-state.js";
5
- import { MetadataInstanceContent as g } from "../metadata-instance-content/metadata-instance-content.js";
5
+ import { MetadataInstanceContent as S } from "../metadata-instance-content/metadata-instance-content.js";
6
6
  import { MetadataInstanceFooter as H } from "../metadata-instance-footer/metadata-instance-footer.js";
7
7
  import { MetadataInstanceHeader as _ } from "../metadata-instance-header/metadata-instance-header.js";
8
- import { jsxs as a, jsx as t, Fragment as n } from "react/jsx-runtime";
8
+ import { jsxs as s, jsx as t, Fragment as n } from "react/jsx-runtime";
9
9
  import '../../../../../../styles/metadata-instance.css';const M = "_topDivider_tzhlb_1", N = "_bottomDivider_tzhlb_5", y = {
10
10
  topDivider: M,
11
11
  bottomDivider: N
12
- }, W = ({
12
+ }, L = ({
13
13
  areAiSuggestionsAvailable: p,
14
14
  isAiSuggestionsFeatureEnabled: d,
15
15
  onEdit: l,
16
16
  templateInstance: o,
17
- taxonomyNodeFetcher: c
17
+ taxonomyNodeFetcher: E
18
18
  }) => {
19
- const i = o.fields, m = (s) => !s.value || Array.isArray(s.value) && s.value.length === 0, h = i.every(m), v = i.some(m), E = i.length > 0, [e, r] = D(!0), {
19
+ const e = o.fields, m = (r) => !r.value || Array.isArray(r.value) && r.value.length === 0, c = e.every(m), h = e.some(m), v = e.length > 0, [i, a] = D(!0), {
20
20
  getAiSuggestions: f
21
- } = S(), V = () => {
21
+ } = g(), V = () => {
22
22
  l(o), f(o.templateKey, o.scope);
23
23
  };
24
- return /* @__PURE__ */ a(A, {
24
+ return /* @__PURE__ */ s(A, {
25
25
  children: [/* @__PURE__ */ t(_, {
26
26
  areAiSuggestionsAvailable: p,
27
27
  canEdit: o.canEdit,
28
+ iaBetaLanguageEnabled: !1,
28
29
  isAiSuggestionsFeatureEnabled: d,
29
30
  onAutofill: V,
30
31
  onEdit: () => l(o),
31
32
  templateName: o == null ? void 0 : o.displayName
32
33
  }), /* @__PURE__ */ t(u, {
33
34
  className: y.topDivider
34
- }), e && h ? /* @__PURE__ */ t(b, {
35
- isAnyEmptyValueHidden: E,
35
+ }), i && c ? /* @__PURE__ */ t(b, {
36
+ isAnyEmptyValueHidden: v,
36
37
  isBoxAiSuggestionsFeatureEnabled: d,
37
38
  level: "instance",
38
- onShowEmptyValues: () => r(!1)
39
- }) : /* @__PURE__ */ a(n, {
40
- children: [/* @__PURE__ */ t(g, {
41
- shouldHideEmptyValues: e,
42
- taxonomyNodeFetcher: c,
39
+ onShowEmptyValues: () => a(!1)
40
+ }) : /* @__PURE__ */ s(n, {
41
+ children: [/* @__PURE__ */ t(S, {
42
+ shouldHideEmptyValues: i,
43
+ taxonomyNodeFetcher: E,
43
44
  templateInstance: o
44
- }), v && /* @__PURE__ */ a(n, {
45
+ }), h && /* @__PURE__ */ s(n, {
45
46
  children: [/* @__PURE__ */ t(u, {
46
47
  className: y.bottomDivider
47
48
  }), /* @__PURE__ */ t(H, {
48
- isAnyEmptyValueHidden: e,
49
- onHideEmptyValues: () => r(!0),
50
- onShowEmptyValues: () => r(!1)
49
+ isAnyEmptyValueHidden: i,
50
+ onHideEmptyValues: () => a(!0),
51
+ onShowEmptyValues: () => a(!1)
51
52
  })]
52
53
  })]
53
54
  })]
54
55
  });
55
56
  };
56
57
  export {
57
- W as MetadataInstance
58
+ L as MetadataInstance
58
59
  };
@@ -8,6 +8,10 @@ const e = t({
8
8
  id: "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonTooltip",
9
9
  defaultMessage: "Autofill with Box AI (Beta)"
10
10
  },
11
+ autofillButtonTooltipGA: {
12
+ id: "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonTooltipGA",
13
+ defaultMessage: "Autofill with Box AI"
14
+ },
11
15
  autofillButtonAriaLabel: {
12
16
  id: "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonAriaLabel",
13
17
  defaultMessage: "Autofill {templateName} with Box AI"
@@ -1,39 +1,40 @@
1
1
  import { Tooltip as i, IconButton as s } from "@box/blueprint-web";
2
- import { Pencil as p } from "@box/blueprint-web-assets/icons/Line";
2
+ import { Pencil as g } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { BoxAiLogo as I } from "@box/blueprint-web-assets/icons/Logo";
4
- import { u as g } from "../../../../../../chunks/index.js";
5
- import _ from "../../../interactive-header-text/interactive-header-text.js";
4
+ import { u as _ } from "../../../../../../chunks/index.js";
5
+ import x from "../../../interactive-header-text/interactive-header-text.js";
6
6
  import o from "./messages.js";
7
7
  import { jsxs as r, jsx as a } from "react/jsx-runtime";
8
- import '../../../../../../styles/metadata-instance-header.css';const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6", A = "_title_54pdx_14", e = {
9
- metadataInstanceHeader: x,
10
- iconButtonsContainer: b,
11
- title: A
12
- }, j = ({
8
+ import '../../../../../../styles/metadata-instance-header.css';const b = "_metadataInstanceHeader_54pdx_1", A = "_iconButtonsContainer_54pdx_6", M = "_title_54pdx_14", e = {
9
+ metadataInstanceHeader: b,
10
+ iconButtonsContainer: A,
11
+ title: M
12
+ }, k = ({
13
13
  areAiSuggestionsAvailable: c,
14
14
  canEdit: l,
15
15
  isAiSuggestionsFeatureEnabled: d,
16
- onEdit: m,
17
- onAutofill: u,
16
+ iaBetaLanguageEnabled: m,
17
+ onEdit: u,
18
+ onAutofill: f,
18
19
  templateName: n
19
20
  }) => {
20
- const t = g(), f = n || t.formatMessage(o.customInstanceTitle), B = d && n;
21
+ const t = _(), B = n || t.formatMessage(o.customInstanceTitle), p = d && n;
21
22
  return /* @__PURE__ */ r("div", {
22
23
  className: e.metadataInstanceHeader,
23
- children: [/* @__PURE__ */ a(_, {
24
+ children: [/* @__PURE__ */ a(x, {
24
25
  className: e.title,
25
- title: f
26
+ title: B
26
27
  }), l && /* @__PURE__ */ r("div", {
27
28
  className: e.iconButtonsContainer,
28
- children: [B && /* @__PURE__ */ a(i, {
29
- content: t.formatMessage(o.autofillButtonTooltip),
29
+ children: [p && /* @__PURE__ */ a(i, {
30
+ content: m ? t.formatMessage(o.autofillButtonTooltip) : t.formatMessage(o.autofillButtonTooltipGA),
30
31
  children: /* @__PURE__ */ a(s, {
31
32
  "aria-label": t.formatMessage(o.autofillButtonAriaLabel, {
32
33
  templateName: n
33
34
  }),
34
35
  disabled: !c,
35
36
  icon: I,
36
- onClick: u,
37
+ onClick: f,
37
38
  variant: "icon-logo",
38
39
  "data-target-id": "IconButton-autofillButtonAriaLabel"
39
40
  })
@@ -43,8 +44,8 @@ import '../../../../../../styles/metadata-instance-header.css';const x = "_metad
43
44
  "aria-label": t.formatMessage(o.editButtonAriaLabel, {
44
45
  templateName: n
45
46
  }),
46
- icon: p,
47
- onClick: m,
47
+ icon: g,
48
+ onClick: u,
48
49
  "data-target-id": "IconButton-editButtonAriaLabel"
49
50
  })
50
51
  })]
@@ -52,5 +53,5 @@ import '../../../../../../styles/metadata-instance-header.css';const x = "_metad
52
53
  });
53
54
  };
54
55
  export {
55
- j as MetadataInstanceHeader
56
+ k as MetadataInstanceHeader
56
57
  };
package/i18n/bn-IN.js CHANGED
@@ -92,6 +92,7 @@ export default {
92
92
  "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButton": "অটোফিল",
93
93
  "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButtonAriaLabel": "Box AI দিয়ে অটোফিল করুন",
94
94
  "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButtonTooltip": "Box AI দিয়ে অটোফিল করুন (বিটা)",
95
+ "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButtonTooltipGA": "Autofill with Box AI",
95
96
  "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.customInstanceTitle": "কাস্টম মেটাডেটা",
96
97
  "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.loadingButtonAriaLabel": "লোড করা হচ্ছে...",
97
98
  "metadataEditor.unsavedChangesModal.body": "মেটাডেটা টেমপ্লেট(গুলো) পরিবর্তন আনসেভ করেছে। আপনি কীভাবে এগিয়ে যেতে চান?",
@@ -103,6 +104,7 @@ export default {
103
104
  "metadataEditor.viewInstance.metadataInstanceFooter.showEmptyValuesCTA": "খালি মান দেখান",
104
105
  "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonAriaLabel": "Box AI দিয়ে {templateName} অটোফিল করুন",
105
106
  "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonTooltip": "Box AI দিয়ে অটোফিল করুন (বিটা)",
107
+ "metadataEditor.viewInstance.metadataInstanceHeader.autofillButtonTooltipGA": "Autofill with Box AI",
106
108
  "metadataEditor.viewInstance.metadataInstanceHeader.customMetadataTitle": "কাস্টম মেটাডেটা",
107
109
  "metadataEditor.viewInstance.metadataInstanceHeader.editButtonAriaLabel": "{templateName} এডিট করুন",
108
110
  "metadataEditor.viewInstance.metadataInstanceHeader.editButtonTooltip": "সম্পাদনা করুন",