@rh-support/troubleshoot 0.2.28 → 0.2.32

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":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAaxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,cAAc,4EA6NlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAaxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,cAAc,4EAgOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -34,9 +34,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
34
34
  const { request: updateDescriptionRequest, isFetching: isUpdating } = useFetch(kase.updateAttachment);
35
35
  const canEditCase = useCanEditCase();
36
36
  const onDescriptionSave = () => __awaiter(void 0, void 0, void 0, function* () {
37
- const updatedAttachment = yield updateDescriptionRequest(props.attachment.caseNumber, props.attachment.uuid, [
38
- { path: 'description', op: 'update', value: attachmentDescription },
39
- ]);
37
+ const updatedAttachment = yield updateDescriptionRequest(props.attachment.caseNumber, props.attachment.uuid, [{ path: 'description', op: 'update', value: attachmentDescription }], loggedInUsersAccount.data.secureSupport);
40
38
  props.onMetadataUpdate && props.onMetadataUpdate(props.attachment.uuid, updatedAttachment);
41
39
  });
42
40
  const onDescriptionChange = (event) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAgBrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAC/D,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAmO9B;kBAnOQ,QAAQ;;;AAqOjB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAsBrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAC/D,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eA4N9B;kBA5NQ,QAAQ;;;AA8NjB,eAAe,QAAQ,CAAC"}
@@ -2,9 +2,9 @@ import { Popover, PopoverPosition, Tooltip, TooltipPosition } from '@patternfly/
2
2
  import WarningTriangleIcon from '@patternfly/react-icons/dist/js/icons/warning-triangle-icon';
3
3
  import { Dropdown, ValueChangedIcon } from '@rh-support/components';
4
4
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
5
- import { autoEnableFtsOnCaseViewEditPage, showFtsOnCreateCasePage, toOption, toOptions } from '@rh-support/utils';
5
+ import { autoEnableFtsOnCaseViewEditPage, severitySort, showFtsOnCreateCasePage, toOption, toOptions, } from '@rh-support/utils';
6
+ import { findLast } from 'lodash';
6
7
  import find from 'lodash/find';
7
- import findLast from 'lodash/findLast';
8
8
  import includes from 'lodash/includes';
9
9
  import isEmpty from 'lodash/isEmpty';
10
10
  import isEqual from 'lodash/isEqual';
@@ -23,7 +23,7 @@ const defaultProps = {
23
23
  };
24
24
  function Severity(props) {
25
25
  const { t } = useTranslation();
26
- const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails, } = useCaseSelector((state) => ({
26
+ const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails } = useCaseSelector((state) => ({
27
27
  product: state.caseDetails.product,
28
28
  version: state.caseDetails.version,
29
29
  caseNumber: state.caseDetails.caseNumber,
@@ -128,7 +128,7 @@ function Severity(props) {
128
128
  // we have no limit, we show all severity options
129
129
  availableSeverities = (_c = allCaseSeverities.data) !== null && _c !== void 0 ? _c : [];
130
130
  }
131
- setSeveritiesOptions(availableSeverities);
131
+ setSeveritiesOptions(availableSeverities.sort((sevA, sevB) => severitySort(sevA, sevB)));
132
132
  const shouldUpdateSeverityOnCaseCreate = !caseNumber && (!severity || !includes(availableSeverities, severity));
133
133
  if (shouldUpdateSeverityOnCaseCreate) {
134
134
  updateState(availableSeverities[0]);
@@ -1 +1 @@
1
- {"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAqBF,wBAAgB,kBAAkB,gBAqQjC"}
1
+ {"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAqBF,wBAAgB,kBAAkB,gBAgRjC"}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
11
11
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
- import { getUrlParsedParams, getVersion } from '@rh-support/utils';
12
+ import { getConfigField, getUrlParsedParams, getVersion, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import isEqual from 'lodash/isEqual';
15
15
  import React, { useContext, useEffect, useState } from 'react';
@@ -66,6 +66,7 @@ export function OpenShiftClusterId() {
66
66
  const [v3Selected, setV3Selected] = useState(false);
67
67
  const [dontKnowSelected, setDontKnowSelected] = useState(false);
68
68
  const [selectedReason, setSelectedReason] = useState('');
69
+ const isClusterRecommendationEnabled = getConfigField(pcmConfig.data, 'isClusterRecommendationEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
69
70
  const resetClusterData = () => {
70
71
  clusterStateReset();
71
72
  setCaseDetails(caseDispatch, {
@@ -152,8 +153,8 @@ export function OpenShiftClusterId() {
152
153
  setDontKnowSelected(true);
153
154
  setSelectedReason('dont-have-id');
154
155
  }
155
- !isClusterIdInvalid &&
156
- !isEmpty(openshiftClusterID) &&
156
+ const canFetchClusterRecommendation = isClusterRecommendationEnabled && !isClusterIdInvalid && !isEmpty(openshiftClusterID);
157
+ canFetchClusterRecommendation &&
157
158
  fetchClusterRecommendations(clusterRecommendationsDispatch, openshiftClusterID);
158
159
  // eslint-disable-next-line react-hooks/exhaustive-deps
159
160
  }, [v3ClusterName, noClusterIdReason]);
@@ -173,9 +174,10 @@ export function OpenShiftClusterId() {
173
174
  return;
174
175
  }
175
176
  const isClusterInvalid = getIsClusterIdInvalid(selectedId);
177
+ const canFetchClusterRecommendation = !isClusterInvalid && isClusterRecommendationEnabled;
176
178
  setIsClusterIdInValid(isClusterInvalid);
177
179
  setCusterId(selectedId, selectedCluster);
178
- !isClusterInvalid && fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId);
180
+ canFetchClusterRecommendation && fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId);
179
181
  };
180
182
  const clusterIdDropdownFormInstructions = () => {
181
183
  const errorMessage = isClusterIdInvalid
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAcA,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,eA2K1E"}
1
+ {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAcA,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,eAqK1E"}
@@ -35,10 +35,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
35
35
  setRuleData(rules[ruleId]);
36
36
  }, [setRuleData, doc.attachmentId, doc.id, selectedLocalFiles, duplicateKeys]);
37
37
  const onCtaClick = (link) => (event) => {
38
- var _a;
39
- createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [
40
- getSessResFromInsights(link, SessionResourceVisibility.VISITED, (_a = sessionResourceTracking[SessionResourceSource.INSIGHTS]) === null || _a === void 0 ? void 0 : _a.resourceEntityId),
41
- ]);
38
+ createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [getSessResFromInsights(link, SessionResourceVisibility.VISITED, ruleData.rule_id)]);
42
39
  };
43
40
  const getTrackingQueryParams = () => {
44
41
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAoWtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAgXtD"}
@@ -19,6 +19,7 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
19
19
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
20
20
  import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
21
21
  import { RulesDispatchContext } from '../../context/RulesContext';
22
+ import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
22
23
  import { TCDispatchContext, TCStateContext } from '../../context/TopContentContext';
23
24
  import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
24
25
  import { initialCaseState } from '../../reducers/CaseConstNTypes';
@@ -34,6 +35,7 @@ export function GlobalTroubleshootEffects(props) {
34
35
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
35
36
  const { routeState: { activeSection, appRouteSectionsSequence, appRouteConfugurations, sectionsToHide }, } = useContext(RouteContext);
36
37
  const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
38
+ const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
37
39
  const { accountNumber, product, version, contactSsoUsername, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, } = useCaseSelector((state) => ({
38
40
  accountNumber: state.caseDetails.accountNumberRef,
39
41
  product: state.caseDetails.product,
@@ -275,12 +277,17 @@ export function GlobalTroubleshootEffects(props) {
275
277
  // eslint-disable-next-line react-hooks/exhaustive-deps
276
278
  }, [loggedInUsersAccount.data]);
277
279
  /**
278
- * When user change product/version need to reset clusterID states
280
+ * When user change version (on product component page or preview page) need to reset clusterID states
281
+ * If version change happens because od session restore, need to skip this otherwise restored value will be reset
279
282
  */
280
283
  const previousVersion = usePrevious(version);
284
+ const previousActiveSessionId = usePrevious(activeSessionId);
281
285
  useEffect(() => {
282
286
  var _a;
283
- if (isEmpty(product) || isEmpty(version))
287
+ if (isEmpty(product) ||
288
+ isEmpty(version) ||
289
+ isEmpty(previousVersion) ||
290
+ activeSessionId !== previousActiveSessionId)
284
291
  return;
285
292
  // we need to reset openshift cluster states only when major version is different
286
293
  const oldMajorVersion = previousVersion && getVersion(previousVersion).major;
@@ -449,7 +449,7 @@ export default {
449
449
  'Red Hat associates': 'Les collaborateurs de Red Hat',
450
450
  "To help Red Hat use our connected customer tools/services, to debug your cluster in conjunction with your support case, we are requesting that you provide your <1>OpenShift Cluster ID</1>.<br/>If you are installing or planning your install and don't yet have a cluster ID please leave this field blank.": "Pour aider Red Hat à utiliser nos outils/services de clients connectés, pour déboguer votre cluster dans le cadre du support de cas, nous vous demandons de fournir votre identifiant <1>OpenShift Client Cluster</1>.<br/>Si vous installez ou planifiez votre installation et n'avez pas encore d'identifiant de cluster, veuillez laisser ce champ vide.",
451
451
  'OpenShift Cluster ID': 'Openshift Cluster ID',
452
- Group: 'Grupo',
452
+ Group: 'Groupe',
453
453
  'Used by consultants to indicate that a consulting engagement is in progress and the issue requires increased attention from support resources.': "Utilisé par les consultants pour indiquer qu'un service de consulting est en cours et que le problème nécessite une attention particulière supplémentaire de la part des ressources de support.",
454
454
  Thursday: 'Jeudi',
455
455
  Tuesday: 'Mardi',
@@ -435,7 +435,7 @@ export default {
435
435
  'Office location': '办公地点',
436
436
  Expectations: '期望',
437
437
  Products: '产品',
438
- Cases: '情况 下',
438
+ Cases: '问题单',
439
439
  'Used by consultants to indicate that a consulting engagement is in progress and the issue requires increased attention from support resources.': '咨询顾问用来指示,咨询顾问已参与到这个问题,解决问题可能需要支持团队更多的关注。',
440
440
  'Active Customer Escalation (ACE)': '启动用户问题升级流程 (ACE)',
441
441
  Notes: '备注',
@@ -171,7 +171,7 @@ export const initialCaseState = {
171
171
  hasErrorSelectedNotificationContacts: false,
172
172
  isFetchingSelectedNotificationContacts: true,
173
173
  versionsDetails: getApiResourceObject([]),
174
- v3ClusterName: undefined,
174
+ v3ClusterName: '',
175
175
  };
176
176
  export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
177
177
  export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
@@ -1 +1 @@
1
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ions in which they appear on case details
48
49
  export const getUpdatedDescription = (issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName) => {
49
50
  let description = issue;
50
51
  if (!isEmpty(environment) ||
@@ -52,6 +53,9 @@ export const getUpdatedDescription = (issue, environment, periodicityOfIssue, ti
52
53
  !isEmpty(timeFramesAndUrgency) ||
53
54
  !isEmpty(v3ClusterName)) {
54
55
  description = `${KtQuestionConstant.issue}\n${issue}`;
56
+ description += !isEmpty(timeFramesAndUrgency)
57
+ ? `\n\n${KtQuestionConstant.timeFramesAndUrgency}\n${timeFramesAndUrgency}`
58
+ : '';
55
59
  description +=
56
60
  !isEmpty(environment) || !isEmpty(v3ClusterName)
57
61
  ? `\n\n${KtQuestionConstant.environment}\n${v3ClusterName ? `OpenShift Cluster Name: ${v3ClusterName} \n` : ''}${environment}`
@@ -59,18 +63,16 @@ export const getUpdatedDescription = (issue, environment, periodicityOfIssue, ti
59
63
  description += !isEmpty(periodicityOfIssue)
60
64
  ? `\n\n${KtQuestionConstant.periodicityOfIssue}\n${periodicityOfIssue}`
61
65
  : '';
62
- description += !isEmpty(timeFramesAndUrgency)
63
- ? `\n\n${KtQuestionConstant.timeFramesAndUrgency}\n${timeFramesAndUrgency}`
64
- : '';
65
66
  }
66
67
  return description;
67
68
  };
69
+ // Gets the descriptions without questions
68
70
  export const getDescriptionWOQues = (issue, environment, periodicityOfIssue, timeFramesAndUrgency) => {
69
71
  let description = issue;
70
72
  if (!isEmpty(environment) || !isEmpty(periodicityOfIssue) || !isEmpty(timeFramesAndUrgency)) {
73
+ description += !isEmpty(timeFramesAndUrgency) ? ` ${timeFramesAndUrgency}` : '';
71
74
  description += !isEmpty(environment) ? ` ${environment}` : '';
72
75
  description += !isEmpty(periodicityOfIssue) ? ` ${periodicityOfIssue}` : '';
73
- description += !isEmpty(timeFramesAndUrgency) ? ` ${timeFramesAndUrgency}` : '';
74
76
  }
75
77
  return description;
76
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.28",
3
+ "version": "0.2.32",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.6.0",
29
+ "@cee-eng/hydrajs": "4.7.3",
30
30
  "@cee-eng/ui-toolkit": "1.1.3",
31
31
  "@patternfly/patternfly": "4.102.2",
32
32
  "@patternfly/pfe-accordion": "1.1.0",
@@ -63,7 +63,7 @@
63
63
  "react-virtualized": "^9.21.2"
64
64
  },
65
65
  "dependencies": {
66
- "@cee-eng/hydrajs": "4.6.0",
66
+ "@cee-eng/hydrajs": "4.7.3",
67
67
  "@cee-eng/ui-toolkit": "1.1.3",
68
68
  "@patternfly/patternfly": "4.102.2",
69
69
  "@patternfly/pfe-accordion": "1.1.0",
@@ -72,12 +72,12 @@
72
72
  "@patternfly/react-core": "4.128.2",
73
73
  "@progress/kendo-drawing": "^1.6.0",
74
74
  "@progress/kendo-react-pdf": "^3.12.0",
75
- "@rh-support/api": "0.3.7",
76
- "@rh-support/components": "1.1.13",
77
- "@rh-support/react-context": "0.2.15",
75
+ "@rh-support/api": "0.3.8",
76
+ "@rh-support/components": "1.1.14",
77
+ "@rh-support/react-context": "0.2.16",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "0.2.9",
80
- "@rh-support/utils": "0.2.9",
79
+ "@rh-support/user-permissions": "0.2.10",
80
+ "@rh-support/utils": "0.2.10",
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": "6e0c6103e776d314540f06fffa80be12601c08d3"
145
+ "gitHead": "9a2829fecfe0e5755eacfb6f27b67271edb56e33"
146
146
  }