@selfcommunity/react-ui 0.7.0-alpha.79 → 0.7.0-alpha.80

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 (180) hide show
  1. package/lib/cjs/components/FeedObject/FeedObject.d.ts.map +1 -1
  2. package/lib/cjs/components/FeedObject/FeedObject.js +0 -1
  3. package/lib/cjs/components/FeedObject/FeedObject.js.map +1 -1
  4. package/lib/cjs/components/FeedUpdates/FeedUpdates.d.ts.map +1 -1
  5. package/lib/cjs/components/FeedUpdates/FeedUpdates.js +0 -1
  6. package/lib/cjs/components/FeedUpdates/FeedUpdates.js.map +1 -1
  7. package/lib/cjs/components/NavigationToolbar/NotificationMenu.d.ts.map +1 -1
  8. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
  9. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js.map +1 -1
  10. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -21
  11. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts.map +1 -1
  12. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +15 -16
  13. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js.map +1 -1
  14. package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -21
  15. package/lib/cjs/components/Notification/Comment/Comment.d.ts.map +1 -1
  16. package/lib/cjs/components/Notification/Comment/Comment.js +23 -24
  17. package/lib/cjs/components/Notification/Comment/Comment.js.map +1 -1
  18. package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -21
  19. package/lib/cjs/components/Notification/Contribution/Contribution.d.ts.map +1 -1
  20. package/lib/cjs/components/Notification/Contribution/Contribution.js +25 -25
  21. package/lib/cjs/components/Notification/Contribution/Contribution.js.map +1 -1
  22. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -21
  23. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts.map +1 -1
  24. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +18 -19
  25. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js.map +1 -1
  26. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts +2 -21
  27. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts.map +1 -1
  28. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +17 -18
  29. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js.map +1 -1
  30. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +2 -21
  31. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts.map +1 -1
  32. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +16 -19
  33. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js.map +1 -1
  34. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -21
  35. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts.map +1 -1
  36. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +9 -10
  37. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js.map +1 -1
  38. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -21
  39. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts.map +1 -1
  40. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +16 -17
  41. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js.map +1 -1
  42. package/lib/cjs/components/Notification/Mention/Mention.d.ts +2 -21
  43. package/lib/cjs/components/Notification/Mention/Mention.d.ts.map +1 -1
  44. package/lib/cjs/components/Notification/Mention/Mention.js +18 -19
  45. package/lib/cjs/components/Notification/Mention/Mention.js.map +1 -1
  46. package/lib/cjs/components/Notification/Notification.d.ts +12 -12
  47. package/lib/cjs/components/Notification/Notification.d.ts.map +1 -1
  48. package/lib/cjs/components/Notification/Notification.js +33 -86
  49. package/lib/cjs/components/Notification/Notification.js.map +1 -1
  50. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -21
  51. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts.map +1 -1
  52. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +11 -20
  53. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js.map +1 -1
  54. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -21
  55. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts.map +1 -1
  56. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +16 -17
  57. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js.map +1 -1
  58. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts +2 -21
  59. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts.map +1 -1
  60. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +10 -11
  61. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js.map +1 -1
  62. package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts +2 -21
  63. package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts.map +1 -1
  64. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +12 -13
  65. package/lib/cjs/components/Notification/UserConnection/UserConnection.js.map +1 -1
  66. package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts +2 -21
  67. package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts.map +1 -1
  68. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +10 -11
  69. package/lib/cjs/components/Notification/UserFollow/UserFollow.js.map +1 -1
  70. package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts +2 -21
  71. package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts.map +1 -1
  72. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +16 -17
  73. package/lib/cjs/components/Notification/VoteUp/VoteUp.js.map +1 -1
  74. package/lib/cjs/components/SnippetNotifications/Skeleton.d.ts +1 -1
  75. package/lib/cjs/components/SnippetNotifications/Skeleton.d.ts.map +1 -1
  76. package/lib/cjs/components/SnippetNotifications/Skeleton.js +5 -12
  77. package/lib/cjs/components/SnippetNotifications/Skeleton.js.map +1 -1
  78. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.d.ts +2 -2
  79. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.d.ts.map +1 -1
  80. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +7 -21
  81. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js.map +1 -1
  82. package/lib/cjs/shared/CustomSnackMessage/index.d.ts.map +1 -1
  83. package/lib/cjs/shared/CustomSnackMessage/index.js +5 -19
  84. package/lib/cjs/shared/CustomSnackMessage/index.js.map +1 -1
  85. package/lib/cjs/shared/NotificationItem/NotificationItem.d.ts +1 -6
  86. package/lib/cjs/shared/NotificationItem/NotificationItem.d.ts.map +1 -1
  87. package/lib/cjs/shared/NotificationItem/NotificationItem.js +13 -123
  88. package/lib/cjs/shared/NotificationItem/NotificationItem.js.map +1 -1
  89. package/lib/esm/components/FeedObject/FeedObject.d.ts.map +1 -1
  90. package/lib/esm/components/FeedObject/FeedObject.js +0 -1
  91. package/lib/esm/components/FeedObject/FeedObject.js.map +1 -1
  92. package/lib/esm/components/FeedUpdates/FeedUpdates.d.ts.map +1 -1
  93. package/lib/esm/components/FeedUpdates/FeedUpdates.js +0 -1
  94. package/lib/esm/components/FeedUpdates/FeedUpdates.js.map +1 -1
  95. package/lib/esm/components/NavigationToolbar/NotificationMenu.d.ts.map +1 -1
  96. package/lib/esm/components/NavigationToolbar/NotificationMenu.js +6 -3
  97. package/lib/esm/components/NavigationToolbar/NotificationMenu.js.map +1 -1
  98. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -21
  99. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts.map +1 -1
  100. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +15 -16
  101. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js.map +1 -1
  102. package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -21
  103. package/lib/esm/components/Notification/Comment/Comment.d.ts.map +1 -1
  104. package/lib/esm/components/Notification/Comment/Comment.js +24 -25
  105. package/lib/esm/components/Notification/Comment/Comment.js.map +1 -1
  106. package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -21
  107. package/lib/esm/components/Notification/Contribution/Contribution.d.ts.map +1 -1
  108. package/lib/esm/components/Notification/Contribution/Contribution.js +26 -26
  109. package/lib/esm/components/Notification/Contribution/Contribution.js.map +1 -1
  110. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -21
  111. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts.map +1 -1
  112. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +19 -20
  113. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js.map +1 -1
  114. package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts +2 -21
  115. package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts.map +1 -1
  116. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +17 -18
  117. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js.map +1 -1
  118. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +2 -21
  119. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts.map +1 -1
  120. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +17 -20
  121. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js.map +1 -1
  122. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -21
  123. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts.map +1 -1
  124. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +9 -10
  125. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js.map +1 -1
  126. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -21
  127. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts.map +1 -1
  128. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +16 -17
  129. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js.map +1 -1
  130. package/lib/esm/components/Notification/Mention/Mention.d.ts +2 -21
  131. package/lib/esm/components/Notification/Mention/Mention.d.ts.map +1 -1
  132. package/lib/esm/components/Notification/Mention/Mention.js +18 -19
  133. package/lib/esm/components/Notification/Mention/Mention.js.map +1 -1
  134. package/lib/esm/components/Notification/Notification.d.ts +12 -12
  135. package/lib/esm/components/Notification/Notification.d.ts.map +1 -1
  136. package/lib/esm/components/Notification/Notification.js +35 -88
  137. package/lib/esm/components/Notification/Notification.js.map +1 -1
  138. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -21
  139. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts.map +1 -1
  140. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +11 -20
  141. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js.map +1 -1
  142. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -21
  143. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts.map +1 -1
  144. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +17 -18
  145. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js.map +1 -1
  146. package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts +2 -21
  147. package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts.map +1 -1
  148. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +11 -12
  149. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js.map +1 -1
  150. package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts +2 -21
  151. package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts.map +1 -1
  152. package/lib/esm/components/Notification/UserConnection/UserConnection.js +13 -14
  153. package/lib/esm/components/Notification/UserConnection/UserConnection.js.map +1 -1
  154. package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts +2 -21
  155. package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts.map +1 -1
  156. package/lib/esm/components/Notification/UserFollow/UserFollow.js +11 -12
  157. package/lib/esm/components/Notification/UserFollow/UserFollow.js.map +1 -1
  158. package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts +2 -21
  159. package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts.map +1 -1
  160. package/lib/esm/components/Notification/VoteUp/VoteUp.js +17 -18
  161. package/lib/esm/components/Notification/VoteUp/VoteUp.js.map +1 -1
  162. package/lib/esm/components/SnippetNotifications/Skeleton.d.ts +1 -1
  163. package/lib/esm/components/SnippetNotifications/Skeleton.d.ts.map +1 -1
  164. package/lib/esm/components/SnippetNotifications/Skeleton.js +6 -13
  165. package/lib/esm/components/SnippetNotifications/Skeleton.js.map +1 -1
  166. package/lib/esm/components/SnippetNotifications/SnippetNotifications.d.ts +2 -2
  167. package/lib/esm/components/SnippetNotifications/SnippetNotifications.d.ts.map +1 -1
  168. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +7 -21
  169. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js.map +1 -1
  170. package/lib/esm/shared/CustomSnackMessage/index.d.ts.map +1 -1
  171. package/lib/esm/shared/CustomSnackMessage/index.js +5 -19
  172. package/lib/esm/shared/CustomSnackMessage/index.js.map +1 -1
  173. package/lib/esm/shared/NotificationItem/NotificationItem.d.ts +1 -6
  174. package/lib/esm/shared/NotificationItem/NotificationItem.d.ts.map +1 -1
  175. package/lib/esm/shared/NotificationItem/NotificationItem.js +13 -123
  176. package/lib/esm/shared/NotificationItem/NotificationItem.js.map +1 -1
  177. package/lib/umd/react-ui.js +3 -3
  178. package/lib/umd/react-ui.js.LICENSE.txt +2 -2
  179. package/lib/umd/react-ui.js.map +1 -1
  180. package/package.json +3 -3
@@ -39,7 +39,7 @@ const classes = {
39
39
  contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
40
40
  contributionText: `${PREFIX}-contribution-text`
41
41
  };
42
- const Root = styled(Box, {
42
+ const Root = styled(NotificationItem, {
43
43
  name: PREFIX,
44
44
  slot: 'Root',
45
45
  overridesResolver: (props, styles) => styles.root
@@ -85,14 +85,13 @@ export default function KindlyNoticeFlagNotification(inProps) {
85
85
  /**
86
86
  * Renders root object
87
87
  */
88
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest),
89
- React.createElement(NotificationItem, { template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Avatar, { variant: "circular", classes: { root: classes.flagIcon } },
90
- React.createElement(Icon, null, "outlined_flag")), primary: React.createElement(React.Fragment, null, isSnippetTemplate ? (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
91
- React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText },
92
- React.createElement(FormattedMessage, { id: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet`, defaultMessage: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet` })))) : (React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[camelCase(notificationObject.type)], { b: (...chunks) => React.createElement("strong", null, chunks) })))), secondary: template === SCNotificationObjectTemplateType.DETAIL && React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), footer: React.createElement(React.Fragment, null, !isSnippetTemplate && (React.createElement(Box, { className: classes.contributionWrap },
93
- React.createElement(Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } },
94
- React.createElement(FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" })),
95
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])), className: classes.contributionText },
96
- React.createElement(Typography, { component: 'span', variant: "body2", gutterBottom: true }, getContributionSnippet(notificationObject[contributionType])))))) })));
88
+ return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Avatar, { variant: "circular", classes: { root: classes.flagIcon } },
89
+ React.createElement(Icon, null, "outlined_flag")), primary: React.createElement(React.Fragment, null, isSnippetTemplate ? (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
90
+ React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText },
91
+ React.createElement(FormattedMessage, { id: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet`, defaultMessage: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet` })))) : (React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[camelCase(notificationObject.type)], { b: (...chunks) => React.createElement("strong", null, chunks) })))), secondary: (template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt })), footer: !isSnippetTemplate && (React.createElement(Box, { className: classes.contributionWrap },
92
+ React.createElement(Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } },
93
+ React.createElement(FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" })),
94
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])), className: classes.contributionText },
95
+ React.createElement(Typography, { component: 'span', variant: "body2" }, getContributionSnippet(notificationObject[contributionType]))))) }, rest)));
97
96
  }
98
97
  //# sourceMappingURL=KindlyNoticeFlag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KindlyNoticeFlag.js","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,IAAI,EAAwB,YAAY,EAAE,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACtG,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,gBAAgB,EAAE;QAChB,EAAE,EAAE,mDAAmD;QACvD,cAAc,EAAE,mDAAmD;KACpE;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,gCAAgC,CAAC;AAEhD,MAAM,OA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gBAAgB;oBACnC,oBAAC,UAAU,IAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAC,OAAO,EAAC,YAAY,UACxD,sBAAsB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAClD,CACR,CACH,CACP,CACA,GAEL,CACG,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"KindlyNoticeFlag.js","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,IAAI,EAAwB,YAAY,EAAE,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACtG,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,gBAAyC,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,gBAAgB,EAAE;QAChB,EAAE,EAAE,mDAAmD;QACvD,cAAc,EAAE,mDAAmD;KACpE;CACF,CAAC,CAAC;AAEH,MAAM,M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AAC,gBAAgB,CAAC,CAAC,CAAC,EACtI,SAAS,EAAE,OAAO,CAAC,gBAAgB;gBACnC,oBAAC,UAAU,IAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAC,OAAO,IAC3C,sBAAsB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAClD,CACR,CACH,CACP,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
@@ -1,30 +1,11 @@
1
1
  import { SCNotificationDeletedForType } from '@selfcommunity/types';
2
- import { SCNotificationObjectTemplateType } from '../../../types';
3
- export interface NotificationKindlyNoticeForProps {
4
- /**
5
- * Id of the feedObject
6
- * @default `n_<notificationObject.sid>`
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: string;
2
+ import { NotificationItemProps } from '../../../shared/NotificationItem';
3
+ export interface NotificationKindlyNoticeForProps extends Pick<NotificationItemProps, Exclude<keyof NotificationItemProps, 'image' | 'disableTypography' | 'primary' | 'primaryTypographyProps' | 'secondary' | 'secondaryTypographyProps' | 'actions' | 'footer' | 'isNew'>> {
14
4
  /**
15
5
  * Notification obj
16
6
  * @default null
17
7
  */
18
8
  notificationObject: SCNotificationDeletedForType;
19
- /**
20
- * Notification Object template type
21
- * @default 'detail'
22
- */
23
- template?: SCNotificationObjectTemplateType;
24
- /**
25
- * Any other properties
26
- */
27
- [p: string]: any;
28
9
  }
29
10
  /**
30
11
  * This component render the content of the notification of type kindly notice for
@@ -1 +1 @@
1
- {"version":3,"file":"KindlyNoticeFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFor/KindlyNoticeFor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAKlE,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAsEhE,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,4BAA4B,CAAC;IAEjD;;;OAGG;IACH,QAAQ,CAAC,EAAE,gCAAgC,CAAC;IAE5C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,OAAO,EAAE,gCAAgC,GAAG,GAAG,CAAC,OAAO,CAuG1G"}
1
+ {"version":3,"file":"KindlyNoticeFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFor/KindlyNoticeFor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAOlE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAoEzF,MAAM,WAAW,gCACf,SAAQ,IAAI,CACV,qBAAqB,EACrB,OAAO,CACL,MAAM,qBAAqB,EAC3B,OAAO,GAAG,mBAAmB,GAAG,SAAS,GAAG,wBAAwB,GAAG,WAAW,GAAG,0BAA0B,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CACjJ,CACF;IACD;;;OAGG;IACH,kBAAkB,EAAE,4BAA4B,CAAC;CAClD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,OAAO,EAAE,gCAAgC,GAAG,GAAG,CAAC,OAAO,CAuG1G"}
@@ -59,7 +59,7 @@ const classes = {
59
59
  contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
60
60
  contributionText: `${PREFIX}-contribution-text`
61
61
  };
62
- const Root = styled(Box, {
62
+ const Root = styled(NotificationItem, {
63
63
  name: PREFIX,
64
64
  slot: 'Root',
65
65
  overridesResolver: (props, styles) => styles.root
@@ -106,21 +106,20 @@ export default function KindlyNoticeForNotification(inProps) {
106
106
  /**
107
107
  * Renders root object
108
108
  */
109
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest),
110
- React.createElement(NotificationItem, { template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Avatar, { variant: "circular", classes: { root: classes.flagIcon } },
111
- React.createElement(Icon, null, "outlined_flag")), primary: React.createElement(React.Fragment, null, isSnippetTemplate ? (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
112
- React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText },
113
- React.createElement(FormattedMessage, { id: `ui.notification.kindlyNoticeFor.${camelCase(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.kindlyNoticeFor.${camelCase(notificationObject.type)}Snippet` })))) : (React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[camelCase(notificationObject.type)], { b: (...chunks) => React.createElement("strong", null, chunks) })))), secondary: template === SCNotificationObjectTemplateType.DETAIL && React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), footer: React.createElement(React.Fragment, null,
114
- !isSnippetTemplate && (React.createElement(Box, { className: classes.contributionWrap },
115
- React.createElement(Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } }, intl.formatMessage(messages.youWrote, {
116
- b: (...chunks) => React.createElement("strong", null, chunks)
117
- })),
118
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])), className: classes.contributionText },
119
- React.createElement(Typography, { component: 'span', variant: "body2", gutterBottom: true }, getContributionSnippet(notificationObject[contributionType]))))),
120
- template === SCNotificationObjectTemplateType.TOAST && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
121
- React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
122
- React.createElement(Typography, { color: "primary", component: 'div' },
123
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
124
- React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
109
+ return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Avatar, { variant: "circular", classes: { root: classes.flagIcon } },
110
+ React.createElement(Icon, null, "outlined_flag")), primary: React.createElement(React.Fragment, null, isSnippetTemplate ? (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
111
+ React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText },
112
+ React.createElement(FormattedMessage, { id: `ui.notification.kindlyNoticeFor.${camelCase(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.kindlyNoticeFor.${camelCase(notificationObject.type)}Snippet` })))) : (React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[camelCase(notificationObject.type)], { b: (...chunks) => React.createElement("strong", null, chunks) })))), secondary: (template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : (React.createElement(React.Fragment, null,
113
+ React.createElement(Box, { className: classes.contributionWrap },
114
+ React.createElement(Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } }, intl.formatMessage(messages.youWrote, {
115
+ b: (...chunks) => React.createElement("strong", null, chunks)
116
+ })),
117
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])), className: classes.contributionText },
118
+ React.createElement(Typography, { component: 'span', variant: "body2" }, getContributionSnippet(notificationObject[contributionType])))),
119
+ template === SCNotificationObjectTemplateType.TOAST && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
120
+ React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
121
+ React.createElement(Typography, { color: "primary", component: 'div' },
122
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
123
+ React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))))) }, rest)));
125
124
  }
126
125
  //# sourceMappingURL=KindlyNoticeFor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KindlyNoticeFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFor/KindlyNoticeFor.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAwB,YAAY,EAAE,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACtG,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,M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,kBAAkB,CAAC,SAAS,GAAI;oBACnD,oBAAC,UAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;wBAC1C,oBAAC,IAAI,IACH,EAAE,EAAE,gBAAgB,CAAC,GAAG,CACtB,QAAQ,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,aAAa,CAAC,EACpF,YAAY,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CACnD;4BACD,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,CACA,GAEL,CACG,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"KindlyNoticeFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFor/KindlyNoticeFor.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAwB,YAAY,EAAE,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACtG,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,aAAa,EA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,CAAC;gBAClF,oBAAC,WAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,GAAI;gBACnD,oBAAC,UAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;oBAC1C,oBAAC,IAAI,IACH,EAAE,EAAE,gBAAgB,CAAC,GAAG,CACtB,QAAQ,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,aAAa,CAAC,EACpF,YAAY,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CACnD;wBACD,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,CACA,CACJ,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
@@ -1,30 +1,11 @@
1
1
  import { SCNotificationMentionType } from '@selfcommunity/types';
2
- import { SCNotificationObjectTemplateType } from '../../../types';
3
- export interface MentionNotificationProps {
4
- /**
5
- * Id of the feedObject
6
- * @default `n_<notificationObject.sid>`
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: string;
2
+ import { NotificationItemProps } from '../../../shared/NotificationItem';
3
+ export interface MentionNotificationProps extends Pick<NotificationItemProps, Exclude<keyof NotificationItemProps, 'image' | 'disableTypography' | 'primary' | 'primaryTypographyProps' | 'secondary' | 'secondaryTypographyProps' | 'actions' | 'footer' | 'isNew'>> {
14
4
  /**
15
5
  * Notification obj
16
6
  * @default null
17
7
  */
18
8
  notificationObject: SCNotificationMentionType;
19
- /**
20
- * Notification Object template type
21
- * @default 'detail'
22
- */
23
- template?: SCNotificationObjectTemplateType;
24
- /**
25
- * Any other properties
26
- */
27
- [p: string]: any;
28
9
  }
29
10
  /**
30
11
  * This component render the content of the notification of type mention
@@ -1 +1 @@
1
- {"version":3,"file":"Mention.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/Mention/Mention.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,yBAAyB,EAAC,MAAM,sBAAsB,CAAC;AAK/D,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AA8ChE,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,yBAAyB,CAAC;IAE9C;;;OAGG;IACH,QAAQ,CAAC,EAAE,gCAAgC,CAAC;IAE5C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAoF1F"}
1
+ {"version":3,"file":"Mention.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/Mention/Mention.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,yBAAyB,EAAC,MAAM,sBAAsB,CAAC;AAO/D,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AA4CzF,MAAM,WAAW,wBACf,SAAQ,IAAI,CACV,qBAAqB,EACrB,OAAO,CACL,MAAM,qBAAqB,EAC3B,OAAO,GAAG,mBAAmB,GAAG,SAAS,GAAG,wBAAwB,GAAG,WAAW,GAAG,0BAA0B,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CACjJ,CACF;IACD;;;OAGG;IACH,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAmF1F"}
@@ -26,7 +26,7 @@ const messages = defineMessages({
26
26
  defaultMessage: 'ui.notification.mention.quotedYou'
27
27
  }
28
28
  });
29
- const PREFIX = 'SCUserNotificationMention';
29
+ const PREFIX = 'SCNotificationMention';
30
30
  const classes = {
31
31
  root: `${PREFIX}-root`,
32
32
  avatar: `${PREFIX}-avatar`,
@@ -35,7 +35,7 @@ const classes = {
35
35
  activeAt: `${PREFIX}-active-at`,
36
36
  contributionText: `${PREFIX}-contribution-text`
37
37
  };
38
- const Root = styled(Box, {
38
+ const Root = styled(NotificationItem, {
39
39
  name: PREFIX,
40
40
  slot: 'Root',
41
41
  overridesResolver: (props, styles) => styles.root
@@ -80,22 +80,21 @@ export default function MentionNotification(inProps) {
80
80
  /**
81
81
  * Renders root object
82
82
  */
83
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest),
84
- React.createElement(NotificationItem, { template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[objectType].author) },
85
- React.createElement(Avatar, { alt: notificationObject[objectType].author.username, variant: "circular", src: notificationObject[objectType].author.avatar, classes: { root: classes.avatar } })), primary: React.createElement(Typography, { component: "div", color: "inherit", className: classes.mentionText },
86
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[objectType].author), className: classes.username }, notificationObject[objectType].author.username),
87
- ' ',
88
- intl.formatMessage(messages.quotedYouOn, {
89
- b: (...chunks) => React.createElement("strong", null, chunks)
90
- }),
91
- ' '), secondary: React.createElement(React.Fragment, null,
92
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${objectType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[objectType])) },
93
- React.createElement(Typography, { component: 'span', variant: "body2", className: classes.contributionText, gutterBottom: true }, getContributionSnippet(notificationObject[objectType]))),
94
- template === SCNotificationObjectTemplateType.DETAIL && (React.createElement(Box, null,
95
- React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt })))), footer: React.createElement(React.Fragment, null, template === SCNotificationObjectTemplateType.TOAST && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
96
- React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
97
- React.createElement(Typography, { color: "primary", component: 'div' },
98
- React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contribution.type.toUpperCase()}_ROUTE_NAME`], getRouteData(contribution)) },
99
- React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
83
+ return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[objectType].author) },
84
+ React.createElement(Avatar, { alt: notificationObject[objectType].author.username, variant: "circular", src: notificationObject[objectType].author.avatar, classes: { root: classes.avatar } })), primary: React.createElement(Typography, { component: "div", color: "inherit", className: classes.mentionText },
85
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[objectType].author), className: classes.username }, notificationObject[objectType].author.username),
86
+ ' ',
87
+ intl.formatMessage(messages.quotedYouOn, {
88
+ b: (...chunks) => React.createElement("strong", null, chunks)
89
+ }),
90
+ ' '), secondary: React.createElement(React.Fragment, null,
91
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${objectType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[objectType])) },
92
+ React.createElement(Typography, { component: 'span', variant: "body2", className: classes.contributionText }, getContributionSnippet(notificationObject[objectType]))),
93
+ (template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (React.createElement(Box, null,
94
+ React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt })))), footer: template === SCNotificationObjectTemplateType.TOAST && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
95
+ React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
96
+ React.createElement(Typography, { color: "primary", component: 'div' },
97
+ React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contribution.type.toUpperCase()}_ROUTE_NAME`], getRouteData(contribution)) },
98
+ React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))) }, rest)));
100
99
  }
101
100
  //# sourceMappingURL=Mention.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Mention.js","sourceRoot":"","sources":["../../../../../src/components/Notification/Mention/Mention.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAwB,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EAAC,MAAM,6BAA6B,CAAC;AACvH,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAEhE,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,WAAW,EAAE;QACX,EAAE,EAAE,mCAAmC;QACvC,cAAc,EAAE,mCAAmC;KACpD;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,2BAA2B,CAAC;AAE3C,MAAM,OAAO,GAAG;IAC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AAC,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;oBACnH,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
@@ -53,24 +53,24 @@ export interface NotificationProps extends CardProps, VirtualScrollerItemProps {
53
53
 
54
54
  #### Component Name
55
55
 
56
- The name `SCUserNotification` can be used when providing style overrides in the theme.
56
+ The name `SCNotification` can be used when providing style overrides in the theme.
57
57
 
58
58
 
59
59
  #### CSS
60
60
 
61
61
  |Rule Name|Global class|Description|
62
62
  |---|---|---|
63
- |root|.SCUserNotification-root|Styles applied to the root element.|
64
- |notificationWrap|.SCUserNotification-notification-wrap|Styles applied to the element wrap.|
65
- |notificationHeader|.SCUserNotification-notification-wrap|Styles applied to the notification header.|
66
- |title|.SCUserNotification-title|Styles applied to the title element in the notification header.|
67
- |image|.SCUserNotification-image|Styles applied to the image element in the notification header.|
68
- |username|.SCUserNotification-username|Styles applied to the user element in the notification header.|
69
- |notificationContent|.SCUserNotification-notification-content|Styles applied to the notification content.|
70
- |notificationUnCollapsed|.SCUserNotification-notification-wrap|Styles applied to the uncollapsed elements.|
71
- |notificationCollapsed|.SCUserNotification-notification-wrap|Styles applied to the collapsed elements.|
72
- |stopNotificationButton|.SCUserNotification-stop-notification-button|Styles applied to the stop notification button.|
73
- |showOtherAggregated|.SCUserNotification-show-other-aggregated|Styles applied to the show other aggregated element.|
63
+ |root|.SCNotification-root|Styles applied to the root element.|
64
+ |content|.SCNotification-notification-wrap|Styles applied to the element wrap.|
65
+ |header|.SCNotification-notification-wrap|Styles applied to the notification header.|
66
+ |title|.SCNotification-title|Styles applied to the title element in the notification header.|
67
+ |image|.SCNotification-image|Styles applied to the image element in the notification header.|
68
+ |username|.SCNotification-username|Styles applied to the user element in the notification header.|
69
+ |content|.SCNotification-notification-content|Styles applied to the notification content.|
70
+ |unCollapsed|.SCNotification-notification-wrap|Styles applied to the uncollapsed elements.|
71
+ |collapsed|.SCNotification-notification-wrap|Styles applied to the collapsed elements.|
72
+ |stopButton|.SCNotification-stop-notification-button|Styles applied to the stop notification button.|
73
+ |showOtherAggregated|.SCNotification-show-other-aggregated|Styles applied to the show other aggregated element.|
74
74
 
75
75
  * @param inProps
76
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAS,SAAS,EAAqE,MAAM,eAAe,CAAC;AAKpH,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AAOrE,OAAO,EAEL,4BAA4B,EAI7B,MAAM,sBAAsB,CAAC;AA8E9B,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,wBAAwB;IAC5E;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,4BAA4B,CAAC;IAEjD;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC,OAAO,CAAC;IAEjD;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAyThF"}
1
+ {"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAqB,SAAS,EAAqE,MAAM,eAAe,CAAC;AAKhI,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AAOrE,OAAO,EAEL,4BAA4B,EAI7B,MAAM,sBAAsB,CAAC;AA+B9B,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,wBAAwB;IAC5E;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,4BAA4B,CAAC;IAEjD;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC,OAAO,CAAC;IAEjD;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CA4ThF"}
@@ -23,14 +23,13 @@ import MentionNotification from './Mention';
23
23
  import CollapsedForNotification from './CollapsedFor';
24
24
  import KindlyNoticeForNotification from './KindlyNoticeFor';
25
25
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
26
- import { grey } from '@mui/material/colors';
27
26
  import KindlyNoticeFlagNotification from './KindlyNoticeFlag';
28
27
  import VoteUpNotification from './VoteUp';
29
28
  import Icon from '@mui/material/Icon';
30
29
  import { SCOPE_SC_UI } from '../../constants/Errors';
31
30
  import { getContribution, getContributionRouteName, getContributionSnippet, getRouteData } from '../../utils/contribution';
32
31
  import ContributionFollowNotification from './ContributionFollow';
33
- import { Avatar, Collapse, ListItemButton, ListItemText, Stack, Tooltip, Typography } from '@mui/material';
32
+ import { Avatar, CardHeader, Collapse, ListItemButton, ListItemText, Tooltip } from '@mui/material';
34
33
  import IncubatorApprovedNotification from './IncubatorApproved';
35
34
  import { http, Endpoints } from '@selfcommunity/api-services';
36
35
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
@@ -39,81 +38,33 @@ import classNames from 'classnames';
39
38
  import LoadingButton from '@mui/lab/LoadingButton';
40
39
  import Widget from '../Widget';
41
40
  import { useThemeProps } from '@mui/system';
42
- import BaseItem from '../../shared/BaseItem';
43
41
  import { Logger } from '@selfcommunity/utils';
44
- import { SCCommentTypologyType, SCNotificationTypologyType } from '@selfcommunity/types';
42
+ import { SCNotificationTypologyType } from '@selfcommunity/types';
45
43
  const messages = defineMessages({
46
44
  receivePrivateMessage: {
47
45
  id: 'ui.notification.receivePrivateMessage',
48
46
  defaultMessage: 'ui.notification.receivePrivateMessage'
49
47
  }
50
48
  });
51
- const PREFIX = 'SCUserNotification';
49
+ const PREFIX = 'SCNotification';
52
50
  const classes = {
53
51
  root: `${PREFIX}-root`,
54
- notificationWrap: `${PREFIX}-notification-wrap`,
55
- notificationHeader: `${PREFIX}-notification-header`,
52
+ header: `${PREFIX}-header`,
53
+ avatar: `${PREFIX}-avatar`,
56
54
  title: `${PREFIX}-title`,
57
55
  image: `${PREFIX}-image`,
58
56
  username: `${PREFIX}-username`,
59
- notificationContent: `${PREFIX}-notification-content`,
60
- notificationUnCollapsed: `${PREFIX}-notification-uncollapsed`,
61
- notificationCollapsed: `${PREFIX}-notification-collapsed`,
62
- stopNotificationButton: `${PREFIX}-stop-notification-button`,
57
+ content: `${PREFIX}-content`,
58
+ unCollapsed: `${PREFIX}-uncollapsed`,
59
+ collapsed: `${PREFIX}-collapsed`,
60
+ stopButton: `${PREFIX}-stop-button`,
63
61
  showOtherAggregated: `${PREFIX}-show-other-aggregated`
64
62
  };
65
63
  const Root = styled(Widget, {
66
64
  name: PREFIX,
67
65
  slot: 'Root',
68
66
  overridesResolver: (props, styles) => styles.root
69
- })(({ theme }) => ({
70
- width: '100%',
71
- marginBottom: theme.spacing(1),
72
- [`& .${classes.title}`]: {
73
- fontSize: 15,
74
- padding: `${theme.spacing()} ${theme.spacing(2)} 5px ${theme.spacing(2)}`,
75
- '&:hover': {
76
- textDecoration: 'underline'
77
- }
78
- },
79
- [`& .${classes.username}`]: {
80
- fontWeight: 700,
81
- '&:hover': {
82
- textDecoration: 'underline'
83
- }
84
- },
85
- [`& .${classes.notificationWrap}`]: {
86
- padding: `${theme.spacing()} 0px`
87
- },
88
- [`& .${classes.notificationContent}`]: {
89
- position: 'relative'
90
- },
91
- [`& .${classes.notificationHeader}`]: {
92
- boxSizing: 'border-box',
93
- boxShadow: 'none',
94
- border: 'none'
95
- },
96
- [`& .${classes.stopNotificationButton}`]: {
97
- margin: '5px 10px',
98
- padding: '2px 2px 2px 2px',
99
- minWidth: 'auto',
100
- '& span': {
101
- fontSize: 20
102
- }
103
- },
104
- [`& .${classes.showOtherAggregated}`]: {
105
- position: 'relative',
106
- top: theme.spacing(),
107
- backgroundColor: grey[100]
108
- },
109
- [`& .${classes.notificationCollapsed}`]: {
110
- paddingTop: theme.spacing()
111
- },
112
- '& a': {
113
- textDecoration: 'none',
114
- color: theme.palette.text.primary
115
- }
116
- }));
67
+ })(({ theme }) => ({}));
117
68
  /**
118
69
  *
119
70
  > API documentation for the Community-JS UserNotification component. Learn about the available props and the CSS API.
@@ -126,24 +77,24 @@ const Root = styled(Widget, {
126
77
 
127
78
  #### Component Name
128
79
 
129
- The name `SCUserNotification` can be used when providing style overrides in the theme.
80
+ The name `SCNotification` can be used when providing style overrides in the theme.
130
81
 
131
82
 
132
83
  #### CSS
133
84
 
134
85
  |Rule Name|Global class|Description|
135
86
  |---|---|---|
136
- |root|.SCUserNotification-root|Styles applied to the root element.|
137
- |notificationWrap|.SCUserNotification-notification-wrap|Styles applied to the element wrap.|
138
- |notificationHeader|.SCUserNotification-notification-wrap|Styles applied to the notification header.|
139
- |title|.SCUserNotification-title|Styles applied to the title element in the notification header.|
140
- |image|.SCUserNotification-image|Styles applied to the image element in the notification header.|
141
- |username|.SCUserNotification-username|Styles applied to the user element in the notification header.|
142
- |notificationContent|.SCUserNotification-notification-content|Styles applied to the notification content.|
143
- |notificationUnCollapsed|.SCUserNotification-notification-wrap|Styles applied to the uncollapsed elements.|
144
- |notificationCollapsed|.SCUserNotification-notification-wrap|Styles applied to the collapsed elements.|
145
- |stopNotificationButton|.SCUserNotification-stop-notification-button|Styles applied to the stop notification button.|
146
- |showOtherAggregated|.SCUserNotification-show-other-aggregated|Styles applied to the show other aggregated element.|
87
+ |root|.SCNotification-root|Styles applied to the root element.|
88
+ |content|.SCNotification-notification-wrap|Styles applied to the element wrap.|
89
+ |header|.SCNotification-notification-wrap|Styles applied to the notification header.|
90
+ |title|.SCNotification-title|Styles applied to the title element in the notification header.|
91
+ |image|.SCNotification-image|Styles applied to the image element in the notification header.|
92
+ |username|.SCNotification-username|Styles applied to the user element in the notification header.|
93
+ |content|.SCNotification-notification-content|Styles applied to the notification content.|
94
+ |unCollapsed|.SCNotification-notification-wrap|Styles applied to the uncollapsed elements.|
95
+ |collapsed|.SCNotification-notification-wrap|Styles applied to the collapsed elements.|
96
+ |stopButton|.SCNotification-stop-notification-button|Styles applied to the stop notification button.|
97
+ |showOtherAggregated|.SCNotification-show-other-aggregated|Styles applied to the show other aggregated element.|
147
98
 
148
99
  * @param inProps
149
100
  */
@@ -263,14 +214,14 @@ export default function UserNotification(inProps) {
263
214
  */
264
215
  if (notificationObject.aggregated && notificationObject.aggregated[0].type === SCNotificationTypologyType.PRIVATE_MESSAGE) {
265
216
  let messageNotification = notificationObject.aggregated[0];
266
- return (React.createElement(BaseItem, { className: classes.notificationHeader, image: React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender) },
267
- React.createElement(Avatar, { alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar })), primary: React.createElement(Typography, { component: "span", color: "inherit" },
217
+ return (React.createElement(CardHeader, { className: classes.header, avatar: React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender) },
218
+ React.createElement(Avatar, { className: classes.avatar, alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar })), titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: React.createElement(React.Fragment, null,
268
219
  React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender), className: classes.username }, messageNotification.message.sender.username),
269
220
  ' ',
270
221
  intl.formatMessage(messages.receivePrivateMessage, {
271
222
  total: notificationObject.aggregated.length,
272
223
  b: (...chunks) => React.createElement("strong", null, chunks)
273
- })), disableTypography: true }));
224
+ })) }));
274
225
  }
275
226
  /**
276
227
  * Comment, NestedComment, Follow Contribution header
@@ -283,11 +234,8 @@ export default function UserNotification(inProps) {
283
234
  notificationObject.aggregated[0].type === SCNotificationTypologyType.VOTE_UP ||
284
235
  notificationObject.aggregated[0].type === SCNotificationTypologyType.CONTRIBUTION)) {
285
236
  const contribution = getContribution(notificationObject);
286
- return (React.createElement("div", { className: classes.notificationHeader }, contribution && contribution.type !== SCCommentTypologyType && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
287
- React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(contribution), getRouteData(notificationObject[contribution.type])) },
288
- React.createElement(Typography, { variant: "body2", gutterBottom: true, classes: { root: classes.title } }, getContributionSnippet(contribution))),
289
- contribution && (React.createElement(Tooltip, { title: contribution.suspended ? (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) },
290
- React.createElement(LoadingButton, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopNotificationButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ? (React.createElement(Icon, { fontSize: "small", color: 'primary' }, "notifications_off")) : (React.createElement(Icon, { fontSize: "small", color: 'inherit' }, "notifications")))))))));
237
+ return (React.createElement(CardHeader, { className: classes.header, titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(contribution), getRouteData(notificationObject[contribution.type])) }, getContributionSnippet(contribution)), action: contribution && (React.createElement(Tooltip, { title: contribution.suspended ? (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) },
238
+ React.createElement(LoadingButton, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ? (React.createElement(Icon, { fontSize: "small", color: 'primary' }, "notifications_off")) : (React.createElement(Icon, { fontSize: "small", color: 'inherit' }, "notifications"))))) }));
291
239
  }
292
240
  return null;
293
241
  }
@@ -363,14 +311,13 @@ export default function UserNotification(inProps) {
363
311
  * Renders root object
364
312
  */
365
313
  return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest),
366
- React.createElement(CardContent, { classes: { root: classes.notificationWrap } },
367
- renderNotificationHeader(),
368
- React.createElement("div", { className: classes.notificationContent },
369
- React.createElement("div", { className: classes.notificationUnCollapsed }, notificationObject.aggregated.slice(0, showMaxAggregated).map((n, i) => renderAggregatedItem(n, i))),
370
- notificationObject.aggregated.length > showMaxAggregated && (React.createElement(React.Fragment, null,
371
- React.createElement(ListItemButton, { onClick: setStateAggregated, classes: { root: classes.showOtherAggregated } },
372
- React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: 'ui.notification.showOthers', defaultMessage: 'ui.notification.showOthers' }) }),
373
- openOtherAggregated ? React.createElement(Icon, null, "expand_less") : React.createElement(Icon, null, "expand_more")),
374
- React.createElement(Collapse, { in: openOtherAggregated, timeout: "auto", unmountOnExit: true, classes: { root: classes.notificationCollapsed } }, notificationObject.aggregated.slice(showMaxAggregated).map((n, i) => renderAggregatedItem(n, i)))))))));
314
+ renderNotificationHeader(),
315
+ React.createElement(CardContent, { className: classes.content },
316
+ React.createElement("div", { className: classes.unCollapsed }, notificationObject.aggregated.slice(0, showMaxAggregated).map((n, i) => renderAggregatedItem(n, i))),
317
+ notificationObject.aggregated.length > showMaxAggregated && (React.createElement(React.Fragment, null,
318
+ React.createElement(ListItemButton, { onClick: setStateAggregated, classes: { root: classes.showOtherAggregated } },
319
+ React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: 'ui.notification.showOthers', defaultMessage: 'ui.notification.showOthers' }) }),
320
+ openOtherAggregated ? React.createElement(Icon, null, "expand_less") : React.createElement(Icon, null, "expand_more")),
321
+ React.createElement(Collapse, { in: openOtherAggregated, timeout: "auto", unmountOnExit: true, classes: { root: classes.collapsed } }, notificationObject.aggregated.slice(showMaxAggregated).map((n, i) => renderAggregatedItem(n, i))))))));
375
322
  }
376
323
  //# sourceMappingURL=Notification.js.map