@rh-support/troubleshoot 2.1.12 → 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 -15
  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 -17
  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
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"AAuBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAQD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eAwL7B;kBAxLQ,OAAO;;;AA2LhB,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"AAwBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAQD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eA2L7B;kBA3LQ,OAAO;;;AA8LhB,eAAe,OAAO,CAAC"}
@@ -14,12 +14,13 @@ import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/
14
14
  import { useCanEditCase } from '@rh-support/react-context';
15
15
  import isEmpty from 'lodash/isEmpty';
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';
21
21
  import { SUMMARY_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
22
22
  import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
23
+ import { PDFContext } from '../../PDFContainer';
23
24
  const defaultProps = {
24
25
  inlineEditable: true,
25
26
  hideLabel: false,
@@ -33,6 +34,7 @@ function Summary(props) {
33
34
  caseNumber: state.caseDetails.caseNumber,
34
35
  }), isEqual);
35
36
  const caseDispatch = useCaseDispatch();
37
+ const { isExportingPDF } = useContext(PDFContext);
36
38
  const [summaryState, setSummaryState] = useState(summary);
37
39
  const [isSummaryUpdating, setIsSummaryUpdating] = useState(false);
38
40
  const canEditCase = useCanEditCase();
@@ -124,7 +126,7 @@ function Summary(props) {
124
126
  React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
125
127
  React.createElement(Trans, null, "Issue summary"),
126
128
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
127
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
129
+ React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
128
130
  React.createElement(TextInputGroup, null,
129
131
  React.createElement(TextInput, { type: "text", id: "case-details-summary", className: 'form-control', "aria-required": true, required: true, name: "case-details-summary", value: summaryState, onChange: onSummaryChange, isDisabled: isSummaryUpdating, "data-tracking-id": "case-details-summary", onKeyDown: handleKeyDown, validated: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) > SUMMARY_LENGTH_LIMIT || isSummaryEmpty
130
132
  ? ValidatedOptions.error
@@ -1 +1 @@
1
- {"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAiThB,CAAC;AAEH,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAqThB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -24,6 +24,7 @@ import isEmpty from 'lodash/isEmpty';
24
24
  import React, { useContext, useState } from 'react';
25
25
  import { Trans, useTranslation } from 'react-i18next';
26
26
  import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
27
+ import { PDFContext } from '../../PDFContainer';
27
28
  import { DiscussionItemLink } from './DiscussionItemLink';
28
29
  import { JumpAndCopyLink } from './JumpAndCopyLink';
29
30
  const CaseComments = React.forwardRef((props, ref) => {
@@ -36,6 +37,7 @@ const CaseComments = React.forwardRef((props, ref) => {
36
37
  props.comment.isPublic &&
37
38
  props.comment.createdBy !== 'Automated Support Assistant';
38
39
  const [isFeedbackUpdating, setIsFeedbackUpdating] = useState(false);
40
+ const { isExportingPDF } = useContext(PDFContext);
39
41
  const commentReply = (comment) => () => {
40
42
  props.onReply(comment.commentBody, comment.createdBy, comment.isPublic);
41
43
  };
@@ -175,10 +177,10 @@ const CaseComments = React.forwardRef((props, ref) => {
175
177
  return (React.createElement("div", { className: "push-top-narrow comment-markdown-text", dangerouslySetInnerHTML: commentMarkdown(comment.commentBody) }));
176
178
  }
177
179
  else if (!isEmpty(comment.commentBody) && comment.contentType === EditorMode.PLAIN) {
178
- return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(parseComment) }));
180
+ return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(parseComment), style: { fontFamily: isExportingPDF ? 'DejaVu Sans' : '' } }));
179
181
  }
180
182
  else {
181
- return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(parseComment) }));
183
+ return (React.createElement("pre", { className: "push-top-narrow comment-plaintext reset-pre-text", dangerouslySetInnerHTML: commentText(parseComment), style: { fontFamily: isExportingPDF ? 'DejaVu Sans' : '' } }));
182
184
  }
183
185
  };
184
186
  if (!((_a = props.comment) === null || _a === void 0 ? void 0 : _a.isPublic) && !canSeePrivateComments)
@@ -202,7 +204,7 @@ const CaseComments = React.forwardRef((props, ref) => {
202
204
  React.createElement("span", { className: "pull-right pf-l-flex pf-m-align-items-center" },
203
205
  props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.comment.id), discussionType: DiscussionType.COMMENT, itemId: props.comment.id, caseNumber: caseNumber, isCopyLink: false },
204
206
  React.createElement(Trans, null, "Jump to comment"))),
205
- React.createElement("button", { onClick: commentReply(props.comment), className: "btn btn-app btn-link", "data-tracking-id": "case-comment-reply" },
207
+ React.createElement("button", { onClick: commentReply(props.comment), className: `btn btn-app btn-link ${isExportingPDF ? 'hide-in-pdf' : ''}`, "data-tracking-id": "case-comment-reply" },
206
208
  React.createElement(Trans, null, "Reply")),
207
209
  React.createElement(JumpAndCopyLink, { caseNumber: caseNumber, cardId: props.comment.id, discussionType: DiscussionType.COMMENT })))));
208
210
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAmB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eAqgBnD"}
1
+ {"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAmB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eAygBnD"}
@@ -312,7 +312,7 @@ export default function CaseDiscussion(props) {
312
312
  !caseFeedbacksHydra.isFetching &&
313
313
  !caseExternalTrackersUpdate.isFetching &&
314
314
  allDiscussions.length !== 0 && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading comments. Try refreshing.') } },
315
- React.createElement("div", { className: "pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom hide-in-pdf" },
315
+ React.createElement("div", { className: `pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom ${isExportingPDF ? 'hide-in-pdf' : ''}` },
316
316
  React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: computeFilteredComments || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
317
317
  React.createElement("span", { className: "push-top-narrow" },
318
318
  React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a filter'), list.filter((i) => i.isSelected).map((i) => i.filterLabel), ' ', list.length, t('All comments')), "data-tracking-id": "discussions-filter-comments-dropdown", id: "case-list-comments-dropdown", label: t('Filter by'), title: t('Filter by'), onChange: onFilterChange, selectedItems: toOptions(list.filter((item) => item.isSelected), {
@@ -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;AAqB5F,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,eA4fxC"}
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"}
@@ -30,6 +30,7 @@ import { markdownFilePasteEvent } from '../../../shared/Constants';
30
30
  import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles, hasSomeUnUploadedAttachments, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
31
31
  import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
32
32
  import FileUpload from '../../../shared/fileUpload/FileUpload';
33
+ import { PDFContext } from '../../PDFContainer';
33
34
  import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
34
35
  import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
35
36
  export function PostComment(props) {
@@ -53,6 +54,7 @@ export function PostComment(props) {
53
54
  const hasSomeSelectedFilesLocal = hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles);
54
55
  const [commentType, setCommentType] = useState(EditorMode.PLAIN);
55
56
  const [commentSignature, setCommentSignature] = useState('');
57
+ const { isExportingPDF } = useContext(PDFContext);
56
58
  const { getCommentTypeFromPreference, getCommentSignature } = useUserPreferences();
57
59
  const userOriginalCommentPrefs = () => __awaiter(this, void 0, void 0, function* () {
58
60
  try {
@@ -311,7 +313,7 @@ export function PostComment(props) {
311
313
  return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
312
314
  };
313
315
  const isSubmitDisabled = isReplyDisabled() || isCommentEmpty || isPostCommentDisabled;
314
- return (React.createElement("div", { className: "pf-u-mb-md hide-in-pdf", ref: componentRef },
316
+ return (React.createElement("div", { className: `pf-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
315
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
316
318
  ? 'Add a comment using markdown'
317
319
  : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic || !canPostPrivateComments
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAyGpD"}
1
+ {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eA8GpD"}
@@ -60,14 +60,14 @@ export default function CaseInformation(props) {
60
60
  ]);
61
61
  return (React.createElement(React.Fragment, null,
62
62
  React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
63
- React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "push-top", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError() }),
64
- React.createElement(AlertMessage, { show: !canManageCase(loggedInUserJwtToken), variant: AlertType.DANGER, className: "push-top" },
63
+ React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-u-mt-lg", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError() }),
64
+ React.createElement(AlertMessage, { show: !canManageCase(loggedInUserJwtToken), variant: AlertType.DANGER, className: "pf-u-mt-lg" },
65
65
  React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
66
66
  "You need additional access to manage cases.\u00A0 Please contact",
67
67
  ' ',
68
68
  React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
69
69
  " for assistance.")),
70
- React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "push-top", isInline: true },
70
+ React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "pf-u-mt-lg", isInline: true },
71
71
  React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
72
72
  "You need a valid entitlement to create a case.\u00A0 Please contact",
73
73
  ' ',
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,gBAiDjC"}
1
+ {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB,gBA2JjC"}
@@ -1,46 +1,109 @@
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 { TextInput, ValidatedOptions } from '@patternfly/react-core';
1
+ import { ValidatedOptions } from '@patternfly/react-core';
2
+ import { getPhoneObj, PhoneInput } from '@rh-support/components';
3
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
+ import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
11
5
  import isEmpty from 'lodash/isEmpty';
12
6
  import isEqual from 'lodash/isEqual';
13
- import React from 'react';
7
+ import React, { useContext, useEffect, useState } from 'react';
14
8
  import { Trans, useTranslation } from 'react-i18next';
15
- import { PHONE_INSTRUCTION } from '../../constants/caseDetailsConstants';
9
+ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
16
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
+ import { RouteContext } from '../../context/RouteContext';
17
12
  import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
18
13
  import { setCaseDetails } from '../../reducers/CaseReducer';
19
14
  import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
20
15
  export function ContactPhoneNumber() {
21
- var _a;
22
- const { caseDetails } = useCaseSelector((state) => ({
23
- caseDetails: state.caseDetails,
24
- selectedOwner: state.selectedOwner,
16
+ const { suppliedPhoneNumberVerified, severity, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', } = useCaseSelector((state) => ({
17
+ suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
18
+ severity: state.caseDetails.severity,
19
+ phoneCountryCode: state.caseDetails.phoneCountryCode,
20
+ phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
25
21
  }), isEqual);
22
+ const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
23
+ const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
24
+ const [invalid, setInvalid] = useState(false);
25
+ const [localFullPhone, setLocalFullPhone] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
26
+ const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
27
+ const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
26
28
  const caseDispatch = useCaseDispatch();
27
29
  const { t } = useTranslation();
28
- const handlePhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
29
- setCaseDetails(caseDispatch, { phone: phone.trim() });
30
- });
31
- const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
30
+ const onPhoneChange = (fullPhone) => {
31
+ setLocalFullPhone(fullPhone);
32
+ if (isEmpty(fullPhone)) {
33
+ setInvalid(false);
34
+ }
35
+ setCaseDetails(caseDispatch, {
36
+ phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
37
+ phoneCountryCode: getPhoneObj(fullPhone).countryCode,
38
+ });
39
+ };
40
+ const onCountryCodeChange = (phoneCountryCode) => {
41
+ setCaseDetails(caseDispatch, { phoneCountryCode });
42
+ };
43
+ const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
32
44
  limit: PHONE_LIMIT,
33
45
  });
46
+ const isPhoneNumberInvalid = isEmpty(phoneCountryCode.replace('+', '')) && !isEmpty(phoneAreaCodePrefixLineNumber);
47
+ // To check if country code is given but phone number empty
48
+ const isPhoneNumberEmpty = !isEmpty(phoneCountryCode.replace('+', '')) &&
49
+ isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
50
+ const isPhoneNumberValid = getPhone().length > PHONE_LIMIT
51
+ ? ValidatedOptions.error
52
+ : severity === "1 (Urgent)" /* SEV_1 */ && isEmpty(suppliedPhoneNumberVerified)
53
+ ? ValidatedOptions.warning
54
+ : isNextBtnClickedToShowValidationError && (isPhoneNumberEmpty || isPhoneNumberInvalid)
55
+ ? ValidatedOptions.error
56
+ : invalid
57
+ ? ValidatedOptions.error
58
+ : ValidatedOptions.default;
59
+ useEffect(() => {
60
+ // when canChangeAccountInfo is false OwnerSelector is hidden
61
+ // need to set phone on load here instead of OwnerSelector
62
+ if (!canChangeAccountInfo) {
63
+ if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
64
+ setCaseDetails(caseDispatch, {
65
+ phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
66
+ phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
67
+ suppliedPhoneNumberVerified: 'True',
68
+ });
69
+ }
70
+ else {
71
+ const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
72
+ const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
73
+ setCaseDetails(caseDispatch, {
74
+ phoneAreaCodePrefixLineNumber: phoneLine,
75
+ phoneCountryCode: countryCode,
76
+ suppliedPhoneNumberVerified: phoneLine && countryCode ? 'True' : 'False',
77
+ });
78
+ }
79
+ }
80
+ setLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
81
+ // eslint-disable-next-line react-hooks/exhaustive-deps
82
+ }, [phoneAreaCodePrefixLineNumber, phoneCountryCode, loggedInUser.data]);
83
+ useEffect(() => {
84
+ if (isEqual(localFullPhone.trim(), '+')) {
85
+ setLocalFullPhone('');
86
+ }
87
+ else if (!isEmpty(localFullPhone) && !localFullPhone.startsWith('+')) {
88
+ setLocalFullPhone('+' + localFullPhone.replace(' ', ''));
89
+ }
90
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91
+ }, [localFullPhone]);
34
92
  return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
35
- React.createElement("h3", { className: "subheading subheading-sm" },
93
+ React.createElement("label", null,
36
94
  React.createElement(Trans, null, "Case owner's phone number"),
37
95
  ContactPhoneNumberPopOver()),
38
- React.createElement(TextInput, { id: "case-phone-number", placeholder: "+1 555-555-5555", value: caseDetails.phone, onChange: handlePhoneChange, validated: ((_a = caseDetails.phone) === null || _a === void 0 ? void 0 : _a.length) > PHONE_LIMIT
39
- ? ValidatedOptions.error
40
- : caseDetails.severity === "1 (Urgent)" /* SEV_1 */ &&
41
- isEmpty(caseDetails.suppliedPhoneNumberVerified)
42
- ? ValidatedOptions.warning
43
- : ValidatedOptions.default }),
44
- caseDetails.phone.length > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
45
- React.createElement(Trans, null, PHONE_INSTRUCTION)))));
96
+ React.createElement(PhoneInput, { phoneValue: localFullPhone, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid }),
97
+ !invalid &&
98
+ getPhone().length < PHONE_LIMIT &&
99
+ !(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
100
+ !(isNextBtnClickedToShowValidationError && isPhoneNumberInvalid) && (React.createElement("p", { className: "form-instructions" },
101
+ React.createElement(Trans, null, PHONE_INSTRUCTION))),
102
+ invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
103
+ React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
104
+ getPhone().length > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
105
+ isPhoneNumberEmpty && isNextBtnClickedToShowValidationError && (React.createElement("p", { className: "form-instructions form-invalid" },
106
+ React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
107
+ isNextBtnClickedToShowValidationError && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
108
+ React.createElement(Trans, null, PHONE_IS_NOT_VALID)))));
46
109
  }
@@ -1,2 +1,2 @@
1
- export declare function ContactPhoneNumberPopOver(): JSX.Element;
1
+ export declare const ContactPhoneNumberPopOver: () => JSX.Element;
2
2
  //# sourceMappingURL=ContactPhoneNumberPopOver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAIA,wBAAgB,yBAAyB,gBA2BxC"}
1
+ {"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,mBAerC,CAAC"}
@@ -1,12 +1,9 @@
1
1
  import { Popover, PopoverPosition } from '@patternfly/react-core';
2
+ import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
2
3
  import React from 'react';
3
4
  import { Trans } from 'react-i18next';
4
- export function ContactPhoneNumberPopOver() {
5
+ export const ContactPhoneNumberPopOver = () => {
5
6
  return (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
6
- React.createElement(Trans, null,
7
- "These changes to your phone number affect only this case. To update your phone number for all future cases, go to",
8
- ' ',
9
- React.createElement("a", { href: "https://www.redhat.com/wapps/ugc/protected/personalInfo.html", "data-tracking-id": "case-contact-phone-number-account-details", target: "_blank", rel: "noopener noreferrer" }, "your account details"),
10
- ".")), closeBtnAriaLabel: "Close" },
11
- React.createElement("i", { "aria-label": "Support Severity Level info", className: "fa fa-question-circle" })));
12
- }
7
+ React.createElement(Trans, null, "These changes to your phone number affect only this case.")), closeBtnAriaLabel: "Close" },
8
+ React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Contact Phone Number Info" })));
9
+ };
@@ -1,2 +1,6 @@
1
- export declare function FileDiag(): JSX.Element;
1
+ interface IProps {
2
+ className?: string;
3
+ }
4
+ export declare function FileDiag(props: IProps): JSX.Element;
5
+ export {};
2
6
  //# sourceMappingURL=FileDiag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"AAYA,wBAAgB,QAAQ,gBAgCvB"}
1
+ {"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAiCrC"}
@@ -8,7 +8,7 @@ import { RulesStateContext } from '../../context/RulesContext';
8
8
  import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
9
9
  import FileEARule, { getValidAttachmentRules } from '../ImproveCase/FileEARule';
10
10
  import { WidgetFileUploader } from '../shared/fileUpload/WidgetFileUploader';
11
- export function FileDiag() {
11
+ export function FileDiag(props) {
12
12
  const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
13
13
  const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
14
14
  const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
@@ -19,5 +19,5 @@ export function FileDiag() {
19
19
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
20
20
  if (!canAddAttachments)
21
21
  return null;
22
- return (React.createElement(WidgetFileUploader, { idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : true, isSessionId: true, isSecureSupport: loggedInUsersAccount.data.secureSupport, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
22
+ return (React.createElement(WidgetFileUploader, { className: props.className, idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : true, isSessionId: true, isSecureSupport: loggedInUsersAccount.data.secureSupport, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,eAkLzB;kBAlLQ,GAAG;;;AAqLZ,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAoBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,eAsLzB;kBAtLQ,GAAG;;;AAyLZ,eAAe,GAAG,CAAC"}
@@ -12,12 +12,13 @@ import { useCanEditCase } from '@rh-support/react-context';
12
12
  import { isFtsEditableOnEditPage, PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage, } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import isEqual from 'lodash/isEqual';
15
- import React, { useEffect, useState } from 'react';
15
+ import React, { useContext, useEffect, useState } from 'react';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
17
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
18
18
  import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
19
19
  import { CONTACT_INFO_24X7_LIMIT } from '../../reducers/CaseConstNTypes';
20
20
  import { setCaseDetails, updateCaseDetails } from '../../reducers/CaseReducer';
21
+ import { PDFContext } from '../CaseEditView/PDFContainer';
21
22
  const defaultProps = {
22
23
  inlineEditable: false,
23
24
  hideSaveCancel: false,
@@ -35,6 +36,7 @@ function Fts(props) {
35
36
  caseType: state.caseDetails.caseType,
36
37
  }), isEqual);
37
38
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
39
+ const { isExportingPDF } = useContext(PDFContext);
38
40
  const caseDispatch = useCaseDispatch();
39
41
  const oldFts = usePrevious(fts);
40
42
  const onCaseDetailsChange = (caseDetails) => {
@@ -132,13 +134,13 @@ function Fts(props) {
132
134
  // To disable save button if field is empty or is updating
133
135
  const isSaveDisabled = contactInfo24X7State === contactInfo24x7 || isFtsContactUpdating;
134
136
  return (React.createElement(React.Fragment, null,
135
- React.createElement("div", { className: "form-group push-top" },
137
+ React.createElement("div", { className: "form-group pf-u-mb-md" },
136
138
  React.createElement("input", { type: "checkbox", id: "get-support-fts", "data-tracking-id": "get-support-fts", disabled: disableFtsNContact, name: "get-support-fts", checked: fts, onChange: onFtsChange }),
137
139
  React.createElement("label", { htmlFor: "get-support-fts" },
138
140
  React.createElement(Trans, null, "24x7 Support")),
139
141
  React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-u-ml-sm" })),
140
142
  fts === true && (React.createElement(React.Fragment, null,
141
- React.createElement(InlineEdit, { labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined },
143
+ React.createElement(InlineEdit, { formClassName: "pf-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
142
144
  React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: onFtsContactChange, disabled: disableFtsNContact, "data-tracking-id": "get-support-24-7-contact" }),
143
145
  React.createElement("p", { className: "form-instructions" },
144
146
  React.createElement(Trans, null, "Please provide contact information where you can be reached at any time to help you with your case."))),
@@ -1 +1 @@
1
- {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAwBrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAqR9B;kBArRQ,QAAQ;;;AAuRjB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAyBrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAuR9B;kBAvRQ,QAAQ;;;AAyRjB,eAAe,QAAQ,CAAC"}
@@ -14,6 +14,7 @@ import { Trans, useTranslation } from 'react-i18next';
14
14
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
15
15
  import { getIrtForSLAAndSeverity, getOrtForSLAAndSeverity, getSeverityDescription } from '../../reducers/CaseHelpers';
16
16
  import { setCaseDetails } from '../../reducers/CaseReducer';
17
+ import { PDFContext } from '../CaseEditView/PDFContainer';
17
18
  import { CaseValuesToWatch } from '../shared/Constants';
18
19
  import { getChangedValueTooltip } from '../shared/utils';
19
20
  import UpdateSeverityModal from '../UpdateSeverityModal/UpdateSeverityModal';
@@ -35,6 +36,7 @@ function Severity(props) {
35
36
  versionsDetails: state.versionsDetails,
36
37
  }), isEqual);
37
38
  const { globalMetadataState: { allCaseSeverities, allProducts }, } = useContext(GlobalMetadataStateContext);
39
+ const { isExportingPDF } = useContext(PDFContext);
38
40
  const [isSeverityInValid, setIsSeverityInValid] = useState(false);
39
41
  const [seviritiesOptions, setSeveritiesOptions] = useState([]);
40
42
  const [doNotShowIRT, setDoNotShowIRT] = useState(false);
@@ -153,7 +155,7 @@ function Severity(props) {
153
155
  React.createElement("label", null,
154
156
  React.createElement(Trans, null, "Severity")),
155
157
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: valueComparator, isLocalChange: localSeverityChange, value: doesDropdownSeverityEqualSeverity ? selectedSeverity : null, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.severity, (v) => v.name) }),
156
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"),
158
+ React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
157
159
  !!props.showSeverityInfoIcon && (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
158
160
  React.createElement(Trans, null, "To learn more view the"),
159
161
  ' ',
@@ -1 +1 @@
1
- {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAU5D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA4HlC;kBA5HQ,YAAY;;;AA8HrB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAU5D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA4HlC;kBA5HQ,YAAY;;;AA8HrB,eAAe,YAAY,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Popover, PopoverPosition, Select, SelectOption, SelectVariant, ValidatedOptions, } from '@patternfly/react-core';
2
+ import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
2
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
4
  import { showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
4
5
  import isEmpty from 'lodash/isEmpty';
@@ -81,7 +82,7 @@ function SupportLevel(props) {
81
82
  "Learn more about our",
82
83
  ' ',
83
84
  React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
84
- React.createElement("i", { "aria-label": "Support Level info", className: "fa fa-question-circle" })),
85
+ React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Support Level Info" })),
85
86
  React.createElement(Select, { variant: SelectVariant.single, "aria-label": t('Select Support Level'), onToggle: onToggle, onSelect: onEntitlementChange, selections: selectedSla, isOpen: isOpen, "aria-labelledby": 'get-support-supportLevel', isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), validated: isSupportLevelInValid ? ValidatedOptions.error : ValidatedOptions.default, "data-tracking-id": "get-support-supportLevel" }, getSlaList().map((sla, index) => (React.createElement(SelectOption, { key: index, value: sla })))),
86
87
  isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
87
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,MAAM;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,eA4FzD"}
1
+ {"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,MAAM;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,eA8FzD"}
@@ -38,6 +38,7 @@ export default function CaseLanguageSelector(props) {
38
38
  if (!props.isManageStep || !isEmpty(caseLanguage) || isLoadingLang || !canUseLanguageDetection)
39
39
  return;
40
40
  setDetectedLanguage(caseDispatch, summary, getDescriptionWOQues(issue, environment, periodicityOfIssue, timeFramesAndUrgency));
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
41
42
  }, [
42
43
  caseDispatch,
43
44
  environment,
@@ -46,7 +47,6 @@ export default function CaseLanguageSelector(props) {
46
47
  periodicityOfIssue,
47
48
  summary,
48
49
  timeFramesAndUrgency,
49
- isLoadingLang,
50
50
  canUseLanguageDetection,
51
51
  props.isManageStep,
52
52
  ]);
@@ -55,7 +55,7 @@ export default function CaseLanguageSelector(props) {
55
55
  React.createElement(Trans, null, "Preferred language"),
56
56
  ' ',
57
57
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
58
- React.createElement(Select, { variant: SelectVariant.single, "aria-label": t(`Select a language`), onToggle: onToggle, onSelect: onLanguageChange, selections: caseLanguage, isOpen: isOpen, "aria-labelledby": 'get-support-language', isDisabled: caseLanguages.isError, validated: caseLanguages.isError ? ValidatedOptions.error : ValidatedOptions.default }, caseLanguages.data.map((sla, index) => (React.createElement(SelectOption, { value: sla, key: index }, Constants.languagesMap[sla])))),
58
+ React.createElement(Select, { variant: SelectVariant.single, "aria-label": t(`Select a language`), onToggle: onToggle, onSelect: onLanguageChange, selections: caseLanguage, isOpen: isOpen, "aria-labelledby": 'get-support-language', isDisabled: caseLanguages.isError, validated: caseLanguages.isError ? ValidatedOptions.error : ValidatedOptions.default, "data-tracking-id": "preferred-language-select" }, caseLanguages.data.map((sla, index) => (React.createElement(SelectOption, { value: sla, key: index }, Constants.languagesMap[sla])))),
59
59
  React.createElement("p", { className: "form-instructions" },
60
60
  React.createElement(Trans, null, "Select a language for communicating with our support engineers."))));
61
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eA6CnD"}
1
+ {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eA4BnD"}
@@ -1,9 +1,6 @@
1
1
  import { Flex, FlexItem } from '@patternfly/react-core';
2
- import { useGlobalStateContext } from '@rh-support/react-context';
3
- import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
4
- import { isEqual } from 'lodash';
5
2
  import React from 'react';
6
- import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
3
+ import { useCaseDispatch } from '../../context/CaseContext';
7
4
  import { setCaseDetails } from '../../reducers/CaseReducer';
8
5
  import CaseGroup from '../CaseInformation/CaseGroup';
9
6
  import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
@@ -13,29 +10,20 @@ import Severity from '../CaseInformation/Severity';
13
10
  import SupportLevel from '../CaseInformation/SupportLevel';
14
11
  import CaseLanguageSelector from './CaseLanguageSelector';
15
12
  import { Cep } from './Cep';
16
- import ESSRemoteSessionCheckBox from './ESSRemoteSessionCheckBox';
17
13
  import OpenReferenceNumber from './OpenReferenceNumber';
18
14
  import { RHAssociatesSelector } from './RHAssociatesSelector';
19
15
  import CaseContactSelector from './SendNotifications/CaseContactSelector';
20
16
  export default function CaseManagement(props) {
21
- var _a;
22
17
  const caseDispatch = useCaseDispatch();
23
18
  const onSeverityChange = (payload) => {
24
19
  setCaseDetails(caseDispatch, payload);
25
20
  };
26
- const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
27
- const { product } = useCaseSelector((state) => ({
28
- product: state.caseDetails.product,
29
- }), isEqual);
30
- const selectedProduct = product;
31
- // To check if the user is ESS Customer and Product has ESS Support
32
- const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
33
21
  return (React.createElement("form", null,
34
22
  React.createElement(SupportLevel, null),
35
23
  React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
36
- React.createElement(FlexItem, { flex: { default: 'flex_1' } },
24
+ React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-xs" },
37
25
  React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
38
- React.createElement(FlexItem, { flex: { default: 'flex_1' } },
26
+ React.createElement(FlexItem, { flex: { default: 'flex_1' }, className: "pf-u-mb-xs" },
39
27
  React.createElement(ContactPhoneNumber, null))),
40
28
  React.createElement(ContactPhoneNumberAlert, null),
41
29
  React.createElement(Fts, { inlineEditable: false }),
@@ -44,6 +32,5 @@ export default function CaseManagement(props) {
44
32
  React.createElement(CaseContactSelector, null),
45
33
  React.createElement(RHAssociatesSelector, null),
46
34
  React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
47
- React.createElement(Cep, null),
48
- isESSCustomer && React.createElement(ESSRemoteSessionCheckBox, null)));
35
+ React.createElement(Cep, null)));
49
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAqCA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,eAkShC"}
1
+ {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAuCA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,eAwShC"}