@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.
Files changed (176) hide show
  1. package/lib/cjs/assets/logo.d.ts +2 -0
  2. package/lib/cjs/assets/logo.js +3 -0
  3. package/lib/cjs/components/Category/Category.d.ts +1 -1
  4. package/lib/cjs/components/Category/Category.js +1 -1
  5. package/lib/cjs/components/ChangeCover/ChangeCover.js +3 -3
  6. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
  7. package/lib/cjs/components/Composer/Composer.js +9 -7
  8. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
  9. package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
  10. package/lib/cjs/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
  11. package/lib/cjs/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
  12. package/lib/cjs/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
  13. package/lib/cjs/components/CreateEventButton/CreateEventButton.d.ts +38 -0
  14. package/lib/cjs/components/CreateEventButton/CreateEventButton.js +79 -0
  15. package/lib/cjs/components/CreateEventButton/index.d.ts +3 -0
  16. package/lib/cjs/components/CreateEventButton/index.js +5 -0
  17. package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +1 -1
  18. package/lib/cjs/components/Event/Event.d.ts +57 -0
  19. package/lib/cjs/components/Event/Event.js +90 -0
  20. package/lib/cjs/components/Event/Skeleton.d.ts +22 -0
  21. package/lib/cjs/components/Event/Skeleton.js +44 -0
  22. package/lib/cjs/components/Event/constants.d.ts +1 -0
  23. package/lib/cjs/components/Event/constants.js +4 -0
  24. package/lib/cjs/components/Event/index.d.ts +4 -0
  25. package/lib/cjs/components/Event/index.js +8 -0
  26. package/lib/cjs/components/EventForm/EventAddress.d.ts +12 -0
  27. package/lib/cjs/components/EventForm/EventAddress.js +129 -0
  28. package/lib/cjs/components/EventForm/EventForm.d.ts +59 -0
  29. package/lib/cjs/components/EventForm/EventForm.js +323 -0
  30. package/lib/cjs/components/EventForm/UploadEventCover.d.ts +40 -0
  31. package/lib/cjs/components/EventForm/UploadEventCover.js +98 -0
  32. package/lib/cjs/components/EventForm/constants.d.ts +1 -0
  33. package/lib/cjs/components/EventForm/constants.js +4 -0
  34. package/lib/cjs/components/EventForm/index.d.ts +3 -0
  35. package/lib/cjs/components/EventForm/index.js +5 -0
  36. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
  37. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +103 -0
  38. package/lib/cjs/components/EventLocationWidget/Skeleton.d.ts +22 -0
  39. package/lib/cjs/components/EventLocationWidget/Skeleton.js +47 -0
  40. package/lib/cjs/components/EventLocationWidget/constants.d.ts +1 -0
  41. package/lib/cjs/components/EventLocationWidget/constants.js +4 -0
  42. package/lib/cjs/components/EventLocationWidget/index.d.ts +4 -0
  43. package/lib/cjs/components/EventLocationWidget/index.js +8 -0
  44. package/lib/cjs/components/Feed/Feed.js +1 -1
  45. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +5 -5
  46. package/lib/cjs/components/GroupForm/GroupForm.js +2 -2
  47. package/lib/cjs/components/GroupHeader/GroupHeader.js +3 -3
  48. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +1 -1
  49. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +3 -3
  50. package/lib/cjs/components/GroupInvitedWidget/GroupInvitedWidget.js +1 -1
  51. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
  52. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +1 -1
  53. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
  54. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
  55. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +19 -3
  56. package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
  57. package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.js +22 -3
  58. package/lib/cjs/components/NavigationMenuIconButton/index.d.ts +2 -1
  59. package/lib/cjs/components/NavigationMenuIconButton/index.js +3 -1
  60. package/lib/cjs/components/Notification/Notification.js +1 -1
  61. package/lib/cjs/components/PlatformWidget/PlatformWidget.d.ts +24 -2
  62. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +256 -18
  63. package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
  64. package/lib/cjs/components/PlatformWidget/constants.js +5 -1
  65. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
  66. package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
  67. package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
  68. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  69. package/lib/cjs/constants/Event.d.ts +2 -0
  70. package/lib/cjs/constants/Event.js +5 -0
  71. package/lib/cjs/constants/PubSub.d.ts +1 -1
  72. package/lib/cjs/constants/PubSub.js +10 -10
  73. package/lib/cjs/index.d.ts +12 -4
  74. package/lib/cjs/index.js +21 -5
  75. package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -2
  76. package/lib/cjs/shared/EmojiPicker/EmojiPicker.js +4 -2
  77. package/lib/cjs/shared/Media/File/PreviewComponent.d.ts +1 -1
  78. package/lib/cjs/shared/Media/Link/LayerComponent.d.ts +1 -1
  79. package/lib/cjs/shared/Media/Link/PreviewComponent.d.ts +1 -1
  80. package/lib/cjs/shared/MetadataField/index.d.ts +2 -1
  81. package/lib/cjs/types/index.d.ts +2 -1
  82. package/lib/cjs/types/platformWidget.d.ts +15 -0
  83. package/lib/cjs/types/platformWidget.js +2 -0
  84. package/lib/cjs/utils/string.d.ts +1 -0
  85. package/lib/cjs/utils/string.js +9 -1
  86. package/lib/esm/assets/logo.d.ts +2 -0
  87. package/lib/esm/assets/logo.js +1 -0
  88. package/lib/esm/components/Category/Category.d.ts +1 -1
  89. package/lib/esm/components/Category/Category.js +1 -1
  90. package/lib/esm/components/ChangeCover/ChangeCover.js +3 -3
  91. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
  92. package/lib/esm/components/Composer/Composer.js +9 -7
  93. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
  94. package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
  95. package/lib/esm/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
  96. package/lib/esm/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
  97. package/lib/esm/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
  98. package/lib/esm/components/CreateEventButton/CreateEventButton.d.ts +38 -0
  99. package/lib/esm/components/CreateEventButton/CreateEventButton.js +76 -0
  100. package/lib/esm/components/CreateEventButton/index.d.ts +3 -0
  101. package/lib/esm/components/CreateEventButton/index.js +2 -0
  102. package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +1 -1
  103. package/lib/esm/components/Event/Event.d.ts +57 -0
  104. package/lib/esm/components/Event/Event.js +87 -0
  105. package/lib/esm/components/Event/Skeleton.d.ts +22 -0
  106. package/lib/esm/components/Event/Skeleton.js +40 -0
  107. package/lib/esm/components/Event/constants.d.ts +1 -0
  108. package/lib/esm/components/Event/constants.js +1 -0
  109. package/lib/esm/components/Event/index.d.ts +4 -0
  110. package/lib/esm/components/Event/index.js +4 -0
  111. package/lib/esm/components/EventForm/EventAddress.d.ts +12 -0
  112. package/lib/esm/components/EventForm/EventAddress.js +126 -0
  113. package/lib/esm/components/EventForm/EventForm.d.ts +59 -0
  114. package/lib/esm/components/EventForm/EventForm.js +320 -0
  115. package/lib/esm/components/EventForm/UploadEventCover.d.ts +40 -0
  116. package/lib/esm/components/EventForm/UploadEventCover.js +95 -0
  117. package/lib/esm/components/EventForm/constants.d.ts +1 -0
  118. package/lib/esm/components/EventForm/constants.js +1 -0
  119. package/lib/esm/components/EventForm/index.d.ts +3 -0
  120. package/lib/esm/components/EventForm/index.js +2 -0
  121. package/lib/esm/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
  122. package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +100 -0
  123. package/lib/esm/components/EventLocationWidget/Skeleton.d.ts +22 -0
  124. package/lib/esm/components/EventLocationWidget/Skeleton.js +43 -0
  125. package/lib/esm/components/EventLocationWidget/constants.d.ts +1 -0
  126. package/lib/esm/components/EventLocationWidget/constants.js +1 -0
  127. package/lib/esm/components/EventLocationWidget/index.d.ts +4 -0
  128. package/lib/esm/components/EventLocationWidget/index.js +4 -0
  129. package/lib/esm/components/Feed/Feed.js +2 -2
  130. package/lib/esm/components/FeedObject/Actions/Share/Share.js +5 -5
  131. package/lib/esm/components/GroupForm/GroupForm.js +3 -3
  132. package/lib/esm/components/GroupHeader/GroupHeader.js +4 -4
  133. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +2 -2
  134. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +4 -4
  135. package/lib/esm/components/GroupInvitedWidget/GroupInvitedWidget.js +2 -2
  136. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +2 -2
  137. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +2 -2
  138. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
  139. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
  140. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +21 -4
  141. package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
  142. package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.js +23 -3
  143. package/lib/esm/components/NavigationMenuIconButton/index.d.ts +2 -1
  144. package/lib/esm/components/NavigationMenuIconButton/index.js +2 -1
  145. package/lib/esm/components/Notification/Notification.js +1 -1
  146. package/lib/esm/components/PlatformWidget/PlatformWidget.d.ts +24 -2
  147. package/lib/esm/components/PlatformWidget/PlatformWidget.js +260 -22
  148. package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
  149. package/lib/esm/components/PlatformWidget/constants.js +4 -0
  150. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
  151. package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
  152. package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
  153. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  154. package/lib/esm/constants/Event.d.ts +2 -0
  155. package/lib/esm/constants/Event.js +2 -0
  156. package/lib/esm/constants/PubSub.d.ts +1 -1
  157. package/lib/esm/constants/PubSub.js +9 -9
  158. package/lib/esm/index.d.ts +12 -4
  159. package/lib/esm/index.js +13 -3
  160. package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -2
  161. package/lib/esm/shared/EmojiPicker/EmojiPicker.js +4 -2
  162. package/lib/esm/shared/Media/File/PreviewComponent.d.ts +1 -1
  163. package/lib/esm/shared/Media/Link/LayerComponent.d.ts +1 -1
  164. package/lib/esm/shared/Media/Link/PreviewComponent.d.ts +1 -1
  165. package/lib/esm/shared/MetadataField/index.d.ts +2 -1
  166. package/lib/esm/types/index.d.ts +2 -1
  167. package/lib/esm/types/platformWidget.d.ts +15 -0
  168. package/lib/esm/types/platformWidget.js +1 -0
  169. package/lib/esm/utils/string.d.ts +1 -0
  170. package/lib/esm/utils/string.js +7 -0
  171. package/lib/umd/204.js +2 -0
  172. package/lib/umd/204.js.LICENSE.txt +22 -0
  173. package/lib/umd/react-ui.js +1 -1
  174. package/package.json +24 -7
  175. package/lib/umd/311.js +0 -2
  176. 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';
@@ -0,0 +1,4 @@
1
+ import EventLocationWidget, { EventLocationWidgetProps } from './EventLocationWidget';
2
+ import EventLocationWidgetSkeleton from './Skeleton';
3
+ export default EventLocationWidget;
4
+ export { EventLocationWidgetProps, EventLocationWidgetSkeleton };
@@ -0,0 +1,4 @@
1
+ import EventLocationWidget from './EventLocationWidget';
2
+ import EventLocationWidgetSkeleton from './Skeleton';
3
+ export default EventLocationWidget;
4
+ export { EventLocationWidgetSkeleton };
@@ -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: typeof window !== 'undefined' });
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, { fontSize: "small" }, "redo")),
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, { fontSize: "small" }, "facebook")),
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, { fontSize: "small" }, "twitter")),
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, { fontSize: "small" }, "linkedin")),
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, { fontSize: "small" }, "link")),
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.EDIT}`, data);
156
+ PubSub.publish(`${SCTopicType.GROUP}.${SCGroupEventType.EDIT}`, data);
157
157
  }
158
158
  else {
159
159
  // Create group
160
- PubSub.publish(`${SCTopicType.GROUP}.${SCEventType.CREATE}`, data);
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.ADD_MEMBER}`) {
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}.${SCEventType.REMOVE_MEMBER}`) {
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}.${SCEventType.MEMBERS}`, onChangeGroupMembersHandler);
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.EDIT}`, onChangeGroupHandler);
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.INVITE_MEMBER}`, usersInvited);
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, { fontSize: "small" }, "add") }, rest),
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, { fontSize: "medium" }, "arrow_back")),
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.INVITE_MEMBER}`, onChangeGroupHandler);
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.REMOVE_MEMBER}`, { group, user });
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 { SCEventType, SCTopicType } from '../../constants/PubSub';
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}.${SCEventType.ADD_MEMBER}`, { group, user });
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, { fontSize: "small" }, "help_outline")),
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(props: DefaultDrawerContentProps): JSX.Element;
6
+ export default function DefaultDrawerContent(inProps: DefaultDrawerContentProps): JSX.Element;
@@ -1,11 +1,28 @@
1
- import { Button, ListItem, Typography, Zoom } from '@mui/material';
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
- export default function DefaultDrawerContent(props) {
8
- const { CategoryItemProps = {} } = props;
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(React.Fragment, null,
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 +1,3 @@
1
- export default function DefaultHeaderContent(): JSX.Element;
1
+ import { BoxProps } from '@mui/material';
2
+ export declare type DefaultHeaderContentProps = BoxProps;
3
+ export default function DefaultHeaderContent(inProps: DefaultHeaderContentProps): JSX.Element;
@@ -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
- export default function DefaultHeaderContent() {
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(Link, { to: scRoutingContext.url(SCRoutes.HOME_ROUTE_NAME, {}) },
11
- React.createElement("img", { src: _logo, alt: "logo" })));
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 ? (React.createElement(Icon, { fontSize: "small", color: 'primary' }, "notifications_off")) : (React.createElement(Icon, { fontSize: "small", color: 'inherit' }, "notifications"))))) }));
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?: React.ReactNode | null;
23
+ startActions?: PlatformWidgetActionType[];
23
24
  /**
24
25
  * Actions to be inserted after
25
26
  */
26
- endActions?: React.ReactNode | null;
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