@selfcommunity/react-ui 0.11.0-mui7.22 → 0.11.0-mui7.24
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/AccountDataPortability/AccountDataPortability.js +2 -2
- package/lib/cjs/components/AccountDelete/AccountDelete.js +3 -3
- package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
- package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
- package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +5 -5
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +9 -3
- package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/cjs/components/CourseForm/Edit.js +6 -2
- package/lib/cjs/components/Courses/Courses.js +1 -1
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
- package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
- package/lib/cjs/components/EditCourse/Status.js +1 -1
- package/lib/cjs/components/EventForm/EventForm.js +2 -2
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/cjs/components/Events/LocationEventsFilter.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/cjs/components/GroupForm/GroupForm.js +7 -7
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
- package/lib/cjs/components/Incubator/Incubator.js +2 -2
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
- package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/cjs/components/Notification/Course/Course.js +4 -4
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/cjs/components/Notification/Event/Event.js +4 -4
- package/lib/cjs/components/Notification/Group/Group.js +2 -2
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +3 -3
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
- package/lib/cjs/components/Notification/Notification.js +5 -5
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +10 -7
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +1 -1
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +1 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +1 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +3 -3
- package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +1 -1
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
- package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
- package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +6 -7
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +1 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/cjs/shared/DateTimeAgo/index.js +1 -1
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
- package/lib/cjs/shared/Tags/index.js +1 -1
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +2 -2
- package/lib/esm/components/AccountDelete/AccountDelete.js +3 -3
- package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/esm/components/BroadcastMessages/Message.js +1 -1
- package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
- package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +5 -5
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +9 -3
- package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/esm/components/CourseForm/Edit.js +6 -2
- package/lib/esm/components/Courses/Courses.js +1 -1
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
- package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
- package/lib/esm/components/EditCourse/Status.js +1 -1
- package/lib/esm/components/EventForm/EventForm.js +2 -2
- package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/esm/components/Events/LocationEventsFilter.js +1 -1
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/esm/components/GroupForm/GroupForm.js +7 -7
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
- package/lib/esm/components/Incubator/Incubator.js +2 -2
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/esm/components/Notification/Comment/Comment.js +3 -3
- package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/esm/components/Notification/Course/Course.js +4 -4
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/esm/components/Notification/Event/Event.js +4 -4
- package/lib/esm/components/Notification/Group/Group.js +2 -2
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +3 -3
- package/lib/esm/components/Notification/Mention/Mention.js +2 -2
- package/lib/esm/components/Notification/Notification.js +5 -5
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +11 -8
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +1 -1
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +1 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +1 -1
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -4
- package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +1 -1
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
- package/lib/esm/components/UserCounters/UserCounters.js +5 -13
- package/lib/esm/components/UserInfo/UserInfo.js +1 -1
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +1 -1
- package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/esm/shared/DateTimeAgo/index.js +1 -1
- package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
- package/lib/esm/shared/Tags/index.js +1 -1
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
- package/lib/umd/484.js +1 -1
- package/lib/umd/484.js.LICENSE.txt +1 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +10 -10
|
@@ -59,5 +59,5 @@ exports.ParticipantTile =
|
|
|
59
59
|
trackReference.source === livekit_client_1.Track.Source.ScreenShare) ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_react_1.VideoTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe, manageSubscription: autoManageSubscription }) })) : ((0, components_core_1.isTrackReference)(trackReference) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_react_1.AudioTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe }) }))), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "lk-participant-placeholder" }, { children: (0, jsx_runtime_1.jsx)(ParticipantTileAvatar_1.default, { participant: trackReference.participant }) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "lk-participant-metadata" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "lk-participant-metadata-item" }, { children: trackReference.source === livekit_client_1.Track.Source.Camera ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEncrypted && (0, jsx_runtime_1.jsx)(components_react_1.LockLockedIcon, { style: { marginRight: '0.25rem' } }), (0, jsx_runtime_1.jsx)(components_react_1.TrackMutedIndicator, { trackRef: {
|
|
60
60
|
participant: trackReference.participant,
|
|
61
61
|
source: livekit_client_1.Track.Source.Microphone
|
|
62
|
-
}, show:
|
|
62
|
+
}, show: "muted" }), (0, jsx_runtime_1.jsx)(components_react_1.ParticipantName, { children: !disableTileActions && (0, jsx_runtime_1.jsx)(ParticipantTileActions_1.default, {}) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_react_1.ScreenShareIcon, { style: { marginRight: '0.25rem' } }), (0, jsx_runtime_1.jsx)(components_react_1.ParticipantName, { children: "'s screen" })] })) })), (0, jsx_runtime_1.jsx)(components_react_1.ConnectionQualityIndicator, { className: "lk-participant-metadata-item" })] }))] })), !disableTileFocusToggle && (0, jsx_runtime_1.jsx)(components_react_1.FocusToggle, { trackRef: trackReference })] })) })) })));
|
|
63
63
|
});
|
package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js
CHANGED
|
@@ -200,7 +200,7 @@ function ContributionActionsMenu(props) {
|
|
|
200
200
|
*/
|
|
201
201
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_2.IconButton, Object.assign({ ref: (ref) => {
|
|
202
202
|
popperRef.current = ref;
|
|
203
|
-
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" }) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_2.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "right" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_2.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_2.Paper, Object.assign({ variant:
|
|
203
|
+
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" }) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_2.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "right" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_2.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_2.Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: (0, jsx_runtime_1.jsx)(material_2.ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, Object.assign({ open: openConfirmDialog }, (currentAction === constants_1.REMOVE_ROOM_USER
|
|
204
204
|
? {
|
|
205
205
|
content: ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.removeRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.removeRoomUser" }))
|
|
206
206
|
}
|
|
@@ -111,6 +111,6 @@ function LoyaltyProgramWidget(inProps) {
|
|
|
111
111
|
if (loading) {
|
|
112
112
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
113
113
|
}
|
|
114
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }) })) }), (0, jsx_runtime_1.jsxs)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.points }, { children: [(0, jsx_runtime_1.jsx)(material_1.Chip, { size:
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }) })) }), (0, jsx_runtime_1.jsxs)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.points }, { children: [(0, jsx_runtime_1.jsx)(material_1.Chip, { size: "medium", component: "span", label: points }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.loyaltyProgramWidget.points", defaultMessage: "ui.loyaltyProgramWidget.points" })] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", className: classes.discoverMore, component: react_core_2.Link, to: scRoutingContext.url(react_core_2.SCRoutes.LOYALTY_ROUTE_NAME, {}) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.loyaltyProgramWidget.discover", defaultMessage: "ui.loyaltyProgramWidget.discover" }) }))] }))] })));
|
|
115
115
|
}
|
|
116
116
|
exports.default = LoyaltyProgramWidget;
|
|
@@ -43,6 +43,6 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
43
43
|
*
|
|
44
44
|
*/
|
|
45
45
|
function LoyaltyProgramWidgetSkeleton() {
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, Object.assign({ className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: "40%", variant: "rectangular" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.points }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 60, height: 30, className: classes.chip }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 90, variant: "rectangular" })] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: true, variant:
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, Object.assign({ className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: "40%", variant: "rectangular" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.points }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 60, height: 30, className: classes.chip }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 90, variant: "rectangular" })] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: true, variant: "outlined", size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 70, variant: "text" }) }))] }))] })));
|
|
47
47
|
}
|
|
48
48
|
exports.default = LoyaltyProgramWidgetSkeleton;
|
|
@@ -65,6 +65,8 @@ function CollapsedForNotification(props) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Renders root object
|
|
67
67
|
*/
|
|
68
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.collapsedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.collapsedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.collapsedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.collapsedFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
69
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, `${messages[(0, utils_1.camelCase)(notificationObject.type)]}.b`)
|
|
70
|
+
}) }))) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "inherit", component: "div", classes: { root: classes.contributionYouWroteLabel } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.collapsedFor.youWrote", defaultMessage: "ui.notification.collapsedFor.youWrote" }) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body2", gutterBottom: true }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))] })), template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] })))] })) }, rest)));
|
|
69
71
|
}
|
|
70
72
|
exports.default = CollapsedForNotification;
|
|
@@ -67,10 +67,10 @@ function CommentNotification(props) {
|
|
|
67
67
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.comment.author)
|
|
68
68
|
}), { onClick: notificationObject.comment.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.comment.author.username })), ' ', notificationObject.type === types_1.SCNotificationTypologyType.NESTED_COMMENT
|
|
69
69
|
? intl.formatMessage(messages.nestedComment, {
|
|
70
|
-
b: (
|
|
70
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.comment.nestedComment.b")
|
|
71
71
|
})
|
|
72
72
|
: intl.formatMessage(messages.comment, {
|
|
73
|
-
b: (
|
|
74
|
-
})] }), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(notificationObject.comment)) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject.comment) })) })), (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(Bullet_1.default, { className: classes.bullet }), (0, jsx_runtime_1.jsx)(VoteButton_1.default, { className: classes.voteButton, variant: "text", size: "small", contributionId: notificationObject.comment.id, contributionType: types_1.SCContributionType.COMMENT, contribution: notificationObject.comment, onVote: handleVote })] })))] }), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component:
|
|
73
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.comment.comment.b")
|
|
74
|
+
})] }), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(notificationObject.comment)) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject.comment) })) })), (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(Bullet_1.default, { className: classes.bullet }), (0, jsx_runtime_1.jsx)(VoteButton_1.default, { className: classes.voteButton, variant: "text", size: "small", contributionId: notificationObject.comment.id, contributionType: types_1.SCContributionType.COMMENT, contribution: notificationObject.comment, onVote: handleVote })] })))] }), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(notificationObject.comment)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
75
75
|
}
|
|
76
76
|
exports.default = CommentNotification;
|
|
@@ -81,6 +81,6 @@ function ContributionNotification(props) {
|
|
|
81
81
|
: intl.formatMessage(messages.discussionSnippet) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: notificationObject[contributionType]['type'] === types_1.SCContributionType.POST ||
|
|
82
82
|
notificationObject[contributionType]['type'] === types_1.SCContributionType.STATUS
|
|
83
83
|
? intl.formatMessage(messages.postOrStatus, { contribution: notificationObject[contributionType]['type'] })
|
|
84
|
-
: intl.formatMessage(messages.discussion) }))] }), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [template === types_2.SCNotificationObjectTemplateType.SNIPPET && ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText, component:
|
|
84
|
+
: intl.formatMessage(messages.discussion) }))] }), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [template === types_2.SCNotificationObjectTemplateType.SNIPPET && ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText, component: "div" }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))), template === types_2.SCNotificationObjectTemplateType.DETAIL && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(Bullet_1.default, { className: classes.bullet }), (0, jsx_runtime_1.jsx)(VoteButton_1.default, { className: classes.voteButton, variant: "text", size: "small", contributionId: notificationObject[contributionType].id, contributionType: contributionType, contribution: notificationObject[contributionType], onVote: handleVote })] }))), template === types_2.SCNotificationObjectTemplateType.SNIPPET && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }))] }), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
85
85
|
}
|
|
86
86
|
exports.default = ContributionNotification;
|
|
@@ -52,7 +52,7 @@ function ContributionFollowNotification(props) {
|
|
|
52
52
|
* Renders root object
|
|
53
53
|
*/
|
|
54
54
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user) }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "span", color: "inherit", className: classes.followText }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user) }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', intl.formatMessage(messages.contributionFollow, {
|
|
55
|
-
b: (
|
|
56
|
-
})] })), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [template === types_1.SCNotificationObjectTemplateType.SNIPPET && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) })) })), (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }) }))] }), footer: template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component:
|
|
55
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.contributionFollow.follow.b")
|
|
56
|
+
})] })), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [template === types_1.SCNotificationObjectTemplateType.SNIPPET && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) })) })), (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }) }))] }), footer: template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
57
57
|
}
|
|
58
58
|
exports.default = ContributionFollowNotification;
|
|
@@ -58,11 +58,11 @@ function CourseNotification(props) {
|
|
|
58
58
|
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
59
59
|
? notificationObject.comment.lesson_name
|
|
60
60
|
: notificationObject.course.name,
|
|
61
|
-
link: (
|
|
61
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
62
62
|
? react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME
|
|
63
63
|
: react_core_1.SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
64
64
|
? (0, utils_1.formatLessonUrl)(notificationObject)
|
|
65
|
-
: notificationObject.course) }, { children: chunks })))
|
|
65
|
+
: notificationObject.course) }, { children: chunks }), `ui.notification.course.${notificationObject.type}.link`))
|
|
66
66
|
} })] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url((0, utils_1.getRouteName)(notificationObject), (0, utils_1.getRouteParams)(notificationObject)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) })) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
67
67
|
}
|
|
68
68
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
@@ -73,11 +73,11 @@ function CourseNotification(props) {
|
|
|
73
73
|
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
74
74
|
? notificationObject.comment.lesson_name
|
|
75
75
|
: notificationObject.course.name,
|
|
76
|
-
link: (
|
|
76
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
77
77
|
? react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME
|
|
78
78
|
: react_core_1.SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
79
79
|
? (0, utils_1.formatLessonUrl)(notificationObject)
|
|
80
|
-
: notificationObject.course) }, { children: chunks })))
|
|
80
|
+
: notificationObject.course) }, { children: chunks }), `ui.notification.course.${notificationObject.type}.link`))
|
|
81
81
|
} }), notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : ((0, jsx_runtime_1.jsx)(Course_1.default, { course: notificationObject.course, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), template: types_2.SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, to: scRoutingContext.url((0, utils_1.getRouteName)(notificationObject), (0, utils_1.getRouteParams)(notificationObject)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
82
82
|
}
|
|
83
83
|
exports.default = CourseNotification;
|
|
@@ -47,7 +47,7 @@ const classes = {
|
|
|
47
47
|
const Root = (0, material_1.styled)(NotificationItem_1.default, {
|
|
48
48
|
name: constants_1.PREFIX,
|
|
49
49
|
slot: 'DeletedForRoot',
|
|
50
|
-
overridesResolver: (
|
|
50
|
+
overridesResolver: (_props, styles) => styles.root
|
|
51
51
|
})(() => ({}));
|
|
52
52
|
/**
|
|
53
53
|
* This component render the content of the notification of type deleted for
|
|
@@ -67,6 +67,8 @@ function DeletedForNotification(props) {
|
|
|
67
67
|
/**
|
|
68
68
|
* Renders root object
|
|
69
69
|
*/
|
|
70
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(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` }) })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [template === types_1.SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && (0, jsx_runtime_1.jsx)(NewChip_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(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` }) })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [template === types_1.SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && (0, jsx_runtime_1.jsx)(NewChip_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
71
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, `${messages[(0, utils_1.camelCase)(notificationObject.type)]}.b`)
|
|
72
|
+
}) }))] })) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "inherit", classes: { root: classes.contributionYouWroteLabel } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.deletedFor.youWrote", defaultMessage: "ui.notification.deletedFor.youWrote" }) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", color: "inherit", variant: "body2" }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))] })), template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] })))] })) }, rest)));
|
|
71
73
|
}
|
|
72
74
|
exports.default = DeletedForNotification;
|
|
@@ -62,9 +62,9 @@ function EventNotification(props) {
|
|
|
62
62
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
63
63
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
64
64
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.${notificationObject.type}`, defaultMessage: `ui.notification.event.${notificationObject.type}`, values: {
|
|
65
|
-
icon: (
|
|
65
|
+
icon: (chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, `ui.notification.event.${notificationObject.type}.icon`),
|
|
66
66
|
event: notificationObject.event.name,
|
|
67
|
-
link: (
|
|
67
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }), `ui.notification.event.${notificationObject.type}.link`))
|
|
68
68
|
} })] }), secondary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.dateTime", defaultMessage: "ui.notification.event.dateTime", values: {
|
|
69
69
|
date: intl.formatDate(notificationObject.event.start_date, {
|
|
70
70
|
weekday: 'long',
|
|
@@ -80,9 +80,9 @@ function EventNotification(props) {
|
|
|
80
80
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
81
81
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
82
82
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
83
|
-
icon: (
|
|
83
|
+
icon: (chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, `ui.notification.${notificationObject.type}.icon`),
|
|
84
84
|
event: notificationObject.event.name,
|
|
85
|
-
link: (
|
|
85
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }), `ui.notification.${notificationObject.type}.link`))
|
|
86
86
|
} }), (0, jsx_runtime_1.jsx)(Event_1.default, { event: notificationObject.event, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({}, (notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
|
|
87
87
|
disabled: disabled
|
|
88
88
|
}), { loading: loading, color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton } }, (notificationObject.type !== types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
|
|
@@ -55,10 +55,10 @@ function GroupNotification(props) {
|
|
|
55
55
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
56
56
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
57
57
|
group: notificationObject.group.name,
|
|
58
|
-
link: (
|
|
58
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
|
|
59
59
|
notificationObject.type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP
|
|
60
60
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
|
|
61
|
-
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: chunks })))
|
|
61
|
+
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: chunks }), `ui.notification.${notificationObject.type}.link`))
|
|
62
62
|
} })] }), footer: isToastTemplate && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), status && status !== types_1.SCGroupSubscriptionStatusType.SUBSCRIBED && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
|
|
63
63
|
notificationObject.type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP
|
|
64
64
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
|
|
@@ -42,10 +42,10 @@ function IncubatorApprovedNotification(props) {
|
|
|
42
42
|
*/
|
|
43
43
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.incubator.approved_category.name, src: notificationObject.incubator.approved_category.image_medium, variant: "square", classes: { root: classes.categoryIcon } }), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.categoryApprovedText, color: "inherit" }, { children: intl.formatMessage(messages.incubatorApproved, {
|
|
44
44
|
name: notificationObject.incubator.name,
|
|
45
|
-
b: (
|
|
45
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.incubatorApproved.approved.b.1")
|
|
46
46
|
}) })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [template === types_1.SCNotificationObjectTemplateType.DETAIL && notificationObject.is_new && (0, jsx_runtime_1.jsx)(NewChip_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.categoryApprovedText, color: "inherit" }, { children: intl.formatMessage(messages.incubatorApproved, {
|
|
47
47
|
name: notificationObject.incubator.name,
|
|
48
|
-
b: (
|
|
49
|
-
}) }))] })) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_1.SCNotificationObjectTemplateType.DETAIL ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category), className: classes.viewIncubatorButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id:
|
|
48
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.incubatorApproved.approved.b.2")
|
|
49
|
+
}) }))] })) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_1.SCNotificationObjectTemplateType.DETAIL ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator.approved_category), className: classes.viewIncubatorButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.incubatorApproved.viewIncubator", defaultMessage: "ui.notification.incubatorApproved.viewIncubator" }) }))) : template === types_1.SCNotificationObjectTemplateType.TOAST ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, notificationObject.incubator) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.incubatorApproved.viewIncubator", defaultMessage: "ui.userToastNotifications.incubatorApproved.viewIncubator" }) })) }))] }))) : null }, rest)));
|
|
50
50
|
}
|
|
51
51
|
exports.default = IncubatorApprovedNotification;
|
|
@@ -49,6 +49,8 @@ function KindlyNoticeFlagNotification(props) {
|
|
|
49
49
|
/**
|
|
50
50
|
* Renders root object
|
|
51
51
|
*/
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet`, defaultMessage: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet`, defaultMessage: `ui.notification.kindlyNoticeFlag.kindlyNoticeFlagSnippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
53
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, `${messages[(0, utils_1.camelCase)(notificationObject.type)]}.b`)
|
|
54
|
+
}) }))) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: !isSnippetTemplate && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "inherit", component: "div", classes: { root: classes.contributionYouWroteLabel } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" }) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body2" }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))] }))) }, rest)));
|
|
53
55
|
}
|
|
54
56
|
exports.default = KindlyNoticeFlagNotification;
|
|
@@ -69,8 +69,10 @@ function KindlyNoticeForNotification(props) {
|
|
|
69
69
|
/**
|
|
70
70
|
* Renders root object
|
|
71
71
|
*/
|
|
72
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.kindlyNoticeFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.kindlyNoticeFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.flagIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.kindlyNoticeFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet`, defaultMessage: `ui.notification.kindlyNoticeFor.${(0, utils_1.camelCase)(notificationObject.type)}Snippet` }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.flagText }, { children: intl.formatMessage(messages[(0, utils_1.camelCase)(notificationObject.type)], {
|
|
73
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, `${messages[(0, utils_1.camelCase)(notificationObject.type)]}.b`)
|
|
74
|
+
}) }))) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "inherit", component: "div", classes: { root: classes.contributionYouWroteLabel } }, { children: intl.formatMessage(messages.youWrote, {
|
|
75
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.kindlyNoticeFor.youWrote.b")
|
|
76
|
+
}) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body2" }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))] })), template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] })))] })) }, rest)));
|
|
75
77
|
}
|
|
76
78
|
exports.default = KindlyNoticeForNotification;
|
|
@@ -52,9 +52,9 @@ function LiveStreamNotification(props) {
|
|
|
52
52
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
53
53
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
54
54
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
|
|
55
|
-
icon: (
|
|
55
|
+
icon: (chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, `ui.notification.${notificationObject.type}.title.icon`),
|
|
56
56
|
live: notificationObject.live_stream.title,
|
|
57
|
-
link: (
|
|
57
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }), `ui.notification.${notificationObject.type}.title.link`))
|
|
58
58
|
} })] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) })) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
59
59
|
}
|
|
60
60
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
@@ -63,7 +63,7 @@ function LiveStreamNotification(props) {
|
|
|
63
63
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
64
64
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
65
65
|
live: notificationObject.live_stream.title,
|
|
66
|
-
link: (
|
|
66
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }), `ui.notification.${notificationObject.type}.link`))
|
|
67
67
|
} }), (0, jsx_runtime_1.jsx)(LiveStream_1.default, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
68
68
|
}
|
|
69
69
|
exports.default = LiveStreamNotification;
|
|
@@ -57,7 +57,7 @@ function MentionNotification(props) {
|
|
|
57
57
|
}), { onClick: notificationObject[objectType].author.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject[objectType].author.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject[objectType].author.username, variant: "circular", src: notificationObject[objectType].author.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.mentionText }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject[objectType].author.deleted && {
|
|
58
58
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject[objectType].author)
|
|
59
59
|
}), { onClick: notificationObject[objectType].author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject[objectType].author.username })), ' ', intl.formatMessage(messages.quotedYouOn, {
|
|
60
|
-
b: (
|
|
61
|
-
}), ' '] })), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${objectType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[objectType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component:
|
|
60
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.mention.quotedYou.b")
|
|
61
|
+
}), ' '] })), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${objectType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[objectType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[objectType]) })) })), (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }) }))] }), footer: template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contribution.type.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(contribution)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
62
62
|
}
|
|
63
63
|
exports.default = MentionNotification;
|
|
@@ -191,7 +191,7 @@ function UserNotification(inProps) {
|
|
|
191
191
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender)
|
|
192
192
|
}), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: messageNotification.message.sender.username })), ' ', intl.formatMessage(messages.receivePrivateMessage, {
|
|
193
193
|
total: notificationObject.aggregated.length,
|
|
194
|
-
b: (
|
|
194
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.receivePrivateMessage.b")
|
|
195
195
|
})] }) }));
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
@@ -211,10 +211,10 @@ function UserNotification(inProps) {
|
|
|
211
211
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, groupNotification.user)
|
|
212
212
|
}), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: groupNotification.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.aggregated[0].type}`, defaultMessage: `ui.notification.${notificationObject.aggregated[0].type}`, values: {
|
|
213
213
|
group: groupNotification.group.name,
|
|
214
|
-
link: (
|
|
214
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: notificationObject.aggregated[0].type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
|
|
215
215
|
notificationObject.aggregated[0].type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP
|
|
216
216
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MEMBERS_ROUTE_NAME, groupNotification.group)
|
|
217
|
-
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, groupNotification.group) }, { children: chunks })))
|
|
217
|
+
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, groupNotification.group) }, { children: chunks }), `ui.notification.${notificationObject.aggregated[0].type}.link`))
|
|
218
218
|
} })] }) }));
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
@@ -233,7 +233,7 @@ function UserNotification(inProps) {
|
|
|
233
233
|
className: classes.title,
|
|
234
234
|
variant: 'subtitle1'
|
|
235
235
|
}
|
|
236
|
-
}, title: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(contribution), (0, contribution_1.getRouteData)(notificationObject[contribution.type])) }, { children: (0, contribution_1.getContributionSnippet)(contribution) })), action: contribution && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: contribution.suspended ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id:
|
|
236
|
+
}, title: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(contribution), (0, contribution_1.getRouteData)(notificationObject[contribution.type])) }, { children: (0, contribution_1.getContributionSnippet)(contribution) })), action: contribution && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: contribution.suspended ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.notificationSuspended", defaultMessage: "ui.notification.notificationSuspended" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.notificationSuspend", defaultMessage: "ui.notification.notificationSuspend" })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", loading: loadingSuspendNotification, color: "inherit", classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, { children: contribution.suspended ? (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "primary" }, { children: "notifications_off" })) : (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "inherit" }, { children: "notifications_active" })) })) }))) }));
|
|
237
237
|
}
|
|
238
238
|
return null;
|
|
239
239
|
}
|
|
@@ -331,6 +331,6 @@ function UserNotification(inProps) {
|
|
|
331
331
|
/**
|
|
332
332
|
* Renders root object
|
|
333
333
|
*/
|
|
334
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [renderNotificationHeader(), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.unCollapsed }, { children: notificationObject.aggregated.slice(0, showMaxAggregated).map((n, i) => renderAggregatedItem(n, i)) })), notificationObject.aggregated.length > showMaxAggregated && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.ListItemButton, Object.assign({ onClick: setStateAggregated, classes: { root: classes.showOtherAggregated } }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id:
|
|
334
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [renderNotificationHeader(), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.unCollapsed }, { children: notificationObject.aggregated.slice(0, showMaxAggregated).map((n, i) => renderAggregatedItem(n, i)) })), notificationObject.aggregated.length > showMaxAggregated && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.ListItemButton, Object.assign({ onClick: setStateAggregated, classes: { root: classes.showOtherAggregated } }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.showOthers", defaultMessage: "ui.notification.showOthers" }) }), openOtherAggregated ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] })), (0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ in: openOtherAggregated, timeout: "auto", unmountOnExit: true, classes: { root: classes.collapsed } }, { children: notificationObject.aggregated.slice(showMaxAggregated).map((n, i) => renderAggregatedItem(n, i)) }))] }))] }))] })), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
335
335
|
}
|
|
336
336
|
exports.default = UserNotification;
|
|
@@ -82,7 +82,7 @@ function PrivateMessageNotification(props) {
|
|
|
82
82
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.message.sender)
|
|
83
83
|
}), { onClick: notificationObject.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.message.sender.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.message.sender.username, variant: "circular", src: notificationObject.message.sender.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isToastTemplate && ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.message.sender.deleted && {
|
|
84
84
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.message.sender)
|
|
85
|
-
}), { onClick: notificationObject.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: notificationObject.message.sender.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id:
|
|
85
|
+
}), { onClick: notificationObject.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: notificationObject.message.sender.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.privateMessage.sentMessage", defaultMessage: "ui.userToastNotifications.privateMessage.sentMessage" }), ":", (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.messageWrap }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: ((_a = notificationObject.message) === null || _a === void 0 ? void 0 : _a.group)
|
|
86
86
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MESSAGES_ROUTE_NAME, notificationObject.message.group)
|
|
87
87
|
: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender), className: classes.message }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.message.message } }) })) }))] })), isSnippetTemplate && ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "div", color: "inherit" }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.message.sender.deleted && {
|
|
88
88
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.message.sender)
|
|
@@ -90,10 +90,10 @@ function PrivateMessageNotification(props) {
|
|
|
90
90
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MESSAGES_ROUTE_NAME, notificationObject.message.group)
|
|
91
91
|
: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender), className: classes.messageLabel }, { children: intl.formatMessage(messages.receivePrivateMessage, {
|
|
92
92
|
total: 1,
|
|
93
|
-
b: (
|
|
93
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.receivePrivateMessage.b")
|
|
94
94
|
}) }))] })) }))] }), footer: isToastTemplate && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: ((_c = notificationObject.message) === null || _c === void 0 ? void 0 : _c.group)
|
|
95
95
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MESSAGES_ROUTE_NAME, notificationObject.message.group)
|
|
96
|
-
: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, { children: scUserContext.user && follower ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage:
|
|
96
|
+
: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, { children: scUserContext.user && follower ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage: "ui.userToastNotifications.replyMessage" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewMessage", defaultMessage: "ui.userToastNotifications.viewMessage" })) })) }))] }))) }, rest)));
|
|
97
97
|
}
|
|
98
98
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.replyButton }, component: react_core_1.Link, loading: notificationObject.message.sender.deleted
|
|
99
99
|
? null
|
|
@@ -40,6 +40,6 @@ function UndeletedForNotification(props) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Renders root object
|
|
42
42
|
*/
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.undeletedIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.undeletedText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContentSnippet", defaultMessage: "ui.notification.undeletedFor.restoredContentSnippet" }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.undeletedText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContent", defaultMessage: "ui.notification.undeletedFor.restoredContent" }) }))) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant:
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ variant: "circular", classes: { root: classes.undeletedIcon } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSnippetTemplate ? ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.undeletedText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContentSnippet", defaultMessage: "ui.notification.undeletedFor.restoredContentSnippet" }) })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.undeletedText }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.restoredContent", defaultMessage: "ui.notification.undeletedFor.restoredContent" }) }))) }), secondary: (template === types_1.SCNotificationObjectTemplateType.DETAIL || template === types_1.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: isSnippetTemplate ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.contributionWrap }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "inherit", component: "div", classes: { root: classes.contributionYouWroteLabel } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.undeletedFor.youWrote", defaultMessage: "ui.notification.undeletedFor.youWrote" }) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${contributionType.toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])), className: classes.contributionText }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body2" }, { children: (0, contribution_1.getContributionSnippet)(notificationObject[contributionType]) })) }))] })), template === types_1.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, contribution_1.getRouteData)(notificationObject[contributionType])) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: "ui.userToastNotifications.viewContribution" }) })) }))] })))] })) }, rest)));
|
|
44
44
|
}
|
|
45
45
|
exports.default = UndeletedForNotification;
|
|
@@ -49,7 +49,11 @@ function UserBlockedNotification(props) {
|
|
|
49
49
|
[classes.blockedIcon]: notificationObject.type === types_1.SCNotificationTypologyType.BLOCKED_USER
|
|
50
50
|
})
|
|
51
51
|
} }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) })), primary: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.blockedText }, { children: notificationObject.type === types_1.SCNotificationTypologyType.BLOCKED_USER
|
|
52
|
-
? intl.formatMessage(messages.accountBlocked, {
|
|
53
|
-
|
|
52
|
+
? intl.formatMessage(messages.accountBlocked, {
|
|
53
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.userBlocked.accountBlocked.b")
|
|
54
|
+
})
|
|
55
|
+
: intl.formatMessage(messages.accountReactivated, {
|
|
56
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.userBlocked.accountReactivated.b")
|
|
57
|
+
}) })), secondary: (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }) }))) }, rest)));
|
|
54
58
|
}
|
|
55
59
|
exports.default = UserBlockedNotification;
|
|
@@ -55,7 +55,11 @@ function UserConnectionNotification(props) {
|
|
|
55
55
|
* Renders root object
|
|
56
56
|
*/
|
|
57
57
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!userConnection.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection) }), { onClick: userConnection.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !userConnection.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: userConnection.username, variant: "circular", src: userConnection.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "div", color: "inherit", className: classes.connectionText }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!userConnection.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection) }), { onClick: userConnection.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: userConnection.username })), ' ', notificationObject.type === types_1.SCNotificationTypologyType.CONNECTION_REQUEST
|
|
58
|
-
? intl.formatMessage(messages.requestConnection, {
|
|
59
|
-
|
|
58
|
+
? intl.formatMessage(messages.requestConnection, {
|
|
59
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.userConnection.requestConnection.b")
|
|
60
|
+
})
|
|
61
|
+
: intl.formatMessage(messages.acceptConnection, {
|
|
62
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.notification.userConnection.acceptConnection.b")
|
|
63
|
+
})] })), secondary: (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt })), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!userConnection.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, userConnection) }), { onClick: userConnection.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.goToProfile", defaultMessage: "ui.userToastNotifications.goToProfile" }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
60
64
|
}
|
|
61
65
|
exports.default = UserConnectionNotification;
|