@box/box-ai-content-answers 0.147.1 → 0.148.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.
- package/dist/esm/lib/components/answer/answer.js +123 -117
- package/dist/esm/lib/components/answer/constants.js +3 -2
- package/dist/esm/lib/components/answer/feedback-tooltip.js +87 -64
- package/dist/esm/lib/components/answer/messages.js +4 -0
- package/dist/esm/lib/components/chat/chat.js +81 -79
- package/dist/esm/lib/components/common/markdown.js +339 -337
- package/dist/i18n/bn-IN.js +1 -0
- package/dist/i18n/da-DK.js +1 -0
- package/dist/i18n/de-DE.js +1 -0
- package/dist/i18n/en-AU.js +1 -0
- package/dist/i18n/en-CA.js +1 -0
- package/dist/i18n/en-GB.js +1 -0
- package/dist/i18n/en-US.js +1 -0
- package/dist/i18n/en-US.properties +2 -0
- package/dist/i18n/en-x-pseudo.js +78 -77
- package/dist/i18n/en-x-pseudo.properties +77 -77
- package/dist/i18n/es-419.js +1 -0
- package/dist/i18n/es-ES.js +1 -0
- package/dist/i18n/fi-FI.js +1 -0
- package/dist/i18n/fr-CA.js +1 -0
- package/dist/i18n/fr-FR.js +1 -0
- package/dist/i18n/hi-IN.js +1 -0
- package/dist/i18n/it-IT.js +1 -0
- package/dist/i18n/ja-JP.js +1 -0
- package/dist/i18n/json/src/lib/components/answer/messages.json +1 -1
- package/dist/i18n/ko-KR.js +1 -0
- package/dist/i18n/nb-NO.js +1 -0
- package/dist/i18n/nl-NL.js +1 -0
- package/dist/i18n/pl-PL.js +1 -0
- package/dist/i18n/pt-BR.js +1 -0
- package/dist/i18n/ru-RU.js +1 -0
- package/dist/i18n/sv-SE.js +1 -0
- package/dist/i18n/tr-TR.js +1 -0
- package/dist/i18n/zh-CN.js +1 -0
- package/dist/i18n/zh-TW.js +1 -0
- package/dist/styles/feedback-tooltip.css +1 -1
- package/dist/types/lib/components/answer/answer.d.ts +2 -0
- package/dist/types/lib/components/answer/constants.d.ts +1 -0
- package/dist/types/lib/components/answer/messages.d.ts +5 -0
- package/dist/types/lib/components/answer/stories/shared.d.ts +58 -0
- package/dist/types/lib/components/chat/chat.d.ts +1 -1
- package/dist/types/lib/components/chat/stories/index.d.ts +1 -0
- package/dist/types/lib/stories/shared.d.ts +5 -0
- package/dist/types/lib/types.d.ts +2 -0
- package/package.json +6 -6
|
@@ -1,162 +1,168 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { AlertTriangle as
|
|
3
|
-
import { Gray65 as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import { useIntl as
|
|
7
|
-
import { A as
|
|
8
|
-
import { extractBoxLinks as
|
|
9
|
-
import { MediaContainer as
|
|
10
|
-
import { AnswerContent as
|
|
11
|
-
import { CopyButton as
|
|
12
|
-
import { InlineError as
|
|
13
|
-
import { LoadingIndicator as
|
|
14
|
-
import
|
|
15
|
-
import { References as
|
|
16
|
-
import { ThumbButtons as
|
|
17
|
-
import { jsxs as
|
|
18
|
-
import '../../../../styles/answer.css';const
|
|
19
|
-
answer:
|
|
20
|
-
alertIcon:
|
|
21
|
-
error:
|
|
22
|
-
footer:
|
|
23
|
-
copyButtonContainer:
|
|
24
|
-
feedbackButtonsContainer:
|
|
25
|
-
shouldHaveMarginTop:
|
|
26
|
-
shouldUseAnimation:
|
|
27
|
-
shouldAnimateHeight:
|
|
28
|
-
footerButtons:
|
|
29
|
-
iconAvatar:
|
|
30
|
-
buttonsVisible:
|
|
31
|
-
},
|
|
32
|
-
answer:
|
|
1
|
+
import { Text as q } from "@box/blueprint-web";
|
|
2
|
+
import { AlertTriangle as J } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
+
import { Gray65 as K, Size4 as g } from "@box/blueprint-web-assets/tokens/tokens";
|
|
4
|
+
import S from "clsx";
|
|
5
|
+
import * as f from "react";
|
|
6
|
+
import { useIntl as Q } from "react-intl";
|
|
7
|
+
import { A as e } from "../../../../chunks/types.js";
|
|
8
|
+
import { extractBoxLinks as X, extractFileNames as Y } from "../../utils/getBoxLinks.js";
|
|
9
|
+
import { MediaContainer as R } from "../common/media-container.js";
|
|
10
|
+
import { AnswerContent as Z } from "./answer-content.js";
|
|
11
|
+
import { CopyButton as tt } from "./copy-button.js";
|
|
12
|
+
import { InlineError as ot } from "./inline-error.js";
|
|
13
|
+
import { LoadingIndicator as nt } from "./loading-indicator.js";
|
|
14
|
+
import h from "./messages.js";
|
|
15
|
+
import { References as et } from "./references.js";
|
|
16
|
+
import { ThumbButtons as rt } from "./thumb-buttons.js";
|
|
17
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
18
|
+
import '../../../../styles/answer.css';const st = "_answer_140hd_1", at = "_alertIcon_140hd_5", it = "_error_140hd_8", lt = "_footer_140hd_12", ct = "_copyButtonContainer_140hd_18", dt = "_feedbackButtonsContainer_140hd_19", ft = "_shouldHaveMarginTop_140hd_23", ut = "_shouldUseAnimation_140hd_26", mt = "_shouldAnimateHeight_140hd_30", _t = "_footerButtons_140hd_34", ht = "_iconAvatar_140hd_40", Et = "_buttonsVisible_140hd_56", t = {
|
|
19
|
+
answer: st,
|
|
20
|
+
alertIcon: at,
|
|
21
|
+
error: it,
|
|
22
|
+
footer: lt,
|
|
23
|
+
copyButtonContainer: ct,
|
|
24
|
+
feedbackButtonsContainer: dt,
|
|
25
|
+
shouldHaveMarginTop: ft,
|
|
26
|
+
shouldUseAnimation: ut,
|
|
27
|
+
shouldAnimateHeight: mt,
|
|
28
|
+
footerButtons: _t,
|
|
29
|
+
iconAvatar: ht,
|
|
30
|
+
buttonsVisible: Et
|
|
31
|
+
}, pt = /* @__PURE__ */ new Set([e.RATE_LIMITING, e.NO_CONTENT, e.PRECONDITION_FAILED, e.GENERAL, e.AGENT_NOT_FOUND]), yt = /* @__PURE__ */ f.memo(({
|
|
32
|
+
answer: r,
|
|
33
33
|
citations: T,
|
|
34
34
|
error: o,
|
|
35
|
-
contentType:
|
|
36
|
-
hostAppName:
|
|
35
|
+
contentType: A,
|
|
36
|
+
hostAppName: u,
|
|
37
37
|
feedbackValue: b,
|
|
38
|
-
isCitationsEnabled:
|
|
38
|
+
isCitationsEnabled: O = !1,
|
|
39
39
|
isCompleted: a = !1,
|
|
40
|
-
isFeedbackEnabled:
|
|
41
|
-
isFeedbackFormEnabled:
|
|
42
|
-
isFeedbackTooltipOpen:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
isFeedbackEnabled: B = !1,
|
|
41
|
+
isFeedbackFormEnabled: w,
|
|
42
|
+
isFeedbackTooltipOpen: E,
|
|
43
|
+
isInlineCitationsEnabled: P = !1,
|
|
44
|
+
isLoading: C = !1,
|
|
45
|
+
isMarkdownEnabled: L = !1,
|
|
46
|
+
items: m = [],
|
|
47
|
+
onAnswerCopy: v,
|
|
48
|
+
onCitationClick: M,
|
|
49
|
+
onFeedbackFormSubmit: y,
|
|
50
|
+
onFeedbackTooltipOpenChange: D,
|
|
51
|
+
promptType: F,
|
|
52
|
+
recordAction: c,
|
|
53
|
+
shouldFeedbackFormIncludeFeedbackText: H,
|
|
54
|
+
useAnimation: U = !0,
|
|
55
|
+
variant: i = "modal",
|
|
56
|
+
setAnswerFeedback: k,
|
|
57
|
+
questionId: x
|
|
57
58
|
}) => {
|
|
58
|
-
const
|
|
59
|
-
formatMessage:
|
|
60
|
-
} =
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
(
|
|
59
|
+
const p = pt.has(o), N = C && !r && !o, [G, V] = f.useState(a), {
|
|
60
|
+
formatMessage: _
|
|
61
|
+
} = Q();
|
|
62
|
+
f.useEffect(() => {
|
|
63
|
+
if (r && c && a) {
|
|
64
|
+
const s = X(r), l = Y(r);
|
|
65
|
+
(s.length > 0 || l.length > 0) && c({
|
|
65
66
|
action: "programmatic",
|
|
66
|
-
component:
|
|
67
|
+
component: i,
|
|
67
68
|
feature: "answers",
|
|
68
69
|
target: "links_detected",
|
|
69
70
|
data: {
|
|
70
|
-
hostAppName:
|
|
71
|
-
linkCount:
|
|
72
|
-
fileNameCount:
|
|
71
|
+
hostAppName: u,
|
|
72
|
+
linkCount: s.length,
|
|
73
|
+
fileNameCount: l.length
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
|
-
}, [
|
|
77
|
-
setTimeout(() =>
|
|
77
|
+
}, [r, i, u, a]), f.useEffect(() => {
|
|
78
|
+
setTimeout(() => V(a), 0);
|
|
78
79
|
}, [a]);
|
|
79
|
-
const
|
|
80
|
+
const I = () => /* @__PURE__ */ n(J, {
|
|
80
81
|
className: t.alertIcon,
|
|
81
|
-
color:
|
|
82
|
+
color: K,
|
|
82
83
|
"data-testid": "content-answers-error-alert-icon",
|
|
83
|
-
height:
|
|
84
|
+
height: g,
|
|
84
85
|
role: "presentation",
|
|
85
|
-
width:
|
|
86
|
-
}),
|
|
86
|
+
width: g
|
|
87
|
+
}), $ = () => /* @__PURE__ */ d(q, {
|
|
87
88
|
as: "p",
|
|
88
89
|
className: t.error,
|
|
89
90
|
color: "textOnLightSecondary",
|
|
90
91
|
"data-testid": "content-answers-error",
|
|
91
92
|
variant: "caption",
|
|
92
|
-
children: [o ===
|
|
93
|
-
}), j = () => o !==
|
|
94
|
-
className:
|
|
95
|
-
[t.buttonsVisible]:
|
|
93
|
+
children: [o === e.RESPONSE_INTERRUPTED && _(h.responseInterruptedError), o === e.RESPONSE_FAILED && _(h.responseFailedError), o === e.RESPONSE_STOPPED && _(h.responseStoppedError), o !== e.RESPONSE_STOPPED && I()]
|
|
94
|
+
}), j = () => o !== e.RESPONSE_STOPPED ? /* @__PURE__ */ d("div", {
|
|
95
|
+
className: S(t.footerButtons, "footer-buttons-container", {
|
|
96
|
+
[t.buttonsVisible]: E
|
|
96
97
|
}),
|
|
97
|
-
children: [
|
|
98
|
+
children: [B ? /* @__PURE__ */ n("div", {
|
|
98
99
|
className: t.feedbackButtonsContainer,
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ n(rt, {
|
|
100
101
|
feedbackValue: b,
|
|
101
|
-
hostAppName:
|
|
102
|
-
isFeedbackFormEnabled:
|
|
103
|
-
isFeedbackTooltipOpen:
|
|
104
|
-
items:
|
|
105
|
-
onFeedbackFormSubmit:
|
|
106
|
-
onFeedbackTooltipOpenChange:
|
|
107
|
-
promptType:
|
|
108
|
-
questionId:
|
|
109
|
-
recordAction:
|
|
110
|
-
setAnswerFeedback:
|
|
111
|
-
shouldFeedbackFormIncludeFeedbackText:
|
|
112
|
-
variant:
|
|
102
|
+
hostAppName: u,
|
|
103
|
+
isFeedbackFormEnabled: w,
|
|
104
|
+
isFeedbackTooltipOpen: E,
|
|
105
|
+
items: m,
|
|
106
|
+
onFeedbackFormSubmit: y,
|
|
107
|
+
onFeedbackTooltipOpenChange: D,
|
|
108
|
+
promptType: F,
|
|
109
|
+
questionId: x,
|
|
110
|
+
recordAction: c,
|
|
111
|
+
setAnswerFeedback: k,
|
|
112
|
+
shouldFeedbackFormIncludeFeedbackText: H,
|
|
113
|
+
variant: i
|
|
113
114
|
})
|
|
114
|
-
}) : null, /* @__PURE__ */
|
|
115
|
+
}) : null, /* @__PURE__ */ n("div", {
|
|
115
116
|
className: t.copyButtonContainer,
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
answer:
|
|
118
|
-
onAnswerCopy:
|
|
119
|
-
recordAction:
|
|
117
|
+
children: /* @__PURE__ */ n(tt, {
|
|
118
|
+
answer: r,
|
|
119
|
+
onAnswerCopy: v,
|
|
120
|
+
recordAction: c
|
|
120
121
|
})
|
|
121
122
|
})]
|
|
122
|
-
}) :
|
|
123
|
-
|
|
123
|
+
}) : r ? null : I(), z = (s) => (!m || !a || !P || m.forEach((l) => {
|
|
124
|
+
if (s.includes(l.name)) {
|
|
125
|
+
const W = `${window.location.origin}/file/${l.id}`;
|
|
126
|
+
s = s.replaceAll(l.name, `[${l.name}](${W})`);
|
|
127
|
+
}
|
|
128
|
+
}), s);
|
|
129
|
+
return /* @__PURE__ */ d("div", {
|
|
124
130
|
"aria-live": "polite",
|
|
125
131
|
className: t.answer,
|
|
126
132
|
"data-testid": "content-answers-answer",
|
|
127
|
-
children: [
|
|
133
|
+
children: [N && /* @__PURE__ */ n(nt, {}), !p && !N && /* @__PURE__ */ n(R, {
|
|
128
134
|
className: "answer",
|
|
129
|
-
variant:
|
|
130
|
-
children: /* @__PURE__ */
|
|
131
|
-
isUsedInsideSidebar:
|
|
135
|
+
variant: i,
|
|
136
|
+
children: /* @__PURE__ */ d(R.Content, {
|
|
137
|
+
isUsedInsideSidebar: i === "sidebar",
|
|
132
138
|
variant: "answer",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
134
|
-
answer:
|
|
135
|
-
isMarkdownEnabled:
|
|
136
|
-
variant:
|
|
137
|
-
}), a && /* @__PURE__ */
|
|
138
|
-
className:
|
|
139
|
-
[t.shouldHaveMarginTop]:
|
|
140
|
-
[t.shouldAnimateHeight]:
|
|
141
|
-
[t.shouldUseAnimation]:
|
|
139
|
+
children: [/* @__PURE__ */ n(Z, {
|
|
140
|
+
answer: z(r),
|
|
141
|
+
isMarkdownEnabled: L,
|
|
142
|
+
variant: i
|
|
143
|
+
}), a && /* @__PURE__ */ d("div", {
|
|
144
|
+
className: S(t.footer, {
|
|
145
|
+
[t.shouldHaveMarginTop]: r,
|
|
146
|
+
[t.shouldAnimateHeight]: G,
|
|
147
|
+
[t.shouldUseAnimation]: U
|
|
142
148
|
}),
|
|
143
149
|
"data-testid": "content-answers-answer-footer",
|
|
144
|
-
children: [o &&
|
|
150
|
+
children: [o && $(), O && !o && /* @__PURE__ */ n(et, {
|
|
145
151
|
citations: T,
|
|
146
|
-
onCitationClick:
|
|
147
|
-
recordAction:
|
|
152
|
+
onCitationClick: M,
|
|
153
|
+
recordAction: c
|
|
148
154
|
}), j()]
|
|
149
155
|
})]
|
|
150
156
|
})
|
|
151
|
-
}),
|
|
152
|
-
contentType:
|
|
157
|
+
}), p && /* @__PURE__ */ n(ot, {
|
|
158
|
+
contentType: A,
|
|
153
159
|
error: o,
|
|
154
|
-
recordAction:
|
|
155
|
-
variant:
|
|
160
|
+
recordAction: c,
|
|
161
|
+
variant: i
|
|
156
162
|
})]
|
|
157
163
|
});
|
|
158
164
|
});
|
|
159
165
|
export {
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
yt as Answer,
|
|
167
|
+
yt as default
|
|
162
168
|
};
|
|
@@ -1,108 +1,131 @@
|
|
|
1
|
-
import { Formik as
|
|
2
|
-
import { GuidedTooltip as t, Radio as
|
|
3
|
-
import { useIntl as
|
|
1
|
+
import { Formik as L, Form as g } from "formik";
|
|
2
|
+
import { GuidedTooltip as t, Radio as c, TextArea as I, Text as y, Link as S } from "@box/blueprint-web";
|
|
3
|
+
import { useIntl as v, FormattedMessage as N } from "react-intl";
|
|
4
4
|
import { F as d } from "../../../../chunks/types.js";
|
|
5
|
-
import
|
|
5
|
+
import { ABUSE_REPORT_EMAIL as k } from "./constants.js";
|
|
6
|
+
import j from "../../messages.js";
|
|
6
7
|
import a from "./messages.js";
|
|
7
|
-
import { jsx as
|
|
8
|
-
import '../../../../styles/feedback-tooltip.css';const
|
|
9
|
-
feedbackTooltip:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
import { jsx as e, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
9
|
+
import '../../../../styles/feedback-tooltip.css';const E = "_feedbackTooltip_1x6kj_1", R = "_feedbackTooltipForm_1x6kj_8", B = "_feedbackTooltipTitle_1x6kj_12", C = "_feedbackTooltipTextarea_1x6kj_15", D = "_feedbackTooltipSubmitBtn_1x6kj_18", w = "_feedbackTooltipAbuseDisclaimer_1x6kj_21", O = "_feedbackTooltipAbuseLink_1x6kj_25", l = {
|
|
10
|
+
feedbackTooltip: E,
|
|
11
|
+
feedbackTooltipForm: R,
|
|
12
|
+
feedbackTooltipTitle: B,
|
|
13
|
+
feedbackTooltipTextarea: C,
|
|
14
|
+
feedbackTooltipSubmitBtn: D,
|
|
15
|
+
feedbackTooltipAbuseDisclaimer: w,
|
|
16
|
+
feedbackTooltipAbuseLink: O
|
|
17
|
+
}, H = ({
|
|
18
|
+
children: b,
|
|
19
|
+
isOpen: m,
|
|
20
|
+
onOpenChange: n,
|
|
21
|
+
onSubmit: u,
|
|
22
|
+
shouldIncludeFeedbackText: _,
|
|
23
|
+
shouldShow: A
|
|
20
24
|
}) => {
|
|
21
25
|
const {
|
|
22
|
-
formatMessage:
|
|
23
|
-
} =
|
|
24
|
-
if (!
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
26
|
+
formatMessage: o
|
|
27
|
+
} = v();
|
|
28
|
+
if (!A)
|
|
29
|
+
return b;
|
|
30
|
+
const h = () => {
|
|
31
|
+
n(!1);
|
|
32
|
+
}, x = (s) => {
|
|
33
|
+
u(s);
|
|
30
34
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ e(t, {
|
|
32
36
|
align: "end",
|
|
33
|
-
className:
|
|
34
|
-
closeLabel:
|
|
35
|
-
content: /* @__PURE__ */
|
|
37
|
+
className: l.feedbackTooltip,
|
|
38
|
+
closeLabel: o(j.closeButtonText),
|
|
39
|
+
content: /* @__PURE__ */ e(L, {
|
|
36
40
|
initialValues: {
|
|
37
41
|
feedback: "",
|
|
38
42
|
issueType: ""
|
|
39
43
|
},
|
|
40
|
-
onSubmit:
|
|
44
|
+
onSubmit: x,
|
|
41
45
|
children: ({
|
|
42
46
|
submitForm: s,
|
|
43
47
|
setFieldValue: T,
|
|
44
48
|
values: {
|
|
45
|
-
feedback:
|
|
49
|
+
feedback: F,
|
|
46
50
|
issueType: p
|
|
47
51
|
}
|
|
48
|
-
}) => /* @__PURE__ */ i(
|
|
52
|
+
}) => /* @__PURE__ */ i(f, {
|
|
49
53
|
children: [/* @__PURE__ */ i(t.Body, {
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
-
className:
|
|
52
|
-
children:
|
|
53
|
-
}), /* @__PURE__ */ i(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
children: [/* @__PURE__ */ e(t.Title, {
|
|
55
|
+
className: l.feedbackTooltipTitle,
|
|
56
|
+
children: o(a.feedbackTooltipTitle)
|
|
57
|
+
}), /* @__PURE__ */ i(g, {
|
|
58
|
+
className: l.feedbackTooltipForm,
|
|
59
|
+
children: [/* @__PURE__ */ e(c.Legend, {
|
|
60
|
+
header: o(a.feedbackTooltipIssueTypeLabel),
|
|
61
|
+
children: /* @__PURE__ */ i(c.Group, {
|
|
57
62
|
defaultValue: "",
|
|
58
63
|
loop: !0,
|
|
59
64
|
name: "issueType",
|
|
60
65
|
onValueChange: (r) => T("issueType", r),
|
|
61
66
|
orientation: "vertical",
|
|
62
67
|
value: p,
|
|
63
|
-
children: [/* @__PURE__ */
|
|
64
|
-
label:
|
|
68
|
+
children: [/* @__PURE__ */ e(c.Item, {
|
|
69
|
+
label: o(a.feedbackTooltipIssueTypeAnswer1),
|
|
65
70
|
value: d.INACCURATE_ANSWER
|
|
66
|
-
}), /* @__PURE__ */
|
|
67
|
-
label:
|
|
71
|
+
}), /* @__PURE__ */ e(c.Item, {
|
|
72
|
+
label: o(a.feedbackTooltipIssueTypeAnswer2),
|
|
68
73
|
value: d.DID_NOT_FOLLOW_REQUEST
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
-
label:
|
|
74
|
+
}), /* @__PURE__ */ e(c.Item, {
|
|
75
|
+
label: o(a.feedbackTooltipIssueTypeAnswer3),
|
|
71
76
|
value: d.OTHER
|
|
72
77
|
})]
|
|
73
78
|
})
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
}), _ && /* @__PURE__ */ i(f, {
|
|
80
|
+
children: [/* @__PURE__ */ e(I, {
|
|
81
|
+
className: l.feedbackTooltipTextarea,
|
|
82
|
+
label: o(a.feedbackTooltipFeedbackLabel),
|
|
83
|
+
maxRows: 4,
|
|
84
|
+
minRows: 4,
|
|
85
|
+
onChange: (r) => T("feedback", r.target.value),
|
|
86
|
+
placeholder: o(a.feedbackTooltipFeedbackPlaceholder),
|
|
87
|
+
value: F
|
|
88
|
+
}), /* @__PURE__ */ e(y, {
|
|
89
|
+
as: "p",
|
|
90
|
+
className: l.feedbackTooltipAbuseDisclaimer,
|
|
91
|
+
variant: "caption",
|
|
92
|
+
children: /* @__PURE__ */ e(N, {
|
|
93
|
+
...a.feedbackTooltipAbuseDisclaimer,
|
|
94
|
+
values: {
|
|
95
|
+
abuseEmailLink: /* @__PURE__ */ e(S, {
|
|
96
|
+
className: l.feedbackTooltipAbuseLink,
|
|
97
|
+
href: `mailto:${k}`,
|
|
98
|
+
rel: "noopener noreferrer",
|
|
99
|
+
target: "_blank",
|
|
100
|
+
children: k
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
82
105
|
})]
|
|
83
106
|
})]
|
|
84
107
|
}), /* @__PURE__ */ i(t.Footer, {
|
|
85
|
-
children: [/* @__PURE__ */
|
|
86
|
-
onClick:
|
|
108
|
+
children: [/* @__PURE__ */ e(t.Footer.SecondaryAction, {
|
|
109
|
+
onClick: h,
|
|
87
110
|
size: "large",
|
|
88
|
-
children:
|
|
89
|
-
}), /* @__PURE__ */
|
|
90
|
-
className:
|
|
111
|
+
children: o(a.feedbackTooltipCancel)
|
|
112
|
+
}), /* @__PURE__ */ e(t.Footer.PrimaryAction, {
|
|
113
|
+
className: l.feedbackTooltipSubmitBtn,
|
|
91
114
|
disabled: !p,
|
|
92
115
|
onClick: () => s(),
|
|
93
116
|
size: "large",
|
|
94
|
-
children:
|
|
117
|
+
children: o(a.feedbackTooltipSubmit)
|
|
95
118
|
})]
|
|
96
119
|
})]
|
|
97
120
|
})
|
|
98
121
|
}),
|
|
99
|
-
onOpenChange:
|
|
100
|
-
open:
|
|
122
|
+
onOpenChange: n,
|
|
123
|
+
open: m,
|
|
101
124
|
side: "left",
|
|
102
|
-
children:
|
|
125
|
+
children: b
|
|
103
126
|
});
|
|
104
127
|
};
|
|
105
128
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
129
|
+
H as FeedbackTooltip,
|
|
130
|
+
H as default
|
|
108
131
|
};
|
|
@@ -36,6 +36,10 @@ const t = e({
|
|
|
36
36
|
id: "boxAI.contentAnswers.feedbackTooltipConfirmation",
|
|
37
37
|
defaultMessage: "Thank you for the feedback."
|
|
38
38
|
},
|
|
39
|
+
feedbackTooltipAbuseDisclaimer: {
|
|
40
|
+
id: "boxAI.contentAnswers.feedbackTooltipAbuseDisclaimer",
|
|
41
|
+
defaultMessage: "To report inappropriate content, email {abuseEmailLink}"
|
|
42
|
+
},
|
|
39
43
|
feedbackTooltipFeedbackLabel: {
|
|
40
44
|
id: "boxAI.contentAnswers.feedbackTooltipFeedback",
|
|
41
45
|
defaultMessage: "How can we improve the experience?"
|