@rh-support/troubleshoot 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +4 -2
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +11 -4
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +19 -3
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -2
- package/lib/esm/scss/_pf-overrides.scss +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,qBA2HpC;kBA3HQ,cAAc;;;AA8HvB,eAAe,cAAc,CAAC"}
|
|
@@ -22,7 +22,7 @@ const defaultProps = {
|
|
|
22
22
|
caseNumber: undefined,
|
|
23
23
|
};
|
|
24
24
|
function CaseActionPlan(props) {
|
|
25
|
-
const { t } = useTranslation();
|
|
25
|
+
const { t, i18n } = useTranslation();
|
|
26
26
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
27
27
|
const ability = useContext(AbilityContext);
|
|
28
28
|
const canUpdateActionPlan = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_ACTION_PLAN_EDIT);
|
|
@@ -75,7 +75,9 @@ function CaseActionPlan(props) {
|
|
|
75
75
|
React.createElement("label", { htmlFor: "rha-action-plan", className: "sr-only" },
|
|
76
76
|
React.createElement(Trans, null, "Action plan")),
|
|
77
77
|
!canUpdateActionPlan ? (React.createElement(CodeBlock, null,
|
|
78
|
-
React.createElement(CodeBlockCode,
|
|
78
|
+
React.createElement(CodeBlockCode, { style: {
|
|
79
|
+
fontFamily: ['zh', 'ja', 'ko'].includes(i18n.language) ? 'inherit' : undefined,
|
|
80
|
+
} }, isEmpty(actionPlan) ? t('No action plan to display.') : actionPlan))) : (React.createElement("form", null,
|
|
79
81
|
React.createElement(TextAreaResizable, { id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 }),
|
|
80
82
|
!isInternalWithoutSFDCUser && (React.createElement("div", { className: `${isExportingPDF ? 'hide-in-pdf' : ''} push-top-narrow` },
|
|
81
83
|
React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isActionPlanEmpty || isUpdating || !formIsDirty, type: "button" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAqV/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -56,6 +56,7 @@ function CaseGroup(props) {
|
|
|
56
56
|
const [inputValue, setInputValue] = useState('');
|
|
57
57
|
const [selected, setSelected] = useState('');
|
|
58
58
|
const [isOpen, setIsOpen] = useState(false);
|
|
59
|
+
const [shouldFilter, setShouldFilter] = useState(false);
|
|
59
60
|
const textInputRef = useRef();
|
|
60
61
|
const canEditCase = useCanEditCase();
|
|
61
62
|
const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -115,8 +116,8 @@ function CaseGroup(props) {
|
|
|
115
116
|
const list = ownersCaseGroups.data;
|
|
116
117
|
if (!list)
|
|
117
118
|
return [];
|
|
118
|
-
const options =
|
|
119
|
-
? list.filter((v) => v.name.toLowerCase().includes(
|
|
119
|
+
const options = shouldFilter && inputValue.trim()
|
|
120
|
+
? list.filter((v) => v.name.toLowerCase().includes(inputValue.toLowerCase()))
|
|
120
121
|
: list;
|
|
121
122
|
if (isGroupMandatory) {
|
|
122
123
|
// having group selected for case is mandatory, make 'UnGrouped Case' option disabled
|
|
@@ -190,6 +191,9 @@ function CaseGroup(props) {
|
|
|
190
191
|
const onToggleClick = () => {
|
|
191
192
|
var _a;
|
|
192
193
|
setIsOpen((prev) => !prev);
|
|
194
|
+
if (!isOpen) {
|
|
195
|
+
setShouldFilter(false);
|
|
196
|
+
}
|
|
193
197
|
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
194
198
|
};
|
|
195
199
|
const { onInputKeyDown, focusedItemIndex } = useSelectKeyboardNavigator({
|
|
@@ -199,7 +203,10 @@ function CaseGroup(props) {
|
|
|
199
203
|
onSelect: onCaseGroupChange,
|
|
200
204
|
});
|
|
201
205
|
const onInputQueryChange = (_v, query) => {
|
|
202
|
-
|
|
206
|
+
if (isOpen) {
|
|
207
|
+
setInputValue(query);
|
|
208
|
+
setShouldFilter(true);
|
|
209
|
+
}
|
|
203
210
|
};
|
|
204
211
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isDisabled: ownersCaseGroups.isError ||
|
|
205
212
|
ownersCaseGroups.isFetching ||
|
|
@@ -220,7 +227,7 @@ function CaseGroup(props) {
|
|
|
220
227
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterGroupLocalChange, comparator: groupComparator, isLocalChange: localGroupChange, value: selectedCaseGroup, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.group, (v) => v.name) }),
|
|
221
228
|
isGroupMandatory && !isExportingPDF && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
222
229
|
React.createElement(Select, { id: "get-support-group", "data-tracking-id": "get-support-group", isOpen: isOpen, selected: selected, onSelect: (event, val) => onCaseGroupChange(val), onOpenChange: () => setIsOpen(false), toggle: toggle, shouldFocusFirstItemOnOpen: false, onBlur: () => onOuterClickGroupCheck, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
223
|
-
React.createElement(SelectList, null, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.name, isFocused: focusedItemIndex === index, value: option }, option.name))))),
|
|
230
|
+
React.createElement(SelectList, null, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.name, isFocused: focusedItemIndex === index, value: option, isSelected: option.name === selected }, option.name))))),
|
|
224
231
|
caseNumber && isSelectedUngroupedInvalid && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
225
232
|
React.createElement(Trans, null, "'Ungrouped Case' cannot be selected. Please select a group."))),
|
|
226
233
|
showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBA6M9C"}
|
|
@@ -7,6 +7,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
7
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
8
8
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
9
9
|
import { RouteContext } from '../../context/RouteContext';
|
|
10
|
+
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
10
11
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
11
12
|
import { BugIcon, CertificationIcon, CustomerServiceIcon, DocumentationIcon, GearIcon, IdeaIcon, RcaIcon, } from './SupportTypeIcons';
|
|
12
13
|
export default function SupportTypeSelectorPage() {
|
|
@@ -15,10 +16,13 @@ export default function SupportTypeSelectorPage() {
|
|
|
15
16
|
const globalDispatch = useGlobalDispatchContext();
|
|
16
17
|
const [selectedSupportType, setSelectedSupportType] = useState('');
|
|
17
18
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
18
|
-
const { caseType, isFetchingSelectedAccountDetails } = useCaseSelector((state) => ({
|
|
19
|
+
const { caseType, isFetchingSelectedAccountDetails, issue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
|
|
19
20
|
caseType: state.caseDetails.caseType,
|
|
20
21
|
isFetchingSelectedAccountDetails: state.selectedAccountDetails.isFetching,
|
|
21
22
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
23
|
+
issue: state.caseDetails.issue,
|
|
24
|
+
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
25
|
+
v3ClusterName: state.v3ClusterName,
|
|
22
26
|
}), isEqual);
|
|
23
27
|
const caseDispatch = useCaseDispatch();
|
|
24
28
|
useEffect(() => {
|
|
@@ -43,14 +47,26 @@ export default function SupportTypeSelectorPage() {
|
|
|
43
47
|
event.preventDefault();
|
|
44
48
|
const newSelected = event.currentTarget.id === selectedSupportType ? null : event.currentTarget.id;
|
|
45
49
|
setSelectedSupportType(newSelected);
|
|
46
|
-
setCaseDetails(caseDispatch, { caseType: newSelected }
|
|
50
|
+
setCaseDetails(caseDispatch, Object.assign({ caseType: newSelected }, (newSelected === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
51
|
+
? {
|
|
52
|
+
environment: '',
|
|
53
|
+
periodicityOfIssue: '',
|
|
54
|
+
description: getUpdatedDescription(issue, '', '', timeFramesAndUrgency, v3ClusterName),
|
|
55
|
+
}
|
|
56
|
+
: {})));
|
|
47
57
|
}
|
|
48
58
|
};
|
|
49
59
|
// Sets the support type on click
|
|
50
60
|
const onSupportTypeClick = (event) => {
|
|
51
61
|
const newSelected = event.currentTarget.id === selectedSupportType ? null : event.currentTarget.id;
|
|
52
62
|
setSelectedSupportType(newSelected);
|
|
53
|
-
setCaseDetails(caseDispatch, { caseType: newSelected }
|
|
63
|
+
setCaseDetails(caseDispatch, Object.assign({ caseType: newSelected }, (newSelected === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
64
|
+
? {
|
|
65
|
+
environment: '',
|
|
66
|
+
periodicityOfIssue: '',
|
|
67
|
+
description: getUpdatedDescription(issue, '', '', timeFramesAndUrgency, v3ClusterName),
|
|
68
|
+
}
|
|
69
|
+
: {})));
|
|
54
70
|
};
|
|
55
71
|
// Support types array to map types to their icons, headings and description
|
|
56
72
|
const SupportTypesArray = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBA8V3C"}
|
|
@@ -91,7 +91,7 @@ export function SessionRestore(props) {
|
|
|
91
91
|
const needsNewSessionId = hasProductVersionOrSummary && isEmpty(relevantSession);
|
|
92
92
|
if (needsNewSessionId) {
|
|
93
93
|
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
94
|
-
const userAgentAB = userAgent + (ABTestVariation ? '-A-1' : '-B-1');
|
|
94
|
+
const userAgentAB = userAgent + (isEqual(ABTestVariation, 'A') ? '-A-1' : '-B-1');
|
|
95
95
|
let session = {
|
|
96
96
|
userAgent: userAgentAB,
|
|
97
97
|
originatingSystem: userAgent,
|
|
@@ -142,13 +142,14 @@ export function SessionRestore(props) {
|
|
|
142
142
|
const existingOriginatingSystem = (_b = relevantSession === null || relevantSession === void 0 ? void 0 : relevantSession.session) === null || _b === void 0 ? void 0 : _b.originatingSystem;
|
|
143
143
|
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
144
144
|
// existingOriginatingSystem or If useragents are different then existingUserAgent or userAgent
|
|
145
|
+
const userAgentAB = userAgent + (isEqual(ABTestVariation, 'A') ? '-A-1' : '-B-1');
|
|
145
146
|
const originatingSystem = !isEmpty(existingOriginatingSystem)
|
|
146
147
|
? existingOriginatingSystem
|
|
147
148
|
: !isEmpty(existingUserAgent) && existingUserAgent !== userAgent
|
|
148
149
|
? existingUserAgent
|
|
149
150
|
: userAgent;
|
|
150
151
|
let session = {
|
|
151
|
-
userAgent,
|
|
152
|
+
userAgent: userAgentAB,
|
|
152
153
|
originatingSystem: originatingSystem,
|
|
153
154
|
caseCreationError: caseCreation500ErrorStatus,
|
|
154
155
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.5.
|
|
64
|
-
"@rh-support/react-context": "2.5.
|
|
63
|
+
"@rh-support/components": "2.5.1",
|
|
64
|
+
"@rh-support/react-context": "2.5.1",
|
|
65
65
|
"@rh-support/types": "2.0.5",
|
|
66
66
|
"@rh-support/user-permissions": "2.5.0",
|
|
67
67
|
"@rh-support/utils": "2.5.0",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"defaults and supports es6-module",
|
|
138
138
|
"maintained node versions"
|
|
139
139
|
],
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "78f51b2cfd60107a49503d13542ba46d29df4d04"
|
|
141
141
|
}
|