@rh-support/troubleshoot 2.6.299 → 2.6.300

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 (178) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +40 -28
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +19 -46
  5. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Case.js +17 -49
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +8 -25
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +17 -31
  11. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
  12. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
  14. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseOverview/index.js +28 -39
  16. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
  17. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +4 -3
  19. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +7 -4
  21. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +36 -13
  23. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +33 -11
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
  27. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -9
  29. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +59 -19
  31. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  33. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
  34. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +148 -110
  36. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +2 -6
  37. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +241 -147
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
  41. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
  43. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  44. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
  45. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
  47. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
  49. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +9 -7
  51. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  52. package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
  53. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  54. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
  55. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  56. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
  57. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  58. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  59. package/lib/esm/components/CaseManagement/CaseManagement.js +9 -4
  60. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  61. package/lib/esm/components/CaseManagement/Cep.js +7 -4
  62. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  63. package/lib/esm/components/IdeaInformation/IdeaInformation.js +12 -11
  64. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  65. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  66. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  67. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  68. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  69. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  70. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  71. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  72. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -30
  73. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  74. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  75. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  76. package/lib/esm/components/Review/Review.js +18 -16
  77. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  78. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  79. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  80. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +8 -5
  81. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  82. package/lib/esm/components/shared/useIsSectionValid.js +64 -50
  83. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  84. package/lib/esm/components/shared/usePostComment.js +10 -6
  85. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  86. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +24 -105
  87. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  88. package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
  89. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  90. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -10
  91. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  92. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  93. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  94. package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -86
  95. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  96. package/lib/esm/reducers/CaseConstNTypes.js +1 -5
  97. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +1 -3
  98. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  99. package/lib/esm/reducers/CaseDetailsPageReducer.js +5 -22
  100. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +2 -0
  101. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  102. package/lib/esm/reducers/CaseDiscussionTabReducer.js +28 -1
  103. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  104. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  105. package/lib/esm/reducers/CaseHelpers.js +2 -34
  106. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  107. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  108. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  109. package/lib/esm/reducers/CaseReducer.d.ts +8 -27
  110. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  111. package/lib/esm/reducers/CaseReducer.js +33 -127
  112. package/package.json +6 -6
  113. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -3
  114. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  115. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -22
  116. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -15
  117. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  118. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -19
  119. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  120. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  121. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -49
  122. package/lib/esm/graphql/index.d.ts +0 -4
  123. package/lib/esm/graphql/index.d.ts.map +0 -1
  124. package/lib/esm/graphql/index.js +0 -3
  125. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  126. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  127. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  128. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  129. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  130. package/lib/esm/graphql/mutations/index.js +0 -1
  131. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  132. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  133. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -24
  134. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  135. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  136. package/lib/esm/graphql/queries/getParentId.js +0 -16
  137. package/lib/esm/graphql/queries/index.d.ts +0 -3
  138. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  139. package/lib/esm/graphql/queries/index.js +0 -2
  140. package/lib/esm/graphql/schemas/escalation.d.ts +0 -84
  141. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  142. package/lib/esm/graphql/schemas/escalation.js +0 -1
  143. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  144. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  145. package/lib/esm/graphql/schemas/index.js +0 -1
  146. package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts +0 -4
  147. package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts.map +0 -1
  148. package/lib/esm/hooks/useCaseComments/caseCommentMutation.js +0 -12
  149. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  150. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  151. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -55
  152. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  153. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  154. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  155. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  156. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  157. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -66
  158. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -80
  159. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  160. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  161. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -16
  162. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  163. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -25
  164. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  165. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  166. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  167. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  168. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  169. package/lib/esm/hooks/useCaseHistory.js +0 -98
  170. package/lib/esm/models/caseHistory.d.ts +0 -80
  171. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  172. package/lib/esm/models/caseHistory.js +0 -1
  173. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  174. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  175. package/lib/esm/utils/TimelineUtils.js +0 -134
  176. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  177. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  178. package/lib/esm/utils/caseHistoryUtils.js +0 -165
@@ -1,80 +0,0 @@
1
- export interface ISFStringValue {
2
- stringValue: string;
3
- }
4
- export interface ISFBooleanValue {
5
- booleanValue: boolean;
6
- }
7
- export interface ISFDoubleValue {
8
- doubleValue: number;
9
- }
10
- export interface ISFDateTimeValue {
11
- dateTimeValue: string;
12
- }
13
- export type SFValue = ISFStringValue | ISFBooleanValue | ISFDoubleValue | ISFDateTimeValue | null;
14
- export interface ICaseHistoryNode {
15
- Id: string;
16
- SalesforceSupportField: {
17
- value: string;
18
- displayValue: string | null;
19
- label: string | null;
20
- };
21
- OldValue: SFValue;
22
- NewValue: SFValue;
23
- CreatedBy: {
24
- Name: {
25
- value: string;
26
- };
27
- UserType: {
28
- value: string;
29
- } | null;
30
- SmallPhotoUrl: {
31
- value: string | null;
32
- } | null;
33
- };
34
- CreatedDate: {
35
- value: string;
36
- };
37
- }
38
- export interface ICaseHistoryEdge {
39
- node: ICaseHistoryNode;
40
- }
41
- export interface IGetCaseHistoryData {
42
- salesforce_support_uiapi: {
43
- query: {
44
- SalesforceSupportCaseHistory: {
45
- edges: ICaseHistoryEdge[];
46
- };
47
- };
48
- };
49
- }
50
- export interface IGetCaseHistoryVars {
51
- caseId: string;
52
- first?: number;
53
- }
54
- /**
55
- * Normalized representation of a single Salesforce case history entry.
56
- *
57
- * Discriminated on `type`:
58
- * - `'Action'` — lifecycle events (created, closed, owner transfer) where no field
59
- * value changed. `outputText` contains the human-readable sentence.
60
- * - `'Change'` — field-value mutations. `outputText` is empty; the Timeline layer
61
- * formats display text via `applyReplacements` / `handleFieldChange`.
62
- */
63
- export interface ICaseHistoryItem {
64
- id: string;
65
- /** Raw Salesforce API field name (e.g. `Status`, `Case_Language__c`, `created`). */
66
- fieldName: string;
67
- /** Resolved human-readable label for the field (from FIELD_NAME_DISPLAY_MAP, SF label, or displayValue). */
68
- displayName: string;
69
- label: string | null;
70
- oldValue: string | null;
71
- newValue: string | null;
72
- createdDate: string;
73
- createdByUserName: string;
74
- createdByCustomer: boolean;
75
- photoUrl: string | null;
76
- type: 'Action' | 'Change';
77
- /** Pre-built sentence for Action items (e.g. "created the case"); empty for Change items. */
78
- outputText: string;
79
- }
80
- //# sourceMappingURL=caseHistory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"caseHistory.d.ts","sourceRoot":"","sources":["../../../src/models/caseHistory.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAElG,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC7F,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE;QACP,IAAI,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QACxB,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACnC,aAAa,EAAE;YAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,GAAG,IAAI,CAAC;KAClD,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAChC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,4BAA4B,EAAE;gBAC1B,KAAK,EAAE,gBAAgB,EAAE,CAAC;aAC7B,CAAC;SACL,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,4GAA4G;IAC5G,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,6FAA6F;IAC7F,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- export interface IHistoryChangeItem {
2
- fieldName: string;
3
- displayName?: string;
4
- oldValue?: string | null;
5
- newValue?: string | boolean | null;
6
- createdByUserName?: string;
7
- }
8
- export declare const MULTI_SELECT_FIELDS: string[];
9
- export declare const LANGUAGE_CODE_MAPPING: Record<string, string>;
10
- /**
11
- * Maps `displayName` values (from `normalizeNodeToHistoryItem`, not raw SF API names)
12
- * to camelCase property prefixes used for hydrated lookup properties on history items.
13
- * E.g. key `"Product"` → prefix `"product"` → looks up `productNewName`, `productOldName`.
14
- */
15
- export declare const KEY_MAP: Record<string, string>;
16
- export declare const formatMultiSelectChange: (fieldName: string, oldValue: string, newValue: string) => string;
17
- /**
18
- * Generates human-readable text for a field change based on which values are present:
19
- * - Both values present → "changed X from A to B" (multiselect fields get add/remove diffing)
20
- * - Only newValue → "set X to B"
21
- * - Only oldValue (newValue is undefined or empty) → "removed X, was A"
22
- * - None of the above but `item.newValue` exists → fallback for cases where the resolved
23
- * display string on the item differs from the `newValue` parameter passed in
24
- */
25
- export declare const formatDefaultChange: (item: IHistoryChangeItem, fieldName: string, oldValue: string, newValue: string) => string;
26
- /**
27
- * Field-specific formatting for history change text. Each case handles a SF field
28
- * whose raw values need special treatment before display.
29
- */
30
- export declare const handleFieldChange: (item: IHistoryChangeItem, fieldName: string, oldValue: string, newValue: string) => string;
31
- /**
32
- * Post-processes formatted change text.
33
- *
34
- * - Boolean special case: SF boolean history entries can carry a raw `boolean` newValue
35
- * even after `extractStringValue` stringifies it. When the item's `newValue` is still
36
- * a boolean at this point, we generate dedicated text to avoid displaying "true"/"false".
37
- * - String replacements remap legacy SF display names to current UI terminology
38
- * ("Problem Statement" → "Title", "Case Type" → "Support Type").
39
- */
40
- export declare const applyPostProcessing: (text: string, item: IHistoryChangeItem) => string;
41
- //# sourceMappingURL=TimelineUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/TimelineUtils.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAMD,eAAO,MAAM,mBAAmB,UAAmB,CAAC;AAEpD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAcxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAY1C,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,EAAE,UAAU,MAAM,KAAG,MAgB/F,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC5B,MAAM,kBAAkB,EACxB,WAAW,MAAM,EACjB,UAAU,MAAM,EAChB,UAAU,MAAM,KACjB,MAiBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC1B,MAAM,kBAAkB,EACxB,WAAW,MAAM,EACjB,UAAU,MAAM,EAChB,UAAU,MAAM,KACjB,MA+BF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,MAAM,kBAAkB,KAAG,MAM5E,CAAC"}
@@ -1,134 +0,0 @@
1
- import { getFieldDisplayName } from './caseHistoryUtils';
2
- // https://help.salesforce.com/s/articleView?id=000384484&type=1
3
- // Adding in option for multiselect fields provided by salesforce.
4
- // In future for more multiselect fields just add to below array.
5
- // SF delimits multiselect picklist values with semicolons (`;`).
6
- export const MULTI_SELECT_FIELDS = ['SBR_Group__c'];
7
- export const LANGUAGE_CODE_MAPPING = {
8
- de: 'German',
9
- en: 'English',
10
- es: 'Spanish',
11
- fr: 'French',
12
- it: 'Italian',
13
- pt: 'Portuguese',
14
- ko: 'Korean',
15
- ja: 'Japanese',
16
- zh: 'Chinese',
17
- zh_CN: 'Chinese',
18
- zh_HK: 'Chinese (Hong Kong)',
19
- zh_TW: 'Chinese (Taiwan)',
20
- ru: 'Russian',
21
- };
22
- /**
23
- * Maps `displayName` values (from `normalizeNodeToHistoryItem`, not raw SF API names)
24
- * to camelCase property prefixes used for hydrated lookup properties on history items.
25
- * E.g. key `"Product"` → prefix `"product"` → looks up `productNewName`, `productOldName`.
26
- */
27
- export const KEY_MAP = {
28
- Product: 'product',
29
- Version: 'version',
30
- Account: 'account',
31
- Contact: 'contact',
32
- Entitlement: 'entitlement',
33
- 'Business Hours': 'businessHours',
34
- Owner: 'queueNameOwner',
35
- 'Customer Escalation': 'customerEscalation',
36
- 'Case Group': 'caseGroup',
37
- 'SLA Start Date': 'slaStartDate',
38
- 'Case Language': 'caseLanguage',
39
- };
40
- export const formatMultiSelectChange = (fieldName, oldValue, newValue) => {
41
- const oldValues = oldValue.split(';').map((s) => s.trim());
42
- const newValues = newValue.split(';').map((s) => s.trim());
43
- const added = newValues.filter((nv) => !oldValues.includes(nv));
44
- const removed = oldValues.filter((ov) => !newValues.includes(ov));
45
- if (added.length > 0 && removed.length === 0) {
46
- return `added ${added.join(', ')} to ${fieldName}`;
47
- }
48
- if (removed.length > 0 && added.length === 0) {
49
- return `removed ${removed.join(', ')} from ${fieldName}`;
50
- }
51
- if (added.length > 0 && removed.length > 0) {
52
- return `changed ${fieldName}, added ${added.join(', ')} and removed ${removed.join(', ')}`;
53
- }
54
- return `changed ${fieldName} from ${oldValue} to ${newValue}`;
55
- };
56
- /**
57
- * Generates human-readable text for a field change based on which values are present:
58
- * - Both values present → "changed X from A to B" (multiselect fields get add/remove diffing)
59
- * - Only newValue → "set X to B"
60
- * - Only oldValue (newValue is undefined or empty) → "removed X, was A"
61
- * - None of the above but `item.newValue` exists → fallback for cases where the resolved
62
- * display string on the item differs from the `newValue` parameter passed in
63
- */
64
- export const formatDefaultChange = (item, fieldName, oldValue, newValue) => {
65
- if (oldValue && newValue) {
66
- if (MULTI_SELECT_FIELDS.includes(item.fieldName)) {
67
- return formatMultiSelectChange(fieldName, oldValue, newValue);
68
- }
69
- return `changed ${fieldName} from ${oldValue} to ${newValue}`;
70
- }
71
- if (newValue) {
72
- return `set ${fieldName} to ${newValue}`;
73
- }
74
- if (oldValue && (newValue === undefined || newValue === '')) {
75
- return `removed ${fieldName}, was ${oldValue}`;
76
- }
77
- if (item.newValue !== undefined) {
78
- return `set ${fieldName} to ${item.newValue}`;
79
- }
80
- return '';
81
- };
82
- /**
83
- * Field-specific formatting for history change text. Each case handles a SF field
84
- * whose raw values need special treatment before display.
85
- */
86
- export const handleFieldChange = (item, fieldName, oldValue, newValue) => {
87
- var _a, _b;
88
- switch (item.fieldName) {
89
- // Raw values are ISO 639-1 language codes; expand via LANGUAGE_CODE_MAPPING.
90
- case 'Case_Language__c': {
91
- const newVal = String((_a = item.newValue) !== null && _a !== void 0 ? _a : '');
92
- const oldVal = String((_b = item.oldValue) !== null && _b !== void 0 ? _b : '');
93
- const newLanguage = LANGUAGE_CODE_MAPPING[newVal] || newVal;
94
- const oldLanguage = LANGUAGE_CODE_MAPPING[oldVal] || oldVal;
95
- return oldVal && newVal
96
- ? `changed ${fieldName} from ${oldLanguage} to ${newLanguage}`
97
- : `set ${fieldName} to ${newLanguage || 'empty'}`;
98
- }
99
- // Raw SFDC IDs were already filtered by filterSfdcIdEntries; this handles the
100
- // resolved-name path and uses createdByUserName as the display value.
101
- case 'OwnerId':
102
- return item.createdByUserName ? `set ${fieldName} to ${item.createdByUserName}` : '';
103
- case 'Status':
104
- return item.oldValue && item.newValue
105
- ? `changed ${fieldName} from ${item.oldValue} to ${item.newValue}`
106
- : `set ${fieldName} to ${item.newValue || 'empty'}`;
107
- // Boolean toggle → human sentence; only reports when a user name is available.
108
- case 'Customer_Escalation__c':
109
- return item.createdByUserName ? 'started Escalation for this ticket' : '';
110
- case 'SlaStartDate':
111
- return item.newValue ? `set ${fieldName} to ${item.newValue}` : '';
112
- // Field value is a user ID, not a label — hardcoded string avoids displaying a raw ID.
113
- case 'RemoteSessionTermsAckedBy__c':
114
- return 'Acked Remote Rider terms';
115
- default:
116
- return formatDefaultChange(item, fieldName, oldValue, newValue);
117
- }
118
- };
119
- /**
120
- * Post-processes formatted change text.
121
- *
122
- * - Boolean special case: SF boolean history entries can carry a raw `boolean` newValue
123
- * even after `extractStringValue` stringifies it. When the item's `newValue` is still
124
- * a boolean at this point, we generate dedicated text to avoid displaying "true"/"false".
125
- * - String replacements remap legacy SF display names to current UI terminology
126
- * ("Problem Statement" → "Title", "Case Type" → "Support Type").
127
- */
128
- export const applyPostProcessing = (text, item) => {
129
- if (typeof item.newValue === 'boolean') {
130
- const fieldName = item.displayName || getFieldDisplayName(item.fieldName);
131
- return `set ${fieldName} to ${item.newValue}`;
132
- }
133
- return text.replaceAll('Problem Statement', 'Title').replaceAll('Case Type', 'Support Type');
134
- };
@@ -1,66 +0,0 @@
1
- import type { ICaseHistoryEdge, ICaseHistoryItem, ICaseHistoryNode, SFValue } from '../models/caseHistory';
2
- /**
3
- * Maps Salesforce field identifiers to human-readable display names.
4
- *
5
- * Contains two distinct key categories:
6
- * - Real SF API field names (e.g. `ContactId`, `RH_Product__c`, `FolderId__c`)
7
- * - Synthetic lifecycle pseudo-fields produced by the SF History API (e.g. `created`,
8
- * `closed`, `ownerAssignment`). These are not custom Salesforce fields — they represent
9
- * case lifecycle events that appear as history entries with no OldValue/NewValue.
10
- */
11
- export declare const FIELD_NAME_DISPLAY_MAP: Record<string, string>;
12
- export declare function getFieldDisplayName(fieldName: string): string | undefined;
13
- export declare function isSfdcId(value: string): boolean;
14
- /**
15
- * Extracts a string representation from a polymorphic SF value union.
16
- *
17
- * Property names (`stringValue`, `booleanValue`, etc.) correspond to GraphQL
18
- * inline-fragment aliases defined in the `GET_CASE_HISTORY` query. Changing those
19
- * aliases without updating this function will silently break value extraction.
20
- *
21
- * The check order is safe because the union discriminants are mutually exclusive.
22
- * Note: empty string `''` is a valid return value (distinct from `null`).
23
- */
24
- export declare function extractStringValue(val: SFValue): string | null;
25
- /**
26
- * Lifecycle pseudo-field names from the SF History API mapped to human-readable action
27
- * sentences. Fields not listed here fall back to using the raw `fieldName` as output text
28
- * in {@link normalizeNodeToHistoryItem}.
29
- */
30
- export declare const SPECIAL_FIELD_ACTIONS: Record<string, string>;
31
- export declare const DEFAULT_AVATAR_SRC = "https://www.patternfly.org/images/668560cd.svg";
32
- /**
33
- * Only SF `UserType === 'Standard'` is treated as an internal (Red Hat) user.
34
- * All other types — including `null`, `undefined`, and unknown portal types — default
35
- * to customer. This conservative default ensures external users are never accidentally
36
- * styled as internal.
37
- */
38
- export declare function deriveIsCustomer(userType: string | null | undefined): boolean;
39
- /**
40
- * Filters out history entries whose values are raw Salesforce IDs that cannot be
41
- * decoded into human-readable display strings.
42
- *
43
- * Filtering rules:
44
- * - Both values null → **keep** (lifecycle action events carry no values)
45
- * - `newValue` is an SFDC ID and `oldValue` is null or also an ID → **drop**
46
- * (unresolvable reference change with no readable side)
47
- * - `oldValue` is an SFDC ID and `newValue` is null → **drop**
48
- * (ID removal with no display name)
49
- * - At least one side is a human-readable string → **keep**
50
- */
51
- export declare function filterSfdcIdEntries(edges: ICaseHistoryEdge[]): ICaseHistoryNode[];
52
- /**
53
- * Converts a raw SF history node into a normalized `ICaseHistoryItem`.
54
- *
55
- * Classifies each entry as either:
56
- * - **Action** (`!oldValue && !newValue`): lifecycle events like "created", "closed".
57
- * `outputText` is set here from {@link SPECIAL_FIELD_ACTIONS}, or falls back to the
58
- * raw `fieldName` for unknown actions.
59
- * - **Change**: field-value mutations. `outputText` is left empty because the Timeline
60
- * layer formats change text via `applyReplacements` / `handleFieldChange`.
61
- *
62
- * Display name fallback chain: `FIELD_NAME_DISPLAY_MAP` → SF `label` → SF
63
- * `displayValue` → raw `fieldName`.
64
- */
65
- export declare function normalizeNodeToHistoryItem(node: ICaseHistoryNode): ICaseHistoryItem;
66
- //# sourceMappingURL=caseHistoryUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"caseHistoryUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseHistoryUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3G;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoBzD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKzE;AAMD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAO9D;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mDAAmD,CAAC;AAInF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAajF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAuCnF"}
@@ -1,165 +0,0 @@
1
- /**
2
- * Maps Salesforce field identifiers to human-readable display names.
3
- *
4
- * Contains two distinct key categories:
5
- * - Real SF API field names (e.g. `ContactId`, `RH_Product__c`, `FolderId__c`)
6
- * - Synthetic lifecycle pseudo-fields produced by the SF History API (e.g. `created`,
7
- * `closed`, `ownerAssignment`). These are not custom Salesforce fields — they represent
8
- * case lifecycle events that appear as history entries with no OldValue/NewValue.
9
- */
10
- export const FIELD_NAME_DISPLAY_MAP = {
11
- created: 'Case Created',
12
- closed: 'Case Closed',
13
- ownerAssignment: 'Owner',
14
- ownerAccepted: 'Owner',
15
- ownerEscalated: 'Owner',
16
- external: 'Visibility',
17
- ContactId: 'Contact',
18
- RH_Product__c: 'Product',
19
- RH_Version__c: 'Version',
20
- EntitlementId: 'Entitlement',
21
- AccountId: 'Account',
22
- OwnerId: 'Owner',
23
- BusinessHoursId: 'Business Hours',
24
- FolderId__c: 'Case Group',
25
- Status: 'Status',
26
- Customer_Escalation__c: 'Customer Escalation',
27
- SlaStartDate: 'SLA Start Date',
28
- Case_Language__c: 'Case Language',
29
- SBR_Group__c: 'SBR Group',
30
- };
31
- export function getFieldDisplayName(fieldName) {
32
- if (fieldName in FIELD_NAME_DISPLAY_MAP) {
33
- return FIELD_NAME_DISPLAY_MAP[fieldName];
34
- }
35
- return undefined;
36
- }
37
- // Salesforce object IDs are strictly 15 (case-sensitive) or 18 (case-insensitive)
38
- // alphanumeric characters. Strings of 16–17 chars are intentionally excluded.
39
- const SFDC_ID_REGEX = /^[a-zA-Z0-9]{15}$|^[a-zA-Z0-9]{18}$/;
40
- export function isSfdcId(value) {
41
- return SFDC_ID_REGEX.test(value);
42
- }
43
- /**
44
- * Extracts a string representation from a polymorphic SF value union.
45
- *
46
- * Property names (`stringValue`, `booleanValue`, etc.) correspond to GraphQL
47
- * inline-fragment aliases defined in the `GET_CASE_HISTORY` query. Changing those
48
- * aliases without updating this function will silently break value extraction.
49
- *
50
- * The check order is safe because the union discriminants are mutually exclusive.
51
- * Note: empty string `''` is a valid return value (distinct from `null`).
52
- */
53
- export function extractStringValue(val) {
54
- if (!val)
55
- return null;
56
- if ('stringValue' in val)
57
- return val.stringValue;
58
- if ('booleanValue' in val)
59
- return String(val.booleanValue);
60
- if ('doubleValue' in val)
61
- return String(val.doubleValue);
62
- if ('dateTimeValue' in val)
63
- return val.dateTimeValue;
64
- return null;
65
- }
66
- /**
67
- * Lifecycle pseudo-field names from the SF History API mapped to human-readable action
68
- * sentences. Fields not listed here fall back to using the raw `fieldName` as output text
69
- * in {@link normalizeNodeToHistoryItem}.
70
- */
71
- export const SPECIAL_FIELD_ACTIONS = {
72
- created: 'created the case',
73
- closed: 'closed the case',
74
- ownerAssignment: 'changed the case owner',
75
- ownerAccepted: 'accepted ownership of the case',
76
- ownerEscalated: 'escalated the case owner',
77
- external: 'made the case visible to customers',
78
- };
79
- export const DEFAULT_AVATAR_SRC = 'https://www.patternfly.org/images/668560cd.svg';
80
- const INTERNAL_USER_TYPE = 'Standard';
81
- /**
82
- * Only SF `UserType === 'Standard'` is treated as an internal (Red Hat) user.
83
- * All other types — including `null`, `undefined`, and unknown portal types — default
84
- * to customer. This conservative default ensures external users are never accidentally
85
- * styled as internal.
86
- */
87
- export function deriveIsCustomer(userType) {
88
- if (userType === INTERNAL_USER_TYPE)
89
- return false;
90
- return true;
91
- }
92
- /**
93
- * Filters out history entries whose values are raw Salesforce IDs that cannot be
94
- * decoded into human-readable display strings.
95
- *
96
- * Filtering rules:
97
- * - Both values null → **keep** (lifecycle action events carry no values)
98
- * - `newValue` is an SFDC ID and `oldValue` is null or also an ID → **drop**
99
- * (unresolvable reference change with no readable side)
100
- * - `oldValue` is an SFDC ID and `newValue` is null → **drop**
101
- * (ID removal with no display name)
102
- * - At least one side is a human-readable string → **keep**
103
- */
104
- export function filterSfdcIdEntries(edges) {
105
- return edges
106
- .map((edge) => edge.node)
107
- .filter((node) => {
108
- const newVal = extractStringValue(node.NewValue);
109
- const oldVal = extractStringValue(node.OldValue);
110
- if (!newVal && !oldVal)
111
- return true;
112
- const hasIdNewVal = newVal && isSfdcId(newVal);
113
- const hasIdOldVal = oldVal && isSfdcId(oldVal);
114
- if (hasIdNewVal && (!oldVal || hasIdOldVal))
115
- return false;
116
- if (hasIdOldVal && !newVal)
117
- return false;
118
- return true;
119
- });
120
- }
121
- /**
122
- * Converts a raw SF history node into a normalized `ICaseHistoryItem`.
123
- *
124
- * Classifies each entry as either:
125
- * - **Action** (`!oldValue && !newValue`): lifecycle events like "created", "closed".
126
- * `outputText` is set here from {@link SPECIAL_FIELD_ACTIONS}, or falls back to the
127
- * raw `fieldName` for unknown actions.
128
- * - **Change**: field-value mutations. `outputText` is left empty because the Timeline
129
- * layer formats change text via `applyReplacements` / `handleFieldChange`.
130
- *
131
- * Display name fallback chain: `FIELD_NAME_DISPLAY_MAP` → SF `label` → SF
132
- * `displayValue` → raw `fieldName`.
133
- */
134
- export function normalizeNodeToHistoryItem(node) {
135
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
136
- const fieldName = node.SalesforceSupportField.value;
137
- const oldValue = extractStringValue(node.OldValue);
138
- const newValue = extractStringValue(node.NewValue);
139
- const isAction = !oldValue && !newValue;
140
- let outputText = '';
141
- if (isAction) {
142
- if (fieldName in SPECIAL_FIELD_ACTIONS) {
143
- outputText = SPECIAL_FIELD_ACTIONS[fieldName];
144
- }
145
- else {
146
- outputText = fieldName;
147
- }
148
- }
149
- return {
150
- id: node.Id,
151
- fieldName,
152
- displayName: (_c = (_b = (_a = getFieldDisplayName(fieldName)) !== null && _a !== void 0 ? _a : node.SalesforceSupportField.label) !== null && _b !== void 0 ? _b : node.SalesforceSupportField.displayValue) !== null && _c !== void 0 ? _c : fieldName,
153
- label: (_f = (_e = (_d = getFieldDisplayName(fieldName)) !== null && _d !== void 0 ? _d : node.SalesforceSupportField.label) !== null && _e !== void 0 ? _e : node.SalesforceSupportField.displayValue) !== null && _f !== void 0 ? _f : fieldName,
154
- oldValue,
155
- newValue,
156
- createdDate: node.CreatedDate.value,
157
- createdByUserName: (_j = (_h = (_g = node.CreatedBy) === null || _g === void 0 ? void 0 : _g.Name) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : '',
158
- createdByCustomer: deriveIsCustomer((_l = (_k = node.CreatedBy) === null || _k === void 0 ? void 0 : _k.UserType) === null || _l === void 0 ? void 0 : _l.value),
159
- // TODO: SmallPhotoUrl points to an internal Salesforce domain that external portal
160
- // users can't authenticate against. If images break, Hydra will need to proxy them.
161
- photoUrl: (_p = (_o = (_m = node.CreatedBy) === null || _m === void 0 ? void 0 : _m.SmallPhotoUrl) === null || _o === void 0 ? void 0 : _o.value) !== null && _p !== void 0 ? _p : null,
162
- type: isAction ? 'Action' : 'Change',
163
- outputText,
164
- };
165
- }