@selfcommunity/react-templates 0.4.0-embeds.17 → 0.4.0-livestream.23
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/EventFeed/EventFeed.js +8 -1
- package/lib/cjs/components/Group/Group.d.ts +6 -1
- package/lib/cjs/components/Group/Group.js +2 -2
- package/lib/esm/components/EventFeed/EventFeed.js +9 -2
- package/lib/esm/components/Group/Group.d.ts +6 -1
- package/lib/esm/components/Group/Group.js +2 -2
- package/lib/umd/694.js +2 -0
- package/lib/umd/react-templates.js +1 -1
- package/lib/umd/react-templates.js.LICENSE.txt +2 -0
- package/package.json +128 -123
- package/lib/umd/341.js +0 -2
- /package/lib/umd/{341.js.LICENSE.txt → 694.js.LICENSE.txt} +0 -0
|
@@ -40,10 +40,17 @@ const WIDGETS = [
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
type: 'widget',
|
|
43
|
-
component: react_ui_1.
|
|
43
|
+
component: react_ui_1.EventMediaWidget,
|
|
44
44
|
componentProps: {},
|
|
45
45
|
column: 'right',
|
|
46
46
|
position: 2
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'widget',
|
|
50
|
+
component: react_ui_1.RelatedEventsWidget,
|
|
51
|
+
componentProps: {},
|
|
52
|
+
column: 'right',
|
|
53
|
+
position: 3
|
|
47
54
|
}
|
|
48
55
|
];
|
|
49
56
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
1
|
+
import { FeedObjectProps, FeedSidebarProps, GroupHeaderProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
2
2
|
import { SCGroupType } from '@selfcommunity/types';
|
|
3
3
|
import { GroupFeedProps } from '../GroupFeed';
|
|
4
4
|
export interface GroupProps {
|
|
@@ -42,6 +42,11 @@ export interface GroupProps {
|
|
|
42
42
|
* @default {}
|
|
43
43
|
*/
|
|
44
44
|
GroupFeedProps?: GroupFeedProps;
|
|
45
|
+
/**
|
|
46
|
+
* Props to spread Group Header component
|
|
47
|
+
* @default {}
|
|
48
|
+
*/
|
|
49
|
+
GroupHeaderProps?: GroupHeaderProps;
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
47
52
|
* > API documentation for the Community-JS Category Template. Learn about the available props and the CSS API.
|
|
@@ -51,7 +51,7 @@ function Group(inProps) {
|
|
|
51
51
|
props: inProps,
|
|
52
52
|
name: constants_1.PREFIX
|
|
53
53
|
});
|
|
54
|
-
const { id = 'group', className, group, groupId, widgets, FeedObjectProps, FeedSidebarProps, GroupFeedProps = {} } = props;
|
|
54
|
+
const { id = 'group', className, group, groupId, widgets, FeedObjectProps, FeedSidebarProps, GroupFeedProps = {}, GroupHeaderProps = {} } = props;
|
|
55
55
|
// HOOKS
|
|
56
56
|
const { scGroup, setSCGroup } = (0, react_core_1.useSCFetchGroup)({ id: groupId, group });
|
|
57
57
|
const handleSubscribe = (group, status) => {
|
|
@@ -60,6 +60,6 @@ function Group(inProps) {
|
|
|
60
60
|
if (!scGroup) {
|
|
61
61
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
62
62
|
}
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.GroupHeader, { groupId: scGroup.id, GroupSubscribeButtonProps: { onSubscribe: handleSubscribe } }), (0, jsx_runtime_1.jsx)(GroupFeed_1.default, Object.assign({ className: classes.feed, group: scGroup, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, GroupFeedProps))] })));
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.GroupHeader, Object.assign({ groupId: scGroup.id, GroupSubscribeButtonProps: { onSubscribe: handleSubscribe } }, GroupHeaderProps)), (0, jsx_runtime_1.jsx)(GroupFeed_1.default, Object.assign({ className: classes.feed, group: scGroup, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, GroupFeedProps))] })));
|
|
64
64
|
}
|
|
65
65
|
exports.default = Group;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useRef } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
-
import { ContributionUtils, EventInfoWidget, EventLocationWidget, EventMembersWidget, Feed, FeedObject, FeedObjectSkeleton, InlineComposerWidget, RelatedEventsWidget, SCFeedObjectTemplateType } from '@selfcommunity/react-ui';
|
|
4
|
+
import { ContributionUtils, EventInfoWidget, EventLocationWidget, EventMediaWidget, EventMembersWidget, Feed, FeedObject, FeedObjectSkeleton, InlineComposerWidget, RelatedEventsWidget, SCFeedObjectTemplateType } from '@selfcommunity/react-ui';
|
|
5
5
|
import { Endpoints } from '@selfcommunity/api-services';
|
|
6
6
|
import { Link, SCRoutes, useSCFetchEvent, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
7
7
|
import { SCCustomAdvPosition, SCEventPrivacyType, SCEventSubscriptionStatusType, SCFeedTypologyType } from '@selfcommunity/types';
|
|
@@ -37,10 +37,17 @@ const WIDGETS = [
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
type: 'widget',
|
|
40
|
-
component:
|
|
40
|
+
component: EventMediaWidget,
|
|
41
41
|
componentProps: {},
|
|
42
42
|
column: 'right',
|
|
43
43
|
position: 2
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'widget',
|
|
47
|
+
component: RelatedEventsWidget,
|
|
48
|
+
componentProps: {},
|
|
49
|
+
column: 'right',
|
|
50
|
+
position: 3
|
|
44
51
|
}
|
|
45
52
|
];
|
|
46
53
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
1
|
+
import { FeedObjectProps, FeedSidebarProps, GroupHeaderProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
2
2
|
import { SCGroupType } from '@selfcommunity/types';
|
|
3
3
|
import { GroupFeedProps } from '../GroupFeed';
|
|
4
4
|
export interface GroupProps {
|
|
@@ -42,6 +42,11 @@ export interface GroupProps {
|
|
|
42
42
|
* @default {}
|
|
43
43
|
*/
|
|
44
44
|
GroupFeedProps?: GroupFeedProps;
|
|
45
|
+
/**
|
|
46
|
+
* Props to spread Group Header component
|
|
47
|
+
* @default {}
|
|
48
|
+
*/
|
|
49
|
+
GroupHeaderProps?: GroupHeaderProps;
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
47
52
|
* > API documentation for the Community-JS Category Template. Learn about the available props and the CSS API.
|
|
@@ -48,7 +48,7 @@ export default function Group(inProps) {
|
|
|
48
48
|
props: inProps,
|
|
49
49
|
name: PREFIX
|
|
50
50
|
});
|
|
51
|
-
const { id = 'group', className, group, groupId, widgets, FeedObjectProps, FeedSidebarProps, GroupFeedProps = {} } = props;
|
|
51
|
+
const { id = 'group', className, group, groupId, widgets, FeedObjectProps, FeedSidebarProps, GroupFeedProps = {}, GroupHeaderProps = {} } = props;
|
|
52
52
|
// HOOKS
|
|
53
53
|
const { scGroup, setSCGroup } = useSCFetchGroup({ id: groupId, group });
|
|
54
54
|
const handleSubscribe = (group, status) => {
|
|
@@ -57,5 +57,5 @@ export default function Group(inProps) {
|
|
|
57
57
|
if (!scGroup) {
|
|
58
58
|
return _jsx(GroupSkeletonTemplate, {});
|
|
59
59
|
}
|
|
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))] })));
|
|
60
|
+
return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(GroupHeader, Object.assign({ groupId: scGroup.id, GroupSubscribeButtonProps: { onSubscribe: handleSubscribe } }, GroupHeaderProps)), _jsx(GroupFeed, Object.assign({ className: classes.feed, group: scGroup, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, GroupFeedProps))] })));
|
|
61
61
|
}
|