@selfcommunity/react-ui 0.7.0-alpha.351 → 0.7.0-alpha.353
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/ChangePicture/ChangePictureDialog/ChangePictureDialog.d.ts +1 -1
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -6
- package/lib/cjs/components/CommentObject/CommentObject.d.ts +10 -0
- package/lib/cjs/components/CommentObject/CommentObject.js +8 -40
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +19 -10
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +7 -7
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
- package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -2
- package/lib/cjs/components/Notification/Comment/Comment.js +2 -7
- package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -2
- package/lib/cjs/components/Notification/Contribution/Contribution.js +2 -7
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -7
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
- package/lib/cjs/components/Notification/Mention/Mention.d.ts +2 -2
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -7
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -7
- package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts +2 -2
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -7
- package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts +2 -2
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -7
- package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts +2 -2
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -7
- package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
- package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
- package/lib/cjs/components/UserProfileEdit/Section/Account.d.ts +1 -1
- package/lib/cjs/components/UserProfileEdit/Section/Account.js +2 -7
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +1 -6
- package/lib/cjs/components/UserProfileEdit/Section/Settings.d.ts +1 -1
- package/lib/cjs/components/UserProfileEdit/Section/Settings.js +1 -6
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.d.ts +1 -1
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -6
- package/lib/esm/components/CommentObject/CommentObject.d.ts +10 -0
- package/lib/esm/components/CommentObject/CommentObject.js +8 -40
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +22 -13
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +5 -5
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
- package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -2
- package/lib/esm/components/Notification/Comment/Comment.js +2 -7
- package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -2
- package/lib/esm/components/Notification/Contribution/Contribution.js +2 -7
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -7
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
- package/lib/esm/components/Notification/Mention/Mention.d.ts +2 -2
- package/lib/esm/components/Notification/Mention/Mention.js +2 -7
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -7
- package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts +2 -2
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -7
- package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts +2 -2
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -7
- package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts +2 -2
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -7
- package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
- package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
- package/lib/esm/components/UserProfileEdit/Section/Account.d.ts +1 -1
- package/lib/esm/components/UserProfileEdit/Section/Account.js +2 -7
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +1 -6
- package/lib/esm/components/UserProfileEdit/Section/Settings.d.ts +1 -1
- package/lib/esm/components/UserProfileEdit/Section/Settings.js +1 -6
- package/lib/umd/react-ui.js +1 -1
- package/package.json +4 -4
|
@@ -14,7 +14,6 @@ const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog
|
|
|
14
14
|
const ConfirmDialog_1 = tslib_1.__importDefault(require("../../../shared/ConfirmDialog/ConfirmDialog"));
|
|
15
15
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
16
16
|
const CircularProgress_1 = tslib_1.__importDefault(require("@mui/material/CircularProgress"));
|
|
17
|
-
const system_1 = require("@mui/system");
|
|
18
17
|
const seamless_scroll_polyfill_1 = require("seamless-scroll-polyfill");
|
|
19
18
|
const Errors_1 = require("../../../constants/Errors");
|
|
20
19
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -30,12 +29,8 @@ const Root = (0, styles_1.styled)(BaseDialog_1.default, {
|
|
|
30
29
|
name: constants_1.PREFIX,
|
|
31
30
|
slot: 'DialogRoot'
|
|
32
31
|
})(() => ({}));
|
|
33
|
-
function ChangePictureDialog(
|
|
32
|
+
function ChangePictureDialog(props) {
|
|
34
33
|
//PROPS
|
|
35
|
-
const props = (0, system_1.useThemeProps)({
|
|
36
|
-
props: inProps,
|
|
37
|
-
name: constants_1.PREFIX
|
|
38
|
-
});
|
|
39
34
|
const { open, onChange, onClose, className } = props, rest = tslib_1.__rest(props, ["open", "onChange", "onClose", "className"]);
|
|
40
35
|
//CONTEXT
|
|
41
36
|
const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
|
|
@@ -65,6 +65,16 @@ export interface CommentObjectProps {
|
|
|
65
65
|
* @default null
|
|
66
66
|
*/
|
|
67
67
|
onDelete?: (comment: SCCommentType) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Callback on restore the comment
|
|
70
|
+
* @default null
|
|
71
|
+
*/
|
|
72
|
+
onRestore?: (comment: SCCommentType) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback on collapsed the comment
|
|
75
|
+
* @default null
|
|
76
|
+
*/
|
|
77
|
+
onCollapsed?: (comment: SCCommentType) => void;
|
|
68
78
|
/**
|
|
69
79
|
* Show all summary initially (otherwise it will be truncated)
|
|
70
80
|
* @default false
|
|
@@ -94,7 +94,7 @@ function CommentObject(inProps) {
|
|
|
94
94
|
props: inProps,
|
|
95
95
|
name: constants_1.PREFIX
|
|
96
96
|
});
|
|
97
|
-
const { id = `comment_object_${props.commentObjectId ? props.commentObjectId : props.commentObject ? props.commentObject.id : ''}`, className, commentObjectId, commentObject, feedObjectId, feedObject, feedObjectType = types_1.SCContributionType.POST, commentReply, onOpenReply, onDelete, onVote, elevation = 0, truncateContent = false, CommentObjectSkeletonProps = { elevation, WidgetProps: { variant: 'outlined' } }, CommentObjectReplyProps = { elevation, WidgetProps: { variant: 'outlined' } }, linkableCommentDateTime = true, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, CommentsObjectComponentProps = {} } = props, rest = tslib_1.__rest(props, ["id", "className", "commentObjectId", "commentObject", "feedObjectId", "feedObject", "feedObjectType", "commentReply", "onOpenReply", "onDelete", "onVote", "elevation", "truncateContent", "CommentObjectSkeletonProps", "CommentObjectReplyProps", "linkableCommentDateTime", "cacheStrategy", "CommentsObjectComponentProps"]);
|
|
97
|
+
const { id = `comment_object_${props.commentObjectId ? props.commentObjectId : props.commentObject ? props.commentObject.id : ''}`, className, commentObjectId, commentObject, feedObjectId, feedObject, feedObjectType = types_1.SCContributionType.POST, commentReply, onOpenReply, onDelete, onCollapsed, onRestore, onVote, elevation = 0, truncateContent = false, CommentObjectSkeletonProps = { elevation, WidgetProps: { variant: 'outlined' } }, CommentObjectReplyProps = { elevation, WidgetProps: { variant: 'outlined' } }, linkableCommentDateTime = true, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, CommentsObjectComponentProps = {} } = props, rest = tslib_1.__rest(props, ["id", "className", "commentObjectId", "commentObject", "feedObjectId", "feedObject", "feedObjectType", "commentReply", "onOpenReply", "onDelete", "onCollapsed", "onRestore", "onVote", "elevation", "truncateContent", "CommentObjectSkeletonProps", "CommentObjectReplyProps", "linkableCommentDateTime", "cacheStrategy", "CommentsObjectComponentProps"]);
|
|
98
98
|
// CONTEXT
|
|
99
99
|
const scContext = (0, react_core_1.useSCContext)();
|
|
100
100
|
const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
|
|
@@ -212,54 +212,22 @@ function CommentObject(inProps) {
|
|
|
212
212
|
* Handle comment delete
|
|
213
213
|
*/
|
|
214
214
|
function handleDelete(comment) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if (c.id === comment.id) {
|
|
218
|
-
c.deleted = !c.deleted;
|
|
219
|
-
}
|
|
220
|
-
return c;
|
|
221
|
-
});
|
|
222
|
-
updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
const _comment = Object.assign({}, obj, { deleted: !obj.deleted });
|
|
226
|
-
updateObject(Object.assign({}, obj, { deleted: !obj.deleted }));
|
|
227
|
-
onDelete && onDelete(_comment);
|
|
228
|
-
}
|
|
215
|
+
updateObject(comment);
|
|
216
|
+
onDelete && onDelete(comment);
|
|
229
217
|
}
|
|
230
218
|
/**
|
|
231
219
|
* Handle comment delete
|
|
232
220
|
*/
|
|
233
221
|
function handleHide(comment) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (c.id === comment.id) {
|
|
237
|
-
c.collapsed = !c.collapsed;
|
|
238
|
-
}
|
|
239
|
-
return c;
|
|
240
|
-
});
|
|
241
|
-
updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
updateObject(Object.assign({}, obj, { collapsed: !obj.collapsed }));
|
|
245
|
-
}
|
|
222
|
+
updateObject(Object.assign({}, obj, { collapsed: !obj.collapsed }));
|
|
223
|
+
onCollapsed && onCollapsed(comment);
|
|
246
224
|
}
|
|
247
225
|
/**
|
|
248
226
|
* Handle comment restore
|
|
249
227
|
*/
|
|
250
228
|
function handleRestore(comment) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
if (c.id === comment.id) {
|
|
254
|
-
c.deleted = false;
|
|
255
|
-
}
|
|
256
|
-
return c;
|
|
257
|
-
});
|
|
258
|
-
updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
updateObject(Object.assign({}, obj, { deleted: false }));
|
|
262
|
-
}
|
|
229
|
+
updateObject(Object.assign({}, obj, { deleted: false }));
|
|
230
|
+
onRestore && onRestore(comment);
|
|
263
231
|
}
|
|
264
232
|
/**
|
|
265
233
|
* Handle edit comment
|
|
@@ -326,7 +294,7 @@ function CommentObject(inProps) {
|
|
|
326
294
|
*/
|
|
327
295
|
function renderComment(comment) {
|
|
328
296
|
if (comment.deleted &&
|
|
329
|
-
(!scUserContext.user || (scUserContext.user &&
|
|
297
|
+
(!scUserContext.user || (scUserContext.user && !react_core_1.UserUtils.isStaff(scUserContext.user) && scUserContext.user.id !== comment.author.id))) {
|
|
330
298
|
// render the comment if user is logged and is staff (admin, moderator)
|
|
331
299
|
// or the comment author is the logged user
|
|
332
300
|
return null;
|
|
@@ -10,9 +10,9 @@ const react_core_1 = require("@selfcommunity/react-core");
|
|
|
10
10
|
const Editor_1 = tslib_1.__importDefault(require("../Editor"));
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const lab_1 = require("@mui/lab");
|
|
13
|
-
const system_1 = require("@mui/system");
|
|
14
13
|
const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
|
|
15
14
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../shared/UserAvatar"));
|
|
15
|
+
const system_1 = require("@mui/system");
|
|
16
16
|
const PREFIX = 'SCCommentObjectReply';
|
|
17
17
|
const classes = {
|
|
18
18
|
root: `${PREFIX}-root`,
|
|
@@ -26,8 +26,7 @@ const classes = {
|
|
|
26
26
|
};
|
|
27
27
|
const Root = (0, styles_1.styled)(BaseItem_1.default, {
|
|
28
28
|
name: PREFIX,
|
|
29
|
-
slot: 'Root'
|
|
30
|
-
overridesResolver: (props, styles) => styles.root
|
|
29
|
+
slot: 'Root'
|
|
31
30
|
})(() => ({}));
|
|
32
31
|
/**
|
|
33
32
|
*> API documentation for the Community-JS Comment Object Reply component. Learn about the available props and the CSS API.
|
|
@@ -11,7 +11,6 @@ const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
|
11
11
|
const BaseItem_1 = tslib_1.__importDefault(require("../../../../../shared/BaseItem"));
|
|
12
12
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../../../shared/UserDeletedSnackBar"));
|
|
13
13
|
const contribution_1 = require("../../../../../utils/contribution");
|
|
14
|
-
const Feed_1 = require("../../../../../constants/Feed");
|
|
15
14
|
const constants_1 = require("../../../constants");
|
|
16
15
|
const messages = (0, react_intl_1.defineMessages)({
|
|
17
16
|
comment: {
|
|
@@ -39,19 +38,29 @@ function CommentRelevantActivity(props) {
|
|
|
39
38
|
// INTL
|
|
40
39
|
const intl = (0, react_intl_1.useIntl)();
|
|
41
40
|
// RENDER
|
|
42
|
-
const summaryHtmlTruncated =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
41
|
+
// const summaryHtmlTruncated =
|
|
42
|
+
// 'summary_truncated' in activityObject.comment
|
|
43
|
+
// ? activityObject.comment.summary_truncated
|
|
44
|
+
// : activityObject.comment.html.length >= MAX_SUMMARY_LENGTH;
|
|
45
|
+
// const commentHtml = 'summary_html' in activityObject.comment ? activityObject.comment.summary_html : activityObject.comment.summary;
|
|
46
|
+
// const summaryHtml = getContributionHtml(commentHtml, scRoutingContext.url);
|
|
47
47
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
48
48
|
react_1.default.createElement(Root, Object.assign({}, rest, { className: (0, classnames_1.default)(classes.root, className), image: react_1.default.createElement(react_core_1.Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }),
|
|
49
49
|
react_1.default.createElement(material_1.Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar })), primary: react_1.default.createElement(react_1.default.Fragment, null, intl.formatMessage(messages.comment, {
|
|
50
50
|
username: (react_1.default.createElement(react_core_1.Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), activityObject.author.username)),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
link: (...chunks) => react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(activityObject.comment)) }, chunks)
|
|
52
|
+
// comment: (
|
|
53
|
+
// <>
|
|
54
|
+
// <Typography variant="body2" gutterBottom dangerouslySetInnerHTML={{__html: summaryHtml}} />
|
|
55
|
+
// {summaryHtmlTruncated && (
|
|
56
|
+
// <Link
|
|
57
|
+
// to={scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(activityObject.comment))}
|
|
58
|
+
// className={classes.showMoreContent}>
|
|
59
|
+
// <FormattedMessage id="ui.commentObject.showMore" defaultMessage="ui.commentObject.showMore" />
|
|
60
|
+
// </Link>
|
|
61
|
+
// )}
|
|
62
|
+
// </>
|
|
63
|
+
// )
|
|
55
64
|
})), secondary: react_1.default.createElement(DateTimeAgo_1.default, { date: activityObject.active_at }) })),
|
|
56
65
|
openAlert && react_1.default.createElement(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })));
|
|
57
66
|
}
|
|
@@ -23,13 +23,13 @@ export interface FeedObjectMediaPreviewProps extends BoxProps {
|
|
|
23
23
|
import {FeedObjectMediaPreview} from '@selfcommunity/react-ui';
|
|
24
24
|
```
|
|
25
25
|
#### Component Name
|
|
26
|
-
The name `
|
|
26
|
+
The name `SCFeedObjectMediaPreview` can be used when providing style overrides in the theme.
|
|
27
27
|
|
|
28
28
|
#### CSS
|
|
29
29
|
|
|
30
30
|
|Rule Name|Global class|Description|
|
|
31
31
|
|---|---|---|
|
|
32
|
-
|root|.
|
|
32
|
+
|root|.SCFeedObjectMediaPreview-root|Styles applied to the root element.|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
* @param inProps
|
|
@@ -8,13 +8,13 @@ const react_core_1 = require("@selfcommunity/react-core");
|
|
|
8
8
|
const system_1 = require("@mui/system");
|
|
9
9
|
const Media_1 = require("../../shared/Media");
|
|
10
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
|
-
const
|
|
11
|
+
const PREFIX = 'SCFeedObjectMediaPreview';
|
|
12
12
|
const classes = {
|
|
13
|
-
root: `${
|
|
13
|
+
root: `${PREFIX}-root`
|
|
14
14
|
};
|
|
15
15
|
const Root = (0, styles_1.styled)(Box_1.default, {
|
|
16
|
-
name:
|
|
17
|
-
slot: '
|
|
16
|
+
name: PREFIX,
|
|
17
|
+
slot: 'Root'
|
|
18
18
|
})(() => ({}));
|
|
19
19
|
/**
|
|
20
20
|
* > API documentation for the Community-JS FeedObjectMediaPreview component. Learn about the available props and the CSS API.
|
|
@@ -27,13 +27,13 @@ const Root = (0, styles_1.styled)(Box_1.default, {
|
|
|
27
27
|
import {FeedObjectMediaPreview} from '@selfcommunity/react-ui';
|
|
28
28
|
```
|
|
29
29
|
#### Component Name
|
|
30
|
-
The name `
|
|
30
|
+
The name `SCFeedObjectMediaPreview` can be used when providing style overrides in the theme.
|
|
31
31
|
|
|
32
32
|
#### CSS
|
|
33
33
|
|
|
34
34
|
|Rule Name|Global class|Description|
|
|
35
35
|
|---|---|---|
|
|
36
|
-
|root|.
|
|
36
|
+
|root|.SCFeedObjectMediaPreview-root|Styles applied to the root element.|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
* @param inProps
|
|
@@ -42,7 +42,7 @@ exports.default = (inProps) => {
|
|
|
42
42
|
//PROPS
|
|
43
43
|
const props = (0, system_1.useThemeProps)({
|
|
44
44
|
props: inProps,
|
|
45
|
-
name:
|
|
45
|
+
name: PREFIX
|
|
46
46
|
});
|
|
47
47
|
const { className, medias, mediaObjectTypes = [Media_1.File, Media_1.Link, Media_1.Share] } = props, rest = tslib_1.__rest(props, ["className", "medias", "mediaObjectTypes"]);
|
|
48
48
|
const { handleMediaClick } = (0, react_core_1.useSCMediaClick)();
|
package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export interface CreateIncubatorDialogProps {
|
|
|
15
15
|
*/
|
|
16
16
|
onClose?: () => void;
|
|
17
17
|
}
|
|
18
|
-
export default function CreateIncubatorDialog(
|
|
18
|
+
export default function CreateIncubatorDialog(props: CreateIncubatorDialogProps): JSX.Element;
|
package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js
CHANGED
|
@@ -10,7 +10,6 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
10
10
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
11
11
|
const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog"));
|
|
12
12
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
13
|
-
const system_1 = require("@mui/system");
|
|
14
13
|
const Errors_1 = require("../../../constants/Errors");
|
|
15
14
|
const lab_1 = require("@mui/lab");
|
|
16
15
|
const constants_1 = require("../constants");
|
|
@@ -36,12 +35,8 @@ const Root = (0, styles_1.styled)(BaseDialog_1.default, {
|
|
|
36
35
|
name: constants_1.PREFIX,
|
|
37
36
|
slot: 'CreateDialogRoot'
|
|
38
37
|
})(() => ({}));
|
|
39
|
-
function CreateIncubatorDialog(
|
|
38
|
+
function CreateIncubatorDialog(props) {
|
|
40
39
|
// PROPS
|
|
41
|
-
const props = (0, system_1.useThemeProps)({
|
|
42
|
-
props: inProps,
|
|
43
|
-
name: constants_1.PREFIX
|
|
44
|
-
});
|
|
45
40
|
const { className, open, onClose } = props, rest = tslib_1.__rest(props, ["className", "open", "onClose"]);
|
|
46
41
|
// CONTEXT
|
|
47
42
|
const scUserContext = (0, react_core_1.useSCUser)();
|
|
@@ -9,7 +9,7 @@ export interface NotificationCollapsedForProps extends Pick<NotificationItemProp
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type collapsed for
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function CollapsedForNotification(
|
|
15
|
+
export default function CollapsedForNotification(props: NotificationCollapsedForProps): JSX.Element;
|
|
@@ -12,7 +12,6 @@ const contribution_1 = require("../../../utils/contribution");
|
|
|
12
12
|
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const types_1 = require("../../../types");
|
|
15
|
-
const system_1 = require("@mui/system");
|
|
16
15
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
18
17
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -52,15 +51,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
52
51
|
})(() => ({}));
|
|
53
52
|
/**
|
|
54
53
|
* This component render the content of the notification of type collapsed for
|
|
55
|
-
* @param inProps
|
|
56
54
|
* @constructor
|
|
55
|
+
* @param props
|
|
57
56
|
*/
|
|
58
|
-
function CollapsedForNotification(
|
|
57
|
+
function CollapsedForNotification(props) {
|
|
59
58
|
// PROPS
|
|
60
|
-
const props = (0, system_1.useThemeProps)({
|
|
61
|
-
props: inProps,
|
|
62
|
-
name: constants_1.PREFIX
|
|
63
|
-
});
|
|
64
59
|
const { notificationObject, id = `n_${props.notificationObject['sid']}`, template = types_1.SCNotificationObjectTemplateType.DETAIL, className } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "template", "className"]);
|
|
65
60
|
// ROUTING
|
|
66
61
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -14,7 +14,7 @@ export interface CommentNotificationProps extends Pick<NotificationItemProps, Ex
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* This component render the content of the notification of type comment/nested comment
|
|
17
|
-
* @param
|
|
17
|
+
* @param props
|
|
18
18
|
* @constructor
|
|
19
19
|
*/
|
|
20
|
-
export default function CommentNotification(
|
|
20
|
+
export default function CommentNotification(props: CommentNotificationProps): JSX.Element;
|
|
@@ -12,7 +12,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
12
12
|
const contribution_1 = require("../../../utils/contribution");
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const types_2 = require("../../../types");
|
|
15
|
-
const system_1 = require("@mui/system");
|
|
16
15
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
17
16
|
const VoteButton_1 = tslib_1.__importDefault(require("../../VoteButton"));
|
|
18
17
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
@@ -43,15 +42,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
43
42
|
})(() => ({}));
|
|
44
43
|
/**
|
|
45
44
|
* This component render the content of the notification of type comment/nested comment
|
|
46
|
-
* @param
|
|
45
|
+
* @param props
|
|
47
46
|
* @constructor
|
|
48
47
|
*/
|
|
49
|
-
function CommentNotification(
|
|
48
|
+
function CommentNotification(props) {
|
|
50
49
|
// PROPS
|
|
51
|
-
const props = (0, system_1.useThemeProps)({
|
|
52
|
-
props: inProps,
|
|
53
|
-
name: constants_1.PREFIX
|
|
54
|
-
});
|
|
55
50
|
const { notificationObject, onVote, id = `n_${props.notificationObject['sid']}`, template = types_2.SCNotificationObjectTemplateType.DETAIL, className } = props, rest = tslib_1.__rest(props, ["notificationObject", "onVote", "id", "template", "className"]);
|
|
56
51
|
// STATE
|
|
57
52
|
const [openAlert, setOpenAlert] = (0, react_1.useState)(false);
|
|
@@ -14,7 +14,7 @@ export interface ContributionNotificationProps extends Pick<NotificationItemProp
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* This component render the content of the notification of type follow (contribution)
|
|
17
|
-
* @param inProps
|
|
18
17
|
* @constructor
|
|
18
|
+
* @param props
|
|
19
19
|
*/
|
|
20
|
-
export default function ContributionNotification(
|
|
20
|
+
export default function ContributionNotification(props: ContributionNotificationProps): JSX.Element;
|
|
@@ -11,7 +11,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_2 = require("../../../types");
|
|
13
13
|
const contribution_1 = require("../../../utils/contribution");
|
|
14
|
-
const system_1 = require("@mui/system");
|
|
15
14
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
16
15
|
const Bullet_1 = tslib_1.__importDefault(require("../../../shared/Bullet"));
|
|
17
16
|
const VoteButton_1 = tslib_1.__importDefault(require("../../VoteButton"));
|
|
@@ -51,15 +50,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
51
50
|
})(() => ({}));
|
|
52
51
|
/**
|
|
53
52
|
* This component render the content of the notification of type follow (contribution)
|
|
54
|
-
* @param inProps
|
|
55
53
|
* @constructor
|
|
54
|
+
* @param props
|
|
56
55
|
*/
|
|
57
|
-
function ContributionNotification(
|
|
56
|
+
function ContributionNotification(props) {
|
|
58
57
|
// PROPS
|
|
59
|
-
const props = (0, system_1.useThemeProps)({
|
|
60
|
-
props: inProps,
|
|
61
|
-
name: constants_1.PREFIX
|
|
62
|
-
});
|
|
63
58
|
const { notificationObject, onVote, id = `n_${props.notificationObject['sid']}`, className, template = types_2.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "onVote", "id", "className", "template"]);
|
|
64
59
|
// ROUTING
|
|
65
60
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -9,7 +9,7 @@ export interface ContributionFollowProps extends Pick<NotificationItemProps, Exc
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type follow (contribution)
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function ContributionFollowNotification(
|
|
15
|
+
export default function ContributionFollowNotification(props: ContributionFollowProps): JSX.Element;
|
|
@@ -10,7 +10,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
10
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
11
|
const types_1 = require("../../../types");
|
|
12
12
|
const contribution_1 = require("../../../utils/contribution");
|
|
13
|
-
const system_1 = require("@mui/system");
|
|
14
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
15
14
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
15
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
@@ -35,15 +34,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
35
34
|
})(() => ({}));
|
|
36
35
|
/**
|
|
37
36
|
* This component render the content of the notification of type follow (contribution)
|
|
38
|
-
* @param inProps
|
|
39
37
|
* @constructor
|
|
38
|
+
* @param props
|
|
40
39
|
*/
|
|
41
|
-
function ContributionFollowNotification(
|
|
40
|
+
function ContributionFollowNotification(props) {
|
|
42
41
|
// PROPS
|
|
43
|
-
const props = (0, system_1.useThemeProps)({
|
|
44
|
-
props: inProps,
|
|
45
|
-
name: constants_1.PREFIX
|
|
46
|
-
});
|
|
47
42
|
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
48
43
|
// CONTEXT
|
|
49
44
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -9,7 +9,7 @@ export interface NotificationDeletedForProps extends Pick<NotificationItemProps,
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type deleted for
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function DeletedForNotification(
|
|
15
|
+
export default function DeletedForNotification(props: NotificationDeletedForProps): JSX.Element;
|
|
@@ -13,7 +13,6 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
13
13
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
14
14
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
15
15
|
const types_1 = require("../../../types");
|
|
16
|
-
const system_1 = require("@mui/system");
|
|
17
16
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
18
17
|
const constants_1 = require("../constants");
|
|
19
18
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -54,15 +53,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
54
53
|
})(() => ({}));
|
|
55
54
|
/**
|
|
56
55
|
* This component render the content of the notification of type deleted for
|
|
57
|
-
* @param inProps
|
|
58
56
|
* @constructor
|
|
57
|
+
* @param props
|
|
59
58
|
*/
|
|
60
|
-
function DeletedForNotification(
|
|
59
|
+
function DeletedForNotification(props) {
|
|
61
60
|
// PROPS
|
|
62
|
-
const props = (0, system_1.useThemeProps)({
|
|
63
|
-
props: inProps,
|
|
64
|
-
name: constants_1.PREFIX
|
|
65
|
-
});
|
|
66
61
|
const { notificationObject = null, id = `n_${props.notificationObject['feed_serialization_id']}`, template = types_1.SCNotificationObjectTemplateType.DETAIL, className } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "template", "className"]);
|
|
67
62
|
// ROUTING
|
|
68
63
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -7,4 +7,4 @@ export interface NotificationIncubatorApprovedProps extends Pick<NotificationIte
|
|
|
7
7
|
*/
|
|
8
8
|
notificationObject: SCNotificationIncubatorType;
|
|
9
9
|
}
|
|
10
|
-
export default function IncubatorApprovedNotification(
|
|
10
|
+
export default function IncubatorApprovedNotification(props: NotificationIncubatorApprovedProps): JSX.Element;
|
|
@@ -10,7 +10,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
10
10
|
const NewChip_1 = tslib_1.__importDefault(require("../../../shared/NewChip/NewChip"));
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_1 = require("../../../types");
|
|
13
|
-
const system_1 = require("@mui/system");
|
|
14
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
15
14
|
const constants_1 = require("../constants");
|
|
16
15
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -30,12 +29,8 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
30
29
|
name: constants_1.PREFIX,
|
|
31
30
|
slot: 'IncubatorApprovedRoot'
|
|
32
31
|
})(() => ({}));
|
|
33
|
-
function IncubatorApprovedNotification(
|
|
32
|
+
function IncubatorApprovedNotification(props) {
|
|
34
33
|
// PROPS
|
|
35
|
-
const props = (0, system_1.useThemeProps)({
|
|
36
|
-
props: inProps,
|
|
37
|
-
name: constants_1.PREFIX
|
|
38
|
-
});
|
|
39
34
|
const { notificationObject = null, id = `n_${props.notificationObject['feed_serialization_id']}`, template = types_1.SCNotificationObjectTemplateType.DETAIL, className } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "template", "className"]);
|
|
40
35
|
// ROUTING
|
|
41
36
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -9,7 +9,7 @@ export interface NotificationKindlyNoticeFlagProps extends Pick<NotificationItem
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type kindly notice flag
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function KindlyNoticeFlagNotification(
|
|
15
|
+
export default function KindlyNoticeFlagNotification(props: NotificationKindlyNoticeFlagProps): JSX.Element;
|
|
@@ -12,7 +12,6 @@ const contribution_1 = require("../../../utils/contribution");
|
|
|
12
12
|
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const types_1 = require("../../../types");
|
|
15
|
-
const system_1 = require("@mui/system");
|
|
16
15
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
18
17
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -36,15 +35,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
36
35
|
})(() => ({}));
|
|
37
36
|
/**
|
|
38
37
|
* This component render the content of the notification of type kindly notice flag
|
|
39
|
-
* @param inProps
|
|
40
38
|
* @constructor
|
|
39
|
+
* @param props
|
|
41
40
|
*/
|
|
42
|
-
function KindlyNoticeFlagNotification(
|
|
41
|
+
function KindlyNoticeFlagNotification(props) {
|
|
43
42
|
// PROPS
|
|
44
|
-
const props = (0, system_1.useThemeProps)({
|
|
45
|
-
props: inProps,
|
|
46
|
-
name: constants_1.PREFIX
|
|
47
|
-
});
|
|
48
43
|
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
49
44
|
// ROUTING
|
|
50
45
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -9,7 +9,7 @@ export interface NotificationKindlyNoticeForProps extends Pick<NotificationItemP
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type kindly notice for
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function KindlyNoticeForNotification(
|
|
15
|
+
export default function KindlyNoticeForNotification(props: NotificationKindlyNoticeForProps): JSX.Element;
|
|
@@ -12,7 +12,6 @@ const contribution_1 = require("../../../utils/contribution");
|
|
|
12
12
|
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const types_1 = require("../../../types");
|
|
15
|
-
const system_1 = require("@mui/system");
|
|
16
15
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
18
17
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -56,15 +55,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
56
55
|
})(() => ({}));
|
|
57
56
|
/**
|
|
58
57
|
* This component render the content of the notification of type kindly notice for
|
|
59
|
-
* @param inProps
|
|
60
58
|
* @constructor
|
|
59
|
+
* @param props
|
|
61
60
|
*/
|
|
62
|
-
function KindlyNoticeForNotification(
|
|
61
|
+
function KindlyNoticeForNotification(props) {
|
|
63
62
|
// PROPS
|
|
64
|
-
const props = (0, system_1.useThemeProps)({
|
|
65
|
-
props: inProps,
|
|
66
|
-
name: constants_1.PREFIX
|
|
67
|
-
});
|
|
68
63
|
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
69
64
|
// ROUTING
|
|
70
65
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
@@ -9,7 +9,7 @@ export interface MentionNotificationProps extends Pick<NotificationItemProps, Ex
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* This component render the content of the notification of type mention
|
|
12
|
-
* @param inProps
|
|
13
12
|
* @constructor
|
|
13
|
+
* @param props
|
|
14
14
|
*/
|
|
15
|
-
export default function MentionNotification(
|
|
15
|
+
export default function MentionNotification(props: MentionNotificationProps): JSX.Element;
|
|
@@ -10,7 +10,6 @@ const contribution_1 = require("../../../utils/contribution");
|
|
|
10
10
|
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_1 = require("../../../types");
|
|
13
|
-
const system_1 = require("@mui/system");
|
|
14
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
15
14
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
15
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
@@ -35,15 +34,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
|
35
34
|
})(() => ({}));
|
|
36
35
|
/**
|
|
37
36
|
* This component render the content of the notification of type mention
|
|
38
|
-
* @param inProps
|
|
39
37
|
* @constructor
|
|
38
|
+
* @param props
|
|
40
39
|
*/
|
|
41
|
-
function MentionNotification(
|
|
40
|
+
function MentionNotification(props) {
|
|
42
41
|
// PROPS
|
|
43
|
-
const props = (0, system_1.useThemeProps)({
|
|
44
|
-
props: inProps,
|
|
45
|
-
name: constants_1.PREFIX
|
|
46
|
-
});
|
|
47
42
|
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
48
43
|
// CONTEXT
|
|
49
44
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|