@pega/cosmos-react-social 5.0.0-dev.4.6 → 5.0.0-dev.4.8

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 (237) hide show
  1. package/package.json +4 -4
  2. package/lib/components/Autopilot/Autopilot.d.ts +0 -15
  3. package/lib/components/Autopilot/Autopilot.d.ts.map +0 -1
  4. package/lib/components/Autopilot/Autopilot.js +0 -50
  5. package/lib/components/Autopilot/Autopilot.js.map +0 -1
  6. package/lib/components/Autopilot/AutopilotAvatar.d.ts +0 -8
  7. package/lib/components/Autopilot/AutopilotAvatar.d.ts.map +0 -1
  8. package/lib/components/Autopilot/AutopilotAvatar.js +0 -11
  9. package/lib/components/Autopilot/AutopilotAvatar.js.map +0 -1
  10. package/lib/components/Autopilot/AutopilotGlimpse.d.ts +0 -9
  11. package/lib/components/Autopilot/AutopilotGlimpse.d.ts.map +0 -1
  12. package/lib/components/Autopilot/AutopilotGlimpse.js +0 -24
  13. package/lib/components/Autopilot/AutopilotGlimpse.js.map +0 -1
  14. package/lib/components/Autopilot/index.d.ts +0 -4
  15. package/lib/components/Autopilot/index.d.ts.map +0 -1
  16. package/lib/components/Autopilot/index.js +0 -3
  17. package/lib/components/Autopilot/index.js.map +0 -1
  18. package/lib/components/Chat/Chat.d.ts +0 -29
  19. package/lib/components/Chat/Chat.d.ts.map +0 -1
  20. package/lib/components/Chat/Chat.js +0 -64
  21. package/lib/components/Chat/Chat.js.map +0 -1
  22. package/lib/components/Chat/Chat.types.d.ts +0 -136
  23. package/lib/components/Chat/Chat.types.d.ts.map +0 -1
  24. package/lib/components/Chat/Chat.types.js +0 -10
  25. package/lib/components/Chat/Chat.types.js.map +0 -1
  26. package/lib/components/Chat/ChatBody.d.ts +0 -7
  27. package/lib/components/Chat/ChatBody.d.ts.map +0 -1
  28. package/lib/components/Chat/ChatBody.js +0 -292
  29. package/lib/components/Chat/ChatBody.js.map +0 -1
  30. package/lib/components/Chat/ChatComposer.d.ts +0 -50
  31. package/lib/components/Chat/ChatComposer.d.ts.map +0 -1
  32. package/lib/components/Chat/ChatComposer.js +0 -221
  33. package/lib/components/Chat/ChatComposer.js.map +0 -1
  34. package/lib/components/Chat/ChatHeader.d.ts +0 -29
  35. package/lib/components/Chat/ChatHeader.d.ts.map +0 -1
  36. package/lib/components/Chat/ChatHeader.js +0 -44
  37. package/lib/components/Chat/ChatHeader.js.map +0 -1
  38. package/lib/components/Chat/ChatSettingsPanel.d.ts +0 -7
  39. package/lib/components/Chat/ChatSettingsPanel.d.ts.map +0 -1
  40. package/lib/components/Chat/ChatSettingsPanel.js +0 -15
  41. package/lib/components/Chat/ChatSettingsPanel.js.map +0 -1
  42. package/lib/components/Chat/ChatSettingsPanel.styles.d.ts +0 -16
  43. package/lib/components/Chat/ChatSettingsPanel.styles.d.ts.map +0 -1
  44. package/lib/components/Chat/ChatSettingsPanel.styles.js +0 -47
  45. package/lib/components/Chat/ChatSettingsPanel.styles.js.map +0 -1
  46. package/lib/components/Chat/Message.d.ts +0 -6
  47. package/lib/components/Chat/Message.d.ts.map +0 -1
  48. package/lib/components/Chat/Message.js +0 -98
  49. package/lib/components/Chat/Message.js.map +0 -1
  50. package/lib/components/Chat/Message.styles.d.ts +0 -43
  51. package/lib/components/Chat/Message.styles.d.ts.map +0 -1
  52. package/lib/components/Chat/Message.styles.js +0 -270
  53. package/lib/components/Chat/Message.styles.js.map +0 -1
  54. package/lib/components/Chat/SuggestedReplyPicker.d.ts +0 -42
  55. package/lib/components/Chat/SuggestedReplyPicker.d.ts.map +0 -1
  56. package/lib/components/Chat/SuggestedReplyPicker.js +0 -143
  57. package/lib/components/Chat/SuggestedReplyPicker.js.map +0 -1
  58. package/lib/components/Chat/SystemMessage.d.ts +0 -8
  59. package/lib/components/Chat/SystemMessage.d.ts.map +0 -1
  60. package/lib/components/Chat/SystemMessage.js +0 -50
  61. package/lib/components/Chat/SystemMessage.js.map +0 -1
  62. package/lib/components/Chat/TypeIndicator.d.ts +0 -6
  63. package/lib/components/Chat/TypeIndicator.d.ts.map +0 -1
  64. package/lib/components/Chat/TypeIndicator.js +0 -12
  65. package/lib/components/Chat/TypeIndicator.js.map +0 -1
  66. package/lib/components/Chat/index.d.ts +0 -15
  67. package/lib/components/Chat/index.d.ts.map +0 -1
  68. package/lib/components/Chat/index.js +0 -10
  69. package/lib/components/Chat/index.js.map +0 -1
  70. package/lib/components/Email/ContextMenuPopover.d.ts +0 -5
  71. package/lib/components/Email/ContextMenuPopover.d.ts.map +0 -1
  72. package/lib/components/Email/ContextMenuPopover.js +0 -53
  73. package/lib/components/Email/ContextMenuPopover.js.map +0 -1
  74. package/lib/components/Email/Email.d.ts +0 -7
  75. package/lib/components/Email/Email.d.ts.map +0 -1
  76. package/lib/components/Email/Email.js +0 -244
  77. package/lib/components/Email/Email.js.map +0 -1
  78. package/lib/components/Email/Email.styles.d.ts +0 -67
  79. package/lib/components/Email/Email.styles.d.ts.map +0 -1
  80. package/lib/components/Email/Email.styles.js +0 -392
  81. package/lib/components/Email/Email.styles.js.map +0 -1
  82. package/lib/components/Email/Email.types.d.ts +0 -394
  83. package/lib/components/Email/Email.types.d.ts.map +0 -1
  84. package/lib/components/Email/Email.types.js +0 -2
  85. package/lib/components/Email/Email.types.js.map +0 -1
  86. package/lib/components/Email/EmailCaseView.d.ts +0 -6
  87. package/lib/components/Email/EmailCaseView.d.ts.map +0 -1
  88. package/lib/components/Email/EmailCaseView.js +0 -36
  89. package/lib/components/Email/EmailCaseView.js.map +0 -1
  90. package/lib/components/Email/EmailComposer.d.ts +0 -10
  91. package/lib/components/Email/EmailComposer.d.ts.map +0 -1
  92. package/lib/components/Email/EmailComposer.js +0 -255
  93. package/lib/components/Email/EmailComposer.js.map +0 -1
  94. package/lib/components/Email/EmailConversation.d.ts +0 -17
  95. package/lib/components/Email/EmailConversation.d.ts.map +0 -1
  96. package/lib/components/Email/EmailConversation.js +0 -174
  97. package/lib/components/Email/EmailConversation.js.map +0 -1
  98. package/lib/components/Email/EmailEntity.d.ts +0 -11
  99. package/lib/components/Email/EmailEntity.d.ts.map +0 -1
  100. package/lib/components/Email/EmailEntity.js +0 -51
  101. package/lib/components/Email/EmailEntity.js.map +0 -1
  102. package/lib/components/Email/EmailManager.d.ts +0 -6
  103. package/lib/components/Email/EmailManager.d.ts.map +0 -1
  104. package/lib/components/Email/EmailManager.js +0 -21
  105. package/lib/components/Email/EmailManager.js.map +0 -1
  106. package/lib/components/Email/EmailNotificationPanel.d.ts +0 -7
  107. package/lib/components/Email/EmailNotificationPanel.d.ts.map +0 -1
  108. package/lib/components/Email/EmailNotificationPanel.js +0 -15
  109. package/lib/components/Email/EmailNotificationPanel.js.map +0 -1
  110. package/lib/components/Email/EmailSelector.d.ts +0 -22
  111. package/lib/components/Email/EmailSelector.d.ts.map +0 -1
  112. package/lib/components/Email/EmailSelector.js +0 -121
  113. package/lib/components/Email/EmailSelector.js.map +0 -1
  114. package/lib/components/Email/EmailShell.d.ts +0 -6
  115. package/lib/components/Email/EmailShell.d.ts.map +0 -1
  116. package/lib/components/Email/EmailShell.js +0 -46
  117. package/lib/components/Email/EmailShell.js.map +0 -1
  118. package/lib/components/Email/EmailSummaryItem.d.ts +0 -11
  119. package/lib/components/Email/EmailSummaryItem.d.ts.map +0 -1
  120. package/lib/components/Email/EmailSummaryItem.js +0 -118
  121. package/lib/components/Email/EmailSummaryItem.js.map +0 -1
  122. package/lib/components/Email/EmailSummaryList.d.ts +0 -6
  123. package/lib/components/Email/EmailSummaryList.d.ts.map +0 -1
  124. package/lib/components/Email/EmailSummaryList.js +0 -95
  125. package/lib/components/Email/EmailSummaryList.js.map +0 -1
  126. package/lib/components/Email/EntityList.d.ts +0 -6
  127. package/lib/components/Email/EntityList.d.ts.map +0 -1
  128. package/lib/components/Email/EntityList.js +0 -74
  129. package/lib/components/Email/EntityList.js.map +0 -1
  130. package/lib/components/Email/index.d.ts +0 -13
  131. package/lib/components/Email/index.d.ts.map +0 -1
  132. package/lib/components/Email/index.js +0 -12
  133. package/lib/components/Email/index.js.map +0 -1
  134. package/lib/components/Email/utils/EntityHighlighter.d.ts +0 -10
  135. package/lib/components/Email/utils/EntityHighlighter.d.ts.map +0 -1
  136. package/lib/components/Email/utils/EntityHighlighter.js +0 -260
  137. package/lib/components/Email/utils/EntityHighlighter.js.map +0 -1
  138. package/lib/components/Feed/Feed.context.d.ts +0 -51
  139. package/lib/components/Feed/Feed.context.d.ts.map +0 -1
  140. package/lib/components/Feed/Feed.context.js +0 -10
  141. package/lib/components/Feed/Feed.context.js.map +0 -1
  142. package/lib/components/Feed/Feed.d.ts +0 -6
  143. package/lib/components/Feed/Feed.d.ts.map +0 -1
  144. package/lib/components/Feed/Feed.js +0 -149
  145. package/lib/components/Feed/Feed.js.map +0 -1
  146. package/lib/components/Feed/Feed.types.d.ts +0 -334
  147. package/lib/components/Feed/Feed.types.d.ts.map +0 -1
  148. package/lib/components/Feed/Feed.types.js +0 -2
  149. package/lib/components/Feed/Feed.types.js.map +0 -1
  150. package/lib/components/Feed/FeedAnnouncer.d.ts +0 -6
  151. package/lib/components/Feed/FeedAnnouncer.d.ts.map +0 -1
  152. package/lib/components/Feed/FeedAnnouncer.js +0 -11
  153. package/lib/components/Feed/FeedAnnouncer.js.map +0 -1
  154. package/lib/components/Feed/FeedAttachments.d.ts +0 -8
  155. package/lib/components/Feed/FeedAttachments.d.ts.map +0 -1
  156. package/lib/components/Feed/FeedAttachments.js +0 -97
  157. package/lib/components/Feed/FeedAttachments.js.map +0 -1
  158. package/lib/components/Feed/FeedButton.d.ts +0 -5
  159. package/lib/components/Feed/FeedButton.d.ts.map +0 -1
  160. package/lib/components/Feed/FeedButton.js +0 -15
  161. package/lib/components/Feed/FeedButton.js.map +0 -1
  162. package/lib/components/Feed/FeedContent.d.ts +0 -6
  163. package/lib/components/Feed/FeedContent.d.ts.map +0 -1
  164. package/lib/components/Feed/FeedContent.js +0 -46
  165. package/lib/components/Feed/FeedContent.js.map +0 -1
  166. package/lib/components/Feed/FeedContentFooter.d.ts +0 -5
  167. package/lib/components/Feed/FeedContentFooter.d.ts.map +0 -1
  168. package/lib/components/Feed/FeedContentFooter.js +0 -34
  169. package/lib/components/Feed/FeedContentFooter.js.map +0 -1
  170. package/lib/components/Feed/FeedContentHeader.d.ts +0 -5
  171. package/lib/components/Feed/FeedContentHeader.d.ts.map +0 -1
  172. package/lib/components/Feed/FeedContentHeader.js +0 -107
  173. package/lib/components/Feed/FeedContentHeader.js.map +0 -1
  174. package/lib/components/Feed/FeedEditRegion.d.ts +0 -6
  175. package/lib/components/Feed/FeedEditRegion.d.ts.map +0 -1
  176. package/lib/components/Feed/FeedEditRegion.js +0 -57
  177. package/lib/components/Feed/FeedEditRegion.js.map +0 -1
  178. package/lib/components/Feed/FeedInputRegion.d.ts +0 -8
  179. package/lib/components/Feed/FeedInputRegion.d.ts.map +0 -1
  180. package/lib/components/Feed/FeedInputRegion.js +0 -86
  181. package/lib/components/Feed/FeedInputRegion.js.map +0 -1
  182. package/lib/components/Feed/FeedLikeButton.d.ts +0 -7
  183. package/lib/components/Feed/FeedLikeButton.d.ts.map +0 -1
  184. package/lib/components/Feed/FeedLikeButton.js +0 -102
  185. package/lib/components/Feed/FeedLikeButton.js.map +0 -1
  186. package/lib/components/Feed/FeedModalList.d.ts +0 -5
  187. package/lib/components/Feed/FeedModalList.d.ts.map +0 -1
  188. package/lib/components/Feed/FeedModalList.js +0 -39
  189. package/lib/components/Feed/FeedModalList.js.map +0 -1
  190. package/lib/components/Feed/FeedNewPost.d.ts +0 -7
  191. package/lib/components/Feed/FeedNewPost.d.ts.map +0 -1
  192. package/lib/components/Feed/FeedNewPost.js +0 -30
  193. package/lib/components/Feed/FeedNewPost.js.map +0 -1
  194. package/lib/components/Feed/FeedNewPostTypeMenu.d.ts +0 -6
  195. package/lib/components/Feed/FeedNewPostTypeMenu.d.ts.map +0 -1
  196. package/lib/components/Feed/FeedNewPostTypeMenu.js +0 -375
  197. package/lib/components/Feed/FeedNewPostTypeMenu.js.map +0 -1
  198. package/lib/components/Feed/FeedPost.d.ts +0 -8
  199. package/lib/components/Feed/FeedPost.d.ts.map +0 -1
  200. package/lib/components/Feed/FeedPost.js +0 -85
  201. package/lib/components/Feed/FeedPost.js.map +0 -1
  202. package/lib/components/Feed/FeedReply.d.ts +0 -7
  203. package/lib/components/Feed/FeedReply.d.ts.map +0 -1
  204. package/lib/components/Feed/FeedReply.js +0 -36
  205. package/lib/components/Feed/FeedReply.js.map +0 -1
  206. package/lib/components/Feed/FeedReplyInput.d.ts +0 -7
  207. package/lib/components/Feed/FeedReplyInput.d.ts.map +0 -1
  208. package/lib/components/Feed/FeedReplyInput.js +0 -21
  209. package/lib/components/Feed/FeedReplyInput.js.map +0 -1
  210. package/lib/components/Feed/FeedRichText.d.ts +0 -6
  211. package/lib/components/Feed/FeedRichText.d.ts.map +0 -1
  212. package/lib/components/Feed/FeedRichText.js +0 -163
  213. package/lib/components/Feed/FeedRichText.js.map +0 -1
  214. package/lib/components/Feed/index.d.ts +0 -7
  215. package/lib/components/Feed/index.d.ts.map +0 -1
  216. package/lib/components/Feed/index.js +0 -6
  217. package/lib/components/Feed/index.js.map +0 -1
  218. package/lib/components/HashtagButton/HashtagButton.d.ts +0 -23
  219. package/lib/components/HashtagButton/HashtagButton.d.ts.map +0 -1
  220. package/lib/components/HashtagButton/HashtagButton.js +0 -44
  221. package/lib/components/HashtagButton/HashtagButton.js.map +0 -1
  222. package/lib/components/HashtagButton/index.d.ts +0 -3
  223. package/lib/components/HashtagButton/index.d.ts.map +0 -1
  224. package/lib/components/HashtagButton/index.js +0 -3
  225. package/lib/components/HashtagButton/index.js.map +0 -1
  226. package/lib/components/MentionButton/MentionButton.d.ts +0 -35
  227. package/lib/components/MentionButton/MentionButton.d.ts.map +0 -1
  228. package/lib/components/MentionButton/MentionButton.js +0 -94
  229. package/lib/components/MentionButton/MentionButton.js.map +0 -1
  230. package/lib/components/MentionButton/index.d.ts +0 -3
  231. package/lib/components/MentionButton/index.d.ts.map +0 -1
  232. package/lib/components/MentionButton/index.js +0 -3
  233. package/lib/components/MentionButton/index.js.map +0 -1
  234. package/lib/index.d.ts +0 -12
  235. package/lib/index.d.ts.map +0 -1
  236. package/lib/index.js +0 -13
  237. package/lib/index.js.map +0 -1
@@ -1,394 +0,0 @@
1
- import { ReactNode, Ref, MouseEvent, MouseEventHandler } from 'react';
2
- import { UtilitiesSummaryProps } from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';
3
- import { BaseProps, AvatarProps, SentimentProps, FileDisplayProps, FileUploadItemProps, OmitStrict, MenuProps, MenuItemProps, TooltipProps, NoChildrenProp, EmptyStateProps, ProgressProps, PageTemplateProps, PopoverProps, BannerProps } from '@pega/cosmos-react-core';
4
- import { EditorProps, EditorState, RichTextEditorProps } from '@pega/cosmos-react-rte';
5
- export interface EmailTemplate {
6
- /** Template title */
7
- title: string;
8
- /** Template id */
9
- id: string;
10
- /** categorized templates */
11
- templates?: Pick<EmailTemplate, 'title' | 'id'>[];
12
- }
13
- export interface EmailUser {
14
- /** Short name of the User */
15
- shortName: string;
16
- /** Full name of the User */
17
- fullName: string;
18
- /** Email of the User */
19
- emailAddress: string;
20
- /** Avatar props of the User */
21
- avatarProps?: Partial<AvatarProps>;
22
- }
23
- export interface EntityHighlightMapping {
24
- value: string;
25
- type: string;
26
- variant: number;
27
- names?: string[];
28
- icon?: string;
29
- }
30
- export interface EntityMatch extends EntityHighlightMapping, MatchRange {
31
- matchedText: string;
32
- children?: EntityMatch[];
33
- }
34
- export interface MatchRange {
35
- start: number;
36
- end: number;
37
- }
38
- export interface ContextMenuProps extends Pick<MenuProps, 'loading'> {
39
- /** Callback triggered when a menu item is clicked */
40
- onItemClick: (selectedValue: {
41
- fieldName: string;
42
- fieldValue: string;
43
- }) => void;
44
- /** Menu items */
45
- items: MenuItemProps[];
46
- /** Imperative handle */
47
- handle: Ref<ContextMenuHandleValue>;
48
- }
49
- export interface ContextMenuHandleValue {
50
- setItems: (contextMenuItems: ContextMenuProps['items']) => void;
51
- setOpen: (open: boolean) => void;
52
- setLoading: (loading: boolean) => void;
53
- }
54
- export interface EmailProps extends BaseProps, NoChildrenProp {
55
- /** Ref to the element */
56
- ref?: Ref<HTMLDivElement>;
57
- /** Unique ID for this email record */
58
- id: string;
59
- /** Timestamp of this email as ISO8601 string, timestamp or native Date object. */
60
- timeStamp: Date | number | string;
61
- /** From email */
62
- from: EmailUser;
63
- /** To email */
64
- to: EmailUser[];
65
- /** Carbon copy of email users list */
66
- cc?: EmailUser[];
67
- /** Blind carbon copy of email users list */
68
- bcc?: EmailUser[];
69
- /** Sentiment */
70
- sentiment?: SentimentProps;
71
- /** Subject of the email */
72
- subject?: string;
73
- /** Body */
74
- body?: string;
75
- /** Forwarded content */
76
- forwardedContent?: string;
77
- /**
78
- * Entity highlight mapping
79
- * This requires body to be passed as a string with html tags
80
- */
81
- entityHighlightMapping?: EntityHighlightMapping[];
82
- /** onReply callback */
83
- onReply?: (id: EmailProps['id']) => void;
84
- /** onForward Callback */
85
- onForward?: (id: EmailProps['id']) => void;
86
- /** onReply callback */
87
- onReplyAll?: (id: EmailProps['id']) => void;
88
- /** Edit draft callback */
89
- onEditDraft?: (id: EmailProps['id']) => void;
90
- /** Delete draft Callback */
91
- onDeleteDraft?: (id: EmailProps['id']) => void;
92
- /** Show either undelivered or draft status on email */
93
- status?: 'undelivered' | 'draft';
94
- /** List of suggestions */
95
- suggestions?: EmailTemplate[];
96
- /** Callback that triggers on click of tag */
97
- onSuggestionClick?: (id: EmailProps['id'], suggestionId: EmailTemplate['id']) => void;
98
- /** Flag that indicates if email is unread
99
- * @default false
100
- */
101
- unRead?: boolean;
102
- /** Attachments list */
103
- attachments?: FileDisplayProps[];
104
- /**
105
- * Context menu props. Context menu is disabled if it is not provided.
106
- * To set the context menu items, use the setContextMenuItems method provided on handle
107
- */
108
- contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {
109
- /** Callback on right click of content */
110
- onContextMenu: (id: EmailProps['id'], e: MouseEvent) => void;
111
- };
112
- /** Show banner for undelivered email */
113
- banner?: Pick<BannerProps, 'messages'>;
114
- }
115
- export interface EmailConversationProps extends BaseProps {
116
- /** ref to the element */
117
- ref?: Ref<HTMLLIElement>;
118
- /** Unique ID for this email conversation record */
119
- id: string;
120
- /** List of mails */
121
- emails: EmailProps[];
122
- /** Sender(s) of this email conversation */
123
- from: EmailUser;
124
- /** Recipient(s) of this email conversation */
125
- to: EmailUser[];
126
- /** Count of unread emails */
127
- unReadEmailCount?: number;
128
- /** Timestamp of this conversation as ISO8601 string, timestamp or native Date object. */
129
- timeStamp: Date | string | number;
130
- /** Flag that indicates if email conversation is expanded */
131
- isCollapsed?: boolean;
132
- /** Flag to set if conversation is spun off from forwarded email */
133
- isForwarded?: boolean;
134
- /** Callback when email conversation is collapsed */
135
- onCollapse?: () => void;
136
- /** Callback when email conversation is expanded */
137
- onExpand?: () => void;
138
- /** Flag that indicates if email conversation contains drafted emails */
139
- drafts?: boolean;
140
- /** Flag that indicates if email conversation contains undelivered emails */
141
- undelivered?: boolean;
142
- }
143
- export type EmailResponseType = 'reply' | 'replyAll' | 'forward';
144
- export type EmailComposerFieldType = 'to' | 'cc' | 'bcc' | 'subject' | 'bodyContent' | 'attachments' | 'emailAccount' | 'responseType' | 'selectedTemplateId';
145
- export type EmailComposerValueType<T> = T extends 'to' | 'cc' | 'bcc' ? EmailUser['emailAddress'][] : T extends 'subject' | 'bodyContent' ? string : T extends 'selectedTemplateId' ? string : T extends 'attachments' ? FileUploadItemProps[] : T extends 'responseType' ? EmailResponseType : T extends 'emailAccount' ? string : never;
146
- export interface EmailDirectRecipients {
147
- /** To address/addresses in case of reply response type on email. */
148
- reply: EmailUser['emailAddress'][];
149
- /** To address/addresses in case of replyAll response type on email. */
150
- replyAll: EmailUser['emailAddress'][];
151
- /** To address/addresses in case of forward response type on email. */
152
- forward?: EmailUser['emailAddress'][];
153
- }
154
- export interface EmailComposerHandleValue {
155
- replaceBodyContent: (content: string) => void;
156
- updateImage: EditorState['appendImage'];
157
- activate: () => void;
158
- setCursorLocationToStart: EditorState['setCursorLocationToStart'];
159
- }
160
- export interface EmailComposerProps extends Pick<EmailProps, 'suggestions' | 'onSuggestionClick'>, BaseProps, NoChildrenProp {
161
- /** Show loader until the background process completes */
162
- progress?: boolean | Pick<ProgressProps, 'message'>;
163
- /** Object containing full list of email participants. */
164
- participants: EmailUser[];
165
- /** Object containing full list of sender email accounts */
166
- senderAccounts?: EmailUser[];
167
- /** Data for all fields of the composer */
168
- data: {
169
- /** Object to hold selected email account and field error */
170
- emailAccount?: {
171
- value: EmailUser['emailAddress'];
172
- error?: string;
173
- };
174
- /** Object to hold to address/addresses and field error */
175
- to?: {
176
- value: EmailUser['emailAddress'][];
177
- error?: string;
178
- };
179
- /** Object to hold Cc address/addresses and field error */
180
- cc?: {
181
- value: EmailUser['emailAddress'][];
182
- error?: string;
183
- };
184
- /** Object to hold Bcc address/addresses and field error */
185
- bcc?: {
186
- value: EmailUser['emailAddress'][];
187
- error?: string;
188
- };
189
- /** Object to hold the subject value and error */
190
- subject: {
191
- value: string;
192
- error?: string;
193
- };
194
- /** Object containing the default body content and error */
195
- bodyContent: {
196
- defaultValue: string;
197
- error?: string;
198
- };
199
- /** Selected template id */
200
- selectedTemplateId?: EmailTemplate['id'];
201
- /** List of attachments */
202
- attachments?: FileUploadItemProps[];
203
- /** Email response types */
204
- responseType?: EmailResponseType;
205
- };
206
- /** Callback when user clicks on the send button */
207
- onSend: () => void;
208
- /** Callback when user clicks on the save button */
209
- onSave?: () => void;
210
- /** Callback when image is added */
211
- onImageAdded?: RichTextEditorProps['onImageAdded'];
212
- /** Region to show more actions in footer */
213
- footerMoreActions?: ReactNode;
214
- /** Templates for drafting email */
215
- templates?: EmailTemplate[];
216
- /** Callback when user clicks on cancel */
217
- onCancel: () => void;
218
- /**
219
- * Callback to handle external entry validation for to, cc and bcc fields while adding a new email to the list
220
- * If returned true considers the entry to be a valid entry
221
- */
222
- externalValidator?: (value: string) => boolean;
223
- /** Ref to the element */
224
- ref?: Ref<HTMLDivElement>;
225
- /** Imperative handle for composer */
226
- handle?: Ref<EmailComposerHandleValue>;
227
- /** Change handler to all fields */
228
- onChange: <T extends EmailComposerFieldType>(field: T, value: EmailComposerValueType<T>, isProgrammatic?: boolean) => void;
229
- /** Callback when composer body editor is initialized */
230
- onEditorInit?: EditorProps['onInit'];
231
- }
232
- export interface EmailShellProps extends BaseProps {
233
- /** ref to the element */
234
- ref?: Ref<HTMLDivElement>;
235
- /** Region for header */
236
- headerProps?: {
237
- /** Region for actions */
238
- actions?: ReactNode;
239
- /** Subject of the email conversations list */
240
- subject?: string;
241
- };
242
- /** Email conversations */
243
- conversations?: EmailConversationProps[];
244
- /** Shows only one conversation at a time */
245
- autoCollapse?: boolean;
246
- }
247
- export interface EmailSummaryItemProps extends BaseProps {
248
- /** Id of each summary item */
249
- id: string;
250
- /** List of from participant names of the conversations */
251
- activeParticipants: EmailUser[];
252
- /** Email body of last email in the email */
253
- message: string;
254
- /** Timestamp of the latest email */
255
- timeStamp: Date | string | number;
256
- /** Top topic of an email */
257
- topic?: string;
258
- /** Sentiment */
259
- sentiment?: SentimentProps;
260
- /** Urgency of an email */
261
- urgency?: number;
262
- /** Total number of unread emails in the email */
263
- unreadEmailCount?: number;
264
- /** Is the email currently active */
265
- active?: boolean;
266
- /** On click of email item */
267
- onSelect: (id: EmailSummaryItemProps['id']) => void;
268
- /** Flag that indicates if email summary item contains drafted emails */
269
- drafts?: EmailConversationProps['drafts'];
270
- /** Flag that indicates if email summary item contains undelivered emails */
271
- undelivered?: EmailConversationProps['undelivered'];
272
- /** Contains search string used to highlight matching text in heading */
273
- searchQuery?: EmailSummaryListProps['searchQuery'];
274
- /** ref to the element */
275
- ref?: Ref<HTMLLIElement>;
276
- }
277
- export interface Filter {
278
- /** Sets DOM id for the control and associates label element via 'for' attribute. */
279
- id: string;
280
- /** Pass a string or a fragment with an Icon and string for the filter label. */
281
- label: ReactNode;
282
- /**
283
- * Disables the filter.
284
- * @default false
285
- */
286
- disabled?: boolean;
287
- /**
288
- * Sets on prop via onFilterChange.
289
- * @default false
290
- */
291
- on?: boolean;
292
- }
293
- export interface EmailSummaryListProps extends BaseProps {
294
- /** List of email categories */
295
- categories?: MenuProps['items'];
296
- /** Handles category change */
297
- onCategoryClick?: MenuItemProps['onClick'];
298
- /** List of EmailItems items */
299
- items: OmitStrict<EmailSummaryItemProps, 'onSelect' | 'active'>[];
300
- /** Total number of unread email count */
301
- unreadEmailCount?: number;
302
- /** A set of filters to apply to the email inbox. */
303
- filters?: Filter[];
304
- /** A callback that runs when a filter is clicked. */
305
- onFilterChange?: (filterId: Filter['id'], on: boolean) => void;
306
- /** onClick of list item */
307
- onItemClick: (id: EmailSummaryItemProps['id']) => void;
308
- /** Indicates if the data is being currently loading */
309
- loading?: boolean;
310
- /** Callback to fetch more rows */
311
- onLoadMore?: () => void;
312
- /** Empty message when there are no email summary items */
313
- emptyMessage?: EmptyStateProps['message'];
314
- /** Id of the EmailSummaryItem */
315
- currentItemId?: string;
316
- /** Use summary list as selectable list */
317
- selectable?: boolean;
318
- /** Contains search string used to show static heading text and
319
- * show matching text as highlighted text in EmailSummaryItem heading */
320
- searchQuery?: string;
321
- /** ref to the element */
322
- ref?: Ref<HTMLOListElement>;
323
- }
324
- export interface EmailEntityProps extends BaseProps {
325
- entity: OmitStrict<EntityHighlightMapping, 'names'> & {
326
- description?: TooltipProps['children'];
327
- };
328
- ref?: Ref<HTMLElement>;
329
- }
330
- export interface TargetProps {
331
- cursorPosition: {
332
- x: number;
333
- y: number;
334
- };
335
- targetNode: Node | null;
336
- }
337
- export interface ContextMenuPopoverProps extends BaseProps, TargetProps {
338
- contextMenu: ContextMenuProps;
339
- show: PopoverProps['show'];
340
- ref?: PopoverProps['ref'];
341
- }
342
- export interface EntityListProps extends BaseProps {
343
- content: {
344
- name: string;
345
- value?: {
346
- id: string;
347
- entity: OmitStrict<EntityHighlightMapping, 'names'>;
348
- }[];
349
- }[];
350
- header?: {
351
- icon: string;
352
- text: string;
353
- };
354
- /**
355
- * Context menu props. Context menu is disabled if it is not provided.
356
- * To set the context menu items, use the setContextMenuItems method provided on handle
357
- */
358
- contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {
359
- onContextMenu: (e: MouseEvent) => void;
360
- popoverRef?: ContextMenuPopoverProps['ref'];
361
- };
362
- ref?: Ref<HTMLDivElement>;
363
- }
364
- export interface EmailManagerProps extends BaseProps {
365
- /** Header of the component */
366
- header?: {
367
- title: PageTemplateProps['title'];
368
- icon?: PageTemplateProps['icon'];
369
- };
370
- /** A region to hold an EmailSummaryList component */
371
- list?: ReactNode;
372
- /** Email case details */
373
- emailCaseDetails?: ReactNode;
374
- }
375
- export interface EmailCaseViewProps extends BaseProps {
376
- /** Header of the the component */
377
- header?: EmailManagerProps['header'];
378
- /** A region to hold an Emails component */
379
- content: ReactNode;
380
- /** A region above the center column to display banners. */
381
- banners?: ReactNode;
382
- /** A region that is used to hold Utility components. */
383
- utilities?: ReactNode;
384
- /** The utilities summary array will be used to render the minimized utilities card. */
385
- utilitiesSummaryItems?: UtilitiesSummaryProps['items'];
386
- /** Expand/Collapse utilities */
387
- defaultUtilitiesExpanded?: boolean;
388
- }
389
- export interface EmailNotificationPanelProps extends BaseProps {
390
- count: number;
391
- label: string;
392
- onClick: MouseEventHandler;
393
- }
394
- //# sourceMappingURL=Email.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Email.types.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AACzG,OAAO,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,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AAc,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,8BAA8B;IAC9B,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;KAClC,CAAC;IACF,qDAAqD;IACrD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,kCAAkC;IAClC,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,2CAA2C;IAC3C,OAAO,EAAE,SAAS,CAAC;IACnB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACvD,gCAAgC;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC;CAC5B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Email.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Email.types.js","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref, MouseEvent, MouseEventHandler } from 'react';\n\nimport { UtilitiesSummaryProps } from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';\nimport {\n BaseProps,\n AvatarProps,\n SentimentProps,\n FileDisplayProps,\n FileUploadItemProps,\n OmitStrict,\n MenuProps,\n MenuItemProps,\n TooltipProps,\n NoChildrenProp,\n EmptyStateProps,\n ProgressProps,\n PageTemplateProps,\n PopoverProps,\n BannerProps\n} from '@pega/cosmos-react-core';\nimport { EditorProps, EditorState, RichTextEditorProps } from '@pega/cosmos-react-rte';\n\nexport interface EmailTemplate {\n /** Template title */\n title: string;\n /** Template id */\n id: string;\n /** categorized templates */\n templates?: Pick<EmailTemplate, 'title' | 'id'>[];\n}\n\nexport interface EmailUser {\n /** Short name of the User */\n shortName: string;\n /** Full name of the User */\n fullName: string;\n /** Email of the User */\n emailAddress: string;\n /** Avatar props of the User */\n avatarProps?: Partial<AvatarProps>;\n}\n\nexport interface EntityHighlightMapping {\n value: string;\n type: string;\n variant: number;\n names?: string[];\n icon?: string;\n}\n\nexport interface EntityMatch extends EntityHighlightMapping, MatchRange {\n matchedText: string;\n children?: EntityMatch[];\n}\n\nexport interface MatchRange {\n start: number;\n end: number;\n}\n\nexport interface ContextMenuProps extends Pick<MenuProps, 'loading'> {\n /** Callback triggered when a menu item is clicked */\n onItemClick: (selectedValue: { fieldName: string; fieldValue: string }) => void;\n /** Menu items */\n items: MenuItemProps[];\n /** Imperative handle */\n handle: Ref<ContextMenuHandleValue>;\n}\n\nexport interface ContextMenuHandleValue {\n setItems: (contextMenuItems: ContextMenuProps['items']) => void;\n setOpen: (open: boolean) => void;\n setLoading: (loading: boolean) => void;\n}\n\nexport interface EmailProps extends BaseProps, NoChildrenProp {\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Unique ID for this email record */\n id: string;\n /** Timestamp of this email as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | number | string;\n /** From email */\n from: EmailUser;\n /** To email */\n to: EmailUser[];\n /** Carbon copy of email users list */\n cc?: EmailUser[];\n /** Blind carbon copy of email users list */\n bcc?: EmailUser[];\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Subject of the email */\n subject?: string;\n /** Body */\n body?: string;\n /** Forwarded content */\n forwardedContent?: string;\n /**\n * Entity highlight mapping\n * This requires body to be passed as a string with html tags\n */\n entityHighlightMapping?: EntityHighlightMapping[];\n /** onReply callback */\n onReply?: (id: EmailProps['id']) => void;\n /** onForward Callback */\n onForward?: (id: EmailProps['id']) => void;\n /** onReply callback */\n onReplyAll?: (id: EmailProps['id']) => void;\n /** Edit draft callback */\n onEditDraft?: (id: EmailProps['id']) => void;\n /** Delete draft Callback */\n onDeleteDraft?: (id: EmailProps['id']) => void;\n /** Show either undelivered or draft status on email */\n status?: 'undelivered' | 'draft';\n /** List of suggestions */\n suggestions?: EmailTemplate[];\n /** Callback that triggers on click of tag */\n onSuggestionClick?: (id: EmailProps['id'], suggestionId: EmailTemplate['id']) => void;\n /** Flag that indicates if email is unread\n * @default false\n */\n unRead?: boolean;\n /** Attachments list */\n attachments?: FileDisplayProps[];\n /**\n * Context menu props. Context menu is disabled if it is not provided.\n * To set the context menu items, use the setContextMenuItems method provided on handle\n */\n contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {\n /** Callback on right click of content */\n onContextMenu: (id: EmailProps['id'], e: MouseEvent) => void;\n };\n /** Show banner for undelivered email */\n banner?: Pick<BannerProps, 'messages'>;\n}\n\nexport interface EmailConversationProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLLIElement>;\n /** Unique ID for this email conversation record */\n id: string;\n /** List of mails */\n emails: EmailProps[];\n /** Sender(s) of this email conversation */\n from: EmailUser;\n /** Recipient(s) of this email conversation */\n to: EmailUser[];\n /** Count of unread emails */\n unReadEmailCount?: number;\n /** Timestamp of this conversation as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | string | number;\n /** Flag that indicates if email conversation is expanded */\n isCollapsed?: boolean;\n /** Flag to set if conversation is spun off from forwarded email */\n isForwarded?: boolean;\n /** Callback when email conversation is collapsed */\n onCollapse?: () => void;\n /** Callback when email conversation is expanded */\n onExpand?: () => void;\n /** Flag that indicates if email conversation contains drafted emails */\n drafts?: boolean;\n /** Flag that indicates if email conversation contains undelivered emails */\n undelivered?: boolean;\n}\n\nexport type EmailResponseType = 'reply' | 'replyAll' | 'forward';\n\nexport type EmailComposerFieldType =\n | 'to'\n | 'cc'\n | 'bcc'\n | 'subject'\n | 'bodyContent'\n | 'attachments'\n | 'emailAccount'\n | 'responseType'\n | 'selectedTemplateId';\n\nexport type EmailComposerValueType<T> = T extends 'to' | 'cc' | 'bcc'\n ? EmailUser['emailAddress'][]\n : T extends 'subject' | 'bodyContent'\n ? string\n : T extends 'selectedTemplateId'\n ? string\n : T extends 'attachments'\n ? FileUploadItemProps[]\n : T extends 'responseType'\n ? EmailResponseType\n : T extends 'emailAccount'\n ? string\n : never;\n\nexport interface EmailDirectRecipients {\n /** To address/addresses in case of reply response type on email. */\n reply: EmailUser['emailAddress'][];\n /** To address/addresses in case of replyAll response type on email. */\n replyAll: EmailUser['emailAddress'][];\n /** To address/addresses in case of forward response type on email. */\n forward?: EmailUser['emailAddress'][];\n}\n\nexport interface EmailComposerHandleValue {\n replaceBodyContent: (content: string) => void;\n updateImage: EditorState['appendImage'];\n activate: () => void;\n setCursorLocationToStart: EditorState['setCursorLocationToStart'];\n}\n\nexport interface EmailComposerProps\n extends Pick<EmailProps, 'suggestions' | 'onSuggestionClick'>,\n BaseProps,\n NoChildrenProp {\n /** Show loader until the background process completes */\n progress?: boolean | Pick<ProgressProps, 'message'>;\n /** Object containing full list of email participants. */\n participants: EmailUser[];\n /** Object containing full list of sender email accounts */\n senderAccounts?: EmailUser[];\n /** Data for all fields of the composer */\n data: {\n /** Object to hold selected email account and field error */\n emailAccount?: {\n value: EmailUser['emailAddress'];\n error?: string;\n };\n /** Object to hold to address/addresses and field error */\n to?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Cc address/addresses and field error */\n cc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Bcc address/addresses and field error */\n bcc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold the subject value and error */\n subject: {\n value: string;\n error?: string;\n };\n /** Object containing the default body content and error */\n bodyContent: {\n defaultValue: string;\n error?: string;\n };\n /** Selected template id */\n selectedTemplateId?: EmailTemplate['id'];\n /** List of attachments */\n attachments?: FileUploadItemProps[];\n /** Email response types */\n responseType?: EmailResponseType;\n };\n /** Callback when user clicks on the send button */\n onSend: () => void;\n /** Callback when user clicks on the save button */\n onSave?: () => void;\n /** Callback when image is added */\n onImageAdded?: RichTextEditorProps['onImageAdded'];\n /** Region to show more actions in footer */\n footerMoreActions?: ReactNode;\n /** Templates for drafting email */\n templates?: EmailTemplate[];\n /** Callback when user clicks on cancel */\n onCancel: () => void;\n /**\n * Callback to handle external entry validation for to, cc and bcc fields while adding a new email to the list\n * If returned true considers the entry to be a valid entry\n */\n externalValidator?: (value: string) => boolean;\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Imperative handle for composer */\n handle?: Ref<EmailComposerHandleValue>;\n /** Change handler to all fields */\n onChange: <T extends EmailComposerFieldType>(\n field: T,\n value: EmailComposerValueType<T>,\n isProgrammatic?: boolean\n ) => void;\n /** Callback when composer body editor is initialized */\n onEditorInit?: EditorProps['onInit'];\n}\n\nexport interface EmailShellProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Region for header */\n headerProps?: {\n /** Region for actions */\n actions?: ReactNode;\n /** Subject of the email conversations list */\n subject?: string;\n };\n /** Email conversations */\n conversations?: EmailConversationProps[];\n /** Shows only one conversation at a time */\n autoCollapse?: boolean;\n}\n\nexport interface EmailSummaryItemProps extends BaseProps {\n /** Id of each summary item */\n id: string;\n /** List of from participant names of the conversations */\n activeParticipants: EmailUser[];\n /** Email body of last email in the email */\n message: string;\n /** Timestamp of the latest email */\n timeStamp: Date | string | number;\n /** Top topic of an email */\n topic?: string;\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Urgency of an email */\n urgency?: number;\n /** Total number of unread emails in the email */\n unreadEmailCount?: number;\n /** Is the email currently active */\n active?: boolean;\n /** On click of email item */\n onSelect: (id: EmailSummaryItemProps['id']) => void;\n /** Flag that indicates if email summary item contains drafted emails */\n drafts?: EmailConversationProps['drafts'];\n /** Flag that indicates if email summary item contains undelivered emails */\n undelivered?: EmailConversationProps['undelivered'];\n /** Contains search string used to highlight matching text in heading */\n searchQuery?: EmailSummaryListProps['searchQuery'];\n /** ref to the element */\n ref?: Ref<HTMLLIElement>;\n}\n\nexport interface Filter {\n /** Sets DOM id for the control and associates label element via 'for' attribute. */\n id: string;\n /** Pass a string or a fragment with an Icon and string for the filter label. */\n label: ReactNode;\n /**\n * Disables the filter.\n * @default false\n */\n disabled?: boolean;\n /**\n * Sets on prop via onFilterChange.\n * @default false\n */\n on?: boolean;\n}\n\nexport interface EmailSummaryListProps extends BaseProps {\n /** List of email categories */\n categories?: MenuProps['items'];\n /** Handles category change */\n onCategoryClick?: MenuItemProps['onClick'];\n /** List of EmailItems items */\n items: OmitStrict<EmailSummaryItemProps, 'onSelect' | 'active'>[];\n /** Total number of unread email count */\n unreadEmailCount?: number;\n /** A set of filters to apply to the email inbox. */\n filters?: Filter[];\n /** A callback that runs when a filter is clicked. */\n onFilterChange?: (filterId: Filter['id'], on: boolean) => void;\n /** onClick of list item */\n onItemClick: (id: EmailSummaryItemProps['id']) => void;\n /** Indicates if the data is being currently loading */\n loading?: boolean;\n /** Callback to fetch more rows */\n onLoadMore?: () => void;\n /** Empty message when there are no email summary items */\n emptyMessage?: EmptyStateProps['message'];\n /** Id of the EmailSummaryItem */\n currentItemId?: string;\n /** Use summary list as selectable list */\n selectable?: boolean;\n /** Contains search string used to show static heading text and\n * show matching text as highlighted text in EmailSummaryItem heading */\n searchQuery?: string;\n /** ref to the element */\n ref?: Ref<HTMLOListElement>;\n}\n\nexport interface EmailEntityProps extends BaseProps {\n entity: OmitStrict<EntityHighlightMapping, 'names'> & { description?: TooltipProps['children'] };\n ref?: Ref<HTMLElement>;\n}\n\nexport interface TargetProps {\n cursorPosition: { x: number; y: number };\n targetNode: Node | null;\n}\n\nexport interface ContextMenuPopoverProps extends BaseProps, TargetProps {\n contextMenu: ContextMenuProps;\n show: PopoverProps['show'];\n ref?: PopoverProps['ref'];\n}\n\nexport interface EntityListProps extends BaseProps {\n content: {\n name: string;\n value?: {\n id: string;\n entity: OmitStrict<EntityHighlightMapping, 'names'>;\n }[];\n }[];\n\n header?: {\n icon: string;\n text: string;\n };\n /**\n * Context menu props. Context menu is disabled if it is not provided.\n * To set the context menu items, use the setContextMenuItems method provided on handle\n */\n contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {\n onContextMenu: (e: MouseEvent) => void;\n popoverRef?: ContextMenuPopoverProps['ref'];\n };\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface EmailManagerProps extends BaseProps {\n /** Header of the component */\n header?: {\n title: PageTemplateProps['title'];\n icon?: PageTemplateProps['icon'];\n };\n /** A region to hold an EmailSummaryList component */\n list?: ReactNode;\n /** Email case details */\n emailCaseDetails?: ReactNode;\n}\n\nexport interface EmailCaseViewProps extends BaseProps {\n /** Header of the the component */\n header?: EmailManagerProps['header'];\n /** A region to hold an Emails component */\n content: ReactNode;\n /** A region above the center column to display banners. */\n banners?: ReactNode;\n /** A region that is used to hold Utility components. */\n utilities?: ReactNode;\n /** The utilities summary array will be used to render the minimized utilities card. */\n utilitiesSummaryItems?: UtilitiesSummaryProps['items'];\n /** Expand/Collapse utilities */\n defaultUtilitiesExpanded?: boolean;\n}\n\nexport interface EmailNotificationPanelProps extends BaseProps {\n count: number;\n label: string;\n onClick: MouseEventHandler;\n}\n"]}
@@ -1,6 +0,0 @@
1
- import { FC } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { EmailCaseViewProps } from './Email.types';
4
- declare const EmailCaseView: FC<EmailCaseViewProps & ForwardProps>;
5
- export default EmailCaseView;
6
- //# sourceMappingURL=EmailCaseView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailCaseView.d.ts","sourceRoot":"","sources":["../../../src/components/Email/EmailCaseView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2D,MAAM,OAAO,CAAC;AAEpF,OAAO,EAIL,YAAY,EAMb,MAAM,yBAAyB,CAAC;AAgBjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,GAAG,YAAY,CA6IxD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useState, useMemo, useRef } from 'react';
3
- import { Button, Drawer, Flex, Icon, useBreakpoint, useDirection, useI18n, Text } from '@pega/cosmos-react-core';
4
- import UtilitiesSummary from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';
5
- import { StyledCaseDrawerContent } from '@pega/cosmos-react-work';
6
- import { StyledPageIcon } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';
7
- import { StyledEmailCaseViewColumns, StyledExpandedUtilities, StyledUtilitiesContainer, StyledCollapsedUtilitiesToggle, StyledExpandedUtilitiesToggle, StyledDrawerUtilitiesToggle, StyledEmailCaseViewDrawer, StyledEmailCaseViewHeader, StyledEmailCaseViewContainer } from './Email.styles';
8
- const EmailCaseView = ({ header, content, banners, utilities, utilitiesSummaryItems, defaultUtilitiesExpanded, ...restProps }) => {
9
- const direction = useDirection();
10
- const t = useI18n();
11
- const emailCaseRef = useRef(null);
12
- const [showExpandedUtilities, setShowExpandedUtilities] = useState(defaultUtilitiesExpanded || false);
13
- const isMediumOrAbove = useBreakpoint('md', { breakpointRef: emailCaseRef });
14
- const utilitiesIcon = showExpandedUtilities
15
- ? `move-${direction.end}-solid`
16
- : `move-${direction.start}-solid`;
17
- const onToggleUtilities = useCallback((e) => {
18
- if (e.type === 'keydown' && e.key !== 'Enter') {
19
- return;
20
- }
21
- setShowExpandedUtilities(prevState => !prevState);
22
- }, []);
23
- const expandedUtilities = useMemo(() => {
24
- if (!utilities) {
25
- return null;
26
- }
27
- const largeScreenUtility = (_jsxs(_Fragment, { children: [showExpandedUtilities && (_jsx(Button, { variant: 'simple', icon: true, onClick: onToggleUtilities, as: StyledExpandedUtilitiesToggle, label: t(showExpandedUtilities ? 'collapse_utilities_panel' : 'expand_utilities_panel'), children: _jsx(Icon, { name: utilitiesIcon }) })), _jsx(Flex, { as: StyledExpandedUtilities, container: { direction: 'column', gap: 2 }, showExpandedUtilities: showExpandedUtilities, children: utilities })] }));
28
- const smallScreenUtilities = (_jsx(Drawer, { as: StyledEmailCaseViewDrawer, open: showExpandedUtilities, position: 'fixed', placement: direction.end, shadow: true, nullWhenClosed: true, children: _jsxs(Flex, { as: StyledCaseDrawerContent, container: { direction: 'column', gap: 2 }, children: [_jsx(Flex, { container: { justify: 'end' }, children: _jsx(Button, { variant: 'simple', icon: true, onClick: onToggleUtilities, as: StyledDrawerUtilitiesToggle, label: t('collapse_utilities_panel'), children: _jsx(Icon, { name: `move-${direction.end}-solid` }) }) }), utilities] }) }));
29
- return isMediumOrAbove ? largeScreenUtility : smallScreenUtilities;
30
- }, [isMediumOrAbove, onToggleUtilities, showExpandedUtilities, utilities]);
31
- return (_jsxs(StyledEmailCaseViewContainer, { ...restProps, ref: emailCaseRef, children: [header && (_jsxs(Flex, { container: { alignItems: 'center', pad: [0, 0, 0, 2], gap: 1 }, as: StyledEmailCaseViewHeader, children: [header.icon && (_jsx(StyledPageIcon, { container: { alignItems: 'center', justify: 'center' }, children: _jsx(Icon, { name: header.icon }) })), _jsx(Text, { variant: 'h1', children: header.title })] })), _jsxs(Flex, { container: { gap: 2 }, as: StyledEmailCaseViewColumns, hasHeader: !!header, children: [_jsxs(Flex, { container: { gap: 1, direction: 'column' }, item: { grow: 1 }, children: [banners && _jsx("div", { children: banners }), content && _jsx("div", { children: content })] }), (utilities || utilitiesSummaryItems) && (_jsxs(Flex, { container: { direction: 'column', alignItems: 'end', gap: 2 }, as: StyledUtilitiesContainer, showExpandedUtilities: showExpandedUtilities, children: [expandedUtilities, !showExpandedUtilities && (_jsx(Button, { variant: 'simple', icon: true, onClick: onToggleUtilities, as: StyledCollapsedUtilitiesToggle, "aria-expanded": showExpandedUtilities ? 'true' : 'false', label: t(showExpandedUtilities ? 'collapse_utilities_panel' : 'expand_utilities_panel'), children: _jsx(Icon, { name: utilitiesIcon }) })), !showExpandedUtilities &&
32
- utilitiesSummaryItems &&
33
- utilitiesSummaryItems.length > 0 && (_jsx(UtilitiesSummary, { items: utilitiesSummaryItems }))] }))] })] }));
34
- };
35
- export default EmailCaseView;
36
- //# sourceMappingURL=EmailCaseView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailCaseView.js","sourceRoot":"","sources":["../../../src/components/Email/EmailCaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,EACL,MAAM,EACN,MAAM,EACN,IAAI,EAEJ,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,IAAI,EACL,MAAM,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,MAAM,kEAAkE,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oEAAoE,CAAC;AAEpG,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AAGxB,MAAM,aAAa,GAA0C,CAAC,EAC5D,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,qBAAqB,EACrB,wBAAwB,EACxB,GAAG,SAAS,EACwB,EAAE,EAAE;IACxC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,CA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,IAAC,KAAK,EAAE,qBAAqB,GAAI,CACnD,IACE,CACR,IACI,IACsB,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { FC, PropsWithoutRef, useCallback, useState, useMemo, useRef } from 'react';\n\nimport {\n Button,\n Drawer,\n Flex,\n ForwardProps,\n Icon,\n useBreakpoint,\n useDirection,\n useI18n,\n Text\n} from '@pega/cosmos-react-core';\nimport UtilitiesSummary from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';\nimport { StyledCaseDrawerContent } from '@pega/cosmos-react-work';\nimport { StyledPageIcon } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\n\nimport {\n StyledEmailCaseViewColumns,\n StyledExpandedUtilities,\n StyledUtilitiesContainer,\n StyledCollapsedUtilitiesToggle,\n StyledExpandedUtilitiesToggle,\n StyledDrawerUtilitiesToggle,\n StyledEmailCaseViewDrawer,\n StyledEmailCaseViewHeader,\n StyledEmailCaseViewContainer\n} from './Email.styles';\nimport { EmailCaseViewProps } from './Email.types';\n\nconst EmailCaseView: FC<EmailCaseViewProps & ForwardProps> = ({\n header,\n content,\n banners,\n utilities,\n utilitiesSummaryItems,\n defaultUtilitiesExpanded,\n ...restProps\n}: PropsWithoutRef<EmailCaseViewProps>) => {\n const direction = useDirection();\n const t = useI18n();\n\n const emailCaseRef = useRef<HTMLDivElement>(null);\n const [showExpandedUtilities, setShowExpandedUtilities] = useState(\n defaultUtilitiesExpanded || false\n );\n\n const isMediumOrAbove = useBreakpoint('md', { breakpointRef: emailCaseRef });\n\n const utilitiesIcon = showExpandedUtilities\n ? `move-${direction.end}-solid`\n : `move-${direction.start}-solid`;\n\n const onToggleUtilities = useCallback((e: KeyboardEvent | MouseEvent) => {\n if (e.type === 'keydown' && (e as KeyboardEvent).key !== 'Enter') {\n return;\n }\n\n setShowExpandedUtilities(prevState => !prevState);\n }, []);\n\n const expandedUtilities = useMemo(() => {\n if (!utilities) {\n return null;\n }\n\n const largeScreenUtility = (\n <>\n {showExpandedUtilities && (\n <Button\n variant='simple'\n icon\n onClick={onToggleUtilities}\n as={StyledExpandedUtilitiesToggle}\n label={t(showExpandedUtilities ? 'collapse_utilities_panel' : 'expand_utilities_panel')}\n >\n <Icon name={utilitiesIcon} />\n </Button>\n )}\n <Flex\n as={StyledExpandedUtilities}\n container={{ direction: 'column', gap: 2 }}\n showExpandedUtilities={showExpandedUtilities}\n >\n {utilities}\n </Flex>\n </>\n );\n\n const smallScreenUtilities = (\n <Drawer\n as={StyledEmailCaseViewDrawer}\n open={showExpandedUtilities}\n position='fixed'\n placement={direction.end}\n shadow\n nullWhenClosed\n >\n <Flex as={StyledCaseDrawerContent} container={{ direction: 'column', gap: 2 }}>\n <Flex container={{ justify: 'end' }}>\n <Button\n variant='simple'\n icon\n onClick={onToggleUtilities}\n as={StyledDrawerUtilitiesToggle}\n label={t('collapse_utilities_panel')}\n >\n <Icon name={`move-${direction.end}-solid`} />\n </Button>\n </Flex>\n {utilities}\n </Flex>\n </Drawer>\n );\n\n return isMediumOrAbove ? largeScreenUtility : smallScreenUtilities;\n }, [isMediumOrAbove, onToggleUtilities, showExpandedUtilities, utilities]);\n\n return (\n <StyledEmailCaseViewContainer {...restProps} ref={emailCaseRef}>\n {header && (\n <Flex\n container={{ alignItems: 'center', pad: [0, 0, 0, 2], gap: 1 }}\n as={StyledEmailCaseViewHeader}\n >\n {header.icon && (\n <StyledPageIcon container={{ alignItems: 'center', justify: 'center' }}>\n <Icon name={header.icon} />\n </StyledPageIcon>\n )}\n <Text variant='h1'>{header.title}</Text>\n </Flex>\n )}\n <Flex container={{ gap: 2 }} as={StyledEmailCaseViewColumns} hasHeader={!!header}>\n <Flex container={{ gap: 1, direction: 'column' }} item={{ grow: 1 }}>\n {banners && <div>{banners}</div>}\n {content && <div>{content}</div>}\n </Flex>\n\n {(utilities || utilitiesSummaryItems) && (\n <Flex\n container={{ direction: 'column', alignItems: 'end', gap: 2 }}\n as={StyledUtilitiesContainer}\n showExpandedUtilities={showExpandedUtilities}\n >\n {expandedUtilities}\n {!showExpandedUtilities && (\n <Button\n variant='simple'\n icon\n onClick={onToggleUtilities}\n as={StyledCollapsedUtilitiesToggle}\n aria-expanded={showExpandedUtilities ? 'true' : 'false'}\n label={t(\n showExpandedUtilities ? 'collapse_utilities_panel' : 'expand_utilities_panel'\n )}\n >\n <Icon name={utilitiesIcon} />\n </Button>\n )}\n\n {!showExpandedUtilities &&\n utilitiesSummaryItems &&\n utilitiesSummaryItems.length > 0 && (\n <UtilitiesSummary items={utilitiesSummaryItems} />\n )}\n </Flex>\n )}\n </Flex>\n </StyledEmailCaseViewContainer>\n );\n};\n\nexport default EmailCaseView;\n"]}
@@ -1,10 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ModalProps } from '@pega/cosmos-react-core';
3
- import { EmailComposerProps } from './Email.types';
4
- export declare const StyledEmailComposer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, EmailComposerProps, never>;
5
- export declare const StyledResponseTypeIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
6
- export declare const StyledToggleButton: import("styled-components").StyledComponent<FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledModal: import("styled-components").StyledComponent<FunctionComponent<ModalProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
8
- declare const EmailComposer: FunctionComponent<EmailComposerProps>;
9
- export default EmailComposer;
10
- //# sourceMappingURL=EmailComposer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailComposer.d.ts","sourceRoot":"","sources":["../../../src/components/Email/EmailComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EASlB,MAAM,OAAO,CAAC;AAIf,OAAO,EAaL,UAAU,EASX,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAKnD,eAAO,MAAM,mBAAmB,yHAU9B,CAAC;AAEH,eAAO,MAAM,sBAAsB,0LAIjC,CAAC;AAIH,eAAO,MAAM,kBAAkB,qNAK7B,CAAC;AAUH,eAAO,MAAM,WAAW,kLAMtB,CAAC;AAmEH,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CAuYvD,CAAC;AAEH,eAAe,aAAa,CAAC"}