@layers-app/shared 0.3.6 → 0.3.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/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +10 -10
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +2 -2
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +4 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +22 -15
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -21
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +48 -91
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +3 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +89 -63
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +35 -26
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +43 -36
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +6 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +16 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +4 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +59 -20
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +22 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +19 -21
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +136 -144
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +3 -4
- package/dist/components/CommentComposer/index.js +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.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/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +13 -12
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EmojiPicker/IconsPanel.js +13 -13
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +43 -33
- 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.d.ts +2 -4
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +226 -241
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -14
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +34 -60
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +39 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +26 -29
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +43 -42
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +35 -51
- package/dist/components/FilePicker/index.d.ts +0 -1
- package/dist/components/FilePicker/index.d.ts.map +1 -1
- 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 +38 -38
- package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
- package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +4 -3
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +248 -248
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
- package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
- package/dist/components/FormViewer/types/form.d.ts +1 -1
- package/dist/components/FormViewer/types/form.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.d.ts +381 -6358
- package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +3 -1
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +24 -21
- 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/MediaLibrary/MediaLibraryRow.js +7 -7
- package/dist/components/NavMenu/NavMenu.d.ts +3 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +7 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +21 -23
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NewColorPicker/components/Target.d.ts +3 -1
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +48 -43
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.js +3 -1
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/Notification/NotificationCard.d.ts +3 -1
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +87 -86
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
- package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
- package/dist/components/OnBoarding/styles.module.css.js +7 -7
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +70 -74
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +7 -12
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +58 -60
- 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/UserAvatar/index.d.ts +2 -1
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +38 -35
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +19 -18
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/brand.js +8 -8
- package/dist/config/envConfig.d.ts +8 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +21 -13
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +63 -45
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +29 -8
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/offlineSuppression.d.ts +3 -0
- package/dist/helpers/offlineSuppression.d.ts.map +1 -0
- package/dist/helpers/offlineSuppression.js +8 -0
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +5 -4
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +30 -29
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +498 -509
- package/dist/lang/locales/ui_en.json.js +18 -20
- package/dist/lang/locales/ui_es.json.js +12 -14
- package/dist/lang/locales/ui_ru.json.js +13 -15
- package/dist/node_modules/countries-and-timezones/esm/index.js +281 -4011
- package/docs/README.md +499 -499
- package/package.json +75 -75
- package/dist/components/ColorPicker/ColorPicker.module.css.js +0 -31
- package/dist/components/ColorPicker/ColorPickerList.d.ts +0 -6
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerList.js +0 -134
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +0 -13
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +0 -149
- package/dist/components/ColorPicker/icons.d.ts +0 -11
- package/dist/components/ColorPicker/icons.d.ts.map +0 -1
- package/dist/components/ColorPicker/icons.js +0 -71
- package/dist/components/ColorPicker/types.d.ts +0 -49
- package/dist/components/ColorPicker/types.d.ts.map +0 -1
- package/dist/components/ColorPicker/types.js +0 -10
- package/dist/components/ColorPicker/useRecentColors.d.ts +0 -13
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +0 -1
- package/dist/components/ColorPicker/useRecentColors.js +0 -39
- package/dist/components/FilePicker/coverCollections.d.ts +0 -4
- package/dist/components/FilePicker/coverCollections.d.ts.map +0 -1
- package/dist/components/FilePicker/coverCollections.js +0 -164
|
@@ -1,69 +1,95 @@
|
|
|
1
|
-
import { jsx as r,
|
|
2
|
-
import { memo as
|
|
3
|
-
import { TransformWrapper as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { BaseLoader as
|
|
6
|
-
import { ShakaVideoPlayer as
|
|
7
|
-
import { ZOOM_CONFIG as
|
|
1
|
+
import { jsx as r, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { memo as F } from "react";
|
|
3
|
+
import { TransformWrapper as U, TransformComponent as y } from "react-zoom-pan-pinch";
|
|
4
|
+
import { Box as l } from "@mantine/core";
|
|
5
|
+
import { BaseLoader as E } from "../../Loaders/BaseLoader.js";
|
|
6
|
+
import { ShakaVideoPlayer as O } from "./ShakePlayer/ShakaPlayer.js";
|
|
7
|
+
import { ZOOM_CONFIG as a, TRANSFORM_COMPONENT_STYLES as c } from "../constants.js";
|
|
8
8
|
import { useGetPreviewUrl as b } from "../hooks/useGetPreviewUrl.js";
|
|
9
|
-
import { usePanning as
|
|
10
|
-
import { ErrorSection as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
9
|
+
import { usePanning as x } from "../hooks/usePanning.js";
|
|
10
|
+
import { ErrorSection as p } from "./ErrorSection.js";
|
|
11
|
+
import { UnsupportedSection as T } from "./UnsupportedSection.js";
|
|
12
|
+
import i from "../styles.module.css.js";
|
|
13
|
+
const h = F(
|
|
14
|
+
({ onTransformed: S, attachment: e, isActive: s, ref: N }) => {
|
|
15
|
+
const {
|
|
16
|
+
isError: m,
|
|
17
|
+
setIsError: g,
|
|
18
|
+
fileUrl: o,
|
|
19
|
+
isFetching: n,
|
|
20
|
+
isVideo: d,
|
|
21
|
+
isPdf: t,
|
|
22
|
+
isAudio: f,
|
|
23
|
+
isSupported: u
|
|
24
|
+
} = b(e), C = x({ isFetching: n, isVideo: d });
|
|
25
|
+
return /* @__PURE__ */ r(
|
|
26
|
+
U,
|
|
27
|
+
{
|
|
28
|
+
panning: {
|
|
29
|
+
disabled: !0
|
|
30
|
+
},
|
|
31
|
+
onTransformed: S,
|
|
32
|
+
initialScale: a.initialScale,
|
|
33
|
+
minScale: a.minScale,
|
|
34
|
+
maxScale: a.maxScale,
|
|
35
|
+
limitToBounds: !0,
|
|
36
|
+
disabled: n || d || t || f || !u,
|
|
37
|
+
disablePadding: !0,
|
|
38
|
+
centerZoomedOut: !0,
|
|
39
|
+
ref: N,
|
|
40
|
+
wheel: {
|
|
41
|
+
disabled: !1,
|
|
42
|
+
step: a.wheelStep
|
|
43
|
+
},
|
|
44
|
+
doubleClick: {
|
|
45
|
+
disabled: !0
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ r(
|
|
48
|
+
y,
|
|
49
|
+
{
|
|
50
|
+
wrapperStyle: c,
|
|
51
|
+
contentStyle: c,
|
|
52
|
+
wrapperProps: C,
|
|
53
|
+
children: u ? n ? /* @__PURE__ */ r(E, {}) : d ? /* @__PURE__ */ r(l, { className: i.videoContainer, children: /* @__PURE__ */ r(
|
|
54
|
+
O,
|
|
55
|
+
{
|
|
56
|
+
isActive: s,
|
|
57
|
+
autoPlay: s,
|
|
58
|
+
attachmentId: e.id
|
|
59
|
+
}
|
|
60
|
+
) }) : t ? m || !(e?.Url || o) ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(l, { className: i.pdfContainer, children: /* @__PURE__ */ r(
|
|
61
|
+
"iframe",
|
|
62
|
+
{
|
|
63
|
+
title: e.originalFileName || "pdf",
|
|
64
|
+
src: e?.Url ?? o ?? "",
|
|
65
|
+
className: i.pdfFrame
|
|
66
|
+
}
|
|
67
|
+
) }) : f ? m || !(e?.Url || o) ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ P(l, { className: i.audioContainer, children: [
|
|
68
|
+
/* @__PURE__ */ r(l, { className: i.audioName, children: e.originalFileName || "audio" }),
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
|
+
"audio",
|
|
46
71
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
72
|
+
src: e?.Url ?? o ?? "",
|
|
73
|
+
controls: !0,
|
|
74
|
+
autoPlay: s,
|
|
75
|
+
className: i.audioElement
|
|
50
76
|
}
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
77
|
+
)
|
|
78
|
+
] }) : m ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(
|
|
79
|
+
"img",
|
|
80
|
+
{
|
|
81
|
+
onError: () => g(!0),
|
|
82
|
+
alt: e.originalFileName || "file",
|
|
83
|
+
className: i.imageContainer,
|
|
84
|
+
src: e?.Url ?? o ?? ""
|
|
85
|
+
}
|
|
86
|
+
) : /* @__PURE__ */ r(T, { filename: e.originalFileName })
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
66
92
|
);
|
|
67
93
|
export {
|
|
68
|
-
|
|
94
|
+
h as GallerySlide
|
|
69
95
|
};
|
|
@@ -6,6 +6,6 @@ type BaseProps = {
|
|
|
6
6
|
stylesContainer?: React.CSSProperties;
|
|
7
7
|
classNameContainer?: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const ShakaVideoPlayer: ({ attachmentId, autoPlay, isActive, loader, stylesContainer, classNameContainer, }: BaseProps) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ShakaVideoPlayer: ({ attachmentId, autoPlay, isActive, loader, stylesContainer, classNameContainer, }: BaseProps) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=ShakaPlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShakaPlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShakaPlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.tsx"],"names":[],"mappings":"AAsBA,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,oFAO9B,SAAS,yVA6CX,CAAC"}
|
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useEffect as g } from "react";
|
|
2
3
|
import a from "clsx";
|
|
3
|
-
import
|
|
4
|
-
import { BaseLoader as
|
|
5
|
-
import { ErrorSection as
|
|
6
|
-
import { useShakePlayer as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
attachmentId:
|
|
10
|
-
autoPlay:
|
|
11
|
-
isActive:
|
|
12
|
-
loader:
|
|
13
|
-
stylesContainer:
|
|
4
|
+
import h from "shaka-player-react";
|
|
5
|
+
import { BaseLoader as k } from "../../../Loaders/BaseLoader.js";
|
|
6
|
+
import { ErrorSection as v } from "../ErrorSection.js";
|
|
7
|
+
import { useShakePlayer as S } from "./useShakePlayer.js";
|
|
8
|
+
import i from "./ShakaPlayer.module.css.js";
|
|
9
|
+
const q = ({
|
|
10
|
+
attachmentId: l,
|
|
11
|
+
autoPlay: o,
|
|
12
|
+
isActive: n,
|
|
13
|
+
loader: f,
|
|
14
|
+
stylesContainer: m,
|
|
14
15
|
classNameContainer: p
|
|
15
16
|
}) => {
|
|
16
|
-
const { isError:
|
|
17
|
-
autoPlay:
|
|
18
|
-
isActive:
|
|
19
|
-
attachmentId:
|
|
20
|
-
});
|
|
21
|
-
return
|
|
17
|
+
const { isError: c, containerRef: u, vodUrl: e } = S({
|
|
18
|
+
autoPlay: o,
|
|
19
|
+
isActive: n,
|
|
20
|
+
attachmentId: l
|
|
21
|
+
}), t = d(null);
|
|
22
|
+
return g(() => {
|
|
23
|
+
const s = t.current?.player?.getNetworkingEngine?.();
|
|
24
|
+
s && s.registerRequestFilter((E, y) => {
|
|
25
|
+
y.allowCrossSiteCredentials = !0;
|
|
26
|
+
});
|
|
27
|
+
}, [e]), c ? /* @__PURE__ */ r(v, {}) : e ? /* @__PURE__ */ r(
|
|
22
28
|
"div",
|
|
23
29
|
{
|
|
24
|
-
ref:
|
|
25
|
-
style:
|
|
30
|
+
ref: u,
|
|
31
|
+
style: m,
|
|
26
32
|
className: a(
|
|
27
|
-
|
|
33
|
+
i["vod-player"],
|
|
28
34
|
"shaka-vod-player-wrapper",
|
|
29
35
|
p
|
|
30
36
|
),
|
|
31
37
|
children: /* @__PURE__ */ r(
|
|
32
|
-
|
|
38
|
+
h,
|
|
33
39
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
ref: t,
|
|
41
|
+
autoPlay: o ?? !0,
|
|
42
|
+
className: a(i["vod-player__player"]),
|
|
43
|
+
src: e,
|
|
44
|
+
crossOrigin: "use-credentials",
|
|
45
|
+
controls: !0
|
|
37
46
|
}
|
|
38
47
|
)
|
|
39
48
|
}
|
|
40
|
-
) :
|
|
49
|
+
) : f ?? /* @__PURE__ */ r(k, {});
|
|
41
50
|
};
|
|
42
51
|
export {
|
|
43
|
-
|
|
52
|
+
q as ShakaVideoPlayer
|
|
44
53
|
};
|
package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
"vod-player": "_vod-
|
|
3
|
-
"vod-player__player": "_vod-
|
|
1
|
+
const e = {
|
|
2
|
+
"vod-player": "_vod-player_be6om_1",
|
|
3
|
+
"vod-player__player": "_vod-player__player_be6om_13"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ export declare const useShakePlayer: ({ attachmentId, isActive, autoPlay, }: {
|
|
|
3
3
|
isActive?: boolean;
|
|
4
4
|
autoPlay?: boolean;
|
|
5
5
|
}) => {
|
|
6
|
-
containerRef: import("react").RefObject<HTMLDivElement>;
|
|
6
|
+
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
7
7
|
isError: boolean;
|
|
8
8
|
vodUrl: string | null;
|
|
9
9
|
};
|
package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShakePlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useShakePlayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,GAAI,uCAI5B;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;CAoHA,CAAC"}
|
|
@@ -1,54 +1,61 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useState as w, useRef as c, useEffect as m } from "react";
|
|
2
|
+
import { getEnvConfig as y } from "../../../../config/envConfig.js";
|
|
3
|
+
const R = () => {
|
|
4
|
+
const e = y().apiBaseUrl || "";
|
|
5
|
+
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
6
|
+
}, C = ({
|
|
7
|
+
attachmentId: e,
|
|
4
8
|
isActive: i,
|
|
5
9
|
autoPlay: a
|
|
6
10
|
}) => {
|
|
7
|
-
const [l, f] =
|
|
8
|
-
if (!
|
|
11
|
+
const [l, f] = w(null), [E, d] = w(!1), s = c(null), u = c(!0), n = c(null), r = c(null), g = async () => {
|
|
12
|
+
if (!e)
|
|
9
13
|
return;
|
|
10
14
|
r.current && r.current.abort();
|
|
11
|
-
const
|
|
12
|
-
r.current =
|
|
15
|
+
const t = new AbortController();
|
|
16
|
+
r.current = t;
|
|
13
17
|
try {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const o = R(), p = await fetch(
|
|
19
|
+
`${o}/v1/attachments/${e}/vod`,
|
|
20
|
+
{
|
|
21
|
+
method: "GET",
|
|
22
|
+
credentials: "include",
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: "*/*"
|
|
25
|
+
},
|
|
26
|
+
signal: t.signal
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
if (!p.ok) throw new Error("Failed to get VOD URL");
|
|
30
|
+
const b = await p.json();
|
|
31
|
+
if (!u.current || t.signal.aborted) return;
|
|
32
|
+
if (b.ready) {
|
|
33
|
+
const h = o || window.location.origin, U = new URL(b.url, h).toString();
|
|
34
|
+
f(U);
|
|
28
35
|
} else
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
n.current = setTimeout(() => {
|
|
37
|
+
g();
|
|
31
38
|
}, 3e3);
|
|
32
|
-
} catch (
|
|
33
|
-
if (
|
|
39
|
+
} catch (o) {
|
|
40
|
+
if (o instanceof Error && o.name === "AbortError" || !u.current || t.signal.aborted) return;
|
|
34
41
|
d(!0);
|
|
35
42
|
}
|
|
36
43
|
};
|
|
37
|
-
return
|
|
38
|
-
if (u.current = !0, f(null), d(!1),
|
|
39
|
-
return
|
|
40
|
-
u.current = !1,
|
|
44
|
+
return m(() => {
|
|
45
|
+
if (u.current = !0, f(null), d(!1), n.current && (clearTimeout(n.current), n.current = null), r.current && (r.current.abort(), r.current = null), !!e)
|
|
46
|
+
return g(), () => {
|
|
47
|
+
u.current = !1, n.current && (clearTimeout(n.current), n.current = null), r.current && (r.current.abort(), r.current = null);
|
|
41
48
|
};
|
|
42
|
-
}, [
|
|
49
|
+
}, [e]), m(() => {
|
|
43
50
|
if (!l || !s.current) return;
|
|
44
|
-
const
|
|
51
|
+
const t = s.current.querySelector(
|
|
45
52
|
"video"
|
|
46
53
|
);
|
|
47
|
-
|
|
48
|
-
console.error("Ошибка при воспроизведении видео:",
|
|
49
|
-
}) :
|
|
50
|
-
}, [i, l, a]), { containerRef: s, isError:
|
|
54
|
+
t && (i ? a !== !1 && t.play().catch((o) => {
|
|
55
|
+
console.error("Ошибка при воспроизведении видео:", o);
|
|
56
|
+
}) : t.pause());
|
|
57
|
+
}, [i, l, a]), { containerRef: s, isError: E, vodUrl: l };
|
|
51
58
|
};
|
|
52
59
|
export {
|
|
53
|
-
|
|
60
|
+
C as useShakePlayer
|
|
54
61
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsupportedSection.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/UnsupportedSection.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,GAAI,cAAc,KAAK,4CAqBrD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as n } from "react-i18next";
|
|
3
|
+
import { Flex as p, Stack as c, Text as t } from "@mantine/core";
|
|
4
|
+
import { IconFileOff as o } from "@tabler/icons-react";
|
|
5
|
+
const g = ({ filename: e }) => {
|
|
6
|
+
const { t: l } = n("ui");
|
|
7
|
+
return /* @__PURE__ */ r(p, { align: "center", justify: "center", children: /* @__PURE__ */ a(c, { align: "center", gap: "xs", maw: 480, p: "xl", children: [
|
|
8
|
+
/* @__PURE__ */ r(o, { size: 48, color: "var(--app-gallary-text)" }),
|
|
9
|
+
/* @__PURE__ */ r(t, { c: "var(--app-gallary-text)", fz: "lg", fw: 600, children: l("gallery.unsupportedTitle") }),
|
|
10
|
+
e ? /* @__PURE__ */ r(t, { c: "var(--app-gallary-text)", fz: "sm", ta: "center", fs: "italic", children: e }) : null,
|
|
11
|
+
/* @__PURE__ */ r(t, { c: "var(--app-gallary-text)", fz: "sm", ta: "center", children: l("gallery.unsupportedBody") })
|
|
12
|
+
] }) });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
g as UnsupportedSection
|
|
16
|
+
};
|
|
@@ -5,5 +5,9 @@ export declare const useGetPreviewUrl: (attachment: IFileResponse) => {
|
|
|
5
5
|
isError: boolean;
|
|
6
6
|
setIsError: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
7
7
|
isVideo: boolean;
|
|
8
|
+
isPdf: boolean;
|
|
9
|
+
isImage: boolean;
|
|
10
|
+
isAudio: boolean;
|
|
11
|
+
isSupported: boolean;
|
|
8
12
|
};
|
|
9
13
|
//# sourceMappingURL=useGetPreviewUrl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetPreviewUrl.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGetPreviewUrl.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOrD,eAAO,MAAM,gBAAgB,GAAI,YAAY,aAAa;;;;;;;;;;CA4GzD,CAAC"}
|
|
@@ -1,28 +1,67 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { useState as p, useEffect as F, useMemo as T } from "react";
|
|
2
|
+
import { getEnvConfig as L } from "../../../config/envConfig.js";
|
|
3
|
+
import { isVideoFile as v } from "../../../helpers/fileUtils.js";
|
|
4
|
+
const h = () => {
|
|
5
|
+
const e = L().apiBaseUrl || "";
|
|
6
|
+
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
7
|
+
}, B = (e) => {
|
|
8
|
+
const [u, y] = p(null), [d, n] = p(!1), [w, a] = p(!1);
|
|
9
|
+
async function g(i) {
|
|
10
|
+
return fetch(`${h()}/v1/attachments/${i}`, {
|
|
11
|
+
method: "GET",
|
|
12
|
+
credentials: "include"
|
|
9
13
|
});
|
|
10
|
-
if (!i.ok)
|
|
11
|
-
throw s(!1), o(!0), new Error(`Error loading: ${i.statusText}`);
|
|
12
|
-
const a = await i.blob();
|
|
13
|
-
c(window.URL.createObjectURL(a)), s(!1), o(!1);
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
async function m() {
|
|
16
|
+
try {
|
|
17
|
+
return (await fetch(`${h()}/v1/auth/refresh`, {
|
|
18
|
+
method: "POST",
|
|
19
|
+
credentials: "include"
|
|
20
|
+
})).ok;
|
|
21
|
+
} catch {
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function U(i, b) {
|
|
26
|
+
n(!0);
|
|
27
|
+
let s = await g(i);
|
|
28
|
+
if ((s.status === 401 || s.status === 403) && await m() && (s = await g(i)), !s.ok)
|
|
29
|
+
throw n(!1), a(!0), new Error(`Error loading: ${s.statusText}`);
|
|
30
|
+
const f = await s.blob(), E = b && f.type !== "application/pdf" ? new Blob([f], { type: "application/pdf" }) : f;
|
|
31
|
+
y(window.URL.createObjectURL(E)), n(!1), a(!1);
|
|
32
|
+
}
|
|
33
|
+
const t = v(
|
|
16
34
|
e.contentType,
|
|
17
35
|
e.originalFileName
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
), o = (e.contentType || "").toLowerCase() === "application/pdf" || (e.originalFileName || "").toLowerCase().endsWith(".pdf"), c = (e.contentType || "").toLowerCase().startsWith("image/"), l = (e.contentType || "").toLowerCase().startsWith("audio/") || /\.(mp3|wav|ogg|flac|m4a|aac|opus|weba)$/i.test(
|
|
37
|
+
e.originalFileName || ""
|
|
38
|
+
), r = c || t || o || l;
|
|
39
|
+
return F(() => {
|
|
40
|
+
e.id && !t && r && !e.Url && U(e.id, o);
|
|
41
|
+
}, [e.Url, e.id, t, o, r]), T(
|
|
42
|
+
() => ({
|
|
43
|
+
fileUrl: u,
|
|
44
|
+
isFetching: d,
|
|
45
|
+
isError: w,
|
|
46
|
+
setIsError: a,
|
|
47
|
+
isVideo: t,
|
|
48
|
+
isPdf: o,
|
|
49
|
+
isImage: c,
|
|
50
|
+
isAudio: l,
|
|
51
|
+
isSupported: r
|
|
52
|
+
}),
|
|
53
|
+
[
|
|
54
|
+
u,
|
|
55
|
+
w,
|
|
56
|
+
d,
|
|
57
|
+
t,
|
|
58
|
+
o,
|
|
59
|
+
c,
|
|
60
|
+
l,
|
|
61
|
+
r
|
|
62
|
+
]
|
|
24
63
|
);
|
|
25
64
|
};
|
|
26
65
|
export {
|
|
27
|
-
|
|
66
|
+
B as useGetPreviewUrl
|
|
28
67
|
};
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_container_13fbv_1", n = "_root_13fbv_7", t = "_carouselRoot_13fbv_14", e = "_carouselViewport_13fbv_18", a = "_carouselSlide_13fbv_22", _ = "_navButton_13fbv_29", r = "_navButtonPrev_13fbv_42", i = "_navButtonNext_13fbv_46", v = "_modalContent_13fbv_50", d = "_modalBody_13fbv_55", c = "_videoContainer_13fbv_61", s = "_imageContainer_13fbv_66", u = "_pdfContainer_13fbv_73", f = "_pdfFrame_13fbv_81", l = "_audioContainer_13fbv_88", m = "_audioName_13fbv_103", b = "_audioElement_13fbv_111", C = {
|
|
2
2
|
container: o,
|
|
3
|
-
root:
|
|
4
|
-
carouselRoot:
|
|
3
|
+
root: n,
|
|
4
|
+
carouselRoot: t,
|
|
5
5
|
carouselViewport: e,
|
|
6
6
|
carouselSlide: a,
|
|
7
|
-
navButton:
|
|
8
|
-
navButtonPrev:
|
|
9
|
-
navButtonNext:
|
|
7
|
+
navButton: _,
|
|
8
|
+
navButtonPrev: r,
|
|
9
|
+
navButtonNext: i,
|
|
10
10
|
modalContent: v,
|
|
11
|
-
modalBody:
|
|
12
|
-
videoContainer:
|
|
13
|
-
imageContainer:
|
|
11
|
+
modalBody: d,
|
|
12
|
+
videoContainer: c,
|
|
13
|
+
imageContainer: s,
|
|
14
|
+
pdfContainer: u,
|
|
15
|
+
pdfFrame: f,
|
|
16
|
+
audioContainer: l,
|
|
17
|
+
audioName: m,
|
|
18
|
+
audioElement: b
|
|
14
19
|
};
|
|
15
20
|
export {
|
|
16
|
-
|
|
21
|
+
l as audioContainer,
|
|
22
|
+
b as audioElement,
|
|
23
|
+
m as audioName,
|
|
24
|
+
t as carouselRoot,
|
|
17
25
|
a as carouselSlide,
|
|
18
26
|
e as carouselViewport,
|
|
19
27
|
o as container,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
C as default,
|
|
29
|
+
s as imageContainer,
|
|
30
|
+
d as modalBody,
|
|
23
31
|
v as modalContent,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
_ as navButton,
|
|
33
|
+
i as navButtonNext,
|
|
34
|
+
r as navButtonPrev,
|
|
35
|
+
u as pdfContainer,
|
|
36
|
+
f as pdfFrame,
|
|
37
|
+
n as root,
|
|
38
|
+
c as videoContainer
|
|
29
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentsPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentsPreview/AttachmentsPreview.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIhE,UAAU,8BAA8B;IACtC,KAAK,EAAE,oBAAoB,CAAC,cAAc,EAAE,CAAC;IAC7C,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,GAAI,8CAKhC,8BAA8B,
|
|
1
|
+
{"version":3,"file":"AttachmentsPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentsPreview/AttachmentsPreview.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIhE,UAAU,8BAA8B;IACtC,KAAK,EAAE,oBAAoB,CAAC,cAAc,EAAE,CAAC;IAC7C,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,GAAI,8CAKhC,8BAA8B,mDAoNhC,CAAC"}
|