@box/box-ai-content-answers 0.92.4 → 0.93.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,38 +1,39 @@
1
1
  import { Tooltip as a, IconButton as r } from "@box/blueprint-web";
2
2
  import { Trash as s } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { useIntl as l } from "react-intl";
4
- import n from "../esm/lib/components/modal/messages.js";
5
- import { jsx as t } from "react/jsx-runtime";
6
- import '../styles/clear-conversation-button.css';const c = "_BoxAIIconColor_1nf8s_1", _ = "_modalHeader_1nf8s_5", i = "_contentAnswersModal_1nf8s_10", d = "_boxAiContentAnswers_1nf8s_17", m = "_clearButton_1nf8s_25", f = "_contentAnswerModal_1nf8s_1", C = "_modalHeaderContainer_1nf8s_54", g = "_agentSelectorTrigger_1nf8s_62", A = "_agentSelectorContent_1nf8s_73", u = {
4
+ import t from "../esm/lib/components/modal/messages.js";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ import '../styles/clear-conversation-button.css';const c = "_BoxAIIconColor_1nf8s_1", i = "_modalHeader_1nf8s_5", _ = "_contentAnswersModal_1nf8s_10", d = "_boxAiContentAnswers_1nf8s_17", m = "_clearButton_1nf8s_25", C = "_contentAnswerModal_1nf8s_1", f = "_modalHeaderContainer_1nf8s_54", g = "_agentSelectorTrigger_1nf8s_62", A = "_agentSelectorContent_1nf8s_73", u = {
7
7
  BoxAIIconColor: c,
8
- modalHeader: _,
9
- contentAnswersModal: i,
8
+ modalHeader: i,
9
+ contentAnswersModal: _,
10
10
  boxAiContentAnswers: d,
11
11
  clearButton: m,
12
12
  "modal-close-button": "_modal-close-button_1nf8s_29",
13
- contentAnswerModal: f,
14
- modalHeaderContainer: C,
13
+ contentAnswerModal: C,
14
+ modalHeaderContainer: f,
15
15
  agentSelectorTrigger: g,
16
16
  agentSelectorContent: A
17
- }, I = ({
17
+ }, x = ({
18
18
  onClick: e
19
19
  }) => {
20
20
  const o = l();
21
- return /* @__PURE__ */ t(a, {
22
- content: o.formatMessage(n.clearConversationLabel),
21
+ return /* @__PURE__ */ n(a, {
22
+ content: o.formatMessage(t.clearConversationLabel),
23
23
  "data-testid": "clear-conversation-tooltip",
24
24
  variant: "standard",
25
- children: /* @__PURE__ */ t(r, {
26
- "aria-label": o.formatMessage(n.clearConversationLabel),
25
+ children: /* @__PURE__ */ n(r, {
26
+ "aria-label": o.formatMessage(t.clearConversationLabel),
27
27
  className: u.clearButton,
28
28
  "data-testid": "clear-conversation-button",
29
29
  icon: s,
30
30
  onClick: e,
31
- size: "small"
31
+ size: "small",
32
+ "data-target-id": "IconButton-clearConversationLabel"
32
33
  })
33
34
  });
34
35
  };
35
36
  export {
36
- I as C,
37
+ x as C,
37
38
  u as s
38
39
  };
@@ -1,16 +1,16 @@
1
1
  import { InlineNotice as o, Text as e } from "@box/blueprint-web";
2
2
  import { jsxs as s, jsx as n } from "react/jsx-runtime";
3
- import '../styles/warning-message.css';const c = "_welcomeMessage_19juh_1", i = "_clearChatText_19juh_1", l = "_warningNotice_19juh_5", _ = "_iconAvatar_19juh_8", g = {
3
+ import '../styles/warning-message.css';const c = "_welcomeMessage_1g76d_1", i = "_clearChatText_1g76d_1", l = "_warningNotice_1g76d_5", g = "_iconAvatar_1g76d_9", _ = {
4
4
  welcomeMessage: c,
5
5
  clearChatText: i,
6
6
  warningNotice: l,
7
- iconAvatar: _
7
+ iconAvatar: g
8
8
  }, w = ({
9
9
  ariaLabel: t,
10
10
  title: r,
11
11
  description: a
12
12
  }) => /* @__PURE__ */ s(o, {
13
- className: g.warningNotice,
13
+ className: _.warningNotice,
14
14
  variant: "warning",
15
15
  variantIconAriaLabel: t,
16
16
  children: [/* @__PURE__ */ n(e, {
@@ -25,5 +25,5 @@ import '../styles/warning-message.css';const c = "_welcomeMessage_19juh_1", i =
25
25
  });
26
26
  export {
27
27
  w as W,
28
- g as s
28
+ _ as s
29
29
  };
@@ -1,4 +1,4 @@
1
- import { Popover as d, Status as E, Text as B, TextButton as L } from "@box/blueprint-web";
1
+ import { Popover as d, Status as E, Text as x, TextButton as L } from "@box/blueprint-web";
2
2
  import { ArrowUpRightSquare as M } from "@box/blueprint-web-assets/icons/Fill";
3
3
  import D from "clsx";
4
4
  import G from "lodash/debounce";
@@ -8,7 +8,7 @@ import { useIntl as j } from "react-intl";
8
8
  import { LOGGER_BASE_CONFIG as N, LOGGER_ACTION_CLICK as K } from "../common/constants.js";
9
9
  import { MAX_CITATION_LENGTH as P } from "./constants.js";
10
10
  import s from "./messages.js";
11
- import { jsxs as S, jsx as e } from "react/jsx-runtime";
11
+ import { jsxs as S, jsx as a } from "react/jsx-runtime";
12
12
  import '../../../../styles/citation.css';const U = "_citationTrigger_mfhpi_1", q = "_citationStatus_mfhpi_5", H = "_animate_mfhpi_22", W = "_fadeIn_mfhpi_26", X = "_cardTooltip_mfhpi_30", $ = "_cardTooltipTitle_mfhpi_34", k = "_cardTooltipCitation_mfhpi_38", z = "_cardTooltipButton_mfhpi_43", o = {
13
13
  citationTrigger: U,
14
14
  citationStatus: q,
@@ -20,8 +20,8 @@ import '../../../../styles/citation.css';const U = "_citationTrigger_mfhpi_1", q
20
20
  cardTooltipButton: z
21
21
  }, rt = ({
22
22
  animate: u,
23
- content: T,
24
- id: a,
23
+ content: m,
24
+ id: e,
25
25
  recordAction: i,
26
26
  fileId: _,
27
27
  title: c,
@@ -34,47 +34,47 @@ import '../../../../styles/citation.css';const U = "_citationTrigger_mfhpi_1", q
34
34
  c ? f = n(s.cardTooltipTitleWithDocumentName, {
35
35
  title: c.toString()
36
36
  }) : f = n(s.cardTooltipTitle);
37
- const x = G((t) => {
37
+ const B = G((t) => {
38
38
  b(t), t === !0 && i && i({
39
39
  ...N,
40
40
  feature: "answers-citations",
41
41
  target: "hovered",
42
42
  data: {
43
- index: a
43
+ index: e
44
44
  }
45
45
  });
46
46
  }, 100), p = () => {
47
- x(!0);
47
+ B(!0);
48
48
  }, r = () => {
49
- x(!1);
49
+ B(!1);
50
50
  }, O = A(() => {
51
51
  l && i && (l(_, c), i({
52
52
  ...N,
53
53
  feature: "answers-citations",
54
54
  target: K,
55
55
  data: {
56
- index: a
56
+ index: e
57
57
  }
58
58
  }));
59
- }, [l, i, a, _, c]);
59
+ }, [l, i, e, _, c]);
60
60
  y(() => {
61
61
  u && w(!0);
62
62
  }, []);
63
- const m = T ? R(T.toString(), {
63
+ const T = m ? R(m.toString(), {
64
64
  length: P,
65
65
  separator: /,? +/
66
66
  }) : void 0;
67
67
  return /* @__PURE__ */ S(d.Root, {
68
68
  modal: !1,
69
69
  open: h,
70
- children: [/* @__PURE__ */ e(d.Trigger, {
70
+ children: [/* @__PURE__ */ a(d.Trigger, {
71
71
  className: o.citationTrigger,
72
72
  onMouseEnter: p,
73
73
  onMouseLeave: r,
74
- children: /* @__PURE__ */ e(E, {
74
+ children: /* @__PURE__ */ a(E, {
75
75
  ref: C,
76
- "aria-label": h ? m : n(s.referenceAriaLabel, {
77
- number: a
76
+ "aria-label": h ? T : n(s.referenceAriaLabel, {
77
+ number: e
78
78
  }),
79
79
  className: D(o.citationStatus, {
80
80
  [o.animate]: u,
@@ -85,10 +85,10 @@ import '../../../../styles/citation.css';const U = "_citationTrigger_mfhpi_1", q
85
85
  onBlur: r,
86
86
  onFocus: p,
87
87
  tabIndex: 0,
88
- text: `${a}`
88
+ text: `${e}`
89
89
  })
90
- }), /* @__PURE__ */ e(d.ContentContainer, {
91
- "aria-label": m,
90
+ }), /* @__PURE__ */ a(d.ContentContainer, {
91
+ "aria-label": T,
92
92
  collisionPadding: 10,
93
93
  "data-testid": "content-answers-citation-card",
94
94
  onBlur: r,
@@ -105,25 +105,26 @@ import '../../../../styles/citation.css';const U = "_citationTrigger_mfhpi_1", q
105
105
  },
106
106
  side: "top",
107
107
  sideOffset: 5,
108
- children: /* @__PURE__ */ e(d.MainContent, {
108
+ children: /* @__PURE__ */ a(d.MainContent, {
109
109
  children: /* @__PURE__ */ S("div", {
110
110
  className: o.cardTooltip,
111
- children: [/* @__PURE__ */ e(B, {
111
+ children: [/* @__PURE__ */ a(x, {
112
112
  as: "h4",
113
113
  className: o.cardTooltipTitle,
114
114
  variant: "bodyDefaultBold",
115
115
  children: f
116
- }), /* @__PURE__ */ e(B, {
116
+ }), /* @__PURE__ */ a(x, {
117
117
  as: "p",
118
118
  className: o.cardTooltipCitation,
119
119
  color: "textOnLightDefault",
120
120
  variant: "caption",
121
- children: m
122
- }), g && /* @__PURE__ */ e(L, {
121
+ children: T
122
+ }), g && /* @__PURE__ */ a(L, {
123
123
  "aria-label": n(s.cardTooltipButton),
124
124
  className: o.cardTooltipButton,
125
125
  icon: M,
126
126
  onClick: O,
127
+ "data-target-id": "TextButton-cardTooltipButton",
127
128
  children: n(s.cardTooltipButton)
128
129
  })]
129
130
  })
@@ -1,7 +1,7 @@
1
- import { useNotification as n, Tooltip as l, IconButton as m } from "@box/blueprint-web";
2
- import { Clipboard as u } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as f } from "react-intl";
4
- import d from "../../messages.js";
1
+ import { useNotification as n, Tooltip as l, IconButton as d } from "@box/blueprint-web";
2
+ import { Clipboard as m } from "@box/blueprint-web-assets/icons/Line";
3
+ import { useIntl as u } from "react-intl";
4
+ import f from "../../messages.js";
5
5
  import { LOGGER_BASE_CONFIG as b, LOGGER_ACTION_CLICK as C } from "../common/constants.js";
6
6
  import t from "./messages.js";
7
7
  import { jsx as s } from "react/jsx-runtime";
@@ -12,7 +12,7 @@ const L = ({
12
12
  }) => {
13
13
  const {
14
14
  formatMessage: o
15
- } = f(), {
15
+ } = u(), {
16
16
  addNotification: c
17
17
  } = n(), p = () => {
18
18
  r && r({
@@ -25,20 +25,21 @@ const L = ({
25
25
  styledText: o(t.copyToClipboardSucceeded),
26
26
  variant: "success",
27
27
  typeIconAriaLabel: o(t.copyButtonSuccessText),
28
- closeButtonAriaLabel: o(d.closeButtonText)
28
+ closeButtonAriaLabel: o(f.closeButtonText)
29
29
  }), a && a(i);
30
30
  });
31
31
  };
32
32
  return /* @__PURE__ */ s(l, {
33
33
  content: o(t.copyToClipboard),
34
- children: /* @__PURE__ */ s(m, {
34
+ children: /* @__PURE__ */ s(d, {
35
35
  "aria-label": o(t.copyToClipboard),
36
- icon: u,
36
+ icon: m,
37
37
  onClick: p,
38
38
  onFocusCapture: (e) => {
39
39
  e.target.matches(":focus-visible") || e.stopPropagation();
40
40
  },
41
- size: "x-small"
41
+ size: "x-small",
42
+ "data-target-id": "IconButton-copyToClipboard"
42
43
  })
43
44
  });
44
45
  };
@@ -1,11 +1,11 @@
1
- import { Tooltip as s, IconButton as r } from "@box/blueprint-web";
1
+ import { Tooltip as r, IconButton as s } from "@box/blueprint-web";
2
2
  import { InfoBadge as a } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { useEffect as f } from "react";
4
4
  import { useIntl as i } from "react-intl";
5
5
  import { LOGGER_BASE_CONFIG as m } from "../common/constants.js";
6
6
  import c from "./messages.js";
7
7
  import { jsx as o } from "react/jsx-runtime";
8
- const N = ({
8
+ const x = ({
9
9
  recordAction: e
10
10
  }) => {
11
11
  const {
@@ -16,19 +16,20 @@ const N = ({
16
16
  ...m,
17
17
  target: "noReferences"
18
18
  });
19
- }, [e]), /* @__PURE__ */ o(s, {
19
+ }, [e]), /* @__PURE__ */ o(r, {
20
20
  className: "Answer-NoCitations",
21
21
  content: t,
22
22
  "data-testid": "content-answers-references-no-references-tooltip",
23
- children: /* @__PURE__ */ o(r, {
23
+ children: /* @__PURE__ */ o(s, {
24
24
  "aria-label": t,
25
25
  "data-testid": "content-answers-references-no-references",
26
26
  icon: a,
27
- size: "x-small"
27
+ size: "x-small",
28
+ "data-target-id": "IconButton-noReferences"
28
29
  })
29
30
  });
30
31
  };
31
32
  export {
32
- N as NoCitationsIcon,
33
- N as default
33
+ x as NoCitationsIcon,
34
+ x as default
34
35
  };
@@ -1,60 +1,62 @@
1
- import { Tooltip as _, IconButton as f } from "@box/blueprint-web";
2
- import { ThumbUp as M, ThumbDown as B } from "@box/blueprint-web-assets/icons/Fill";
3
- import { ThumbUp as O, ThumbDown as C } from "@box/blueprint-web-assets/icons/Line";
4
- import n from "react";
5
- import { useIntl as H } from "react-intl";
6
- import { LOGGER_BASE_CONFIG as N, LOGGER_ACTION_PROGRAMMATIC as d } from "../common/constants.js";
1
+ import { Tooltip as _, IconButton as U } from "@box/blueprint-web";
2
+ import { ThumbUp as B, ThumbDown as M } from "@box/blueprint-web-assets/icons/Fill";
3
+ import { ThumbUp as d, ThumbDown as O } from "@box/blueprint-web-assets/icons/Line";
4
+ import s from "react";
5
+ import { useIntl as C } from "react-intl";
6
+ import { LOGGER_BASE_CONFIG as H, LOGGER_ACTION_PROGRAMMATIC as L } from "../common/constants.js";
7
7
  import u from "./messages.js";
8
- import { jsxs as w, Fragment as x, jsx as b } from "react/jsx-runtime";
9
- import '../../../../styles/thumb-buttons.css';const G = "_thumbDown_1axcd_1", L = {
10
- thumbDown: G
8
+ import { jsxs as N, Fragment as g, jsx as b } from "react/jsx-runtime";
9
+ import '../../../../styles/thumb-buttons.css';const w = "_thumbDown_1axcd_1", x = {
10
+ thumbDown: w
11
11
  }, o = {
12
12
  THUMB_UP: "positive",
13
13
  THUMB_DOWN: "negative",
14
14
  NONE: "none"
15
15
  }, j = ({
16
16
  recordAction: m,
17
- variant: p,
17
+ variant: i,
18
18
  items: h,
19
- hostAppName: i,
20
- questionId: T,
21
- feedbackValue: U,
19
+ hostAppName: p,
20
+ questionId: r,
21
+ feedbackValue: f,
22
22
  setAnswerFeedback: l
23
23
  }) => {
24
24
  const {
25
- formatMessage: s
26
- } = H(), t = U, r = n.useMemo(() => h.filter((a) => a.status === "supported").map((a) => a.fileType), [h]), e = n.useCallback((a) => {
27
- t !== a && (l == null || l(T, a), m == null || m({
28
- ...N,
29
- action: d,
25
+ formatMessage: e
26
+ } = C(), a = f, T = s.useMemo(() => h.filter((t) => t.status === "supported").map((t) => t.fileType), [h]), n = s.useCallback((t) => {
27
+ a !== t && (l == null || l(r, t), m == null || m({
28
+ ...H,
29
+ action: L,
30
30
  target: "answer_feedback",
31
- component: p,
31
+ component: i,
32
32
  data: {
33
- feedback_value: a,
34
- file_types: r,
35
- feature: i
33
+ feedback_value: t,
34
+ file_types: T,
35
+ feature: p
36
36
  }
37
37
  }));
38
- }, [i, m, t, p, r, T, l]), c = n.useCallback(() => e(o.THUMB_UP), [e]), D = n.useCallback(() => e(o.THUMB_DOWN), [e]);
39
- return /* @__PURE__ */ w(x, {
38
+ }, [p, m, a, i, T, r, l]), c = s.useCallback(() => n(o.THUMB_UP), [n]), D = s.useCallback(() => n(o.THUMB_DOWN), [n]);
39
+ return /* @__PURE__ */ N(g, {
40
40
  children: [/* @__PURE__ */ b(_, {
41
- content: s(u.thumbsUpAriaLabel),
42
- children: /* @__PURE__ */ b(f, {
43
- "aria-label": s(u.thumbsUpAriaLabel),
44
- disabled: t === o.THUMB_DOWN,
45
- icon: t === o.THUMB_UP ? M : O,
41
+ content: e(u.thumbsUpAriaLabel),
42
+ children: /* @__PURE__ */ b(U, {
43
+ "aria-label": e(u.thumbsUpAriaLabel),
44
+ disabled: a === o.THUMB_DOWN,
45
+ icon: a === o.THUMB_UP ? B : d,
46
46
  onClick: c,
47
- size: "x-small"
47
+ size: "x-small",
48
+ "data-target-id": "IconButton-thumbsUpAriaLabel"
48
49
  })
49
50
  }), /* @__PURE__ */ b(_, {
50
- content: s(u.thumbsDownAriaLabel),
51
- children: /* @__PURE__ */ b(f, {
52
- "aria-label": s(u.thumbsDownAriaLabel),
53
- className: L.thumbDown,
54
- disabled: t === o.THUMB_UP,
55
- icon: t === o.THUMB_DOWN ? B : C,
51
+ content: e(u.thumbsDownAriaLabel),
52
+ children: /* @__PURE__ */ b(U, {
53
+ "aria-label": e(u.thumbsDownAriaLabel),
54
+ className: x.thumbDown,
55
+ disabled: a === o.THUMB_UP,
56
+ icon: a === o.THUMB_DOWN ? M : O,
56
57
  onClick: D,
57
- size: "x-small"
58
+ size: "x-small",
59
+ "data-target-id": "IconButton-thumbsDownAriaLabel"
58
60
  })
59
61
  })]
60
62
  });
@@ -1,16 +1,16 @@
1
1
  import { Card as d } from "@box/blueprint-web";
2
2
  import s from "clsx";
3
3
  import { jsx as o } from "react/jsx-runtime";
4
- import '../../../../styles/media-container.css';const _ = "_mediaContainer_v8502_1", c = "_figure_v8502_7", m = "_sidebar_v8502_14", l = "_welcomeMessage_v8502_33", v = "_modal_v8502_37", g = "_question_v8502_40", u = "_contentCard_v8502_56", C = "_answer_v8502_62", b = "_body_v8502_66", f = "_error_v8502_101", e = {
4
+ import '../../../../styles/media-container.css';const _ = "_mediaContainer_1392k_1", c = "_figure_1392k_7", m = "_sidebar_1392k_14", l = "_welcomeMessage_1392k_33", g = "_modal_1392k_37", u = "_question_1392k_40", k = "_contentCard_1392k_56", C = "_answer_1392k_62", b = "_body_1392k_66", f = "_error_1392k_101", e = {
5
5
  mediaContainer: _,
6
6
  figure: c,
7
7
  sidebar: m,
8
- "center-aligned": "_center-aligned_v8502_17",
9
- "top-aligned": "_top-aligned_v8502_24",
8
+ "center-aligned": "_center-aligned_1392k_17",
9
+ "top-aligned": "_top-aligned_1392k_24",
10
10
  welcomeMessage: l,
11
- modal: v,
12
- question: g,
13
- contentCard: u,
11
+ modal: g,
12
+ question: u,
13
+ contentCard: k,
14
14
  answer: C,
15
15
  body: b,
16
16
  error: f
@@ -1,16 +1,16 @@
1
1
  import { Button as l } from "@box/blueprint-web";
2
- import { useRef as g, useCallback as p, useEffect as O } from "react";
3
- import { useIntl as w } from "react-intl";
2
+ import { useRef as N, useCallback as p, useEffect as y } from "react";
3
+ import { useIntl as O } from "react-intl";
4
4
  import { A as m } from "../../../../chunks/types.js";
5
5
  import { LOGGER_BASE_CONFIG as u, LOGGER_ACTION_CLICK as R } from "../common/constants.js";
6
6
  import d from "./messages.js";
7
- import { jsxs as y, jsx as E } from "react/jsx-runtime";
7
+ import { jsxs as w, jsx as B } from "react/jsx-runtime";
8
8
  import '../../../../styles/footer-actions.css';const k = "_footerActions_1l4g8_1", v = "_footerActionButton_1l4g8_11", a = {
9
9
  footerActions: k,
10
10
  footerActionButton: v
11
11
  }, j = ({
12
- isStopResponseEnabled: _ = !1,
13
- isStreamingEnabled: B = !1,
12
+ isStopResponseEnabled: E = !1,
13
+ isStreamingEnabled: _ = !1,
14
14
  lastQuestion: o,
15
15
  onRetryQuestion: s,
16
16
  onStopQuestion: c,
@@ -19,43 +19,45 @@ import '../../../../styles/footer-actions.css';const k = "_footerActions_1l4g8_1
19
19
  const {
20
20
  answer: S,
21
21
  error: n,
22
- isCompleted: h
23
- } = o, e = s && n && n !== m.RESPONSE_STOPPED && n !== m.RESPONSE_INTERRUPTED, i = B && !h && (_ || S), A = i || e, r = g(null), {
22
+ isCompleted: g
23
+ } = o, e = s && n && n !== m.RESPONSE_STOPPED && n !== m.RESPONSE_INTERRUPTED, i = _ && !g && (E || S), h = i || e, r = N(null), {
24
24
  formatMessage: f
25
- } = w(), C = p(() => {
25
+ } = O(), A = p(() => {
26
26
  t && t({
27
27
  ...u,
28
28
  action: R,
29
29
  target: "stopResponse"
30
30
  }), c(o);
31
- }, [o, c, t]), N = p(() => {
31
+ }, [o, c, t]), C = p(() => {
32
32
  t && t({
33
33
  ...u,
34
34
  action: R,
35
35
  target: "retryResponse"
36
36
  }), s(o);
37
37
  }, [o, s, t]);
38
- return O(() => {
38
+ return y(() => {
39
39
  e && r.current && r.current.focus();
40
- }, [e]), A ? /* @__PURE__ */ y("div", {
40
+ }, [e]), h ? /* @__PURE__ */ w("div", {
41
41
  className: a.footerActions,
42
42
  "data-testid": "content-answers-modal-footer-actions",
43
- children: [i && /* @__PURE__ */ E(l, {
43
+ children: [i && /* @__PURE__ */ B(l, {
44
44
  "aria-live": "polite",
45
45
  className: a.footerActionButton,
46
46
  "data-testid": "content-answers-stop-response-button",
47
- onClick: C,
47
+ onClick: A,
48
48
  size: "large",
49
49
  variant: "secondary",
50
+ "data-target-id": "Button-stopResponse",
50
51
  children: f(d.stopResponse)
51
- }), e && /* @__PURE__ */ E(l, {
52
+ }), e && /* @__PURE__ */ B(l, {
52
53
  ref: r,
53
54
  "aria-live": "polite",
54
55
  className: a.footerActionButton,
55
56
  "data-testid": "content-answers-retry-response-button",
56
- onClick: N,
57
+ onClick: C,
57
58
  size: "large",
58
59
  variant: "secondary",
60
+ "data-target-id": "Button-retryResponse",
59
61
  children: f(d.retryResponse)
60
62
  })]
61
63
  }) : null;
@@ -1,133 +1,128 @@
1
- import V from "clsx";
1
+ import D from "clsx";
2
2
  import * as r from "react";
3
- import { useIntl as Y } from "react-intl";
4
- import { useBreakpoint as $, Breakpoint as J, TextArea as Q, Tooltip as Z, Button as q } from "@box/blueprint-web";
5
- import { ArrowUp as g } from "@box/blueprint-web-assets/icons/Fill";
6
- import { useAgents as P } from "@box/box-ai-agent-selector";
7
- import { useAgents as tt } from "../../contexts/AgentsContext.js";
8
- import { FooterActions as at } from "./footer-actions.js";
9
- import { getAIAgentConfig as O } from "../common/agentUtils.js";
10
- import { isDebugModeTrigger as rt, isEnterTrigger as et } from "../common/keyInputUtils.js";
11
- import { TEXT_AREA as i } from "./constants.js";
12
- import n from "./messages.js";
13
- import { LOGGER_BASE_CONFIG as X, LOGGER_ACTION_CLICK as ot, LOGGER_ACTION_KEYPRESS as st } from "../common/constants.js";
14
- import { jsxs as R, jsx as b } from "react/jsx-runtime";
15
- import '../../../../styles/footer.css';const it = "_questionInput_1o8is_1", nt = "_avatar_1o8is_26", mt = "_submitButton_1o8is_29", ct = "_textArea_1o8is_45", ut = "_error_1o8is_68", lt = "_sidebar_1o8is_71", ft = "_submitButtonTooltip_1o8is_79", C = {
16
- questionInput: it,
17
- avatar: nt,
18
- submitButton: mt,
19
- textArea: ct,
20
- error: ut,
21
- sidebar: lt,
22
- submitButtonTooltip: ft
23
- }, Bt = ({
3
+ import { useIntl as U } from "react-intl";
4
+ import { useBreakpoint as V, Breakpoint as Y, TextArea as $, Tooltip as J, Button as Q } from "@box/blueprint-web";
5
+ import { ArrowUp as Z } from "@box/blueprint-web-assets/icons/Fill";
6
+ import { useAgents as q } from "@box/box-ai-agent-selector";
7
+ import { useAgents as g } from "../../contexts/AgentsContext.js";
8
+ import { FooterActions as P } from "./footer-actions.js";
9
+ import { getAIAgentConfig as N } from "../common/agentUtils.js";
10
+ import { isDebugModeTrigger as tt, isEnterTrigger as at } from "../common/keyInputUtils.js";
11
+ import { TEXT_AREA as s } from "./constants.js";
12
+ import u from "./messages.js";
13
+ import { LOGGER_BASE_CONFIG as O, LOGGER_ACTION_CLICK as rt, LOGGER_ACTION_KEYPRESS as et } from "../common/constants.js";
14
+ import { jsxs as X, jsx as d } from "react/jsx-runtime";
15
+ import '../../../../styles/footer.css';const ot = "_questionInput_1o8is_1", st = "_avatar_1o8is_26", it = "_submitButton_1o8is_29", nt = "_textArea_1o8is_45", mt = "_error_1o8is_68", ut = "_sidebar_1o8is_71", ct = "_submitButtonTooltip_1o8is_79", C = {
16
+ questionInput: ot,
17
+ avatar: st,
18
+ submitButton: it,
19
+ textArea: nt,
20
+ error: mt,
21
+ sidebar: ut,
22
+ submitButtonTooltip: ct
23
+ }, Mt = ({
24
24
  askSuggestedQuestion: k,
25
25
  enableDebugMode: x = !1,
26
26
  hasRequestInProgress: e,
27
27
  isAgentSelectorEnabled: f,
28
28
  isAIStudioAgentSelectorEnabled: p,
29
- isDebugModeShown: M,
29
+ isDebugModeShown: h,
30
30
  isStopResponseEnabled: w,
31
31
  isStreamingEnabled: H,
32
32
  lastQuestion: A,
33
33
  onRetryQuestion: E,
34
- onStopQuestion: I,
34
+ onStopQuestion: R,
35
35
  recordAction: o,
36
36
  sendQuestion: L,
37
- setAskSuggestedQuestion: B,
38
- toggleDebugMode: m,
37
+ setAskSuggestedQuestion: M,
38
+ toggleDebugMode: i,
39
39
  variant: y = "modal"
40
40
  }) => {
41
- const T = y === "sidebar", s = Y(), F = $(), a = /* @__PURE__ */ r.createRef(), h = F <= J.Medium || T, K = h && !T ? i.MAX_ROWS_MOBILE : i.MAX_ROWS, [u, G] = r.useState(!0), [j, N] = r.useState(!1), {
41
+ const v = y === "sidebar", n = U(), I = V(), a = /* @__PURE__ */ r.createRef(), K = I <= Y.Medium && !v ? s.MAX_ROWS_MOBILE : s.MAX_ROWS, [c, B] = r.useState(!0), [F, G] = r.useState(!1), {
42
42
  selectedAgent: _
43
- } = tt(), {
44
- selectedAgent: d
45
- } = P(), v = r.useCallback(() => {
43
+ } = g(), {
44
+ selectedAgent: b
45
+ } = q(), T = r.useCallback(() => {
46
46
  a.current && a.current.focus();
47
- }, [a]), S = r.useCallback(() => {
48
- var c;
49
- let t = ((c = a.current) == null ? void 0 : c.value) ?? "";
50
- a.current && t.length > i.MAX_LENGTH && (a.current.value = t.slice(0, i.MAX_LENGTH), t = a.current.value), N(t.length >= i.MAX_LENGTH), G(t.trim().length === 0);
47
+ }, [a]), j = r.useCallback(() => {
48
+ var m;
49
+ let t = ((m = a.current) == null ? void 0 : m.value) ?? "";
50
+ a.current && t.length > s.MAX_LENGTH && (a.current.value = t.slice(0, s.MAX_LENGTH), t = a.current.value), G(t.length >= s.MAX_LENGTH), B(t.trim().length === 0);
51
51
  }, [a]), l = r.useCallback(() => {
52
- if (v(), !e && a.current) {
52
+ if (T(), !e && a.current) {
53
53
  const t = {
54
54
  prompt: a.current.value
55
55
  };
56
56
  if (t.prompt && t.prompt.trim()) {
57
- const c = O(f, _, p, d);
58
- L(t, c), a.current.value = "", G(!0), N(!1);
57
+ const m = N(f, _, p, b);
58
+ L(t, m), a.current.value = "", B(!0), G(!1);
59
59
  }
60
- M && m && m();
60
+ h && i && i();
61
61
  }
62
- }, [d, v, e, a, p, f, M, _, L, m]), W = r.useCallback((t) => {
63
- t.preventDefault(), !e && !u && o && o({
64
- ...X,
65
- action: ot,
62
+ }, [b, T, e, a, p, f, h, _, L, i]), S = r.useCallback((t) => {
63
+ t.preventDefault(), !e && !c && o && o({
64
+ ...O,
65
+ action: rt,
66
66
  target: "ask"
67
67
  }), l();
68
- }, [e, u, o, l]), z = r.useCallback((t) => {
69
- x && m && rt(t) && m(), et(t) && (t.preventDefault(), !e && !u && o && o({
70
- ...X,
71
- action: st,
68
+ }, [e, c, o, l]), W = r.useCallback((t) => {
69
+ x && i && tt(t) && i(), at(t) && (t.preventDefault(), !e && !c && o && o({
70
+ ...O,
71
+ action: et,
72
72
  target: "ask"
73
73
  }), l());
74
- }, [x, e, u, o, l, m]), D = r.useCallback((t) => {
75
- const c = O(f, _, p, d);
76
- E(t, c);
77
- }, [d, p, f, E, _]);
78
- r.useEffect(() => {
79
- queueMicrotask(v);
74
+ }, [x, e, c, o, l, i]), z = r.useCallback((t) => {
75
+ const m = N(f, _, p, b);
76
+ E(t, m);
77
+ }, [b, p, f, E, _]);
78
+ return r.useEffect(() => {
79
+ queueMicrotask(T);
80
80
  }, []), r.useEffect(() => {
81
- k && a.current && !e && B && (a.current.value = k, l(), B(null));
82
- }, [k]);
83
- function U() {
84
- if (h)
85
- return g;
86
- }
87
- return /* @__PURE__ */ R("div", {
88
- children: [A && /* @__PURE__ */ b(at, {
81
+ k && a.current && !e && M && (a.current.value = k, l(), M(null));
82
+ }, [k]), /* @__PURE__ */ X("div", {
83
+ children: [A && /* @__PURE__ */ d(P, {
89
84
  isStopResponseEnabled: w,
90
85
  isStreamingEnabled: H,
91
86
  lastQuestion: A,
92
- onRetryQuestion: D,
93
- onStopQuestion: I,
87
+ onRetryQuestion: z,
88
+ onStopQuestion: R,
94
89
  recordAction: o
95
- }), /* @__PURE__ */ R("div", {
96
- className: V(C.questionInput, T && C.sidebar),
97
- children: [/* @__PURE__ */ b(Q, {
90
+ }), /* @__PURE__ */ X("div", {
91
+ className: D(C.questionInput, v && C.sidebar),
92
+ children: [/* @__PURE__ */ d($, {
98
93
  ref: a,
99
94
  className: C.textArea,
100
95
  "data-testid": "content-answers-question-input",
101
- error: j && s.formatMessage(n.maxCharactersReachedError, {
102
- characterLimit: i.MAX_LENGTH
96
+ error: F && n.formatMessage(u.maxCharactersReachedError, {
97
+ characterLimit: s.MAX_LENGTH
103
98
  }),
104
99
  hideLabel: !0,
105
- label: s.formatMessage(n.askQuestionPlaceholder),
106
- maxLength: i.MAX_LENGTH,
100
+ label: n.formatMessage(u.askQuestionPlaceholder),
101
+ maxLength: s.MAX_LENGTH,
107
102
  maxRows: K,
108
- onChange: S,
109
- onKeyDown: z,
110
- placeholder: s.formatMessage(n.askQuestionPlaceholder)
111
- }), /* @__PURE__ */ b(Z, {
112
- content: s.formatMessage(n.ask),
103
+ onChange: j,
104
+ onKeyDown: W,
105
+ placeholder: n.formatMessage(u.askQuestionPlaceholder)
106
+ }), /* @__PURE__ */ d(J, {
107
+ content: n.formatMessage(u.ask),
113
108
  "data-testid": "ask-tooltip",
114
109
  variant: "standard",
115
- children: /* @__PURE__ */ b(q, {
116
- "aria-label": s.formatMessage(n.ask),
110
+ children: /* @__PURE__ */ d(Q, {
111
+ "aria-label": n.formatMessage(u.ask),
117
112
  className: C.submitButton,
118
113
  "data-testid": "content-answers-submit-button",
119
- disabled: u || e,
120
- icon: U(),
114
+ disabled: c || e,
115
+ icon: Z,
121
116
  loading: e,
122
- loadingAriaLabel: s.formatMessage(n.askDisabledTooltip),
123
- onClick: W,
117
+ loadingAriaLabel: n.formatMessage(u.askDisabledTooltip),
118
+ onClick: S,
124
119
  size: "small",
125
- children: h ? void 0 : s.formatMessage(n.ask)
120
+ "data-target-id": "Button-ask"
126
121
  })
127
122
  })]
128
123
  })]
129
124
  });
130
125
  };
131
126
  export {
132
- Bt as Footer
127
+ Mt as Footer
133
128
  };
@@ -1,27 +1,27 @@
1
1
  import { useBreakpoint as D, Breakpoint as I, Modal as c, Text as K } from "@box/blueprint-web";
2
2
  import { ArrowsCollapse as $ } from "@box/blueprint-web-assets/icons/Fill";
3
3
  import { BoxAiLogo as J } from "@box/blueprint-web-assets/icons/Logo";
4
- import { Size8 as _ } from "@box/blueprint-web-assets/tokens/tokens";
4
+ import { Size8 as L } from "@box/blueprint-web-assets/tokens/tokens";
5
5
  import { BoxAiAgentSelectorWithApi as V, AgentsProvider as X } from "@box/box-ai-agent-selector";
6
6
  import l from "react";
7
7
  import { useIntl as Y } from "react-intl";
8
8
  import { BoxAiContentAnswers as Z } from "../../box-ai-content-answers.js";
9
9
  import { AgentsProvider as ee } from "../../contexts/AgentsContext.js";
10
- import { A as te, R as oe } from "../../../../chunks/types.js";
10
+ import { A as oe, R as te } from "../../../../chunks/types.js";
11
11
  import { AgentSelector as se } from "../agents/agent-selector.js";
12
- import { LOGGER_BASE_CONFIG as g, LOGGER_ACTION_CLICK as ae } from "../common/constants.js";
13
- import { s as o, C as re } from "../../../../chunks/clear-conversation-button.js";
12
+ import { LOGGER_BASE_CONFIG as C, LOGGER_ACTION_CLICK as ae } from "../common/constants.js";
13
+ import { s as t, C as re } from "../../../../chunks/clear-conversation-button.js";
14
14
  import le from "./hooks/useStopPropagationOnEsc.js";
15
- import C from "./messages.js";
16
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
15
+ import p from "./messages.js";
16
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
17
17
  const Ne = ({
18
- children: x,
19
- getAIStudioAgents: h,
20
- hasCustomSuggestedQuestions: k,
21
- hostAppName: m,
22
- isAgentSelectorEnabled: A,
23
- isAIStudioAgentSelectorEnabled: d,
24
- isDebugModeEnabled: w,
18
+ children: _,
19
+ getAIStudioAgents: A,
20
+ hasCustomSuggestedQuestions: x,
21
+ hostAppName: d,
22
+ isAgentSelectorEnabled: M,
23
+ isAIStudioAgentSelectorEnabled: m,
24
+ isDebugModeEnabled: k,
25
25
  isResetChatEnabled: B,
26
26
  isStopResponseEnabled: S = !1,
27
27
  itemSize: T,
@@ -31,26 +31,26 @@ const Ne = ({
31
31
  recordAction: a,
32
32
  shouldRenderProviders: P = !0,
33
33
  stopPropagationOnEsc: q,
34
- variant: v = "closable",
34
+ variant: f = "closable",
35
35
  items: n,
36
36
  parentItem: i,
37
37
  ...H
38
38
  }) => {
39
- var b, L;
39
+ var v, w;
40
40
  const {
41
41
  open: E,
42
42
  defaultOpen: z,
43
43
  onOpenChange: F,
44
44
  modal: j,
45
45
  ...r
46
- } = H, f = Y(), Q = D() <= I.Medium;
46
+ } = H, g = Y(), Q = D() <= I.Medium;
47
47
  le(q, E);
48
- const u = (L = (b = r == null ? void 0 : r.questions) == null ? void 0 : b[r.questions.length - 1]) == null ? void 0 : L.error, [U, N] = l.useState(!1), s = l.useCallback((t) => {
49
- a && (t.data ?? (t.data = {}), t.data.hostAppName = m, a(t));
50
- }, [m, a]);
48
+ const u = (w = (v = r == null ? void 0 : r.questions) == null ? void 0 : v[r.questions.length - 1]) == null ? void 0 : w.error, [U, N] = l.useState(!1), s = l.useCallback((o) => {
49
+ a && (o.data ?? (o.data = {}), o.data.hostAppName = d, a(o));
50
+ }, [d, a]);
51
51
  l.useEffect(() => {
52
52
  n || s({
53
- ...g,
53
+ ...C,
54
54
  target: "loaded",
55
55
  data: {
56
56
  fileSize: T,
@@ -59,70 +59,70 @@ const Ne = ({
59
59
  });
60
60
  }, [s, O, T, n, a]), l.useEffect(() => {
61
61
  n && s({
62
- ...g,
62
+ ...C,
63
63
  target: "loaded",
64
64
  data: {
65
65
  parentItemType: i == null ? void 0 : i.type,
66
- items: n.map((t) => ({
67
- status: t.status,
68
- fileType: t.fileType
66
+ items: n.map((o) => ({
67
+ status: o.status,
68
+ fileType: o.fileType
69
69
  }))
70
70
  }
71
71
  });
72
72
  }, [s, i, a]), l.useEffect(() => {
73
- u && u === te.AGENT_NOT_FOUND && N(!0);
73
+ u && u === oe.AGENT_NOT_FOUND && N(!0);
74
74
  }, [u]);
75
75
  const W = () => {
76
76
  R && (R(), s({
77
- ...g,
77
+ ...C,
78
78
  action: ae,
79
79
  target: "clearChat"
80
80
  }));
81
- }, y = l.useCallback(async () => (N(!1), h()), [h]), M = /* @__PURE__ */ p(c, {
81
+ }, y = l.useCallback(async () => (N(!1), A()), [A]), b = /* @__PURE__ */ h(c, {
82
82
  defaultOpen: z,
83
83
  modal: j,
84
84
  onOpenChange: F,
85
85
  open: E,
86
86
  children: [/* @__PURE__ */ e(c.Trigger, {
87
- children: x
88
- }), /* @__PURE__ */ p(c.Content, {
89
- className: o.contentAnswersModal,
87
+ children: _
88
+ }), /* @__PURE__ */ h(c.Content, {
89
+ className: t.contentAnswersModal,
90
90
  "data-testid": "content-answers-modal",
91
91
  size: "xlarge",
92
92
  children: [/* @__PURE__ */ e(c.Header, {
93
- className: o.modalHeaderContainer,
94
- children: /* @__PURE__ */ p("div", {
95
- className: o.modalHeader,
93
+ className: t.modalHeaderContainer,
94
+ children: /* @__PURE__ */ h("div", {
95
+ className: t.modalHeader,
96
96
  children: [!Q && /* @__PURE__ */ e(J, {
97
- className: o.BoxAIIconColor,
97
+ className: t.BoxAIIconColor,
98
98
  "data-testid": "content-answers-icon-color",
99
- height: _,
100
- width: _
99
+ height: L,
100
+ width: L
101
101
  }), /* @__PURE__ */ e(K, {
102
102
  as: "span",
103
103
  variant: "titleMedium",
104
- children: f.formatMessage(C.contentAnswersTitle)
105
- }), !d && A && /* @__PURE__ */ e(se, {
104
+ children: g.formatMessage(p.contentAnswersTitle)
105
+ }), !m && M && /* @__PURE__ */ e(se, {
106
106
  onSelectAgent: G,
107
107
  recordAction: s
108
- }), d && /* @__PURE__ */ e(V, {
109
- contentClassName: o.agentSelectorContent,
108
+ }), m && /* @__PURE__ */ e(V, {
109
+ contentClassName: t.agentSelectorContent,
110
110
  disabled: r.hasRequestInProgress,
111
111
  fetcher: y,
112
- hostAppName: m,
112
+ hostAppName: d,
113
113
  recordAction: a,
114
- requestState: U ? oe.ERROR : void 0,
114
+ requestState: U ? te.ERROR : void 0,
115
115
  shouldHideAgentSelectorOnLoad: !0,
116
- triggerChipClassName: o.agentSelectorTrigger
116
+ triggerChipClassName: t.agentSelectorTrigger
117
117
  })]
118
118
  })
119
119
  }), /* @__PURE__ */ e(Z, {
120
- className: o.boxAiContentAnswers,
121
- hasCustomSuggestedQuestions: k,
122
- hostAppName: m,
123
- isAgentSelectorEnabled: !d && A,
124
- isAIStudioAgentSelectorEnabled: d,
125
- isDebugModeEnabled: w,
120
+ className: t.boxAiContentAnswers,
121
+ hasCustomSuggestedQuestions: x,
122
+ hostAppName: d,
123
+ isAgentSelectorEnabled: !m && M,
124
+ isAIStudioAgentSelectorEnabled: m,
125
+ isDebugModeEnabled: k,
126
126
  isStopResponseEnabled: S,
127
127
  items: n,
128
128
  parentItem: i,
@@ -131,18 +131,19 @@ const Ne = ({
131
131
  }), B && /* @__PURE__ */ e(re, {
132
132
  onClick: W
133
133
  }), /* @__PURE__ */ e(c.Close, {
134
- "aria-label": v === "collapsible" ? f.formatMessage(C.collapseModalAriaLabel) : f.formatMessage(C.closeModalAriaLabel),
135
- className: o["modal-close-button"],
136
- icon: v === "collapsible" ? $ : void 0,
134
+ "aria-label": f === "collapsible" ? g.formatMessage(p.collapseModalAriaLabel) : g.formatMessage(p.closeModalAriaLabel),
135
+ className: t["modal-close-button"],
136
+ "data-target-id": f === "collapsible" ? "Modal.Close-collapseContentAnswersModal" : "Modal.Close-closeContentAnswersModal",
137
+ icon: f === "collapsible" ? $ : void 0,
137
138
  size: "small"
138
139
  })]
139
140
  })]
140
141
  });
141
142
  return P ? /* @__PURE__ */ e(X, {
142
143
  children: /* @__PURE__ */ e(ee, {
143
- children: M
144
+ children: b
144
145
  })
145
- }) : M;
146
+ }) : b;
146
147
  };
147
148
  export {
148
149
  Ne as IntelligenceModal,
@@ -1,27 +1,28 @@
1
1
  import { Text as r } from "@box/blueprint-web";
2
- import c from "clsx";
3
- import { MediaContainer as o } from "../common/media-container.js";
2
+ import d from "clsx";
3
+ import { MediaContainer as i } from "../common/media-container.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
- import '../../../../styles/question.css';const d = "_question_yk230_1", m = "_text_yk230_6", e = {
6
- question: d,
7
- text: m
8
- }, p = ({
9
- prompt: i,
5
+ import '../../../../styles/question.css';const c = "_question_1qk3n_1", m = "_sidebar_1qk3n_6", l = "_text_1qk3n_9", e = {
6
+ question: c,
7
+ sidebar: m,
8
+ text: l
9
+ }, b = ({
10
+ prompt: o,
10
11
  variant: s = "modal"
11
12
  }) => {
12
- const n = s === "sidebar", a = /* @__PURE__ */ t(o.Content, {
13
+ const n = s === "sidebar", a = /* @__PURE__ */ t(i.Content, {
13
14
  isUsedInsideSidebar: n,
14
15
  variant: "question",
15
16
  children: /* @__PURE__ */ t(r, {
16
17
  as: "span",
17
- className: c(e.text, n && e.sidebar),
18
- children: i
18
+ className: e.text,
19
+ children: o
19
20
  })
20
21
  });
21
22
  return /* @__PURE__ */ t("div", {
22
- className: e.question,
23
+ className: d(e.question, n && e.sidebar),
23
24
  "data-testid": "content-answers-question",
24
- children: /* @__PURE__ */ t(o, {
25
+ children: /* @__PURE__ */ t(i, {
25
26
  className: "question",
26
27
  variant: s,
27
28
  children: a
@@ -29,6 +30,6 @@ import '../../../../styles/question.css';const d = "_question_yk230_1", m = "_te
29
30
  });
30
31
  };
31
32
  export {
32
- p as Question,
33
- p as default
33
+ b as Question,
34
+ b as default
34
35
  };
@@ -1,32 +1,32 @@
1
1
  import { FilterChip as e } from "@box/blueprint-web";
2
2
  import l from "clsx";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
- import '../../../../styles/suggestions.css';const c = "_suggestions_1sb8t_1", u = "_sidebar_1sb8t_6", m = "_suggestion_1sb8t_1", i = {
4
+ import '../../../../styles/suggestions.css';const c = "_suggestions_z97no_1", u = "_sidebar_z97no_6", m = "_suggestion_z97no_1", n = {
5
5
  suggestions: c,
6
6
  sidebar: u,
7
7
  suggestion: m
8
8
  }, h = ({
9
- askSuggestedQuestion: o,
9
+ askSuggestedQuestion: i,
10
10
  isLoading: a,
11
11
  onSuggestedQuestionClick: r,
12
12
  suggestedQuestions: g,
13
13
  variant: d = "modal"
14
14
  }) => /* @__PURE__ */ t(e.Group, {
15
- className: l(i.suggestions, d === "sidebar" && i.sidebar),
15
+ className: l(n.suggestions, d === "sidebar" && n.sidebar),
16
16
  "data-testid": "content-answers-suggested-questions",
17
17
  name: "Singleselect SuggestedQuestions",
18
18
  type: "single",
19
- value: o,
19
+ value: i,
20
20
  children: g.map((s) => {
21
- const n = s.label || s.prompt;
21
+ const o = s.label || s.prompt;
22
22
  return /* @__PURE__ */ t(e.ChipButton, {
23
- className: i.suggestion,
23
+ className: n.suggestion,
24
24
  "data-testid": `content-answers-${s.id}`,
25
25
  disabled: a,
26
26
  onClick: () => r(s.prompt),
27
- value: n,
27
+ value: o,
28
28
  children: /* @__PURE__ */ t(e.Label, {
29
- children: n
29
+ children: o
30
30
  })
31
31
  }, s.id);
32
32
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.92.4",
3
+ "version": "0.93.1",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.16.0",
@@ -15,11 +15,12 @@
15
15
  "remarkable": "^2.0.1"
16
16
  },
17
17
  "devDependencies": {
18
- "@box/blueprint-web": "^9.17.0",
19
- "@box/blueprint-web-assets": "^4.33.0",
20
- "@box/box-ai-agent-selector": "^0.25.3",
21
- "@box/item-icon": "^0.9.80",
22
- "@box/storybook-utils": "^0.8.2",
18
+ "@box/babel-plugin-target-attributes": "1.3.0",
19
+ "@box/blueprint-web": "^9.18.0",
20
+ "@box/blueprint-web-assets": "^4.33.1",
21
+ "@box/box-ai-agent-selector": "^0.26.1",
22
+ "@box/item-icon": "^0.9.82",
23
+ "@box/storybook-utils": "^0.8.3",
23
24
  "@testing-library/react": "^15.0.6",
24
25
  "react": "^18.3.0",
25
26
  "react-dom": "^18.3.0",
@@ -56,5 +57,5 @@
56
57
  "**/*.css"
57
58
  ],
58
59
  "license": "SEE LICENSE IN LICENSE",
59
- "gitHead": "4b9f89f7ee8b3ad903227091b720e2ff28578fcc"
60
+ "gitHead": "a2056d2f579edc055a85156efe0e93414840445e"
60
61
  }
@@ -1 +1 @@
1
- ._mediaContainer_v8502_1{display:flex;align-items:flex-start;margin-top:1rem;margin-bottom:1rem}._mediaContainer_v8502_1 ._figure_v8502_7{flex:0 0 auto;align-self:flex-start;justify-self:flex-start;margin:.75rem .75rem 0 0;padding:0}._mediaContainer_v8502_1 ._figure_v8502_7._sidebar_v8502_14{margin:0}._mediaContainer_v8502_1 ._figure_v8502_7._center-aligned_v8502_17{align-self:center;margin:0 .75rem 0 0}._mediaContainer_v8502_1 ._figure_v8502_7._center-aligned_v8502_17._sidebar_v8502_14{align-self:flex-start}._mediaContainer_v8502_1 ._figure_v8502_7._top-aligned_v8502_24{align-self:top;margin:0 .75rem 0 0}._mediaContainer_v8502_1._sidebar_v8502_14{flex-direction:column;gap:.5rem;margin-bottom:1.25rem}._mediaContainer_v8502_1._welcomeMessage_v8502_33{margin-top:.25rem;margin-bottom:0}._mediaContainer_v8502_1._welcomeMessage_v8502_33._modal_v8502_37{margin-top:0}._mediaContainer_v8502_1._question_v8502_40{align-items:center;justify-content:flex-end;border-radius:1.75rem}._mediaContainer_v8502_1._question_v8502_40 ._figure_v8502_7{align-self:center;margin:0 0 0 .75rem}._mediaContainer_v8502_1._question_v8502_40._sidebar_v8502_14{margin-top:.75rem;margin-bottom:.75rem}._mediaContainer_v8502_1._question_v8502_40._sidebar_v8502_14 ._figure_v8502_7{align-self:flex-end}._mediaContainer_v8502_1._question_v8502_40 ._contentCard_v8502_56{background-color:#ece9f8;border-radius:1.75rem;line-height:1.5rem;padding:.75rem 1rem}._mediaContainer_v8502_1._answer_v8502_62._sidebar_v8502_14{margin-top:.75rem;margin-bottom:.75rem}._mediaContainer_v8502_1 ._body_v8502_66{min-width:0;word-wrap:break-word;word-break:break-word;overflow-wrap:break-word}._mediaContainer_v8502_1 ._body_v8502_66._answer_v8502_62{border:none;width:100%}._mediaContainer_v8502_1 ._body_v8502_66._answer_v8502_62 ._contentCard_v8502_56{background-color:transparent;border:none;border-radius:1.75rem;padding:1rem .75rem}._mediaContainer_v8502_1 ._body_v8502_66._answer_v8502_62 ._contentCard_v8502_56:hover{background-color:#f4f4f4}._mediaContainer_v8502_1 ._body_v8502_66._welcomeMessage_v8502_33{border:none;width:100%}._mediaContainer_v8502_1 ._body_v8502_66._welcomeMessage_v8502_33 ._contentCard_v8502_56{padding:.75rem 1rem .25rem;background-color:transparent;border:none;border-radius:1.5rem}._mediaContainer_v8502_1 ._body_v8502_66._welcomeMessage_v8502_33 ._contentCard_v8502_56._modal_v8502_37{padding-top:1rem}._mediaContainer_v8502_1 ._body_v8502_66._sidebar_v8502_14._question_v8502_40{align-self:flex-end}._mediaContainer_v8502_1 ._body_v8502_66._error_v8502_101{display:flex;align-items:center;box-sizing:border-box;width:100%;padding:.75rem 1rem;background-color:#fdebee;border:.125rem solid #f69bab;border-radius:1.75rem}@media (max-width: 767px){._mediaContainer_v8502_1 ._body_v8502_66._error_v8502_101{flex-wrap:wrap;width:unset}}
1
+ ._mediaContainer_1392k_1{display:flex;align-items:flex-start;margin-top:1rem;margin-bottom:1rem}._mediaContainer_1392k_1 ._figure_1392k_7{flex:0 0 auto;align-self:flex-start;justify-self:flex-start;margin:.75rem .75rem 0 0;padding:0}._mediaContainer_1392k_1 ._figure_1392k_7._sidebar_1392k_14{margin:0}._mediaContainer_1392k_1 ._figure_1392k_7._center-aligned_1392k_17{align-self:center;margin:0 .75rem 0 0}._mediaContainer_1392k_1 ._figure_1392k_7._center-aligned_1392k_17._sidebar_1392k_14{align-self:flex-start}._mediaContainer_1392k_1 ._figure_1392k_7._top-aligned_1392k_24{align-self:top;margin:0 .75rem 0 0}._mediaContainer_1392k_1._sidebar_1392k_14{flex-direction:column;gap:.5rem;margin-bottom:1.25rem}._mediaContainer_1392k_1._welcomeMessage_1392k_33{margin-top:.25rem;margin-bottom:0}._mediaContainer_1392k_1._welcomeMessage_1392k_33._modal_1392k_37{margin-top:0}._mediaContainer_1392k_1._question_1392k_40{align-items:center;justify-content:flex-end;border-radius:1.5rem}._mediaContainer_1392k_1._question_1392k_40 ._figure_1392k_7{align-self:center;margin:0 0 0 .75rem}._mediaContainer_1392k_1._question_1392k_40._sidebar_1392k_14{margin-top:.75rem;margin-bottom:.75rem}._mediaContainer_1392k_1._question_1392k_40._sidebar_1392k_14 ._figure_1392k_7{align-self:flex-end}._mediaContainer_1392k_1._question_1392k_40 ._contentCard_1392k_56{background-color:#ece9f8;border-radius:1.5rem;line-height:1.5rem;padding:.75rem 1rem}._mediaContainer_1392k_1._answer_1392k_62._sidebar_1392k_14{margin-top:.75rem;margin-bottom:.75rem}._mediaContainer_1392k_1 ._body_1392k_66{min-width:0;word-wrap:break-word;word-break:break-word;overflow-wrap:break-word}._mediaContainer_1392k_1 ._body_1392k_66._answer_1392k_62{border:none;width:100%}._mediaContainer_1392k_1 ._body_1392k_66._answer_1392k_62 ._contentCard_1392k_56{background-color:transparent;border:none;border-radius:1.5rem;padding:1rem .75rem}._mediaContainer_1392k_1 ._body_1392k_66._answer_1392k_62 ._contentCard_1392k_56:hover{background-color:#f4f4f4}._mediaContainer_1392k_1 ._body_1392k_66._welcomeMessage_1392k_33{border:none;width:100%}._mediaContainer_1392k_1 ._body_1392k_66._welcomeMessage_1392k_33 ._contentCard_1392k_56{padding:.75rem 1rem .25rem;background-color:transparent;border:none;border-radius:1.5rem}._mediaContainer_1392k_1 ._body_1392k_66._welcomeMessage_1392k_33 ._contentCard_1392k_56._modal_1392k_37{padding-top:1rem}._mediaContainer_1392k_1 ._body_1392k_66._sidebar_1392k_14._question_1392k_40{align-self:flex-end}._mediaContainer_1392k_1 ._body_1392k_66._error_1392k_101{display:flex;align-items:center;box-sizing:border-box;width:100%;padding:.75rem 1rem;background-color:#fdebee;border:.125rem solid #f69bab;border-radius:1.75rem}@media (max-width: 767px){._mediaContainer_1392k_1 ._body_1392k_66._error_1392k_101{flex-wrap:wrap;width:unset}}
@@ -1 +1 @@
1
- ._question_yk230_1{margin-top:1rem;white-space:pre-wrap;border-radius:1.75rem}._question_yk230_1 ._text_yk230_6{font-size:.9375rem;line-height:1.5rem}
1
+ ._question_1qk3n_1{margin-top:1rem;margin-left:8rem;white-space:pre-wrap}._question_1qk3n_1._sidebar_1qk3n_6{margin-left:4.5rem}._question_1qk3n_1 ._text_1qk3n_9{font-size:.9375rem;line-height:1.5rem}@media (max-width: 767px){._question_1qk3n_1{margin-left:4.5rem}}
@@ -1 +1 @@
1
- ._suggestions_1sb8t_1{gap:.75rem;flex-wrap:wrap;margin-top:.75rem}._suggestions_1sb8t_1._sidebar_1sb8t_6{margin-top:.5rem;margin-left:1rem}._suggestions_1sb8t_1 ._suggestion_1sb8t_1{height:auto;min-height:2.5rem;text-align:start}._suggestions_1sb8t_1 ._suggestion_1sb8t_1 span{font-size:.9375rem;line-height:1.5rem;text-align:start;white-space:normal}
1
+ ._suggestions_z97no_1{gap:.75rem;flex-wrap:wrap;margin-top:.75rem}._suggestions_z97no_1._sidebar_z97no_6{margin-top:.5rem;margin-left:1rem}._suggestions_z97no_1 ._suggestion_z97no_1{height:auto;min-height:2.5rem;text-align:start;padding:.5rem 0;border-radius:1.5rem}._suggestions_z97no_1 ._suggestion_z97no_1 span{font-size:.9375rem;line-height:1.5rem;text-align:start;white-space:normal}
@@ -1 +1 @@
1
- ._welcomeMessage_19juh_1 ._clearChatText_19juh_1{color:#6f6f6f;font-size:.75rem}._welcomeMessage_19juh_1 ._warningNotice_19juh_5{margin-bottom:.75rem}._welcomeMessage_19juh_1 ._iconAvatar_19juh_8{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border-radius:50%}@media (max-width: 374px){._welcomeMessage_19juh_1 ._iconAvatar_19juh_8{width:var(--size-6);height:var(--size-6)}}@media (max-width: 374px){._welcomeMessage_19juh_1{margin-top:0}}
1
+ ._welcomeMessage_1g76d_1 ._clearChatText_1g76d_1{color:#6f6f6f;font-size:.75rem}._welcomeMessage_1g76d_1 ._warningNotice_1g76d_5{margin-bottom:.75rem;border-radius:1.5rem}._welcomeMessage_1g76d_1 ._iconAvatar_1g76d_9{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border-radius:50%}@media (max-width: 374px){._welcomeMessage_1g76d_1 ._iconAvatar_1g76d_9{width:var(--size-6);height:var(--size-6)}}@media (max-width: 374px){._welcomeMessage_1g76d_1{margin-top:0}}