@selfcommunity/react-ui 0.7.50-alpha.1 → 0.7.50-event.29
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,55 @@
|
|
|
1
|
+
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
|
|
2
|
+
import { SCEventType } from '@selfcommunity/types';
|
|
3
|
+
export interface EventLocationWidgetProps extends VirtualScrollerItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Event Object
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
event?: SCEventType;
|
|
9
|
+
/**
|
|
10
|
+
* Id of the event
|
|
11
|
+
* @default null
|
|
12
|
+
*/
|
|
13
|
+
eventId?: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Overrides or extends the styles applied to the component.
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Other props
|
|
21
|
+
*/
|
|
22
|
+
[p: string]: any;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* > API documentation for the Community-JS Group Info Widget component. Learn about the available props and the CSS API.
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* This component renders a widget containing the event info.
|
|
29
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/EventLocationWidget)
|
|
30
|
+
|
|
31
|
+
#### Import
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
import {EventLocationWidget} from '@selfcommunity/react-ui';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Component Name
|
|
38
|
+
|
|
39
|
+
The name `SCEventLocationWidget` can be used when providing style overrides in the theme.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#### CSS
|
|
43
|
+
|
|
44
|
+
|Rule Name|Global class|Description|
|
|
45
|
+
|---|---|---|
|
|
46
|
+
|root|.SCEventLocationWidget-root|Styles applied to the root element.|
|
|
47
|
+
|title|.SCEventLocationWidget-title|Styles applied to the title element.|
|
|
48
|
+
|map|.SCEventLocationWidget-map|Styles applied to the map element.|
|
|
49
|
+
|locationTitle|.SCEventLocationWidget-location-title|Styles applied to the location title element.|
|
|
50
|
+
|address|.SCEventLocationWidget-address|Styles applied to the address element.|
|
|
51
|
+
|
|
52
|
+
*
|
|
53
|
+
* @param inProps
|
|
54
|
+
*/
|
|
55
|
+
export default function EventLocationWidget(inProps: EventLocationWidgetProps): JSX.Element;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Box, CardContent, Typography } from '@mui/material';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import Widget from '../Widget';
|
|
7
|
+
import { useThemeProps } from '@mui/system';
|
|
8
|
+
import { PREFIX } from './constants';
|
|
9
|
+
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
import EventLocationWidgetSkeleton from './Skeleton';
|
|
11
|
+
import { useSCContext, useSCFetchEvent } from '@selfcommunity/react-core';
|
|
12
|
+
import { SCEventLocationType } from '@selfcommunity/types';
|
|
13
|
+
import { GoogleMap, MarkerF, useLoadScript } from '@react-google-maps/api';
|
|
14
|
+
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
15
|
+
import { formatEventLocationGeolocation } from '../../utils/string';
|
|
16
|
+
const classes = {
|
|
17
|
+
root: `${PREFIX}-root`,
|
|
18
|
+
title: `${PREFIX}-title`,
|
|
19
|
+
map: `${PREFIX}-map`,
|
|
20
|
+
locationTitle: `${PREFIX}-location-title`,
|
|
21
|
+
address: `${PREFIX}-address`
|
|
22
|
+
};
|
|
23
|
+
const Root = styled(Widget, {
|
|
24
|
+
name: PREFIX,
|
|
25
|
+
slot: 'Root'
|
|
26
|
+
})(() => ({}));
|
|
27
|
+
/**
|
|
28
|
+
* > API documentation for the Community-JS Group Info Widget component. Learn about the available props and the CSS API.
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* This component renders a widget containing the event info.
|
|
32
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/EventLocationWidget)
|
|
33
|
+
|
|
34
|
+
#### Import
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
import {EventLocationWidget} from '@selfcommunity/react-ui';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Component Name
|
|
41
|
+
|
|
42
|
+
The name `SCEventLocationWidget` can be used when providing style overrides in the theme.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#### CSS
|
|
46
|
+
|
|
47
|
+
|Rule Name|Global class|Description|
|
|
48
|
+
|---|---|---|
|
|
49
|
+
|root|.SCEventLocationWidget-root|Styles applied to the root element.|
|
|
50
|
+
|title|.SCEventLocationWidget-title|Styles applied to the title element.|
|
|
51
|
+
|map|.SCEventLocationWidget-map|Styles applied to the map element.|
|
|
52
|
+
|locationTitle|.SCEventLocationWidget-location-title|Styles applied to the location title element.|
|
|
53
|
+
|address|.SCEventLocationWidget-address|Styles applied to the address element.|
|
|
54
|
+
|
|
55
|
+
*
|
|
56
|
+
* @param inProps
|
|
57
|
+
*/
|
|
58
|
+
export default function EventLocationWidget(inProps) {
|
|
59
|
+
var _a, _b, _c;
|
|
60
|
+
// PROPS
|
|
61
|
+
const props = useThemeProps({
|
|
62
|
+
props: inProps,
|
|
63
|
+
name: PREFIX
|
|
64
|
+
});
|
|
65
|
+
const { className, event, eventId } = props, rest = __rest(props, ["className", "event", "eventId"]);
|
|
66
|
+
// STATE
|
|
67
|
+
const { scEvent } = useSCFetchEvent({ id: eventId, event });
|
|
68
|
+
const scContext = useSCContext();
|
|
69
|
+
const { isLoaded } = useLoadScript({
|
|
70
|
+
googleMapsApiKey: scContext.settings.integrations.geocoding.apiKey,
|
|
71
|
+
libraries: ['maps']
|
|
72
|
+
});
|
|
73
|
+
if (!((_c = (_b = (_a = scContext === null || scContext === void 0 ? void 0 : scContext.settings) === null || _a === void 0 ? void 0 : _a.integrations) === null || _b === void 0 ? void 0 : _b.geocoding) === null || _c === void 0 ? void 0 : _c.apiKey) || (scEvent && (scEvent === null || scEvent === void 0 ? void 0 : scEvent.location) === SCEventLocationType.ONLINE)) {
|
|
74
|
+
return React.createElement(HiddenPlaceholder, null);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Loading event
|
|
78
|
+
*/
|
|
79
|
+
if (!isLoaded || !scEvent) {
|
|
80
|
+
return React.createElement(EventLocationWidgetSkeleton, null);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Renders root object
|
|
84
|
+
*/
|
|
85
|
+
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest),
|
|
86
|
+
React.createElement(CardContent, null,
|
|
87
|
+
React.createElement(Typography, { variant: "h4", className: classes.title },
|
|
88
|
+
React.createElement(FormattedMessage, { id: "ui.eventLocationWidget.title", defaultMessage: "ui.eventLocationWidget.title" })),
|
|
89
|
+
React.createElement(Box, { className: classes.map },
|
|
90
|
+
React.createElement(GoogleMap, { mapContainerClassName: classes.map, center: {
|
|
91
|
+
lat: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lat,
|
|
92
|
+
lng: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lng
|
|
93
|
+
}, zoom: 15 },
|
|
94
|
+
React.createElement(MarkerF, { position: {
|
|
95
|
+
lat: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lat,
|
|
96
|
+
lng: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lng
|
|
97
|
+
} }))),
|
|
98
|
+
React.createElement(Typography, { variant: "h4", className: classes.locationTitle }, formatEventLocationGeolocation(scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation, true)),
|
|
99
|
+
React.createElement(Typography, { variant: "body1", className: classes.address }, formatEventLocationGeolocation(scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation)))));
|
|
100
|
+
}
|
|
@@ -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,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { PREFIX } from './constants';
|
|
4
|
+
import Widget from '../Widget';
|
|
5
|
+
import { Box, CardContent, Skeleton } from '@mui/material';
|
|
6
|
+
const classes = {
|
|
7
|
+
root: `${PREFIX}-skeleton-root`,
|
|
8
|
+
map: `${PREFIX}-skeleton-map`
|
|
9
|
+
};
|
|
10
|
+
const Root = styled(Widget, {
|
|
11
|
+
name: PREFIX,
|
|
12
|
+
slot: 'SkeletonRoot'
|
|
13
|
+
})(() => ({}));
|
|
14
|
+
/**
|
|
15
|
+
* > API documentation for the Community-JS Group Info Widget Skeleton component. Learn about the available props and the CSS API.
|
|
16
|
+
|
|
17
|
+
#### Import
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
import {EventLocationWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Component Name
|
|
24
|
+
|
|
25
|
+
The name `SCEventLocationWidgetSkeleton-skeleton-root` can be used when providing style overrides in the theme.
|
|
26
|
+
|
|
27
|
+
#### CSS
|
|
28
|
+
|
|
29
|
+
|Rule Name|Global class|Description|
|
|
30
|
+
|---|---|---|
|
|
31
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-root|Styles applied to the root element.|
|
|
32
|
+
|root|.SCEventLocationWidgetSkeleton-skeleton-map|Styles applied to the map element.|
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export default function EventLocationWidgetSkeleton() {
|
|
36
|
+
return (React.createElement(Root, { className: classes.root },
|
|
37
|
+
React.createElement(CardContent, null,
|
|
38
|
+
React.createElement(Skeleton, { animation: "wave", height: 30, width: "20%", variant: 'text' }),
|
|
39
|
+
React.createElement(Box, { className: classes.map },
|
|
40
|
+
React.createElement(Skeleton, { variant: "rectangular", animation: "wave", height: '100%', width: '100%' })),
|
|
41
|
+
React.createElement(Skeleton, { animation: "wave", height: 20, width: "30%", variant: 'text' }),
|
|
42
|
+
React.createElement(Skeleton, { animation: "wave", height: 20, width: "40%", variant: 'text' }))));
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCEventLocationWidget";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCEventLocationWidget';
|
|
@@ -7,7 +7,7 @@ import { FormattedMessage } from 'react-intl';
|
|
|
7
7
|
import { GenericSkeleton } from '../Skeleton';
|
|
8
8
|
import CustomAdv from '../CustomAdv';
|
|
9
9
|
import { SCCustomAdvPosition } from '@selfcommunity/types';
|
|
10
|
-
import { CacheStrategies, getQueryStringParameter, updateQueryStringParameter } from '@selfcommunity/utils';
|
|
10
|
+
import { CacheStrategies, getQueryStringParameter, isClientSideRendering, updateQueryStringParameter } from '@selfcommunity/utils';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import PubSub from 'pubsub-js';
|
|
13
13
|
import { useThemeProps } from '@mui/system';
|
|
@@ -101,7 +101,7 @@ const Feed = (inProps, ref) => {
|
|
|
101
101
|
}, [scPreferences.preferences]);
|
|
102
102
|
// RENDER
|
|
103
103
|
const theme = useTheme();
|
|
104
|
-
const oneColLayout = useMediaQuery(theme.breakpoints.down('md'), { noSsr:
|
|
104
|
+
const oneColLayout = useMediaQuery(theme.breakpoints.down('md'), { noSsr: isClientSideRendering() });
|
|
105
105
|
const advEnabled = useMemo(() => preferences &&
|
|
106
106
|
preferences[SCPreferences.ADVERTISING_CUSTOM_ADV_ENABLED] &&
|
|
107
107
|
((preferences[SCPreferences.ADVERTISING_CUSTOM_ADV_ONLY_FOR_ANONYMOUS_USERS_ENABLED] && scUserContext.user === null) ||
|
|
@@ -193,23 +193,23 @@ export default function Share(props) {
|
|
|
193
193
|
(!feedObject.group || isGroupPublic) && (React.createElement(React.Fragment, null,
|
|
194
194
|
showShareAction && (React.createElement(MenuItem, { onClick: () => share(false) },
|
|
195
195
|
React.createElement(ListItemIcon, null,
|
|
196
|
-
React.createElement(Icon,
|
|
196
|
+
React.createElement(Icon, null, "redo")),
|
|
197
197
|
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: "ui.feedObject.share.shareNow", defaultMessage: "ui.feedObject.share.shareNow" }) }))),
|
|
198
198
|
facebookShareEnabled && (React.createElement(MenuItem, { onClick: () => window.open(FACEBOOK_SHARE + url, 'facebook-share-dialog', 'width=626,height=436') },
|
|
199
199
|
React.createElement(ListItemIcon, null,
|
|
200
|
-
React.createElement(Icon,
|
|
200
|
+
React.createElement(Icon, null, "facebook")),
|
|
201
201
|
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: "ui.feedObject.share.facebook", defaultMessage: "ui.feedObject.share.facebook" }) }))),
|
|
202
202
|
xShareEnabled && (React.createElement(MenuItem, { onClick: () => window.open(X_SHARE + url, 'x-share-dialog', 'width=626,height=436') },
|
|
203
203
|
React.createElement(ListItemIcon, null,
|
|
204
|
-
React.createElement(Icon,
|
|
204
|
+
React.createElement(Icon, null, "twitter")),
|
|
205
205
|
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: "ui.feedObject.share.x", defaultMessage: "ui.feedObject.share.x" }) }))),
|
|
206
206
|
linkedinShareEnabled && (React.createElement(MenuItem, { onClick: () => window.open(LINKEDIN_SHARE + url, 'linkedin-share-dialog', 'width=626,height=436') },
|
|
207
207
|
React.createElement(ListItemIcon, null,
|
|
208
|
-
React.createElement(Icon,
|
|
208
|
+
React.createElement(Icon, null, "linkedin")),
|
|
209
209
|
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: "ui.feedObject.share.linkedin", defaultMessage: "ui.feedObject.share.linkedin" }) }))))),
|
|
210
210
|
React.createElement(MenuItem, null,
|
|
211
211
|
React.createElement(ListItemIcon, null,
|
|
212
|
-
React.createElement(Icon,
|
|
212
|
+
React.createElement(Icon, null, "link")),
|
|
213
213
|
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: "ui.feedObject.share.permanentLink", defaultMessage: "ui.feedObject.share.permanentLink" }), onClick: () => getPermalink() }))));
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
@@ -18,7 +18,7 @@ import { SCGroupPrivacyType } from '@selfcommunity/types';
|
|
|
18
18
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
19
19
|
import { formatHttpErrorCode, GroupService } from '@selfcommunity/api-services';
|
|
20
20
|
import { Logger } from '@selfcommunity/utils';
|
|
21
|
-
import {
|
|
21
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
22
22
|
const messages = defineMessages({
|
|
23
23
|
name: {
|
|
24
24
|
id: 'ui.groupForm.name.placeholder',
|
|
@@ -153,11 +153,11 @@ export default function GroupForm(inProps) {
|
|
|
153
153
|
if (data) {
|
|
154
154
|
if (group) {
|
|
155
155
|
// Edit group
|
|
156
|
-
PubSub.publish(`${SCTopicType.GROUP}.${
|
|
156
|
+
PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.EDIT}`, data);
|
|
157
157
|
}
|
|
158
158
|
else {
|
|
159
159
|
// Create group
|
|
160
|
-
PubSub.publish(`${SCTopicType.GROUP}.${
|
|
160
|
+
PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.CREATE}`, data);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -16,7 +16,7 @@ import GroupMembersButton from '../GroupMembersButton';
|
|
|
16
16
|
import EditGroupButton from '../EditGroupButton';
|
|
17
17
|
import GroupSubscribeButton from '../GroupSubscribeButton';
|
|
18
18
|
import GroupInviteButton from '../GroupInviteButton';
|
|
19
|
-
import {
|
|
19
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
20
20
|
import PubSub from 'pubsub-js';
|
|
21
21
|
const classes = {
|
|
22
22
|
root: `${PREFIX}-root`,
|
|
@@ -117,10 +117,10 @@ export default function GroupHeader(inProps) {
|
|
|
117
117
|
var _a;
|
|
118
118
|
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)) {
|
|
119
119
|
let _group = Object.assign({}, scGroup);
|
|
120
|
-
if (msg === `${SCTopicType.GROUP}.${
|
|
120
|
+
if (msg === `${SCTopicType.GROUP}.${SCGroupEventType.ADD_MEMBER}`) {
|
|
121
121
|
_group.subscribers_counter = _group.subscribers_counter + 1;
|
|
122
122
|
}
|
|
123
|
-
else if (msg === `${SCTopicType.GROUP}.${
|
|
123
|
+
else if (msg === `${SCTopicType.GROUP}.${SCGroupEventType.REMOVE_MEMBER}`) {
|
|
124
124
|
_group.subscribers_counter = Math.max(_group.subscribers_counter - 1, 0);
|
|
125
125
|
}
|
|
126
126
|
setSCGroup(_group);
|
|
@@ -131,7 +131,7 @@ export default function GroupHeader(inProps) {
|
|
|
131
131
|
*/
|
|
132
132
|
useEffect(() => {
|
|
133
133
|
if (scGroup) {
|
|
134
|
-
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${
|
|
134
|
+
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${SCGroupEventType.MEMBERS}`, onChangeGroupMembersHandler);
|
|
135
135
|
}
|
|
136
136
|
return () => {
|
|
137
137
|
updatesSubscription.current && PubSub.unsubscribe(updatesSubscription.current);
|
|
@@ -11,7 +11,7 @@ import { SCGroupPrivacyType } from '@selfcommunity/types';
|
|
|
11
11
|
import PubSub from 'pubsub-js';
|
|
12
12
|
import { SCPreferences, useSCFetchGroup, useSCPreferences } from '@selfcommunity/react-core';
|
|
13
13
|
import GroupInfoWidgetSkeleton from './Skeleton';
|
|
14
|
-
import {
|
|
14
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
15
15
|
import User from '../User';
|
|
16
16
|
const classes = {
|
|
17
17
|
root: `${PREFIX}-root`,
|
|
@@ -87,7 +87,7 @@ export default function GroupInfoWidget(inProps) {
|
|
|
87
87
|
*/
|
|
88
88
|
useEffect(() => {
|
|
89
89
|
if (scGroup) {
|
|
90
|
-
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${
|
|
90
|
+
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${SCGroupEventType.EDIT}`, onChangeGroupHandler);
|
|
91
91
|
}
|
|
92
92
|
return () => {
|
|
93
93
|
updatesSubscription.current && PubSub.unsubscribe(updatesSubscription.current);
|
|
@@ -13,7 +13,7 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|
|
13
13
|
import User from '../User';
|
|
14
14
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
15
15
|
import { Logger } from '@selfcommunity/utils';
|
|
16
|
-
import {
|
|
16
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
17
17
|
import PubSub from 'pubsub-js';
|
|
18
18
|
const messages = defineMessages({
|
|
19
19
|
placeholder: {
|
|
@@ -97,7 +97,7 @@ export default function GroupInviteButton(inProps) {
|
|
|
97
97
|
*/
|
|
98
98
|
function notifyChanges(group, usersInvited) {
|
|
99
99
|
if (group && usersInvited) {
|
|
100
|
-
PubSub.publish(`${SCTopicType.GROUP}.${
|
|
100
|
+
PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.INVITE_MEMBER}`, usersInvited);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function convertToInvitedUsersObject(data) {
|
|
@@ -255,11 +255,11 @@ export default function GroupInviteButton(inProps) {
|
|
|
255
255
|
* Renders root object
|
|
256
256
|
*/
|
|
257
257
|
return (React.createElement(React.Fragment, null,
|
|
258
|
-
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: React.createElement(Icon,
|
|
258
|
+
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: React.createElement(Icon, null, "add") }, rest),
|
|
259
259
|
React.createElement(FormattedMessage, { id: "ui.groupInviteButton", defaultMessage: "ui.groupInviteButton" })),
|
|
260
260
|
open && (React.createElement(DialogRoot, { DialogContentProps: { dividers: false }, open: true, className: classes.dialogRoot, title: React.createElement(React.Fragment, null,
|
|
261
261
|
React.createElement(IconButton, { onClick: handleClose },
|
|
262
|
-
React.createElement(Icon,
|
|
262
|
+
React.createElement(Icon, null, "arrow_back")),
|
|
263
263
|
React.createElement(Typography, { className: classes.dialogTitle },
|
|
264
264
|
React.createElement(FormattedMessage, { id: "ui.groupInviteButton.dialog.title", defaultMessage: "ui.groupInviteButton.dialog.title" })),
|
|
265
265
|
React.createElement(LoadingButton, { size: "small", color: "secondary", variant: "contained", onClick: handleSendInvitations, loading: isSending, disabled: !invited.length },
|
|
@@ -19,7 +19,7 @@ import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
|
19
19
|
import { PREFIX } from './constants';
|
|
20
20
|
import User, { UserSkeleton } from '../User';
|
|
21
21
|
import PubSub from 'pubsub-js';
|
|
22
|
-
import {
|
|
22
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
23
23
|
const classes = {
|
|
24
24
|
root: `${PREFIX}-root`,
|
|
25
25
|
title: `${PREFIX}-title`,
|
|
@@ -170,7 +170,7 @@ export default function GroupInvitedWidget(inProps) {
|
|
|
170
170
|
*/
|
|
171
171
|
useEffect(() => {
|
|
172
172
|
if (scGroup && state.results) {
|
|
173
|
-
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${
|
|
173
|
+
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.GROUP}.${SCGroupEventType.INVITE_MEMBER}`, onChangeGroupHandler);
|
|
174
174
|
}
|
|
175
175
|
return () => {
|
|
176
176
|
updatesSubscription.current && PubSub.unsubscribe(updatesSubscription.current);
|
|
@@ -9,7 +9,7 @@ import { useThemeProps } from '@mui/system';
|
|
|
9
9
|
import { Link, SCRoutes, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
10
10
|
import ConfirmDialog from '../../shared/ConfirmDialog/ConfirmDialog';
|
|
11
11
|
import { GroupService } from '@selfcommunity/api-services';
|
|
12
|
-
import {
|
|
12
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
13
13
|
import PubSub from 'pubsub-js';
|
|
14
14
|
const PREFIX = 'SCGroupSettingsIconButton';
|
|
15
15
|
const classes = {
|
|
@@ -92,7 +92,7 @@ export default function GroupSettingsIconButton(inProps) {
|
|
|
92
92
|
*/
|
|
93
93
|
function notifyChanges(group, user) {
|
|
94
94
|
if (group && user) {
|
|
95
|
-
PubSub.publish(`${SCTopicType.GROUP}.${
|
|
95
|
+
PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.REMOVE_MEMBER}`, { group, user });
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
@@ -9,7 +9,7 @@ import { FormattedMessage } from 'react-intl';
|
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { useThemeProps } from '@mui/system';
|
|
11
11
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
12
|
-
import {
|
|
12
|
+
import { SCGroupEventType, SCTopicType } from '../../constants/PubSub';
|
|
13
13
|
import PubSub from 'pubsub-js';
|
|
14
14
|
const PREFIX = 'SCGroupSubscribeButton';
|
|
15
15
|
const classes = {
|
|
@@ -80,7 +80,7 @@ export default function GroupSubscribeButton(inProps) {
|
|
|
80
80
|
*/
|
|
81
81
|
function notifyChanges(group, user) {
|
|
82
82
|
if (group && user) {
|
|
83
|
-
PubSub.publish(`${SCTopicType.GROUP}.${
|
|
83
|
+
PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.ADD_MEMBER}`, { group, user });
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
const subscribe = (user) => {
|
|
@@ -224,7 +224,7 @@ export default function IncubatorListWidget(inProps) {
|
|
|
224
224
|
React.createElement(Typography, { className: classes.title, variant: 'h5' },
|
|
225
225
|
React.createElement(FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" })),
|
|
226
226
|
React.createElement(IconButton, { className: classes.helpPopover, color: "primary", "aria-label": "info", component: "span", onClick: handleClickHelpButton },
|
|
227
|
-
React.createElement(Icon,
|
|
227
|
+
React.createElement(Icon, null, "help_outline")),
|
|
228
228
|
isOpen && (React.createElement(Popover, { open: isOpen, anchorEl: anchorEl, onClose: handlePopoverClose, anchorOrigin: {
|
|
229
229
|
vertical: 'bottom',
|
|
230
230
|
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;
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { Box, Button, ListItem, Typography, Zoom } from '@mui/material';
|
|
2
3
|
import { Link, SCRoutes, useSCFetchCategories, useSCRouting } from '@selfcommunity/react-core';
|
|
3
4
|
import React, { useEffect, useState } from 'react';
|
|
4
5
|
import Category from '../Category';
|
|
5
6
|
import { FormattedMessage } from 'react-intl';
|
|
6
7
|
import { sortByAttr } from '@selfcommunity/utils';
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import { styled } from '@mui/material/styles';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { useThemeProps } from '@mui/system';
|
|
11
|
+
const PREFIX = 'SCDefaultDrawerContent';
|
|
12
|
+
const classes = {
|
|
13
|
+
root: `${PREFIX}-root`
|
|
14
|
+
};
|
|
15
|
+
const Root = styled(Box, {
|
|
16
|
+
name: PREFIX,
|
|
17
|
+
slot: 'Root',
|
|
18
|
+
overridesResolver: (_, styles) => styles.root
|
|
19
|
+
})(() => ({}));
|
|
20
|
+
export default function DefaultDrawerContent(inProps) {
|
|
21
|
+
const props = useThemeProps({
|
|
22
|
+
props: inProps,
|
|
23
|
+
name: PREFIX
|
|
24
|
+
});
|
|
25
|
+
const { className, CategoryItemProps = { showTooltip: true } } = props, rest = __rest(props, ["className", "CategoryItemProps"]);
|
|
9
26
|
// HOOKS
|
|
10
27
|
const { categories } = useSCFetchCategories();
|
|
11
28
|
const [categoriesOrdered, setCategoriesOrdered] = useState([]);
|
|
@@ -35,7 +52,7 @@ export default function DefaultDrawerContent(props) {
|
|
|
35
52
|
onTouchMove: mouseLeave
|
|
36
53
|
});
|
|
37
54
|
//order
|
|
38
|
-
return (React.createElement(
|
|
55
|
+
return (React.createElement(Root, Object.assign({ className: classNames(className, classes.root) }, rest),
|
|
39
56
|
React.createElement(Typography, { variant: "subtitle1" },
|
|
40
57
|
React.createElement("span", null,
|
|
41
58
|
React.createElement(FormattedMessage, { id: "ui.navigationMenuIconButton.defaultDrawerContent.category.title", defaultMessage: "ui.navigationMenuIconButton.defaultDrawerContent.category.title" })),
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import { Link, SCPreferences, SCRoutes, useSCPreferences, useSCRouting } from '@selfcommunity/react-core';
|
|
2
3
|
import React, { useMemo } from 'react';
|
|
3
|
-
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { Box } from '@mui/material';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import { useThemeProps } from '@mui/system';
|
|
8
|
+
const PREFIX = 'SCDefaultHeaderContent';
|
|
9
|
+
const classes = {
|
|
10
|
+
root: `${PREFIX}-root`
|
|
11
|
+
};
|
|
12
|
+
const Root = styled(Box, {
|
|
13
|
+
name: PREFIX,
|
|
14
|
+
slot: 'Root',
|
|
15
|
+
overridesResolver: (_, styles) => styles.root
|
|
16
|
+
})(() => ({}));
|
|
17
|
+
export default function DefaultHeaderContent(inProps) {
|
|
18
|
+
const props = useThemeProps({
|
|
19
|
+
props: inProps,
|
|
20
|
+
name: PREFIX
|
|
21
|
+
});
|
|
22
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
4
23
|
const scRoutingContext = useSCRouting();
|
|
5
24
|
// PREFERENCES
|
|
6
25
|
const scPreferences = useSCPreferences();
|
|
7
26
|
const _logo = useMemo(() => {
|
|
8
27
|
return SCPreferences.LOGO_NAVBAR_LOGO in scPreferences.preferences ? scPreferences.preferences[SCPreferences.LOGO_NAVBAR_LOGO].value : null;
|
|
9
28
|
}, [scPreferences.preferences]);
|
|
10
|
-
return (React.createElement(
|
|
11
|
-
React.createElement(
|
|
29
|
+
return (React.createElement(Root, Object.assign({ className: classNames(className, classes.root) }, rest),
|
|
30
|
+
React.createElement(Link, { to: scRoutingContext.url(SCRoutes.HOME_ROUTE_NAME, {}) },
|
|
31
|
+
React.createElement("img", { src: _logo, alt: "logo" }))));
|
|
12
32
|
}
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
import NavigationMenuIconButton from './NavigationMenuIconButton';
|
|
2
|
+
import DefaultHeaderContent from './DefaultHeaderContent';
|
|
2
3
|
import DefaultDrawerContent from './DefaultDrawerContent';
|
|
3
4
|
export default NavigationMenuIconButton;
|
|
4
|
-
export { DefaultDrawerContent as NavigationMenuContent };
|
|
5
|
+
export { DefaultDrawerContent as NavigationMenuContent, DefaultHeaderContent as NavigationMenuHeader };
|
|
@@ -233,7 +233,7 @@ export default function UserNotification(inProps) {
|
|
|
233
233
|
notificationObject.aggregated[0].type === SCNotificationTypologyType.CONTRIBUTION)) {
|
|
234
234
|
const contribution = getContribution(notificationObject);
|
|
235
235
|
return (React.createElement(CardHeader, { className: classes.header, titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(contribution), getRouteData(notificationObject[contribution.type])) }, getContributionSnippet(contribution)), action: contribution && (React.createElement(Tooltip, { title: contribution.suspended ? (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (React.createElement(FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) },
|
|
236
|
-
React.createElement(LoadingButton, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ?
|
|
236
|
+
React.createElement(LoadingButton, { variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, contribution.suspended ? React.createElement(Icon, { color: 'primary' }, "notifications_off") : React.createElement(Icon, { color: 'inherit' }, "notifications")))) }));
|
|
237
237
|
}
|
|
238
238
|
return null;
|
|
239
239
|
}
|
|
@@ -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
|