@rh-support/troubleshoot 0.3.4 → 0.3.7
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/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +2 -4
- package/lib/esm/components/ImproveCase/KtQuestions.d.ts.map +1 -1
- package/lib/esm/components/ImproveCase/KtQuestions.js +2 -7
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts +7 -0
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +3 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +1 -0
- package/lib/esm/scss/_pf4-overrides.scss +8 -1
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAaA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAwFhD"}
|
|
@@ -2,10 +2,9 @@ import { TextArea } from '@patternfly/react-core';
|
|
|
2
2
|
import { InlineEdit } from '@rh-support/components';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
|
-
import { RouteContext } from '../../context/RouteContext';
|
|
9
8
|
import { DESCRIPTION_LENGTH_LIMIT, LargeDescriptionErrorMessage } from '../../reducers/CaseConstNTypes';
|
|
10
9
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
11
10
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
@@ -36,10 +35,9 @@ export default function Description(props) {
|
|
|
36
35
|
onCaseDetailsChange({ issue: ktQ1Local, description: newDescription });
|
|
37
36
|
};
|
|
38
37
|
const isKT1Required = true;
|
|
39
|
-
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
40
38
|
const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
|
|
41
39
|
const isDescriptionInvalid = (issue) => {
|
|
42
|
-
return
|
|
40
|
+
return hasFocusedLostKT4 && isEmpty(issue);
|
|
43
41
|
};
|
|
44
42
|
return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null,
|
|
45
43
|
React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA+OjC;kBA/OQ,WAAW;;;AAiPpB,eAAe,WAAW,CAAC"}
|
|
@@ -2,10 +2,9 @@ import { TextArea } from '@patternfly/react-core';
|
|
|
2
2
|
import { InlineEdit } from '@rh-support/components';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
|
-
import { RouteContext } from '../../context/RouteContext';
|
|
9
8
|
import { DESCRIPTION_LENGTH_LIMIT, KtQuestionConstant, LargeDescriptionErrorMessage, } from '../../reducers/CaseConstNTypes';
|
|
10
9
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
11
10
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
@@ -22,7 +21,6 @@ function KtQuestions(props) {
|
|
|
22
21
|
v3ClusterName: state.v3ClusterName,
|
|
23
22
|
}), isEqual);
|
|
24
23
|
const caseDispatch = useCaseDispatch();
|
|
25
|
-
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
26
24
|
const [isKTQ2TextAreaActive, setKTQ2TextAreaActive] = useState(false);
|
|
27
25
|
const [hasFocusedLostKT2, setHasFocusedLostKT2] = useState(false);
|
|
28
26
|
// const [isKTQ2InValid, setKTQ2InValid] = useState(false);
|
|
@@ -80,7 +78,6 @@ function KtQuestions(props) {
|
|
|
80
78
|
const isKT3Required = false;
|
|
81
79
|
const isKT4Required = true;
|
|
82
80
|
const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
|
|
83
|
-
const isBusinessImpactInvalid = (isEmpty(timeFramesAndUrgency) || hasLargeCaseDescription) && showValidationErrorAlert;
|
|
84
81
|
const invalidateQT4 = (value) => {
|
|
85
82
|
return isEmpty(value) && hasFocusedLostKT4;
|
|
86
83
|
};
|
|
@@ -89,9 +86,7 @@ function KtQuestions(props) {
|
|
|
89
86
|
t(KtQuestionConstant.timeFramesAndUrgency),
|
|
90
87
|
' ',
|
|
91
88
|
isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
|
|
92
|
-
React.createElement(TextArea, { className: `form-control${
|
|
93
|
-
? ' form-invalid'
|
|
94
|
-
: ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000 ? 'true' : 'false', id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, isDisabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency", isRequired: isKT4Required }),
|
|
89
|
+
React.createElement(TextArea, { className: `form-control${invalidateQT4(timeFramesAndUrgency) || isKTQ4InValid ? ' form-invalid' : ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000 ? 'true' : 'false', id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, isDisabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency", isRequired: isKT4Required }),
|
|
95
90
|
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ4-environment" }, `${isKTQ4TextAreaActive && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000
|
|
96
91
|
? 'Description cannot be more than 4000 characters'
|
|
97
92
|
: ''}`),
|
|
@@ -4,6 +4,13 @@ interface IProps {
|
|
|
4
4
|
showNewTag: boolean;
|
|
5
5
|
duplicateKeys: string[];
|
|
6
6
|
}
|
|
7
|
+
declare global {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
'pfe-cta': any;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
export declare function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }: IProps): JSX.Element;
|
|
8
15
|
export {};
|
|
9
16
|
//# sourceMappingURL=InsightsRuleInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,eA4J1E"}
|
|
@@ -74,6 +74,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
|
|
|
74
74
|
React.createElement(Trans, null, "Additional info")),
|
|
75
75
|
React.createElement(AccordionContent, { isHidden: !isAdditionalExpanded },
|
|
76
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) }))))),
|
|
77
|
-
React.createElement("
|
|
78
|
-
React.createElement(
|
|
77
|
+
React.createElement("pfe-cta", null,
|
|
78
|
+
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) },
|
|
79
|
+
React.createElement(Trans, null, "Related article"))))))));
|
|
79
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAiB3D,OAAO,EAMH,UAAU,EAcb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU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AAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
|
|
@@ -176,6 +176,7 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) =
|
|
|
176
176
|
!isEmpty(case_details.description) &&
|
|
177
177
|
case_details.description.length <= DESCRIPTION_LENGTH_LIMIT &&
|
|
178
178
|
!isEmpty(case_details.timeFramesAndUrgency) &&
|
|
179
|
+
!isEmpty(case_details.issue) &&
|
|
179
180
|
!isEmpty(case_details.accountNumberRef) &&
|
|
180
181
|
!isEmpty(case_details.contactSSOName) &&
|
|
181
182
|
canManageCase(loggedInUserJwtToken));
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
.pf-c-alert {
|
|
110
110
|
.pf-c-alert__title {
|
|
111
|
-
font-weight: 600;
|
|
111
|
+
font-weight: 600 !important;
|
|
112
112
|
font-size: 15px;
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -248,6 +248,13 @@
|
|
|
248
248
|
|
|
249
249
|
& > *:not(.ea-rule) .cta-link {
|
|
250
250
|
padding: 0 0.8rem;
|
|
251
|
+
border: none;
|
|
252
|
+
font-size: 14px;
|
|
253
|
+
font-weight: 700;
|
|
254
|
+
}
|
|
255
|
+
.cta-link::after {
|
|
256
|
+
border: 0;
|
|
257
|
+
margin-left: 0 !important;
|
|
251
258
|
}
|
|
252
259
|
}
|
|
253
260
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@patternfly/patternfly": "4.196.7",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
33
33
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
34
|
+
"@patternfly/pfe-cta": "^1.12.3",
|
|
34
35
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
35
36
|
"@patternfly/react-core": "4.202.16",
|
|
36
37
|
"@rh-support/components": "^0.1.3",
|
|
@@ -72,11 +73,11 @@
|
|
|
72
73
|
"@patternfly/react-core": "4.202.16",
|
|
73
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
74
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
75
|
-
"@rh-support/components": "1.1.
|
|
76
|
-
"@rh-support/react-context": "0.3.
|
|
76
|
+
"@rh-support/components": "1.1.84",
|
|
77
|
+
"@rh-support/react-context": "0.3.5",
|
|
77
78
|
"@rh-support/types": "0.2.0",
|
|
78
|
-
"@rh-support/user-permissions": "0.2.
|
|
79
|
-
"@rh-support/utils": "0.2.
|
|
79
|
+
"@rh-support/user-permissions": "0.2.68",
|
|
80
|
+
"@rh-support/utils": "0.2.50",
|
|
80
81
|
"@types/react-redux": "^7.1.12",
|
|
81
82
|
"@types/redux": "^3.6.0",
|
|
82
83
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -141,5 +142,5 @@
|
|
|
141
142
|
"not ie <= 11",
|
|
142
143
|
"not op_mini all"
|
|
143
144
|
],
|
|
144
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "d1025a2463c9e2bac873dd764a02518fbb5b5e47"
|
|
145
146
|
}
|