@rh-support/troubleshoot 2.6.350 → 2.6.354
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/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +2 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +3 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +8 -2
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +7 -1
- package/lib/esm/css/case.css +21 -14
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +23 -45
- package/package.json +2 -2
package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsaCommentFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAIvB,CAAC;AAEX,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;CACpG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AsaCommentFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAIvB,CAAC;AAEX,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;CACpG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA4JpD"}
|
|
@@ -62,7 +62,7 @@ export function AsaCommentFeedbackModal(props) {
|
|
|
62
62
|
React.createElement("p", { id: "asa-comment-feedback-modal-description", className: "asa-comment-feedback-modal-description" },
|
|
63
63
|
React.createElement(Trans, null, "Let us know if you found a bug or if you have a suggestion to improve the web experience.")),
|
|
64
64
|
React.createElement(Form, { onSubmit: handleSubmit },
|
|
65
|
-
React.createElement(FormGroup, { label: t('How satisfied are you with generated
|
|
65
|
+
React.createElement(FormGroup, { label: t('How satisfied are you with generated Support AI assistant comment?'), isRequired: true, fieldId: "asa-comment-feedback-rating" },
|
|
66
66
|
React.createElement("div", { className: "asa-feedback-rating-options", role: "radiogroup", "aria-labelledby": "asa-comment-feedback-rating", id: "asa-comment-feedback-rating" }, ASA_FEEDBACK_RATINGS.map((rating) => {
|
|
67
67
|
const isSelected = selectedFeedback === rating.value;
|
|
68
68
|
return (React.createElement("button", { key: rating.value, type: "button", className: `asa-feedback-rating-option${isSelected ? ' is-selected' : ''}`, "aria-pressed": isSelected, "aria-label": t(rating.label), "data-tracking-id": `case-asa-comment-feedback-${rating.label.toLowerCase()}`, disabled: props.isSubmitting, onClick: () => {
|
|
@@ -79,10 +79,7 @@ export function AsaCommentFeedbackModal(props) {
|
|
|
79
79
|
React.createElement(FormGroup, { label: t('How can we improve?'), fieldId: "asa-comment-feedback-reason" },
|
|
80
80
|
React.createElement(TextArea, { id: "asa-comment-feedback-reason", name: "feedbackReason", value: feedbackReason, onChange: (_event, value) => setFeedbackReason(value), placeholder: t('Describe your suggestion in details'), "aria-label": t('How can we improve?'), isDisabled: props.isSubmitting, resizeOrientation: "vertical" })),
|
|
81
81
|
React.createElement("p", { className: "asa-feedback-privacy" },
|
|
82
|
-
React.createElement(Trans, null, "Do not
|
|
83
|
-
' ',
|
|
84
|
-
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noreferrer" },
|
|
85
|
-
React.createElement(Trans, null, "Red Hat Privacy Statement."))))),
|
|
82
|
+
React.createElement(Trans, null, "Do not include any personal information or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or Services.")))),
|
|
86
83
|
React.createElement(ModalFooter, null,
|
|
87
84
|
React.createElement(Button, { key: "confirm", variant: "primary", onClick: handleSubmit, isDisabled: isSubmitDisabled, isLoading: props.isSubmitting, spinnerAriaValueText: props.isSubmitting ? t('Sending feedback') : undefined, "data-tracking-id": "case-asa-comment-feedback-submit", "aria-label": t('Send Feedback') },
|
|
88
85
|
React.createElement(Trans, null, "Send Feedback")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAexE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAexE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,cAAc,4EAsPlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA+BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AASvE,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClF,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA+BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AASvE,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClF,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAochB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { encodeAngularBrackets, EventTypes, htmlEntitiesEncode, linkifyBZIDs, linkifyWithCaseIDs, parseCommentMarkdown, processRME, } from '@cee-eng/ui-toolkit';
|
|
12
|
-
import { Alert,
|
|
12
|
+
import { Alert, Button, ButtonVariant, Icon, Tooltip, TooltipPosition } from '@patternfly/react-core';
|
|
13
13
|
import FrownIcon from '@patternfly/react-icons/dist/js/icons/frown-icon';
|
|
14
14
|
import MehIcon from '@patternfly/react-icons/dist/js/icons/meh-icon';
|
|
15
15
|
import OutlinedFrownIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-icon';
|
|
@@ -260,21 +260,14 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
260
260
|
React.createElement("header", null,
|
|
261
261
|
React.createElement("h4", null,
|
|
262
262
|
computeCommentAuthorIcon(props.comment),
|
|
263
|
-
|
|
264
|
-
" ",
|
|
265
|
-
props.comment.createdBy) : React.createElement(React.Fragment, null,
|
|
266
|
-
" ",
|
|
267
|
-
props.comment.lastModifiedById),
|
|
263
|
+
props.comment.createdBy,
|
|
268
264
|
props.comment.createdByType === 'Partner' && (React.createElement("span", null,
|
|
269
265
|
' ',
|
|
270
266
|
"(",
|
|
271
267
|
React.createElement(Trans, null, "Partner"),
|
|
272
268
|
")"))),
|
|
273
269
|
React.createElement("time", null, formatDateTime(props.comment.lastModifiedDate))),
|
|
274
|
-
isAsaComment && (React.createElement(Alert, { className: `asa-comment-alert ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: "custom", title: t('
|
|
275
|
-
React.createElement(Trans, null, "Send Feedback")) },
|
|
276
|
-
React.createElement("p", null,
|
|
277
|
-
React.createElement(Trans, null, "This comment is based on information from your support case. It may not be up to date or completely accurate. Please review it and share your feedback to help us improve this feature.")))),
|
|
270
|
+
isAsaComment && (React.createElement(Alert, { className: `asa-comment-alert ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: "custom", title: t('Always review AI-Generated content prior to use') })),
|
|
278
271
|
React.createElement("div", { className: "comment-body", onClick: onCommentAreaClick, ref: markdownRef }, computeCommentText(props.comment)),
|
|
279
272
|
React.createElement("footer", null,
|
|
280
273
|
React.createElement("span", { className: "comment-note" }, computeCommentFooter(props.comment)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAkB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAyCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAkB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAyCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAsqBnD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { caseAttachments } from '@cee-eng/hydrajs';
|
|
11
|
-
import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
|
|
11
|
+
import { Alert, MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
|
|
12
12
|
import { AlertMessage, AlertType, ErrorBoundary, LoadingIndicator, ToastNotification } from '@rh-support/components';
|
|
13
13
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
14
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -32,7 +32,7 @@ import { AttachmentContextProvider } from '../../../shared/fileUpload/reducer/At
|
|
|
32
32
|
import { PDFContext } from '../../PDFContainer';
|
|
33
33
|
import CaseAttachment from './CaseAttachment';
|
|
34
34
|
import CaseChat from './CaseChat';
|
|
35
|
-
import CaseComments from './CaseComments';
|
|
35
|
+
import CaseComments, { AUTOMATED_SUPPORT_ASSISTANT } from './CaseComments';
|
|
36
36
|
import CaseExternalTrackerUpdate from './CaseExternalTrackerUpdate';
|
|
37
37
|
import { CommentSearch } from './CommentSearch';
|
|
38
38
|
import { PostComment } from './PostComment';
|
|
@@ -97,6 +97,7 @@ export default function CaseDiscussion(props) {
|
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
99
|
const shouldRenderRVComponent = !isExportingPDF && allDiscussions.length > VC_MINIMUM_COMMENT;
|
|
100
|
+
const hasAsaComment = (props.caseComments || []).some((comment) => (comment === null || comment === void 0 ? void 0 : comment.createdBy) === AUTOMATED_SUPPORT_ASSISTANT);
|
|
100
101
|
// filter comments on the basis of filterBy and search api
|
|
101
102
|
const computeFilteredComments = computeFilterComment();
|
|
102
103
|
const comuteSearchedComments = searchResult.length === 0
|
|
@@ -377,6 +378,11 @@ export default function CaseDiscussion(props) {
|
|
|
377
378
|
};
|
|
378
379
|
const onSortToggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onSortToggleClick, isExpanded: isSortOpen, isFullWidth: true }, sort.name));
|
|
379
380
|
return (React.createElement(React.Fragment, null,
|
|
381
|
+
hasAsaComment && (React.createElement(Alert, { className: `asa-discussion-alert ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: "info", title: t('Important'), "data-tracking-id": "case-discussion-asa-notice" },
|
|
382
|
+
React.createElement(Trans, null,
|
|
383
|
+
"This feature uses AI technology to analyze interactions and provide you with support. Interactions may be used to improve Red Hat products or services. For more information about Red Hat's privacy practices, please refer to the",
|
|
384
|
+
' ',
|
|
385
|
+
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" }, "Red Hat Privacy Statement")))),
|
|
380
386
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading post comment section') } },
|
|
381
387
|
React.createElement(AttachmentContextProvider, null,
|
|
382
388
|
React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded, commentText: replyCommentText, onCommentClear: resetReplyComment, commentCreator: replyCommentCreator, defaultIsPublic: replyingToPrivateComment === null ? replyingToPrivateComment : !replyingToPrivateComment }))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAgBvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAgBvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAiYpD"}
|
|
@@ -225,7 +225,13 @@ export default function Recommendations(props) {
|
|
|
225
225
|
!recommendationState.isLoadingRecommendations &&
|
|
226
226
|
recommendationState.numFound !== 0 &&
|
|
227
227
|
recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
|
|
228
|
-
React.createElement(Pagination, { className: "push-top", itemCount: (_c = (_b = recommendationState.allDocs) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, perPage: recPageSize, page: recommendationState.currentPage, variant: PaginationVariant.bottom, onSetPage: pageChanged, dropDirection: "up", onPerPageSelect: onPageSizeChanged
|
|
228
|
+
React.createElement(Pagination, { className: "push-top", itemCount: (_c = (_b = recommendationState.allDocs) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, perPage: recPageSize, page: recommendationState.currentPage, variant: PaginationVariant.bottom, onSetPage: pageChanged, dropDirection: "up", onPerPageSelect: onPageSizeChanged, perPageOptions: [
|
|
229
|
+
{ title: '5', value: 5 },
|
|
230
|
+
{ title: '10', value: 10 },
|
|
231
|
+
{ title: '20', value: 20 },
|
|
232
|
+
{ title: '50', value: 50 },
|
|
233
|
+
{ title: '100', value: 100 },
|
|
234
|
+
] })))),
|
|
229
235
|
recommendationState.numFound === 0 &&
|
|
230
236
|
!recommendationState.isLoadingRecommendations &&
|
|
231
237
|
!recommendationState.isLoadingRecommendationsError &&
|
package/lib/esm/css/case.css
CHANGED
|
@@ -127,26 +127,35 @@ button,
|
|
|
127
127
|
font-weight: 600;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.
|
|
131
|
-
margin
|
|
132
|
-
padding
|
|
130
|
+
.asa-discussion-alert.pf-v6-c-alert {
|
|
131
|
+
margin: 0 0 16px;
|
|
132
|
+
padding: 16px;
|
|
133
|
+
background-color: #fff;
|
|
134
|
+
border: 2px solid #5e40be;
|
|
135
|
+
border-radius: 16px;
|
|
136
|
+
box-shadow: none;
|
|
133
137
|
}
|
|
134
138
|
|
|
135
|
-
.
|
|
136
|
-
|
|
139
|
+
.asa-discussion-alert.pf-v6-c-alert::before {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.asa-discussion-alert .pf-v6-c-alert__icon {
|
|
144
|
+
color: #5e40be;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.asa-discussion-alert .pf-v6-c-alert__title {
|
|
148
|
+
font-weight: 600;
|
|
137
149
|
}
|
|
138
150
|
|
|
139
|
-
.
|
|
140
|
-
|
|
141
|
-
padding-block-start: 0;
|
|
151
|
+
.asa-discussion-alert .pf-v6-c-alert__description a {
|
|
152
|
+
text-decoration: underline;
|
|
142
153
|
}
|
|
143
154
|
|
|
144
155
|
.asa-send-feedback-link,
|
|
145
156
|
.asa-send-feedback-link.pf-v6-c-button,
|
|
146
157
|
.asa-send-feedback-link.pf-v6-c-button.pf-m-link,
|
|
147
|
-
.asa-send-feedback-link .pf-v6-c-button__text
|
|
148
|
-
.support-comment.comment-automated .asa-comment-alert .pf-v6-c-alert__action-group .pf-v6-c-button,
|
|
149
|
-
.support-comment.comment-automated .asa-comment-alert .pf-v6-c-alert__action-group .pf-v6-c-button__text {
|
|
158
|
+
.asa-send-feedback-link .pf-v6-c-button__text {
|
|
150
159
|
text-decoration: none;
|
|
151
160
|
}
|
|
152
161
|
|
|
@@ -155,9 +164,7 @@ button,
|
|
|
155
164
|
.asa-send-feedback-link.pf-v6-c-button:hover,
|
|
156
165
|
.asa-send-feedback-link.pf-v6-c-button:focus,
|
|
157
166
|
.asa-send-feedback-link:hover .pf-v6-c-button__text,
|
|
158
|
-
.asa-send-feedback-link:focus .pf-v6-c-button__text
|
|
159
|
-
.support-comment.comment-automated .asa-comment-alert .pf-v6-c-alert__action-group .pf-v6-c-button:hover,
|
|
160
|
-
.support-comment.comment-automated .asa-comment-alert .pf-v6-c-alert__action-group .pf-v6-c-button:focus {
|
|
167
|
+
.asa-send-feedback-link:focus .pf-v6-c-button__text {
|
|
161
168
|
text-decoration: none;
|
|
162
169
|
}
|
|
163
170
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,SAAS,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjC;AAED,oBAAY,MAAM;IACd,CAAC,MAAM;IACP,CAAC,MAAM;CACV;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAarF;AAkBD,wBAAgB,KAAK,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAe/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAMrF"}
|
package/lib/esm/hooks/useAB.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useContext, useEffect, useState } from 'react';
|
|
5
|
-
import { useCaseDispatch, useCaseSelector } from '../context/CaseContext';
|
|
1
|
+
import { Env } from '@cee-eng/hydrajs';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useCaseDispatch } from '../context/CaseContext';
|
|
6
4
|
import { setABTestVariation } from '../reducers/CaseReducer';
|
|
7
5
|
export var ABEnum;
|
|
8
6
|
(function (ABEnum) {
|
|
@@ -15,54 +13,34 @@ export function getVariationByAccountNumber(accountNumber) {
|
|
|
15
13
|
}
|
|
16
14
|
const lastChar = accountNumber.charAt(accountNumber.length - 1);
|
|
17
15
|
const lastDigit = parseInt(lastChar, 10);
|
|
18
|
-
// If lastDigit is not a valid number, default to B
|
|
19
16
|
if (isNaN(lastDigit)) {
|
|
20
17
|
return ABEnum.B;
|
|
21
18
|
}
|
|
22
|
-
// Even last digit → Experience A, Odd last digit → Experience B
|
|
23
19
|
return lastDigit % 2 === 0 ? ABEnum.A : ABEnum.B;
|
|
24
20
|
}
|
|
21
|
+
function getVariationFromUrl() {
|
|
22
|
+
const isNonProdEnv = Env.getEnvName() !== Env.EnvNames.PROD && Env.getEnvName() !== Env.EnvNames.PROD_BETA;
|
|
23
|
+
if (!isNonProdEnv)
|
|
24
|
+
return null;
|
|
25
|
+
const hashQueryString = window.location.hash.includes('?')
|
|
26
|
+
? window.location.hash.substring(window.location.hash.indexOf('?'))
|
|
27
|
+
: '';
|
|
28
|
+
const urlParams = new URLSearchParams(hashQueryString || window.location.search);
|
|
29
|
+
const useflow = urlParams.get('useflow');
|
|
30
|
+
if (useflow && (useflow.charAt(0).toLowerCase() === 'a' || useflow.charAt(0).toLowerCase() === 'b')) {
|
|
31
|
+
return useflow.charAt(0).toUpperCase() === 'A' ? ABEnum.A : ABEnum.B;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
25
35
|
export function useAB(options = {}) {
|
|
26
|
-
const
|
|
27
|
-
const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.A);
|
|
36
|
+
const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.B);
|
|
28
37
|
const caseDispatch = useCaseDispatch();
|
|
29
|
-
const { caseType } = useCaseSelector((state) => ({ caseType: state.caseDetails.caseType }), isEqual);
|
|
30
38
|
useEffect(() => {
|
|
31
|
-
var _a
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
: '';
|
|
37
|
-
const urlParams = new URLSearchParams(hashQueryString || window.location.search);
|
|
38
|
-
const useflowFromUrl = urlParams.get('useflow');
|
|
39
|
-
if (useflowFromUrl &&
|
|
40
|
-
(((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
|
|
41
|
-
newVariation = (useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase()) === 'A' ? ABEnum.A : ABEnum.B;
|
|
42
|
-
}
|
|
43
|
-
else if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
|
|
44
|
-
newVariation = ABEnum.B;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
const isABTestingEnabled = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
48
|
-
const userAccountNumber = loggedInUsersAccount.data.accountNumber;
|
|
49
|
-
if (isABTestingEnabled && userAccountNumber) {
|
|
50
|
-
newVariation = getVariationByAccountNumber(userAccountNumber);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
newVariation = ABEnum.B;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Update local state used to display only the UI conditionally
|
|
57
|
-
setTestVariation(newVariation);
|
|
58
|
-
// Update global Redux state for analytics (userAgent field) - used in session
|
|
59
|
-
setABTestVariation(caseDispatch, newVariation);
|
|
60
|
-
// Check if the case type is Idea and update the variation to B (only for UI display) global state is still A
|
|
61
|
-
if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
|
|
62
|
-
setTestVariation(ABEnum.B);
|
|
63
|
-
}
|
|
64
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
-
}, [pcmConfig.data, loggedInUsersAccount.data.accountNumber, caseDispatch, caseType]);
|
|
39
|
+
var _a;
|
|
40
|
+
const variation = (_a = getVariationFromUrl()) !== null && _a !== void 0 ? _a : ABEnum.B;
|
|
41
|
+
setTestVariation(variation);
|
|
42
|
+
setABTestVariation(caseDispatch, variation);
|
|
43
|
+
}, [caseDispatch]);
|
|
66
44
|
return {
|
|
67
45
|
variation: testVariation,
|
|
68
46
|
isVariationA: testVariation === ABEnum.A,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.354",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"defaults and supports es6-module",
|
|
128
128
|
"maintained node versions"
|
|
129
129
|
],
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "8020a740cf97e8c2a3fa9a642e758d83d0182914"
|
|
131
131
|
}
|