@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.
- package/lib/cjs/components/FeedObject/FeedObject.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/FeedObject.js +0 -1
- package/lib/cjs/components/FeedObject/FeedObject.js.map +1 -1
- package/lib/cjs/components/FeedUpdates/FeedUpdates.d.ts.map +1 -1
- package/lib/cjs/components/FeedUpdates/FeedUpdates.js +0 -1
- package/lib/cjs/components/FeedUpdates/FeedUpdates.js.map +1 -1
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.d.ts.map +1 -1
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js.map +1 -1
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -21
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts.map +1 -1
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +15 -16
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js.map +1 -1
- package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -21
- package/lib/cjs/components/Notification/Comment/Comment.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Comment/Comment.js +23 -24
- package/lib/cjs/components/Notification/Comment/Comment.js.map +1 -1
- package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -21
- package/lib/cjs/components/Notification/Contribution/Contribution.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Contribution/Contribution.js +25 -25
- package/lib/cjs/components/Notification/Contribution/Contribution.js.map +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -21
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts.map +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +18 -19
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js.map +1 -1
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts +2 -21
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts.map +1 -1
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +17 -18
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js.map +1 -1
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +2 -21
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts.map +1 -1
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +16 -19
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js.map +1 -1
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -21
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts.map +1 -1
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +9 -10
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js.map +1 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -21
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts.map +1 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +16 -17
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js.map +1 -1
- package/lib/cjs/components/Notification/Mention/Mention.d.ts +2 -21
- package/lib/cjs/components/Notification/Mention/Mention.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Mention/Mention.js +18 -19
- package/lib/cjs/components/Notification/Mention/Mention.js.map +1 -1
- package/lib/cjs/components/Notification/Notification.d.ts +12 -12
- package/lib/cjs/components/Notification/Notification.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Notification.js +33 -86
- package/lib/cjs/components/Notification/Notification.js.map +1 -1
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -21
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts.map +1 -1
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +11 -20
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js.map +1 -1
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -21
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts.map +1 -1
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +16 -17
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js.map +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts +2 -21
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts.map +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +10 -11
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js.map +1 -1
- package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts +2 -21
- package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts.map +1 -1
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +12 -13
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js.map +1 -1
- package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts +2 -21
- package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts.map +1 -1
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +10 -11
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js.map +1 -1
- package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts +2 -21
- package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts.map +1 -1
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +16 -17
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js.map +1 -1
- package/lib/cjs/components/SnippetNotifications/Skeleton.d.ts +1 -1
- package/lib/cjs/components/SnippetNotifications/Skeleton.d.ts.map +1 -1
- package/lib/cjs/components/SnippetNotifications/Skeleton.js +5 -12
- package/lib/cjs/components/SnippetNotifications/Skeleton.js.map +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.d.ts +2 -2
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.d.ts.map +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +7 -21
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js.map +1 -1
- package/lib/cjs/shared/CustomSnackMessage/index.d.ts.map +1 -1
- package/lib/cjs/shared/CustomSnackMessage/index.js +5 -19
- package/lib/cjs/shared/CustomSnackMessage/index.js.map +1 -1
- package/lib/cjs/shared/NotificationItem/NotificationItem.d.ts +1 -6
- package/lib/cjs/shared/NotificationItem/NotificationItem.d.ts.map +1 -1
- package/lib/cjs/shared/NotificationItem/NotificationItem.js +13 -123
- package/lib/cjs/shared/NotificationItem/NotificationItem.js.map +1 -1
- package/lib/esm/components/FeedObject/FeedObject.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/FeedObject.js +0 -1
- package/lib/esm/components/FeedObject/FeedObject.js.map +1 -1
- package/lib/esm/components/FeedUpdates/FeedUpdates.d.ts.map +1 -1
- package/lib/esm/components/FeedUpdates/FeedUpdates.js +0 -1
- package/lib/esm/components/FeedUpdates/FeedUpdates.js.map +1 -1
- package/lib/esm/components/NavigationToolbar/NotificationMenu.d.ts.map +1 -1
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +6 -3
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js.map +1 -1
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -21
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts.map +1 -1
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +15 -16
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js.map +1 -1
- package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -21
- package/lib/esm/components/Notification/Comment/Comment.d.ts.map +1 -1
- package/lib/esm/components/Notification/Comment/Comment.js +24 -25
- package/lib/esm/components/Notification/Comment/Comment.js.map +1 -1
- package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -21
- package/lib/esm/components/Notification/Contribution/Contribution.d.ts.map +1 -1
- package/lib/esm/components/Notification/Contribution/Contribution.js +26 -26
- package/lib/esm/components/Notification/Contribution/Contribution.js.map +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -21
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts.map +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +19 -20
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js.map +1 -1
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts +2 -21
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts.map +1 -1
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +17 -18
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js.map +1 -1
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +2 -21
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts.map +1 -1
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +17 -20
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js.map +1 -1
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -21
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts.map +1 -1
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +9 -10
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js.map +1 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -21
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts.map +1 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +16 -17
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js.map +1 -1
- package/lib/esm/components/Notification/Mention/Mention.d.ts +2 -21
- package/lib/esm/components/Notification/Mention/Mention.d.ts.map +1 -1
- package/lib/esm/components/Notification/Mention/Mention.js +18 -19
- package/lib/esm/components/Notification/Mention/Mention.js.map +1 -1
- package/lib/esm/components/Notification/Notification.d.ts +12 -12
- package/lib/esm/components/Notification/Notification.d.ts.map +1 -1
- package/lib/esm/components/Notification/Notification.js +35 -88
- package/lib/esm/components/Notification/Notification.js.map +1 -1
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -21
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts.map +1 -1
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +11 -20
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js.map +1 -1
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -21
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts.map +1 -1
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +17 -18
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js.map +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts +2 -21
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts.map +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +11 -12
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js.map +1 -1
- package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts +2 -21
- package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts.map +1 -1
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +13 -14
- package/lib/esm/components/Notification/UserConnection/UserConnection.js.map +1 -1
- package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts +2 -21
- package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts.map +1 -1
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +11 -12
- package/lib/esm/components/Notification/UserFollow/UserFollow.js.map +1 -1
- package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts +2 -21
- package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts.map +1 -1
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +17 -18
- package/lib/esm/components/Notification/VoteUp/VoteUp.js.map +1 -1
- package/lib/esm/components/SnippetNotifications/Skeleton.d.ts +1 -1
- package/lib/esm/components/SnippetNotifications/Skeleton.d.ts.map +1 -1
- package/lib/esm/components/SnippetNotifications/Skeleton.js +6 -13
- package/lib/esm/components/SnippetNotifications/Skeleton.js.map +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.d.ts +2 -2
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.d.ts.map +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +7 -21
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js.map +1 -1
- package/lib/esm/shared/CustomSnackMessage/index.d.ts.map +1 -1
- package/lib/esm/shared/CustomSnackMessage/index.js +5 -19
- package/lib/esm/shared/CustomSnackMessage/index.js.map +1 -1
- package/lib/esm/shared/NotificationItem/NotificationItem.d.ts +1 -6
- package/lib/esm/shared/NotificationItem/NotificationItem.d.ts.map +1 -1
- package/lib/esm/shared/NotificationItem/NotificationItem.js +13 -123
- package/lib/esm/shared/NotificationItem/NotificationItem.js.map +1 -1
- package/lib/umd/react-ui.js +3 -3
- package/lib/umd/react-ui.js.LICENSE.txt +2 -2
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationPrivateMessageType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationPrivateMessageProps {
|
|
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 NotificationPrivateMessageProps 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: SCNotificationPrivateMessageType;
|
|
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 private message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessage.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAC,gCAAgC,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"PrivateMessage.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAC,gCAAgC,EAAC,MAAM,sBAAsB,CAAC;AAMtE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAkFzF,MAAM,WAAW,+BACf,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,gCAAgC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,OAAO,EAAE,+BAA+B,GAAG,GAAG,CAAC,OAAO,CAwJxG"}
|
|
@@ -54,7 +54,7 @@ const messages = (0, react_intl_1.defineMessages)({
|
|
|
54
54
|
defaultMessage: 'ui.notification.receivePrivateMessage'
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
const PREFIX = '
|
|
57
|
+
const PREFIX = 'SCNotificationPrivateMessage';
|
|
58
58
|
const classes = {
|
|
59
59
|
root: `${PREFIX}-root`,
|
|
60
60
|
avatar: `${PREFIX}-avatar`,
|
|
@@ -66,7 +66,7 @@ const classes = {
|
|
|
66
66
|
messageWrap: `${PREFIX}-message-wrap`,
|
|
67
67
|
message: `${PREFIX}-message`
|
|
68
68
|
};
|
|
69
|
-
const Root = (0, styles_1.styled)(
|
|
69
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
70
70
|
name: PREFIX,
|
|
71
71
|
slot: 'Root',
|
|
72
72
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -154,12 +154,9 @@ function PrivateMessageNotification(inProps) {
|
|
|
154
154
|
setFollower(scFollowersManager.isFollower(notificationObject.message.sender));
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
|
-
|
|
158
|
-
* Renders content
|
|
159
|
-
*/
|
|
160
|
-
let content;
|
|
157
|
+
// RENDER
|
|
161
158
|
if (isSnippetTemplate || isToastTemplate) {
|
|
162
|
-
|
|
159
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.message.sender) },
|
|
163
160
|
react_1.default.createElement(material_1.Avatar, { alt: notificationObject.message.sender.username, variant: "circular", src: notificationObject.message.sender.avatar, classes: { root: classes.avatar } })), primary: react_1.default.createElement(react_1.default.Fragment, null,
|
|
164
161
|
isToastTemplate && (react_1.default.createElement(material_1.Box, null,
|
|
165
162
|
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.message.sender) }, notificationObject.message.sender.username),
|
|
@@ -176,22 +173,16 @@ function PrivateMessageNotification(inProps) {
|
|
|
176
173
|
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender), className: classes.messageLabel }, intl.formatMessage(messages.receivePrivateMessage, {
|
|
177
174
|
total: 1,
|
|
178
175
|
b: (...chunks) => react_1.default.createElement("strong", null, chunks)
|
|
179
|
-
})))))), footer:
|
|
176
|
+
})))))), footer: isToastTemplate && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
180
177
|
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
181
178
|
react_1.default.createElement(material_1.Typography, { color: "primary" },
|
|
182
|
-
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, scUserContext.user && follower ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage: 'ui.userToastNotifications.replyMessage' })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewMessage", defaultMessage: 'ui.userToastNotifications.viewMessage' }))))))
|
|
179
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, scUserContext.user && follower ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage: 'ui.userToastNotifications.replyMessage' })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewMessage", defaultMessage: 'ui.userToastNotifications.viewMessage' })))))) }, rest)));
|
|
183
180
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
react_1.default.createElement(
|
|
189
|
-
react_1.default.createElement(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.message.message } }))) }));
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Renders root object
|
|
193
|
-
*/
|
|
194
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`) }, rest), content));
|
|
181
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
182
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }),
|
|
183
|
+
react_1.default.createElement(lab_1.LoadingButton, { color: 'primary', variant: "outlined", size: "small", classes: { root: classes.replyButton }, component: react_core_1.Link, loading: scUserContext.user ? follower === null || scFollowersManager.isLoading(notificationObject.message.sender) : null, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, scUserContext.user && follower ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.privateMessage.btnReplyLabel", defaultMessage: "ui.notification.privateMessage.btnReplyLabel" })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.privateMessage.btnViewLabel", defaultMessage: "ui.notification.privateMessage.btnViewLabel" })))), primary: react_1.default.createElement(material_1.Box, { className: classes.messageWrap },
|
|
184
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender), className: classes.message },
|
|
185
|
+
react_1.default.createElement(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.message.message } }))) }, rest)));
|
|
195
186
|
}
|
|
196
187
|
exports.default = PrivateMessageNotification;
|
|
197
188
|
//# sourceMappingURL=PrivateMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessage.js","sourceRoot":"","sources":["../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA6D;AAC7D,iDAA4C;AAC5C,4CAAqE;AACrE,0DAQmC;AAEnC,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"PrivateMessage.js","sourceRoot":"","sources":["../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA6D;AAC7D,iDAA4C;AAC5C,4CAAqE;AACrE,0DAQmC;AAEnC,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AACzF,kCAAuC;AAEvC,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,qBAAqB,EAAE;QACrB,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,uCAAuC;KACxD;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,8BAA8B,CAAC;AAE9C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,MAAM,EAAE,GAAG,MAAM,SAAS;IAC1B,OAAO,EAAE,GAAG,MAAM,UAAU;IAC5B,WAAW,EAAE,GAAG,MAAM,eAAe;IACrC,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ForType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationUndeletedProps {
|
|
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 NotificationUndeletedProps 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: SCNotificationUnDeletedForType;
|
|
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 undeleted for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UndeletedFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UndeletedFor/UndeletedFor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAC,8BAA8B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"UndeletedFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UndeletedFor/UndeletedFor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAC,8BAA8B,EAAC,MAAM,sBAAsB,CAAC;AAOpE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAwCzF,MAAM,WAAW,0BACf,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,8BAA8B,CAAC;CACpD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,OAAO,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAkGjG"}
|
|
@@ -37,7 +37,7 @@ const classes = {
|
|
|
37
37
|
contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
|
|
38
38
|
contributionText: `${PREFIX}-contribution-text`
|
|
39
39
|
};
|
|
40
|
-
const Root = (0, styles_1.styled)(
|
|
40
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
41
41
|
name: PREFIX,
|
|
42
42
|
slot: 'Root',
|
|
43
43
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -82,22 +82,21 @@ function UndeletedForNotification(inProps) {
|
|
|
82
82
|
/**
|
|
83
83
|
* Renders root object
|
|
84
84
|
*/
|
|
85
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.undeletedText },
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
react_1.default.createElement(
|
|
93
|
-
|
|
94
|
-
react_1.default.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
react_1.default.createElement(
|
|
99
|
-
react_1.default.createElement(
|
|
100
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
|
|
85
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: react_1.default.createElement(material_1.Avatar, { variant: "circular", classes: { root: classes.undeletedIcon } },
|
|
86
|
+
react_1.default.createElement(Icon_1.default, null, "outlined_flag")), primary: react_1.default.createElement(react_1.default.Fragment, null, isSnippetTemplate ? (react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) },
|
|
87
|
+
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.undeletedText },
|
|
88
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContentSnippet", defaultMessage: "ui.notification.undeletedFor.restoredContentSnippet" })))) : (react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.undeletedText },
|
|
89
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContent", defaultMessage: "ui.notification.undeletedFor.restoredContent" })))), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && (react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
90
|
+
react_1.default.createElement(material_1.Box, { className: classes.contributionWrap },
|
|
91
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } },
|
|
92
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" })),
|
|
93
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText },
|
|
94
|
+
react_1.default.createElement(material_1.Typography, { component: 'span', variant: "body2" }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType])))),
|
|
95
|
+
template === types_1.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
96
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
97
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
98
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) },
|
|
99
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))))) }, rest)));
|
|
101
100
|
}
|
|
102
101
|
exports.default = UndeletedForNotification;
|
|
103
102
|
//# sourceMappingURL=UndeletedFor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UndeletedFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UndeletedFor/UndeletedFor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,8DAAsC;AACtC,iDAAyC;AACzC,0DAA6F;AAE7F,2CAA4C;AAC5C,8DAAsG;AACtG,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"UndeletedFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UndeletedFor/UndeletedFor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;A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tB,qBAAQ,CAAC,GAAG,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,EACxD,IAAA,2BAAY,EAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CACnD,EACD,SAAS,EAAE,OAAO,CAAC,gBAAgB;oBACnC,8BAAC,qBAAU,IAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAC,OAAO,IAC3C,IAAA,qCAAsB,EAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAClD,CACR,CACH;YACL,QAAQ,KAAK,wCAAgC,CAAC,KAAK,IAAI,CACtD,8BAAC,gBAAK,IAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC;gBAClF,8BAAC,qBAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,GAAI;gBACnD,8BAAC,qBAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;oBAC1C,8BAAC,iBAAI,IACH,EAAE,EAAE,gBAAgB,CAAC,GAAG,CACtB,qBAAQ,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,aAAa,CAAC,EACpF,IAAA,2BAAY,EAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CACnD;wBACD,8BAAC,6BAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,CACA,CACJ,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC;AAlGD,2CAkGC"}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationBlockedUserType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationBlockedProps {
|
|
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 NotificationBlockedProps 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: SCNotificationBlockedUserType;
|
|
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 user blocked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserBlocked.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserBlocked/UserBlocked.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,6BAA6B,EAA6B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserBlocked.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserBlocked/UserBlocked.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,6BAA6B,EAA6B,MAAM,sBAAsB,CAAC;AAM/F,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAyCzF,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,6BAA6B,CAAC;CACnD;AACD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CA4D9F"}
|
|
@@ -44,7 +44,7 @@ const classes = {
|
|
|
44
44
|
blockedText: `${PREFIX}-blocked-text`,
|
|
45
45
|
activeAt: `${PREFIX}-active-at`
|
|
46
46
|
};
|
|
47
|
-
const Root = (0, styles_1.styled)(
|
|
47
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
48
48
|
name: PREFIX,
|
|
49
49
|
slot: 'Root',
|
|
50
50
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -78,16 +78,15 @@ function UserBlockedNotification(inProps) {
|
|
|
78
78
|
/**
|
|
79
79
|
* Renders root object
|
|
80
80
|
*/
|
|
81
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at })))) })));
|
|
81
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: react_1.default.createElement(material_1.Avatar, { variant: "circular", classes: {
|
|
82
|
+
root: (0, classnames_1.default)(classes.unBlockedIcon, {
|
|
83
|
+
[classes.blockedIcon]: notificationObject.type === types_1.SCNotificationTypologyType.BLOCKED_USER
|
|
84
|
+
})
|
|
85
|
+
} },
|
|
86
|
+
react_1.default.createElement(Icon_1.default, null, "outlined_flag")), primary: react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.blockedText }, notificationObject.type === types_1.SCNotificationTypologyType.BLOCKED_USER
|
|
87
|
+
? intl.formatMessage(messages.accountBlocked, { b: (...chunks) => react_1.default.createElement("strong", null, chunks) })
|
|
88
|
+
: intl.formatMessage(messages.accountReactivated, { b: (...chunks) => react_1.default.createElement("strong", null, chunks) })), secondary: (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && (react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
89
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }))) }, rest)));
|
|
91
90
|
}
|
|
92
91
|
exports.default = UserBlockedNotification;
|
|
93
92
|
//# sourceMappingURL=UserBlocked.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserBlocked.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserBlocked/UserBlocked.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"UserBlocked.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserBlocked/UserBlocked.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,iDAAgD;AAChD,8DAAsC;AACtC,gDAA+F;AAC/F,2CAAmD;AACnD,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AAEzF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,cAAc,EAAE;QACd,EAAE,EAAE,4CAA4C;QAChD,cAAc,EAAE,4CAA4C;KAC7D;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,gDAAgD;QACp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AC,MAAM,IAAI,QAAQ,KAAK,wCAAgC,CAAC,OAAO,CAAC,IAAI,CACjH,8BAAC,qBAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,GAAI,CACjF,EAEH,MAAM,EACJ,QAAQ,KAAK,wCAAgC,CAAC,KAAK,IAAI,CACrD,8BAAC,gBAAK,IAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC;YAClF,8BAAC,qBAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,GAAI,CAC7C,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC;AA5DD,0CA4DC"}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationConnectionAcceptType, SCNotificationConnectionRequestType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationConnectionProps {
|
|
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 NotificationConnectionProps 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: SCNotificationConnectionRequestType | SCNotificationConnectionAcceptType;
|
|
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 connection accept/request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserConnection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserConnection/UserConnection.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,kCAAkC,EAAE,mCAAmC,EAA6B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserConnection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserConnection/UserConnection.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,kCAAkC,EAAE,mCAAmC,EAA6B,MAAM,sBAAsB,CAAC;AAKzI,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAuCzF,MAAM,WAAW,2BACf,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,mCAAmC,GAAG,kCAAkC,CAAC;CAC9F;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,CAqEpG"}
|
|
@@ -43,7 +43,7 @@ const classes = {
|
|
|
43
43
|
connectionText: `${PREFIX}-connection-text`,
|
|
44
44
|
activeAt: `${PREFIX}-active-at`
|
|
45
45
|
};
|
|
46
|
-
const Root = (0, styles_1.styled)(
|
|
46
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
47
47
|
name: PREFIX,
|
|
48
48
|
slot: 'Root',
|
|
49
49
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -79,18 +79,17 @@ function UserConnectionNotification(inProps) {
|
|
|
79
79
|
/**
|
|
80
80
|
* Renders root object
|
|
81
81
|
*/
|
|
82
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
react_1.default.createElement(
|
|
92
|
-
react_1.default.createElement(
|
|
93
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.goToProfile", defaultMessage: 'ui.userToastNotifications.goToProfile' })))))) })));
|
|
82
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection) },
|
|
83
|
+
react_1.default.createElement(material_1.Avatar, { alt: userConnection.username, variant: "circular", src: userConnection.avatar, classes: { root: classes.avatar } })), primary: react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.connectionText },
|
|
84
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection), className: classes.username }, userConnection.username),
|
|
85
|
+
' ',
|
|
86
|
+
notificationObject.type === types_1.SCNotificationTypologyType.CONNECTION_REQUEST
|
|
87
|
+
? intl.formatMessage(messages.requestConnection, { b: (...chunks) => react_1.default.createElement("strong", null, chunks) })
|
|
88
|
+
: intl.formatMessage(messages.requestConnection, { b: (...chunks) => react_1.default.createElement("strong", null, chunks) })), secondary: (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && (react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
89
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
90
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
91
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection) },
|
|
92
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.goToProfile", defaultMessage: 'ui.userToastNotifications.goToProfile' }))))) }, rest)));
|
|
94
93
|
}
|
|
95
94
|
exports.default = UserConnectionNotification;
|
|
96
95
|
//# sourceMappingURL=UserConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserConnection.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserConnection/UserConnection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,2CAAqE;AACrE,8EAAsD;AACtD,gDAAyI;AACzI,0DAA6F;AAC7F,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"UserConnection.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserConnection/UserConnection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,2CAAqE;AACrE,8EAAsD;AACtD,gDAAyI;AACzI,0DAA6F;AAC7F,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AAEzF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,iBAAiB,EAAE;QACjB,EAAE,EAAE,kDAAkD;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fcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationFollowProps {
|
|
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 NotificationFollowProps 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: SCNotificationUserFollowType;
|
|
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 user follow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserFollow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserFollow/UserFollow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserFollow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/UserFollow/UserFollow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAMlE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAoCzF,MAAM,WAAW,uBACf,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,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAoE5F"}
|
|
@@ -38,7 +38,7 @@ const classes = {
|
|
|
38
38
|
followText: `${PREFIX}-follow-text`,
|
|
39
39
|
activeAt: `${PREFIX}-active-at`
|
|
40
40
|
};
|
|
41
|
-
const Root = (0, styles_1.styled)(
|
|
41
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
42
42
|
name: PREFIX,
|
|
43
43
|
slot: 'Root',
|
|
44
44
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -73,16 +73,15 @@ function UserFollowNotification(inProps) {
|
|
|
73
73
|
/**
|
|
74
74
|
* Renders root object
|
|
75
75
|
*/
|
|
76
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
react_1.default.createElement(
|
|
84
|
-
react_1.default.createElement(
|
|
85
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.goToProfile", defaultMessage: 'ui.userToastNotifications.goToProfile' })))))) })));
|
|
76
|
+
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.follower) },
|
|
77
|
+
react_1.default.createElement(material_1.Avatar, { alt: notificationObject.follower.username, variant: "circular", src: notificationObject.follower.avatar, classes: { root: classes.avatar } })), primary: react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.followText },
|
|
78
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.follower), className: classes.username }, notificationObject.follower.username),
|
|
79
|
+
' ',
|
|
80
|
+
intl.formatMessage(messages.followUser, { b: (...chunks) => react_1.default.createElement("strong", null, chunks) })), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && (react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_1.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
81
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
82
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
83
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.follower) },
|
|
84
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.goToProfile", defaultMessage: 'ui.userToastNotifications.goToProfile' }))))) }, rest)));
|
|
86
85
|
}
|
|
87
86
|
exports.default = UserFollowNotification;
|
|
88
87
|
//# sourceMappingURL=UserFollow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserFollow/UserFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,0DAA6F;AAE7F,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"UserFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/UserFollow/UserFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,0DAA6F;AAE7F,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AAEzF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,UAAU,EAAE;QACV,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,uCAAuC;KACxD;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,0BAA0B,CAAC;AAE1C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,MAAM,EAAE,GAAG,MAAM,SAAS;IAC1B,QAAQ,EAAE,GAAG,MAAM,WAAW;IAC9B,UAAU,EAAE,GAAG,MAAM,cAAc;IACnC,QAAQ,EAAE,GAAG,MAAM,YAAY;CAChC,CAAC;AAEF,MAAM,IAAI,GAAG,IAAA,eAAM,EAAC,0BAAgB,EAAE;IACpC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI;CAClD,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;IACf,KAAK,EAAE,MAAM;IACb,CAAC,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE;QAC1B,UAAU,EAAE,GAAG;QACf,SAAS,EAAE;YACT,cAAc,EAAE,WAAW;SAC5B;KACF;IACD,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE;QAC5B,KAAK,EAAE,KAAK,CAAC,OAA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