@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
|
@@ -57,7 +57,7 @@ const classes = {
|
|
|
57
57
|
activeAt: `${PREFIX}-active-at`,
|
|
58
58
|
bullet: `${PREFIX}-bullet`
|
|
59
59
|
};
|
|
60
|
-
const Root = (0, styles_1.styled)(
|
|
60
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
61
61
|
name: PREFIX,
|
|
62
62
|
slot: 'Root',
|
|
63
63
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -112,30 +112,30 @@ function ContributionNotification(inProps) {
|
|
|
112
112
|
/**
|
|
113
113
|
* Renders root object
|
|
114
114
|
*/
|
|
115
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
react_1.default.createElement(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
115
|
+
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[contributionType].author) },
|
|
116
|
+
react_1.default.createElement(material_1.Avatar, { alt: notificationObject[contributionType].author.username, variant: "circular", src: notificationObject[contributionType].author.avatar, classes: { root: classes.avatar } })), primary: react_1.default.createElement(react_1.default.Fragment, null,
|
|
117
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[contributionType].author), className: classes.username }, notificationObject[contributionType].author.username),
|
|
118
|
+
' ',
|
|
119
|
+
template === types_2.SCNotificationObjectTemplateType.SNIPPET ? (react_1.default.createElement(react_1.default.Fragment, null, notificationObject[contributionType]['type'] === types_1.SCFeedObjectTypologyType.POST ||
|
|
120
|
+
notificationObject[contributionType]['type'] === types_1.SCFeedObjectTypologyType.STATUS
|
|
121
|
+
? intl.formatMessage(messages.postOrStatusSnippet, { contribution: notificationObject[contributionType]['type'] })
|
|
122
|
+
: intl.formatMessage(messages.discussionSnippet))) : (react_1.default.createElement(react_1.default.Fragment, null, notificationObject[contributionType]['type'] === types_1.SCFeedObjectTypologyType.POST ||
|
|
123
|
+
notificationObject[contributionType]['type'] === types_1.SCFeedObjectTypologyType.STATUS
|
|
124
|
+
? intl.formatMessage(messages.postOrStatus, { contribution: notificationObject[contributionType]['type'] })
|
|
125
|
+
: intl.formatMessage(messages.discussion)))), secondary: react_1.default.createElement(react_1.default.Fragment, null,
|
|
126
|
+
template === types_2.SCNotificationObjectTemplateType.SNIPPET && (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])) },
|
|
127
|
+
react_1.default.createElement(material_1.Typography, { variant: "body2", className: classes.contributionText, component: 'div' }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType])))),
|
|
128
|
+
template === types_2.SCNotificationObjectTemplateType.DETAIL && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 },
|
|
129
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }),
|
|
130
|
+
react_1.default.createElement(Bullet_1.default, { className: classes.bullet }),
|
|
131
|
+
react_1.default.createElement(lab_1.LoadingButton, { color: 'inherit', size: 'small', classes: { root: classes.voteButton }, variant: 'text', onClick: handleVote, disabled: loadingVote === index, loading: loadingVote === index }, notificationObject[contributionType].voted ? (react_1.default.createElement(material_1.Tooltip, { title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'ui.notification.contribution.voteDown', defaultMessage: 'ui.notification.contribution.voteDown' }) },
|
|
132
|
+
react_1.default.createElement(Icon_1.default, { fontSize: 'small', color: 'primary' }, "thumb_up_alt"))) : (react_1.default.createElement(material_1.Tooltip, { title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'ui.notification.contribution.voteUp', defaultMessage: 'ui.notification.contribution.voteUp' }) },
|
|
133
|
+
react_1.default.createElement(Icon_1.default, { fontSize: 'small', color: "inherit" }, "thumb_up_off_alt")))))),
|
|
134
|
+
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 },
|
|
135
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
136
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
137
|
+
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])) },
|
|
138
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))) }, rest)));
|
|
139
139
|
}
|
|
140
140
|
exports.default = ContributionNotification;
|
|
141
141
|
//# sourceMappingURL=Contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contribution.js","sourceRoot":"","sources":["../../../../../src/components/Notification/Contribution/Contribution.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAAsE;AACtE,gDAA8F;AAC9F,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,8DAAsG;AACtG,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"Contribution.js","sourceRoot":"","sources":["../../../../../src/components/Notification/Contribution/Contribution.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAAsE;AACtE,gDAA8F;AAC9F,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AAC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AAC,qBAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,KAAK;gBAC1C,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;oBACD,8BAAC,6BAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC;AA1ID,2CA0IC"}
|
|
@@ -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"}
|
|
@@ -40,7 +40,7 @@ const classes = {
|
|
|
40
40
|
activeAt: `${PREFIX}-active-at`,
|
|
41
41
|
contributionText: `${PREFIX}-contribution-text`
|
|
42
42
|
};
|
|
43
|
-
const Root = (0, styles_1.styled)(
|
|
43
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
44
44
|
name: PREFIX,
|
|
45
45
|
slot: 'Root',
|
|
46
46
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -88,25 +88,24 @@ function ContributionFollowNotification(inProps) {
|
|
|
88
88
|
/**
|
|
89
89
|
* Renders root object
|
|
90
90
|
*/
|
|
91
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
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.user) },
|
|
92
|
+
react_1.default.createElement(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } })), primary: react_1.default.createElement(material_1.Typography, { component: "span", color: "inherit", className: classes.followText },
|
|
93
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user), className: classes.username }, notificationObject.user.username),
|
|
94
|
+
' ',
|
|
95
|
+
intl.formatMessage(messages.contributionFollow, {
|
|
96
|
+
b: (...chunks) => react_1.default.createElement("strong", null, chunks)
|
|
97
|
+
})), secondary: react_1.default.createElement(react_1.default.Fragment, null,
|
|
98
|
+
template === types_1.SCNotificationObjectTemplateType.SNIPPET && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
99
|
+
":",
|
|
95
100
|
' ',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
template === types_1.SCNotificationObjectTemplateType.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
template === types_1.SCNotificationObjectTemplateType.DETAIL && (react_1.default.createElement("div", null,
|
|
105
|
-
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })))), footer: react_1.default.createElement(react_1.default.Fragment, null, template === types_1.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
106
|
-
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
107
|
-
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
108
|
-
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])) },
|
|
109
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
|
|
101
|
+
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])) },
|
|
102
|
+
react_1.default.createElement(material_1.Typography, { variant: "body2", className: classes.contributionText }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]))))),
|
|
103
|
+
(template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && (react_1.default.createElement("div", null,
|
|
104
|
+
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 },
|
|
105
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
106
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
107
|
+
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])) },
|
|
108
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))) }, rest)));
|
|
110
109
|
}
|
|
111
110
|
exports.default = ContributionFollowNotification;
|
|
112
111
|
//# sourceMappingURL=ContributionFollow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAE7D,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,8DAAsG;AACtG,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"ContributionFollow.js","sourceRoot":"","sources":["../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAE7D,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,8DAAsG;AACtG,wCAA0C;AAC1C,wFAAyF;AAEzF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,kBAAkB,EAAE;QAClB,EAAE,EAAE,2CAA2C;QAC/C,cAAc,EAAE,2CAA2C;KAC5D;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,kCAAkC,CAAC;AAElD,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;IAC/B,gBAAgB,EAAE,GAAG,MAAM,oBAAoB;CAChD,CAAC;AAEF,MAAM,IAAI,GAAG,IAAA,eAAM,EAAC,0BA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IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAE,4CAA4C,GAAI,CAC7H,CACI,CACP,CACT,IAEC,IAAI,EACR,CACH,CAAC;AACJ,CAAC;AA1FD,iDA0FC"}
|
|
@@ -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"}
|
|
@@ -61,7 +61,7 @@ const classes = {
|
|
|
61
61
|
contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
|
|
62
62
|
contributionText: `${PREFIX}-contribution-text`
|
|
63
63
|
};
|
|
64
|
-
const Root = (0, styles_1.styled)(
|
|
64
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
65
65
|
name: PREFIX,
|
|
66
66
|
slot: 'Root',
|
|
67
67
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -108,23 +108,22 @@ function DeletedForNotification(inProps) {
|
|
|
108
108
|
/**
|
|
109
109
|
* Renders root object
|
|
110
110
|
*/
|
|
111
|
-
return (react_1.default.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
react_1.default.createElement(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
react_1.default.createElement(
|
|
120
|
-
|
|
121
|
-
react_1.default.createElement(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
react_1.default.createElement(
|
|
126
|
-
react_1.default.createElement(
|
|
127
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' })))))) })));
|
|
111
|
+
return (react_1.default.createElement(NotificationItem_1.default, 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.flagIcon } },
|
|
112
|
+
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])) },
|
|
113
|
+
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.flagText },
|
|
114
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: `ui.notification.deletedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.deletedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet` })))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
115
|
+
template === types_1.SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && react_1.default.createElement(NewChip_1.default, null),
|
|
116
|
+
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], { 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: isSnippetTemplate ? null : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
117
|
+
react_1.default.createElement(material_1.Box, { className: classes.contributionWrap },
|
|
118
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', color: 'inherit', classes: { root: classes.contributionYouWroteLabel } },
|
|
119
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.deletedFor.youWrote", defaultMessage: "ui.notification.deletedFor.youWrote" })),
|
|
120
|
+
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 },
|
|
121
|
+
react_1.default.createElement(material_1.Typography, { component: 'span', color: 'inherit', variant: "body2" }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType])))),
|
|
122
|
+
template === types_1.SCNotificationObjectTemplateType.TOAST && (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
123
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
124
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
125
|
+
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])) },
|
|
126
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }))))))) }, rest)));
|
|
128
127
|
}
|
|
129
128
|
exports.default = DeletedForNotification;
|
|
130
129
|
//# sourceMappingURL=DeletedFor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeletedFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/DeletedFor/DeletedFor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,8DAAsC;AACtC,2CAAqE;AACrE,8DAAsG;AACtG,8EAAsD;AACtD,8EAAsD;AACtD,gDAA+C;AAC/C,0DAA6F;AAE7F,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"DeletedFor.js","sourceRoot":"","sources":["../../../../../src/components/Notification/DeletedFor/DeletedFor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAA6D;AAC7D,8DAAsC;AACtC,2CAAqE;AACrE,8DAAsG;AACtG,8EAAsD;AACtD,8EAAsD;AACtD,gDAA+C;AAC/C,0DAA6F;AAE7F,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AACzF,iDAAyC;AAEzC,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,qBAAqB,EAAE;QACrB,EAAE,EAAE,kDAAkD;QACtD,cAAc,EAAE,kDAAkD;KACnE;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,iDAAiD;QACrD,cAAc,EAAE,iDAAiD;KAClE;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,6CAA6C;QACjD,cAAc,EAAE,6CAA6C;KAC9D;IACD,cAAc,EAAE;QACd,EAAE,EAAE,2CAA2C;QAC/C,cAAc,EAAE,2CAA2C;KAC5D;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,+CAA+C;QACnD,cAAc,EAAE,+CAA+C;KAChE;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,0BAA0B,CAAC;AAE1C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,QAAQ,EAAE,GAAG,MAAM,YAAY;IAC/B,QAAQ,EAAE,GAAG,MAAM,YAAY;IAC/B,QAAQ,EAAE,GAAG,MAAM,YAAY;IAC/B,gBAAgB,EAAE,GAAG,MAAM,oBAAoB;IAC/C,yBAAyB,EAAE,GAAG,MAAM,+BAA+B;IACnE,gBAAgB,EAAE,GAAG,MAAM,oBAAoB;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D,SAAS,EAAE,OAAO,CAAC,gBAAgB;oBACnC,8BAAC,qBAAU,IAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAC,OAAO,IAC7D,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;AAxGD,yCAwGC"}
|
|
@@ -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"}
|
|
@@ -39,7 +39,7 @@ const classes = {
|
|
|
39
39
|
activeAt: `${PREFIX}-active-at`,
|
|
40
40
|
viewIncubatorButton: `${PREFIX}-view-incubator-button`
|
|
41
41
|
};
|
|
42
|
-
const Root = (0, styles_1.styled)(
|
|
42
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
43
43
|
name: PREFIX,
|
|
44
44
|
slot: 'Root',
|
|
45
45
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -70,24 +70,21 @@ function IncubatorApprovedNotification(inProps) {
|
|
|
70
70
|
/**
|
|
71
71
|
* Renders root object
|
|
72
72
|
*/
|
|
73
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`) },
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
react_1.default.createElement(
|
|
88
|
-
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
89
|
-
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator) },
|
|
90
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.incubatorApproved.viewIncubator", defaultMessage: 'ui.userToastNotifications.incubatorApproved.viewIncubator' })))))) })));
|
|
73
|
+
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, { alt: notificationObject.incubator.approved_category.name, src: notificationObject.incubator.approved_category.image_medium, variant: "square", classes: { root: classes.categoryIcon } }), 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.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category) },
|
|
74
|
+
react_1.default.createElement(material_1.Typography, { component: "div", className: classes.categoryApprovedText, color: "inherit" }, intl.formatMessage(messages.incubatorApproved, {
|
|
75
|
+
name: notificationObject.incubator.name,
|
|
76
|
+
b: (...chunks) => react_1.default.createElement("strong", null, chunks)
|
|
77
|
+
})))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
78
|
+
template === types_1.SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && react_1.default.createElement(NewChip_1.default, null),
|
|
79
|
+
react_1.default.createElement(material_1.Typography, { component: "div", className: classes.categoryApprovedText, color: "inherit" }, intl.formatMessage(messages.incubatorApproved, {
|
|
80
|
+
name: notificationObject.incubator.name,
|
|
81
|
+
b: (...chunks) => react_1.default.createElement("strong", null, chunks)
|
|
82
|
+
}))))), 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.DETAIL ? (react_1.default.createElement(material_1.Button, { component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category), className: classes.viewIncubatorButton },
|
|
83
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'ui.notification.incubatorApproved.viewIncubator', defaultMessage: 'ui.notification.incubatorApproved.viewIncubator' }))) : template === types_1.SCNotificationObjectTemplateType.TOAST ? (react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
84
|
+
react_1.default.createElement(DateTimeAgo_1.default, { date: notificationObject.active_at }),
|
|
85
|
+
react_1.default.createElement(material_1.Typography, { color: "primary", component: 'div' },
|
|
86
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator) },
|
|
87
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.incubatorApproved.viewIncubator", defaultMessage: 'ui.userToastNotifications.incubatorApproved.viewIncubator' }))))) : null }, rest)));
|
|
91
88
|
}
|
|
92
89
|
exports.default = IncubatorApprovedNotification;
|
|
93
90
|
//# sourceMappingURL=IncubatorApproved.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncubatorApproved.js","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAAqE;AAErE,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AACtD,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"IncubatorApproved.js","sourceRoot":"","sources":["../../../../../src/components/Notification/IncubatorApproved/IncubatorApproved.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iDAA4C;AAC5C,4CAAqE;AAErE,0DAA6F;AAC7F,2CAAqE;AACrE,8EAAsD;AACtD,8EAAsD;AACtD,4DAAoC;AACpC,0CAAgE;AAChE,wCAA0C;AAC1C,wFAAyF;AAEzF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,iBAAiB,EAAE;QACjB,EAAE,EAAE,4CAA4C;QAChD,cAAc,EAAE,4CAA4C;KAC7D;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,iCAAiC,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,EAAE,KAAK;gBAC1C,8BAAC,iBAAI,IAAC,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,qBAAQ,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,SAAS,CAAC;oBACxF,8BAAC,6BAAgB,IACf,EAAE,EAAC,2DAA2D,EAC9D,cAAc,EAAE,2DAA2D,GAC3E,CACG,CACI,CACP,CACT,CAAC,CAAC,CAAC,IAAI,IAEN,IAAI,EACR,CACH,CAAC;AACJ,CAAC;AAlGD,gDAkGC"}
|
|
@@ -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"}
|
|
@@ -44,7 +44,7 @@ const classes = {
|
|
|
44
44
|
contributionYouWroteLabel: `${PREFIX}-contribution-you-wrote-label`,
|
|
45
45
|
contributionText: `${PREFIX}-contribution-text`
|
|
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
|
|
@@ -90,15 +90,14 @@ function KindlyNoticeFlagNotification(inProps) {
|
|
|
90
90
|
/**
|
|
91
91
|
* Renders root object
|
|
92
92
|
*/
|
|
93
|
-
return (react_1.default.createElement(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${PREFIX}-${template}`)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.flagText },
|
|
97
|
-
|
|
98
|
-
react_1.default.createElement(
|
|
99
|
-
|
|
100
|
-
react_1.default.createElement(
|
|
101
|
-
react_1.default.createElement(material_1.Typography, { component: 'span', variant: "body2", gutterBottom: true }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType])))))) })));
|
|
93
|
+
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.flagIcon } },
|
|
94
|
+
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])) },
|
|
95
|
+
react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.flagText },
|
|
96
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet`, defaultMessage: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet` })))) : (react_1.default.createElement(material_1.Typography, { component: "div", color: "inherit", className: classes.flagText }, intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], { 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: !isSnippetTemplate && (react_1.default.createElement(material_1.Box, { className: classes.contributionWrap },
|
|
97
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', color: 'inherit', component: 'div', classes: { root: classes.contributionYouWroteLabel } },
|
|
98
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" })),
|
|
99
|
+
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 },
|
|
100
|
+
react_1.default.createElement(material_1.Typography, { component: 'span', variant: "body2" }, (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]))))) }, rest)));
|
|
102
101
|
}
|
|
103
102
|
exports.default = KindlyNoticeFlagNotification;
|
|
104
103
|
//# sourceMappingURL=KindlyNoticeFlag.js.map
|