@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
@@ -9,8 +9,8 @@ import { a as H } from "../../../../chunks/types.js";
9
9
  import { LOGGER_BASE_CONFIG as S, LOGGER_ACTION_CLICK as K } from "../common/constants.js";
10
10
  import { MAX_CITATION_LENGTH as P } from "./constants.js";
11
11
  import s from "./messages.js";
12
- import { jsxs as N, jsx as a } from "react/jsx-runtime";
13
- import '../../../../styles/citation.css';const q = "_citationTrigger_4yo68_1", W = "_citationStatus_4yo68_5", X = "_animate_4yo68_26", $ = "_fadeIn_4yo68_30", k = "_cardTooltip_4yo68_34", z = "_cardTooltipTitle_4yo68_38", J = "_cardTooltipCitation_4yo68_42", Q = "_cardTooltipButton_4yo68_47", o = {
12
+ import { jsxs as N, jsx as o } from "react/jsx-runtime";
13
+ import '../../../../styles/citation.css';const q = "_citationTrigger_4yo68_1", W = "_citationStatus_4yo68_5", X = "_animate_4yo68_26", $ = "_fadeIn_4yo68_30", k = "_cardTooltip_4yo68_34", z = "_cardTooltipTitle_4yo68_38", J = "_cardTooltipCitation_4yo68_42", Q = "_cardTooltipButton_4yo68_47", t = {
14
14
  citationTrigger: q,
15
15
  citationStatus: W,
16
16
  animate: X,
@@ -36,8 +36,8 @@ import '../../../../styles/citation.css';const q = "_citationTrigger_4yo68_1", W
36
36
  c ? T = n(s.cardTooltipTitleWithDocumentName, {
37
37
  title: c.toString()
38
38
  }) : T = n(s.cardTooltipTitle);
39
- const B = D((t) => {
40
- O(t), t === !0 && i && i({
39
+ const B = D((a) => {
40
+ O(a), a === !0 && i && i({
41
41
  ...S,
42
42
  feature: "answers-citations",
43
43
  target: "hovered",
@@ -69,18 +69,18 @@ import '../../../../styles/citation.css';const q = "_citationTrigger_4yo68_1", W
69
69
  return /* @__PURE__ */ N(u.Root, {
70
70
  modal: !1,
71
71
  open: g,
72
- children: [/* @__PURE__ */ a(u.Trigger, {
73
- className: o.citationTrigger,
72
+ children: [/* @__PURE__ */ o(u.Trigger, {
73
+ className: t.citationTrigger,
74
74
  onMouseEnter: d,
75
75
  onMouseLeave: r,
76
- children: /* @__PURE__ */ a(E, {
76
+ children: /* @__PURE__ */ o(E, {
77
77
  ref: C,
78
78
  "aria-label": g ? f : n(s.referenceAriaLabel, {
79
79
  number: e
80
80
  }),
81
- className: M(o.citationStatus, {
82
- [o.animate]: p,
83
- [o.fadeIn]: b
81
+ className: M(t.citationStatus, {
82
+ [t.animate]: p,
83
+ [t.fadeIn]: b
84
84
  }),
85
85
  colorIndex: 0,
86
86
  "data-testid": "content-answers-citation-status",
@@ -89,41 +89,40 @@ import '../../../../styles/citation.css';const q = "_citationTrigger_4yo68_1", W
89
89
  tabIndex: 0,
90
90
  text: `${e}`
91
91
  })
92
- }), /* @__PURE__ */ a(u.ContentContainer, {
92
+ }), /* @__PURE__ */ o(u.ContentContainer, {
93
93
  "aria-label": f,
94
94
  collisionPadding: 10,
95
95
  "data-testid": "content-answers-citation-card",
96
96
  onBlur: r,
97
- onCloseAutoFocus: (t) => t.preventDefault(),
97
+ onCloseAutoFocus: (a) => a.preventDefault(),
98
98
  onEscapeKeyDown: () => {
99
- var t;
100
- (t = C.current) == null || t.focus(), r();
99
+ C.current?.focus(), r();
101
100
  },
102
101
  onFocus: d,
103
102
  onMouseEnter: d,
104
103
  onMouseLeave: r,
105
- onOpenAutoFocus: (t) => {
106
- h || t.preventDefault();
104
+ onOpenAutoFocus: (a) => {
105
+ h || a.preventDefault();
107
106
  },
108
107
  side: "top",
109
108
  sideOffset: 5,
110
- children: /* @__PURE__ */ a(u.MainContent, {
109
+ children: /* @__PURE__ */ o(u.MainContent, {
111
110
  children: /* @__PURE__ */ N("div", {
112
- className: o.cardTooltip,
113
- children: [/* @__PURE__ */ a(x, {
111
+ className: t.cardTooltip,
112
+ children: [/* @__PURE__ */ o(x, {
114
113
  as: "h4",
115
- className: o.cardTooltipTitle,
114
+ className: t.cardTooltipTitle,
116
115
  variant: "bodyDefaultBold",
117
116
  children: T
118
- }), /* @__PURE__ */ a(x, {
117
+ }), /* @__PURE__ */ o(x, {
119
118
  as: "p",
120
- className: o.cardTooltipCitation,
119
+ className: t.cardTooltipCitation,
121
120
  color: "textOnLightDefault",
122
121
  variant: "caption",
123
122
  children: f
124
- }), h && /* @__PURE__ */ a(A, {
123
+ }), h && /* @__PURE__ */ o(A, {
125
124
  "aria-label": n(s.cardTooltipButton),
126
- className: o.cardTooltipButton,
125
+ className: t.cardTooltipButton,
127
126
  icon: L,
128
127
  onClick: w,
129
128
  "data-target-id": "TextButton-cardTooltipButton",
@@ -3,7 +3,7 @@ import { Clipboard as C } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { Clipboard as g } from "@box/blueprint-web-assets/icons/Medium";
4
4
  import { useIntl as y } from "react-intl";
5
5
  import T from "../../messages.js";
6
- import { LOGGER_BASE_CONFIG as I, LOGGER_ACTION_CLICK as x } from "../common/constants.js";
6
+ import { LOGGER_ACTION_CLICK as I, LOGGER_BASE_CONFIG as x } from "../common/constants.js";
7
7
  import { focusInput as B } from "../common/focusInputUtils.js";
8
8
  import { markdownToHtmlString as v } from "../common/markdown.js";
9
9
  import a from "./messages.js";
@@ -21,8 +21,8 @@ const E = ({
21
21
  enableModernizedComponents: c
22
22
  } = b(), l = async () => {
23
23
  if (e && e({
24
- ...I,
25
- action: x,
24
+ ...x,
25
+ action: I,
26
26
  target: "copyToClipboard"
27
27
  }), t && navigator && navigator.clipboard && navigator.clipboard.write) {
28
28
  const i = v(t), n = new ClipboardItem({
@@ -1,65 +1,65 @@
1
- import { Tooltip as N, Button as I } from "@box/blueprint-web";
2
- import { BoxNotes as f } from "@box/blueprint-web-assets/icons/Line";
3
- import { useState as F, useCallback as G } from "react";
4
- import { useIntl as h } from "react-intl";
5
- import { LOGGER_BASE_CONFIG as z, LOGGER_ACTION_CLICK as E } from "../common/constants.js";
6
- import { focusInput as O } from "../common/focusInputUtils.js";
7
- import p from "./messages.js";
1
+ import { Tooltip as h, Button as x } from "@box/blueprint-web";
2
+ import { BoxNotes as A } from "@box/blueprint-web-assets/icons/Line";
3
+ import { useState as b, useCallback as C } from "react";
4
+ import { useIntl as B } from "react-intl";
5
+ import { LOGGER_ACTION_CLICK as N, LOGGER_BASE_CONFIG as I } from "../common/constants.js";
6
+ import { focusInput as w } from "../common/focusInputUtils.js";
7
+ import d from "./messages.js";
8
8
  import { jsx as e } from "react/jsx-runtime";
9
- import '../../../../styles/embed-the-answer-button.css';const v = "_embedTheAnswerButtonContainer_1dz6d_1", L = "_embedTheAnswerButton_1dz6d_1", b = "_completedText_1dz6d_37", l = {
10
- embedTheAnswerButtonContainer: v,
11
- embedTheAnswerButton: L,
12
- completedText: b
13
- }, M = ({
9
+ import '../../../../styles/embed-the-answer-button.css';const F = "_embedTheAnswerButtonContainer_1dz6d_1", G = "_embedTheAnswerButton_1dz6d_1", z = "_completedText_1dz6d_37", a = {
10
+ embedTheAnswerButtonContainer: F,
11
+ embedTheAnswerButton: G,
12
+ completedText: z
13
+ }, g = ({
14
14
  answer: o,
15
- hostAppName: d,
15
+ hostAppName: l,
16
16
  embedTheAnswerButtonConfig: t,
17
17
  questionId: u,
18
- recordAction: s,
19
- variant: _
18
+ recordAction: p,
19
+ variant: T
20
20
  }) => {
21
21
  const {
22
- formatMessage: n
23
- } = h(), [a, m] = F(!1), x = () => {
24
- !o || !(t != null && t.onAction) || a || (s == null || s({
25
- ...z,
26
- action: E,
22
+ formatMessage: r
23
+ } = B(), [n, c] = b(!1), _ = () => {
24
+ !o || !t?.onAction || n || (p?.({
25
+ ...I,
26
+ action: N,
27
27
  target: "add_to_note",
28
- component: _,
28
+ component: T,
29
29
  data: {
30
- hostAppName: d,
30
+ hostAppName: l,
31
31
  questionId: u || ""
32
32
  }
33
- }), t.onAction(o), m(!0), setTimeout(() => {
34
- m(!1);
35
- }, 5e3), O());
36
- }, T = G((i) => {
37
- i.target.matches(":focus-visible") || i.stopPropagation();
33
+ }), t.onAction(o), c(!0), setTimeout(() => {
34
+ c(!1);
35
+ }, 5e3), w());
36
+ }, f = C((m) => {
37
+ m.target.matches(":focus-visible") || m.stopPropagation();
38
38
  }, []);
39
- if (!o || !(t != null && t.onAction))
39
+ if (!o || !t?.onAction)
40
40
  return null;
41
- const c = t.actionText || n(p.addToNote), r = t.completedText || n(p.addedToNote);
42
- return /* @__PURE__ */ e(N, {
43
- content: a ? r : c,
41
+ const s = t.actionText || r(d.addToNote), i = t.completedText || r(d.addedToNote);
42
+ return /* @__PURE__ */ e(h, {
43
+ content: n ? i : s,
44
44
  children: /* @__PURE__ */ e("div", {
45
- className: l.embedTheAnswerButtonContainer,
46
- children: a ? /* @__PURE__ */ e("span", {
47
- className: l.completedText,
48
- children: r
49
- }) : /* @__PURE__ */ e(I, {
50
- "aria-label": c,
51
- className: l.embedTheAnswerButton,
52
- icon: f,
53
- onClick: x,
54
- onFocusCapture: T,
45
+ className: a.embedTheAnswerButtonContainer,
46
+ children: n ? /* @__PURE__ */ e("span", {
47
+ className: a.completedText,
48
+ children: i
49
+ }) : /* @__PURE__ */ e(x, {
50
+ "aria-label": s,
51
+ className: a.embedTheAnswerButton,
52
+ icon: A,
53
+ onClick: _,
54
+ onFocusCapture: f,
55
55
  size: "small",
56
56
  variant: "tertiary",
57
- children: c
57
+ children: s
58
58
  })
59
59
  })
60
60
  });
61
61
  };
62
62
  export {
63
- M as EmbedTheAnswerButton,
64
- M as default
63
+ g as EmbedTheAnswerButton,
64
+ g as default
65
65
  };
@@ -1,53 +1,60 @@
1
- import { Formik as y, Form as F } from "formik";
2
- import { GuidedTooltip as l, Radio as c, TextArea as g, Checkbox as x, Text as I, Link as L } from "@box/blueprint-web";
3
- import { useIntl as P, FormattedMessage as v } from "react-intl";
4
- import { F as p } from "../../../../chunks/types.js";
1
+ import { GuidedTooltip as i, Radio as r, TextArea as S, Checkbox as F, Text as g, Link as x } from "@box/blueprint-web";
2
+ import { Formik as L, Form as I } from "formik";
3
+ import { useIntl as w, FormattedMessage as P } from "react-intl";
4
+ import v from "../../messages.js";
5
+ import { F as m } from "../../../../chunks/types.js";
5
6
  import { ABUSE_FORM_PATH as N } from "./constants.js";
6
- import R from "../../messages.js";
7
7
  import t from "./messages.js";
8
- import { jsx as e, jsxs as r, Fragment as w } from "react/jsx-runtime";
9
- import '../../../../styles/feedback-tooltip.css';const B = "_feedbackTooltip_1y93t_1", D = "_feedbackTooltipForm_1y93t_8", E = "_feedbackTooltipTitle_1y93t_12", U = "_feedbackTooltipTextarea_1y93t_15", O = "_feedbackTooltipSubmitBtn_1y93t_18", M = "_feedbackTooltipPromptShareConsent_1y93t_21", $ = "_feedbackTooltipAbuseDisclaimer_1y93t_24", j = "_feedbackTooltipAbuseLink_1y93t_28", a = {
8
+ import { jsx as e, jsxs as n, Fragment as R } from "react/jsx-runtime";
9
+ import '../../../../styles/feedback-tooltip.css';const B = "_feedbackTooltip_1y93t_1", D = "_feedbackTooltipForm_1y93t_8", E = "_feedbackTooltipTitle_1y93t_12", U = "_feedbackTooltipTextarea_1y93t_15", O = "_feedbackTooltipSubmitBtn_1y93t_18", $ = "_feedbackTooltipPromptShareConsent_1y93t_21", M = "_feedbackTooltipAbuseDisclaimer_1y93t_24", j = "_feedbackTooltipAbuseLink_1y93t_28", a = {
10
10
  feedbackTooltip: B,
11
11
  feedbackTooltipForm: D,
12
12
  feedbackTooltipTitle: E,
13
13
  feedbackTooltipTextarea: U,
14
14
  feedbackTooltipSubmitBtn: O,
15
- feedbackTooltipPromptShareConsent: M,
16
- feedbackTooltipAbuseDisclaimer: $,
15
+ feedbackTooltipPromptShareConsent: $,
16
+ feedbackTooltipAbuseDisclaimer: M,
17
17
  feedbackTooltipAbuseLink: j
18
18
  }, z = (s) => {
19
- const n = encodeURIComponent(window.location.href);
20
- return /* @__PURE__ */ e(L, {
19
+ let l = "";
20
+ if (window !== window.top && document.referrer)
21
+ try {
22
+ l = new URL(document.referrer).origin;
23
+ } catch {
24
+ l = "";
25
+ }
26
+ const d = encodeURIComponent(window.location.href);
27
+ return /* @__PURE__ */ e(x, {
21
28
  className: a.feedbackTooltipAbuseLink,
22
- href: `${N}/${n}`,
29
+ href: `${l}${N}/${d}`,
23
30
  rel: "noopener noreferrer",
24
31
  target: "_blank",
25
32
  children: s
26
33
  });
27
34
  }, X = ({
28
35
  children: s,
29
- isOpen: n,
30
- onOpenChange: T,
31
- onSubmit: f,
32
- shouldIncludeFeedbackText: m,
36
+ isOpen: l,
37
+ onOpenChange: d,
38
+ onSubmit: k,
39
+ shouldIncludeFeedbackText: f,
33
40
  shouldIncludePromptShareConsent: u,
34
41
  shouldShow: h
35
42
  }) => {
36
43
  const {
37
44
  formatMessage: o
38
- } = P();
45
+ } = w();
39
46
  if (!h)
40
47
  return s;
41
48
  const _ = () => {
42
- T(!1);
43
- }, A = (d) => {
44
- f(d);
49
+ d(!1);
50
+ }, A = (b) => {
51
+ k(b);
45
52
  };
46
- return /* @__PURE__ */ e(l, {
53
+ return /* @__PURE__ */ e(i, {
47
54
  align: "end",
48
55
  className: a.feedbackTooltip,
49
- closeLabel: o(R.closeButtonText),
50
- content: /* @__PURE__ */ e(y, {
56
+ closeLabel: o(v.closeButtonText),
57
+ content: /* @__PURE__ */ e(L, {
51
58
  initialValues: {
52
59
  feedback: "",
53
60
  feedbackPromptShareConsent: !0,
@@ -56,62 +63,62 @@ import '../../../../styles/feedback-tooltip.css';const B = "_feedbackTooltip_1y9
56
63
  },
57
64
  onSubmit: A,
58
65
  children: ({
59
- submitForm: d,
60
- setFieldValue: b,
66
+ submitForm: b,
67
+ setFieldValue: p,
61
68
  values: {
62
69
  feedback: C,
63
- feedbackPromptShareConsent: S,
64
- issueType: k
70
+ feedbackPromptShareConsent: y,
71
+ issueType: T
65
72
  }
66
- }) => /* @__PURE__ */ r(w, {
67
- children: [/* @__PURE__ */ r(l.Body, {
68
- children: [/* @__PURE__ */ e(l.Title, {
73
+ }) => /* @__PURE__ */ n(R, {
74
+ children: [/* @__PURE__ */ n(i.Body, {
75
+ children: [/* @__PURE__ */ e(i.Title, {
69
76
  className: a.feedbackTooltipTitle,
70
77
  children: o(t.feedbackTooltipTitle)
71
- }), /* @__PURE__ */ r(F, {
78
+ }), /* @__PURE__ */ n(I, {
72
79
  className: a.feedbackTooltipForm,
73
- children: [/* @__PURE__ */ e(c.Legend, {
80
+ children: [/* @__PURE__ */ e(r.Legend, {
74
81
  header: o(t.feedbackTooltipIssueTypeLabel),
75
- children: /* @__PURE__ */ r(c.Group, {
82
+ children: /* @__PURE__ */ n(r.Group, {
76
83
  defaultValue: "",
77
84
  loop: !0,
78
85
  name: "issueType",
79
- onValueChange: (i) => b("issueType", i),
86
+ onValueChange: (c) => p("issueType", c),
80
87
  orientation: "vertical",
81
- value: k,
82
- children: [/* @__PURE__ */ e(c.Item, {
88
+ value: T,
89
+ children: [/* @__PURE__ */ e(r.Item, {
83
90
  label: o(t.feedbackTooltipIssueTypeAnswer1),
84
- value: p.INACCURATE_ANSWER
85
- }), /* @__PURE__ */ e(c.Item, {
91
+ value: m.INACCURATE_ANSWER
92
+ }), /* @__PURE__ */ e(r.Item, {
86
93
  label: o(t.feedbackTooltipIssueTypeAnswer2),
87
- value: p.DID_NOT_FOLLOW_REQUEST
88
- }), /* @__PURE__ */ e(c.Item, {
94
+ value: m.DID_NOT_FOLLOW_REQUEST
95
+ }), /* @__PURE__ */ e(r.Item, {
89
96
  label: o(t.feedbackTooltipIssueTypeAnswer3),
90
- value: p.OTHER
97
+ value: m.OTHER
91
98
  })]
92
99
  })
93
- }), m && /* @__PURE__ */ e(g, {
100
+ }), f && /* @__PURE__ */ e(S, {
94
101
  className: a.feedbackTooltipTextarea,
95
102
  label: o(t.feedbackTooltipFeedbackLabel),
96
103
  maxRows: 4,
97
104
  minRows: 4,
98
- onChange: (i) => b("feedback", i.target.value),
105
+ onChange: (c) => p("feedback", c.target.value),
99
106
  placeholder: o(t.feedbackTooltipFeedbackPlaceholder),
100
107
  value: C
101
- }), u && /* @__PURE__ */ e(x.Item, {
102
- checked: S,
108
+ }), u && /* @__PURE__ */ e(F.Item, {
109
+ checked: y,
103
110
  className: a.feedbackTooltipPromptShareConsent,
104
111
  "data-target-id": "Checkbox.Item-boxAiFeedbackPromptShareConsent",
105
112
  label: o(t.feedbackTooltipPromptShareConsent),
106
- onCheckedChange: (i) => {
107
- b("feedbackPromptShareConsent", i);
113
+ onCheckedChange: (c) => {
114
+ p("feedbackPromptShareConsent", c);
108
115
  },
109
116
  value: "feedbackPromptShareConsent"
110
- }), m && /* @__PURE__ */ e(I, {
117
+ }), f && /* @__PURE__ */ e(g, {
111
118
  as: "p",
112
119
  className: a.feedbackTooltipAbuseDisclaimer,
113
120
  variant: "caption",
114
- children: /* @__PURE__ */ e(v, {
121
+ children: /* @__PURE__ */ e(P, {
115
122
  ...t.feedbackTooltipAbuseDisclaimer,
116
123
  values: {
117
124
  abuseFormLink: z
@@ -119,23 +126,23 @@ import '../../../../styles/feedback-tooltip.css';const B = "_feedbackTooltip_1y9
119
126
  })
120
127
  })]
121
128
  })]
122
- }), /* @__PURE__ */ r(l.Footer, {
123
- children: [/* @__PURE__ */ e(l.Footer.SecondaryAction, {
129
+ }), /* @__PURE__ */ n(i.Footer, {
130
+ children: [/* @__PURE__ */ e(i.Footer.SecondaryAction, {
124
131
  onClick: _,
125
132
  size: "large",
126
133
  children: o(t.feedbackTooltipCancel)
127
- }), /* @__PURE__ */ e(l.Footer.PrimaryAction, {
134
+ }), /* @__PURE__ */ e(i.Footer.PrimaryAction, {
128
135
  className: a.feedbackTooltipSubmitBtn,
129
- disabled: !k,
130
- onClick: () => d(),
136
+ disabled: !T,
137
+ onClick: () => b(),
131
138
  size: "large",
132
139
  children: o(t.feedbackTooltipSubmit)
133
140
  })]
134
141
  })]
135
142
  })
136
143
  }),
137
- onOpenChange: T,
138
- open: n,
144
+ onOpenChange: d,
145
+ open: l,
139
146
  side: "left",
140
147
  children: s
141
148
  });
@@ -1,6 +1,6 @@
1
1
  import { Text as _ } from "@box/blueprint-web";
2
2
  import { AlertTriangle as N } from "@box/blueprint-web-assets/icons/Line";
3
- import { TextTextDestructiveOnLight as x, Size4 as c } from "@box/blueprint-web-assets/tokens/tokens";
3
+ import { Size4 as c, TextTextDestructiveOnLight as x } from "@box/blueprint-web-assets/tokens/tokens";
4
4
  import * as m from "react";
5
5
  import { useIntl as T } from "react-intl";
6
6
  import { A as i } from "../../../../chunks/types.js";
@@ -1,23 +1,20 @@
1
1
  import t from "clsx";
2
- import { useIntl as a } from "react-intl";
3
- import d from "./messages.js";
4
- import { jsxs as i, jsx as s } from "react/jsx-runtime";
5
- import '../../../../styles/loading-indicator.css';const r = "_loadingDots_ozros_1", _ = "_dot_ozros_10", m = "_dot1_ozros_22", c = "_dot1Animation_ozros_1", e = "_dot2_ozros_25", l = "_dot2Animation_ozros_1", A = "_dot3_ozros_28", p = "_dot3Animation_ozros_1", o = {
6
- loadingDots: r,
7
- dot: _,
8
- dot1: m,
9
- dot1Animation: c,
10
- dot2: e,
11
- dot2Animation: l,
12
- dot3: A,
13
- dot3Animation: p
2
+ import { useIntl as d } from "react-intl";
3
+ import n from "./messages.js";
4
+ import { jsxs as r, jsx as s } from "react/jsx-runtime";
5
+ import '../../../../styles/loading-indicator.css';const e = "_loadingDots_ozros_1", i = "_dot_ozros_10", l = "_dot1_ozros_22", c = "_dot2_ozros_25", _ = "_dot3_ozros_28", o = {
6
+ loadingDots: e,
7
+ dot: i,
8
+ dot1: l,
9
+ dot2: c,
10
+ dot3: _
14
11
  };
15
- function x() {
12
+ function z() {
16
13
  const {
17
- formatMessage: n
18
- } = a();
19
- return /* @__PURE__ */ i("div", {
20
- "aria-label": n(d.loadingAnswer),
14
+ formatMessage: a
15
+ } = d();
16
+ return /* @__PURE__ */ r("div", {
17
+ "aria-label": a(n.loadingAnswer),
21
18
  "aria-live": "polite",
22
19
  className: o.loadingDots,
23
20
  role: "status",
@@ -31,5 +28,5 @@ function x() {
31
28
  });
32
29
  }
33
30
  export {
34
- x as LoadingIndicator
31
+ z as LoadingIndicator
35
32
  };
@@ -1,24 +1,24 @@
1
- import { Text as g } from "@box/blueprint-web";
2
- import { useEffect as i } from "react";
1
+ import { Text as u } from "@box/blueprint-web";
2
+ import { useEffect as g } from "react";
3
3
  import { useIntl as w } from "react-intl";
4
4
  import { LOGGER_BASE_CONFIG as b } from "../common/constants.js";
5
5
  import { Citation as N } from "./citation.js";
6
6
  import _ from "./messages.js";
7
7
  import { NoCitationsIcon as x } from "./no-citations.js";
8
- import { jsx as r, jsxs as l, Fragment as C } from "react/jsx-runtime";
9
- import '../../../../styles/references.css';const O = "_label_1wqmn_1", t = {
8
+ import { jsx as s, jsxs as o, Fragment as C } from "react/jsx-runtime";
9
+ import '../../../../styles/references.css';const O = "_label_1wqmn_1", r = {
10
10
  label: O
11
11
  }, R = ({
12
- animate: m = !0,
12
+ animate: l = !0,
13
13
  citations: e,
14
- recordAction: s,
15
- onCitationClick: o
14
+ recordAction: t,
15
+ onCitationClick: m
16
16
  }) => {
17
17
  const a = e && e.length > 0, {
18
18
  formatMessage: f
19
19
  } = w();
20
- return i(() => {
21
- a && s && s({
20
+ return g(() => {
21
+ a && t && t({
22
22
  ...b,
23
23
  feature: "answers-citations",
24
24
  target: "shown",
@@ -26,41 +26,41 @@ import '../../../../styles/references.css';const O = "_label_1wqmn_1", t = {
26
26
  count: e.length
27
27
  }
28
28
  });
29
- }, []), e === null ? /* @__PURE__ */ r("div", {
30
- className: t.references,
29
+ }, []), e === null ? /* @__PURE__ */ s("div", {
30
+ className: r.references,
31
31
  "data-testid": "content-answers-references-null"
32
- }) : /* @__PURE__ */ l("div", {
33
- className: t.references,
32
+ }) : /* @__PURE__ */ o("div", {
33
+ className: r.references,
34
34
  "data-testid": "content-answers-references",
35
- children: [a && /* @__PURE__ */ l(C, {
36
- children: [/* @__PURE__ */ r(g, {
35
+ children: [a && /* @__PURE__ */ o(C, {
36
+ children: [/* @__PURE__ */ s(u, {
37
37
  as: "span",
38
- className: t.label,
38
+ className: r.label,
39
39
  color: "textOnLightSecondary",
40
40
  "data-testid": "content-answers-references-label",
41
41
  variant: "caption",
42
42
  children: f(_.basedOn)
43
43
  }), e.map(({
44
44
  content: c,
45
- location: d,
46
- title: p,
47
- fileId: h,
48
- source: u
45
+ location: i,
46
+ title: d,
47
+ fileId: p,
48
+ source: h
49
49
  }, n) => (
50
50
  // eslint-disable-next-line react/no-array-index-key
51
- /* @__PURE__ */ r(N, {
52
- animate: m,
51
+ /* @__PURE__ */ s(N, {
52
+ animate: l,
53
53
  content: c,
54
- fileId: h,
54
+ fileId: p,
55
55
  id: n + 1,
56
- onCitationClick: o,
57
- recordAction: s,
58
- source: u,
59
- title: p
60
- }, `${d}-${n + 1}`)
56
+ onCitationClick: m,
57
+ recordAction: t,
58
+ source: h,
59
+ title: d
60
+ }, `${i}-${n + 1}`)
61
61
  ))]
62
- }), (e == null ? void 0 : e.length) === 0 && /* @__PURE__ */ r(x, {
63
- recordAction: s
62
+ }), e?.length === 0 && /* @__PURE__ */ s(x, {
63
+ recordAction: t
64
64
  })]
65
65
  });
66
66
  };