@rh-support/troubleshoot 0.2.90 → 0.2.93

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 (30) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +1 -1
  3. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +4 -4
  4. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +8 -6
  6. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.js +7 -1
  8. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +4 -1
  10. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +6 -1
  12. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +4 -1
  14. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +9 -6
  16. package/lib/esm/components/CaseManagement/Cep.js +4 -3
  17. package/lib/esm/components/ImproveCase/Hostname.js +2 -1
  18. package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
  19. package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
  20. package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
  21. package/lib/esm/components/Recommendations/EARules/EARule.js +3 -5
  22. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  23. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +2 -4
  24. package/lib/esm/components/shared/Constants.d.ts +4 -8
  25. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  26. package/lib/esm/components/shared/Constants.js +4 -9
  27. package/lib/esm/hooks/useParseRuleMarkdown.d.ts.map +1 -1
  28. package/lib/esm/hooks/useParseRuleMarkdown.js +1 -2
  29. package/lib/esm/scss/_main.scss +0 -17
  30. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAwBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eAoNnD"}
1
+ {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAwBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eAqNnD"}
@@ -36,7 +36,7 @@ export function RequestEscalationModal(props) {
36
36
  });
37
37
  const [hasLargeSubject, setHasLargeSubject] = useState(false);
38
38
  // checks if all the fields have values.
39
- const hasRequiredInfo = () => Object.keys(formState).reduce((accumulator, currentValue) => (!accumulator ? accumulator : formState[currentValue].length > 0), true);
39
+ const hasRequiredInfo = () => Object.keys(formState).reduce((accumulator, currentValue) => { var _a; return !accumulator ? accumulator : formState[currentValue].length > 0 && ((_a = formState[currentValue]) === null || _a === void 0 ? void 0 : _a.trim()); }, true);
40
40
  const setFormStateThunk = (key) => (event) => setFormState(Object.assign(Object.assign({}, formState), { [key]: event.target.value }));
41
41
  const createEscalationFetch = useFetch(escalations.createIceEscalation, { propgateErrors: true });
42
42
  const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
@@ -43,7 +43,7 @@ export function ReopenCaseModal(props) {
43
43
  return isValid;
44
44
  };
45
45
  const getCommentBody = () => {
46
- return `**Reason for re-opening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
46
+ return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
47
47
  ? `${props.isInternal ? '' : '. '}${reopenDescription}`
48
48
  : ''}`;
49
49
  };
@@ -63,7 +63,7 @@ export function ReopenCaseModal(props) {
63
63
  setSelectedStatus(status);
64
64
  onDropdownToggle(false);
65
65
  };
66
- const isDescriptionEmpty = isEmpty(reopenDescription === null || reopenDescription === void 0 ? void 0 : reopenDescription.trim());
66
+ const isDescriptionEmpty = showTextArea ? isEmpty(reopenDescription === null || reopenDescription === void 0 ? void 0 : reopenDescription.trim()) : false;
67
67
  return (React.createElement(Modal, { id: "case-reopen-modal", title: t(`Reopening case ${props.caseNumber}`), "aria-describedby": "case-reopen-modal", isOpen: true, onClose: props.onClose, showClose: true, actions: [
68
68
  React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: props.isUpdating, isDisabled: isDescriptionEmpty || showValidationError || props.isUpdating, "data-tracking-id": "reopen-case-description-modal-submit" },
69
69
  React.createElement(Trans, null, "Reopen case")),
@@ -78,8 +78,8 @@ export function ReopenCaseModal(props) {
78
78
  .map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
79
79
  React.createElement(Trans, null, option)))))) : (React.createElement(Select, { "aria-label": t('Select an option that best fits'), id: "case-resolution", selections: selectedReason, onSelect: onReasonChange, isOpen: showDropdown, isDisabled: props.isUpdating, menuAppendTo: document.body, validated: showValidationError && !selectedReason ? 'error' : 'default', placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle }, reasonsList.map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
80
80
  React.createElement(Trans, null, option)))))))),
81
- showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", helperText: t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after re-opening.`), isRequired: true, fieldId: "reopen-case-description" },
81
+ showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", helperText: t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`), isRequired: true, fieldId: "reopen-case-description" },
82
82
  React.createElement(TextArea, { placeholder: t(props.isInternal
83
- ? 'Describe the reason for re-opening with the selected status'
83
+ ? 'Describe the reason for reopening with the selected status'
84
84
  : 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription ? 'error' : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: onDescriptionChange, isDisabled: props.isUpdating }))))));
85
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eA8GpC;kBA9GQ,cAAc;;;AAiHvB,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAgHpC;kBAhHQ,cAAc;;;AAmHvB,eAAe,cAAc,CAAC"}
@@ -7,9 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { AlertMessage, AlertType, LoadingIndicator, TextAreaAutosize, ToastNotification } from '@rh-support/components';
10
+ import { AlertMessage, AlertType, LoadingIndicator, TextAreaResizable, ToastNotification, } from '@rh-support/components';
11
11
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
12
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
13
+ import isEmpty from 'lodash/isEmpty';
13
14
  import React, { useContext, useEffect, useState } from 'react';
14
15
  import { Trans, useTranslation } from 'react-i18next';
15
16
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
@@ -53,16 +54,17 @@ function CaseActionPlan(props) {
53
54
  setActionPlan(actionPlan);
54
55
  setFormIsDirty(false);
55
56
  };
56
- const onChange = (event) => {
57
- if (event.target.value !== actionPlan) {
57
+ const onChange = (actionPlanState) => {
58
+ if (actionPlanState !== actionPlan) {
58
59
  setFormIsDirty(true);
59
60
  }
60
61
  else {
61
62
  setFormIsDirty(false);
62
63
  }
63
- setActionPlan(event.target.value);
64
+ setActionPlan(actionPlanState);
64
65
  };
65
66
  const isInternalWithoutSFDCUser = loggedInUserRights.data.isInternalWithoutSFDCUser();
67
+ const isActionPlanEmpty = isEmpty(actionPlanState === null || actionPlanState === void 0 ? void 0 : actionPlanState.trim());
66
68
  return (React.createElement(React.Fragment, null,
67
69
  React.createElement(AlertMessage, { show: isInternalWithoutSFDCUser, variant: AlertType.WARNING, isInline: true, className: "pf-u-mb-lg", title: t('You need a Salesforce (SFDC) user to edit the action plan.') }),
68
70
  React.createElement("label", { htmlFor: "rha-action-plan", className: "sr-only" },
@@ -70,9 +72,9 @@ function CaseActionPlan(props) {
70
72
  !canUpdateActionPlan && React.createElement("p", null, actionPlan ? `${actionPlan}` : t('No action plan to display.')),
71
73
  canUpdateActionPlan && (React.createElement("form", null,
72
74
  React.createElement("div", { className: "hide-in-pdf" },
73
- React.createElement(TextAreaAutosize, { className: "form-control", id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 })),
75
+ React.createElement(TextAreaResizable, { className: "form-control", id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 })),
74
76
  !isInternalWithoutSFDCUser && (React.createElement("div", { className: "hide-in-pdf push-top-narrow" },
75
- React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isUpdating || !formIsDirty },
77
+ React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isActionPlanEmpty || isUpdating || !formIsDirty },
76
78
  React.createElement(Trans, null, "Submit"),
77
79
  " ",
78
80
  React.createElement(LoadingIndicator, { show: isUpdating, isInline: true })),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAeA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAuHrC;kBAvHQ,eAAe;;;AA0HxB,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA6HrC;kBA7HQ,eAAe;;;AAgIxB,eAAe,eAAe,CAAC"}
@@ -11,6 +11,7 @@ import { Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
12
12
  import { InlineEdit, LoadingIndicator, ToastNotification, ValueChangedIcon } from '@rh-support/components';
13
13
  import { useCanEditCase } from '@rh-support/react-context';
14
+ import isEmpty from 'lodash/isEmpty';
14
15
  import isEqual from 'lodash/isEqual';
15
16
  import React, { useEffect, useState } from 'react';
16
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -74,13 +75,18 @@ function CaseAlternateId(props) {
74
75
  const maxLengthErrorMessage = t('Alternate case ID cannot be more than {{limit}} characters.', {
75
76
  limit: ALTERNATE_CASE_ID_LIMIT,
76
77
  });
78
+ // To check if alternate ID is empty
79
+ const isAlternateIDEmpty = isEmpty(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.trim());
77
80
  return (React.createElement(React.Fragment, null,
78
81
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-alternate-id' }, labelContent: React.createElement(React.Fragment, null,
79
82
  React.createElement(Trans, null, "Alternate case ID"),
80
83
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localAltIDChange, value: alternateId, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
81
84
  ' ',
82
85
  React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
83
- React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: props.inlineEditable, content: alternateId, initialIsEditing: true, hideSaveCancel: props.hideSaveCancel, onSave: onSave, onCancel: onCancel, saveDisabled: alternateIdState === alternateId || isUpdating || (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
86
+ React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: props.inlineEditable, content: alternateId, initialIsEditing: true, hideSaveCancel: props.hideSaveCancel, onSave: onSave, onCancel: onCancel, saveDisabled: isAlternateIDEmpty ||
87
+ alternateIdState === alternateId ||
88
+ isUpdating ||
89
+ (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
84
90
  React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onChange, disabled: isUpdating, "data-tracking-id": "case-details-alternate-id" })),
85
91
  (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT && (React.createElement("div", { className: "pull-top" },
86
92
  React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAW5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAMD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eAsHlC;kBAtHQ,YAAY;;;AAyHrB,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAY5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAMD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA2HlC;kBA3HQ,YAAY;;;AA8HrB,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -11,6 +11,7 @@ import { Popover, PopoverPosition } from '@patternfly/react-core';
11
11
  import { InlineEdit, LoadingIndicator, ToastNotification, ValueChangedIcon } from '@rh-support/components';
12
12
  import { useCanEditCase } from '@rh-support/react-context';
13
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
+ import isEmpty from 'lodash/isEmpty';
14
15
  import isEqual from 'lodash/isEqual';
15
16
  import React, { useEffect, useState } from 'react';
16
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -74,11 +75,13 @@ function CaseHostname(props) {
74
75
  return React.createElement(React.Fragment, null);
75
76
  }
76
77
  const lengthError = (hostnameState === null || hostnameState === void 0 ? void 0 : hostnameState.length) > HOSTNAME_LENGTH_LIMIT;
78
+ // To check if host name is empty
79
+ const isHostNameEmpty = isEmpty(hostnameState === null || hostnameState === void 0 ? void 0 : hostnameState.trim());
77
80
  return (React.createElement(React.Fragment, null,
78
81
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
79
82
  React.createElement(Trans, null, "Hostname"),
80
83
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: React.createElement(Trans, null, "Hostname is not visible to Red Hat Support professionals."), closeBtnAriaLabel: "Close" },
81
- React.createElement("i", { "aria-label": "Hostname Info", className: "m-l-1 fa fa-question-circle" })), allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : null },
84
+ React.createElement("i", { "aria-label": "Hostname Info", className: "m-l-1 fa fa-question-circle" })), allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: isHostNameEmpty || hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : null },
82
85
  React.createElement("input", { type: "text", id: "case-details-hostname", className: `form-control${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: onHostnameChange, disabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
83
86
  lengthError && (React.createElement("div", { className: "pull-top" },
84
87
  React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAaxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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,cAAc,4EAgOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAcxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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,cAAc,4EAuOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -13,6 +13,7 @@ import { InlineEdit, LoadingIndicator, ToastNotification, useConfirmation, useCo
13
13
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
14
14
  import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
15
15
  import { formatDateTime, humanizeSize } from '@rh-support/utils';
16
+ import isEmpty from 'lodash/isEmpty';
16
17
  import React, { useContext, useRef, useState } from 'react';
17
18
  import { Trans, useTranslation } from 'react-i18next';
18
19
  import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
@@ -109,6 +110,8 @@ const CaseAttachment = React.forwardRef((props, ref) => {
109
110
  const onJumpToComment = (attachmentId) => () => props.showJumpToComment && props.onJumpToComment && props.onJumpToComment(attachmentId);
110
111
  if (((_a = props.attachment) === null || _a === void 0 ? void 0 : _a.isPrivate) && !canSeePrivateAttachments)
111
112
  return React.createElement(React.Fragment, null);
113
+ // To check if attachment description is empty
114
+ const isCaseAttachmentDescription = isEmpty(attachmentDescription === null || attachmentDescription === void 0 ? void 0 : attachmentDescription.trim());
112
115
  return (React.createElement("section", { ref: ref, id: props.attachment.id, className: `prevent-split support-comment comment-attachment ${!isCardIsDeleted ? 'showcard' : ''} ${ref ? 'selected-case-comment' : ''} ${props.attachment.isPrivate ? 'private' : ''}` },
113
116
  React.createElement("header", null,
114
117
  React.createElement("h4", null,
@@ -129,7 +132,9 @@ const CaseAttachment = React.forwardRef((props, ref) => {
129
132
  React.createElement("code", { ref: clipboardRef }, props.attachment.checksum)),
130
133
  React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
131
134
  React.createElement("button", { className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", "aria-hidden": "true", onClick: copyToClipboard }))))),
132
- React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: true, labelContent: React.createElement(Trans, null, "Description"), content: React.createElement("div", { className: "clip-content-wrapper code-block" }, props.attachment.description), hideSaveCancel: false, onSave: onDescriptionSave, onCancel: onDescriptionCancel, dataTrackingId: "case-details-file-description", initialIsEditing: props.attachment.description ? false : true, saveDisabled: attachmentDescription === props.attachment.description || isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
135
+ React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: true, labelContent: React.createElement(Trans, null, "Description"), content: React.createElement("div", { className: "clip-content-wrapper code-block" }, props.attachment.description), hideSaveCancel: false, onSave: onDescriptionSave, onCancel: onDescriptionCancel, dataTrackingId: "case-details-file-description", initialIsEditing: props.attachment.description ? false : true, saveDisabled: isCaseAttachmentDescription ||
136
+ attachmentDescription === props.attachment.description ||
137
+ isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
133
138
  React.createElement("input", { id: `case-details-file-description-${props.attachment.id}`, value: attachmentDescription, type: "text", className: "form-control", placeholder: t(`Enter a description`), onChange: onDescriptionChange, disabled: isUpdating, maxLength: 255, "data-tracking-id": `case-details-file-description-input` })))),
134
139
  React.createElement("footer", null,
135
140
  React.createElement("span", { className: "comment-note" }, props.attachment.isPrivate && React.createElement(Trans, null, "Private attachment")),
@@ -1 +1 @@
1
- {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eAkcxC"}
1
+ {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eAqcxC"}
@@ -14,6 +14,7 @@ import { EditorMode, LoadingIndicator, MarkdownEditor, ToastNotification, useFet
14
14
  import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeaturePopoverAnnouncement, useCanEditCase, } from '@rh-support/react-context';
15
15
  import { ability, CaseDiscussionFields, CaseListFields, resourceActions, resources, } from '@rh-support/user-permissions';
16
16
  import { getConfigField, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent } from '@rh-support/utils';
17
+ import isEmpty from 'lodash/isEmpty';
17
18
  import isEqual from 'lodash/isEqual';
18
19
  import uniqBy from 'lodash/uniqBy';
19
20
  import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
@@ -265,6 +266,8 @@ export function PostComment(props) {
265
266
  const onBtnClick = () => {
266
267
  setIsModalOpen(true);
267
268
  };
269
+ // TO check is commment is empty
270
+ const isCommentEmpty = isEmpty(commentText === null || commentText === void 0 ? void 0 : commentText.trim());
268
271
  return (React.createElement("div", { className: "pf-u-mb-md hide-in-pdf", ref: componentRef },
269
272
  React.createElement(MarkdownEditor, { className: `${!isPublic ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic ? 'Add a comment using markdown' : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic ? 'Add a comment to this case' : 'Add a comment or attach a file privately', fileSelectorProps: {
270
273
  showFileSelectorInToolbar: allowInlineImagesInMarkdown && !loggedInUsersAccount.data.secureSupport,
@@ -278,7 +281,7 @@ export function PostComment(props) {
278
281
  } }),
279
282
  isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-l-flex post-comment-btn-group push-top-narrow" },
280
283
  isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
281
- React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isPostCommentDisabled, className: "postcomment-submit" },
284
+ React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isCommentEmpty || isPostCommentDisabled, className: "postcomment-submit" },
282
285
  React.createElement(Trans, null, "Submit")),
283
286
  canAddAttachments &&
284
287
  (isPublic && canPostPrivateComments ? (React.createElement(Tooltip, { content: t('You can attach files privately') }, fileUploadButton)) : (fileUploadButton)),
@@ -1 +1 @@
1
- {"version":3,"file":"CasePrivateNotes.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,aAAK,YAAY,GAAG,OAAO,YAAY,CAAC;AAExC,UAAU,MAAO,SAAQ,YAAY;CAAG;AAExC,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAiGtC;kBAjGQ,gBAAgB;;;;;AAoGzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CasePrivateNotes.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.tsx"],"names":[],"mappings":"AAYA,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,aAAK,YAAY,GAAG,OAAO,YAAY,CAAC;AAExC,UAAU,MAAO,SAAQ,YAAY;CAAG;AAExC,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAoGtC;kBApGQ,gBAAgB;;;;;AAuGzB,eAAe,gBAAgB,CAAC"}
@@ -7,9 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { LoadingIndicator, TextAreaAutosize, ToastNotification } from '@rh-support/components';
10
+ import { LoadingIndicator, TextAreaResizable, ToastNotification } from '@rh-support/components';
11
11
  import { useCanEditCase } from '@rh-support/react-context';
12
12
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
13
+ import isEmpty from 'lodash/isEmpty';
13
14
  import isEqual from 'lodash/isEqual';
14
15
  import React, { useContext, useEffect, useState } from 'react';
15
16
  import { Trans, useTranslation } from 'react-i18next';
@@ -54,25 +55,27 @@ function CasePrivateNotes(props) {
54
55
  setNotes(notes);
55
56
  setFormIsDirty(false);
56
57
  };
57
- const onChange = (event) => {
58
+ const onChange = (notesState) => {
58
59
  if (canEditCase.alert())
59
60
  return;
60
- if (event.target.value !== notes) {
61
+ if (notesState !== notes) {
61
62
  setFormIsDirty(true);
62
63
  }
63
64
  else {
64
65
  setFormIsDirty(false);
65
66
  }
66
- setNotes(event.target.value);
67
+ setNotes(notesState);
67
68
  };
69
+ // To check if private notes is empty
70
+ const isPrivateNotesEmpty = isEmpty(notesState === null || notesState === void 0 ? void 0 : notesState.trim());
68
71
  return (React.createElement(React.Fragment, null,
69
72
  React.createElement("div", null,
70
73
  React.createElement("label", { htmlFor: "rha-case-notes", className: "sr-only" },
71
74
  React.createElement(Trans, null, "Notes"))),
72
75
  canUpdatePrivateNotes && (React.createElement("form", null,
73
- React.createElement(TextAreaAutosize, { className: "form-control", style: { minHeight: '200px' }, id: "rha-case-notes", disabled: isUpdating, maxLength: 255, name: "notes", value: notesState, onChange: onChange }),
76
+ React.createElement(TextAreaResizable, { className: "form-control", style: { minHeight: '200px' }, id: "rha-case-notes", disabled: isUpdating, maxLength: 255, name: "notes", value: notesState, onChange: onChange }),
74
77
  React.createElement("div", { className: "pf-u-mt-md" },
75
- React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isUpdating || !formIsDirty },
78
+ React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isPrivateNotesEmpty || isUpdating || !formIsDirty },
76
79
  React.createElement(Trans, null, "Update"),
77
80
  " ",
78
81
  React.createElement(LoadingIndicator, { show: isUpdating, isInline: true })),
@@ -21,6 +21,7 @@ import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext,
21
21
  import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
22
22
  import { checkForCaseStatusToggleOnAttachOrComment, postCepDetails, setCaseDetails, setCaseState, updateCaseDetails, } from '../../reducers/CaseReducer';
23
23
  export function Cep(props) {
24
+ var _a, _b, _c;
24
25
  const { t } = useTranslation();
25
26
  const { cep, caseNumber, status, cepDetails, isPostingCep, isCaseUpdating } = useCaseSelector((state) => ({
26
27
  cep: state.caseDetails.cep,
@@ -106,9 +107,9 @@ export function Cep(props) {
106
107
  const onCepNotesChange = (value) => {
107
108
  setCepDetailsLocal(Object.assign(Object.assign({}, cepDetailsLocal), { notes: value }));
108
109
  };
109
- const isSubmitButtonDisabled = isEmpty(cepDetailsLocal.contactName) ||
110
- isEmpty(cepDetailsLocal.workingHours) ||
111
- isEmpty(cepDetailsLocal.contactInformation);
110
+ const isSubmitButtonDisabled = isEmpty((_a = cepDetailsLocal.contactName) === null || _a === void 0 ? void 0 : _a.trim()) ||
111
+ isEmpty((_b = cepDetailsLocal.workingHours) === null || _b === void 0 ? void 0 : _b.trim()) ||
112
+ isEmpty((_c = cepDetailsLocal.contactInformation) === null || _c === void 0 ? void 0 : _c.trim());
112
113
  if (!canUseCep) {
113
114
  return React.createElement(React.Fragment, null);
114
115
  }
@@ -13,7 +13,8 @@ export function Hostname(props) {
13
13
  setCaseDetails(caseDispatch, caseDetails);
14
14
  };
15
15
  const onHostnameChange = (e) => {
16
- onCaseDetailsChange({ hostname: e.target.value });
16
+ var _a;
17
+ onCaseDetailsChange({ hostname: (_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim() });
17
18
  };
18
19
  if (!canUseHostName) {
19
20
  return React.createElement(React.Fragment, null);
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAe5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAiGvD"}
1
+ {"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAe5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eA8FvD"}
@@ -33,7 +33,7 @@ export function ClusterRecommendationItems(props) {
33
33
  React.createElement("h3", null, rule.description)),
34
34
  React.createElement("pfe-accordion-panel", null,
35
35
  React.createElement("p", null,
36
- React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, className: riskLabels[rule.total_risk].className },
36
+ React.createElement(Label, { color: riskLabels[rule.total_risk].color },
37
37
  React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
38
38
  React.createElement("p", null, rule.details || ''),
39
39
  rule.reason && (React.createElement(React.Fragment, null,
@@ -1 +1 @@
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,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,eAmCxC;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,eA4BnH;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":"AAGA,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,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,eAmCxC;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,eA2BnH;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 CaretRightIcon from '@patternfly/react-icons/dist/js/icons/caret-right-icon';
4
3
  import isEqual from 'lodash/isEqual';
5
4
  import React, { useContext } from 'react';
6
5
  import { Trans } from 'react-i18next';
@@ -57,9 +56,8 @@ function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
57
56
  const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
58
57
  if (!rule.cta)
59
58
  return null;
60
- return linkTitle === 'View details' ? (React.createElement("a", { className: `se-recommended ts-known-vuln anchor-tag-link-td-none ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
61
- React.createElement(Trans, null, linkTitle))) : (React.createElement("a", { className: `se-recommended pf-c-button pf-m-link anchor-tag-link-pl 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) },
62
- React.createElement(Trans, null, linkTitle),
63
- React.createElement(CaretRightIcon, null)));
59
+ return linkTitle === 'View details' ? (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) },
60
+ React.createElement(Trans, null, linkTitle))) : (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) },
61
+ React.createElement(Trans, null, linkTitle)));
64
62
  }
65
63
  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,eA2J1E"}
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,eA0J1E"}
@@ -1,7 +1,6 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Label, LabelGroup } from '@patternfly/react-core';
3
3
  import BullseyeIcon from '@patternfly/react-icons/dist/js/icons/bullseye-icon';
4
- import CaretRightIcon from '@patternfly/react-icons/dist/js/icons/caret-right-icon';
5
4
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
6
5
  import { getRuleReasonHtml } from '@rh-support/utils';
7
6
  import React, { useContext, useEffect, useRef, useState } from 'react';
@@ -75,7 +74,6 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
75
74
  React.createElement(Trans, null, "Additional info")),
76
75
  React.createElement(AccordionContent, { isHidden: !isAdditionalExpanded },
77
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) }))))),
78
- React.createElement("a", { className: "se-recommended pf-c-button pf-m-link anchor-tag-link-pl ts-result-insights cta-link", rel: "noopener noreferrer", target: "_blank", onClick: onCtaClick(doc.view_uri), "data-tracking-id": "se-recommended-insights-rule", "aria-label": "Related article", role: "button", href: getTrackingULRWithQueryParams(doc.view_uri, SessionResourceSource.INSIGHTS) },
79
- React.createElement(Trans, null, "Related article"),
80
- React.createElement(CaretRightIcon, null)))))));
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", "aria-label": "Related article", role: "button", href: getTrackingULRWithQueryParams(doc.view_uri, SessionResourceSource.INSIGHTS) },
78
+ React.createElement(Trans, null, "Related article")))))));
81
79
  }
@@ -52,24 +52,20 @@ export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolba
52
52
  export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
53
53
  export declare const riskLabels: {
54
54
  1: {
55
- icon: JSX.Element;
56
55
  label: string;
57
- className: string;
56
+ color: string;
58
57
  };
59
58
  2: {
60
- icon: JSX.Element;
61
59
  label: string;
62
- className: string;
60
+ color: string;
63
61
  };
64
62
  3: {
65
- icon: JSX.Element;
66
63
  label: string;
67
- className: string;
64
+ color: string;
68
65
  };
69
66
  4: {
70
- icon: JSX.Element;
71
67
  label: string;
72
- className: string;
68
+ color: string;
73
69
  };
74
70
  };
75
71
  //# sourceMappingURL=Constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
1
+ {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
@@ -1,8 +1,3 @@
1
- import AngleDoubleDownIcon from '@patternfly/react-icons/dist/js/icons/angle-double-down-icon';
2
- import AngleDoubleUpIcon from '@patternfly/react-icons/dist/js/icons/angle-double-up-icon';
3
- import CriticalRiskIcon from '@patternfly/react-icons/dist/js/icons/critical-risk-icon';
4
- import EqualsIcon from '@patternfly/react-icons/dist/js/icons/equals-icon';
5
- import React from 'react';
6
1
  export default {
7
2
  languagesMap: {
8
3
  en: 'English',
@@ -56,8 +51,8 @@ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-mo
56
51
  export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
57
52
  export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
58
53
  export const riskLabels = {
59
- 1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', className: 'risk-label-low' },
60
- 2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', className: 'risk-label-moderate' },
61
- 3: { icon: React.createElement(AngleDoubleUpIcon, null), label: 'Important', className: 'risk-label-important' },
62
- 4: { icon: React.createElement(CriticalRiskIcon, null), label: 'Critical', className: 'risk-label-critical' },
54
+ 1: { label: 'Low', color: 'blue' },
55
+ 2: { label: 'Moderate', color: 'orange' },
56
+ 3: { label: 'Important', color: 'red' },
57
+ 4: { label: 'Critical', color: 'red' },
63
58
  };
@@ -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;8CAgBd,MAAM,8BAET,qBAAqB,qBACV,MAAM,cACb,MAAM;;;8BAMW,MAAM;0CAQzB,MAAM,UACR,qBAAqB,qBACV,MAAM,cACb,MAAM;;;0CAhCuB,MAAM,UAAU,qBAAqB;CA8CrF,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"}
@@ -20,14 +20,13 @@ export const useParseRuleMarkdown = () => {
20
20
  openLinksInNewTab: true,
21
21
  });
22
22
  }
23
- // TODO: Remove pf-c-button, pf-m-link, anchor-tag-button once Accordion bug is fixed
24
23
  function parseMarkdownWithTracking(markdown, source, trackingClassName, trackingId) {
25
24
  const anchorHrefRegex = /href="(.*?)"/g;
26
25
  const targetBlankRegex = new RegExp(`target="blank"`, 'g');
27
26
  return {
28
27
  __html: parseMarkdown(markdown)
29
28
  .replace(anchorHrefRegex, `href="${getTrackingULRWithQueryParams('$1', source)}"`)
30
- .replace(targetBlankRegex, `target="blank" class="se-recommended pf-c-button pf-m-link anchor-tag-button ${trackingClassName}" data-tracking-id="${trackingId}"`),
29
+ .replace(targetBlankRegex, `target="blank" class="se-recommended ${trackingClassName}" data-tracking-id="${trackingId}"`),
31
30
  };
32
31
  }
33
32
  return { parseDotMarkdownWithTracking, parseMarkdown, parseMarkdownWithTracking, getTrackingULRWithQueryParams };
@@ -922,10 +922,6 @@ div.pf-c-alert.ea-rule-alert > div.pf-c-alert__description > p {
922
922
  overflow: visible;
923
923
  }
924
924
 
925
- .anchor-tag-button {
926
- padding: 0px;
927
- }
928
-
929
925
  .anchor-tag-link-pl {
930
926
  padding-left: 0px;
931
927
  font-size: 14px;
@@ -935,16 +931,3 @@ div.pf-c-alert.ea-rule-alert > div.pf-c-alert__description > p {
935
931
  .anchor-tag-link-td-none {
936
932
  text-decoration: none;
937
933
  }
938
-
939
- .risk-label-low {
940
- background-color: var(--pf-global--palette--blue-300);
941
- }
942
- .risk-label-moderate {
943
- background-color: var(--pf-global--palette--gold-400);
944
- }
945
- .risk-label-important {
946
- background-color: var(--pf-global--palette--orange-300);
947
- }
948
- .risk-label-critical {
949
- background-color: var(--pf-global--palette--red-200);
950
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.90",
3
+ "version": "0.2.93",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -74,11 +74,11 @@
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
76
  "@rh-support/api": "0.3.13",
77
- "@rh-support/components": "1.1.56",
78
- "@rh-support/react-context": "0.2.56",
77
+ "@rh-support/components": "1.1.57",
78
+ "@rh-support/react-context": "0.2.57",
79
79
  "@rh-support/types": "0.2.0",
80
- "@rh-support/user-permissions": "0.2.44",
81
- "@rh-support/utils": "0.2.33",
80
+ "@rh-support/user-permissions": "0.2.45",
81
+ "@rh-support/utils": "0.2.34",
82
82
  "@types/react-redux": "^7.1.12",
83
83
  "@types/redux": "^3.6.0",
84
84
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -143,5 +143,5 @@
143
143
  "not ie <= 11",
144
144
  "not op_mini all"
145
145
  ],
146
- "gitHead": "8a76fae83bb7941c95d0d7cc8c88ec846fbd3b20"
146
+ "gitHead": "f4a50a54bdcf304d3dd177a5d75b4011847059a9"
147
147
  }