@selfcommunity/react-ui 0.11.0-mui7.17 → 0.11.0-mui7.19
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 -2
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +4 -9
- package/lib/cjs/components/AccountDelete/AccountDelete.js +2 -9
- package/lib/cjs/components/BuyButton/BuyButton.js +1 -2
- package/lib/cjs/components/Categories/Categories.js +1 -1
- package/lib/cjs/components/Categories/Skeleton.js +1 -1
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
- package/lib/cjs/components/Checkout/Skeleton.js +1 -1
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +1 -2
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +1 -1
- package/lib/cjs/components/Composer/Composer.js +1 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +4 -4
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +5 -5
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/cjs/components/CourseForm/CourseForm.js +1 -2
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
- package/lib/cjs/components/Courses/Courses.js +3 -3
- package/lib/cjs/components/Courses/Skeleton.js +1 -1
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +1 -2
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
- package/lib/cjs/components/EditCourse/Options.js +1 -2
- package/lib/cjs/components/EventForm/EventForm.js +5 -6
- package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +1 -2
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +1 -2
- package/lib/cjs/components/Events/Events.js +4 -4
- package/lib/cjs/components/Events/Skeleton.js +1 -1
- package/lib/cjs/components/Feed/Feed.js +1 -1
- package/lib/cjs/components/Feed/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
- package/lib/cjs/components/GroupForm/GroupForm.js +1 -2
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +1 -2
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
- package/lib/cjs/components/Groups/Groups.js +2 -2
- package/lib/cjs/components/Groups/Skeleton.js +1 -1
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -3
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
- package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +3 -3
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +1 -2
- package/lib/cjs/components/Notification/Course/Course.js +1 -6
- package/lib/cjs/components/Notification/Event/Event.js +3 -8
- package/lib/cjs/components/Notification/Group/Group.js +1 -2
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +1 -6
- package/lib/cjs/components/Notification/Notification.js +13 -5
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +1 -2
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +3 -4
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +5 -6
- package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -1
- package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -2
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +2 -4
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +8 -9
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -2
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +4 -5
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +1 -2
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +2 -3
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/cjs/shared/Media/File/DisplayComponent.js +2 -2
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +5 -10
- package/lib/esm/components/AccountDelete/AccountDelete.js +3 -10
- package/lib/esm/components/BuyButton/BuyButton.js +2 -3
- package/lib/esm/components/Categories/Categories.js +1 -1
- package/lib/esm/components/Categories/Skeleton.js +1 -1
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
- package/lib/esm/components/Checkout/Skeleton.js +1 -1
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +1 -1
- package/lib/esm/components/Composer/Composer.js +2 -3
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +4 -4
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
- package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/esm/components/CourseForm/CourseForm.js +2 -3
- package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
- package/lib/esm/components/Courses/Courses.js +3 -3
- package/lib/esm/components/Courses/Skeleton.js +1 -1
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +1 -2
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
- package/lib/esm/components/EditCourse/Options.js +2 -3
- package/lib/esm/components/EventForm/EventForm.js +6 -7
- package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +1 -2
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +1 -2
- package/lib/esm/components/Events/Events.js +4 -4
- package/lib/esm/components/Events/Skeleton.js +1 -1
- package/lib/esm/components/Feed/Feed.js +1 -1
- package/lib/esm/components/Feed/Skeleton.js +1 -1
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
- package/lib/esm/components/GroupForm/GroupForm.js +2 -3
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +1 -2
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
- package/lib/esm/components/Groups/Groups.js +2 -2
- package/lib/esm/components/Groups/Skeleton.js +1 -1
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
- package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +3 -3
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +2 -3
- package/lib/esm/components/Notification/Course/Course.js +2 -7
- package/lib/esm/components/Notification/Event/Event.js +4 -9
- package/lib/esm/components/Notification/Group/Group.js +2 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +2 -7
- package/lib/esm/components/Notification/Notification.js +14 -6
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +2 -3
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +3 -4
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +5 -6
- package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/esm/components/Paywalls/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -1
- package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -2
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +2 -4
- package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +8 -9
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -2
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +5 -6
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
- package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/esm/components/VoteButton/VoteButton.js +3 -4
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +1 -2
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +3 -4
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/esm/shared/Media/File/DisplayComponent.js +2 -2
- package/lib/esm/shared/ScrollContainer/index.js +1 -1
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/umd/484.js +2 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +15 -15
- package/lib/umd/54.js +0 -2
- /package/lib/umd/{54.js.LICENSE.txt → 484.js.LICENSE.txt} +0 -0
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const system_1 = require("@mui/system");
|
|
8
7
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -18,7 +17,7 @@ const PREFIX = 'SCAcceptRequestUserEventButton';
|
|
|
18
17
|
const classes = {
|
|
19
18
|
root: `${PREFIX}-root`
|
|
20
19
|
};
|
|
21
|
-
const AcceptButton = (0, material_1.styled)(
|
|
20
|
+
const AcceptButton = (0, material_1.styled)(material_1.Button, {
|
|
22
21
|
name: PREFIX,
|
|
23
22
|
slot: 'Root',
|
|
24
23
|
overridesResolver: (_props, styles) => styles.root
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const system_1 = require("@mui/system");
|
|
8
7
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -20,7 +19,7 @@ const PREFIX = 'SCAcceptRequestUserEventButton';
|
|
|
20
19
|
const classes = {
|
|
21
20
|
root: `${PREFIX}-root`
|
|
22
21
|
};
|
|
23
|
-
const AcceptButton = (0, material_1.styled)(
|
|
22
|
+
const AcceptButton = (0, material_1.styled)(material_1.Button, {
|
|
24
23
|
name: PREFIX,
|
|
25
24
|
slot: 'Root',
|
|
26
25
|
overridesResolver: (_props, styles) => styles.root
|
|
@@ -6,7 +6,6 @@ const react_1 = require("react");
|
|
|
6
6
|
const system_1 = require("@mui/system");
|
|
7
7
|
const material_1 = require("@mui/material");
|
|
8
8
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
9
|
-
const lab_1 = require("@mui/lab");
|
|
10
9
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
11
10
|
const utils_1 = require("@selfcommunity/utils");
|
|
12
11
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
@@ -23,8 +22,8 @@ const classes = {
|
|
|
23
22
|
const Root = (0, material_1.styled)(material_1.Box, {
|
|
24
23
|
name: PREFIX,
|
|
25
24
|
slot: 'Root',
|
|
26
|
-
overridesResolver: (
|
|
27
|
-
})((
|
|
25
|
+
overridesResolver: (_props, styles) => styles.root
|
|
26
|
+
})(() => ({}));
|
|
28
27
|
/**
|
|
29
28
|
* > API documentation for the Community-JS AccountDataPortability component. Learn about the available props and the CSS API.
|
|
30
29
|
*
|
|
@@ -152,16 +151,12 @@ function AccountDataPortability(inProps) {
|
|
|
152
151
|
* Renders root object
|
|
153
152
|
*/
|
|
154
153
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.title", defaultMessage: "ui.accountDataPortability.title", values: { username: (0, utils_1.capitalize)(scUserContext.user.username) } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", component: "div" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.info", defaultMessage: "ui.accountDataPortability.info", values: {
|
|
155
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
156
|
-
// @ts-ignore
|
|
157
154
|
li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }),
|
|
158
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
159
|
-
// @ts-ignore
|
|
160
155
|
ul: (chunks) => (0, jsx_runtime_1.jsx)("ul", { children: chunks })
|
|
161
|
-
} }) })), (0, jsx_runtime_1.jsx)(
|
|
156
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", loading: (dataPortability && dataPortability.computing) || loading, disabled: !dataPortability ||
|
|
162
157
|
(dataPortability &&
|
|
163
158
|
(dataPortability.computing ||
|
|
164
|
-
(dataPortability.requested_at && (0, date_fns_1.differenceInHours)(new Date(), (0, date_fns_1.parseISO)(dataPortability.requested_at.toString())) < 24))), loadingPosition: "start", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "folder_open" }), variant: "outlined", className: classes.createButton, onClick: handleCreateDataPortabilityFile }, { children: (dataPortability && dataPortability.computing) || loading ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.createLoadingButton", defaultMessage: "ui.accountDataPortability.createLoadingButton" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.createButton", defaultMessage: "ui.accountDataPortability.createButton" })) })), dataPortability && !dataPortability.computing && dataPortability.generated_at && ((0, jsx_runtime_1.jsx)(
|
|
159
|
+
(dataPortability.requested_at && (0, date_fns_1.differenceInHours)(new Date(), (0, date_fns_1.parseISO)(dataPortability.requested_at.toString())) < 24))), loadingPosition: "start", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "folder_open" }), variant: "outlined", className: classes.createButton, onClick: handleCreateDataPortabilityFile }, { children: (dataPortability && dataPortability.computing) || loading ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.createLoadingButton", defaultMessage: "ui.accountDataPortability.createLoadingButton" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.createButton", defaultMessage: "ui.accountDataPortability.createButton" })) })), dataPortability && !dataPortability.computing && dataPortability.generated_at && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", loading: downloadingDataPortability, loadingPosition: "start", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "cloud_download_outlined" }), variant: "outlined", className: classes.downloadButton, onClick: handleDownloadDataPortabilityFile }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.downloadButton", defaultMessage: "ui.accountDataPortability.downloadButton" }) }))), (0, jsx_runtime_1.jsx)("br", {}), dataPortability && !dataPortability.computing && dataPortability.generated_at && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.generationInfo, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDataPortability.generatedInfo", defaultMessage: "ui.accountDataPortability.generatedInfo", values: {
|
|
165
160
|
date: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedDate, { value: dataPortability.requested_at, day: "numeric", month: "long", year: "numeric" }),
|
|
166
161
|
time: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedTime, { value: dataPortability.requested_at })
|
|
167
162
|
} }) })))] })));
|
|
@@ -11,7 +11,6 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
11
11
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
12
12
|
const Errors_1 = require("../../constants/Errors");
|
|
13
13
|
const react_intl_1 = require("react-intl");
|
|
14
|
-
const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
|
|
15
14
|
const PREFIX = 'SCAccountDelete';
|
|
16
15
|
const classes = {
|
|
17
16
|
root: `${PREFIX}-root`,
|
|
@@ -22,7 +21,7 @@ const classes = {
|
|
|
22
21
|
const Root = (0, material_1.styled)(material_1.Box, {
|
|
23
22
|
name: PREFIX,
|
|
24
23
|
slot: 'Root',
|
|
25
|
-
overridesResolver: (
|
|
24
|
+
overridesResolver: (_props, styles) => styles.root
|
|
26
25
|
})(() => ({}));
|
|
27
26
|
/**
|
|
28
27
|
* > API documentation for the Community-JS AccountDelete component. Learn about the available props and the CSS API.
|
|
@@ -111,17 +110,11 @@ function AccountDelete(inProps) {
|
|
|
111
110
|
*/
|
|
112
111
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.message, component: material_1.Box }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDelete.message", defaultMessage: "ui.accountDelete.message", values: {
|
|
113
112
|
communityName,
|
|
114
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
115
|
-
// @ts-ignore
|
|
116
113
|
li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }),
|
|
117
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
118
|
-
// @ts-ignore
|
|
119
114
|
ul: (chunks) => (0, jsx_runtime_1.jsx)("ul", { children: chunks })
|
|
120
115
|
} }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.confirm, component: material_1.Box }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDelete.confirmMessage", defaultMessage: "ui.accountDelete.confirmMessage", values: {
|
|
121
116
|
username: scUserContext.user.username,
|
|
122
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
123
|
-
// @ts-ignore
|
|
124
117
|
b: (chunks) => (0, jsx_runtime_1.jsx)("b", { children: chunks })
|
|
125
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.TextField, { name: "confirm", value: confirm, onChange: handleChange, autoComplete: "off", size: "small" })] })), error && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "error" }, { children: error })), (0, jsx_runtime_1.jsx)(
|
|
118
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.TextField, { name: "confirm", value: confirm, onChange: handleChange, autoComplete: "off", size: "small" })] })), error && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "error" }, { children: error })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, size: "small", disabled: isDeleting || confirm !== scUserContext.user.username, variant: "outlined", onClick: handleDelete }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.accountDelete.buttonLabel", defaultMessage: "ui.accountDelete.buttonLabel" }) }))] })));
|
|
126
119
|
}
|
|
127
120
|
exports.default = AccountDelete;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const system_1 = require("@mui/system");
|
|
8
7
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
@@ -26,7 +25,7 @@ const classes = {
|
|
|
26
25
|
going: `${PREFIX}-going`,
|
|
27
26
|
notGoing: `${PREFIX}-not-going`
|
|
28
27
|
};
|
|
29
|
-
const RequestRoot = (0, material_1.styled)(
|
|
28
|
+
const RequestRoot = (0, material_1.styled)(material_1.Button, {
|
|
30
29
|
name: PREFIX,
|
|
31
30
|
slot: 'RequestRoot'
|
|
32
31
|
})(() => ({}));
|
|
@@ -148,7 +148,7 @@ function Categories(inProps) {
|
|
|
148
148
|
* Renders categories list
|
|
149
149
|
*/
|
|
150
150
|
const filteredCategories = (0, utils_1.sortByAttr)(getFilteredCategories(), 'order');
|
|
151
|
-
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", direction: "row", justifyContent: "center", alignItems: "center", className: classes.filters }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, value: filterName, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.categories.filterByName", defaultMessage: "ui.categories.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading }) }))) }))), loading ? ((0, jsx_runtime_1.jsx)(CategoriesSkeletonComponent, Object.assign({}, CategoriesSkeletonProps))) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.categories }, { children: !filteredCategories.length ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.categories.noResults", defaultMessage: "ui.categories.noResults" }) })) }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: filteredCategories.map((category) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { sm: 6, lg: 4 } }, { children: (0, jsx_runtime_1.jsx)(CategoryComponent, Object.assign({ category: category }, CategoryComponentProps, { showTooltip: true, className: classes.category })) }), category.id))) })) })))] }));
|
|
151
|
+
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", direction: "row", justifyContent: "center", alignItems: "center", className: classes.filters }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, value: filterName, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.categories.filterByName", defaultMessage: "ui.categories.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading }) }))) }))), loading ? ((0, jsx_runtime_1.jsx)(CategoriesSkeletonComponent, Object.assign({}, CategoriesSkeletonProps))) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.categories }, { children: !filteredCategories.length ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.categories.noResults", defaultMessage: "ui.categories.noResults" }) })) }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: filteredCategories.map((category) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: 6, lg: 4 } }, { children: (0, jsx_runtime_1.jsx)(CategoryComponent, Object.assign({ category: category }, CategoryComponentProps, { showTooltip: true, className: classes.category })) }), category.id))) })) })))] }));
|
|
152
152
|
/**
|
|
153
153
|
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
154
154
|
*/
|
|
@@ -37,6 +37,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
37
37
|
*/
|
|
38
38
|
function CategoriesSkeleton(inProps) {
|
|
39
39
|
const { className, CategorySkeletonProps = {} } = inProps, rest = tslib_1.__rest(inProps, ["className", "CategorySkeletonProps"]);
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.categories }, { children: [...Array(15)].map((_category, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { sm: 6, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, CategorySkeletonProps)) }), index))) })) })));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.categories }, { children: [...Array(15)].map((_category, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: 6, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, CategorySkeletonProps)) }), index))) })) })));
|
|
41
41
|
}
|
|
42
42
|
exports.default = CategoriesSkeleton;
|
|
@@ -8,7 +8,6 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
8
8
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
9
|
const types_1 = require("@selfcommunity/types");
|
|
10
10
|
const Errors_1 = require("../../constants/Errors");
|
|
11
|
-
const lab_1 = require("@mui/lab");
|
|
12
11
|
const react_intl_1 = require("react-intl");
|
|
13
12
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
13
|
const system_1 = require("@mui/system");
|
|
@@ -17,11 +16,11 @@ const PREFIX = 'SCCategoryFollowButton';
|
|
|
17
16
|
const classes = {
|
|
18
17
|
root: `${PREFIX}-root`
|
|
19
18
|
};
|
|
20
|
-
const Root = (0, material_1.styled)(
|
|
19
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
21
20
|
name: PREFIX,
|
|
22
21
|
slot: 'Root',
|
|
23
|
-
overridesResolver: (
|
|
24
|
-
})((
|
|
22
|
+
overridesResolver: (_props, styles) => styles.root
|
|
23
|
+
})(() => ({}));
|
|
25
24
|
/**
|
|
26
25
|
* > API documentation for the Community-JS Follow Category Button component. Learn about the available props and the CSS API.
|
|
27
26
|
|
|
@@ -9,14 +9,13 @@ const react_intl_1 = require("react-intl");
|
|
|
9
9
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
10
|
const system_1 = require("@mui/system");
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
14
13
|
const Errors_1 = require("../../constants/Errors");
|
|
15
14
|
const utils_1 = require("@selfcommunity/utils");
|
|
16
15
|
const classes = {
|
|
17
16
|
root: `${constants_1.PREFIX}-root`
|
|
18
17
|
};
|
|
19
|
-
const Root = (0, material_1.styled)(
|
|
18
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
20
19
|
name: constants_1.PREFIX,
|
|
21
20
|
slot: 'Root'
|
|
22
21
|
})(() => ({}));
|
|
@@ -12,7 +12,6 @@ const Errors_1 = require("../../constants/Errors");
|
|
|
12
12
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
13
13
|
const utils_1 = require("@selfcommunity/utils");
|
|
14
14
|
const react_intl_1 = require("react-intl");
|
|
15
|
-
const lab_1 = require("@mui/lab");
|
|
16
15
|
const messages = (0, react_intl_1.defineMessages)({
|
|
17
16
|
errorLoadImage: {
|
|
18
17
|
id: 'ui.changeGroupPicture.alert',
|
|
@@ -22,7 +21,7 @@ const messages = (0, react_intl_1.defineMessages)({
|
|
|
22
21
|
const classes = {
|
|
23
22
|
root: `${constants_1.PREFIX}-root`
|
|
24
23
|
};
|
|
25
|
-
const Root = (0, material_1.styled)(
|
|
24
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
26
25
|
name: constants_1.PREFIX,
|
|
27
26
|
slot: 'Root'
|
|
28
27
|
})(() => ({}));
|
|
@@ -80,6 +80,6 @@ const Root = (0, material_1.styled)(material_1.Grid, {
|
|
|
80
80
|
*/
|
|
81
81
|
function CheckoutSkeleton(inProps) {
|
|
82
82
|
const { className = {} } = inProps, rest = tslib_1.__rest(inProps, ["className"]);
|
|
83
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%" }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 6 }, className: (0, classnames_1.default)(classes.left, classes.paper, classes.header) }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150, width:
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%" }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.left, classes.paper, classes.header) }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150, width: "100%" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.right, classes.header) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ sx: { display: { xs: 'none', md: 'flex' } }, direction: "column", spacing: 2, pt: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, width: 190 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 90, width: "100%" })] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.left, classes.paper) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 30, width: 140 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150 }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: { xs: 'none', md: 'block' } } }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 200 })] }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.right }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: { xs: 'none', md: 'block' } } }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 70 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 340 })] }))] })) }))] })));
|
|
84
84
|
}
|
|
85
85
|
exports.default = CheckoutSkeleton;
|
|
@@ -9,7 +9,6 @@ const material_1 = require("@mui/material");
|
|
|
9
9
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
10
10
|
const Editor_1 = tslib_1.__importDefault(require("../Editor"));
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
|
|
14
13
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../shared/UserAvatar"));
|
|
15
14
|
const system_1 = require("@mui/system");
|
|
@@ -133,6 +132,6 @@ function CommentObjectReply(inProps) {
|
|
|
133
132
|
// RENDER
|
|
134
133
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id }, rest, { disableTypography: true, onClick: handleEditorFocus, elevation: elevation, className: (0, classnames_1.default)(classes.root, className), image: showAvatar &&
|
|
135
134
|
(!scUserContext.user ? ((0, jsx_runtime_1.jsx)(material_1.Avatar, { variant: "circular", className: classes.avatar })) : ((0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !scUserContext.user.community_badge }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar, classes: { root: classes.avatar } }) })))), secondary: (0, jsx_runtime_1.jsxs)(Widget_1.default, Object.assign({ className: (0, classnames_1.default)(classes.comment, { [classes.hasValue]: !isEditorEmpty }) }, WidgetProps, { children: [media && media.length > 0 && (0, jsx_runtime_1.jsx)(PreviewComponent_1.default, { value: media, onChange: handleChangeMedias, className: classes.media }), (0, jsx_runtime_1.jsx)(Editor_1.default, Object.assign({ ref: editor, onChange: handleChangeText, defaultValue: html, editable: editable, uploadImage: true, action: replyIcon &&
|
|
136
|
-
onReply && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleReply, className: classes.iconReply, disabled: uploadingMedia }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) }))) }, EditorProps, { MediaPluginProps: { isUploading: setUploadingMedia, onMediaAdd: handleChangeMedia } })), !isEditorEmpty && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 2, className: classes.actions }, { children: [onReply && !replyIcon && ((0, jsx_runtime_1.jsx)(
|
|
135
|
+
onReply && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleReply, className: classes.iconReply, disabled: uploadingMedia }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) }))) }, EditorProps, { MediaPluginProps: { isUploading: setUploadingMedia, onMediaAdd: handleChangeMedia } })), !isEditorEmpty && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 2, className: classes.actions }, { children: [onReply && !replyIcon && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", onClick: handleReply, loading: !editable, className: classes.buttonReply }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.reply", defaultMessage: "ui.commentObject.replyComment.reply" }) }))), onSave && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [onCancel && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handleCancel, disabled: !editable, color: "inherit", className: classes.buttonCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.cancel", defaultMessage: "ui.commentObject.replyComment.cancel" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", onClick: handleSave, loading: !editable, className: classes.buttonSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.save", defaultMessage: "ui.commentObject.replyComment.save" }) }))] }))] })))] })) })));
|
|
137
136
|
}
|
|
138
137
|
exports.default = CommentObjectReply;
|
|
@@ -63,6 +63,6 @@ function CommunityPaywalls(inProps) {
|
|
|
63
63
|
if (loading) {
|
|
64
64
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
65
65
|
}
|
|
66
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 4 } }, { children: (0, jsx_runtime_1.jsx)(PaymentProduct_1.default, Object.assign({ paymentProduct: p, contentType: types_1.SCContentType.COMMUNITY, contentId: scCommunity.id }, (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (callbackUrl && { PaymentProductPriceComponentProps: { returnUrlParams: { callbackUrl } } }))) }), i))) })));
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(PaymentProduct_1.default, Object.assign({ paymentProduct: p, contentType: types_1.SCContentType.COMMUNITY, contentId: scCommunity.id }, (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (callbackUrl && { PaymentProductPriceComponentProps: { returnUrlParams: { callbackUrl } } }))) }), i))) })));
|
|
67
67
|
}
|
|
68
68
|
exports.default = CommunityPaywalls;
|
|
@@ -10,7 +10,6 @@ const react_intl_1 = require("react-intl");
|
|
|
10
10
|
const material_1 = require("@mui/material");
|
|
11
11
|
const Composer_1 = require("../../constants/Composer");
|
|
12
12
|
const Media_1 = require("../../constants/Media");
|
|
13
|
-
const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
|
|
14
13
|
const AudienceLayer_1 = tslib_1.__importDefault(require("./Layer/AudienceLayer"));
|
|
15
14
|
const utils_1 = require("@selfcommunity/utils");
|
|
16
15
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
@@ -695,7 +694,7 @@ function Composer(inProps) {
|
|
|
695
694
|
if (!scUserContext.user && !(scUserContext.loading && open)) {
|
|
696
695
|
return null;
|
|
697
696
|
}
|
|
698
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: dialogRef, slots: { backdrop: BackdropScrollDisabled_1.default, transition: DialogTransition }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: (0, classnames_1.default)(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [(0, jsx_runtime_1.jsxs)("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClosePrompt }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })), (0, jsx_runtime_1.jsx)(
|
|
697
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: dialogRef, slots: { backdrop: BackdropScrollDisabled_1.default, transition: DialogTransition }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: (0, classnames_1.default)(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [(0, jsx_runtime_1.jsxs)("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClosePrompt }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(Attributes_1.default, { value: { categories, event, group, addressing, recipients, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
|
|
699
698
|
if (mediaObjectType.previewComponent) {
|
|
700
699
|
return (0, jsx_runtime_1.jsx)(mediaObjectType.previewComponent, { value: medias, onChange: handleChangeMedias }, mediaObjectType.name);
|
|
701
700
|
}
|
|
@@ -9,15 +9,15 @@ const react_sortablejs_1 = require("react-sortablejs");
|
|
|
9
9
|
const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
10
10
|
const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
11
11
|
const Composer_1 = require("../../../../constants/Composer");
|
|
12
|
-
const it_1 =
|
|
13
|
-
const en_US_1 =
|
|
12
|
+
const it_1 = require("date-fns/locale/it");
|
|
13
|
+
const en_US_1 = require("date-fns/locale/en-US");
|
|
14
14
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
15
15
|
const system_1 = require("@mui/system");
|
|
16
16
|
const date_fns_1 = require("date-fns");
|
|
17
17
|
const constants_1 = require("../../constants");
|
|
18
18
|
const localeMap = {
|
|
19
|
-
en:
|
|
20
|
-
it:
|
|
19
|
+
en: it_1.it,
|
|
20
|
+
it: en_US_1.enUS
|
|
21
21
|
};
|
|
22
22
|
const classes = {
|
|
23
23
|
root: `${constants_1.PREFIX}-content-poll-root`,
|
|
@@ -7,8 +7,8 @@ const react_intl_1 = require("react-intl");
|
|
|
7
7
|
const material_1 = require("@mui/material");
|
|
8
8
|
const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
9
9
|
const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
10
|
-
const it_1 =
|
|
11
|
-
const en_US_1 =
|
|
10
|
+
const it_1 = require("date-fns/locale/it");
|
|
11
|
+
const en_US_1 = require("date-fns/locale/en-US");
|
|
12
12
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const date_fns_1 = require("date-fns");
|
|
@@ -31,7 +31,7 @@ const ScheduledLayer = react_1.default.forwardRef((props, ref) => {
|
|
|
31
31
|
const { className, onClose, onSave, defaultValue = null } = props, rest = tslib_1.__rest(props, ["className", "onClose", "onSave", "defaultValue"]);
|
|
32
32
|
//CONTEXT
|
|
33
33
|
const scContext = (0, react_core_1.useSCContext)();
|
|
34
|
-
const locale = scContext.settings.locale.default === 'it' ? it_1.
|
|
34
|
+
const locale = scContext.settings.locale.default === 'it' ? it_1.it : en_US_1.enUS;
|
|
35
35
|
// STATE
|
|
36
36
|
const [scheduledAt, setScheduledAt] = (0, react_1.useState)(defaultValue ? (typeof defaultValue === 'string' ? (0, date_fns_1.parseISO)(defaultValue) : defaultValue) : null);
|
|
37
37
|
const handleUpdate = (0, react_1.useCallback)((value) => {
|
|
@@ -40,8 +40,8 @@ const ScheduledLayer = react_1.default.forwardRef((props, ref) => {
|
|
|
40
40
|
onSave(value);
|
|
41
41
|
}
|
|
42
42
|
}, [onSave]);
|
|
43
|
-
const CustomToolbar = (
|
|
44
|
-
const { value } =
|
|
43
|
+
const CustomToolbar = () => {
|
|
44
|
+
const { value } = (0, x_date_pickers_1.usePickerContext)();
|
|
45
45
|
if (!value)
|
|
46
46
|
return null;
|
|
47
47
|
const dayName = (0, utils_1.capitalize)((0, date_fns_1.format)(value, 'EEEE', { locale }));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
interface ActionButtonProps extends ButtonProps, Omit<LoadingButtonProps, 'classes'> {
|
|
2
|
+
interface ActionButtonProps extends ButtonProps, Omit<ButtonProps, 'classes'> {
|
|
4
3
|
labelId: string;
|
|
5
4
|
to?: string;
|
|
6
5
|
}
|
|
@@ -5,12 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const react_intl_1 = require("react-intl");
|
|
7
7
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
8
|
-
const lab_1 = require("@mui/lab");
|
|
9
8
|
function ActionButton(props) {
|
|
10
9
|
const { labelId, to, size = 'small', color = 'primary', variant = 'contained' } = props, rest = tslib_1.__rest(props, ["labelId", "to", "size", "color", "variant"]);
|
|
11
10
|
if (to) {
|
|
12
11
|
return ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: to, size: size, color: color, variant: variant }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
13
12
|
}
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: size, color: color, variant: variant }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
15
14
|
}
|
|
16
15
|
exports.default = ActionButton;
|
|
@@ -6,7 +6,6 @@ const react_1 = require("react");
|
|
|
6
6
|
const utils_1 = require("@selfcommunity/utils");
|
|
7
7
|
const Errors_1 = require("../../../constants/Errors");
|
|
8
8
|
const react_intl_1 = require("react-intl");
|
|
9
|
-
const lab_1 = require("@mui/lab");
|
|
10
9
|
const constants_1 = require("../constants");
|
|
11
10
|
const Pagination_1 = require("../../../constants/Pagination");
|
|
12
11
|
const widget_1 = require("../../../utils/widget");
|
|
@@ -103,6 +102,6 @@ function Comments(props) {
|
|
|
103
102
|
if (!state.initialized) {
|
|
104
103
|
return (0, jsx_runtime_1.jsx)(CommentsSkeleton, {});
|
|
105
104
|
}
|
|
106
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && (0, jsx_runtime_1.jsx)(CommentSkeleton, { id: 1 }), (0, jsx_runtime_1.jsx)(
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && (0, jsx_runtime_1.jsx)(CommentSkeleton, { id: 1 }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: isLoading, disabled: !state.next, onClick: handleNext }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.btn.label", defaultMessage: "ui.course.dashboard.teacher.tab.comments.btn.label" }) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.empty", defaultMessage: "ui.course.dashboard.teacher.tab.comments.empty" }) }))) })));
|
|
107
106
|
}
|
|
108
107
|
exports.default = (0, react_1.memo)(Comments);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const system_1 = require("@mui/system");
|
|
8
7
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -291,7 +290,7 @@ function CourseForm(inProps) {
|
|
|
291
290
|
input: {
|
|
292
291
|
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? Course_1.COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : Course_1.COURSE_DESCRIPTION_MAX_LENGTH })))
|
|
293
292
|
}
|
|
294
|
-
}, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && (0, jsx_runtime_1.jsx)(Edit_1.default, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: (0, jsx_runtime_1.jsx)(PaywallsConfigurator_1.default, Object.assign({}, (course && { contentId: course.id }), { contentType: types_1.SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: (0, classnames_1.default)(classes.actions, _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: (0, jsx_runtime_1.jsx)(
|
|
293
|
+
}, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && (0, jsx_runtime_1.jsx)(Edit_1.default, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: (0, jsx_runtime_1.jsx)(PaywallsConfigurator_1.default, Object.assign({}, (course && { contentId: course.id }), { contentType: types_1.SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: (0, classnames_1.default)(classes.actions, _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === Course_1.SCCourseFormStepType.GENERAL
|
|
295
294
|
? !field.type || Object.keys(error).length !== 0
|
|
296
295
|
: _step === Course_1.SCCourseFormStepType.CUSTOMIZATION &&
|
|
297
296
|
(!field.name ||
|
|
@@ -8,7 +8,6 @@ const react_core_1 = require("@selfcommunity/react-core");
|
|
|
8
8
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
9
9
|
const system_1 = require("@mui/system");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
|
-
const lab_1 = require("@mui/lab");
|
|
12
11
|
const react_intl_1 = require("react-intl");
|
|
13
12
|
const messages = (0, react_intl_1.defineMessages)({
|
|
14
13
|
errorLoadImage: {
|
|
@@ -19,7 +18,7 @@ const messages = (0, react_intl_1.defineMessages)({
|
|
|
19
18
|
const classes = {
|
|
20
19
|
root: `${constants_1.PREFIX}-upload-course-cover-root`
|
|
21
20
|
};
|
|
22
|
-
const Root = (0, material_1.styled)(
|
|
21
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
23
22
|
name: constants_1.PREFIX,
|
|
24
23
|
slot: 'UploadCourseCoverRoot'
|
|
25
24
|
})(() => ({}));
|
|
@@ -7,7 +7,6 @@ const material_1 = require("@mui/material");
|
|
|
7
7
|
const utils_1 = require("@selfcommunity/utils");
|
|
8
8
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
9
|
const types_1 = require("@selfcommunity/types");
|
|
10
|
-
const lab_1 = require("@mui/lab");
|
|
11
10
|
const react_intl_1 = require("react-intl");
|
|
12
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
13
12
|
const system_1 = require("@mui/system");
|
|
@@ -18,11 +17,11 @@ const PREFIX = 'SCCourseJoinButton';
|
|
|
18
17
|
const classes = {
|
|
19
18
|
root: `${PREFIX}-root`
|
|
20
19
|
};
|
|
21
|
-
const Root = (0, material_1.styled)(
|
|
20
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
22
21
|
name: PREFIX,
|
|
23
22
|
slot: 'Root',
|
|
24
|
-
overridesResolver: (
|
|
25
|
-
})((
|
|
23
|
+
overridesResolver: (_props, styles) => styles.root
|
|
24
|
+
})(() => ({}));
|
|
26
25
|
/**
|
|
27
26
|
* > API documentation for the Community-JS Course Subscribe Button component. Learn about the available props and the CSS API.
|
|
28
27
|
|
|
@@ -206,7 +206,7 @@ function Courses(inProps) {
|
|
|
206
206
|
/**
|
|
207
207
|
* Renders courses list
|
|
208
208
|
*/
|
|
209
|
-
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 2 }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByName", defaultMessage: "ui.courses.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
|
|
209
|
+
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 2 }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByName", defaultMessage: "ui.courses.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
|
|
210
210
|
e.preventDefault();
|
|
211
211
|
if (e.key === 'Enter') {
|
|
212
212
|
fetchCourses();
|
|
@@ -217,11 +217,11 @@ function Courses(inProps) {
|
|
|
217
217
|
}
|
|
218
218
|
} }) })), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(CoursesChipRoot, { color: showManagedCourses ? 'primary' : 'default', variant: showManagedCourses ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByManagedByMe", defaultMessage: "ui.courses.filterByManagedByMe" }), onClick: () => setShowManagedCourses(!showManagedCourses),
|
|
219
219
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
220
|
-
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 'auto' } }, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { onChange: handleOnChangeCategory, className: classes.category, size: "small", multiple: true }) })) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12 } }, { children: (0, jsx_runtime_1.jsx)(CoursesChipRoot, { color: showMine ? 'primary' : 'default', variant: showMine ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByMine", defaultMessage: "ui.courses.filterByMine" }), onClick: handleChipClick,
|
|
220
|
+
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 'auto' } }, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { onChange: handleOnChangeCategory, className: classes.category, size: "small", multiple: true }) })) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12 } }, { children: (0, jsx_runtime_1.jsx)(CoursesChipRoot, { color: showMine ? 'primary' : 'default', variant: showMine ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByMine", defaultMessage: "ui.courses.filterByMine" }), onClick: handleChipClick,
|
|
221
221
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
222
222
|
showMine: showMine, deleteIcon: showMine ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMine ? handleDeleteClick : null, disabled: loading || showManagedCourses }) })))] })) }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !courses.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: !canCreateCourse && onlyStaffEnabled ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.studentEmptyView }, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.emptyBox }, { children: (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.emptyRotatedBox }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.emptyIcon, color: "disabled", fontSize: "large" }, { children: "courses" })) })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", textAlign: "center" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.empty.title", defaultMessage: "ui.courses.empty.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", textAlign: "center" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.empty.info", defaultMessage: "ui.courses.empty.info" }) }))] }))) : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.teacherEmptyView }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ teacherView: (onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled, coursesNumber: 1 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps })) }))) }))) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: courses.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: isMobile ? ((0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, { template: course_1.SCCourseTemplateType.PREVIEW })) : ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ coursesNumber: 4 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps }))), endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.endMessage", defaultMessage: "ui.courses.endMessage", values: {
|
|
223
223
|
button: (chunk) => ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleScrollUp }, { children: chunk })))
|
|
224
|
-
} }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [courses.map((course) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 6, lg: 3 }, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ courseId: course.id }, CourseComponentProps)) }), course.id))), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && courses.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 6, lg: 3 }, className: classes.itemPlaceholder }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, { CreateCourseButtonComponentProps: CreateCourseButtonComponentProps }) }), "placeholder-item"))] }) })) }))) })] }));
|
|
224
|
+
} }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [courses.map((course) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 }, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ courseId: course.id }, CourseComponentProps)) }), course.id))), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && courses.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 }, className: classes.itemPlaceholder }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, { CreateCourseButtonComponentProps: CreateCourseButtonComponentProps }) }), "placeholder-item"))] }) })) }))) })] }));
|
|
225
225
|
/**
|
|
226
226
|
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
227
227
|
*/
|
|
@@ -39,6 +39,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
39
39
|
*/
|
|
40
40
|
function CoursesSkeleton(inProps) {
|
|
41
41
|
const { className, CourseSkeletonProps = {}, coursesNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {}, teacherView = false } = inProps, rest = tslib_1.__rest(inProps, ["className", "CourseSkeletonProps", "coursesNumber", "GridContainerComponentProps", "GridItemComponentProps", "teacherView"]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((_course, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 6, lg: 3 } }, GridItemComponentProps, { className: classes.item }, { children: teacherView ? (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, {}) : (0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, Object.assign({}, CourseSkeletonProps)) }), index))) })) })));
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((_course, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 } }, GridItemComponentProps, { className: classes.item }, { children: teacherView ? (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, {}) : (0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, Object.assign({}, CourseSkeletonProps)) }), index))) })) })));
|
|
43
43
|
}
|
|
44
44
|
exports.default = CoursesSkeleton;
|
|
@@ -9,7 +9,6 @@ const system_1 = require("@mui/system");
|
|
|
9
9
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
10
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
14
13
|
const utils_1 = require("@selfcommunity/utils");
|
|
15
14
|
const Errors_1 = require("../../constants/Errors");
|
|
@@ -141,6 +140,6 @@ function CreatePaymentProductForm(inProps) {
|
|
|
141
140
|
startAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: "\u20AC" })),
|
|
142
141
|
inputComponent: NumericFormatCustom
|
|
143
142
|
}
|
|
144
|
-
}, fullWidth: true, error: Boolean(fieldsError && fieldsError.unitAmount) }), error && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.error, variant: "body2" }, { children: error }))), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 1 }, { children: [onCancel && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", color: "inherit", onClick: onCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.btn.cancel", defaultMessage: "ui.createPaymentProductForm.btn.cancel" }) }))), (0, jsx_runtime_1.jsx)(
|
|
143
|
+
}, fullWidth: true, error: Boolean(fieldsError && fieldsError.unitAmount) }), error && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.error, variant: "body2" }, { children: error }))), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 1 }, { children: [onCancel && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", color: "inherit", onClick: onCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.btn.cancel", defaultMessage: "ui.createPaymentProductForm.btn.cancel" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: loading, variant: "contained", size: "small", color: "error", onClick: handleCreateProduct }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.btn.create", defaultMessage: "ui.createPaymentProductForm.btn.create" }) }))] }))] })));
|
|
145
144
|
}
|
|
146
145
|
exports.default = CreatePaymentProductForm;
|
|
@@ -9,7 +9,6 @@ const constants_1 = require("../constants");
|
|
|
9
9
|
const MenuRow_1 = tslib_1.__importDefault(require("../MenuRow"));
|
|
10
10
|
const utils_1 = require("@selfcommunity/utils");
|
|
11
11
|
const Errors_1 = require("../../../constants/Errors");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const notistack_1 = require("notistack");
|
|
14
13
|
const types_1 = require("@selfcommunity/types");
|
|
15
14
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -77,12 +76,12 @@ function ChangeLessonStatus(props) {
|
|
|
77
76
|
handleAction(newValue);
|
|
78
77
|
}
|
|
79
78
|
}, [handleAction, value]);
|
|
80
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(MenuRow_1.default, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(
|
|
79
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(MenuRow_1.default, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", onClick: handleClick, loading: loading, disabled: loading, "data-value": option.value, sx: {
|
|
81
80
|
padding: 0,
|
|
82
81
|
':hover': {
|
|
83
82
|
backgroundColor: 'unset'
|
|
84
83
|
}
|
|
85
|
-
} }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: (0, jsx_runtime_1.jsx)(
|
|
84
|
+
} }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
|
|
86
85
|
padding: 0,
|
|
87
86
|
':hover': {
|
|
88
87
|
backgroundColor: 'unset'
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const react_1 = require("react");
|
|
8
7
|
const constants_1 = require("../constants");
|
|
@@ -78,6 +77,6 @@ function FieldName(props) {
|
|
|
78
77
|
handleDisableEditMode();
|
|
79
78
|
}
|
|
80
79
|
}, [row, isNewRow, handleManageRow, setName, handleDisableEditMode]);
|
|
81
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isNewRow || editMode ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.editModeWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), (0, jsx_runtime_1.jsx)(
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isNewRow || editMode ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.editModeWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleSubmit, loading: loading, disabled: loading, className: classes.editModeSaveButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ color: "default", size: "small", onClick: handleClose, className: classes.editModeCloseButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: row.name }))) }));
|
|
82
81
|
}
|
|
83
82
|
exports.default = (0, react_1.memo)(FieldName);
|