@rh-support/troubleshoot 2.2.3 → 2.2.5

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 (58) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.js +1 -1
  2. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  3. package/lib/esm/components/AccountInfo/OwnerSelector.js +46 -23
  4. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -0
  6. package/lib/esm/components/CaseEditView/PDFContainer.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/PDFContainer.js +2 -9
  8. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +1 -1
  10. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +36 -27
  12. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +8 -5
  14. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.js +4 -4
  16. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  17. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +25 -20
  18. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  19. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +1 -1
  20. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  21. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +1 -1
  22. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.d.ts.map +1 -1
  23. package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +1 -1
  24. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  25. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +1 -1
  26. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  27. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +1 -1
  28. package/lib/esm/components/OpenCase/OpenCase.js +2 -2
  29. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  30. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +9 -1
  31. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  32. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
  33. package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
  34. package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +2 -2
  35. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  36. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +1 -1
  37. package/lib/esm/components/Review/Review.js +1 -1
  38. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  39. package/lib/esm/components/Suggestions/Suggestions.js +1 -1
  40. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  41. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  42. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  43. package/lib/esm/components/shared/fileUpload/FileLister.js +2 -2
  44. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
  45. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  46. package/lib/esm/components/shared/useIsSectionValid.js +5 -13
  47. package/lib/esm/components/shared/utils.d.ts +1 -0
  48. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  49. package/lib/esm/components/shared/utils.js +16 -0
  50. package/lib/esm/constants/caseDetailsConstants.d.ts +3 -0
  51. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  52. package/lib/esm/constants/caseDetailsConstants.js +3 -0
  53. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  54. package/lib/esm/hooks/useWizard.js +3 -2
  55. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  56. package/lib/esm/reducers/CaseHelpers.js +4 -17
  57. package/lib/esm/scss/_main.scss +5 -0
  58. package/package.json +8 -8
@@ -12,7 +12,7 @@ function OpenShiftV3Inputbox(props) {
12
12
  React.createElement(Trans, null, "OpenShift Cluster Name"),
13
13
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"),
14
14
  React.createElement(CaseOpenShiftV3Popover, null)),
15
- React.createElement(TextInput, { id: "case-details-v3-cluster-name", value: props.v3ClusterName, type: "text", onChange: props.onReasonInputBoxChanged, "aria-label": t('Enter your Cluster Name'), placeholder: t('Enter your Cluster Name'), required: true, className: `form-control ${props.isInValid ? 'form-invalid' : ''}` }),
15
+ React.createElement(TextInput, { id: "case-details-v3-cluster-name", value: props.v3ClusterName, type: "text", onChange: props.onReasonInputBoxChanged, "aria-label": t('Enter your Cluster Name'), placeholder: t('Enter your Cluster Name'), required: true, className: `form-control ${props.isInValid ? 'form-invalid' : ''}`, "data-tracking-id": "openshift-v3-cluster-name" }),
16
16
  React.createElement("p", { id: "validated-helper", className: `form-instructions ${props.isInValid ? 'form-invalid' : ''}` },
17
17
  "If you do not have your Cluster Name available, briefly explain why.",
18
18
  ' ',
@@ -1 +1 @@
1
- {"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,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ACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAiXzC;kBAjXQ,mBAAmB;;;AAoX5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -294,7 +294,7 @@ function OpenshiftDropdownV4(props) {
294
294
  text: 'Display additional results',
295
295
  onClick: onViewMoreClick,
296
296
  },
297
- })), clustersSelectOptions),
297
+ }), { "data-tracking-id": "openshift-cluster-id" }), clustersSelectOptions),
298
298
  React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
299
299
  }
300
300
  OpenshiftDropdownV4.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAiM1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAkM1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -110,7 +110,7 @@ function RHAssociatesSelector(props) {
110
110
  React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [], id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
111
111
  internal: false,
112
112
  isInternalContact: true,
113
- }, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating }),
113
+ }, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating, "data-tracking-id": "case-contact-select-rh-watcher" }),
114
114
  caseNumber && showAddWatchButton() && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
115
115
  React.createElement(Trans, null, "Add me as a watcher"))),
116
116
  caseNumber && showRemoveWatchButton() && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
@@ -7,7 +7,7 @@ export default function OpenCase(props) {
7
7
  const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
8
8
  return (React.createElement("form", null,
9
9
  canChangeAccountInfo && (React.createElement(React.Fragment, null,
10
- React.createElement(AccountSelector, null),
11
- React.createElement(OwnerSelector, null))),
10
+ React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
11
+ React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
12
12
  React.createElement(SupportTypeSelectorPage, null)));
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAqBA,MAAM,CAAC,OAAO,UAAU,uBAAuB,gBA+K9C"}
1
+ {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAqBA,MAAM,CAAC,OAAO,UAAU,uBAAuB,gBAwL9C"}
@@ -60,6 +60,7 @@ export default function SupportTypeSelectorPage() {
60
60
  oldSupportType: PreviousCaseTypes.DEFECT_BUG,
61
61
  supportTypeHeading: NewCaseTypes.BUG_DEFECT,
62
62
  supportTypeDescription: 'Report an issue with a product',
63
+ dataTrackingID: 'bug-or-defect-support-type',
63
64
  },
64
65
  {
65
66
  id: 1,
@@ -67,6 +68,7 @@ export default function SupportTypeSelectorPage() {
67
68
  oldSupportType: PreviousCaseTypes.CERTIFICATION,
68
69
  supportTypeHeading: NewCaseTypes.CERTIFICATION,
69
70
  supportTypeDescription: 'Hardware and software certification support',
71
+ dataTrackingID: 'certification-support-type',
70
72
  },
71
73
  {
72
74
  id: 2,
@@ -74,6 +76,7 @@ export default function SupportTypeSelectorPage() {
74
76
  oldSupportType: PreviousCaseTypes.CONFIGURATION_ISSUE,
75
77
  supportTypeHeading: NewCaseTypes.CONFIGURATION,
76
78
  supportTypeDescription: 'Set-up and configuration support',
79
+ dataTrackingID: 'configuration-support-type',
77
80
  },
78
81
  {
79
82
  id: 3,
@@ -81,6 +84,7 @@ export default function SupportTypeSelectorPage() {
81
84
  oldSupportType: PreviousCaseTypes.ACCOUNT_CUSTOMERSERVICE_REQUEST,
82
85
  supportTypeHeading: NewCaseTypes.CUSTOMER_SERVICE,
83
86
  supportTypeDescription: 'Account, billing, or subscription support',
87
+ dataTrackingID: 'customer-service-support-type',
84
88
  },
85
89
  {
86
90
  id: 4,
@@ -88,6 +92,7 @@ export default function SupportTypeSelectorPage() {
88
92
  oldSupportType: PreviousCaseTypes.USAGE_DOCUMENTATION_HELP,
89
93
  supportTypeHeading: NewCaseTypes.USAGE_DOCS_HELP,
90
94
  supportTypeDescription: 'Suggest or request an update to content',
95
+ dataTrackingID: 'usage-docs-help-support-type',
91
96
  },
92
97
  {
93
98
  id: 5,
@@ -95,6 +100,7 @@ export default function SupportTypeSelectorPage() {
95
100
  oldSupportType: PreviousCaseTypes.FEATURE_ENHANCEMENT,
96
101
  supportTypeHeading: NewCaseTypes.IDEA,
97
102
  supportTypeDescription: 'Request a feature or product enhancement',
103
+ dataTrackingID: 'idea-support-type',
98
104
  },
99
105
  {
100
106
  id: 6,
@@ -102,11 +108,13 @@ export default function SupportTypeSelectorPage() {
102
108
  oldSupportType: PreviousCaseTypes.RCA_ONLY,
103
109
  supportTypeHeading: NewCaseTypes.ROOT_CAUSE_ANALYSIS,
104
110
  supportTypeDescription: 'Only for identifying the source of an issue',
111
+ dataTrackingID: 'rca-support-type',
105
112
  },
106
113
  {
107
114
  id: 7,
108
115
  oldSupportType: PreviousCaseTypes.OTHER,
109
116
  supportTypeHeading: NewCaseTypes.OTHER,
117
+ dataTrackingID: 'other-support-type',
110
118
  },
111
119
  ];
112
120
  return (React.createElement("div", { className: "form-group" },
@@ -117,7 +125,7 @@ export default function SupportTypeSelectorPage() {
117
125
  React.createElement(Gallery, { hasGutter: true, className: "pf-u-mt-sm" }, SupportTypesArray.map((supportTypesArrayValues) => {
118
126
  var _a;
119
127
  return (React.createElement(GalleryItem, { key: supportTypesArrayValues.id },
120
- React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card${isNextBtnClickedToShowValidationError && !caseType ? ' support-types-invalid' : ''}`, onKeyDown: onKeyDown, onClick: onSupportTypeClick, onSelectableInputChange: onChange, isSelected: !!caseType && supportTypesArrayValues.oldSupportType === caseType, hasSelectableInput: true, isSelectable: true, isSelectableRaised: true, isFullHeight: true, isDisabledRaised: ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false, selectableInputAriaLabel: t(supportTypesArrayValues.supportTypeHeading) },
128
+ React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card${isNextBtnClickedToShowValidationError && !caseType ? ' support-types-invalid' : ''}`, onKeyDown: onKeyDown, onClick: onSupportTypeClick, onSelectableInputChange: onChange, isSelected: !!caseType && supportTypesArrayValues.oldSupportType === caseType, hasSelectableInput: true, isSelectable: true, isSelectableRaised: true, isFullHeight: true, isDisabledRaised: ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false, selectableInputAriaLabel: t(supportTypesArrayValues.supportTypeHeading), "data-tracking-id": supportTypesArrayValues.dataTrackingID },
121
129
  React.createElement(CardBody, null, supportTypesArrayValues.icon ? (React.createElement(Split, null,
122
130
  React.createElement(SplitItem, { className: "pf-u-pr-lg" },
123
131
  React.createElement(Bullseye, null, supportTypesArrayValues.icon && supportTypesArrayValues.icon)),
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendations.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA0D3D"}
1
+ {"version":3,"file":"ClusterRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendations.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,KAAK,EAAE,MAAM,eAgE3D"}
@@ -36,7 +36,7 @@ export default function ClusterRecommendations(props) {
36
36
  React.createElement(Trans, null, "Cluster recommendations")),
37
37
  React.createElement("div", null,
38
38
  React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data.slice(0, NUMBER_OF_RULES_TO_DISPLAY) }),
39
- clusterRecommendations.data.length > NUMBER_OF_RULES_TO_DISPLAY && (React.createElement(Button, { className: "pf-u-p-md", variant: "link", isBlock: true, onClick: onViewMoreRecommendation },
39
+ clusterRecommendations.data.length > NUMBER_OF_RULES_TO_DISPLAY && (React.createElement(Button, { className: "pf-u-p-md", variant: "link", isBlock: true, onClick: onViewMoreRecommendation, "data-tracking-id": "cluster-recs-view-more" },
40
40
  React.createElement(Trans, null, "View more recommendations")))))),
41
41
  showClusterRecommendationsModal && React.createElement(ClusterRecommendationsModal, null)));
42
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAOnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CA4DtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAOnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAiEtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -44,7 +44,7 @@ const CriticalSolutionsToast = (props) => {
44
44
  };
45
45
  if (!showNotification && !rulesState.triggerRuleNotification)
46
46
  return null;
47
- return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('File recommendations are ready to view'), "data-tracking-id": "toast-view-critical-solutions", actionLinks: React.createElement(Button, { isInline: true, variant: "link", onClick: viewCriticalSolution },
48
- React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }), timeout: caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT }));
47
+ return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('File recommendations are ready to view'), actionLinks: React.createElement(Button, { isInline: true, variant: "link", onClick: viewCriticalSolution, "data-tracking-id": "critical-solutions-alert-view" },
48
+ React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }), timeout: caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT, "data-tracking-id": "critical-solutions-alert" }));
49
49
  };
50
50
  export default CriticalSolutionsToast;
@@ -239,7 +239,7 @@ function InsightsResults(props) {
239
239
  return (React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults, isRenderedMain: true }));
240
240
  }
241
241
  return (React.createElement(React.Fragment, null,
242
- !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution", children: React.createElement("p", null,
242
+ !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
243
243
  React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")) })),
244
244
  React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
245
245
  }
@@ -79,6 +79,6 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
79
79
  React.createElement(AccordionContent, { isHidden: !isAdditionalExpanded },
80
80
  React.createElement("p", { onClick: onAdditionalInfoElemClick, dangerouslySetInnerHTML: parseMoreInfo(ruleData === null || ruleData === void 0 ? void 0 : ruleData.more_info, (_g = insightsReport === null || insightsReport === void 0 ? void 0 : insightsReport.current) === null || _g === void 0 ? void 0 : _g.details) }))))),
81
81
  React.createElement("pfe-cta", null,
82
- React.createElement("a", { className: "se-recommended ts-result-insights pf-u-font-size-sm", rel: "noopener noreferrer", target: "_blank", onClick: onCtaClick(doc.view_uri), "data-tracking-id": "se-recommended-insights-rule", "aria-label": "Related article", role: "button", href: getTrackingULRWithQueryParams(doc.view_uri, SessionResourceSource.INSIGHTS) },
82
+ React.createElement("a", { className: "se-recommended ts-result-insights pf-u-font-size-sm", rel: "noopener noreferrer", target: "_blank", onClick: onCtaClick(doc.view_uri), "data-tracking-id": "get-support-recommended-insights-rule", "aria-label": "Related article", role: "button", href: getTrackingULRWithQueryParams(doc.view_uri, SessionResourceSource.INSIGHTS) },
83
83
  React.createElement(Trans, null, "Related article"))))))));
84
84
  }
@@ -54,7 +54,7 @@ export default function Review(props) {
54
54
  React.createElement(ContactPhoneNumber, null))),
55
55
  React.createElement(ContactPhoneNumberAlert, null),
56
56
  React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
57
- React.createElement(CaseLanguageSelector, null),
57
+ React.createElement(CaseLanguageSelector, { "data-tracking-id": "review-preferred-language" }),
58
58
  React.createElement(CaseGroup, null),
59
59
  canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
60
60
  React.createElement(RHAssociatesSelector, null),
@@ -1 +1 @@
1
- {"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAiGhD"}
1
+ {"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAsGhD"}
@@ -53,5 +53,5 @@ export default function Suggestions(props) {
53
53
  return (React.createElement(TopContent, { seSessionId: activeSessionId, seResourceOriginID: (_b = (_a = sessionResourceTracking[SessionResourceSource.TOP_CONTENT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', topContentIndex: index, onResourceClick: onResourceClick, name: sug.categoryName, key: sug.categoryName, items: sug.content, helperText: (sug === null || sug === void 0 ? void 0 : sug.helperText) || '' }));
54
54
  })),
55
55
  showMax && filteredTC.length > maxTC && (React.createElement("div", { className: "text-right" },
56
- React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: showAllCategories }, "More catagories")))));
56
+ React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: showAllCategories, "data-tracking-id": "suggestions-more-categories" }, "More categories")))));
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAmBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAqHzC;kBArHQ,mBAAmB;;;AAwH5B,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAmBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA0HzC;kBA1HQ,mBAAmB;;;AA6H5B,eAAe,mBAAmB,CAAC"}
@@ -45,7 +45,7 @@ function TroubleshootSection(props) {
45
45
  };
46
46
  return (React.createElement(React.Fragment, null,
47
47
  !isCreatingCase && (React.createElement(ParentSection, null,
48
- React.createElement(OpenShiftClusterId, { className: "push-bottom" }))),
48
+ React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" }))),
49
49
  React.createElement("section", null,
50
50
  React.createElement("header", null,
51
51
  React.createElement("h3", null,
@@ -63,7 +63,7 @@ function TroubleshootSection(props) {
63
63
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } }, canShowTopContent && !isEmpty(version) && React.createElement(Suggestions, null)),
64
64
  !isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-u-mt-lg" }))),
65
65
  React.createElement("section", { className: "pf-u-mt-lg" },
66
- isNotAnIdea && React.createElement(InsightsResults, { isDisplayOnMain: true }),
66
+ isNotAnIdea && (React.createElement(InsightsResults, { isDisplayOnMain: true, "data-tracking-id": "troubleshoot-section-file-recs" })),
67
67
  React.createElement("div", { className: "pf-u-mt-lg" }, canAddAttachments ? (React.createElement(FileDiag, null)) : (React.createElement(React.Fragment, null,
68
68
  React.createElement(Card, { id: "card", className: "card-support card-white file-diag", isCompact: true },
69
69
  React.createElement(CardHeader, { "aria-label": !isNotAnIdea || loggedInUsersAccount.data.secureSupport
@@ -1 +1 @@
1
- {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eAsR/C"}
1
+ {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eAgS/C"}
@@ -130,7 +130,7 @@ export default function FileLister(props) {
130
130
  React.createElement(Trans, null, maxCaseAttachmentDescription))) : null,
131
131
  isUploadedAndAnalysisFailed(localFile) && (React.createElement("span", { className: "text-danger" },
132
132
  React.createElement(Trans, null, "Something went wrong during file analysis."),
133
- React.createElement(Button, { onClick: onRetryAnalysis(index), isInline: true, variant: ButtonVariant.link },
133
+ React.createElement(Button, { onClick: onRetryAnalysis(index), isInline: true, variant: ButtonVariant.link, "data-tracking-id": "something-wrong-try-again" },
134
134
  React.createElement(Trans, null, "Try analyzing again.")))),
135
135
  isUploadFailed(localFile.uploadProgress.uploadStatus) && (React.createElement("span", { className: "text-danger" },
136
136
  React.createElement(Trans, null,
@@ -139,7 +139,7 @@ export default function FileLister(props) {
139
139
  sosReportErrorText(localFile.uploadProgress.uploadErrorMessage),
140
140
  ".",
141
141
  ' '),
142
- React.createElement(Button, { onClick: onRetry(index), isInline: true, variant: ButtonVariant.link },
142
+ React.createElement(Button, { onClick: onRetry(index), isInline: true, variant: ButtonVariant.link, "data-tracking-id": "upload-fail-try-again" },
143
143
  React.createElement(Trans, null, "Try again"))))));
144
144
  })),
145
145
  props.showSlowUploadMsg && isUploadingAttachment(props.selectedLocalFiles) && (React.createElement("span", { className: "text-muted" },
@@ -25,6 +25,6 @@ function FileSelectorButton(_a) {
25
25
  React.createElement("label", { className: "sr-only", htmlFor: "upload-btn" },
26
26
  React.createElement(Trans, null, "Upload new file")),
27
27
  React.createElement("input", Object.assign({ value: "", style: { display: 'none !important' }, id: `${id !== null && id !== void 0 ? id : 'upload-btn'}` }, getInputProps())),
28
- React.createElement("button", Object.assign({}, btnProps, { type: "button", className: `pf-c-button ${className}` }), buttonLabel)));
28
+ React.createElement("button", Object.assign({}, btnProps, { type: "button", className: `pf-c-button ${className}`, "data-tracking-id": "upload-a-file" }), buttonLabel)));
29
29
  }
30
30
  export default FileSelectorButton;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAsM9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA8L9D"}
@@ -7,10 +7,11 @@ import { useCaseSelector } from '../../context/CaseContext';
7
7
  import { RecommendationStateContext } from '../../context/RecommendationContext';
8
8
  import { RouteContext } from '../../context/RouteContext';
9
9
  import { TCStateContext } from '../../context/TopContentContext';
10
- import { CASE_REFERENCE_NUMBER_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, PHONE_LIMIT, SUMMARY_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
10
+ import { CASE_REFERENCE_NUMBER_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, SUMMARY_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
11
11
  import { isCaseInformationSectionValid, isCaseManagementStateValid, isCaseStateValid, isClusterIDValid, isIdeaCaseStateValid, } from '../../reducers/CaseHelpers';
12
12
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
13
  import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
14
+ import { isPhoneValid } from './utils';
14
15
  export function useIsSectionValid(sectionName) {
15
16
  var _a, _b;
16
17
  const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, description, hostname, contactInfo24x7, alternateId, selectedAccountDetails, phoneCountryCode, phoneAreaCodePrefixLineNumber, } = useCaseSelector((state) => ({
@@ -64,18 +65,14 @@ export function useIsSectionValid(sectionName) {
64
65
  ((_a = summary) === null || _a === void 0 ? void 0 : _a.length) < SUMMARY_LENGTH_LIMIT);
65
66
  };
66
67
  const isCaseManagementSectionValid = () => {
67
- var _a, _b;
68
68
  const hasContactInfo24x7ValidLength = contactInfo24x7
69
69
  ? (contactInfo24x7 === null || contactInfo24x7 === void 0 ? void 0 : contactInfo24x7.length) <= CONTACT_INFO_24X7_LIMIT
70
70
  : true;
71
71
  const hasAlternateCaseIdValidLength = alternateId ? (alternateId === null || alternateId === void 0 ? void 0 : alternateId.length) <= CASE_REFERENCE_NUMBER_LIMIT : true;
72
- const hasSuppliedPhoneValidLength = phoneAreaCodePrefixLineNumber || phoneCountryCode
73
- ? ((_a = phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <= PHONE_LIMIT
74
- : true;
75
72
  return (isCaseManagementStateValid(caseState, loggedInUserJwtToken) &&
76
73
  hasContactInfo24x7ValidLength &&
77
74
  hasAlternateCaseIdValidLength &&
78
- hasSuppliedPhoneValidLength);
75
+ isPhoneValid(phoneCountryCode, phoneAreaCodePrefixLineNumber));
79
76
  };
80
77
  const isTroubleshootSectionValid = () => {
81
78
  var _a, _b, _c;
@@ -92,10 +89,7 @@ export function useIsSectionValid(sectionName) {
92
89
  var _a;
93
90
  return (isEntitledProduct &&
94
91
  isCaseStateValid(caseState, loggedInUserJwtToken) &&
95
- isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
96
- (!isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''))
97
- ? false
98
- : true));
92
+ isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult));
99
93
  };
100
94
  const isDescribeIdeaSectionValid = () => {
101
95
  return (isCaseManagementStateValid(caseState, loggedInUserJwtToken) &&
@@ -109,9 +103,7 @@ export function useIsSectionValid(sectionName) {
109
103
  return (!caseState.hasInvalidEntitlements &&
110
104
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
111
105
  isCaseInformationSectionValid(caseState, loggedInUserJwtToken) &&
112
- hostnameIsValid
113
- //here
114
- );
106
+ hostnameIsValid);
115
107
  };
116
108
  const isSectionValid = (sectionNameLocal) => {
117
109
  if (!sectionNameLocal)
@@ -9,4 +9,5 @@ import { CaseValuesToWatch } from './Constants';
9
9
  * should return a human readable form of the given object.
10
10
  */
11
11
  export declare function getChangedValueTooltip<T>(valueNameCb: (current: T, previous: T) => CaseValuesToWatch, accessor?: (value: T, otherValue: T) => any): (currentValue: T, previousValue: T) => JSX.Element;
12
+ export declare const isPhoneValid: (countryCode: string, phoneLine: string) => boolean;
12
13
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,kBAErB,CAAC,iBAAiB,CAAC,iBAQ5C"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,kBAErB,CAAC,iBAAiB,CAAC,iBAQ5C;AAED,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,MAAM,KAAG,OAmBrE,CAAC"}
@@ -1,5 +1,7 @@
1
+ import isEmpty from 'lodash/isEmpty';
1
2
  import React from 'react';
2
3
  import { Trans } from 'react-i18next';
4
+ import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
3
5
  /**
4
6
  *
5
7
  * A function that returns a translated string for a tooltip of the given case value that is being watched
@@ -24,3 +26,17 @@ export function getChangedValueTooltip(valueNameCb, accessor) {
24
26
  accessor ? accessor(currentValue, previousValue) : currentValue,
25
27
  " ")));
26
28
  }
29
+ export const isPhoneValid = (countryCode, phoneLine) => {
30
+ const regex = /^[\d ()+-]+$/;
31
+ const phoneIncludesCorrectChars = phoneLine && regex.test(phoneLine.replace(countryCode, ''));
32
+ // To validate case state if country code and phoneline both are available
33
+ // we cannot have only country code or only phoneline
34
+ // phone is optional
35
+ const isCountryCodeFollowsByPhone = !isEmpty(countryCode) ? !isEmpty(phoneLine) : false;
36
+ const isPhoneLineHasCountryCode = !isEmpty(phoneLine) ? !isEmpty(countryCode) : false;
37
+ const hasSuppliedPhoneValidLength = (phoneLine || countryCode) && ((countryCode === null || countryCode === void 0 ? void 0 : countryCode.length) || 0) + ((phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.length) || 0) + 1 <= PHONE_LIMIT;
38
+ return (!!isCountryCodeFollowsByPhone &&
39
+ !!isPhoneLineHasCountryCode &&
40
+ !!hasSuppliedPhoneValidLength &&
41
+ !!phoneIncludesCorrectChars);
42
+ };
@@ -12,4 +12,7 @@ export declare enum CaseStatusEnum {
12
12
  WAITING_ON_CUSTOMER = "Waiting on Customer",
13
13
  WAITING_ON_REDHAT = "Waiting on Red Hat"
14
14
  }
15
+ export declare const PHONE_LINE_CANNOT_BE_EMPTY = "Phone number cannot be empty when country code is given.";
16
+ export declare const PHONE_NO_CHAR_ERROR = "Phone number can only have digits.";
17
+ export declare const PHONE_IS_NOT_VALID = "Phone number is invalid.";
15
18
  //# sourceMappingURL=caseDetailsConstants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C"}
1
+ {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
@@ -14,3 +14,6 @@ export var CaseStatusEnum;
14
14
  CaseStatusEnum["WAITING_ON_CUSTOMER"] = "Waiting on Customer";
15
15
  CaseStatusEnum["WAITING_ON_REDHAT"] = "Waiting on Red Hat";
16
16
  })(CaseStatusEnum || (CaseStatusEnum = {}));
17
+ export const PHONE_LINE_CANNOT_BE_EMPTY = 'Phone number cannot be empty when country code is given.';
18
+ export const PHONE_NO_CHAR_ERROR = 'Phone number can only have digits.';
19
+ export const PHONE_IS_NOT_VALID = 'Phone number is invalid.';
@@ -1 +1 @@
1
- {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,wBAAgB,SAAS,CAAC,UAAU,KAAA;iCAuNG,OAAO;EAwC7C"}
1
+ {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,wBAAgB,SAAS,CAAC,UAAU,KAAA;iCAwNG,OAAO;EAwC7C"}
@@ -40,10 +40,11 @@ export function useWizard(routeProps) {
40
40
  };
41
41
  const alertMessage = () => {
42
42
  // alert title and variant based on multiple conditions for two different sections
43
- const title = topContent.isFetching || (isLoadingRecommendations && summary)
43
+ const isLoading = topContent.isFetching || (isLoadingRecommendations && summary);
44
+ const title = isLoading
44
45
  ? t('Please wait while recommendations are loading')
45
46
  : t('Please address the errors to proceed');
46
- return (React.createElement(AlertMessage, { show: isNextBtnClickedToShowValidationError && !isActiveSectionValid, variant: (isLoadingRecommendations && summary) || topContent.isFetching ? AlertType.INFO : AlertType.DANGER, isInline: true, title: title, className: "pf-u-mb-lg" }));
47
+ return (React.createElement(AlertMessage, { show: isNextBtnClickedToShowValidationError && !isActiveSectionValid, variant: (isLoadingRecommendations && summary) || topContent.isFetching ? AlertType.INFO : AlertType.DANGER, isInline: true, title: title, className: "pf-u-mb-lg", "data-tracking-id": isLoading ? 'wait-recommendations-loading' : 'proceed-address-errors' }));
47
48
  };
48
49
  // components that are used in wizard steps
49
50
  const appRouteConfugurations = {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAkB3D,OAAO,EAUH,UAAU,EAgBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mBAAmB,SAAS,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,UACvB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,kBACb,MAAM,YACZ,MAAM,YACN,MAAM,KACjB,MAyBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,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tB,QAAQ,YAAY,CA2EtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CAgCtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eA+CF,CAAC"}
@@ -6,8 +6,9 @@ import map from 'lodash/map';
6
6
  import some from 'lodash/some';
7
7
  import unionBy from 'lodash/unionBy';
8
8
  import uniqBy from 'lodash/uniqBy';
9
+ import { isPhoneValid } from '../components/shared/utils';
9
10
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
10
- import { CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_ISSUE_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, PHONE_LIMIT, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
11
+ import { CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_ISSUE_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
11
12
  export const getCaseRecommendations = (docs, oldDocs) => {
12
13
  const recs = [];
13
14
  docs.forEach((doc, i) => {
@@ -130,9 +131,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
130
131
  };
131
132
  // Add a !isEmpty to to make any KTQuestion Mandatory in isCaseStateValid
132
133
  export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
133
- var _a, _b;
134
134
  const case_details = caseState.caseDetails;
135
- const regex = /^[\d ()+-]+$/;
136
135
  return (!isEmpty(case_details.issue) &&
137
136
  isEmpty(case_details.caseNumber) &&
138
137
  !caseState.hasLargeCaseDescription &&
@@ -152,24 +151,13 @@ export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
152
151
  !isEmpty(case_details.severity) &&
153
152
  !isEmpty(case_details.accountNumberRef) &&
154
153
  !isEmpty(case_details.contactSSOName) &&
155
- // Country Code and Phone Number Not Mandatory
156
- (!isEmpty(case_details.phoneCountryCode) && !isEmpty(case_details.phoneAreaCodePrefixLineNumber)
157
- ? ((_a = case_details.phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = case_details.phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <=
158
- PHONE_LIMIT
159
- : true) &&
160
- // To validate case state if country code is given but phone number is empty
161
- (!isEmpty(case_details.phoneCountryCode) &&
162
- isEmpty(case_details.phoneAreaCodePrefixLineNumber.replace(case_details.phoneCountryCode, ''))
163
- ? false
164
- : true) &&
165
- regex.test(case_details.phoneAreaCodePrefixLineNumber.replace(case_details.phoneCountryCode, '')) &&
154
+ isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
166
155
  (caseState.selectedAccountDetails.data.requireCGroupOnCreate
167
156
  ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
168
157
  : true) &&
169
158
  canManageCase(loggedInUserJwtToken));
170
159
  };
171
160
  export const isIdeaCaseStateValid = (caseState, loggedInUserJwtToken) => {
172
- var _a, _b;
173
161
  const case_details = caseState.caseDetails;
174
162
  return (!isEmpty(case_details.issue) &&
175
163
  isEmpty(case_details.caseNumber) &&
@@ -186,8 +174,7 @@ export const isIdeaCaseStateValid = (caseState, loggedInUserJwtToken) => {
186
174
  !isEmpty(case_details.severity) &&
187
175
  !isEmpty(case_details.accountNumberRef) &&
188
176
  !isEmpty(case_details.contactSSOName) &&
189
- ((_a = case_details.phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = case_details.phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <=
190
- PHONE_LIMIT &&
177
+ isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
191
178
  (caseState.selectedAccountDetails.data.requireCGroupOnCreate
192
179
  ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
193
180
  : true) &&
@@ -878,3 +878,8 @@ svg.pf-c-spinner.pf-m-md.export-csv-loader {
878
878
  svg.pf-u-ml-xs.icon-size {
879
879
  width: 14px;
880
880
  }
881
+
882
+ @font-face {
883
+ font-family: 'DejaVu Sans';
884
+ src: url('https://access.redhat.com/chrome_themes/nimbus/fonts/unifont-15.0.06.ttf') format('truetype');
885
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.15.86",
29
+ "@cee-eng/hydrajs": "4.15.87",
30
30
  "@cee-eng/ui-toolkit": "1.1.6",
31
31
  "@patternfly/patternfly": "4.196.7",
32
32
  "@patternfly/pfe-accordion": "1.12.3",
@@ -56,7 +56,7 @@
56
56
  "react-virtualized": "^9.21.2"
57
57
  },
58
58
  "dependencies": {
59
- "@cee-eng/hydrajs": "4.15.86",
59
+ "@cee-eng/hydrajs": "4.15.87",
60
60
  "@cee-eng/ui-toolkit": "1.1.6",
61
61
  "@patternfly/patternfly": "4.196.7",
62
62
  "@patternfly/pfe-accordion": "1.12.3",
@@ -66,11 +66,11 @@
66
66
  "@patternfly/react-core": "4.264.0",
67
67
  "@progress/kendo-drawing": "^1.6.0",
68
68
  "@progress/kendo-react-pdf": "^3.12.0",
69
- "@rh-support/components": "2.1.2",
70
- "@rh-support/react-context": "2.1.2",
69
+ "@rh-support/components": "2.1.4",
70
+ "@rh-support/react-context": "2.1.4",
71
71
  "@rh-support/types": "2.0.2",
72
- "@rh-support/user-permissions": "2.1.2",
73
- "@rh-support/utils": "2.1.0",
72
+ "@rh-support/user-permissions": "2.1.3",
73
+ "@rh-support/utils": "2.1.1",
74
74
  "@types/react-redux": "^7.1.12",
75
75
  "@types/redux": "^3.6.0",
76
76
  "dompurify": "^2.4.1",
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "01f23b19ee074f6515c54b2cdec744deb3ba2c1b"
136
+ "gitHead": "d0220cf8078eb0da56f34f1cf0598edad0704669"
137
137
  }