@selfcommunity/react-ui 0.7.50-alpha.1 → 0.7.50-event.28
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/assets/logo.d.ts +2 -0
- package/lib/cjs/assets/logo.js +3 -0
- package/lib/cjs/components/Category/Category.d.ts +1 -1
- package/lib/cjs/components/Category/Category.js +1 -1
- package/lib/cjs/components/ChangeCover/ChangeCover.js +3 -3
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
- package/lib/cjs/components/Composer/Composer.js +9 -7
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
- package/lib/cjs/components/CreateEventButton/CreateEventButton.d.ts +38 -0
- package/lib/cjs/components/CreateEventButton/CreateEventButton.js +79 -0
- package/lib/cjs/components/CreateEventButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateEventButton/index.js +5 -0
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +1 -1
- package/lib/cjs/components/Event/Event.d.ts +57 -0
- package/lib/cjs/components/Event/Event.js +90 -0
- package/lib/cjs/components/Event/Skeleton.d.ts +22 -0
- package/lib/cjs/components/Event/Skeleton.js +44 -0
- package/lib/cjs/components/Event/constants.d.ts +1 -0
- package/lib/cjs/components/Event/constants.js +4 -0
- package/lib/cjs/components/Event/index.d.ts +4 -0
- package/lib/cjs/components/Event/index.js +8 -0
- package/lib/cjs/components/EventForm/EventAddress.d.ts +12 -0
- package/lib/cjs/components/EventForm/EventAddress.js +129 -0
- package/lib/cjs/components/EventForm/EventForm.d.ts +59 -0
- package/lib/cjs/components/EventForm/EventForm.js +323 -0
- package/lib/cjs/components/EventForm/UploadEventCover.d.ts +40 -0
- package/lib/cjs/components/EventForm/UploadEventCover.js +98 -0
- package/lib/cjs/components/EventForm/constants.d.ts +1 -0
- package/lib/cjs/components/EventForm/constants.js +4 -0
- package/lib/cjs/components/EventForm/index.d.ts +3 -0
- package/lib/cjs/components/EventForm/index.js +5 -0
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +103 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.d.ts +22 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +47 -0
- package/lib/cjs/components/EventLocationWidget/constants.d.ts +1 -0
- package/lib/cjs/components/EventLocationWidget/constants.js +4 -0
- package/lib/cjs/components/EventLocationWidget/index.d.ts +4 -0
- package/lib/cjs/components/EventLocationWidget/index.js +8 -0
- package/lib/cjs/components/Feed/Feed.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +5 -5
- package/lib/cjs/components/GroupForm/GroupForm.js +2 -2
- package/lib/cjs/components/GroupHeader/GroupHeader.js +3 -3
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +1 -1
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +3 -3
- package/lib/cjs/components/GroupInvitedWidget/GroupInvitedWidget.js +1 -1
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +1 -1
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +19 -3
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.js +22 -3
- package/lib/cjs/components/NavigationMenuIconButton/index.d.ts +2 -1
- package/lib/cjs/components/NavigationMenuIconButton/index.js +3 -1
- package/lib/cjs/components/Notification/Notification.js +1 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +256 -18
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/cjs/constants/Event.d.ts +2 -0
- package/lib/cjs/constants/Event.js +5 -0
- package/lib/cjs/constants/PubSub.d.ts +1 -1
- package/lib/cjs/constants/PubSub.js +10 -10
- package/lib/cjs/index.d.ts +12 -4
- package/lib/cjs/index.js +21 -5
- package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/cjs/shared/Media/File/PreviewComponent.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/LayerComponent.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/PreviewComponent.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/index.d.ts +2 -1
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/platformWidget.d.ts +15 -0
- package/lib/cjs/types/platformWidget.js +2 -0
- package/lib/cjs/utils/string.d.ts +1 -0
- package/lib/cjs/utils/string.js +9 -1
- package/lib/esm/assets/logo.d.ts +2 -0
- package/lib/esm/assets/logo.js +1 -0
- package/lib/esm/components/Category/Category.d.ts +1 -1
- package/lib/esm/components/Category/Category.js +1 -1
- package/lib/esm/components/ChangeCover/ChangeCover.js +3 -3
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
- package/lib/esm/components/Composer/Composer.js +9 -7
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
- package/lib/esm/components/CreateEventButton/CreateEventButton.d.ts +38 -0
- package/lib/esm/components/CreateEventButton/CreateEventButton.js +76 -0
- package/lib/esm/components/CreateEventButton/index.d.ts +3 -0
- package/lib/esm/components/CreateEventButton/index.js +2 -0
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +1 -1
- package/lib/esm/components/Event/Event.d.ts +57 -0
- package/lib/esm/components/Event/Event.js +87 -0
- package/lib/esm/components/Event/Skeleton.d.ts +22 -0
- package/lib/esm/components/Event/Skeleton.js +40 -0
- package/lib/esm/components/Event/constants.d.ts +1 -0
- package/lib/esm/components/Event/constants.js +1 -0
- package/lib/esm/components/Event/index.d.ts +4 -0
- package/lib/esm/components/Event/index.js +4 -0
- package/lib/esm/components/EventForm/EventAddress.d.ts +12 -0
- package/lib/esm/components/EventForm/EventAddress.js +126 -0
- package/lib/esm/components/EventForm/EventForm.d.ts +59 -0
- package/lib/esm/components/EventForm/EventForm.js +320 -0
- package/lib/esm/components/EventForm/UploadEventCover.d.ts +40 -0
- package/lib/esm/components/EventForm/UploadEventCover.js +95 -0
- package/lib/esm/components/EventForm/constants.d.ts +1 -0
- package/lib/esm/components/EventForm/constants.js +1 -0
- package/lib/esm/components/EventForm/index.d.ts +3 -0
- package/lib/esm/components/EventForm/index.js +2 -0
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +100 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.d.ts +22 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.js +43 -0
- package/lib/esm/components/EventLocationWidget/constants.d.ts +1 -0
- package/lib/esm/components/EventLocationWidget/constants.js +1 -0
- package/lib/esm/components/EventLocationWidget/index.d.ts +4 -0
- package/lib/esm/components/EventLocationWidget/index.js +4 -0
- package/lib/esm/components/Feed/Feed.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +5 -5
- package/lib/esm/components/GroupForm/GroupForm.js +3 -3
- package/lib/esm/components/GroupHeader/GroupHeader.js +4 -4
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +2 -2
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +4 -4
- package/lib/esm/components/GroupInvitedWidget/GroupInvitedWidget.js +2 -2
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +2 -2
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +2 -2
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +21 -4
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.js +23 -3
- package/lib/esm/components/NavigationMenuIconButton/index.d.ts +2 -1
- package/lib/esm/components/NavigationMenuIconButton/index.js +2 -1
- package/lib/esm/components/Notification/Notification.js +1 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +260 -22
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/esm/constants/Event.d.ts +2 -0
- package/lib/esm/constants/Event.js +2 -0
- package/lib/esm/constants/PubSub.d.ts +1 -1
- package/lib/esm/constants/PubSub.js +9 -9
- package/lib/esm/index.d.ts +12 -4
- package/lib/esm/index.js +13 -3
- package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/esm/shared/Media/File/PreviewComponent.d.ts +1 -1
- package/lib/esm/shared/Media/Link/LayerComponent.d.ts +1 -1
- package/lib/esm/shared/Media/Link/PreviewComponent.d.ts +1 -1
- package/lib/esm/shared/MetadataField/index.d.ts +2 -1
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/platformWidget.d.ts +15 -0
- package/lib/esm/types/platformWidget.js +1 -0
- package/lib/esm/utils/string.d.ts +1 -0
- package/lib/esm/utils/string.js +7 -0
- package/lib/umd/204.js +2 -0
- package/lib/umd/204.js.LICENSE.txt +22 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +24 -7
- package/lib/umd/311.js +0 -2
- package/lib/umd/311.js.LICENSE.txt +0 -7
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* > API documentation for the Community-JS Group Info Widget Skeleton component. Learn about the available props and the CSS API.
|
|
3
|
+
|
|
4
|
+
#### Import
|
|
5
|
+
|
|
6
|
+
```jsx
|
|
7
|
+
import {EventLocationWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
#### Component Name
|
|
11
|
+
|
|
12
|
+
The name `SCEventLocationWidgetSkeleton-skeleton-root` can be used when providing style overrides in the theme.
|
|
13
|
+
|
|
14
|
+
#### CSS
|
|
15
|
+
|
|
16
|
+
|Rule Name|Global class|Description|
|
|
17
|
+
|---|---|---|
|
|
18
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-root|Styles applied to the root element.|
|
|
19
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-map|Styles applied to the map element.|
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export default function EventLocationWidgetSkeleton(): JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
7
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const classes = {
|
|
10
|
+
root: `${constants_1.PREFIX}-skeleton-root`,
|
|
11
|
+
map: `${constants_1.PREFIX}-skeleton-map`
|
|
12
|
+
};
|
|
13
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
14
|
+
name: constants_1.PREFIX,
|
|
15
|
+
slot: 'SkeletonRoot'
|
|
16
|
+
})(() => ({}));
|
|
17
|
+
/**
|
|
18
|
+
* > API documentation for the Community-JS Group Info Widget Skeleton component. Learn about the available props and the CSS API.
|
|
19
|
+
|
|
20
|
+
#### Import
|
|
21
|
+
|
|
22
|
+
```jsx
|
|
23
|
+
import {EventLocationWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Component Name
|
|
27
|
+
|
|
28
|
+
The name `SCEventLocationWidgetSkeleton-skeleton-root` can be used when providing style overrides in the theme.
|
|
29
|
+
|
|
30
|
+
#### CSS
|
|
31
|
+
|
|
32
|
+
|Rule Name|Global class|Description|
|
|
33
|
+
|---|---|---|
|
|
34
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-root|Styles applied to the root element.|
|
|
35
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-map|Styles applied to the map element.|
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
function EventLocationWidgetSkeleton() {
|
|
39
|
+
return (react_1.default.createElement(Root, { className: classes.root },
|
|
40
|
+
react_1.default.createElement(material_1.CardContent, null,
|
|
41
|
+
react_1.default.createElement(material_1.Skeleton, { animation: "wave", height: 30, width: "20%", variant: 'text' }),
|
|
42
|
+
react_1.default.createElement(material_1.Box, { className: classes.map },
|
|
43
|
+
react_1.default.createElement(material_1.Skeleton, { variant: "rectangular", animation: "wave", height: '100%', width: '100%' })),
|
|
44
|
+
react_1.default.createElement(material_1.Skeleton, { animation: "wave", height: 20, width: "30%", variant: 'text' }),
|
|
45
|
+
react_1.default.createElement(material_1.Skeleton, { animation: "wave", height: 20, width: "40%", variant: 'text' }))));
|
|
46
|
+
}
|
|
47
|
+
exports.default = EventLocationWidgetSkeleton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCEventLocationWidget";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventLocationWidgetSkeleton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const EventLocationWidget_1 = tslib_1.__importDefault(require("./EventLocationWidget"));
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
7
|
+
exports.EventLocationWidgetSkeleton = Skeleton_1.default;
|
|
8
|
+
exports.default = EventLocationWidget_1.default;
|
|
@@ -104,7 +104,7 @@ const Feed = (inProps, ref) => {
|
|
|
104
104
|
}, [scPreferences.preferences]);
|
|
105
105
|
// RENDER
|
|
106
106
|
const theme = (0, styles_1.useTheme)();
|
|
107
|
-
const oneColLayout = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr:
|
|
107
|
+
const oneColLayout = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr: (0, utils_1.isClientSideRendering)() });
|
|
108
108
|
const advEnabled = (0, react_1.useMemo)(() => preferences &&
|
|
109
109
|
preferences[react_core_1.SCPreferences.ADVERTISING_CUSTOM_ADV_ENABLED] &&
|
|
110
110
|
((preferences[react_core_1.SCPreferences.ADVERTISING_CUSTOM_ADV_ONLY_FOR_ANONYMOUS_USERS_ENABLED] && scUserContext.user === null) ||
|
|
@@ -195,23 +195,23 @@ function Share(props) {
|
|
|
195
195
|
(!feedObject.group || isGroupPublic) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
196
196
|
showShareAction && (react_1.default.createElement(MenuItem_1.default, { onClick: () => share(false) },
|
|
197
197
|
react_1.default.createElement(ListItemIcon_1.default, null,
|
|
198
|
-
react_1.default.createElement(Icon_1.default,
|
|
198
|
+
react_1.default.createElement(Icon_1.default, null, "redo")),
|
|
199
199
|
react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.share.shareNow", defaultMessage: "ui.feedObject.share.shareNow" }) }))),
|
|
200
200
|
facebookShareEnabled && (react_1.default.createElement(MenuItem_1.default, { onClick: () => window.open(SocialShare_1.FACEBOOK_SHARE + url, 'facebook-share-dialog', 'width=626,height=436') },
|
|
201
201
|
react_1.default.createElement(ListItemIcon_1.default, null,
|
|
202
|
-
react_1.default.createElement(Icon_1.default,
|
|
202
|
+
react_1.default.createElement(Icon_1.default, null, "facebook")),
|
|
203
203
|
react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.share.facebook", defaultMessage: "ui.feedObject.share.facebook" }) }))),
|
|
204
204
|
xShareEnabled && (react_1.default.createElement(MenuItem_1.default, { onClick: () => window.open(SocialShare_1.X_SHARE + url, 'x-share-dialog', 'width=626,height=436') },
|
|
205
205
|
react_1.default.createElement(ListItemIcon_1.default, null,
|
|
206
|
-
react_1.default.createElement(Icon_1.default,
|
|
206
|
+
react_1.default.createElement(Icon_1.default, null, "twitter")),
|
|
207
207
|
react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.share.x", defaultMessage: "ui.feedObject.share.x" }) }))),
|
|
208
208
|
linkedinShareEnabled && (react_1.default.createElement(MenuItem_1.default, { onClick: () => window.open(SocialShare_1.LINKEDIN_SHARE + url, 'linkedin-share-dialog', 'width=626,height=436') },
|
|
209
209
|
react_1.default.createElement(ListItemIcon_1.default, null,
|
|
210
|
-
react_1.default.createElement(Icon_1.default,
|
|
210
|
+
react_1.default.createElement(Icon_1.default, null, "linkedin")),
|
|
211
211
|
react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.share.linkedin", defaultMessage: "ui.feedObject.share.linkedin" }) }))))),
|
|
212
212
|
react_1.default.createElement(MenuItem_1.default, null,
|
|
213
213
|
react_1.default.createElement(ListItemIcon_1.default, null,
|
|
214
|
-
react_1.default.createElement(Icon_1.default,
|
|
214
|
+
react_1.default.createElement(Icon_1.default, null, "link")),
|
|
215
215
|
react_1.default.createElement(material_1.ListItemText, { primary: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.share.permanentLink", defaultMessage: "ui.feedObject.share.permanentLink" }), onClick: () => getPermalink() }))));
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
@@ -155,11 +155,11 @@ function GroupForm(inProps) {
|
|
|
155
155
|
if (data) {
|
|
156
156
|
if (group) {
|
|
157
157
|
// Edit group
|
|
158
|
-
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
158
|
+
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.EDIT}`, data);
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
161
|
// Create group
|
|
162
|
-
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
162
|
+
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.CREATE}`, data);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -119,10 +119,10 @@ function GroupHeader(inProps) {
|
|
|
119
119
|
var _a;
|
|
120
120
|
if (data && ((_a = data === null || data === void 0 ? void 0 : data.group) === null || _a === void 0 ? void 0 : _a.id) === (scGroup === null || scGroup === void 0 ? void 0 : scGroup.id)) {
|
|
121
121
|
let _group = Object.assign({}, scGroup);
|
|
122
|
-
if (msg === `${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
122
|
+
if (msg === `${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.ADD_MEMBER}`) {
|
|
123
123
|
_group.subscribers_counter = _group.subscribers_counter + 1;
|
|
124
124
|
}
|
|
125
|
-
else if (msg === `${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
125
|
+
else if (msg === `${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.REMOVE_MEMBER}`) {
|
|
126
126
|
_group.subscribers_counter = Math.max(_group.subscribers_counter - 1, 0);
|
|
127
127
|
}
|
|
128
128
|
setSCGroup(_group);
|
|
@@ -133,7 +133,7 @@ function GroupHeader(inProps) {
|
|
|
133
133
|
*/
|
|
134
134
|
(0, react_1.useEffect)(() => {
|
|
135
135
|
if (scGroup) {
|
|
136
|
-
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
136
|
+
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.MEMBERS}`, onChangeGroupMembersHandler);
|
|
137
137
|
}
|
|
138
138
|
return () => {
|
|
139
139
|
updatesSubscription.current && pubsub_js_1.default.unsubscribe(updatesSubscription.current);
|
|
@@ -89,7 +89,7 @@ function GroupInfoWidget(inProps) {
|
|
|
89
89
|
*/
|
|
90
90
|
(0, react_1.useEffect)(() => {
|
|
91
91
|
if (scGroup) {
|
|
92
|
-
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
92
|
+
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.EDIT}`, onChangeGroupHandler);
|
|
93
93
|
}
|
|
94
94
|
return () => {
|
|
95
95
|
updatesSubscription.current && pubsub_js_1.default.unsubscribe(updatesSubscription.current);
|
|
@@ -99,7 +99,7 @@ function GroupInviteButton(inProps) {
|
|
|
99
99
|
*/
|
|
100
100
|
function notifyChanges(group, usersInvited) {
|
|
101
101
|
if (group && usersInvited) {
|
|
102
|
-
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
102
|
+
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.INVITE_MEMBER}`, usersInvited);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function convertToInvitedUsersObject(data) {
|
|
@@ -257,11 +257,11 @@ function GroupInviteButton(inProps) {
|
|
|
257
257
|
* Renders root object
|
|
258
258
|
*/
|
|
259
259
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
260
|
-
react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: react_1.default.createElement(material_1.Icon,
|
|
260
|
+
react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: react_1.default.createElement(material_1.Icon, null, "add") }, rest),
|
|
261
261
|
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton", defaultMessage: "ui.groupInviteButton" })),
|
|
262
262
|
open && (react_1.default.createElement(DialogRoot, { DialogContentProps: { dividers: false }, open: true, className: classes.dialogRoot, title: react_1.default.createElement(react_1.default.Fragment, null,
|
|
263
263
|
react_1.default.createElement(material_1.IconButton, { onClick: handleClose },
|
|
264
|
-
react_1.default.createElement(material_1.Icon,
|
|
264
|
+
react_1.default.createElement(material_1.Icon, null, "arrow_back")),
|
|
265
265
|
react_1.default.createElement(material_1.Typography, { className: classes.dialogTitle },
|
|
266
266
|
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.title", defaultMessage: "ui.groupInviteButton.dialog.title" })),
|
|
267
267
|
react_1.default.createElement(lab_1.LoadingButton, { size: "small", color: "secondary", variant: "contained", onClick: handleSendInvitations, loading: isSending, disabled: !invited.length },
|
|
@@ -172,7 +172,7 @@ function GroupInvitedWidget(inProps) {
|
|
|
172
172
|
*/
|
|
173
173
|
(0, react_1.useEffect)(() => {
|
|
174
174
|
if (scGroup && state.results) {
|
|
175
|
-
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
175
|
+
updatesSubscription.current = pubsub_js_1.default.subscribe(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.INVITE_MEMBER}`, onChangeGroupHandler);
|
|
176
176
|
}
|
|
177
177
|
return () => {
|
|
178
178
|
updatesSubscription.current && pubsub_js_1.default.unsubscribe(updatesSubscription.current);
|
|
@@ -94,7 +94,7 @@ function GroupSettingsIconButton(inProps) {
|
|
|
94
94
|
*/
|
|
95
95
|
function notifyChanges(group, user) {
|
|
96
96
|
if (group && user) {
|
|
97
|
-
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
97
|
+
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.REMOVE_MEMBER}`, { group, user });
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -82,7 +82,7 @@ function GroupSubscribeButton(inProps) {
|
|
|
82
82
|
*/
|
|
83
83
|
function notifyChanges(group, user) {
|
|
84
84
|
if (group && user) {
|
|
85
|
-
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.
|
|
85
|
+
pubsub_js_1.default.publish(`${PubSub_1.SCTopicType.GROUP}.${PubSub_1.SCGroupEventType.ADD_MEMBER}`, { group, user });
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
const subscribe = (user) => {
|
|
@@ -226,7 +226,7 @@ function IncubatorListWidget(inProps) {
|
|
|
226
226
|
react_1.default.createElement(material_1.Typography, { className: classes.title, variant: 'h5' },
|
|
227
227
|
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" })),
|
|
228
228
|
react_1.default.createElement(material_1.IconButton, { className: classes.helpPopover, color: "primary", "aria-label": "info", component: "span", onClick: handleClickHelpButton },
|
|
229
|
-
react_1.default.createElement(Icon_1.default,
|
|
229
|
+
react_1.default.createElement(Icon_1.default, null, "help_outline")),
|
|
230
230
|
isOpen && (react_1.default.createElement(Popover_1.default, { open: isOpen, anchorEl: anchorEl, onClose: handlePopoverClose, anchorOrigin: {
|
|
231
231
|
vertical: 'bottom',
|
|
232
232
|
horizontal: 'right'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
1
2
|
import { CategoryProps } from '../Category';
|
|
2
|
-
export interface DefaultDrawerContentProps {
|
|
3
|
+
export interface DefaultDrawerContentProps extends BoxProps {
|
|
3
4
|
CategoryItemProps?: CategoryProps;
|
|
4
5
|
}
|
|
5
|
-
export default function DefaultDrawerContent(
|
|
6
|
+
export default function DefaultDrawerContent(inProps: DefaultDrawerContentProps): JSX.Element;
|
|
@@ -7,8 +7,24 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const Category_1 = tslib_1.__importDefault(require("../Category"));
|
|
8
8
|
const react_intl_1 = require("react-intl");
|
|
9
9
|
const utils_1 = require("@selfcommunity/utils");
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const styles_1 = require("@mui/material/styles");
|
|
11
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
|
+
const system_1 = require("@mui/system");
|
|
13
|
+
const PREFIX = 'SCDefaultDrawerContent';
|
|
14
|
+
const classes = {
|
|
15
|
+
root: `${PREFIX}-root`
|
|
16
|
+
};
|
|
17
|
+
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
18
|
+
name: PREFIX,
|
|
19
|
+
slot: 'Root',
|
|
20
|
+
overridesResolver: (_, styles) => styles.root
|
|
21
|
+
})(() => ({}));
|
|
22
|
+
function DefaultDrawerContent(inProps) {
|
|
23
|
+
const props = (0, system_1.useThemeProps)({
|
|
24
|
+
props: inProps,
|
|
25
|
+
name: PREFIX
|
|
26
|
+
});
|
|
27
|
+
const { className, CategoryItemProps = { showTooltip: true } } = props, rest = tslib_1.__rest(props, ["className", "CategoryItemProps"]);
|
|
12
28
|
// HOOKS
|
|
13
29
|
const { categories } = (0, react_core_1.useSCFetchCategories)();
|
|
14
30
|
const [categoriesOrdered, setCategoriesOrdered] = (0, react_1.useState)([]);
|
|
@@ -38,7 +54,7 @@ function DefaultDrawerContent(props) {
|
|
|
38
54
|
onTouchMove: mouseLeave
|
|
39
55
|
});
|
|
40
56
|
//order
|
|
41
|
-
return (react_1.default.createElement(
|
|
57
|
+
return (react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest),
|
|
42
58
|
react_1.default.createElement(material_1.Typography, { variant: "subtitle1" },
|
|
43
59
|
react_1.default.createElement("span", null,
|
|
44
60
|
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.navigationMenuIconButton.defaultDrawerContent.category.title", defaultMessage: "ui.navigationMenuIconButton.defaultDrawerContent.category.title" })),
|
|
@@ -3,14 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
9
|
+
const system_1 = require("@mui/system");
|
|
10
|
+
const PREFIX = 'SCDefaultHeaderContent';
|
|
11
|
+
const classes = {
|
|
12
|
+
root: `${PREFIX}-root`
|
|
13
|
+
};
|
|
14
|
+
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
15
|
+
name: PREFIX,
|
|
16
|
+
slot: 'Root',
|
|
17
|
+
overridesResolver: (_, styles) => styles.root
|
|
18
|
+
})(() => ({}));
|
|
19
|
+
function DefaultHeaderContent(inProps) {
|
|
20
|
+
const props = (0, system_1.useThemeProps)({
|
|
21
|
+
props: inProps,
|
|
22
|
+
name: PREFIX
|
|
23
|
+
});
|
|
24
|
+
const { className } = props, rest = tslib_1.__rest(props, ["className"]);
|
|
7
25
|
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
8
26
|
// PREFERENCES
|
|
9
27
|
const scPreferences = (0, react_core_1.useSCPreferences)();
|
|
10
28
|
const _logo = (0, react_1.useMemo)(() => {
|
|
11
29
|
return react_core_1.SCPreferences.LOGO_NAVBAR_LOGO in scPreferences.preferences ? scPreferences.preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO].value : null;
|
|
12
30
|
}, [scPreferences.preferences]);
|
|
13
|
-
return (react_1.default.createElement(
|
|
14
|
-
react_1.default.createElement(
|
|
31
|
+
return (react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest),
|
|
32
|
+
react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}) },
|
|
33
|
+
react_1.default.createElement("img", { src: _logo, alt: "logo" }))));
|
|
15
34
|
}
|
|
16
35
|
exports.default = DefaultHeaderContent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import NavigationMenuIconButton, { NavigationMenuIconButtonProps } from './NavigationMenuIconButton';
|
|
2
|
+
import DefaultHeaderContent from './DefaultHeaderContent';
|
|
2
3
|
import DefaultDrawerContent from './DefaultDrawerContent';
|
|
3
4
|
export default NavigationMenuIconButton;
|
|
4
|
-
export { NavigationMenuIconButtonProps, DefaultDrawerContent as NavigationMenuContent };
|
|
5
|
+
export { NavigationMenuIconButtonProps, DefaultDrawerContent as NavigationMenuContent, DefaultHeaderContent as NavigationMenuHeader };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationMenuContent = void 0;
|
|
3
|
+
exports.NavigationMenuHeader = exports.NavigationMenuContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const NavigationMenuIconButton_1 = tslib_1.__importDefault(require("./NavigationMenuIconButton"));
|
|
6
|
+
const DefaultHeaderContent_1 = tslib_1.__importDefault(require("./DefaultHeaderContent"));
|
|
7
|
+
exports.NavigationMenuHeader = DefaultHeaderContent_1.default;
|
|
6
8
|
const DefaultDrawerContent_1 = tslib_1.__importDefault(require("./DefaultDrawerContent"));
|
|
7
9
|
exports.NavigationMenuContent = DefaultDrawerContent_1.default;
|
|
8
10
|
exports.default = NavigationMenuIconButton_1.default;
|
|
@@ -235,7 +235,7 @@ function UserNotification(inProps) {
|
|
|
235
235
|
notificationObject.aggregated[0].type === types_1.SCNotificationTypologyType.CONTRIBUTION)) {
|
|
236
236
|
const contribution = (0, contribution_1.getContribution)(notificationObject);
|
|
237
237
|
return (react_1.default.createElement(material_1.CardHeader, { className: classes.header, titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: react_1.default.createElement(react_core_1.Link, { to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(contribution), (0, contribution_1.getRouteData)(notificationObject[contribution.type])) }, (0, contribution_1.getContributionSnippet)(contribution)), action: contribution && (react_1.default.createElement(material_1.Tooltip, { title: contribution.suspended ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) },
|
|
238
|
-
react_1.default.createElement(LoadingButton_1.default, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ?
|
|
238
|
+
react_1.default.createElement(LoadingButton_1.default, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ? react_1.default.createElement(Icon_1.default, { color: 'primary' }, "notifications_off") : react_1.default.createElement(Icon_1.default, { color: 'inherit' }, "notifications")))) }));
|
|
239
239
|
}
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PlatformWidgetActionType } from '../../types/platformWidget';
|
|
2
3
|
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
|
|
3
4
|
export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
4
5
|
/**
|
|
@@ -19,11 +20,18 @@ export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* Actions to be inserted before
|
|
21
22
|
*/
|
|
22
|
-
startActions?:
|
|
23
|
+
startActions?: PlatformWidgetActionType[];
|
|
23
24
|
/**
|
|
24
25
|
* Actions to be inserted after
|
|
25
26
|
*/
|
|
26
|
-
endActions?:
|
|
27
|
+
endActions?: PlatformWidgetActionType[];
|
|
28
|
+
/**
|
|
29
|
+
* Hide actions
|
|
30
|
+
*/
|
|
31
|
+
hideHubAction?: boolean;
|
|
32
|
+
hideConsoleAction?: boolean;
|
|
33
|
+
hideModerationAction?: boolean;
|
|
34
|
+
hideContactUsAction?: boolean;
|
|
27
35
|
/**
|
|
28
36
|
* Other props
|
|
29
37
|
*/
|
|
@@ -53,6 +61,20 @@ export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
|
53
61
|
|---|---|---|
|
|
54
62
|
|root|.SCPlatformWidget-root|Styles applied to the root element.|
|
|
55
63
|
|title|.SCPlatformWidget-title|Styles applied to the title element.|
|
|
64
|
+
|actions|.SCPlatformWidget-actions|Styles applied to the actions container.|
|
|
65
|
+
|action|.SCPlatformWidget-action|Styles applied to the single action element.|
|
|
66
|
+
|actionHighlighted|.SCPlatformWidget-action-highlighted|Styles applied to the action highlighted.|
|
|
67
|
+
|tutorial|.SCPlatformWidget-tutorial|Styles applied to the tutorial element.|
|
|
68
|
+
|tutorialContent|.SCPlatformWidget-tutorial-content|Styles applied to the content of the tutorial element.|
|
|
69
|
+
|tutorialTitle|.SCPlatformWidget-tutorial-title|Styles applied to the title element of the tutorial.|
|
|
70
|
+
|tutorialTitleClose|.SCPlatformWidget-tutorial-title-close|Styles applied to the close button of the title in the tutorial.|
|
|
71
|
+
|tutorialDesc|.SCPlatformWidget-tutorial-desc|Styles applied to the tutorial description element.|
|
|
72
|
+
|tutorialOpen|.SCPlatformWidget-tutorial-open|Styles applied to the tutorial element when is active.|
|
|
73
|
+
|divider|.SCPlatformWidget-divider|Styles applied to the divider element in the tutorial container.|
|
|
74
|
+
|tutorialControls|.SCPlatformWidget-tutorial-controls|Styles applied to the tutorial bottom controls.|
|
|
75
|
+
|btnStep|.SCPlatformWidget-btn-step|Styles applied to the button next/previous/skip/close of the tutorial controls.|
|
|
76
|
+
|btnPreviousStep|.SCPlatformWidget-btn-previous-step|Styles applied to the button previous element of the tutorial controls.|
|
|
77
|
+
|btnNextStep|.SCPlatformWidget-btn-next-step|Styles applied to the button next element of the tutorial controls.|
|
|
56
78
|
|
|
57
79
|
*
|
|
58
80
|
* @param inProps
|