@selfcommunity/react-ui 0.7.50-events.44 → 0.7.50-events.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/CreateEventButton/CreateEventButton.js +6 -4
- package/lib/cjs/components/CreateEventWidget/CreateEventWidget.d.ts +14 -0
- package/lib/cjs/components/CreateEventWidget/CreateEventWidget.js +63 -0
- package/lib/cjs/components/CreateEventWidget/Skeleton.d.ts +1 -0
- package/lib/cjs/components/CreateEventWidget/Skeleton.js +25 -0
- package/lib/cjs/components/CreateEventWidget/constants.d.ts +1 -0
- package/lib/cjs/components/CreateEventWidget/constants.js +4 -0
- package/lib/cjs/components/CreateEventWidget/index.d.ts +4 -0
- package/lib/cjs/components/CreateEventWidget/index.js +8 -0
- package/lib/cjs/components/Event/Event.d.ts +28 -0
- package/lib/cjs/components/Event/Event.js +64 -8
- package/lib/cjs/components/Event/Skeleton.d.ts +9 -3
- package/lib/cjs/components/Event/Skeleton.js +48 -6
- package/lib/cjs/components/EventHeader/EventHeader.js +10 -3
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +2 -1
- package/lib/cjs/components/EventInfoWidget/Skeleton.js +1 -1
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +8 -3
- package/lib/cjs/components/EventPartecipantsButton/EventPartecipantsButton.js +7 -8
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +3 -2
- package/lib/cjs/components/Events/Events.d.ts +6 -1
- package/lib/cjs/components/Events/Events.js +3 -3
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +1 -1
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/cjs/components/MyEventsWidget/MyEventsWidget.js +19 -10
- package/lib/cjs/components/MyEventsWidget/Skeleton.js +6 -26
- package/lib/cjs/components/Notification/Event/Event.d.ts +15 -0
- package/lib/cjs/components/Notification/Event/Event.js +71 -0
- package/lib/cjs/components/Notification/Event/index.d.ts +3 -0
- package/lib/cjs/components/Notification/Event/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +26 -0
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +7 -0
- package/lib/cjs/components/SuggestedEventsWidget/Skeleton.d.ts +2 -0
- package/lib/cjs/components/SuggestedEventsWidget/Skeleton.js +28 -0
- package/lib/cjs/components/SuggestedEventsWidget/SuggestedEventsWidget.d.ts +14 -0
- package/lib/cjs/components/SuggestedEventsWidget/SuggestedEventsWidget.js +80 -0
- package/lib/cjs/components/SuggestedEventsWidget/constants.d.ts +1 -0
- package/lib/cjs/components/SuggestedEventsWidget/constants.js +4 -0
- package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +4 -0
- package/lib/cjs/components/SuggestedEventsWidget/index.js +8 -0
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +7 -0
- package/lib/cjs/constants/EventActionsMenu.d.ts +6 -0
- package/lib/cjs/constants/EventActionsMenu.js +9 -0
- package/lib/cjs/constants/Media.d.ts +2 -0
- package/lib/cjs/constants/Media.js +3 -1
- package/lib/cjs/index.d.ts +4 -1
- package/lib/cjs/index.js +12 -4
- package/lib/cjs/shared/Calendar/index.js +1 -1
- package/lib/cjs/shared/EventActionsMenu/index.d.ts +49 -0
- package/lib/cjs/shared/EventActionsMenu/index.js +154 -0
- package/lib/cjs/shared/EventInfoDetails/index.d.ts +12 -0
- package/lib/cjs/shared/EventInfoDetails/index.js +3 -3
- package/lib/cjs/shared/Media/Event/DisplayComponent.d.ts +15 -0
- package/lib/cjs/shared/Media/Event/DisplayComponent.js +31 -0
- package/lib/cjs/shared/Media/Event/constants.d.ts +1 -0
- package/lib/cjs/shared/Media/Event/constants.js +4 -0
- package/lib/cjs/shared/Media/Event/filter.d.ts +3 -0
- package/lib/cjs/shared/Media/Event/filter.js +4 -0
- package/lib/cjs/shared/Media/Event/index.d.ts +3 -0
- package/lib/cjs/shared/Media/Event/index.js +14 -0
- package/lib/cjs/shared/Media/Link/PreviewComponent.js +1 -1
- package/lib/cjs/shared/Media/index.d.ts +2 -1
- package/lib/cjs/shared/Media/index.js +3 -1
- package/lib/cjs/types/event.d.ts +5 -0
- package/lib/cjs/types/event.js +9 -0
- package/lib/esm/components/CreateEventButton/CreateEventButton.js +6 -4
- package/lib/esm/components/CreateEventWidget/CreateEventWidget.d.ts +14 -0
- package/lib/esm/components/CreateEventWidget/CreateEventWidget.js +60 -0
- package/lib/esm/components/CreateEventWidget/Skeleton.d.ts +1 -0
- package/lib/esm/components/CreateEventWidget/Skeleton.js +21 -0
- package/lib/esm/components/CreateEventWidget/constants.d.ts +1 -0
- package/lib/esm/components/CreateEventWidget/constants.js +1 -0
- package/lib/esm/components/CreateEventWidget/index.d.ts +4 -0
- package/lib/esm/components/CreateEventWidget/index.js +4 -0
- package/lib/esm/components/Event/Event.d.ts +28 -0
- package/lib/esm/components/Event/Event.js +66 -10
- package/lib/esm/components/Event/Skeleton.d.ts +9 -3
- package/lib/esm/components/Event/Skeleton.js +50 -7
- package/lib/esm/components/EventHeader/EventHeader.js +11 -4
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +2 -1
- package/lib/esm/components/EventInfoWidget/Skeleton.js +1 -1
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +8 -3
- package/lib/esm/components/EventPartecipantsButton/EventPartecipantsButton.js +8 -9
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +3 -2
- package/lib/esm/components/Events/Events.d.ts +6 -1
- package/lib/esm/components/Events/Events.js +3 -3
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.d.ts +1 -1
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +2 -2
- package/lib/esm/components/MyEventsWidget/MyEventsWidget.js +23 -14
- package/lib/esm/components/MyEventsWidget/Skeleton.js +7 -27
- package/lib/esm/components/Notification/Event/Event.d.ts +15 -0
- package/lib/esm/components/Notification/Event/Event.js +68 -0
- package/lib/esm/components/Notification/Event/index.d.ts +3 -0
- package/lib/esm/components/Notification/Event/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +26 -0
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +7 -0
- package/lib/esm/components/SuggestedEventsWidget/Skeleton.d.ts +2 -0
- package/lib/esm/components/SuggestedEventsWidget/Skeleton.js +24 -0
- package/lib/esm/components/SuggestedEventsWidget/SuggestedEventsWidget.d.ts +14 -0
- package/lib/esm/components/SuggestedEventsWidget/SuggestedEventsWidget.js +77 -0
- package/lib/esm/components/SuggestedEventsWidget/constants.d.ts +1 -0
- package/lib/esm/components/SuggestedEventsWidget/constants.js +1 -0
- package/lib/esm/components/SuggestedEventsWidget/index.d.ts +4 -0
- package/lib/esm/components/SuggestedEventsWidget/index.js +4 -0
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +7 -0
- package/lib/esm/constants/EventActionsMenu.d.ts +6 -0
- package/lib/esm/constants/EventActionsMenu.js +6 -0
- package/lib/esm/constants/Media.d.ts +2 -0
- package/lib/esm/constants/Media.js +2 -0
- package/lib/esm/index.d.ts +4 -1
- package/lib/esm/index.js +6 -3
- package/lib/esm/shared/Calendar/index.js +1 -1
- package/lib/esm/shared/EventActionsMenu/index.d.ts +49 -0
- package/lib/esm/shared/EventActionsMenu/index.js +151 -0
- package/lib/esm/shared/EventInfoDetails/index.d.ts +12 -0
- package/lib/esm/shared/EventInfoDetails/index.js +3 -3
- package/lib/esm/shared/Media/Event/DisplayComponent.d.ts +15 -0
- package/lib/esm/shared/Media/Event/DisplayComponent.js +29 -0
- package/lib/esm/shared/Media/Event/constants.d.ts +1 -0
- package/lib/esm/shared/Media/Event/constants.js +1 -0
- package/lib/esm/shared/Media/Event/filter.d.ts +3 -0
- package/lib/esm/shared/Media/Event/filter.js +2 -0
- package/lib/esm/shared/Media/Event/index.d.ts +3 -0
- package/lib/esm/shared/Media/Event/index.js +11 -0
- package/lib/esm/shared/Media/Link/PreviewComponent.js +1 -1
- package/lib/esm/shared/Media/index.d.ts +2 -1
- package/lib/esm/shared/Media/index.js +2 -1
- package/lib/esm/types/event.d.ts +5 -0
- package/lib/esm/types/event.js +6 -0
- package/lib/umd/224.js +2 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
- package/lib/umd/84.js +0 -2
- /package/lib/umd/{84.js.LICENSE.txt → 224.js.LICENSE.txt} +0 -0
|
@@ -10,6 +10,7 @@ const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
|
10
10
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
11
11
|
const react_intl_1 = require("react-intl");
|
|
12
12
|
const EventForm_1 = tslib_1.__importDefault(require("../EventForm"));
|
|
13
|
+
const types_1 = require("@selfcommunity/types");
|
|
13
14
|
const PREFIX = 'SCCreateEventButton';
|
|
14
15
|
const classes = {
|
|
15
16
|
root: `${PREFIX}-root`
|
|
@@ -52,11 +53,12 @@ function CreateEventButton(inProps) {
|
|
|
52
53
|
const [open, setOpen] = react_1.default.useState(false);
|
|
53
54
|
// CONST
|
|
54
55
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
55
|
-
const preferences = (0, react_core_1.useSCPreferences)();
|
|
56
|
-
const
|
|
56
|
+
const { preferences, features } = (0, react_core_1.useSCPreferences)();
|
|
57
|
+
const eventsEnabled = (0, react_1.useMemo)(() => features && features.includes(types_1.SCFeatureName.EVENT) && features.includes(types_1.SCFeatureName.TAGGING), [features]);
|
|
58
|
+
const onlyStaffEnabled = (0, react_1.useMemo)(() => preferences[react_core_1.SCPreferences.CONFIGURATIONS_EVENTS_ONLY_STAFF_ENABLED].value, [preferences]);
|
|
57
59
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
58
60
|
// @ts-ignore
|
|
59
|
-
const canCreateEvent = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.
|
|
61
|
+
const canCreateEvent = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_event; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
|
|
60
62
|
/**
|
|
61
63
|
* Handle click on button
|
|
62
64
|
*/
|
|
@@ -66,7 +68,7 @@ function CreateEventButton(inProps) {
|
|
|
66
68
|
/**
|
|
67
69
|
* If there's no authUserId, component is hidden.
|
|
68
70
|
*/
|
|
69
|
-
if ((!canCreateEvent && onlyStaffEnabled) || !authUserId) {
|
|
71
|
+
if (!eventsEnabled || (!canCreateEvent && onlyStaffEnabled) || !authUserId) {
|
|
70
72
|
return null;
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CreateEventButtonProps } from '../CreateEventButton';
|
|
2
|
+
import { WidgetProps } from '../Widget';
|
|
3
|
+
export interface CreateEventWidgetProps extends WidgetProps {
|
|
4
|
+
/**
|
|
5
|
+
* Props to spread to CreateEventButton component
|
|
6
|
+
* @default {}
|
|
7
|
+
*/
|
|
8
|
+
CreateEventButtonComponentProps?: CreateEventButtonProps;
|
|
9
|
+
/**
|
|
10
|
+
* Other props
|
|
11
|
+
*/
|
|
12
|
+
[p: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export default function CreateEventWidget(inProps: CreateEventWidgetProps): JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_intl_1 = require("react-intl");
|
|
9
|
+
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
10
|
+
const CreateEventButton_1 = tslib_1.__importDefault(require("../CreateEventButton"));
|
|
11
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
12
|
+
const constants_1 = require("./constants");
|
|
13
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
14
|
+
const types_1 = require("@selfcommunity/types");
|
|
15
|
+
const classes = {
|
|
16
|
+
root: `${constants_1.PREFIX}-root`,
|
|
17
|
+
image: `${constants_1.PREFIX}-image`,
|
|
18
|
+
calendar: `${constants_1.PREFIX}-calendar`,
|
|
19
|
+
content: `${constants_1.PREFIX}-content`,
|
|
20
|
+
title: `${constants_1.PREFIX}-title`,
|
|
21
|
+
spaging: `${constants_1.PREFIX}-spacing`,
|
|
22
|
+
actions: `${constants_1.PREFIX}-actions`
|
|
23
|
+
};
|
|
24
|
+
const Root = (0, material_1.styled)(Widget_1.default, {
|
|
25
|
+
name: constants_1.PREFIX,
|
|
26
|
+
slot: 'Root',
|
|
27
|
+
overridesResolver: (_props, styles) => styles.root
|
|
28
|
+
})(() => ({}));
|
|
29
|
+
function CreateEventWidget(inProps) {
|
|
30
|
+
var _a;
|
|
31
|
+
// PROPS
|
|
32
|
+
const props = (0, material_1.useThemeProps)({
|
|
33
|
+
props: inProps,
|
|
34
|
+
name: constants_1.PREFIX
|
|
35
|
+
});
|
|
36
|
+
const { CreateEventButtonComponentProps = {} } = props, rest = tslib_1.__rest(props, ["CreateEventButtonComponentProps"]);
|
|
37
|
+
// STATE
|
|
38
|
+
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
39
|
+
// CONTEXT
|
|
40
|
+
const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
|
|
41
|
+
// HOOK
|
|
42
|
+
const { preferences, features } = (0, react_core_1.useSCPreferences)();
|
|
43
|
+
const eventsEnabled = (0, react_1.useMemo)(() => features && features.includes(types_1.SCFeatureName.EVENT) && features.includes(types_1.SCFeatureName.TAGGING), [features]);
|
|
44
|
+
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
45
|
+
const onlyStaffEnabled = (0, react_1.useMemo)(() => preferences[react_core_1.SCPreferences.CONFIGURATIONS_GROUPS_ONLY_STAFF_ENABLED].value, [preferences]);
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
const canCreateEvent = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_group; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
|
|
49
|
+
(0, react_1.useEffect)(() => {
|
|
50
|
+
setLoading(false);
|
|
51
|
+
}, []);
|
|
52
|
+
if (loading) {
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* If there's no authUserId, component is hidden.
|
|
57
|
+
*/
|
|
58
|
+
if (!eventsEnabled || (!canCreateEvent && onlyStaffEnabled) || !authUserId) {
|
|
59
|
+
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
60
|
+
}
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(material_1.CardMedia, { component: "img", image: `${preferences[react_core_1.SCPreferences.IMAGES_USER_DEFAULT_COVER].value}`, alt: "placeholder image", className: classes.image }), (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.calendar, fontSize: "large" }, { children: "CalendarIcon" }))] })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createEvent.title", defaultMessage: "ui.createEvent.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.spaging }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createEvent.description", defaultMessage: "ui.createEvent.description" }) })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.spaging })] })), (0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({}, CreateEventButtonComponentProps)) }))] })));
|
|
62
|
+
}
|
|
63
|
+
exports.default = CreateEventWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CreateEventWidgetSkeleton(): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("@mui/material/Skeleton"));
|
|
7
|
+
const styles_1 = require("@mui/material/styles");
|
|
8
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
9
|
+
const constants_1 = require("./constants");
|
|
10
|
+
const classes = {
|
|
11
|
+
root: `${constants_1.PREFIX}-skeleton-root`,
|
|
12
|
+
calendar: `${constants_1.PREFIX}-calendar`,
|
|
13
|
+
content: `${constants_1.PREFIX}-content`,
|
|
14
|
+
title: `${constants_1.PREFIX}-title`,
|
|
15
|
+
spacing: `${constants_1.PREFIX}-spacing`,
|
|
16
|
+
actions: `${constants_1.PREFIX}-actions`
|
|
17
|
+
};
|
|
18
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
19
|
+
name: constants_1.PREFIX,
|
|
20
|
+
slot: 'SkeletonRoot'
|
|
21
|
+
})(() => ({}));
|
|
22
|
+
function CreateEventWidgetSkeleton() {
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "rectangular", animation: "wave", width: "100%", height: "110px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { className: classes.calendar, variant: "rounded", animation: "wave", width: "50px", height: "50px" })] })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { className: classes.title, animation: "wave", width: "26%", height: "30px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { className: classes.spacing, animation: "wave", width: "100%", height: "20px" }), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.spacing })] })), (0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "rounded", width: "138px", height: "36px" }) }))] })));
|
|
24
|
+
}
|
|
25
|
+
exports.default = CreateEventWidgetSkeleton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCreateEventWidget";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateEventWidgetSkeleton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const CreateEventWidget_1 = tslib_1.__importDefault(require("./CreateEventWidget"));
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
7
|
+
exports.CreateEventWidgetSkeleton = Skeleton_1.default;
|
|
8
|
+
exports.default = CreateEventWidget_1.default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SCEventType } from '@selfcommunity/types';
|
|
2
3
|
import { WidgetProps } from '../Widget';
|
|
4
|
+
import { EventSkeletonProps } from './Skeleton';
|
|
5
|
+
import { SCEventTemplateType } from '../../types/event';
|
|
3
6
|
export interface EventProps extends WidgetProps {
|
|
4
7
|
/**
|
|
5
8
|
* Event Object
|
|
@@ -11,6 +14,31 @@ export interface EventProps extends WidgetProps {
|
|
|
11
14
|
* @default null
|
|
12
15
|
*/
|
|
13
16
|
eventId?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Event template type
|
|
19
|
+
* @default 'preview'
|
|
20
|
+
*/
|
|
21
|
+
template?: SCEventTemplateType;
|
|
22
|
+
/**
|
|
23
|
+
* Actions
|
|
24
|
+
* @default null
|
|
25
|
+
*/
|
|
26
|
+
actions?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Hide participants
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
hideEventParticipants?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Hide event planner
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
hideEventPlanner?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Props to spread to EventSkeleton component
|
|
39
|
+
* @default {}
|
|
40
|
+
*/
|
|
41
|
+
EventSkeletonComponentProps?: EventSkeletonProps;
|
|
14
42
|
/**
|
|
15
43
|
* Any other properties
|
|
16
44
|
*/
|
|
@@ -10,20 +10,59 @@ const react_intl_1 = require("react-intl");
|
|
|
10
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
11
|
const system_1 = require("@mui/system");
|
|
12
12
|
const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
|
|
13
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
13
14
|
const constants_1 = require("./constants");
|
|
14
15
|
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
16
|
+
const Calendar_1 = tslib_1.__importDefault(require("../../shared/Calendar"));
|
|
17
|
+
const EventInfoDetails_1 = tslib_1.__importDefault(require("../../shared/EventInfoDetails"));
|
|
18
|
+
const User_1 = tslib_1.__importDefault(require("../User"));
|
|
19
|
+
const EventPartecipantsButton_1 = tslib_1.__importDefault(require("../EventPartecipantsButton"));
|
|
20
|
+
const event_1 = require("../../types/event");
|
|
15
21
|
const classes = {
|
|
16
22
|
root: `${constants_1.PREFIX}-root`,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
detailRoot: `${constants_1.PREFIX}-detail-root`,
|
|
24
|
+
previewRoot: `${constants_1.PREFIX}-preview-root`,
|
|
25
|
+
snippetRoot: `${constants_1.PREFIX}-snippet-root`,
|
|
26
|
+
detailImageWrapper: `${constants_1.PREFIX}-detail-image-wrapper`,
|
|
27
|
+
detailImage: `${constants_1.PREFIX}-detail-image`,
|
|
28
|
+
detailNameWrapper: `${constants_1.PREFIX}-detail-name-wrapper`,
|
|
29
|
+
detailName: `${constants_1.PREFIX}-detail-name`,
|
|
30
|
+
detailContent: `${constants_1.PREFIX}-detail-content`,
|
|
31
|
+
detailUser: `${constants_1.PREFIX}-detail-user`,
|
|
32
|
+
detailFirstDivider: `${constants_1.PREFIX}-detail-first-divider`,
|
|
33
|
+
detailSecondDivider: `${constants_1.PREFIX}-detail-second-divider`,
|
|
34
|
+
detailActions: `${constants_1.PREFIX}-detail-actions`,
|
|
35
|
+
previewImageWrapper: `${constants_1.PREFIX}-preview-image-wrapper`,
|
|
36
|
+
previewImage: `${constants_1.PREFIX}-preview-image`,
|
|
37
|
+
previewNameWrapper: `${constants_1.PREFIX}-preview-name-wrapper`,
|
|
38
|
+
previewName: `${constants_1.PREFIX}-preview-name`,
|
|
39
|
+
previewContent: `${constants_1.PREFIX}-preview-content`,
|
|
40
|
+
previewActions: `${constants_1.PREFIX}-preview-actions`,
|
|
41
|
+
snippetAvatar: `${constants_1.PREFIX}-snippet-avatar`,
|
|
42
|
+
snippetPrimary: `${constants_1.PREFIX}-snippet-primary`,
|
|
43
|
+
snippetSecondary: `${constants_1.PREFIX}-snippet-secondary`,
|
|
44
|
+
snippetActions: `${constants_1.PREFIX}-snippet-actions`
|
|
21
45
|
};
|
|
22
|
-
const Root = (0, styles_1.styled)(
|
|
46
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
23
47
|
name: constants_1.PREFIX,
|
|
24
48
|
slot: 'Root',
|
|
25
49
|
overridesResolver: (props, styles) => styles.root
|
|
26
50
|
})(() => ({}));
|
|
51
|
+
const DetailRoot = (0, styles_1.styled)(material_1.Box, {
|
|
52
|
+
name: constants_1.PREFIX,
|
|
53
|
+
slot: 'DetailRoot',
|
|
54
|
+
overridesResolver: (props, styles) => styles.detailRoot
|
|
55
|
+
})(() => ({}));
|
|
56
|
+
const PreviewRoot = (0, styles_1.styled)(material_1.Box, {
|
|
57
|
+
name: constants_1.PREFIX,
|
|
58
|
+
slot: 'PreviewRoot',
|
|
59
|
+
overridesResolver: (props, styles) => styles.previewRoot
|
|
60
|
+
})(() => ({}));
|
|
61
|
+
const SnippetRoot = (0, styles_1.styled)(BaseItem_1.default, {
|
|
62
|
+
name: constants_1.PREFIX,
|
|
63
|
+
slot: 'SnippetRoot',
|
|
64
|
+
overridesResolver: (props, styles) => styles.snippetRoot
|
|
65
|
+
})(() => ({}));
|
|
27
66
|
/**
|
|
28
67
|
* > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
|
|
29
68
|
*
|
|
@@ -62,7 +101,7 @@ function Event(inProps) {
|
|
|
62
101
|
props: inProps,
|
|
63
102
|
name: constants_1.PREFIX
|
|
64
103
|
});
|
|
65
|
-
const { eventId = null, event = null, className = null,
|
|
104
|
+
const { id = `event_object_${props.eventId ? props.eventId : props.event ? props.event.id : ''}`, eventId = null, event = null, className = null, template = event_1.SCEventTemplateType.SNIPPET, hideEventParticipants = false, hideEventPlanner = false, actions, EventSkeletonComponentProps = {} } = props, rest = tslib_1.__rest(props, ["id", "eventId", "event", "className", "template", "hideEventParticipants", "hideEventPlanner", "actions", "EventSkeletonComponentProps"]);
|
|
66
105
|
// STATE
|
|
67
106
|
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
|
|
68
107
|
// CONTEXT
|
|
@@ -73,11 +112,28 @@ function Event(inProps) {
|
|
|
73
112
|
* Renders event object
|
|
74
113
|
*/
|
|
75
114
|
if (!scEvent) {
|
|
76
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {
|
|
115
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ template: template }, EventSkeletonComponentProps, rest, { actions: actions }));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Renders event object
|
|
119
|
+
*/
|
|
120
|
+
let contentObj;
|
|
121
|
+
if (template === event_1.SCEventTemplateType.DETAIL) {
|
|
122
|
+
contentObj = ((0, jsx_runtime_1.jsxs)(DetailRoot, Object.assign({ className: classes.detailRoot }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.detailImageWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.CardMedia, { component: "img", image: scEvent.image_medium, alt: scEvent.name, className: classes.detailImage }), (0, jsx_runtime_1.jsx)(Calendar_1.default, { day: new Date(scEvent.start_date).getDate() })] })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.detailContent }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, scEvent), className: classes.detailNameWrapper }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.detailName }, { children: scEvent.name })) })), (0, jsx_runtime_1.jsx)(EventInfoDetails_1.default, { event: scEvent }), !hideEventPlanner && ((0, jsx_runtime_1.jsx)(User_1.default, { user: scEvent.managed_by, elevation: 0, secondary: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "caption" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.myEventsWidget.planner", defaultMessage: "ui.myEventsWidget.planner" }) })), actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), className: classes.detailUser })), !hideEventParticipants && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.detailFirstDivider }), (0, jsx_runtime_1.jsx)(EventPartecipantsButton_1.default, { event: scEvent, eventId: scEvent.id })] })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.detailSecondDivider })] })), actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.detailActions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, scEvent) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.event.see", id: "ui.event.see" }) })) })))] })));
|
|
123
|
+
}
|
|
124
|
+
else if (template === event_1.SCEventTemplateType.PREVIEW) {
|
|
125
|
+
contentObj = ((0, jsx_runtime_1.jsxs)(PreviewRoot, Object.assign({ className: classes.previewRoot }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ position: "relative", className: classes.previewImageWrapper }, { children: (0, jsx_runtime_1.jsx)(material_1.CardMedia, { component: "img", height: "100px", image: scEvent.image_medium, alt: scEvent.name, className: classes.previewImage }) })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.previewContent }, { children: [(0, jsx_runtime_1.jsx)(EventInfoDetails_1.default, { event: scEvent, hidePrivacyIcon: true, hasLocationInfo: false, beforePrivacyInfo: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: scEvent.name })) }), !hideEventParticipants && (0, jsx_runtime_1.jsx)(EventPartecipantsButton_1.default, { event: scEvent })] })), actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.previewActions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, scEvent) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.event.see", id: "ui.event.see" }) })) })))] })));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
contentObj = ((0, jsx_runtime_1.jsx)(SnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.snippetRoot, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, { variant: "square", alt: scEvent.name, src: scEvent.image_medium, className: classes.snippetAvatar }), primary: (0, jsx_runtime_1.jsxs)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, scEvent), className: classes.snippetPrimary }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span" }, { children: `${intl.formatDate(scEvent.start_date, {
|
|
129
|
+
weekday: 'long',
|
|
130
|
+
month: 'long',
|
|
131
|
+
day: 'numeric'
|
|
132
|
+
})}` })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: scEvent.name }))] })), secondary: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "p", variant: "body2", className: classes.snippetSecondary }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.eventForm.privacy.${scEvent.privacy}`, defaultMessage: `ui.eventForm.privacy.${scEvent.privacy}` }), " -", ' ', (scEvent === null || scEvent === void 0 ? void 0 : scEvent.location) === types_1.SCEventLocationType.PERSON ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.eventForm.address.live.label`, defaultMessage: `ui.eventForm.address.live.label` })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.eventForm.address.online.label`, defaultMessage: `ui.eventForm.address.online.label` }))] })), actions: actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.snippetActions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, scEvent) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.event.see", id: "ui.event.see" }) })) }))) }));
|
|
77
133
|
}
|
|
78
134
|
/**
|
|
79
135
|
* Renders root object
|
|
80
136
|
*/
|
|
81
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({
|
|
137
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`) }, rest, { children: contentObj })));
|
|
82
138
|
}
|
|
83
139
|
exports.default = Event;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { SCEventTemplateType } from '../../types/event';
|
|
3
|
+
import { WidgetProps } from '../Widget';
|
|
4
|
+
export interface EventSkeletonProps extends WidgetProps {
|
|
4
5
|
/**
|
|
5
6
|
* Overrides or extends the styles applied to the component.
|
|
6
7
|
* @default null
|
|
7
8
|
*/
|
|
8
9
|
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Event template type
|
|
12
|
+
* @default 'preview'
|
|
13
|
+
*/
|
|
14
|
+
template?: SCEventTemplateType;
|
|
9
15
|
/**
|
|
10
16
|
* Prop to pass an action to be rendered next to the skeleton
|
|
11
17
|
*/
|
|
12
|
-
|
|
18
|
+
actions?: React.ReactNode;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* > API documentation for the Community-JS Event Skeleton component. Learn about the available props and the CSS API.
|
|
@@ -6,17 +6,41 @@ const material_1 = require("@mui/material");
|
|
|
6
6
|
const styles_1 = require("@mui/material/styles");
|
|
7
7
|
const Skeleton_1 = tslib_1.__importDefault(require("@mui/material/Skeleton"));
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
|
-
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
9
|
const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
|
|
10
|
+
const event_1 = require("../../types/event");
|
|
11
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
12
|
+
const system_1 = require("@mui/system");
|
|
13
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
14
|
const classes = {
|
|
12
15
|
root: `${constants_1.PREFIX}-skeleton-root`,
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
skeletonDetailRoot: `${constants_1.PREFIX}-skeleton-detail-root`,
|
|
17
|
+
skeletonPreviewRoot: `${constants_1.PREFIX}-skeleton-preview-root`,
|
|
18
|
+
skeletonSnippetRoot: `${constants_1.PREFIX}-skeleton-snippet-root`,
|
|
19
|
+
skeletonDetailCalendar: `${constants_1.PREFIX}-skeleton-detail-calendar`,
|
|
20
|
+
skeletonDetailContent: `${constants_1.PREFIX}-skeleton-detail-content`,
|
|
21
|
+
skeletonDetailUser: `${constants_1.PREFIX}-skeleton-detail-user`,
|
|
22
|
+
skeletonDetailFirstDivider: `${constants_1.PREFIX}-skeleton-detail-first-divider`,
|
|
23
|
+
skeletonDetailSecondDivider: `${constants_1.PREFIX}-skeleton-detail-second-divider`,
|
|
24
|
+
skeletonPreviewContent: `${constants_1.PREFIX}-skeleton-preview-content`,
|
|
25
|
+
skeletonSnippetImage: `${constants_1.PREFIX}-skeleton-snippet-image`,
|
|
26
|
+
skeletonSnippetAction: `${constants_1.PREFIX}-skeleton-snippet-action`
|
|
15
27
|
};
|
|
16
|
-
const Root = (0, styles_1.styled)(
|
|
28
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
17
29
|
name: constants_1.PREFIX,
|
|
18
30
|
slot: 'SkeletonRoot'
|
|
19
31
|
})(() => ({}));
|
|
32
|
+
const SkeletonDetailRoot = (0, styles_1.styled)(material_1.Box, {
|
|
33
|
+
name: constants_1.PREFIX,
|
|
34
|
+
slot: 'SkeletonDetailRoot'
|
|
35
|
+
})(() => ({}));
|
|
36
|
+
const SkeletonPreviewRoot = (0, styles_1.styled)(material_1.Box, {
|
|
37
|
+
name: constants_1.PREFIX,
|
|
38
|
+
slot: 'SkeletonPreviewRoot'
|
|
39
|
+
})(() => ({}));
|
|
40
|
+
const SkeletonSnippetRoot = (0, styles_1.styled)(BaseItem_1.default, {
|
|
41
|
+
name: constants_1.PREFIX,
|
|
42
|
+
slot: 'SkeletonSnippetRoot'
|
|
43
|
+
})(() => ({}));
|
|
20
44
|
/**
|
|
21
45
|
* > API documentation for the Community-JS Event Skeleton component. Learn about the available props and the CSS API.
|
|
22
46
|
|
|
@@ -40,7 +64,25 @@ const Root = (0, styles_1.styled)(BaseItem_1.default, {
|
|
|
40
64
|
*
|
|
41
65
|
*/
|
|
42
66
|
function EventSkeleton(inProps) {
|
|
43
|
-
|
|
44
|
-
|
|
67
|
+
// PROPS
|
|
68
|
+
const props = (0, system_1.useThemeProps)({
|
|
69
|
+
props: inProps,
|
|
70
|
+
name: constants_1.PREFIX
|
|
71
|
+
});
|
|
72
|
+
const { className, template = event_1.SCEventTemplateType.SNIPPET, actions } = props, rest = tslib_1.__rest(props, ["className", "template", "actions"]);
|
|
73
|
+
/**
|
|
74
|
+
* Renders event object
|
|
75
|
+
*/
|
|
76
|
+
let contentObj;
|
|
77
|
+
if (template === event_1.SCEventTemplateType.DETAIL) {
|
|
78
|
+
contentObj = ((0, jsx_runtime_1.jsxs)(SkeletonDetailRoot, Object.assign({ className: classes.skeletonDetailRoot }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "rectangular", animation: "wave", width: "100%", height: "170px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { className: classes.skeletonDetailCalendar, variant: "rounded", animation: "wave", width: "60px", height: "60px" })] })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.skeletonDetailContent }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "36%", height: "40px" }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "9px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "50%", height: "20px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "9px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "35%", height: "20px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "14px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "27%", height: "20px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", gap: "8px", className: classes.skeletonDetailUser }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "36px", height: "36px" }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ gap: "1px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "75px", height: "15px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "86px", height: "16px" })] }))] })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.skeletonDetailFirstDivider }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", gap: "8px", alignItems: "center", height: "28px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "68px", height: "20px" }), (0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" })] })] })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.skeletonDetailSecondDivider })] }))] })));
|
|
79
|
+
}
|
|
80
|
+
else if (template === event_1.SCEventTemplateType.PREVIEW) {
|
|
81
|
+
contentObj = ((0, jsx_runtime_1.jsxs)(SkeletonPreviewRoot, Object.assign({ className: classes.skeletonPreviewRoot }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ position: "relative" }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "rectangular", animation: "wave", width: "100%", height: "80px" }) })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.skeletonPreviewContent }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "30%", height: "16px" })] })), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "46%", height: "20px" }), (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "14px" }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "27%", height: "16px" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", gap: "8px", alignItems: "center", height: "28px" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: "21px", height: "21px" })] }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", width: "10%", height: "20px" })] }))] }))] })));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
contentObj = ((0, jsx_runtime_1.jsx)(SkeletonSnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.skeletonSnippetRoot, image: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.skeletonSnippetImage }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "rectangular", width: 100, height: 60 }), " ", (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "large" }, { children: "CalendarIcon" }))] })), primary: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "rectangular", height: 10, width: "40%", style: { marginBottom: 12 } }), secondary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "rectangular", height: 10, width: "60%", style: { marginBottom: 10, marginRight: 5 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "rectangular", height: 10, width: "35%" })] }), actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: true }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 10, width: 30, style: { marginTop: 5, marginBottom: 5 } }) }))) }) }));
|
|
85
|
+
}
|
|
86
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-skeleton-${template}`) }, rest, { children: contentObj })));
|
|
45
87
|
}
|
|
46
88
|
exports.default = EventSkeleton;
|
|
@@ -20,6 +20,7 @@ const pubsub_js_1 = tslib_1.__importDefault(require("pubsub-js"));
|
|
|
20
20
|
const EditEventButton_1 = tslib_1.__importDefault(require("../EditEventButton"));
|
|
21
21
|
const User_1 = tslib_1.__importDefault(require("../User"));
|
|
22
22
|
const Calendar_1 = tslib_1.__importDefault(require("../../shared/Calendar"));
|
|
23
|
+
const EventActionsMenu_1 = tslib_1.__importDefault(require("../../shared/EventActionsMenu"));
|
|
23
24
|
const classes = {
|
|
24
25
|
root: `${constants_1.PREFIX}-root`,
|
|
25
26
|
cover: `${constants_1.PREFIX}-cover`,
|
|
@@ -33,7 +34,8 @@ const classes = {
|
|
|
33
34
|
};
|
|
34
35
|
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
35
36
|
name: constants_1.PREFIX,
|
|
36
|
-
slot: 'Root'
|
|
37
|
+
slot: 'Root',
|
|
38
|
+
shouldForwardProp: (prop) => prop !== 'isEventAdmin'
|
|
37
39
|
})(() => ({}));
|
|
38
40
|
/**
|
|
39
41
|
* > API documentation for the Community-JS Event Header component. Learn about the available props and the CSS API.
|
|
@@ -88,6 +90,8 @@ function EventHeader(inProps) {
|
|
|
88
90
|
const updatesSubscription = (0, react_1.useRef)(null);
|
|
89
91
|
// CONST
|
|
90
92
|
const isEventAdmin = (0, react_1.useMemo)(() => { var _a; return scUserContext.user && ((_a = scEvent === null || scEvent === void 0 ? void 0 : scEvent.managed_by) === null || _a === void 0 ? void 0 : _a.id) === scUserContext.user.id; }, [scUserContext.user, (_a = scEvent === null || scEvent === void 0 ? void 0 : scEvent.managed_by) === null || _a === void 0 ? void 0 : _a.id]);
|
|
93
|
+
const theme = (0, material_1.useTheme)();
|
|
94
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
91
95
|
/**
|
|
92
96
|
* Subscriber for pubsub callback
|
|
93
97
|
*/
|
|
@@ -122,7 +126,10 @@ function EventHeader(inProps) {
|
|
|
122
126
|
const _backgroundCover = Object.assign({}, (scEvent.image_bigger
|
|
123
127
|
? { background: `url('${scEvent.image_bigger}') center / cover` }
|
|
124
128
|
: { background: `url('${scPreferences.preferences[react_core_1.SCPreferences.IMAGES_USER_DEFAULT_COVER].value}') center / cover` }));
|
|
125
|
-
return (
|
|
129
|
+
return (
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
(0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className), isEventAdmin: isEventAdmin }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.calendar }, { children: (0, jsx_runtime_1.jsx)(Calendar_1.default, { day: new Date(scEvent.start_date).getDate() }) })) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.info }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.time }, { children: scEvent.end_date && scEvent.end_date !== scEvent.start_date ? (new Date(scEvent.start_date).getDate() !== new Date(scEvent.end_date).getDate() ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.startEndTimeDiff", defaultMessage: "ui.eventHeader.startEndTimeDiff", values: {
|
|
126
133
|
startDate: intl.formatDate(scEvent.start_date, {
|
|
127
134
|
weekday: 'long',
|
|
128
135
|
day: 'numeric',
|
|
@@ -154,6 +161,6 @@ function EventHeader(inProps) {
|
|
|
154
161
|
month: 'long'
|
|
155
162
|
}),
|
|
156
163
|
hour: intl.formatDate(scEvent.start_date, { hour: 'numeric', minute: 'numeric' })
|
|
157
|
-
} })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.name }, { children: scEvent.name })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.visibility }, { children: [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: scEvent.privacy === types_1.SCEventPrivacyType.PUBLIC ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.visibility.public", defaultMessage: "ui.eventHeader.visibility.public" })] }))) : ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.visibility.private", defaultMessage: "ui.eventHeader.visibility.private" })] }))) }), (0, jsx_runtime_1.jsx)(Bullet_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: scEvent.location === types_1.SCEventLocationType.PERSON ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.location.live", defaultMessage: "ui.eventHeader.location.live" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.location.live", defaultMessage: "ui.eventHeader.location.online" })) }))] })), (0, jsx_runtime_1.jsx)(User_1.default, { userId: (_b = scEvent === null || scEvent === void 0 ? void 0 : scEvent.managed_by) === null || _b === void 0 ? void 0 : _b.id, elevation: 0, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isEventAdmin ? ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.multiActions }, { children: [(0, jsx_runtime_1.jsx)(EventInviteButton_1.default, { size:
|
|
164
|
+
} })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.name }, { children: scEvent.name })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.visibility }, { children: [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: scEvent.privacy === types_1.SCEventPrivacyType.PUBLIC ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.visibility.public", defaultMessage: "ui.eventHeader.visibility.public" })] }))) : ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.visibility.private", defaultMessage: "ui.eventHeader.visibility.private" })] }))) }), (0, jsx_runtime_1.jsx)(Bullet_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.visibilityItem }, { children: scEvent.location === types_1.SCEventLocationType.PERSON ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.location.live", defaultMessage: "ui.eventHeader.location.live" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.location.live", defaultMessage: "ui.eventHeader.location.online" })) }))] })), (0, jsx_runtime_1.jsx)(User_1.default, { userId: (_b = scEvent === null || scEvent === void 0 ? void 0 : scEvent.managed_by) === null || _b === void 0 ? void 0 : _b.id, secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventHeader.user.manager", defaultMessage: "ui.eventHeader.user.manager" }), elevation: 0, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isEventAdmin ? ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.multiActions }, { children: [(0, jsx_runtime_1.jsx)(EventInviteButton_1.default, { size: isMobile ? 'small' : 'medium', event: scEvent, eventId: scEvent.id }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(EditEventButton_1.default, { size: isMobile ? 'small' : 'medium', event: scEvent, eventId: scEvent.id, onEditSuccess: (data) => setSCEvent(data) }), (0, jsx_runtime_1.jsx)(EventActionsMenu_1.default, { eventId: scEvent === null || scEvent === void 0 ? void 0 : scEvent.id })] })] }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(EventSubscribeButton_1.default, Object.assign({ event: scEvent }, EventSubscribeButtonProps)), (0, jsx_runtime_1.jsx)(EventActionsMenu_1.default, { eventId: scEvent === null || scEvent === void 0 ? void 0 : scEvent.id })] })) }) })] }))] })));
|
|
158
165
|
}
|
|
159
166
|
exports.default = EventHeader;
|
|
@@ -22,7 +22,7 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
22
22
|
name: constants_1.PREFIX,
|
|
23
23
|
slot: 'Root',
|
|
24
24
|
overridesResolver: (_props, styles) => styles.root
|
|
25
|
-
})();
|
|
25
|
+
})(() => ({}));
|
|
26
26
|
function isTextLongerThanLimit(text, limit = 125) {
|
|
27
27
|
return text.length > limit;
|
|
28
28
|
}
|
|
@@ -60,6 +60,7 @@ function EventInfoWidget(inProps) {
|
|
|
60
60
|
const handleToggleSummary = (0, react_1.useCallback)(() => {
|
|
61
61
|
setExpanded(!expanded);
|
|
62
62
|
}, [expanded]);
|
|
63
|
+
// RENDER
|
|
63
64
|
if (!scEvent && loading) {
|
|
64
65
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
65
66
|
}
|
|
@@ -13,7 +13,7 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
13
13
|
name: constants_1.PREFIX,
|
|
14
14
|
slot: 'SkeletonRoot',
|
|
15
15
|
overridesResolver: (_props, styles) => styles.root
|
|
16
|
-
})();
|
|
16
|
+
})(() => ({}));
|
|
17
17
|
function EventInfoWigetSkeleton() {
|
|
18
18
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "8px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "184px", height: "21px" })] })), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "100%" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "100%" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "50%" }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ gap: "16px", marginTop: "24px" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "223px", height: "21px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "223px", height: "21px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "223px", height: "21px" })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: "21px", height: "21px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", width: "223px", height: "21px" })] }))] }))] })) })));
|
|
19
19
|
}
|
|
@@ -72,23 +72,28 @@ function EventLocationWidget(inProps) {
|
|
|
72
72
|
googleMapsApiKey: scContext.settings.integrations.geocoding.apiKey,
|
|
73
73
|
libraries: ['maps']
|
|
74
74
|
});
|
|
75
|
+
const mapOptions = {
|
|
76
|
+
fullscreenControl: false,
|
|
77
|
+
mapTypeControl: false,
|
|
78
|
+
streetViewControl: false,
|
|
79
|
+
zoomControl: false // Disables the zoom control (+/- buttons)
|
|
80
|
+
};
|
|
75
81
|
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) === types_1.SCEventLocationType.ONLINE)) {
|
|
76
82
|
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
77
83
|
}
|
|
78
84
|
/**
|
|
79
85
|
* Loading event
|
|
80
86
|
*/
|
|
81
|
-
console.log(isLoaded, scEvent);
|
|
82
87
|
if (!isLoaded || !scEvent) {
|
|
83
88
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
84
89
|
}
|
|
85
90
|
/**
|
|
86
91
|
* Renders root object
|
|
87
92
|
*/
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventLocationWidget.title", defaultMessage: "ui.eventLocationWidget.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.map }, { children: (0, jsx_runtime_1.jsx)(api_1.GoogleMap, Object.assign({ mapContainerClassName: classes.map, center: {
|
|
93
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.title, gutterBottom: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventLocationWidget.title", defaultMessage: "ui.eventLocationWidget.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.map }, { children: (0, jsx_runtime_1.jsx)(api_1.GoogleMap, Object.assign({ mapContainerClassName: classes.map, center: {
|
|
89
94
|
lat: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lat,
|
|
90
95
|
lng: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lng
|
|
91
|
-
}, zoom: 15 }, { children: (0, jsx_runtime_1.jsx)(api_1.MarkerF, { position: {
|
|
96
|
+
}, options: mapOptions, zoom: 15 }, { children: (0, jsx_runtime_1.jsx)(api_1.MarkerF, { position: {
|
|
92
97
|
lat: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lat,
|
|
93
98
|
lng: scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation_lng
|
|
94
99
|
} }) })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.locationTitle }, { children: (0, string_1.formatEventLocationGeolocation)(scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation, true) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.address }, { children: (0, string_1.formatEventLocationGeolocation)(scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation) }))] }) })));
|