@rh-support/components 2.5.18 → 2.5.19
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.
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
interface IProps {
|
|
3
3
|
isModalOpen: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
caseSummaryId?: number;
|
|
5
|
+
caseSummaryId?: number | null;
|
|
6
6
|
feedbackFooterMessage?: string;
|
|
7
|
-
isCaseSummary?: boolean;
|
|
8
7
|
errorMessage?: string;
|
|
8
|
+
isCaseSummary: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare function SupportFeedbackModal(props: IProps): React.JSX.Element;
|
|
11
11
|
declare namespace SupportFeedbackModal {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAqQ1C;kBArQQ,oBAAoB;;;AAwQ7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -71,9 +71,20 @@ function SupportFeedbackModal(props) {
|
|
|
71
71
|
const handleSubmit = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
event.preventDefault();
|
|
73
73
|
if (!isSubmitButtonValid) {
|
|
74
|
+
let updatedValues = Object.assign({}, values);
|
|
75
|
+
if (props.isCaseSummary) {
|
|
76
|
+
const extraInfo = [
|
|
77
|
+
props.errorMessage && `caseSummaryErrorMessage:'${props.errorMessage}'\n`,
|
|
78
|
+
props.caseSummaryId && `caseSummaryId:'${props.caseSummaryId}'\n`,
|
|
79
|
+
];
|
|
80
|
+
updatedValues = Object.assign(Object.assign({}, updatedValues), { moreInfo: `${extraInfo}${updatedValues.moreInfo || ''}`.trim() });
|
|
81
|
+
delete updatedValues.caseSummaryErrorMessage;
|
|
82
|
+
delete updatedValues.caseSummaryId;
|
|
83
|
+
}
|
|
74
84
|
try {
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
// Call the request with the updated values
|
|
86
|
+
yield request(updatedValues, window.sessionjs, window.location.href, seSessionId);
|
|
87
|
+
setValues(formInitState); // Reset form state after successful submission
|
|
77
88
|
ToastNotification.addSuccessMessage(t(`Thank you. We've received your feedback.`), t('Have a great day!'));
|
|
78
89
|
handleModalToggle();
|
|
79
90
|
}
|
|
@@ -126,7 +137,7 @@ function SupportFeedbackModal(props) {
|
|
|
126
137
|
React.createElement("form", { className: "support-feedback-form", action: "", onSubmit: handleSubmit },
|
|
127
138
|
React.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-v5-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
|
|
128
139
|
React.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-v5-u-mb-md" },
|
|
129
|
-
React.createElement(Trans, null, "How satisfied are you with customer support\u2019s web experience?"),
|
|
140
|
+
props.isCaseSummary ? (React.createElement(Trans, null, "How satisfied are you with generated AI case summary ?")) : (React.createElement(Trans, null, "How satisfied are you with customer support\u2019s web experience?")),
|
|
130
141
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*"),
|
|
131
142
|
' '),
|
|
132
143
|
React.createElement("div", { className: "satisfaction-values-wrapper" }, sentiments.map((sentiment) => {
|
|
@@ -146,7 +157,8 @@ function SupportFeedbackModal(props) {
|
|
|
146
157
|
React.createElement("p", null, props.isCaseSummary ? (React.createElement(Trans, { i18nKey: "feedbackPrivacyNotice" },
|
|
147
158
|
"Do not share any personal or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or services. For more information about Red Hat\u2019s privacy practices, please refer to the",
|
|
148
159
|
' ',
|
|
149
|
-
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" },
|
|
160
|
+
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" },
|
|
161
|
+
React.createElement("u", null, "Red Hat Privacy Statement.")))) : (React.createElement(Trans, null, "Feedback is sent to the web team working on this application, not the support associate working on your case."))))));
|
|
150
162
|
}
|
|
151
163
|
function returnModalAction() {
|
|
152
164
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.19",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"defaults and supports es6-module",
|
|
107
107
|
"maintained node versions"
|
|
108
108
|
],
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "055bc8a9de6f81109f7fc040923b44d279c447c1"
|
|
110
110
|
}
|