@rh-support/troubleshoot 2.1.20-beta.0 → 2.1.21

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 (59) hide show
  1. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/OwnerSelector.js +3 -1
  3. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -1
  4. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +4 -2
  6. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +4 -2
  8. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +4 -2
  10. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseOverview/index.js +4 -9
  12. package/lib/esm/components/CaseEditView/PDFContainer.js +1 -1
  13. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +3 -3
  15. package/lib/esm/components/CaseEditView/ShareCase/PartnerCaseHelper.js +2 -2
  16. package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts +2 -0
  17. package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/ShareCase/TnC.js +20 -2
  19. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +4 -2
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +23 -36
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +3 -1
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +5 -3
  27. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +3 -1
  29. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +4 -2
  31. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +3 -1
  33. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -1
  35. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +3 -1
  37. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  38. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +8 -16
  39. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  40. package/lib/esm/components/CaseInformation/Fts.js +4 -2
  41. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  42. package/lib/esm/components/CaseInformation/Severity.js +4 -3
  43. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  44. package/lib/esm/components/CaseManagement/Cep.js +4 -2
  45. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  46. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +7 -3
  47. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.d.ts.map +1 -1
  48. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +4 -2
  49. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  50. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +6 -4
  51. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  52. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +2 -2
  53. package/lib/esm/constants/tncConstants.d.ts +13 -0
  54. package/lib/esm/constants/tncConstants.d.ts.map +1 -0
  55. package/lib/esm/constants/tncConstants.js +12 -0
  56. package/lib/esm/scss/_pf4-overrides.scss +22 -14
  57. package/lib/esm/utils/remoteRiderUtils.d.ts.map +1 -1
  58. package/lib/esm/utils/remoteRiderUtils.js +2 -2
  59. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAoCA,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,eAuRnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqCA,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,eA0RnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -22,6 +22,7 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
22
22
  import { RouteContext } from '../../context/RouteContext';
23
23
  import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
24
24
  import { setCaseDetails, setCaseOwner, setCaseState, setNotifiedUser, updateCaseDetails, } from '../../reducers/CaseReducer';
25
+ import { PDFContext } from '../CaseEditView/PDFContainer';
25
26
  import { CaseValuesToWatch } from '../shared/Constants';
26
27
  import { getChangedValueTooltip } from '../shared/utils';
27
28
  function OwnerSelector(props) {
@@ -39,6 +40,7 @@ function OwnerSelector(props) {
39
40
  const caseDispatch = useCaseDispatch();
40
41
  const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
41
42
  const previousAccountNumber = usePrevious(accountNumber);
43
+ const { isExportingPDF } = useContext(PDFContext);
42
44
  const [usersWithGroupAccess, setUsersWithGroupAccess] = useState([]);
43
45
  const [localOwnerChange, setLocalOwnerChange] = useState(false);
44
46
  const afterLocalChange = () => setLocalOwnerChange(false);
@@ -211,7 +213,7 @@ function OwnerSelector(props) {
211
213
  React.createElement("label", { htmlFor: "get-support-owner" },
212
214
  React.createElement(Trans, null, "Owner"),
213
215
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
214
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
216
+ React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
215
217
  showUsersWithSelectedGroupAccess ? (React.createElement(Typeahead, { id: "get-support-owner", className: "react-select-custom", clearButton: true, isLoading: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating, options: usersWithGroupAccess, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, labelKey: getHydraContactLabel, placeholder: t(`Search by name or username`), disabled: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating, renderMenuItemChildren: renderMenuItemChildren, "data-tracking-id": "get-support-owner" })) : (React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, placeholder: t(`Search by name or username`), clearButton: true, id: "get-support-owner", name: "get-support-owner", className: "react-select-custom", isUpdating: isCaseOwnerUpdating, isInvalid: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) }))));
216
218
  }
217
219
  export { OwnerSelector };
@@ -105,7 +105,7 @@ export function CaseDetailsTabs(props) {
105
105
  };
106
106
  const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
107
107
  return (React.createElement("div", { className: "case-details-tabs", ref: props.tabdRef },
108
- React.createElement(Tabs, { className: "hide-in-pdf", activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
108
+ React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
109
109
  React.createElement(Trans, null, tab.title)) })))),
110
110
  React.createElement("div", { className: "case-details-tabs-content pf-u-pt-xl" }, tabsToRender.map((tab, index) => (React.createElement(TabContent, { eventKey: index, key: tab.key, id: tab.key, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
111
111
  React.createElement(ErrorBoundary, { errorMsgInfo: {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseStatus.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AASrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAkDhC;kBAlDQ,UAAU;;;AAqDnB,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"CaseStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseStatus.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAoDhC;kBApDQ,UAAU;;;AAuDnB,eAAe,UAAU,CAAC"}
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { Dropdown, ValueChangedIcon } from '@rh-support/components';
11
11
  import { toOption, toOptions } from '@rh-support/utils';
12
12
  import isEmpty from 'lodash/isEmpty';
13
- import React, { useState } from 'react';
13
+ import React, { useContext, useState } from 'react';
14
14
  import { Trans, useTranslation } from 'react-i18next';
15
15
  import { CaseValuesToWatch } from '../../shared/Constants';
16
16
  import { getChangedValueTooltip } from '../../shared/utils';
17
+ import { PDFContext } from '../PDFContainer';
17
18
  const defaultProps = {
18
19
  id: '',
19
20
  className: '',
@@ -24,6 +25,7 @@ function CaseStatus(props) {
24
25
  const validateCaseStatus = (selectedItem) => {
25
26
  setIsCaseStatusInValid(isEmpty(selectedItem));
26
27
  };
28
+ const { isExportingPDF } = useContext(PDFContext);
27
29
  // value changed logic to show a non local status change
28
30
  const [localStatusChange, setLocalStatusChange] = useState(false);
29
31
  const afterLocalChange = () => setLocalStatusChange(false);
@@ -39,7 +41,7 @@ function CaseStatus(props) {
39
41
  React.createElement("h3", { className: "subheading subheading-sm" },
40
42
  React.createElement(Trans, null, "Status"),
41
43
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localStatusChange, value: props.selectedStatus, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.status) }),
42
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
44
+ React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
43
45
  React.createElement(Dropdown, { name: "case-details-status-selector", placeholder: t(`Select a status`), title: t(`Select a status`), list: props.allStatuses ? toOptions(props.allStatuses) : [], selectedItem: toOption(props.selectedStatus), disabled: props.hasError || props.isDisabled, isLoadingList: props.isFetching, isInValid: isCaseStatusInValid, required: true, onChange: onCaseStatusChange, onOuterClick: validateCaseStatus, "data-tracking-id": "case-details-status-selector" })));
44
46
  }
45
47
  CaseStatus.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseType.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseType.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AASrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAoD9B;kBApDQ,QAAQ;;;AAuDjB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"CaseType.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseType.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAsD9B;kBAtDQ,QAAQ;;;AAyDjB,eAAe,QAAQ,CAAC"}
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { Dropdown, ValueChangedIcon } from '@rh-support/components';
11
11
  import { toOldCaseTypeSwitcher, toOption, toOptions } from '@rh-support/utils';
12
12
  import isEmpty from 'lodash/isEmpty';
13
- import React, { useState } from 'react';
13
+ import React, { useContext, useState } from 'react';
14
14
  import { Trans, useTranslation } from 'react-i18next';
15
15
  import { CaseValuesToWatch } from '../../shared/Constants';
16
16
  import { getChangedValueTooltip } from '../../shared/utils';
17
+ import { PDFContext } from '../PDFContainer';
17
18
  const defaultProps = {
18
19
  id: '',
19
20
  className: '',
@@ -21,6 +22,7 @@ const defaultProps = {
21
22
  function CaseType(props) {
22
23
  const { t } = useTranslation();
23
24
  const [isCaseTypeInValid, setIsCaseTypeInValid] = useState(false);
25
+ const { isExportingPDF } = useContext(PDFContext);
24
26
  const validateCaseType = (selectedItem) => {
25
27
  setIsCaseTypeInValid(isEmpty(selectedItem));
26
28
  };
@@ -40,7 +42,7 @@ function CaseType(props) {
40
42
  React.createElement("h3", { className: "subheading subheading-sm" },
41
43
  React.createElement(Trans, null, "Support type"),
42
44
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localTypeChange, value: props.selectedType, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.type) }),
43
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
45
+ React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
44
46
  React.createElement(Dropdown, { name: "get-support-type", placeholder: t(`Select`), title: t(`Select a category`), list: toOptions(props.allTypes || []), selectedItem: toOption(props.selectedType), disabled: props.hasError || props.isDisabled, isLoadingList: props.isFetching, isInValid: isCaseTypeInValid, required: true, onChange: onCaseTypeChange, onOuterClick: validateCaseType, "data-tracking-id": "case-details-type-selector" })));
45
47
  }
46
48
  CaseType.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/DateTime.tsx"],"names":[],"mappings":"AAKA,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC/C,cAAc,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC7B,WAAkB,EAClB,iBAA4C,EAC5C,cAAsC,EACtC,cAAmB,EACnB,MAAgB,GACnB,EAAE,MAAM,eAkBR"}
1
+ {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/DateTime.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC/C,cAAc,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC7B,WAAkB,EAClB,iBAA4C,EAC5C,cAAsC,EACtC,cAAmB,EACnB,MAAgB,GACnB,EAAE,MAAM,eAqBR"}
@@ -1,7 +1,8 @@
1
1
  import { Tooltip } from '@patternfly/react-core';
2
2
  import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
3
  import { formatDateTime } from '@rh-support/utils';
4
- import React from 'react';
4
+ import React, { useContext } from 'react';
5
+ import { PDFContext } from '../PDFContainer';
5
6
  const defaultDateTimeFormat = {
6
7
  month: 'short',
7
8
  day: 'numeric',
@@ -12,10 +13,11 @@ const defaultDateTimeFormat = {
12
13
  };
13
14
  const defaultToolTipTimeFormat = Object.assign(Object.assign({}, defaultDateTimeFormat), { weekday: 'short', timeZoneName: 'short' });
14
15
  export default function DateTime({ showToolTip = true, toolTipTimeFormat = defaultToolTipTimeFormat, dateTimeFormat = defaultDateTimeFormat, dateTimeString = '', locale = 'en-us', }) {
16
+ const { isExportingPDF } = useContext(PDFContext);
15
17
  if (!dateTimeString)
16
18
  return React.createElement(React.Fragment, null);
17
19
  return (React.createElement(React.Fragment, null,
18
20
  React.createElement("time", { dateTime: dateTimeString }, formatDateTime(dateTimeString, locale, dateTimeFormat)),
19
21
  showToolTip && (React.createElement(Tooltip, { content: React.createElement("time", { dateTime: dateTimeString }, formatDateTime(dateTimeString, locale, toolTipTimeFormat)) },
20
- React.createElement(InfoIcon, { className: "pf-u-ml-sm" })))));
22
+ React.createElement(InfoIcon, { className: `pf-u-ml-sm ${isExportingPDF ? 'hide-in-pdf' : ''}` })))));
21
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA8BnF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eA8ejD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA6BnF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eA4ejD"}
@@ -7,7 +7,7 @@ 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 { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label, ModalVariant, } from '@patternfly/react-core';
10
+ import { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label } from '@patternfly/react-core';
11
11
  import { ToastNotification, useConfirmation } from '@rh-support/components';
12
12
  import { CloseCaseModal, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -27,7 +27,6 @@ import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
27
27
  import { PDFContext } from '../PDFContainer';
28
28
  import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
29
29
  import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
30
- import { CasePhoneNumberSev1ConfirmAlert } from '../Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert';
31
30
  import Summary from '../Tabs/CaseDetails/Summary';
32
31
  import CaseOwnerInfo from './CaseOwnerInfo';
33
32
  import CaseStatus from './CaseStatus';
@@ -173,11 +172,8 @@ export default function CaseOverview(props) {
173
172
  else {
174
173
  yield confirm({
175
174
  catchOnCancel: true,
176
- title: t(`Update the status of the case?`),
177
- description: t('Are you sure you want to change the case status to {{newStatus}}?', { newStatus }),
178
- confirmText: t('Yes, confirm'),
179
- cancelText: t('No, cancel'),
180
- modalVariant: ModalVariant.small,
175
+ title: t(`Status has been changed`),
176
+ description: t('Are you sure you want to change this case status to {{newStatus}}?', { newStatus }),
181
177
  });
182
178
  updateStatusState(newStatus);
183
179
  }
@@ -233,7 +229,6 @@ export default function CaseOverview(props) {
233
229
  React.createElement("p", { className: "pf-u-mb-sm" },
234
230
  React.createElement(Trans, null, "The customer has received two warnings regarding inactivity. This case will be closed soon if we don't receive any input."))) })))),
235
231
  React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
236
- React.createElement(CasePhoneNumberSev1ConfirmAlert, { isReview: true, tabRef: props.tabsRef }),
237
232
  React.createElement("header", null,
238
233
  React.createElement("h2", { className: "case-ID" },
239
234
  React.createElement(Trans, null, "Case"),
@@ -249,7 +244,7 @@ export default function CaseOverview(props) {
249
244
  : 'case-reopen-btn-case-details-overview' }),
250
245
  React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case')))),
251
246
  React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
252
- React.createElement("span", { className: "case-support-level" }, computeSupportLink())),
247
+ React.createElement("span", { className: `case-support-level ${isExportingPDF ? 'hide-in-pdf' : ''}` }, computeSupportLink())),
253
248
  React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
254
249
  React.createElement(Summary, { inlineEditable: true, hideLabel: true })),
255
250
  canSeeManagedByPartnerFlag && (React.createElement(Label, { className: "push-right-narrow", color: "green" },
@@ -51,7 +51,7 @@ export function PDFContainer(props) {
51
51
  React.createElement(Trans, null, "Case export doesn't support selected language.")) },
52
52
  React.createElement(DownloadIcon, { className: "fake-disable", role: "button", title: "Export as PDF", "aria-disabled": "true" })));
53
53
  }
54
- return (React.createElement(Button, { title: "Export as PDF", variant: "link", isInline: true, className: "hide-in-pdf", "data-tracking-id": "export-case-as-pdf", onClick: openModal(caseNumber), disabled: isExportingPDF, icon: React.createElement(DownloadIcon, null), iconPosition: "right" },
54
+ return (React.createElement(Button, { title: "Export as PDF", variant: "link", isInline: true, className: isExportingPDF ? 'hide-in-pdf' : '', "data-tracking-id": "export-case-as-pdf", onClick: openModal(caseNumber), disabled: isExportingPDF, icon: React.createElement(DownloadIcon, null), iconPosition: "right" },
55
55
  React.createElement(Trans, null, "Export")));
56
56
  }
57
57
  const exportToPDF = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EA8FjC,CAAC"}
1
+ {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EA8FjC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { Button, Popover, Tooltip } from '@patternfly/react-core';
2
2
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
3
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
4
- import { TncConstants } from '@rh-support/utils';
5
4
  import React, { forwardRef, useContext, useRef, useState } from 'react';
6
5
  import { useTranslation } from 'react-i18next';
6
+ import { TnC } from '../../../constants/tncConstants';
7
7
  import { RemoteSessionAgreementModal } from './RemoteSessionAgreementModal';
8
8
  export const RemoteSessionAgreement = forwardRef((props, ref) => {
9
9
  const tooltipRef = useRef();
@@ -22,7 +22,7 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
22
22
  const RemoteSessionAgreementSectionBody = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
23
23
  React.createElement("h3", { className: "card-heading pf-u-display-flex pf-u-justify-content-space-between" },
24
24
  t('Remote session agreement'),
25
- React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access.'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
25
+ React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
26
26
  React.createElement(InfoCircleIcon, null))),
27
27
  React.createElement("div", { className: "card-body" },
28
28
  React.createElement("p", null,
@@ -35,5 +35,5 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
35
35
  React.createElement(Button, { "aria-label": acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement'), variant: acceptedRemoteSessionTerms ? 'primary' : 'secondary', onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: acceptedRemoteSessionTerms, ref: tooltipRef }, acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement')))));
36
36
  return (React.createElement(React.Fragment, null,
37
37
  RemoteSessionAgreementSectionBody,
38
- React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
38
+ React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
39
39
  });
@@ -7,10 +7,10 @@ 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 { getTnCHost, getUrlParsedParams } from '@rh-support/utils';
10
+ import { getUrlParsedParams } from '@rh-support/utils';
11
11
  import React, { useEffect, useState } from 'react';
12
12
  import { useLocation } from 'react-router';
13
- import { handleTnCQueryParams } from './TnC';
13
+ import { getTnCHost, handleTnCQueryParams } from './TnC';
14
14
  export function PartnerCaseHelper(props) {
15
15
  var _a, _b;
16
16
  const [isUpdating, setIsUpdating] = useState(false);
@@ -1,4 +1,6 @@
1
1
  import { RouteComponentProps } from 'react-router';
2
+ export declare function getTnCHost(): string;
3
+ export declare function baseTnCUrl(): string;
2
4
  export declare function getTnCUrl(accountNumber: any): string;
3
5
  export declare const handleTnCQueryParams: (caseNumber: string, routeProps: RouteComponentProps) => Promise<void>;
4
6
  //# sourceMappingURL=TnC.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TnC.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/TnC.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,wBAAgB,SAAS,CAAC,aAAa,KAAA,UAQtC;AAMD,eAAO,MAAM,oBAAoB,eAAsB,MAAM,cAAc,mBAAmB,kBAc7F,CAAC"}
1
+ {"version":3,"file":"TnC.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/TnC.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,wBAAgB,UAAU,WAYzB;AAED,wBAAgB,UAAU,WAGzB;AAED,wBAAgB,SAAS,CAAC,aAAa,KAAA,UAQtC;AAMD,eAAO,MAAM,oBAAoB,eAAsB,MAAM,cAAc,mBAAmB,kBAc7F,CAAC"}
@@ -10,12 +10,30 @@ 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 { baseTnCUrl, getText, TncConstants } from '@rh-support/utils';
13
+ import { getText } 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
+ }
15
33
  export function getTnCUrl(accountNumber) {
16
34
  const redirectUrl = encodeURIComponent(window.location.href + (accountNumber ? `?partnerAccountNumber=${accountNumber}` : ''));
17
35
  const cancelRedirectUrl = encodeURIComponent(window.location.href + `?rejectedTnC=true`);
18
- return `${baseTnCUrl()}?site=${TncConstants.PARTNER_SHARE_SITE_CODE}&event=${TncConstants.PARTNER_SHARE_EVENT_CODE}&redirect=${redirectUrl}&cancelRedirect=${cancelRedirectUrl}`;
36
+ return `${baseTnCUrl()}?site=${TnC.PARTNER_SHARE_SITE_CODE}&event=${TnC.PARTNER_SHARE_EVENT_CODE}&redirect=${redirectUrl}&cancelRedirect=${cancelRedirectUrl}`;
19
37
  }
20
38
  const removeQueryParams = (routeProps) => {
21
39
  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,eAqIpC;kBArIQ,cAAc;;;AAwIvB,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);
@@ -85,9 +87,9 @@ function CaseActionPlan(props) {
85
87
  React.createElement(Trans, null, "Action plan")),
86
88
  !canUpdateActionPlan && (React.createElement("pre", { "aria-label": t('Case Action Plan'), dangerouslySetInnerHTML: commentMarkdown(actionPlan) })),
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":"AAgBA,wBAAgB,sBAAsB,gBA8GrC"}
@@ -7,13 +7,13 @@ 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 { InputGroupText, InputGroupTextVariant, ValidatedOptions } from '@patternfly/react-core';
11
11
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
12
12
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
13
- import { NewInlineEdit, ToastNotification } from '@rh-support/components';
13
+ import { PhoneInput, ToastNotification } from '@rh-support/components';
14
14
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
15
15
  import isEqual from 'lodash/isEqual';
16
- import React, { useContext, useEffect, useState } from 'react';
16
+ import React, { useContext, useState } from 'react';
17
17
  import { Trans, useTranslation } from 'react-i18next';
18
18
  import { PHONE_INSTRUCTION } from '../../../../constants/caseDetailsConstants';
19
19
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
@@ -21,6 +21,7 @@ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorM
21
21
  import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
22
22
  import { updateCaseDetails } from '../../../../reducers/CaseReducer';
23
23
  import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
24
+ import { PDFContext } from '../../PDFContainer';
24
25
  export function CaseContactPhoneNumber() {
25
26
  const { phone, caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating } = useCaseSelector((state) => ({
26
27
  phone: state.caseDetails.phone || '',
@@ -36,6 +37,7 @@ export function CaseContactPhoneNumber() {
36
37
  const caseDispatch = useCaseDispatch();
37
38
  const caseUpdateError = useCaseUpdateErrorMessage();
38
39
  const { t } = useTranslation();
40
+ const { isExportingPDF } = useContext(PDFContext);
39
41
  // To handle phone change
40
42
  const onPhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
41
43
  if (canEditCase.alert())
@@ -54,43 +56,28 @@ export function CaseContactPhoneNumber() {
54
56
  caseUpdateError.showError(e, t(`Phone number failed to update`));
55
57
  }
56
58
  });
57
- const onCancel = () => {
58
- setLocalPhoneState(phone);
59
+ const onClear = () => {
60
+ setLocalPhoneState('');
61
+ onSave();
59
62
  };
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();
65
- }
66
- // Save on pressing enter
67
- else if (!isCasePhoneUpdating && e.keyCode === 13) {
68
- yield onSave();
69
- }
70
- });
71
- useEffect(() => {
72
- setLocalPhoneState(phone);
73
- }, [phone]);
74
63
  const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
75
64
  limit: PHONE_LIMIT,
76
65
  });
77
66
  const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
78
67
  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))))));
68
+ React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
69
+ React.createElement(Trans, null, "Case owner's phone number"),
70
+ !isExportingPDF ? ContactPhoneNumberPopOver() : ''),
71
+ React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
72
+ React.createElement(PhoneInput, { phoneValue: localPhoneState, onPhoneValueChange: onPhoneChange, validations: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT
73
+ ? ValidatedOptions.error
74
+ : isPhoneNeedsReview
75
+ ? ValidatedOptions.warning
76
+ : ValidatedOptions.default, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone" }),
77
+ 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, style: { display: isExportingPDF ? 'none' : '' } },
78
+ React.createElement(CheckIcon, null)),
79
+ 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' : '' } },
80
+ React.createElement(TimesIcon, { color: "#6A6E73" }))),
81
+ (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" },
82
+ React.createElement(Trans, null, PHONE_INSTRUCTION)))));
96
83
  }
@@ -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":"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")),
@@ -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"}