@rh-support/troubleshoot 2.1.11 → 2.1.13-beta-0

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.
Files changed (176) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.js +1 -1
  2. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -26
  5. package/lib/esm/components/AccountInfo/css/accountSelector.css +4 -0
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +8 -16
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -1
  9. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +2 -1
  11. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +4 -2
  13. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +4 -2
  15. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +4 -2
  17. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/CaseOverview/index.js +3 -1
  19. package/lib/esm/components/CaseEditView/PDFContainer.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/PDFContainer.js +3 -10
  21. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +3 -3
  23. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +1 -1
  24. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts +0 -1
  25. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.js +0 -1
  27. package/lib/esm/components/CaseEditView/ShareCase/PartnerCaseHelper.js +2 -2
  28. package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts +0 -2
  29. package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/ShareCase/TnC.js +2 -20
  31. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +5 -3
  33. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +119 -42
  35. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +2 -0
  37. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +5 -2
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +3 -1
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +8 -5
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts +9 -0
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map +1 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.js +69 -0
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +5 -3
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +3 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +4 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +5 -3
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -1
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +3 -1
  58. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  59. package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
  60. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  61. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +92 -29
  62. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts +1 -1
  63. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
  64. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +5 -8
  65. package/lib/esm/components/CaseInformation/FileDiag.d.ts +5 -1
  66. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  67. package/lib/esm/components/CaseInformation/FileDiag.js +2 -2
  68. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  69. package/lib/esm/components/CaseInformation/Fts.js +5 -3
  70. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  71. package/lib/esm/components/CaseInformation/Severity.js +3 -1
  72. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  73. package/lib/esm/components/CaseInformation/SupportLevel.js +2 -1
  74. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  75. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  76. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  77. package/lib/esm/components/CaseManagement/CaseManagement.js +4 -15
  78. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  79. package/lib/esm/components/CaseManagement/Cep.js +7 -5
  80. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  81. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +8 -4
  82. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.d.ts.map +1 -1
  83. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +5 -3
  84. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  85. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +7 -5
  86. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  87. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +1 -1
  88. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +1 -1
  89. package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
  90. package/lib/esm/components/EditDescription/EditDescription.js +4 -2
  91. package/lib/esm/components/IdeaInformation/IdeaInformtion.js +5 -5
  92. package/lib/esm/components/OpenCase/OpenCase.js +2 -2
  93. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  94. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +9 -1
  95. package/lib/esm/components/ProductSelector/AllProductsSelector.js +2 -2
  96. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  97. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -1
  98. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +1 -1
  99. package/lib/esm/components/ProductSelector/ProductSelector.js +2 -2
  100. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  101. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +6 -8
  102. package/lib/esm/components/Recommendations/AsideResults.js +1 -1
  103. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  104. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
  105. package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
  106. package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +6 -3
  107. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  108. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +1 -1
  109. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +1 -1
  110. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  111. package/lib/esm/components/Recommendations/RulesModal.js +25 -9
  112. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  113. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +2 -2
  114. package/lib/esm/components/Review/Review.js +3 -3
  115. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  116. package/lib/esm/components/SubmitCase/SubmitCase.js +9 -8
  117. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  118. package/lib/esm/components/Suggestions/Suggestions.js +2 -2
  119. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  120. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +30 -18
  121. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  122. package/lib/esm/components/shared/fileUpload/FileLister.js +17 -7
  123. package/lib/esm/components/shared/fileUpload/UploadButton.d.ts.map +1 -1
  124. package/lib/esm/components/shared/fileUpload/UploadButton.js +2 -1
  125. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  126. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +17 -3
  127. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -1
  128. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
  129. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts +2 -1
  130. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  131. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +28 -10
  132. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  133. package/lib/esm/components/shared/useIsSectionValid.js +26 -15
  134. package/lib/esm/components/shared/utils.d.ts +1 -0
  135. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  136. package/lib/esm/components/shared/utils.js +12 -0
  137. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  138. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +4 -0
  139. package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
  140. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  141. package/lib/esm/components/wizardLayout/WizardLayout.js +2 -2
  142. package/lib/esm/components/wizardLayout/WizardMain.js +1 -1
  143. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  144. package/lib/esm/components/wizardLayout/WizardNavigation.js +50 -4
  145. package/lib/esm/constants/caseDetailsConstants.d.ts +3 -0
  146. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  147. package/lib/esm/constants/caseDetailsConstants.js +3 -0
  148. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  149. package/lib/esm/hooks/useResetCaseCreate.js +3 -1
  150. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  151. package/lib/esm/hooks/useWizard.js +3 -2
  152. package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -2
  153. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  154. package/lib/esm/reducers/CaseConstNTypes.js +7 -4
  155. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  156. package/lib/esm/reducers/CaseHelpers.js +16 -8
  157. package/lib/esm/reducers/CaseReducer.d.ts +1 -1
  158. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  159. package/lib/esm/reducers/CaseReducer.js +9 -1
  160. package/lib/esm/scss/_main.scss +27 -221
  161. package/lib/esm/scss/_pf4-overrides.scss +90 -13
  162. package/lib/esm/utils/remoteRiderUtils.d.ts.map +1 -1
  163. package/lib/esm/utils/remoteRiderUtils.js +2 -2
  164. package/package.json +8 -8
  165. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts +0 -11
  166. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +0 -1
  167. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +0 -38
  168. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts +0 -15
  169. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +0 -1
  170. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +0 -106
  171. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts +0 -3
  172. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +0 -1
  173. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +0 -41
  174. package/lib/esm/constants/tncConstants.d.ts +0 -13
  175. package/lib/esm/constants/tncConstants.d.ts.map +0 -1
  176. package/lib/esm/constants/tncConstants.js +0 -12
@@ -10,30 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  // code replicated from legacy PCM<TnC.js>
11
11
  import hydrajs from '@cee-eng/hydrajs';
12
12
  import { ToastNotification } from '@rh-support/components';
13
- import { getText } from '@rh-support/utils';
13
+ import { baseTnCUrl, getText, TncConstants } from '@rh-support/utils';
14
14
  import get from 'lodash/get';
15
- import { TnC } from '../../../constants/tncConstants';
16
- export function getTnCHost() {
17
- const env = hydrajs.Env.getEnvName();
18
- switch (env) {
19
- case 'QA':
20
- return TnC.HOSTS.QA;
21
- case 'DEV':
22
- return TnC.HOSTS.DEV;
23
- case 'Stage':
24
- return TnC.HOSTS.Stage;
25
- default:
26
- return TnC.HOSTS.PROD;
27
- }
28
- }
29
- export function baseTnCUrl() {
30
- const wejava_host = getTnCHost();
31
- return `https://${wejava_host}/wapps/tnc/ackrequired`;
32
- }
33
15
  export function getTnCUrl(accountNumber) {
34
16
  const redirectUrl = encodeURIComponent(window.location.href + (accountNumber ? `?partnerAccountNumber=${accountNumber}` : ''));
35
17
  const cancelRedirectUrl = encodeURIComponent(window.location.href + `?rejectedTnC=true`);
36
- return `${baseTnCUrl()}?site=${TnC.PARTNER_SHARE_SITE_CODE}&event=${TnC.PARTNER_SHARE_EVENT_CODE}&redirect=${redirectUrl}&cancelRedirect=${cancelRedirectUrl}`;
18
+ return `${baseTnCUrl()}?site=${TncConstants.PARTNER_SHARE_SITE_CODE}&event=${TncConstants.PARTNER_SHARE_EVENT_CODE}&redirect=${redirectUrl}&cancelRedirect=${cancelRedirectUrl}`;
37
19
  }
38
20
  const removeQueryParams = (routeProps) => {
39
21
  routeProps.history.replace({ search: '' });
@@ -1 +1 @@
1
- {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAoBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAmIpC;kBAnIQ,cAAc;;;AAsIvB,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAqBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAyIpC;kBAzIQ,cAAc;;;AA4IvB,eAAe,cAAc,CAAC"}
@@ -18,6 +18,7 @@ import { Trans, useTranslation } from 'react-i18next';
18
18
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
19
19
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
20
20
  import { updateCaseDetails } from '../../../../reducers/CaseReducer';
21
+ import { PDFContext } from '../../PDFContainer';
21
22
  const defaultProps = {
22
23
  caseNumber: undefined,
23
24
  };
@@ -32,6 +33,7 @@ function CaseActionPlan(props) {
32
33
  const [actionPlanState, setActionPlan] = useState(actionPlan);
33
34
  const [formIsDirty, setFormIsDirty] = useState(false);
34
35
  const [isUpdating, setIsUpdating] = useState(false);
36
+ const { isExportingPDF } = useContext(PDFContext);
35
37
  useEffect(() => {
36
38
  if (actionPlan !== actionPlanState) {
37
39
  setActionPlan(actionPlanState);
@@ -83,11 +85,11 @@ function CaseActionPlan(props) {
83
85
  React.createElement(AlertMessage, { show: isInternalWithoutSFDCUser, variant: AlertType.WARNING, isInline: true, className: "pf-u-mb-lg", title: t('You need a Salesforce (SFDC) user to edit the action plan.') }),
84
86
  React.createElement("label", { htmlFor: "rha-action-plan", className: "sr-only" },
85
87
  React.createElement(Trans, null, "Action plan")),
86
- !canUpdateActionPlan && (React.createElement("pre", { "aria-label": t('Case Action Plan'), dangerouslySetInnerHTML: commentMarkdown(actionPlan) })),
88
+ !canUpdateActionPlan && (React.createElement("pre", { "aria-label": t('Case Action Plan'), dangerouslySetInnerHTML: commentMarkdown(actionPlan), style: { fontFamily: isExportingPDF ? 'DejaVu Sans' : '' } })),
87
89
  canUpdateActionPlan && (React.createElement("form", null,
88
- React.createElement("div", { className: "hide-in-pdf" },
90
+ React.createElement("div", { className: isExportingPDF ? 'hide-in-pdf' : '' },
89
91
  React.createElement(TextAreaResizable, { className: "form-control", id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 })),
90
- !isInternalWithoutSFDCUser && (React.createElement("div", { className: "hide-in-pdf push-top-narrow" },
92
+ !isInternalWithoutSFDCUser && (React.createElement("div", { className: `${isExportingPDF ? 'hide-in-pdf' : ''} push-top-narrow` },
91
93
  React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isActionPlanEmpty || isUpdating || !formIsDirty },
92
94
  React.createElement(Trans, null, "Submit"),
93
95
  " ",
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,gBA4IrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,sBAAsB,gBA+OrC"}
@@ -7,90 +7,167 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { InputGroupText, InputGroupTextVariant, Spinner, TextInput, TextInputGroup, ValidatedOptions, } from '@patternfly/react-core';
10
+ import { contacts } from '@cee-eng/hydrajs';
11
+ import { InputGroupText, InputGroupTextVariant, ValidatedOptions } from '@patternfly/react-core';
11
12
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
12
13
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
13
- import { NewInlineEdit, ToastNotification } from '@rh-support/components';
14
+ import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
14
15
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
16
+ import isEmpty from 'lodash/isEmpty';
15
17
  import isEqual from 'lodash/isEqual';
16
18
  import React, { useContext, useEffect, useState } from 'react';
17
19
  import { Trans, useTranslation } from 'react-i18next';
18
- import { PHONE_INSTRUCTION } from '../../../../constants/caseDetailsConstants';
20
+ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../../../constants/caseDetailsConstants';
19
21
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
20
22
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
21
23
  import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
22
24
  import { updateCaseDetails } from '../../../../reducers/CaseReducer';
23
25
  import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
26
+ import { PDFContext } from '../../PDFContainer';
24
27
  export function CaseContactPhoneNumber() {
25
- const { phone, caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating } = useCaseSelector((state) => ({
26
- phone: state.caseDetails.phone || '',
28
+ const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, phone, } = useCaseSelector((state) => ({
29
+ phoneCountryCode: state.caseDetails.phoneCountryCode || '',
30
+ phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
27
31
  caseNumber: state.caseDetails.caseNumber,
28
32
  contactSSOName: state.caseDetails.contactSSOName,
29
33
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
30
34
  isCaseOwnerUpdating: state.isCaseOwnerUpdating,
35
+ phone: state.caseDetails.phone,
31
36
  }), isEqual);
32
37
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
33
38
  const canEditCase = useCanEditCase();
34
39
  const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
35
- const [localPhoneState, setLocalPhoneState] = useState(phone);
40
+ const [localFullPhoneState, setLocalFullPhoneState] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
41
+ const [localCountryCodeState, setLocalCountryCodeState] = useState(phoneCountryCode);
42
+ const [invalid, setInvalid] = useState(false);
43
+ const [isSaveClicked, setIsSavedClicked] = useState(false);
44
+ const [isShowOldPhone, setIsShowOldPhone] = useState(false);
36
45
  const caseDispatch = useCaseDispatch();
37
46
  const caseUpdateError = useCaseUpdateErrorMessage();
38
47
  const { t } = useTranslation();
48
+ const { isExportingPDF } = useContext(PDFContext);
39
49
  // To handle phone change
40
- const onPhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
50
+ const onPhoneChange = (fullPhone) => __awaiter(this, void 0, void 0, function* () {
41
51
  if (canEditCase.alert())
42
52
  return;
43
- setLocalPhoneState(phone);
53
+ setLocalFullPhoneState(fullPhone);
44
54
  });
55
+ const onCountryCodeChange = (countryCode) => {
56
+ if (canEditCase.alert())
57
+ return;
58
+ setLocalCountryCodeState(countryCode);
59
+ };
45
60
  const onSave = () => __awaiter(this, void 0, void 0, function* () {
61
+ setIsSavedClicked(true);
62
+ if (isPhoneLineEmpty || isPhoneNumberInvalid)
63
+ return;
46
64
  setCasePhoneUpdating(true);
65
+ const phoneLine = localFullPhoneState
66
+ .substring(localCountryCodeState.length, localFullPhoneState.length)
67
+ .trim();
68
+ const countryCode = localCountryCodeState.trim();
47
69
  try {
48
- yield updateCaseDetails(caseDispatch, caseNumber, { phone: localPhoneState.trim() });
70
+ // update case contact info
71
+ yield updateCaseDetails(caseDispatch, caseNumber, Object.assign(Object.assign({ phoneCountryCode: countryCode, phoneAreaCodePrefixLineNumber: phoneLine }, (contactSSOName === loggedInUser.data.ssoUsername && { suppliedPhoneNumberVerified: 'True' })), (!countryCode && !phoneLine && { clearPhoneNumber: true, suppliedPhoneNumberVerified: 'False' })));
72
+ setIsSavedClicked(false);
49
73
  setCasePhoneUpdating(false);
50
74
  ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
75
+ try {
76
+ // update logged-in user contact info
77
+ if (contactSSOName === loggedInUser.data.ssoUsername) {
78
+ yield contacts.updateContactBySSO(loggedInUser.data.ssoUsername, Object.assign({ supportPhoneCountryCode: countryCode, supportPhoneAreaCodePrefixLineNumber: phoneLine }, (!countryCode && !phoneLine && { clearPhoneNumber: true })));
79
+ }
80
+ }
81
+ catch (e) {
82
+ // silently fails
83
+ }
51
84
  }
52
85
  catch (e) {
53
86
  setCasePhoneUpdating(false);
54
87
  caseUpdateError.showError(e, t(`Phone number failed to update`));
55
88
  }
56
89
  });
57
- const onCancel = () => {
58
- setLocalPhoneState(phone);
59
- };
60
- // Function to handle keyDown events
61
- const handleKeyDown = (e) => __awaiter(this, void 0, void 0, function* () {
62
- // Cancel on pressing esc
63
- if (e.keyCode === 27) {
64
- yield onCancel();
90
+ const onClear = () => __awaiter(this, void 0, void 0, function* () {
91
+ setLocalFullPhoneState('');
92
+ setLocalCountryCodeState('');
93
+ setCasePhoneUpdating(true);
94
+ try {
95
+ yield updateCaseDetails(caseDispatch, caseNumber, {
96
+ phoneCountryCode: '',
97
+ phoneAreaCodePrefixLineNumber: '',
98
+ clearPhoneNumber: true,
99
+ suppliedPhoneNumberVerified: 'False',
100
+ });
101
+ setCasePhoneUpdating(false);
102
+ ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
65
103
  }
66
- // Save on pressing enter
67
- else if (!isCasePhoneUpdating && e.keyCode === 13) {
68
- yield onSave();
104
+ catch (e) {
105
+ setCasePhoneUpdating(false);
106
+ caseUpdateError.showError(e, t(`Phone number failed to update`));
69
107
  }
70
108
  });
71
- useEffect(() => {
72
- setLocalPhoneState(phone);
73
- }, [phone]);
74
- const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
109
+ const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
75
110
  limit: PHONE_LIMIT,
76
111
  });
77
112
  const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
78
- return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
79
- React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-supplied-phone' }, labelContent: React.createElement(React.Fragment, null,
80
- React.createElement(Trans, null, "Case owner's phone number"),
81
- ContactPhoneNumberPopOver()), allowInlineEdit: false, hideSaveCancel: false, saveDisabled: isCasePhoneUpdating },
82
- React.createElement(TextInputGroup, null,
83
- React.createElement(TextInput, { value: localPhoneState || '', type: "text", className: "form-control", id: "case-details-supplied-phone", placeholder: "+1 555-555-5555", onChange: onPhoneChange, "data-tracking-id": "case-details-page-supplied-phone", isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, onKeyDown: handleKeyDown, validated: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT
84
- ? ValidatedOptions.error
85
- : isPhoneNeedsReview
86
- ? ValidatedOptions.warning
87
- : ValidatedOptions.default }),
88
- !isCasePhoneUpdating ? (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
89
- React.createElement("button", { className: "btn btn-app btn-link pf-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), disabled: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT || localPhoneState === phone },
90
- React.createElement(CheckIcon, null)),
91
- React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onCancel, "data-tracking-id": "case-details-page-supplied-phone-cancel" },
92
- React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
93
- React.createElement(Spinner, { isSVG: true, size: "lg", className: "pf-u-ml-2xl pf-u-mr-xl" })))),
94
- (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
95
- React.createElement(Trans, null, PHONE_INSTRUCTION))))));
113
+ // To check if country code is given but phone number empty
114
+ const isPhoneLineEmpty = !isEmpty(localFullPhoneState) && isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(localCountryCodeState, ''));
115
+ const isPhoneNumberInvalid = isEmpty(localCountryCodeState) && !isEmpty(localFullPhoneState);
116
+ const isPhoneNumberValid = (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
117
+ ? ValidatedOptions.error
118
+ : isPhoneNeedsReview
119
+ ? ValidatedOptions.warning
120
+ : isSaveClicked && (isPhoneLineEmpty || isPhoneNumberInvalid)
121
+ ? ValidatedOptions.error
122
+ : invalid
123
+ ? ValidatedOptions.error
124
+ : ValidatedOptions.default;
125
+ useEffect(() => {
126
+ var _a, _b;
127
+ if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(phone)) {
128
+ const oldPhoneline = ((_a = getPhoneObj(phone)) === null || _a === void 0 ? void 0 : _a.phoneLine) || '';
129
+ const oldCountryCode = ((_b = getPhoneObj(phone)) === null || _b === void 0 ? void 0 : _b.countryCode) || '';
130
+ if (oldPhoneline && oldCountryCode.replace('+', '')) {
131
+ setLocalFullPhoneState(oldCountryCode + ' ' + oldPhoneline);
132
+ }
133
+ else {
134
+ setIsShowOldPhone(true);
135
+ }
136
+ }
137
+ else {
138
+ setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
139
+ setIsShowOldPhone(false);
140
+ }
141
+ // eslint-disable-next-line react-hooks/exhaustive-deps
142
+ }, []);
143
+ return (React.createElement("div", { className: "form-group pf-u-pb-md", style: { minWidth: '200px' } },
144
+ React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
145
+ React.createElement(Trans, null, "Case owner's phone number"),
146
+ !isExportingPDF ? ContactPhoneNumberPopOver() : ''),
147
+ React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
148
+ React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
149
+ React.createElement("button", { className: "btn btn-app btn-link pf-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), disabled: (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
150
+ localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber ||
151
+ (isSaveClicked && (isPhoneLineEmpty || isPhoneNumberInvalid)), style: { display: isExportingPDF ? 'none' : '' } },
152
+ React.createElement(CheckIcon, null)),
153
+ React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isEmpty(localFullPhoneState) },
154
+ React.createElement(TimesIcon, { color: "#6A6E73" }))),
155
+ !invalid &&
156
+ (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) < PHONE_LIMIT &&
157
+ !(isPhoneLineEmpty && isSaveClicked) &&
158
+ !(isSaveClicked && isPhoneNumberInvalid) &&
159
+ !isShowOldPhone && (React.createElement("p", { className: "form-instructions" },
160
+ React.createElement(Trans, null, PHONE_INSTRUCTION))),
161
+ invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
162
+ React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
163
+ (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
164
+ isSaveClicked && isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
165
+ React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
166
+ isSaveClicked && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
167
+ React.createElement(Trans, null, PHONE_IS_NOT_VALID))),
168
+ isShowOldPhone && (React.createElement("p", { className: "form-instructions form-invalid" },
169
+ React.createElement(Trans, null,
170
+ "The phone number on case is ",
171
+ phone,
172
+ ". The format of the phone field is changed and this phone does not fit.")))));
96
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAiBnD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,eA+D1D"}
1
+ {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAkBnD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAgE1D"}
@@ -14,6 +14,7 @@ import { ShareWithPartner } from '../../ShareCase/PartnerShare';
14
14
  import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
15
15
  import CaseInternalStatus from './CaseInternalStatus';
16
16
  import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
17
+ import { CasePhoneNumberSev1ConfirmAlert } from './CasePhoneNumberSev1ConfirmAlert';
17
18
  import CaseReferenceNumber from './CaseReferenceNumber';
18
19
  import CaseSbrGroups from './CaseSbrGroups';
19
20
  export default function CaseDetailsManagement(props) {
@@ -38,6 +39,7 @@ export default function CaseDetailsManagement(props) {
38
39
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
39
40
  React.createElement(CaseContactPhoneNumber, null))),
40
41
  React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
42
+ React.createElement(CasePhoneNumberSev1ConfirmAlert, { isConfirm: true }),
41
43
  canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
42
44
  canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
43
45
  React.createElement(CaseGroup, null),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAY5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAMD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eAqKlC;kBArKQ,YAAY;;;AAwKrB,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAc5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAMD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA0KlC;kBA1KQ,YAAY;;;AA6KrB,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { accounts } from '@cee-eng/hydrajs';
11
11
  import { Popover, PopoverPosition, Spinner, Switch } from '@patternfly/react-core';
12
+ import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
12
13
  import { InlineEdit, LoadingIndicator, ToastNotification, useFetch, ValueChangedIcon } from '@rh-support/components';
13
14
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
14
15
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -21,6 +22,7 @@ import { HOSTNAME_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
21
22
  import { updateCaseDetails } from '../../../../reducers/CaseReducer';
22
23
  import { CaseValuesToWatch } from '../../../shared/Constants';
23
24
  import { getChangedValueTooltip } from '../../../shared/utils';
25
+ import { PDFContext } from '../../PDFContainer';
24
26
  const defaultProps = {
25
27
  inlineEditable: false,
26
28
  };
@@ -37,6 +39,7 @@ function CaseHostname(props) {
37
39
  const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
38
40
  const [isShareHostNamesChecked, setIsShareHostNamesChecked] = useState(false);
39
41
  const [isHostnamesLoading, setIsHostnamesLoading] = useState(true);
42
+ const { isExportingPDF } = useContext(PDFContext);
40
43
  const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
41
44
  const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
42
45
  const userOriginalHostnameValue = () => __awaiter(this, void 0, void 0, function* () {
@@ -107,8 +110,8 @@ function CaseHostname(props) {
107
110
  return (React.createElement(React.Fragment, null,
108
111
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
109
112
  React.createElement(Trans, null, "Hostname"),
110
- React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
111
- React.createElement("i", { "aria-label": "Hostname Info", className: "m-l-1 fa fa-question-circle" })), allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined },
113
+ React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
114
+ React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Hostname Info" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
112
115
  React.createElement("input", { type: "text", id: "case-details-hostname", className: `form-control${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: onHostnameChange, disabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
113
116
  lengthError && (React.createElement("div", { className: "pull-top" },
114
117
  React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA2BA,wBAAgB,sBAAsB,gBAgSrC"}
1
+ {"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA4BA,wBAAgB,sBAAsB,gBAmSrC"}
@@ -22,6 +22,7 @@ import { getIsClusterIdInvalid, isClusterIdEnabledForProduct, } from '../../../.
22
22
  import { NoClusterIDReasonSelector } from '../../../../CaseManagement/NoClusterIDReasonSelector';
23
23
  import { discoverV4ClusterIdLink, discoverV4ClusterIdLinkError, isInvalidErrorMessage, v3Tov4TransitionLink, } from '../../../../CaseManagement/OpenShiftClusterId';
24
24
  import { OpenshiftDropdownV4 } from '../../../../CaseManagement/OpenshiftDropdownV4';
25
+ import { PDFContext } from '../../../PDFContainer';
25
26
  export function CaseOpenshiftClusterId() {
26
27
  const caseUpdateError = useCaseUpdateErrorMessage();
27
28
  const { openshiftClusterID, product, version, caseNumber, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, selectedAccountDetails, description, } = useCaseSelector((state) => ({
@@ -52,6 +53,7 @@ export function CaseOpenshiftClusterId() {
52
53
  const previousSelectedReason = usePrevious(selectedReason);
53
54
  const previousProduct = usePrevious(product);
54
55
  const { t } = useTranslation();
56
+ const { isExportingPDF } = useContext(PDFContext);
55
57
  const clusterStateReset = () => {
56
58
  setSelectedReason('');
57
59
  setDontKnowSelected(false);
@@ -239,7 +241,7 @@ export function CaseOpenshiftClusterId() {
239
241
  }
240
242
  else {
241
243
  return (React.createElement(React.Fragment, null,
242
- React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
244
+ React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
243
245
  noClusterIdReasonExplanation !== 'v3-cluster' &&
244
246
  (dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
245
247
  React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
@@ -1 +1 @@
1
- {"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eA4FxD"}
1
+ {"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eAgGxD"}
@@ -21,10 +21,11 @@ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
21
21
  export function CaseContactPhoneNumberAlert(props) {
22
22
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
23
23
  const [isCaseUpdating, setCasUpdating] = useState(false);
24
- const { caseNumber, suppliedPhoneNumberVerified, contactSSOName } = useCaseSelector((state) => ({
24
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
25
25
  caseNumber: state.caseDetails.caseNumber,
26
26
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
27
27
  contactSSOName: state.caseDetails.contactSSOName,
28
+ severity: state.caseDetails.severity,
28
29
  }), isEqual);
29
30
  const { t } = useTranslation();
30
31
  const caseDispatch = useCaseDispatch();
@@ -44,19 +45,21 @@ export function CaseContactPhoneNumberAlert(props) {
44
45
  const goToPhoneField = () => {
45
46
  scrollIntoView(props.tabRef);
46
47
  };
47
- const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
48
+ const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername &&
49
+ suppliedPhoneNumberVerified === 'Deferred' &&
50
+ severity !== "1 (Urgent)" /* SEV_1 */; // we show another alert when sev is 1
51
+ const NEW_OWNER_MSG = 'You are the new owner for this case. Is the new phone number correct?';
48
52
  if (!isPhoneNeedsReview)
49
53
  return React.createElement(React.Fragment, null);
50
54
  return (React.createElement(React.Fragment, null, props.isReview ? (React.createElement(Alert, { className: "pf-u-mb-md", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
51
55
  React.createElement(Link, { replace: true, to: {
52
56
  pathname: `/case/${caseNumber}/management`,
53
- search: 'hello',
54
57
  }, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
55
58
  React.createElement(Trans, null, "Review phone number")),
56
59
  ] },
57
- React.createElement(Trans, null, "You are the new owner for this case. Is the new phone number correct?"))) : props.isConfirm ? (React.createElement(Alert, { isInline: true, className: "pf-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
60
+ React.createElement(Trans, null, NEW_OWNER_MSG))) : props.isConfirm ? (React.createElement(Alert, { isInline: true, className: "pf-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
58
61
  React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
59
62
  React.createElement(Trans, null, "Confirm phone number")),
60
63
  ] },
61
- React.createElement(Trans, null, "You are the new owner for this case. Is the new phone number correct?"))) : (React.createElement(React.Fragment, null))));
64
+ React.createElement(Trans, null, NEW_OWNER_MSG))) : (React.createElement(React.Fragment, null))));
62
65
  }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ isReview?: boolean;
4
+ isConfirm?: boolean;
5
+ tabRef?: React.MutableRefObject<HTMLDivElement>;
6
+ }
7
+ export declare function CasePhoneNumberSev1ConfirmAlert(props: IProps): JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=CasePhoneNumberSev1ConfirmAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CasePhoneNumberSev1ConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAMD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,eAgG5D"}
@@ -0,0 +1,69 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
11
+ import { ToastNotification } from '@rh-support/components';
12
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
+ import { scrollIntoView } from '@rh-support/utils';
14
+ import isEqual from 'lodash/isEqual';
15
+ import React, { useContext, useState } from 'react';
16
+ import { Trans, useTranslation } from 'react-i18next';
17
+ import { Link } from 'react-router-dom';
18
+ import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
19
+ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
20
+ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
21
+ /*
22
+ On case detail page when case owner changes the sevirity to sev1, this alert will be displayed
23
+ // what happens when partner changes ???
24
+ */
25
+ export function CasePhoneNumberSev1ConfirmAlert(props) {
26
+ const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
27
+ const [isCaseUpdating, setCasUpdating] = useState(false);
28
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
29
+ caseNumber: state.caseDetails.caseNumber,
30
+ suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
31
+ contactSSOName: state.caseDetails.contactSSOName,
32
+ severity: state.caseDetails.severity,
33
+ }), isEqual);
34
+ const { t } = useTranslation();
35
+ const caseDispatch = useCaseDispatch();
36
+ const caseUpdateError = useCaseUpdateErrorMessage();
37
+ const onCaseDetailsChange = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
38
+ setCasUpdating(true);
39
+ try {
40
+ yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
41
+ setCasUpdating(false);
42
+ ToastNotification.addSuccessMessage(t(`Phone number has been successfully confirmed`));
43
+ }
44
+ catch (e) {
45
+ setCasUpdating(false);
46
+ caseUpdateError.showError(e, t(`Phone number failed to be confirmed`));
47
+ }
48
+ });
49
+ const goToPhoneField = () => {
50
+ scrollIntoView(props.tabRef);
51
+ };
52
+ const isPhoneNeedsConfirm = contactSSOName === loggedInUser.data.ssoUsername &&
53
+ severity === "1 (Urgent)" /* SEV_1 */ &&
54
+ suppliedPhoneNumberVerified !== 'True';
55
+ const SEV1_MSG = 'This case severity is urgent. Please confirm the phone number we have on file is correct.';
56
+ if (!isPhoneNeedsConfirm)
57
+ return React.createElement(React.Fragment, null);
58
+ return (React.createElement(React.Fragment, null, props.isReview ? (React.createElement(Alert, { className: "pf-u-mb-md", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
59
+ React.createElement(Link, { replace: true, to: {
60
+ pathname: `/case/${caseNumber}/management`,
61
+ }, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
62
+ React.createElement(Trans, null, "Review phone number")),
63
+ ] },
64
+ React.createElement(Trans, null, SEV1_MSG))) : props.isConfirm ? (React.createElement(Alert, { isInline: true, className: "pf-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
65
+ React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
66
+ React.createElement(Trans, null, "Confirm phone number")),
67
+ ] },
68
+ React.createElement(Trans, null, SEV1_MSG))) : (React.createElement(React.Fragment, null))));
69
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"AA2BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAsLxD"}
1
+ {"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA6LxD"}
@@ -14,7 +14,7 @@ import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
14
14
  import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/components';
15
15
  import { useCanEditCase } from '@rh-support/react-context';
16
16
  import isEqual from 'lodash/isEqual';
17
- import React, { useEffect, useState } from 'react';
17
+ import React, { useContext, useEffect, useState } from 'react';
18
18
  import { Trans, useTranslation } from 'react-i18next';
19
19
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
20
20
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
@@ -22,6 +22,7 @@ import { CASE_REFERENCE_NUMBER_LIMIT } from '../../../../reducers/CaseConstNType
22
22
  import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
23
23
  import { CaseValuesToWatch } from '../../../shared/Constants';
24
24
  import { getChangedValueTooltip } from '../../../shared/utils';
25
+ import { PDFContext } from '../../PDFContainer';
25
26
  export default function CaseReferenceNumber(props) {
26
27
  const { hideSaveCancel = true, inlineEditable = true } = props;
27
28
  const { t } = useTranslation();
@@ -33,6 +34,7 @@ export default function CaseReferenceNumber(props) {
33
34
  const caseDispatch = useCaseDispatch();
34
35
  const [isUpdating, setIsUpdating] = useState(false);
35
36
  const [referenceNumberState, setReferenceNumberState] = useState(referenceNumber);
37
+ const { isExportingPDF } = useContext(PDFContext);
36
38
  // value changed logic to show a none local type change
37
39
  const [localRefNumberChange, setLocalRefNumberChange] = useState(false);
38
40
  const afterLocalChange = () => setLocalRefNumberChange(false);
@@ -103,8 +105,8 @@ export default function CaseReferenceNumber(props) {
103
105
  React.createElement(Trans, null, "Personal reference number"),
104
106
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localRefNumberChange, value: referenceNumber, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
105
107
  ' ',
106
- React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
107
- React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
108
+ !isExportingPDF ? (React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
109
+ React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))) : ('')), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
108
110
  React.createElement(TextInputGroup, null,
109
111
  React.createElement(TextInput, { value: referenceNumberState, type: "text", className: "form-control", id: "case-details-reference-number", placeholder: t(`Enter the reference number used personally or within your company`), onChange: onReferenceNumberChange, "data-tracking-id": "case-details-reference-number", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) > CASE_REFERENCE_NUMBER_LIMIT
110
112
  ? ValidatedOptions.error
@@ -1 +1 @@
1
- {"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAgRrC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAmRrC;AAED,eAAe,eAAe,CAAC"}
@@ -20,6 +20,7 @@ import { Trans, useTranslation } from 'react-i18next';
20
20
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
21
21
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
22
22
  import { getVersionsDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
23
+ import { PDFContext } from '../../PDFContainer';
23
24
  const getVersions = (products, product) => {
24
25
  const allProductsIndex = findIndex(products, (p) => p.product === product);
25
26
  return allProductsIndex !== -1 ? products[allProductsIndex].versions || [] : [];
@@ -56,6 +57,7 @@ function ProductNVersion(props) {
56
57
  const [selectedProductLocal, setSelectedProductLocal] = useState(product);
57
58
  const [selectedVersionLocal, setSelectedVersionLocal] = useState(version);
58
59
  const canEditCase = useCanEditCase();
60
+ const { isExportingPDF } = useContext(PDFContext);
59
61
  useEffect(() => {
60
62
  setVersions(productVersions);
61
63
  if ((productVersions === null || productVersions === void 0 ? void 0 : productVersions.length) && !selectedVersionLocal && (productVersions === null || productVersions === void 0 ? void 0 : productVersions.length) < 2)
@@ -215,7 +217,7 @@ function ProductNVersion(props) {
215
217
  selectedVersion: selectedVersionLocal,
216
218
  isTopProduct: checkIsTopProduct(allProducts.data.productsResult, product),
217
219
  isEntitledProduct: true,
218
- }, { labelKey: 'product' }), list: toOptions(filter(allProducts.data.productsResult, (p) => p.isEntitledProduct), { labelKey: 'product' }), title: t(`Select a product`), disabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), isInValid: isProductInvalid, onChange: onProductChange, isLoadingList: isProductUpdating, "data-tracking-id": "case-details-product-selector", onOuterClick: onOuterClick, searchable: true, onClearSelection: onProductClear })),
220
+ }, { labelKey: 'product' }), list: toOptions(filter(allProducts.data.productsResult, (p) => p.isEntitledProduct), { labelKey: 'product' }), title: t(`Select a product`), disabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), isInValid: isProductInvalid, onChange: onProductChange, isLoadingList: isProductUpdating, "data-tracking-id": "case-details-product-selector", onOuterClick: onOuterClick, searchable: true, onClearSelection: onProductClear, isExportingPDF: isExportingPDF })),
219
221
  React.createElement("div", { className: "version-selector-wrapper" },
220
222
  React.createElement("label", { htmlFor: "version-dropdown" },
221
223
  React.createElement(Trans, null, "Version")),