@rh-support/troubleshoot 2.6.127 → 2.6.134
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/AccountInfo/css/accountSelector.css +2 -3
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +4 -2
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +33 -13
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +1 -11
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +4 -4
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +3 -1
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +6 -12
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +4 -4
- package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/OpenCase.js +2 -8
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +6 -19
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +5 -12
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts +0 -2
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +13 -16
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +39 -39
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +1 -5
- package/lib/esm/components/Suggestions/TopContentSidebar.d.ts +3 -0
- package/lib/esm/components/Suggestions/TopContentSidebar.d.ts.map +1 -0
- package/lib/esm/components/Suggestions/TopContentSidebar.js +26 -0
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +10 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +150 -44
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +32 -71
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +18 -9
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -30
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +134 -71
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +62 -52
- package/lib/esm/css/AskRedHat.css +9 -2
- package/lib/esm/css/app.css +1 -1
- package/lib/esm/hooks/useAB.d.ts +22 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -0
- package/lib/esm/hooks/useAB.js +63 -0
- package/lib/esm/hooks/useWizard.d.ts +5 -0
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +20 -6
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +17 -2
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/AIResponseConstNTypes.js +3 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts +2 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/AIResponseReducer.js +17 -0
- package/lib/esm/reducers/CaseConstNTypes.js +3 -3
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +1 -1
- package/lib/esm/reducers/CaseHelpers.d.ts +6 -8
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +10 -20
- package/lib/esm/reducers/CaseReducer.d.ts +0 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +2 -37
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +0 -1
- package/lib/esm/reducers/TopContentReducer.js +1 -1
- package/lib/esm/scss/_pf-overrides.scss +3 -23
- package/package.json +11 -9
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
|
+
import { getConfigField, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes } from '@rh-support/utils';
|
|
3
|
+
import { isEqual } from 'lodash';
|
|
4
|
+
import { useContext, useEffect, useState } from 'react';
|
|
5
|
+
import { useCaseDispatch, useCaseSelector } from '../context/CaseContext';
|
|
6
|
+
import { setABTestVariation } from '../reducers/CaseReducer';
|
|
7
|
+
export var ABEnum;
|
|
8
|
+
(function (ABEnum) {
|
|
9
|
+
ABEnum["A"] = "A";
|
|
10
|
+
ABEnum["B"] = "B";
|
|
11
|
+
})(ABEnum || (ABEnum = {}));
|
|
12
|
+
export function useAB(options = {}) {
|
|
13
|
+
const { globalMetadataState: { pcmConfig, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
14
|
+
const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.A);
|
|
15
|
+
const caseDispatch = useCaseDispatch();
|
|
16
|
+
const { caseType } = useCaseSelector((state) => ({ caseType: state.caseDetails.caseType }), isEqual);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
let newVariation = ABEnum.B;
|
|
20
|
+
// Check URL parameter first - if useflow is specified, force that selection
|
|
21
|
+
const hashQueryString = window.location.hash.includes('?')
|
|
22
|
+
? window.location.hash.substring(window.location.hash.indexOf('?'))
|
|
23
|
+
: '';
|
|
24
|
+
const urlParams = new URLSearchParams(hashQueryString || window.location.search);
|
|
25
|
+
const useflowFromUrl = urlParams.get('useflow');
|
|
26
|
+
if (useflowFromUrl &&
|
|
27
|
+
(((_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')) {
|
|
28
|
+
newVariation = (useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase()) === 'A' ? ABEnum.A : ABEnum.B;
|
|
29
|
+
}
|
|
30
|
+
else if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
|
|
31
|
+
newVariation = ABEnum.B;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const variantAAccountNumbers = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
35
|
+
const userAccountNumber = loggedInUsersAccount.data.accountNumber;
|
|
36
|
+
const isUserInVariantAAccountNumbers = variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.includes(userAccountNumber);
|
|
37
|
+
if ((variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.length) && userAccountNumber && isUserInVariantAAccountNumbers) {
|
|
38
|
+
newVariation = ABEnum.A;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
newVariation = ABEnum.B;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// Update local state used to display only the UI conditionally
|
|
45
|
+
setTestVariation(newVariation);
|
|
46
|
+
// Update global Redux state for analytics (userAgent field) - used in session
|
|
47
|
+
setABTestVariation(caseDispatch, newVariation);
|
|
48
|
+
// Check if the case type is Idea and update the variation to B (only for UI display) global state is still A
|
|
49
|
+
if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
|
|
50
|
+
setTestVariation(ABEnum.B);
|
|
51
|
+
}
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
}, [pcmConfig.data, loggedInUsersAccount.data.accountNumber, caseDispatch]);
|
|
54
|
+
return {
|
|
55
|
+
variation: testVariation,
|
|
56
|
+
isVariationA: testVariation === ABEnum.A,
|
|
57
|
+
isVariationB: testVariation === ABEnum.B,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function useABComponent(options) {
|
|
61
|
+
const variationObject = useAB(options);
|
|
62
|
+
return Object.assign(Object.assign({}, variationObject), { component: variationObject.isVariationA ? options.A : options.B });
|
|
63
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface IProps {
|
|
2
3
|
userSeenRecommendationsfn?: any;
|
|
3
4
|
userSeenRecommendationsValue: boolean;
|
|
@@ -11,6 +12,10 @@ interface IProps {
|
|
|
11
12
|
aiServicesAvailable: boolean;
|
|
12
13
|
isSecureSupport?: boolean;
|
|
13
14
|
hasConfirmedStatesideSupport?: boolean;
|
|
15
|
+
onBack?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
+
haveARHFieldsChanged?: boolean;
|
|
17
|
+
resetARHFieldsChanged?: () => void;
|
|
18
|
+
onSeeMoreResources?: () => void;
|
|
14
19
|
}
|
|
15
20
|
export declare function useWizard(routeProps: any, props?: IProps): {
|
|
16
21
|
getStepsSequece: (showRest?: boolean) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA4BpD,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAyTb,OAAO;EAwC7C"}
|
|
@@ -20,7 +20,9 @@ import { RouteContext } from '../context/RouteContext';
|
|
|
20
20
|
import { TCStateContext } from '../context/TopContentContext';
|
|
21
21
|
import { AppRouteSections, openCaseNonTechnicalSequence, openCaseRouteSectionSequence, searchIntentRouteSectionSequence, troubleshootNonTechnicalSequence, troubleshootRouteSectionsSequence, } from '../reducers/RouteConstNTypes';
|
|
22
22
|
import RouteUtils from '../utils/routeUtils';
|
|
23
|
+
import { useAB } from './useAB';
|
|
23
24
|
export function useWizard(routeProps, props) {
|
|
25
|
+
const { isVariationA } = useAB();
|
|
24
26
|
const { routeState: { activeSection, isSearchIntent, isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
25
27
|
// state value was available later - reading dirctly from url
|
|
26
28
|
const isCaseCreate = RouteUtils.getQueryParams(routeProps).caseCreate === 'true';
|
|
@@ -69,17 +71,29 @@ export function useWizard(routeProps, props) {
|
|
|
69
71
|
alertMessage(),
|
|
70
72
|
!props.isSecureSupport && !props.hasConfirmedStatesideSupport && aiInformationAlert(),
|
|
71
73
|
React.createElement(ProductSelector, { routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: false, caseCreateExperience: isCaseCreate })))), canJumpTo: isSectionValidFn(isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
|
|
72
|
-
activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT), nextButtonLabel:
|
|
73
|
-
!isEmpty(issue)) ||
|
|
74
|
-
numFound === 0 // do this so that when user refreshes tab and state persists we don't cause edge 'continue' render
|
|
74
|
+
activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT), nextButtonLabel: isVariationA
|
|
75
75
|
? t('Continue')
|
|
76
|
-
:
|
|
76
|
+
: ((summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
|
|
77
|
+
!isEmpty(issue)) ||
|
|
78
|
+
numFound === 0
|
|
79
|
+
? t('Continue')
|
|
80
|
+
: t('See more options') }),
|
|
77
81
|
[AppRouteSections.RESOURCES]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.RESOURCES, name: isCaseCreate ? t('Resources') : t('Resources'), component: (React.createElement(MainSection, { stepNumber: 3, totalSteps: 6, section: AppRouteSections.RESOURCES, title: t('Recommendations') },
|
|
78
82
|
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
79
83
|
alertMessage(),
|
|
80
|
-
React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
|
|
84
|
+
React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport, onBack: props.onBack, onSeeMoreResources: props.onSeeMoreResources, routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, haveARHFieldsChanged: props.haveARHFieldsChanged, resetARHFieldsChanged: props.resetARHFieldsChanged })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
|
|
81
85
|
(props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
|
|
82
|
-
(props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel:
|
|
86
|
+
(props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isVariationA
|
|
87
|
+
? ((summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
|
|
88
|
+
!isEmpty(issue)) ||
|
|
89
|
+
numFound === 0
|
|
90
|
+
? isCaseCreate
|
|
91
|
+
? t('Continue')
|
|
92
|
+
: t('Convert to case')
|
|
93
|
+
: t('See more options')
|
|
94
|
+
: isCaseCreate
|
|
95
|
+
? t('Continue')
|
|
96
|
+
: t('Convert to case') }),
|
|
83
97
|
[AppRouteSections.ADDITIONAL_INFORMATION]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.ADDITIONAL_INFORMATION, name: t('Additional information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.ADDITIONAL_INFORMATION, title: React.createElement(React.Fragment, null,
|
|
84
98
|
t('Case information'),
|
|
85
99
|
isEmpty(RouteUtils.seBasePath) && isSelectedAccounntSecureSupport && (React.createElement("span", { className: "secured-support" },
|
|
@@ -13,6 +13,7 @@ export interface IAIResponseState {
|
|
|
13
13
|
submittedFeedbackTypes: string[];
|
|
14
14
|
isRateLimited?: boolean;
|
|
15
15
|
quotaLimit?: number;
|
|
16
|
+
hasChunkReceived?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const initialAIResponseState: IAIResponseState;
|
|
18
19
|
export declare enum AIResponseConstants {
|
|
@@ -23,7 +24,9 @@ export declare enum AIResponseConstants {
|
|
|
23
24
|
streamingError = "streamingError",
|
|
24
25
|
addSubmittedFeedbackType = "addSubmittedFeedbackType",
|
|
25
26
|
clearSubmittedFeedbackTypes = "clearSubmittedFeedbackTypes",
|
|
26
|
-
updateQuotaLimit = "updateQuotaLimit"
|
|
27
|
+
updateQuotaLimit = "updateQuotaLimit",
|
|
28
|
+
updateConversationId = "updateConversationId",
|
|
29
|
+
setHasChunkReceived = "setHasChunkReceived"
|
|
27
30
|
}
|
|
28
31
|
export interface IClearAIResponseAction extends IActionType {
|
|
29
32
|
type: AIResponseConstants.clearAIResponse;
|
|
@@ -66,5 +69,17 @@ export interface IUpdateQuotaLimitAction extends IActionType {
|
|
|
66
69
|
quotaLimit: number;
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
|
-
export
|
|
72
|
+
export interface IUpdateConversationIdAction extends IActionType {
|
|
73
|
+
type: AIResponseConstants.updateConversationId;
|
|
74
|
+
payload: {
|
|
75
|
+
conversationId: string;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface ISetHasChunkReceivedAction extends IActionType {
|
|
79
|
+
type: AIResponseConstants.setHasChunkReceived;
|
|
80
|
+
payload: {
|
|
81
|
+
hasChunkReceived: boolean;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export type IAIResponseActionType = IClearAIResponseAction | IStreamingStartedAction | IStreamingChunkReceivedAction | IStreamingCompletedAction | IStreamingErrorAction | IAddSubmittedFeedbackTypeAction | IClearSubmittedFeedbackTypesAction | IUpdateQuotaLimitAction | IUpdateConversationIdAction | ISetHasChunkReceivedAction;
|
|
70
85
|
//# sourceMappingURL=AIResponseConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIResponseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AIResponseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseConstNTypes.ts"],"names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"}
|
|
@@ -9,6 +9,7 @@ export const initialAIResponseState = {
|
|
|
9
9
|
submittedFeedbackTypes: [],
|
|
10
10
|
isRateLimited: false,
|
|
11
11
|
quotaLimit: undefined,
|
|
12
|
+
hasChunkReceived: false,
|
|
12
13
|
};
|
|
13
14
|
// Action Constants
|
|
14
15
|
export var AIResponseConstants;
|
|
@@ -21,4 +22,6 @@ export var AIResponseConstants;
|
|
|
21
22
|
AIResponseConstants["addSubmittedFeedbackType"] = "addSubmittedFeedbackType";
|
|
22
23
|
AIResponseConstants["clearSubmittedFeedbackTypes"] = "clearSubmittedFeedbackTypes";
|
|
23
24
|
AIResponseConstants["updateQuotaLimit"] = "updateQuotaLimit";
|
|
25
|
+
AIResponseConstants["updateConversationId"] = "updateConversationId";
|
|
26
|
+
AIResponseConstants["setHasChunkReceived"] = "setHasChunkReceived";
|
|
24
27
|
})(AIResponseConstants || (AIResponseConstants = {}));
|
|
@@ -9,4 +9,6 @@ export declare const streamingError: (error: string, isRateLimited?: boolean) =>
|
|
|
9
9
|
export declare const addSubmittedFeedbackType: (feedbackType: string) => IAIResponseActionType;
|
|
10
10
|
export declare const clearSubmittedFeedbackTypes: () => IAIResponseActionType;
|
|
11
11
|
export declare const updateQuotaLimit: (quotaLimit: number) => IAIResponseActionType;
|
|
12
|
+
export declare const updateConversationId: (conversationId: string) => IAIResponseActionType;
|
|
13
|
+
export declare const setHasChunkReceived: (hasChunkReceived: boolean) => IAIResponseActionType;
|
|
12
14
|
//# sourceMappingURL=AIResponseReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,
|
|
1
|
+
{"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,gBAwFF,CAAC;AAGF,eAAO,MAAM,eAAe,QAAO,qBAGJ,CAAC;AAEhC,eAAO,MAAM,gBAAgB,QAAO,qBAGL,CAAC;AAEhC,eAAO,MAAM,sBAAsB,UAAW,MAAM,uBAAuB,MAAM,KAAG,qBAIrD,CAAC;AAEhC,eAAO,MAAM,kBAAkB,kBAAmB,qBAAqB,KAAG,qBAI3C,CAAC;AAEhC,eAAO,MAAM,cAAc,UAAW,MAAM,kBAAiB,OAAO,KAAW,qBAIhD,CAAC;AAEhC,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,KAAG,qBAIjC,CAAC;AAEhC,eAAO,MAAM,2BAA2B,QAAO,qBAGhB,CAAC;AAEhC,eAAO,MAAM,gBAAgB,eAAgB,MAAM,KAAG,qBAIvB,CAAC;AAEhC,eAAO,MAAM,oBAAoB,mBAAoB,MAAM,KAAG,qBAI/B,CAAC;AAEhC,eAAO,MAAM,mBAAmB,qBAAsB,OAAO,KAAG,qBAIjC,CAAC"}
|
|
@@ -26,6 +26,15 @@ export const aiResponseReducer = (state = initialAIResponseState, action) => {
|
|
|
26
26
|
case AIResponseConstants.updateQuotaLimit: {
|
|
27
27
|
return Object.assign(Object.assign({}, state), { quotaLimit: action.payload.quotaLimit });
|
|
28
28
|
}
|
|
29
|
+
case AIResponseConstants.updateConversationId: {
|
|
30
|
+
return Object.assign(Object.assign({}, state), { aiResponse: state.aiResponse
|
|
31
|
+
? Object.assign(Object.assign({}, state.aiResponse), { conversationId: action.payload.conversationId }) : {
|
|
32
|
+
conversationId: action.payload.conversationId,
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
case AIResponseConstants.setHasChunkReceived: {
|
|
36
|
+
return Object.assign(Object.assign({}, state), { hasChunkReceived: action.payload.hasChunkReceived });
|
|
37
|
+
}
|
|
29
38
|
default: {
|
|
30
39
|
return state;
|
|
31
40
|
}
|
|
@@ -61,3 +70,11 @@ export const updateQuotaLimit = (quotaLimit) => ({
|
|
|
61
70
|
type: AIResponseConstants.updateQuotaLimit,
|
|
62
71
|
payload: { quotaLimit },
|
|
63
72
|
});
|
|
73
|
+
export const updateConversationId = (conversationId) => ({
|
|
74
|
+
type: AIResponseConstants.updateConversationId,
|
|
75
|
+
payload: { conversationId },
|
|
76
|
+
});
|
|
77
|
+
export const setHasChunkReceived = (hasChunkReceived) => ({
|
|
78
|
+
type: AIResponseConstants.setHasChunkReceived,
|
|
79
|
+
payload: { hasChunkReceived },
|
|
80
|
+
});
|
|
@@ -84,9 +84,9 @@ export const SeverityDescription = {
|
|
|
84
84
|
};
|
|
85
85
|
//updated description details
|
|
86
86
|
export const SeverityDescriptionDetails = {
|
|
87
|
-
["1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */]: 'An issue with a Red Hat Product or Service that is
|
|
88
|
-
["2 (High)" /* SeverityLevelsInternal.SEV_2 */]: 'An issue with a Red Hat Product or Service that is
|
|
89
|
-
["3 (Normal)" /* SeverityLevelsInternal.SEV_3 */]: 'An issue with a Red Hat Product or Service that is
|
|
87
|
+
["1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */]: 'An issue with a Red Hat Product or Service that is actively causing serious interruptions to your business critical operations. This is an issue requiring immediate attention as there is a significant risk to your business.',
|
|
88
|
+
["2 (High)" /* SeverityLevelsInternal.SEV_2 */]: 'An issue with a Red Hat Product or Service that is partially functional (such as degradation of a service but the service is still available) and actively impacting your business operations. This is an issue on a business critical system requiring accelerated attention.',
|
|
89
|
+
["3 (Normal)" /* SeverityLevelsInternal.SEV_3 */]: 'An issue with a Red Hat Product or Service that is currently functioning as expected but you either (1) recently experienced a degradation that you are monitoring or seeking a root cause for or (2) you are seeing indicators of a potential loss of functionality to a business critical system.',
|
|
90
90
|
["4 (Low)" /* SeverityLevelsInternal.SEV_4 */]: 'Typically, a query that does not involve any interruption to your business critical operations. ',
|
|
91
91
|
};
|
|
92
92
|
export const LargeDescriptionErrorMessage = 'Cumulative case description cannot be more than {{limit}} characters';
|
|
@@ -147,7 +147,7 @@ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks
|
|
|
147
147
|
}));
|
|
148
148
|
const allDiscussions = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
|
|
149
149
|
const sortedAllDiscussions = orderBy(allDiscussions, 'last_modified_date', 'desc');
|
|
150
|
-
//set filter dropdown state
|
|
150
|
+
// set filter dropdown state
|
|
151
151
|
// when we don't have any result for a discussion type, in filter options dropdown list, we make that type disable
|
|
152
152
|
discussionFiltersListState.forEach((filter) => {
|
|
153
153
|
if (filter.value === DiscussionType.ATTACHMENT) {
|
|
@@ -3,9 +3,7 @@ import { ICasePayload, ICaseResourceLink, ICepDetails } from '@cee-eng/hydrajs/@
|
|
|
3
3
|
import { IEntitlement } from '@cee-eng/hydrajs/@types/api/public/entitlements';
|
|
4
4
|
import { IContact } from '@cee-eng/hydrajs/@types/models/contact';
|
|
5
5
|
import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
6
|
-
import {
|
|
7
|
-
import { UserAuth } from '@rh-support/user-permissions';
|
|
8
|
-
import React from 'react';
|
|
6
|
+
import { IPortalJwtToken } from '@rh-support/types/shared';
|
|
9
7
|
import { ICaseState } from './CaseConstNTypes';
|
|
10
8
|
export declare const getCaseRecommendations: (docs: ISolrRecommendation[], oldDocs: any) => any[];
|
|
11
9
|
export declare const getCepCommentFromCepDetails: (cepDetails: ICepDetails) => string;
|
|
@@ -13,14 +11,14 @@ export declare const getRecommendationObject: (doc: ISolrRecommendation, index:
|
|
|
13
11
|
export declare const getUpdatedDescription: (issue: string, environment?: string, periodicityOfIssue?: string, timeFramesAndUrgency?: string, v3ClusterName?: string, product?: string, version?: string) => string;
|
|
14
12
|
export declare const getDescriptionWOQues: (issue: string, environment?: string, periodicityOfIssue?: string, timeFramesAndUrgency?: string) => string;
|
|
15
13
|
export declare const getIrtForSLAAndSeverity: (slaProcessId: string, severity: string) => string;
|
|
16
|
-
export declare const getNewSeverityStringDef: (severity: string) => string
|
|
14
|
+
export declare const getNewSeverityStringDef: (severity: string) => string;
|
|
17
15
|
export declare const getOrtForSLAAndSeverity: (slaProcessId: string, severity: string) => string;
|
|
18
16
|
export declare const getSeverityDescription: (severity: string) => string;
|
|
19
17
|
export declare const isClusterIDValid: (caseState: any, allProducts: any) => boolean;
|
|
20
|
-
export declare const isCaseStateValid: (caseState: ICaseState,
|
|
21
|
-
export declare const isIdeaCaseStateValid: (caseState: ICaseState,
|
|
22
|
-
export declare const isCaseManagementStateValid: (caseState: ICaseState,
|
|
23
|
-
export declare const isCaseInformationSectionValid: (caseState: ICaseState,
|
|
18
|
+
export declare const isCaseStateValid: (caseState: ICaseState, loggedInUserJwtToken: Partial<IPortalJwtToken>) => boolean;
|
|
19
|
+
export declare const isIdeaCaseStateValid: (caseState: ICaseState, loggedInUserJwtToken: Partial<IPortalJwtToken>) => boolean;
|
|
20
|
+
export declare const isCaseManagementStateValid: (caseState: ICaseState, loggedInUserJwtToken: Partial<IPortalJwtToken>) => boolean;
|
|
21
|
+
export declare const isCaseInformationSectionValid: (caseState: ICaseState, loggedInUserJwtToken: Partial<IPortalJwtToken>) => boolean;
|
|
24
22
|
export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
|
|
25
23
|
export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
|
|
26
24
|
export declare const getHasInvalidEntitlements: (caseEntitlements: IEntitlement[]) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAmB3D,OAAO,EAOH,UAAU,EAkBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mBAAmB,SAAS,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,UACvB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,kBACb,MAAM,YACZ,MAAM,YACN,MAAM,KACjB,MAyBF,CAA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|
-
import { getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
1
|
+
import { canManageCase, getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
2
2
|
import filter from 'lodash/filter';
|
|
3
3
|
import forEach from 'lodash/forEach';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -6,7 +6,6 @@ import map from 'lodash/map';
|
|
|
6
6
|
import some from 'lodash/some';
|
|
7
7
|
import unionBy from 'lodash/unionBy';
|
|
8
8
|
import uniqBy from 'lodash/uniqBy';
|
|
9
|
-
import React from 'react';
|
|
10
9
|
import { isPhoneValid, trimAndReplacePlus } from '../components/shared/utils';
|
|
11
10
|
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
|
|
12
11
|
import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
|
|
@@ -91,16 +90,7 @@ export const getNewSeverityStringDef = (severity) => {
|
|
|
91
90
|
if (isEmpty(severity)) {
|
|
92
91
|
return '';
|
|
93
92
|
}
|
|
94
|
-
|
|
95
|
-
if (!description) {
|
|
96
|
-
return '';
|
|
97
|
-
}
|
|
98
|
-
if (!description.includes('<')) {
|
|
99
|
-
return description;
|
|
100
|
-
}
|
|
101
|
-
return React.createElement('span', {
|
|
102
|
-
dangerouslySetInnerHTML: { __html: description },
|
|
103
|
-
});
|
|
93
|
+
return SeverityDescriptionDetails[severity];
|
|
104
94
|
};
|
|
105
95
|
export const getOrtForSLAAndSeverity = (slaProcessId, severity) => {
|
|
106
96
|
if (isEmpty(slaProcessId) || isEmpty(severity)) {
|
|
@@ -147,7 +137,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
|
|
|
147
137
|
return hasValidClusterId() || hasValidReason() || hasValidReasonExplanation() || hasValidV3ClusterName();
|
|
148
138
|
};
|
|
149
139
|
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseStateValid
|
|
150
|
-
export const isCaseStateValid = (caseState,
|
|
140
|
+
export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
151
141
|
const case_details = caseState.caseDetails;
|
|
152
142
|
return (!isEmpty(case_details.issue) &&
|
|
153
143
|
isEmpty(case_details.caseNumber) &&
|
|
@@ -172,9 +162,9 @@ export const isCaseStateValid = (caseState, loggedInUserRights) => {
|
|
|
172
162
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
173
163
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
174
164
|
: true) &&
|
|
175
|
-
|
|
165
|
+
canManageCase(loggedInUserJwtToken));
|
|
176
166
|
};
|
|
177
|
-
export const isIdeaCaseStateValid = (caseState,
|
|
167
|
+
export const isIdeaCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
178
168
|
const case_details = caseState.caseDetails;
|
|
179
169
|
return (!isEmpty(case_details.issue) &&
|
|
180
170
|
isEmpty(case_details.caseNumber) &&
|
|
@@ -196,9 +186,9 @@ export const isIdeaCaseStateValid = (caseState, loggedInUserRights) => {
|
|
|
196
186
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
197
187
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
198
188
|
: true) &&
|
|
199
|
-
|
|
189
|
+
canManageCase(loggedInUserJwtToken));
|
|
200
190
|
};
|
|
201
|
-
export const isCaseManagementStateValid = (caseState,
|
|
191
|
+
export const isCaseManagementStateValid = (caseState, loggedInUserJwtToken) => {
|
|
202
192
|
const case_details = caseState.caseDetails;
|
|
203
193
|
return (isEmpty(case_details.caseNumber) &&
|
|
204
194
|
!isEmpty(case_details.severity) &&
|
|
@@ -206,10 +196,10 @@ export const isCaseManagementStateValid = (caseState, loggedInUserRights) => {
|
|
|
206
196
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
207
197
|
: true) &&
|
|
208
198
|
isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
|
|
209
|
-
|
|
199
|
+
canManageCase(loggedInUserJwtToken));
|
|
210
200
|
};
|
|
211
201
|
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseInformationSectionValid
|
|
212
|
-
export const isCaseInformationSectionValid = (caseState,
|
|
202
|
+
export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) => {
|
|
213
203
|
const case_details = caseState.caseDetails;
|
|
214
204
|
//checks to ensure the ktquestion section is valid
|
|
215
205
|
return (isEmpty(case_details.caseNumber) &&
|
|
@@ -223,7 +213,7 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserRights) =>
|
|
|
223
213
|
case_details.environment.length <= KTQUESTION_MAX_LIMIT &&
|
|
224
214
|
case_details.periodicityOfIssue.length <= KTQUESTION_MAX_LIMIT &&
|
|
225
215
|
!isEmpty(case_details.accountNumberRef) &&
|
|
226
|
-
|
|
216
|
+
canManageCase(loggedInUserJwtToken));
|
|
227
217
|
};
|
|
228
218
|
export const createCasePayload = (caseState, sessionItem, isCaseCreate = false) => {
|
|
229
219
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -36,7 +36,6 @@ export declare const deleteNotifiedUsers: (dispatch: CaseReducerDispatchType, ca
|
|
|
36
36
|
export declare const addingNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, addedUsers: IContact[]) => Promise<void>;
|
|
37
37
|
export declare const clearSelectedAccount: (dispatch: CaseReducerDispatchType) => void;
|
|
38
38
|
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount>) => Promise<void>;
|
|
39
|
-
export declare const fetchCaseGroupsForAccount: (dispatch: CaseReducerDispatchType, accountNumber: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
40
39
|
export declare const setCaseOwner: (dispatch: CaseReducerDispatchType, owner: IContact, product: string, abortSignalCaseGroup?: AbortSignal, abortSignalEntitlements?: AbortSignal, setCaseGroupToUngroupedOrDefault?: boolean, caseGroupNumberToRestore?: string | undefined, canChangeGroup?: boolean, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
41
40
|
export declare const fetchCaseEntitlements: (dispatch: CaseReducerDispatchType, ssoUserName: string, product?: string, abortSignal?: AbortSignal, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
42
41
|
export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,W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8DAyHrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAChB,uBAAuB,cACrB,MAAM,eACL,OAAO,CAAC,YAAY,CAAC,mBACjB,OAAO,mBAsB3B,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,SAC1B,aAAa,EAAE,gBACR,MAAM,kBAmCvB,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,yEAInB,MAAM,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,mBAAmB,MAAM,SAK5F,CAAC"}
|
|
@@ -423,32 +423,6 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
});
|
|
426
|
-
export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, setCaseGroupToUngroupedOrDefault = false, abortSignal, caseGroupNumberToRestore) {
|
|
427
|
-
var _a, _b;
|
|
428
|
-
dispatch({
|
|
429
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
430
|
-
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
431
|
-
});
|
|
432
|
-
try {
|
|
433
|
-
const response = yield publicApi.caseGroups.getCaseGroupsForInternalUser(accountNumber, abortSignal);
|
|
434
|
-
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
435
|
-
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
436
|
-
? caseGroupNumberToRestore
|
|
437
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : '-1';
|
|
438
|
-
dispatch({
|
|
439
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
440
|
-
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
441
|
-
});
|
|
442
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: defaultCaseGroup });
|
|
443
|
-
}
|
|
444
|
-
catch (e) {
|
|
445
|
-
dispatch({
|
|
446
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
447
|
-
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
448
|
-
});
|
|
449
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
450
|
-
}
|
|
451
|
-
});
|
|
452
426
|
export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1) => __awaiter(void 0, [dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1], void 0, function* (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, setCaseGroupToUngroupedOrDefault = false, caseGroupNumberToRestore, canChangeGroup = true, isUserUpdate, caseNumber) {
|
|
453
427
|
if (isEmpty(owner) || isEmpty(owner.ssoUsername)) {
|
|
454
428
|
dispatch({
|
|
@@ -481,17 +455,8 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
481
455
|
type: CaseReducerConstants.caseDetailChanged,
|
|
482
456
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
483
457
|
});
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
if (owner.isInternal && accountNumber) {
|
|
487
|
-
// For internal users, fetch case groups based on account number
|
|
488
|
-
fetchCaseGroupsForAccount(dispatch, accountNumber, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
// For external users, continue using SSO username
|
|
492
|
-
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
458
|
+
canChangeGroup &&
|
|
459
|
+
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
495
460
|
delay(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
496
461
|
return yield fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements, isUserUpdate, caseNumber);
|
|
497
462
|
}), 5000, 'later');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAA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AO,MAAM,gCAAgC,EAAE,gBAAgB,EAM9D,CAAC;AAEF,eAAO,MAAM,iCAAiC,oBAQ7C,CAAC;AAEF,eAAO,MAAM,gCAAgC,oBAQ5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,oBAQxC,CAAC;AAGF,eAAO,MAAM,0BAA0B,oBAAiC,CAAC;AAEzE,eAAO,MAAM,mCAAmC,oBAA+D,CAAC;AAEhH,eAAO,MAAM,kCAAkC,oBAM9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAO3C,CAAC;AAEF,eAAO,MAAM,0CAA0C,oBAStD,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAA4D,CAAC;AAEhH,eAAO,MAAM,qCAAqC,oBAGjD,CAAC;AAEF,eAAO,MAAM,6BAA6B,oBAAiC,CAAC;AAE5E,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAKtD,CAAC"}
|
|
@@ -58,7 +58,6 @@ export const openCaseRouteSectionSequence = [
|
|
|
58
58
|
export const sessionRestoreCardSections = [AppRouteSections.GET_SUPPORT];
|
|
59
59
|
export const hideFileUploadSidebarWidgetSections = [AppRouteSections.GET_SUPPORT, AppRouteSections.SUBMIT_CASE];
|
|
60
60
|
export const showSidebarRecommendationsSections = [
|
|
61
|
-
AppRouteSections.RESOURCES,
|
|
62
61
|
AppRouteSections.ADDITIONAL_INFORMATION,
|
|
63
62
|
AppRouteSections.DESCRIBE_IDEA,
|
|
64
63
|
AppRouteSections.CONFIGURATION,
|
|
@@ -43,7 +43,7 @@ export const fetchTopContent = (dispatch, body, onTCLoad) => __awaiter(void 0, v
|
|
|
43
43
|
let topContent = response.reduce((accumulator, category) => {
|
|
44
44
|
if (category.content.length !== 0) {
|
|
45
45
|
// sort content by rank
|
|
46
|
-
const content = sortBy(category.content.filter((content) =>
|
|
46
|
+
const content = sortBy(category.content.filter((content) => content.contentTitle !== ''), 'contentRank');
|
|
47
47
|
accumulator.push(Object.assign(Object.assign({}, category), { content }));
|
|
48
48
|
}
|
|
49
49
|
return accumulator;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
background-color: rgba(3, 3, 3, 0.619608);
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
color: rgb(21, 21, 21);
|
|
13
|
-
z-index: 9999;
|
|
14
13
|
|
|
15
14
|
.pf-v6-c-modal-box {
|
|
16
15
|
max-width: 90%;
|
|
@@ -372,10 +371,8 @@ div.pf-v6-c-alert__description div.ea-rule p a.pf-v6-c-button {
|
|
|
372
371
|
|
|
373
372
|
//override pfe-accordion discloser for modal
|
|
374
373
|
div pfe-accordion {
|
|
375
|
-
--pfe-accordion--FontSize--header:
|
|
376
|
-
--pfe-accordion--FontWeight--header:
|
|
377
|
-
border: none !important;
|
|
378
|
-
box-shadow: none !important;
|
|
374
|
+
--pfe-accordion--FontSize--header: 16px;
|
|
375
|
+
--pfe-accordion--FontWeight--header: 600;
|
|
379
376
|
}
|
|
380
377
|
|
|
381
378
|
section div.file-recommendations {
|
|
@@ -568,6 +565,7 @@ span.pf-v6-c-input-group__text {
|
|
|
568
565
|
}
|
|
569
566
|
|
|
570
567
|
.top-content-suggestion-accordion {
|
|
568
|
+
margin-top: 32px;
|
|
571
569
|
dl dt {
|
|
572
570
|
margin: 0px;
|
|
573
571
|
}
|
|
@@ -580,21 +578,6 @@ span.pf-v6-c-input-group__text {
|
|
|
580
578
|
border-radius: var(--global-border-radius-small, 6px);
|
|
581
579
|
}
|
|
582
580
|
|
|
583
|
-
.top-recommendations {
|
|
584
|
-
border: 1px solid #d2d2d2 !important;
|
|
585
|
-
border-radius: var(--global-border-radius-small, 6px);
|
|
586
|
-
margin-top: 16px;
|
|
587
|
-
|
|
588
|
-
--pfe-accordion--BorderColor: transparent;
|
|
589
|
-
--pfe-accordion--BorderWidth: 0;
|
|
590
|
-
--pfe-accordion--BoxShadow: 0 0 0 transparent;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.top-recommendations pfe-accordion-header[expanded] + pfe-accordion-panel {
|
|
594
|
-
border-bottom: 1px solid #d2d2d2;
|
|
595
|
-
padding-bottom: 0.5rem;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
581
|
.contact-select {
|
|
599
582
|
font-weight: normal !important;
|
|
600
583
|
|
|
@@ -762,9 +745,6 @@ label.react-typeahead-label-wrapper {
|
|
|
762
745
|
.rbt-token.rbt-token-removeable.rbt-token-active {
|
|
763
746
|
color: #ffffff;
|
|
764
747
|
}
|
|
765
|
-
&:has([aria-expanded='true']) {
|
|
766
|
-
height: 350px;
|
|
767
|
-
}
|
|
768
748
|
}
|
|
769
749
|
#case-history-paginated-timeline-pagination-bottom-pagination {
|
|
770
750
|
justify-content: flex-start;
|