@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.
- 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/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +19 -10
- package/lib/cjs/components/FeedObject/Poll/Poll.js +5 -8
- 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/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +22 -13
- package/lib/esm/components/FeedObject/Poll/Poll.js +5 -8
- 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
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
45
|
+
* @param props
|
|
46
46
|
*/
|
|
47
|
-
export default function PollSnippet(
|
|
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
|
|
49
|
+
* @param props
|
|
51
50
|
*/
|
|
52
|
-
function PollSnippet(
|
|
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)();
|
|
@@ -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(
|
|
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);
|
|
@@ -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(
|
|
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
|
|
@@ -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(
|
|
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)();
|
|
@@ -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(
|
|
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)();
|
|
@@ -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(
|
|
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
|
|
4
|
+
import { Avatar } from '@mui/material';
|
|
5
5
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
6
|
-
import { defineMessages,
|
|
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 {
|
|
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 =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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 `
|
|
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
|
|
@@ -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
|
-
|
|
9
|
+
const PREFIX = 'SCFeedObjectMediaPreview';
|
|
10
10
|
const classes = {
|
|
11
|
-
root: `${PREFIX}-
|
|
11
|
+
root: `${PREFIX}-root`
|
|
12
12
|
};
|
|
13
13
|
const Root = styled(Box, {
|
|
14
14
|
name: PREFIX,
|
|
15
|
-
slot: '
|
|
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 `
|
|
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|.
|
|
34
|
+
|root|.SCFeedObjectMediaPreview-root|Styles applied to the root element.|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
* @param inProps
|
package/lib/esm/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/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js
CHANGED
|
@@ -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(
|
|
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(
|
|
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(
|
|
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
|
|
17
|
+
* @param props
|
|
18
18
|
* @constructor
|
|
19
19
|
*/
|
|
20
|
-
export default function CommentNotification(
|
|
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
|
|
43
|
+
* @param props
|
|
45
44
|
* @constructor
|
|
46
45
|
*/
|
|
47
|
-
export default function CommentNotification(
|
|
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(
|
|
20
|
+
export default function ContributionNotification(props: ContributionNotificationProps): JSX.Element;
|