@layers-app/shared 0.3.9 → 0.4.0
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 +1 -4
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +15 -22
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +21 -22
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +91 -48
- 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 +1 -3
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +63 -89
- 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 +26 -35
- 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 +36 -43
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +0 -4
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +20 -59
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +18 -28
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +18 -22
- 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 +18 -23
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +139 -145
- package/dist/components/ColorPicker/ColorPicker.module.css.js +8 -8
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +88 -71
- package/dist/components/ColorPicker/icons.js +4 -4
- 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 +4 -3
- 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 +22 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +1 -0
- 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 +33 -43
- 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 +4 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +241 -226
- package/dist/components/FilePicker/FilePicker.module.css.js +14 -12
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +60 -34
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +38 -39
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +29 -26
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +42 -43
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +51 -35
- package/dist/components/FilePicker/coverCollections.d.ts +4 -0
- package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
- package/dist/components/FilePicker/coverCollections.js +164 -0
- package/dist/components/FilePicker/index.d.ts +1 -0
- 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 +0 -6
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +3 -4
- 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 +6358 -381
- 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 +1 -3
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +21 -24
- 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 +1 -3
- 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 +1 -7
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +23 -21
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NewColorPicker/components/Target.d.ts +1 -3
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +43 -48
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.js +1 -3
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/Notification/NotificationCard.d.ts +1 -3
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +86 -87
- 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 +74 -70
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +12 -7
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +60 -58
- 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 +1 -2
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +35 -38
- 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 +18 -19
- 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/envConfig.d.ts +0 -8
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +13 -21
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +45 -63
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +8 -29
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +4 -5
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +29 -30
- 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 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +465 -467
- package/dist/lang/locales/ui_en.json.js +20 -18
- package/dist/lang/locales/ui_es.json.js +14 -12
- package/dist/lang/locales/ui_ru.json.js +15 -13
- package/dist/node_modules/countries-and-timezones/esm/index.js +4011 -281
- package/docs/README.md +499 -499
- package/package.json +75 -75
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +0 -6
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +0 -1
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +0 -16
- package/dist/components/TextColorIcon.d.ts +0 -8
- package/dist/components/TextColorIcon.d.ts.map +0 -1
- package/dist/components/TextColorIcon.js +0 -60
- package/dist/helpers/offlineSuppression.d.ts +0 -3
- package/dist/helpers/offlineSuppression.d.ts.map +0 -1
- package/dist/helpers/offlineSuppression.js +0 -8
|
@@ -1,95 +1,69 @@
|
|
|
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, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as u, forwardRef as g } from "react";
|
|
3
|
+
import { TransformWrapper as h, TransformComponent as C } from "react-zoom-pan-pinch";
|
|
4
|
+
import { Box as N } from "@mantine/core";
|
|
5
|
+
import { BaseLoader as O } from "../../Loaders/BaseLoader.js";
|
|
6
|
+
import { ShakaVideoPlayer as P } from "./ShakePlayer/ShakaPlayer.js";
|
|
7
|
+
import { ZOOM_CONFIG as o, TRANSFORM_COMPONENT_STYLES as t } 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
|
-
|
|
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",
|
|
9
|
+
import { usePanning as w } from "../hooks/usePanning.js";
|
|
10
|
+
import { ErrorSection as y } from "./ErrorSection.js";
|
|
11
|
+
import m from "../styles.module.css.js";
|
|
12
|
+
const k = u(
|
|
13
|
+
g(
|
|
14
|
+
({ onTransformed: n, attachment: e, isActive: s }, d) => {
|
|
15
|
+
const { isError: p, setIsError: c, fileUrl: f, isFetching: i, isVideo: l } = b(e), S = w({ isFetching: i, isVideo: l });
|
|
16
|
+
return /* @__PURE__ */ r(
|
|
17
|
+
h,
|
|
18
|
+
{
|
|
19
|
+
panning: {
|
|
20
|
+
disabled: !0
|
|
21
|
+
},
|
|
22
|
+
onTransformed: n,
|
|
23
|
+
initialScale: o.initialScale,
|
|
24
|
+
minScale: o.minScale,
|
|
25
|
+
maxScale: o.maxScale,
|
|
26
|
+
limitToBounds: !0,
|
|
27
|
+
disabled: i || l,
|
|
28
|
+
disablePadding: !0,
|
|
29
|
+
centerZoomedOut: !0,
|
|
30
|
+
ref: d,
|
|
31
|
+
wheel: {
|
|
32
|
+
disabled: !1,
|
|
33
|
+
step: o.wheelStep
|
|
34
|
+
},
|
|
35
|
+
doubleClick: {
|
|
36
|
+
disabled: !0
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ r(
|
|
39
|
+
C,
|
|
40
|
+
{
|
|
41
|
+
wrapperStyle: t,
|
|
42
|
+
contentStyle: t,
|
|
43
|
+
wrapperProps: S,
|
|
44
|
+
children: i ? /* @__PURE__ */ r(O, {}) : /* @__PURE__ */ r(a, { children: l ? /* @__PURE__ */ r(N, { className: m.videoContainer, children: /* @__PURE__ */ r(
|
|
45
|
+
P,
|
|
71
46
|
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
className: i.audioElement
|
|
47
|
+
isActive: s,
|
|
48
|
+
autoPlay: !1,
|
|
49
|
+
attachmentId: e.id
|
|
76
50
|
}
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
51
|
+
) }) : /* @__PURE__ */ r(a, { children: p ? /* @__PURE__ */ r(y, {}) : /* @__PURE__ */ r(
|
|
52
|
+
"img",
|
|
53
|
+
{
|
|
54
|
+
onError: () => c(!0),
|
|
55
|
+
alt: e.originalFileName || "file",
|
|
56
|
+
className: m.imageContainer,
|
|
57
|
+
src: e?.Url ?? f ?? ""
|
|
58
|
+
}
|
|
59
|
+
) }) })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
)
|
|
92
66
|
);
|
|
93
67
|
export {
|
|
94
|
-
|
|
68
|
+
k as GallerySlide
|
|
95
69
|
};
|
|
@@ -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 |
|
|
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;
|
|
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":"AASA,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,8GAgCX,CAAC"}
|
|
@@ -1,53 +1,44 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as d, useEffect as g } from "react";
|
|
3
2
|
import a from "clsx";
|
|
4
|
-
import
|
|
5
|
-
import { BaseLoader as
|
|
6
|
-
import { ErrorSection as
|
|
7
|
-
import { useShakePlayer as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
attachmentId:
|
|
11
|
-
autoPlay:
|
|
12
|
-
isActive:
|
|
13
|
-
loader:
|
|
14
|
-
stylesContainer:
|
|
3
|
+
import n from "shaka-player-react";
|
|
4
|
+
import { BaseLoader as y } from "../../../Loaders/BaseLoader.js";
|
|
5
|
+
import { ErrorSection as d } from "../ErrorSection.js";
|
|
6
|
+
import { useShakePlayer as h } from "./useShakePlayer.js";
|
|
7
|
+
import t from "./ShakaPlayer.module.css.js";
|
|
8
|
+
const N = ({
|
|
9
|
+
attachmentId: m,
|
|
10
|
+
autoPlay: e,
|
|
11
|
+
isActive: s,
|
|
12
|
+
loader: i,
|
|
13
|
+
stylesContainer: l,
|
|
15
14
|
classNameContainer: p
|
|
16
15
|
}) => {
|
|
17
|
-
const { isError:
|
|
18
|
-
autoPlay:
|
|
19
|
-
isActive:
|
|
20
|
-
attachmentId:
|
|
21
|
-
})
|
|
22
|
-
return
|
|
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(
|
|
16
|
+
const { isError: f, containerRef: c, vodUrl: o } = h({
|
|
17
|
+
autoPlay: e,
|
|
18
|
+
isActive: s,
|
|
19
|
+
attachmentId: m
|
|
20
|
+
});
|
|
21
|
+
return f ? /* @__PURE__ */ r(d, {}) : o ? /* @__PURE__ */ r(
|
|
28
22
|
"div",
|
|
29
23
|
{
|
|
30
|
-
ref:
|
|
31
|
-
style:
|
|
24
|
+
ref: c,
|
|
25
|
+
style: l,
|
|
32
26
|
className: a(
|
|
33
|
-
|
|
27
|
+
t["vod-player"],
|
|
34
28
|
"shaka-vod-player-wrapper",
|
|
35
29
|
p
|
|
36
30
|
),
|
|
37
31
|
children: /* @__PURE__ */ r(
|
|
38
|
-
|
|
32
|
+
n,
|
|
39
33
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
src: e,
|
|
44
|
-
crossOrigin: "use-credentials",
|
|
45
|
-
controls: !0
|
|
34
|
+
autoPlay: e ?? !0,
|
|
35
|
+
className: a(t["vod-player__player"]),
|
|
36
|
+
src: o
|
|
46
37
|
}
|
|
47
38
|
)
|
|
48
39
|
}
|
|
49
|
-
) :
|
|
40
|
+
) : i ?? /* @__PURE__ */ r(y, {});
|
|
50
41
|
};
|
|
51
42
|
export {
|
|
52
|
-
|
|
43
|
+
N as ShakaVideoPlayer
|
|
53
44
|
};
|
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 a = {
|
|
2
|
+
"vod-player": "_vod-player_1paib_1",
|
|
3
|
+
"vod-player__player": "_vod-player__player_1paib_25"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a 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>;
|
|
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":"AAEA,eAAO,MAAM,cAAc,GAAI,uCAI5B;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;CA+GA,CAAC"}
|
|
@@ -1,61 +1,54 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const e = y().apiBaseUrl || "";
|
|
5
|
-
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
6
|
-
}, C = ({
|
|
7
|
-
attachmentId: e,
|
|
1
|
+
import { useState as g, useRef as c, useEffect as E } from "react";
|
|
2
|
+
const y = ({
|
|
3
|
+
attachmentId: o,
|
|
8
4
|
isActive: i,
|
|
9
5
|
autoPlay: a
|
|
10
6
|
}) => {
|
|
11
|
-
const [l, f] =
|
|
12
|
-
if (!
|
|
7
|
+
const [l, f] = g(null), [h, d] = g(!1), s = c(null), u = c(!0), t = c(null), r = c(null), b = async () => {
|
|
8
|
+
if (!o)
|
|
13
9
|
return;
|
|
14
10
|
r.current && r.current.abort();
|
|
15
|
-
const
|
|
16
|
-
r.current =
|
|
11
|
+
const e = new AbortController();
|
|
12
|
+
r.current = e;
|
|
17
13
|
try {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
);
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (b.ready) {
|
|
33
|
-
const h = o || window.location.origin, U = new URL(b.url, h).toString();
|
|
34
|
-
f(U);
|
|
14
|
+
const n = await fetch(`/v1/attachments/${o}/vod`, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
credentials: "include",
|
|
17
|
+
headers: {
|
|
18
|
+
Accept: "*/*"
|
|
19
|
+
},
|
|
20
|
+
signal: e.signal
|
|
21
|
+
});
|
|
22
|
+
if (!n.ok) throw new Error("Failed to get VOD URL");
|
|
23
|
+
const w = await n.json();
|
|
24
|
+
if (!u.current || e.signal.aborted) return;
|
|
25
|
+
if (w.ready) {
|
|
26
|
+
const m = new URL(w.url, window.location.origin).toString();
|
|
27
|
+
f(m);
|
|
35
28
|
} else
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
t.current = setTimeout(() => {
|
|
30
|
+
b();
|
|
38
31
|
}, 3e3);
|
|
39
|
-
} catch (
|
|
40
|
-
if (
|
|
32
|
+
} catch (n) {
|
|
33
|
+
if (n instanceof Error && n.name === "AbortError" || !u.current || e.signal.aborted) return;
|
|
41
34
|
d(!0);
|
|
42
35
|
}
|
|
43
36
|
};
|
|
44
|
-
return
|
|
45
|
-
if (u.current = !0, f(null), d(!1),
|
|
46
|
-
return
|
|
47
|
-
u.current = !1,
|
|
37
|
+
return E(() => {
|
|
38
|
+
if (u.current = !0, f(null), d(!1), t.current && (clearTimeout(t.current), t.current = null), r.current && (r.current.abort(), r.current = null), !!o)
|
|
39
|
+
return b(), () => {
|
|
40
|
+
u.current = !1, t.current && (clearTimeout(t.current), t.current = null), r.current && (r.current.abort(), r.current = null);
|
|
48
41
|
};
|
|
49
|
-
}, [
|
|
42
|
+
}, [o]), E(() => {
|
|
50
43
|
if (!l || !s.current) return;
|
|
51
|
-
const
|
|
44
|
+
const e = s.current.querySelector(
|
|
52
45
|
"video"
|
|
53
46
|
);
|
|
54
|
-
|
|
55
|
-
console.error("Ошибка при воспроизведении видео:",
|
|
56
|
-
}) :
|
|
57
|
-
}, [i, l, a]), { containerRef: s, isError:
|
|
47
|
+
e && (i ? a !== !1 && e.play().catch((n) => {
|
|
48
|
+
console.error("Ошибка при воспроизведении видео:", n);
|
|
49
|
+
}) : e.pause());
|
|
50
|
+
}, [i, l, a]), { containerRef: s, isError: h, vodUrl: l };
|
|
58
51
|
};
|
|
59
52
|
export {
|
|
60
|
-
|
|
53
|
+
y as useShakePlayer
|
|
61
54
|
};
|
|
@@ -5,9 +5,5 @@ 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;
|
|
12
8
|
};
|
|
13
9
|
//# 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":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,eAAO,MAAM,gBAAgB,GAAI,YAAY,aAAa;;;;;;CAwCzD,CAAC"}
|
|
@@ -1,67 +1,28 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
async function g(i) {
|
|
10
|
-
return fetch(`${h()}/v1/attachments/${i}`, {
|
|
11
|
-
method: "GET",
|
|
12
|
-
credentials: "include"
|
|
1
|
+
import { useState as t, useEffect as w, useMemo as U } from "react";
|
|
2
|
+
import { isVideoFile as E } from "../../../helpers/fileUtils.js";
|
|
3
|
+
const p = (e) => {
|
|
4
|
+
const [l, c] = t(null), [n, s] = t(!1), [f, o] = t(!1);
|
|
5
|
+
async function u(d) {
|
|
6
|
+
s(!0);
|
|
7
|
+
const i = await fetch(`/v1/attachments/${d}`, {
|
|
8
|
+
method: "GET"
|
|
13
9
|
});
|
|
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
|
-
|
|
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(
|
|
15
|
+
const r = E(
|
|
34
16
|
e.contentType,
|
|
35
17
|
e.originalFileName
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
]
|
|
18
|
+
);
|
|
19
|
+
return w(() => {
|
|
20
|
+
e.id && !r && !e.Url && u(e.id);
|
|
21
|
+
}, [e.Url, e.id, r]), U(
|
|
22
|
+
() => ({ fileUrl: l, isFetching: n, isError: f, setIsError: o, isVideo: r }),
|
|
23
|
+
[l, f, n, r]
|
|
63
24
|
);
|
|
64
25
|
};
|
|
65
26
|
export {
|
|
66
|
-
|
|
27
|
+
p as useGetPreviewUrl
|
|
67
28
|
};
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_container_sq5v9_1", t = "_root_sq5v9_13", n = "_carouselRoot_sq5v9_27", e = "_carouselViewport_sq5v9_35", a = "_carouselSlide_sq5v9_43", s = "_navButton_sq5v9_57", _ = "_navButtonPrev_sq5v9_83", r = "_navButtonNext_sq5v9_91", v = "_modalContent_sq5v9_99", c = "_modalBody_sq5v9_109", i = "_videoContainer_sq5v9_121", l = "_imageContainer_sq5v9_131", u = {
|
|
2
2
|
container: o,
|
|
3
|
-
root:
|
|
4
|
-
carouselRoot:
|
|
3
|
+
root: t,
|
|
4
|
+
carouselRoot: n,
|
|
5
5
|
carouselViewport: e,
|
|
6
6
|
carouselSlide: a,
|
|
7
|
-
navButton:
|
|
8
|
-
navButtonPrev:
|
|
9
|
-
navButtonNext:
|
|
7
|
+
navButton: s,
|
|
8
|
+
navButtonPrev: _,
|
|
9
|
+
navButtonNext: r,
|
|
10
10
|
modalContent: v,
|
|
11
|
-
modalBody:
|
|
12
|
-
videoContainer:
|
|
13
|
-
imageContainer:
|
|
14
|
-
pdfContainer: u,
|
|
15
|
-
pdfFrame: f,
|
|
16
|
-
audioContainer: l,
|
|
17
|
-
audioName: m,
|
|
18
|
-
audioElement: b
|
|
11
|
+
modalBody: c,
|
|
12
|
+
videoContainer: i,
|
|
13
|
+
imageContainer: l
|
|
19
14
|
};
|
|
20
15
|
export {
|
|
21
|
-
|
|
22
|
-
b as audioElement,
|
|
23
|
-
m as audioName,
|
|
24
|
-
t as carouselRoot,
|
|
16
|
+
n as carouselRoot,
|
|
25
17
|
a as carouselSlide,
|
|
26
18
|
e as carouselViewport,
|
|
27
19
|
o as container,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
u as default,
|
|
21
|
+
l as imageContainer,
|
|
22
|
+
c as modalBody,
|
|
31
23
|
v as modalContent,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
n as root,
|
|
38
|
-
c as videoContainer
|
|
24
|
+
s as navButton,
|
|
25
|
+
r as navButtonNext,
|
|
26
|
+
_ as navButtonPrev,
|
|
27
|
+
t as root,
|
|
28
|
+
i as videoContainer
|
|
39
29
|
};
|
|
@@ -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,mDAgNhC,CAAC"}
|