@rh-support/troubleshoot 0.3.5 → 0.3.8

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":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAcA,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,eA4FhD"}
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, { useContext, useState } from '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 (hasFocusedLostKT4 && isEmpty(issue)) || showValidationErrorAlert;
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":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eAwPjC;kBAxPQ,WAAW;;;AA0PpB,eAAe,WAAW,CAAC"}
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, { useContext, useEffect, useState } from '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${(invalidateQT4(timeFramesAndUrgency) && isBusinessImpactInvalid) || isKTQ4InValid
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
  : ''}`),
@@ -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,0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F,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CA8B5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAkBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.3.5",
3
+ "version": "0.3.8",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -73,11 +73,11 @@
73
73
  "@patternfly/react-core": "4.202.16",
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/components": "1.1.83",
77
- "@rh-support/react-context": "0.3.4",
76
+ "@rh-support/components": "1.1.84",
77
+ "@rh-support/react-context": "0.3.6",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "0.2.67",
80
- "@rh-support/utils": "0.2.49",
79
+ "@rh-support/user-permissions": "0.2.68",
80
+ "@rh-support/utils": "0.2.50",
81
81
  "@types/react-redux": "^7.1.12",
82
82
  "@types/redux": "^3.6.0",
83
83
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -142,5 +142,5 @@
142
142
  "not ie <= 11",
143
143
  "not op_mini all"
144
144
  ],
145
- "gitHead": "de58d49b00c17b15e090aee40a57150952ef560c"
145
+ "gitHead": "dcac4c87edfdc2e855b7ea5b3058be26133b701b"
146
146
  }