@box/metadata-editor 1.11.0 → 1.11.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.
@@ -1,62 +1,65 @@
1
- import { LoadingIndicator as v, Text as c, TextButton as d } from "@box/blueprint-web";
2
- import { AlertTriangle as p } from "@box/blueprint-web-assets/icons/Line";
3
- import { SurfaceStatusSurfaceError as _, Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
4
- import g from "clsx";
5
- import { useState as O } from "react";
1
+ import { LoadingIndicator as y, Text as m, TextButton as g } from "@box/blueprint-web";
2
+ import { AlertTriangle as v } from "@box/blueprint-web-assets/icons/Line";
3
+ import { SurfaceStatusSurfaceError as p, Size5 as f } from "@box/blueprint-web-assets/tokens/tokens";
4
+ import O from "clsx";
5
+ import { useState as T } from "react";
6
6
  import { useIntl as h } from "react-intl";
7
- import e from "./messages.js";
8
- import { useErrorMessaging as S } from "./useErrorMessaging.js";
9
- import { jsxs as T, jsx as a } from "react/jsx-runtime";
10
- import '../../../../../../styles/autofill-overlay.css';const x = "_autofillOverlay_1s073_1", B = "_withError_1s073_15", D = "_autofillOverlayTitle_1s073_19", I = "_autofillOverlayDescription_1s073_24", M = "_dismissButton_1s073_28", E = "_overlayIcon_1s073_32", N = "_testContainerStyle_1s073_38", s = {
11
- autofillOverlay: x,
12
- withError: B,
13
- autofillOverlayTitle: D,
14
- autofillOverlayDescription: I,
7
+ import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as S } from "../../../../constants.js";
8
+ import a from "./messages.js";
9
+ import { useErrorMessaging as E } from "./useErrorMessaging.js";
10
+ import { jsxs as I, jsx as i } from "react/jsx-runtime";
11
+ import '../../../../../../styles/autofill-overlay.css';const A = "_autofillOverlay_1s073_1", x = "_withError_1s073_15", B = "_autofillOverlayTitle_1s073_19", D = "_autofillOverlayDescription_1s073_24", M = "_dismissButton_1s073_28", N = "_overlayIcon_1s073_32", L = "_testContainerStyle_1s073_38", s = {
12
+ autofillOverlay: A,
13
+ withError: x,
14
+ autofillOverlayTitle: B,
15
+ autofillOverlayDescription: D,
15
16
  dismissButton: M,
16
- overlayIcon: E,
17
- testContainerStyle: N
18
- }, G = ({
17
+ overlayIcon: N,
18
+ testContainerStyle: L
19
+ }, q = ({
19
20
  errorCode: t,
20
- isFetchingSuggestions: f,
21
- isLongLoading: o
21
+ isFetchingSuggestions: u,
22
+ isLongLoading: l
22
23
  }) => {
23
- const i = h(), [u, y] = O(!1), r = S(t);
24
- let l = i.formatMessage(e.defaultLoadingMessage);
25
- t && (l = r.title), o && (l = i.formatMessage(e.longLoadingTitle));
26
- const n = o ? i.formatMessage(e.longLoadingDescription) : t && r.description;
27
- return !f && !t || u ? null : /* @__PURE__ */ T("div", {
28
- className: g(s.autofillOverlay, t && s.withError),
29
- children: [t ? /* @__PURE__ */ a(p, {
24
+ const e = h(), [d, _] = T(!1), r = E(t);
25
+ let o = e.formatMessage(a.defaultLoadingMessage);
26
+ t && (o = r.title);
27
+ const n = localStorage.getItem(S);
28
+ l && n === "standard" && (o = e.formatMessage(a.longLoadingTitle));
29
+ const c = l && n === "standard" ? e.formatMessage(a.longLoadingDescription) : t && r.description;
30
+ return !u && !t || d ? null : /* @__PURE__ */ I("div", {
31
+ className: O(s.autofillOverlay, t && s.withError),
32
+ children: [t ? /* @__PURE__ */ i(v, {
30
33
  className: s.overlayIcon,
31
- color: _,
32
- height: m,
34
+ color: p,
35
+ height: f,
33
36
  role: "presentation",
34
- width: m
35
- }) : /* @__PURE__ */ a(v, {
36
- "aria-label": i.formatMessage(e.loadingAriaLabel),
37
+ width: f
38
+ }) : /* @__PURE__ */ i(y, {
39
+ "aria-label": e.formatMessage(a.loadingAriaLabel),
37
40
  "aria-live": "polite",
38
41
  className: s.overlayIcon,
39
42
  size: "large",
40
43
  variant: "default"
41
- }), /* @__PURE__ */ a(c, {
44
+ }), /* @__PURE__ */ i(m, {
42
45
  as: "p",
43
46
  className: s.autofillOverlayTitle,
44
47
  variant: "subtitle",
45
- children: l
46
- }), n && /* @__PURE__ */ a(c, {
48
+ children: o
49
+ }), c && /* @__PURE__ */ i(m, {
47
50
  as: "p",
48
51
  className: s.autofillOverlayDescription,
49
52
  color: "textOnLightSecondary",
50
53
  variant: "bodyDefault",
51
- children: n
52
- }), t && /* @__PURE__ */ a(d, {
54
+ children: c
55
+ }), t && /* @__PURE__ */ i(g, {
53
56
  className: s.dismissButton,
54
- onClick: () => y(!0),
57
+ onClick: () => _(!0),
55
58
  "data-target-id": "TextButton-dismissButton",
56
- children: i.formatMessage(e.dismissButton)
59
+ children: e.formatMessage(a.dismissButton)
57
60
  })]
58
61
  });
59
62
  };
60
63
  export {
61
- G as AutofillOverlay
64
+ q as AutofillOverlay
62
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/box-ai-agent-selector": "^0.55.2",