@selfcommunity/react-ui 0.7.50-events.97 → 0.7.50-events.98

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.
@@ -149,7 +149,7 @@ function EventSubscribeButton(inProps) {
149
149
  if (!scUserContext.user) {
150
150
  scContext.settings.handleAnonymousAction();
151
151
  }
152
- else {
152
+ else if (status !== undefined) {
153
153
  toggleEventAttendance(event.target.value);
154
154
  }
155
155
  };
@@ -182,7 +182,7 @@ function EventSubscribeButton(inProps) {
182
182
  }
183
183
  return _status;
184
184
  }, [status, scEvent]);
185
- if (!scEvent || status === undefined || (isEventAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isEventAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
185
+ if (!scEvent || (isEventAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isEventAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
186
186
  return null;
187
187
  }
188
188
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) !== types_1.SCEventPrivacyType.PRIVATE ||
@@ -18,4 +18,4 @@
18
18
  |root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
19
19
  *
20
20
  */
21
- export default function PlatformWidgetSkeleton(): JSX.Element;
21
+ export default function PlatformWidgetSkeleton(props: any): JSX.Element;
@@ -1,13 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- const Skeleton_1 = require("../Skeleton");
5
5
  const styles_1 = require("@mui/material/styles");
6
6
  const constants_1 = require("./constants");
7
+ const Widget_1 = tslib_1.__importDefault(require("../Widget"));
8
+ const material_1 = require("@mui/material");
9
+ const Skeleton_1 = tslib_1.__importDefault(require("@mui/material/Skeleton"));
7
10
  const classes = {
8
- root: `${constants_1.PREFIX}-skeleton-root`
11
+ root: `${constants_1.PREFIX}-skeleton-root`,
12
+ title: `${constants_1.PREFIX}-skeleton-title`,
13
+ content: `${constants_1.PREFIX}-skeleton-content`,
14
+ actions: `${constants_1.PREFIX}-skeleton-actions`,
15
+ tutorial: `${constants_1.PREFIX}-skeleton-tutorial`
9
16
  };
10
- const Root = (0, styles_1.styled)(Skeleton_1.GenericSkeleton, {
17
+ const Root = (0, styles_1.styled)(Widget_1.default, {
11
18
  name: constants_1.PREFIX,
12
19
  slot: 'SkeletonRoot'
13
20
  })(() => ({}));
@@ -31,7 +38,7 @@ const Root = (0, styles_1.styled)(Skeleton_1.GenericSkeleton, {
31
38
  |root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
32
39
  *
33
40
  */
34
- function PlatformWidgetSkeleton() {
35
- return (0, jsx_runtime_1.jsx)(Root, { className: classes.root });
41
+ function PlatformWidgetSkeleton(props) {
42
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.title }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 25, width: 170 }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 })] })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
36
43
  }
37
44
  exports.default = PlatformWidgetSkeleton;
@@ -147,7 +147,7 @@ export default function EventSubscribeButton(inProps) {
147
147
  if (!scUserContext.user) {
148
148
  scContext.settings.handleAnonymousAction();
149
149
  }
150
- else {
150
+ else if (status !== undefined) {
151
151
  toggleEventAttendance(event.target.value);
152
152
  }
153
153
  };
@@ -180,7 +180,7 @@ export default function EventSubscribeButton(inProps) {
180
180
  }
181
181
  return _status;
182
182
  }, [status, scEvent]);
183
- if (!scEvent || status === undefined || (isEventAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isEventAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
183
+ if (!scEvent || (isEventAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isEventAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
184
184
  return null;
185
185
  }
186
186
  return (_jsx(_Fragment, { children: (scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) !== SCEventPrivacyType.PRIVATE ||
@@ -18,4 +18,4 @@
18
18
  |root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
19
19
  *
20
20
  */
21
- export default function PlatformWidgetSkeleton(): JSX.Element;
21
+ export default function PlatformWidgetSkeleton(props: any): JSX.Element;
@@ -1,11 +1,17 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { GenericSkeleton } from '../Skeleton';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { styled } from '@mui/material/styles';
4
3
  import { PREFIX } from './constants';
4
+ import Widget from '../Widget';
5
+ import { Grid } from '@mui/material';
6
+ import Skeleton from '@mui/material/Skeleton';
5
7
  const classes = {
6
- root: `${PREFIX}-skeleton-root`
8
+ root: `${PREFIX}-skeleton-root`,
9
+ title: `${PREFIX}-skeleton-title`,
10
+ content: `${PREFIX}-skeleton-content`,
11
+ actions: `${PREFIX}-skeleton-actions`,
12
+ tutorial: `${PREFIX}-skeleton-tutorial`
7
13
  };
8
- const Root = styled(GenericSkeleton, {
14
+ const Root = styled(Widget, {
9
15
  name: PREFIX,
10
16
  slot: 'SkeletonRoot'
11
17
  })(() => ({}));
@@ -29,6 +35,6 @@ const Root = styled(GenericSkeleton, {
29
35
  |root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
30
36
  *
31
37
  */
32
- export default function PlatformWidgetSkeleton() {
33
- return _jsx(Root, { className: classes.root });
38
+ export default function PlatformWidgetSkeleton(props) {
39
+ return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(Grid, Object.assign({ container: true, justifyContent: "center", className: classes.content }, { children: [_jsx(Grid, Object.assign({ item: true, xs: 12, className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: 170 }) })), _jsxs(Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [_jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 })] })), _jsx(Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: _jsx(Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
34
40
  }