@box/metadata-editor 0.85.0 → 0.85.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 (131) hide show
  1. package/chunks/filter-dropdown-menu.module.js +4 -5
  2. package/chunks/index.js +292 -0
  3. package/chunks/message.js +18 -0
  4. package/chunks/taxonomy-ancestor-status-pill.js +33 -33
  5. package/chunks/utils2.js +7 -8
  6. package/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +5 -5
  7. package/esm/lib/components/add-metadata-template-dropdown/messages.js +1 -1
  8. package/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +29 -29
  9. package/esm/lib/components/combobox-with-api-pagination/messages.js +1 -1
  10. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +1 -1
  11. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +6 -6
  12. package/esm/lib/components/filter-dropdown-menu/messages.js +1 -1
  13. package/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +10 -11
  14. package/esm/lib/components/filter-instances-dropdown/messages.js +1 -1
  15. package/esm/lib/components/interactive-header-text/interactive-header-text.js +8 -9
  16. package/esm/lib/components/interactive-text/interactive-text.js +11 -12
  17. package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +14 -14
  18. package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/messages.js +1 -1
  19. package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +1 -1
  20. package/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +28 -27
  21. package/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +6 -6
  22. package/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +5 -5
  23. package/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +9 -9
  24. package/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +5 -5
  25. package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +1 -1
  26. package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +2 -3
  27. package/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +567 -70
  28. package/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +19 -18
  29. package/esm/lib/components/metadata-empty-state/messages.js +1 -1
  30. package/esm/lib/components/metadata-empty-state/metadata-empty-state.js +1 -1
  31. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +13 -14
  32. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +1 -1
  33. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +4 -5
  34. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +1 -1
  35. package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +14 -14
  36. package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +1 -1
  37. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +27 -28
  38. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +1 -1
  39. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +10 -11
  40. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +1 -1
  41. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +4 -5
  42. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +1 -1
  43. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +16 -17
  44. package/esm/lib/components/metadata-instance-list/metadata-instance-list.js +8 -9
  45. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +7 -8
  46. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +3 -4
  47. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +8 -9
  48. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js +3 -3
  49. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.js +4 -3
  50. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +1 -1
  51. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +6 -7
  52. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +1 -1
  53. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +10 -11
  54. package/esm/lib/components/unsaved-changes-modal/messages.js +1 -1
  55. package/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +19 -18
  56. package/esm/lib/messages.js +1 -1
  57. package/esm/lib/metadata-editor.js +4 -5
  58. package/package.json +5 -5
  59. package/styles/ai-suggestion-field.css +1 -1
  60. package/styles/utils.css +1 -1
  61. package/types/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.d.ts +1 -1
  62. package/types/lib/components/add-metadata-template-dropdown/types.d.ts +1 -1
  63. package/types/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.d.ts +5 -5
  64. package/types/lib/components/combobox-with-api-pagination/types.d.ts +2 -2
  65. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.d.ts +1 -1
  66. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.d.ts +1 -1
  67. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.d.ts +1 -1
  68. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.d.ts +1 -1
  69. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.d.ts +1 -1
  70. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.d.ts +1 -1
  71. package/types/lib/components/filter-dropdown-menu/index.d.ts +6 -6
  72. package/types/lib/components/filter-instances-dropdown/filter-instances-dropdown.d.ts +1 -1
  73. package/types/lib/components/filter-instances-dropdown/types.d.ts +1 -1
  74. package/types/lib/components/interactive-header-text/interactive-header-text.d.ts +1 -1
  75. package/types/lib/components/interactive-text/interactive-text.d.ts +1 -1
  76. package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.d.ts +1 -1
  77. package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/types.d.ts +1 -1
  78. package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.d.ts +2 -2
  79. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.d.ts +2 -2
  80. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/types.d.ts +1 -1
  81. package/types/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.d.ts +2 -2
  82. package/types/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.d.ts +2 -2
  83. package/types/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.d.ts +2 -2
  84. package/types/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.d.ts +2 -2
  85. package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.d.ts +2 -2
  86. package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/types.d.ts +2 -2
  87. package/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.d.ts +2 -2
  88. package/types/lib/components/metadata-editor-fields/editor-field-types.d.ts +6 -6
  89. package/types/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.d.ts +4 -4
  90. package/types/lib/components/metadata-editor-fields/metadata-editor-fields.d.ts +1 -1
  91. package/types/lib/components/metadata-editor-fields/types.d.ts +2 -2
  92. package/types/lib/components/metadata-editor-fields/utils.d.ts +1 -1
  93. package/types/lib/components/metadata-empty-state/metadata-empty-state.d.ts +1 -1
  94. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.d.ts +1 -1
  95. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.d.ts +1 -1
  96. package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.d.ts +1 -1
  97. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.d.ts +1 -1
  98. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.d.ts +1 -1
  99. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +3 -3
  100. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.d.ts +3 -3
  101. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.d.ts +1 -1
  102. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/types.d.ts +1 -1
  103. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.d.ts +1 -1
  104. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +1 -1
  105. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +1 -1
  106. package/types/lib/components/metadata-instance-editor/types.d.ts +1 -1
  107. package/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +1 -1
  108. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
  109. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +2 -2
  110. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
  111. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +2 -2
  112. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.d.ts +1 -1
  113. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +1 -1
  114. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.d.ts +1 -1
  115. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.d.ts +1 -1
  116. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +2 -2
  117. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.d.ts +1 -1
  118. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.d.ts +1 -1
  119. package/types/lib/components/metadata-instance-list/types.d.ts +2 -2
  120. package/types/lib/components/unsaved-changes-modal/types.d.ts +1 -1
  121. package/types/lib/components/unsaved-changes-modal/unsaved-changes-modal.d.ts +1 -1
  122. package/types/lib/defaults.d.ts +1 -1
  123. package/types/lib/mappers.d.ts +2 -2
  124. package/types/lib/test-utils/formik-wrapper.d.ts +3 -3
  125. package/types/lib/test-utils/sample-data.d.ts +1 -1
  126. package/types/lib/test-utils/test-utils.d.ts +1 -1
  127. package/types/lib/types.d.ts +1 -1
  128. package/types/lib/utils/api-wrapper.d.ts +1 -1
  129. package/types/lib/utils/autofill-context.d.ts +2 -2
  130. package/types/lib/utils/convertDate.d.ts +1 -1
  131. package/types/lib/utils/utils.d.ts +1 -1
@@ -1,33 +1,34 @@
1
1
  import { useRef as f, useEffect as l } from "react";
2
- import { Text as c } from "@box/blueprint-web";
3
- import { useFormikContext as d, getIn as p, FieldArray as u } from "formik";
4
- import { FormattedMessage as x } from "react-intl";
5
- import g from "../../messages.js";
6
- import { MetadataEditorFieldWrapper as h } from "./metadata-editor-field-wrapper.js";
7
- import { s as F } from "../../../../chunks/utils2.js";
2
+ import { Text as d } from "@box/blueprint-web";
3
+ import { useFormikContext as c, getIn as p, FieldArray as u } from "formik";
4
+ import "../../../../chunks/index.js";
5
+ import x from "../../messages.js";
6
+ import { MetadataEditorFieldWrapper as g } from "./metadata-editor-field-wrapper.js";
7
+ import { s as h } from "../../../../chunks/utils2.js";
8
8
  import { jsx as t } from "react/jsx-runtime";
9
- const C = (m) => {
9
+ import { M as F } from "../../../../chunks/message.js";
10
+ const C = (n) => {
10
11
  const {
11
12
  values: i
12
- } = d(), o = "metadata.fields", r = p(i, o), s = f(null), a = r.findIndex((e) => !e.hidden);
13
+ } = c(), r = "metadata.fields", o = p(i, r), s = f(null), a = o.findIndex((e) => !e.hidden);
13
14
  return l(() => {
14
15
  var e;
15
16
  a > -1 && ((e = s.current) == null || e.focus());
16
- }, []), r.length ? /* @__PURE__ */ t(u, {
17
- name: o,
17
+ }, []), o.length ? /* @__PURE__ */ t(u, {
18
+ name: r,
18
19
  validateOnChange: !1,
19
- children: () => r.map((e, n) => /* @__PURE__ */ t(h, {
20
- ...m,
21
- ref: n === a ? s : null,
20
+ children: () => o.map((e, m) => /* @__PURE__ */ t(g, {
21
+ ...n,
22
+ ref: m === a ? s : null,
22
23
  field: e,
23
- index: n
24
+ index: m
24
25
  }, e.key))
25
- }) : /* @__PURE__ */ t(c, {
26
+ }) : /* @__PURE__ */ t(d, {
26
27
  as: "span",
27
- className: F.noAttributesText,
28
+ className: h.noAttributesText,
28
29
  color: "textOnLightSecondary",
29
- children: /* @__PURE__ */ t(x, {
30
- ...g.noTemplateAtributesError
30
+ children: /* @__PURE__ */ t(F, {
31
+ ...x.noTemplateAtributesError
31
32
  })
32
33
  });
33
34
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as e } from "react-intl";
1
+ import { d as e } from "../../../../chunks/index.js";
2
2
  const a = e({
3
3
  managerLevelEmptyStateHeading: {
4
4
  id: "metadataEditor.managerLevel.emptyState.heading",
@@ -1,7 +1,7 @@
1
1
  import { Text as n, EmptyState as m } from "@box/blueprint-web";
2
2
  import { JobAnalyzeData as c } from "@box/blueprint-web-assets/illustrations/Small";
3
3
  import { useCallback as f } from "react";
4
- import { useIntl as d } from "react-intl";
4
+ import { u as d } from "../../../../chunks/index.js";
5
5
  import a from "./messages.js";
6
6
  import { jsx as e } from "react/jsx-runtime";
7
7
  function E({
@@ -1,35 +1,34 @@
1
- import "../../../../../../styles/custom-instance.css";
2
1
  import { useFormikContext as A, FieldArray as N, Field as k } from "formik";
3
2
  import { useState as I, useRef as v, useEffect as y } from "react";
4
- import { useIntl as C } from "react-intl";
3
+ import { u as C } from "../../../../../../chunks/index.js";
5
4
  import { TextInput as q, IconButton as B, TextButton as T } from "@box/blueprint-web";
6
5
  import { Trash as w } from "@box/blueprint-web-assets/icons/Line";
7
6
  import { CustomInstanceNewField as M } from "../custom-instance-new-field/custom-instance-new-field.js";
8
7
  import { fieldDefaultProps as R } from "../../../metadata-editor-fields/components/constants.js";
9
8
  import d from "./messages.js";
10
9
  import { jsx as t, jsxs as p } from "react/jsx-runtime";
11
- const V = "_customInstance_xq8r7_1", j = "_customInstanceField_xq8r7_7", P = "_customInstanceFieldInput_xq8r7_12", z = "_customInstanceFieldIcon_xq8r7_16", c = {
10
+ import '../../../../../../styles/custom-instance.css';const V = "_customInstance_xq8r7_1", j = "_customInstanceField_xq8r7_7", P = "_customInstanceFieldInput_xq8r7_12", z = "_customInstanceFieldIcon_xq8r7_16", c = {
12
11
  customInstance: V,
13
12
  customInstanceField: j,
14
13
  customInstanceFieldInput: P,
15
14
  customInstanceFieldIcon: z
16
- }, Q = (F) => {
15
+ }, O = (F) => {
17
16
  const {
18
17
  isLoading: l
19
18
  } = F, {
20
19
  values: e
21
- } = A(), i = C(), [m, o] = I(!e.metadata.fields.length), [u, r] = I(0), h = () => {
20
+ } = A(), i = C(), [m, a] = I(!e.metadata.fields.length), [u, r] = I(0), h = () => {
22
21
  r(e.metadata.fields.length);
23
- }, b = (a) => {
24
- r(a === 0 ? 0 : a - 1);
22
+ }, b = (o) => {
23
+ r(o === 0 ? 0 : o - 1);
25
24
  }, f = v(null);
26
25
  return y(() => {
27
- e.metadata.fields.length > 0 ? f.current.focus() : o(!0);
26
+ e.metadata.fields.length > 0 ? f.current.focus() : a(!0);
28
27
  }, [u, e.metadata.fields.length]), /* @__PURE__ */ t("div", {
29
28
  children: /* @__PURE__ */ t(N, {
30
29
  name: "metadata.fields",
31
30
  children: ({
32
- remove: a,
31
+ remove: o,
33
32
  push: _
34
33
  }) => /* @__PURE__ */ p("div", {
35
34
  className: c.customInstance,
@@ -60,7 +59,7 @@ const V = "_customInstance_xq8r7_1", j = "_customInstanceField_xq8r7_7", P = "_c
60
59
  disabled: l,
61
60
  icon: w,
62
61
  onClick: () => {
63
- a(n), b(n);
62
+ o(n), b(n);
64
63
  },
65
64
  size: "x-small",
66
65
  "data-target-id": "IconButton-removeAttribute"
@@ -71,12 +70,12 @@ const V = "_customInstance_xq8r7_1", j = "_customInstanceField_xq8r7_7", P = "_c
71
70
  _({
72
71
  key: s,
73
72
  value: n
74
- }), h(), o(!1);
73
+ }), h(), a(!1);
75
74
  },
76
- onCancel: () => o(!1)
75
+ onCancel: () => a(!1)
77
76
  }), !m && /* @__PURE__ */ t(T, {
78
77
  disabled: l,
79
- onClick: () => o(!0),
78
+ onClick: () => a(!0),
80
79
  "data-target-id": "TextButton-addAttribute",
81
80
  children: i.formatMessage(d.addAttribute)
82
81
  })]
@@ -85,5 +84,5 @@ const V = "_customInstance_xq8r7_1", j = "_customInstanceField_xq8r7_7", P = "_c
85
84
  });
86
85
  };
87
86
  export {
88
- Q as CustomInstance
87
+ O as CustomInstance
89
88
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as t } from "react-intl";
1
+ import { d as t } from "../../../../../../chunks/index.js";
2
2
  const a = t({
3
3
  addAttribute: {
4
4
  id: "metadataEditor.metadataInstanceEditor.customInstance.addAttribute",
@@ -1,14 +1,13 @@
1
- import "../../../../../../styles/custom-instance-new-field.css";
2
1
  import { Card as I, TextInput as u, Button as m } from "@box/blueprint-web";
3
2
  import { useState as l } from "react";
4
- import { useIntl as y } from "react-intl";
3
+ import { u as y } from "../../../../../../chunks/index.js";
5
4
  import t from "./messages.js";
6
5
  import { jsxs as p, jsx as a } from "react/jsx-runtime";
7
- const M = "_customInstanceNewFieldCard_ivrhw_1", _ = "_customInstanceNewFieldFooter_ivrhw_6", b = "_inputWrapper_ivrhw_13", n = {
6
+ import '../../../../../../styles/custom-instance-new-field.css';const M = "_customInstanceNewFieldCard_ivrhw_1", _ = "_customInstanceNewFieldFooter_ivrhw_6", b = "_inputWrapper_ivrhw_13", n = {
8
7
  customInstanceNewFieldCard: M,
9
8
  customInstanceNewFieldFooter: _,
10
9
  inputWrapper: b
11
- }, E = (g) => {
10
+ }, x = (g) => {
12
11
  const {
13
12
  onAdd: h,
14
13
  onCancel: f,
@@ -59,5 +58,5 @@ const M = "_customInstanceNewFieldCard_ivrhw_1", _ = "_customInstanceNewFieldFoo
59
58
  });
60
59
  };
61
60
  export {
62
- E as CustomInstanceNewField
61
+ x as CustomInstanceNewField
63
62
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as e } from "react-intl";
1
+ import { d as e } from "../../../../../../chunks/index.js";
2
2
  const t = e({
3
3
  addAttributeGroupAriaLabel: {
4
4
  id: "metadataEditor.metadataEditor.customIntanceNewField.addAttributeGroupAriaLabel",
@@ -1,18 +1,18 @@
1
- import "../../../../../../styles/delete-confirmation-modal.css";
2
1
  import { Modal as a, Text as c, TextInput as b } from "@box/blueprint-web";
3
2
  import { useState as f, useEffect as F } from "react";
4
- import { useIntl as I, FormattedMessage as s } from "react-intl";
3
+ import { u as I } from "../../../../../../chunks/index.js";
5
4
  import o from "./messages.js";
6
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
7
- const P = "_modalBody_yiat3_1", x = {
5
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
6
+ import { M as d } from "../../../../../../chunks/message.js";
7
+ import '../../../../../../styles/delete-confirmation-modal.css';const P = "_modalBody_yiat3_1", x = {
8
8
  modalBody: P
9
9
  }, T = ({
10
10
  onConfirm: u,
11
11
  templateName: p,
12
12
  onDismiss: C,
13
- open: h
13
+ open: M
14
14
  }) => {
15
- const n = I(), [r, m] = f(""), [M, g] = f(!0), i = (t) => {
15
+ const n = I(), [r, m] = f(""), [h, g] = f(!0), i = (t) => {
16
16
  t || (C(), m(""));
17
17
  }, l = p || n.formatMessage(o.deleteConfirmationModalCustomMetadata), y = (t) => {
18
18
  m(t);
@@ -23,24 +23,24 @@ const P = "_modalBody_yiat3_1", x = {
23
23
  g(r !== l);
24
24
  }, [r, l]), /* @__PURE__ */ e(a, {
25
25
  onOpenChange: i,
26
- open: h,
27
- children: /* @__PURE__ */ d(a.Content, {
26
+ open: M,
27
+ children: /* @__PURE__ */ s(a.Content, {
28
28
  onEscapeKeyDown: (t) => t.stopPropagation(),
29
29
  size: "small",
30
30
  children: [/* @__PURE__ */ e(a.Header, {
31
31
  "aria-label": n.formatMessage(o.deleteConfirmationModalHeaderAriaLabel),
32
- children: /* @__PURE__ */ e(s, {
32
+ children: /* @__PURE__ */ e(d, {
33
33
  ...o.deleteConfirmationModalHeader,
34
34
  values: {
35
35
  templateName: l
36
36
  }
37
37
  })
38
38
  }), /* @__PURE__ */ e(a.ScrollableContainer, {
39
- children: /* @__PURE__ */ d(a.Body, {
39
+ children: /* @__PURE__ */ s(a.Body, {
40
40
  className: x.modalBody,
41
41
  children: [/* @__PURE__ */ e(c, {
42
42
  as: "p",
43
- children: /* @__PURE__ */ e(s, {
43
+ children: /* @__PURE__ */ e(d, {
44
44
  ...o.deleteConfirmationModalBodyFirstParagraph,
45
45
  values: {
46
46
  templateName: l
@@ -48,7 +48,7 @@ const P = "_modalBody_yiat3_1", x = {
48
48
  })
49
49
  }), /* @__PURE__ */ e(c, {
50
50
  as: "p",
51
- children: /* @__PURE__ */ e(s, {
51
+ children: /* @__PURE__ */ e(d, {
52
52
  ...o.deleteConfirmationModalBodySecondParagraph
53
53
  })
54
54
  }), /* @__PURE__ */ e(b, {
@@ -59,13 +59,13 @@ const P = "_modalBody_yiat3_1", x = {
59
59
  value: r
60
60
  })]
61
61
  })
62
- }), /* @__PURE__ */ d(a.Footer, {
62
+ }), /* @__PURE__ */ s(a.Footer, {
63
63
  children: [/* @__PURE__ */ e(a.Footer.SecondaryButton, {
64
64
  onClick: () => i(!1),
65
65
  size: "large",
66
66
  children: n.formatMessage(o.deleteConfirmationModalCancelButton)
67
67
  }), /* @__PURE__ */ e(a.Footer.PrimaryButton, {
68
- disabled: M,
68
+ disabled: h,
69
69
  onClick: B,
70
70
  size: "large",
71
71
  children: n.formatMessage(o.deleteConfirmationModalConfirmButton)
@@ -1,4 +1,4 @@
1
- import { defineMessages as e } from "react-intl";
1
+ import { d as e } from "../../../../../../chunks/index.js";
2
2
  const t = e({
3
3
  deleteConfirmationModalCustomMetadata: {
4
4
  id: "metadataEditor.editInstance.deleteConfirmationModal.customMedatata",
@@ -1,6 +1,5 @@
1
- import "../../../../../../styles/metadata-instance-form.css";
2
1
  import { Formik as K, Form as W } from "formik";
3
- import { useState as p, useEffect as d, useRef as j, useMemo as k } from "react";
2
+ import { useState as d, useEffect as p, useRef as j, useMemo as k } from "react";
4
3
  import { TEMPLATE_CUSTOM_PROPERTIES as L } from "../../../../constants.js";
5
4
  import { useAutofill as V } from "../../../../utils/autofill-context.js";
6
5
  import { TemplateInstance as $ } from "../../../metadata-editor-fields/metadata-editor-fields.js";
@@ -10,14 +9,14 @@ import { CustomInstance as q } from "../custom-instance/custom-instance.js";
10
9
  import { DeleteConfirmationModal as z } from "../delete-confirmation-modal/delete-confirmation-modal.js";
11
10
  import { c as G } from "../../../../../../chunks/utils.js";
12
11
  import { MetadataInstanceFormCardWrapper as H } from "./metadata-instance-form-card-wrapper.js";
13
- import { jsx as r, jsxs as Q } from "react/jsx-runtime";
14
- const X = "_metadataInstanceForm_1hu4u_1", Y = {
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 = {
15
14
  metadataInstanceForm: X
16
- }, fo = (c) => {
15
+ }, uo = (c) => {
17
16
  const {
18
17
  areAiSuggestionsAvailable: h,
19
- customRef: a,
20
- isAiSuggestionsFeatureEnabled: i,
18
+ customRef: r,
19
+ isAiSuggestionsFeatureEnabled: s,
21
20
  isDeleteButtonDisabled: C,
22
21
  isUnsavedChangesModalOpen: F = !1,
23
22
  MetadataInstanceFormCustomWrapper: M,
@@ -26,52 +25,52 @@ const X = "_metadataInstanceForm_1hu4u_1", Y = {
26
25
  onDelete: E,
27
26
  onDiscardUnsavedChanges: D,
28
27
  onSubmit: y,
29
- setIsUnsavedChangesModalOpen: s,
28
+ setIsUnsavedChangesModalOpen: i,
30
29
  taxonomyOptionsFetcher: e
31
- } = c, b = M ?? H, [O, m] = p(!1), {
30
+ } = c, b = M ?? H, [O, m] = d(!1), {
32
31
  isFetchingSuggestions: n,
33
32
  getAiSuggestions: A,
34
33
  clearSuggestions: u,
35
34
  suggestions: v
36
35
  } = V();
37
- d(() => () => {
36
+ p(() => () => {
38
37
  u();
39
38
  }, [u]);
40
39
  const f = (o == null ? void 0 : o.templateKey) === L, x = async (t) => {
41
40
  await y(t, G(t, o));
42
41
  }, P = (t) => {
43
- t ? s(!0) : S();
42
+ t ? i(!0) : S();
44
43
  }, R = () => {
45
44
  m(!0);
46
45
  }, U = {
47
46
  metadata: {
48
47
  ...o
49
48
  }
50
- }, l = j(null), [g, _] = p(null);
51
- d(() => {
52
- _(a ?? l.current);
53
- }, [a, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
49
+ }, l = j(null), [g, _] = d(null);
50
+ p(() => {
51
+ _(r ?? l.current);
52
+ }, [r, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
54
53
  const N = k(() => {
55
54
  const t = (o == null ? void 0 : o.fields.length) === 0;
56
- return f ? /* @__PURE__ */ r(q, {
55
+ return f ? /* @__PURE__ */ a(q, {
57
56
  isLoading: n
58
- }) : t ? /* @__PURE__ */ r(w, {
59
- isBoxAiSuggestionsFeatureEnabled: i,
57
+ }) : t ? /* @__PURE__ */ a(w, {
58
+ isBoxAiSuggestionsFeatureEnabled: s,
60
59
  level: "instance"
61
- }) : /* @__PURE__ */ r($, {
60
+ }) : /* @__PURE__ */ a($, {
62
61
  disableForm: n,
63
- portalElement: a ?? g,
62
+ portalElement: r ?? g,
64
63
  taxonomyOptionsFetcher: e
65
64
  });
66
- }, [o == null ? void 0 : o.fields.length, f, n, a, g, e, i]);
67
- return /* @__PURE__ */ r(K, {
65
+ }, [o == null ? void 0 : o.fields.length, f, n, r, g, e, s]);
66
+ return /* @__PURE__ */ a(K, {
68
67
  initialValues: U,
69
68
  onSubmit: x,
70
69
  children: ({
71
70
  values: t,
72
71
  dirty: B
73
72
  }) => /* @__PURE__ */ Q(W, {
74
- children: [/* @__PURE__ */ r(b, {
73
+ children: [/* @__PURE__ */ a(b, {
75
74
  areAiSuggestionsAvailable: h,
76
75
  className: Y.metadataInstanceForm,
77
76
  formRef: l,
@@ -79,18 +78,18 @@ const X = "_metadataInstanceForm_1hu4u_1", Y = {
79
78
  getAiSuggestions: A,
80
79
  handleCancel: P,
81
80
  handleDelete: R,
82
- isAiSuggestionsFeatureEnabled: i,
81
+ isAiSuggestionsFeatureEnabled: s,
83
82
  isDeleteButtonDisabled: C,
84
83
  isFetchingSuggestions: n,
85
84
  isFormDirty: B,
86
85
  selectedTemplateInstance: o,
87
86
  suggestions: v,
88
87
  children: o && N
89
- }), /* @__PURE__ */ r(J, {
90
- onBackToEdit: () => s(!1),
88
+ }), /* @__PURE__ */ a(J, {
89
+ onBackToEdit: () => i(!1),
91
90
  onDiscardChanges: D,
92
91
  open: F
93
- }), /* @__PURE__ */ r(z, {
92
+ }), /* @__PURE__ */ a(z, {
94
93
  onConfirm: () => E(o),
95
94
  onDismiss: () => m(!1),
96
95
  open: O,
@@ -100,5 +99,5 @@ const X = "_metadataInstanceForm_1hu4u_1", Y = {
100
99
  }, `${o == null ? void 0 : o.scope}.${o == null ? void 0 : o.templateKey}`);
101
100
  };
102
101
  export {
103
- fo as MetadataInstanceForm
102
+ uo as MetadataInstanceForm
104
103
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as a } from "react-intl";
1
+ import { d as a } from "../../../../../../chunks/index.js";
2
2
  const e = a({
3
3
  autofillButton: {
4
4
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButton",
@@ -1,15 +1,14 @@
1
- import "../../../../../../styles/metadata-instance-form-autofill-button.css";
2
1
  import { LoadingIndicator as M, IconButton as v, Tooltip as L, Button as k } from "@box/blueprint-web";
3
2
  import { BoxAiLogo as p } from "@box/blueprint-web-assets/icons/Logo";
4
3
  import { useFormikContext as x, getIn as i } from "formik";
5
4
  import { useEffect as K } from "react";
6
- import { useIntl as h } from "react-intl";
5
+ import { u as h } from "../../../../../../chunks/index.js";
7
6
  import { useAutofill as C } from "../../../../utils/autofill-context.js";
8
7
  import n from "./messages.js";
9
8
  import { jsx as l } from "react/jsx-runtime";
10
- const F = "_loadingIndicator_1vv9u_1", _ = {
9
+ import '../../../../../../styles/metadata-instance-form-autofill-button.css';const F = "_loadingIndicator_1vv9u_1", _ = {
11
10
  loadingIndicator: F
12
- }, z = ({
11
+ }, w = ({
13
12
  areAiSuggestionsAvailable: B,
14
13
  isLoading: r,
15
14
  variant: b = "secondary-button",
@@ -18,14 +17,14 @@ const F = "_loadingIndicator_1vv9u_1", _ = {
18
17
  const {
19
18
  isSubmitting: y,
20
19
  values: e,
21
- setFieldValue: m
20
+ setFieldValue: u
22
21
  } = x(), t = h(), {
23
22
  suggestions: o
24
23
  } = C();
25
24
  K(() => {
26
25
  if (o) {
27
26
  const a = i(e, "metadata.fields"), s = i(e, "metadata.templateKey");
28
- m("metadata.fields", a == null ? void 0 : a.map((c) => {
27
+ u("metadata.fields", a == null ? void 0 : a.map((c) => {
29
28
  var g;
30
29
  const f = (g = o == null ? void 0 : o[s]) == null ? void 0 : g[c.key];
31
30
  return f ? {
@@ -34,8 +33,8 @@ const F = "_loadingIndicator_1vv9u_1", _ = {
34
33
  } : c;
35
34
  }));
36
35
  }
37
- }, [o, m]);
38
- const u = () => {
36
+ }, [o, u]);
37
+ const m = () => {
39
38
  const a = i(e, "metadata.templateKey"), s = i(e, "metadata.scope");
40
39
  I(a, s);
41
40
  }, d = !B || y || r, A = r ? /* @__PURE__ */ l(M, {
@@ -45,7 +44,7 @@ const F = "_loadingIndicator_1vv9u_1", _ = {
45
44
  "aria-label": t.formatMessage(n.autofillButtonAriaLabel),
46
45
  disabled: d,
47
46
  icon: p,
48
- onClick: u,
47
+ onClick: m,
49
48
  variant: "icon-logo",
50
49
  "data-target-id": "IconButton-autofillButtonAriaLabel"
51
50
  });
@@ -56,7 +55,7 @@ const F = "_loadingIndicator_1vv9u_1", _ = {
56
55
  icon: p,
57
56
  loading: r,
58
57
  loadingAriaLabel: t.formatMessage(n.loadingButtonAriaLabel),
59
- onClick: u,
58
+ onClick: m,
60
59
  variant: "secondary",
61
60
  "data-target-id": "Button-autofillButton",
62
61
  children: t.formatMessage(n.autofillButton)
@@ -64,5 +63,5 @@ const F = "_loadingIndicator_1vv9u_1", _ = {
64
63
  });
65
64
  };
66
65
  export {
67
- z as MetadataInstanceFormAutofillButton
66
+ w as MetadataInstanceFormAutofillButton
68
67
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as a } from "react-intl";
1
+ import { d as a } from "../../../../../../chunks/index.js";
2
2
  const e = a({
3
3
  cancelButton: {
4
4
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.cancelButton",
@@ -1,14 +1,13 @@
1
- import "../../../../../../styles/metadata-instance-form-footer.css";
2
1
  import { TextButton as b, Button as r } from "@box/blueprint-web";
3
2
  import { useFormikContext as g } from "formik";
4
- import { useIntl as B } from "react-intl";
3
+ import { u as B } from "../../../../../../chunks/index.js";
5
4
  import o from "./messages.js";
6
5
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
7
- const F = "_metadataInstanceFormFooter_17478_1", f = "_buttonsContainer_17478_8", _ = "_buttons_17478_8", n = {
6
+ import '../../../../../../styles/metadata-instance-form-footer.css';const F = "_metadataInstanceFormFooter_17478_1", f = "_buttonsContainer_17478_8", _ = "_buttons_17478_8", n = {
8
7
  metadataInstanceFormFooter: F,
9
8
  buttonsContainer: f,
10
9
  buttons: _
11
- }, M = ({
10
+ }, I = ({
12
11
  isDeleteButtonDisabled: d,
13
12
  isLoading: m,
14
13
  onCancel: c,
@@ -50,5 +49,5 @@ const F = "_metadataInstanceFormFooter_17478_1", f = "_buttonsContainer_17478_8"
50
49
  });
51
50
  };
52
51
  export {
53
- M as MetadataInstanceFormFooter
52
+ I as MetadataInstanceFormFooter
54
53
  };
@@ -1,4 +1,4 @@
1
- import { defineMessages as e } from "react-intl";
1
+ import { d as e } from "../../../../../../chunks/index.js";
2
2
  const t = e({
3
3
  customInstanceTitle: {
4
4
  id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.customInstanceTitle",
@@ -1,42 +1,41 @@
1
- import "../../../../../../styles/metadata-instance-form-header.css";
2
- import { useIntl as I } from "react-intl";
3
- import { InlineNotice as g, Text as n } from "@box/blueprint-web";
4
- import p from "../../../interactive-header-text/interactive-header-text.js";
5
- import { MetadataInstanceFormAutofillButton as u } from "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
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";
6
5
  import e from "./messages.js";
7
6
  import { jsxs as a, Fragment as H, jsx as r } from "react/jsx-runtime";
8
- const x = "_metadataInstanceFormHeader_13lxr_1", F = "_title_13lxr_9", s = {
7
+ import '../../../../../../styles/metadata-instance-form-header.css';const x = "_metadataInstanceFormHeader_13lxr_1", F = "_title_13lxr_9", s = {
9
8
  metadataInstanceFormHeader: x,
10
9
  title: F
11
- }, T = ({
12
- areAiSuggestionsAvailable: o,
10
+ }, B = ({
11
+ areAiSuggestionsAvailable: n,
13
12
  hasSuggestions: i,
14
13
  isAiSuggestionsFeatureEnabled: m,
15
14
  isLoading: c,
16
15
  templateName: l,
17
16
  onAutofill: d
18
17
  }) => {
19
- const t = I(), f = l ?? t.formatMessage(e.customInstanceTitle);
18
+ const t = u(), f = l ?? t.formatMessage(e.customInstanceTitle);
20
19
  return /* @__PURE__ */ a(H, {
21
20
  children: [/* @__PURE__ */ a("div", {
22
21
  className: s.metadataInstanceFormHeader,
23
- children: [/* @__PURE__ */ r(p, {
22
+ children: [/* @__PURE__ */ r(g, {
24
23
  className: s.title,
25
24
  title: f
26
- }), m ? /* @__PURE__ */ r(u, {
27
- areAiSuggestionsAvailable: o,
25
+ }), m ? /* @__PURE__ */ r(p, {
26
+ areAiSuggestionsAvailable: n,
28
27
  isLoading: c,
29
28
  onAutofill: d
30
29
  }) : null]
31
- }), i && o ? /* @__PURE__ */ r("div", {
32
- children: /* @__PURE__ */ a(g, {
30
+ }), i && n ? /* @__PURE__ */ r("div", {
31
+ children: /* @__PURE__ */ a(I, {
33
32
  variant: "info",
34
33
  variantIconAriaLabel: t.formatMessage(e.aiSuggestionNoticeHeader),
35
- children: [/* @__PURE__ */ r(n, {
34
+ children: [/* @__PURE__ */ r(o, {
36
35
  as: "p",
37
36
  variant: "bodyDefaultBold",
38
37
  children: t.formatMessage(e.aiSuggestionNoticeHeader)
39
- }), /* @__PURE__ */ a(n, {
38
+ }), /* @__PURE__ */ a(o, {
40
39
  as: "p",
41
40
  children: [t.formatMessage(e.aiSuggestionNoticeBody), " "]
42
41
  })]
@@ -45,5 +44,5 @@ const x = "_metadataInstanceFormHeader_13lxr_1", F = "_title_13lxr_9", s = {
45
44
  });
46
45
  };
47
46
  export {
48
- T as MetadataInstanceFormHeader
47
+ B as MetadataInstanceFormHeader
49
48
  };
@@ -1,18 +1,17 @@
1
- import "../../../../styles/metadata-instance-list.css";
2
- import { MetadataInstance as o } from "./subcomponents/metadata-instance/metadata-instance.js";
3
- import { getVisibleTemplates as r } from "../../utils/utils.js";
1
+ import { MetadataInstance as c } from "./subcomponents/metadata-instance/metadata-instance.js";
2
+ import { getVisibleTemplates as d } from "../../utils/utils.js";
4
3
  import { jsx as a } from "react/jsx-runtime";
5
- const c = "_metadataInstanceList_bd83w_1", d = {
6
- metadataInstanceList: c
7
- }, f = ({
4
+ import '../../../../styles/metadata-instance-list.css';const o = "_metadataInstanceList_bd83w_1", r = {
5
+ metadataInstanceList: o
6
+ }, l = ({
8
7
  areAiSuggestionsAvailable: s,
9
8
  isAiSuggestionsFeatureEnabled: e,
10
9
  onEdit: n,
11
10
  templateInstances: i,
12
11
  taxonomyNodeFetcher: m
13
12
  }) => /* @__PURE__ */ a("div", {
14
- className: d.metadataInstanceList,
15
- children: r(i).map((t) => /* @__PURE__ */ a(o, {
13
+ className: r.metadataInstanceList,
14
+ children: d(i).map((t) => /* @__PURE__ */ a(c, {
16
15
  areAiSuggestionsAvailable: s,
17
16
  isAiSuggestionsFeatureEnabled: e,
18
17
  onEdit: n,
@@ -21,5 +20,5 @@ const c = "_metadataInstanceList_bd83w_1", d = {
21
20
  }, t.id))
22
21
  });
23
22
  export {
24
- f as MetadataInstanceList
23
+ l as MetadataInstanceList
25
24
  };