@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.
Files changed (102) hide show
  1. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.d.ts +1 -1
  2. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -6
  3. package/lib/cjs/components/CommentObject/CommentObject.d.ts +10 -0
  4. package/lib/cjs/components/CommentObject/CommentObject.js +8 -40
  5. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
  6. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +19 -10
  7. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
  8. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +7 -7
  9. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
  10. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
  11. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
  12. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
  13. package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -2
  14. package/lib/cjs/components/Notification/Comment/Comment.js +2 -7
  15. package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -2
  16. package/lib/cjs/components/Notification/Contribution/Contribution.js +2 -7
  17. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
  18. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
  19. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
  20. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -7
  21. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
  22. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
  23. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
  24. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
  25. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
  26. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
  27. package/lib/cjs/components/Notification/Mention/Mention.d.ts +2 -2
  28. package/lib/cjs/components/Notification/Mention/Mention.js +2 -7
  29. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
  30. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
  31. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
  32. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
  33. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
  34. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -7
  35. package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts +2 -2
  36. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -7
  37. package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts +2 -2
  38. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -7
  39. package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts +2 -2
  40. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -7
  41. package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
  42. package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
  43. package/lib/cjs/components/UserProfileEdit/Section/Account.d.ts +1 -1
  44. package/lib/cjs/components/UserProfileEdit/Section/Account.js +2 -7
  45. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
  46. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
  47. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
  48. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +1 -6
  49. package/lib/cjs/components/UserProfileEdit/Section/Settings.d.ts +1 -1
  50. package/lib/cjs/components/UserProfileEdit/Section/Settings.js +1 -6
  51. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.d.ts +1 -1
  52. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -6
  53. package/lib/esm/components/CommentObject/CommentObject.d.ts +10 -0
  54. package/lib/esm/components/CommentObject/CommentObject.js +8 -40
  55. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +2 -3
  56. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +22 -13
  57. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
  58. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +5 -5
  59. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
  60. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
  61. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
  62. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
  63. package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -2
  64. package/lib/esm/components/Notification/Comment/Comment.js +2 -7
  65. package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -2
  66. package/lib/esm/components/Notification/Contribution/Contribution.js +2 -7
  67. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
  68. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
  69. package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
  70. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -7
  71. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
  72. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
  73. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
  74. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
  75. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
  76. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
  77. package/lib/esm/components/Notification/Mention/Mention.d.ts +2 -2
  78. package/lib/esm/components/Notification/Mention/Mention.js +2 -7
  79. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
  80. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
  81. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
  82. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
  83. package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
  84. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -7
  85. package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts +2 -2
  86. package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -7
  87. package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts +2 -2
  88. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -7
  89. package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts +2 -2
  90. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -7
  91. package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
  92. package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
  93. package/lib/esm/components/UserProfileEdit/Section/Account.d.ts +1 -1
  94. package/lib/esm/components/UserProfileEdit/Section/Account.js +2 -7
  95. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
  96. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
  97. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
  98. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +1 -6
  99. package/lib/esm/components/UserProfileEdit/Section/Settings.d.ts +1 -1
  100. package/lib/esm/components/UserProfileEdit/Section/Settings.js +1 -6
  101. package/lib/umd/react-ui.js +1 -1
  102. package/package.json +4 -4
@@ -9,7 +9,7 @@ export interface NotificationPrivateMessageProps extends Pick<NotificationItemPr
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of type private message
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function PrivateMessageNotification(inProps: NotificationPrivateMessageProps): JSX.Element;
15
+ export default function PrivateMessageNotification(props: NotificationPrivateMessageProps): JSX.Element;
@@ -9,7 +9,6 @@ const react_intl_1 = require("react-intl");
9
9
  const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
10
10
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
11
  const types_1 = require("../../../types");
12
- const system_1 = require("@mui/system");
13
12
  const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
14
13
  const lab_1 = require("@mui/lab");
15
14
  const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
@@ -38,15 +37,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
38
37
  })(() => ({}));
39
38
  /**
40
39
  * This component render the content of the notification of type private message
41
- * @param inProps
42
40
  * @constructor
41
+ * @param props
43
42
  */
44
- function PrivateMessageNotification(inProps) {
43
+ function PrivateMessageNotification(props) {
45
44
  // PROPS
46
- const props = (0, system_1.useThemeProps)({
47
- props: inProps,
48
- name: constants_1.PREFIX
49
- });
50
45
  const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
51
46
  // CONTEXT
52
47
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -9,7 +9,7 @@ export interface NotificationUndeletedProps extends Pick<NotificationItemProps,
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of type undeleted for
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function UndeletedForNotification(inProps: NotificationUndeletedProps): JSX.Element;
15
+ export default function UndeletedForNotification(props: NotificationUndeletedProps): JSX.Element;
@@ -11,7 +11,6 @@ const contribution_1 = require("../../../utils/contribution");
11
11
  const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
12
12
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
13
13
  const types_1 = require("../../../types");
14
- const system_1 = require("@mui/system");
15
14
  const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
16
15
  const constants_1 = require("../constants");
17
16
  const classes = {
@@ -29,15 +28,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
29
28
  })(() => ({}));
30
29
  /**
31
30
  * This component render the content of the notification of type undeleted for
32
- * @param inProps
33
31
  * @constructor
32
+ * @param props
34
33
  */
35
- function UndeletedForNotification(inProps) {
34
+ function UndeletedForNotification(props) {
36
35
  // PROPS
37
- const props = (0, system_1.useThemeProps)({
38
- props: inProps,
39
- name: constants_1.PREFIX
40
- });
41
36
  const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
42
37
  // CONTEXT
43
38
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -9,7 +9,7 @@ export interface NotificationBlockedProps extends Pick<NotificationItemProps, Ex
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of type user blocked
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function UserBlockedNotification(inProps: NotificationBlockedProps): JSX.Element;
15
+ export default function UserBlockedNotification(props: NotificationBlockedProps): JSX.Element;
@@ -10,7 +10,6 @@ const react_intl_1 = require("react-intl");
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_2 = 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)({
@@ -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 user blocked
39
- * @param inProps
40
38
  * @constructor
39
+ * @param props
41
40
  */
42
- function UserBlockedNotification(inProps) {
41
+ function UserBlockedNotification(props) {
43
42
  // PROPS
44
- const props = (0, system_1.useThemeProps)({
45
- props: inProps,
46
- name: constants_1.PREFIX
47
- });
48
43
  const { notificationObject = null, id = `n_${props.notificationObject['sid']}`, template = types_2.SCNotificationObjectTemplateType.DETAIL, className } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "template", "className"]);
49
44
  // INTL
50
45
  const intl = (0, react_intl_1.useIntl)();
@@ -9,7 +9,7 @@ export interface NotificationConnectionProps extends Pick<NotificationItemProps,
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of connection accept/request
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function UserConnectionNotification(inProps: NotificationConnectionProps): JSX.Element;
15
+ export default function UserConnectionNotification(props: NotificationConnectionProps): JSX.Element;
@@ -10,7 +10,6 @@ const types_1 = require("@selfcommunity/types");
10
10
  const react_core_1 = require("@selfcommunity/react-core");
11
11
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
12
12
  const types_2 = 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"));
@@ -38,15 +37,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
38
37
  })(() => ({}));
39
38
  /**
40
39
  * This component render the content of the notification of connection accept/request
41
- * @param inProps
42
40
  * @constructor
41
+ * @param props
43
42
  */
44
- function UserConnectionNotification(inProps) {
43
+ function UserConnectionNotification(props) {
45
44
  // PROPS
46
- const props = (0, system_1.useThemeProps)({
47
- props: inProps,
48
- name: constants_1.PREFIX
49
- });
50
45
  const { notificationObject = null, id = `n_${props.notificationObject['sid']}`, className, template = types_2.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
51
46
  // CONTEXT
52
47
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -9,7 +9,7 @@ export interface NotificationFollowProps extends Pick<NotificationItemProps, Exc
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of type user follow
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function UserFollowNotification(inProps: NotificationFollowProps): JSX.Element;
15
+ export default function UserFollowNotification(props: NotificationFollowProps): JSX.Element;
@@ -9,7 +9,6 @@ const react_intl_1 = require("react-intl");
9
9
  const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
10
10
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
11
  const types_1 = require("../../../types");
12
- const system_1 = require("@mui/system");
13
12
  const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
14
13
  const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
15
14
  const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
@@ -33,15 +32,11 @@ const Root = (0, styles_1.styled)(NotificationItem_1.default, {
33
32
  })(() => ({}));
34
33
  /**
35
34
  * This component render the content of the notification of type user follow
36
- * @param inProps
37
35
  * @constructor
36
+ * @param props
38
37
  */
39
- function UserFollowNotification(inProps) {
38
+ function UserFollowNotification(props) {
40
39
  // PROPS
41
- const props = (0, system_1.useThemeProps)({
42
- props: inProps,
43
- name: constants_1.PREFIX
44
- });
45
40
  const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
46
41
  // CONTEXT
47
42
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -9,7 +9,7 @@ export interface NotificationVoteUpProps extends Pick<NotificationItemProps, Exc
9
9
  }
10
10
  /**
11
11
  * This component render the content of the notification of type vote up
12
- * @param inProps
13
12
  * @constructor
13
+ * @param props
14
14
  */
15
- export default function VoteUpNotification(inProps: NotificationVoteUpProps): JSX.Element;
15
+ export default function VoteUpNotification(props: NotificationVoteUpProps): JSX.Element;
@@ -10,7 +10,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
10
10
  const contribution_1 = require("../../../utils/contribution");
11
11
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
12
12
  const notification_1 = require("../../../types/notification");
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 vote up
38
- * @param inProps
39
37
  * @constructor
38
+ * @param props
40
39
  */
41
- function VoteUpNotification(inProps) {
40
+ function VoteUpNotification(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 = notification_1.SCNotificationObjectTemplateType.DETAIL, index, onVote, loadingVote } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template", "index", "onVote", "loadingVote"]);
48
43
  // CONTEXT
49
44
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -42,6 +42,6 @@ export interface PollSnippetProps {
42
42
  |title|.SCPollSuggestionWidget-title|Styles applied to the title element.|
43
43
  |activityAt|.SCPollSuggestionWidget-activity-at|Styles applied to activity section.|
44
44
 
45
- * @param inProps
45
+ * @param props
46
46
  */
47
- export default function PollSnippet(inProps: PollSnippetProps): JSX.Element;
47
+ export default function PollSnippet(props: PollSnippetProps): JSX.Element;
@@ -7,7 +7,6 @@ const material_1 = require("@mui/material");
7
7
  const react_core_1 = require("@selfcommunity/react-core");
8
8
  const react_intl_1 = require("react-intl");
9
9
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
10
- const system_1 = require("@mui/system");
11
10
  const contribution_1 = require("../../../utils/contribution");
12
11
  const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
13
12
  const BaseItem_1 = tslib_1.__importDefault(require("../../../shared/BaseItem"));
@@ -47,14 +46,10 @@ const Root = (0, styles_1.styled)(BaseItem_1.default, {
47
46
  |title|.SCPollSuggestionWidget-title|Styles applied to the title element.|
48
47
  |activityAt|.SCPollSuggestionWidget-activity-at|Styles applied to activity section.|
49
48
 
50
- * @param inProps
49
+ * @param props
51
50
  */
52
- function PollSnippet(inProps) {
51
+ function PollSnippet(props) {
53
52
  // PROPS
54
- const props = (0, system_1.useThemeProps)({
55
- props: inProps,
56
- name: constants_1.PREFIX
57
- });
58
53
  const { feedObj = null, className = null, autoHide = false } = props, rest = tslib_1.__rest(props, ["feedObj", "className", "autoHide"]);
59
54
  // CONTEXT
60
55
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -52,4 +52,4 @@ export interface AccountProps {
52
52
  */
53
53
  [p: string]: any;
54
54
  }
55
- export default function Account(inProps: AccountProps): JSX.Element;
55
+ export default function Account(props: AccountProps): JSX.Element;
@@ -5,7 +5,6 @@ const react_1 = tslib_1.__importStar(require("react"));
5
5
  const styles_1 = require("@mui/material/styles");
6
6
  const material_1 = require("@mui/material");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
- const system_1 = require("@mui/system");
9
8
  const react_intl_1 = require("react-intl");
10
9
  const ConfirmDialog_1 = tslib_1.__importDefault(require("../../../shared/ConfirmDialog/ConfirmDialog"));
11
10
  const UserSocialAssociation_1 = tslib_1.__importDefault(require("../../UserSocialAssociation"));
@@ -42,14 +41,10 @@ const Root = (0, styles_1.styled)(material_1.Box, {
42
41
  name: constants_1.PREFIX,
43
42
  slot: 'AccountRoot'
44
43
  })(() => ({}));
45
- function Account(inProps) {
46
- // PROPS
47
- const props = (0, system_1.useThemeProps)({
48
- props: inProps,
49
- name: constants_1.PREFIX
50
- });
44
+ function Account(props) {
51
45
  // CONTEXT
52
46
  const scUserContext = (0, react_core_1.useSCUser)();
47
+ // PROPS
53
48
  const { className = null, handleAssociationCreate, showSocialAccountSection = true, showCredentialsSection = false, AccountCredentialProps = {}, showLanguageSwitcher = false, LanguageSwitcherProps = {}, startActions = null, endActions = null } = props, rest = tslib_1.__rest(props, ["className", "handleAssociationCreate", "showSocialAccountSection", "showCredentialsSection", "AccountCredentialProps", "showLanguageSwitcher", "LanguageSwitcherProps", "startActions", "endActions"]);
54
49
  // STATE
55
50
  const [provider, setProvider] = (0, react_1.useState)(null);
@@ -20,4 +20,4 @@ export interface AccountCredentialProps {
20
20
  */
21
21
  [p: string]: any;
22
22
  }
23
- export default function AccountCredentials(inProps: AccountCredentialProps): JSX.Element;
23
+ export default function AccountCredentials(props: AccountCredentialProps): JSX.Element;
@@ -5,7 +5,6 @@ const react_1 = tslib_1.__importStar(require("react"));
5
5
  const styles_1 = require("@mui/material/styles");
6
6
  const material_1 = require("@mui/material");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
- const system_1 = require("@mui/system");
9
8
  const react_intl_1 = require("react-intl");
10
9
  const api_services_1 = require("@selfcommunity/api-services");
11
10
  const Errors_1 = require("../../../constants/Errors");
@@ -46,14 +45,9 @@ const PasswordDialogRoot = (0, styles_1.styled)(BaseDialog_1.default, {
46
45
  name: constants_1.PREFIX,
47
46
  slot: 'PasswordDialogRoot'
48
47
  })(() => ({}));
49
- function AccountCredentials(inProps) {
48
+ function AccountCredentials(props) {
50
49
  var _a;
51
50
  // PROPS
52
- const props = (0, system_1.useThemeProps)({
53
- props: inProps,
54
- name: constants_1.PREFIX
55
- });
56
- // CONTEXT
57
51
  const { className = null, user, skipEmailValidation = false } = props, rest = tslib_1.__rest(props, ["className", "user", "skipEmailValidation"]);
58
52
  const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
59
53
  // STATE
@@ -39,4 +39,4 @@ export interface PublicInfoProps {
39
39
  */
40
40
  [p: string]: any;
41
41
  }
42
- export default function PublicInfo(inProps: PublicInfoProps): JSX.Element;
42
+ export default function PublicInfo(props: PublicInfoProps): JSX.Element;
@@ -15,7 +15,6 @@ const x_date_pickers_1 = require("@mui/x-date-pickers");
15
15
  const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
16
16
  const UsernameTextField_1 = tslib_1.__importDefault(require("../../../shared/UsernameTextField"));
17
17
  const use_deep_compare_effect_1 = require("use-deep-compare-effect");
18
- const system_1 = require("@mui/system");
19
18
  const types_1 = require("../../../types");
20
19
  const MetadataField_1 = tslib_1.__importDefault(require("../../../shared/MetadataField"));
21
20
  const Errors_1 = require("../../../constants/Errors");
@@ -50,12 +49,8 @@ const Root = (0, styles_1.styled)(material_1.Box, {
50
49
  })(() => ({}));
51
50
  const GENDERS = ['Male', 'Female', 'Unspecified'];
52
51
  const DATEPICKER_MINDATE = new Date(1000, 1, 1);
53
- function PublicInfo(inProps) {
52
+ function PublicInfo(props) {
54
53
  // PROPS
55
- const props = (0, system_1.useThemeProps)({
56
- props: inProps,
57
- name: constants_1.PREFIX
58
- });
59
54
  const { id = null, className = null, fields = [...UserProfile_1.DEFAULT_FIELDS], onEditSuccess = null, onEditFailure = null, startActions = null, endActions = null } = props, rest = tslib_1.__rest(props, ["id", "className", "fields", "onEditSuccess", "onEditFailure", "startActions", "endActions"]);
60
55
  // CONTEXT
61
56
  const scContext = (0, react_core_1.useSCContext)();
@@ -35,4 +35,4 @@ export interface SettingsProps {
35
35
  */
36
36
  [p: string]: any;
37
37
  }
38
- export default function Settings(inProps: SettingsProps): JSX.Element;
38
+ export default function Settings(props: SettingsProps): JSX.Element;
@@ -9,7 +9,6 @@ const react_core_1 = require("@selfcommunity/react-core");
9
9
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
10
10
  const SettingsSkeleton_1 = tslib_1.__importDefault(require("./SettingsSkeleton"));
11
11
  const notistack_1 = require("notistack");
12
- const system_1 = require("@mui/system");
13
12
  const UserProfile_1 = require("../../../constants/UserProfile");
14
13
  const types_1 = require("../../../types");
15
14
  const constants_1 = require("../constants");
@@ -21,12 +20,8 @@ const Root = (0, styles_1.styled)(material_1.Box, {
21
20
  name: constants_1.PREFIX,
22
21
  slot: 'SettingsRoot'
23
22
  })(() => ({}));
24
- function Settings(inProps) {
23
+ function Settings(props) {
25
24
  // PROPS
26
- const props = (0, system_1.useThemeProps)({
27
- props: inProps,
28
- name: constants_1.PREFIX
29
- });
30
25
  const { id = null, className = null, settings = [...UserProfile_1.DEFAULT_SETTINGS], onEditSuccess = null, startActions = null, endActions = null } = props, rest = tslib_1.__rest(props, ["id", "className", "settings", "onEditSuccess", "startActions", "endActions"]);
31
26
  // CONTEXT
32
27
  const scUserContext = (0, react_core_1.useSCUser)();
@@ -6,4 +6,4 @@ export interface CPDialogProps extends BaseDialogProps {
6
6
  */
7
7
  onChange?: (avatar: any) => void;
8
8
  }
9
- export default function ChangePictureDialog(inProps: CPDialogProps): JSX.Element;
9
+ export default function ChangePictureDialog(props: CPDialogProps): JSX.Element;
@@ -12,7 +12,6 @@ import BaseDialog from '../../../shared/BaseDialog';
12
12
  import ConfirmDialog from '../../../shared/ConfirmDialog/ConfirmDialog';
13
13
  import classNames from 'classnames';
14
14
  import CircularProgress from '@mui/material/CircularProgress';
15
- import { useThemeProps } from '@mui/system';
16
15
  import { scroll } from 'seamless-scroll-polyfill';
17
16
  import { SCOPE_SC_UI } from '../../../constants/Errors';
18
17
  import { Logger } from '@selfcommunity/utils';
@@ -28,12 +27,8 @@ const Root = styled(BaseDialog, {
28
27
  name: PREFIX,
29
28
  slot: 'DialogRoot'
30
29
  })(() => ({}));
31
- export default function ChangePictureDialog(inProps) {
30
+ export default function ChangePictureDialog(props) {
32
31
  //PROPS
33
- const props = useThemeProps({
34
- props: inProps,
35
- name: PREFIX
36
- });
37
32
  const { open, onChange, onClose, className } = props, rest = __rest(props, ["open", "onChange", "onClose", "className"]);
38
33
  //CONTEXT
39
34
  const scUserContext = useContext(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
@@ -92,7 +92,7 @@ export default function CommentObject(inProps) {
92
92
  props: inProps,
93
93
  name: PREFIX
94
94
  });
95
- const { id = `comment_object_${props.commentObjectId ? props.commentObjectId : props.commentObject ? props.commentObject.id : ''}`, className, commentObjectId, commentObject, feedObjectId, feedObject, feedObjectType = SCContributionType.POST, commentReply, onOpenReply, onDelete, onVote, elevation = 0, truncateContent = false, CommentObjectSkeletonProps = { elevation, WidgetProps: { variant: 'outlined' } }, CommentObjectReplyProps = { elevation, WidgetProps: { variant: 'outlined' } }, linkableCommentDateTime = true, cacheStrategy = CacheStrategies.NETWORK_ONLY, CommentsObjectComponentProps = {} } = props, rest = __rest(props, ["id", "className", "commentObjectId", "commentObject", "feedObjectId", "feedObject", "feedObjectType", "commentReply", "onOpenReply", "onDelete", "onVote", "elevation", "truncateContent", "CommentObjectSkeletonProps", "CommentObjectReplyProps", "linkableCommentDateTime", "cacheStrategy", "CommentsObjectComponentProps"]);
95
+ const { id = `comment_object_${props.commentObjectId ? props.commentObjectId : props.commentObject ? props.commentObject.id : ''}`, className, commentObjectId, commentObject, feedObjectId, feedObject, feedObjectType = 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 = CacheStrategies.NETWORK_ONLY, CommentsObjectComponentProps = {} } = props, rest = __rest(props, ["id", "className", "commentObjectId", "commentObject", "feedObjectId", "feedObject", "feedObjectType", "commentReply", "onOpenReply", "onDelete", "onCollapsed", "onRestore", "onVote", "elevation", "truncateContent", "CommentObjectSkeletonProps", "CommentObjectReplyProps", "linkableCommentDateTime", "cacheStrategy", "CommentsObjectComponentProps"]);
96
96
  // CONTEXT
97
97
  const scContext = useSCContext();
98
98
  const scUserContext = useContext(SCUserContext);
@@ -210,54 +210,22 @@ export default function CommentObject(inProps) {
210
210
  * Handle comment delete
211
211
  */
212
212
  function handleDelete(comment) {
213
- if (comment.parent && obj.latest_comments) {
214
- const _latestComment = obj.latest_comments.map((c) => {
215
- if (c.id === comment.id) {
216
- c.deleted = !c.deleted;
217
- }
218
- return c;
219
- });
220
- updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
221
- }
222
- else {
223
- const _comment = Object.assign({}, obj, { deleted: !obj.deleted });
224
- updateObject(Object.assign({}, obj, { deleted: !obj.deleted }));
225
- onDelete && onDelete(_comment);
226
- }
213
+ updateObject(comment);
214
+ onDelete && onDelete(comment);
227
215
  }
228
216
  /**
229
217
  * Handle comment delete
230
218
  */
231
219
  function handleHide(comment) {
232
- if (comment.parent && obj.latest_comments) {
233
- const _latestComment = obj.latest_comments.map((c) => {
234
- if (c.id === comment.id) {
235
- c.collapsed = !c.collapsed;
236
- }
237
- return c;
238
- });
239
- updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
240
- }
241
- else {
242
- updateObject(Object.assign({}, obj, { collapsed: !obj.collapsed }));
243
- }
220
+ updateObject(Object.assign({}, obj, { collapsed: !obj.collapsed }));
221
+ onCollapsed && onCollapsed(comment);
244
222
  }
245
223
  /**
246
224
  * Handle comment restore
247
225
  */
248
226
  function handleRestore(comment) {
249
- if (comment.parent && obj.latest_comments) {
250
- const _latestComment = obj.latest_comments.map((c) => {
251
- if (c.id === comment.id) {
252
- c.deleted = false;
253
- }
254
- return c;
255
- });
256
- updateObject(Object.assign({}, obj, { latest_comments: _latestComment }));
257
- }
258
- else {
259
- updateObject(Object.assign({}, obj, { deleted: false }));
260
- }
227
+ updateObject(Object.assign({}, obj, { deleted: false }));
228
+ onRestore && onRestore(comment);
261
229
  }
262
230
  /**
263
231
  * Handle edit comment
@@ -324,7 +292,7 @@ export default function CommentObject(inProps) {
324
292
  */
325
293
  function renderComment(comment) {
326
294
  if (comment.deleted &&
327
- (!scUserContext.user || (scUserContext.user && (!UserUtils.isStaff(scUserContext.user) || scUserContext.user.id !== comment.author.id)))) {
295
+ (!scUserContext.user || (scUserContext.user && !UserUtils.isStaff(scUserContext.user) && scUserContext.user.id !== comment.author.id))) {
328
296
  // render the comment if user is logged and is staff (admin, moderator)
329
297
  // or the comment author is the logged user
330
298
  return null;
@@ -8,9 +8,9 @@ import { useSCUser } from '@selfcommunity/react-core';
8
8
  import Editor from '../Editor';
9
9
  import classNames from 'classnames';
10
10
  import { LoadingButton } from '@mui/lab';
11
- import { useThemeProps } from '@mui/system';
12
11
  import BaseItem from '../../shared/BaseItem';
13
12
  import UserAvatar from '../../shared/UserAvatar';
13
+ import { useThemeProps } from '@mui/system';
14
14
  const PREFIX = 'SCCommentObjectReply';
15
15
  const classes = {
16
16
  root: `${PREFIX}-root`,
@@ -24,8 +24,7 @@ const classes = {
24
24
  };
25
25
  const Root = styled(BaseItem, {
26
26
  name: PREFIX,
27
- slot: 'Root',
28
- overridesResolver: (props, styles) => styles.root
27
+ slot: 'Root'
29
28
  })(() => ({}));
30
29
  /**
31
30
  *> API documentation for the Community-JS Comment Object Reply component. Learn about the available props and the CSS API.
@@ -1,15 +1,14 @@
1
1
  import { __rest } from "tslib";
2
2
  import React, { useState } from 'react';
3
3
  import { styled } from '@mui/material/styles';
4
- import { Avatar, Typography } from '@mui/material';
4
+ import { Avatar } from '@mui/material';
5
5
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
6
- import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
6
+ import { defineMessages, useIntl } from 'react-intl';
7
7
  import DateTimeAgo from '../../../../../shared/DateTimeAgo';
8
8
  import classNames from 'classnames';
9
9
  import BaseItem from '../../../../../shared/BaseItem';
10
10
  import UserDeletedSnackBar from '../../../../../shared/UserDeletedSnackBar';
11
- import { getContributionHtml, getRouteData } from '../../../../../utils/contribution';
12
- import { MAX_SUMMARY_LENGTH } from '../../../../../constants/Feed';
11
+ import { getRouteData } from '../../../../../utils/contribution';
13
12
  import { PREFIX } from '../../../constants';
14
13
  const messages = defineMessages({
15
14
  comment: {
@@ -37,19 +36,29 @@ export default function CommentRelevantActivity(props) {
37
36
  // INTL
38
37
  const intl = useIntl();
39
38
  // RENDER
40
- const summaryHtmlTruncated = 'summary_truncated' in activityObject.comment
41
- ? activityObject.comment.summary_truncated
42
- : activityObject.comment.html.length >= MAX_SUMMARY_LENGTH;
43
- const commentHtml = 'summary_html' in activityObject.comment ? activityObject.comment.summary_html : activityObject.comment.summary;
44
- const summaryHtml = getContributionHtml(commentHtml, scRoutingContext.url);
39
+ // const summaryHtmlTruncated =
40
+ // 'summary_truncated' in activityObject.comment
41
+ // ? activityObject.comment.summary_truncated
42
+ // : activityObject.comment.html.length >= MAX_SUMMARY_LENGTH;
43
+ // const commentHtml = 'summary_html' in activityObject.comment ? activityObject.comment.summary_html : activityObject.comment.summary;
44
+ // const summaryHtml = getContributionHtml(commentHtml, scRoutingContext.url);
45
45
  return (React.createElement(React.Fragment, null,
46
46
  React.createElement(Root, Object.assign({}, rest, { className: classNames(classes.root, className), image: React.createElement(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }),
47
47
  React.createElement(Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar })), primary: React.createElement(React.Fragment, null, intl.formatMessage(messages.comment, {
48
48
  username: (React.createElement(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), activityObject.author.username)),
49
- comment: (React.createElement(React.Fragment, null,
50
- React.createElement(Typography, { variant: "body2", gutterBottom: true, dangerouslySetInnerHTML: { __html: summaryHtml } }),
51
- summaryHtmlTruncated && (React.createElement(Link, { to: scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(activityObject.comment)), className: classes.showMoreContent },
52
- React.createElement(FormattedMessage, { id: "ui.commentObject.showMore", defaultMessage: "ui.commentObject.showMore" })))))
49
+ link: (...chunks) => React.createElement(Link, { to: scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(activityObject.comment)) }, chunks)
50
+ // comment: (
51
+ // <>
52
+ // <Typography variant="body2" gutterBottom dangerouslySetInnerHTML={{__html: summaryHtml}} />
53
+ // {summaryHtmlTruncated && (
54
+ // <Link
55
+ // to={scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(activityObject.comment))}
56
+ // className={classes.showMoreContent}>
57
+ // <FormattedMessage id="ui.commentObject.showMore" defaultMessage="ui.commentObject.showMore" />
58
+ // </Link>
59
+ // )}
60
+ // </>
61
+ // )
53
62
  })), secondary: React.createElement(DateTimeAgo, { date: activityObject.active_at }) })),
54
63
  openAlert && React.createElement(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })));
55
64
  }
@@ -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 `SCFeedObject-media-preview-root` can be used when providing style overrides in the theme.
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|.SCFeedObject-media-preview-root|Styles applied to the root element.|
32
+ |root|.SCFeedObjectMediaPreview-root|Styles applied to the root element.|
33
33
 
34
34
 
35
35
  * @param inProps