@box/metadata-editor 1.11.0 → 1.11.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.
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
import { LoadingIndicator as
|
|
2
|
-
import { AlertTriangle as
|
|
3
|
-
import { SurfaceStatusSurfaceError as
|
|
4
|
-
import
|
|
5
|
-
import { useState as
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
17
|
-
testContainerStyle:
|
|
18
|
-
},
|
|
17
|
+
overlayIcon: N,
|
|
18
|
+
testContainerStyle: L
|
|
19
|
+
}, q = ({
|
|
19
20
|
errorCode: t,
|
|
20
|
-
isFetchingSuggestions:
|
|
21
|
-
isLongLoading:
|
|
21
|
+
isFetchingSuggestions: u,
|
|
22
|
+
isLongLoading: l
|
|
22
23
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
t && (
|
|
26
|
-
const n =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
34
|
+
color: p,
|
|
35
|
+
height: f,
|
|
33
36
|
role: "presentation",
|
|
34
|
-
width:
|
|
35
|
-
}) : /* @__PURE__ */
|
|
36
|
-
"aria-label":
|
|
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__ */
|
|
44
|
+
}), /* @__PURE__ */ i(m, {
|
|
42
45
|
as: "p",
|
|
43
46
|
className: s.autofillOverlayTitle,
|
|
44
47
|
variant: "subtitle",
|
|
45
|
-
children:
|
|
46
|
-
}),
|
|
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:
|
|
52
|
-
}), t && /* @__PURE__ */
|
|
54
|
+
children: c
|
|
55
|
+
}), t && /* @__PURE__ */ i(g, {
|
|
53
56
|
className: s.dismissButton,
|
|
54
|
-
onClick: () =>
|
|
57
|
+
onClick: () => _(!0),
|
|
55
58
|
"data-target-id": "TextButton-dismissButton",
|
|
56
|
-
children:
|
|
59
|
+
children: e.formatMessage(a.dismissButton)
|
|
57
60
|
})]
|
|
58
61
|
});
|
|
59
62
|
};
|
|
60
63
|
export {
|
|
61
|
-
|
|
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.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
6
|
"@box/box-ai-agent-selector": "^0.55.2",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^1.11.
|
|
18
|
+
"@box/box-ai-agent-selector": "^1.11.1",
|
|
19
19
|
"@box/babel-plugin-target-attributes": "1.4.0",
|
|
20
|
-
"@box/blueprint-web": "^12.
|
|
20
|
+
"@box/blueprint-web": "^12.98.0",
|
|
21
21
|
"@box/blueprint-web-assets": "^4.80.0",
|
|
22
22
|
"@box/storybook-utils": "^0.14.17",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|