@selfcommunity/react-ui 0.11.0-mui7.16 → 0.11.0-mui7.18
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 +14 -14
- 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");
|
|
@@ -16,7 +15,7 @@ const PREFIX = 'SCInviteUserEventButton';
|
|
|
16
15
|
const classes = {
|
|
17
16
|
root: `${PREFIX}-root`
|
|
18
17
|
};
|
|
19
|
-
const InviteButton = (0, material_1.styled)(
|
|
18
|
+
const InviteButton = (0, material_1.styled)(material_1.Button, {
|
|
20
19
|
name: PREFIX,
|
|
21
20
|
slot: 'Root',
|
|
22
21
|
overridesResolver: (_props, styles) => styles.root
|
|
@@ -8,7 +8,6 @@ const material_1 = require("@mui/material");
|
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const types_1 = require("../../types");
|
|
10
10
|
const react_intl_1 = require("react-intl");
|
|
11
|
-
const lab_1 = require("@mui/lab");
|
|
12
11
|
const classes = {
|
|
13
12
|
root: `${constants_1.PREFIX}-root`,
|
|
14
13
|
startItems: `${constants_1.PREFIX}-start-items`,
|
|
@@ -18,9 +17,9 @@ const classes = {
|
|
|
18
17
|
const Root = (0, material_1.styled)(material_1.AppBar, {
|
|
19
18
|
name: constants_1.PREFIX,
|
|
20
19
|
slot: 'Root',
|
|
21
|
-
overridesResolver: (
|
|
20
|
+
overridesResolver: (_props, styles) => [styles.root],
|
|
22
21
|
shouldForwardProp: (prop) => prop !== 'open'
|
|
23
|
-
})((
|
|
22
|
+
})(() => ({}));
|
|
24
23
|
function LessonAppbar(inProps) {
|
|
25
24
|
// PROPS
|
|
26
25
|
const props = (0, system_1.useThemeProps)({
|
|
@@ -28,6 +27,6 @@ function LessonAppbar(inProps) {
|
|
|
28
27
|
name: constants_1.PREFIX
|
|
29
28
|
});
|
|
30
29
|
const { className = null, title = '', showComments, activePanel = null, handleOpen, onSave, editMode, onArrowBackClick, updating } = props, rest = tslib_1.__rest(props, ["className", "title", "showComments", "activePanel", "handleOpen", "onSave", "editMode", "onArrowBackClick", "updating"]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ position: "fixed", open: Boolean(activePanel), className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.startItems }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "start", onClick: onArrowBackClick }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: classes.title }, { children: title }))] })), editMode ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(types_1.SCLessonActionsType.SETTINGS), color: "primary" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "settings" }) })), (0, jsx_runtime_1.jsx)(
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ position: "fixed", open: Boolean(activePanel), className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.startItems }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "start", onClick: onArrowBackClick }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: classes.title }, { children: title }))] })), editMode ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(types_1.SCLessonActionsType.SETTINGS), color: "primary" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "settings" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonAppbar.button.save", defaultMessage: "ui.lessonAppbar.button.save" }) }))] })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.endItems }, { children: [showComments && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(types_1.SCLessonActionsType.COMMENTS) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "chat_bubble_outline" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(types_1.SCLessonActionsType.LESSONS) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "courses" }) }))] })))] }) })));
|
|
32
31
|
}
|
|
33
32
|
exports.default = LessonAppbar;
|
|
@@ -9,7 +9,6 @@ const material_1 = require("@mui/material");
|
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
10
|
const react_intl_1 = require("react-intl");
|
|
11
11
|
const types_1 = require("@selfcommunity/types");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const classes = {
|
|
14
13
|
root: `${constants_1.PREFIX}-root`,
|
|
15
14
|
form: `${constants_1.PREFIX}-form`,
|
|
@@ -39,6 +38,6 @@ function LessonEditForm(inProps) {
|
|
|
39
38
|
/**
|
|
40
39
|
* Rendering
|
|
41
40
|
*/
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, Object.assign({ id: "status" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.title", defaultMessage: "ui.lessonEditForm.status.title" }) })), (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, Object.assign({ "aria-labelledby": "course-status-radio-buttons-group", name: "course-status-radio-buttons-group", value: settings.status, onChange: (e) => handleChange('status', e.target.value) }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: types_1.SCCourseLessonStatusType.DRAFT, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.draft", defaultMessage: "ui.lessonEditForm.status.draft" }) }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: types_1.SCCourseLessonStatusType.PUBLISHED, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.published", defaultMessage: "ui.lessonEditForm.status.published" }) })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ className: classes.settings }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, Object.assign({ id: "settings" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.settings.title", defaultMessage: "ui.lessonEditForm.settings.title" }) })), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: settings.comments_enabled, onChange: (e) => handleChange('comments_enabled', e.target.checked) }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.settings.enableComments", defaultMessage: "ui.lessonEditForm.settings.enableComments" }) })] }))] })), (0, jsx_runtime_1.jsx)(
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, Object.assign({ id: "status" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.title", defaultMessage: "ui.lessonEditForm.status.title" }) })), (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, Object.assign({ "aria-labelledby": "course-status-radio-buttons-group", name: "course-status-radio-buttons-group", value: settings.status, onChange: (e) => handleChange('status', e.target.value) }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: types_1.SCCourseLessonStatusType.DRAFT, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.draft", defaultMessage: "ui.lessonEditForm.status.draft" }) }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: types_1.SCCourseLessonStatusType.PUBLISHED, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.status.published", defaultMessage: "ui.lessonEditForm.status.published" }) })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ className: classes.settings }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormLabel, Object.assign({ id: "settings" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.settings.title", defaultMessage: "ui.lessonEditForm.settings.title" }) })), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: settings.comments_enabled, onChange: (e) => handleChange('comments_enabled', e.target.checked) }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.settings.enableComments", defaultMessage: "ui.lessonEditForm.settings.enableComments" }) })] }))] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonEditForm.button.save", defaultMessage: "ui.lessonEditForm.button.save" }) }))] })));
|
|
43
42
|
}
|
|
44
43
|
exports.default = LessonEditForm;
|
|
@@ -13,8 +13,8 @@ const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
|
13
13
|
const types_1 = require("@selfcommunity/types");
|
|
14
14
|
const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
15
15
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
16
|
-
const it_1 =
|
|
17
|
-
const en_US_1 =
|
|
16
|
+
const it_1 = require("date-fns/locale/it");
|
|
17
|
+
const en_US_1 = require("date-fns/locale/en-US");
|
|
18
18
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
19
19
|
const Errors_1 = require("../../constants/Errors");
|
|
20
20
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -135,7 +135,7 @@ function LessonReleaseMenu(inProps) {
|
|
|
135
135
|
id: 'ui.lessonReleaseMenu.now.label',
|
|
136
136
|
defaultMessage: 'ui.lessonReleaseMenu.now.label'
|
|
137
137
|
});
|
|
138
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: course && course.type === types_1.SCCourseTypologyType.SCHEDULED ? ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.
|
|
138
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: course && course.type === types_1.SCCourseTypologyType.SCHEDULED ? ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.it : en_US_1.enUS, localeText: {
|
|
139
139
|
okButtonLabel: `${intl.formatMessage(messages.pickerOkMessage)}`,
|
|
140
140
|
cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelMessage)}`,
|
|
141
141
|
clearButtonLabel: `${intl.formatMessage(messages.pickerClearMessage)}`
|
|
@@ -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 types_1 = require("@selfcommunity/types");
|
|
@@ -243,7 +242,7 @@ function LiveStreamForm(inProps) {
|
|
|
243
242
|
input: {
|
|
244
243
|
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) ? LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH - field.description.length : LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH })))
|
|
245
244
|
}
|
|
246
|
-
}, error: Boolean(((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), (0, jsx_runtime_1.jsx)(LiveStreamFormSettings_1.default, { settings: field.settings, onChange: handleChangeSettings }), genericError && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.genericError }, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(
|
|
245
|
+
}, error: Boolean(((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), (0, jsx_runtime_1.jsx)(LiveStreamFormSettings_1.default, { settings: field.settings, onChange: handleChangeSettings }), genericError && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.genericError }, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: field.isSubmitting, disabled: !field.title ||
|
|
247
246
|
field.isSubmitting ||
|
|
248
247
|
field.title.length > LiveStream_1.LIVE_STREAM_TITLE_MAX_LENGTH ||
|
|
249
248
|
field.description.length > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH ||
|
|
@@ -11,7 +11,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_2 = require("../../../types");
|
|
13
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
14
|
-
const lab_1 = require("@mui/lab");
|
|
15
14
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
15
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
@@ -56,8 +55,6 @@ function CourseNotification(props) {
|
|
|
56
55
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
57
56
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
58
57
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
60
|
-
// @ts-ignore
|
|
61
58
|
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
62
59
|
? notificationObject.comment.lesson_name
|
|
63
60
|
: notificationObject.course.name,
|
|
@@ -73,8 +70,6 @@ function CourseNotification(props) {
|
|
|
73
70
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
74
71
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
75
72
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
77
|
-
// @ts-ignore
|
|
78
73
|
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
79
74
|
? notificationObject.comment.lesson_name
|
|
80
75
|
: notificationObject.course.name,
|
|
@@ -83,6 +78,6 @@ function CourseNotification(props) {
|
|
|
83
78
|
: react_core_1.SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
84
79
|
? (0, utils_1.formatLessonUrl)(notificationObject)
|
|
85
80
|
: notificationObject.course) }, { children: chunks })))
|
|
86
|
-
} }), notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : ((0, jsx_runtime_1.jsx)(Course_1.default, { course: notificationObject.course, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), template: types_2.SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(
|
|
81
|
+
} }), notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : ((0, jsx_runtime_1.jsx)(Course_1.default, { course: notificationObject.course, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), template: types_2.SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, to: scRoutingContext.url((0, utils_1.getRouteName)(notificationObject), (0, utils_1.getRouteParams)(notificationObject)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
87
82
|
}
|
|
88
83
|
exports.default = CourseNotification;
|
|
@@ -11,7 +11,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_2 = require("../../../types");
|
|
13
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
14
|
-
const lab_1 = require("@mui/lab");
|
|
15
14
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
15
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
@@ -63,8 +62,6 @@ function EventNotification(props) {
|
|
|
63
62
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
64
63
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
65
64
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.${notificationObject.type}`, defaultMessage: `ui.notification.event.${notificationObject.type}`, values: {
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
67
|
-
// @ts-ignore
|
|
68
65
|
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
69
66
|
event: notificationObject.event.name,
|
|
70
67
|
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }))
|
|
@@ -76,21 +73,19 @@ function EventNotification(props) {
|
|
|
76
73
|
month: 'long'
|
|
77
74
|
}),
|
|
78
75
|
hour: intl.formatDate(notificationObject.event.start_date, { hour: 'numeric', minute: 'numeric' })
|
|
79
|
-
} }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "p", variant: "body2" }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.privacy.${notificationObject.event.privacy}`, defaultMessage: `ui.notification.event.privacy.${notificationObject.event.privacy}` }), ' ', "-", ' ', notificationObject.event.location === types_1.SCEventLocationType.PERSON ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.address.live.label`, defaultMessage: `ui.notification.event.address.live.label` })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.address.online.label`, defaultMessage: `ui.notification.event.address.online.label` }))] }))] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT ? ((0, jsx_runtime_1.jsx)(
|
|
76
|
+
} }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "p", variant: "body2" }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.privacy.${notificationObject.event.privacy}`, defaultMessage: `ui.notification.event.privacy.${notificationObject.event.privacy}` }), ' ', "-", ' ', notificationObject.event.location === types_1.SCEventLocationType.PERSON ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.address.live.label`, defaultMessage: `ui.notification.event.address.live.label` })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.address.online.label`, defaultMessage: `ui.notification.event.address.online.label` }))] }))] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: disabled, loading: loading, color: "primary", variant: "text", size: "small", onClick: () => acceptRequest(notificationObject.event) }, { children: disabled ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.button.accepted", defaultMessage: "ui.notification.event.button.accepted" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.button.accept", defaultMessage: "ui.notification.event.button.accept" })) }))) : ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) }))) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
80
77
|
}
|
|
81
78
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
82
79
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
83
80
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
84
81
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
85
82
|
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
87
|
-
// @ts-ignore
|
|
88
83
|
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
89
84
|
event: notificationObject.event.name,
|
|
90
85
|
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }))
|
|
91
|
-
} }), (0, jsx_runtime_1.jsx)(Event_1.default, { event: notificationObject.event, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(
|
|
86
|
+
} }), (0, jsx_runtime_1.jsx)(Event_1.default, { event: notificationObject.event, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({}, (notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
|
|
92
87
|
disabled: disabled
|
|
93
|
-
}), { loading: loading, color:
|
|
88
|
+
}), { loading: loading, color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton } }, (notificationObject.type !== types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
|
|
94
89
|
component: react_core_1.Link,
|
|
95
90
|
to: scRoutingContext.url(react_core_1.SCRoutes.EVENT_ROUTE_NAME, notificationObject.event)
|
|
96
91
|
}), { onClick: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT
|
|
@@ -11,7 +11,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
11
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
12
|
const types_2 = require("../../../types");
|
|
13
13
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
14
|
-
const lab_1 = require("@mui/lab");
|
|
15
14
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
15
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
17
16
|
const constants_1 = require("../constants");
|
|
@@ -65,7 +64,7 @@ function GroupNotification(props) {
|
|
|
65
64
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
|
|
66
65
|
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.group.button.see", defaultMessage: "ui.notification.group.button.see" }) })) })))] }))) }, rest)));
|
|
67
66
|
}
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), status && status !== types_1.SCGroupSubscriptionStatusType.SUBSCRIBED && ((0, jsx_runtime_1.jsx)(
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), status && status !== types_1.SCGroupSubscriptionStatusType.SUBSCRIBED && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.acceptButton }, component: react_core_1.Link, loading: scUserContext.user ? status === null || manager.isLoading(notificationObject.group) : null, to: notificationObject.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
|
|
69
68
|
notificationObject.type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP
|
|
70
69
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
|
|
71
70
|
: scRoutingContext.url(react_core_1.SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.group.button.see", defaultMessage: "ui.notification.group.button.see" }) })))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
@@ -10,7 +10,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
10
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
11
|
const types_1 = require("../../../types");
|
|
12
12
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
13
|
-
const lab_1 = require("@mui/lab");
|
|
14
13
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
15
14
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
16
15
|
const constants_1 = require("../constants");
|
|
@@ -53,8 +52,6 @@ function LiveStreamNotification(props) {
|
|
|
53
52
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
54
53
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
55
54
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
57
|
-
// @ts-ignore
|
|
58
55
|
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
59
56
|
live: notificationObject.live_stream.title,
|
|
60
57
|
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
@@ -65,10 +62,8 @@ function LiveStreamNotification(props) {
|
|
|
65
62
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
66
63
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
67
64
|
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
69
|
-
// @ts-ignore
|
|
70
65
|
live: notificationObject.live_stream.title,
|
|
71
66
|
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
72
|
-
} }), (0, jsx_runtime_1.jsx)(LiveStream_1.default, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(
|
|
67
|
+
} }), (0, jsx_runtime_1.jsx)(LiveStream_1.default, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
73
68
|
}
|
|
74
69
|
exports.default = LiveStreamNotification;
|
|
@@ -27,7 +27,6 @@ const api_services_1 = require("@selfcommunity/api-services");
|
|
|
27
27
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
28
28
|
const Contribution_1 = tslib_1.__importDefault(require("./Contribution"));
|
|
29
29
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
30
|
-
const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
|
|
31
30
|
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
32
31
|
const system_1 = require("@mui/system");
|
|
33
32
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -141,7 +140,7 @@ function UserNotification(inProps) {
|
|
|
141
140
|
function handleStopContentNotification(contribution) {
|
|
142
141
|
setLoadingSuspendNotification(true);
|
|
143
142
|
performSuspendNotification(contribution)
|
|
144
|
-
.then((
|
|
143
|
+
.then(() => {
|
|
145
144
|
const newObj = obj;
|
|
146
145
|
newObj[contribution.type].suspended = !newObj[contribution.type].suspended;
|
|
147
146
|
setObj(newObj);
|
|
@@ -186,7 +185,9 @@ function UserNotification(inProps) {
|
|
|
186
185
|
let messageNotification = notificationObject.aggregated[0];
|
|
187
186
|
return ((0, jsx_runtime_1.jsx)(material_1.CardHeader, { className: classes.header, avatar: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!messageNotification.message.sender.deleted && {
|
|
188
187
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender)
|
|
189
|
-
}), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !messageNotification.message.sender.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar }) })) })),
|
|
188
|
+
}), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !messageNotification.message.sender.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar }) })) })), slotProps: {
|
|
189
|
+
title: { className: classes.title, variant: 'subtitle1' }
|
|
190
|
+
}, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!messageNotification.message.sender.deleted && {
|
|
190
191
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender)
|
|
191
192
|
}), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: messageNotification.message.sender.username })), ' ', intl.formatMessage(messages.receivePrivateMessage, {
|
|
192
193
|
total: notificationObject.aggregated.length,
|
|
@@ -204,7 +205,9 @@ function UserNotification(inProps) {
|
|
|
204
205
|
let groupNotification = notificationObject.aggregated[0];
|
|
205
206
|
return ((0, jsx_runtime_1.jsx)(material_1.CardHeader, { className: classes.header, avatar: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!groupNotification.user.deleted && {
|
|
206
207
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, groupNotification.user)
|
|
207
|
-
}), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !groupNotification.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: groupNotification.user.username, variant: "circular", src: groupNotification.user.avatar }) })) })),
|
|
208
|
+
}), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !groupNotification.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: groupNotification.user.username, variant: "circular", src: groupNotification.user.avatar }) })) })), slotProps: {
|
|
209
|
+
title: { className: classes.title, variant: 'subtitle1' }
|
|
210
|
+
}, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!groupNotification.user.deleted && {
|
|
208
211
|
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, groupNotification.user)
|
|
209
212
|
}), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: groupNotification.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.aggregated[0].type}`, defaultMessage: `ui.notification.${notificationObject.aggregated[0].type}`, values: {
|
|
210
213
|
group: groupNotification.group.name,
|
|
@@ -225,7 +228,12 @@ function UserNotification(inProps) {
|
|
|
225
228
|
notificationObject.aggregated[0].type === types_1.SCNotificationTypologyType.VOTE_UP ||
|
|
226
229
|
notificationObject.aggregated[0].type === types_1.SCNotificationTypologyType.CONTRIBUTION)) {
|
|
227
230
|
const contribution = (0, contribution_1.getContribution)(notificationObject);
|
|
228
|
-
return ((0, jsx_runtime_1.jsx)(material_1.CardHeader, { className: classes.header,
|
|
231
|
+
return ((0, jsx_runtime_1.jsx)(material_1.CardHeader, { className: classes.header, slotProps: {
|
|
232
|
+
title: {
|
|
233
|
+
className: classes.title,
|
|
234
|
+
variant: 'subtitle1'
|
|
235
|
+
}
|
|
236
|
+
}, title: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(contribution), (0, contribution_1.getRouteData)(notificationObject[contribution.type])) }, { children: (0, contribution_1.getContributionSnippet)(contribution) })), action: contribution && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: contribution.suspended ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", loading: loadingSuspendNotification, color: "inherit", classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, { children: contribution.suspended ? (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: 'primary' }, { children: "notifications_off" })) : (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: 'inherit' }, { children: "notifications_active" })) })) }))) }));
|
|
229
237
|
}
|
|
230
238
|
return null;
|
|
231
239
|
}
|
|
@@ -10,7 +10,6 @@ const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeA
|
|
|
10
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
11
11
|
const types_1 = require("../../../types");
|
|
12
12
|
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
13
|
-
const lab_1 = require("@mui/lab");
|
|
14
13
|
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
15
14
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
16
15
|
const constants_1 = require("../constants");
|
|
@@ -96,7 +95,7 @@ function PrivateMessageNotification(props) {
|
|
|
96
95
|
? scRoutingContext.url(react_core_1.SCRoutes.GROUP_MESSAGES_ROUTE_NAME, notificationObject.message.group)
|
|
97
96
|
: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, { children: scUserContext.user && follower ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage: 'ui.userToastNotifications.replyMessage' })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewMessage", defaultMessage: 'ui.userToastNotifications.viewMessage' })) })) }))] }))) }, rest)));
|
|
98
97
|
}
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.replyButton }, component: react_core_1.Link, loading: notificationObject.message.sender.deleted
|
|
100
99
|
? null
|
|
101
100
|
: scUserContext.user
|
|
102
101
|
? follower === null || manager.isLoading(notificationObject.message.sender)
|
|
@@ -15,7 +15,6 @@ const onBoarding_1 = require("../../../../utils/onBoarding");
|
|
|
15
15
|
const react_intl_1 = require("react-intl");
|
|
16
16
|
const Errors_1 = require("../../../../constants/Errors");
|
|
17
17
|
const utils_1 = require("@selfcommunity/utils");
|
|
18
|
-
const lab_1 = require("@mui/lab");
|
|
19
18
|
const ScrollContainer_1 = tslib_1.__importDefault(require("../../../../shared/ScrollContainer"));
|
|
20
19
|
const messages = (0, react_intl_1.defineMessages)({
|
|
21
20
|
titleField: {
|
|
@@ -180,9 +179,9 @@ function Appearance(inProps) {
|
|
|
180
179
|
}, []);
|
|
181
180
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.title, alignSelf: "self-start" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.appearance", defaultMessage: "ui.onBoardingWidget.appearance" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.summary", defaultMessage: "ui.onBoardingWidget.step.appearance.summary" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", color: "primary", onClick: handleOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.button", defaultMessage: "ui.onBoardingWidget.step.appearance.button" }) })), (0, jsx_runtime_1.jsxs)(DrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "right", open: Boolean(anchorEl), onClose: handleClose }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.drawerHeader }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.header.title", defaultMessage: "ui.onBoardingWidget.step.appearance.header.title" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.drawerHeaderAction, onClick: handleClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ value: tab, onChange: handleTabChange, variant: "scrollable", scrollButtons: "auto", "aria-label": "scrollable-tabs" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Tab, { value: AppearanceTabType.COLOR, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.colors.title", defaultMessage: "ui.onBoardingWidget.step.appearance.colors.title" }) }), (0, jsx_runtime_1.jsx)(material_1.Tab, { value: AppearanceTabType.LOGO, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.logo.title", defaultMessage: "ui.onBoardingWidget.step.appearance.logo.title" }) }), (0, jsx_runtime_1.jsx)(material_1.Tab, { value: AppearanceTabType.SLOGAN, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.title", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.title" }) })] })), (0, jsx_runtime_1.jsx)(ScrollContainer_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.drawerContent }, { children: [tab === AppearanceTabType.COLOR && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.colorContainer }, { children: [preferences
|
|
182
181
|
.filter((item) => item.section === types_1.SCPreferenceSection.COLORS)
|
|
183
|
-
.map((color) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, onBoarding_1.formatColorLabel)(color) })), (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(mui_color_input_1.MuiColorInput, { inputRef: colorRef, className: classes.color, format: "hex", value: color.value, onChange: (value) => handleColorChange(value, color.name), isAlphaHidden: true, PopoverProps: { onClose: handleClosePopover } }) })] }, color.id))), (0, jsx_runtime_1.jsx)(
|
|
182
|
+
.map((color) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, onBoarding_1.formatColorLabel)(color) })), (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(mui_color_input_1.MuiColorInput, { inputRef: colorRef, className: classes.color, format: "hex", value: color.value, onChange: (value) => handleColorChange(value, color.name), isAlphaHidden: true, PopoverProps: { onClose: handleClosePopover } }) })] }, color.id))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: loading || updating, disabled: loading || updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))), tab === AppearanceTabType.LOGO && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: preferences
|
|
184
183
|
.filter((item) => item.section === types_1.SCPreferenceSection.LOGO)
|
|
185
|
-
.map((logo) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, onBoarding_1.formatLogoLabel)(logo.name) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.logoContainer }, { children: [(0, jsx_runtime_1.jsx)("img", { src: logo.value, className: classes.logo }), (0, jsx_runtime_1.jsx)("input", { type: "file", onChange: (event) => handleUpload(event, logo.name), hidden: true, accept: ".gif,.png,.jpg,.jpeg", id: logo.name }), (0, jsx_runtime_1.jsx)(
|
|
184
|
+
.map((logo) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, onBoarding_1.formatLogoLabel)(logo.name) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.logoContainer }, { children: [(0, jsx_runtime_1.jsx)("img", { src: logo.value, className: classes.logo }), (0, jsx_runtime_1.jsx)("input", { type: "file", onChange: (event) => handleUpload(event, logo.name), hidden: true, accept: ".gif,.png,.jpg,.jpeg", id: logo.name }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.uploadButton, onClick: () => document.getElementById(`${logo.name}`).click(), loading: Boolean(loadingLogo) && Boolean(logo.name === loadingLogo), disabled: Boolean(loadingLogo) && Boolean(logo.name !== loadingLogo) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "upload" }) }))] }))] }, logo.id))) })), tab === AppearanceTabType.SLOGAN && ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, fullWidth: true, label: `${intl.formatMessage(messages.titleField)}`, margin: "normal", value: ((_a = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _a === void 0 ? void 0 : _a.value) || '', name: "application_slogan1", onChange: handleChange, slotProps: {
|
|
186
185
|
input: {
|
|
187
186
|
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_c = (_b = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length)
|
|
188
187
|
? 50 - ((_d = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _d === void 0 ? void 0 : _d.value.length)
|
|
@@ -194,6 +193,6 @@ function Appearance(inProps) {
|
|
|
194
193
|
? 150 - ((_k = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _k === void 0 ? void 0 : _k.value.length)
|
|
195
194
|
: 150 })))
|
|
196
195
|
}
|
|
197
|
-
}, error: Boolean(((_m = (_l = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 150) }), (0, jsx_runtime_1.jsx)(
|
|
196
|
+
}, error: Boolean(((_m = (_l = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 150) }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: updating, disabled: updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))] })) })] }))] })));
|
|
198
197
|
}
|
|
199
198
|
exports.default = Appearance;
|
|
@@ -5,7 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const react_intl_1 = require("react-intl");
|
|
8
|
-
const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
|
|
9
8
|
const react_intersection_observer_1 = require("react-intersection-observer");
|
|
10
9
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
11
10
|
const system_1 = require("@mui/system");
|
|
@@ -24,8 +23,8 @@ const Errors_1 = require("../../constants/Errors");
|
|
|
24
23
|
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
25
24
|
const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
26
25
|
const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
27
|
-
const it_1 =
|
|
28
|
-
const en_US_1 =
|
|
26
|
+
const it_1 = require("date-fns/locale/it");
|
|
27
|
+
const en_US_1 = require("date-fns/locale/en-US");
|
|
29
28
|
const Category_1 = tslib_1.__importDefault(require("../Category"));
|
|
30
29
|
const PREFIX = 'SCPaymentOrders';
|
|
31
30
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -209,7 +208,7 @@ function PaymentOrders(inProps) {
|
|
|
209
208
|
const skeleton = () => {
|
|
210
209
|
return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, Object.assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 20 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 30 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 80, width: 250 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) }))] })));
|
|
211
210
|
};
|
|
212
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 3 }, { 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.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
|
|
211
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 3 }, { 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.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
|
|
213
212
|
e.preventDefault();
|
|
214
213
|
if (e.key === 'Enter') {
|
|
215
214
|
fetchInvoices();
|
|
@@ -221,7 +220,7 @@ function PaymentOrders(inProps) {
|
|
|
221
220
|
fetchInvoices('');
|
|
222
221
|
}, disabled: isLoading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => fetchInvoices(), disabled: isLoading })) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchInvoices(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: isLoading }))] })))
|
|
223
222
|
}
|
|
224
|
-
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { sm: 8, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.
|
|
223
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: 8, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.it : en_US_1.enUS, localeText: {
|
|
225
224
|
cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelAction)}`,
|
|
226
225
|
clearButtonLabel: `${intl.formatMessage(messages.pickerClearAction)}`
|
|
227
226
|
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateFrom", defaultMessage: "ui.paymentOrders.dateFrom" }), value: startDate, slots: {
|
|
@@ -265,6 +264,6 @@ function PaymentOrders(inProps) {
|
|
|
265
264
|
hour: 'numeric',
|
|
266
265
|
minute: 'numeric'
|
|
267
266
|
})
|
|
268
|
-
: '-' })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { variant: 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [order.content_type === types_1.SCContentType.EVENT && (0, jsx_runtime_1.jsx)(PaymentOrderPdfButton_1.default, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && ((0, jsx_runtime_1.jsx)(
|
|
267
|
+
: '-' })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { variant: 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [order.content_type === types_1.SCContentType.EVENT && (0, jsx_runtime_1.jsx)(PaymentOrderPdfButton_1.default, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "contained", disabled: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.pay", defaultMessage: "ui.paymentOrders.pay" }) })))] })) }))] }, index))), orders.length < 1 && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ align: "left", colSpan: 6 }, { 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.paymentOrders.noOrders", defaultMessage: "ui.paymentOrders.noOrders" }) })) })) })), hasMore && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: skeleton() })] })] })) }))) : ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) }))] })));
|
|
269
268
|
}
|
|
270
269
|
exports.default = PaymentOrders;
|
|
@@ -41,6 +41,6 @@ function PaymentProductsSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }, index))) })) })));
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaymentProductsSkeleton;
|
|
@@ -41,6 +41,6 @@ function PaywallsSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }, index))) })) })));
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaywallsSkeleton;
|
|
@@ -41,6 +41,6 @@ function PaywallsConfiguratorSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }, index))) })) })));
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaywallsConfiguratorSkeleton;
|
|
@@ -60,6 +60,6 @@ function PdfPreviewDialog(inProps) {
|
|
|
60
60
|
}
|
|
61
61
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ fullScreen: true, scroll: "paper", open: true, maxWidth: "md" }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className), slots: {
|
|
62
62
|
transition: Transition
|
|
63
|
-
}, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ justifyContent: "center", alignContent: "center" }, { children: (0, jsx_runtime_1.jsx)(PdfPreview_1.default, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
|
|
63
|
+
}, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12, justifyContent: "center", alignContent: "center" }, { children: (0, jsx_runtime_1.jsx)(PdfPreview_1.default, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
|
|
64
64
|
}
|
|
65
65
|
exports.default = PdfPreviewDialog;
|
|
@@ -37,6 +37,6 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
function PlatformWidgetSkeleton(props) {
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: 170 }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 })] })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12, className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: 170 }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 12, className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 })] })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
|
|
41
41
|
}
|
|
42
42
|
exports.default = PlatformWidgetSkeleton;
|
|
@@ -153,7 +153,7 @@ function PrivateMessageComponent(inProps) {
|
|
|
153
153
|
* Renders snippets section
|
|
154
154
|
*/
|
|
155
155
|
function renderSnippets() {
|
|
156
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 5 }, className: (0, classnames_1.default)(classes.snippetsBox, { [classes.hide]: isMobile && mobileThreadView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageSnippets_1.default, { snippetActions: {
|
|
156
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 5 }, className: (0, classnames_1.default)(classes.snippetsBox, { [classes.hide]: isMobile && mobileThreadView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageSnippets_1.default, { snippetActions: {
|
|
157
157
|
onSnippetClick: handleThreadOpening,
|
|
158
158
|
onNewMessageClick: handleOpenNewMessage,
|
|
159
159
|
onDeleteConfirm: handleDeleteThread
|
|
@@ -163,7 +163,7 @@ function PrivateMessageComponent(inProps) {
|
|
|
163
163
|
* Renders thread section
|
|
164
164
|
*/
|
|
165
165
|
function renderThread() {
|
|
166
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 7 }, className: (0, classnames_1.default)(classes.threadBox, { [classes.hide]: isMobile && mobileSnippetsView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageThread_1.default, { threadObj: obj, type: _type, openNewMessage: openNewMessage, onNewMessageClose: handleMessageBack, onNewMessageSent: handleOnNewMessageSent, onSingleMessageOpen: handleSingleMessage, elevation: 0 }) })));
|
|
166
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 }, className: (0, classnames_1.default)(classes.threadBox, { [classes.hide]: isMobile && mobileSnippetsView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageThread_1.default, { threadObj: obj, type: _type, openNewMessage: openNewMessage, onNewMessageClose: handleMessageBack, onNewMessageSent: handleOnNewMessageSent, onSingleMessageOpen: handleSingleMessage, elevation: 0 }) })));
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Renders the component (if not hidden by autoHide prop)
|
|
@@ -42,6 +42,6 @@ function PrivateMessageComponentSkeleton(props) {
|
|
|
42
42
|
const { className } = props;
|
|
43
43
|
const theme = (0, material_1.useTheme)();
|
|
44
44
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
45
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", className: (0, classnames_1.default)(classes.root, className) }, { children: [!isMobile && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 5 }, className: classes.snippetsSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { md: 7 }, className: classes.threadSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_2.default, {}) }))] })));
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", className: (0, classnames_1.default)(classes.root, className) }, { children: [!isMobile && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 5 }, className: classes.snippetsSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 }, className: classes.threadSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_2.default, {}) }))] })));
|
|
46
46
|
}
|
|
47
47
|
exports.default = PrivateMessageComponentSkeleton;
|