@rh-support/troubleshoot 2.2.59 → 2.2.60

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":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eAihBxC"}
1
+ {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eA6fxC"}
@@ -34,7 +34,6 @@ import { PDFContext } from '../../PDFContainer';
34
34
  import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
35
35
  import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
36
36
  export function PostComment(props) {
37
- var _a;
38
37
  const { t } = useTranslation();
39
38
  const caseUpdateError = useCaseUpdateErrorMessage();
40
39
  let { caseNumber } = props;
@@ -78,10 +77,8 @@ export function PostComment(props) {
78
77
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
78
  }, []);
80
79
  const [isModalOpen, setIsModalOpen] = useState(false);
81
- const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
82
80
  const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
83
81
  const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
84
- const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
85
82
  const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
86
83
  caseNumber,
87
84
  secureSupport: loggedInUsersAccount.data.secureSupport,
@@ -315,10 +312,7 @@ export function PostComment(props) {
315
312
  let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
316
313
  return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
317
314
  };
318
- const isSubmitDisabled = isReplyDisabled() ||
319
- isCommentEmpty ||
320
- isPostCommentDisabled ||
321
- (isConfirmedStateSideSupport && !cssCommentAgreed);
315
+ const isSubmitDisabled = isReplyDisabled() || isCommentEmpty || isPostCommentDisabled;
322
316
  return (React.createElement("div", { className: `pf-v5-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
323
317
  React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
324
318
  ? 'Add a comment using markdown'
@@ -334,7 +328,6 @@ export function PostComment(props) {
334
328
  isUploadingFile: isMarkdownFileUploadInProgress,
335
329
  onClipboardPaste,
336
330
  } }),
337
- isConfirmedStateSideSupport && (React.createElement(Checkbox, { id: "css-case-comment-agreement", name: "css-case-comment-agreement", className: "pf-v5-u-mt-md pf-v5-u-mb-xl", isRequired: true, label: t('I will not transmit controlled, unclassified information to or export it from the Red Hat Customer Portal.'), isChecked: cssCommentAgreed, onChange: (_, c) => setCssCommentAgreed(c) })),
338
331
  isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
339
332
  isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
340
333
  React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
@@ -148,7 +148,7 @@ export function AsideResults(props) {
148
148
  return (React.createElement("li", { className: "result", key: doc.id },
149
149
  React.createElement("header", { className: "result-header" },
150
150
  React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS_ASIDE]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS_ASIDE)}`, className: "se-recommended ts-result-aside", "data-tracking-id": `se-recommended-sidebar-recommendations-${index}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, index), dangerouslySetInnerHTML: computeRecommendationTitle(doc) })),
151
- isFetchingRecommendationsFromWatsonX && !isRerankEnabled && (React.createElement(ShowRank, { index: index, originalRank: doc.original_rank, routeProps: props.routeProps })),
151
+ isFetchingRecommendationsFromWatsonX && isRerankEnabled && (React.createElement(ShowRank, { index: index, originalRank: doc.original_rank, routeProps: props.routeProps })),
152
152
  React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
153
153
  })))));
154
154
  }
@@ -154,7 +154,7 @@ export default function Recommendations(props) {
154
154
  React.createElement("span", { className: "meta" }, doc.documentKind),
155
155
  React.createElement("span", { className: "list-separator" }, "\u2013"),
156
156
  React.createElement("time", { className: "moment_date meta", title: doc.lastModifiedDate.toString() }, formatDate(doc.lastModifiedDate)))),
157
- isFetchingRecommendationsFromWatsonX && !isRerankEnabled && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps, perPage: recPageSize, pageNo: recommendationState.currentPage })),
157
+ isFetchingRecommendationsFromWatsonX && isRerankEnabled && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps, perPage: recPageSize, pageNo: recommendationState.currentPage })),
158
158
  React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 300) })));
159
159
  })),
160
160
  recommendationState.numFound !== 0 && recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,2BAA2B,EAAE,OAAO,EAAE,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClH;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAgHhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,2BAA2B,EAAE,OAAO,EAAE,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClH;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAmGhC;AACD,eAAe,UAAU,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core/deprecated';
2
2
  import { LoadingIndicator } from '@rh-support/components';
3
- import { CSSUserModal, GlobalMetadataStateContext, updateTroubleshootTraditionalSupportAgreed, useGlobalDispatchContext, } from '@rh-support/react-context';
4
3
  import isEqual from 'lodash/isEqual';
5
4
  import React, { Suspense, useContext, useState } from 'react';
6
5
  import { useTranslation } from 'react-i18next';
@@ -19,8 +18,6 @@ function WizardMain(props) {
19
18
  const { isCreatingCase } = useCaseSelector((state) => ({
20
19
  isCreatingCase: state.isCreatingCase,
21
20
  }), isEqual);
22
- const { globalMetadataState: { troubleshootTraditionalSupportAgreed }, } = useContext(GlobalMetadataStateContext);
23
- const globalDispatchContext = useGlobalDispatchContext();
24
21
  const { getStepsSequece } = useWizard(props.routeProps);
25
22
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
26
23
  const { t } = useTranslation();
@@ -43,9 +40,6 @@ function WizardMain(props) {
43
40
  setActiveSectionChanged(dispatchToRouteReducer, step.id);
44
41
  updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
45
42
  };
46
- const onConfirmTraditionalSupportAgreement = () => {
47
- updateTroubleshootTraditionalSupportAgreed(globalDispatchContext, true);
48
- };
49
43
  const CustomFooter = (React.createElement(WizardFooter, null,
50
44
  React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
51
45
  return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext, onBack: onBack, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag) }));
@@ -54,7 +48,6 @@ function WizardMain(props) {
54
48
  // in useWizard file then add it to step squences in RouteConstNTypes
55
49
  const steps = getStepsSequece(showRestFlag);
56
50
  return (React.createElement(React.Fragment, null,
57
- React.createElement(CSSUserModal, { onConfirmTraditionalSupportAgreement: onConfirmTraditionalSupportAgreement, display: !troubleshootTraditionalSupportAgreed }),
58
51
  steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { navAriaLabel: ` navAriaLabel steps `, mainAriaLabel: ` mainAriaLabel content `, steps: steps, footer: CustomFooter, onNext: onNext, onBack: onBack, hideClose: true, backButtonText: t('Go back'), onCurrentStepChanged: onCurrentStepChanged })) })),
59
52
  React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
60
53
  }
@@ -627,6 +627,9 @@ button.pf-v5-c-toggle-group__button {
627
627
  }
628
628
 
629
629
  .top-content-suggestion-accordion {
630
+ .pf-v5-c-accordion .pf-v5-c-accordion__toggle {
631
+ padding: 15px;
632
+ }
630
633
  .pf-v5-c-accordion__toggle {
631
634
  padding-top: 10px !important;
632
635
  padding-bottom: 10px !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.59",
3
+ "version": "2.2.60",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -48,8 +48,8 @@
48
48
  "react-i18next": "^11.2.5",
49
49
  "react-redux": "^7.2.2",
50
50
  "react-router-dom": "^5.1.2",
51
- "react-test-renderer": "^16.9.0",
52
- "react-virtualized": "^9.21.2"
51
+ "react-test-renderer": "17.0.2",
52
+ "react-virtualized": "9.22.5"
53
53
  },
54
54
  "dependencies": {
55
55
  "@cee-eng/hydrajs": "4.16.43",
@@ -58,12 +58,13 @@
58
58
  "@patternfly/react-core": "5.1.1",
59
59
  "@patternfly/react-table": "^5.1.1",
60
60
  "@progress/kendo-drawing": "^1.6.0",
61
- "@progress/kendo-react-pdf": "^3.12.0",
62
- "@rh-support/components": "2.1.32",
63
- "@rh-support/react-context": "2.1.35",
61
+ "@progress/kendo-licensing": "1.3.5",
62
+ "@progress/kendo-react-pdf": "4.6.0",
63
+ "@rh-support/components": "2.1.33",
64
+ "@rh-support/react-context": "2.1.36",
64
65
  "@rh-support/types": "2.0.2",
65
- "@rh-support/user-permissions": "2.1.22",
66
- "@rh-support/utils": "2.1.15",
66
+ "@rh-support/user-permissions": "2.1.23",
67
+ "@rh-support/utils": "2.1.16",
67
68
  "@types/react-redux": "^7.1.12",
68
69
  "@types/redux": "^3.6.0",
69
70
  "dompurify": "^2.4.1",
@@ -84,8 +85,8 @@
84
85
  "react-i18next": "^11.2.5",
85
86
  "react-redux": "^7.2.2",
86
87
  "react-router-dom": "^5.1.2",
87
- "react-test-renderer": "17.0.1",
88
- "react-virtualized": "^9.21.2",
88
+ "react-test-renderer": "17.0.2",
89
+ "react-virtualized": "9.22.5",
89
90
  "redux": "^4.0.5",
90
91
  "redux-devtools-extension": "^2.13.8",
91
92
  "timers": "^0.1.1"
@@ -124,5 +125,5 @@
124
125
  "defaults and supports es6-module",
125
126
  "maintained node versions"
126
127
  ],
127
- "gitHead": "d52b9ccf062855933cbb1da3dac7f4c6a2694671"
128
+ "gitHead": "6f4a93926c86b6af2df3f900f199261c5c3656f5"
128
129
  }