@rh-support/troubleshoot 2.2.11 → 2.2.13

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 +1 @@
1
- {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,sBAAsB,gBA8OrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,sBAAsB,gBA+OrC"}
@@ -138,7 +138,8 @@ export function CaseContactPhoneNumber() {
138
138
  setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
139
139
  setIsShowOldPhone(false);
140
140
  }
141
- }, [phoneCountryCode, phoneAreaCodePrefixLineNumber, phone]);
141
+ // eslint-disable-next-line react-hooks/exhaustive-deps
142
+ }, []);
142
143
  return (React.createElement("div", { className: "form-group pf-u-pb-md", style: { minWidth: '200px' } },
143
144
  React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
144
145
  React.createElement(Trans, null, "Case owner's phone number"),
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB,gBAkJjC"}
1
+ {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB,gBA2JjC"}
@@ -80,6 +80,15 @@ export function ContactPhoneNumber() {
80
80
  setLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
81
81
  // eslint-disable-next-line react-hooks/exhaustive-deps
82
82
  }, [phoneAreaCodePrefixLineNumber, phoneCountryCode, loggedInUser.data]);
83
+ useEffect(() => {
84
+ if (isEqual(localFullPhone.trim(), '+')) {
85
+ setLocalFullPhone('');
86
+ }
87
+ else if (!isEmpty(localFullPhone) && !localFullPhone.startsWith('+')) {
88
+ setLocalFullPhone('+' + localFullPhone.replace(' ', ''));
89
+ }
90
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91
+ }, [localFullPhone]);
83
92
  return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
84
93
  React.createElement("label", null,
85
94
  React.createElement(Trans, null, "Case owner's phone number"),
@@ -1 +1 @@
1
- {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eAgS/C"}
1
+ {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eA2S/C"}
@@ -2,12 +2,14 @@ import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Button, ButtonVariant, Label, Progress, ProgressMeasureLocation } from '@patternfly/react-core';
3
3
  import HistoryIcon from '@patternfly/react-icons/dist/js/icons/history-icon';
4
4
  import { CircularProgressbar } from '@rh-support/components';
5
- import { humanizeSize } from '@rh-support/utils';
5
+ import { humanizeSize, PreviousCaseTypes } from '@rh-support/utils';
6
6
  import capitalize from 'lodash/capitalize';
7
7
  import isEmpty from 'lodash/isEmpty';
8
+ import isEqual from 'lodash/isEqual';
8
9
  import map from 'lodash/map';
9
- import React from 'react';
10
+ import React, { useEffect, useState } from 'react';
10
11
  import { Trans, useTranslation } from 'react-i18next';
12
+ import { useCaseSelector } from '../../../context/CaseContext';
11
13
  import { ATTACHMENT_DESCRIPTION_LENGTH_LIMIT } from '../../../reducers/CaseConstNTypes';
12
14
  import { isAnalysingFile, isAnalysisFailed, isFileDeleted, isUploadAborted, isUploadedAndAnalysisFailed, isUploadedAndAnalysisSkipped, isUploadedAndAnalyzed, isUploadFailed, isUploading, isUploadingAttachment, isUploadingOnCase, isUploadingOnSession, isUploadOnTrack, isVerifyingUpload, shouldHideDescription, } from './reducer/AttachmentHelper';
13
15
  import { FileStatusHelper } from './reducer/FileStatusHelper';
@@ -35,6 +37,13 @@ export default function FileLister(props) {
35
37
  props.onFileEdit &&
36
38
  props.onFileEdit(editedLocalFile, indexToEdit, { description: editedLocalFile.description.trim() });
37
39
  };
40
+ const { caseType } = useCaseSelector((state) => ({
41
+ caseType: state.caseDetails.caseType,
42
+ }), isEqual);
43
+ const [isIdea, setIsIdea] = useState(false);
44
+ useEffect(() => {
45
+ setIsIdea(caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT);
46
+ }, [caseType]);
38
47
  // To retry file upload
39
48
  const onRetry = (index) => () => {
40
49
  props.onRetry && props.onRetry(index);
@@ -125,7 +134,7 @@ export default function FileLister(props) {
125
134
  React.createElement("input", { id: `file-${index + 1}-description`, "data-tracking-id": `case-${props.isSessionId ? 'create' : 'details'}-file-${index + 1}-description`, className: "file-description form-control pf-u-my-sm", type: "text", value: localFile.description, onChange: onDescriptionChange(localFile, index), maxLength: 255, placeholder: t(`${shouldHideDescription(localFile, props.isSessionId)
126
135
  ? ''
127
136
  : t('Enter a description')}`), hidden: shouldHideDescription(localFile, props.isSessionId) }),
128
- isUploadedAndAnalysisSkipped(localFile) && (React.createElement("span", { className: "text-muted" }, localFile.analysisMetadata.analysisErrorMesssage)),
137
+ isUploadedAndAnalysisSkipped(localFile) && !isIdea && (React.createElement("span", { className: "text-muted" }, localFile.analysisMetadata.analysisErrorMesssage)),
129
138
  localFile.description.length === ATTACHMENT_DESCRIPTION_LENGTH_LIMIT ? (React.createElement("p", { className: "form-instructions" },
130
139
  React.createElement(Trans, null, maxCaseAttachmentDescription))) : null,
131
140
  isUploadedAndAnalysisFailed(localFile) && (React.createElement("span", { className: "text-danger" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.11",
3
+ "version": "2.2.13",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -66,8 +66,8 @@
66
66
  "@patternfly/react-core": "4.264.0",
67
67
  "@progress/kendo-drawing": "^1.6.0",
68
68
  "@progress/kendo-react-pdf": "^3.12.0",
69
- "@rh-support/components": "2.1.5",
70
- "@rh-support/react-context": "2.1.5",
69
+ "@rh-support/components": "2.1.7",
70
+ "@rh-support/react-context": "2.1.7",
71
71
  "@rh-support/types": "2.0.2",
72
72
  "@rh-support/user-permissions": "2.1.3",
73
73
  "@rh-support/utils": "2.1.1",
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "e778f728c7da568aef8f31273d3d37cda4a1fa21"
136
+ "gitHead": "ea9b9ee30bf7f2cbb008a2100da620e69f8214e2"
137
137
  }