@rh-support/troubleshoot 1.0.39 → 1.0.40
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/CaseAlternateId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.js +4 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +2 -2
- package/lib/esm/components/Issue/Issue.js +1 -1
- package/lib/esm/components/Review/Review.js +3 -3
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AA2BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA0KrC;kBA1KQ,eAAe;;;AA6KxB,eAAe,eAAe,CAAC"}
|
|
@@ -11,9 +11,8 @@ import { InputGroupText, InputGroupTextVariant, Spinner, TextInput, TextInputGro
|
|
|
11
11
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
12
12
|
import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
13
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
14
|
-
import {
|
|
14
|
+
import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/components';
|
|
15
15
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
16
|
-
import isEmpty from 'lodash/isEmpty';
|
|
17
16
|
import isEqual from 'lodash/isEqual';
|
|
18
17
|
import React, { useEffect, useState } from 'react';
|
|
19
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -86,13 +85,8 @@ function CaseAlternateId(props) {
|
|
|
86
85
|
const maxLengthErrorMessage = t('Alternate case ID cannot be more than {{limit}} characters.', {
|
|
87
86
|
limit: ALTERNATE_CASE_ID_LIMIT,
|
|
88
87
|
});
|
|
89
|
-
// To check if alternate ID is empty
|
|
90
|
-
const isAlternateIDEmpty = isEmpty(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.trim());
|
|
91
88
|
// Conditions to disable save button
|
|
92
|
-
const saveDisabled =
|
|
93
|
-
alternateIdState === alternateId ||
|
|
94
|
-
isUpdating ||
|
|
95
|
-
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT;
|
|
89
|
+
const saveDisabled = alternateIdState === alternateId || isUpdating || (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT;
|
|
96
90
|
// Function to handle keyDown events
|
|
97
91
|
const handleKeyDown = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
98
92
|
// Cancel on pressing esc
|
|
@@ -105,14 +99,14 @@ function CaseAlternateId(props) {
|
|
|
105
99
|
}
|
|
106
100
|
});
|
|
107
101
|
return (React.createElement(React.Fragment, null,
|
|
108
|
-
React.createElement(
|
|
102
|
+
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-alternate-id' }, labelContent: React.createElement(React.Fragment, null,
|
|
109
103
|
React.createElement(Trans, null, "Alternate case ID"),
|
|
110
104
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localAltIDChange, value: alternateId, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
|
|
111
105
|
' ',
|
|
112
106
|
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.") },
|
|
113
107
|
React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: props.inlineEditable, content: alternateId || t('No Alternate case ID to display.'), hideSaveCancel: props.hideSaveCancel, saveDisabled: saveDisabled, charCount: (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) || 0, charTotal: ALTERNATE_CASE_ID_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
|
|
114
108
|
React.createElement(TextInputGroup, null,
|
|
115
|
-
React.createElement(TextInput, { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, "data-tracking-id": "case-details-alternate-id", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT
|
|
109
|
+
React.createElement(TextInput, { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, "data-tracking-id": "case-details-alternate-id", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT
|
|
116
110
|
? ValidatedOptions.error
|
|
117
111
|
: ValidatedOptions.default }),
|
|
118
112
|
!isUpdating ? (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA2BA,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA2BA,wBAAgB,sBAAsB,gBAgSrC"}
|
|
@@ -50,6 +50,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
50
50
|
const displayName = useRef('');
|
|
51
51
|
const previousLocalOpenshiftClusterIDState = usePrevious(localOpenshiftClusterIDState);
|
|
52
52
|
const previousSelectedReason = usePrevious(selectedReason);
|
|
53
|
+
const previousProduct = usePrevious(product);
|
|
53
54
|
const { t } = useTranslation();
|
|
54
55
|
const clusterStateReset = () => {
|
|
55
56
|
setSelectedReason('');
|
|
@@ -72,7 +73,8 @@ export function CaseOpenshiftClusterId() {
|
|
|
72
73
|
const hasCluster = yield isClusterIdEnabledForProduct(product, (_b = allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult);
|
|
73
74
|
setShowClusterId(hasCluster);
|
|
74
75
|
// when product changes from a product with cluster to a product without cluster, reset the clusterId
|
|
75
|
-
const
|
|
76
|
+
const IsProductHasChanged = previousProduct && previousProduct !== product;
|
|
77
|
+
const isResetClusterID = (!hasCluster || isOpenShiftV3) && IsProductHasChanged;
|
|
76
78
|
if (isResetClusterID) {
|
|
77
79
|
const caseDetails = {
|
|
78
80
|
openshiftClusterID: '',
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { InputGroupText, InputGroupTextVariant, Spinner, TextInput, TextInputGroup, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
11
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
12
12
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
13
|
-
import {
|
|
13
|
+
import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/components';
|
|
14
14
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
16
16
|
import isEqual from 'lodash/isEqual';
|
|
@@ -121,7 +121,7 @@ function Summary(props) {
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
return (React.createElement(React.Fragment, null,
|
|
124
|
-
React.createElement(
|
|
124
|
+
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
|
|
125
125
|
React.createElement(Trans, null, "Issue summary"),
|
|
126
126
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
|
|
127
127
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
|
|
@@ -39,7 +39,7 @@ export default function Issue() {
|
|
|
39
39
|
const handleFormSubmit = (e) => e.preventDefault();
|
|
40
40
|
return (React.createElement(React.Fragment, null,
|
|
41
41
|
React.createElement("form", { onSubmit: handleFormSubmit, className: "push-bottom" },
|
|
42
|
-
React.createElement(OpenCaseIssue, { inlineEditable:
|
|
42
|
+
React.createElement(OpenCaseIssue, { inlineEditable: true, hideSaveCancel: true, initialIsEditing: isEmpty(summary), required: true }),
|
|
43
43
|
React.createElement(MoreOrLess, { maxHeight: 600, appStickyHeaderRef: navBarRef },
|
|
44
44
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'issue-section-ktQ1-issue' }, labelContent: React.createElement(React.Fragment, null,
|
|
45
45
|
React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?")), allowInlineEdit: false, hideSaveCancel: true, initialIsEditing: isEmpty(issue), usePreformattedTag: true, content: issue },
|
|
@@ -42,8 +42,8 @@ export default function Review(props) {
|
|
|
42
42
|
React.createElement(AllProductsSelector, { isDropdownSelected: true, routeProps: props.routeProps, loadTCOnChange: true, showTCAfterButtonClicked: true, checkEntitledProduct: true }),
|
|
43
43
|
React.createElement(OpenShiftClusterId, null),
|
|
44
44
|
React.createElement(Hostname, null),
|
|
45
|
-
React.createElement(OpenCaseIssue, { inlineEditable:
|
|
46
|
-
React.createElement(Description, { inlineEditable:
|
|
45
|
+
React.createElement(OpenCaseIssue, { inlineEditable: true, required: true, initialIsEditing: isEmpty(summary), hideSaveCancel: true }),
|
|
46
|
+
React.createElement(Description, { inlineEditable: true, hideSaveCancel: true }),
|
|
47
47
|
React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true }),
|
|
48
48
|
React.createElement(CaseType, null),
|
|
49
49
|
React.createElement(SupportLevel, null),
|
|
@@ -53,6 +53,6 @@ export default function Review(props) {
|
|
|
53
53
|
React.createElement(CaseLanguageSelector, null),
|
|
54
54
|
canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
|
|
55
55
|
React.createElement(RHAssociatesSelector, null),
|
|
56
|
-
React.createElement(OpenAlternateID, {
|
|
56
|
+
React.createElement(OpenAlternateID, { hideSaveCancel: true }),
|
|
57
57
|
React.createElement(Cep, null))));
|
|
58
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.264.0",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/components": "1.2.
|
|
77
|
-
"@rh-support/react-context": "1.0.
|
|
76
|
+
"@rh-support/components": "1.2.17",
|
|
77
|
+
"@rh-support/react-context": "1.0.24",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
79
|
"@rh-support/user-permissions": "1.0.11",
|
|
80
80
|
"@rh-support/utils": "1.0.9",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "74b949fdce9ed569a0c7143e5272feb240aad73c"
|
|
146
146
|
}
|