@selfcommunity/react-ui 0.8.1-alpha.4 → 0.9.0-alpha.1
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/CreateEventButton/CreateEventButton.d.ts +2 -2
- package/lib/cjs/components/CreateEventButton/CreateEventButton.js +4 -4
- package/lib/cjs/components/EditEventButton/EditEventButton.js +1 -1
- package/lib/cjs/components/EventForm/EventForm.d.ts +7 -12
- package/lib/cjs/components/EventForm/EventForm.js +55 -55
- package/lib/cjs/components/EventFormDialog/EventFormDialog.d.ts +48 -0
- package/lib/cjs/components/EventFormDialog/EventFormDialog.js +56 -0
- package/lib/cjs/components/EventFormDialog/constants.d.ts +1 -0
- package/lib/cjs/components/EventFormDialog/constants.js +4 -0
- package/lib/cjs/components/EventFormDialog/index.d.ts +3 -0
- package/lib/cjs/components/EventFormDialog/index.js +5 -0
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.d.ts +37 -0
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +242 -0
- package/lib/cjs/components/EventMediaWidget/Skeleton.d.ts +2 -0
- package/lib/cjs/components/EventMediaWidget/Skeleton.js +28 -0
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +17 -0
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +66 -0
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +7 -0
- package/lib/cjs/components/EventMediaWidget/asUploadButton.js +25 -0
- package/lib/cjs/components/EventMediaWidget/constants.d.ts +1 -0
- package/lib/cjs/components/EventMediaWidget/constants.js +4 -0
- package/lib/cjs/components/EventMediaWidget/index.d.ts +4 -0
- package/lib/cjs/components/EventMediaWidget/index.js +8 -0
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +1 -3
- package/lib/cjs/index.d.ts +8 -5
- package/lib/cjs/index.js +18 -13
- package/lib/cjs/shared/Lightbox/BaseLightbox.d.ts +19 -0
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +35 -0
- package/lib/cjs/shared/Lightbox/Lightbox.d.ts +31 -17
- package/lib/cjs/shared/Lightbox/Lightbox.js +16 -19
- package/lib/cjs/shared/Lightbox/constants.d.ts +1 -0
- package/lib/cjs/shared/Lightbox/constants.js +4 -0
- package/lib/cjs/shared/Lightbox/index.d.ts +4 -2
- package/lib/cjs/shared/Lightbox/index.js +4 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +23 -6
- package/lib/cjs/shared/MediaChunkUploader/index.js +13 -11
- package/lib/cjs/utils/hash.d.ts +2 -1
- package/lib/esm/components/CreateEventButton/CreateEventButton.d.ts +2 -2
- package/lib/esm/components/CreateEventButton/CreateEventButton.js +4 -4
- package/lib/esm/components/EditEventButton/EditEventButton.js +1 -1
- package/lib/esm/components/EventForm/EventForm.d.ts +7 -12
- package/lib/esm/components/EventForm/EventForm.js +56 -56
- package/lib/esm/components/EventFormDialog/EventFormDialog.d.ts +48 -0
- package/lib/esm/components/EventFormDialog/EventFormDialog.js +53 -0
- package/lib/esm/components/EventFormDialog/constants.d.ts +1 -0
- package/lib/esm/components/EventFormDialog/constants.js +1 -0
- package/lib/esm/components/EventFormDialog/index.d.ts +3 -0
- package/lib/esm/components/EventFormDialog/index.js +2 -0
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.d.ts +37 -0
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +239 -0
- package/lib/esm/components/EventMediaWidget/Skeleton.d.ts +2 -0
- package/lib/esm/components/EventMediaWidget/Skeleton.js +22 -0
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +17 -0
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +64 -0
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +7 -0
- package/lib/esm/components/EventMediaWidget/asUploadButton.js +23 -0
- package/lib/esm/components/EventMediaWidget/constants.d.ts +1 -0
- package/lib/esm/components/EventMediaWidget/constants.js +1 -0
- package/lib/esm/components/EventMediaWidget/index.d.ts +4 -0
- package/lib/esm/components/EventMediaWidget/index.js +4 -0
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +1 -3
- package/lib/esm/index.d.ts +8 -5
- package/lib/esm/index.js +10 -8
- package/lib/esm/shared/Lightbox/BaseLightbox.d.ts +19 -0
- package/lib/esm/shared/Lightbox/BaseLightbox.js +33 -0
- package/lib/esm/shared/Lightbox/Lightbox.d.ts +31 -17
- package/lib/esm/shared/Lightbox/Lightbox.js +15 -19
- package/lib/esm/shared/Lightbox/constants.d.ts +1 -0
- package/lib/esm/shared/Lightbox/constants.js +1 -0
- package/lib/esm/shared/Lightbox/index.d.ts +4 -2
- package/lib/esm/shared/Lightbox/index.js +3 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +23 -6
- package/lib/esm/shared/MediaChunkUploader/index.js +14 -12
- package/lib/esm/utils/hash.d.ts +2 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +6 -6
- package/lib/cjs/shared/Media/File/Lightbox/index.d.ts +0 -28
- package/lib/cjs/shared/Media/File/Lightbox/index.js +0 -37
- package/lib/esm/shared/Media/File/Lightbox/index.d.ts +0 -28
- package/lib/esm/shared/Media/File/Lightbox/index.js +0 -34
package/lib/cjs/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.X_SHARE = exports.Widget = exports.
|
|
3
|
+
exports.ConfirmDialog = exports.ComposerIconButton = exports.Composer = exports.CommentsObjectSkeleton = exports.CommentsObject = exports.CommentsFeedObjectSkeleton = exports.CommentsFeedObject = exports.CommentObjectSkeleton = exports.CommentObjectReply = exports.CommentObject = exports.ChangePicture = exports.ChangeGroupPicture = exports.ChangeGroupCover = exports.ChangeCover = exports.CentralProgress = exports.CategoryTrendingUsersWidget = exports.CategoryTrendingPeopleWidgetSkeleton = exports.CategoryTrendingFeedWidgetSkeleton = exports.CategoryTrendingFeedWidget = exports.CategorySkeleton = exports.CategoryHeaderSkeleton = exports.CategoryHeader = exports.CategoryFollowersButton = exports.CategoryFollowButton = exports.CategoryAutocomplete = exports.Category = exports.CategoriesSuggestionWidgetSkeleton = exports.CategoriesSuggestionWidget = exports.CategoriesSkeleton = exports.CategoriesPopularWidgetSkeleton = exports.CategoriesPopularWidget = exports.Categories = exports.Calendar = exports.bytesToSize = exports.BroadcastMessagesSkeleton = exports.BroadcastMessages = exports.BottomNavigation = exports.BaseLightbox = exports.BaseItem = exports.BaseDialog = exports.AvatarGroupSkeleton = exports.AccountVerify = exports.AccountReset = exports.AccountRecover = exports.AccountDeleteButton = exports.AccountDelete = exports.AccountDataPortabilityButton = exports.AccountDataPortability = exports.AccountChangeMailValidation = exports.AcceptRequestUserEventButton = void 0;
|
|
4
|
+
exports.FeedUpdatesWidget = exports.FeedSkeleton = exports.FeedObjectSkeleton = exports.FeedObjectMediaPreview = exports.FeedObject = exports.Feed = exports.FACEBOOK_SHARE = exports.EventsSkeleton = exports.EventSkeleton = exports.Events = exports.EventParticipantsButton = exports.EventMembersWidgetSkeleton = exports.EventMembersWidget = exports.EventMediaWidgetSkeleton = exports.EventMediaWidget = exports.EventLocationWidgetSkeleton = exports.EventLocationWidget = exports.EventInviteButton = exports.EventInfoWidget = exports.EventInfoDetails = exports.EventHeaderSkeleton = exports.EventHeader = exports.EventActionsMenu = exports.Event = exports.EmailTextField = exports.EditorSkeleton = exports.Editor = exports.EditGroupButton = exports.EditEventButton = exports.DefaultHeaderContent = exports.DefaultDrawerContent = exports.DEFAULT_WIDGETS_NUMBER = exports.DEFAULT_PRELOAD_OFFSET_VIEWPORT = exports.DEFAULT_PAGINATION_QUERY_PARAM_NAME = exports.DEFAULT_PAGINATION_OFFSET = exports.DEFAULT_PAGINATION_LIMIT = exports.DEFAULT_FIELDS = exports.CustomAdvSkeleton = exports.CustomAdv = exports.EventFormDialog = exports.EventForm = exports.CreateGroupButton = exports.CreateEventWidgetSkeleton = exports.CreateEventWidget = exports.CreateEventButton = exports.ContributionUtils = exports.ConsentSolutionSkeleton = exports.ConsentSolutionButton = exports.ConsentSolution = exports.ConnectionUserButton = void 0;
|
|
5
|
+
exports.MAX_PRELOAD_OFFSET_VIEWPORT = exports.LoyaltyProgramWidgetSkeleton = exports.LoyaltyProgramWidget = exports.LogoSelfCommunity = exports.LocationAutocomplete = exports.LINKEDIN_SHARE = exports.Link = exports.Lightbox = exports.LEGAL_POLICIES = exports.LanguageSwitcher = exports.InviteUserEventButton = exports.InlineComposerWidgetSkeleton = exports.InlineComposerWidget = exports.InfiniteScroll = exports.IncubatorSuggestionWidget = exports.IncubatorSubscribeButton = exports.IncubatorListWidget = exports.IncubatorDetail = exports.Incubator = exports.HiddenPlaceholder = exports.GroupSubscribeButton = exports.GroupsSkeleton = exports.GroupSkeleton = exports.GroupSettingsIconButton = exports.Groups = exports.GroupRequestsWidgetSkeleton = exports.GroupRequestsWidget = exports.GroupMembersWidgetSkeleton = exports.GroupMembersWidget = exports.GroupMembersButton = exports.GroupInvitedWidgetSkeleton = exports.GroupInvitedWidget = exports.GroupInviteButton = exports.GroupInfoWidgetSkeleton = exports.GroupInfoWidget = exports.GroupHeaderSkeleton = exports.GroupHeader = exports.GroupForm = exports.GroupActionsMenu = exports.Group = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.getRelativeTime = exports.GenericSkeleton = exports.FriendshipUserButton = exports.FooterSkeleton = exports.Footer = exports.FollowUserButton = exports.File = exports.FeedUpdatesWidgetSkeleton = void 0;
|
|
6
|
+
exports.RelatedEventsWidget = exports.ProgressBar = exports.PrivateMessageThreadSkeleton = exports.PrivateMessageThreadItemSkeleton = exports.PrivateMessageThreadItem = exports.PrivateMessageThread = exports.PrivateMessageSnippetsSkeleton = exports.PrivateMessageSnippets = exports.PrivateMessageSnippetItemSkeleton = exports.PrivateMessageSnippetItem = exports.PrivateMessageSettingsIconButton = exports.PrivateMessageEditorSkeleton = exports.PrivateMessageEditor = exports.PrivateMessageComponentSkeleton = exports.PrivateMessageComponent = exports.PollSuggestionWidget = exports.PlatformWidgetSkeleton = exports.PlatformWidget = exports.PhoneTextField = exports.PasswordTextField = exports.OnBoardingWidgetSkeleton = exports.OnBoardingWidget = exports.NotificationSkeleton = exports.Notification = exports.NavigationToolbarSkeleton = exports.NavigationToolbarMobileSkeleton = exports.NavigationToolbarMobile = exports.NavigationToolbar = exports.NavigationSettingsIconButton = exports.NavigationMenuIconButton = exports.NavigationMenuHeader = exports.NavigationMenuDrawer = exports.NavigationMenuContent = exports.MyEventsWidgetSkeleton = exports.MyEventsWidget = exports.MIN_PRELOAD_OFFSET_VIEWPORT = exports.MetadataField = exports.MessageUploaderUtils = exports.MediaChunkUploader = exports.MEDIA_TYPE_VIDEO = exports.MEDIA_TYPE_URL = exports.MEDIA_TYPE_SHARE = exports.MEDIA_TYPE_LINK = exports.MEDIA_TYPE_IMAGE = exports.MEDIA_TYPE_EVENT = exports.MEDIA_TYPE_EMBED = exports.MEDIA_TYPE_DOCUMENT = exports.MEDIA_EMBED_SC_SHARED_OBJECT = exports.MEDIA_EMBED_SC_SHARED_EVENT = exports.MEDIA_EMBED_SC_LINK_TYPE = void 0;
|
|
7
|
+
exports.UserProfileEditSectionPublicInfo = exports.UserProfileEditSectionAccount = exports.UserProfileEdit = exports.UserProfileBlocked = exports.UsernameTextField = exports.UserInfoSkeleton = exports.UserInfoDialog = exports.UserInfo = exports.UserFollowersWidgetSkeleton = exports.UserFollowersWidget = exports.UserFollowedUsersWidgetSkeleton = exports.UserFollowedUsersWidget = exports.UserFollowedCategoriesWidgetSkeleton = exports.UserFollowedCategoriesWidget = exports.UserDeletedSnackBar = exports.UserCounters = exports.UserConnectionsWidgetSkeleton = exports.UserConnectionsWidget = exports.UserConnectionsRequestsWidgetSkeleton = exports.UserConnectionsRequestsWidget = exports.UserConnectionsRequestsSentWidgetSkeleton = exports.UserConnectionsRequestsSentWidget = exports.UserAvatar = exports.UserActionIconButton = exports.User = exports.UrlTextField = exports.ToastNotificationsSkeleton = exports.ToastNotifications = exports.TagChip = exports.SuggestedEventsWidgetSkeleton = exports.SuggestedEventsWidget = exports.StickyBox = exports.SnippetNotificationsSkeleton = exports.SnippetNotifications = exports.Share = exports.SearchDialog = exports.SearchAutocomplete = exports.SCUserSocialAssociations = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCEventTemplateType = exports.SCCommentsOrderBy = exports.SCBroadcastMessageTemplateType = exports.ReplyComment = exports.RelatedFeedObjectsWidgetSkeleton = exports.RelatedFeedObjectsWidget = exports.RelatedEventsWidgetSkeleton = void 0;
|
|
8
|
+
exports.X_SHARE = exports.Widget = exports.useStickyBox = exports.UserSuggestionWidgetSkeleton = exports.UserSuggestionWidget = exports.UserSubscribedGroupsWidgetSkeleton = exports.UserSubscribedGroupsWidget = exports.UserSocialAssociation = exports.UserSkeleton = exports.UserProfileHeaderSkeleton = exports.UserProfileHeader = exports.UserProfileEditSkeleton = exports.UserProfileEditSectionSettings = void 0;
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
10
|
/**
|
|
11
11
|
* Components
|
|
@@ -96,6 +96,10 @@ exports.CreateEventButton = CreateEventButton_1.default;
|
|
|
96
96
|
const CreateEventWidget_1 = tslib_1.__importStar(require("./components/CreateEventWidget"));
|
|
97
97
|
exports.CreateEventWidget = CreateEventWidget_1.default;
|
|
98
98
|
Object.defineProperty(exports, "CreateEventWidgetSkeleton", { enumerable: true, get: function () { return CreateEventWidget_1.CreateEventWidgetSkeleton; } });
|
|
99
|
+
const EventForm_1 = tslib_1.__importDefault(require("./components/EventForm"));
|
|
100
|
+
exports.EventForm = EventForm_1.default;
|
|
101
|
+
const EventFormDialog_1 = tslib_1.__importDefault(require("./components/EventFormDialog"));
|
|
102
|
+
exports.EventFormDialog = EventFormDialog_1.default;
|
|
99
103
|
const CreateGroupButton_1 = tslib_1.__importDefault(require("./components/CreateGroupButton"));
|
|
100
104
|
exports.CreateGroupButton = CreateGroupButton_1.default;
|
|
101
105
|
const CustomAdv_1 = tslib_1.__importStar(require("./components/CustomAdv"));
|
|
@@ -121,6 +125,9 @@ exports.EventInviteButton = EventInviteButton_1.default;
|
|
|
121
125
|
const EventLocationWidget_1 = tslib_1.__importStar(require("./components/EventLocationWidget"));
|
|
122
126
|
exports.EventLocationWidget = EventLocationWidget_1.default;
|
|
123
127
|
Object.defineProperty(exports, "EventLocationWidgetSkeleton", { enumerable: true, get: function () { return EventLocationWidget_1.EventLocationWidgetSkeleton; } });
|
|
128
|
+
const EventMediaWidget_1 = tslib_1.__importStar(require("./components/EventMediaWidget"));
|
|
129
|
+
exports.EventMediaWidget = EventMediaWidget_1.default;
|
|
130
|
+
Object.defineProperty(exports, "EventMediaWidgetSkeleton", { enumerable: true, get: function () { return EventMediaWidget_1.EventMediaWidgetSkeleton; } });
|
|
124
131
|
const EventMembersWidget_1 = tslib_1.__importStar(require("./components/EventMembersWidget"));
|
|
125
132
|
exports.EventMembersWidget = EventMembersWidget_1.default;
|
|
126
133
|
Object.defineProperty(exports, "EventMembersWidgetSkeleton", { enumerable: true, get: function () { return EventMembersWidget_1.EventMembersWidgetSkeleton; } });
|
|
@@ -204,8 +211,8 @@ Object.defineProperty(exports, "MyEventsWidgetSkeleton", { enumerable: true, get
|
|
|
204
211
|
const NavigationMenuIconButton_1 = tslib_1.__importStar(require("./components/NavigationMenuIconButton"));
|
|
205
212
|
exports.NavigationMenuIconButton = NavigationMenuIconButton_1.default;
|
|
206
213
|
Object.defineProperty(exports, "NavigationMenuContent", { enumerable: true, get: function () { return NavigationMenuIconButton_1.NavigationMenuContent; } });
|
|
207
|
-
Object.defineProperty(exports, "NavigationMenuHeader", { enumerable: true, get: function () { return NavigationMenuIconButton_1.NavigationMenuHeader; } });
|
|
208
214
|
Object.defineProperty(exports, "NavigationMenuDrawer", { enumerable: true, get: function () { return NavigationMenuIconButton_1.NavigationMenuDrawer; } });
|
|
215
|
+
Object.defineProperty(exports, "NavigationMenuHeader", { enumerable: true, get: function () { return NavigationMenuIconButton_1.NavigationMenuHeader; } });
|
|
209
216
|
const DefaultDrawerContent_1 = tslib_1.__importDefault(require("./components/NavigationMenuIconButton/DefaultDrawerContent"));
|
|
210
217
|
exports.DefaultDrawerContent = DefaultDrawerContent_1.default;
|
|
211
218
|
const DefaultHeaderContent_1 = tslib_1.__importDefault(require("./components/NavigationMenuIconButton/DefaultHeaderContent"));
|
|
@@ -352,8 +359,9 @@ const HiddenPlaceholder_1 = tslib_1.__importDefault(require("./shared/HiddenPlac
|
|
|
352
359
|
exports.HiddenPlaceholder = HiddenPlaceholder_1.default;
|
|
353
360
|
const LanguageSwitcher_1 = tslib_1.__importDefault(require("./shared/LanguageSwitcher"));
|
|
354
361
|
exports.LanguageSwitcher = LanguageSwitcher_1.default;
|
|
355
|
-
const Lightbox_1 = tslib_1.
|
|
356
|
-
exports.
|
|
362
|
+
const Lightbox_1 = tslib_1.__importStar(require("./shared/Lightbox"));
|
|
363
|
+
exports.BaseLightbox = Lightbox_1.default;
|
|
364
|
+
Object.defineProperty(exports, "Lightbox", { enumerable: true, get: function () { return Lightbox_1.Lightbox; } });
|
|
357
365
|
const Media_2 = require("./shared/Media");
|
|
358
366
|
Object.defineProperty(exports, "File", { enumerable: true, get: function () { return Media_2.File; } });
|
|
359
367
|
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return Media_2.Link; } });
|
|
@@ -382,13 +390,13 @@ exports.UsernameTextField = UsernameTextField_1.default;
|
|
|
382
390
|
const types_1 = require("./types");
|
|
383
391
|
Object.defineProperty(exports, "SCBroadcastMessageTemplateType", { enumerable: true, get: function () { return types_1.SCBroadcastMessageTemplateType; } });
|
|
384
392
|
Object.defineProperty(exports, "SCCommentsOrderBy", { enumerable: true, get: function () { return types_1.SCCommentsOrderBy; } });
|
|
393
|
+
Object.defineProperty(exports, "SCEventTemplateType", { enumerable: true, get: function () { return types_1.SCEventTemplateType; } });
|
|
385
394
|
Object.defineProperty(exports, "SCFeedObjectActivitiesType", { enumerable: true, get: function () { return types_1.SCFeedObjectActivitiesType; } });
|
|
386
395
|
Object.defineProperty(exports, "SCFeedObjectTemplateType", { enumerable: true, get: function () { return types_1.SCFeedObjectTemplateType; } });
|
|
387
396
|
Object.defineProperty(exports, "SCNotificationObjectTemplateType", { enumerable: true, get: function () { return types_1.SCNotificationObjectTemplateType; } });
|
|
388
397
|
Object.defineProperty(exports, "SCUserProfileFields", { enumerable: true, get: function () { return types_1.SCUserProfileFields; } });
|
|
389
398
|
Object.defineProperty(exports, "SCUserProfileSettings", { enumerable: true, get: function () { return types_1.SCUserProfileSettings; } });
|
|
390
399
|
Object.defineProperty(exports, "SCUserSocialAssociations", { enumerable: true, get: function () { return types_1.SCUserSocialAssociations; } });
|
|
391
|
-
Object.defineProperty(exports, "SCEventTemplateType", { enumerable: true, get: function () { return types_1.SCEventTemplateType; } });
|
|
392
400
|
/**
|
|
393
401
|
* Constants
|
|
394
402
|
*/
|
|
@@ -410,9 +418,6 @@ Object.defineProperty(exports, "LINKEDIN_SHARE", { enumerable: true, get: functi
|
|
|
410
418
|
Object.defineProperty(exports, "X_SHARE", { enumerable: true, get: function () { return SocialShare_1.X_SHARE; } });
|
|
411
419
|
const UserProfile_1 = require("./constants/UserProfile");
|
|
412
420
|
Object.defineProperty(exports, "DEFAULT_FIELDS", { enumerable: true, get: function () { return UserProfile_1.DEFAULT_FIELDS; } });
|
|
413
|
-
const PubSub_1 = require("./constants/PubSub");
|
|
414
|
-
Object.defineProperty(exports, "SCTopicType", { enumerable: true, get: function () { return PubSub_1.SCTopicType; } });
|
|
415
|
-
Object.defineProperty(exports, "SCGroupEventType", { enumerable: true, get: function () { return PubSub_1.SCGroupEventType; } });
|
|
416
421
|
/**
|
|
417
422
|
* Utilities
|
|
418
423
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MouseEvent, TouchEvent } from 'react';
|
|
2
|
+
import { PhotoProviderBase } from 'react-photo-view/dist/types';
|
|
3
|
+
import { DataType } from '../../types/lightbox';
|
|
4
|
+
/**
|
|
5
|
+
* Overrides/extends the styles applied to the component.
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
export interface BaseLightboxProps extends PhotoProviderBase {
|
|
9
|
+
className?: string;
|
|
10
|
+
images: DataType[];
|
|
11
|
+
index?: number;
|
|
12
|
+
onIndexChange?: (index: number) => void;
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
onClose?: (evt?: MouseEvent | TouchEvent) => void;
|
|
15
|
+
afterClose?: () => void;
|
|
16
|
+
toolbarButtons?: JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
declare const BaseLightbox: (props: BaseLightboxProps) => JSX.Element;
|
|
19
|
+
export default BaseLightbox;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_photo_view_1 = require("react-photo-view");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
10
|
+
const classes = {
|
|
11
|
+
root: `${constants_1.PREFIX}-root`
|
|
12
|
+
};
|
|
13
|
+
const Root = (0, styles_1.styled)(react_photo_view_1.PhotoSlider, {
|
|
14
|
+
name: constants_1.PREFIX,
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
overridesResolver: (_props, styles) => styles.root
|
|
17
|
+
})(() => ({}));
|
|
18
|
+
const BaseLightbox = (props) => {
|
|
19
|
+
const { images = [], index, onClose, visible = true, afterClose, onIndexChange, toolbarRender, toolbarButtons } = props, rest = tslib_1.__rest(props, ["images", "index", "onClose", "visible", "afterClose", "onIndexChange", "toolbarRender", "toolbarButtons"]);
|
|
20
|
+
// STATE
|
|
21
|
+
const [currentImageIndex, setCurrentImageIndex] = (0, react_1.useState)(index || 0);
|
|
22
|
+
const handleIndexChange = (0, react_1.useCallback)((index) => {
|
|
23
|
+
onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(index);
|
|
24
|
+
setCurrentImageIndex(index);
|
|
25
|
+
}, [onIndexChange, setCurrentImageIndex]);
|
|
26
|
+
/**
|
|
27
|
+
* Renders root object
|
|
28
|
+
*/
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: classes.root, images: images, visible: visible && index !== -1, index: currentImageIndex, onIndexChange: handleIndexChange, onClose: onClose, afterClose: afterClose, loadingElement: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: 'primary' }), toolbarRender: toolbarRender
|
|
30
|
+
? toolbarRender
|
|
31
|
+
: () => {
|
|
32
|
+
return toolbarButtons;
|
|
33
|
+
} })));
|
|
34
|
+
};
|
|
35
|
+
exports.default = BaseLightbox;
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { SCMediaType } from '@selfcommunity/types/src/types';
|
|
2
|
+
export interface LightboxProps {
|
|
3
|
+
/**
|
|
4
|
+
* Images objs
|
|
5
|
+
* @default []
|
|
6
|
+
*/
|
|
7
|
+
medias: SCMediaType[];
|
|
8
|
+
/**
|
|
9
|
+
* Obj index
|
|
10
|
+
* @default 0
|
|
11
|
+
*/
|
|
12
|
+
index: number;
|
|
13
|
+
/**
|
|
14
|
+
* Toolbar
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
toolbarButtons?: JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Handles on close
|
|
20
|
+
* @default () => void
|
|
21
|
+
*/
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Handles on index change
|
|
25
|
+
* @default undefined
|
|
26
|
+
*/
|
|
12
27
|
onIndexChange?: (index: number) => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Any other properties
|
|
30
|
+
*/
|
|
31
|
+
[p: string]: any;
|
|
17
32
|
}
|
|
18
|
-
|
|
19
|
-
export default ReactImageLightbox;
|
|
33
|
+
export default function Lightbox(props: LightboxProps): JSX.Element;
|
|
@@ -2,29 +2,26 @@
|
|
|
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 react_1 = require("react");
|
|
6
5
|
const styles_1 = require("@mui/material/styles");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const BaseLightbox_1 = tslib_1.__importDefault(require("./BaseLightbox"));
|
|
8
|
+
const constants_1 = require("./constants");
|
|
10
9
|
const classes = {
|
|
11
|
-
root: `${PREFIX}-root`
|
|
10
|
+
root: `${constants_1.PREFIX}-lightbox-root`
|
|
12
11
|
};
|
|
13
|
-
const Root = (0, styles_1.styled)(
|
|
14
|
-
name: PREFIX,
|
|
15
|
-
slot: '
|
|
16
|
-
overridesResolver: (props, styles) => styles.root
|
|
12
|
+
const Root = (0, styles_1.styled)(BaseLightbox_1.default, {
|
|
13
|
+
name: constants_1.PREFIX,
|
|
14
|
+
slot: 'LightboxRoot'
|
|
17
15
|
})(() => ({}));
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
16
|
+
function Lightbox(props) {
|
|
17
|
+
// PROPS
|
|
18
|
+
const { medias = [], index = 0, toolbarButtons, onClose, onIndexChange } = props, rest = tslib_1.__rest(props, ["medias", "index", "toolbarButtons", "onClose", "onIndexChange"]);
|
|
19
|
+
const mediaToDataTypeMap = (0, react_1.useCallback)((media, index) => {
|
|
20
|
+
return { src: media.image, width: media.image_width, height: media.image_height, key: index };
|
|
21
|
+
}, []);
|
|
23
22
|
/**
|
|
24
23
|
* Renders root object
|
|
25
24
|
*/
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: classes.root, images:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
exports.default = ReactImageLightbox;
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: classes.root, images: medias.map(mediaToDataTypeMap), visible: index !== -1, onClose: onClose, index: index, onIndexChange: onIndexChange, toolbarButtons: toolbarButtons })));
|
|
26
|
+
}
|
|
27
|
+
exports.default = Lightbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCLightbox";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import BaseLightbox, { BaseLightboxProps } from './BaseLightbox';
|
|
2
|
+
import Lightbox, { LightboxProps } from './Lightbox';
|
|
3
|
+
export default BaseLightbox;
|
|
4
|
+
export { BaseLightboxProps, Lightbox, LightboxProps };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Lightbox = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const BaseLightbox_1 = tslib_1.__importDefault(require("./BaseLightbox"));
|
|
4
6
|
const Lightbox_1 = tslib_1.__importDefault(require("./Lightbox"));
|
|
5
|
-
exports.
|
|
7
|
+
exports.Lightbox = Lightbox_1.default;
|
|
8
|
+
exports.default = BaseLightbox_1.default;
|
|
@@ -2,13 +2,15 @@
|
|
|
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 react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const styles_1 = require("@mui/material/styles");
|
|
7
|
-
const Lightbox_1 = tslib_1.__importDefault(require("./Lightbox"));
|
|
8
5
|
const material_1 = require("@mui/material");
|
|
9
|
-
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
6
|
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
7
|
+
const styles_1 = require("@mui/material/styles");
|
|
8
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
|
+
const Media_1 = require("../../../constants/Media");
|
|
11
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
11
12
|
const react_intersection_observer_1 = require("react-intersection-observer");
|
|
13
|
+
const Lightbox_1 = require("../../Lightbox");
|
|
12
14
|
const constants_1 = require("./constants");
|
|
13
15
|
const filter_1 = tslib_1.__importDefault(require("./filter"));
|
|
14
16
|
const classes = {
|
|
@@ -30,18 +32,20 @@ const classes = {
|
|
|
30
32
|
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
31
33
|
name: constants_1.PREFIX,
|
|
32
34
|
slot: 'DisplayRoot'
|
|
33
|
-
})(({
|
|
35
|
+
})(({}) => ({}));
|
|
34
36
|
exports.default = (props) => {
|
|
35
37
|
// PROPS
|
|
36
38
|
const { className = '', medias = [], maxVisible = 5, gallery = true, onMediaClick = null } = props;
|
|
37
39
|
// STATE
|
|
38
40
|
const [preview, setPreview] = (0, react_1.useState)(-1);
|
|
41
|
+
const [toolbarButtons, setToolbarButtons] = (0, react_1.useState)(undefined);
|
|
39
42
|
const { ref, inView } = (0, react_intersection_observer_1.useInView)({ triggerOnce: false });
|
|
40
43
|
// MEMO
|
|
41
44
|
const _medias = (0, react_1.useMemo)(() => medias.filter(filter_1.default), [medias]);
|
|
42
45
|
// HANDLERS
|
|
43
46
|
const handleClose = () => {
|
|
44
47
|
setPreview(-1);
|
|
48
|
+
setToolbarButtons(undefined);
|
|
45
49
|
};
|
|
46
50
|
// UTILS
|
|
47
51
|
const getImageUrl = (image, original = false) => {
|
|
@@ -113,6 +117,19 @@ exports.default = (props) => {
|
|
|
113
117
|
more && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.coverText, style: { fontSize: '200%' } }, { children: (0, jsx_runtime_1.jsxs)("p", { children: ["+", extra] }) }), "count-sub"))
|
|
114
118
|
];
|
|
115
119
|
};
|
|
120
|
+
const handleIndexChange = (0, react_1.useCallback)((index) => {
|
|
121
|
+
if (_medias[index].type === Media_1.MEDIA_TYPE_DOCUMENT) {
|
|
122
|
+
setToolbarButtons((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ component: react_core_1.Link, to: medias[index].url, target: "_blank", color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "download" }) })));
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
setToolbarButtons(undefined);
|
|
126
|
+
}
|
|
127
|
+
}, [_medias, setToolbarButtons]);
|
|
128
|
+
(0, react_1.useEffect)(() => {
|
|
129
|
+
if (preview !== -1) {
|
|
130
|
+
handleIndexChange(preview);
|
|
131
|
+
}
|
|
132
|
+
}, [preview]);
|
|
116
133
|
const imagesToShow = [..._medias];
|
|
117
134
|
if (maxVisible && _medias.length > maxVisible) {
|
|
118
135
|
imagesToShow.length = maxVisible;
|
|
@@ -120,5 +137,5 @@ exports.default = (props) => {
|
|
|
120
137
|
if (_medias.length === 0) {
|
|
121
138
|
return null;
|
|
122
139
|
}
|
|
123
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.displayRoot, className) }, { children: [[1, 3, 4].includes(imagesToShow.length) && renderOne(), imagesToShow.length >= 2 && imagesToShow.length != 4 && renderTwo(), imagesToShow.length >= 4 && renderThree(), preview !== -1 && (0, jsx_runtime_1.jsx)(Lightbox_1.
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.displayRoot, className) }, { children: [[1, 3, 4].includes(imagesToShow.length) && renderOne(), imagesToShow.length >= 2 && imagesToShow.length != 4 && renderTwo(), imagesToShow.length >= 4 && renderThree(), preview !== -1 && ((0, jsx_runtime_1.jsx)(Lightbox_1.Lightbox, { onClose: handleClose, index: preview, medias: _medias, toolbarButtons: toolbarButtons, onIndexChange: handleIndexChange }))] })));
|
|
124
141
|
};
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const chunked_uploady_1 = require("@rpldy/chunked-uploady");
|
|
5
|
+
const uploady_1 = require("@rpldy/uploady");
|
|
5
6
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
6
7
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
7
|
-
const
|
|
8
|
-
const hash_1 = require("../../utils/hash");
|
|
8
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
9
9
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
10
10
|
const react_intl_1 = require("react-intl");
|
|
11
|
-
const common_1 = tslib_1.__importDefault(require("../../messages/common"));
|
|
12
|
-
const utils_1 = require("@selfcommunity/utils");
|
|
13
11
|
const Errors_1 = require("../../constants/Errors");
|
|
12
|
+
const common_1 = tslib_1.__importDefault(require("../../messages/common"));
|
|
13
|
+
const hash_1 = require("../../utils/hash");
|
|
14
14
|
exports.default = (props) => {
|
|
15
15
|
// PROPS
|
|
16
16
|
const { type = null, onSuccess = null, onProgress = null, onError = null } = props;
|
|
@@ -55,7 +55,7 @@ exports.default = (props) => {
|
|
|
55
55
|
// @ts-ignore
|
|
56
56
|
reader.readAsDataURL(item.file);
|
|
57
57
|
}
|
|
58
|
-
chunkStateRef.current.setChunk({ id: item.id, [
|
|
58
|
+
chunkStateRef.current.setChunk({ id: item.id, ['upload_id']: null, completed: 0, name: item.file.name });
|
|
59
59
|
});
|
|
60
60
|
(0, uploady_1.useItemProgressListener)((item) => {
|
|
61
61
|
chunkStateRef.current.setChunk({ id: item.id, completed: item.completed });
|
|
@@ -102,7 +102,7 @@ exports.default = (props) => {
|
|
|
102
102
|
sendOptions: {
|
|
103
103
|
paramName: 'image',
|
|
104
104
|
method: api_services_1.Endpoints.ComposerChunkUploadMedia.method,
|
|
105
|
-
formatServerResponse: (response, status,
|
|
105
|
+
formatServerResponse: (response, status, _headers) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
106
106
|
if (status === 401) {
|
|
107
107
|
yield refreshSession();
|
|
108
108
|
}
|
|
@@ -111,7 +111,7 @@ exports.default = (props) => {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
if (chunkStateRef.current.chunks[data.item.id].upload_id) {
|
|
114
|
-
res.sendOptions.params = { [
|
|
114
|
+
res.sendOptions.params = { ['upload_id']: chunkStateRef.current.chunks[data.item.id].upload_id };
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
117
|
chunkStateRef.current.setChunk({ id: data.item.id, type: type || data.sendOptions.paramName });
|
|
@@ -120,12 +120,14 @@ exports.default = (props) => {
|
|
|
120
120
|
});
|
|
121
121
|
(0, chunked_uploady_1.useChunkFinishListener)((data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
122
122
|
const _data = yield data.uploadData.response.data;
|
|
123
|
-
chunkStateRef.current.setChunk({ id: data.item.id, [
|
|
123
|
+
chunkStateRef.current.setChunk({ id: data.item.id, ['upload_id']: _data.upload_id });
|
|
124
124
|
}));
|
|
125
125
|
(0, chunked_uploady_1.useRequestPreSend)(({ items, options }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
126
|
-
const destination = ['JWT', 'OAuth'].includes(scContext.settings.session.type)
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const destination = ['JWT', 'OAuth'].includes(scContext.settings.session.type)
|
|
127
|
+
? {
|
|
128
|
+
headers: { Authorization: `Bearer ${scContext.settings.session.authToken.accessToken}` }
|
|
129
|
+
}
|
|
130
|
+
: {};
|
|
129
131
|
if (items.length == 0) {
|
|
130
132
|
return Promise.resolve({ options, destination });
|
|
131
133
|
}
|
package/lib/cjs/utils/hash.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { BatchFile } from '@rpldy/shared';
|
|
2
|
+
export declare const md5: (file: BatchFile['file'], chunkSize: number, callback: (arg: any) => void) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material/Button/Button';
|
|
2
|
-
import {
|
|
2
|
+
import { EventFormDialogProps } from '../EventFormDialog';
|
|
3
3
|
export interface CreateEventButtonProps extends ButtonProps {
|
|
4
4
|
/**
|
|
5
5
|
* Overrides or extends the styles applied to the component.
|
|
@@ -10,7 +10,7 @@ export interface CreateEventButtonProps extends ButtonProps {
|
|
|
10
10
|
* Props to spread to CreateGroup component
|
|
11
11
|
* @default empty object
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
EventFormDialogComponentProps?: EventFormDialogProps;
|
|
14
14
|
/**
|
|
15
15
|
* Any other properties
|
|
16
16
|
*/
|
|
@@ -7,7 +7,7 @@ import { SCPreferences, SCUserContext, useSCPreferences } from '@selfcommunity/r
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React, { useContext, useMemo } from 'react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl';
|
|
10
|
-
import
|
|
10
|
+
import EventFormDialog from '../EventFormDialog';
|
|
11
11
|
import { SCFeatureName } from '@selfcommunity/types';
|
|
12
12
|
const PREFIX = 'SCCreateEventButton';
|
|
13
13
|
const classes = {
|
|
@@ -38,13 +38,13 @@ const Root = styled(Button, {
|
|
|
38
38
|
* @param inProps
|
|
39
39
|
*/
|
|
40
40
|
export default function CreateEventButton(inProps) {
|
|
41
|
-
var _a;
|
|
41
|
+
var _a, _b;
|
|
42
42
|
//PROPS
|
|
43
43
|
const props = useThemeProps({
|
|
44
44
|
props: inProps,
|
|
45
45
|
name: PREFIX
|
|
46
46
|
});
|
|
47
|
-
const { className,
|
|
47
|
+
const { className, EventFormDialogComponentProps = {}, children } = props, rest = __rest(props, ["className", "EventFormDialogComponentProps", "children"]);
|
|
48
48
|
// CONTEXT
|
|
49
49
|
const scUserContext = useContext(SCUserContext);
|
|
50
50
|
// STATE
|
|
@@ -76,5 +76,5 @@ export default function CreateEventButton(inProps) {
|
|
|
76
76
|
/**
|
|
77
77
|
* Renders root object
|
|
78
78
|
*/
|
|
79
|
-
return (_jsxs(React.Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClick, variant: "contained", color: "secondary", startIcon: !
|
|
79
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClick, variant: "contained", color: "secondary", startIcon: !((_b = EventFormDialogComponentProps.EventFormComponentProps) === null || _b === void 0 ? void 0 : _b.event) && _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "add" })) }, rest, { children: children !== null && children !== void 0 ? children : _jsx(FormattedMessage, { id: "ui.createEventButton", defaultMessage: "ui.createEventButton" }) })), open && _jsx(EventFormDialog, Object.assign({}, EventFormDialogComponentProps, { open: true, onClose: handleClick }))] }));
|
|
80
80
|
}
|
|
@@ -53,5 +53,5 @@ export default function EditEventButton(inProps) {
|
|
|
53
53
|
/**
|
|
54
54
|
* Renders root object
|
|
55
55
|
*/
|
|
56
|
-
return (_jsx(Root, Object.assign({ variant: "outlined", className: classNames(classes.root, className),
|
|
56
|
+
return (_jsx(Root, Object.assign({ variant: "outlined", className: classNames(classes.root, className), EventFormDialogComponentProps: { EventFormComponentProps: { event: scEvent, onSuccess: handleSuccess } } }, rest, { children: _jsx(FormattedMessage, { id: "ui.editEventButton", defaultMessage: "ui.editEventButton" }) })));
|
|
57
57
|
}
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
1
2
|
import { SCEventType } from '@selfcommunity/types';
|
|
2
|
-
|
|
3
|
-
export interface EventFormProps extends BaseDialogProps {
|
|
3
|
+
export interface EventFormProps extends BoxProps {
|
|
4
4
|
/**
|
|
5
5
|
* Overrides or extends the styles applied to the component.
|
|
6
6
|
* @default null
|
|
7
7
|
*/
|
|
8
8
|
className?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Open dialog
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
open?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* On dialog close callback function
|
|
16
|
-
* @default null
|
|
17
|
-
*/
|
|
18
|
-
onClose?: () => void;
|
|
19
9
|
/**
|
|
20
10
|
* Event Object
|
|
21
11
|
* @default null
|
|
@@ -26,6 +16,11 @@ export interface EventFormProps extends BaseDialogProps {
|
|
|
26
16
|
* @default null
|
|
27
17
|
*/
|
|
28
18
|
onSuccess?: (data: SCEventType) => void;
|
|
19
|
+
/**
|
|
20
|
+
* On error callback function
|
|
21
|
+
* @default null
|
|
22
|
+
*/
|
|
23
|
+
onError?: (error: any) => void;
|
|
29
24
|
/**
|
|
30
25
|
* Any other properties
|
|
31
26
|
*/
|