@rh-support/troubleshoot 2.2.56 → 2.2.58

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,eA8fxC"}
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"}
@@ -34,6 +34,7 @@ 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;
37
38
  const { t } = useTranslation();
38
39
  const caseUpdateError = useCaseUpdateErrorMessage();
39
40
  let { caseNumber } = props;
@@ -77,8 +78,10 @@ export function PostComment(props) {
77
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
78
79
  }, []);
79
80
  const [isModalOpen, setIsModalOpen] = useState(false);
81
+ const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
80
82
  const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
81
83
  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;
82
85
  const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
83
86
  caseNumber,
84
87
  secureSupport: loggedInUsersAccount.data.secureSupport,
@@ -312,7 +315,10 @@ export function PostComment(props) {
312
315
  let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
313
316
  return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
314
317
  };
315
- const isSubmitDisabled = isReplyDisabled() || isCommentEmpty || isPostCommentDisabled;
318
+ const isSubmitDisabled = isReplyDisabled() ||
319
+ isCommentEmpty ||
320
+ isPostCommentDisabled ||
321
+ (isConfirmedStateSideSupport && !cssCommentAgreed);
316
322
  return (React.createElement("div", { className: `pf-v5-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
317
323
  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
318
324
  ? 'Add a comment using markdown'
@@ -328,6 +334,7 @@ export function PostComment(props) {
328
334
  isUploadingFile: isMarkdownFileUploadInProgress,
329
335
  onClipboardPaste,
330
336
  } }),
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) })),
331
338
  isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
332
339
  isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
333
340
  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" },
@@ -1 +1 @@
1
- {"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAmCA,QAAA,MAAM,YAAY,mBA0KjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAmCA,QAAA,MAAM,YAAY,mBA+KjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -105,7 +105,7 @@ const RelatedTasks = () => {
105
105
  React.createElement(Th, null, columnNames.status),
106
106
  React.createElement(Th, null, columnNames.title))),
107
107
  React.createElement(Tbody, null, displayData.map((item) => (React.createElement(Tr, { key: item.id },
108
- React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer" }, item.id)) : (item.id)),
108
+ React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "related-tasks-issue-link" }, item.id)) : (item.id)),
109
109
  React.createElement(Td, { dataLabel: columnNames.type }, item.type),
110
110
  React.createElement(Td, { dataLabel: columnNames.status },
111
111
  React.createElement(Badge, { isRead: true }, item.status)),
@@ -1 +1 @@
1
- {"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAOnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAiEtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAOnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAkEtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -45,6 +45,6 @@ const CriticalSolutionsToast = (props) => {
45
45
  if (!showNotification && !rulesState.triggerRuleNotification)
46
46
  return null;
47
47
  return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('File recommendations are ready to view'), actionLinks: React.createElement(Button, { isInline: true, variant: "link", onClick: viewCriticalSolution, "data-tracking-id": "critical-solutions-alert-view" },
48
- React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }), timeout: caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT, "data-tracking-id": "critical-solutions-alert" }));
48
+ React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }), timeout: caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT, "data-tracking-id": "critical-solutions-alert", className: "critical-solutions-file-upload-alert" }));
49
49
  };
50
50
  export default CriticalSolutionsToast;
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA0PrC;kBA1PQ,eAAe;;;AA6PxB,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA2PrC;kBA3PQ,eAAe;;;AA8PxB,eAAe,eAAe,CAAC"}
@@ -239,7 +239,7 @@ function InsightsResults(props) {
239
239
  return (React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults, isRenderedMain: true }));
240
240
  }
241
241
  return (React.createElement(React.Fragment, null,
242
- !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
242
+ !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, variant: "custom", title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
243
243
  React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "file-recommendations-file-upload-alert" })),
244
244
  React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
245
245
  }
@@ -1 +1 @@
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
+ {"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,5 +1,6 @@
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';
3
4
  import isEqual from 'lodash/isEqual';
4
5
  import React, { Suspense, useContext, useState } from 'react';
5
6
  import { useTranslation } from 'react-i18next';
@@ -18,6 +19,8 @@ function WizardMain(props) {
18
19
  const { isCreatingCase } = useCaseSelector((state) => ({
19
20
  isCreatingCase: state.isCreatingCase,
20
21
  }), isEqual);
22
+ const { globalMetadataState: { troubleshootTraditionalSupportAgreed }, } = useContext(GlobalMetadataStateContext);
23
+ const globalDispatchContext = useGlobalDispatchContext();
21
24
  const { getStepsSequece } = useWizard(props.routeProps);
22
25
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
23
26
  const { t } = useTranslation();
@@ -40,6 +43,9 @@ function WizardMain(props) {
40
43
  setActiveSectionChanged(dispatchToRouteReducer, step.id);
41
44
  updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
42
45
  };
46
+ const onConfirmTraditionalSupportAgreement = () => {
47
+ updateTroubleshootTraditionalSupportAgreed(globalDispatchContext, true);
48
+ };
43
49
  const CustomFooter = (React.createElement(WizardFooter, null,
44
50
  React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
45
51
  return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext, onBack: onBack, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag) }));
@@ -48,6 +54,7 @@ function WizardMain(props) {
48
54
  // in useWizard file then add it to step squences in RouteConstNTypes
49
55
  const steps = getStepsSequece(showRestFlag);
50
56
  return (React.createElement(React.Fragment, null,
57
+ React.createElement(CSSUserModal, { onConfirmTraditionalSupportAgreement: onConfirmTraditionalSupportAgreement, display: !troubleshootTraditionalSupportAgreed }),
51
58
  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 })) })),
52
59
  React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
53
60
  }
@@ -280,6 +280,9 @@
280
280
 
281
281
  .popular-solutions {
282
282
  background-color: #286869 !important;
283
+ padding-top: 10px !important;
284
+ padding-bottom: 10px !important;
285
+
283
286
  .card-title {
284
287
  color: #fff !important;
285
288
  font-weight: 900;
@@ -586,7 +589,14 @@ span.pf-v5-c-input-group__text {
586
589
 
587
590
  .file-recommendations-file-upload-alert {
588
591
  .pf-v5-c-alert__icon {
589
- margin-top: 15px;
592
+ margin-top: 5px;
593
+ }
594
+ margin-bottom: 20px;
595
+ }
596
+
597
+ .critical-solutions-file-upload-alert {
598
+ .pf-v5-c-alert__icon {
599
+ margin-top: 5px;
590
600
  }
591
601
  }
592
602
 
@@ -618,6 +628,14 @@ button.pf-v5-c-toggle-group__button {
618
628
 
619
629
  .top-content-suggestion-accordion {
620
630
  .pf-v5-c-accordion__toggle {
621
- padding: 10px !important;
631
+ padding-top: 10px !important;
632
+ padding-bottom: 10px !important;
633
+ }
634
+ .pf-v5-c-accordion__expandable-content-body {
635
+ padding-top: 4px;
636
+ padding-bottom: 4px;
637
+ }
638
+ h3 {
639
+ color: black;
622
640
  }
623
641
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.56",
3
+ "version": "2.2.58",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -59,8 +59,8 @@
59
59
  "@patternfly/react-table": "^5.1.1",
60
60
  "@progress/kendo-drawing": "^1.6.0",
61
61
  "@progress/kendo-react-pdf": "^3.12.0",
62
- "@rh-support/components": "2.1.31",
63
- "@rh-support/react-context": "2.1.34",
62
+ "@rh-support/components": "2.1.32",
63
+ "@rh-support/react-context": "2.1.35",
64
64
  "@rh-support/types": "2.0.2",
65
65
  "@rh-support/user-permissions": "2.1.22",
66
66
  "@rh-support/utils": "2.1.15",
@@ -124,5 +124,5 @@
124
124
  "defaults and supports es6-module",
125
125
  "maintained node versions"
126
126
  ],
127
- "gitHead": "0be2733af553431eb0064993df8c0f097e12a47f"
127
+ "gitHead": "462d269eaba23f3e9b735caf2157f24f2a841da2"
128
128
  }