@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.
- package/dist/chunks/clear-conversation-button.js +15 -16
- package/dist/chunks/stopResponseButton.js +19 -23
- package/dist/chunks/types.js +8 -8
- package/dist/chunks/warning-message.js +15 -16
- package/dist/esm/lib/components/answer/answer-content.js +15 -15
- package/dist/esm/lib/components/answer/answer.js +107 -109
- package/dist/esm/lib/components/answer/citation.js +23 -24
- package/dist/esm/lib/components/answer/copy-button.js +3 -3
- package/dist/esm/lib/components/answer/embed-the-answer-button.js +44 -44
- package/dist/esm/lib/components/answer/feedback-tooltip.js +63 -56
- package/dist/esm/lib/components/answer/inline-error.js +1 -1
- package/dist/esm/lib/components/answer/loading-indicator.js +15 -18
- package/dist/esm/lib/components/answer/references.js +30 -30
- package/dist/esm/lib/components/answer/thumb-buttons.js +95 -96
- package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +166 -167
- package/dist/esm/lib/components/api-wrapper/reducer.js +1 -1
- package/dist/esm/lib/components/api-wrapper/utils/request.js +8 -8
- package/dist/esm/lib/components/api-wrapper/utils/stream.js +24 -25
- package/dist/esm/lib/components/chat/chat.js +78 -79
- package/dist/esm/lib/components/common/focusInputUtils.js +3 -4
- package/dist/esm/lib/components/common/markdown-react.js +91 -93
- package/dist/esm/lib/components/common/markdown.js +2666 -2696
- package/dist/esm/lib/components/content/content.js +38 -39
- package/dist/esm/lib/components/footer/footer-actions.js +3 -3
- package/dist/esm/lib/components/footer/footer.js +97 -98
- package/dist/esm/lib/components/modal/modal.js +121 -122
- package/dist/esm/lib/components/sidebar/content.js +95 -101
- package/dist/esm/lib/components/sidebar/sidebar.js +82 -83
- package/dist/esm/lib/components/suggested-questions/suggested-questions.js +1 -1
- package/dist/esm/lib/components/suggested-questions/suggestions.js +30 -30
- package/dist/esm/lib/components/welcome-message/contextual-items-message.js +36 -38
- package/dist/esm/lib/components/welcome-message/items-dropdown.js +27 -27
- package/dist/esm/lib/hooks/usePromptFocus.js +13 -14
- package/dist/i18n/en-x-pseudo.js +89 -89
- package/dist/i18n/en-x-pseudo.properties +89 -89
- package/dist/styles/answer-content.css +1 -1
- package/dist/styles/answer.css +1 -1
- package/dist/styles/box-ai-content-answers.css +1 -1
- package/dist/styles/chat.css +1 -1
- package/dist/styles/clear-conversation-button.css +1 -1
- package/dist/styles/content.css +1 -1
- package/dist/styles/content2.css +1 -1
- package/dist/styles/markdown2.css +1 -1
- package/dist/styles/question.css +1 -1
- package/dist/styles/stopResponseButton.css +1 -1
- package/dist/styles/warning-message.css +1 -1
- package/dist/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +1 -1
- 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
|
|
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",
|
|
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((
|
|
40
|
-
O(
|
|
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__ */
|
|
73
|
-
className:
|
|
72
|
+
children: [/* @__PURE__ */ o(u.Trigger, {
|
|
73
|
+
className: t.citationTrigger,
|
|
74
74
|
onMouseEnter: d,
|
|
75
75
|
onMouseLeave: r,
|
|
76
|
-
children: /* @__PURE__ */
|
|
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(
|
|
82
|
-
[
|
|
83
|
-
[
|
|
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__ */
|
|
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: (
|
|
97
|
+
onCloseAutoFocus: (a) => a.preventDefault(),
|
|
98
98
|
onEscapeKeyDown: () => {
|
|
99
|
-
|
|
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: (
|
|
106
|
-
h ||
|
|
104
|
+
onOpenAutoFocus: (a) => {
|
|
105
|
+
h || a.preventDefault();
|
|
107
106
|
},
|
|
108
107
|
side: "top",
|
|
109
108
|
sideOffset: 5,
|
|
110
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ o(u.MainContent, {
|
|
111
110
|
children: /* @__PURE__ */ N("div", {
|
|
112
|
-
className:
|
|
113
|
-
children: [/* @__PURE__ */
|
|
111
|
+
className: t.cardTooltip,
|
|
112
|
+
children: [/* @__PURE__ */ o(x, {
|
|
114
113
|
as: "h4",
|
|
115
|
-
className:
|
|
114
|
+
className: t.cardTooltipTitle,
|
|
116
115
|
variant: "bodyDefaultBold",
|
|
117
116
|
children: T
|
|
118
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ o(x, {
|
|
119
118
|
as: "p",
|
|
120
|
-
className:
|
|
119
|
+
className: t.cardTooltipCitation,
|
|
121
120
|
color: "textOnLightDefault",
|
|
122
121
|
variant: "caption",
|
|
123
122
|
children: f
|
|
124
|
-
}), h && /* @__PURE__ */
|
|
123
|
+
}), h && /* @__PURE__ */ o(A, {
|
|
125
124
|
"aria-label": n(s.cardTooltipButton),
|
|
126
|
-
className:
|
|
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 {
|
|
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
|
-
...
|
|
25
|
-
action:
|
|
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
|
|
2
|
-
import { BoxNotes as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import {
|
|
6
|
-
import { focusInput as
|
|
7
|
-
import
|
|
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
|
|
10
|
-
embedTheAnswerButtonContainer:
|
|
11
|
-
embedTheAnswerButton:
|
|
12
|
-
completedText:
|
|
13
|
-
},
|
|
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:
|
|
15
|
+
hostAppName: l,
|
|
16
16
|
embedTheAnswerButtonConfig: t,
|
|
17
17
|
questionId: u,
|
|
18
|
-
recordAction:
|
|
19
|
-
variant:
|
|
18
|
+
recordAction: p,
|
|
19
|
+
variant: T
|
|
20
20
|
}) => {
|
|
21
21
|
const {
|
|
22
|
-
formatMessage:
|
|
23
|
-
} =
|
|
24
|
-
!o || !
|
|
25
|
-
...
|
|
26
|
-
action:
|
|
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:
|
|
30
|
+
hostAppName: l,
|
|
31
31
|
questionId: u || ""
|
|
32
32
|
}
|
|
33
|
-
}), t.onAction(o),
|
|
34
|
-
|
|
35
|
-
}, 5e3),
|
|
36
|
-
},
|
|
37
|
-
|
|
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 || !
|
|
39
|
+
if (!o || !t?.onAction)
|
|
40
40
|
return null;
|
|
41
|
-
const
|
|
42
|
-
return /* @__PURE__ */ e(
|
|
43
|
-
content:
|
|
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:
|
|
46
|
-
children:
|
|
47
|
-
className:
|
|
48
|
-
children:
|
|
49
|
-
}) : /* @__PURE__ */ e(
|
|
50
|
-
"aria-label":
|
|
51
|
-
className:
|
|
52
|
-
icon:
|
|
53
|
-
onClick:
|
|
54
|
-
onFocusCapture:
|
|
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:
|
|
57
|
+
children: s
|
|
58
58
|
})
|
|
59
59
|
})
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
g as EmbedTheAnswerButton,
|
|
64
|
+
g as default
|
|
65
65
|
};
|
|
@@ -1,53 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import
|
|
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
|
|
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",
|
|
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:
|
|
16
|
-
feedbackTooltipAbuseDisclaimer:
|
|
15
|
+
feedbackTooltipPromptShareConsent: $,
|
|
16
|
+
feedbackTooltipAbuseDisclaimer: M,
|
|
17
17
|
feedbackTooltipAbuseLink: j
|
|
18
18
|
}, z = (s) => {
|
|
19
|
-
|
|
20
|
-
|
|
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}/${
|
|
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:
|
|
30
|
-
onOpenChange:
|
|
31
|
-
onSubmit:
|
|
32
|
-
shouldIncludeFeedbackText:
|
|
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
|
-
} =
|
|
45
|
+
} = w();
|
|
39
46
|
if (!h)
|
|
40
47
|
return s;
|
|
41
48
|
const _ = () => {
|
|
42
|
-
|
|
43
|
-
}, A = (
|
|
44
|
-
|
|
49
|
+
d(!1);
|
|
50
|
+
}, A = (b) => {
|
|
51
|
+
k(b);
|
|
45
52
|
};
|
|
46
|
-
return /* @__PURE__ */ e(
|
|
53
|
+
return /* @__PURE__ */ e(i, {
|
|
47
54
|
align: "end",
|
|
48
55
|
className: a.feedbackTooltip,
|
|
49
|
-
closeLabel: o(
|
|
50
|
-
content: /* @__PURE__ */ e(
|
|
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:
|
|
60
|
-
setFieldValue:
|
|
66
|
+
submitForm: b,
|
|
67
|
+
setFieldValue: p,
|
|
61
68
|
values: {
|
|
62
69
|
feedback: C,
|
|
63
|
-
feedbackPromptShareConsent:
|
|
64
|
-
issueType:
|
|
70
|
+
feedbackPromptShareConsent: y,
|
|
71
|
+
issueType: T
|
|
65
72
|
}
|
|
66
|
-
}) => /* @__PURE__ */
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
-
children: [/* @__PURE__ */ e(
|
|
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__ */
|
|
78
|
+
}), /* @__PURE__ */ n(I, {
|
|
72
79
|
className: a.feedbackTooltipForm,
|
|
73
|
-
children: [/* @__PURE__ */ e(
|
|
80
|
+
children: [/* @__PURE__ */ e(r.Legend, {
|
|
74
81
|
header: o(t.feedbackTooltipIssueTypeLabel),
|
|
75
|
-
children: /* @__PURE__ */ r
|
|
82
|
+
children: /* @__PURE__ */ n(r.Group, {
|
|
76
83
|
defaultValue: "",
|
|
77
84
|
loop: !0,
|
|
78
85
|
name: "issueType",
|
|
79
|
-
onValueChange: (
|
|
86
|
+
onValueChange: (c) => p("issueType", c),
|
|
80
87
|
orientation: "vertical",
|
|
81
|
-
value:
|
|
82
|
-
children: [/* @__PURE__ */ e(
|
|
88
|
+
value: T,
|
|
89
|
+
children: [/* @__PURE__ */ e(r.Item, {
|
|
83
90
|
label: o(t.feedbackTooltipIssueTypeAnswer1),
|
|
84
|
-
value:
|
|
85
|
-
}), /* @__PURE__ */ e(
|
|
91
|
+
value: m.INACCURATE_ANSWER
|
|
92
|
+
}), /* @__PURE__ */ e(r.Item, {
|
|
86
93
|
label: o(t.feedbackTooltipIssueTypeAnswer2),
|
|
87
|
-
value:
|
|
88
|
-
}), /* @__PURE__ */ e(
|
|
94
|
+
value: m.DID_NOT_FOLLOW_REQUEST
|
|
95
|
+
}), /* @__PURE__ */ e(r.Item, {
|
|
89
96
|
label: o(t.feedbackTooltipIssueTypeAnswer3),
|
|
90
|
-
value:
|
|
97
|
+
value: m.OTHER
|
|
91
98
|
})]
|
|
92
99
|
})
|
|
93
|
-
}),
|
|
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: (
|
|
105
|
+
onChange: (c) => p("feedback", c.target.value),
|
|
99
106
|
placeholder: o(t.feedbackTooltipFeedbackPlaceholder),
|
|
100
107
|
value: C
|
|
101
|
-
}), u && /* @__PURE__ */ e(
|
|
102
|
-
checked:
|
|
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: (
|
|
107
|
-
|
|
113
|
+
onCheckedChange: (c) => {
|
|
114
|
+
p("feedbackPromptShareConsent", c);
|
|
108
115
|
},
|
|
109
116
|
value: "feedbackPromptShareConsent"
|
|
110
|
-
}),
|
|
117
|
+
}), f && /* @__PURE__ */ e(g, {
|
|
111
118
|
as: "p",
|
|
112
119
|
className: a.feedbackTooltipAbuseDisclaimer,
|
|
113
120
|
variant: "caption",
|
|
114
|
-
children: /* @__PURE__ */ e(
|
|
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__ */
|
|
123
|
-
children: [/* @__PURE__ */ e(
|
|
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(
|
|
134
|
+
}), /* @__PURE__ */ e(i.Footer.PrimaryAction, {
|
|
128
135
|
className: a.feedbackTooltipSubmitBtn,
|
|
129
|
-
disabled: !
|
|
130
|
-
onClick: () =>
|
|
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:
|
|
138
|
-
open:
|
|
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 {
|
|
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
|
|
3
|
-
import
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import '../../../../styles/loading-indicator.css';const
|
|
6
|
-
loadingDots:
|
|
7
|
-
dot:
|
|
8
|
-
dot1:
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
12
|
+
function z() {
|
|
16
13
|
const {
|
|
17
|
-
formatMessage:
|
|
18
|
-
} =
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
"aria-label": n
|
|
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
|
-
|
|
31
|
+
z as LoadingIndicator
|
|
35
32
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { useEffect as
|
|
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
|
|
9
|
-
import '../../../../styles/references.css';const O = "_label_1wqmn_1",
|
|
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:
|
|
12
|
+
animate: l = !0,
|
|
13
13
|
citations: e,
|
|
14
|
-
recordAction:
|
|
15
|
-
onCitationClick:
|
|
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
|
|
21
|
-
a &&
|
|
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__ */
|
|
30
|
-
className:
|
|
29
|
+
}, []), e === null ? /* @__PURE__ */ s("div", {
|
|
30
|
+
className: r.references,
|
|
31
31
|
"data-testid": "content-answers-references-null"
|
|
32
|
-
}) : /* @__PURE__ */
|
|
33
|
-
className:
|
|
32
|
+
}) : /* @__PURE__ */ o("div", {
|
|
33
|
+
className: r.references,
|
|
34
34
|
"data-testid": "content-answers-references",
|
|
35
|
-
children: [a && /* @__PURE__ */
|
|
36
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [a && /* @__PURE__ */ o(C, {
|
|
36
|
+
children: [/* @__PURE__ */ s(u, {
|
|
37
37
|
as: "span",
|
|
38
|
-
className:
|
|
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:
|
|
46
|
-
title:
|
|
47
|
-
fileId:
|
|
48
|
-
source:
|
|
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__ */
|
|
52
|
-
animate:
|
|
51
|
+
/* @__PURE__ */ s(N, {
|
|
52
|
+
animate: l,
|
|
53
53
|
content: c,
|
|
54
|
-
fileId:
|
|
54
|
+
fileId: p,
|
|
55
55
|
id: n + 1,
|
|
56
|
-
onCitationClick:
|
|
57
|
-
recordAction:
|
|
58
|
-
source:
|
|
59
|
-
title:
|
|
60
|
-
}, `${
|
|
56
|
+
onCitationClick: m,
|
|
57
|
+
recordAction: t,
|
|
58
|
+
source: h,
|
|
59
|
+
title: d
|
|
60
|
+
}, `${i}-${n + 1}`)
|
|
61
61
|
))]
|
|
62
|
-
}),
|
|
63
|
-
recordAction:
|
|
62
|
+
}), e?.length === 0 && /* @__PURE__ */ s(x, {
|
|
63
|
+
recordAction: t
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
};
|