@box/metadata-editor 1.37.0 → 1.38.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 (21) hide show
  1. package/dist/chunks/filter-dropdown-menu.module.js +9 -9
  2. package/dist/chunks/taxonomy-ancestor-status-pill.js +45 -45
  3. package/dist/chunks/utils2.js +23 -23
  4. package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +27 -27
  5. package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +103 -104
  6. package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +11 -13
  7. package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +25 -27
  8. package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +12 -13
  9. package/dist/styles/autofill-overlay.css +1 -1
  10. package/dist/styles/filter-dropdown-menu.css +1 -1
  11. package/dist/styles/taxonomy-ancestor-status-pill.css +1 -1
  12. package/dist/styles/utils.css +1 -1
  13. package/dist/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +0 -2
  14. package/dist/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +1 -1
  15. package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
  16. package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +0 -1
  17. package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
  18. package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +0 -1
  19. package/dist/types/lib/components/metadata-instance-list/types.d.ts +0 -1
  20. package/dist/types/lib/types.d.ts +1 -0
  21. package/package.json +9 -9
@@ -1,14 +1,14 @@
1
- import '../styles/filter-dropdown-menu.css';const c = "_content_2vpjl_2", e = "_scrollableContainer_2vpjl_21", n = "_item_2vpjl_26", o = "_option_2vpjl_36", t = "_search_2vpjl_57", s = "_searchIcon_2vpjl_62", r = "_clearSearchIcon_2vpjl_76", _ = "_searchInput_2vpjl_84", a = "_searchDivider_2vpjl_138", l = {
1
+ import '../styles/filter-dropdown-menu.css';const c = "_content_1xvav_2", e = "_scrollableContainer_1xvav_21", a = "_item_1xvav_26", n = "_option_1xvav_36", o = "_search_1xvav_57", t = "_searchIcon_1xvav_62", s = "_clearSearchIcon_1xvav_76", r = "_searchInput_1xvav_84", _ = "_searchDivider_1xvav_138", v = {
2
2
  content: c,
3
3
  scrollableContainer: e,
4
- item: n,
5
- option: o,
6
- search: t,
7
- searchIcon: s,
8
- clearSearchIcon: r,
9
- searchInput: _,
10
- searchDivider: a
4
+ item: a,
5
+ option: n,
6
+ search: o,
7
+ searchIcon: t,
8
+ clearSearchIcon: s,
9
+ searchInput: r,
10
+ searchDivider: _
11
11
  };
12
12
  export {
13
- l as s
13
+ v as s
14
14
  };
@@ -1,11 +1,11 @@
1
- import { Popover as t, FilterChip as v, InlineNotice as A, TextButton as T, LoadingIndicator as I } from "@box/blueprint-web";
1
+ import { Popover as t, FilterChip as y, InlineNotice as A, TextButton as T, LoadingIndicator as I } from "@box/blueprint-web";
2
2
  import { Loader as W } from "@box/blueprint-web-assets/icons/Fill";
3
3
  import V from "lodash/orderBy";
4
4
  import { useState as s } from "react";
5
- import { useIntl as B, FormattedMessage as y } from "react-intl";
6
- import a from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js";
7
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
8
- import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentContainer_1vfhn_2", w = "_popoverMainContent_1vfhn_7", E = "_loadingIndicatorWrapper_1vfhn_11", D = "_errorMessageWrapper_1vfhn_18", P = "_errorMessageWrapperText_1vfhn_23", R = "_taxonomyAncestorTable_1vfhn_37", k = "_taxonomyValueGroup_1vfhn_80", K = "_taxonomyValueButton_1vfhn_85", G = "_taxonomyValueLabel_1vfhn_95", n = {
5
+ import { useIntl as B, FormattedMessage as _ } from "react-intl";
6
+ import n from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js";
7
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
8
+ import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentContainer_f0vo4_2", w = "_popoverMainContent_f0vo4_7", E = "_loadingIndicatorWrapper_f0vo4_11", D = "_errorMessageWrapper_f0vo4_18", P = "_errorMessageWrapperText_f0vo4_23", R = "_taxonomyAncestorTable_f0vo4_37", k = "_taxonomyValueGroup_f0vo4_80", K = "_taxonomyValueButton_f0vo4_85", G = "_taxonomyValueLabel_f0vo4_95", a = {
9
9
  popoverContentContainer: N,
10
10
  popoverMainContent: w,
11
11
  loadingIndicatorWrapper: E,
@@ -24,18 +24,18 @@ import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentC
24
24
  };
25
25
  function X({
26
26
  taxonomyNodeFetcher: r,
27
- scope: _,
28
- taxonomyKey: f,
27
+ scope: f,
28
+ taxonomyKey: h,
29
29
  value: x,
30
30
  displayValue: c
31
31
  }) {
32
32
  const {
33
33
  formatMessage: i
34
- } = B(), [C, b] = s([]), [p, d] = s(!1), [m, g] = s(!1), [M, h] = s(!1), L = V(C, (o) => o.level), u = async () => {
35
- d(!0), g(!1), h(!0);
34
+ } = B(), [C, b] = s([]), [p, d] = s(!1), [m, g] = s(!1), [M, u] = s(!1), L = V(C, (e) => e.level), v = async () => {
35
+ d(!0), g(!1), u(!0);
36
36
  try {
37
- const o = await r(_, f, x);
38
- b(o);
37
+ const e = await r(f, h, x);
38
+ b(e);
39
39
  } catch {
40
40
  g(!0);
41
41
  } finally {
@@ -43,63 +43,63 @@ function X({
43
43
  }
44
44
  };
45
45
  return /* @__PURE__ */ l(t.Root, {
46
- onOpenChange: h,
46
+ onOpenChange: u,
47
47
  open: M,
48
- children: [/* @__PURE__ */ e(t.Trigger, {
49
- children: /* @__PURE__ */ e(v.ChipButton, {
48
+ children: [/* @__PURE__ */ o(t.Trigger, {
49
+ children: /* @__PURE__ */ o(y.ChipButton, {
50
50
  "aria-checked": void 0,
51
- className: n.taxonomyValueButton,
51
+ className: a.taxonomyValueButton,
52
52
  disabled: !r,
53
- onClick: u,
53
+ onClick: v,
54
54
  onKeyDown: S,
55
55
  role: void 0,
56
56
  value: c,
57
- children: /* @__PURE__ */ e(v.Label, {
58
- className: n.taxonomyValueLabel,
57
+ children: /* @__PURE__ */ o(y.Label, {
58
+ className: a.taxonomyValueLabel,
59
59
  children: c
60
60
  })
61
61
  })
62
- }), /* @__PURE__ */ e(t.ContentContainer, {
62
+ }), /* @__PURE__ */ o(t.ContentContainer, {
63
63
  align: "start",
64
- className: n.popoverContentContainer,
64
+ className: a.popoverContentContainer,
65
65
  collisionPadding: O,
66
66
  onEscapeKeyDown: j,
67
67
  children: /* @__PURE__ */ l(t.MainContent, {
68
- className: n.popoverMainContent,
68
+ className: a.popoverMainContent,
69
69
  children: [m && /* @__PURE__ */ l("div", {
70
- className: n.errorMessageWrapper,
71
- children: [/* @__PURE__ */ e(A, {
70
+ className: a.errorMessageWrapper,
71
+ children: [/* @__PURE__ */ o(A, {
72
72
  variant: "error",
73
- variantIconAriaLabel: i(a.loadingResultsErrorIconLabel),
74
- children: /* @__PURE__ */ e(y, {
75
- ...a.loadingResultsErrorMessage
73
+ variantIconAriaLabel: i(n.loadingResultsErrorIconLabel),
74
+ children: /* @__PURE__ */ o(_, {
75
+ ...n.loadingResultsErrorMessage
76
76
  })
77
- }), /* @__PURE__ */ e(T, {
78
- className: n.errorMessageWrapperText,
77
+ }), /* @__PURE__ */ o(T, {
78
+ className: a.errorMessageWrapperText,
79
79
  icon: W,
80
- onClick: u,
80
+ onClick: v,
81
81
  "data-target-id": "TextButton-loadingResultsErrorAction",
82
- children: i(a.loadingResultsErrorAction)
82
+ children: i(n.loadingResultsErrorAction)
83
83
  })]
84
- }), p && /* @__PURE__ */ e("div", {
85
- className: n.loadingIndicatorWrapper,
86
- children: /* @__PURE__ */ e(I, {
87
- "aria-label": i(a.loadingAriaLabel),
84
+ }), p && /* @__PURE__ */ o("div", {
85
+ className: a.loadingIndicatorWrapper,
86
+ children: /* @__PURE__ */ o(I, {
87
+ "aria-label": i(n.loadingAriaLabel),
88
88
  size: "large"
89
89
  })
90
- }), !m && !p && /* @__PURE__ */ e("table", {
91
- className: n.taxonomyAncestorTable,
92
- children: /* @__PURE__ */ e("tbody", {
93
- children: L.map((o) => /* @__PURE__ */ l("tr", {
94
- children: [/* @__PURE__ */ e("th", {
90
+ }), !m && !p && /* @__PURE__ */ o("table", {
91
+ className: a.taxonomyAncestorTable,
92
+ children: /* @__PURE__ */ o("tbody", {
93
+ children: L.map((e) => /* @__PURE__ */ l("tr", {
94
+ children: [/* @__PURE__ */ o("th", {
95
95
  scope: "row",
96
- children: o.levelName
97
- }), /* @__PURE__ */ e("td", {
98
- children: o.levelValue || /* @__PURE__ */ e(y, {
99
- ...a.emptyAncestorLevelValue
96
+ children: e.levelName
97
+ }), /* @__PURE__ */ o("td", {
98
+ children: e.levelValue || /* @__PURE__ */ o(_, {
99
+ ...n.emptyAncestorLevelValue
100
100
  })
101
101
  })]
102
- }, o.id || o.level))
102
+ }, e.id || e.level))
103
103
  })
104
104
  })]
105
105
  })
@@ -108,5 +108,5 @@ function X({
108
108
  }
109
109
  export {
110
110
  X as T,
111
- n as s
111
+ a as s
112
112
  };
@@ -1,49 +1,49 @@
1
- import { BoxAiLogo as _ } from "@box/blueprint-web-assets/icons/Logo";
2
- import p from "clsx";
1
+ import { BoxAiLogo as i } from "@box/blueprint-web-assets/icons/Logo";
2
+ import _ from "clsx";
3
3
  import b from "../esm/lib/components/interactive-text/interactive-text.js";
4
4
  import { convertISOStringtoRFC3339String as d } from "../esm/lib/utils/convertDate.js";
5
- import { jsxs as u, jsx as n } from "react/jsx-runtime";
6
- import '../styles/utils.css';const g = "_noAttributesText_1n8yf_2", f = "_fieldWrapper_1n8yf_6", m = "_hasSuggestion_1n8yf_11", x = "_dateField_1n8yf_33", T = "_suggestionApplied_1n8yf_37", y = "_labelWrapper_1n8yf_52", h = "_labelText_1n8yf_58", A = "_labelTruncated_1n8yf_61", N = "_labelIcon_1n8yf_68", l = {
5
+ import { jsxs as u, jsx as a } from "react/jsx-runtime";
6
+ import '../styles/utils.css';const g = "_noAttributesText_6p6pr_2", m = "_fieldWrapper_6p6pr_6", x = "_hasSuggestion_6p6pr_11", T = "_dateField_6p6pr_33", f = "_suggestionApplied_6p6pr_37", h = "_labelWrapper_6p6pr_52", A = "_labelText_6p6pr_58", N = "_labelTruncated_6p6pr_61", S = "_labelIcon_6p6pr_68", l = {
7
7
  noAttributesText: g,
8
- fieldWrapper: f,
9
- hasSuggestion: m,
10
- dateField: x,
11
- suggestionApplied: T,
12
- labelWrapper: y,
13
- labelText: h,
14
- labelTruncated: A,
15
- labelIcon: N
16
- }, v = (t, e, a = !1, o = "label") => (c) => {
8
+ fieldWrapper: m,
9
+ hasSuggestion: x,
10
+ dateField: T,
11
+ suggestionApplied: f,
12
+ labelWrapper: h,
13
+ labelText: A,
14
+ labelTruncated: N,
15
+ labelIcon: S
16
+ }, y = (t, e, r = !1, o = "label") => (p) => {
17
17
  const {
18
- className: i,
18
+ className: c,
19
19
  ...s
20
- } = c, r = p(i || l.labelText, l.labelTruncated);
20
+ } = p, n = _(c || l.labelText, l.labelTruncated);
21
21
  return /* @__PURE__ */ u("div", {
22
22
  className: l.labelWrapper,
23
- children: [e ? /* @__PURE__ */ n(b, {
23
+ children: [e ? /* @__PURE__ */ a(b, {
24
24
  as: o,
25
- className: r,
25
+ className: n,
26
26
  tooltipText: e,
27
27
  ...s,
28
28
  children: t
29
- }) : /* @__PURE__ */ n("label", {
30
- className: r,
29
+ }) : /* @__PURE__ */ a("label", {
30
+ className: n,
31
31
  ...s,
32
32
  children: t
33
- }), a && /* @__PURE__ */ n(_, {
33
+ }), r && /* @__PURE__ */ a(i, {
34
34
  className: l.labelIcon
35
35
  })]
36
36
  });
37
37
  }, C = (t) => {
38
38
  try {
39
- const e = d(t), a = new Date(e);
40
- return isNaN(a.getTime()) ? null : e;
39
+ const e = d(t), r = new Date(e);
40
+ return isNaN(r.getTime()) ? null : e;
41
41
  } catch {
42
42
  return null;
43
43
  }
44
44
  };
45
45
  export {
46
- v as g,
46
+ y as g,
47
47
  l as s,
48
48
  C as t
49
49
  };
@@ -1,61 +1,61 @@
1
- import { LoadingIndicator as v, Text as m, TextButton as _ } from "@box/blueprint-web";
2
- import { AlertTriangle as p } from "@box/blueprint-web-assets/icons/Line";
1
+ import { LoadingIndicator as g, Text as m, TextButton as v } from "@box/blueprint-web";
2
+ import { AlertTriangle as _ } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { Size5 as f, SurfaceStatusSurfaceError as y } from "@box/blueprint-web-assets/tokens/tokens";
4
4
  import O from "clsx";
5
5
  import { useState as T } from "react";
6
6
  import { useIntl as h } from "react-intl";
7
7
  import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as E } from "../../../../constants.js";
8
- import i from "./messages.js";
8
+ import s from "./messages.js";
9
9
  import { useErrorMessaging as I } from "./useErrorMessaging.js";
10
10
  import { jsxs as A, jsx as e } from "react/jsx-runtime";
11
- import '../../../../../../styles/autofill-overlay.css';const x = "_autofillOverlay_1s073_1", B = "_withError_1s073_15", D = "_autofillOverlayTitle_1s073_19", M = "_autofillOverlayDescription_1s073_24", S = "_dismissButton_1s073_28", N = "_overlayIcon_1s073_32", s = {
12
- autofillOverlay: x,
13
- withError: B,
14
- autofillOverlayTitle: D,
15
- autofillOverlayDescription: M,
16
- dismissButton: S,
17
- overlayIcon: N
11
+ import '../../../../../../styles/autofill-overlay.css';const j = "_autofillOverlay_16p2j_1", x = "_withError_16p2j_12", B = "_autofillOverlayTitle_16p2j_16", D = "_autofillOverlayDescription_16p2j_21", M = "_dismissButton_16p2j_25", S = "_overlayIcon_16p2j_29", a = {
12
+ autofillOverlay: j,
13
+ withError: x,
14
+ autofillOverlayTitle: B,
15
+ autofillOverlayDescription: D,
16
+ dismissButton: M,
17
+ overlayIcon: S
18
18
  }, Y = ({
19
19
  errorCode: t,
20
20
  isFetchingSuggestions: u,
21
21
  isLongLoading: l
22
22
  }) => {
23
- const a = h(), [d, g] = T(!1), r = I(t);
24
- let o = a.formatMessage(i.defaultLoadingMessage);
23
+ const i = h(), [p, d] = T(!1), r = I(t);
24
+ let o = i.formatMessage(s.defaultLoadingMessage);
25
25
  t && (o = r.title);
26
26
  const n = localStorage.getItem(E);
27
- l && n === "standard" && (o = a.formatMessage(i.longLoadingTitle));
28
- const c = l && n === "standard" ? a.formatMessage(i.longLoadingDescription) : t && r.description;
29
- return !u && !t || d ? null : /* @__PURE__ */ A("div", {
30
- className: O(s.autofillOverlay, t && s.withError),
31
- children: [t ? /* @__PURE__ */ e(p, {
32
- className: s.overlayIcon,
27
+ l && n === "standard" && (o = i.formatMessage(s.longLoadingTitle));
28
+ const c = l && n === "standard" ? i.formatMessage(s.longLoadingDescription) : t && r.description;
29
+ return !u && !t || p ? null : /* @__PURE__ */ A("div", {
30
+ className: O(a.autofillOverlay, t && a.withError),
31
+ children: [t ? /* @__PURE__ */ e(_, {
32
+ className: a.overlayIcon,
33
33
  color: y,
34
34
  height: f,
35
35
  role: "presentation",
36
36
  width: f
37
- }) : /* @__PURE__ */ e(v, {
38
- "aria-label": a.formatMessage(i.loadingAriaLabel),
37
+ }) : /* @__PURE__ */ e(g, {
38
+ "aria-label": i.formatMessage(s.loadingAriaLabel),
39
39
  "aria-live": "polite",
40
- className: s.overlayIcon,
40
+ className: a.overlayIcon,
41
41
  size: "large",
42
42
  variant: "default"
43
43
  }), /* @__PURE__ */ e(m, {
44
44
  as: "p",
45
- className: s.autofillOverlayTitle,
45
+ className: a.autofillOverlayTitle,
46
46
  variant: "subtitle",
47
47
  children: o
48
48
  }), c && /* @__PURE__ */ e(m, {
49
49
  as: "p",
50
- className: s.autofillOverlayDescription,
50
+ className: a.autofillOverlayDescription,
51
51
  color: "textOnLightSecondary",
52
52
  variant: "bodyDefault",
53
53
  children: c
54
- }), t && /* @__PURE__ */ e(_, {
55
- className: s.dismissButton,
56
- onClick: () => g(!0),
54
+ }), t && /* @__PURE__ */ e(v, {
55
+ className: a.dismissButton,
56
+ onClick: () => d(!0),
57
57
  "data-target-id": "TextButton-dismissButton",
58
- children: a.formatMessage(i.dismissButton)
58
+ children: i.formatMessage(s.dismissButton)
59
59
  })]
60
60
  });
61
61
  };
@@ -1,144 +1,143 @@
1
1
  import "../custom-instance-new-field/custom-instance-new-field.js";
2
- import { DeleteConfirmationModal as G } from "../delete-confirmation-modal/delete-confirmation-modal.js";
2
+ import { DeleteConfirmationModal as z } from "../delete-confirmation-modal/delete-confirmation-modal.js";
3
3
  import "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
4
4
  import "../metadata-instance-form-header/metadata-instance-form-header.js";
5
- import H from "clsx";
6
- import { Formik as Q, Form as X } from "formik";
7
- import Y from "lodash/isEqual";
8
- import { useState as y, useEffect as O, useRef as D, useMemo as Z } from "react";
9
- import { TEMPLATE_CUSTOM_PROPERTIES as ee } from "../../../../constants.js";
10
- import { useAutofill as te } from "../../../../utils/autofill-context.js";
11
- import { ConfidenceScoreContextProvider as oe } from "../../../../utils/confidence-score-context.js";
12
- import { TemplateInstance as ae } from "../../../metadata-editor-fields/metadata-editor-fields.js";
13
- import { MetadataEmptyState as ne } from "../../../metadata-empty-state/metadata-empty-state.js";
14
- import { AutofillOverlay as se } from "../autofill-overlay/autofill-overlay.js";
15
- import { CustomInstance as re } from "../custom-instance/custom-instance.js";
16
- import { c as ie } from "../../../../../../chunks/utils.js";
17
- import { s as d, M as le } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
18
- import { jsx as t, jsxs as x } from "react/jsx-runtime";
19
- import { UnsavedChangesModal as me } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
20
- const ce = ({
5
+ import G from "clsx";
6
+ import { Formik as H, Form as Q } from "formik";
7
+ import X from "lodash/isEqual";
8
+ import { useState as y, useEffect as S, useRef as x, useMemo as Y } from "react";
9
+ import { TEMPLATE_CUSTOM_PROPERTIES as Z } from "../../../../constants.js";
10
+ import { useAutofill as ee } from "../../../../utils/autofill-context.js";
11
+ import { ConfidenceScoreContextProvider as te } from "../../../../utils/confidence-score-context.js";
12
+ import { TemplateInstance as ne } from "../../../metadata-editor-fields/metadata-editor-fields.js";
13
+ import { MetadataEmptyState as ae } from "../../../metadata-empty-state/metadata-empty-state.js";
14
+ import { AutofillOverlay as oe } from "../autofill-overlay/autofill-overlay.js";
15
+ import { CustomInstance as se } from "../custom-instance/custom-instance.js";
16
+ import { c as re } from "../../../../../../chunks/utils.js";
17
+ import { s as d, M as ie } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
18
+ import { jsx as t, jsxs as O } from "react/jsx-runtime";
19
+ import { UnsavedChangesModal as le } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
20
+ const me = ({
21
21
  dirty: i,
22
22
  onChange: l,
23
- values: o
23
+ values: n
24
24
  }) => {
25
- const s = D(o);
26
- return i && !Y(s.current.metadata.fields, o.metadata.fields) && (s.current = o, l(o)), null;
27
- }, Te = (i) => {
25
+ const s = x(n);
26
+ return i && !X(s.current.metadata.fields, n.metadata.fields) && (s.current = n, l(n)), null;
27
+ }, Ae = (i) => {
28
28
  const {
29
29
  areAiSuggestionsAvailable: l,
30
- customRef: o,
30
+ customRef: n,
31
31
  isLargeFile: s,
32
32
  errorCode: m,
33
33
  isAiSuggestionsFeatureEnabled: c,
34
- isAdvancedExtractAgentEnabled: v = !1,
35
- isBetaLanguageEnabled: I,
36
- isExternallyOwned: f = !1,
37
- isDeleteButtonDisabled: A,
38
- isDeleteConfirmationModalCheckboxEnabled: T,
39
- isMultilevelTaxonomyFieldEnabled: p,
40
- isUnsavedChangesModalOpen: R = !1,
41
- MetadataInstanceFormCustomWrapper: L,
34
+ isAdvancedExtractAgentEnabled: D = !1,
35
+ isBetaLanguageEnabled: v,
36
+ isDeleteButtonDisabled: I,
37
+ isDeleteConfirmationModalCheckboxEnabled: A,
38
+ isMultilevelTaxonomyFieldEnabled: f,
39
+ isUnsavedChangesModalOpen: T = !1,
40
+ MetadataInstanceFormCustomWrapper: w,
42
41
  selectedTemplateInstance: e,
43
- onCancel: P,
44
- onChange: u,
45
- onDelete: k,
46
- onDiscardUnsavedChanges: w,
47
- onSubmit: N,
48
- setIsUnsavedChangesModalOpen: g,
49
- taxonomyOptionsFetcher: C,
50
- isConfidenceScoreReviewEnabled: U = !1
51
- } = i, B = L ?? le, [K, h] = y(!1), {
52
- isFetchingSuggestions: n,
42
+ onCancel: R,
43
+ onChange: p,
44
+ onDelete: L,
45
+ onDiscardUnsavedChanges: P,
46
+ onSubmit: k,
47
+ setIsUnsavedChangesModalOpen: u,
48
+ taxonomyOptionsFetcher: g,
49
+ isConfidenceScoreReviewEnabled: N = !1
50
+ } = i, U = w ?? ie, [B, C] = y(!1), {
51
+ isFetchingSuggestions: o,
53
52
  isLongLoading: E,
54
- getAiSuggestions: V,
55
- clearState: b,
56
- suggestions: W
57
- } = te();
58
- O(() => () => {
59
- b();
60
- }, [b, e?.id]);
61
- const F = e?.templateKey === ee, j = async (a) => {
62
- await N(a, ie(a, e));
63
- }, _ = (a) => {
64
- a ? g(!0) : P();
65
- }, $ = () => {
66
- h(!0);
67
- }, q = {
53
+ getAiSuggestions: K,
54
+ clearState: h,
55
+ suggestions: V
56
+ } = ee();
57
+ S(() => () => {
58
+ h();
59
+ }, [h, e?.id]);
60
+ const b = e?.templateKey === Z, W = async (a) => {
61
+ await k(a, re(a, e));
62
+ }, j = (a) => {
63
+ a ? u(!0) : R();
64
+ }, _ = () => {
65
+ C(!0);
66
+ }, $ = {
68
67
  metadata: {
69
68
  ...e
70
69
  }
71
- }, M = D(null), [S, J] = y(null);
72
- O(() => {
73
- J(o ?? M.current);
74
- }, [o, e?.templateKey, e?.scope]);
75
- const z = Z(() => {
70
+ }, F = x(null), [M, q] = y(null);
71
+ S(() => {
72
+ q(n ?? F.current);
73
+ }, [n, e?.templateKey, e?.scope]);
74
+ const J = Y(() => {
76
75
  const a = e?.fields.length === 0;
77
- if (F)
78
- return /* @__PURE__ */ t(re, {
79
- isLoading: n
76
+ if (b)
77
+ return /* @__PURE__ */ t(se, {
78
+ isLoading: o
80
79
  });
81
80
  if (a)
82
- return /* @__PURE__ */ t(ne, {
81
+ return /* @__PURE__ */ t(ae, {
83
82
  isBoxAiSuggestionsFeatureEnabled: c,
84
83
  level: "instance"
85
84
  });
86
- const r = !!(n || m);
87
- return /* @__PURE__ */ x("div", {
88
- className: H(d.metadataInstanceFormContent, r && d.showOverlay),
89
- children: [/* @__PURE__ */ t(se, {
85
+ const r = !!(o || m);
86
+ return /* @__PURE__ */ O("div", {
87
+ className: G(d.metadataInstanceFormContent, r && d.showOverlay),
88
+ children: [/* @__PURE__ */ t(oe, {
90
89
  errorCode: m,
91
- isFetchingSuggestions: n,
90
+ isFetchingSuggestions: o,
92
91
  isLongLoading: E
93
- }), /* @__PURE__ */ t(ae, {
94
- disableForm: n,
95
- isExternallyOwned: f,
96
- isMultilevelTaxonomyFieldEnabled: p,
97
- portalElement: o ?? S,
98
- taxonomyOptionsFetcher: C
92
+ }), /* @__PURE__ */ t(ne, {
93
+ disableForm: o,
94
+ isExternallyOwned: e?.isExternallyOwned,
95
+ isMultilevelTaxonomyFieldEnabled: f,
96
+ portalElement: n ?? M,
97
+ taxonomyOptionsFetcher: g
99
98
  })]
100
99
  });
101
- }, [e?.fields.length, F, n, E, o, S, C, c, f, p, m]);
102
- return /* @__PURE__ */ t(oe, {
103
- isConfidenceScoreReviewEnabled: U,
104
- children: /* @__PURE__ */ t(Q, {
105
- initialValues: q,
106
- onSubmit: j,
100
+ }, [e?.fields.length, b, o, E, n, M, g, c, f, m, e?.isExternallyOwned]);
101
+ return /* @__PURE__ */ t(te, {
102
+ isConfidenceScoreReviewEnabled: N,
103
+ children: /* @__PURE__ */ t(H, {
104
+ initialValues: $,
105
+ onSubmit: W,
107
106
  children: ({
108
107
  values: a,
109
108
  dirty: r
110
- }) => /* @__PURE__ */ x(X, {
111
- children: [/* @__PURE__ */ t(B, {
109
+ }) => /* @__PURE__ */ O(Q, {
110
+ children: [/* @__PURE__ */ t(U, {
112
111
  areAiSuggestionsAvailable: l,
113
112
  className: d.metadataInstanceForm,
114
- formRef: M,
113
+ formRef: F,
115
114
  formValues: a,
116
- getAiSuggestions: V,
117
- handleCancel: _,
118
- handleDelete: $,
119
- isAdvancedExtractAgentEnabled: v,
115
+ getAiSuggestions: K,
116
+ handleCancel: j,
117
+ handleDelete: _,
118
+ isAdvancedExtractAgentEnabled: D,
120
119
  isAiSuggestionsFeatureEnabled: c,
121
- isBetaLanguageEnabled: I,
122
- isDeleteButtonDisabled: A,
123
- isFetchingSuggestions: n,
120
+ isBetaLanguageEnabled: v,
121
+ isDeleteButtonDisabled: I,
122
+ isFetchingSuggestions: o,
124
123
  isFormDirty: r,
125
124
  isLargeFile: s,
126
125
  selectedTemplateInstance: e,
127
- suggestions: W,
128
- children: e && z
129
- }), u && /* @__PURE__ */ t(ce, {
126
+ suggestions: V,
127
+ children: e && J
128
+ }), p && /* @__PURE__ */ t(me, {
130
129
  dirty: r,
131
- onChange: u,
130
+ onChange: p,
132
131
  values: a
133
- }), /* @__PURE__ */ t(me, {
134
- onBackToEdit: () => g(!1),
135
- onDiscardChanges: w,
136
- open: R
137
- }), /* @__PURE__ */ t(G, {
138
- isCheckboxEnabled: T,
139
- onConfirm: () => k(e),
140
- onDismiss: () => h(!1),
141
- open: K,
132
+ }), /* @__PURE__ */ t(le, {
133
+ onBackToEdit: () => u(!1),
134
+ onDiscardChanges: P,
135
+ open: T
136
+ }), /* @__PURE__ */ t(z, {
137
+ isCheckboxEnabled: A,
138
+ onConfirm: () => L(e),
139
+ onDismiss: () => C(!1),
140
+ open: B,
142
141
  templateName: e?.displayName
143
142
  })]
144
143
  })
@@ -146,5 +145,5 @@ const ce = ({
146
145
  });
147
146
  };
148
147
  export {
149
- Te as MetadataInstanceForm
148
+ Ae as MetadataInstanceForm
150
149
  };
@@ -1,11 +1,11 @@
1
- import { ConfidenceScoreContextProvider as f } from "../../utils/confidence-score-context.js";
2
- import { getVisibleTemplates as l } from "../../utils/utils.js";
3
- import { MetadataInstance as p } from "./subcomponents/metadata-instance/metadata-instance.js";
1
+ import { ConfidenceScoreContextProvider as d } from "../../utils/confidence-score-context.js";
2
+ import { getVisibleTemplates as f } from "../../utils/utils.js";
3
+ import { MetadataInstance as l } from "./subcomponents/metadata-instance/metadata-instance.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
5
  import "./subcomponents/metadata-instance-header/metadata-instance-header.js";
6
- import '../../../../styles/metadata-instance-list.css';const I = "_metadataInstanceList_bd83w_1", L = {
7
- metadataInstanceList: I
8
- }, C = ({
6
+ import '../../../../styles/metadata-instance-list.css';const p = "_metadataInstanceList_bd83w_1", I = {
7
+ metadataInstanceList: p
8
+ }, v = ({
9
9
  areAiSuggestionsAvailable: e,
10
10
  isAiSuggestionsFeatureEnabled: s,
11
11
  isBetaLanguageEnabled: n,
@@ -13,18 +13,16 @@ import '../../../../styles/metadata-instance-list.css';const I = "_metadataInsta
13
13
  templateInstances: o,
14
14
  taxonomyNodeFetcher: r,
15
15
  isAdvancedExtractAgentEnabled: m = !1,
16
- isConfidenceScoreReviewEnabled: c = !1,
17
- isExternallyOwned: d = !1
18
- }) => /* @__PURE__ */ t(f, {
16
+ isConfidenceScoreReviewEnabled: c = !1
17
+ }) => /* @__PURE__ */ t(d, {
19
18
  isConfidenceScoreReviewEnabled: c,
20
19
  children: /* @__PURE__ */ t("div", {
21
- className: L.metadataInstanceList,
22
- children: l(o).map((a) => /* @__PURE__ */ t(p, {
20
+ className: I.metadataInstanceList,
21
+ children: f(o).map((a) => /* @__PURE__ */ t(l, {
23
22
  areAiSuggestionsAvailable: e,
24
23
  isAdvancedExtractAgentEnabled: m,
25
24
  isAiSuggestionsFeatureEnabled: s,
26
25
  isBetaLanguageEnabled: n,
27
- isExternallyOwned: d,
28
26
  onEdit: i,
29
27
  taxonomyNodeFetcher: r,
30
28
  templateInstance: a
@@ -32,5 +30,5 @@ import '../../../../styles/metadata-instance-list.css';const I = "_metadataInsta
32
30
  })
33
31
  });
34
32
  export {
35
- C as MetadataInstanceList
33
+ v as MetadataInstanceList
36
34
  };
@@ -1,56 +1,54 @@
1
- import { Card as b, Divider as n } from "@box/blueprint-web";
2
- import { useState as g } from "react";
3
- import { useAutofill as H } from "../../../../utils/autofill-context.js";
4
- import { MetadataEmptyState as _ } from "../../../metadata-empty-state/metadata-empty-state.js";
5
- import { MetadataInstanceContent as M } from "../metadata-instance-content/metadata-instance-content.js";
6
- import { MetadataInstanceFooter as N } from "../metadata-instance-footer/metadata-instance-footer.js";
7
- import { MetadataInstanceHeader as x } from "../metadata-instance-header/metadata-instance-header.js";
1
+ import { Card as S, Divider as n } from "@box/blueprint-web";
2
+ import { useState as b } from "react";
3
+ import { useAutofill as g } from "../../../../utils/autofill-context.js";
4
+ import { MetadataEmptyState as H } from "../../../metadata-empty-state/metadata-empty-state.js";
5
+ import { MetadataInstanceContent as _ } from "../metadata-instance-content/metadata-instance-content.js";
6
+ import { MetadataInstanceFooter as M } from "../metadata-instance-footer/metadata-instance-footer.js";
7
+ import { MetadataInstanceHeader as N } from "../metadata-instance-header/metadata-instance-header.js";
8
8
  import { jsxs as r, jsx as o, Fragment as u } from "react/jsx-runtime";
9
- import '../../../../../../styles/metadata-instance.css';const F = "_topDivider_tzhlb_1", j = "_bottomDivider_tzhlb_5", p = {
10
- topDivider: F,
11
- bottomDivider: j
12
- }, G = ({
9
+ import '../../../../../../styles/metadata-instance.css';const x = "_topDivider_tzhlb_1", F = "_bottomDivider_tzhlb_5", p = {
10
+ topDivider: x,
11
+ bottomDivider: F
12
+ }, q = ({
13
13
  areAiSuggestionsAvailable: y,
14
14
  isAiSuggestionsFeatureEnabled: l,
15
15
  isBetaLanguageEnabled: c,
16
16
  onEdit: d,
17
17
  templateInstance: t,
18
18
  taxonomyNodeFetcher: h,
19
- isAdvancedExtractAgentEnabled: v = !1,
20
- isExternallyOwned: E
19
+ isAdvancedExtractAgentEnabled: v = !1
21
20
  }) => {
22
- const i = t.fields, m = (e) => !e.value || Array.isArray(e.value) && e.value.length === 0, f = i.every(m), V = i.some(m), A = i.length > 0, [a, s] = g(!0), {
23
- getAiSuggestions: D
24
- } = H(), S = (e) => {
25
- d(t), D(t.templateKey, t.scope, e);
21
+ const i = t.fields, m = (e) => !e.value || Array.isArray(e.value) && e.value.length === 0, E = i.every(m), f = i.some(m), V = i.length > 0, [a, s] = b(!0), {
22
+ getAiSuggestions: A
23
+ } = g(), D = (e) => {
24
+ d(t), A(t.templateKey, t.scope, e);
26
25
  };
27
- return /* @__PURE__ */ r(b, {
28
- children: [/* @__PURE__ */ o(x, {
26
+ return /* @__PURE__ */ r(S, {
27
+ children: [/* @__PURE__ */ o(N, {
29
28
  areAiSuggestionsAvailable: y,
30
29
  canEdit: t.canEdit,
31
30
  isAdvancedExtractAgentEnabled: v,
32
31
  isAiSuggestionsFeatureEnabled: l,
33
32
  isBetaLanguageEnabled: c,
34
- onAutofill: S,
33
+ onAutofill: D,
35
34
  onEdit: () => d(t),
36
35
  templateName: t?.displayName
37
36
  }), /* @__PURE__ */ o(n, {
38
37
  className: p.topDivider
39
- }), a && f ? /* @__PURE__ */ o(_, {
40
- isAnyEmptyValueHidden: A,
38
+ }), a && E ? /* @__PURE__ */ o(H, {
39
+ isAnyEmptyValueHidden: V,
41
40
  isBoxAiSuggestionsFeatureEnabled: l,
42
41
  level: "instance",
43
42
  onShowEmptyValues: () => s(!1)
44
43
  }) : /* @__PURE__ */ r(u, {
45
- children: [/* @__PURE__ */ o(M, {
46
- isExternallyOwned: E,
44
+ children: [/* @__PURE__ */ o(_, {
47
45
  shouldHideEmptyValues: a,
48
46
  taxonomyNodeFetcher: h,
49
47
  templateInstance: t
50
- }), V && /* @__PURE__ */ r(u, {
48
+ }), f && /* @__PURE__ */ r(u, {
51
49
  children: [/* @__PURE__ */ o(n, {
52
50
  className: p.bottomDivider
53
- }), /* @__PURE__ */ o(N, {
51
+ }), /* @__PURE__ */ o(M, {
54
52
  isAnyEmptyValueHidden: a,
55
53
  onHideEmptyValues: () => s(!0),
56
54
  onShowEmptyValues: () => s(!1)
@@ -60,5 +58,5 @@ import '../../../../../../styles/metadata-instance.css';const F = "_topDivider_t
60
58
  });
61
59
  };
62
60
  export {
63
- G as MetadataInstance
61
+ q as MetadataInstance
64
62
  };
@@ -1,22 +1,21 @@
1
- import { MetadataInstanceEntry as m } from "../metadata-instance-entry/metadata-instance-entry.js";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import '../../../../../../styles/metadata-instance-content.css';const r = "_metadataInstanceContent_1a9zf_1", p = {
1
+ import { MetadataInstanceEntry as c } from "../metadata-instance-entry/metadata-instance-entry.js";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import '../../../../../../styles/metadata-instance-content.css';const r = "_metadataInstanceContent_1a9zf_1", m = {
4
4
  metadataInstanceContent: r
5
- }, i = ({
5
+ }, p = ({
6
6
  shouldHideEmptyValues: a,
7
- templateInstance: e,
8
- taxonomyNodeFetcher: o,
9
- isExternallyOwned: c
7
+ templateInstance: n,
8
+ taxonomyNodeFetcher: o
10
9
  }) => {
11
10
  const {
12
11
  fields: s = []
13
- } = e;
14
- return /* @__PURE__ */ n("div", {
15
- className: p.metadataInstanceContent,
16
- children: s.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ n(m, {
12
+ } = n;
13
+ return /* @__PURE__ */ e("div", {
14
+ className: m.metadataInstanceContent,
15
+ children: s.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ e(c, {
17
16
  confidenceScore: t.confidenceScore,
18
17
  description: t.description,
19
- isExternallyOwned: c,
18
+ isExternallyOwned: n.isExternallyOwned,
20
19
  name: t.displayName || t.key,
21
20
  scope: t.namespace,
22
21
  shouldHideEmptyValues: a,
@@ -28,5 +27,5 @@ import '../../../../../../styles/metadata-instance-content.css';const r = "_meta
28
27
  });
29
28
  };
30
29
  export {
31
- i as MetadataInstanceContent
30
+ p as MetadataInstanceContent
32
31
  };
@@ -1 +1 @@
1
- ._autofillOverlay_1s073_1{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;padding:var(--space-4) var(--space-4) 0 var(--space-4);background:#fafcfee6}._withError_1s073_15{background-color:#ffffffe6}._autofillOverlayTitle_1s073_19{margin-top:var(--space-4);text-align:center}._autofillOverlayDescription_1s073_24{text-align:center}._dismissButton_1s073_28{margin-top:var(--space-4)}._overlayIcon_1s073_32{position:relative;display:block;margin-top:var(--space-4)}._testContainerStyle_1s073_38{position:relative;width:380px;height:600px;padding:var(--space-4);border:1px solid #000}
1
+ ._autofillOverlay_16p2j_1{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;padding:var(--space-4) var(--space-4) 0 var(--space-4);background:#fafcfee6}._withError_16p2j_12{background-color:#ffffffe6}._autofillOverlayTitle_16p2j_16{margin-top:var(--space-4);text-align:center}._autofillOverlayDescription_16p2j_21{text-align:center}._dismissButton_16p2j_25{margin-top:var(--space-4)}._overlayIcon_16p2j_29{position:relative;display:block;margin-top:var(--space-4)}._testContainerStyle_16p2j_35{position:relative;width:380px;height:600px;padding:var(--space-4);border:1px solid #000}
@@ -1 +1 @@
1
- ._content_2vpjl_2{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);z-index:2147483647;box-sizing:border-box;width:17.75rem;padding:0;color:var(--text-text-on-light);background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);box-shadow:var(--dropshadow-3)}._scrollableContainer_2vpjl_21{max-height:22.5rem;padding:var(--space-3)}._item_2vpjl_26{position:relative;align-items:center;padding:var(--border-8);border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;-webkit-user-select:none;user-select:none}._option_2vpjl_36{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}._option_2vpjl_36[aria-disabled]{color:var(--gray-65);pointer-events:none}._option_2vpjl_36[data-active-item]:not(:hover),._option_2vpjl_36[data-highlighted]:not(:hover){background-color:var(--surface-menu-surface-hover);border:var(--border-2) solid var(--border-input-border-focus)}._option_2vpjl_36[data-state=open],._option_2vpjl_36:hover{background-color:var(--surface-menu-surface-hover)}._search_2vpjl_57{position:relative;height:fit-content;padding:var(--space-3)}._search_2vpjl_57 ._searchIcon_2vpjl_62{position:absolute;top:var(--space-8);left:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%);pointer-events:none}._search_2vpjl_57 ._searchIcon_2vpjl_62._global_2vpjl_71{left:var(--space-4);width:var(--size-5);height:var(--size-5)}._search_2vpjl_57 ._clearSearchIcon_2vpjl_76{position:absolute;top:var(--space-8);right:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%)}._search_2vpjl_57 ._searchInput_2vpjl_84{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);box-sizing:border-box;width:100%;height:var(--size-10);padding-inline:var(--space-9) var(--space-6);padding-block:0;color:var(--text-text-on-light);background-color:var(--surface-search-surface);border:var(--border-1) solid transparent;border-radius:var(--radius-2);outline:0;box-shadow:unset;transition:border-color .15s ease,background-color .15s ease}._search_2vpjl_57 ._searchInput_2vpjl_84._global_2vpjl_71{height:var(--size-12);border-radius:var(--radius-7);padding-inline:var(--space-12) var(--space-6)}._search_2vpjl_57 ._searchInput_2vpjl_84::-webkit-search-decoration,._search_2vpjl_57 ._searchInput_2vpjl_84::-webkit-search-cancel-button,._search_2vpjl_57 ._searchInput_2vpjl_84::-webkit-search-results-button,._search_2vpjl_57 ._searchInput_2vpjl_84::-webkit-search-results-decoration{appearance:none}._search_2vpjl_57 ._searchInput_2vpjl_84:hover{box-shadow:unset}._search_2vpjl_57 ._searchInput_2vpjl_84 ._firefoxDefaultOpacityFix_2vpjl_116,._search_2vpjl_57 ._searchInput_2vpjl_84 ._searchInput_2vpjl_84::placeholder{opacity:1}._search_2vpjl_57 ._searchInput_2vpjl_84::placeholder{color:var(--text-text-on-light-secondary)}._search_2vpjl_57 ._searchInput_2vpjl_84:not(:placeholder-shown){padding-inline-end:var(--space-8)}._search_2vpjl_57 ._searchInput_2vpjl_84:focus-visible{padding-inline-start:calc(var(--space-9) - var(--border-1));background-color:var(--surface-search-surface-focused);border:var(--border-2) solid #2486fc}._search_2vpjl_57 ._searchInput_2vpjl_84:not(:focus-visible):not(:disabled):hover{background-color:var(--surface-search-surface-hover);border-color:#6f6f6f}._search_2vpjl_57 ._divider_2vpjl_134{box-shadow:var(--dropshadow-3)}._searchDivider_2vpjl_138{box-shadow:var(--dropshadow-1)}
1
+ ._content_1xvav_2{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);z-index:2147483647;box-sizing:border-box;width:17.75rem;padding:0;color:var(--text-text-on-light);background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);box-shadow:var(--dropshadow-3)}._scrollableContainer_1xvav_21{max-height:22.5rem;padding:var(--space-3)}._item_1xvav_26{position:relative;align-items:center;padding:var(--border-8);border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;-webkit-user-select:none;user-select:none}._option_1xvav_36{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}._option_1xvav_36[aria-disabled]{color:var(--gray-65);pointer-events:none}._option_1xvav_36[data-active-item]:not(:hover),._option_1xvav_36[data-highlighted]:not(:hover){background-color:var(--surface-menu-surface-hover);border:var(--border-2) solid var(--border-input-border-focus)}._option_1xvav_36[data-state=open],._option_1xvav_36:hover{background-color:var(--surface-menu-surface-hover)}._search_1xvav_57{position:relative;height:fit-content;padding:var(--space-3)}._search_1xvav_57 ._searchIcon_1xvav_62{position:absolute;top:var(--space-8);left:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%);pointer-events:none}._search_1xvav_57 ._searchIcon_1xvav_62._global_1xvav_71{left:var(--space-4);width:var(--size-5);height:var(--size-5)}._search_1xvav_57 ._clearSearchIcon_1xvav_76{position:absolute;top:var(--space-8);right:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%)}._search_1xvav_57 ._searchInput_1xvav_84{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);box-sizing:border-box;width:100%;height:var(--size-10);padding-inline:var(--space-9) var(--space-6);padding-block:0;color:var(--text-text-on-light);background-color:var(--surface-search-surface);border:var(--border-1) solid transparent;border-radius:var(--radius-2);outline:0;box-shadow:unset;transition:border-color .15s ease,background-color .15s ease}._search_1xvav_57 ._searchInput_1xvav_84._global_1xvav_71{height:var(--size-12);border-radius:var(--radius-7);padding-inline:var(--space-12) var(--space-6)}._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-decoration,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-cancel-button,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-results-button,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-results-decoration{appearance:none}._search_1xvav_57 ._searchInput_1xvav_84:hover{box-shadow:unset}._search_1xvav_57 ._searchInput_1xvav_84 ._firefoxDefaultOpacityFix_1xvav_116,._search_1xvav_57 ._searchInput_1xvav_84 ._searchInput_1xvav_84::placeholder{opacity:1}._search_1xvav_57 ._searchInput_1xvav_84::placeholder{color:var(--text-text-on-light-secondary)}._search_1xvav_57 ._searchInput_1xvav_84:not(:placeholder-shown){padding-inline-end:var(--space-8)}._search_1xvav_57 ._searchInput_1xvav_84:focus-visible{padding-inline-start:calc(var(--space-9) - var(--border-1));background-color:var(--surface-search-surface-focused);border:var(--border-2) solid #2486fc}._search_1xvav_57 ._searchInput_1xvav_84:not(:focus-visible,:disabled):hover{background-color:var(--surface-search-surface-hover);border-color:#6f6f6f}._search_1xvav_57 ._divider_1xvav_134{box-shadow:var(--dropshadow-3)}._searchDivider_1xvav_138{box-shadow:var(--dropshadow-1)}
@@ -1 +1 @@
1
- ._popoverContentContainer_1vfhn_2{width:18.25rem;outline:none}._popoverMainContent_1vfhn_7{max-height:calc(var(--radix-popover-content-available-height) - var(--space-8) - var(--space-2) - var(--border-1))}._loadingIndicatorWrapper_1vfhn_11{position:relative;display:flex;align-items:end;height:var(--size-8)}._errorMessageWrapper_1vfhn_18{display:flex;flex-direction:column;justify-content:center}._errorMessageWrapper_1vfhn_18 ._errorMessageWrapperText_1vfhn_23{display:flex;gap:var(--space-1);align-items:center;justify-content:center;height:var(--size-8)}._container_1vfhn_31{display:flex;gap:var(--space-1);justify-content:center}table._taxonomyAncestorTable_1vfhn_37{width:100%;table-layout:fixed;border-spacing:0}table._taxonomyAncestorTable_1vfhn_37>tbody>tr{display:flex;flex-direction:column}table._taxonomyAncestorTable_1vfhn_37>tbody>tr:not(:last-child){margin-block-end:var(--space-2)}table._taxonomyAncestorTable_1vfhn_37>tbody>tr>th{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;padding:0;color:var(--text-text-on-light-secondary-hover);text-align:start}table._taxonomyAncestorTable_1vfhn_37>tbody>tr>td{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);display:block;padding:0;color:var(--text-text-on-light);word-break:break-all}@media(max-width:767px){._taxonomyValueGroup_1vfhn_80{flex-wrap:wrap}}._taxonomyValueButton_1vfhn_85{overflow-x:hidden}._taxonomyValueButton_1vfhn_85:focus-visible{overflow-x:hidden}._taxonomyValueButton_1vfhn_85:disabled{color:var(--text-text-on-light)}._taxonomyValueButton_1vfhn_85 ._taxonomyValueLabel_1vfhn_95{overflow-x:hidden;text-overflow:ellipsis}
1
+ ._popoverContentContainer_f0vo4_2{width:18.25rem;outline:none}._popoverMainContent_f0vo4_7{max-height:calc(var(--radix-popover-content-available-height) - var(--space-8) - var(--space-2) - var(--border-1))}._loadingIndicatorWrapper_f0vo4_11{position:relative;display:flex;align-items:end;height:var(--size-8)}._errorMessageWrapper_f0vo4_18{display:flex;flex-direction:column;justify-content:center}._errorMessageWrapper_f0vo4_18 ._errorMessageWrapperText_f0vo4_23{display:flex;gap:var(--space-1);align-items:center;justify-content:center;height:var(--size-8)}._container_f0vo4_31{display:flex;gap:var(--space-1);justify-content:center}table._taxonomyAncestorTable_f0vo4_37{width:100%;table-layout:fixed;border-spacing:0}table._taxonomyAncestorTable_f0vo4_37>tbody>tr{display:flex;flex-direction:column}table._taxonomyAncestorTable_f0vo4_37>tbody>tr:not(:last-child){margin-block-end:var(--space-2)}table._taxonomyAncestorTable_f0vo4_37>tbody>tr>th{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;padding:0;color:var(--text-text-on-light-secondary-hover);text-align:start}table._taxonomyAncestorTable_f0vo4_37>tbody>tr>td{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);display:block;padding:0;color:var(--text-text-on-light);word-break:break-all}@media(max-width:767px){._taxonomyValueGroup_f0vo4_80{flex-wrap:wrap}}._taxonomyValueButton_f0vo4_85{overflow-x:hidden}._taxonomyValueButton_f0vo4_85:focus-visible{overflow-x:hidden}._taxonomyValueButton_f0vo4_85:disabled{color:var(--text-text-on-light)}._taxonomyValueButton_f0vo4_85 ._taxonomyValueLabel_f0vo4_95{overflow-x:hidden;text-overflow:ellipsis}
@@ -1 +1 @@
1
- ._noAttributesText_1n8yf_2{text-align:center}._fieldWrapper_1n8yf_6{position:relative;isolation:isolate}._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>input,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>button,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div[role=group]>div,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div>div,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>input:not(:disabled):not(:focus-visible):not(._error_1n8yf_20):hover,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>button:not(:disabled):not(:focus-visible):not(._error_1n8yf_20):hover,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_1n8yf_20):hover,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div>div:not(:disabled):not(:focus-visible):not(._error_1n8yf_20):hover,._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11>div>input:not(:disabled):not(:focus-visible):not(._error_1n8yf_20):hover{border-bottom:none}._fieldWrapper_1n8yf_6 ._hasSuggestion_1n8yf_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_1n8yf_6 ._dateField_1n8yf_33>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>._comboboxContainer_1n8yf_37,._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>input,._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>button,._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>div[role=group]>div,._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>div>div,._fieldWrapper_1n8yf_6 ._suggestionApplied_1n8yf_37>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_1n8yf_52{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_1n8yf_52 ._labelText_1n8yf_58{flex:unset!important}._labelWrapper_1n8yf_52 ._labelTruncated_1n8yf_61{flex:0 1 auto!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._labelWrapper_1n8yf_52 ._labelIcon_1n8yf_68{flex-shrink:0;width:var(--space-4);height:var(--space-4);margin-inline-end:var(--space-3);margin-inline-start:var(--space-3)}
1
+ ._noAttributesText_6p6pr_2{text-align:center}._fieldWrapper_6p6pr_6{position:relative;isolation:isolate}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>input,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>button,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div[role=group]>div,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>div,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>input:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>button:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div[role=group]>div:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>div:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>input:not(:disabled,:focus-visible,._error_6p6pr_20):hover{border-bottom:none}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_6p6pr_6 ._dateField_6p6pr_33>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>._comboboxContainer_6p6pr_37,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>input,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>button,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>div[role=group]>div,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>div>div,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_6p6pr_52{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_6p6pr_52 ._labelText_6p6pr_58{flex:unset!important}._labelWrapper_6p6pr_52 ._labelTruncated_6p6pr_61{flex:0 1 auto!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._labelWrapper_6p6pr_52 ._labelIcon_6p6pr_68{flex-shrink:0;width:var(--space-4);height:var(--space-4);margin-inline:var(--space-3)}
@@ -11,8 +11,6 @@ export type MetadataInstanceFormProps = {
11
11
  isDeleteButtonDisabled: boolean;
12
12
  isDeleteConfirmationModalCheckboxEnabled: boolean;
13
13
  isLargeFile: boolean;
14
- /** When true, the form is disabled for cross-enterprise metadata taxonomy fields */
15
- isExternallyOwned?: boolean;
16
14
  /** When true enables the multilevel taxonomy filed component with tree selection */
17
15
  isMultilevelTaxonomyFieldEnabled: boolean;
18
16
  isUnsavedChangesModalOpen: boolean;
@@ -1,2 +1,2 @@
1
1
  import { MetadataInstanceListProps } from './types';
2
- export declare const MetadataInstanceList: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstances, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, isConfidenceScoreReviewEnabled, isExternallyOwned, }: MetadataInstanceListProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MetadataInstanceList: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstances, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, isConfidenceScoreReviewEnabled, }: MetadataInstanceListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { MetadataInstanceProps } from './types';
2
- export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstance, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, isExternallyOwned, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstance, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,5 +8,4 @@ export type MetadataInstanceProps = {
8
8
  templateInstance: MetadataTemplateInstance;
9
9
  taxonomyNodeFetcher: TaxonomyNodeFetcher;
10
10
  isAdvancedExtractAgentEnabled?: boolean;
11
- isExternallyOwned?: boolean;
12
11
  };
@@ -1,2 +1,2 @@
1
1
  import { MetadataInstanceContentProps } from './types';
2
- export declare const MetadataInstanceContent: ({ shouldHideEmptyValues, templateInstance, taxonomyNodeFetcher, isExternallyOwned, }: MetadataInstanceContentProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MetadataInstanceContent: ({ shouldHideEmptyValues, templateInstance, taxonomyNodeFetcher, }: MetadataInstanceContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { MetadataTemplateInstance } from '../../../../types';
2
2
  import { TaxonomyNodeFetcher } from '../metadata-instance-entry/types';
3
3
  export type MetadataInstanceContentProps = {
4
- isExternallyOwned?: boolean;
5
4
  shouldHideEmptyValues: boolean;
6
5
  templateInstance: MetadataTemplateInstance;
7
6
  taxonomyNodeFetcher: TaxonomyNodeFetcher;
@@ -6,7 +6,6 @@ export type MetadataInstanceListProps = {
6
6
  isBetaLanguageEnabled: boolean;
7
7
  isAdvancedExtractAgentEnabled?: boolean;
8
8
  isConfidenceScoreReviewEnabled?: boolean;
9
- isExternallyOwned?: boolean;
10
9
  onEdit: (templateInstacne: MetadataTemplateInstance) => void;
11
10
  templateInstances: MetadataTemplateInstance[];
12
11
  taxonomyNodeFetcher: TaxonomyNodeFetcher;
@@ -104,6 +104,7 @@ export type MetadataTemplateInstance = {
104
104
  scope: string;
105
105
  templateKey: string;
106
106
  type: string;
107
+ isExternallyOwned?: boolean;
107
108
  };
108
109
  export type TemplateSuggestion = Record<MetadataTemplateField['key'], MetadataTemplateField['aiSuggestion']>;
109
110
  export type AutofillSuggestions = Record<MetadataTemplateInstance['templateKey'], TemplateSuggestion>;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "1.37.0",
3
+ "version": "1.38.1",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
- "@box/box-ai-agent-selector": "^1.30.2",
7
- "@box/blueprint-web": "^12.135.0",
8
- "@box/blueprint-web-assets": "^4.101.1",
9
- "@box/combobox-with-api": "^1.32.2",
6
+ "@box/box-ai-agent-selector": "^1.30.3",
7
+ "@box/blueprint-web": "^12.135.1",
8
+ "@box/blueprint-web-assets": "^4.101.2",
9
+ "@box/combobox-with-api": "^1.32.3",
10
10
  "formik": "^2.0.3",
11
11
  "lodash": "^4.17.15",
12
12
  "react": "^17.0.0 || ^18.0.0",
@@ -15,11 +15,11 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@ariakit/react": "0.4.15",
18
- "@box/box-ai-agent-selector": "^1.30.2",
18
+ "@box/box-ai-agent-selector": "^1.30.3",
19
19
  "@box/babel-plugin-target-attributes": "1.4.0",
20
- "@box/blueprint-web": "^12.135.0",
21
- "@box/blueprint-web-assets": "^4.101.1",
22
- "@box/storybook-utils": "^0.16.38",
20
+ "@box/blueprint-web": "^12.135.1",
21
+ "@box/blueprint-web-assets": "^4.101.2",
22
+ "@box/storybook-utils": "^0.16.39",
23
23
  "@testing-library/react": "^15.0.6",
24
24
  "react": "^18.3.0",
25
25
  "react-dom": "^18.3.0",