@selfcommunity/react-ui 0.11.0-alpha.53 → 0.11.0-alpha.54
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/EventForm/EventForm.js +10 -7
- package/lib/cjs/components/EventMembersWidget/EventMembersWidget.js +1 -1
- package/lib/esm/components/EventForm/EventForm.js +10 -7
- package/lib/esm/components/EventMembersWidget/EventMembersWidget.js +2 -2
- package/lib/umd/react-ui.js +1 -1
- package/package.json +2 -2
|
@@ -161,7 +161,7 @@ function EventForm(inProps) {
|
|
|
161
161
|
link: (event === null || event === void 0 ? void 0 : event.link) || '',
|
|
162
162
|
liveStreamSettings: (event === null || event === void 0 ? void 0 : event.live_stream) ? event === null || event === void 0 ? void 0 : event.live_stream.settings : null,
|
|
163
163
|
recurring: (event === null || event === void 0 ? void 0 : event.recurring) || types_1.SCEventRecurrenceType.NEVER,
|
|
164
|
-
isPublic: (event === null || event === void 0 ? void 0 : event.privacy) === types_1.SCEventPrivacyType.PUBLIC
|
|
164
|
+
isPublic: (event === null || event === void 0 ? void 0 : event.privacy) ? event.privacy === types_1.SCEventPrivacyType.PUBLIC : true,
|
|
165
165
|
isSubmitting: false
|
|
166
166
|
};
|
|
167
167
|
// STATE
|
|
@@ -354,7 +354,10 @@ function EventForm(inProps) {
|
|
|
354
354
|
// @ts-ignore
|
|
355
355
|
toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.date.title", defaultMessage: "ui.eventForm.date.title" })
|
|
356
356
|
}
|
|
357
|
-
}, onChange: (value) =>
|
|
357
|
+
}, onChange: (value) => {
|
|
358
|
+
handleChangeDateTime(value, 'startDate');
|
|
359
|
+
handleChangeDateTime(value, 'startTime');
|
|
360
|
+
} }), (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileTimePicker, { className: classes.picker, disablePast: disablePastStartTime, label: field.startTime && (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.time.placeholder", defaultMessage: "ui.eventForm.time.placeholder" }), value: field.startTime, slots: {
|
|
358
361
|
textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.startTime)}`, startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "access_time" }) }) }))) }) })))
|
|
359
362
|
}, slotProps: {
|
|
360
363
|
toolbar: {
|
|
@@ -377,11 +380,11 @@ function EventForm(inProps) {
|
|
|
377
380
|
// @ts-ignore
|
|
378
381
|
toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.date.title", defaultMessage: "ui.eventForm.date.title" })
|
|
379
382
|
}
|
|
380
|
-
}, onChange: (value) =>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
383
|
+
}, onChange: (value) => {
|
|
384
|
+
handleChangeDateTime(value, 'endDate');
|
|
385
|
+
handleChangeDateTime(value, 'endTime');
|
|
386
|
+
}, shouldDisableDate: shouldDisableDate }), (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileTimePicker, { className: classes.picker, disablePast: disablePastEndTime, label: field.endTime && (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.time.end.placeholder", defaultMessage: "ui.eventForm.time.end.placeholder" }), value: field.endTime, slots: {
|
|
387
|
+
textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.endTime)}`, startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "access_time" }) }) }))) }) })))
|
|
385
388
|
}, slotProps: {
|
|
386
389
|
toolbar: {
|
|
387
390
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
@@ -39,7 +39,7 @@ function EventMembersWidget(inProps) {
|
|
|
39
39
|
props: inProps,
|
|
40
40
|
name: constants_1.PREFIX
|
|
41
41
|
});
|
|
42
|
-
const { event, eventId, userProps = {}, endpointQueryParams = { limit: 5, offset: Pagination_1.DEFAULT_PAGINATION_OFFSET }, cacheStrategy, dialogProps, limit = 5 } = props, rest = tslib_1.__rest(props, ["event", "eventId", "userProps", "endpointQueryParams", "cacheStrategy", "dialogProps", "limit"]);
|
|
42
|
+
const { event, eventId, userProps = {}, endpointQueryParams = { limit: 5, offset: Pagination_1.DEFAULT_PAGINATION_OFFSET }, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, dialogProps, limit = 5 } = props, rest = tslib_1.__rest(props, ["event", "eventId", "userProps", "endpointQueryParams", "cacheStrategy", "dialogProps", "limit"]);
|
|
43
43
|
// STATE
|
|
44
44
|
const [participants, dispatchParticipants] = (0, react_1.useReducer)(widget_1.dataWidgetReducer, {
|
|
45
45
|
isLoadingNext: false,
|
|
@@ -159,7 +159,7 @@ export default function EventForm(inProps) {
|
|
|
159
159
|
link: (event === null || event === void 0 ? void 0 : event.link) || '',
|
|
160
160
|
liveStreamSettings: (event === null || event === void 0 ? void 0 : event.live_stream) ? event === null || event === void 0 ? void 0 : event.live_stream.settings : null,
|
|
161
161
|
recurring: (event === null || event === void 0 ? void 0 : event.recurring) || SCEventRecurrenceType.NEVER,
|
|
162
|
-
isPublic: (event === null || event === void 0 ? void 0 : event.privacy) === SCEventPrivacyType.PUBLIC
|
|
162
|
+
isPublic: (event === null || event === void 0 ? void 0 : event.privacy) ? event.privacy === SCEventPrivacyType.PUBLIC : true,
|
|
163
163
|
isSubmitting: false
|
|
164
164
|
};
|
|
165
165
|
// STATE
|
|
@@ -352,7 +352,10 @@ export default function EventForm(inProps) {
|
|
|
352
352
|
// @ts-ignore
|
|
353
353
|
toolbarTitle: _jsx(FormattedMessage, { id: "ui.eventForm.date.title", defaultMessage: "ui.eventForm.date.title" })
|
|
354
354
|
}
|
|
355
|
-
}, onChange: (value) =>
|
|
355
|
+
}, onChange: (value) => {
|
|
356
|
+
handleChangeDateTime(value, 'startDate');
|
|
357
|
+
handleChangeDateTime(value, 'startTime');
|
|
358
|
+
} }), _jsx(MobileTimePicker, { className: classes.picker, disablePast: disablePastStartTime, label: field.startTime && _jsx(FormattedMessage, { id: "ui.eventForm.time.placeholder", defaultMessage: "ui.eventForm.time.placeholder" }), value: field.startTime, slots: {
|
|
356
359
|
textField: (params) => (_jsx(TextField, Object.assign({}, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.startTime)}`, startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(IconButton, { children: _jsx(Icon, { children: "access_time" }) }) }))) }) })))
|
|
357
360
|
}, slotProps: {
|
|
358
361
|
toolbar: {
|
|
@@ -375,11 +378,11 @@ export default function EventForm(inProps) {
|
|
|
375
378
|
// @ts-ignore
|
|
376
379
|
toolbarTitle: _jsx(FormattedMessage, { id: "ui.eventForm.date.title", defaultMessage: "ui.eventForm.date.title" })
|
|
377
380
|
}
|
|
378
|
-
}, onChange: (value) =>
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
381
|
+
}, onChange: (value) => {
|
|
382
|
+
handleChangeDateTime(value, 'endDate');
|
|
383
|
+
handleChangeDateTime(value, 'endTime');
|
|
384
|
+
}, shouldDisableDate: shouldDisableDate }), _jsx(MobileTimePicker, { className: classes.picker, disablePast: disablePastEndTime, label: field.endTime && _jsx(FormattedMessage, { id: "ui.eventForm.time.end.placeholder", defaultMessage: "ui.eventForm.time.end.placeholder" }), value: field.endTime, slots: {
|
|
385
|
+
textField: (params) => (_jsx(TextField, Object.assign({}, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.endTime)}`, startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(IconButton, { children: _jsx(Icon, { children: "access_time" }) }) }))) }) })))
|
|
383
386
|
}, slotProps: {
|
|
384
387
|
toolbar: {
|
|
385
388
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
@@ -5,7 +5,7 @@ import { CardContent, Stack, Tab, Typography, useThemeProps } from '@mui/materia
|
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { EventService } from '@selfcommunity/api-services';
|
|
7
7
|
import { SCCache, useSCFetchEvent, useSCUser } from '@selfcommunity/react-core';
|
|
8
|
-
import { Logger } from '@selfcommunity/utils';
|
|
8
|
+
import { CacheStrategies, Logger } from '@selfcommunity/utils';
|
|
9
9
|
import { useCallback, useEffect, useMemo, useReducer, useState } from 'react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl';
|
|
11
11
|
import 'swiper/css';
|
|
@@ -37,7 +37,7 @@ export default function EventMembersWidget(inProps) {
|
|
|
37
37
|
props: inProps,
|
|
38
38
|
name: PREFIX
|
|
39
39
|
});
|
|
40
|
-
const { event, eventId, userProps = {}, endpointQueryParams = { limit: 5, offset: DEFAULT_PAGINATION_OFFSET }, cacheStrategy, dialogProps, limit = 5 } = props, rest = __rest(props, ["event", "eventId", "userProps", "endpointQueryParams", "cacheStrategy", "dialogProps", "limit"]);
|
|
40
|
+
const { event, eventId, userProps = {}, endpointQueryParams = { limit: 5, offset: DEFAULT_PAGINATION_OFFSET }, cacheStrategy = CacheStrategies.NETWORK_ONLY, dialogProps, limit = 5 } = props, rest = __rest(props, ["event", "eventId", "userProps", "endpointQueryParams", "cacheStrategy", "dialogProps", "limit"]);
|
|
41
41
|
// STATE
|
|
42
42
|
const [participants, dispatchParticipants] = useReducer(dataWidgetReducer, {
|
|
43
43
|
isLoadingNext: false,
|