@box/box-ai-content-answers 1.19.4 → 1.20.0

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 (48) hide show
  1. package/dist/chunks/clear-conversation-button.js +15 -16
  2. package/dist/chunks/stopResponseButton.js +19 -23
  3. package/dist/chunks/types.js +8 -8
  4. package/dist/chunks/warning-message.js +15 -16
  5. package/dist/esm/lib/components/answer/answer-content.js +15 -15
  6. package/dist/esm/lib/components/answer/answer.js +107 -109
  7. package/dist/esm/lib/components/answer/citation.js +23 -24
  8. package/dist/esm/lib/components/answer/copy-button.js +3 -3
  9. package/dist/esm/lib/components/answer/embed-the-answer-button.js +44 -44
  10. package/dist/esm/lib/components/answer/feedback-tooltip.js +63 -56
  11. package/dist/esm/lib/components/answer/inline-error.js +1 -1
  12. package/dist/esm/lib/components/answer/loading-indicator.js +15 -18
  13. package/dist/esm/lib/components/answer/references.js +30 -30
  14. package/dist/esm/lib/components/answer/thumb-buttons.js +95 -96
  15. package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +166 -167
  16. package/dist/esm/lib/components/api-wrapper/reducer.js +1 -1
  17. package/dist/esm/lib/components/api-wrapper/utils/request.js +8 -8
  18. package/dist/esm/lib/components/api-wrapper/utils/stream.js +24 -25
  19. package/dist/esm/lib/components/chat/chat.js +78 -79
  20. package/dist/esm/lib/components/common/focusInputUtils.js +3 -4
  21. package/dist/esm/lib/components/common/markdown-react.js +91 -93
  22. package/dist/esm/lib/components/common/markdown.js +2666 -2696
  23. package/dist/esm/lib/components/content/content.js +38 -39
  24. package/dist/esm/lib/components/footer/footer-actions.js +3 -3
  25. package/dist/esm/lib/components/footer/footer.js +97 -98
  26. package/dist/esm/lib/components/modal/modal.js +121 -122
  27. package/dist/esm/lib/components/sidebar/content.js +95 -101
  28. package/dist/esm/lib/components/sidebar/sidebar.js +82 -83
  29. package/dist/esm/lib/components/suggested-questions/suggested-questions.js +1 -1
  30. package/dist/esm/lib/components/suggested-questions/suggestions.js +30 -30
  31. package/dist/esm/lib/components/welcome-message/contextual-items-message.js +36 -38
  32. package/dist/esm/lib/components/welcome-message/items-dropdown.js +27 -27
  33. package/dist/esm/lib/hooks/usePromptFocus.js +13 -14
  34. package/dist/i18n/en-x-pseudo.js +89 -89
  35. package/dist/i18n/en-x-pseudo.properties +89 -89
  36. package/dist/styles/answer-content.css +1 -1
  37. package/dist/styles/answer.css +1 -1
  38. package/dist/styles/box-ai-content-answers.css +1 -1
  39. package/dist/styles/chat.css +1 -1
  40. package/dist/styles/clear-conversation-button.css +1 -1
  41. package/dist/styles/content.css +1 -1
  42. package/dist/styles/content2.css +1 -1
  43. package/dist/styles/markdown2.css +1 -1
  44. package/dist/styles/question.css +1 -1
  45. package/dist/styles/stopResponseButton.css +1 -1
  46. package/dist/styles/warning-message.css +1 -1
  47. package/dist/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +1 -1
  48. package/package.json +11 -11
@@ -1,105 +1,104 @@
1
- import { AgentsProvider as V } from "@box/box-ai-agent-selector";
2
- import * as F from "react";
3
- import { useIntl as X } from "react-intl";
4
- import { SPREADSHEET_FILE_EXTENSIONS as j, INTELLIGENT_QUERY_COMPATIBLE_SPREADSHEET_EXTENSIONS as G } from "../common/constants.js";
5
- import W from "./content.js";
6
- import { IntelligenceSidebarContext as Y } from "./context.js";
7
- import g from "./messages.js";
8
- import { jsx as m } from "react/jsx-runtime";
9
- const oe = (L) => {
10
- var P;
1
+ import { AgentsProvider as U } from "@box/box-ai-agent-selector";
2
+ import * as w from "react";
3
+ import { useIntl as V } from "react-intl";
4
+ import { SPREADSHEET_FILE_EXTENSIONS as X, INTELLIGENT_QUERY_COMPATIBLE_SPREADSHEET_EXTENSIONS as j } from "../common/constants.js";
5
+ import G from "./content.js";
6
+ import { IntelligenceSidebarContext as W } from "./context.js";
7
+ import u from "./messages.js";
8
+ import { jsx as g } from "react/jsx-runtime";
9
+ const se = (P) => {
11
10
  const {
12
11
  cache: e,
13
- contentName: S,
14
- elementId: f,
15
- fileExtension: t,
16
- fileID: T,
17
- getSuggestedQuestions: h,
18
- isIntelligentQueryMode: M,
19
- isFeedbackEnabled: p,
20
- isFeedbackFormEnabled: E,
21
- isStopResponseEnabled: o = !1,
22
- items: n,
23
- itemSize: Q,
24
- localizedQuestions: k,
25
- onFeedbackFormSubmit: I,
26
- onUserInteraction: b,
27
- onSelectedAgentCallback: N,
28
- recordAction: C,
12
+ contentName: m,
13
+ elementId: S,
14
+ fileExtension: s,
15
+ fileID: F,
16
+ getSuggestedQuestions: f,
17
+ isIntelligentQueryMode: L,
18
+ isFeedbackEnabled: h,
19
+ isFeedbackFormEnabled: p,
20
+ isStopResponseEnabled: n = !1,
21
+ items: o,
22
+ itemSize: E,
23
+ localizedQuestions: T,
24
+ onFeedbackFormSubmit: Q,
25
+ onUserInteraction: I,
26
+ onSelectedAgentCallback: b,
27
+ recordAction: N,
29
28
  setCacheValue: i,
30
- shouldPreinitSession: r = !0,
31
- setHasQuestions: l,
32
- promptButtonClickHandler: H,
33
- embedTheAnswerButtonConfig: _,
34
- onClose: v,
35
- ...x
36
- } = L, {
37
- questions: s,
38
- agents: R
29
+ shouldPreinitSession: l = !0,
30
+ setHasQuestions: r,
31
+ promptButtonClickHandler: M,
32
+ embedTheAnswerButtonConfig: k,
33
+ onClose: H,
34
+ ..._
35
+ } = P, {
36
+ questions: t,
37
+ agents: v
39
38
  } = e, {
40
- selectedAgent: a
41
- } = R, {
42
- formatMessage: u
43
- } = X(), y = F.useMemo(() => ({
39
+ selectedAgent: x
40
+ } = v, {
41
+ formatMessage: d
42
+ } = V(), R = w.useMemo(() => ({
44
43
  cache: e,
45
- contentName: S,
46
- elementId: f,
47
- fileExtension: t,
48
- isFeedbackEnabled: p,
49
- isFeedbackFormEnabled: E,
50
- isStopResponseEnabled: o,
51
- items: n,
52
- itemSize: Q,
53
- onFeedbackFormSubmit: I,
54
- onUserInteraction: b,
55
- onSelectedAgentCallback: N,
56
- recordAction: C,
44
+ contentName: m,
45
+ elementId: S,
46
+ fileExtension: s,
47
+ isFeedbackEnabled: h,
48
+ isFeedbackFormEnabled: p,
49
+ isStopResponseEnabled: n,
50
+ items: o,
51
+ itemSize: E,
52
+ onFeedbackFormSubmit: Q,
53
+ onUserInteraction: I,
54
+ onSelectedAgentCallback: b,
55
+ recordAction: N,
57
56
  setCacheValue: i,
58
- shouldPreinitSession: r
59
- }), [e, S, f, t, p, E, o, n, Q, I, b, N, C, i, r]), w = s.length > 0;
60
- F.useEffect(() => {
61
- l && l(w);
62
- }, [w, l]);
63
- let d = s;
64
- s.length > 0 && !s[s.length - 1].isCompleted && (d = d.slice(0, -1));
65
- const D = j.includes(t), O = G.includes(t);
57
+ shouldPreinitSession: l
58
+ }), [e, m, S, s, h, p, n, o, E, Q, I, b, N, i, l]), A = t.length > 0;
59
+ w.useEffect(() => {
60
+ r && r(A);
61
+ }, [A, r]);
62
+ let a = t;
63
+ t.length > 0 && !t[t.length - 1].isCompleted && (a = a.slice(0, -1));
64
+ const y = X.includes(s), D = j.includes(s);
66
65
  let c = "";
67
- M && O ? c = u(g.welcomeMessageIntelligentQueryNotice) : D && (c = u(g.welcomeMessageSpreadsheetNotice));
68
- const A = (a == null ? void 0 : a.suggestedQuestions) !== null, B = (U) => {
69
- i("suggestedQuestions", U);
70
- }, q = typeof h == "function" ? [] : k, z = ((P = e.suggestedQuestions) == null ? void 0 : P.length) > 0 && !A ? e.suggestedQuestions : q;
66
+ L && D ? c = d(u.welcomeMessageIntelligentQueryNotice) : y && (c = d(u.welcomeMessageSpreadsheetNotice));
67
+ const C = x?.suggestedQuestions !== null, O = (z) => {
68
+ i("suggestedQuestions", z);
69
+ }, B = typeof f == "function" ? [] : T, q = e.suggestedQuestions?.length > 0 && !C ? e.suggestedQuestions : B;
71
70
  return (
72
71
  // IntelligenceSidebarContent is using withApiWrapper that is not passing all provided props,
73
72
  // that's why we need to use provider to pass other props
74
- /* @__PURE__ */ m(V, {
73
+ /* @__PURE__ */ g(U, {
75
74
  value: e.agents,
76
- children: /* @__PURE__ */ m(Y.Provider, {
77
- value: y,
78
- children: /* @__PURE__ */ m(W, {
79
- cachedSuggestedQuestions: A ? [] : e.suggestedQuestions,
80
- embedTheAnswerButtonConfig: _,
81
- getSuggestedQuestions: h,
75
+ children: /* @__PURE__ */ g(W.Provider, {
76
+ value: R,
77
+ children: /* @__PURE__ */ g(G, {
78
+ cachedSuggestedQuestions: C ? [] : e.suggestedQuestions,
79
+ embedTheAnswerButtonConfig: k,
80
+ getSuggestedQuestions: f,
82
81
  isOpen: !0,
83
- isStopResponseEnabled: o,
84
- itemID: T,
85
- items: n,
86
- onClose: v,
87
- onSuggestedQuestionsFetched: B,
88
- promptButtonClickHandler: H,
89
- restoredQuestions: d,
82
+ isStopResponseEnabled: n,
83
+ itemID: F,
84
+ items: o,
85
+ onClose: H,
86
+ onSuggestedQuestionsFetched: O,
87
+ promptButtonClickHandler: M,
88
+ restoredQuestions: a,
90
89
  restoredSession: e.encodedSession,
91
90
  restoredShouldShowLandingPage: e.shouldShowLandingPage,
92
- shouldPreinitSession: r,
93
- suggestedQuestions: z,
91
+ shouldPreinitSession: l,
92
+ suggestedQuestions: q,
94
93
  warningNotice: c,
95
- warningNoticeAriaLabel: u(g.welcomeMessageSpreadsheetNoticeAriaLabel),
96
- ...x
94
+ warningNoticeAriaLabel: d(u.welcomeMessageSpreadsheetNoticeAriaLabel),
95
+ ..._
97
96
  })
98
97
  })
99
98
  })
100
99
  );
101
100
  };
102
101
  export {
103
- oe as IntelligenceSidebar,
104
- oe as default
102
+ se as IntelligenceSidebar,
103
+ se as default
105
104
  };
@@ -1,6 +1,6 @@
1
1
  import { Text as N, LoadingIndicator as O } from "@box/blueprint-web";
2
2
  import { AlertTriangle as x } from "@box/blueprint-web-assets/icons/Line";
3
- import { Gray65 as C, Size4 as _ } from "@box/blueprint-web-assets/tokens/tokens";
3
+ import { Size4 as _, Gray65 as C } from "@box/blueprint-web-assets/tokens/tokens";
4
4
  import f from "clsx";
5
5
  import * as G from "react";
6
6
  import { useIntl as w } from "react-intl";
@@ -1,46 +1,46 @@
1
- import { FilterChip as r } from "@box/blueprint-web";
1
+ import { FilterChip as o } from "@box/blueprint-web";
2
2
  import d from "clsx";
3
- import y from "lodash/noop";
3
+ import m from "lodash/noop";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
- import '../../../../styles/suggestions.css';const u = "_suggestions_1yvk2_2", w = "_suggestion_1yvk2_2", n = {
6
- suggestions: u,
5
+ import '../../../../styles/suggestions.css';const y = "_suggestions_1yvk2_2", w = "_suggestion_1yvk2_2", e = {
6
+ suggestions: y,
7
7
  suggestion: w
8
- }, A = ({
9
- askSuggestedQuestion: s,
10
- isLoading: p,
8
+ }, b = ({
9
+ askSuggestedQuestion: i,
10
+ isLoading: g,
11
11
  onSuggestedQuestionClick: a,
12
- onSuggestedQuestionInteraction: e = y,
13
- suggestedQuestions: l,
14
- variant: g = "modal"
12
+ onSuggestedQuestionInteraction: r = m,
13
+ suggestedQuestions: p,
14
+ variant: l = "modal"
15
15
  }) => {
16
- const c = s == null ? void 0 : s.prompt, m = (o) => {
17
- (o.key === "ArrowUp" || o.key === "ArrowDown" || o.key === "ArrowLeft" || o.key === "ArrowRight") && o.stopPropagation();
16
+ const c = i?.prompt, u = (s) => {
17
+ (s.key === "ArrowUp" || s.key === "ArrowDown" || s.key === "ArrowLeft" || s.key === "ArrowRight") && s.stopPropagation();
18
18
  };
19
- return /* @__PURE__ */ t(r.Group, {
20
- className: d(n.suggestions, g === "sidebar" && n.sidebar),
19
+ return /* @__PURE__ */ t(o.Group, {
20
+ className: d(e.suggestions, l === "sidebar" && e.sidebar),
21
21
  "data-testid": "content-answers-suggested-questions",
22
22
  name: "Singleselect SuggestedQuestions",
23
- onKeyDown: m,
23
+ onKeyDown: u,
24
24
  type: "single",
25
25
  value: c,
26
- children: l.map((o) => {
27
- const i = o.label || o.prompt;
28
- return /* @__PURE__ */ t(r.ChipButton, {
29
- className: n.suggestion,
30
- "data-testid": `content-answers-${o.id}`,
31
- disabled: p,
32
- onClick: () => a(o),
33
- onFocus: e,
34
- onMouseEnter: e,
35
- value: i,
36
- children: /* @__PURE__ */ t(r.Label, {
37
- children: i
26
+ children: p.map((s) => {
27
+ const n = s.label || s.prompt;
28
+ return /* @__PURE__ */ t(o.ChipButton, {
29
+ className: e.suggestion,
30
+ "data-testid": `content-answers-${s.id}`,
31
+ disabled: g,
32
+ onClick: () => a(s),
33
+ onFocus: r,
34
+ onMouseEnter: r,
35
+ value: n,
36
+ children: /* @__PURE__ */ t(o.Label, {
37
+ children: n
38
38
  })
39
- }, o.id);
39
+ }, s.id);
40
40
  })
41
41
  });
42
42
  };
43
43
  export {
44
- A as Suggestions,
45
- A as default
44
+ b as Suggestions,
45
+ b as default
46
46
  };
@@ -1,51 +1,49 @@
1
- import f from "clsx";
2
- import { FormattedMessage as l } from "react-intl";
3
- import { ItemsDropdown as g } from "./items-dropdown.js";
1
+ import T from "clsx";
2
+ import { FormattedMessage as o } from "react-intl";
3
+ import { ItemsDropdown as _ } from "./items-dropdown.js";
4
4
  import m from "./messages.js";
5
- import { jsxs as w, jsx as s } from "react/jsx-runtime";
6
- import '../../../../styles/contextual-items-message.css';const D = "_commonWelcomeTextStyles_16t3n_1", L = "_fileLandingText_16t3n_1", u = "_welcomeFileDataLandingText_16t3n_1", b = "_askQuestionText_16t3n_1", N = "_sidebar_16t3n_4", k = "_itemsDropdown_16t3n_38", t = {
7
- commonWelcomeTextStyles: D,
8
- fileLandingText: L,
9
- welcomeFileDataLandingText: u,
10
- askQuestionText: b,
11
- sidebar: N,
12
- itemsDropdown: k
13
- }, W = ({
14
- contentName: c,
15
- isUsedInsideSidebar: d = !1,
16
- onDropdownOpenChange: x,
17
- onItemClick: r,
18
- parentItem: e,
19
- shouldShowLandingPage: o,
5
+ import { jsxs as g, jsx as e } from "react/jsx-runtime";
6
+ import '../../../../styles/contextual-items-message.css';const w = "_fileLandingText_16t3n_1", D = "_welcomeFileDataLandingText_16t3n_1", L = "_askQuestionText_16t3n_1", p = "_sidebar_16t3n_4", u = "_itemsDropdown_16t3n_38", t = {
7
+ fileLandingText: w,
8
+ welcomeFileDataLandingText: D,
9
+ askQuestionText: L,
10
+ sidebar: p,
11
+ itemsDropdown: u
12
+ }, Q = ({
13
+ contentName: l,
14
+ isUsedInsideSidebar: r = !1,
15
+ onDropdownOpenChange: d,
16
+ onItemClick: c,
17
+ parentItem: s,
18
+ shouldShowLandingPage: i,
20
19
  supportedItems: n
21
20
  }) => {
22
- var a;
23
- const T = n.length || 1, _ = ((a = n[0]) == null ? void 0 : a.name) || c, i = (e == null ? void 0 : e.id) !== "0" ? e == null ? void 0 : e.name : void 0;
24
- return /* @__PURE__ */ w("div", {
25
- className: f({
26
- [t.askQuestionText]: !o,
27
- [t.welcomeFileDataLandingText]: o,
28
- [t.sidebar]: d
21
+ const x = n.length || 1, f = n[0]?.name || l, a = s?.id !== "0" ? s?.name : void 0;
22
+ return /* @__PURE__ */ g("div", {
23
+ className: T({
24
+ [t.askQuestionText]: !i,
25
+ [t.welcomeFileDataLandingText]: i,
26
+ [t.sidebar]: r
29
27
  }),
30
- children: [/* @__PURE__ */ s("div", {
28
+ children: [/* @__PURE__ */ e("div", {
31
29
  className: t.welcomeText,
32
- children: /* @__PURE__ */ s("b", {
33
- children: /* @__PURE__ */ s(l, {
30
+ children: /* @__PURE__ */ e("b", {
31
+ children: /* @__PURE__ */ e(o, {
34
32
  ...m.welcomeAskQuestionLandingText
35
33
  })
36
34
  })
37
- }), /* @__PURE__ */ s("div", {
35
+ }), /* @__PURE__ */ e("div", {
38
36
  className: t.fileLandingText,
39
- children: /* @__PURE__ */ s(l, {
37
+ children: /* @__PURE__ */ e(o, {
40
38
  ...m.fileLandingText,
41
39
  values: {
42
- firstItemName: _,
43
- parentItem: i && `'${i}'`,
44
- numberOfItems: T,
45
- files: /* @__PURE__ */ s(g, {
40
+ firstItemName: f,
41
+ parentItem: a && `'${a}'`,
42
+ numberOfItems: x,
43
+ files: /* @__PURE__ */ e(_, {
46
44
  className: t.itemsDropdown,
47
- onDropdownOpenChange: x,
48
- onItemClick: r,
45
+ onDropdownOpenChange: d,
46
+ onItemClick: c,
49
47
  supportedItems: n
50
48
  })
51
49
  }
@@ -54,6 +52,6 @@ import '../../../../styles/contextual-items-message.css';const D = "_commonWelco
54
52
  });
55
53
  };
56
54
  export {
57
- W as ContextualItemsMessage,
58
- W as default
55
+ Q as ContextualItemsMessage,
56
+ Q as default
59
57
  };
@@ -1,8 +1,8 @@
1
- import { useBreakpoint as T, Breakpoint as I, DropdownMenu as e, Link as k, Text as _ } from "@box/blueprint-web";
2
- import { Size5 as x } from "@box/blueprint-web-assets/tokens/tokens";
3
- import { ItemIcon as C } from "@box/item-icon";
1
+ import { useBreakpoint as u, Breakpoint as N, DropdownMenu as e, Link as T, Text as _ } from "@box/blueprint-web";
2
+ import { Size5 as C } from "@box/blueprint-web-assets/tokens/tokens";
3
+ import { ItemIcon as x } from "@box/item-icon";
4
4
  import M from "clsx";
5
- import { useMemo as g, useCallback as F } from "react";
5
+ import { useMemo as w, useCallback as F } from "react";
6
6
  import { useIntl as H } from "react-intl";
7
7
  import r from "./messages.js";
8
8
  import { jsxs as s, jsx as n, Fragment as y } from "react/jsx-runtime";
@@ -13,23 +13,23 @@ import '../../../../styles/items-dropdown.css';const O = "_itemsDropdownTriggerL
13
13
  itemsDropdownItemName: j,
14
14
  itemsDropdownLabel: z
15
15
  }, K = ({
16
- className: b,
16
+ className: I,
17
17
  supportedItems: t = [],
18
- unsupportedItems: d = [],
19
- noPermissionItems: p = [],
20
- onItemClick: i,
21
- onDropdownOpenChange: u
18
+ unsupportedItems: c = [],
19
+ noPermissionItems: d = [],
20
+ onItemClick: g,
21
+ onDropdownOpenChange: b
22
22
  }) => {
23
23
  const {
24
- formatMessage: a
25
- } = H(), D = T(), h = g(() => D === I.Small, [D]), N = F(({
24
+ formatMessage: i
25
+ } = H(), D = u(), h = w(() => D === N.Small, [D]), k = F(({
26
26
  id: m,
27
27
  name: l
28
28
  }) => {
29
- i == null || i(m, l);
30
- }, [i]), L = g(() => t.length > 0 ? r.welcomeMessageFilesLink : r.welcomeMessageItemsLink, [t]), f = g(() => a(L, {
31
- numberOfItems: t.length + d.length + p.length
32
- }), [t, d, p, L]), w = (m, l) => l.length === 0 ? null : /* @__PURE__ */ s(y, {
29
+ g?.(m, l);
30
+ }, [g]), L = w(() => t.length > 0 ? r.welcomeMessageFilesLink : r.welcomeMessageItemsLink, [t]), f = w(() => i(L, {
31
+ numberOfItems: t.length + c.length + d.length
32
+ }), [t, c, d, L]), p = (m, l) => l.length === 0 ? null : /* @__PURE__ */ s(y, {
33
33
  children: [m && /* @__PURE__ */ n(e.Header, {
34
34
  className: o.itemsDropdownLabel,
35
35
  children: /* @__PURE__ */ n(_, {
@@ -37,27 +37,27 @@ import '../../../../styles/items-dropdown.css';const O = "_itemsDropdownTriggerL
37
37
  color: "textOnLightSecondary",
38
38
  children: m
39
39
  })
40
- }), l.map((c) => /* @__PURE__ */ s(e.Item, {
40
+ }), l.map((a) => /* @__PURE__ */ s(e.Item, {
41
41
  className: o.itemsDropdownItem,
42
- onClick: () => N(c),
43
- children: [/* @__PURE__ */ n(C, {
42
+ onClick: () => k(a),
43
+ children: [/* @__PURE__ */ n(x, {
44
44
  ariaHidden: !0,
45
45
  className: o.itemsDropdownItemIcon,
46
- dimension: x,
47
- iconType: c.fileType
46
+ dimension: C,
47
+ iconType: a.fileType
48
48
  }), /* @__PURE__ */ n(_, {
49
49
  as: "span",
50
50
  className: o.itemsDropdownItemName,
51
- children: c.name
51
+ children: a.name
52
52
  })]
53
- }, c.id))]
53
+ }, a.id))]
54
54
  });
55
55
  return /* @__PURE__ */ s(e.Root, {
56
56
  isFullScreenEnabled: h,
57
- onOpenChange: u,
57
+ onOpenChange: b,
58
58
  children: [/* @__PURE__ */ n(e.Trigger, {
59
- className: M(b, o.itemsDropdownTrigger),
60
- children: /* @__PURE__ */ n(k, {
59
+ className: M(I, o.itemsDropdownTrigger),
60
+ children: /* @__PURE__ */ n(T, {
61
61
  className: o.itemsDropdownTriggerLink,
62
62
  href: "#",
63
63
  children: f
@@ -70,9 +70,9 @@ import '../../../../styles/items-dropdown.css';const O = "_itemsDropdownTriggerL
70
70
  children: [/* @__PURE__ */ n(e.Header.TextContent, {
71
71
  title: f
72
72
  }), /* @__PURE__ */ n(e.Header.MenuCloseButton, {
73
- "aria-label": a(r.closeItemList)
73
+ "aria-label": i(r.closeItemList)
74
74
  })]
75
- }), w(null, t), w(a(r.unsupportedFormatLabel), d), w(a(r.noPermissionsLabel), p)]
75
+ }), p(null, t), p(i(r.unsupportedFormatLabel), c), p(i(r.noPermissionsLabel), d)]
76
76
  })]
77
77
  });
78
78
  };
@@ -1,30 +1,29 @@
1
1
  import { useRef as c, useEffect as u } from "react";
2
2
  import { INPUT_TARGET_ID as s } from "../components/footer/constants.js";
3
- const l = (o, e, n) => () => {
4
- const r = e.querySelector(o);
5
- r && (r.focus(), n());
6
- }, i = (o, e, n) => {
3
+ const i = (n, e, t) => () => {
4
+ const r = e.querySelector(n);
5
+ r && (r.focus(), t());
6
+ }, l = (n, e, t) => {
7
7
  const r = document.querySelector(e);
8
8
  if (!r)
9
9
  return null;
10
- const t = new MutationObserver(l(o, r, () => {
11
- t.disconnect(), n();
10
+ const o = new MutationObserver(i(n, r, () => {
11
+ o.disconnect(), t();
12
12
  }));
13
- return t.observe(document, {
13
+ return o.observe(document, {
14
14
  childList: !0,
15
15
  subtree: !0
16
- }), t;
16
+ }), o;
17
17
  };
18
- function a(o) {
19
- const e = c(null), n = `[data-target-id="${s}"]`, r = () => {
20
- const t = document.querySelector(n);
21
- t ? t.focus() : e != null && e.current || (e.current = i(n, o, () => {
18
+ function a(n) {
19
+ const e = c(null), t = `[data-target-id="${s}"]`, r = () => {
20
+ const o = document.querySelector(t);
21
+ o ? o.focus() : e?.current || (e.current = l(t, n, () => {
22
22
  e.current = null;
23
23
  }));
24
24
  };
25
25
  return u(() => () => {
26
- var t;
27
- (t = e == null ? void 0 : e.current) == null || t.disconnect();
26
+ e?.current?.disconnect();
28
27
  }, [e]), {
29
28
  focusPrompt: r
30
29
  };