@selfcommunity/react-ui 1.1.0-alpha.1 → 1.2.0-alpha.0
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/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -1
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +2 -2
- package/lib/cjs/components/Course/Course.js +2 -2
- package/lib/cjs/components/Event/Event.js +3 -3
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +1 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +2 -2
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +1 -1
- package/lib/cjs/components/Group/Group.js +1 -1
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +2 -2
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +1 -1
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +2 -2
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +1 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +4 -4
- package/lib/cjs/shared/AutoPlayer/index.js +7 -2
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -1
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +2 -2
- package/lib/esm/components/Course/Course.js +2 -2
- package/lib/esm/components/Event/Event.js +3 -3
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +1 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -2
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +1 -1
- package/lib/esm/components/Group/Group.js +1 -1
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +2 -2
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +1 -1
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +2 -2
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +1 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +4 -4
- package/lib/esm/shared/AutoPlayer/index.js +7 -2
- package/lib/umd/484.js +1 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +8 -8
|
@@ -52,7 +52,7 @@ export default function IncubatorSubscribeButton(inProps) {
|
|
|
52
52
|
const scSubscribedIncubatorsManager = scUserContext.managers.incubators;
|
|
53
53
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
54
54
|
// STATE
|
|
55
|
-
const { scIncubator
|
|
55
|
+
const { scIncubator } = useSCFetchIncubator({
|
|
56
56
|
id: incubatorId,
|
|
57
57
|
incubator,
|
|
58
58
|
cacheStrategy: authUserId ? CacheStrategies.CACHE_FIRST : CacheStrategies.STALE_WHILE_REVALIDATE
|
|
@@ -85,5 +85,5 @@ export default function IncubatorSubscribeButton(inProps) {
|
|
|
85
85
|
subscribe();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
return (_jsx(Root, Object.assign({ size: "small", variant:
|
|
88
|
+
return (_jsx(Root, Object.assign({ size: "small", variant: "contained", onClick: handleSubscribeAction, loading: scUserContext.user ? subscribed === null || scSubscribedIncubatorsManager.isLoading(scIncubator) : null, className: classNames(classes.root, className) }, rest, { children: subscribed && scUserContext.user ? (_jsx(FormattedMessage, { defaultMessage: "ui.incubator.subscribeButton.button.subscribed", id: "ui.incubator.subscribeButton.button.subscribed" })) : (_jsx(FormattedMessage, { defaultMessage: "ui.incubator.subscribeButton.button.subscribe", id: "ui.incubator.subscribeButton.button.subscribe" })) })));
|
|
89
89
|
}
|
|
@@ -109,5 +109,5 @@ export default function LoyaltyProgramWidget(inProps) {
|
|
|
109
109
|
if (loading) {
|
|
110
110
|
return _jsx(Skeleton, {});
|
|
111
111
|
}
|
|
112
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(CardContent, { children: _jsx(Typography, Object.assign({ className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }) })) }), _jsxs(CardActions, Object.assign({ className: classes.actions }, { children: [_jsxs(Typography, Object.assign({ className: classes.points }, { children: [_jsx(Chip, { size: "medium", component: "span", label: points }), _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.points", defaultMessage: "ui.loyaltyProgramWidget.points" })] })), _jsx(Button, Object.assign({ size: "small", variant: "
|
|
112
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(CardContent, { children: _jsx(Typography, Object.assign({ variant: "h5", className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.title", defaultMessage: "ui.loyaltyProgramWidget.title" }) })) }), _jsxs(CardActions, Object.assign({ className: classes.actions }, { children: [_jsxs(Typography, Object.assign({ className: classes.points }, { children: [_jsx(Chip, { size: "medium", component: "span", label: points }), _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.points", defaultMessage: "ui.loyaltyProgramWidget.points" })] })), _jsx(Button, Object.assign({ size: "small", variant: "contained", className: classes.discoverMore, component: Link, to: scRoutingContext.url(SCRoutes.LOYALTY_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.loyaltyProgramWidget.discover", defaultMessage: "ui.loyaltyProgramWidget.discover" }) }))] }))] })));
|
|
113
113
|
}
|
|
@@ -315,7 +315,7 @@ const OnBoardingWidget = (inProps) => {
|
|
|
315
315
|
input: {
|
|
316
316
|
'aria-labelledby': `${step.step}`
|
|
317
317
|
}
|
|
318
|
-
}, size: "small" }) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: `ui.onBoardingWidget.${step.step}`, defaultMessage: `ui.onBoardingWidget.${step.step}` }) })] }))) }, step.id))) })), _jsxs(Box, Object.assign({ className: classes.stepContent }, { children: [_jsx(Fade, Object.assign({ in: true, timeout: 2400 }, { children: _jsx(Box, { children: getStepContent() }) })), showNoCategoriesModal && (_jsx(BaseDialog, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories", defaultMessage: "ui.onBoardingWidget.ai.no.categories" }), DialogContentProps: { dividers: false }, open: showNoCategoriesModal, onClose: () => setShowNoCategoriesModal(false), actions: _jsx(Button, Object.assign({ color: "secondary", onClick: () => setShowNoCategoriesModal(false) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories.cancel", defaultMessage: "ui.onBoardingWidget.ai.no.categories.cancel" }) })) }, { children: _jsx(Button, Object.assign({ color: "primary", onClick: handleCategoriesClick, startIcon: _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "edit" })) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories.link", defaultMessage: "ui.onBoardingWidget.ai.no.categories.link" }) })) }))), showCategoriesWarningModal && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.title", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.title" }), DialogContentProps: { dividers: false }, open: showCategoriesWarningModal, onClose: () => setShowWarningCategoriesModal(false), actions: _jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ size: "small", variant: "
|
|
318
|
+
}, size: "small" }) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: `ui.onBoardingWidget.${step.step}`, defaultMessage: `ui.onBoardingWidget.${step.step}` }) })] }))) }, step.id))) })), _jsxs(Box, Object.assign({ className: classes.stepContent }, { children: [_jsx(Fade, Object.assign({ in: true, timeout: 2400 }, { children: _jsx(Box, { children: getStepContent() }) })), showNoCategoriesModal && (_jsx(BaseDialog, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories", defaultMessage: "ui.onBoardingWidget.ai.no.categories" }), DialogContentProps: { dividers: false }, open: showNoCategoriesModal, onClose: () => setShowNoCategoriesModal(false), actions: _jsx(Button, Object.assign({ color: "secondary", onClick: () => setShowNoCategoriesModal(false) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories.cancel", defaultMessage: "ui.onBoardingWidget.ai.no.categories.cancel" }) })) }, { children: _jsx(Button, Object.assign({ color: "primary", onClick: handleCategoriesClick, startIcon: _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "edit" })) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.no.categories.link", defaultMessage: "ui.onBoardingWidget.ai.no.categories.link" }) })) }))), showCategoriesWarningModal && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.title", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.title" }), DialogContentProps: { dividers: false }, open: showCategoriesWarningModal, onClose: () => setShowWarningCategoriesModal(false), actions: _jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ size: "small", variant: "contained", color: "primary", onClick: () => setShowWarningCategoriesModal(false) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.button.close", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.button.close" }) })), _jsx(Button, Object.assign({ size: "small", variant: "contained", color: "secondary", onClick: () => startStep(SCOnBoardingStepIdType.CATEGORIES), endIcon: _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "magic_wand" })) }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.button.generate", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.button.generate" }) }))] }) }, { children: _jsxs(Typography, Object.assign({ className: classes.dialogContent }, { children: [_jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.info", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.info" }), _jsx(FormattedMessage, { id: "ui.onBoardingWidget.ai.categories.warning.confirm", defaultMessage: "ui.onBoardingWidget.ai.categories.warning.confirm", values: {
|
|
319
319
|
b: (chunks) => _jsx("b", { children: chunks }, "ui.onBoardingWidget.ai.categories.warning.confirm.b")
|
|
320
320
|
} })] })) })))] }))] })) })) })] })) })));
|
|
321
321
|
};
|
|
@@ -193,7 +193,7 @@ export default function PlatformWidget(inProps) {
|
|
|
193
193
|
...((isAdmin || isEditor) && !hideConsoleAction
|
|
194
194
|
? [
|
|
195
195
|
{
|
|
196
|
-
render: (_jsx(Button, Object.assign({ variant: "
|
|
196
|
+
render: (_jsx(Button, Object.assign({ variant: "contained", size: "small", onClick: () => fetchPlatform('') }, { children: _jsx(FormattedMessage, { id: "ui.platformWidget.adm", defaultMessage: "ui.platformWidget.adm" }) }))),
|
|
197
197
|
title: _jsx(FormattedMessage, { id: "ui.platformWidget.adm", defaultMessage: "ui.platformWidget.adm" }),
|
|
198
198
|
content: _jsx(FormattedMessage, { id: "ui.platformWidget.adm.desc", defaultMessage: "ui.platformWidget.adm.desc" })
|
|
199
199
|
}
|
|
@@ -202,7 +202,7 @@ export default function PlatformWidget(inProps) {
|
|
|
202
202
|
...((isAdmin || isModerator) && !hideModerationAction
|
|
203
203
|
? [
|
|
204
204
|
{
|
|
205
|
-
render: (_jsx(Button, Object.assign({ variant: "
|
|
205
|
+
render: (_jsx(Button, Object.assign({ variant: "contained", size: "small", onClick: () => fetchPlatform('/moderation/flags/') }, { children: _jsx(FormattedMessage, { id: "ui.platformWidget.mod", defaultMessage: "ui.platformWidget.mod" }) }))),
|
|
206
206
|
title: _jsx(FormattedMessage, { id: "ui.platformWidget.mod", defaultMessage: "ui.platformWidget.mod" }),
|
|
207
207
|
content: _jsx(FormattedMessage, { id: "ui.platformWidget.mod.desc", defaultMessage: "ui.platformWidget.mod.desc" })
|
|
208
208
|
}
|
|
@@ -211,7 +211,7 @@ export default function PlatformWidget(inProps) {
|
|
|
211
211
|
...(isAdmin && isCommunityOwner && !hideHubAction
|
|
212
212
|
? [
|
|
213
213
|
{
|
|
214
|
-
render: (_jsx(Button, Object.assign({ variant: "
|
|
214
|
+
render: (_jsx(Button, Object.assign({ variant: "contained", size: "small", component: Link, to: isStage ? HUB_STAGE : HUB_PROD, target: "_blank" }, { children: _jsx(FormattedMessage, { id: "ui.platformWidget.hub", defaultMessage: "ui.platformWidget.hub" }) }))),
|
|
215
215
|
title: _jsx(FormattedMessage, { id: "ui.platformWidget.hub", defaultMessage: "ui.platformWidget.hub" }),
|
|
216
216
|
content: _jsx(FormattedMessage, { id: "ui.platformWidget.hub.desc", defaultMessage: "ui.platformWidget.hub.desc" })
|
|
217
217
|
}
|
|
@@ -220,7 +220,7 @@ export default function PlatformWidget(inProps) {
|
|
|
220
220
|
...(isCommunityOwner && !hideContactUsAction
|
|
221
221
|
? [
|
|
222
222
|
{
|
|
223
|
-
render: (_jsx(Button, Object.assign({ variant: "
|
|
223
|
+
render: (_jsx(Button, Object.assign({ variant: "contained", size: "small", component: Link, to: isStage ? CONTACT_STAGE : CONTACT_PROD, target: "_blank" }, { children: _jsx(FormattedMessage, { id: "ui.platformWidget.contactUs", defaultMessage: "ui.platformWidget.contactUs" }) }))),
|
|
224
224
|
title: _jsx(FormattedMessage, { id: "ui.platformWidget.contactUs", defaultMessage: "ui.platformWidget.contactUs" }),
|
|
225
225
|
content: _jsx(FormattedMessage, { id: "ui.platformWidget.contactUs.desc", defaultMessage: "ui.platformWidget.contactUs.desc" })
|
|
226
226
|
}
|
|
@@ -11,7 +11,12 @@ const Root = styled(Waypoint, {
|
|
|
11
11
|
name: PREFIX,
|
|
12
12
|
slot: 'Root',
|
|
13
13
|
overridesResolver: (_props, styles) => styles.root
|
|
14
|
-
})(() => ({
|
|
14
|
+
})(({ theme }) => ({
|
|
15
|
+
'& .react-player__preview': {
|
|
16
|
+
backgroundSize: 'contain !important',
|
|
17
|
+
backgroundColor: theme.palette.common.black
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
15
20
|
export default function AutoPlayer(props) {
|
|
16
21
|
// PROPS
|
|
17
22
|
const { loop = false, muted = true, playsinline = true, controls = true, stopOnUnmount = true, pip = true, onVideoWatch } = props, rest = __rest(props, ["loop", "muted", "playsinline", "controls", "stopOnUnmount", "pip", "onVideoWatch"]);
|
|
@@ -46,7 +51,7 @@ export default function AutoPlayer(props) {
|
|
|
46
51
|
/**
|
|
47
52
|
* Renders root object
|
|
48
53
|
*/
|
|
49
|
-
return (_jsx(Root, Object.assign({ scrollableAncestor: window, onEnter: handleEnterViewport, onLeave: handleExitViewport }, { children: _jsx("div", { children: _jsx(ReactPlayer, Object.assign({ loop: loop, controls: controls, stopOnUnmount: stopOnUnmount, pip: pip, playing: shouldPlay, muted: muted, onProgress: (progress) => {
|
|
54
|
+
return (_jsx(Root, Object.assign({ scrollableAncestor: window, onEnter: handleEnterViewport, onLeave: handleExitViewport }, { children: _jsx("div", { children: _jsx(ReactPlayer, Object.assign({ light: !enableAutoplay, loop: loop, controls: controls, stopOnUnmount: stopOnUnmount, pip: pip, playing: shouldPlay, muted: muted, onProgress: (progress) => {
|
|
50
55
|
const playedSeconds = progress.playedSeconds;
|
|
51
56
|
if (played === 0) {
|
|
52
57
|
setStartPlay(playedSeconds);
|