@rh-support/troubleshoot 2.2.191 → 2.2.193

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.
Files changed (21) hide show
  1. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
  3. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +2 -2
  5. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +40 -3
  7. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  8. package/lib/esm/components/CaseInformation/Fts.js +6 -5
  9. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  10. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +11 -5
  11. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  12. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +11 -5
  13. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  14. package/lib/esm/components/Recommendations/AsideResults.js +3 -1
  15. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  16. package/lib/esm/components/Recommendations/Recommendations.js +1 -1
  17. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts +2 -2
  18. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  19. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +10 -1
  20. package/lib/esm/scss/_pf-overrides.scss +6 -0
  21. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAigBjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4fjD"}
@@ -12,7 +12,7 @@ import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
12
12
  import { ToastNotification, useConfirmation } from '@rh-support/components';
13
13
  import { CloseCaseModal, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
14
14
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
15
- import { dtmTrackEvent, haventLoadedMetadata, isOpenShiftOnlineProduct, PreviousCaseTypes, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
15
+ import { dtmTrackEventCaseStepEncountered, haventLoadedMetadata, isOpenShiftOnlineProduct, PreviousCaseTypes, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
16
16
  import isEqual from 'lodash/isEqual';
17
17
  import React, { useContext, useEffect, useRef, useState } from 'react';
18
18
  import { Trans, useTranslation } from 'react-i18next';
@@ -301,7 +301,7 @@ export default function CaseOverview(props) {
301
301
  yield updateStatusState(CaseStatusEnum.CLOSED);
302
302
  yield postCommentAfterStatusUpdate(commentBody);
303
303
  setShowCaseCloseModal(false);
304
- dtmTrackEvent('case closed', 'case closed - case details page', caseNumber, `${product}|${version}`);
304
+ dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
305
305
  }), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
306
306
  setShowCaseCloseModal(false);
307
307
  }, caseNumber: caseNumber })),
@@ -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;AAa1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,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,qBA8mBnD"}
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;AAsCzF,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,qBA8mBnD"}
@@ -12,7 +12,7 @@ import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-
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';
15
- import { dtmTrackEvent, getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView } from '@rh-support/utils';
15
+ import { dtmTrackEventCaseStepEncountered, getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView, } from '@rh-support/utils';
16
16
  import cloneDeep from 'lodash/cloneDeep';
17
17
  import filter from 'lodash/filter';
18
18
  import findIndex from 'lodash/findIndex';
@@ -171,7 +171,7 @@ export default function CaseDiscussion(props) {
171
171
  };
172
172
  const onCommentAdded = () => __awaiter(this, void 0, void 0, function* () {
173
173
  yield updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
174
- dtmTrackEvent('case details page comment', 'comment', caseNumber, `${product}|${version}`);
174
+ dtmTrackEventCaseStepEncountered('comment', caseNumber, product, version);
175
175
  });
176
176
  const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
177
177
  yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, loggedInUsersAccount.data.secureSupport, discussionFiltersListState);
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AA0BxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AA4Q3D,QAAA,MAAM,QAAQ;;uBAkUb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AA0BxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AAgT3D,QAAA,MAAM,QAAQ;;uBAkUb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -50,6 +50,7 @@ const TimelineNode = React.forwardRef(({ leftEvent, rightEvent, user, useAvatar
50
50
  const applyReplacements = (item) => {
51
51
  if (!item || typeof item !== 'object')
52
52
  return '';
53
+ // API field names to easy to read display names
53
54
  const fieldNameMapping = {
54
55
  ContactId: 'Contact',
55
56
  RH_Product__c: 'Product',
@@ -64,7 +65,13 @@ const applyReplacements = (item) => {
64
65
  SlaStartDate: 'SLA Start Date',
65
66
  Case_Language__c: 'Case Language',
66
67
  Alternate_Id__c: 'Personal reference number',
68
+ SBR_Group__c: 'SBR Group',
67
69
  };
70
+ // https://help.salesforce.com/s/articleView?id=000384484&type=1
71
+ // adding in option for multiselect fields provided by salesforce.
72
+ // in future for more multiselect fields just add to below array.
73
+ const multiSelectFields = ['SBR_Group__c'];
74
+ // language codes to language names
68
75
  const languageCodeMapping = {
69
76
  de: 'German',
70
77
  en: 'English',
@@ -76,6 +83,7 @@ const applyReplacements = (item) => {
76
83
  jp: 'Japanese',
77
84
  zh: 'Chinese',
78
85
  };
86
+ // field display names to prefix keys used in item properties
79
87
  const keyMap = {
80
88
  Product: 'product',
81
89
  Version: 'version',
@@ -90,18 +98,23 @@ const applyReplacements = (item) => {
90
98
  'Case Language': 'caseLanguage',
91
99
  'Personal reference number': 'alternateId',
92
100
  };
101
+ // get the mapped display name for a field
93
102
  const getMappedFieldName = (fieldName) => fieldNameMapping[fieldName] || item.fieldLabel || fieldName || '';
103
+ // get the new or old value using the prefix
94
104
  const getNameValue = (prefix) => item[`${keyMap[getMappedFieldName(item.fieldName)]}${prefix}Name`] ||
95
105
  item[`${prefix}Value`] ||
96
106
  item[`${prefix.toLowerCase()}Value`] ||
97
107
  '';
108
+ // formatting functions
98
109
  const formatLanguageChange = (fieldName, oldLanguage, newLanguage) => `changed ${fieldName} from ${oldLanguage} to ${newLanguage}`;
99
110
  const formatSimpleChange = (fieldName, value) => `set ${fieldName} to ${value}`;
100
111
  const formatBooleanChange = (fieldName, value) => `set ${fieldName} to ${value}`;
112
+ // get field name and values
101
113
  const fieldName = getMappedFieldName(item.fieldName);
102
- const newValue = getNameValue('new');
103
- const oldValue = getNameValue('old');
114
+ const newValue = getNameValue('New');
115
+ const oldValue = getNameValue('Old');
104
116
  let newText = '';
117
+ // special field handling below, useful for future exposed case history fields etc / api changes
105
118
  switch (item.fieldName) {
106
119
  case 'Case_Language__c': {
107
120
  const newLanguage = languageCodeMapping[item.newValue] || item.newValue;
@@ -130,9 +143,33 @@ const applyReplacements = (item) => {
130
143
  if (item.newValue)
131
144
  newText = formatSimpleChange(fieldName, item.newValue);
132
145
  break;
146
+ case 'RemoteSessionTermsAckedBy__c':
147
+ newText = 'Acked Remote Rider terms';
148
+ break;
133
149
  default:
134
150
  if (oldValue && newValue) {
135
- newText = `changed ${fieldName} from ${oldValue} to ${newValue}`;
151
+ if (multiSelectFields.includes(item.fieldName)) {
152
+ // in salesforce multi-select picklist values are stored as a single string, with each value separated by a semicolon
153
+ const oldValues = oldValue.split(';').map((s) => s.trim());
154
+ const newValues = newValue.split(';').map((s) => s.trim());
155
+ const added = newValues.filter((nv) => !oldValues.includes(nv));
156
+ const removed = oldValues.filter((ov) => !newValues.includes(ov));
157
+ if (added.length > 0 && removed.length === 0) {
158
+ newText = `added ${added.join(', ')} to ${fieldName}`;
159
+ }
160
+ else if (removed.length > 0 && added.length === 0) {
161
+ newText = `removed ${removed.join(', ')} from ${fieldName}`;
162
+ }
163
+ else if (added.length > 0 && removed.length > 0) {
164
+ newText = `changed ${fieldName}, added ${added.join(', ')} and removed ${removed.join(', ')}`;
165
+ }
166
+ else {
167
+ newText = `changed ${fieldName} from ${oldValue} to ${newValue}`;
168
+ }
169
+ }
170
+ else {
171
+ newText = `changed ${fieldName} from ${oldValue} to ${newValue}`;
172
+ }
136
173
  }
137
174
  else if (newValue) {
138
175
  newText = formatSimpleChange(fieldName, newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA4OzB;kBA5OQ,GAAG;;;AA+OZ,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA6OzB;kBA7OQ,GAAG;;;AAgPZ,eAAe,GAAG,CAAC"}
@@ -100,10 +100,12 @@ function Fts(props) {
100
100
  setCaseState(caseDispatch, { ftsContactSameAsOwner: e.target.checked });
101
101
  if (!e.target.checked) {
102
102
  setFtsContact('');
103
- return;
103
+ setContactInfoIntoGlobalState('');
104
+ }
105
+ else {
106
+ setFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
107
+ setContactInfoIntoGlobalState(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
104
108
  }
105
- setFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
106
- setContactInfoIntoGlobalState(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
107
109
  };
108
110
  const onSave = (e) => __awaiter(this, void 0, void 0, function* () {
109
111
  setContactInfoIntoGlobalState(contactInfo24X7State);
@@ -148,8 +150,7 @@ function Fts(props) {
148
150
  }
149
151
  // eslint-disable-next-line react-hooks/exhaustive-deps
150
152
  }, [phoneAreaCodePrefixLineNumber, phoneCountryCode]);
151
- const disableFtsNContact = !isEmpty(caseNumber) &&
152
- (!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsContactUpdating || isFtsUpdating);
153
+ const disableFtsNContact = !isEmpty(caseNumber) && (!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating);
153
154
  const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
154
155
  limit: CONTACT_INFO_24X7_LIMIT,
155
156
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAqM1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA+M1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -11,6 +11,7 @@ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import { ToastNotification } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
+ import { dtmTrackEventCaseStepEncountered } from '@rh-support/utils';
14
15
  import differenceBy from 'lodash/differenceBy';
15
16
  import filter from 'lodash/filter';
16
17
  import find from 'lodash/find';
@@ -31,11 +32,13 @@ function RHAssociatesSelector(props) {
31
32
  const [isRHAssociatesUpdating, setIsRHAssociatesUpdating] = useState(false);
32
33
  const ability = useContext(AbilityContext);
33
34
  const { isExportingPDF } = useContext(PDFContext);
34
- const { caseNumber, contactSsoUsername, selectedOwner, selectedNotificationContacts } = useCaseSelector((state) => ({
35
+ const { caseNumber, contactSsoUsername, product, selectedOwner, selectedNotificationContacts, version } = useCaseSelector((state) => ({
35
36
  caseNumber: state.caseDetails.caseNumber,
36
37
  contactSsoUsername: state.caseDetails.contactSSOName,
37
38
  selectedOwner: state.selectedOwner,
38
39
  selectedNotificationContacts: state.selectedNotificationContacts,
40
+ product: state.caseDetails.product,
41
+ version: state.caseDetails.version,
39
42
  }), isEqual);
40
43
  const caseDispatch = useCaseDispatch();
41
44
  const onRhAssociateAdded = (addedUsers) => __awaiter(this, void 0, void 0, function* () {
@@ -64,7 +67,7 @@ function RHAssociatesSelector(props) {
64
67
  ToastNotification.addDangerMessage(t(`Red Hat associate failed to get removed`));
65
68
  }
66
69
  });
67
- const onNotifiedUserChange = (selectedContacts) => __awaiter(this, void 0, void 0, function* () {
70
+ const onNotifiedUserChange = (selectedContacts_1, ...args_1) => __awaiter(this, [selectedContacts_1, ...args_1], void 0, function* (selectedContacts, throwTrackEventOnAdd = false) {
68
71
  const toAdd = filter(differenceBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => item.ssoUsername !== contactSsoUsername);
69
72
  const toRemove = filter(differenceBy(selectedNotificationContacts, selectedContacts, 'ssoUsername'), (item) => item.isInternal && item.ssoUsername !== contactSsoUsername);
70
73
  let newContacts = [];
@@ -72,6 +75,9 @@ function RHAssociatesSelector(props) {
72
75
  newContacts = [...selectedNotificationContacts, ...toAdd];
73
76
  if (!isEmpty(caseNumber)) {
74
77
  yield onRhAssociateAdded(toAdd);
78
+ if (throwTrackEventOnAdd) {
79
+ dtmTrackEventCaseStepEncountered('follow', caseNumber, product, version);
80
+ }
75
81
  }
76
82
  }
77
83
  else if ((toRemove || []).length > 0) {
@@ -90,9 +96,9 @@ function RHAssociatesSelector(props) {
90
96
  !isCurrentUserSelectedInternalNotifiedUser();
91
97
  const showRemoveWatchButton = () => (loggedInUserRights.data.isInternal() && isCurrentUserSelectedInternalNotifiedUser()) ||
92
98
  contactSsoUsername === loggedInUser.data.ssoUsername;
93
- const addCurrentUser = () => {
94
- onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })]);
95
- };
99
+ const addCurrentUser = () => __awaiter(this, void 0, void 0, function* () {
100
+ onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })], true);
101
+ });
96
102
  const removeCurrentUser = () => {
97
103
  if (isCurrentUserSelectedInternalNotifiedUser()) {
98
104
  onNotifiedUserChange(filter(selectedNotificationContacts, (contact) => contact.ssoUsername !== loggedInUser.data.ssoUsername));
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmbzC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA8bzC;AAED,eAAe,mBAAmB,CAAC"}
@@ -11,6 +11,7 @@ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import { CaseContactsSelectorExternal, getHydraContactLabel, PromisifyModal, ToastNotification, usePrevious, } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
14
+ import { dtmTrackEventCaseStepEncountered } from '@rh-support/utils';
14
15
  import differenceBy from 'lodash/differenceBy';
15
16
  import filter from 'lodash/filter';
16
17
  import find from 'lodash/find';
@@ -34,7 +35,7 @@ function CaseContactSelector(props) {
34
35
  const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
35
36
  const [isAssociatesUpdating, setIsAssociatesUpdating] = useState(false);
36
37
  const { t } = useTranslation();
37
- const { accountNumber, caseNumber, contactSsoUsername, selectedNotificationContacts, selectedOwner, customEmailsList, selectedCaseGroupUsers, ownersCaseGroups, groupNumber, createdById, } = useCaseSelector((state) => ({
38
+ const { accountNumber, caseNumber, contactSsoUsername, selectedNotificationContacts, selectedOwner, customEmailsList, product, selectedCaseGroupUsers, ownersCaseGroups, groupNumber, createdById, version, } = useCaseSelector((state) => ({
38
39
  accountNumber: state.caseDetails.accountNumberRef,
39
40
  caseNumber: state.caseDetails.caseNumber,
40
41
  contactSsoUsername: state.caseDetails.contactSSOName,
@@ -45,6 +46,8 @@ function CaseContactSelector(props) {
45
46
  groupNumber: state.caseDetails.groupNumber,
46
47
  ownersCaseGroups: state.ownersCaseGroups,
47
48
  createdById: state.caseDetails.createdById,
49
+ product: state.caseDetails.product,
50
+ version: state.caseDetails.version,
48
51
  }), isEqual);
49
52
  const caseDispatch = useCaseDispatch();
50
53
  const { addCustomEmail, canAddCustomEmail, hideCustomEmails, deleteCustomEmail, isUpdatingCustomEmails, isEmailValid, showAddEmailToAccountModal, } = useCustomEmails({
@@ -185,7 +188,7 @@ function CaseContactSelector(props) {
185
188
  }
186
189
  return hasGroupAccess;
187
190
  });
188
- const onNotifiedUserChange = (...args_1) => __awaiter(this, [...args_1], void 0, function* (selectedContacts = []) {
191
+ const onNotifiedUserChange = (...args_1) => __awaiter(this, [...args_1], void 0, function* (selectedContacts = [], throwTrackEvent = false) {
189
192
  // check if selection changed
190
193
  const alreadySelected = [
191
194
  ...customEmailsList.data,
@@ -199,6 +202,9 @@ function CaseContactSelector(props) {
199
202
  const selectedCustomEmails = remove(allSelectedContacts, (item) => item.customOption || item.emailAddress).map((item) => item.label || item.emailAddress || item.ssoUsername);
200
203
  yield processCustomEmails(selectedCustomEmails);
201
204
  yield processCaseContacts(allSelectedContacts);
205
+ if (throwTrackEvent) {
206
+ dtmTrackEventCaseStepEncountered('follow', caseNumber, product, version);
207
+ }
202
208
  });
203
209
  /** Reset all non-internal selectedNotificationContacts when selected account number changes */
204
210
  useEffect(() => {
@@ -214,9 +220,9 @@ function CaseContactSelector(props) {
214
220
  !isCurrentUserSelectedExternalNotifiedUser();
215
221
  const showRemoveWatchButton = () => loggedInUserRights.data.isExternal() &&
216
222
  (isCurrentUserSelectedExternalNotifiedUser() || isCurrentUserCaseContact);
217
- const addCurrentUser = () => {
218
- onNotifiedUserChange([...selectedNotificationContacts, ...customEmailsList.data, loggedInUser.data]);
219
- };
223
+ const addCurrentUser = () => __awaiter(this, void 0, void 0, function* () {
224
+ onNotifiedUserChange([...selectedNotificationContacts, ...customEmailsList.data, loggedInUser.data], true);
225
+ });
220
226
  const removeCurrentUser = () => {
221
227
  if (isCurrentUserSelectedExternalNotifiedUser()) {
222
228
  onNotifiedUserChange([
@@ -1 +1 @@
1
- {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA6LzC"}
1
+ {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA0MzC"}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { pcm, search } from '@cee-eng/hydrajs';
11
11
  import { useDebounce } from '@rh-support/components';
12
- import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
12
+ import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, dtmTrackEventRecommendationListingItemClicked, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import isEqual from 'lodash/isEqual';
15
15
  import React, { useContext, useEffect, useRef } from 'react';
@@ -117,7 +117,9 @@ export function AsideResults(props) {
117
117
  const onResourceClick = (doc, index) => (event) => {
118
118
  if (isSelectedAccounntSecureSupport)
119
119
  return;
120
+ const rank = index + 1 + PAGE_SIZE * ((recommendationState.currentPage || 1) - 1);
120
121
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1)], payload);
122
+ dtmTrackEventRecommendationListingItemClicked(window.location.href, activeSection, 'middle', doc.id, rank, doc.allTitle, doc.view_uri, 'Recommendation Aside', 'Live troubleshooting powered by OpenShift AI');
121
123
  };
122
124
  useEffect(() => {
123
125
  if (isSelectedAccounntSecureSupport)
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,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,qBA6SpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,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,qBA+SpD"}
@@ -159,7 +159,7 @@ export default function Recommendations(props) {
159
159
  const onResourceClick = (doc, index) => (event) => {
160
160
  const rank = index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1);
161
161
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, rank)], JSON.stringify(payload));
162
- dtmTrackEventRecommendationListingItemClicked(window.location.href, activeSection, 'middle', doc.id, rank, doc.allTitle, doc.view_uri);
162
+ dtmTrackEventRecommendationListingItemClicked(window.location.href, activeSection, 'middle', doc.id, rank, doc.allTitle, doc.view_uri, 'Main Recommendation', 'Live search results powered by OpenShift AI');
163
163
  };
164
164
  return (React.createElement(React.Fragment, null,
165
165
  React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) && !isEmpty(issue) }),
@@ -1,6 +1,6 @@
1
1
  import { IDClassNameProps } from '@rh-support/types/shared';
2
2
  import React from 'react';
3
- interface IProps extends IDClassNameProps {
3
+ export interface IWidgetFileSelectorProps extends IDClassNameProps {
4
4
  isSessionId: boolean;
5
5
  isPrivate: boolean;
6
6
  isIdea?: boolean;
@@ -9,6 +9,6 @@ interface IProps extends IDClassNameProps {
9
9
  fileName: string[];
10
10
  };
11
11
  }
12
- declare function WidgetFileSelector({ id, className, isSessionId, isPrivate, isIdea, showFileExceed, }: IProps): React.JSX.Element;
12
+ declare function WidgetFileSelector({ id, className, isSessionId, isPrivate, isIdea, showFileExceed, }: IWidgetFileSelectorProps): React.JSX.Element;
13
13
  export default WidgetFileSelector;
14
14
  //# sourceMappingURL=WidgetFileSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetFileSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/WidgetFileSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,UAAU,MAAO,SAAQ,gBAAgB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE;QACb,IAAI,EAAE,OAAO,CAAC;QACd,QAAQ,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACL;AAED,iBAAS,kBAAkB,CAAC,EACxB,EAAO,EACP,SAAc,EACd,WAAW,EACX,SAAiB,EACjB,MAAc,EACd,cAA8C,GACjD,EAAE,MAAM,qBAmER;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"WidgetFileSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/WidgetFileSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAC9D,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE;QACb,IAAI,EAAE,OAAO,CAAC;QACd,QAAQ,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACL;AAED,iBAAS,kBAAkB,CAAC,EACxB,EAAO,EACP,SAAc,EACd,WAAW,EACX,SAAiB,EACjB,MAAc,EACd,cAA8C,GACjD,EAAE,wBAAwB,qBAsF1B;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,11 +1,18 @@
1
- import { humanizeSize } from '@rh-support/utils';
1
+ import { dtmTrackEventUploadFileToAnalyze, humanizeSize } from '@rh-support/utils';
2
+ import isEqual from 'lodash/isEqual';
2
3
  import React, { useContext } from 'react';
3
4
  import { useDropzone } from 'react-dropzone';
4
5
  import { Trans, useTranslation } from 'react-i18next';
6
+ import { useCaseSelector } from '../../../../context/CaseContext';
7
+ import { RouteContext } from '../../../../context/RouteContext';
5
8
  import { onDrop } from '../reducer/AttachmentHelper';
6
9
  import { AttachmentDispatchContext } from '../reducer/AttachmentReducerContext';
7
10
  function WidgetFileSelector({ id = '', className = '', isSessionId, isPrivate = false, isIdea = false, showFileExceed = { show: false, fileName: [] }, }) {
8
11
  const { t } = useTranslation();
12
+ const { caseDetails } = useCaseSelector((state) => ({
13
+ caseDetails: state.caseDetails,
14
+ }), isEqual);
15
+ const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
9
16
  const MAX_SIZE = isIdea ? 5242880 : undefined;
10
17
  // Attachment Reducer Related
11
18
  const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
@@ -23,6 +30,8 @@ function WidgetFileSelector({ id = '', className = '', isSessionId, isPrivate =
23
30
  // react-dropzone doesn't get triggered. So we need to manually clear the input value
24
31
  // so that user can attach the same file twice
25
32
  inputRef.current.value = null;
33
+ // Call a dtm track even whenever the file uploader is clicked
34
+ dtmTrackEventUploadFileToAnalyze(isCaseCreate, activeSection, caseDetails.caseType, caseDetails.product, caseDetails.version);
26
35
  };
27
36
  return (React.createElement(React.Fragment, null,
28
37
  React.createElement("label", Object.assign({ className: "file-diag-dragndrop", htmlFor: "file-diag-selector" }, getRootProps({ onClick: onLabelClick }), { "data-tracking-id": "file-selector-widget-main" }),
@@ -784,3 +784,9 @@ div.case-details-tabs pre {
784
784
  .get-support-summary-input {
785
785
  margin-bottom: 1rem;
786
786
  }
787
+
788
+ #external-ssousername-filter {
789
+ @media (min-width: 1300px) {
790
+ min-width: calc(100% + 269px) !important;
791
+ }
792
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.191",
3
+ "version": "2.2.193",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -60,11 +60,11 @@
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.1.91",
64
- "@rh-support/react-context": "2.1.100",
63
+ "@rh-support/components": "2.1.93",
64
+ "@rh-support/react-context": "2.1.102",
65
65
  "@rh-support/types": "2.0.5",
66
- "@rh-support/user-permissions": "2.1.56",
67
- "@rh-support/utils": "2.1.45",
66
+ "@rh-support/user-permissions": "2.1.57",
67
+ "@rh-support/utils": "2.1.46",
68
68
  "date-fns": "^4.1.0",
69
69
  "dompurify": "^2.2.6",
70
70
  "dot": "^1.1.3",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "9d68649cf6e2fbd399b34388704429012356113e"
137
+ "gitHead": "441d2489eca03e52a4c437c41638e5e0ae5338c3"
138
138
  }