@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
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
|
-
import { Avatar,
|
|
14
|
+
import { Avatar, Stack, Tooltip, Typography } from '@mui/material';
|
|
15
15
|
import { SCFeedObjectTypologyType } from '@selfcommunity/types';
|
|
16
16
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
17
17
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
@@ -52,7 +52,7 @@ const classes = {
|
|
|
52
52
|
activeAt: `${PREFIX}-active-at`,
|
|
53
53
|
bullet: `${PREFIX}-bullet`
|
|
54
54
|
};
|
|
55
|
-
const Root = styled(
|
|
55
|
+
const Root = styled(NotificationItem, {
|
|
56
56
|
name: PREFIX,
|
|
57
57
|
slot: 'Root',
|
|
58
58
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -107,29 +107,29 @@ export default function ContributionNotification(inProps) {
|
|
|
107
107
|
/**
|
|
108
108
|
* Renders root object
|
|
109
109
|
*/
|
|
110
|
-
return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
React.createElement(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
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[contributionType].author) },
|
|
111
|
+
React.createElement(Avatar, { alt: notificationObject[contributionType].author.username, variant: "circular", src: notificationObject[contributionType].author.avatar, classes: { root: classes.avatar } })), primary: React.createElement(React.Fragment, null,
|
|
112
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[contributionType].author), className: classes.username }, notificationObject[contributionType].author.username),
|
|
113
|
+
' ',
|
|
114
|
+
template === SCNotificationObjectTemplateType.SNIPPET ? (React.createElement(React.Fragment, null, notificationObject[contributionType]['type'] === SCFeedObjectTypologyType.POST ||
|
|
115
|
+
notificationObject[contributionType]['type'] === SCFeedObjectTypologyType.STATUS
|
|
116
|
+
? intl.formatMessage(messages.postOrStatusSnippet, { contribution: notificationObject[contributionType]['type'] })
|
|
117
|
+
: intl.formatMessage(messages.discussionSnippet))) : (React.createElement(React.Fragment, null, notificationObject[contributionType]['type'] === SCFeedObjectTypologyType.POST ||
|
|
118
|
+
notificationObject[contributionType]['type'] === SCFeedObjectTypologyType.STATUS
|
|
119
|
+
? intl.formatMessage(messages.postOrStatus, { contribution: notificationObject[contributionType]['type'] })
|
|
120
|
+
: intl.formatMessage(messages.discussion)))), secondary: React.createElement(React.Fragment, null,
|
|
121
|
+
template === SCNotificationObjectTemplateType.SNIPPET && (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
122
|
+
React.createElement(Typography, { variant: "body2", className: classes.contributionText, component: 'div' }, getContributionSnippet(notificationObject[contributionType])))),
|
|
123
|
+
template === SCNotificationObjectTemplateType.DETAIL && (React.createElement(Stack, { direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 },
|
|
124
|
+
React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }),
|
|
125
|
+
React.createElement(Bullet, { className: classes.bullet }),
|
|
126
|
+
React.createElement(LoadingButton, { color: 'inherit', size: 'small', classes: { root: classes.voteButton }, variant: 'text', onClick: handleVote, disabled: loadingVote === index, loading: loadingVote === index }, notificationObject[contributionType].voted ? (React.createElement(Tooltip, { title: React.createElement(FormattedMessage, { id: 'ui.notification.contribution.voteDown', defaultMessage: 'ui.notification.contribution.voteDown' }) },
|
|
127
|
+
React.createElement(Icon, { fontSize: 'small', color: 'primary' }, "thumb_up_alt"))) : (React.createElement(Tooltip, { title: React.createElement(FormattedMessage, { id: 'ui.notification.contribution.voteUp', defaultMessage: 'ui.notification.contribution.voteUp' }) },
|
|
128
|
+
React.createElement(Icon, { fontSize: 'small', color: "inherit" }, "thumb_up_off_alt")))))),
|
|
129
|
+
template === SCNotificationObjectTemplateType.SNIPPET && 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 },
|
|
130
|
+
React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
|
|
131
|
+
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
132
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
133
|
+
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))) }, rest)));
|
|
134
134
|
}
|
|
135
135
|
//# sourceMappingURL=Contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contribution.js","sourceRoot":"","sources":["../../../../../src/components/Notification/Contribution/Contribution.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Contribution.js","sourceRoot":"","sources":["../../../../../src/components/Notification/Contribution/Contribution.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,wBAAwB,EAAiC,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAwB,YAAY,EAAC,MAAM,2BA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AAI,EAAE,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,GAAI,CAC3H,EAEnB,MAAM,EACJ,QAAQ,KAAK,gCAAgC,CAAC,KAAK,IAAI,CACrD,oBAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC;YAClF,oBAAC,WAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,GAAI;YACnD,oBAAC,UAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;gBAC1C,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;oBACD,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationVoteUpType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface ContributionFollowProps {
|
|
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 ContributionFollowProps 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: SCNotificationVoteUpType;
|
|
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 follow (contribution)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionFollow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContributionFollow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;AAQ9D,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAgDzF,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,wBAAwB,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CA0FpG"}
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
|
-
import { Avatar,
|
|
14
|
+
import { Avatar, Stack, Typography } from '@mui/material';
|
|
15
15
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
16
16
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
17
17
|
import DateTimeAgo from '../../../shared/DateTimeAgo';
|
|
@@ -35,7 +35,7 @@ const classes = {
|
|
|
35
35
|
activeAt: `${PREFIX}-active-at`,
|
|
36
36
|
contributionText: `${PREFIX}-contribution-text`
|
|
37
37
|
};
|
|
38
|
-
const Root = styled(
|
|
38
|
+
const Root = styled(NotificationItem, {
|
|
39
39
|
name: PREFIX,
|
|
40
40
|
slot: 'Root',
|
|
41
41
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -83,24 +83,23 @@ export default function ContributionFollowNotification(inProps) {
|
|
|
83
83
|
/**
|
|
84
84
|
* Renders root object
|
|
85
85
|
*/
|
|
86
|
-
return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
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.user) },
|
|
87
|
+
React.createElement(Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } })), primary: React.createElement(Typography, { component: "span", color: "inherit", className: classes.followText },
|
|
88
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user), className: classes.username }, notificationObject.user.username),
|
|
89
|
+
' ',
|
|
90
|
+
intl.formatMessage(messages.contributionFollow, {
|
|
91
|
+
b: (...chunks) => React.createElement("strong", null, chunks)
|
|
92
|
+
})), secondary: React.createElement(React.Fragment, null,
|
|
93
|
+
template === SCNotificationObjectTemplateType.SNIPPET && (React.createElement(React.Fragment, null,
|
|
94
|
+
":",
|
|
90
95
|
' ',
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
template === SCNotificationObjectTemplateType.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
template === SCNotificationObjectTemplateType.DETAIL && (React.createElement("div", null,
|
|
100
|
-
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 },
|
|
101
|
-
React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
|
|
102
|
-
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
103
|
-
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
104
|
-
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
|
|
96
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
97
|
+
React.createElement(Typography, { variant: "body2", className: classes.contributionText }, getContributionSnippet(notificationObject[contributionType]))))),
|
|
98
|
+
(template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (React.createElement("div", null,
|
|
99
|
+
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 },
|
|
100
|
+
React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
|
|
101
|
+
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
102
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
103
|
+
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))) }, rest)));
|
|
105
104
|
}
|
|
106
105
|
//# sourceMappingURL=ContributionFollow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ContributionFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAO,KAAK,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAwB,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAE,mBAAmB,EAAE,YAAY,EAAC,MAAM,6BAA6B,C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,gCAAgC,CAAC,KAAK,IAAI,CACrD,oBAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC;YAClF,oBAAC,WAAW,IAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,GAAI;YACnD,oBAAC,UAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;gBAC1C,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;oBACD,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationDeletedForType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationDeletedForProps {
|
|
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 NotificationDeletedForProps 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 deleted for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeletedFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/DeletedFor/DeletedFor.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"DeletedFor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/DeletedFor/DeletedFor.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAIlE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAgEzF,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,4BAA4B,CAAC;CAClD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,CAwGhG"}
|
|
@@ -56,7 +56,7 @@ const classes = {
|
|
|
56
56
|
contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
|
|
57
57
|
contributionText: `${PREFIX}-contribution-text`
|
|
58
58
|
};
|
|
59
|
-
const Root = styled(
|
|
59
|
+
const Root = styled(NotificationItem, {
|
|
60
60
|
name: PREFIX,
|
|
61
61
|
slot: 'Root',
|
|
62
62
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -103,22 +103,21 @@ export default function DeletedForNotification(inProps) {
|
|
|
103
103
|
/**
|
|
104
104
|
* Renders root object
|
|
105
105
|
*/
|
|
106
|
-
return (React.createElement(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
React.createElement(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
React.createElement(
|
|
115
|
-
|
|
116
|
-
React.createElement(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
React.createElement(
|
|
121
|
-
React.createElement(
|
|
122
|
-
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
|
|
106
|
+
return (React.createElement(NotificationItem, 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 } },
|
|
107
|
+
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])) },
|
|
108
|
+
React.createElement(Typography, { component: "div", color: "inherit", className: classes.flagText },
|
|
109
|
+
React.createElement(FormattedMessage, { id: `ui.notification.deletedFor.${camelCase(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.deletedFor.${camelCase(notificationObject.type)}Snippet` })))) : (React.createElement(React.Fragment, null,
|
|
110
|
+
template === SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && React.createElement(NewChip, null),
|
|
111
|
+
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,
|
|
112
|
+
React.createElement(Box, { className: classes.contributionWrap },
|
|
113
|
+
React.createElement(Typography, { variant: 'body2', color: 'inherit', classes: { root: classes.contributionYouWroteLabel } },
|
|
114
|
+
React.createElement(FormattedMessage, { id: "ui.notification.deletedFor.youWrote", defaultMessage: "ui.notification.deletedFor.youWrote" })),
|
|
115
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])), className: classes.contributionText },
|
|
116
|
+
React.createElement(Typography, { component: 'span', color: 'inherit', variant: "body2" }, getContributionSnippet(notificationObject[contributionType])))),
|
|
117
|
+
template === SCNotificationObjectTemplateType.TOAST && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
118
|
+
React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
|
|
119
|
+
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
120
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], getRouteData(notificationObject[contributionType])) },
|
|
121
|
+
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))))) }, rest)));
|
|
123
122
|
}
|
|
124
123
|
//# sourceMappingURL=DeletedFor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeletedFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/DeletedFor/DeletedFor.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,s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AC,CAClD,CACR,CACH;YACL,QAAQ,KAAK,gCAAgC,CAAC,KAAK,IAAI,CACtD,oBAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,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 { SCNotificationIncubatorType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationIncubatorApprovedProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the feedObject
|
|
6
|
-
* @default `n_<notificationObject.feed_serialization_id>`
|
|
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 NotificationIncubatorApprovedProps 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: SCNotificationIncubatorType;
|
|
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
|
export default function IncubatorApprovedNotification(inProps: NotificationIncubatorApprovedProps): JSX.Element;
|
|
30
11
|
//# sourceMappingURL=IncubatorApproved.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncubatorApproved.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,2BAA2B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"IncubatorApproved.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,2BAA2B,EAAC,MAAM,sBAAsB,CAAC;AAQjE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AAmCzF,MAAM,WAAW,kCACf,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,2BAA2B,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,OAAO,EAAE,kCAAkC,GAAG,GAAG,CAAC,OAAO,CAkG9G"}
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
|
-
import { Avatar,
|
|
14
|
+
import { Avatar, Button, Stack, Typography } from '@mui/material';
|
|
15
15
|
import { Link, useSCRouting, SCRoutes } from '@selfcommunity/react-core';
|
|
16
16
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
17
17
|
import DateTimeAgo from '../../../shared/DateTimeAgo';
|
|
@@ -34,7 +34,7 @@ const classes = {
|
|
|
34
34
|
activeAt: `${PREFIX}-active-at`,
|
|
35
35
|
viewIncubatorButton: `${PREFIX}-view-incubator-button`
|
|
36
36
|
};
|
|
37
|
-
const Root = styled(
|
|
37
|
+
const Root = styled(NotificationItem, {
|
|
38
38
|
name: PREFIX,
|
|
39
39
|
slot: 'Root',
|
|
40
40
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -65,23 +65,20 @@ export default function IncubatorApprovedNotification(inProps) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Renders root object
|
|
67
67
|
*/
|
|
68
|
-
return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) },
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
React.createElement(
|
|
83
|
-
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
84
|
-
React.createElement(Link, { to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator) },
|
|
85
|
-
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.incubatorApproved.viewIncubator", defaultMessage: 'ui.userToastNotifications.incubatorApproved.viewIncubator' })))))) })));
|
|
68
|
+
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, { alt: notificationObject.incubator.approved_category.name, src: notificationObject.incubator.approved_category.image_medium, variant: "square", classes: { root: classes.categoryIcon } }), primary: React.createElement(React.Fragment, null, isSnippetTemplate ? (React.createElement(Link, { to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category) },
|
|
69
|
+
React.createElement(Typography, { component: "div", className: classes.categoryApprovedText, color: "inherit" }, intl.formatMessage(messages.incubatorApproved, {
|
|
70
|
+
name: notificationObject.incubator.name,
|
|
71
|
+
b: (...chunks) => React.createElement("strong", null, chunks)
|
|
72
|
+
})))) : (React.createElement(React.Fragment, null,
|
|
73
|
+
template === SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && React.createElement(NewChip, null),
|
|
74
|
+
React.createElement(Typography, { component: "div", className: classes.categoryApprovedText, color: "inherit" }, intl.formatMessage(messages.incubatorApproved, {
|
|
75
|
+
name: notificationObject.incubator.name,
|
|
76
|
+
b: (...chunks) => React.createElement("strong", null, chunks)
|
|
77
|
+
}))))), secondary: (template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (React.createElement(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === SCNotificationObjectTemplateType.DETAIL ? (React.createElement(Button, { component: Link, to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category), className: classes.viewIncubatorButton },
|
|
78
|
+
React.createElement(FormattedMessage, { id: 'ui.notification.incubatorApproved.viewIncubator', defaultMessage: 'ui.notification.incubatorApproved.viewIncubator' }))) : template === SCNotificationObjectTemplateType.TOAST ? (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
79
|
+
React.createElement(DateTimeAgo, { date: notificationObject.active_at }),
|
|
80
|
+
React.createElement(Typography, { color: "primary", component: 'div' },
|
|
81
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator) },
|
|
82
|
+
React.createElement(FormattedMessage, { id: "ui.userToastNotifications.incubatorApproved.viewIncubator", defaultMessage: 'ui.userToastNotifications.incubatorApproved.viewIncubator' }))))) : null }, rest)));
|
|
86
83
|
}
|
|
87
84
|
//# sourceMappingURL=IncubatorApproved.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncubatorApproved.js","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"IncubatorApproved.js","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAO,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAErE,OAAO,EAAC,IAAI,EAAwB,YAAY,EAAE,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,OAAO,MAAM,iCAAiC,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;AAEzF,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,iB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,EAAE,kBAAkB,CAAC,SAAS,GAAI;YACnD,oBAAC,UAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;gBAC1C,oBAAC,IAAI,IAAC,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,SAAS,CAAC;oBACxF,oBAAC,gBAAgB,IACf,EAAE,EAAC,2DAA2D,EAC9D,cAAc,EAAE,2DAA2D,GAC3E,CACG,CACI,CACP,CACT,CAAC,CAAC,CAAC,IAAI,IAEN,IAAI,EACR,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { SCNotificationDeletedForType } from '@selfcommunity/types';
|
|
2
|
-
import {
|
|
3
|
-
export interface NotificationKindlyNoticeFlagProps {
|
|
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 NotificationKindlyNoticeFlagProps 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 flag
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KindlyNoticeFlag.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"KindlyNoticeFlag.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAQlE,OAAyB,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AA+CzF,MAAM,WAAW,iCACf,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,4BAA4B,CAAC,OAAO,EAAE,iCAAiC,GAAG,GAAG,CAAC,OAAO,CAkF5G"}
|