@pega/cosmos-react-social 2.1.3 → 2.1.6

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 (197) hide show
  1. package/package.json +4 -4
  2. package/lib/components/Chat/Chat.d.ts +0 -31
  3. package/lib/components/Chat/Chat.d.ts.map +0 -1
  4. package/lib/components/Chat/Chat.js +0 -67
  5. package/lib/components/Chat/Chat.js.map +0 -1
  6. package/lib/components/Chat/Chat.types.d.ts +0 -23
  7. package/lib/components/Chat/Chat.types.d.ts.map +0 -1
  8. package/lib/components/Chat/Chat.types.js +0 -2
  9. package/lib/components/Chat/Chat.types.js.map +0 -1
  10. package/lib/components/Chat/ChatBody.d.ts +0 -12
  11. package/lib/components/Chat/ChatBody.d.ts.map +0 -1
  12. package/lib/components/Chat/ChatBody.js +0 -18
  13. package/lib/components/Chat/ChatBody.js.map +0 -1
  14. package/lib/components/Chat/ChatComposer.d.ts +0 -51
  15. package/lib/components/Chat/ChatComposer.d.ts.map +0 -1
  16. package/lib/components/Chat/ChatComposer.js +0 -213
  17. package/lib/components/Chat/ChatComposer.js.map +0 -1
  18. package/lib/components/Chat/ChatHeader.d.ts +0 -15
  19. package/lib/components/Chat/ChatHeader.d.ts.map +0 -1
  20. package/lib/components/Chat/ChatHeader.js +0 -28
  21. package/lib/components/Chat/ChatHeader.js.map +0 -1
  22. package/lib/components/Chat/ChatTranscript.d.ts +0 -23
  23. package/lib/components/Chat/ChatTranscript.d.ts.map +0 -1
  24. package/lib/components/Chat/ChatTranscript.js +0 -45
  25. package/lib/components/Chat/ChatTranscript.js.map +0 -1
  26. package/lib/components/Chat/Message.d.ts +0 -46
  27. package/lib/components/Chat/Message.d.ts.map +0 -1
  28. package/lib/components/Chat/Message.js +0 -59
  29. package/lib/components/Chat/Message.js.map +0 -1
  30. package/lib/components/Chat/Message.styles.d.ts +0 -29
  31. package/lib/components/Chat/Message.styles.d.ts.map +0 -1
  32. package/lib/components/Chat/Message.styles.js +0 -193
  33. package/lib/components/Chat/Message.styles.js.map +0 -1
  34. package/lib/components/Chat/MessageList.d.ts +0 -35
  35. package/lib/components/Chat/MessageList.d.ts.map +0 -1
  36. package/lib/components/Chat/MessageList.js +0 -123
  37. package/lib/components/Chat/MessageList.js.map +0 -1
  38. package/lib/components/Chat/RepeatingView.d.ts +0 -31
  39. package/lib/components/Chat/RepeatingView.d.ts.map +0 -1
  40. package/lib/components/Chat/RepeatingView.js +0 -47
  41. package/lib/components/Chat/RepeatingView.js.map +0 -1
  42. package/lib/components/Chat/SuggestedReplyPicker.d.ts +0 -26
  43. package/lib/components/Chat/SuggestedReplyPicker.d.ts.map +0 -1
  44. package/lib/components/Chat/SuggestedReplyPicker.js +0 -78
  45. package/lib/components/Chat/SuggestedReplyPicker.js.map +0 -1
  46. package/lib/components/Chat/SystemMessage.d.ts +0 -19
  47. package/lib/components/Chat/SystemMessage.d.ts.map +0 -1
  48. package/lib/components/Chat/SystemMessage.js +0 -40
  49. package/lib/components/Chat/SystemMessage.js.map +0 -1
  50. package/lib/components/Chat/TranscriptMessage.d.ts +0 -25
  51. package/lib/components/Chat/TranscriptMessage.d.ts.map +0 -1
  52. package/lib/components/Chat/TranscriptMessage.js +0 -47
  53. package/lib/components/Chat/TranscriptMessage.js.map +0 -1
  54. package/lib/components/Chat/TypeIndicator.d.ts +0 -13
  55. package/lib/components/Chat/TypeIndicator.d.ts.map +0 -1
  56. package/lib/components/Chat/TypeIndicator.js +0 -9
  57. package/lib/components/Chat/TypeIndicator.js.map +0 -1
  58. package/lib/components/Chat/index.d.ts +0 -14
  59. package/lib/components/Chat/index.d.ts.map +0 -1
  60. package/lib/components/Chat/index.js +0 -13
  61. package/lib/components/Chat/index.js.map +0 -1
  62. package/lib/components/Email/Email.d.ts +0 -6
  63. package/lib/components/Email/Email.d.ts.map +0 -1
  64. package/lib/components/Email/Email.js +0 -153
  65. package/lib/components/Email/Email.js.map +0 -1
  66. package/lib/components/Email/Email.styles.d.ts +0 -18
  67. package/lib/components/Email/Email.styles.d.ts.map +0 -1
  68. package/lib/components/Email/Email.styles.js +0 -131
  69. package/lib/components/Email/Email.styles.js.map +0 -1
  70. package/lib/components/Email/Email.types.d.ts +0 -237
  71. package/lib/components/Email/Email.types.d.ts.map +0 -1
  72. package/lib/components/Email/Email.types.js +0 -2
  73. package/lib/components/Email/Email.types.js.map +0 -1
  74. package/lib/components/Email/EmailComposer.d.ts +0 -9
  75. package/lib/components/Email/EmailComposer.d.ts.map +0 -1
  76. package/lib/components/Email/EmailComposer.js +0 -185
  77. package/lib/components/Email/EmailComposer.js.map +0 -1
  78. package/lib/components/Email/EmailConversation.d.ts +0 -14
  79. package/lib/components/Email/EmailConversation.d.ts.map +0 -1
  80. package/lib/components/Email/EmailConversation.js +0 -179
  81. package/lib/components/Email/EmailConversation.js.map +0 -1
  82. package/lib/components/Email/EmailEntity.d.ts +0 -6
  83. package/lib/components/Email/EmailEntity.d.ts.map +0 -1
  84. package/lib/components/Email/EmailEntity.js +0 -19
  85. package/lib/components/Email/EmailEntity.js.map +0 -1
  86. package/lib/components/Email/EmailSelector.d.ts +0 -19
  87. package/lib/components/Email/EmailSelector.d.ts.map +0 -1
  88. package/lib/components/Email/EmailSelector.js +0 -103
  89. package/lib/components/Email/EmailSelector.js.map +0 -1
  90. package/lib/components/Email/EmailShell.d.ts +0 -9
  91. package/lib/components/Email/EmailShell.d.ts.map +0 -1
  92. package/lib/components/Email/EmailShell.js +0 -56
  93. package/lib/components/Email/EmailShell.js.map +0 -1
  94. package/lib/components/Email/EmailSummaryItem.d.ts +0 -10
  95. package/lib/components/Email/EmailSummaryItem.d.ts.map +0 -1
  96. package/lib/components/Email/EmailSummaryItem.js +0 -93
  97. package/lib/components/Email/EmailSummaryItem.js.map +0 -1
  98. package/lib/components/Email/EmailSummaryList.d.ts +0 -6
  99. package/lib/components/Email/EmailSummaryList.d.ts.map +0 -1
  100. package/lib/components/Email/EmailSummaryList.js +0 -115
  101. package/lib/components/Email/EmailSummaryList.js.map +0 -1
  102. package/lib/components/Email/ViewAnalysis.d.ts +0 -6
  103. package/lib/components/Email/ViewAnalysis.d.ts.map +0 -1
  104. package/lib/components/Email/ViewAnalysis.js +0 -20
  105. package/lib/components/Email/ViewAnalysis.js.map +0 -1
  106. package/lib/components/Email/index.d.ts +0 -9
  107. package/lib/components/Email/index.d.ts.map +0 -1
  108. package/lib/components/Email/index.js +0 -8
  109. package/lib/components/Email/index.js.map +0 -1
  110. package/lib/components/Feed/Feed.context.d.ts +0 -35
  111. package/lib/components/Feed/Feed.context.d.ts.map +0 -1
  112. package/lib/components/Feed/Feed.context.js +0 -8
  113. package/lib/components/Feed/Feed.context.js.map +0 -1
  114. package/lib/components/Feed/Feed.d.ts +0 -52
  115. package/lib/components/Feed/Feed.d.ts.map +0 -1
  116. package/lib/components/Feed/Feed.js +0 -143
  117. package/lib/components/Feed/Feed.js.map +0 -1
  118. package/lib/components/Feed/FeedAnnouncer.d.ts +0 -7
  119. package/lib/components/Feed/FeedAnnouncer.d.ts.map +0 -1
  120. package/lib/components/Feed/FeedAnnouncer.js +0 -11
  121. package/lib/components/Feed/FeedAnnouncer.js.map +0 -1
  122. package/lib/components/Feed/FeedAttachments.d.ts +0 -14
  123. package/lib/components/Feed/FeedAttachments.d.ts.map +0 -1
  124. package/lib/components/Feed/FeedAttachments.js +0 -94
  125. package/lib/components/Feed/FeedAttachments.js.map +0 -1
  126. package/lib/components/Feed/FeedButton.d.ts +0 -6
  127. package/lib/components/Feed/FeedButton.d.ts.map +0 -1
  128. package/lib/components/Feed/FeedButton.js +0 -23
  129. package/lib/components/Feed/FeedButton.js.map +0 -1
  130. package/lib/components/Feed/FeedContent.d.ts +0 -14
  131. package/lib/components/Feed/FeedContent.d.ts.map +0 -1
  132. package/lib/components/Feed/FeedContent.js +0 -39
  133. package/lib/components/Feed/FeedContent.js.map +0 -1
  134. package/lib/components/Feed/FeedLikeButton.d.ts +0 -19
  135. package/lib/components/Feed/FeedLikeButton.d.ts.map +0 -1
  136. package/lib/components/Feed/FeedLikeButton.js +0 -87
  137. package/lib/components/Feed/FeedLikeButton.js.map +0 -1
  138. package/lib/components/Feed/FeedModalList.d.ts +0 -15
  139. package/lib/components/Feed/FeedModalList.d.ts.map +0 -1
  140. package/lib/components/Feed/FeedModalList.js +0 -49
  141. package/lib/components/Feed/FeedModalList.js.map +0 -1
  142. package/lib/components/Feed/FeedNewPost.d.ts +0 -36
  143. package/lib/components/Feed/FeedNewPost.d.ts.map +0 -1
  144. package/lib/components/Feed/FeedNewPost.js +0 -108
  145. package/lib/components/Feed/FeedNewPost.js.map +0 -1
  146. package/lib/components/Feed/FeedNewPostTypeMenu.d.ts +0 -35
  147. package/lib/components/Feed/FeedNewPostTypeMenu.d.ts.map +0 -1
  148. package/lib/components/Feed/FeedNewPostTypeMenu.js +0 -387
  149. package/lib/components/Feed/FeedNewPostTypeMenu.js.map +0 -1
  150. package/lib/components/Feed/FeedPost.d.ts +0 -10
  151. package/lib/components/Feed/FeedPost.d.ts.map +0 -1
  152. package/lib/components/Feed/FeedPost.js +0 -185
  153. package/lib/components/Feed/FeedPost.js.map +0 -1
  154. package/lib/components/Feed/FeedPost.types.d.ts +0 -101
  155. package/lib/components/Feed/FeedPost.types.d.ts.map +0 -1
  156. package/lib/components/Feed/FeedPost.types.js +0 -2
  157. package/lib/components/Feed/FeedPost.types.js.map +0 -1
  158. package/lib/components/Feed/FeedReply.d.ts +0 -10
  159. package/lib/components/Feed/FeedReply.d.ts.map +0 -1
  160. package/lib/components/Feed/FeedReply.js +0 -131
  161. package/lib/components/Feed/FeedReply.js.map +0 -1
  162. package/lib/components/Feed/FeedReply.types.d.ts +0 -68
  163. package/lib/components/Feed/FeedReply.types.d.ts.map +0 -1
  164. package/lib/components/Feed/FeedReply.types.js +0 -2
  165. package/lib/components/Feed/FeedReply.types.js.map +0 -1
  166. package/lib/components/Feed/FeedReplyInput.d.ts +0 -32
  167. package/lib/components/Feed/FeedReplyInput.d.ts.map +0 -1
  168. package/lib/components/Feed/FeedReplyInput.js +0 -105
  169. package/lib/components/Feed/FeedReplyInput.js.map +0 -1
  170. package/lib/components/Feed/FeedRichText.d.ts +0 -9
  171. package/lib/components/Feed/FeedRichText.d.ts.map +0 -1
  172. package/lib/components/Feed/FeedRichText.js +0 -96
  173. package/lib/components/Feed/FeedRichText.js.map +0 -1
  174. package/lib/components/Feed/index.d.ts +0 -10
  175. package/lib/components/Feed/index.d.ts.map +0 -1
  176. package/lib/components/Feed/index.js +0 -6
  177. package/lib/components/Feed/index.js.map +0 -1
  178. package/lib/components/HashtagButton/HashtagButton.d.ts +0 -16
  179. package/lib/components/HashtagButton/HashtagButton.d.ts.map +0 -1
  180. package/lib/components/HashtagButton/HashtagButton.js +0 -31
  181. package/lib/components/HashtagButton/HashtagButton.js.map +0 -1
  182. package/lib/components/HashtagButton/index.d.ts +0 -3
  183. package/lib/components/HashtagButton/index.d.ts.map +0 -1
  184. package/lib/components/HashtagButton/index.js +0 -3
  185. package/lib/components/HashtagButton/index.js.map +0 -1
  186. package/lib/components/MentionButton/MentionButton.d.ts +0 -20
  187. package/lib/components/MentionButton/MentionButton.d.ts.map +0 -1
  188. package/lib/components/MentionButton/MentionButton.js +0 -58
  189. package/lib/components/MentionButton/MentionButton.js.map +0 -1
  190. package/lib/components/MentionButton/index.d.ts +0 -3
  191. package/lib/components/MentionButton/index.d.ts.map +0 -1
  192. package/lib/components/MentionButton/index.js +0 -3
  193. package/lib/components/MentionButton/index.js.map +0 -1
  194. package/lib/index.d.ts +0 -11
  195. package/lib/index.d.ts.map +0 -1
  196. package/lib/index.js +0 -12
  197. package/lib/index.js.map +0 -1
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { EmailSummaryListProps } from './Email.types';
4
- declare const EmailSummaryList: FunctionComponent<EmailSummaryListProps & ForwardProps>;
5
- export default EmailSummaryList;
6
- //# sourceMappingURL=EmailSummaryList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailSummaryList.d.ts","sourceRoot":"","sources":["../../../src/components/Email/EmailSummaryList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,iBAAiB,EAElB,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,YAAY,EAUb,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAiDtD,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,GAAG,YAAY,CAwI7E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,115 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { createRef, useMemo, useState, useEffect, forwardRef, useRef } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Button, Count, defaultThemeProp, Flex, Icon, registerIcon, MenuButton, Text, useActiveDescendant, useConsolidatedRef, useI18n, menuHelpers } from '@pega/cosmos-react-core';
5
- import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
6
- import EmailSummaryItem, { StyledEmailSummaryItem } from './EmailSummaryItem';
7
- registerIcon(filterIcon);
8
- const StyledEmailSummaryListContainer = styled(Flex)(({ theme }) => {
9
- return css `
10
- height: 100%;
11
- background-color: ${theme.base.palette['primary-background']};
12
- `;
13
- });
14
- StyledEmailSummaryListContainer.defaultProps = defaultThemeProp;
15
- const StyledEmailSummaryListHeader = styled.div(({ theme }) => {
16
- return css `
17
- padding: calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing}) ${theme.base.spacing};
18
- `;
19
- });
20
- StyledEmailSummaryListHeader.defaultProps = defaultThemeProp;
21
- const StyledActionWrapper = styled(Flex)(({ theme }) => {
22
- return css `
23
- padding-block-start: ${theme.base.spacing};
24
- `;
25
- });
26
- StyledActionWrapper.defaultProps = defaultThemeProp;
27
- const StyledFilterButton = styled(Button) `
28
- margin-inline-start: auto;
29
- `;
30
- const StyledEmailSummaryList = styled.div(({ theme }) => {
31
- return css `
32
- height: 100%;
33
- overflow-y: auto;
34
-
35
- &:focus-visible {
36
- outline: none;
37
- }
38
-
39
- &:focus {
40
- ${StyledEmailSummaryItem}[data-current='true'] {
41
- box-shadow: inset ${theme.base.shadow.focus};
42
- }
43
- }
44
- `;
45
- });
46
- StyledEmailSummaryList.defaultProps = defaultThemeProp;
47
- const EmailSummaryList = forwardRef(({ categories, onCategoryClick, items, unreadEmailCount, filters, onFilterChange, onItemClick, ...restProps }, ref) => {
48
- const t = useI18n();
49
- const tablistRef = useConsolidatedRef(ref);
50
- const tabRefs = items.map(() => createRef());
51
- const [focusDescendant, setFocusDescendant] = useState(null);
52
- const previousActiveDescendant = useRef();
53
- const [listHasBeenViewed, setListHasBeenViewed] = useState(false);
54
- const [clickOnInitialView, setClickOnInitialView] = useState(false);
55
- const uadConfig = useMemo(() => ({
56
- focusEl: tablistRef.current,
57
- scope: tablistRef.current,
58
- selector: 'button[role="tab"]',
59
- focusDescendantEl: focusDescendant,
60
- clearFocusDescendant: () => {
61
- setFocusDescendant(null);
62
- tablistRef.current?.focus();
63
- },
64
- pauseDescendantEvaluation: !listHasBeenViewed
65
- }), [tablistRef.current, focusDescendant, listHasBeenViewed]);
66
- const { activeDescendant } = useActiveDescendant(uadConfig);
67
- // Trigger click of new active descendant
68
- useEffect(() => {
69
- const hasPreviousOrClickInitial = previousActiveDescendant.current || clickOnInitialView;
70
- if (hasPreviousOrClickInitial && activeDescendant) {
71
- activeDescendant.click();
72
- }
73
- previousActiveDescendant.current = activeDescendant;
74
- }, [activeDescendant]);
75
- const buttonText = useMemo(() => {
76
- return (menuHelpers.getSelected(categories)[0]?.primary ??
77
- menuHelpers.flatten(categories)[0].primary);
78
- }, [categories]);
79
- return (_jsxs(StyledEmailSummaryListContainer, { container: { direction: 'column' }, ...restProps, children: [_jsxs(StyledEmailSummaryListHeader, { children: [_jsx(Text, { variant: 'h2', children: t('inbox') }, void 0), _jsxs(StyledActionWrapper, { container: { alignItems: 'center', gap: 0.5 }, children: [_jsx(MenuButton, { text: buttonText, variant: 'text', menu: {
80
- mode: 'single-select',
81
- items: categories,
82
- onItemClick: onCategoryClick
83
- } }, void 0), unreadEmailCount && (_jsx(Count, { "aria-label": t('unread_email_count', [unreadEmailCount], {
84
- count: unreadEmailCount
85
- }), variant: 'default', children: unreadEmailCount }, void 0)), _jsx(StyledFilterButton, { variant: 'simple', label: t('email_filters'), icon: true, children: _jsx(Icon, { name: 'filter' }, void 0) }, void 0)] }, void 0)] }, void 0), _jsx(StyledEmailSummaryList, { role: 'tablist', tabIndex: 0, ref: tablistRef, onFocus: e => {
86
- if (!listHasBeenViewed && e.target.getAttribute('role') === 'tablist') {
87
- setClickOnInitialView(true);
88
- setListHasBeenViewed(true);
89
- }
90
- }, children: items.map((emailItem, i) => {
91
- const { id, ...emailItemProps } = emailItem;
92
- return (_jsx(EmailSummaryItem, { ref: tabRefs[i], id: id, role: 'tab', ...emailItemProps, onClick: (e) => {
93
- const mouseClick = e.detail !== 0;
94
- if (mouseClick) {
95
- const target = e.target;
96
- const focusAtEl = target.getAttribute('role') === 'tab'
97
- ? target
98
- : target.closest('button[role="tab"]');
99
- if (focusAtEl)
100
- setFocusDescendant(focusAtEl);
101
- if (!listHasBeenViewed) {
102
- if (i === 0)
103
- setClickOnInitialView(true);
104
- setListHasBeenViewed(true);
105
- }
106
- }
107
- // Click is triggered by active descendant change, 'enter', & duplicate click
108
- if (!mouseClick || activeDescendant?.id === id) {
109
- onItemClick(id);
110
- }
111
- }, active: activeDescendant && activeDescendant.id === id }, id));
112
- }) }, void 0)] }, void 0));
113
- });
114
- export default EmailSummaryList;
115
- //# sourceMappingURL=EmailSummaryList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailSummaryList.js","sourceRoot":"","sources":["../../../src/components/Email/EmailSummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAA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AC,YAAY,CAAC,MAAM,CAAC,KAAK,KAAK;oCACnC,CAAC,CAAC,MAAM;oCACR,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;gCAC3C,IAAI,SAAS;oCAAE,kBAAkB,CAAC,SAAwB,CAAC,CAAC;gCAE5D,IAAI,CAAC,iBAAiB,EAAE;oCACtB,IAAI,CAAC,KAAK,CAAC;wCAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;oCACzC,oBAAoB,CAAC,IAAI,CAAC,CAAC;iCAC5B;6BACF;4BACD,6EAA6E;4BAC7E,IAAI,CAAC,UAAU,IAAI,gBAAgB,EAAE,EAAE,KAAK,EAAE,EAAE;gCAC9C,WAAW,CAAC,EAAE,CAAC,CAAC;6BACjB;wBACH,CAAC,EACD,MAAM,EAAE,gBAAgB,IAAI,gBAAgB,CAAC,EAAE,KAAK,EAAE,IAxBjD,EAAE,CAyBP,CACH,CAAC;gBACJ,CAAC,CAAC,WACqB,YACO,CACnC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import {\n createRef,\n useMemo,\n useState,\n useEffect,\n forwardRef,\n useRef,\n FunctionComponent,\n MouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Count,\n defaultThemeProp,\n Flex,\n ForwardProps,\n Icon,\n registerIcon,\n MenuButton,\n Text,\n useActiveDescendant,\n UseActiveDescendantConfig,\n useConsolidatedRef,\n useI18n,\n menuHelpers\n} from '@pega/cosmos-react-core';\nimport * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';\n\nimport { EmailSummaryListProps } from './Email.types';\nimport EmailSummaryItem, { StyledEmailSummaryItem } from './EmailSummaryItem';\n\nregisterIcon(filterIcon);\n\nconst StyledEmailSummaryListContainer = styled(Flex)(({ theme }) => {\n return css`\n height: 100%;\n background-color: ${theme.base.palette['primary-background']};\n `;\n});\nStyledEmailSummaryListContainer.defaultProps = defaultThemeProp;\n\nconst StyledEmailSummaryListHeader = styled.div(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing}) ${theme.base.spacing};\n `;\n});\nStyledEmailSummaryListHeader.defaultProps = defaultThemeProp;\n\nconst StyledActionWrapper = styled(Flex)(({ theme }) => {\n return css`\n padding-block-start: ${theme.base.spacing};\n `;\n});\nStyledActionWrapper.defaultProps = defaultThemeProp;\n\nconst StyledFilterButton = styled(Button)`\n margin-inline-start: auto;\n`;\n\nconst StyledEmailSummaryList = styled.div(({ theme }) => {\n return css`\n height: 100%;\n overflow-y: auto;\n\n &:focus-visible {\n outline: none;\n }\n\n &:focus {\n ${StyledEmailSummaryItem}[data-current='true'] {\n box-shadow: inset ${theme.base.shadow.focus};\n }\n }\n `;\n});\nStyledEmailSummaryList.defaultProps = defaultThemeProp;\n\nconst EmailSummaryList: FunctionComponent<EmailSummaryListProps & ForwardProps> = forwardRef(\n (\n {\n categories,\n onCategoryClick,\n items,\n unreadEmailCount,\n filters,\n onFilterChange,\n onItemClick,\n ...restProps\n },\n ref: EmailSummaryListProps['ref']\n ) => {\n const t = useI18n();\n const tablistRef = useConsolidatedRef(ref);\n const tabRefs = items.map(() => createRef<HTMLButtonElement>());\n const [focusDescendant, setFocusDescendant] = useState<HTMLElement | null>(null);\n const previousActiveDescendant = useRef<HTMLElement | undefined>();\n const [listHasBeenViewed, setListHasBeenViewed] = useState(false);\n const [clickOnInitialView, setClickOnInitialView] = useState(false);\n\n const uadConfig = useMemo<UseActiveDescendantConfig>(\n () => ({\n focusEl: tablistRef.current,\n scope: tablistRef.current,\n selector: 'button[role=\"tab\"]',\n focusDescendantEl: focusDescendant,\n clearFocusDescendant: () => {\n setFocusDescendant(null);\n tablistRef.current?.focus();\n },\n pauseDescendantEvaluation: !listHasBeenViewed\n }),\n [tablistRef.current, focusDescendant, listHasBeenViewed]\n );\n\n const { activeDescendant } = useActiveDescendant(uadConfig);\n\n // Trigger click of new active descendant\n useEffect(() => {\n const hasPreviousOrClickInitial = previousActiveDescendant.current || clickOnInitialView;\n\n if (hasPreviousOrClickInitial && activeDescendant) {\n activeDescendant.click();\n }\n\n previousActiveDescendant.current = activeDescendant;\n }, [activeDescendant]);\n\n const buttonText = useMemo(() => {\n return (\n menuHelpers.getSelected(categories)[0]?.primary ??\n menuHelpers.flatten(categories)[0].primary\n );\n }, [categories]);\n\n return (\n <StyledEmailSummaryListContainer container={{ direction: 'column' }} {...restProps}>\n <StyledEmailSummaryListHeader>\n <Text variant='h2'>{t('inbox')}</Text>\n <StyledActionWrapper container={{ alignItems: 'center', gap: 0.5 }}>\n <MenuButton\n text={buttonText}\n variant='text'\n menu={{\n mode: 'single-select',\n items: categories,\n onItemClick: onCategoryClick\n }}\n />\n {unreadEmailCount && (\n <Count\n aria-label={t('unread_email_count', [unreadEmailCount], {\n count: unreadEmailCount\n })}\n variant='default'\n >\n {unreadEmailCount}\n </Count>\n )}\n <StyledFilterButton variant='simple' label={t('email_filters')} icon>\n <Icon name='filter' />\n </StyledFilterButton>\n </StyledActionWrapper>\n </StyledEmailSummaryListHeader>\n\n <StyledEmailSummaryList\n role='tablist'\n tabIndex={0}\n ref={tablistRef}\n onFocus={e => {\n if (!listHasBeenViewed && e.target.getAttribute('role') === 'tablist') {\n setClickOnInitialView(true);\n setListHasBeenViewed(true);\n }\n }}\n >\n {items.map((emailItem, i) => {\n const { id, ...emailItemProps } = emailItem;\n return (\n <EmailSummaryItem\n ref={tabRefs[i]}\n id={id}\n key={id}\n role='tab'\n {...emailItemProps}\n onClick={(e: MouseEvent) => {\n const mouseClick = e.detail !== 0;\n\n if (mouseClick) {\n const target = e.target as HTMLElement;\n const focusAtEl =\n target.getAttribute('role') === 'tab'\n ? target\n : target.closest('button[role=\"tab\"]');\n if (focusAtEl) setFocusDescendant(focusAtEl as HTMLElement);\n\n if (!listHasBeenViewed) {\n if (i === 0) setClickOnInitialView(true);\n setListHasBeenViewed(true);\n }\n }\n // Click is triggered by active descendant change, 'enter', & duplicate click\n if (!mouseClick || activeDescendant?.id === id) {\n onItemClick(id);\n }\n }}\n active={activeDescendant && activeDescendant.id === id}\n />\n );\n })}\n </StyledEmailSummaryList>\n </StyledEmailSummaryListContainer>\n );\n }\n);\n\nexport default EmailSummaryList;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { ViewAnalysisProps } from './Email.types';
4
- declare const ViewAnalysis: FunctionComponent<ViewAnalysisProps & ForwardProps>;
5
- export default ViewAnalysis;
6
- //# sourceMappingURL=ViewAnalysis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewAnalysis.d.ts","sourceRoot":"","sources":["../../../src/components/Email/ViewAnalysis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAEvE,OAAO,EACL,YAAY,EAOb,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CA6BrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import { Text, Flex, Icon, Card, CardHeader, CardContent } from '@pega/cosmos-react-core';
4
- import { StyledViewAnalysisFieldValueList } from './Email.styles';
5
- import EmailEntity from './EmailEntity';
6
- const ViewAnalysis = forwardRef(({ content, header }, ref) => {
7
- const fields = content.map(data => {
8
- return data.value
9
- ? {
10
- ...data,
11
- value: (_jsx(Flex, { container: { gap: 0.5, wrap: 'wrap' }, children: data.value.map(entityObject => {
12
- return _jsx(EmailEntity, { entity: entityObject.entity }, entityObject.id);
13
- }) }, void 0))
14
- }
15
- : data;
16
- });
17
- return (_jsxs(Card, { ref: ref, children: [_jsxs(CardHeader, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: header.icon }, void 0), _jsx(Text, { variant: 'h3', children: header.text }, void 0)] }, void 0), _jsx(CardContent, { children: _jsx(StyledViewAnalysisFieldValueList, { fields: fields, variant: 'stacked' }, void 0) }, void 0)] }, void 0));
18
- });
19
- export default ViewAnalysis;
20
- //# sourceMappingURL=ViewAnalysis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewAnalysis.js","sourceRoot":"","sources":["../../../src/components/Email/ViewAnalysis.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsC,MAAM,OAAO,CAAC;AAEvE,OAAO,EAEL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,YAAY,GAAwD,UAAU,CAClF,CAAC,EAAE,OAAO,EAAE,MAAM,EAAsC,EAAE,GAA6B,EAAE,EAAE;IACzF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAChC,OAAO,IAAI,CAAC,KAAK;YACf,CAAC,CAAC;gBACE,GAAG,IAAI;gBACP,KAAK,EAAE,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,YACxC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;wBAC7B,OAAO,KAAC,WAAW,IAAuB,MAAM,EAAE,YAAY,CAAC,MAAM,IAA5C,YAAY,CAAC,EAAE,CAAiC,CAAC;oBAC5E,CAAC,CAAC,WACG,CACR;aACF;YACH,CAAC,CAAC,IAAI,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,IAAI,IAAC,GAAG,EAAE,GAAG,aACZ,MAAC,UAAU,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aACrD,KAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,WAAI,EAC3B,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,MAAM,CAAC,IAAI,WAAQ,YAC5B,EACb,KAAC,WAAW,cACV,KAAC,gCAAgC,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,SAAS,WAAG,WAC1D,YACT,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef } from 'react';\n\nimport {\n ForwardProps,\n Text,\n Flex,\n Icon,\n Card,\n CardHeader,\n CardContent\n} from '@pega/cosmos-react-core';\n\nimport { StyledViewAnalysisFieldValueList } from './Email.styles';\nimport EmailEntity from './EmailEntity';\nimport { ViewAnalysisProps } from './Email.types';\n\nconst ViewAnalysis: FunctionComponent<ViewAnalysisProps & ForwardProps> = forwardRef(\n ({ content, header }: PropsWithoutRef<ViewAnalysisProps>, ref: ViewAnalysisProps['ref']) => {\n const fields = content.map(data => {\n return data.value\n ? {\n ...data,\n value: (\n <Flex container={{ gap: 0.5, wrap: 'wrap' }}>\n {data.value.map(entityObject => {\n return <EmailEntity key={entityObject.id} entity={entityObject.entity} />;\n })}\n </Flex>\n )\n }\n : data;\n });\n\n return (\n <Card ref={ref}>\n <CardHeader container={{ alignItems: 'center', gap: 1 }}>\n <Icon name={header.icon} />\n <Text variant='h3'>{header.text}</Text>\n </CardHeader>\n <CardContent>\n <StyledViewAnalysisFieldValueList fields={fields} variant='stacked' />\n </CardContent>\n </Card>\n );\n }\n);\n\nexport default ViewAnalysis;\n"]}
@@ -1,9 +0,0 @@
1
- export { default } from './Email';
2
- export { EmailUser, EmailProps, EmailComposerProps, EmailConversationProps, EmailShellProps, ViewAnalysisProps } from './Email.types';
3
- export { default as EmailConversation } from './EmailConversation';
4
- export { default as EmailShell } from './EmailShell';
5
- export { default as EmailComposer } from './EmailComposer';
6
- export { default as EmailSummaryItem } from './EmailSummaryItem';
7
- export { default as EmailSummaryList } from './EmailSummaryList';
8
- export { default as ViewAnalysis } from './ViewAnalysis';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Email/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,8 +0,0 @@
1
- export { default } from './Email';
2
- export { default as EmailConversation } from './EmailConversation';
3
- export { default as EmailShell } from './EmailShell';
4
- export { default as EmailComposer } from './EmailComposer';
5
- export { default as EmailSummaryItem } from './EmailSummaryItem';
6
- export { default as EmailSummaryList } from './EmailSummaryList';
7
- export { default as ViewAnalysis } from './ViewAnalysis';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Email/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AASlC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './Email';\nexport {\n EmailUser,\n EmailProps,\n EmailComposerProps,\n EmailConversationProps,\n EmailShellProps,\n ViewAnalysisProps\n} from './Email.types';\nexport { default as EmailConversation } from './EmailConversation';\nexport { default as EmailShell } from './EmailShell';\nexport { default as EmailComposer } from './EmailComposer';\nexport { default as EmailSummaryItem } from './EmailSummaryItem';\nexport { default as EmailSummaryList } from './EmailSummaryList';\nexport { default as ViewAnalysis } from './ViewAnalysis';\n"]}
@@ -1,35 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- import { InteractionRenderers, MDMap } from '@pega/cosmos-react-rte';
3
- import { MenuItemProps } from '@pega/cosmos-react-core';
4
- export interface FeedContextValue {
5
- searchTypes?: string[];
6
- onSearch?: (e: {
7
- type: 'mention' | 'tag';
8
- search: string;
9
- mentionType: string;
10
- }) => void;
11
- searchResults?: MenuItemProps[];
12
- showSearchResults?: boolean;
13
- setShowSearchResults?: Dispatch<SetStateAction<boolean>>;
14
- onMentionClick?: (e: {
15
- id: string;
16
- text: string;
17
- type: string;
18
- }) => JSX.Element | undefined;
19
- onTagClick?: (tag: string) => void;
20
- interactionRenderers?: InteractionRenderers[];
21
- markdownMap?: MDMap;
22
- userInfo: {
23
- username: string;
24
- fullname: string;
25
- avatarSrc?: string;
26
- meta?: string[];
27
- };
28
- announce: (announcement: string) => void;
29
- }
30
- export declare const FeedContext: import("react").Context<FeedContextValue>;
31
- export interface FeedReplyContextValue {
32
- onShowReplyInput?: () => void;
33
- }
34
- export declare const FeedReplyContext: import("react").Context<FeedReplyContextValue>;
35
- //# sourceMappingURL=Feed.context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Feed.context.d.ts","sourceRoot":"","sources":["../../../src/components/Feed/Feed.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACzF,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;IAC5F,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC9C,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;IACF,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,WAAW,2CAItB,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,gDAA2C,CAAC"}
@@ -1,8 +0,0 @@
1
- import { createContext } from 'react';
2
- export const FeedContext = createContext({
3
- searchTypes: [],
4
- userInfo: { username: '', fullname: '' },
5
- announce: () => { }
6
- });
7
- export const FeedReplyContext = createContext({});
8
- //# sourceMappingURL=Feed.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Feed.context.js","sourceRoot":"","sources":["../../../src/components/Feed/Feed.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,OAAO,CAAC;AAwBhE,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAmB;IACzD,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAwB,EAAE,CAAC,CAAC","sourcesContent":["import { createContext, Dispatch, SetStateAction } from 'react';\n\nimport { InteractionRenderers, MDMap } from '@pega/cosmos-react-rte';\nimport { MenuItemProps } from '@pega/cosmos-react-core';\n\nexport interface FeedContextValue {\n searchTypes?: string[];\n onSearch?: (e: { type: 'mention' | 'tag'; search: string; mentionType: string }) => void;\n searchResults?: MenuItemProps[];\n showSearchResults?: boolean;\n setShowSearchResults?: Dispatch<SetStateAction<boolean>>;\n onMentionClick?: (e: { id: string; text: string; type: string }) => JSX.Element | undefined;\n onTagClick?: (tag: string) => void;\n interactionRenderers?: InteractionRenderers[];\n markdownMap?: MDMap;\n userInfo: {\n username: string;\n fullname: string;\n avatarSrc?: string;\n meta?: string[];\n };\n announce: (announcement: string) => void;\n}\n\nexport const FeedContext = createContext<FeedContextValue>({\n searchTypes: [],\n userInfo: { username: '', fullname: '' },\n announce: () => {}\n});\n\nexport interface FeedReplyContextValue {\n onShowReplyInput?: () => void;\n}\n\nexport const FeedReplyContext = createContext<FeedReplyContextValue>({});\n"]}
@@ -1,52 +0,0 @@
1
- import { ReactNode, FC } from 'react';
2
- import { ForwardProps, NoChildrenProp } from '@pega/cosmos-react-core';
3
- import { FeedContextValue } from './Feed.context';
4
- export interface Filter {
5
- /** Sets DOM id for the control and associates label element via 'for' attribute. */
6
- id: string;
7
- /** Pass a string or a fragment with an Icon and string for the filter label. */
8
- label: ReactNode;
9
- /**
10
- * Disables the filter.
11
- * @default false
12
- */
13
- disabled?: boolean;
14
- /**
15
- * Sets on prop via onFilterChange.
16
- * @default false
17
- */
18
- on?: boolean;
19
- }
20
- export interface FeedProps extends NoChildrenProp {
21
- /** Title for the feed. */
22
- title?: string;
23
- /** Information related to the user of the Feed. */
24
- userInfo: FeedContextValue['userInfo'];
25
- /** A set of search types that can be used to determine which data set to conduct a mention search on. */
26
- searchTypes?: FeedContextValue['searchTypes'];
27
- /** A callback that runs when a decorator search has been run inside of the feed. */
28
- onDecoratorSearch?: FeedContextValue['onSearch'];
29
- /** Results that will be shown in a Popover for a mention or tag search. */
30
- searchResults?: FeedContextValue['searchResults'];
31
- /** A callback that is triggered when a mention is clicked. The callback sends back the id, text, and type of the mention. The callback should return a function component. */
32
- onMentionClick?: FeedContextValue['onMentionClick'];
33
- /** A callback that is triggered when a hashtag is clicked. The callback sends back the test of the tag. */
34
- onTagClick?: FeedContextValue['onTagClick'];
35
- /** A list of configuration objects used to render custom components within Feed posts and replies based off of a given regex pattern. */
36
- interactionRenderers?: FeedContextValue['interactionRenderers'];
37
- /** A mapping for various element types to render custom components for within posts. */
38
- markdownMap?: FeedContextValue['markdownMap'];
39
- /** A set of filters to apply to the Feed. */
40
- filters?: Filter[];
41
- /** A callback that runs when the filter is toggled. */
42
- onFilterChange?: (filterId: string, on: boolean) => void;
43
- /** A callback that is triggered when the bottom of the Feed is scrolled into view so that additional posts may be displayed. */
44
- onLoadMore?: () => void;
45
- /** A region to hold the new post component */
46
- newPostRegion?: ReactNode;
47
- /** A list of FeedPost components */
48
- posts?: ReactNode[];
49
- }
50
- declare const Feed: FC<ForwardProps & FeedProps>;
51
- export default Feed;
52
- //# sourceMappingURL=Feed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Feed.d.ts","sourceRoot":"","sources":["../../../src/components/Feed/Feed.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,EAAE,EAA4C,MAAM,OAAO,CAAC;AAG7F,OAAO,EAIL,YAAY,EAUZ,cAAc,EACf,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQ/D,MAAM,WAAW,MAAM;IACrB,oFAAoF;IACpF,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,yGAAyG;IACzG,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACjD,2EAA2E;IAC3E,aAAa,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAClD,8KAA8K;IAC9K,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACpD,2GAA2G;IAC3G,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC5C,yIAAyI;IACzI,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IAChE,wFAAwF;IACxF,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,gIAAgI;IAChI,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB;AA6DD,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,YAAY,GAAG,SAAS,CAgLtC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,143 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect, useCallback } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Button, defaultThemeProp, Flex, Grid, Icon, registerIcon, Popover, Switch, Text, Progress, StyledProgressRing, usePrevious } from '@pega/cosmos-react-core';
5
- import { useArrows, useElement, useI18n, useOuterEvent } from '@pega/cosmos-react-core/lib/hooks';
6
- import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
7
- import * as filterOnIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter-on.icon';
8
- import { FeedContext } from './Feed.context';
9
- import { StyledFeedNewPost } from './FeedNewPost';
10
- import { StyledFeedPost } from './FeedPost';
11
- import FeedButton from './FeedButton';
12
- import FeedAnnouncer from './FeedAnnouncer';
13
- registerIcon(filterIcon, filterOnIcon);
14
- const StyledFeed = styled.div(props => {
15
- return css `
16
- ${StyledFeedNewPost}:not(:last-child), ${StyledFeedPost}:not(:last-child) {
17
- margin-bottom: calc(2 * ${props.theme.base.spacing});
18
- }
19
- `;
20
- });
21
- StyledFeed.defaultProps = defaultThemeProp;
22
- const StyledHeading = styled.div(props => {
23
- return css `
24
- margin: ${props.theme.base.spacing} 0;
25
- `;
26
- });
27
- StyledHeading.defaultProps = defaultThemeProp;
28
- const StyledFilterMenu = styled.div(props => {
29
- return css `
30
- padding: calc(2 * ${props.theme.base.spacing});
31
-
32
- fieldset {
33
- border: none;
34
- }
35
- `;
36
- });
37
- StyledFilterMenu.defaultProps = defaultThemeProp;
38
- const StyledFilterList = styled.ul `
39
- list-style-type: none;
40
- min-width: 10rem;
41
- `;
42
- StyledFilterList.defaultProps = defaultThemeProp;
43
- const StyledLoadMore = styled.div(({ theme, visible }) => {
44
- return css `
45
- ${visible &&
46
- css `
47
- margin-top: calc(2 * ${theme.base.spacing});
48
- `}
49
-
50
- ${StyledProgressRing} {
51
- min-height: 0;
52
- min-width: 0;
53
-
54
- ${visible &&
55
- css `
56
- min-height: 2rem;
57
- min-width: 2rem;
58
- `}
59
- }
60
- `;
61
- });
62
- StyledLoadMore.defaultProps = defaultThemeProp;
63
- const Feed = (props) => {
64
- const { variant, children, userInfo, className, title, searchTypes, onDecoratorSearch, searchResults = [], onMentionClick, onTagClick, mentionContent, interactionRenderers = [], markdownMap, filters, onFilterChange, onLoadMore, newPostRegion, posts = [], ...restProps } = props;
65
- const t = useI18n();
66
- const [popoverEl, setPopoverEl] = useElement();
67
- const [buttonEl, setButtonEl] = useElement();
68
- const [loadMoreEl, setLoadMoreEl] = useElement();
69
- const [mountPopover, setMountPopover] = useState(false);
70
- const [feedOverflows, setFeedOverflows] = useState(false);
71
- const [showSearchResults, setShowSearchResults] = useState(false);
72
- const feedOverflowsRef = useRef(false);
73
- const prevPosts = usePrevious(posts);
74
- const [announcementText, setAnnouncementText] = useState('');
75
- const filterRef = useRef(null);
76
- useArrows(filterRef);
77
- useOuterEvent('mousedown', [popoverEl, buttonEl], () => {
78
- setMountPopover(false);
79
- });
80
- const onKeydown = ({ key }) => {
81
- if (key === 'Escape')
82
- setMountPopover(false);
83
- };
84
- useEffect(() => {
85
- document.addEventListener('keydown', onKeydown);
86
- return () => {
87
- document.removeEventListener('keydown', onKeydown);
88
- };
89
- }, []);
90
- useEffect(() => {
91
- if (loadMoreEl) {
92
- const intersectionObserver = new IntersectionObserver(entries => {
93
- if (!entries[0].isIntersecting) {
94
- setFeedOverflows(true);
95
- feedOverflowsRef.current = true;
96
- }
97
- else if (entries[0].isIntersecting && feedOverflowsRef.current) {
98
- onLoadMore?.();
99
- }
100
- });
101
- intersectionObserver.observe(loadMoreEl);
102
- return () => {
103
- intersectionObserver.disconnect();
104
- };
105
- }
106
- }, [loadMoreEl, feedOverflowsRef.current]);
107
- const announce = useCallback((announcement) => {
108
- setAnnouncementText('');
109
- setTimeout(() => {
110
- setAnnouncementText(announcement);
111
- }, 0);
112
- }, []);
113
- useEffect(() => {
114
- if (prevPosts) {
115
- const difference = prevPosts?.length - posts.length;
116
- if (difference > 0) {
117
- announce(t('feed_post_removed'));
118
- }
119
- }
120
- }, [posts]);
121
- return (_jsx(FeedContext.Provider, { value: {
122
- searchTypes,
123
- onSearch: e => {
124
- if (onDecoratorSearch)
125
- onDecoratorSearch(e);
126
- },
127
- searchResults,
128
- showSearchResults,
129
- setShowSearchResults,
130
- onMentionClick,
131
- onTagClick,
132
- interactionRenderers,
133
- markdownMap,
134
- userInfo,
135
- announce
136
- }, children: _jsxs(StyledFeed, { ...restProps, children: [_jsx(FeedAnnouncer, { children: announcementText }, void 0), (title || (filters && !!filters.length)) && (_jsxs(Flex, { container: { justify: 'between', alignItems: 'center' }, as: StyledHeading, children: [title ? _jsx(Text, { variant: 'h2', children: title }, void 0) : _jsx("div", {}, void 0), filters && (_jsx(Button, { as: FeedButton, ref: setButtonEl, variant: 'simple', icon: true, onClick: () => setMountPopover(curr => !curr), label: `${title || ''} ${t('filters')}`, emphasized: true, children: _jsx(Icon, { name: filters?.map(filter => !!filter.on).reduce((acc, curr) => acc || curr)
137
- ? 'filter-on'
138
- : 'filter' }, void 0) }, void 0))] }, void 0)), _jsx(Popover, { show: !!filters && mountPopover, ref: setPopoverEl, target: buttonEl, as: StyledFilterMenu, children: _jsxs(Flex, { container: { direction: 'column', gap: 2 }, as: 'fieldset', children: [_jsx(Text, { variant: 'h3', as: 'legend', children: t('filters') }, void 0), _jsx(Grid, { container: { gap: 1 }, as: StyledFilterList, ref: filterRef, children: filters?.map(filter => {
139
- return (_jsx("li", { children: _jsx(Switch, { ...filter, onChange: (event) => onFilterChange?.(event.target.id, event.target.checked) }, void 0) }, filter.id));
140
- }) }, void 0)] }, void 0) }, void 0), _jsxs("div", { children: [newPostRegion, posts] }, void 0), onLoadMore && (_jsx(Flex, { ref: setLoadMoreEl, as: StyledLoadMore, visible: feedOverflows, container: { justify: 'center' }, children: _jsx(Progress, { placement: 'inline' }, void 0) }, void 0))] }, void 0) }, void 0));
141
- };
142
- export default Feed;
143
- //# sourceMappingURL=Feed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Feed.js","sourceRoot":"","sources":["../../../src/components/Feed/Feed.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA8B,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,kBAAkB,EAClB,WAAW,EAEZ,MAAM,yBAAyB,C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AO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE;oCACrB,OAAO,CACL,uBACE,KAAC,MAAM,OACD,MAAM,EACV,QAAQ,EAAE,CAAC,KAAoC,EAAE,EAAE,CACjD,cAAc,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,WAEzD,IANK,MAAM,CAAC,EAAE,CAOb,CACN,CAAC;gCACJ,CAAC,CAAC,WACG,YACF,WACC,EAEV,0BACG,aAAa,EACb,KAAK,YACF,EAEL,UAAU,IAAI,CACb,KAAC,IAAI,IACH,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,cAAc,EAClB,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAEhC,KAAC,QAAQ,IAAC,SAAS,EAAC,QAAQ,WAAG,WAC1B,CACR,YACU,WACQ,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import { ChangeEvent, ReactNode, FC, useState, useRef, useEffect, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n defaultThemeProp,\n Flex,\n ForwardProps,\n Grid,\n Icon,\n registerIcon,\n Popover,\n Switch,\n Text,\n Progress,\n StyledProgressRing,\n usePrevious,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\nimport { useArrows, useElement, useI18n, useOuterEvent } from '@pega/cosmos-react-core/lib/hooks';\nimport * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';\nimport * as filterOnIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter-on.icon';\n\nimport { FeedContext, FeedContextValue } from './Feed.context';\nimport { StyledFeedNewPost } from './FeedNewPost';\nimport { StyledFeedPost } from './FeedPost';\nimport FeedButton from './FeedButton';\nimport FeedAnnouncer from './FeedAnnouncer';\n\nregisterIcon(filterIcon, filterOnIcon);\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 FeedProps extends NoChildrenProp {\n /** Title for the feed. */\n title?: string;\n /** Information related to the user of the Feed. */\n userInfo: FeedContextValue['userInfo'];\n /** A set of search types that can be used to determine which data set to conduct a mention search on. */\n searchTypes?: FeedContextValue['searchTypes'];\n /** A callback that runs when a decorator search has been run inside of the feed. */\n onDecoratorSearch?: FeedContextValue['onSearch'];\n /** Results that will be shown in a Popover for a mention or tag search. */\n searchResults?: FeedContextValue['searchResults'];\n /** A callback that is triggered when a mention is clicked. The callback sends back the id, text, and type of the mention. The callback should return a function component. */\n onMentionClick?: FeedContextValue['onMentionClick'];\n /** A callback that is triggered when a hashtag is clicked. The callback sends back the test of the tag. */\n onTagClick?: FeedContextValue['onTagClick'];\n /** A list of configuration objects used to render custom components within Feed posts and replies based off of a given regex pattern. */\n interactionRenderers?: FeedContextValue['interactionRenderers'];\n /** A mapping for various element types to render custom components for within posts. */\n markdownMap?: FeedContextValue['markdownMap'];\n /** A set of filters to apply to the Feed. */\n filters?: Filter[];\n /** A callback that runs when the filter is toggled. */\n onFilterChange?: (filterId: string, on: boolean) => void;\n /** A callback that is triggered when the bottom of the Feed is scrolled into view so that additional posts may be displayed. */\n onLoadMore?: () => void;\n /** A region to hold the new post component */\n newPostRegion?: ReactNode;\n /** A list of FeedPost components */\n posts?: ReactNode[];\n}\n\nconst StyledFeed = styled.div(props => {\n return css`\n ${StyledFeedNewPost}:not(:last-child), ${StyledFeedPost}:not(:last-child) {\n margin-bottom: calc(2 * ${props.theme.base.spacing});\n }\n `;\n});\n\nStyledFeed.defaultProps = defaultThemeProp;\n\nconst StyledHeading = styled.div(props => {\n return css`\n margin: ${props.theme.base.spacing} 0;\n `;\n});\n\nStyledHeading.defaultProps = defaultThemeProp;\n\nconst StyledFilterMenu = styled.div(props => {\n return css`\n padding: calc(2 * ${props.theme.base.spacing});\n\n fieldset {\n border: none;\n }\n `;\n});\n\nStyledFilterMenu.defaultProps = defaultThemeProp;\n\nconst StyledFilterList = styled.ul`\n list-style-type: none;\n min-width: 10rem;\n`;\n\nStyledFilterList.defaultProps = defaultThemeProp;\n\nconst StyledLoadMore = styled.div<{ visible: boolean }>(({ theme, visible }) => {\n return css`\n ${visible &&\n css`\n margin-top: calc(2 * ${theme.base.spacing});\n `}\n\n ${StyledProgressRing} {\n min-height: 0;\n min-width: 0;\n\n ${visible &&\n css`\n min-height: 2rem;\n min-width: 2rem;\n `}\n }\n `;\n});\n\nStyledLoadMore.defaultProps = defaultThemeProp;\n\nconst Feed: FC<ForwardProps & FeedProps> = (props: ForwardProps & FeedProps) => {\n const {\n variant,\n children,\n userInfo,\n className,\n title,\n searchTypes,\n onDecoratorSearch,\n searchResults = [],\n onMentionClick,\n onTagClick,\n mentionContent,\n interactionRenderers = [],\n markdownMap,\n filters,\n onFilterChange,\n onLoadMore,\n newPostRegion,\n posts = [],\n ...restProps\n } = props;\n\n const t = useI18n();\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>();\n const [buttonEl, setButtonEl] = useElement<HTMLElement>();\n const [loadMoreEl, setLoadMoreEl] = useElement<HTMLDivElement>();\n const [mountPopover, setMountPopover] = useState(false);\n const [feedOverflows, setFeedOverflows] = useState(false);\n const [showSearchResults, setShowSearchResults] = useState(false);\n const feedOverflowsRef = useRef(false);\n const prevPosts = usePrevious(posts);\n const [announcementText, setAnnouncementText] = useState('');\n\n const filterRef = useRef(null);\n useArrows(filterRef);\n\n useOuterEvent('mousedown', [popoverEl, buttonEl], () => {\n setMountPopover(false);\n });\n\n const onKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') setMountPopover(false);\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onKeydown);\n return () => {\n document.removeEventListener('keydown', onKeydown);\n };\n }, []);\n\n useEffect(() => {\n if (loadMoreEl) {\n const intersectionObserver = new IntersectionObserver(entries => {\n if (!entries[0].isIntersecting) {\n setFeedOverflows(true);\n feedOverflowsRef.current = true;\n } else if (entries[0].isIntersecting && feedOverflowsRef.current) {\n onLoadMore?.();\n }\n });\n\n intersectionObserver.observe(loadMoreEl);\n\n return () => {\n intersectionObserver.disconnect();\n };\n }\n }, [loadMoreEl, feedOverflowsRef.current]);\n\n const announce = useCallback((announcement: string) => {\n setAnnouncementText('');\n setTimeout(() => {\n setAnnouncementText(announcement);\n }, 0);\n }, []);\n\n useEffect(() => {\n if (prevPosts) {\n const difference = prevPosts?.length - posts.length;\n if (difference > 0) {\n announce(t('feed_post_removed'));\n }\n }\n }, [posts]);\n\n return (\n <FeedContext.Provider\n value={{\n searchTypes,\n onSearch: e => {\n if (onDecoratorSearch) onDecoratorSearch(e);\n },\n searchResults,\n showSearchResults,\n setShowSearchResults,\n onMentionClick,\n onTagClick,\n interactionRenderers,\n markdownMap,\n userInfo,\n announce\n }}\n >\n <StyledFeed {...restProps}>\n <FeedAnnouncer>{announcementText}</FeedAnnouncer>\n {(title || (filters && !!filters.length)) && (\n <Flex container={{ justify: 'between', alignItems: 'center' }} as={StyledHeading}>\n {title ? <Text variant='h2'>{title}</Text> : <div />}\n {filters && (\n <Button\n as={FeedButton}\n ref={setButtonEl}\n variant='simple'\n icon\n onClick={() => setMountPopover(curr => !curr)}\n label={`${title || ''} ${t('filters')}`}\n emphasized\n >\n <Icon\n name={\n filters?.map(filter => !!filter.on).reduce((acc, curr) => acc || curr)\n ? 'filter-on'\n : 'filter'\n }\n />\n </Button>\n )}\n </Flex>\n )}\n <Popover\n show={!!filters && mountPopover}\n ref={setPopoverEl}\n target={buttonEl}\n as={StyledFilterMenu}\n >\n <Flex container={{ direction: 'column', gap: 2 }} as='fieldset'>\n <Text variant='h3' as='legend'>\n {t('filters')}\n </Text>\n <Grid container={{ gap: 1 }} as={StyledFilterList} ref={filterRef}>\n {filters?.map(filter => {\n return (\n <li key={filter.id}>\n <Switch\n {...filter}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n onFilterChange?.(event.target.id, event.target.checked)\n }\n />\n </li>\n );\n })}\n </Grid>\n </Flex>\n </Popover>\n\n <div>\n {newPostRegion}\n {posts}\n </div>\n\n {onLoadMore && (\n <Flex\n ref={setLoadMoreEl}\n as={StyledLoadMore}\n visible={feedOverflows}\n container={{ justify: 'center' }}\n >\n <Progress placement='inline' />\n </Flex>\n )}\n </StyledFeed>\n </FeedContext.Provider>\n );\n};\n\nexport default Feed;\n"]}
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- interface FeedAnnouncerProps {
3
- children: string;
4
- }
5
- declare const FeedAnnouncer: FC<FeedAnnouncerProps>;
6
- export default FeedAnnouncer;
7
- //# sourceMappingURL=FeedAnnouncer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FeedAnnouncer.d.ts","sourceRoot":"","sources":["../../../src/components/Feed/FeedAnnouncer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAMD,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAEzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { hideVisually } from 'polished';
3
- import styled from 'styled-components';
4
- const StyledFeedAnnouncer = styled.span `
5
- ${hideVisually}
6
- `;
7
- const FeedAnnouncer = ({ children }) => {
8
- return _jsx(StyledFeedAnnouncer, { "aria-live": 'polite', children: children }, void 0);
9
- };
10
- export default FeedAnnouncer;
11
- //# sourceMappingURL=FeedAnnouncer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FeedAnnouncer.js","sourceRoot":"","sources":["../../../src/components/Feed/FeedAnnouncer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAA;IACnC,YAAY;CACf,CAAC;AAEF,MAAM,aAAa,GAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,OAAO,KAAC,mBAAmB,iBAAW,QAAQ,YAAE,QAAQ,WAAuB,CAAC;AAClF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { hideVisually } from 'polished';\nimport { FC } from 'react';\nimport styled from 'styled-components';\n\ninterface FeedAnnouncerProps {\n children: string;\n}\n\nconst StyledFeedAnnouncer = styled.span`\n ${hideVisually}\n`;\n\nconst FeedAnnouncer: FC<FeedAnnouncerProps> = ({ children }) => {\n return <StyledFeedAnnouncer aria-live='polite'>{children}</StyledFeedAnnouncer>;\n};\n\nexport default FeedAnnouncer;\n"]}
@@ -1,14 +0,0 @@
1
- import { FC, Ref } from 'react';
2
- import { FileUploadItemProps } from '@pega/cosmos-react-core';
3
- export declare type AttachedFiles = FileUploadItemProps & File;
4
- interface FeedAttachmentsProps {
5
- attachments?: AttachedFiles[];
6
- readOnly?: boolean;
7
- ref?: Ref<HTMLUListElement>;
8
- }
9
- export declare const StyledFeedAttachments: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const StyledImagePreview: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core/lib/components/Button/BareButton").BareButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
11
- export declare const StyledAttachmentsRegion: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
12
- declare const FeedAttachments: FC<FeedAttachmentsProps>;
13
- export default FeedAttachments;
14
- //# sourceMappingURL=FeedAttachments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FeedAttachments.d.ts","sourceRoot":"","sources":["../../../src/components/Feed/FeedAttachments.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,GAAG,EAAyB,MAAM,OAAO,CAAC;AAGpF,OAAO,EAEL,mBAAmB,EAUpB,MAAM,yBAAyB,CAAC;AAKjC,oBAAY,aAAa,GAAG,mBAAmB,GAAG,IAAI,CAAC;AAEvD,UAAU,oBAAoB;IAC5B,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,wGAShC,CAAC;AAIH,eAAO,MAAM,kBAAkB,0QA0B7B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAQlC,CAAC;AAIH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA+D7C,CAAC;AAEF,eAAe,eAAe,CAAC"}