@layers-app/shared 0.4.7 → 0.4.8
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/dist/assets/default-workspace-avatar.jpg.js +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +76 -71
- package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
- package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
- package/dist/components/AppContainer/components/NavbarContent.js +16 -2
- package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
- package/dist/components/AppContainer/types.d.ts +12 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +0 -2
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +17 -22
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +120 -172
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -32
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
- package/dist/components/Chat/ChatInput/index.d.ts +13 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +264 -164
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
- package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +153 -118
- package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
- package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
- package/dist/components/Chat/MessageActions/index.d.ts +2 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +188 -50
- package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageAuthor/index.js +39 -25
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
- package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
- package/dist/components/Chat/MessageList/index.d.ts +17 -25
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +201 -149
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +83 -72
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
- package/dist/components/ColorPicker/icons.js +5 -5
- package/dist/components/ColorPicker/types.d.ts +6 -0
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +53 -11
- package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
- package/dist/components/ColorPicker/useRecentColors.js +43 -20
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
- package/dist/components/CommentComposer/index.d.ts +1 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +70 -68
- package/dist/components/CommentComposer/types.d.ts +6 -0
- package/dist/components/CommentComposer/types.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/CustomKBD/index.js +21 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +81 -80
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
- package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +33 -17
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
- package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.js +42 -0
- package/dist/components/Notification/Notification.d.ts +4 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.module.css.js +28 -4
- package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
- package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ActionBadge.js +53 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/InboxIcon.js +33 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.js +32 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
- package/dist/components/Notification/atoms/UnreadDot.js +23 -0
- package/dist/components/Notification/atoms/index.d.ts +5 -0
- package/dist/components/Notification/atoms/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/index.d.ts +8 -0
- package/dist/components/Notification/hooks/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.js +58 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
- package/dist/components/Notification/lib/api.d.ts +4 -0
- package/dist/components/Notification/lib/api.d.ts.map +1 -0
- package/dist/components/Notification/lib/api.js +19 -0
- package/dist/components/Notification/lib/index.d.ts +5 -0
- package/dist/components/Notification/lib/index.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.d.ts +10 -0
- package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.js +131 -0
- package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
- package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
- package/dist/components/Notification/lib/stripHtml.js +6 -0
- package/dist/components/Notification/lib/types.d.ts +45 -0
- package/dist/components/Notification/lib/types.d.ts.map +1 -0
- package/dist/components/Notification/lib/types.js +9 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxHeader.js +73 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxTabs.js +60 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationActions.js +64 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationContent.js +183 -0
- package/dist/components/Notification/molecules/index.d.ts +7 -0
- package/dist/components/Notification/molecules/index.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.js +100 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxPanel.js +99 -0
- package/dist/components/Notification/organisms/index.d.ts +3 -0
- package/dist/components/Notification/organisms/index.d.ts.map +1 -0
- package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +27 -26
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/envConfig.d.ts +2 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +29 -28
- package/dist/helpers/getFileIcons.js +5 -5
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +11 -2
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +1 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +560 -571
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
- package/docs/README.md +499 -499
- package/package.json +80 -79
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +0 -15
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +0 -36
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +0 -14
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +0 -31
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +0 -18
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +0 -35
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +0 -33
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +0 -70
- package/dist/components/Notification/Notification.js +0 -119
- package/dist/components/Notification/NotificationCard.d.ts +0 -10
- package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
- package/dist/components/Notification/NotificationCard.js +0 -93
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -24
- package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +0 -1
- package/dist/components/VideoPlayer/VideoPlayer.js +0 -727
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +0 -8
- package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/MobileDrawer/index.js +0 -67
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +0 -7
- package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/SelectListOptionButton.js +0 -44
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +0 -9
- package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/StoryboardPreview.js +0 -38
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +0 -33
- package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoCustomControls.js +0 -601
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts +0 -25
- package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoIcons.js +0 -145
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts +0 -27
- package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoMenu.js +0 -77
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +0 -17
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +0 -289
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +0 -55
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSelect.js +0 -168
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +0 -12
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +0 -48
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +0 -25
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +0 -384
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +0 -21
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +0 -264
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +0 -39
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +0 -360
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +0 -16
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +0 -4
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +0 -14
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +0 -22
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +0 -211
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +0 -11
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +0 -41
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +0 -10
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +0 -69
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +0 -21
- package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +0 -1
- package/dist/components/VideoPlayer/hooks/useStoryboard.js +0 -91
- package/dist/components/VideoPlayer/index.d.ts +0 -11
- package/dist/components/VideoPlayer/index.d.ts.map +0 -1
- package/dist/components/VideoPlayer/types.d.ts +0 -101
- package/dist/components/VideoPlayer/types.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/chapters.d.ts +0 -8
- package/dist/components/VideoPlayer/utils/chapters.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/chapters.js +0 -38
- package/dist/components/VideoPlayer/utils/storyboard.d.ts +0 -5
- package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/storyboard.js +0 -47
- package/dist/components/VideoPlayer/utils/subtitles.d.ts +0 -18
- package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/subtitles.js +0 -23
- package/dist/components/VideoPlayer/utils/touch.d.ts +0 -3
- package/dist/components/VideoPlayer/utils/touch.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/touch.js +0 -5
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +0 -10
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +0 -22
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts +0 -69
- package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +0 -1
- package/dist/components/VideoPlayer/utils/videoSettings.js +0 -90
- package/dist/videoSettings/createVideoSettingsDataSource.d.ts +0 -19
- package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +0 -1
- package/dist/videoSettings/createVideoSettingsDataSource.js +0 -127
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useState as l, useRef as $, useMemo as R, useCallback as x, useEffect as b } from "react";
|
|
3
|
-
import { Image02Icon as te, AlertCircleIcon as oe, ArrowLeft01Icon as se, ArrowRight01Icon as ne } from "@hugeicons/core-free-icons";
|
|
4
|
-
import { HugeiconsIcon as E } from "@hugeicons/react";
|
|
5
|
-
import { Carousel as P } from "@mantine/carousel";
|
|
6
|
-
import { Stack as ie, Text as j, Group as ce, Button as le, Box as U, Loader as ae } from "@mantine/core";
|
|
7
|
-
import { Dropzone as de, IMAGE_MIME_TYPE as ue } from "@mantine/dropzone";
|
|
8
|
-
import { CheckCircleIcon as me } from "../VideoIcons.js";
|
|
9
|
-
import { useVideoSettingsDataSource as fe } from "./context.js";
|
|
10
|
-
function Le({
|
|
11
|
-
opened: O,
|
|
12
|
-
videoId: w,
|
|
13
|
-
initialData: I,
|
|
14
|
-
title: q,
|
|
15
|
-
uploadLabel: B,
|
|
16
|
-
loadErrorLabel: D,
|
|
17
|
-
retryLabel: T,
|
|
18
|
-
onCoverUpload: u,
|
|
19
|
-
onPosterChange: ve,
|
|
20
|
-
onSelectedPosterChange: m,
|
|
21
|
-
selectedPosterUrl: L
|
|
22
|
-
}) {
|
|
23
|
-
const F = fe(), [n, A] = l(null), [H, c] = l(
|
|
24
|
-
null
|
|
25
|
-
), [, C] = l(!1), [K, k] = l(!1), [V, a] = l(/* @__PURE__ */ new Set()), [Y, f] = l(/* @__PURE__ */ new Set()), [v, y] = l(null), p = $(
|
|
26
|
-
null
|
|
27
|
-
), z = $(!1), d = R(() => {
|
|
28
|
-
const e = n?.previews ?? [];
|
|
29
|
-
return v ? [
|
|
30
|
-
...e,
|
|
31
|
-
{ id: "uploaded", url: v, order: e.length }
|
|
32
|
-
] : e;
|
|
33
|
-
}, [n?.previews, v]), J = R(
|
|
34
|
-
() => n?.cover?.previewId ?? d[0]?.id ?? null,
|
|
35
|
-
[n?.cover?.previewId, d]
|
|
36
|
-
), S = H ?? J, M = d.length + 1, Q = M > 3, W = x((e) => {
|
|
37
|
-
a((t) => {
|
|
38
|
-
const r = new Set(t);
|
|
39
|
-
return r.delete(e), r;
|
|
40
|
-
}), f((t) => {
|
|
41
|
-
const r = new Set(t);
|
|
42
|
-
return r.delete(e), r;
|
|
43
|
-
});
|
|
44
|
-
}, []), X = x((e) => {
|
|
45
|
-
a((t) => {
|
|
46
|
-
const r = new Set(t);
|
|
47
|
-
return r.delete(e), r;
|
|
48
|
-
}), f((t) => new Set(t).add(e));
|
|
49
|
-
}, []), g = x(async () => {
|
|
50
|
-
if (w) {
|
|
51
|
-
C(!0), k(!1);
|
|
52
|
-
try {
|
|
53
|
-
const e = await F.getSettings();
|
|
54
|
-
A(e);
|
|
55
|
-
const t = e?.previews?.[0]?.id ?? null, r = e?.cover?.previewId ?? t;
|
|
56
|
-
c(r), a(/* @__PURE__ */ new Set()), f(/* @__PURE__ */ new Set());
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.error(
|
|
59
|
-
"cover status fetch failed",
|
|
60
|
-
e instanceof Error ? e.message : e
|
|
61
|
-
), k(!0);
|
|
62
|
-
} finally {
|
|
63
|
-
C(!1);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}, [w, F]), Z = x(
|
|
67
|
-
async (e) => {
|
|
68
|
-
const t = e[0];
|
|
69
|
-
if (!t || !u) return;
|
|
70
|
-
const r = URL.createObjectURL(t);
|
|
71
|
-
y(r), a(/* @__PURE__ */ new Set(["uploaded"])), c("uploaded"), m?.(r);
|
|
72
|
-
try {
|
|
73
|
-
const s = await Promise.resolve(u(t));
|
|
74
|
-
y(null), r && URL.revokeObjectURL(r);
|
|
75
|
-
const i = s?.previews, ee = Array.isArray(i) && i.length > 0;
|
|
76
|
-
if (s && ee && i) {
|
|
77
|
-
z.current = !0, A(s);
|
|
78
|
-
const N = i[i.length - 1]?.id ?? s?.cover?.previewId ?? i[0]?.id;
|
|
79
|
-
if (c(N ?? "uploaded"), N) {
|
|
80
|
-
const _ = i.find(
|
|
81
|
-
(re) => re.id === N
|
|
82
|
-
)?.url;
|
|
83
|
-
_ && m?.(_);
|
|
84
|
-
}
|
|
85
|
-
a(/* @__PURE__ */ new Set()), f(/* @__PURE__ */ new Set());
|
|
86
|
-
} else
|
|
87
|
-
g();
|
|
88
|
-
} catch (s) {
|
|
89
|
-
y(null), r && URL.revokeObjectURL(r), c(null), console.error(
|
|
90
|
-
"cover upload failed",
|
|
91
|
-
s instanceof Error ? s.message : s
|
|
92
|
-
), g();
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
[u, g, m]
|
|
96
|
-
), G = R(() => L || (d.find((e) => e.id === S)?.url ?? n?.cover?.url ?? null), [L, d, S, n?.cover?.url]);
|
|
97
|
-
return b(() => {
|
|
98
|
-
if (!(!O || !w))
|
|
99
|
-
if (I) {
|
|
100
|
-
A(I);
|
|
101
|
-
const e = I?.previews?.[0]?.id ?? null, t = I?.cover?.previewId ?? e;
|
|
102
|
-
c(t), a(/* @__PURE__ */ new Set()), f(/* @__PURE__ */ new Set()), C(!1), k(!1);
|
|
103
|
-
} else
|
|
104
|
-
g();
|
|
105
|
-
}, [O, w]), b(() => {
|
|
106
|
-
if (!v || !p.current) return;
|
|
107
|
-
const t = requestAnimationFrame(() => {
|
|
108
|
-
const s = (n?.previews ?? []).length + 1;
|
|
109
|
-
p.current?.scrollTo(s);
|
|
110
|
-
});
|
|
111
|
-
return () => cancelAnimationFrame(t);
|
|
112
|
-
}, [v, n?.previews]), b(() => {
|
|
113
|
-
if (!z.current) return;
|
|
114
|
-
z.current = !1;
|
|
115
|
-
const e = p.current;
|
|
116
|
-
if (!e) return;
|
|
117
|
-
const r = (n?.previews ?? []).length;
|
|
118
|
-
requestAnimationFrame(() => e.scrollTo(r));
|
|
119
|
-
}, [n?.previews]), b(
|
|
120
|
-
() => () => {
|
|
121
|
-
p.current = null;
|
|
122
|
-
},
|
|
123
|
-
[]
|
|
124
|
-
), /* @__PURE__ */ h(ie, { gap: "xs", "data-test-id": "video-settings-cover-section", children: [
|
|
125
|
-
/* @__PURE__ */ o(
|
|
126
|
-
j,
|
|
127
|
-
{
|
|
128
|
-
className: "video-settings-modal-section-title",
|
|
129
|
-
"data-test-id": "video-settings-cover-title",
|
|
130
|
-
children: q
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
K && /* @__PURE__ */ h(ce, { gap: "xs", mb: "xs", children: [
|
|
134
|
-
/* @__PURE__ */ o(j, { size: "sm", c: "red", children: D }),
|
|
135
|
-
T && /* @__PURE__ */ o(le, { variant: "light", size: "xs", onClick: g, children: T })
|
|
136
|
-
] }),
|
|
137
|
-
/* @__PURE__ */ h(
|
|
138
|
-
P,
|
|
139
|
-
{
|
|
140
|
-
className: "video-settings-modal-cover-carousel",
|
|
141
|
-
classNames: {
|
|
142
|
-
controls: "video-settings-modal-cover-controls",
|
|
143
|
-
control: "video-settings-modal-cover-control"
|
|
144
|
-
},
|
|
145
|
-
slideSize: "33.333%",
|
|
146
|
-
slideGap: "10px",
|
|
147
|
-
emblaOptions: { loop: !1 },
|
|
148
|
-
withControls: Q,
|
|
149
|
-
draggable: M > 1,
|
|
150
|
-
nextControlIcon: /* @__PURE__ */ o(
|
|
151
|
-
E,
|
|
152
|
-
{
|
|
153
|
-
icon: ne,
|
|
154
|
-
size: 20,
|
|
155
|
-
color: "currentColor"
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
previousControlIcon: /* @__PURE__ */ o(
|
|
159
|
-
E,
|
|
160
|
-
{
|
|
161
|
-
icon: se,
|
|
162
|
-
size: 20,
|
|
163
|
-
color: "currentColor"
|
|
164
|
-
}
|
|
165
|
-
),
|
|
166
|
-
getEmblaApi: (e) => {
|
|
167
|
-
p.current = e;
|
|
168
|
-
},
|
|
169
|
-
children: [
|
|
170
|
-
/* @__PURE__ */ o(P.Slide, { children: /* @__PURE__ */ o(U, { className: "video-settings-modal-cover-cell", children: /* @__PURE__ */ o(
|
|
171
|
-
de,
|
|
172
|
-
{
|
|
173
|
-
className: "video-settings-modal-cover-upload",
|
|
174
|
-
onDrop: Z,
|
|
175
|
-
accept: ue,
|
|
176
|
-
maxFiles: 1,
|
|
177
|
-
disabled: !u,
|
|
178
|
-
style: u ? void 0 : { opacity: 0.7, pointerEvents: "none" },
|
|
179
|
-
children: /* @__PURE__ */ h(U, { className: "video-settings-modal-cover-upload-inner", children: [
|
|
180
|
-
/* @__PURE__ */ o(
|
|
181
|
-
E,
|
|
182
|
-
{
|
|
183
|
-
icon: te,
|
|
184
|
-
size: 20,
|
|
185
|
-
color: "var(--mantine-color-bright)"
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
/* @__PURE__ */ o(
|
|
189
|
-
j,
|
|
190
|
-
{
|
|
191
|
-
size: "sm",
|
|
192
|
-
fw: 500,
|
|
193
|
-
className: "video-settings-modal-cover-upload-label",
|
|
194
|
-
children: B
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
] })
|
|
198
|
-
}
|
|
199
|
-
) }) }),
|
|
200
|
-
d.map((e) => {
|
|
201
|
-
const t = G != null ? e.url === G : S != null && e.id === S, r = V.has(e.id), s = Y.has(e.id);
|
|
202
|
-
return /* @__PURE__ */ o(P.Slide, { children: /* @__PURE__ */ h(
|
|
203
|
-
U,
|
|
204
|
-
{
|
|
205
|
-
className: `video-settings-modal-cover-cell video-settings-modal-cover-thumb ${t && !s ? "selected" : ""} ${r ? "loading" : ""} ${s ? "error" : ""}`,
|
|
206
|
-
onClick: () => {
|
|
207
|
-
s || (c(e.id), m?.(e.url));
|
|
208
|
-
},
|
|
209
|
-
role: "button",
|
|
210
|
-
tabIndex: 0,
|
|
211
|
-
onKeyDown: (i) => i.key === "Enter" && !s && void (c(e.id), m?.(e.url)),
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ o(
|
|
214
|
-
"img",
|
|
215
|
-
{
|
|
216
|
-
src: e.url,
|
|
217
|
-
alt: "",
|
|
218
|
-
onLoad: () => W(e.id),
|
|
219
|
-
onError: () => X(e.id)
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
r && /* @__PURE__ */ o(
|
|
223
|
-
"span",
|
|
224
|
-
{
|
|
225
|
-
className: "video-settings-modal-cover-spinner",
|
|
226
|
-
"aria-hidden": !0,
|
|
227
|
-
children: /* @__PURE__ */ o(ae, { size: "sm", color: "gray" })
|
|
228
|
-
}
|
|
229
|
-
),
|
|
230
|
-
s && /* @__PURE__ */ o(
|
|
231
|
-
"span",
|
|
232
|
-
{
|
|
233
|
-
className: "video-settings-modal-cover-error-icon",
|
|
234
|
-
"aria-hidden": !0,
|
|
235
|
-
children: /* @__PURE__ */ o(
|
|
236
|
-
E,
|
|
237
|
-
{
|
|
238
|
-
icon: oe,
|
|
239
|
-
size: 24,
|
|
240
|
-
color: "#fff"
|
|
241
|
-
}
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
),
|
|
245
|
-
t && !s && /* @__PURE__ */ o(
|
|
246
|
-
"span",
|
|
247
|
-
{
|
|
248
|
-
className: "video-settings-modal-cover-check",
|
|
249
|
-
"aria-hidden": !0,
|
|
250
|
-
children: /* @__PURE__ */ o(me, { size: 32 })
|
|
251
|
-
}
|
|
252
|
-
)
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
) }, e.id);
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
] });
|
|
261
|
-
}
|
|
262
|
-
export {
|
|
263
|
-
Le as CoverSection
|
|
264
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type FooterActionsProps = {
|
|
2
|
-
cancelLabel: string;
|
|
3
|
-
saveLabel: string;
|
|
4
|
-
onCancel: () => void;
|
|
5
|
-
onSave: () => void;
|
|
6
|
-
isSaving?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare function FooterActions({ cancelLabel, saveLabel, onCancel, onSave, isSaving, }: FooterActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=FooterActions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FooterActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/FooterActions.tsx"],"names":[],"mappings":"AAEA,KAAK,kBAAkB,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,2CAyBpB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Group as a, Button as e } from "@mantine/core";
|
|
3
|
-
function m({
|
|
4
|
-
cancelLabel: s,
|
|
5
|
-
saveLabel: o,
|
|
6
|
-
onCancel: d,
|
|
7
|
-
onSave: r,
|
|
8
|
-
isSaving: t
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ n(a, { justify: "flex-end", gap: 8, children: [
|
|
11
|
-
/* @__PURE__ */ i(
|
|
12
|
-
e,
|
|
13
|
-
{
|
|
14
|
-
size: "sm",
|
|
15
|
-
variant: "subtle",
|
|
16
|
-
color: "gray",
|
|
17
|
-
radius: "md",
|
|
18
|
-
onClick: d,
|
|
19
|
-
disabled: t,
|
|
20
|
-
"data-test-id": "video-settings-cancel",
|
|
21
|
-
children: s
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
/* @__PURE__ */ i(
|
|
25
|
-
e,
|
|
26
|
-
{
|
|
27
|
-
size: "sm",
|
|
28
|
-
radius: "md",
|
|
29
|
-
onClick: r,
|
|
30
|
-
loading: t,
|
|
31
|
-
"data-test-id": "video-settings-save",
|
|
32
|
-
children: o
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
] });
|
|
36
|
-
}
|
|
37
|
-
export {
|
|
38
|
-
m as FooterActions
|
|
39
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Subtitle } from '../../types';
|
|
2
|
-
import { type SubtitleTrack } from '../../utils/subtitles';
|
|
3
|
-
type ManualSubtitlesPanelProps = {
|
|
4
|
-
videoId?: string | null;
|
|
5
|
-
mode: 'shaka' | 'native';
|
|
6
|
-
shakaPlayer?: any | null;
|
|
7
|
-
nativeVideo?: HTMLVideoElement | null;
|
|
8
|
-
statusSubtitles?: Subtitle[];
|
|
9
|
-
onTracksChange?: (tracks: SubtitleTrack[]) => void;
|
|
10
|
-
onSave?: (handler: () => Promise<void>) => void;
|
|
11
|
-
};
|
|
12
|
-
export declare function ManualSubtitlesPanel({ videoId, statusSubtitles, onTracksChange, onSave, }: ManualSubtitlesPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=ManualSubtitlesPanel.d.ts.map
|
package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ManualSubtitlesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,uBAAuB,CAAC;AAK/B,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,WAAW,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CACjD,CAAC;AA4CF,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,eAAe,EACf,cAAc,EACd,MAAM,GACP,EAAE,yBAAyB,2CAgT3B"}
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import { jsxs as g, jsx as a, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { useState as F, useRef as G, useMemo as L, useEffect as D, useCallback as v } from "react";
|
|
3
|
-
import { useTranslation as O } from "react-i18next";
|
|
4
|
-
import { Flex as y, Text as T, Switch as Z, Divider as $, Menu as b, ActionIcon as q, Box as I, Loader as ee, Button as te } from "@mantine/core";
|
|
5
|
-
import { isAutoGeneratedTrack as B, normalizeSubtitleTrack as V } from "../../utils/subtitles.js";
|
|
6
|
-
import { TickIcon as le, MoreVerticalIcon as H } from "../VideoIcons.js";
|
|
7
|
-
import ae from "../VideoSelect.js";
|
|
8
|
-
import { useVideoSettingsDataSource as ie } from "./context.js";
|
|
9
|
-
const E = [
|
|
10
|
-
{ value: "en", label: "English" },
|
|
11
|
-
{ value: "es", label: "Español" },
|
|
12
|
-
{ value: "fr", label: "Français" },
|
|
13
|
-
{ value: "de", label: "Deutsch" },
|
|
14
|
-
{ value: "it", label: "Italiano" },
|
|
15
|
-
{ value: "pt", label: "Português" },
|
|
16
|
-
{ value: "ru", label: "Русский" },
|
|
17
|
-
{ value: "uk", label: "Українська" },
|
|
18
|
-
{ value: "pl", label: "Polski" },
|
|
19
|
-
{ value: "nl", label: "Nederlands" },
|
|
20
|
-
{ value: "sv", label: "Svenska" },
|
|
21
|
-
{ value: "no", label: "Norsk" },
|
|
22
|
-
{ value: "da", label: "Dansk" },
|
|
23
|
-
{ value: "fi", label: "Suomi" },
|
|
24
|
-
{ value: "tr", label: "Türkçe" },
|
|
25
|
-
{ value: "ar", label: "العربية" },
|
|
26
|
-
{ value: "he", label: "עברית" },
|
|
27
|
-
{ value: "hi", label: "हिन्दी" },
|
|
28
|
-
{ value: "ja", label: "日本語" },
|
|
29
|
-
{ value: "ko", label: "한국어" },
|
|
30
|
-
{ value: "zh", label: "中文" },
|
|
31
|
-
{ value: "ro", label: "Română" }
|
|
32
|
-
], _ = "ru", P = E.reduce(
|
|
33
|
-
(i, r) => (i[r.value] = r.label, i),
|
|
34
|
-
{}
|
|
35
|
-
);
|
|
36
|
-
function me({
|
|
37
|
-
videoId: i,
|
|
38
|
-
statusSubtitles: r,
|
|
39
|
-
onTracksChange: x,
|
|
40
|
-
onSave: z
|
|
41
|
-
}) {
|
|
42
|
-
const { t: m } = O(), s = ie(), h = ae, [u, c] = F([]), [f, n] = F([]), w = G(/* @__PURE__ */ new Map()), [k, j] = F(!1), o = L(
|
|
43
|
-
() => u.find(B) ?? null,
|
|
44
|
-
[u]
|
|
45
|
-
);
|
|
46
|
-
D(() => {
|
|
47
|
-
o && j(o.isDisabled);
|
|
48
|
-
}, [o]);
|
|
49
|
-
const J = v(
|
|
50
|
-
(e) => {
|
|
51
|
-
o && (j(e), c(
|
|
52
|
-
(t) => t.map(
|
|
53
|
-
(l) => l.id === o.id ? { ...l, isDisabled: e } : l
|
|
54
|
-
)
|
|
55
|
-
));
|
|
56
|
-
},
|
|
57
|
-
[o]
|
|
58
|
-
), A = G(null);
|
|
59
|
-
D(() => {
|
|
60
|
-
o && A.current === null && (A.current = o.isDisabled);
|
|
61
|
-
}, [o]);
|
|
62
|
-
const M = v(
|
|
63
|
-
async (e = !1) => {
|
|
64
|
-
if (i) {
|
|
65
|
-
if (e || r == null)
|
|
66
|
-
try {
|
|
67
|
-
const t = await s.listSubtitles();
|
|
68
|
-
c(t);
|
|
69
|
-
return;
|
|
70
|
-
} catch {
|
|
71
|
-
}
|
|
72
|
-
try {
|
|
73
|
-
const t = await s.listSubtitles();
|
|
74
|
-
c(t);
|
|
75
|
-
} catch {
|
|
76
|
-
if (r != null) {
|
|
77
|
-
const t = (r || []).map(V).filter((l) => l.id);
|
|
78
|
-
c(t);
|
|
79
|
-
} else
|
|
80
|
-
try {
|
|
81
|
-
const l = ((await s.getSettings())?.subtitles || []).map(V).filter((d) => d.id);
|
|
82
|
-
c(l);
|
|
83
|
-
} catch (t) {
|
|
84
|
-
s.onError?.(t, "subtitles");
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
[i, s, r]
|
|
90
|
-
);
|
|
91
|
-
D(() => {
|
|
92
|
-
if (!i) {
|
|
93
|
-
c([]), n([]);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
M().catch(() => {
|
|
97
|
-
});
|
|
98
|
-
}, [i, M]), D(() => {
|
|
99
|
-
x?.(u);
|
|
100
|
-
}, [u, x]), D(() => {
|
|
101
|
-
z?.(async () => {
|
|
102
|
-
!i || !o || k !== A.current && (await s.setSubtitleDisabled(
|
|
103
|
-
o.id,
|
|
104
|
-
k
|
|
105
|
-
), A.current = k);
|
|
106
|
-
});
|
|
107
|
-
}, [z, i, o, k, s]);
|
|
108
|
-
const R = L(() => {
|
|
109
|
-
const e = u.filter((l) => !B(l)), t = /* @__PURE__ */ new Map();
|
|
110
|
-
for (const l of e)
|
|
111
|
-
t.set(l.lang, l);
|
|
112
|
-
return Array.from(t.values());
|
|
113
|
-
}, [u]), N = L(() => {
|
|
114
|
-
const e = new Set(R.map((t) => t.lang));
|
|
115
|
-
return f.forEach((t) => {
|
|
116
|
-
t.lang && e.add(t.lang);
|
|
117
|
-
}), e;
|
|
118
|
-
}, [R, f]), K = v(() => {
|
|
119
|
-
const e = E.find((l) => !N.has(l.value))?.value ?? (N.has(_) ? null : _), t = e ? P[e] || e : null;
|
|
120
|
-
n((l) => [
|
|
121
|
-
...l,
|
|
122
|
-
{
|
|
123
|
-
id: crypto.randomUUID(),
|
|
124
|
-
lang: e,
|
|
125
|
-
label: t,
|
|
126
|
-
status: "draft"
|
|
127
|
-
}
|
|
128
|
-
]);
|
|
129
|
-
}, [N]), C = v(
|
|
130
|
-
(e, t) => {
|
|
131
|
-
n(
|
|
132
|
-
(l) => l.map(
|
|
133
|
-
(d) => d.id === e ? { ...d, ...t } : d
|
|
134
|
-
)
|
|
135
|
-
);
|
|
136
|
-
},
|
|
137
|
-
[]
|
|
138
|
-
), Q = v(
|
|
139
|
-
async (e, t) => {
|
|
140
|
-
if (!i) return;
|
|
141
|
-
const l = f.find((p) => p.id === e);
|
|
142
|
-
if (!l?.lang) return;
|
|
143
|
-
const d = new AbortController();
|
|
144
|
-
w.current.set(e, d), C(e, { status: "uploading", fileName: t.name });
|
|
145
|
-
try {
|
|
146
|
-
const p = await s.uploadSubtitle(t, {
|
|
147
|
-
lang: l.lang,
|
|
148
|
-
label: l.label || P[l.lang] || l.lang,
|
|
149
|
-
kind: "subtitles",
|
|
150
|
-
default: !1,
|
|
151
|
-
signal: d.signal
|
|
152
|
-
});
|
|
153
|
-
w.current.delete(e), n((S) => S.filter((U) => U.id !== e)), p ? c((S) => S.find((U) => U.id === p.id) ? S : [...S, p]) : await M(!0);
|
|
154
|
-
} catch (p) {
|
|
155
|
-
w.current.delete(e), C(e, { status: "error" }), s.onError?.(p, "subtitles");
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
[i, s, f, M, C]
|
|
159
|
-
), W = v(
|
|
160
|
-
async (e) => {
|
|
161
|
-
i && (c((t) => t.filter((l) => l.id !== e)), await s.deleteSubtitle(e));
|
|
162
|
-
},
|
|
163
|
-
[i, s]
|
|
164
|
-
), X = v((e) => {
|
|
165
|
-
n((t) => t.filter((l) => l.id !== e));
|
|
166
|
-
}, []);
|
|
167
|
-
return /* @__PURE__ */ g("div", { className: "video-settings-modal-subtitles", children: [
|
|
168
|
-
o && /* @__PURE__ */ g(
|
|
169
|
-
y,
|
|
170
|
-
{
|
|
171
|
-
align: "center",
|
|
172
|
-
gap: "md",
|
|
173
|
-
className: "video-settings-modal-subtitles-auto-toggle",
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ a(T, { size: "sm", fw: 500, c: "var(--mantine-color-bright)", flex: 1, children: m("editor.video.settingsModal.hideAutoSubtitles") }),
|
|
176
|
-
/* @__PURE__ */ a(
|
|
177
|
-
Z,
|
|
178
|
-
{
|
|
179
|
-
size: "sm",
|
|
180
|
-
checked: k,
|
|
181
|
-
onChange: (e) => J(e.currentTarget.checked)
|
|
182
|
-
}
|
|
183
|
-
)
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
o && /* @__PURE__ */ a($, { my: 4 }),
|
|
188
|
-
/* @__PURE__ */ a(
|
|
189
|
-
T,
|
|
190
|
-
{
|
|
191
|
-
size: "sm",
|
|
192
|
-
mb: 0,
|
|
193
|
-
className: "video-settings-modal-subtitles-label video-settings-modal-text-label",
|
|
194
|
-
children: m("editor.video.settingsModal.uploadSubtitlesManually")
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
R.map((e) => /* @__PURE__ */ g(
|
|
198
|
-
y,
|
|
199
|
-
{
|
|
200
|
-
align: "center",
|
|
201
|
-
gap: "xs",
|
|
202
|
-
wrap: "nowrap",
|
|
203
|
-
className: "video-settings-modal-subtitles-row",
|
|
204
|
-
children: [
|
|
205
|
-
/* @__PURE__ */ a(
|
|
206
|
-
h,
|
|
207
|
-
{
|
|
208
|
-
size: "sm",
|
|
209
|
-
data: E,
|
|
210
|
-
value: e.lang,
|
|
211
|
-
disabled: !0,
|
|
212
|
-
flex: 1,
|
|
213
|
-
miw: 140,
|
|
214
|
-
w: "auto",
|
|
215
|
-
comboboxProps: { width: "target" },
|
|
216
|
-
classNames: { input: "video-settings-modal-language-select" }
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
/* @__PURE__ */ g(y, { align: "center", gap: 6, flex: 1, children: [
|
|
220
|
-
/* @__PURE__ */ a(le, { size: 20, color: "var(--mantine-color-green-6)" }),
|
|
221
|
-
/* @__PURE__ */ a(T, { size: "sm", "data-test-id": "video-settings-subtitle-success", children: m("editor.video.settingsModal.successfullyLoaded") })
|
|
222
|
-
] }),
|
|
223
|
-
/* @__PURE__ */ g(b, { position: "bottom-end", children: [
|
|
224
|
-
/* @__PURE__ */ a(b.Target, { children: /* @__PURE__ */ a(
|
|
225
|
-
q,
|
|
226
|
-
{
|
|
227
|
-
size: 36,
|
|
228
|
-
variant: "subtle",
|
|
229
|
-
color: "gray",
|
|
230
|
-
"aria-label": "Subtitle actions",
|
|
231
|
-
"data-test-id": "video-settings-subtitle-row-menu",
|
|
232
|
-
children: /* @__PURE__ */ a(H, { size: 20 })
|
|
233
|
-
}
|
|
234
|
-
) }),
|
|
235
|
-
/* @__PURE__ */ a(b.Dropdown, { children: /* @__PURE__ */ a(
|
|
236
|
-
b.Item,
|
|
237
|
-
{
|
|
238
|
-
color: "red",
|
|
239
|
-
onClick: () => W(e.id),
|
|
240
|
-
"data-test-id": "video-settings-subtitle-delete",
|
|
241
|
-
children: m("editor.video.settingsModal.deleteSubtitle")
|
|
242
|
-
}
|
|
243
|
-
) })
|
|
244
|
-
] })
|
|
245
|
-
]
|
|
246
|
-
},
|
|
247
|
-
e.id
|
|
248
|
-
)),
|
|
249
|
-
f.map((e) => /* @__PURE__ */ a(
|
|
250
|
-
ne,
|
|
251
|
-
{
|
|
252
|
-
draft: e,
|
|
253
|
-
usedLanguages: N,
|
|
254
|
-
onChange: (t) => C(e.id, t),
|
|
255
|
-
onUpload: (t) => Q(e.id, t),
|
|
256
|
-
onRemove: () => X(e.id),
|
|
257
|
-
SelectComponent: h
|
|
258
|
-
},
|
|
259
|
-
e.id
|
|
260
|
-
)),
|
|
261
|
-
/* @__PURE__ */ a(
|
|
262
|
-
T,
|
|
263
|
-
{
|
|
264
|
-
component: "button",
|
|
265
|
-
type: "button",
|
|
266
|
-
className: "video-settings-modal-link",
|
|
267
|
-
onClick: K,
|
|
268
|
-
"data-test-id": "video-settings-subtitle-add",
|
|
269
|
-
children: m("editor.video.settingsModal.addSubtitleTrack")
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] });
|
|
273
|
-
}
|
|
274
|
-
function ne({
|
|
275
|
-
draft: i,
|
|
276
|
-
usedLanguages: r,
|
|
277
|
-
onChange: x,
|
|
278
|
-
onUpload: z,
|
|
279
|
-
onRemove: m,
|
|
280
|
-
SelectComponent: s
|
|
281
|
-
}) {
|
|
282
|
-
const { t: h } = O(), u = G(null), c = L(
|
|
283
|
-
() => E.filter(
|
|
284
|
-
(n) => n.value === i.lang || !r.has(n.value)
|
|
285
|
-
),
|
|
286
|
-
[r, i.lang]
|
|
287
|
-
), f = (n) => {
|
|
288
|
-
const w = n.target.files?.[0];
|
|
289
|
-
n.target.value = "", w && z(w);
|
|
290
|
-
};
|
|
291
|
-
return /* @__PURE__ */ a(I, { children: /* @__PURE__ */ g(
|
|
292
|
-
y,
|
|
293
|
-
{
|
|
294
|
-
align: "center",
|
|
295
|
-
wrap: "nowrap",
|
|
296
|
-
className: "video-settings-modal-subtitles-row",
|
|
297
|
-
children: [
|
|
298
|
-
/* @__PURE__ */ a(
|
|
299
|
-
s,
|
|
300
|
-
{
|
|
301
|
-
size: "sm",
|
|
302
|
-
placeholder: h("editor.video.settingsModal.selectLanguage"),
|
|
303
|
-
data: c,
|
|
304
|
-
value: i.lang,
|
|
305
|
-
onChange: (n) => x({
|
|
306
|
-
lang: n,
|
|
307
|
-
label: n ? P[n] : null
|
|
308
|
-
}),
|
|
309
|
-
flex: 1,
|
|
310
|
-
miw: 140,
|
|
311
|
-
w: "auto",
|
|
312
|
-
comboboxProps: { width: "target" },
|
|
313
|
-
inputClassName: "video-settings-modal-language-select"
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
/* @__PURE__ */ a(y, { align: "center", gap: 6, flex: 1, children: i.status === "uploading" ? /* @__PURE__ */ a(ee, { size: 22 }) : /* @__PURE__ */ g(Y, { children: [
|
|
317
|
-
/* @__PURE__ */ a(
|
|
318
|
-
"input",
|
|
319
|
-
{
|
|
320
|
-
ref: u,
|
|
321
|
-
type: "file",
|
|
322
|
-
accept: ".srt,.vtt",
|
|
323
|
-
hidden: !0,
|
|
324
|
-
onChange: f
|
|
325
|
-
}
|
|
326
|
-
),
|
|
327
|
-
/* @__PURE__ */ a(
|
|
328
|
-
te,
|
|
329
|
-
{
|
|
330
|
-
variant: "light",
|
|
331
|
-
size: "sm",
|
|
332
|
-
className: "video-settings-modal-upload-button",
|
|
333
|
-
disabled: !i.lang,
|
|
334
|
-
onClick: () => u.current?.click(),
|
|
335
|
-
"data-test-id": "video-settings-subtitle-upload-file",
|
|
336
|
-
children: h("editor.video.settingsModal.uploadFile")
|
|
337
|
-
}
|
|
338
|
-
)
|
|
339
|
-
] }) }),
|
|
340
|
-
/* @__PURE__ */ g(b, { position: "bottom-end", children: [
|
|
341
|
-
/* @__PURE__ */ a(b.Target, { children: /* @__PURE__ */ a(
|
|
342
|
-
q,
|
|
343
|
-
{
|
|
344
|
-
size: 36,
|
|
345
|
-
variant: "subtle",
|
|
346
|
-
color: "gray",
|
|
347
|
-
"aria-label": "Subtitle actions",
|
|
348
|
-
children: /* @__PURE__ */ a(H, { size: 20 })
|
|
349
|
-
}
|
|
350
|
-
) }),
|
|
351
|
-
/* @__PURE__ */ a(b.Dropdown, { children: /* @__PURE__ */ a(b.Item, { color: "red", onClick: m, children: h("editor.video.settingsModal.deleteSubtitle") }) })
|
|
352
|
-
] }),
|
|
353
|
-
i.status === "error" && /* @__PURE__ */ a(T, { size: "sm", c: "red", children: h("editor.video.settingsModal.uploadError") })
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
) });
|
|
357
|
-
}
|
|
358
|
-
export {
|
|
359
|
-
me as ManualSubtitlesPanel
|
|
360
|
-
};
|