@selfcommunity/react-ui 0.7.50-event.29 → 0.7.50-events.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/Category/Category.d.ts +1 -1
- package/lib/cjs/components/Category/Category.js +1 -1
- package/lib/cjs/components/Event/Event.d.ts +0 -6
- package/lib/cjs/components/Event/Event.js +4 -4
- package/lib/cjs/components/Event/Skeleton.d.ts +16 -2
- package/lib/cjs/components/Event/Skeleton.js +16 -8
- package/lib/cjs/components/Event/index.d.ts +2 -2
- package/lib/cjs/components/EventForm/EventForm.js +30 -17
- package/lib/cjs/components/EventInviteButton/EventInviteButton.d.ts +57 -0
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +284 -0
- package/lib/cjs/components/EventInviteButton/index.d.ts +3 -0
- package/lib/cjs/components/EventInviteButton/index.js +5 -0
- package/lib/cjs/components/Events/Events.d.ts +64 -0
- package/lib/cjs/components/Events/Events.js +230 -0
- package/lib/cjs/components/Events/Skeleton.d.ts +38 -0
- package/lib/cjs/components/Events/Skeleton.js +45 -0
- package/lib/cjs/components/Events/constants.d.ts +1 -0
- package/lib/cjs/components/Events/constants.js +4 -0
- package/lib/cjs/components/Events/index.d.ts +4 -0
- package/lib/cjs/components/Events/index.js +8 -0
- package/lib/cjs/components/Events/prefetchedEvents.d.ts +271 -0
- package/lib/cjs/components/Events/prefetchedEvents.js +278 -0
- package/lib/cjs/components/FeedObject/FeedObject.d.ts +1 -0
- package/lib/cjs/components/FeedObject/FeedObject.js +16 -4
- package/lib/cjs/constants/PubSub.d.ts +3 -8
- package/lib/cjs/constants/PubSub.js +2 -1
- package/lib/cjs/index.d.ts +4 -2
- package/lib/cjs/index.js +7 -2
- package/lib/esm/components/Category/Category.d.ts +1 -1
- package/lib/esm/components/Category/Category.js +1 -1
- package/lib/esm/components/Event/Event.d.ts +0 -6
- package/lib/esm/components/Event/Event.js +4 -4
- package/lib/esm/components/Event/Skeleton.d.ts +16 -2
- package/lib/esm/components/Event/Skeleton.js +17 -9
- package/lib/esm/components/Event/index.d.ts +2 -2
- package/lib/esm/components/EventForm/EventForm.js +30 -17
- package/lib/esm/components/EventInviteButton/EventInviteButton.d.ts +57 -0
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +281 -0
- package/lib/esm/components/EventInviteButton/index.d.ts +3 -0
- package/lib/esm/components/EventInviteButton/index.js +2 -0
- package/lib/esm/components/Events/Events.d.ts +64 -0
- package/lib/esm/components/Events/Events.js +227 -0
- package/lib/esm/components/Events/Skeleton.d.ts +38 -0
- package/lib/esm/components/Events/Skeleton.js +42 -0
- package/lib/esm/components/Events/constants.d.ts +1 -0
- package/lib/esm/components/Events/constants.js +1 -0
- package/lib/esm/components/Events/index.d.ts +4 -0
- package/lib/esm/components/Events/index.js +4 -0
- package/lib/esm/components/Events/prefetchedEvents.d.ts +271 -0
- package/lib/esm/components/Events/prefetchedEvents.js +275 -0
- package/lib/esm/components/FeedObject/FeedObject.d.ts +1 -0
- package/lib/esm/components/FeedObject/FeedObject.js +16 -4
- package/lib/esm/constants/PubSub.d.ts +3 -8
- package/lib/esm/constants/PubSub.js +2 -1
- package/lib/esm/index.d.ts +4 -2
- package/lib/esm/index.js +3 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Box, Button, Chip, FormControl, Grid, Icon, InputLabel, MenuItem, Radio, Select, TextField, Typography } from '@mui/material';
|
|
5
|
+
import { Endpoints, EventService, http } from '@selfcommunity/api-services';
|
|
6
|
+
import { SCPreferences, SCPreferencesContext, SCUserContext, UserUtils } from '@selfcommunity/react-core';
|
|
7
|
+
import { SCEventDateFilterType } from '@selfcommunity/types';
|
|
8
|
+
import Event, { EventSkeleton } from '../Event';
|
|
9
|
+
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { useThemeProps } from '@mui/system';
|
|
12
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
13
|
+
import { Logger, sortByAttr } from '@selfcommunity/utils';
|
|
14
|
+
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
15
|
+
import { PREFIX } from './constants';
|
|
16
|
+
import Skeleton from '../Events/Skeleton';
|
|
17
|
+
import { DEFAULT_PAGINATION_OFFSET } from '../../constants/Pagination';
|
|
18
|
+
import CreateEventButton from '../CreateEventButton';
|
|
19
|
+
const classes = {
|
|
20
|
+
root: `${PREFIX}-root`,
|
|
21
|
+
filters: `${PREFIX}-filters`,
|
|
22
|
+
events: `${PREFIX}-events`,
|
|
23
|
+
item: `${PREFIX}-item`,
|
|
24
|
+
itemSkeleton: `${PREFIX}-item-skeleton`,
|
|
25
|
+
noResults: `${PREFIX}-no-results`,
|
|
26
|
+
showMore: `${PREFIX}-show-more`
|
|
27
|
+
};
|
|
28
|
+
const options = [
|
|
29
|
+
{ value: SCEventDateFilterType.ANY, label: React.createElement(FormattedMessage, { id: "ui.events.select.any", defaultMessage: "ui.events.select.any" }) },
|
|
30
|
+
{ value: SCEventDateFilterType.TODAY, label: React.createElement(FormattedMessage, { id: "ui.events.select.today", defaultMessage: "ui.events.select.today" }) },
|
|
31
|
+
{ value: SCEventDateFilterType.TOMORROW, label: React.createElement(FormattedMessage, { id: "ui.events.select.tomorrow", defaultMessage: "ui.events.select.tomorrow" }) },
|
|
32
|
+
{ value: SCEventDateFilterType.THIS_WEEK, label: React.createElement(FormattedMessage, { id: "ui.events.select.thisWeek", defaultMessage: "ui.events.select.thisWeek" }) },
|
|
33
|
+
{ value: SCEventDateFilterType.NEXT_WEEK, label: React.createElement(FormattedMessage, { id: "ui.events.select.nextWeek", defaultMessage: "ui.events.select.nextWeek" }) },
|
|
34
|
+
{ value: SCEventDateFilterType.THIS_MONTH, label: React.createElement(FormattedMessage, { id: "ui.events.select.thisMonth", defaultMessage: "ui.events.select.thisMonth" }) }
|
|
35
|
+
];
|
|
36
|
+
const Root = styled(Box, {
|
|
37
|
+
name: PREFIX,
|
|
38
|
+
slot: 'Root'
|
|
39
|
+
})(() => ({}));
|
|
40
|
+
const ChipRoot = styled(Chip, {
|
|
41
|
+
name: PREFIX,
|
|
42
|
+
slot: 'ChipRoot'
|
|
43
|
+
})(() => ({}));
|
|
44
|
+
/**
|
|
45
|
+
* > API documentation for the Community-JS Events component. Learn about the available props and the CSS API.
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* The Events component renders the list of all available events.
|
|
49
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Events)
|
|
50
|
+
|
|
51
|
+
#### Import
|
|
52
|
+
```jsx
|
|
53
|
+
import {Events} from '@selfcommunity/react-ui';
|
|
54
|
+
```
|
|
55
|
+
#### Component Name
|
|
56
|
+
The name `SCEvents` can be used when providing style overrides in the theme.
|
|
57
|
+
|
|
58
|
+
#### CSS
|
|
59
|
+
|
|
60
|
+
|Rule Name|Global class|Description|
|
|
61
|
+
|---|---|---|
|
|
62
|
+
|root|.SCEvents-root|Styles applied to the root element.|
|
|
63
|
+
|filters|.SCEvents-filters|Styles applied to the title element.|
|
|
64
|
+
|events|.SCEvents-events|Styles applied to the title element.|
|
|
65
|
+
|item|.SCEvents-item|Styles applied to the title element.|
|
|
66
|
+
|noResults|.SCEvents-no-results|Styles applied to no results section.|
|
|
67
|
+
|showMore|.SCEvents-show-more|Styles applied to show more button element.|
|
|
68
|
+
|
|
69
|
+
* @param inProps
|
|
70
|
+
*/
|
|
71
|
+
export default function Events(inProps) {
|
|
72
|
+
// PROPS
|
|
73
|
+
const props = useThemeProps({
|
|
74
|
+
props: inProps,
|
|
75
|
+
name: PREFIX
|
|
76
|
+
});
|
|
77
|
+
const { endpointQueryParams = { limit: 8, offset: DEFAULT_PAGINATION_OFFSET }, className, EventComponentProps = {}, showFilters = false, filters, general = true } = props, rest = __rest(props, ["endpointQueryParams", "className", "EventComponentProps", "showFilters", "filters", "general"]);
|
|
78
|
+
// STATE
|
|
79
|
+
const [events, setEvents] = useState([]);
|
|
80
|
+
const [loading, setLoading] = useState(true);
|
|
81
|
+
const [next, setNext] = useState(null);
|
|
82
|
+
const [search, setSearch] = useState('');
|
|
83
|
+
const [dateSearch, setDateSearch] = useState(options[0].value);
|
|
84
|
+
const [selected, setSelected] = useState(false);
|
|
85
|
+
// CONTEXT
|
|
86
|
+
const scUserContext = useContext(SCUserContext);
|
|
87
|
+
const scPreferencesContext = useContext(SCPreferencesContext);
|
|
88
|
+
const onlyStaffEnabled = useMemo(() => scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_EVENTS_ONLY_STAFF_ENABLED].value, [scPreferencesContext.preferences]);
|
|
89
|
+
// MEMO
|
|
90
|
+
const contentAvailability = SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY in scPreferencesContext.preferences &&
|
|
91
|
+
scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY].value;
|
|
92
|
+
// CONST
|
|
93
|
+
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
94
|
+
// HANDLERS
|
|
95
|
+
const handleChipClick = () => {
|
|
96
|
+
setSelected(!selected);
|
|
97
|
+
};
|
|
98
|
+
const handleDeleteClick = () => {
|
|
99
|
+
setSelected(false);
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Fetches events list
|
|
103
|
+
*/
|
|
104
|
+
const fetchEvents = () => {
|
|
105
|
+
let eventService;
|
|
106
|
+
if (general) {
|
|
107
|
+
eventService = EventService.searchEvents(Object.assign(Object.assign(Object.assign(Object.assign({}, endpointQueryParams), (search !== '' && { search: search })), (dateSearch !== SCEventDateFilterType.ANY && { date_filter: dateSearch })), (selected && { follows: selected })));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
eventService = EventService.getUserEvents(Object.assign(Object.assign({}, endpointQueryParams), (search !== '' && { search: search })));
|
|
111
|
+
}
|
|
112
|
+
eventService
|
|
113
|
+
.then((res) => {
|
|
114
|
+
setEvents(res.results);
|
|
115
|
+
setNext(res.next);
|
|
116
|
+
setLoading(false);
|
|
117
|
+
})
|
|
118
|
+
.catch((error) => {
|
|
119
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* On mount, fetches events list
|
|
124
|
+
*/
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (!contentAvailability && !authUserId) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
fetchEvents();
|
|
131
|
+
}
|
|
132
|
+
}, [contentAvailability, authUserId, search, dateSearch, selected]);
|
|
133
|
+
const handleNext = useMemo(() => () => {
|
|
134
|
+
if (!next) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
return http
|
|
138
|
+
.request({
|
|
139
|
+
url: next,
|
|
140
|
+
method: general ? Endpoints.SearchEvents.method : Endpoints.GetUserEvents.method
|
|
141
|
+
})
|
|
142
|
+
.then((res) => {
|
|
143
|
+
setEvents([...events, ...res.data.results]);
|
|
144
|
+
setNext(res.data.next);
|
|
145
|
+
})
|
|
146
|
+
.catch((error) => console.log(error))
|
|
147
|
+
.then(() => setLoading(false));
|
|
148
|
+
}, [next]);
|
|
149
|
+
/**
|
|
150
|
+
* Get events filtered
|
|
151
|
+
*/
|
|
152
|
+
const getFilteredEvents = () => {
|
|
153
|
+
if (search) {
|
|
154
|
+
return events.filter((g) => g.name.toLowerCase().includes(search.toLowerCase()));
|
|
155
|
+
}
|
|
156
|
+
return events;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Handle change filter name
|
|
160
|
+
* @param event
|
|
161
|
+
*/
|
|
162
|
+
const handleOnChangeFilterName = (event) => {
|
|
163
|
+
setSearch(event.target.value);
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Handle change time frame
|
|
167
|
+
* @param event
|
|
168
|
+
*/
|
|
169
|
+
const handleOnChangeTimeFrame = (event) => {
|
|
170
|
+
setDateSearch(event.target.value);
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Renders events list
|
|
174
|
+
*/
|
|
175
|
+
const filteredEvents = sortByAttr(getFilteredEvents(), 'order');
|
|
176
|
+
const c = (React.createElement(React.Fragment, null,
|
|
177
|
+
showFilters && (React.createElement(Grid, { container: true, className: classes.filters, gap: 2 }, filters ? (filters) : (React.createElement(React.Fragment, null,
|
|
178
|
+
React.createElement(Grid, { item: true, xs: 12, md: 4 },
|
|
179
|
+
React.createElement(TextField, { size: 'small', fullWidth: true, value: search, label: React.createElement(FormattedMessage, { id: "ui.events.filterByName", defaultMessage: "ui.events.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading })),
|
|
180
|
+
React.createElement(Grid, { item: true, xs: 12, md: 2 },
|
|
181
|
+
React.createElement(FormControl, { fullWidth: true },
|
|
182
|
+
React.createElement(InputLabel, null,
|
|
183
|
+
React.createElement(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" })),
|
|
184
|
+
React.createElement(Select, { size: 'small', label: React.createElement(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, options.map((option) => (React.createElement(MenuItem, { key: option.value, value: option.value },
|
|
185
|
+
React.createElement(Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select", inputProps: { 'aria-label': option.label } }),
|
|
186
|
+
option.label)))))),
|
|
187
|
+
React.createElement(Grid, { item: true, xs: 12, md: 2 },
|
|
188
|
+
React.createElement(ChipRoot
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
, {
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
193
|
+
// @ts-ignore
|
|
194
|
+
color: selected ? 'secondary' : 'default',
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
196
|
+
// @ts-ignore
|
|
197
|
+
variant: selected ? 'filled' : 'outlined', label: React.createElement(FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
selected: selected, deleteIcon: selected ? React.createElement(Icon, null, "close") : null, onDelete: selected ? handleDeleteClick : null })))))),
|
|
201
|
+
React.createElement(React.Fragment, null, !events.length ? (React.createElement(Box, { className: classes.noResults }, (onlyStaffEnabled && !UserUtils.isStaff(scUserContext.user)) ||
|
|
202
|
+
(onlyStaffEnabled && UserUtils.isStaff(scUserContext.user) && general) ? (React.createElement(React.Fragment, null,
|
|
203
|
+
React.createElement(EventSkeleton, null),
|
|
204
|
+
React.createElement(Typography, { variant: "body1" },
|
|
205
|
+
React.createElement(FormattedMessage, { id: "ui.events.noEvents.title", defaultMessage: "ui.events.noEvents.title" })))) : (React.createElement(React.Fragment, null,
|
|
206
|
+
React.createElement(EventSkeleton, { action: React.createElement(CreateEventButton, null) }),
|
|
207
|
+
React.createElement(Typography, { variant: "body1" },
|
|
208
|
+
React.createElement(FormattedMessage, { id: "ui.events.noEvents.title.onlyStaff", defaultMessage: "ui.events.noEvents.title.onlyStaff" })))))) : (React.createElement(React.Fragment, null,
|
|
209
|
+
React.createElement(Grid, { container: true, spacing: { xs: 2 }, className: classes.events },
|
|
210
|
+
React.createElement(React.Fragment, null,
|
|
211
|
+
filteredEvents.map((event) => (React.createElement(Grid, { item: true, xs: 12, sm: 8, md: 6, key: event.id, className: classes.item },
|
|
212
|
+
React.createElement(Event, Object.assign({ event: event, eventId: event.id }, EventComponentProps))))),
|
|
213
|
+
filteredEvents.length <= 3 && (React.createElement(Grid, { item: true, xs: 12, sm: 8, md: 6, key: 'skeleton-item', className: classes.itemSkeleton },
|
|
214
|
+
React.createElement(EventSkeleton, { action: React.createElement(CreateEventButton, null) }))))),
|
|
215
|
+
Boolean(next) && (React.createElement(Button, { color: "secondary", variant: "text", onClick: handleNext, className: classes.showMore },
|
|
216
|
+
React.createElement(FormattedMessage, { id: "ui.events.button.seeMore", defaultMessage: "ui.events.button.seeMore" }))))))));
|
|
217
|
+
/**
|
|
218
|
+
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
219
|
+
*/
|
|
220
|
+
if (!contentAvailability && !scUserContext.user) {
|
|
221
|
+
return React.createElement(HiddenPlaceholder, null);
|
|
222
|
+
}
|
|
223
|
+
if (loading) {
|
|
224
|
+
return React.createElement(Skeleton, null);
|
|
225
|
+
}
|
|
226
|
+
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest), c));
|
|
227
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface EventsSkeletonProps {
|
|
2
|
+
/**
|
|
3
|
+
* Overrides or extends the styles applied to the component.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Overrides or extends the styles applied to the component.
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
EventSkeletonProps?: any;
|
|
12
|
+
/**
|
|
13
|
+
* @default 20
|
|
14
|
+
*/
|
|
15
|
+
eventsNumber?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* > API documentation for the Community-JS Groups Skeleton component. Learn about the available props and the CSS API.
|
|
19
|
+
|
|
20
|
+
#### Import
|
|
21
|
+
|
|
22
|
+
```jsx
|
|
23
|
+
import {EventsSkeleton} from '@selfcommunity/react-ui';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Component Name
|
|
27
|
+
|
|
28
|
+
The name `SCEvents-skeleton-root` can be used when providing style overrides in the theme.
|
|
29
|
+
|
|
30
|
+
#### CSS
|
|
31
|
+
|
|
32
|
+
|Rule Name|Global class|Description|
|
|
33
|
+
|---|---|---|
|
|
34
|
+
|root|.SCEvents-skeleton-root|Styles applied to the root element.|
|
|
35
|
+
|events|.SCEvents-skeleton-events|Styles applied to the group elements.|
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export default function EventsSkeleton(inProps: EventsSkeletonProps): JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { PREFIX } from './constants';
|
|
5
|
+
import { Box, Grid } from '@mui/material';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import { EventSkeleton } from '../Event';
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${PREFIX}-skeleton-root`,
|
|
10
|
+
events: `${PREFIX}-events`
|
|
11
|
+
};
|
|
12
|
+
const Root = styled(Box, {
|
|
13
|
+
name: PREFIX,
|
|
14
|
+
slot: 'SkeletonRoot'
|
|
15
|
+
})(() => ({}));
|
|
16
|
+
/**
|
|
17
|
+
* > API documentation for the Community-JS Groups Skeleton component. Learn about the available props and the CSS API.
|
|
18
|
+
|
|
19
|
+
#### Import
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import {EventsSkeleton} from '@selfcommunity/react-ui';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Component Name
|
|
26
|
+
|
|
27
|
+
The name `SCEvents-skeleton-root` can be used when providing style overrides in the theme.
|
|
28
|
+
|
|
29
|
+
#### CSS
|
|
30
|
+
|
|
31
|
+
|Rule Name|Global class|Description|
|
|
32
|
+
|---|---|---|
|
|
33
|
+
|root|.SCEvents-skeleton-root|Styles applied to the root element.|
|
|
34
|
+
|events|.SCEvents-skeleton-events|Styles applied to the group elements.|
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export default function EventsSkeleton(inProps) {
|
|
38
|
+
const { className, EventSkeletonProps = {}, eventsNumber = 8 } = inProps, rest = __rest(inProps, ["className", "EventSkeletonProps", "eventsNumber"]);
|
|
39
|
+
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest),
|
|
40
|
+
React.createElement(Grid, { container: true, spacing: { xs: 3 }, className: classes.events }, [...Array(eventsNumber)].map((event, index) => (React.createElement(Grid, { item: true, xs: 12, sm: 8, md: 6, key: index },
|
|
41
|
+
React.createElement(EventSkeleton, Object.assign({}, EventSkeletonProps))))))));
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCEvents";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCEvents';
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
export declare const prefetchedEvents: ({
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
color: string;
|
|
7
|
+
privacy: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
active: boolean;
|
|
10
|
+
show_on_feed: boolean;
|
|
11
|
+
subscription_status: any;
|
|
12
|
+
image_bigger: string;
|
|
13
|
+
image_big: string;
|
|
14
|
+
image_medium: string;
|
|
15
|
+
image_small: string;
|
|
16
|
+
subscribers_counter: number;
|
|
17
|
+
goings_counter: number;
|
|
18
|
+
start_date: string;
|
|
19
|
+
end_date: string;
|
|
20
|
+
recurring: string;
|
|
21
|
+
location: string;
|
|
22
|
+
geolocation: any;
|
|
23
|
+
geolocation_lat: any;
|
|
24
|
+
geolocation_lng: any;
|
|
25
|
+
link: string;
|
|
26
|
+
created_at: string;
|
|
27
|
+
created_by: {
|
|
28
|
+
id: number;
|
|
29
|
+
username: string;
|
|
30
|
+
real_name: string;
|
|
31
|
+
avatar: string;
|
|
32
|
+
ext_id: any;
|
|
33
|
+
deleted: boolean;
|
|
34
|
+
followings_counter: number;
|
|
35
|
+
followers_counter: number;
|
|
36
|
+
posts_counter: number;
|
|
37
|
+
discussions_counter: number;
|
|
38
|
+
polls_counter: number;
|
|
39
|
+
categories_counter: number;
|
|
40
|
+
date_joined: string;
|
|
41
|
+
bio: string;
|
|
42
|
+
location: string;
|
|
43
|
+
location_lat_lng: any;
|
|
44
|
+
position_lat_lng: any;
|
|
45
|
+
date_of_birth: any;
|
|
46
|
+
description: string;
|
|
47
|
+
gender: string;
|
|
48
|
+
website: string;
|
|
49
|
+
cover: any;
|
|
50
|
+
tags: any[];
|
|
51
|
+
reputation: number;
|
|
52
|
+
language: string;
|
|
53
|
+
community_badge: boolean;
|
|
54
|
+
reg_approved: boolean;
|
|
55
|
+
job: string;
|
|
56
|
+
store: string;
|
|
57
|
+
brand: string;
|
|
58
|
+
};
|
|
59
|
+
managed_by: {
|
|
60
|
+
id: number;
|
|
61
|
+
username: string;
|
|
62
|
+
real_name: string;
|
|
63
|
+
avatar: string;
|
|
64
|
+
ext_id: any;
|
|
65
|
+
deleted: boolean;
|
|
66
|
+
followings_counter: number;
|
|
67
|
+
followers_counter: number;
|
|
68
|
+
posts_counter: number;
|
|
69
|
+
discussions_counter: number;
|
|
70
|
+
polls_counter: number;
|
|
71
|
+
categories_counter: number;
|
|
72
|
+
date_joined: string;
|
|
73
|
+
bio: string;
|
|
74
|
+
location: string;
|
|
75
|
+
location_lat_lng: any;
|
|
76
|
+
position_lat_lng: any;
|
|
77
|
+
date_of_birth: any;
|
|
78
|
+
description: string;
|
|
79
|
+
gender: string;
|
|
80
|
+
website: string;
|
|
81
|
+
cover: any;
|
|
82
|
+
tags: any[];
|
|
83
|
+
reputation: number;
|
|
84
|
+
language: string;
|
|
85
|
+
community_badge: boolean;
|
|
86
|
+
reg_approved: boolean;
|
|
87
|
+
job: string;
|
|
88
|
+
store: string;
|
|
89
|
+
brand: string;
|
|
90
|
+
};
|
|
91
|
+
} | {
|
|
92
|
+
id: number;
|
|
93
|
+
name: string;
|
|
94
|
+
description: string;
|
|
95
|
+
slug: string;
|
|
96
|
+
color: string;
|
|
97
|
+
privacy: string;
|
|
98
|
+
visible: boolean;
|
|
99
|
+
active: boolean;
|
|
100
|
+
show_on_feed: boolean;
|
|
101
|
+
subscription_status: any;
|
|
102
|
+
image_bigger: string;
|
|
103
|
+
image_big: string;
|
|
104
|
+
image_medium: string;
|
|
105
|
+
image_small: string;
|
|
106
|
+
subscribers_counter: number;
|
|
107
|
+
goings_counter: number;
|
|
108
|
+
start_date: string;
|
|
109
|
+
end_date: any;
|
|
110
|
+
recurring: string;
|
|
111
|
+
location: string;
|
|
112
|
+
geolocation: string;
|
|
113
|
+
geolocation_lat: number;
|
|
114
|
+
geolocation_lng: number;
|
|
115
|
+
link: any;
|
|
116
|
+
created_at: string;
|
|
117
|
+
created_by: {
|
|
118
|
+
id: number;
|
|
119
|
+
username: string;
|
|
120
|
+
real_name: string;
|
|
121
|
+
avatar: string;
|
|
122
|
+
ext_id: any;
|
|
123
|
+
deleted: boolean;
|
|
124
|
+
followings_counter: number;
|
|
125
|
+
followers_counter: number;
|
|
126
|
+
posts_counter: number;
|
|
127
|
+
discussions_counter: number;
|
|
128
|
+
polls_counter: number;
|
|
129
|
+
categories_counter: number;
|
|
130
|
+
date_joined: string;
|
|
131
|
+
bio: string;
|
|
132
|
+
location: string;
|
|
133
|
+
location_lat_lng: any;
|
|
134
|
+
position_lat_lng: any;
|
|
135
|
+
date_of_birth: any;
|
|
136
|
+
description: string;
|
|
137
|
+
gender: string;
|
|
138
|
+
website: string;
|
|
139
|
+
cover: any;
|
|
140
|
+
tags: any[];
|
|
141
|
+
reputation: number;
|
|
142
|
+
language: string;
|
|
143
|
+
community_badge: boolean;
|
|
144
|
+
reg_approved: boolean;
|
|
145
|
+
job: string;
|
|
146
|
+
store: string;
|
|
147
|
+
brand: string;
|
|
148
|
+
};
|
|
149
|
+
managed_by: {
|
|
150
|
+
id: number;
|
|
151
|
+
username: string;
|
|
152
|
+
real_name: string;
|
|
153
|
+
avatar: string;
|
|
154
|
+
ext_id: any;
|
|
155
|
+
deleted: boolean;
|
|
156
|
+
followings_counter: number;
|
|
157
|
+
followers_counter: number;
|
|
158
|
+
posts_counter: number;
|
|
159
|
+
discussions_counter: number;
|
|
160
|
+
polls_counter: number;
|
|
161
|
+
categories_counter: number;
|
|
162
|
+
date_joined: string;
|
|
163
|
+
bio: string;
|
|
164
|
+
location: string;
|
|
165
|
+
location_lat_lng: any;
|
|
166
|
+
position_lat_lng: any;
|
|
167
|
+
date_of_birth: any;
|
|
168
|
+
description: string;
|
|
169
|
+
gender: string;
|
|
170
|
+
website: string;
|
|
171
|
+
cover: any;
|
|
172
|
+
tags: any[];
|
|
173
|
+
reputation: number;
|
|
174
|
+
language: string;
|
|
175
|
+
community_badge: boolean;
|
|
176
|
+
reg_approved: boolean;
|
|
177
|
+
job: string;
|
|
178
|
+
store: string;
|
|
179
|
+
brand: string;
|
|
180
|
+
};
|
|
181
|
+
} | {
|
|
182
|
+
id: number;
|
|
183
|
+
name: string;
|
|
184
|
+
description: string;
|
|
185
|
+
slug: string;
|
|
186
|
+
color: string;
|
|
187
|
+
privacy: string;
|
|
188
|
+
visible: boolean;
|
|
189
|
+
active: boolean;
|
|
190
|
+
show_on_feed: boolean;
|
|
191
|
+
subscription_status: string;
|
|
192
|
+
image_bigger: string;
|
|
193
|
+
image_big: string;
|
|
194
|
+
image_medium: string;
|
|
195
|
+
image_small: string;
|
|
196
|
+
subscribers_counter: number;
|
|
197
|
+
goings_counter: number;
|
|
198
|
+
start_date: string;
|
|
199
|
+
end_date: any;
|
|
200
|
+
recurring: string;
|
|
201
|
+
location: string;
|
|
202
|
+
geolocation: string;
|
|
203
|
+
geolocation_lat: number;
|
|
204
|
+
geolocation_lng: number;
|
|
205
|
+
link: any;
|
|
206
|
+
created_at: string;
|
|
207
|
+
created_by: {
|
|
208
|
+
id: number;
|
|
209
|
+
username: string;
|
|
210
|
+
real_name: string;
|
|
211
|
+
avatar: string;
|
|
212
|
+
ext_id: any;
|
|
213
|
+
deleted: boolean;
|
|
214
|
+
followings_counter: number;
|
|
215
|
+
followers_counter: number;
|
|
216
|
+
posts_counter: number;
|
|
217
|
+
discussions_counter: number;
|
|
218
|
+
polls_counter: number;
|
|
219
|
+
categories_counter: number;
|
|
220
|
+
date_joined: string;
|
|
221
|
+
bio: string;
|
|
222
|
+
location: string;
|
|
223
|
+
location_lat_lng: any;
|
|
224
|
+
position_lat_lng: any;
|
|
225
|
+
date_of_birth: any;
|
|
226
|
+
description: string;
|
|
227
|
+
gender: string;
|
|
228
|
+
website: string;
|
|
229
|
+
cover: any;
|
|
230
|
+
tags: any[];
|
|
231
|
+
reputation: number;
|
|
232
|
+
language: string;
|
|
233
|
+
community_badge: boolean;
|
|
234
|
+
reg_approved: boolean;
|
|
235
|
+
job: any;
|
|
236
|
+
store: string;
|
|
237
|
+
brand: any;
|
|
238
|
+
};
|
|
239
|
+
managed_by: {
|
|
240
|
+
id: number;
|
|
241
|
+
username: string;
|
|
242
|
+
real_name: string;
|
|
243
|
+
avatar: string;
|
|
244
|
+
ext_id: any;
|
|
245
|
+
deleted: boolean;
|
|
246
|
+
followings_counter: number;
|
|
247
|
+
followers_counter: number;
|
|
248
|
+
posts_counter: number;
|
|
249
|
+
discussions_counter: number;
|
|
250
|
+
polls_counter: number;
|
|
251
|
+
categories_counter: number;
|
|
252
|
+
date_joined: string;
|
|
253
|
+
bio: string;
|
|
254
|
+
location: string;
|
|
255
|
+
location_lat_lng: any;
|
|
256
|
+
position_lat_lng: any;
|
|
257
|
+
date_of_birth: any;
|
|
258
|
+
description: string;
|
|
259
|
+
gender: string;
|
|
260
|
+
website: string;
|
|
261
|
+
cover: any;
|
|
262
|
+
tags: any[];
|
|
263
|
+
reputation: number;
|
|
264
|
+
language: string;
|
|
265
|
+
community_badge: boolean;
|
|
266
|
+
reg_approved: boolean;
|
|
267
|
+
job: any;
|
|
268
|
+
store: string;
|
|
269
|
+
brand: any;
|
|
270
|
+
};
|
|
271
|
+
})[];
|