@rh-support/troubleshoot 0.2.88 → 0.2.91

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.
@@ -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":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAgMtD"}
1
+ {"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAoMtD"}
@@ -71,6 +71,10 @@ export default function RMEEscalationList(props) {
71
71
  }
72
72
  catch (e) {
73
73
  ToastNotification.addDangerMessage(e);
74
+ window === null || window === void 0 ? void 0 : window.Raven.captureException(e);
75
+ window === null || window === void 0 ? void 0 : window.Raven.captureMessage('RME form submit error', {
76
+ level: 'error',
77
+ });
74
78
  }
75
79
  finally {
76
80
  escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !== escalationNum);
@@ -52,22 +52,22 @@ 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: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
55
+ icon: JSX.Element;
56
56
  label: string;
57
57
  className: string;
58
58
  };
59
59
  2: {
60
- icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
60
+ icon: JSX.Element;
61
61
  label: string;
62
62
  className: string;
63
63
  };
64
64
  3: {
65
- icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
65
+ icon: JSX.Element;
66
66
  label: string;
67
67
  className: string;
68
68
  };
69
69
  4: {
70
- icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
70
+ icon: JSX.Element;
71
71
  label: string;
72
72
  className: string;
73
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,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.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"}
@@ -2,6 +2,7 @@ import AngleDoubleDownIcon from '@patternfly/react-icons/dist/js/icons/angle-dou
2
2
  import AngleDoubleUpIcon from '@patternfly/react-icons/dist/js/icons/angle-double-up-icon';
3
3
  import CriticalRiskIcon from '@patternfly/react-icons/dist/js/icons/critical-risk-icon';
4
4
  import EqualsIcon from '@patternfly/react-icons/dist/js/icons/equals-icon';
5
+ import React from 'react';
5
6
  export default {
6
7
  languagesMap: {
7
8
  en: 'English',
@@ -55,8 +56,8 @@ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-mo
55
56
  export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
56
57
  export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
57
58
  export const riskLabels = {
58
- 1: { icon: AngleDoubleDownIcon, label: 'Low', className: 'risk-label-low' },
59
- 2: { icon: EqualsIcon, label: 'Moderate', className: 'risk-label-moderate' },
60
- 3: { icon: AngleDoubleUpIcon, label: 'Important', className: 'risk-label-important' },
61
- 4: { icon: CriticalRiskIcon, label: 'Critical', className: 'risk-label-critical' },
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' },
62
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.88",
3
+ "version": "0.2.91",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -143,5 +143,5 @@
143
143
  "not ie <= 11",
144
144
  "not op_mini all"
145
145
  ],
146
- "gitHead": "981468e419f36c15d6039eaa49b52e6a180752a3"
146
+ "gitHead": "b972067ecc4afdd0a92d6d588831922733ee6ca9"
147
147
  }