@selfcommunity/react-ui 0.7.0-alpha.352 → 0.7.0-alpha.354

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 (100) 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/CommentObjectReply/CommentObjectReply.js +2 -3
  4. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +19 -10
  5. package/lib/cjs/components/FeedObject/Poll/Poll.js +5 -8
  6. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
  7. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +7 -7
  8. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
  9. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
  10. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
  11. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
  12. package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -2
  13. package/lib/cjs/components/Notification/Comment/Comment.js +2 -7
  14. package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -2
  15. package/lib/cjs/components/Notification/Contribution/Contribution.js +2 -7
  16. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
  17. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
  18. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
  19. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -7
  20. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
  21. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
  22. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
  23. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
  24. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
  25. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
  26. package/lib/cjs/components/Notification/Mention/Mention.d.ts +2 -2
  27. package/lib/cjs/components/Notification/Mention/Mention.js +2 -7
  28. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
  29. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
  30. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
  31. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
  32. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
  33. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -7
  34. package/lib/cjs/components/Notification/UserConnection/UserConnection.d.ts +2 -2
  35. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -7
  36. package/lib/cjs/components/Notification/UserFollow/UserFollow.d.ts +2 -2
  37. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -7
  38. package/lib/cjs/components/Notification/VoteUp/VoteUp.d.ts +2 -2
  39. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -7
  40. package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
  41. package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
  42. package/lib/cjs/components/UserProfileEdit/Section/Account.d.ts +1 -1
  43. package/lib/cjs/components/UserProfileEdit/Section/Account.js +2 -7
  44. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
  45. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
  46. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
  47. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +1 -6
  48. package/lib/cjs/components/UserProfileEdit/Section/Settings.d.ts +1 -1
  49. package/lib/cjs/components/UserProfileEdit/Section/Settings.js +1 -6
  50. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.d.ts +1 -1
  51. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -6
  52. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +2 -3
  53. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +22 -13
  54. package/lib/esm/components/FeedObject/Poll/Poll.js +5 -8
  55. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +2 -2
  56. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +5 -5
  57. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.d.ts +1 -1
  58. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +1 -6
  59. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.d.ts +2 -2
  60. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +2 -7
  61. package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -2
  62. package/lib/esm/components/Notification/Comment/Comment.js +2 -7
  63. package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -2
  64. package/lib/esm/components/Notification/Contribution/Contribution.js +2 -7
  65. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.d.ts +2 -2
  66. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -7
  67. package/lib/esm/components/Notification/DeletedFor/DeletedFor.d.ts +2 -2
  68. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -7
  69. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.d.ts +1 -1
  70. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +1 -6
  71. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts +2 -2
  72. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -7
  73. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts +2 -2
  74. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +2 -7
  75. package/lib/esm/components/Notification/Mention/Mention.d.ts +2 -2
  76. package/lib/esm/components/Notification/Mention/Mention.js +2 -7
  77. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.d.ts +2 -2
  78. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +2 -7
  79. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.d.ts +2 -2
  80. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +2 -7
  81. package/lib/esm/components/Notification/UserBlocked/UserBlocked.d.ts +2 -2
  82. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -7
  83. package/lib/esm/components/Notification/UserConnection/UserConnection.d.ts +2 -2
  84. package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -7
  85. package/lib/esm/components/Notification/UserFollow/UserFollow.d.ts +2 -2
  86. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -7
  87. package/lib/esm/components/Notification/VoteUp/VoteUp.d.ts +2 -2
  88. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -7
  89. package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.d.ts +2 -2
  90. package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +2 -7
  91. package/lib/esm/components/UserProfileEdit/Section/Account.d.ts +1 -1
  92. package/lib/esm/components/UserProfileEdit/Section/Account.js +2 -7
  93. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.d.ts +1 -1
  94. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -7
  95. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.d.ts +1 -1
  96. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +1 -6
  97. package/lib/esm/components/UserProfileEdit/Section/Settings.d.ts +1 -1
  98. package/lib/esm/components/UserProfileEdit/Section/Settings.js +1 -6
  99. package/lib/umd/react-ui.js +1 -1
  100. package/package.json +4 -4
@@ -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);
@@ -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
  }
@@ -77,17 +77,14 @@ export default function PollObject(props) {
77
77
  setVotes((prevVotes) => prevVotes + 1);
78
78
  }
79
79
  else {
80
- let isVoted = false;
81
80
  setChoices((prevChoices) => {
82
- return prevChoices.map((choice) => {
83
- isVoted = isVoted || choice.voted;
84
- return Object.assign({}, choice, {
85
- voted: choice.id === id ? true : false,
86
- vote_count: choice.id === id ? choice.vote_count + 1 : choice.vote_count > 0 && choice.voted ? choice.vote_count - 1 : choice.vote_count
87
- });
81
+ const updatedChoices = prevChoices.map((choice) => {
82
+ return Object.assign(Object.assign({}, choice), { voted: choice.id === id, vote_count: choice.id === id ? choice.vote_count + 1 : choice.vote_count > 0 && choice.voted ? choice.vote_count - 1 : choice.vote_count });
88
83
  });
84
+ const newVotes = updatedChoices.reduce((totalVotes, choice) => totalVotes + choice.vote_count, 0);
85
+ setVotes(newVotes);
86
+ return updatedChoices;
89
87
  });
90
- !isVoted && setVotes((prevVotes) => prevVotes + 1);
91
88
  }
92
89
  };
93
90
  /**
@@ -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
@@ -6,13 +6,13 @@ import { useSCMediaClick } from '@selfcommunity/react-core';
6
6
  import { useThemeProps } from '@mui/system';
7
7
  import { File, Link, Share } from '../../shared/Media';
8
8
  import classNames from 'classnames';
9
- import { PREFIX } from '../FeedObject/constants';
9
+ const PREFIX = 'SCFeedObjectMediaPreview';
10
10
  const classes = {
11
- root: `${PREFIX}-media-preview-root`
11
+ root: `${PREFIX}-root`
12
12
  };
13
13
  const Root = styled(Box, {
14
14
  name: PREFIX,
15
- slot: 'MediaPreviewRoot'
15
+ slot: 'Root'
16
16
  })(() => ({}));
17
17
  /**
18
18
  * > API documentation for the Community-JS FeedObjectMediaPreview component. Learn about the available props and the CSS API.
@@ -25,13 +25,13 @@ const Root = styled(Box, {
25
25
  import {FeedObjectMediaPreview} from '@selfcommunity/react-ui';
26
26
  ```
27
27
  #### Component Name
28
- The name `SCFeedObject-media-preview-root` can be used when providing style overrides in the theme.
28
+ The name `SCFeedObjectMediaPreview` can be used when providing style overrides in the theme.
29
29
 
30
30
  #### CSS
31
31
 
32
32
  |Rule Name|Global class|Description|
33
33
  |---|---|---|
34
- |root|.SCFeedObject-media-preview-root|Styles applied to the root element.|
34
+ |root|.SCFeedObjectMediaPreview-root|Styles applied to the root element.|
35
35
 
36
36
 
37
37
  * @param inProps
@@ -15,4 +15,4 @@ export interface CreateIncubatorDialogProps {
15
15
  */
16
16
  onClose?: () => void;
17
17
  }
18
- export default function CreateIncubatorDialog(inProps: CreateIncubatorDialogProps): JSX.Element;
18
+ export default function CreateIncubatorDialog(props: CreateIncubatorDialogProps): JSX.Element;
@@ -8,7 +8,6 @@ import { Logger } from '@selfcommunity/utils';
8
8
  import { useSCUser } from '@selfcommunity/react-core';
9
9
  import BaseDialog from '../../../shared/BaseDialog';
10
10
  import classNames from 'classnames';
11
- import { useThemeProps } from '@mui/system';
12
11
  import { SCOPE_SC_UI } from '../../../constants/Errors';
13
12
  import { LoadingButton } from '@mui/lab';
14
13
  import { PREFIX } from '../constants';
@@ -34,12 +33,8 @@ const Root = styled(BaseDialog, {
34
33
  name: PREFIX,
35
34
  slot: 'CreateDialogRoot'
36
35
  })(() => ({}));
37
- export default function CreateIncubatorDialog(inProps) {
36
+ export default function CreateIncubatorDialog(props) {
38
37
  // PROPS
39
- const props = useThemeProps({
40
- props: inProps,
41
- name: PREFIX
42
- });
43
38
  const { className, open, onClose } = props, rest = __rest(props, ["className", "open", "onClose"]);
44
39
  // CONTEXT
45
40
  const scUserContext = 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(inProps: NotificationCollapsedForProps): JSX.Element;
15
+ export default function CollapsedForNotification(props: NotificationCollapsedForProps): JSX.Element;
@@ -10,7 +10,6 @@ import { getContributionType, getContributionSnippet, getRouteData } from '../..
10
10
  import DateTimeAgo from '../../../shared/DateTimeAgo';
11
11
  import classNames from 'classnames';
12
12
  import { SCNotificationObjectTemplateType } from '../../../types';
13
- import { useThemeProps } from '@mui/system';
14
13
  import NotificationItem from '../../../shared/NotificationItem';
15
14
  import { PREFIX } from '../constants';
16
15
  const messages = defineMessages({
@@ -50,15 +49,11 @@ const Root = styled(NotificationItem, {
50
49
  })(() => ({}));
51
50
  /**
52
51
  * This component render the content of the notification of type collapsed for
53
- * @param inProps
54
52
  * @constructor
53
+ * @param props
55
54
  */
56
- export default function CollapsedForNotification(inProps) {
55
+ export default function CollapsedForNotification(props) {
57
56
  // PROPS
58
- const props = useThemeProps({
59
- props: inProps,
60
- name: PREFIX
61
- });
62
57
  const { notificationObject, id = `n_${props.notificationObject['sid']}`, template = SCNotificationObjectTemplateType.DETAIL, className } = props, rest = __rest(props, ["notificationObject", "id", "template", "className"]);
63
58
  // ROUTING
64
59
  const scRoutingContext = 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 inProps
17
+ * @param props
18
18
  * @constructor
19
19
  */
20
- export default function CommentNotification(inProps: CommentNotificationProps): JSX.Element;
20
+ export default function CommentNotification(props: CommentNotificationProps): JSX.Element;
@@ -10,7 +10,6 @@ import DateTimeAgo from '../../../shared/DateTimeAgo';
10
10
  import { getContributionSnippet, getRouteData } from '../../../utils/contribution';
11
11
  import classNames from 'classnames';
12
12
  import { SCNotificationObjectTemplateType } from '../../../types';
13
- import { useThemeProps } from '@mui/system';
14
13
  import NotificationItem from '../../../shared/NotificationItem';
15
14
  import VoteButton from '../../VoteButton';
16
15
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
@@ -41,15 +40,11 @@ const Root = styled(NotificationItem, {
41
40
  })(() => ({}));
42
41
  /**
43
42
  * This component render the content of the notification of type comment/nested comment
44
- * @param inProps
43
+ * @param props
45
44
  * @constructor
46
45
  */
47
- export default function CommentNotification(inProps) {
46
+ export default function CommentNotification(props) {
48
47
  // PROPS
49
- const props = useThemeProps({
50
- props: inProps,
51
- name: PREFIX
52
- });
53
48
  const { notificationObject, onVote, id = `n_${props.notificationObject['sid']}`, template = SCNotificationObjectTemplateType.DETAIL, className } = props, rest = __rest(props, ["notificationObject", "onVote", "id", "template", "className"]);
54
49
  // STATE
55
50
  const [openAlert, setOpenAlert] = 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(inProps: ContributionNotificationProps): JSX.Element;
20
+ export default function ContributionNotification(props: ContributionNotificationProps): JSX.Element;