@rh-support/troubleshoot 2.2.187 → 2.2.189

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 (20) hide show
  1. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +4 -2
  3. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -1
  5. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +4 -2
  7. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +10 -1
  8. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -32
  10. package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
  11. package/lib/esm/components/Recommendations/EARules/EARule.js +0 -2
  12. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
  13. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +2 -2
  14. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  15. package/lib/esm/components/Recommendations/Recommendations.js +16 -5
  16. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  17. package/lib/esm/components/Suggestions/TopContent.js +1 -4
  18. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  19. package/lib/esm/components/wizardLayout/WizardNavigation.js +7 -3
  20. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAihBxB,CAAC"}
1
+ {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAkhBxB,CAAC"}
@@ -23,7 +23,7 @@ import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Button, Mo
23
23
  import { PaginatedList, ToastNotification } from '@rh-support/components';
24
24
  import { useGlobalStateContext } from '@rh-support/react-context';
25
25
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
26
- import { dtmTrackEventCaseDetailsSolutionDocs, getSolrParams } from '@rh-support/utils';
26
+ import { getSolrParams } from '@rh-support/utils';
27
27
  import find from 'lodash/find';
28
28
  import isEqual from 'lodash/isEqual';
29
29
  import some from 'lodash/some';
@@ -163,7 +163,9 @@ export const CaseSolutions = forwardRef((props, ref) => {
163
163
  });
164
164
  const canPinUnpin = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES);
165
165
  const canLinkUnlink = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES);
166
- const addDtmEvent = (stepName) => dtmTrackEventCaseDetailsSolutionDocs(stepName, caseNumber, `${product}|${version}`);
166
+ const addDtmEvent = (stepName) => {
167
+ // reserve for when fixing dtm
168
+ };
167
169
  const updateRecommendations = (recommendationToUpdate, isPinned, isLinked) => () => __awaiter(void 0, void 0, void 0, function* () {
168
170
  try {
169
171
  setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: true })));
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,sBAwFzC"}
1
+ {"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,sBAyFzC"}
@@ -30,7 +30,8 @@ export default function CaseInternalStatus() {
30
30
  const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
31
31
  const [isOpen, setIsOpen] = useState(false);
32
32
  const [selected, setSelected] = useState(internalStatus);
33
- const onToggleClick = () => {
33
+ const onToggleClick = (e) => {
34
+ e.stopPropagation();
34
35
  setIsOpen(!isOpen);
35
36
  };
36
37
  const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: isIStatusUpdating, isFullWidth: true, className: "case-internal-status-selector-text" },
@@ -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,qBA4mBnD"}
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"}
@@ -326,10 +326,12 @@ export default function CaseDiscussion(props) {
326
326
  }
327
327
  // eslint-disable-next-line react-hooks/exhaustive-deps
328
328
  }, [isPostingRemoteRequestCommentCompleted]);
329
- const onToggleClick = () => {
329
+ const onToggleClick = (e) => {
330
+ e.stopPropagation();
330
331
  setIsOpen(!isOpen);
331
332
  };
332
- const onSortToggleClick = () => {
333
+ const onSortToggleClick = (e) => {
334
+ e.stopPropagation();
333
335
  setIsSortOpen(!isSortOpen);
334
336
  };
335
337
  const onFilterSelect = (_event, prevOption) => {
@@ -12,6 +12,15 @@
12
12
  .timeline-empty::after {
13
13
  display: none;
14
14
  }
15
+ .timeline::before {
16
+ bottom: var(--timeline-bottom, 0px);
17
+ }
18
+
19
+ .right-node {
20
+ overflow: hidden;
21
+ text-overflow: ellipsis;
22
+ white-space: nowrap;
23
+ }
15
24
 
16
25
  .timeline::after {
17
26
  content: '';
@@ -25,7 +34,7 @@
25
34
 
26
35
  /* This value is calculated in timeline.tsx */
27
36
  bottom: calc(var(--timeline-bottom) + var(--timeline-bottom-offset, 18.35%));
28
- left: calc(15% + 15px);
37
+ left: calc(15% + 14.5px);
29
38
  transform: translateX(-50%);
30
39
  }
31
40
 
@@ -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,KAAuD,MAAM,OAAO,CAAC;AA4P5E,QAAA,MAAM,QAAQ;;uBAwRb,CAAC;AACF,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;AA8P3D,QAAA,MAAM,QAAQ;;uBAgUb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -16,7 +16,7 @@ import globalDangerColor100 from '@patternfly/react-tokens/dist/js/global_danger
16
16
  import { format, fromUnixTime, isSameDay, parse } from 'date-fns';
17
17
  import debounce from 'lodash/debounce';
18
18
  import isEmpty from 'lodash/isEmpty';
19
- import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
19
+ import React, { useEffect, useRef, useState } from 'react';
20
20
  import { Trans, useTranslation } from 'react-i18next';
21
21
  const TimelineEvent = ({ date, text, side, user, useAvatar }) => {
22
22
  if (side === 'left') {
@@ -31,7 +31,7 @@ const TimelineEvent = ({ date, text, side, user, useAvatar }) => {
31
31
  React.createElement("div", { className: `contentTimeline content-${side}-history content-${side}-${user}` },
32
32
  React.createElement("p", { className: `content-time-${side}-history` }, text))));
33
33
  }
34
- return (React.createElement("div", { className: `${side}-node ${user}`, role: "complementary", "aria-label": `${user}'s timeline event content ` },
34
+ return (React.createElement("div", { className: `${side}-node ${user}`, role: "complementary", "aria-label": `${user}'s timeline event content` },
35
35
  React.createElement("div", { className: `contentTimeline content-${side}-history content-${side}-${user}` },
36
36
  React.createElement("h2", { className: `content-date-${side}-history` }, date),
37
37
  text && React.createElement("p", { className: `content-time-${side}-history` }, text))));
@@ -39,7 +39,7 @@ const TimelineEvent = ({ date, text, side, user, useAvatar }) => {
39
39
  const TimelineNode = React.forwardRef(({ leftEvent, rightEvent, user, useAvatar }, ref) => {
40
40
  return (React.createElement("div", { className: "timeline-node", role: "region", "aria-label": "Timeline node" },
41
41
  leftEvent && React.createElement(TimelineEvent, Object.assign({}, leftEvent, { side: "left", useAvatar: useAvatar })),
42
- React.createElement("div", { ref: ref, "aria-label": `${useAvatar ? 'User profile picture' : 'Timeline marker'}`, tabIndex: 0 }, useAvatar ? (React.createElement(Avatar, { src: 'https://www.patternfly.org/images/668560cd.svg', className: `timeline-avatar timeline-avatar-${user}`, alt: `${user}'s avatar` })) : (React.createElement("div", { className: `timeline-marker timeline-${user}` }))),
42
+ React.createElement("div", { ref: ref, "aria-label": `${useAvatar ? 'User profile picture' : 'Timeline marker'}`, tabIndex: -1 }, useAvatar ? (React.createElement(Avatar, { src: 'https://www.patternfly.org/images/668560cd.svg', className: `timeline-avatar timeline-avatar-${user}`, alt: `${user}'s avatar` })) : (React.createElement("div", { className: `timeline-marker timeline-${user}` }))),
43
43
  rightEvent && React.createElement(TimelineEvent, Object.assign({}, rightEvent, { side: "right" }))));
44
44
  });
45
45
  //Handling changes in case fields to be displayed to the user
@@ -60,6 +60,7 @@ const applyReplacements = (item) => {
60
60
  Customer_Escalation__c: 'Customer Escalation',
61
61
  SlaStartDate: 'SLA Start Date',
62
62
  Case_Language__c: 'Case Language',
63
+ Alternate_Id__c: 'Personal reference number',
63
64
  };
64
65
  const languageCodeMapping = {
65
66
  de: 'German',
@@ -86,6 +87,7 @@ const applyReplacements = (item) => {
86
87
  'Case Group': 'caseGroup',
87
88
  'SLA Start Date': 'slaStartDate',
88
89
  'Case Language': 'caseLanguage',
90
+ Alternate_Id__c: 'Personal reference number',
89
91
  };
90
92
  const baseKey = keyMap[fieldName] || fieldName.replace(/\s/g, '');
91
93
  const key = `${baseKey}${prefix}Name`;
@@ -198,9 +200,10 @@ function stripHTML(htmlString) {
198
200
  const Timeline = ({ caseNumber }) => {
199
201
  const { t } = useTranslation();
200
202
  const [timelineEvents, setTimelineEvents] = useState([]);
203
+ const [originalTimelineEvents, setOriginalTimelineEvents] = useState([]);
201
204
  const [isFetchingData, setIsFetchingData] = useState();
202
205
  const lastNodeRef = useRef(null);
203
- const [dateValue, setDateValue] = React.useState('');
206
+ const [dateValue, setDateValue] = useState('');
204
207
  const [searchValue, setSearchValue] = useState('');
205
208
  const [filteredEvents, setFilteredEvents] = useState([]);
206
209
  const [isSelectOpen, setIsSelectOpen] = useState(false);
@@ -221,19 +224,21 @@ const Timeline = ({ caseNumber }) => {
221
224
  { title: '15', value: 15 },
222
225
  { title: '20', value: 20 },
223
226
  ], isCompact: true, variant: "top" }));
224
- const handleSelectToggle = () => {
227
+ const handleSelectToggle = (e) => {
228
+ e.preventDefault();
225
229
  setIsSelectOpen(!isSelectOpen);
226
230
  };
227
- const handleSelect = (_event, value) => {
228
- setSelectedOrder(value);
231
+ const handleSelect = (e, value) => {
232
+ e.preventDefault();
233
+ if (value !== selectedOrder) {
234
+ setSelectedOrder(value);
235
+ reorderTimelineEvents(value);
236
+ }
229
237
  setIsSelectOpen(false);
230
- reorderTimelineEvents(value);
231
238
  };
232
239
  const reorderTimelineEvents = (order) => {
233
- setTimelineEvents((prevEvents) => {
234
- const reversedEvents = [...prevEvents].reverse();
235
- return applyAvatarLogic(reversedEvents);
236
- });
240
+ const events = order === 'Newest to Oldest' ? [...originalTimelineEvents] : [...originalTimelineEvents].reverse();
241
+ setTimelineEvents(applyAvatarLogic(events));
237
242
  };
238
243
  const applyAvatarLogic = (events) => {
239
244
  let previousUser = null;
@@ -258,6 +263,7 @@ const Timeline = ({ caseNumber }) => {
258
263
  const response = yield caseHistory.getHistoryv1(caseNumber, options);
259
264
  const transformedData = transformApiResponseToTimelineData(response);
260
265
  setTimelineEvents(transformedData);
266
+ setOriginalTimelineEvents(transformedData);
261
267
  }
262
268
  catch (error) {
263
269
  console.error('Failed to fetch history:', error);
@@ -270,25 +276,48 @@ const Timeline = ({ caseNumber }) => {
270
276
  }
271
277
  fetchHistory();
272
278
  }, [caseNumber]);
273
- //Using useLayoutEffect because we are measuring styles based on DOM, useLayoutEffect runs after DOM Mutations https://react.dev/reference/react/useLayoutEffect
274
- useLayoutEffect(() => {
275
- const updateLineStyle = debounce(() => {
276
- var _a;
279
+ const futureDateValidator = (date) => {
280
+ const today = new Date();
281
+ today.setHours(0, 0, 0, 0); // Normalize to midnight
282
+ if (date > today) {
283
+ return 'Date cannot be in the future.';
284
+ }
285
+ return '';
286
+ };
287
+ const updateLineStyle = () => {
288
+ var _a;
289
+ const timelineElement = document.querySelector('.timeline');
290
+ if (timelineElement) {
277
291
  if (lastNodeRef.current) {
278
292
  const timelineBottom = lastNodeRef.current.getBoundingClientRect().bottom + window.scrollY;
279
- const timelineElement = document.querySelector('.timeline');
293
+ const timelineTop = timelineElement.getBoundingClientRect().top + window.scrollY;
280
294
  const avatarHeight = ((_a = lastNodeRef.current.querySelector('.timeline-avatar')) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
281
- if (timelineElement) {
282
- const timelineTop = timelineElement.getBoundingClientRect().top + window.scrollY;
283
- const calculatedBottomValue = `${timelineTop + timelineElement.offsetHeight - timelineBottom + avatarHeight}px`;
284
- timelineElement.style.setProperty('--timeline-bottom', calculatedBottomValue);
285
- }
295
+ const calculatedBottomValue = `${timelineTop + timelineElement.offsetHeight - timelineBottom + avatarHeight}px`;
296
+ timelineElement.style.setProperty('--timeline-bottom', calculatedBottomValue);
286
297
  }
287
- }, 100);
288
- updateLineStyle();
289
- window.addEventListener('resize', updateLineStyle);
290
- return () => window.removeEventListener('resize', updateLineStyle);
291
- }, [timelineEvents, perPage, dateValue]);
298
+ else {
299
+ timelineElement.style.setProperty('--timeline-bottom', '0px');
300
+ }
301
+ }
302
+ };
303
+ //Using useLayoutEffect because we are measuring styles based on DOM, useLayoutEffect runs after DOM Mutations https://react.dev/reference/react/useLayoutEffect
304
+ useEffect(() => {
305
+ const debouncedUpdateLineStyle = debounce(updateLineStyle, 100);
306
+ window.addEventListener('resize', debouncedUpdateLineStyle);
307
+ if (!isFetchingData && filteredEvents.length > 0) {
308
+ requestAnimationFrame(() => {
309
+ updateLineStyle();
310
+ });
311
+ }
312
+ else {
313
+ // No events or still fetching, set --timeline-bottom to 0px
314
+ const timelineElement = document.querySelector('.timeline');
315
+ if (timelineElement) {
316
+ timelineElement.style.setProperty('--timeline-bottom', '0px');
317
+ }
318
+ }
319
+ return () => window.removeEventListener('resize', debouncedUpdateLineStyle);
320
+ }, [isFetchingData, filteredEvents, page, perPage]);
292
321
  const handleSearchChange = (value) => {
293
322
  setSearchValue(value.target.value);
294
323
  };
@@ -305,9 +334,10 @@ const Timeline = ({ caseNumber }) => {
305
334
  filteredBySearch = filteredBySearch.filter(({ left, right }) => {
306
335
  const dateString = left.date.toLowerCase();
307
336
  const timeString = left.text.toLowerCase();
337
+ const rightDateString = right.date.toLowerCase();
308
338
  return (dateString.includes(lowercasedFilter) ||
309
339
  timeString.includes(lowercasedFilter) ||
310
- right.date.toLowerCase().includes(lowercasedFilter));
340
+ rightDateString.includes(lowercasedFilter));
311
341
  });
312
342
  }
313
343
  let finalFilteredEvents = filteredBySearch;
@@ -319,6 +349,7 @@ const Timeline = ({ caseNumber }) => {
319
349
  });
320
350
  }
321
351
  setFilteredEvents(finalFilteredEvents);
352
+ setPage(1);
322
353
  }, [searchValue, dateValue, timelineEvents]);
323
354
  const handleReload = (e) => {
324
355
  e.preventDefault();
@@ -332,7 +363,6 @@ const Timeline = ({ caseNumber }) => {
332
363
  React.createElement(EmptyStateBody, null,
333
364
  React.createElement(Trans, null,
334
365
  "Try ",
335
- ' ',
336
366
  React.createElement("a", { href: "#", onClick: handleReload }, "reloading the page"),
337
367
  ' ',
338
368
  "or check back later"))));
@@ -343,18 +373,19 @@ const Timeline = ({ caseNumber }) => {
343
373
  React.createElement(EmptyStateBody, null,
344
374
  React.createElement(Trans, null, "Try modifying your search query or changing the date range and try again."))));
345
375
  }
346
- return (React.createElement(React.Fragment, null, filteredEvents.slice((page - 1) * perPage, page * perPage).map((node, index) => (React.createElement(TimelineNode, { key: index, leftEvent: node.left, rightEvent: node.right, user: node.right.user, useAvatar: node.right.useAvatar, ref: index === perPage - 1 ? lastNodeRef : null })))));
376
+ const paginatedEvents = filteredEvents.slice((page - 1) * perPage, page * perPage);
377
+ return (React.createElement(React.Fragment, null, paginatedEvents.map((node, index) => (React.createElement(TimelineNode, { key: index, leftEvent: node.left, rightEvent: node.right, user: node.right.user, useAvatar: node.right.useAvatar, ref: index === paginatedEvents.length - 1 ? lastNodeRef : null })))));
347
378
  };
348
379
  return (React.createElement(React.Fragment, null,
349
380
  React.createElement("div", { className: "timelineMenu" },
350
381
  React.createElement(SearchInput, { placeholder: t('Search for a user, action, or keyword'), value: searchValue, onChange: handleSearchChange, onClear: handleClear, className: "case-history-timeline-search" }),
351
382
  React.createElement("div", { className: "case-history-timeline-datepicker" },
352
- React.createElement(DatePicker, { value: dateValue, onChange: (_event, value) => handleDateChange(value) }),
383
+ React.createElement(DatePicker, { value: dateValue, onChange: (_event, value) => handleDateChange(value), validators: [futureDateValidator] }),
353
384
  React.createElement(Button, { onClick: () => setDateValue(''), isDisabled: isEmpty(dateValue) }, "Reset"))),
354
385
  React.createElement("div", { className: "timeline-controls" },
355
386
  React.createElement("div", { className: "timeline-pagination" }, renderPagination()),
356
387
  React.createElement("div", { className: "timeline-sort-order-select" },
357
- React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen, style: { width: '200px' } }, selectedOrder)), shouldFocusToggleOnSelect: true },
388
+ React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), shouldFocusToggleOnSelect: false, toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen, style: { width: '200px' } }, selectedOrder)) },
358
389
  React.createElement(SelectOption, { value: "Newest to Oldest" }, "Newest to Oldest"),
359
390
  React.createElement(SelectOption, { value: "Oldest to Newest" }, "Oldest to Newest")))),
360
391
  isFetchingData ? (React.createElement("div", { className: "timeline-loading-spinner" },
@@ -1 +1 @@
1
- {"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAqClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA0BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAoClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA0BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { pcm } from '@cee-eng/hydrajs';
3
- import { dtmTrackEventCaseStartStopped } from '@rh-support/utils';
4
3
  import DOMPurify from 'dompurify';
5
4
  import isEqual from 'lodash/isEqual';
6
5
  import React, { useContext } from 'react';
@@ -31,7 +30,6 @@ export function EARule({ children, rule, ruleRank }) {
31
30
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
32
31
  const onCtaClick = (link, title) => () => {
33
32
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromEA(link, SessionResourceVisibility.VISITED, ruleRank, rule.rule_id)], JSON.stringify({ product, version, summary }));
34
- dtmTrackEventCaseStartStopped(`insight rule button click: ${title}`, undefined, `${product}|${version}`);
35
33
  };
36
34
  return (React.createElement(EARuleContext.Provider, { value: {
37
35
  rule,
@@ -1 +1 @@
1
- {"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAO/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,qBAiKxD"}
1
+ {"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAO/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,qBAwJxD"}
@@ -14,7 +14,7 @@ import CloseIcon from '@patternfly/react-icons/dist/js/icons/close-icon';
14
14
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
15
15
  import { PaginationCompact, useFetch } from '@rh-support/components';
16
16
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
17
- import { dtmTrackEventCaseStartStopped, getResTypeFromUrl, getStyleVariantColor, StyleVariants, } from '@rh-support/utils';
17
+ import { getResTypeFromUrl, getStyleVariantColor, StyleVariants } from '@rh-support/utils';
18
18
  import isEqual from 'lodash/isEqual';
19
19
  import some from 'lodash/some';
20
20
  import React, { useContext, useEffect, useState } from 'react';
@@ -102,7 +102,7 @@ export function EARuleInfoInline({ eaRules = [] }) {
102
102
  React.createElement(EARuleTitle, null))),
103
103
  React.createElement("div", { className: "pf-v5-c-alert__action" },
104
104
  React.createElement(Button, { style: { fontSize: 15 }, variant: ButtonVariant.link, "data-tracking-id": "se-recommended-asa-ignore", type: "button", onClick: onIgnoreBtnClick }, validEARulesLength > 1 ? React.createElement(Trans, null, "Skip") : React.createElement(CloseIcon, null))),
105
- React.createElement("div", { className: "pf-v5-c-alert__description", onClick: () => dtmTrackEventCaseStartStopped('insight rule description click', undefined, `${product}|${version}`) },
105
+ React.createElement("div", { className: "pf-v5-c-alert__description" },
106
106
  React.createElement(EARuleDescription, null)),
107
107
  React.createElement("div", { className: "pf-v5-c-alert__action-group pf-v5-u-display-flex" },
108
108
  React.createElement(EARuleArticle, { className: "pf-v5-u-align-self-center pf-v5-u-mr-sm", linkTitle: "View details" }),
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAkBA,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,qBA0RpD"}
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"}
@@ -2,7 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Label, Pagination, PaginationVariant } from '@patternfly/react-core';
3
3
  import { LoadingDots, useDebounce, usePrevious } from '@rh-support/components';
4
4
  import { useGlobalStateContext } from '@rh-support/react-context';
5
- import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventCaseStartStopped, formatDate, } from '@rh-support/utils';
5
+ import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventRecommendationListingDisplayed, dtmTrackEventRecommendationListingItemClicked, formatDate, } from '@rh-support/utils';
6
6
  import differenceBy from 'lodash/differenceBy';
7
7
  import isEmpty from 'lodash/isEmpty';
8
8
  import isEqual from 'lodash/isEqual';
@@ -121,6 +121,18 @@ export default function Recommendations(props) {
121
121
  setCaseRecommendations(caseDispatch, recommendationState.visibleDocs, caseResourceLinks);
122
122
  }
123
123
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, getSessResFromRecs(recommendationState.visibleDocs, SessionResourceVisibility.PRESENTED, pageSize || DEFAULTPAGESIZE, recommendationState.currentPage || 1), JSON.stringify(payload));
124
+ const listing = recommendationState.visibleDocs.map((doc, i) => ({
125
+ content: {
126
+ contentID: doc.id,
127
+ contentPosition: i + 1,
128
+ contentTitle: doc.publishedTitle,
129
+ contentUrl: doc.view_uri,
130
+ displayFeature: 'Troubleshooting',
131
+ displayFeatureTitle: '',
132
+ },
133
+ isDisplayed: true,
134
+ }));
135
+ dtmTrackEventRecommendationListingDisplayed('middle', activeSection, listing, recommendationState.numFound);
124
136
  // eslint-disable-next-line react-hooks/exhaustive-deps
125
137
  }, [caseDispatch, recommendationState.visibleDocs, activeSessionId]);
126
138
  useEffect(() => {
@@ -145,10 +157,9 @@ export default function Recommendations(props) {
145
157
  setCurrentPage(recommendationDispatch, 1);
146
158
  };
147
159
  const onResourceClick = (doc, index) => (event) => {
148
- createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [
149
- getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1)),
150
- ], JSON.stringify(payload));
151
- dtmTrackEventCaseStartStopped('recommendation click', caseNumber, `${product}|${version}`);
160
+ const rank = index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1);
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);
152
163
  };
153
164
  return (React.createElement(React.Fragment, null,
154
165
  React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) && !isEmpty(issue) }),
@@ -1 +1 @@
1
- {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAKxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAiJ/C"}
1
+ {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAIxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBA8I/C"}
@@ -1,6 +1,5 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Tooltip } from '@patternfly/react-core';
3
- import { dtmTrackEventCaseStartStopped } from '@rh-support/utils';
4
3
  import isEqual from 'lodash/isEqual';
5
4
  import map from 'lodash/map';
6
5
  import React, { useState } from 'react';
@@ -14,7 +13,7 @@ export default function TopContent(props) {
14
13
  const sessionRestoreDispatch = React.useContext(SessionRestoreDispatchContext);
15
14
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = React.useContext(SessionRestoreStateContext);
16
15
  const [expanded, setExpanded] = useState('');
17
- const { product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseNumber } = useCaseSelector((state) => ({
16
+ const { product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency } = useCaseSelector((state) => ({
18
17
  product: state.caseDetails.product,
19
18
  version: state.caseDetails.version,
20
19
  summary: state.caseDetails.summary,
@@ -22,11 +21,9 @@ export default function TopContent(props) {
22
21
  environment: state.caseDetails.environment,
23
22
  periodicityOfIssue: state.caseDetails.periodicityOfIssue,
24
23
  timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
25
- caseNumber: state.caseDetails.caseNumber,
26
24
  }), isEqual);
27
25
  const onLinkClick = (item) => (event) => {
28
26
  props.onResourceClick && props.onResourceClick(item);
29
- dtmTrackEventCaseStartStopped('top content click', caseNumber, `${product}|${version}`);
30
27
  };
31
28
  const onToggle = (id) => {
32
29
  if (id === expanded) {
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAK3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA4OtC;kBA5OQ,gBAAgB;;;AA8OzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA6OtC;kBA7OQ,gBAAgB;;;AA+OzB,eAAe,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ import { pcm } from '@cee-eng/hydrajs';
11
11
  import { Button, ButtonVariant } from '@patternfly/react-core';
12
12
  import { useFetch } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
14
- import { dtmTrackEventCaseStartStopped, getResTypeFromUrl, scrollIntoView } from '@rh-support/utils';
14
+ import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, scrollIntoView } from '@rh-support/utils';
15
15
  import find from 'lodash/find';
16
16
  import isEqual from 'lodash/isEqual';
17
17
  import React, { useContext, useEffect, useState } from 'react';
@@ -23,6 +23,7 @@ import { SessionRestoreStateContext } from '../../context/SessionRestoreContext'
23
23
  import { setCaseState } from '../../reducers/CaseReducer';
24
24
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
25
25
  import { updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
26
+ import RouteUtils from '../../utils/routeUtils';
26
27
  import { RecommendationFeedbackModal } from '../Recommendations/RecommendationFeedbackModal';
27
28
  import { useIsSectionValid } from '../shared/useIsSectionValid';
28
29
  const defaultProps = {};
@@ -56,6 +57,11 @@ function WizardNavigation(props) {
56
57
  // eslint-disable-next-line react-hooks/exhaustive-deps
57
58
  }, []);
58
59
  useEffect(() => {
60
+ var _a, _b;
61
+ const isCreatingCase = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
62
+ dtmTrackEventCaseCreationStepEncountered(isCreatingCase,
63
+ // @ts-ignore
64
+ props.activeStep.id, (_a = caseState.caseDetails) === null || _a === void 0 ? void 0 : _a.caseNumber, (_b = caseState.caseDetails) === null || _b === void 0 ? void 0 : _b.caseType, caseState.caseDetails.summary, caseState.caseDetails.product, caseState.caseDetails.version);
59
65
  if (props.activeStep.id === AppRouteSections.TROUBLESHOOT) {
60
66
  window.scrollTo({
61
67
  top: 0,
@@ -140,13 +146,11 @@ function WizardNavigation(props) {
140
146
  props.onNext && props.onNext();
141
147
  }
142
148
  }
143
- dtmTrackEventCaseStartStopped(`${props.activeStep.nextButtonLabel} button clicked on ${props.activeStep.name} step`, `${caseState.caseDetails.caseNumber}`, `${caseState.caseDetails.product}|${caseState.caseDetails.version}`);
144
149
  return;
145
150
  };
146
151
  const onBack = () => {
147
152
  if (props.activeStep.hidRestOnBack)
148
153
  props.onShowRestUpdate(false);
149
- dtmTrackEventCaseStartStopped(`${props.activeStep.nextButtonLabel} button clicked on ${props.activeStep.name} step`, '', `${caseState.caseDetails.product}|${caseState.caseDetails.version}`);
150
154
  props.onBack();
151
155
  };
152
156
  const onRecsFeedbackModalToggle = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.187",
3
+ "version": "2.2.189",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -60,13 +60,12 @@
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.89",
64
- "@rh-support/react-context": "2.1.98",
63
+ "@rh-support/components": "2.1.91",
64
+ "@rh-support/react-context": "2.1.100",
65
65
  "@rh-support/types": "2.0.5",
66
- "@rh-support/user-permissions": "2.1.54",
67
- "@rh-support/utils": "2.1.43",
68
- "@types/react-redux": "^7.1.33",
69
- "@types/redux": "^3.6.0",
66
+ "@rh-support/user-permissions": "2.1.56",
67
+ "@rh-support/utils": "2.1.45",
68
+ "date-fns": "^4.1.0",
70
69
  "dompurify": "^2.2.6",
71
70
  "dot": "^1.1.3",
72
71
  "downshift": "^6.0.5",
@@ -104,7 +103,9 @@
104
103
  "@types/react": "^18.2.20",
105
104
  "@types/react-bootstrap-typeahead": "^5.1.3",
106
105
  "@types/react-dom": "^18.2.18",
106
+ "@types/react-redux": "^7.1.33",
107
107
  "@types/react-router-dom": "^5.1.2",
108
+ "@types/redux": "^3.6.0",
108
109
  "faker": "^5.5.3",
109
110
  "jest": "^29.7.0",
110
111
  "jest-environment-jsdom": "^29.7.0"
@@ -133,5 +134,5 @@
133
134
  "defaults and supports es6-module",
134
135
  "maintained node versions"
135
136
  ],
136
- "gitHead": "4e0f1c9e7374499fb86580de1165f97eab93c7f3"
137
+ "gitHead": "672881ff1c4cabf0dee016387c49f6abbdc952a7"
137
138
  }