@rh-support/troubleshoot 0.2.32 → 0.2.36

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.
@@ -1,6 +1,6 @@
1
1
  import { AlertMessage, AlertType, errorMessageTitle, formattedApiErrorMessage } from '@rh-support/components';
2
2
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
- import { getSHCaseLink } from '@rh-support/utils';
3
+ import { getSFDCSecureSupportCaseLink } from '@rh-support/utils';
4
4
  import React, { useContext } from 'react';
5
5
  import { Trans, useTranslation } from 'react-i18next';
6
6
  export function CaseDetailsErrorMessage(props) {
@@ -18,7 +18,7 @@ export function CaseDetailsErrorMessage(props) {
18
18
  loggedInUserRights.data.isSecureSupportTech() &&
19
19
  status === 403 &&
20
20
  message.includes('Account cannot be accessed via this endpoint')) {
21
- const shCaseLink = getSHCaseLink(props.caseNumber);
21
+ const shCaseLink = getSFDCSecureSupportCaseLink(props.caseNumber);
22
22
  errorMessage403 = (React.createElement(React.Fragment, null,
23
23
  "Secured Support Technicians should use",
24
24
  ' ',
@@ -1,6 +1,6 @@
1
1
  import { AlertMessage, AlertType } from '@rh-support/components';
2
2
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
- import { getSHCaseLink } from '@rh-support/utils';
3
+ import { getSFDCSecureSupportCaseLink } from '@rh-support/utils';
4
4
  import React, { useContext } from 'react';
5
5
  import { Trans } from 'react-i18next';
6
6
  export function CaseSecureSupportAlert(props) {
@@ -8,7 +8,7 @@ export function CaseSecureSupportAlert(props) {
8
8
  const isSecureSupportTechViewingSecureCase = loggedInUserRights.data.isSecureSupportTech() && props.selectedAccountDetails.secureSupport;
9
9
  const getWarningMsg = () => {
10
10
  if (isSecureSupportTechViewingSecureCase) {
11
- const shCaseLink = getSHCaseLink(props.caseNumber);
11
+ const shCaseLink = getSFDCSecureSupportCaseLink(props.caseNumber);
12
12
  return (React.createElement(React.Fragment, null,
13
13
  "Secured Support Technicians should use",
14
14
  ' ',
@@ -1 +1 @@
1
- {"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAqShB,CAAC;AAEH,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EA8ShB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -157,16 +157,26 @@ const CaseComments = React.forwardRef((props, ref) => {
157
157
  }
158
158
  return text;
159
159
  };
160
+ /* Purpose of this method is to break the default HTML Entity rendering on the UI when in plaintext mode.
161
+ This is achieved by directly swapping the '&' in any html entity to `&amp` in e.g. &euro swaps to &ampeuro
162
+ so it is rendered -> &euro on the UI instead of '€' */
163
+ const HTMLEntityChecker = (comment) => {
164
+ if (comment.includes('&')) {
165
+ return comment.replace(/&/g, '&');
166
+ }
167
+ else
168
+ return comment;
169
+ };
160
170
  const computeCommentText = (comment) => {
161
171
  const parseComment = parseCommentHtml(comment.commentBody, comment.contentType);
162
172
  if (!isEmpty(comment.commentBody) && comment.contentType === EditorMode.MARKDOWN) {
163
173
  return (React.createElement("div", { className: "push-top-narrow comment-markdown-text", dangerouslySetInnerHTML: commentMarkdown(parseComment) }));
164
174
  }
165
175
  else if (!isEmpty(comment.commentBody) && comment.contentType === EditorMode.PLAIN) {
166
- return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(parseComment) }));
176
+ return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(HTMLEntityChecker(parseComment)) }));
167
177
  }
168
178
  else {
169
- return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(comment.commentBody) }));
179
+ return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(HTMLEntityChecker(comment.commentBody)) }));
170
180
  }
171
181
  };
172
182
  if (!((_a = props.comment) === null || _a === void 0 ? void 0 : _a.isPublic) && !canSeePrivateComments)
@@ -1 +1 @@
1
- {"version":3,"file":"FileEARule.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/FileEARule.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,uBAAuB,CAAC,KAAK,KAAA,SAE5C;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eA0B/C"}
1
+ {"version":3,"file":"FileEARule.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/FileEARule.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,uBAAuB,CAAC,KAAK,KAAA,SAE5C;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eAc/C"}
@@ -1,22 +1,15 @@
1
- import { pcm } from '@cee-eng/hydrajs';
2
1
  import filter from 'lodash/filter';
3
2
  import map from 'lodash/map';
4
3
  import React, { useContext } from 'react';
5
4
  import { RulesStateContext } from '../../context/RulesContext';
6
- import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
7
5
  import Rule from '../shared/Rule';
8
- const { SessionResourceSource } = pcm.preCase.session;
9
6
  export function getValidAttachmentRules(rules) {
10
7
  return filter(rules, (r) => r.visible && r.rule_type === 'enrichment' && r.rule_sub_type === 'attachment');
11
8
  }
12
9
  export default function FileEARule(props) {
13
10
  const { rulesState } = useContext(RulesStateContext);
14
- const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
15
11
  const validAttachmentRules = getValidAttachmentRules(rulesState.EARules.rules);
16
12
  const canShowFileEARule = validAttachmentRules.length > 0;
17
13
  return (React.createElement(React.Fragment, null, canShowFileEARule &&
18
- map(validAttachmentRules, (rule) => {
19
- var _a, _b;
20
- return (React.createElement(Rule, { description: rule.description, title: rule.title, link: rule.cta, key: rule.cta, seSessionId: activeSessionId, seResourceOriginID: (_b = (_a = sessionResourceTracking[SessionResourceSource.EDMOUND_ABOTT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '' }));
21
- })));
14
+ map(validAttachmentRules, (rule) => (React.createElement(Rule, { description: rule.description, title: rule.title, link: rule.cta, key: rule.cta })))));
22
15
  }
@@ -16,7 +16,7 @@ export function ClusterRecommendationItems(props) {
16
16
  version: state.caseDetails.version,
17
17
  product: state.caseDetails.product,
18
18
  }), isEqual);
19
- const { parse } = useParseRuleMarkdown();
19
+ const { parseDotMarkdownWithTracking } = useParseRuleMarkdown();
20
20
  const onResourceClick = (e, rule) => {
21
21
  if (e.target.tagName.toLowerCase() === 'a') {
22
22
  const url = e.target.href.split('?')[0];
@@ -33,8 +33,8 @@ export function ClusterRecommendationItems(props) {
33
33
  React.createElement("p", null, rule.details || ''),
34
34
  rule.reason && (React.createElement(React.Fragment, null,
35
35
  React.createElement("h3", { className: "subheading subheading-sm" }, "Reason: "),
36
- React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parse(rule.reason, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'cluster-recommendation', 'cluster-recommendation') }))),
36
+ React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parseDotMarkdownWithTracking(rule.reason, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'ts-cluster-recommendation', 'se-cluster-recommendation-rule') }))),
37
37
  rule.resolution && (React.createElement(React.Fragment, null,
38
38
  React.createElement("h3", { className: "subheading subheading-sm" }, "Resolution: "),
39
- React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parse(rule.resolution, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'cluster-recommendation', 'cluster-recommendation') })))))))));
39
+ React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parseDotMarkdownWithTracking(rule.resolution, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'ts-cluster-recommendation', 'se-cluster-recommendation-rule') })))))))));
40
40
  }
@@ -3,7 +3,6 @@ import { IExtendedRule } from '../../../reducers/RulesReducer';
3
3
  interface IEARuleContext {
4
4
  rule: IExtendedRule;
5
5
  onCtaClick: (link: string) => (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
6
- getLinkWithParams: (link: string) => string;
7
6
  }
8
7
  export declare const EARuleContext: React.Context<IEARuleContext>;
9
8
  export declare function useEARuleContext(): IEARuleContext;
@@ -1 +1 @@
1
- {"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC/F,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAGD,eAAO,MAAM,aAAa,+BAIxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;CAAA,eAkCxC;AAED,iBAAS,WAAW,gBAGnB;AAED,iBAAS,iBAAiB,gBA0BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,eAenH;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":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClG;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;CAAA,eAyBxC;AAED,iBAAS,WAAW,gBAGnB;AAED,iBAAS,iBAAiB,gBAsBzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,eAgBnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
@@ -1,15 +1,13 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
- import { markdownToHTML } from '@cee-eng/ui-toolkit';
3
2
  import React, { useContext } from 'react';
4
3
  import { Trans } from 'react-i18next';
5
4
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
5
+ import { useParseRuleMarkdown } from '../../../hooks/useParseRuleMarkdown';
6
6
  import { createOrUpdateSessionResources, getSessResFromEA } from '../../../reducers/SessionRestoreReducer';
7
- import RouteUtils from '../../../utils/routeUtils';
8
7
  const { SessionResourceVisibility, SessionResourceSource } = pcm.preCase.session;
9
8
  export const EARuleContext = React.createContext({
10
9
  rule: {},
11
10
  onCtaClick: null,
12
- getLinkWithParams: null,
13
11
  });
14
12
  export function useEARuleContext() {
15
13
  const context = React.useContext(EARuleContext);
@@ -24,16 +22,9 @@ export function EARule({ children, rule }) {
24
22
  const onCtaClick = (link) => (event) => {
25
23
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromEA(link, SessionResourceVisibility.VISITED, rule.rule_id)]);
26
24
  };
27
- const getLinkWithParams = (link) => {
28
- var _a, _b;
29
- return link.includes('redhat.com/solutions') || link.includes('redhat.com/articles')
30
- ? `${link}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.EDMOUND_ABOTT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.EDMOUND_ABOTT)}`
31
- : link;
32
- };
33
25
  return (React.createElement(EARuleContext.Provider, { value: {
34
26
  rule,
35
27
  onCtaClick,
36
- getLinkWithParams,
37
28
  } }, children));
38
29
  }
39
30
  function EARuleTitle() {
@@ -43,28 +34,22 @@ function EARuleTitle() {
43
34
  rule.title);
44
35
  }
45
36
  function EARuleDescription() {
46
- const { rule, onCtaClick, getLinkWithParams } = useEARuleContext();
37
+ const { rule, onCtaClick } = useEARuleContext();
38
+ const { parseMarkdownWithTracking } = useParseRuleMarkdown();
47
39
  const onDescriptionClick = (ev) => {
48
40
  const target = ev.target;
49
41
  if (target.tagName.toLowerCase() === 'a') {
50
42
  onCtaClick(target.href.split('?')[0])(ev);
51
43
  }
52
44
  };
53
- const parseMarkdown = (markdown) => {
54
- const anchorHrefRegex = /href="(.*?)"/g;
55
- return {
56
- __html: markdownToHTML(markdown, { openLinksInNewTab: true })
57
- .replace(anchorHrefRegex, `href="${getLinkWithParams('$1')}"`)
58
- .replace('<a target="blank"', '<a target="blank" class="se-recommended ts-known-vuln" data-tracking-id="se-recommended-asa-rule"'),
59
- };
60
- };
61
- return (React.createElement("div", { className: "ea-rule", onClick: onDescriptionClick, dangerouslySetInnerHTML: parseMarkdown(rule.description) }));
45
+ return (React.createElement("div", { className: "ea-rule", onClick: onDescriptionClick, dangerouslySetInnerHTML: parseMarkdownWithTracking(rule.description, SessionResourceSource.EDMOUND_ABOTT, 'ts-known-vuln', 'se-recommended-asa-rule') }));
62
46
  }
63
47
  function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
64
- const { rule, onCtaClick, getLinkWithParams } = useEARuleContext();
48
+ const { rule, onCtaClick } = useEARuleContext();
49
+ const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
65
50
  if (!rule.cta)
66
51
  return null;
67
- return (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getLinkWithParams(rule.cta) },
52
+ return (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
68
53
  React.createElement(Trans, null, linkTitle)));
69
54
  }
70
55
  export { EARuleTitle, EARuleDescription, EARuleArticle };
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAOD,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,eAqK1E"}
1
+ {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAOD,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,eAuJ1E"}
@@ -1,14 +1,13 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
- import { markdownToHTML } from '@cee-eng/ui-toolkit';
3
2
  import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Label, LabelGroup } from '@patternfly/react-core';
4
3
  import BullseyeIcon from '@patternfly/react-icons/dist/js/icons/bullseye-icon';
5
4
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
6
- import { getRuleReasonHtml, parseDotTemplate } from '@rh-support/utils';
5
+ import { getRuleReasonHtml } from '@rh-support/utils';
7
6
  import React, { useContext, useEffect, useRef, useState } from 'react';
8
7
  import { Trans } from 'react-i18next';
9
8
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
9
+ import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
10
10
  import { createOrUpdateSessionResources, getSessResFromInsights } from '../../reducers/SessionRestoreReducer';
11
- import RouteUtils from '../../utils/routeUtils';
12
11
  import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
13
12
  const { SessionResourceVisibility, SessionResourceSource } = pcm.preCase.session;
14
13
  export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
@@ -20,6 +19,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
20
19
  const [isAdditionalExpanded, setIsAdditionalExpanded] = useState(false);
21
20
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
22
21
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
22
+ const { parseDotMarkdownWithTracking, getTrackingULRWithQueryParams } = useParseRuleMarkdown();
23
23
  const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
24
24
  useEffect(() => {
25
25
  const { analysisMetadata, name } = selectedLocalFiles.find((file) => file.attachmentId === doc.attachmentId);
@@ -37,20 +37,8 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
37
37
  const onCtaClick = (link) => (event) => {
38
38
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [getSessResFromInsights(link, SessionResourceVisibility.VISITED, ruleData.rule_id)]);
39
39
  };
40
- const getTrackingQueryParams = () => {
41
- var _a, _b;
42
- return RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.INSIGHTS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.INSIGHTS);
43
- };
44
40
  const parseMoreInfo = (moreInfo, reportDetails) => {
45
- const markdown = parseDotTemplate(moreInfo, reportDetails);
46
- const anchorHrefRegex = /href="(.*?)"/g;
47
- return {
48
- __html: markdownToHTML(markdown, {
49
- openLinksInNewTab: true,
50
- })
51
- .replace(anchorHrefRegex, `href="$1?${getTrackingQueryParams()}"`)
52
- .replace('<a target="blank"', '<a target="blank" class="se-recommended ts-result-insights" data-tracking-id="se-recommended-insights-rule"'),
53
- };
41
+ return parseDotMarkdownWithTracking(moreInfo, reportDetails, SessionResourceSource.INSIGHTS, 'ts-result-insights', 'se-recommended-insights-rule');
54
42
  };
55
43
  const onAdditionalInfoElemClick = (ev) => {
56
44
  const target = ev.target;
@@ -86,6 +74,6 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
86
74
  React.createElement(Trans, null, "Additional info")),
87
75
  React.createElement(AccordionContent, { isHidden: !isAdditionalExpanded },
88
76
  React.createElement("p", { onClick: onAdditionalInfoElemClick, dangerouslySetInnerHTML: parseMoreInfo(ruleData === null || ruleData === void 0 ? void 0 : ruleData.more_info, (_g = insightsReport === null || insightsReport === void 0 ? void 0 : insightsReport.current) === null || _g === void 0 ? void 0 : _g.details) }))))),
89
- React.createElement("a", { className: "se-recommended ts-result-insights cta-link", rel: "noopener noreferrer", target: "_blank", onClick: onCtaClick(doc.view_uri), "data-tracking-id": "se-recommended-insights-rule", href: `${doc.view_uri}?${getTrackingQueryParams()}` },
77
+ React.createElement("a", { className: "se-recommended ts-result-insights cta-link", rel: "noopener noreferrer", target: "_blank", onClick: onCtaClick(doc.view_uri), "data-tracking-id": "se-recommended-insights-rule", href: getTrackingULRWithQueryParams(doc.view_uri, SessionResourceSource.INSIGHTS) },
90
78
  React.createElement(Trans, null, "Related article")))))));
91
79
  }
@@ -1,7 +1,5 @@
1
1
  interface IProps {
2
2
  title: string;
3
- seSessionId: string;
4
- seResourceOriginID: string;
5
3
  link?: string;
6
4
  description: string;
7
5
  onHide?: (values: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Rule.tsx"],"names":[],"mappings":"AASA,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eAmDzC"}
1
+ {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Rule.tsx"],"names":[],"mappings":"AAQA,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eA2CzC"}
@@ -1,30 +1,22 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
- import { markdownToHTML } from '@cee-eng/ui-toolkit';
3
2
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
4
3
  import isEmpty from 'lodash/isEmpty';
5
4
  import React from 'react';
6
- import RouteUtils from '../../utils/routeUtils';
5
+ import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
7
6
  const { SessionResourceSource } = pcm.preCase.session;
8
7
  export default function Rule(props) {
8
+ const { getTrackingULRWithQueryParams, parseMarkdown } = useParseRuleMarkdown();
9
9
  const hide = () => {
10
10
  var _a;
11
11
  (_a = props.onHide) === null || _a === void 0 ? void 0 : _a.call(props, true);
12
12
  };
13
- const parseMarkdown = (markdown) => {
14
- return { __html: markdownToHTML(markdown, { openLinksInNewTab: true }) };
15
- };
16
- const getLinkWithParams = (link) => {
17
- return link.includes('redhat.com/solutions') || link.includes('redhat.com/articles')
18
- ? `${link}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.EDMOUND_ABOTT)}`
19
- : link;
20
- };
21
13
  const onCtaClick = (event) => {
22
14
  props.onLinkClick && props.onLinkClick(props.link);
23
15
  };
24
16
  return (React.createElement("div", { className: "pf-c-alert ea-rule-alert", role: "alert" },
25
17
  React.createElement("span", { className: "pf-c-alert__icon icon-info-circle", "aria-hidden": true }),
26
- React.createElement("h3", { className: "pf-c-alert__title" }, !isEmpty(props.link) ? (React.createElement("a", { href: getLinkWithParams(props.link), target: "_blank", rel: "noopener noreferrer", className: "se-recommended ts-known-vuln", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick }, props.title)) : (props.title)),
27
- React.createElement("div", { className: "pf-c-alert__description", dangerouslySetInnerHTML: parseMarkdown(props.description) }),
18
+ React.createElement("h3", { className: "pf-c-alert__title" }, !isEmpty(props.link) ? (React.createElement("a", { href: getTrackingULRWithQueryParams(props.link, SessionResourceSource.EDMOUND_ABOTT), target: "_blank", rel: "noopener noreferrer", className: "se-recommended ts-known-vuln", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick }, props.title)) : (props.title)),
19
+ React.createElement("div", { className: "pf-c-alert__description", dangerouslySetInnerHTML: { __html: parseMarkdown(props.description) } }),
28
20
  props.onHide && (React.createElement("div", { className: "pf-c-alert__action" },
29
21
  React.createElement("button", { className: "pf-c-button pf-m-plain", type: "button", "aria-label": "Close", onClick: hide },
30
22
  React.createElement(TimesIcon, { "aria-hidden": "true" }))))));
@@ -1,7 +1,7 @@
1
1
  import { Button } from '@patternfly/react-core';
2
2
  import ArrowLeftIcon from '@patternfly/react-icons/dist/js/icons/arrow-left-icon';
3
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
- import { getFieldInParts } from '@rh-support/utils';
4
+ import { getFieldInParts, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
5
5
  import difference from 'lodash/difference';
6
6
  import map from 'lodash/map';
7
7
  import React, { useContext } from 'react';
@@ -63,7 +63,7 @@ function WizardProgress(props) {
63
63
  const backToApp = () => {
64
64
  window.location.href = document.referrer;
65
65
  };
66
- const appNames = (_a = getFieldInParts(pcmConfig.data, 'referrer_app_names', 'JSON-HASHMAP')) !== null && _a !== void 0 ? _a : {};
66
+ const appNames = (_a = getFieldInParts(pcmConfig.data, 'referrer_app_names', PCM_CONFIG_FIELD_TYPE.JSON_HASHMAP)) !== null && _a !== void 0 ? _a : {};
67
67
  return (React.createElement("div", { className: appRouteConfugurations[activeSection].disableOtherSections
68
68
  ? 'section-disabled grid-progress'
69
69
  : 'grid-progress' },
@@ -1,7 +1,12 @@
1
1
  import { SessionResourceSource } from '@cee-eng/hydrajs/@types/api/pcm/troubleshootSession';
2
2
  export declare const useParseRuleMarkdown: () => {
3
- parse: (dotString: string, reportDetails: any, source: SessionResourceSource, trackingClassName: string, trackingId: string) => {
3
+ parseDotMarkdownWithTracking: (dotString: string, reportDetails: any, source: SessionResourceSource, trackingClassName: string, trackingId: string) => {
4
4
  __html: string;
5
5
  };
6
+ parseMarkdown: (markdown: string) => string;
7
+ parseMarkdownWithTracking: (markdown: string, source: SessionResourceSource, trackingClassName: string, trackingId: string) => {
8
+ __html: string;
9
+ };
10
+ getTrackingULRWithQueryParams: (link: string, source: SessionResourceSource) => string;
6
11
  };
7
12
  //# sourceMappingURL=useParseRuleMarkdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useParseRuleMarkdown.d.ts","sourceRoot":"","sources":["../../../src/hooks/useParseRuleMarkdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAQ5F,eAAO,MAAM,oBAAoB;uBAed,MAAM,8BAET,qBAAqB,qBACV,MAAM,cACb,MAAM;;;CAmBzB,CAAC"}
1
+ {"version":3,"file":"useParseRuleMarkdown.d.ts","sourceRoot":"","sources":["../../../src/hooks/useParseRuleMarkdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAQ5F,eAAO,MAAM,oBAAoB;8CAgBd,MAAM,8BAET,qBAAqB,qBACV,MAAM,cACb,MAAM;;;8BAMW,MAAM;0CAOzB,MAAM,UACR,qBAAqB,qBACV,MAAM,cACb,MAAM;;;0CA/BuB,MAAM,UAAU,qBAAqB;CA6CrF,CAAC"}
@@ -5,20 +5,29 @@ import { SessionRestoreStateContext } from '../context/SessionRestoreContext';
5
5
  import RouteUtils from '../utils/routeUtils';
6
6
  export const useParseRuleMarkdown = () => {
7
7
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
8
- const getTrackingQueryParams = (source) => {
8
+ const getTrackingULRWithQueryParams = (link, source) => {
9
9
  var _a, _b;
10
- return RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[source]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', source, 'se');
10
+ if (!link.includes('redhat.com/solutions') && !link.includes('redhat.com/articles'))
11
+ return link;
12
+ return `${link}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[source]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', source, 'se')}`;
11
13
  };
12
- function parse(dotString, reportDetails, source, trackingClassName, trackingId) {
14
+ function parseDotMarkdownWithTracking(dotString, reportDetails, source, trackingClassName, trackingId) {
13
15
  const markdown = parseDotTemplate(dotString, reportDetails);
16
+ return parseMarkdownWithTracking(markdown, source, trackingClassName, trackingId);
17
+ }
18
+ function parseMarkdown(markdown) {
19
+ return markdownToHTML(markdown, {
20
+ openLinksInNewTab: true,
21
+ });
22
+ }
23
+ function parseMarkdownWithTracking(markdown, source, trackingClassName, trackingId) {
14
24
  const anchorHrefRegex = /href="(.*?)"/g;
25
+ const targetBlankRegex = new RegExp(`target="blank"`, 'g');
15
26
  return {
16
- __html: markdownToHTML(markdown, {
17
- openLinksInNewTab: true,
18
- })
19
- .replace(anchorHrefRegex, `href="$1?${getTrackingQueryParams(source)}"`)
20
- .replace('target="blank"', `target="blank" class="se-recommended ts-${trackingClassName} data-tracking-id="se-${trackingId}-rule"`),
27
+ __html: parseMarkdown(markdown)
28
+ .replace(anchorHrefRegex, `href="${getTrackingULRWithQueryParams('$1', source)}"`)
29
+ .replace(targetBlankRegex, `target="blank" class="se-recommended ${trackingClassName}" data-tracking-id="${trackingId}"`),
21
30
  };
22
31
  }
23
- return { parse };
32
+ return { parseDotMarkdownWithTracking, parseMarkdown, parseMarkdownWithTracking, getTrackingULRWithQueryParams };
24
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RulesReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RulesReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAMnD,oBAAY,qBAAqB;IAC7B,mCAAmC,wCAAwC;IAC3E,uBAAuB,4BAA4B;IACnD,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;IACvD,8BAA8B,mCAAmC;IACjE,uBAAuB,4BAA4B;IACnD,kCAAkC,uCAAuC;IACzE,YAAY,iBAAiB;IAC7B,wBAAwB,6BAA6B;IACrD,kBAAkB,uBAAuB;CAC5C;AAED,MAAM,WAAW,SAAS;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B,EAAE,OAAO,CAAC;IACpC,+BAA+B,EAAE,OAAO,CAAC;IAEzC,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAC9C,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;CAC1B;AACD,aAAK,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;AACnE,oBAAY,iBAAiB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE7D,MAAM,WAAW,MAAM;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CAC3B;AAWD,eAAO,MAAM,iBAAiB,EAAE,SA0B/B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,SAAS,0BAAwB,SAgFpE,CAAC;AAGF,eAAO,MAAM,sCAAsC,aAAc,iBAAiB,QAAQ,KAAK,SAE9F,CAAC;AACF,eAAO,MAAM,0BAA0B,aAAc,iBAAiB,QAAQ,KAAK,SAElF,CAAC;AACF,eAAO,MAAM,YAAY,aAAc,iBAAiB,SAEvD,CAAC;AACF,eAAO,MAAM,sBAAsB,aACrB,iBAAiB,QACrB,QAAQ,mBAAmB,CAAC,8BACN,KAAK,EAAE,KAAK,IAAI,kBAa/C,CAAC;AAEF,eAAO,MAAM,wBAAwB,aAAc,iBAAiB,yBAAyB,OAAO,SAKnG,CAAC;AACF,eAAO,MAAM,kBAAkB,aAAc,iBAAiB,QAAQ,KAAK,SAE1E,CAAC"}
1
+ {"version":3,"file":"RulesReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RulesReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAMnD,oBAAY,qBAAqB;IAC7B,mCAAmC,wCAAwC;IAC3E,uBAAuB,4BAA4B;IACnD,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;IACvD,8BAA8B,mCAAmC;IACjE,uBAAuB,4BAA4B;IACnD,kCAAkC,uCAAuC;IACzE,YAAY,iBAAiB;IAC7B,wBAAwB,6BAA6B;IACrD,kBAAkB,uBAAuB;CAC5C;AAED,MAAM,WAAW,SAAS;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B,EAAE,OAAO,CAAC;IACpC,+BAA+B,EAAE,OAAO,CAAC;IAEzC,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAC9C,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;CAC1B;AACD,aAAK,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;AACnE,oBAAY,iBAAiB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE7D,MAAM,WAAW,MAAM;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CAC3B;AAWD,eAAO,MAAM,iBAAiB,EAAE,SA0B/B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,SAAS,0BAAwB,SAuEpE,CAAC;AAGF,eAAO,MAAM,sCAAsC,aAAc,iBAAiB,QAAQ,KAAK,SAE9F,CAAC;AACF,eAAO,MAAM,0BAA0B,aAAc,iBAAiB,QAAQ,KAAK,SAElF,CAAC;AACF,eAAO,MAAM,YAAY,aAAc,iBAAiB,SAEvD,CAAC;AACF,eAAO,MAAM,sBAAsB,aACrB,iBAAiB,QACrB,QAAQ,mBAAmB,CAAC,8BACN,KAAK,EAAE,KAAK,IAAI,kBAa/C,CAAC;AAEF,eAAO,MAAM,wBAAwB,aAAc,iBAAiB,yBAAyB,OAAO,SAKnG,CAAC;AACF,eAAO,MAAM,kBAAkB,aAAc,iBAAiB,QAAQ,KAAK,SAE1E,CAAC"}
@@ -76,20 +76,17 @@ export const rulesReducer = (state, action) => {
76
76
  return Object.assign(Object.assign({}, state), { isLoadingEdmundAbbottRules: true, isLoadingEdmundAbbottRulesError: false });
77
77
  }
78
78
  case RulesReducerConstants.receivedEdmundAbbottRules: {
79
- const difference = differenceBy((_a = action.payload) === null || _a === void 0 ? void 0 : _a.rules, (_b = state.EARules) === null || _b === void 0 ? void 0 : _b.rules, 'title');
79
+ const difference = differenceBy((_a = action.payload) === null || _a === void 0 ? void 0 : _a.rules, (_b = state.EARules) === null || _b === void 0 ? void 0 : _b.rules, 'rule_id');
80
80
  const prevRuleTitleInfoMap = ((_c = state.EARules) === null || _c === void 0 ? void 0 : _c.rules.reduce((acc, rule) => {
81
- acc[rule.title] = rule;
81
+ acc[rule.rule_id] = rule;
82
82
  return acc;
83
83
  }, {})) || {};
84
84
  // if user ignored a rule first and new rules contain the same rule, we need to ignore it again
85
85
  const newRules = map(action.payload.rules, (rule) => {
86
- const prevInfo = prevRuleTitleInfoMap[rule.title];
87
- return Object.assign(Object.assign({}, rule), prevInfo);
86
+ const prevInfo = prevRuleTitleInfoMap[rule.rule_id];
87
+ return Object.assign(Object.assign({}, prevInfo), rule);
88
88
  });
89
- if (difference.length > 0) {
90
- return Object.assign(Object.assign({}, state), { EARules: Object.assign(Object.assign({}, state.EARules), { rules: newRules }), isLoadingEdmundAbbottRules: false, isLoadingEdmundAbbottRulesError: false, isEARuleWidgetVisible: true });
91
- }
92
- return Object.assign(Object.assign({}, state), { EARules: Object.assign(Object.assign({}, state.EARules), { rules: newRules }), isLoadingEdmundAbbottRules: false, isLoadingEdmundAbbottRulesError: false });
89
+ return Object.assign(Object.assign({}, state), { EARules: Object.assign(Object.assign({}, state.EARules), { rules: newRules }), isLoadingEdmundAbbottRules: false, isLoadingEdmundAbbottRulesError: false, isEARuleWidgetVisible: difference.length > 0 ? true : state.isEARuleWidgetVisible });
93
90
  }
94
91
  // resetEARules is mainly used for reseting the rules when reseting on a new troubleshoot issue.
95
92
  case RulesReducerConstants.resetEARules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.32",
3
+ "version": "0.2.36",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -27,13 +27,13 @@
27
27
  ],
28
28
  "peerDependencies": {
29
29
  "@cee-eng/hydrajs": "4.7.3",
30
- "@cee-eng/ui-toolkit": "1.1.3",
30
+ "@cee-eng/ui-toolkit": "1.1.4",
31
31
  "@patternfly/patternfly": "4.102.2",
32
32
  "@patternfly/pfe-accordion": "1.1.0",
33
33
  "@patternfly/pfe-collapse": "1.1.0",
34
34
  "@patternfly/pfe-tabs": "1.1.0",
35
35
  "@patternfly/react-core": "4.128.2",
36
- "@rh-support/api": "^0.1.3",
36
+ "@rh-support/api": "0.3.9",
37
37
  "@rh-support/components": "^0.1.3",
38
38
  "@rh-support/react-context": "^0.1.3",
39
39
  "@rh-support/types": "^0.1.3",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@cee-eng/hydrajs": "4.7.3",
67
- "@cee-eng/ui-toolkit": "1.1.3",
67
+ "@cee-eng/ui-toolkit": "1.1.4",
68
68
  "@patternfly/patternfly": "4.102.2",
69
69
  "@patternfly/pfe-accordion": "1.1.0",
70
70
  "@patternfly/pfe-collapse": "1.1.0",
@@ -72,12 +72,12 @@
72
72
  "@patternfly/react-core": "4.128.2",
73
73
  "@progress/kendo-drawing": "^1.6.0",
74
74
  "@progress/kendo-react-pdf": "^3.12.0",
75
- "@rh-support/api": "0.3.8",
76
- "@rh-support/components": "1.1.14",
77
- "@rh-support/react-context": "0.2.16",
75
+ "@rh-support/api": "0.3.9",
76
+ "@rh-support/components": "1.1.18",
77
+ "@rh-support/react-context": "0.2.20",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "0.2.10",
80
- "@rh-support/utils": "0.2.10",
79
+ "@rh-support/user-permissions": "0.2.14",
80
+ "@rh-support/utils": "0.2.13",
81
81
  "@types/react-redux": "^7.1.12",
82
82
  "@types/redux": "^3.6.0",
83
83
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -142,5 +142,5 @@
142
142
  "not ie <= 11",
143
143
  "not op_mini all"
144
144
  ],
145
- "gitHead": "9a2829fecfe0e5755eacfb6f27b67271edb56e33"
145
+ "gitHead": "b9f20c8bd5998759479b46035e8dc8202977f527"
146
146
  }