@selfcommunity/react-templates 0.3.50-events.41 → 0.3.50-events.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/lib/cjs/components/Category/Category.js +3 -5
  2. package/lib/cjs/components/Category/Skeleton.js +2 -4
  3. package/lib/cjs/components/CategoryFeed/CategoryFeed.js +7 -7
  4. package/lib/cjs/components/CategoryFeed/Skeleton.js +2 -5
  5. package/lib/cjs/components/Event/Event.js +3 -5
  6. package/lib/cjs/components/Event/Skeleton.js +2 -4
  7. package/lib/cjs/components/EventFeed/EventFeed.js +10 -12
  8. package/lib/cjs/components/EventFeed/Skeleton.js +2 -5
  9. package/lib/cjs/components/ExploreFeed/ExploreFeed.js +5 -4
  10. package/lib/cjs/components/ExploreFeed/Skeleton.js +2 -5
  11. package/lib/cjs/components/FeedObjectDetail/FeedObjectDetail.js +6 -15
  12. package/lib/cjs/components/FeedObjectDetail/Skeleton.js +2 -9
  13. package/lib/cjs/components/Group/Group.js +3 -5
  14. package/lib/cjs/components/Group/Skeleton.js +2 -4
  15. package/lib/cjs/components/GroupFeed/GroupFeed.js +8 -8
  16. package/lib/cjs/components/GroupFeed/Skeleton.js +2 -5
  17. package/lib/cjs/components/LoyaltyProgramDetail/LoyaltyProgramDetail.js +6 -35
  18. package/lib/cjs/components/LoyaltyProgramDetail/PointsList.js +4 -17
  19. package/lib/cjs/components/LoyaltyProgramDetail/PrizeItemSkeleton.js +2 -14
  20. package/lib/cjs/components/LoyaltyProgramDetail/Skeleton.js +2 -16
  21. package/lib/cjs/components/MainFeed/MainFeed.js +5 -4
  22. package/lib/cjs/components/MainFeed/Skeleton.js +2 -5
  23. package/lib/cjs/components/NotificationFeed/NotificationFeed.js +3 -2
  24. package/lib/cjs/components/NotificationFeed/Skeleton.js +2 -3
  25. package/lib/cjs/components/UserFeed/Skeleton.js +2 -5
  26. package/lib/cjs/components/UserFeed/UserFeed.js +6 -5
  27. package/lib/cjs/components/UserProfile/Skeleton.js +2 -4
  28. package/lib/cjs/components/UserProfile/UserProfile.js +13 -30
  29. package/lib/esm/components/Category/Category.js +3 -5
  30. package/lib/esm/components/Category/Skeleton.js +2 -4
  31. package/lib/esm/components/CategoryFeed/CategoryFeed.js +7 -7
  32. package/lib/esm/components/CategoryFeed/Skeleton.js +2 -5
  33. package/lib/esm/components/Event/Event.js +3 -5
  34. package/lib/esm/components/Event/Skeleton.js +2 -4
  35. package/lib/esm/components/EventFeed/EventFeed.js +10 -12
  36. package/lib/esm/components/EventFeed/Skeleton.js +2 -5
  37. package/lib/esm/components/ExploreFeed/ExploreFeed.js +5 -4
  38. package/lib/esm/components/ExploreFeed/Skeleton.js +2 -5
  39. package/lib/esm/components/FeedObjectDetail/FeedObjectDetail.js +6 -15
  40. package/lib/esm/components/FeedObjectDetail/Skeleton.js +2 -8
  41. package/lib/esm/components/Group/Group.js +3 -5
  42. package/lib/esm/components/Group/Skeleton.js +2 -4
  43. package/lib/esm/components/GroupFeed/GroupFeed.js +8 -8
  44. package/lib/esm/components/GroupFeed/Skeleton.js +2 -5
  45. package/lib/esm/components/LoyaltyProgramDetail/LoyaltyProgramDetail.js +6 -35
  46. package/lib/esm/components/LoyaltyProgramDetail/PointsList.js +4 -17
  47. package/lib/esm/components/LoyaltyProgramDetail/PrizeItemSkeleton.js +2 -13
  48. package/lib/esm/components/LoyaltyProgramDetail/Skeleton.js +2 -16
  49. package/lib/esm/components/MainFeed/MainFeed.js +5 -4
  50. package/lib/esm/components/MainFeed/Skeleton.js +2 -5
  51. package/lib/esm/components/NotificationFeed/NotificationFeed.js +3 -2
  52. package/lib/esm/components/NotificationFeed/Skeleton.js +2 -3
  53. package/lib/esm/components/UserFeed/Skeleton.js +2 -5
  54. package/lib/esm/components/UserFeed/UserFeed.js +6 -5
  55. package/lib/esm/components/UserProfile/Skeleton.js +2 -4
  56. package/lib/esm/components/UserProfile/UserProfile.js +13 -30
  57. package/lib/umd/react-templates.js +1 -1
  58. package/package.json +6 -6
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useRef } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { CategoriesPopularWidget, Feed, FeedObject, FeedObjectSkeleton, SCFeedObjectTemplateType, InlineComposerWidget, LoyaltyProgramWidget, UserSuggestionWidget, PlatformWidget } from '@selfcommunity/react-ui';
4
5
  import { Endpoints } from '@selfcommunity/api-services';
@@ -84,7 +85,7 @@ export default function ExploreFeed(inProps) {
84
85
  const feedRef = useRef();
85
86
  // HANDLERS
86
87
  const handleComposerSuccess = (feedObject) => {
87
- enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
88
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
88
89
  variant: 'success',
89
90
  autoHideDuration: 3000
90
91
  });
@@ -101,14 +102,14 @@ export default function ExploreFeed(inProps) {
101
102
  const _widgets = useMemo(() => widgets.map((w) => {
102
103
  return Object.assign(Object.assign({}, w), { componentProps: Object.assign({}, w.componentProps) });
103
104
  }), [widgets]);
104
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Endpoints.ExploreFeed, widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
105
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Endpoints.ExploreFeed, widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
105
106
  feedObject: item[item.type],
106
107
  feedObjectType: item.type,
107
108
  feedObjectActivities: item.activities ? item.activities : null,
108
109
  markRead: scUser ? !item.seen_by_id.includes(scUser.id) : null
109
110
  }), itemIdGenerator: (item) => item[item.type].id, ItemProps: FeedObjectProps, ItemSkeleton: FeedObjectSkeleton, ItemSkeletonProps: {
110
111
  template: SCFeedObjectTemplateType.PREVIEW
111
- }, HeaderComponent: React.createElement(InlineComposerWidget, { onSuccess: handleComposerSuccess }), FeedSidebarProps: FeedSidebarProps, enabledCustomAdvPositions: [
112
+ }, HeaderComponent: _jsx(InlineComposerWidget, { onSuccess: handleComposerSuccess }), FeedSidebarProps: FeedSidebarProps, enabledCustomAdvPositions: [
112
113
  SCCustomAdvPosition.POSITION_FEED_SIDEBAR,
113
114
  SCCustomAdvPosition.POSITION_FEED,
114
115
  SCCustomAdvPosition.POSITION_BELOW_TOPBAR
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { FeedObjectSkeleton, SCFeedObjectTemplateType, FeedSkeleton, GenericSkeleton, InlineComposerWidgetSkeleton } from '@selfcommunity/react-ui';
@@ -30,9 +31,5 @@ const Root = styled(FeedSkeleton, {
30
31
  *
31
32
  */
32
33
  export default function ExploreFeedSkeleton() {
33
- return (React.createElement(Root, { className: classes.root, sidebar: React.createElement(React.Fragment, null,
34
- React.createElement(GenericSkeleton, { sx: { mb: 2 } }),
35
- React.createElement(GenericSkeleton, { sx: { mb: 2 } })) },
36
- React.createElement(InlineComposerWidgetSkeleton, null),
37
- Array.from({ length: 5 }).map((e, i) => (React.createElement(FeedObjectSkeleton, { key: i, template: SCFeedObjectTemplateType.DETAIL })))));
34
+ return (_jsxs(Root, Object.assign({ className: classes.root, sidebar: _jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] }) }, { children: [_jsx(InlineComposerWidgetSkeleton, {}), Array.from({ length: 5 }).map((e, i) => (_jsx(FeedObjectSkeleton, { template: SCFeedObjectTemplateType.DETAIL }, i)))] })));
38
35
  }
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useState } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { Box, Grid, Hidden } from '@mui/material';
4
5
  import { CommentsFeedObject, CustomAdv, FeedObject, RelatedFeedObjectsWidget, SCFeedObjectTemplateType, StickyBox } from '@selfcommunity/react-ui';
@@ -70,7 +71,7 @@ export default function FeedObjectDetail(inProps) {
70
71
  if (preferences[SCPreferences.ADVERTISING_CUSTOM_ADV_ENABLED] &&
71
72
  ((preferences[SCPreferences.ADVERTISING_CUSTOM_ADV_ONLY_FOR_ANONYMOUS_USERS_ENABLED] && scUserContext.user === null) ||
72
73
  !preferences[SCPreferences.ADVERTISING_CUSTOM_ADV_ONLY_FOR_ANONYMOUS_USERS_ENABLED])) {
73
- return (React.createElement(CustomAdv, Object.assign({ position: SCCustomAdvPosition.POSITION_BELOW_FEED_OBJECT }, (obj.categories.length && { categoriesId: obj.categories.map((c) => c.id) }))));
74
+ return (_jsx(CustomAdv, Object.assign({ position: SCCustomAdvPosition.POSITION_BELOW_FEED_OBJECT }, (obj.categories.length && { categoriesId: obj.categories.map((c) => c.id) }))));
74
75
  }
75
76
  return null;
76
77
  }
@@ -88,20 +89,10 @@ export default function FeedObjectDetail(inProps) {
88
89
  }, 300);
89
90
  }
90
91
  if (error) {
91
- return (React.createElement(Box, null,
92
- React.createElement(FormattedMessage, { id: "templates.feedObjectDetail.contributionNotFound", defaultMessage: "templates.feedObjectDetail.contributionNotFound" })));
92
+ return (_jsx(Box, { children: _jsx(FormattedMessage, { id: "templates.feedObjectDetail.contributionNotFound", defaultMessage: "templates.feedObjectDetail.contributionNotFound" }) }));
93
93
  }
94
94
  if (!obj) {
95
- return React.createElement(FeedObjectDetailSkeleton, null);
95
+ return _jsx(FeedObjectDetailSkeleton, {});
96
96
  }
97
- return (React.createElement(Root, { id: id, className: classNames(classes.root, className) },
98
- React.createElement(Grid, { container: true, spacing: 2 },
99
- React.createElement(Grid, { item: true, xs: 12, md: 7 },
100
- React.createElement(FeedObject, Object.assign({}, FeedObjectProps, { feedObject: obj, template: SCFeedObjectTemplateType.DETAIL, onReply: handleReply })),
101
- renderAdvertising(),
102
- React.createElement(CommentsFeedObject, Object.assign({ key: `comments_${obj.id}`, showTitle: true, feedObject: obj, comments: comments }, CommentsFeedObjectProps))),
103
- React.createElement(Grid, { item: true, xs: 12, md: 5 },
104
- React.createElement(Hidden, { mdDown: true },
105
- React.createElement(StickyBox, Object.assign({}, FeedSidebarProps),
106
- React.createElement(RelatedFeedObjectsWidget, Object.assign({ key: `related_${obj.id}`, feedObject: obj }, RelatedFeedObjectProps))))))));
97
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: _jsxs(Grid, Object.assign({ container: true, spacing: 2 }, { children: [_jsxs(Grid, Object.assign({ item: true, xs: 12, md: 7 }, { children: [_jsx(FeedObject, Object.assign({}, FeedObjectProps, { feedObject: obj, template: SCFeedObjectTemplateType.DETAIL, onReply: handleReply })), renderAdvertising(), _jsx(CommentsFeedObject, Object.assign({ showTitle: true, feedObject: obj, comments: comments }, CommentsFeedObjectProps), `comments_${obj.id}`)] })), _jsx(Grid, Object.assign({ item: true, xs: 12, md: 5 }, { children: _jsx(Hidden, Object.assign({ mdDown: true }, { children: _jsx(StickyBox, Object.assign({}, FeedSidebarProps, { children: _jsx(RelatedFeedObjectsWidget, Object.assign({ feedObject: obj }, RelatedFeedObjectProps), `related_${obj.id}`) })) })) }))] })) })));
107
98
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CommentsFeedObjectSkeleton, FeedObjectSkeleton, SCFeedObjectTemplateType, RelatedFeedObjectsWidgetSkeleton } from '@selfcommunity/react-ui';
3
3
  import { Box, Grid } from '@mui/material';
4
4
  import { styled } from '@mui/material/styles';
@@ -32,11 +32,5 @@ const Root = styled(Box, {
32
32
  */
33
33
  export default function FeedObjectDetailSkeleton(props) {
34
34
  const { FeedObjectSkeletonProps = {}, CommentsFeedObjectSkeletonProps = {}, RelatedFeedObjectsSkeletonProps = {} } = props;
35
- return (React.createElement(Root, { className: classes.root },
36
- React.createElement(Grid, { container: true, spacing: 2 },
37
- React.createElement(Grid, { item: true, xs: 12, md: 7 },
38
- React.createElement(FeedObjectSkeleton, Object.assign({ template: SCFeedObjectTemplateType.DETAIL }, FeedObjectSkeletonProps)),
39
- React.createElement(CommentsFeedObjectSkeleton, Object.assign({ count: 4 }, CommentsFeedObjectSkeletonProps))),
40
- React.createElement(Grid, { item: true, xs: 12, md: 5 },
41
- React.createElement(RelatedFeedObjectsWidgetSkeleton, Object.assign({}, RelatedFeedObjectsSkeletonProps))))));
35
+ return (_jsx(Root, Object.assign({ className: classes.root }, { children: _jsxs(Grid, Object.assign({ container: true, spacing: 2 }, { children: [_jsxs(Grid, Object.assign({ item: true, xs: 12, md: 7 }, { children: [_jsx(FeedObjectSkeleton, Object.assign({ template: SCFeedObjectTemplateType.DETAIL }, FeedObjectSkeletonProps)), _jsx(CommentsFeedObjectSkeleton, Object.assign({ count: 4 }, CommentsFeedObjectSkeletonProps))] })), _jsx(Grid, Object.assign({ item: true, xs: 12, md: 5 }, { children: _jsx(RelatedFeedObjectsWidgetSkeleton, Object.assign({}, RelatedFeedObjectsSkeletonProps)) }))] })) })));
42
36
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { styled } from '@mui/material/styles';
3
3
  import { Box } from '@mui/material';
4
4
  import { GroupHeader } from '@selfcommunity/react-ui';
@@ -55,9 +55,7 @@ export default function Group(inProps) {
55
55
  setSCGroup(Object.assign({}, scGroup, { subscription_status: status }));
56
56
  };
57
57
  if (!scGroup) {
58
- return React.createElement(GroupSkeletonTemplate, null);
58
+ return _jsx(GroupSkeletonTemplate, {});
59
59
  }
60
- return (React.createElement(Root, { id: id, className: classNames(classes.root, className) },
61
- React.createElement(GroupHeader, { groupId: scGroup.id, GroupSubscribeButtonProps: { onSubscribe: handleSubscribe } }),
62
- React.createElement(GroupFeed, Object.assign({ className: classes.feed, group: scGroup, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, GroupFeedProps))));
60
+ return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(GroupHeader, { groupId: scGroup.id, GroupSubscribeButtonProps: { onSubscribe: handleSubscribe } }), _jsx(GroupFeed, Object.assign({ className: classes.feed, group: scGroup, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, GroupFeedProps))] })));
63
61
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import GroupFeedSkeleton from '../GroupFeed/Skeleton';
@@ -32,7 +32,5 @@ const Root = styled(Box, {
32
32
  *
33
33
  */
34
34
  export default function GroupSkeletonTemplate() {
35
- return (React.createElement(Root, { className: classes.root },
36
- React.createElement(GroupHeaderSkeleton, null),
37
- React.createElement(GroupFeedSkeleton, null)));
35
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(GroupHeaderSkeleton, {}), _jsx(GroupFeedSkeleton, {})] })));
38
36
  }
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useRef } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { ContributionUtils, Feed, FeedObject, FeedObjectSkeleton, GroupInfoWidget, GroupMembersWidget, InlineComposerWidget, SCFeedObjectTemplateType } from '@selfcommunity/react-ui';
4
5
  import { Endpoints } from '@selfcommunity/api-services';
@@ -75,9 +76,8 @@ export default function GroupFeed(inProps) {
75
76
  // HANDLERS
76
77
  const handleComposerSuccess = (feedObject) => {
77
78
  var _a;
78
- enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.composerIconButton.composer.success", defaultMessage: "ui.composerIconButton.composer.success" }), {
79
- action: (snackbarId) => (React.createElement(Link, { to: scRoutingContext.url(SCRoutes[`${feedObject.type.toUpperCase()}_ROUTE_NAME`], ContributionUtils.getRouteData(feedObject)) },
80
- React.createElement(FormattedMessage, { id: "ui.composerIconButton.composer.viewContribute", defaultMessage: "ui.composerIconButton.composer.viewContribute" }))),
79
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.composerIconButton.composer.success", defaultMessage: "ui.composerIconButton.composer.success" }), {
80
+ action: (snackbarId) => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes[`${feedObject.type.toUpperCase()}_ROUTE_NAME`], ContributionUtils.getRouteData(feedObject)) }, { children: _jsx(FormattedMessage, { id: "ui.composerIconButton.composer.viewContribute", defaultMessage: "ui.composerIconButton.composer.viewContribute" }) }))),
81
81
  variant: 'success',
82
82
  autoHideDuration: 7000
83
83
  });
@@ -100,12 +100,12 @@ export default function GroupFeed(inProps) {
100
100
  return w;
101
101
  }), [widgets, scGroup]);
102
102
  if (!scGroup) {
103
- return React.createElement(GroupFeedSkeleton, null);
103
+ return _jsx(GroupFeedSkeleton, {});
104
104
  }
105
105
  else if (scGroup && scGroup.subscription_status !== SCGroupSubscriptionStatusType.SUBSCRIBED) {
106
- return React.createElement(GroupInfoWidget, { className: classes.root, groupId: scGroup === null || scGroup === void 0 ? void 0 : scGroup.id });
106
+ return _jsx(GroupInfoWidget, { className: classes.root, groupId: scGroup === null || scGroup === void 0 ? void 0 : scGroup.id });
107
107
  }
108
- return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className), id: id, ref: feedRef, endpoint: Object.assign(Object.assign({}, Endpoints.GetGroupFeed), { url: () => Endpoints.GetGroupFeed.url({ id: scGroup.id }) }), widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => {
108
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), id: id, ref: feedRef, endpoint: Object.assign(Object.assign({}, Endpoints.GetGroupFeed), { url: () => Endpoints.GetGroupFeed.url({ id: scGroup.id }) }), widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => {
109
109
  var _a;
110
110
  return ({
111
111
  feedObject: item[item.type],
@@ -116,7 +116,7 @@ export default function GroupFeed(inProps) {
116
116
  }, itemIdGenerator: (item) => item[item.type].id, ItemProps: FeedObjectProps, ItemSkeleton: FeedObjectSkeleton, ItemSkeletonProps: {
117
117
  template: SCFeedObjectTemplateType.PREVIEW
118
118
  }, FeedSidebarProps: FeedSidebarProps, HeaderComponent: scGroup &&
119
- scGroup.subscription_status === SCGroupSubscriptionStatusType.SUBSCRIBED && (React.createElement(InlineComposerWidget, { onSuccess: handleComposerSuccess, defaultValue: { group: scGroup }, label: React.createElement(FormattedMessage, { id: "templates.groupFeed.composer.label", defaultMessage: "templates.groupFeed.composer.label" }), feedType: SCFeedTypologyType.GROUP })), CustomAdvProps: { position: SCCustomAdvPosition.POSITION_FEED, groupsId: [scGroup.id] }, enabledCustomAdvPositions: [
119
+ scGroup.subscription_status === SCGroupSubscriptionStatusType.SUBSCRIBED && (_jsx(InlineComposerWidget, { onSuccess: handleComposerSuccess, defaultValue: { group: scGroup }, label: _jsx(FormattedMessage, { id: "templates.groupFeed.composer.label", defaultMessage: "templates.groupFeed.composer.label" }), feedType: SCFeedTypologyType.GROUP })), CustomAdvProps: { position: SCCustomAdvPosition.POSITION_FEED, groupsId: [scGroup.id] }, enabledCustomAdvPositions: [
120
120
  SCCustomAdvPosition.POSITION_FEED_SIDEBAR,
121
121
  SCCustomAdvPosition.POSITION_FEED,
122
122
  SCCustomAdvPosition.POSITION_BELOW_TOPBAR
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { FeedObjectSkeleton, SCFeedObjectTemplateType, FeedSkeleton, GenericSkeleton, InlineComposerWidgetSkeleton } from '@selfcommunity/react-ui';
@@ -30,9 +31,5 @@ const Root = styled(FeedSkeleton, {
30
31
  *
31
32
  */
32
33
  export default function GroupFeedSkeleton() {
33
- return (React.createElement(Root, { className: classes.root, sidebar: React.createElement(React.Fragment, null,
34
- React.createElement(GenericSkeleton, { sx: { mb: 2 } }),
35
- React.createElement(GenericSkeleton, { sx: { mb: 2 } })) },
36
- React.createElement(InlineComposerWidgetSkeleton, null),
37
- Array.from({ length: 5 }).map((e, i) => (React.createElement(FeedObjectSkeleton, { key: i, template: SCFeedObjectTemplateType.DETAIL })))));
34
+ return (_jsxs(Root, Object.assign({ className: classes.root, sidebar: _jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] }) }, { children: [_jsx(InlineComposerWidgetSkeleton, {}), Array.from({ length: 5 }).map((e, i) => (_jsx(FeedObjectSkeleton, { template: SCFeedObjectTemplateType.DETAIL }, i)))] })));
38
35
  }
@@ -1,5 +1,6 @@
1
1
  import { __rest } from "tslib";
2
- import React, { useContext, useEffect, useMemo, useState } from 'react';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useContext, useEffect, useMemo, useState } from 'react';
3
4
  import { styled } from '@mui/material/styles';
4
5
  import { http, Endpoints, UserService, LoyaltyService } from '@selfcommunity/api-services';
5
6
  import { SCUserContext } from '@selfcommunity/react-core';
@@ -106,7 +107,7 @@ export default function LoyaltyProgramDetail(inProps) {
106
107
  .then((data) => {
107
108
  setPoints((prev) => prev - data.prize_points);
108
109
  setOpen(false);
109
- let _snackBar = enqueueSnackbar(React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.request.success", defaultMessage: "templates.loyaltyProgramDetail.prize.request.success" }), {
110
+ let _snackBar = enqueueSnackbar(_jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.request.success", defaultMessage: "templates.loyaltyProgramDetail.prize.request.success" }), {
110
111
  variant: 'success',
111
112
  autoHideDuration: 3000,
112
113
  SnackbarProps: {
@@ -118,7 +119,7 @@ export default function LoyaltyProgramDetail(inProps) {
118
119
  })
119
120
  .catch((error) => {
120
121
  setOpen(false);
121
- let _snackBar = enqueueSnackbar(React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.request.error", defaultMessage: "templates.loyaltyProgramDetail.prize.request.error" }), {
122
+ let _snackBar = enqueueSnackbar(_jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.request.error", defaultMessage: "templates.loyaltyProgramDetail.prize.request.error" }), {
122
123
  variant: 'error',
123
124
  autoHideDuration: 3000,
124
125
  SnackbarProps: {
@@ -181,37 +182,7 @@ export default function LoyaltyProgramDetail(inProps) {
181
182
  return null;
182
183
  }
183
184
  if (loading) {
184
- return React.createElement(Skeleton, null);
185
+ return _jsx(Skeleton, {});
185
186
  }
186
- return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest),
187
- points !== 0 && (React.createElement(Typography, { className: classes.title, variant: "h5" },
188
- !isMobile && React.createElement(FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }),
189
- React.createElement(Chip, { className: classes.userPoints, component: "span", label: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.userPoints", defaultMessage: "templates.loyaltyProgramDetail.userPoints", values: { total: points } }) }))),
190
- React.createElement(Typography, { className: classes.sectionTitle },
191
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.community", defaultMessage: "templates.loyaltyProgramDetail.community" })),
192
- React.createElement(Typography, { className: classes.sectionInfo },
193
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.description", defaultMessage: "templates.loyaltyProgramDetail.description" })),
194
- React.createElement(Typography, { className: classes.sectionTitle },
195
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.listTitle", defaultMessage: "templates.loyaltyProgramDetail.listTitle" })),
196
- React.createElement(PointsList, { className: classes.pointsSection }),
197
- prizes.length !== 0 && (React.createElement(Typography, { className: classes.sectionTitle },
198
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.prizes", defaultMessage: "templates.loyaltyProgramDetail.prizes" }))),
199
- React.createElement(InfiniteScroll, { dataLength: prizes.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: React.createElement(PrizeItemSkeleton, null), endMessage: React.createElement(React.Fragment, null, prizes.length !== 0 ? (React.createElement(Typography, { className: classes.endMessage },
200
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.content.end.message", defaultMessage: "templates.loyaltyProgramDetail.content.end.message" }),
201
- React.createElement(Button, { color: 'secondary', onClick: handleScrollUp },
202
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.content.end.button", defaultMessage: "templates.loyaltyProgramDetail.content.end.button" })))) : null) },
203
- React.createElement(Grid, { container: true, spacing: !isMobile ? 3 : 0, direction: isMobile ? 'column' : 'row', className: classes.prizeSection }, prizes.map((prize) => (React.createElement(Grid, { item: true, xs: 12, sm: 12, md: 6, lg: 4, xl: 3, key: prize.id },
204
- React.createElement(Card, { className: classes.card },
205
- React.createElement(CardMedia, { component: "img", image: prize.image }),
206
- React.createElement(Box, { className: classes.prizePoints },
207
- React.createElement(Chip, { className: points <= prize.points ? classes.notRequestable : null, label: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.points", defaultMessage: "templates.loyaltyProgramDetail.prize.points", values: { total: prize.points } }) })),
208
- React.createElement(CardContent, null,
209
- React.createElement(Typography, { variant: "body1", className: classes.cardTitle }, prize.title),
210
- React.createElement(Typography, { variant: "body2", className: classes.cardContent }, prize.description)),
211
- React.createElement(CardActions, null,
212
- prize.link && (React.createElement(Button, { size: "medium", color: "secondary", href: prize.link, target: "_blank", className: classes.actionButton },
213
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.button.more", defaultMessage: "templates.loyaltyProgramDetail.button.more" }))),
214
- ((!prize.link && prize.active && points >= prize.points) || (prize.active && points >= prize.points)) && (React.createElement(Button, { size: "small", variant: "outlined", className: classes.actionButton, disabled: points < prize.points, onClick: () => handleOpenAlert(prize.id) },
215
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.button.request", defaultMessage: "templates.loyaltyProgramDetail.button.request" })))))))))),
216
- open && (React.createElement(ConfirmDialog, { open: open, title: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.dialog.msg", defaultMessage: "templates.loyaltyProgramDetail.dialog.msg" }), btnConfirm: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.dialog.confirm", defaultMessage: "templates.loyaltyProgramDetail.dialog.confirm" }), onConfirm: () => requestPrize(prizeRequested), onClose: () => setOpen(false) }))));
187
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [points !== 0 && (_jsxs(Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: [!isMobile && _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }), _jsx(Chip, { className: classes.userPoints, component: "span", label: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.userPoints", defaultMessage: "templates.loyaltyProgramDetail.userPoints", values: { total: points } }) })] }))), _jsx(Typography, Object.assign({ className: classes.sectionTitle }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.community", defaultMessage: "templates.loyaltyProgramDetail.community" }) })), _jsx(Typography, Object.assign({ className: classes.sectionInfo }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.description", defaultMessage: "templates.loyaltyProgramDetail.description" }) })), _jsx(Typography, Object.assign({ className: classes.sectionTitle }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.listTitle", defaultMessage: "templates.loyaltyProgramDetail.listTitle" }) })), _jsx(PointsList, { className: classes.pointsSection }), prizes.length !== 0 && (_jsx(Typography, Object.assign({ className: classes.sectionTitle }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.prizes", defaultMessage: "templates.loyaltyProgramDetail.prizes" }) }))), _jsx(InfiniteScroll, Object.assign({ dataLength: prizes.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: _jsx(PrizeItemSkeleton, {}), endMessage: _jsx(_Fragment, { children: prizes.length !== 0 ? (_jsxs(Typography, Object.assign({ className: classes.endMessage }, { children: [_jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.content.end.message", defaultMessage: "templates.loyaltyProgramDetail.content.end.message" }), _jsx(Button, Object.assign({ color: 'secondary', onClick: handleScrollUp }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.content.end.button", defaultMessage: "templates.loyaltyProgramDetail.content.end.button" }) }))] }))) : null }) }, { children: _jsx(Grid, Object.assign({ container: true, spacing: !isMobile ? 3 : 0, direction: isMobile ? 'column' : 'row', className: classes.prizeSection }, { children: prizes.map((prize) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 4, xl: 3 }, { children: _jsxs(Card, Object.assign({ className: classes.card }, { children: [_jsx(CardMedia, { component: "img", image: prize.image }), _jsx(Box, Object.assign({ className: classes.prizePoints }, { children: _jsx(Chip, { className: points <= prize.points ? classes.notRequestable : null, label: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.prize.points", defaultMessage: "templates.loyaltyProgramDetail.prize.points", values: { total: prize.points } }) }) })), _jsxs(CardContent, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.cardTitle }, { children: prize.title })), _jsx(Typography, Object.assign({ variant: "body2", className: classes.cardContent }, { children: prize.description }))] }), _jsxs(CardActions, { children: [prize.link && (_jsx(Button, Object.assign({ size: "medium", color: "secondary", href: prize.link, target: "_blank", className: classes.actionButton }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.button.more", defaultMessage: "templates.loyaltyProgramDetail.button.more" }) }))), ((!prize.link && prize.active && points >= prize.points) || (prize.active && points >= prize.points)) && (_jsx(Button, Object.assign({ size: "small", variant: "outlined", className: classes.actionButton, disabled: points < prize.points, onClick: () => handleOpenAlert(prize.id) }, { children: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.button.request", defaultMessage: "templates.loyaltyProgramDetail.button.request" }) })))] })] })) }), prize.id))) })) })), open && (_jsx(ConfirmDialog, { open: open, title: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.dialog.msg", defaultMessage: "templates.loyaltyProgramDetail.dialog.msg" }), btnConfirm: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.dialog.confirm", defaultMessage: "templates.loyaltyProgramDetail.dialog.confirm" }), onConfirm: () => requestPrize(prizeRequested), onClose: () => setOpen(false) }))] })));
217
188
  }
@@ -1,5 +1,6 @@
1
1
  import { __rest } from "tslib";
2
- import React, { useMemo } from 'react';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMemo } from 'react';
3
4
  import { styled } from '@mui/material/styles';
4
5
  import { SCPreferences, useSCPreferences } from '@selfcommunity/react-core';
5
6
  import { Divider, Grid, Typography } from '@mui/material';
@@ -22,13 +23,7 @@ const classes = {
22
23
  };
23
24
  export function PointElement({ message, points }) {
24
25
  if (points > 0) {
25
- return (React.createElement(Grid, { item: true, xs: 12, sm: 12, md: 6 },
26
- React.createElement(Typography, { component: "div", className: classes.element },
27
- React.createElement(Typography, null, message),
28
- React.createElement(Typography, null,
29
- "+",
30
- React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points", defaultMessage: "templates.loyaltyProgramDetail.points", values: { total: points } }))),
31
- React.createElement(Divider, null)));
26
+ return (_jsxs(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6 }, { children: [_jsxs(Typography, Object.assign({ component: "div", className: classes.element }, { children: [_jsx(Typography, { children: message }), _jsxs(Typography, { children: ["+", _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points", defaultMessage: "templates.loyaltyProgramDetail.points", values: { total: points } })] })] })), _jsx(Divider, {})] })));
32
27
  }
33
28
  }
34
29
  const Root = styled(Grid, {
@@ -53,13 +48,5 @@ export default function PointsList(props) {
53
48
  /**
54
49
  * Renders the component (if not hidden by autoHide prop)
55
50
  */
56
- return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className), container: true, spacing: 2 }, rest),
57
- preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED].value && (React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.post", defaultMessage: "templates.loyaltyProgramDetail.points.post" }), points: _preferences[SCPreferences.POINTS_MAKE_POST] })),
58
- preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED].value && (React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.discussion", defaultMessage: "templates.loyaltyProgramDetail.points.discussion" }), points: _preferences[SCPreferences.POINTS_MAKE_DISCUSSION] })),
59
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.comment", defaultMessage: "templates.loyaltyProgramDetail.points.comment" }), points: _preferences[SCPreferences.POINTS_MAKE_COMMENT] }),
60
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.appreciation", defaultMessage: "templates.loyaltyProgramDetail.points.appreciation" }), points: _preferences[SCPreferences.POINTS_RECEIVE_VOTE] }),
61
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.follower", defaultMessage: "templates.loyaltyProgramDetail.points.follower" }), points: _preferences[SCPreferences.POINTS_CONNECTION_OR_FOLLOWER] }),
62
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.share", defaultMessage: "templates.loyaltyProgramDetail.points.share" }), points: _preferences[SCPreferences.POINTS_SOCIAL_SHARE] }),
63
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.app", defaultMessage: "templates.loyaltyProgramDetail.points.app" }), points: _preferences[SCPreferences.POINTS_APP_USED] }),
64
- React.createElement(PointElement, { message: React.createElement(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.visit", defaultMessage: "templates.loyaltyProgramDetail.points.visit" }), points: _preferences[SCPreferences.POINTS_DAILY_VISIT] })));
51
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), container: true, spacing: 2 }, rest, { children: [preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED].value && (_jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.post", defaultMessage: "templates.loyaltyProgramDetail.points.post" }), points: _preferences[SCPreferences.POINTS_MAKE_POST] })), preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED].value && (_jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.discussion", defaultMessage: "templates.loyaltyProgramDetail.points.discussion" }), points: _preferences[SCPreferences.POINTS_MAKE_DISCUSSION] })), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.comment", defaultMessage: "templates.loyaltyProgramDetail.points.comment" }), points: _preferences[SCPreferences.POINTS_MAKE_COMMENT] }), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.appreciation", defaultMessage: "templates.loyaltyProgramDetail.points.appreciation" }), points: _preferences[SCPreferences.POINTS_RECEIVE_VOTE] }), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.follower", defaultMessage: "templates.loyaltyProgramDetail.points.follower" }), points: _preferences[SCPreferences.POINTS_CONNECTION_OR_FOLLOWER] }), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.share", defaultMessage: "templates.loyaltyProgramDetail.points.share" }), points: _preferences[SCPreferences.POINTS_SOCIAL_SHARE] }), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.app", defaultMessage: "templates.loyaltyProgramDetail.points.app" }), points: _preferences[SCPreferences.POINTS_APP_USED] }), _jsx(PointElement, { message: _jsx(FormattedMessage, { id: "templates.loyaltyProgramDetail.points.visit", defaultMessage: "templates.loyaltyProgramDetail.points.visit" }), points: _preferences[SCPreferences.POINTS_DAILY_VISIT] })] })));
65
52
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { styled } from '@mui/material/styles';
3
3
  import { Typography, CardContent, Skeleton, CardActions, CardMedia, Button } from '@mui/material';
4
4
  import { Widget } from '@selfcommunity/react-ui';
@@ -29,16 +29,5 @@ const Root = styled(Widget, {
29
29
  *
30
30
  */
31
31
  export default function PrizeItemSkeleton() {
32
- return (React.createElement(Root, { className: classes.root },
33
- React.createElement(CardMedia, null,
34
- React.createElement(Skeleton, { animation: "wave", variant: "rectangular", width: "100%", height: 137 })),
35
- React.createElement(CardContent, null,
36
- React.createElement(Typography, { className: classes.content },
37
- React.createElement(Skeleton, { animation: "wave", height: 20, width: "80%", variant: "text" }),
38
- React.createElement(Skeleton, { animation: "wave", height: 10, width: "70%", variant: "text", style: { marginTop: 8 } }))),
39
- React.createElement(CardActions, { className: classes.actions },
40
- React.createElement(Button, { disabled: true, variant: 'outlined', size: 'small' },
41
- React.createElement(Skeleton, { animation: "wave", height: 10, width: 50, variant: "text" })),
42
- React.createElement(Button, { disabled: true, variant: 'text', size: 'small' },
43
- React.createElement(Skeleton, { animation: "wave", height: 20, width: 70, variant: "text" })))));
32
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(CardMedia, { children: _jsx(Skeleton, { animation: "wave", variant: "rectangular", width: "100%", height: 137 }) }), _jsx(CardContent, { children: _jsxs(Typography, Object.assign({ className: classes.content }, { children: [_jsx(Skeleton, { animation: "wave", height: 20, width: "80%", variant: "text" }), _jsx(Skeleton, { animation: "wave", height: 10, width: "70%", variant: "text", style: { marginTop: 8 } })] })) }), _jsxs(CardActions, Object.assign({ className: classes.actions }, { children: [_jsx(Button, Object.assign({ disabled: true, variant: 'outlined', size: 'small' }, { children: _jsx(Skeleton, { animation: "wave", height: 10, width: 50, variant: "text" }) })), _jsx(Button, Object.assign({ disabled: true, variant: 'text', size: 'small' }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: 70, variant: "text" }) }))] }))] })));
44
33
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { styled } from '@mui/material/styles';
3
3
  import { Typography, Grid, Skeleton, Box, useTheme, useMediaQuery } from '@mui/material';
4
4
  import PrizeItemSkeleton from './PrizeItemSkeleton';
@@ -43,19 +43,5 @@ const Root = styled(Box, {
43
43
  export default function LoyaltyProgramDetailSkeleton() {
44
44
  const theme = useTheme();
45
45
  const isMobile = useMediaQuery(theme.breakpoints.down('md'));
46
- return (React.createElement(Root, { className: classes.root },
47
- React.createElement(Typography, { className: classes.title, component: 'div' },
48
- !isMobile && React.createElement(Skeleton, { animation: "wave", height: 30, width: 140, variant: "text" }),
49
- React.createElement(Skeleton, { animation: "wave", variant: "circular", width: 172, height: 30, className: classes.chip })),
50
- React.createElement(Typography, { className: classes.sectionTitle },
51
- React.createElement(Skeleton, { animation: "wave", height: 20, width: '50%', variant: "text" }),
52
- React.createElement(Skeleton, { animation: "wave", height: 17, width: '80%', variant: "text", className: classes.subTitle })),
53
- React.createElement(Typography, { className: classes.sectionTitle },
54
- React.createElement(Skeleton, { animation: "wave", height: 20, width: 146 })),
55
- React.createElement(Grid, { container: true, spacing: 2, className: classes.pointsList }, [...Array(8)].map((prize, index) => (React.createElement(Grid, { item: true, xs: 12, sm: 12, md: 6, key: index },
56
- React.createElement(Skeleton, { animation: "wave", height: 15, width: "100%" }))))),
57
- React.createElement(Typography, { className: classes.sectionTitle },
58
- React.createElement(Skeleton, { animation: "wave", height: 20, width: 140, variant: "text" })),
59
- React.createElement(Grid, { container: true, spacing: isMobile ? 3 : 6 }, [...Array(6)].map((prize, index) => (React.createElement(Grid, { item: true, xs: 12, sm: 12, md: 6, lg: 4, key: index },
60
- React.createElement(PrizeItemSkeleton, null)))))));
46
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsxs(Typography, Object.assign({ className: classes.title, component: 'div' }, { children: [!isMobile && _jsx(Skeleton, { animation: "wave", height: 30, width: 140, variant: "text" }), _jsx(Skeleton, { animation: "wave", variant: "circular", width: 172, height: 30, className: classes.chip })] })), _jsxs(Typography, Object.assign({ className: classes.sectionTitle }, { children: [_jsx(Skeleton, { animation: "wave", height: 20, width: '50%', variant: "text" }), _jsx(Skeleton, { animation: "wave", height: 17, width: '80%', variant: "text", className: classes.subTitle })] })), _jsx(Typography, Object.assign({ className: classes.sectionTitle }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: 146 }) })), _jsx(Grid, Object.assign({ container: true, spacing: 2, className: classes.pointsList }, { children: [...Array(8)].map((prize, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6 }, { children: _jsx(Skeleton, { animation: "wave", height: 15, width: "100%" }) }), index))) })), _jsx(Typography, Object.assign({ className: classes.sectionTitle }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: 140, variant: "text" }) })), _jsx(Grid, Object.assign({ container: true, spacing: isMobile ? 3 : 6 }, { children: [...Array(6)].map((prize, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 4 }, { children: _jsx(PrizeItemSkeleton, {}) }), index))) }))] })));
61
47
  }
@@ -1,4 +1,5 @@
1
- import React, { useContext, useRef } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext, useRef } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { CategoriesSuggestionWidget, Feed, FeedObject, FeedObjectSkeleton, SCFeedObjectTemplateType, InlineComposerWidget, LoyaltyProgramWidget, UserSuggestionWidget, PlatformWidget } from '@selfcommunity/react-ui';
4
5
  import { Endpoints } from '@selfcommunity/api-services';
@@ -90,7 +91,7 @@ export default function MainFeed(inProps) {
90
91
  }
91
92
  // HANDLERS
92
93
  const handleComposerSuccess = (feedObject) => {
93
- enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
94
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
94
95
  variant: 'success',
95
96
  autoHideDuration: 3000
96
97
  });
@@ -103,14 +104,14 @@ export default function MainFeed(inProps) {
103
104
  };
104
105
  feedRef && feedRef.current && feedRef.current.addFeedData(feedUnit, true);
105
106
  };
106
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Endpoints.MainFeed, widgets: widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
107
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Endpoints.MainFeed, widgets: widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
107
108
  feedObject: item[item.type],
108
109
  feedObjectType: item.type,
109
110
  feedObjectActivities: item.activities ? item.activities : null,
110
111
  markRead: scUser ? !item.seen_by_id.includes(scUser.id) : null
111
112
  }), itemIdGenerator: (item) => item[item.type].id, ItemProps: FeedObjectProps, ItemSkeleton: FeedObjectSkeleton, ItemSkeletonProps: {
112
113
  template: SCFeedObjectTemplateType.PREVIEW
113
- }, FeedSidebarProps: FeedSidebarProps, HeaderComponent: React.createElement(InlineComposerWidget, { onSuccess: handleComposerSuccess }), requireAuthentication: true, disablePaginationLinks: true, enabledCustomAdvPositions: [
114
+ }, FeedSidebarProps: FeedSidebarProps, HeaderComponent: _jsx(InlineComposerWidget, { onSuccess: handleComposerSuccess }), requireAuthentication: true, disablePaginationLinks: true, enabledCustomAdvPositions: [
114
115
  SCCustomAdvPosition.POSITION_FEED_SIDEBAR,
115
116
  SCCustomAdvPosition.POSITION_FEED,
116
117
  SCCustomAdvPosition.POSITION_BELOW_TOPBAR
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { FeedObjectSkeleton, SCFeedObjectTemplateType, FeedSkeleton, GenericSkeleton, InlineComposerWidgetSkeleton } from '@selfcommunity/react-ui';
@@ -30,9 +31,5 @@ const Root = styled(FeedSkeleton, {
30
31
  *
31
32
  */
32
33
  export default function MainFeedSkeleton() {
33
- return (React.createElement(Root, { className: classes.root, sidebar: React.createElement(React.Fragment, null,
34
- React.createElement(GenericSkeleton, { sx: { mb: 2 } }),
35
- React.createElement(GenericSkeleton, { sx: { mb: 2 } })) },
36
- React.createElement(InlineComposerWidgetSkeleton, null),
37
- Array.from({ length: 5 }).map((e, i) => (React.createElement(FeedObjectSkeleton, { key: i, template: SCFeedObjectTemplateType.DETAIL })))));
34
+ return (_jsxs(Root, Object.assign({ className: classes.root, sidebar: _jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] }) }, { children: [_jsx(InlineComposerWidgetSkeleton, {}), Array.from({ length: 5 }).map((e, i) => (_jsx(FeedObjectSkeleton, { template: SCFeedObjectTemplateType.DETAIL }, i)))] })));
38
35
  }
@@ -1,4 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { BroadcastMessages, CategoriesSuggestionWidget, Feed, SCFeedObjectTemplateType, FeedUpdatesWidget, LoyaltyProgramWidget, Notification, NotificationSkeleton, UserSuggestionWidget, PlatformWidget, getUnseenNotificationCounter } from '@selfcommunity/react-ui';
4
5
  import { Endpoints } from '@selfcommunity/api-services';
@@ -113,7 +114,7 @@ export default function NotificationFeed(inProps) {
113
114
  void scUserContext.refreshCounters();
114
115
  }
115
116
  };
116
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className), endpoint: Endpoints.UserNotificationList, widgets: widgets, ItemComponent: Notification, itemPropsGenerator: (scUser, item) => ({
117
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className), endpoint: Endpoints.UserNotificationList, widgets: widgets, ItemComponent: Notification, itemPropsGenerator: (scUser, item) => ({
117
118
  notificationObject: item
118
119
  }), itemIdGenerator: (item) => item.sid, ItemProps: NotificationProps, ItemSkeleton: NotificationSkeleton, ItemSkeletonProps: {
119
120
  template: SCFeedObjectTemplateType.PREVIEW
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { FeedSkeleton, GenericSkeleton, NotificationSkeleton } from '@selfcommunity/react-ui';
@@ -30,7 +31,5 @@ const Root = styled(FeedSkeleton, {
30
31
  *
31
32
  */
32
33
  export default function NotificationFeedSkeleton() {
33
- return (React.createElement(Root, { className: classes.root, sidebar: React.createElement(React.Fragment, null,
34
- React.createElement(GenericSkeleton, { sx: { mb: 2 } }),
35
- React.createElement(GenericSkeleton, { sx: { mb: 2 } })) }, Array.from({ length: 5 }).map((e, i) => (React.createElement(NotificationSkeleton, { key: i })))));
34
+ return (_jsx(Root, Object.assign({ className: classes.root, sidebar: _jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] }) }, { children: Array.from({ length: 5 }).map((e, i) => (_jsx(NotificationSkeleton, {}, i))) })));
36
35
  }
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { FeedObjectSkeleton, SCFeedObjectTemplateType, FeedSkeleton, GenericSkeleton, InlineComposerWidgetSkeleton } from '@selfcommunity/react-ui';
@@ -30,9 +31,5 @@ const Root = styled(FeedSkeleton, {
30
31
  *
31
32
  */
32
33
  export default function UserFeedSkeleton() {
33
- return (React.createElement(Root, { className: classes.root, sidebar: React.createElement(React.Fragment, null,
34
- React.createElement(GenericSkeleton, { sx: { mb: 2 } }),
35
- React.createElement(GenericSkeleton, { sx: { mb: 2 } })) },
36
- React.createElement(InlineComposerWidgetSkeleton, null),
37
- Array.from({ length: 5 }).map((e, i) => (React.createElement(FeedObjectSkeleton, { key: i, template: SCFeedObjectTemplateType.DETAIL })))));
34
+ return (_jsxs(Root, Object.assign({ className: classes.root, sidebar: _jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] }) }, { children: [_jsx(InlineComposerWidgetSkeleton, {}), Array.from({ length: 5 }).map((e, i) => (_jsx(FeedObjectSkeleton, { template: SCFeedObjectTemplateType.DETAIL }, i)))] })));
38
35
  }
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useRef } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
2
3
  import { styled } from '@mui/material/styles';
3
4
  import { Endpoints } from '@selfcommunity/api-services';
4
5
  import { useSCFetchUser, useSCUser } from '@selfcommunity/react-core';
@@ -81,7 +82,7 @@ export default function UserFeed(inProps) {
81
82
  const feedRef = useRef();
82
83
  // HANDLERS
83
84
  const handleComposerSuccess = (feedObject) => {
84
- enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
85
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.inlineComposerWidget.success", defaultMessage: "ui.inlineComposerWidget.success" }), {
85
86
  variant: 'success',
86
87
  autoHideDuration: 3000
87
88
  });
@@ -99,13 +100,13 @@ export default function UserFeed(inProps) {
99
100
  return Object.assign(Object.assign({}, w), { componentProps: Object.assign(Object.assign({}, w.componentProps), { userId: scUser ? scUser.id : userId }) });
100
101
  }), [scUser, widgets]);
101
102
  if (scUser === null) {
102
- return React.createElement(UserFeedSkeleton, null);
103
+ return _jsx(UserFeedSkeleton, {});
103
104
  }
104
- return (React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Object.assign(Object.assign({}, Endpoints.UserFeed), { url: () => Endpoints.UserFeed.url({ id: scUser.id }) }), widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
105
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className), ref: feedRef, endpoint: Object.assign(Object.assign({}, Endpoints.UserFeed), { url: () => Endpoints.UserFeed.url({ id: scUser.id }) }), widgets: _widgets, ItemComponent: FeedObject, itemPropsGenerator: (scUser, item) => ({
105
106
  feedObject: item[item.type],
106
107
  feedObjectType: item.type,
107
108
  feedObjectActivities: item.activities ? item.activities : null
108
109
  }), itemIdGenerator: (item) => item[item.type].id, ItemProps: FeedObjectProps, ItemSkeleton: FeedObjectSkeleton, ItemSkeletonProps: {
109
110
  template: SCFeedObjectTemplateType.PREVIEW
110
- } }, (scUserContext.user ? { HeaderComponent: React.createElement(InlineComposerWidget, { onSuccess: handleComposerSuccess }) } : {}), { FeedSidebarProps: FeedSidebarProps }, FeedProps)));
111
+ } }, (scUserContext.user ? { HeaderComponent: _jsx(InlineComposerWidget, { onSuccess: handleComposerSuccess }) } : {}), { FeedSidebarProps: FeedSidebarProps }, FeedProps)));
111
112
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import { UserProfileHeaderSkeleton } from '@selfcommunity/react-ui';
@@ -32,7 +32,5 @@ const Root = styled(Box, {
32
32
  *
33
33
  */
34
34
  export default function UserProfileSkeleton() {
35
- return (React.createElement(Root, { className: classes.root },
36
- React.createElement(UserProfileHeaderSkeleton, null),
37
- React.createElement(UserFeedSkeleton, null)));
35
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(UserProfileHeaderSkeleton, {}), _jsx(UserFeedSkeleton, {})] })));
38
36
  }