@selfcommunity/react-ui 0.7.9-alpha.3 → 0.7.9-alpha.30
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/ChangeGroupCover/ChangeGroupCover.js +24 -1
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +32 -11
- package/lib/cjs/components/Composer/Attributes/Attributes.d.ts +1 -1
- package/lib/cjs/components/Composer/Attributes/Attributes.js +9 -2
- package/lib/cjs/components/Composer/Composer.d.ts +2 -1
- package/lib/cjs/components/Composer/Composer.js +39 -12
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +7 -3
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +4 -3
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +7 -1
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +46 -12
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.d.ts +2 -2
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +5 -6
- package/lib/cjs/components/CustomAdv/CustomAdv.d.ts +4 -0
- package/lib/cjs/components/{CreateGroup/CreateGroup.d.ts → EditGroupButton/EditGroupButton.d.ts} +11 -16
- package/lib/cjs/components/EditGroupButton/EditGroupButton.js +61 -0
- package/lib/cjs/components/EditGroupButton/index.d.ts +3 -0
- package/lib/cjs/components/EditGroupButton/index.js +5 -0
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +18 -0
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +18 -0
- package/lib/cjs/components/FeedObject/FeedObject.d.ts +1 -0
- package/lib/cjs/components/FeedObject/FeedObject.js +43 -9
- package/lib/cjs/components/Group/Group.d.ts +4 -3
- package/lib/cjs/components/Group/Group.js +5 -4
- package/lib/cjs/components/Group/Skeleton.js +1 -1
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.d.ts +49 -0
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +101 -0
- package/lib/cjs/components/GroupAutocomplete/index.d.ts +3 -0
- package/lib/cjs/components/GroupAutocomplete/index.js +5 -0
- package/lib/cjs/components/GroupForm/GroupForm.d.ts +70 -0
- package/lib/cjs/components/GroupForm/GroupForm.js +239 -0
- package/lib/cjs/components/GroupForm/constants.d.ts +1 -0
- package/lib/cjs/components/{CreateGroup → GroupForm}/constants.js +1 -1
- package/lib/cjs/components/GroupForm/index.d.ts +3 -0
- package/lib/cjs/components/GroupForm/index.js +5 -0
- package/lib/cjs/components/GroupHeader/GroupHeader.d.ts +6 -5
- package/lib/cjs/components/GroupHeader/GroupHeader.js +21 -11
- package/lib/cjs/components/GroupHeader/Skeleton.d.ts +2 -4
- package/lib/cjs/components/GroupHeader/Skeleton.js +10 -10
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +12 -8
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +7 -6
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.d.ts +5 -0
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.js +3 -2
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +36 -16
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +0 -5
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +17 -7
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.d.ts +48 -0
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +132 -0
- package/lib/cjs/components/GroupSettingsIconButton/index.d.ts +3 -0
- package/lib/cjs/components/GroupSettingsIconButton/index.js +5 -0
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +8 -3
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +24 -9
- package/lib/cjs/components/Groups/Groups.d.ts +16 -16
- package/lib/cjs/components/Groups/Groups.js +47 -96
- package/lib/cjs/components/Groups/Skeleton.d.ts +14 -2
- package/lib/cjs/components/Groups/Skeleton.js +12 -5
- package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.d.ts +2 -1
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuIconButton.js +1 -1
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +4 -0
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +2 -3
- package/lib/cjs/components/Notification/Group/Group.d.ts +15 -0
- package/lib/cjs/components/Notification/Group/Group.js +79 -0
- package/lib/cjs/components/Notification/Group/index.d.ts +3 -0
- package/lib/cjs/components/Notification/Group/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +32 -1
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +16 -5
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.d.ts +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +10 -7
- package/lib/cjs/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +11 -6
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts +3 -3
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +24 -6
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +6 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +45 -20
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +22 -5
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +7 -0
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +7 -0
- package/lib/cjs/components/VoteButton/VoteButton.js +19 -0
- package/lib/cjs/index.d.ts +7 -4
- package/lib/cjs/index.js +13 -6
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +24 -1
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +32 -11
- package/lib/esm/components/Composer/Attributes/Attributes.d.ts +1 -1
- package/lib/esm/components/Composer/Attributes/Attributes.js +9 -2
- package/lib/esm/components/Composer/Composer.d.ts +2 -1
- package/lib/esm/components/Composer/Composer.js +39 -12
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +7 -3
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +4 -3
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +7 -1
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +45 -12
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.d.ts +2 -2
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +5 -6
- package/lib/esm/components/CustomAdv/CustomAdv.d.ts +4 -0
- package/lib/esm/components/{CreateGroup/CreateGroup.d.ts → EditGroupButton/EditGroupButton.d.ts} +11 -16
- package/lib/esm/components/EditGroupButton/EditGroupButton.js +58 -0
- package/lib/esm/components/EditGroupButton/index.d.ts +3 -0
- package/lib/esm/components/EditGroupButton/index.js +2 -0
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +20 -2
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +20 -2
- package/lib/esm/components/FeedObject/FeedObject.d.ts +1 -0
- package/lib/esm/components/FeedObject/FeedObject.js +45 -11
- package/lib/esm/components/Group/Group.d.ts +4 -3
- package/lib/esm/components/Group/Group.js +5 -4
- package/lib/esm/components/Group/Skeleton.js +1 -1
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.d.ts +49 -0
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +99 -0
- package/lib/esm/components/GroupAutocomplete/index.d.ts +3 -0
- package/lib/esm/components/GroupAutocomplete/index.js +2 -0
- package/lib/esm/components/GroupForm/GroupForm.d.ts +70 -0
- package/lib/esm/components/GroupForm/GroupForm.js +236 -0
- package/lib/esm/components/GroupForm/constants.d.ts +1 -0
- package/lib/esm/components/GroupForm/constants.js +1 -0
- package/lib/esm/components/GroupForm/index.d.ts +3 -0
- package/lib/esm/components/GroupForm/index.js +2 -0
- package/lib/esm/components/GroupHeader/GroupHeader.d.ts +6 -5
- package/lib/esm/components/GroupHeader/GroupHeader.js +21 -11
- package/lib/esm/components/GroupHeader/Skeleton.d.ts +2 -4
- package/lib/esm/components/GroupHeader/Skeleton.js +10 -10
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +12 -8
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +7 -6
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.d.ts +5 -0
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.js +4 -3
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +38 -18
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +0 -5
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +17 -7
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.d.ts +48 -0
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +129 -0
- package/lib/esm/components/GroupSettingsIconButton/index.d.ts +3 -0
- package/lib/esm/components/GroupSettingsIconButton/index.js +2 -0
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +8 -3
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +25 -10
- package/lib/esm/components/Groups/Groups.d.ts +16 -16
- package/lib/esm/components/Groups/Groups.js +52 -101
- package/lib/esm/components/Groups/Skeleton.d.ts +14 -2
- package/lib/esm/components/Groups/Skeleton.js +13 -5
- package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.d.ts +2 -1
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuIconButton.js +1 -1
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +4 -0
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +2 -3
- package/lib/esm/components/Notification/Group/Group.d.ts +15 -0
- package/lib/esm/components/Notification/Group/Group.js +76 -0
- package/lib/esm/components/Notification/Group/index.d.ts +3 -0
- package/lib/esm/components/Notification/Group/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +32 -1
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +16 -5
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.d.ts +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +11 -8
- package/lib/esm/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +11 -6
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts +3 -3
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +26 -8
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +6 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +47 -22
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +22 -5
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +7 -0
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +7 -0
- package/lib/esm/components/VoteButton/VoteButton.js +20 -1
- package/lib/esm/index.d.ts +7 -4
- package/lib/esm/index.js +8 -5
- package/lib/umd/react-ui.js +1 -1
- package/package.json +6 -6
- package/lib/cjs/components/CreateGroup/CreateGroup.js +0 -187
- package/lib/cjs/components/CreateGroup/constants.d.ts +0 -1
- package/lib/cjs/components/CreateGroup/index.d.ts +0 -3
- package/lib/cjs/components/CreateGroup/index.js +0 -5
- package/lib/esm/components/CreateGroup/CreateGroup.js +0 -184
- package/lib/esm/components/CreateGroup/constants.d.ts +0 -1
- package/lib/esm/components/CreateGroup/constants.js +0 -1
- package/lib/esm/components/CreateGroup/index.d.ts +0 -3
- package/lib/esm/components/CreateGroup/index.js +0 -2
|
@@ -72,10 +72,12 @@ export default function PrivateMessageSnippetItem(inProps) {
|
|
|
72
72
|
// STATE
|
|
73
73
|
const hasBadge = () => {
|
|
74
74
|
var _a;
|
|
75
|
-
if (
|
|
76
|
-
|
|
75
|
+
if (message.receiver) {
|
|
76
|
+
if ((message === null || message === void 0 ? void 0 : message.receiver.id) !== ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
77
|
+
return message === null || message === void 0 ? void 0 : message.receiver.community_badge;
|
|
78
|
+
}
|
|
79
|
+
return message === null || message === void 0 ? void 0 : message.sender.community_badge;
|
|
77
80
|
}
|
|
78
|
-
return message === null || message === void 0 ? void 0 : message.sender.community_badge;
|
|
79
81
|
};
|
|
80
82
|
if (!message) {
|
|
81
83
|
return React.createElement(PrivateMessageSnippetItemSkeleton, { elevation: 0 });
|
|
@@ -86,10 +88,13 @@ export default function PrivateMessageSnippetItem(inProps) {
|
|
|
86
88
|
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { secondaryAction: secondaryAction, disablePadding: true }),
|
|
87
89
|
React.createElement(ListItemButton, { onClick: onItemClick, classes: { root: classNames({ [classes.unread]: message.thread_status === SCPrivateMessageStatusType.NEW }) } },
|
|
88
90
|
React.createElement(ListItemAvatar, null,
|
|
89
|
-
React.createElement(UserAvatar, { hide: !hasBadge() },
|
|
90
|
-
React.createElement(Avatar, { alt: ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) === message.receiver.username ? message.sender.username : message.receiver.username, src: ((_b = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _b === void 0 ? void 0 : _b.username) === message.receiver.username ? message.sender.avatar : message.receiver.avatar }))),
|
|
91
|
+
React.createElement(UserAvatar, { hide: !hasBadge() }, message.group ? (React.createElement(Avatar, { alt: message.group.name, src: message.group.image_big })) : (React.createElement(Avatar, { alt: ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) === message.receiver.username ? message.sender.username : message.receiver.username, src: ((_b = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _b === void 0 ? void 0 : _b.username) === message.receiver.username ? message.sender.avatar : message.receiver.avatar })))),
|
|
91
92
|
React.createElement(ListItemText, { primary: React.createElement(React.Fragment, null,
|
|
92
|
-
React.createElement(Typography, { component: "span", className: classes.username },
|
|
93
|
+
React.createElement(Typography, { component: "span", className: classes.username }, message.group
|
|
94
|
+
? message.group.name
|
|
95
|
+
: ((_c = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _c === void 0 ? void 0 : _c.username) === message.receiver.username
|
|
96
|
+
? message.sender.username
|
|
97
|
+
: message.receiver.username),
|
|
93
98
|
hasBadge() && preferences && (React.createElement(Chip, { component: "span", className: classes.badgeLabel, size: "small", label: preferences[SCPreferences.STAFF_STAFF_BADGE_LABEL] })),
|
|
94
99
|
React.createElement(Typography, { color: "secondary", className: classes.time, component: "span" }, `${intl.formatDate(message.last_message_at, {
|
|
95
100
|
day: '2-digit',
|
|
@@ -20,7 +20,7 @@ export interface PrivateMessageSnippetsProps extends CardProps {
|
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
22
|
snippetActions?: {
|
|
23
|
-
onSnippetClick?: (msg: any) => void;
|
|
23
|
+
onSnippetClick?: (msg: any, type: any) => void;
|
|
24
24
|
onNewMessageClick?: () => void;
|
|
25
25
|
onDeleteConfirm?: (msg: any) => void;
|
|
26
26
|
};
|
|
@@ -29,10 +29,10 @@ export interface PrivateMessageSnippetsProps extends CardProps {
|
|
|
29
29
|
*/
|
|
30
30
|
[p: string]: any;
|
|
31
31
|
/**
|
|
32
|
-
* thread user object
|
|
32
|
+
* thread user/ group object
|
|
33
33
|
* @default null
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
threadObj?: any;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* > API documentation for the Community-JS PrivateMessageSnippets component. Learn about the available props and the CSS API.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { Button, Card, CardContent, Icon, IconButton, List, TextField, useTheme } from '@mui/material';
|
|
5
5
|
import PubSub from 'pubsub-js';
|
|
6
|
-
import { SCNotificationTopicType, SCNotificationTypologyType, SCPrivateMessageStatusType } from '@selfcommunity/types';
|
|
6
|
+
import { SCNotificationTopicType, SCNotificationTypologyType, SCPrivateMessageStatusType, SCPrivateMessageType } from '@selfcommunity/types';
|
|
7
7
|
import PrivateMessageSnippetsSkeleton from './Skeleton';
|
|
8
8
|
import PrivateMessageSnippetItem from '../PrivateMessageSnippetItem';
|
|
9
9
|
import classNames from 'classnames';
|
|
@@ -69,25 +69,30 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
69
69
|
props: inProps,
|
|
70
70
|
name: PREFIX
|
|
71
71
|
});
|
|
72
|
-
const { className = null,
|
|
72
|
+
const { className = null, threadObj = null, snippetActions, clearSearch } = props, rest = __rest(props, ["className", "threadObj", "snippetActions", "clearSearch"]);
|
|
73
73
|
// STATE
|
|
74
74
|
const theme = useTheme();
|
|
75
75
|
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
|
76
76
|
const { data, updateSnippets } = useSCFetchPrivateMessageSnippets({ cacheStrategy: CacheStrategies.CACHE_FIRST });
|
|
77
77
|
const [search, setSearch] = useState('');
|
|
78
|
-
const isObj = typeof
|
|
78
|
+
const isObj = typeof threadObj === 'object';
|
|
79
79
|
const scUserContext = useContext(SCUserContext);
|
|
80
80
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
81
|
+
const [type, setType] = useState(null);
|
|
81
82
|
// INTL
|
|
82
83
|
const intl = useIntl();
|
|
83
84
|
// REFS
|
|
84
85
|
const refreshSubscription = useRef(null);
|
|
85
86
|
// CONST
|
|
86
87
|
const filteredSnippets = data.snippets.filter((el) => {
|
|
88
|
+
var _a;
|
|
87
89
|
if (search === '') {
|
|
88
90
|
return el;
|
|
89
91
|
}
|
|
90
|
-
else if (el.
|
|
92
|
+
else if (el.group) {
|
|
93
|
+
return el.group.slug.includes(search.toLowerCase());
|
|
94
|
+
}
|
|
95
|
+
else if (((_a = el === null || el === void 0 ? void 0 : el.receiver) === null || _a === void 0 ? void 0 : _a.id) === authUserId) {
|
|
91
96
|
return el.sender.username.includes(search.toLowerCase());
|
|
92
97
|
}
|
|
93
98
|
return el.receiver.username.includes(search.toLowerCase());
|
|
@@ -99,6 +104,18 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
99
104
|
}
|
|
100
105
|
return ((_b = item === null || item === void 0 ? void 0 : item.receiver) === null || _b === void 0 ? void 0 : _b.id) !== loggedUserId ? (_c = item === null || item === void 0 ? void 0 : item.receiver) === null || _c === void 0 ? void 0 : _c.id : (_d = item === null || item === void 0 ? void 0 : item.sender) === null || _d === void 0 ? void 0 : _d.id;
|
|
101
106
|
};
|
|
107
|
+
const isSelected = useMemo(() => {
|
|
108
|
+
return (message) => {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
if (type === SCPrivateMessageType.GROUP) {
|
|
111
|
+
return ((_a = message === null || message === void 0 ? void 0 : message.group) === null || _a === void 0 ? void 0 : _a.id) === (isObj ? (_b = threadObj === null || threadObj === void 0 ? void 0 : threadObj.group) === null || _b === void 0 ? void 0 : _b.id : threadObj);
|
|
112
|
+
}
|
|
113
|
+
else if (type === SCPrivateMessageType.USER) {
|
|
114
|
+
return messageReceiver(message, authUserId) === (isObj ? messageReceiver(threadObj, authUserId) : threadObj);
|
|
115
|
+
}
|
|
116
|
+
return false;
|
|
117
|
+
};
|
|
118
|
+
}, [threadObj, authUserId, type]);
|
|
102
119
|
//HANDLERS
|
|
103
120
|
const handleChange = (event) => {
|
|
104
121
|
setSearch(event.target.value);
|
|
@@ -114,7 +131,9 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
114
131
|
snippetActions && snippetActions.onDeleteConfirm(msg);
|
|
115
132
|
};
|
|
116
133
|
function handleOpenThread(msg) {
|
|
117
|
-
|
|
134
|
+
const _type = msg.group !== null ? SCPrivateMessageType.GROUP : SCPrivateMessageType.USER;
|
|
135
|
+
setType(_type);
|
|
136
|
+
snippetActions && snippetActions.onSnippetClick(msg, _type);
|
|
118
137
|
handleClear();
|
|
119
138
|
updateSnippetsParams(msg.id, 'seen');
|
|
120
139
|
}
|
|
@@ -219,6 +238,5 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
219
238
|
} }),
|
|
220
239
|
React.createElement(List, null, filteredSnippets.map((message) => (React.createElement(PrivateMessageSnippetItem, { message: message, key: message.id, onItemClick: () => handleOpenThread(message), secondaryAction: React.createElement(React.Fragment, null,
|
|
221
240
|
message.thread_status === SCPrivateMessageStatusType.NEW && (React.createElement(Icon, { fontSize: "small", color: "secondary" }, "fiber_manual_record")),
|
|
222
|
-
!isMobile && (React.createElement(PrivateMessageSettingsIconButton, { threadToDelete: messageReceiver(message, authUserId), onItemDeleteConfirm: () => handleDeleteConversation(messageReceiver(message, authUserId)), user: messageReceiver(message, authUserId, true) }))), selected:
|
|
223
|
-
messageReceiver(message, authUserId) === (isObj ? messageReceiver(userObj, authUserId) : userObj) })))))))));
|
|
241
|
+
!isMobile && (React.createElement(PrivateMessageSettingsIconButton, { threadToDelete: messageReceiver(message, authUserId), onItemDeleteConfirm: () => handleDeleteConversation(messageReceiver(message, authUserId)), user: messageReceiver(message, authUserId, true) }))), selected: isSelected(message) })))))))));
|
|
224
242
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { SCPrivateMessageType } from '@selfcommunity/types';
|
|
1
2
|
import { CardProps } from '@mui/material';
|
|
2
3
|
export interface PrivateMessageThreadProps extends CardProps {
|
|
3
4
|
/**
|
|
4
5
|
* Thread object or thread id
|
|
5
6
|
* default null
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
threadObj?: any;
|
|
8
9
|
/**
|
|
9
10
|
* Overrides or extends the styles applied to the component.
|
|
10
11
|
* @default null
|
|
@@ -30,6 +31,10 @@ export interface PrivateMessageThreadProps extends CardProps {
|
|
|
30
31
|
* @default null
|
|
31
32
|
*/
|
|
32
33
|
onSingleMessageOpen?: (open: boolean) => void;
|
|
34
|
+
/**
|
|
35
|
+
* The Thread type
|
|
36
|
+
*/
|
|
37
|
+
type?: SCPrivateMessageType;
|
|
33
38
|
/**
|
|
34
39
|
* Any other properties
|
|
35
40
|
*/
|
|
@@ -3,11 +3,11 @@ import React, { useCallback, useContext, useEffect, useMemo, useRef, useState }
|
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { Endpoints, http, PrivateMessageService } from '@selfcommunity/api-services';
|
|
5
5
|
import { SCUserContext, UserUtils, useSCFetchUser } from '@selfcommunity/react-core';
|
|
6
|
-
import { SCNotificationTopicType, SCNotificationTypologyType, SCPrivateMessageStatusType } from '@selfcommunity/types';
|
|
6
|
+
import { SCNotificationTopicType, SCNotificationTypologyType, SCPrivateMessageStatusType, SCPrivateMessageType } from '@selfcommunity/types';
|
|
7
7
|
import PrivateMessageThreadItem, { PrivateMessageThreadItemSkeleton } from '../PrivateMessageThreadItem';
|
|
8
8
|
import PubSub from 'pubsub-js';
|
|
9
9
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
10
|
-
import { Box, Card, CardContent, IconButton, List, ListSubheader, TextField, Typography } from '@mui/material';
|
|
10
|
+
import { Avatar, Box, Card, CardContent, IconButton, List, ListItemAvatar, ListSubheader, TextField, Typography } from '@mui/material';
|
|
11
11
|
import PrivateMessageEditor from '../PrivateMessageEditor';
|
|
12
12
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
13
13
|
import classNames from 'classnames';
|
|
@@ -41,6 +41,8 @@ const classes = {
|
|
|
41
41
|
newMessageContent: `${PREFIX}-new-message-content`,
|
|
42
42
|
sender: `${PREFIX}-sender`,
|
|
43
43
|
receiver: `${PREFIX}-receiver`,
|
|
44
|
+
avatar: `${PREFIX}-avatar`,
|
|
45
|
+
item: `${PREFIX}-item`,
|
|
44
46
|
autocomplete: `${PREFIX}-autocomplete`,
|
|
45
47
|
autocompleteDialog: `${PREFIX}-autocomplete-dialog`,
|
|
46
48
|
editor: `${PREFIX}-editor`
|
|
@@ -93,7 +95,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
93
95
|
props: inProps,
|
|
94
96
|
name: PREFIX
|
|
95
97
|
});
|
|
96
|
-
const {
|
|
98
|
+
const { threadObj, openNewMessage = false, onNewMessageClose = null, onNewMessageSent = null, onSingleMessageOpen = null, className, type } = props, rest = __rest(props, ["threadObj", "openNewMessage", "onNewMessageClose", "onNewMessageSent", "onSingleMessageOpen", "className", "type"]);
|
|
97
99
|
// CONTEXT
|
|
98
100
|
const scUserContext = useContext(SCUserContext);
|
|
99
101
|
// STATE
|
|
@@ -104,7 +106,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
104
106
|
const [loading, setLoading] = useState(false);
|
|
105
107
|
const [isHovered, setIsHovered] = useState({});
|
|
106
108
|
const [followers, setFollowers] = useState([]);
|
|
107
|
-
const isNew =
|
|
109
|
+
const isNew = threadObj && threadObj === SCPrivateMessageStatusType.NEW;
|
|
108
110
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
109
111
|
const [singleMessageUser, setSingleMessageUser] = useState(null);
|
|
110
112
|
const [receiver, setReceiver] = useState(null);
|
|
@@ -113,7 +115,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
113
115
|
const [openDeleteMessageDialog, setOpenDeleteMessageDialog] = useState(false);
|
|
114
116
|
const [recipients, setRecipients] = useState([]);
|
|
115
117
|
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
|
|
116
|
-
const isNumber = typeof
|
|
118
|
+
const isNumber = typeof threadObj === 'number';
|
|
117
119
|
const messageReceiver = (item, loggedUserId) => {
|
|
118
120
|
var _a, _b, _c;
|
|
119
121
|
return ((_a = item === null || item === void 0 ? void 0 : item.receiver) === null || _a === void 0 ? void 0 : _a.id) !== loggedUserId ? (_b = item === null || item === void 0 ? void 0 : item.receiver) === null || _b === void 0 ? void 0 : _b.id : (_c = item === null || item === void 0 ? void 0 : item.sender) === null || _c === void 0 ? void 0 : _c.id;
|
|
@@ -126,7 +128,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
126
128
|
// HOOKS
|
|
127
129
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
128
130
|
// @ts-ignore
|
|
129
|
-
const { scUser } = useSCFetchUser({ id:
|
|
131
|
+
const { scUser } = useSCFetchUser({ id: threadObj, threadObj });
|
|
130
132
|
const messagesEndRef = useRef(null);
|
|
131
133
|
const scrollToBottom = () => {
|
|
132
134
|
var _a;
|
|
@@ -254,9 +256,9 @@ export default function PrivateMessageThread(inProps) {
|
|
|
254
256
|
* Fetches thread
|
|
255
257
|
*/
|
|
256
258
|
function fetchThread() {
|
|
257
|
-
if (
|
|
259
|
+
if (threadObj && typeof threadObj !== 'string' && type !== SCPrivateMessageType.GROUP) {
|
|
258
260
|
setLoadingMessageObjs(true);
|
|
259
|
-
const _userObjId = isNumber ?
|
|
261
|
+
const _userObjId = isNumber ? threadObj : messageReceiver(threadObj, authUserId);
|
|
260
262
|
PrivateMessageService.getAThread({ user: _userObjId, limit: 10 })
|
|
261
263
|
.then((res) => {
|
|
262
264
|
setMessageObjs(res.results);
|
|
@@ -289,6 +291,19 @@ export default function PrivateMessageThread(inProps) {
|
|
|
289
291
|
Logger.error(SCOPE_SC_UI, { error });
|
|
290
292
|
});
|
|
291
293
|
}
|
|
294
|
+
else if (type === SCPrivateMessageType.GROUP) {
|
|
295
|
+
PrivateMessageService.getAThread({ group: isNumber ? threadObj : threadObj.group.id, limit: 10 })
|
|
296
|
+
.then((res) => {
|
|
297
|
+
setMessageObjs(res.results);
|
|
298
|
+
setPrevious(res.next && updateAndDeleteURLParameters(res.next, 'before_message', res.results[0].id, 'offset'));
|
|
299
|
+
setLoadingMessageObjs(false);
|
|
300
|
+
})
|
|
301
|
+
.catch((error) => {
|
|
302
|
+
setLoadingMessageObjs(false);
|
|
303
|
+
console.log(error);
|
|
304
|
+
Logger.error(SCOPE_SC_UI, { error });
|
|
305
|
+
});
|
|
306
|
+
}
|
|
292
307
|
}
|
|
293
308
|
const isNewerThan60Seconds = (creationTime) => {
|
|
294
309
|
const date = new Date(creationTime);
|
|
@@ -353,11 +368,15 @@ export default function PrivateMessageThread(inProps) {
|
|
|
353
368
|
.request({
|
|
354
369
|
url: Endpoints.SendMessage.url(),
|
|
355
370
|
method: Endpoints.SendMessage.method,
|
|
356
|
-
data: {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
371
|
+
data: Object.assign(Object.assign({}, (type === SCPrivateMessageType.GROUP
|
|
372
|
+
? { group: isNumber ? threadObj : threadObj.group.id }
|
|
373
|
+
: {
|
|
374
|
+
recipients: openNewMessage || isNew || singleMessageThread
|
|
375
|
+
? ids
|
|
376
|
+
: [isNumber && threadObj ? threadObj : messageReceiver(threadObj, authUserId)]
|
|
377
|
+
})), {
|
|
378
|
+
// recipients: openNewMessage || isNew || singleMessageThread ? ids : [isNumber && threadObj ? threadObj : messageReceiver(threadObj, authUserId)],
|
|
379
|
+
message: message, file_uuid: file && !message ? file : null })
|
|
361
380
|
})
|
|
362
381
|
.then((res) => {
|
|
363
382
|
const isOne = res.data.length <= 1;
|
|
@@ -403,13 +422,13 @@ export default function PrivateMessageThread(inProps) {
|
|
|
403
422
|
if (!authUserId) {
|
|
404
423
|
return;
|
|
405
424
|
}
|
|
406
|
-
if (
|
|
425
|
+
if (threadObj) {
|
|
407
426
|
fetchThread();
|
|
408
427
|
}
|
|
409
428
|
else {
|
|
410
429
|
reset();
|
|
411
430
|
}
|
|
412
|
-
}, [
|
|
431
|
+
}, [threadObj, authUserId, scUser]);
|
|
413
432
|
/**
|
|
414
433
|
* Notification subscriber
|
|
415
434
|
*/
|
|
@@ -424,7 +443,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
424
443
|
if (index !== -1) {
|
|
425
444
|
setMessageObjs((prev) => [...prev, res.notification_obj.message]);
|
|
426
445
|
}
|
|
427
|
-
if (isNumber ?
|
|
446
|
+
if (isNumber ? threadObj === res.thread_id : threadObj.id === res.thread_id) {
|
|
428
447
|
scrollToBottom();
|
|
429
448
|
}
|
|
430
449
|
};
|
|
@@ -451,11 +470,17 @@ export default function PrivateMessageThread(inProps) {
|
|
|
451
470
|
React.createElement("ul", null,
|
|
452
471
|
React.createElement(ListSubheader, null,
|
|
453
472
|
React.createElement(Typography, { align: "center", className: classes.subHeader }, key)),
|
|
454
|
-
formattedMessages[key].map((msg) =>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
473
|
+
formattedMessages[key].map((msg) => {
|
|
474
|
+
var _a;
|
|
475
|
+
return (React.createElement(Box, { className: classes.item, key: msg.id },
|
|
476
|
+
msg.group && ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) !== msg.sender.username && (React.createElement(ListItemAvatar, null,
|
|
477
|
+
React.createElement(Avatar, { alt: msg.sender.username, src: msg.sender.avatar, className: classes.avatar }))),
|
|
478
|
+
React.createElement(PrivateMessageThreadItem, { className: authUserId === msg.sender.id ? classes.sender : classes.receiver, message: msg, key: msg.id, mouseEvents: {
|
|
479
|
+
onMouseEnter: () => handleMouseEnter(msg.id),
|
|
480
|
+
onMouseLeave: () => handleMouseLeave(msg.id)
|
|
481
|
+
}, isHovering: isHovered[msg.id], showMenuIcon: authUserId === msg.sender.id, onMenuIconClick: () => handleOpenDeleteMessageDialog(msg) })));
|
|
482
|
+
}))))))),
|
|
483
|
+
React.createElement(PrivateMessageEditor, { className: classes.editor, send: handleSend, autoHide: type === SCPrivateMessageType.USER && !(scUser === null || scUser === void 0 ? void 0 : scUser.can_send_pm_to), autoHideDeletion: type === SCPrivateMessageType.USER && ((receiver === null || receiver === void 0 ? void 0 : receiver.deleted) || (scUser === null || scUser === void 0 ? void 0 : scUser.deleted)), onThreadChangeId: isNumber ? threadObj : type === SCPrivateMessageType.USER ? threadObj.receiver.id : threadObj.group.id, error: error, onErrorRemove: () => setError(false) }),
|
|
459
484
|
openDeleteMessageDialog && (React.createElement(ConfirmDialog, { open: openDeleteMessageDialog, title: React.createElement(FormattedMessage, { id: "ui.privateMessage.component.delete.message.dialog.msg", defaultMessage: "ui.privateMessage.component.delete.message.dialog.msg" }), btnConfirm: React.createElement(FormattedMessage, { id: "ui.privateMessage.component.delete.message.dialog.confirm", defaultMessage: "ui.privateMessage.component.delete.message.dialog.confirm" }), onConfirm: handleDeleteMessage, onClose: handleCloseDeleteMessageDialog }))));
|
|
460
485
|
}
|
|
461
486
|
/**
|
|
@@ -483,5 +508,5 @@ export default function PrivateMessageThread(inProps) {
|
|
|
483
508
|
/**
|
|
484
509
|
* Renders the component
|
|
485
510
|
*/
|
|
486
|
-
return (React.createElement(Root, Object.assign({}, rest, { className: classNames(classes.root, className) }),
|
|
511
|
+
return (React.createElement(Root, Object.assign({}, rest, { className: classNames(classes.root, className) }), threadObj !== null && !isNew && !singleMessageThread ? renderThread() : renderNewOrNoMessageBox()));
|
|
487
512
|
}
|
|
@@ -73,6 +73,25 @@ export default function SearchAutocomplete(inProps) {
|
|
|
73
73
|
setOptions([]);
|
|
74
74
|
onClear && onClear();
|
|
75
75
|
};
|
|
76
|
+
const getOptionData = (option) => {
|
|
77
|
+
let data = {};
|
|
78
|
+
if (option.type === SuggestionType.USER) {
|
|
79
|
+
data.name = option[SuggestionType.USER]['username'];
|
|
80
|
+
data.image = option[SuggestionType.USER]['avatar'];
|
|
81
|
+
data.variant = 'circular';
|
|
82
|
+
}
|
|
83
|
+
else if (option.type === SuggestionType.CATEGORY) {
|
|
84
|
+
data.name = option[SuggestionType.CATEGORY]['name'];
|
|
85
|
+
data.image = option[SuggestionType.CATEGORY]['image_medium'];
|
|
86
|
+
data.variant = 'square';
|
|
87
|
+
}
|
|
88
|
+
else if (option.type === SuggestionType.GROUP) {
|
|
89
|
+
data.name = option[SuggestionType.GROUP]['name'];
|
|
90
|
+
data.image = option[SuggestionType.GROUP]['image_big'];
|
|
91
|
+
data.variant = 'circular';
|
|
92
|
+
}
|
|
93
|
+
return data;
|
|
94
|
+
};
|
|
76
95
|
function fetchResults() {
|
|
77
96
|
setIsLoading(true);
|
|
78
97
|
SuggestionService.getSearchSuggestion(value)
|
|
@@ -96,11 +115,9 @@ export default function SearchAutocomplete(inProps) {
|
|
|
96
115
|
return option;
|
|
97
116
|
}
|
|
98
117
|
return (_a = option[option.type]['username']) !== null && _a !== void 0 ? _a : option[option.type]['name'];
|
|
99
|
-
}, renderOption: (props, option) => (React.createElement(Box, Object.assign({ component: "li" }, props),
|
|
100
|
-
React.createElement(Avatar, { alt: option
|
|
101
|
-
React.createElement(Typography, { ml: 1 }, option
|
|
102
|
-
React.createElement(Avatar, { alt: option[SuggestionType.CATEGORY]['name'], src: option[SuggestionType.CATEGORY]['image_medium'], variant: "square" }),
|
|
103
|
-
React.createElement(Typography, { ml: 1 }, option[SuggestionType.CATEGORY]['name']))))), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: `${intl.formatMessage(messages.placeholder, {
|
|
118
|
+
}, renderOption: (props, option) => (React.createElement(Box, Object.assign({ component: "li" }, props),
|
|
119
|
+
React.createElement(Avatar, { alt: getOptionData(option).name, src: getOptionData(option).image, variant: getOptionData(option).variant }),
|
|
120
|
+
React.createElement(Typography, { ml: 1 }, getOptionData(option).name))), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: `${intl.formatMessage(messages.placeholder, {
|
|
104
121
|
community: scPreferences.preferences[SCPreferences.TEXT_APPLICATION_NAME].value
|
|
105
122
|
})}`, InputProps: Object.assign(Object.assign({}, params.InputProps), { autoFocus, name: 'search-autocomplete', className: classes.input, startAdornment: React.createElement(Icon, { className: classes.icon }, "search"), endAdornment: (React.createElement(Fade, { in: value.length > 0 || Boolean(onClear), appear: false },
|
|
106
123
|
React.createElement(IconButton, { className: classes.clear, onClick: handleClear, size: "small" },
|
|
@@ -31,6 +31,7 @@ import { useThemeProps } from '@mui/system';
|
|
|
31
31
|
import ContributionNotification from '../Notification/Contribution';
|
|
32
32
|
import NotificationItem from '../../shared/NotificationItem';
|
|
33
33
|
import { PREFIX } from './constants';
|
|
34
|
+
import GroupNotification from '../Notification/Group';
|
|
34
35
|
const classes = {
|
|
35
36
|
root: `${PREFIX}-root`,
|
|
36
37
|
notificationsWrap: `${PREFIX}-notifications-wrap`,
|
|
@@ -252,6 +253,12 @@ export default function SnippetNotifications(inProps) {
|
|
|
252
253
|
else if (type === SCNotificationTypologyType.CONTRIBUTION) {
|
|
253
254
|
content = React.createElement(ContributionNotification, { notificationObject: n, key: i, template: SCNotificationObjectTemplateType.SNIPPET });
|
|
254
255
|
}
|
|
256
|
+
else if (n.type === SCNotificationTypologyType.USER_ADDED_TO_GROUP ||
|
|
257
|
+
n.type === SCNotificationTypologyType.USER_INVITED_TO_JOIN_GROUP ||
|
|
258
|
+
n.type === SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP ||
|
|
259
|
+
n.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP) {
|
|
260
|
+
return React.createElement(GroupNotification, { notificationObject: n, key: i, template: SCNotificationObjectTemplateType.SNIPPET });
|
|
261
|
+
}
|
|
255
262
|
if (type && handleNotification) {
|
|
256
263
|
/** Override content */
|
|
257
264
|
content = handleNotification(type, n, content);
|
|
@@ -21,6 +21,7 @@ import Message from '../BroadcastMessages/Message';
|
|
|
21
21
|
import { useThemeProps } from '@mui/system';
|
|
22
22
|
import ContributionNotification from '../Notification/Contribution';
|
|
23
23
|
import { PREFIX } from './constants';
|
|
24
|
+
import GroupNotification from '../Notification/Group';
|
|
24
25
|
const Root = styled(Box, {
|
|
25
26
|
name: PREFIX,
|
|
26
27
|
slot: 'Root'
|
|
@@ -108,6 +109,12 @@ export default function UserToastNotifications(inProps) {
|
|
|
108
109
|
else if (type === SCNotificationTypologyType.CONTRIBUTION) {
|
|
109
110
|
content = React.createElement(ContributionNotification, { notificationObject: n.notification_obj, template: SCNotificationObjectTemplateType.TOAST });
|
|
110
111
|
}
|
|
112
|
+
else if (type === SCNotificationTypologyType.USER_ADDED_TO_GROUP ||
|
|
113
|
+
type === SCNotificationTypologyType.USER_INVITED_TO_JOIN_GROUP ||
|
|
114
|
+
type === SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP ||
|
|
115
|
+
type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP) {
|
|
116
|
+
content = React.createElement(GroupNotification, { notificationObject: n.notification_obj, template: SCNotificationObjectTemplateType.TOAST });
|
|
117
|
+
}
|
|
111
118
|
}
|
|
112
119
|
if (n.activity_type && n.activity_type === SCNotificationTypologyType.NOTIFICATION_BANNER) {
|
|
113
120
|
/** Notification of type: 'notification_banner' */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import React, { useMemo, useRef, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { LoadingButton } from '@mui/lab';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
+
import { SCGroupSubscriptionStatusType } from '@selfcommunity/types';
|
|
6
7
|
import { useThemeProps } from '@mui/system';
|
|
7
8
|
import Icon from '@mui/material/Icon';
|
|
8
9
|
import { IconButton, Paper, Popper, Tooltip, useMediaQuery, useTheme } from '@mui/material';
|
|
@@ -52,6 +53,7 @@ const PopperRoot = styled(Popper, {
|
|
|
52
53
|
* @param inProps
|
|
53
54
|
*/
|
|
54
55
|
export default function VoteButton(inProps) {
|
|
56
|
+
var _a;
|
|
55
57
|
// PROPS
|
|
56
58
|
const props = useThemeProps({
|
|
57
59
|
props: inProps,
|
|
@@ -60,11 +62,13 @@ export default function VoteButton(inProps) {
|
|
|
60
62
|
const { className, contributionId, contributionType, contribution = null, onVote } = props, rest = __rest(props, ["className", "contributionId", "contributionType", "contribution", "onVote"]);
|
|
61
63
|
// STATE
|
|
62
64
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
65
|
+
const [status, setStatus] = useState(null);
|
|
63
66
|
// REF
|
|
64
67
|
const timeoutRef = useRef(null);
|
|
65
68
|
// CONTEXT
|
|
66
69
|
const scContext = useSCContext();
|
|
67
70
|
const scUserContext = useSCUser();
|
|
71
|
+
const scGroupsManager = scUserContext.managers.groups;
|
|
68
72
|
const { enqueueSnackbar } = useSnackbar();
|
|
69
73
|
// HANDLERS
|
|
70
74
|
const handleMouseEnter = (event) => {
|
|
@@ -79,6 +83,15 @@ export default function VoteButton(inProps) {
|
|
|
79
83
|
timeoutRef.current && clearTimeout(timeoutRef.current);
|
|
80
84
|
timeoutRef.current = null;
|
|
81
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* If the obj has a group, checks the subscription status for the authenticated user
|
|
88
|
+
*/
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
var _a;
|
|
91
|
+
if (((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.id) && (contribution === null || contribution === void 0 ? void 0 : contribution.group)) {
|
|
92
|
+
setStatus(scGroupsManager.subscriptionStatus(contribution === null || contribution === void 0 ? void 0 : contribution.group));
|
|
93
|
+
}
|
|
94
|
+
}, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.id, scGroupsManager.subscriptionStatus, contribution === null || contribution === void 0 ? void 0 : contribution.group]);
|
|
82
95
|
/**
|
|
83
96
|
* Perform vote action
|
|
84
97
|
* @param reaction
|
|
@@ -93,6 +106,12 @@ export default function VoteButton(inProps) {
|
|
|
93
106
|
autoHideDuration: 3000
|
|
94
107
|
});
|
|
95
108
|
}
|
|
109
|
+
else if ((contribution === null || contribution === void 0 ? void 0 : contribution.group) && status !== SCGroupSubscriptionStatusType.SUBSCRIBED) {
|
|
110
|
+
enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.common.group.actions.unsubscribed", defaultMessage: "ui.common.group.actions.unsubscribed" }), {
|
|
111
|
+
variant: 'warning',
|
|
112
|
+
autoHideDuration: 3000
|
|
113
|
+
});
|
|
114
|
+
}
|
|
96
115
|
else {
|
|
97
116
|
handleVote(reaction);
|
|
98
117
|
}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ import BaseItem, { BaseItemProps } from './shared/BaseItem';
|
|
|
80
80
|
import BaseDialog, { BaseDialogProps } from './shared/BaseDialog';
|
|
81
81
|
import MediaChunkUploader, { MediaChunkUploaderProps } from './shared/MediaChunkUploader';
|
|
82
82
|
import { File, EditMediaProps, Link, Share } from './shared/Media';
|
|
83
|
+
import HiddenPlaceholder from './shared/HiddenPlaceholder';
|
|
83
84
|
import UrlTextField from './shared/UrlTextField';
|
|
84
85
|
import UsernameTextField from './shared/UsernameTextField';
|
|
85
86
|
import EmailTextField from './shared/EmailTextField';
|
|
@@ -108,15 +109,17 @@ import ChangeGroupCover, { ChangeGroupCoverProps } from './components/ChangeGrou
|
|
|
108
109
|
import ChangeGroupPicture, { ChangeGroupPictureProps } from './components/ChangeGroupPicture';
|
|
109
110
|
import GroupHeader, { GroupHeaderProps, GroupHeaderSkeleton } from './components/GroupHeader';
|
|
110
111
|
import GroupMembersButton, { GroupMembersButtonProps } from './components/GroupMembersButton';
|
|
111
|
-
import CreateGroupButton from './components/CreateGroupButton';
|
|
112
|
-
import
|
|
112
|
+
import CreateGroupButton, { CreateGroupButtonProps } from './components/CreateGroupButton';
|
|
113
|
+
import EditGroupButton, { EditGroupButtonProps } from './components/EditGroupButton';
|
|
113
114
|
import GroupInviteButton, { GroupInviteButtonProps } from './components/GroupInviteButton';
|
|
114
115
|
import GroupInfoWidget, { GroupInfoWidgetProps, GroupInfoWidgetSkeleton } from './components/GroupInfoWidget';
|
|
115
|
-
import Group, { GroupProps } from './components/Group';
|
|
116
|
+
import Group, { GroupProps, GroupSkeleton } from './components/Group';
|
|
116
117
|
import GroupSubscribeButton, { GroupSubscribeButtonProps } from './components/GroupSubscribeButton';
|
|
117
118
|
import GroupMembersWidget, { GroupMembersWidgetProps, GroupMembersWidgetSkeleton } from './components/GroupMembersWidget';
|
|
118
119
|
import GroupRequestsWidget, { GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton } from './components/GroupRequestsWidget';
|
|
119
120
|
import Groups, { GroupsProps, GroupsSkeleton } from './components/Groups';
|
|
121
|
+
import GroupForm, { GroupFormProps } from './components/GroupForm';
|
|
122
|
+
import GroupSettingsIconButton, { GroupSettingsIconButtonProps } from './components/GroupSettingsIconButton';
|
|
120
123
|
/**
|
|
121
124
|
* Constants
|
|
122
125
|
*/
|
|
@@ -141,4 +144,4 @@ import FeedObjectMediaPreview, { FeedObjectMediaPreviewProps } from './component
|
|
|
141
144
|
/**
|
|
142
145
|
* List all exports
|
|
143
146
|
*/
|
|
144
|
-
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton,
|
|
147
|
+
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton, CreateGroupButtonProps, EditGroupButton, EditGroupButtonProps, GroupInviteButton, GroupInviteButtonProps, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, Group, GroupProps, GroupSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupsProps, GroupsSkeleton, GroupForm, GroupFormProps, HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, StickyBoxProps, StickyBoxComponent, UseStickyBoxProps, TagChip, TagChipProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserAvatar, UserAvatarProps, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, MediaChunkUploaderProps, File, Link, Share, EditMediaProps, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, TWITTER_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT, ConsentSolution, ConsentSolutionProps, ConsentSolutionSkeleton, ConsentSolutionButton, ConsentSolutionButtonProps, LEGAL_POLICIES, DEFAULT_FIELDS, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, PollSuggestionWidgetProps, Incubator, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorDetail, IncubatorDetailProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterProps, FooterSkeleton, BaseItem, BaseItemProps, BaseDialog, BaseDialogProps, GroupSettingsIconButton, GroupSettingsIconButtonProps };
|
package/lib/esm/index.js
CHANGED
|
@@ -80,6 +80,7 @@ import BaseItem from './shared/BaseItem';
|
|
|
80
80
|
import BaseDialog from './shared/BaseDialog';
|
|
81
81
|
import MediaChunkUploader from './shared/MediaChunkUploader';
|
|
82
82
|
import { File, Link, Share } from './shared/Media';
|
|
83
|
+
import HiddenPlaceholder from './shared/HiddenPlaceholder';
|
|
83
84
|
import UrlTextField from './shared/UrlTextField';
|
|
84
85
|
import UsernameTextField from './shared/UsernameTextField';
|
|
85
86
|
import EmailTextField from './shared/EmailTextField';
|
|
@@ -109,14 +110,16 @@ import ChangeGroupPicture from './components/ChangeGroupPicture';
|
|
|
109
110
|
import GroupHeader, { GroupHeaderSkeleton } from './components/GroupHeader';
|
|
110
111
|
import GroupMembersButton from './components/GroupMembersButton';
|
|
111
112
|
import CreateGroupButton from './components/CreateGroupButton';
|
|
112
|
-
import
|
|
113
|
+
import EditGroupButton from './components/EditGroupButton';
|
|
113
114
|
import GroupInviteButton from './components/GroupInviteButton';
|
|
114
115
|
import GroupInfoWidget, { GroupInfoWidgetSkeleton } from './components/GroupInfoWidget';
|
|
115
|
-
import Group from './components/Group';
|
|
116
|
+
import Group, { GroupSkeleton } from './components/Group';
|
|
116
117
|
import GroupSubscribeButton from './components/GroupSubscribeButton';
|
|
117
118
|
import GroupMembersWidget, { GroupMembersWidgetSkeleton } from './components/GroupMembersWidget';
|
|
118
119
|
import GroupRequestsWidget, { GroupRequestsWidgetSkeleton } from './components/GroupRequestsWidget';
|
|
119
120
|
import Groups, { GroupsSkeleton } from './components/Groups';
|
|
121
|
+
import GroupForm from './components/GroupForm';
|
|
122
|
+
import GroupSettingsIconButton from './components/GroupSettingsIconButton';
|
|
120
123
|
/**
|
|
121
124
|
* Constants
|
|
122
125
|
*/
|
|
@@ -141,10 +144,10 @@ import FeedObjectMediaPreview from './components/FeedObjectMediaPreview';
|
|
|
141
144
|
/**
|
|
142
145
|
* List all exports
|
|
143
146
|
*/
|
|
144
|
-
export { AccountDataPortability, AccountDataPortabilityButton, AccountDelete, AccountDeleteButton, AccountRecover, AccountReset, AccountVerify, AccountChangeMailValidation, NavigationSettingsIconButton, NavigationToolbarMobile, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, BottomNavigation, BroadcastMessages, BroadcastMessagesSkeleton, Category, CategorySkeleton, CategoryAutocomplete, CategoryFollowersButton, CategoryHeader, CategoryHeaderSkeleton, Categories, CategoriesSkeleton, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, Composer, ComposerIconButton, Editor, EditorSkeleton, FriendshipUserButton, Feed, FeedSkeleton, CategoryFollowButton, FollowUserButton, ConnectionUserButton, FeedObject, FeedObjectSkeleton, FeedObjectMediaPreview, FeedUpdatesWidget, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentsFeedObject, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetSkeleton, Notification, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetSkeleton, LocationAutocomplete, LoyaltyProgramWidget, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserCounters, UserProfileHeader, UserProfileHeaderSkeleton, UserInfoDialog, UserInfo, UserInfoSkeleton, UserProfileBlocked, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionSettings, UserProfileEditSectionAccount, UserFollowedUsersWidget, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, SCUserSocialAssociations, CustomAdv, CustomAdvSkeleton, User, UserSkeleton, PrivateMessageThread, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, ToastNotifications, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsSkeleton, SearchAutocomplete, SearchDialog, Widget, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupPicture, GroupHeader, GroupHeaderSkeleton, GroupMembersButton, CreateGroupButton,
|
|
147
|
+
export { AccountDataPortability, AccountDataPortabilityButton, AccountDelete, AccountDeleteButton, AccountRecover, AccountReset, AccountVerify, AccountChangeMailValidation, NavigationSettingsIconButton, NavigationToolbarMobile, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, BottomNavigation, BroadcastMessages, BroadcastMessagesSkeleton, Category, CategorySkeleton, CategoryAutocomplete, CategoryFollowersButton, CategoryHeader, CategoryHeaderSkeleton, Categories, CategoriesSkeleton, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, Composer, ComposerIconButton, Editor, EditorSkeleton, FriendshipUserButton, Feed, FeedSkeleton, CategoryFollowButton, FollowUserButton, ConnectionUserButton, FeedObject, FeedObjectSkeleton, FeedObjectMediaPreview, FeedUpdatesWidget, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentsFeedObject, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetSkeleton, Notification, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetSkeleton, LocationAutocomplete, LoyaltyProgramWidget, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserCounters, UserProfileHeader, UserProfileHeaderSkeleton, UserInfoDialog, UserInfo, UserInfoSkeleton, UserProfileBlocked, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionSettings, UserProfileEditSectionAccount, UserFollowedUsersWidget, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, SCUserSocialAssociations, CustomAdv, CustomAdvSkeleton, User, UserSkeleton, PrivateMessageThread, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, ToastNotifications, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsSkeleton, SearchAutocomplete, SearchDialog, Widget, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupPicture, GroupHeader, GroupHeaderSkeleton, GroupMembersButton, CreateGroupButton, EditGroupButton, GroupInviteButton, GroupInfoWidget, GroupInfoWidgetSkeleton, Group, GroupSkeleton, GroupSubscribeButton, GroupMembersWidget, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetSkeleton, Groups, GroupsSkeleton, GroupForm,
|
|
145
148
|
/* SC UI SHARED */
|
|
146
|
-
UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, TagChip, UserDeletedSnackBar, UserAvatar, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, File, Link, Share, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, TWITTER_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT,
|
|
149
|
+
HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, TagChip, UserDeletedSnackBar, UserAvatar, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, File, Link, Share, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, TWITTER_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT,
|
|
147
150
|
/* SC CONSENT SOLUTION */
|
|
148
151
|
ConsentSolution, ConsentSolutionSkeleton, ConsentSolutionButton, LEGAL_POLICIES, DEFAULT_FIELDS,
|
|
149
152
|
/* SC UI PAGINATION */
|
|
150
|
-
DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, Incubator, IncubatorSubscribeButton, IncubatorListWidget, IncubatorDetail, IncubatorSuggestionWidget, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterSkeleton, BaseItem, BaseDialog };
|
|
153
|
+
DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, Incubator, IncubatorSubscribeButton, IncubatorListWidget, IncubatorDetail, IncubatorSuggestionWidget, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterSkeleton, BaseItem, BaseDialog, GroupSettingsIconButton };
|