@rh-support/troubleshoot 2.2.9 → 2.2.11
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.
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +8 -2
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +6 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +2 -2
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +3 -4
- package/lib/esm/constants/caseDetailsConstants.d.ts +1 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +1 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,sBAAsB,gBA8OrC"}
|
|
@@ -17,7 +17,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
18
18
|
import React, { useContext, useEffect, useState } from 'react';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
|
-
import { PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../../../constants/caseDetailsConstants';
|
|
20
|
+
import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../../../constants/caseDetailsConstants';
|
|
21
21
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
22
22
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
23
23
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
@@ -124,7 +124,7 @@ export function CaseContactPhoneNumber() {
|
|
|
124
124
|
: ValidatedOptions.default;
|
|
125
125
|
useEffect(() => {
|
|
126
126
|
var _a, _b;
|
|
127
|
-
if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber && !isEmpty(phone))
|
|
127
|
+
if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(phone)) {
|
|
128
128
|
const oldPhoneline = ((_a = getPhoneObj(phone)) === null || _a === void 0 ? void 0 : _a.phoneLine) || '';
|
|
129
129
|
const oldCountryCode = ((_b = getPhoneObj(phone)) === null || _b === void 0 ? void 0 : _b.countryCode) || '';
|
|
130
130
|
if (oldPhoneline && oldCountryCode.replace('+', '')) {
|
|
@@ -151,6 +151,12 @@ export function CaseContactPhoneNumber() {
|
|
|
151
151
|
React.createElement(CheckIcon, null)),
|
|
152
152
|
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isEmpty(localFullPhoneState) },
|
|
153
153
|
React.createElement(TimesIcon, { color: "#6A6E73" }))),
|
|
154
|
+
!invalid &&
|
|
155
|
+
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) < PHONE_LIMIT &&
|
|
156
|
+
!(isPhoneLineEmpty && isSaveClicked) &&
|
|
157
|
+
!(isSaveClicked && isPhoneNumberInvalid) &&
|
|
158
|
+
!isShowOldPhone && (React.createElement("p", { className: "form-instructions" },
|
|
159
|
+
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
154
160
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
155
161
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
156
162
|
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB,gBAkJjC"}
|
|
@@ -6,7 +6,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
import React, { useContext, useEffect, useState } from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
|
-
import { PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
|
|
9
|
+
import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
|
|
10
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
11
|
import { RouteContext } from '../../context/RouteContext';
|
|
12
12
|
import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
@@ -85,6 +85,11 @@ export function ContactPhoneNumber() {
|
|
|
85
85
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
86
86
|
ContactPhoneNumberPopOver()),
|
|
87
87
|
React.createElement(PhoneInput, { phoneValue: localFullPhone, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid }),
|
|
88
|
+
!invalid &&
|
|
89
|
+
getPhone().length < PHONE_LIMIT &&
|
|
90
|
+
!(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
|
|
91
|
+
!(isNextBtnClickedToShowValidationError && isPhoneNumberInvalid) && (React.createElement("p", { className: "form-instructions" },
|
|
92
|
+
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
88
93
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
89
94
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
90
95
|
getPhone().length > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
@@ -21,9 +21,9 @@ export default function CaseManagement(props) {
|
|
|
21
21
|
return (React.createElement("form", null,
|
|
22
22
|
React.createElement(SupportLevel, null),
|
|
23
23
|
React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
|
|
24
|
-
React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-
|
|
24
|
+
React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-xs" },
|
|
25
25
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
26
|
-
React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-
|
|
26
|
+
React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-xs" },
|
|
27
27
|
React.createElement(ContactPhoneNumber, null))),
|
|
28
28
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
29
29
|
React.createElement(Fts, { inlineEditable: false }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA4BA,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA4BA,MAAM,CAAC,OAAO,UAAU,UAAU,gBA6SjC"}
|
|
@@ -7,7 +7,7 @@ import { getConfigField, getRedhatDotComHost, PCM_CONFIG_FIELD_TYPE, PreviousCas
|
|
|
7
7
|
import find from 'lodash/find';
|
|
8
8
|
import isEmpty from 'lodash/isEmpty';
|
|
9
9
|
import isEqual from 'lodash/isEqual';
|
|
10
|
-
import React, { useContext, useEffect,
|
|
10
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
11
11
|
import { Trans, useTranslation } from 'react-i18next';
|
|
12
12
|
import { Link } from 'react-router-dom';
|
|
13
13
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
@@ -40,7 +40,6 @@ export default function SubmitCase() {
|
|
|
40
40
|
}), isEqual);
|
|
41
41
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
42
42
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
43
|
-
const tooltipRef = useRef();
|
|
44
43
|
const { rulesState } = useContext(RulesStateContext);
|
|
45
44
|
const { clusterRecommendationsState: { clusterRecommendations }, } = useContext(ClusterRecommendationsContext);
|
|
46
45
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
@@ -135,8 +134,8 @@ export default function SubmitCase() {
|
|
|
135
134
|
React.createElement(ActionListItem, null,
|
|
136
135
|
React.createElement(Button, { component: "a", href: `${getRedhatDotComHost(Env.getEnvName())}/wapps/ugc/protected/${'personalInfo.html'}`, target: "_blank", variant: "secondary", "data-tracking-id": "get-support-update-info", className: "update-info-button" }, "Update info")),
|
|
137
136
|
React.createElement(ActionListItem, null, viewDisabled ? (React.createElement(React.Fragment, null,
|
|
138
|
-
React.createElement(Tooltip, { content: t('File upload in progress.'), "
|
|
139
|
-
|
|
137
|
+
React.createElement(Tooltip, { content: t('File upload in progress.'), position: "bottom" },
|
|
138
|
+
React.createElement(Button, { className: "pf-u-ml-md", component: "a", href: getCaseURL(), variant: "primary", "data-tracking-id": "get-support-view-case", "aria-label": t('View case'), isAriaDisabled: viewDisabled }, "View case")))) : (React.createElement(Button, { className: "pf-u-ml-md", component: (props) => React.createElement(Link, Object.assign({}, props, { to: `/case/${caseNumber}` })), variant: "primary", "data-tracking-id": "get-support-view-case", "aria-label": t('View case') }, "View case")))))),
|
|
140
139
|
!isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNumber, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport })),
|
|
141
140
|
React.createElement("div", null,
|
|
142
141
|
(!isEmpty(topContent.data) || !rulesState.EARules.rules || !clusterRecommendations) &&
|
|
@@ -15,4 +15,5 @@ export declare enum CaseStatusEnum {
|
|
|
15
15
|
export declare const PHONE_LINE_CANNOT_BE_EMPTY = "Phone number cannot be empty when country code is given.";
|
|
16
16
|
export declare const PHONE_NO_CHAR_ERROR = "Phone number can only have digits.";
|
|
17
17
|
export declare const PHONE_IS_NOT_VALID = "Phone number is invalid.";
|
|
18
|
+
export declare const PHONE_INSTRUCTION = "A current phone number with the country code helps us support you better.";
|
|
18
19
|
//# sourceMappingURL=caseDetailsConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAE7D,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
|
|
@@ -17,3 +17,4 @@ export var CaseStatusEnum;
|
|
|
17
17
|
export const PHONE_LINE_CANNOT_BE_EMPTY = 'Phone number cannot be empty when country code is given.';
|
|
18
18
|
export const PHONE_NO_CHAR_ERROR = 'Phone number can only have digits.';
|
|
19
19
|
export const PHONE_IS_NOT_VALID = 'Phone number is invalid.';
|
|
20
|
+
export const PHONE_INSTRUCTION = 'A current phone number with the country code helps us support you better.';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.11",
|
|
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.
|
|
70
|
-
"@rh-support/react-context": "2.1.
|
|
69
|
+
"@rh-support/components": "2.1.5",
|
|
70
|
+
"@rh-support/react-context": "2.1.5",
|
|
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": "
|
|
136
|
+
"gitHead": "e778f728c7da568aef8f31273d3d37cda4a1fa21"
|
|
137
137
|
}
|