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