@layers-app/shared 0.4.4 → 0.4.5
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 +13 -13
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
- 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.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +7 -7
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
- package/dist/components/Chat/CallMessage/index.d.ts +21 -0
- package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/CallMessage/index.js +49 -0
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
- package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
- package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatBubble/index.js +32 -0
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
- package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
- package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatHeader/index.js +78 -0
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
- package/dist/components/Chat/ChatInput/index.d.ts +46 -0
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/index.js +228 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
- package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
- package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatLayout/index.js +43 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
- package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatMessage/index.js +188 -0
- package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
- package/dist/components/Chat/ChatPill/index.d.ts +12 -0
- package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatPill/index.js +21 -0
- package/dist/components/Chat/DayMeta/index.d.ts +11 -0
- package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/DayMeta/index.js +9 -0
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
- package/dist/components/Chat/DialogItem/index.d.ts +41 -0
- package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogItem/index.js +107 -0
- package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
- package/dist/components/Chat/DialogList/index.d.ts +11 -0
- package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogList/index.js +19 -0
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
- package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
- package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
- package/dist/components/Chat/MediaDocument/index.js +73 -0
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
- package/dist/components/Chat/MessageActions/index.d.ts +16 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageActions/index.js +65 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageAuthor/index.js +36 -0
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
- package/dist/components/Chat/MessageForward/index.d.ts +13 -0
- package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageForward/index.js +30 -0
- package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
- package/dist/components/Chat/MessageList/index.d.ts +12 -0
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageList/index.js +71 -0
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
- package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageMeta/index.js +33 -0
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReactions/index.js +40 -0
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReply/index.js +40 -0
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
- package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
- package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageStatus/index.js +53 -0
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ServiceMessage/index.js +21 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
- package/dist/components/Chat/UnreadSeparator/index.js +13 -0
- package/dist/components/Chat/colors.d.ts +7 -0
- package/dist/components/Chat/colors.d.ts.map +1 -0
- package/dist/components/Chat/colors.js +30 -0
- package/dist/components/Chat/icons.d.ts +9 -0
- package/dist/components/Chat/icons.d.ts.map +1 -0
- package/dist/components/Chat/icons.js +49 -0
- package/dist/components/Chat/index.d.ts +24 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/mock-data.d.ts +32 -0
- package/dist/components/Chat/mock-data.d.ts.map +1 -0
- package/dist/components/Chat/types.d.ts +159 -0
- package/dist/components/Chat/types.d.ts.map +1 -0
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +24 -24
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/types.js +9 -0
- 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/EmojiPicker.d.ts +8 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +36 -27
- 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.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +135 -161
- package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
- package/dist/components/FilePicker/FilePickerGallery.js +13 -13
- package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
- package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +55 -47
- 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/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/Notification.module.css.js +1 -1
- package/dist/components/PillTabs/PillTabs.d.ts +19 -0
- package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
- package/dist/components/PillTabs/PillTabs.js +50 -0
- package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
- 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.js +1 -1
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- 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 +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +573 -522
- package/dist/lang/locales/ui_en.json.js +5 -5
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/docs/README.md +499 -499
- package/package.json +78 -75
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_page_4n9uu_5", u = "_figureContainer_4n9uu_31", g = "_figure_4n9uu_31", _ = "_figureA_4n9uu_57", a = "_figureB_4n9uu_65", n = "_grainOverlay_4n9uu_229", r = "_badgeWrap_4n9uu_253", i = "_badge0_4n9uu_309", t = "_badge1_4n9uu_319", d = "_badge2_4n9uu_337", o = "_badge3_4n9uu_355", b = {
|
|
2
2
|
page: e,
|
|
3
|
-
figureContainer:
|
|
4
|
-
figure:
|
|
5
|
-
figureA:
|
|
6
|
-
figureB:
|
|
7
|
-
grainOverlay:
|
|
8
|
-
badgeWrap:
|
|
3
|
+
figureContainer: u,
|
|
4
|
+
figure: g,
|
|
5
|
+
figureA: _,
|
|
6
|
+
figureB: a,
|
|
7
|
+
grainOverlay: n,
|
|
8
|
+
badgeWrap: r,
|
|
9
9
|
badge0: i,
|
|
10
10
|
badge1: t,
|
|
11
11
|
badge2: d,
|
|
@@ -16,12 +16,12 @@ export {
|
|
|
16
16
|
t as badge1,
|
|
17
17
|
d as badge2,
|
|
18
18
|
o as badge3,
|
|
19
|
-
|
|
19
|
+
r as badgeWrap,
|
|
20
20
|
b as default,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
g as figure,
|
|
22
|
+
_ as figureA,
|
|
23
|
+
a as figureB,
|
|
24
|
+
u as figureContainer,
|
|
25
|
+
n as grainOverlay,
|
|
26
26
|
e as page
|
|
27
27
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_toolTitleInput_7pu9q_37", n = "_appSidebarButton_7pu9q_67", o = "_slideContainer_7pu9q_109", e = "_slideContent_7pu9q_121", i = "_main_7pu9q_151", l = "_floatingMeetSlot_7pu9q_169", a = {
|
|
2
2
|
toolTitleInput: t,
|
|
3
3
|
appSidebarButton: n,
|
|
4
4
|
slideContainer: o,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/components/SidebarToggleButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/components/SidebarToggleButton.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,mDAyBrE,CAAC"}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { useTranslation as n } from "react-i18next";
|
|
3
|
+
import { SidebarLeft01Icon as a, SidebarRight01Icon as l } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as p } from "@hugeicons/react";
|
|
5
|
+
import { Tooltip as c, ActionIcon as m } from "@mantine/core";
|
|
6
|
+
import { appContainerStore as e } from "../hooks/useAppContainerStore.js";
|
|
7
|
+
const h = ({ forOpen: i }) => {
|
|
8
|
+
const { t } = n("appContainer"), { showToolbar: o } = e.useStore();
|
|
9
|
+
return i && o ? null : /* @__PURE__ */ r(
|
|
10
|
+
c,
|
|
10
11
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onClick: t.api.toggleToolbar,
|
|
12
|
+
label: t(o ? "hideSidebar" : "showSidebar"),
|
|
13
|
+
withArrow: !0,
|
|
14
|
+
openDelay: 400,
|
|
15
15
|
children: /* @__PURE__ */ r(
|
|
16
|
-
|
|
16
|
+
m,
|
|
17
17
|
{
|
|
18
|
-
|
|
19
|
-
size:
|
|
18
|
+
variant: "subtle",
|
|
19
|
+
size: "md",
|
|
20
|
+
color: "gray",
|
|
21
|
+
onClick: e.api.toggleToolbar,
|
|
22
|
+
children: /* @__PURE__ */ r(
|
|
23
|
+
p,
|
|
24
|
+
{
|
|
25
|
+
icon: o ? a : l,
|
|
26
|
+
size: 20
|
|
27
|
+
}
|
|
28
|
+
)
|
|
20
29
|
}
|
|
21
30
|
)
|
|
22
31
|
}
|
|
23
32
|
);
|
|
24
33
|
};
|
|
25
34
|
export {
|
|
26
|
-
|
|
35
|
+
h as SidebarToggleButton
|
|
27
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
header:
|
|
1
|
+
const t = "_root_10w7v_1", e = "_header_10w7v_17", o = "_section_10w7v_39", _ = "_leftSidebar_10w7v_55", n = "_rightSidebar_10w7v_71", r = "_main_10w7v_87", i = "_workContent_10w7v_103", a = {
|
|
2
|
+
root: t,
|
|
3
|
+
header: e,
|
|
4
4
|
section: o,
|
|
5
5
|
leftSidebar: _,
|
|
6
6
|
rightSidebar: n,
|
|
@@ -9,11 +9,11 @@ const e = "_root_9zlef_1", t = "_header_9zlef_9", o = "_section_9zlef_20", _ = "
|
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
a as default,
|
|
12
|
-
|
|
12
|
+
e as header,
|
|
13
13
|
_ as leftSidebar,
|
|
14
14
|
r as main,
|
|
15
15
|
n as rightSidebar,
|
|
16
|
-
|
|
16
|
+
t as root,
|
|
17
17
|
o as section,
|
|
18
18
|
i as workContent
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GallerySlide.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/GallerySlide.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAsB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,UAAU,MAAM;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAClC,OAAO,gBAAgB,CACxB,CAAC,eAAe,CAAC,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,2EACwB,MAAM,
|
|
1
|
+
{"version":3,"file":"GallerySlide.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentsGalleryModal/components/GallerySlide.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAsB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,UAAU,MAAM;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAClC,OAAO,gBAAgB,CACxB,CAAC,eAAe,CAAC,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,2EACwB,MAAM,6CA0GtD,CAAC"}
|
|
@@ -1,45 +1,52 @@
|
|
|
1
1
|
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import { memo as P } from "react";
|
|
3
3
|
import { TransformWrapper as F, TransformComponent as T } from "react-zoom-pan-pinch";
|
|
4
|
-
import { Box as
|
|
4
|
+
import { Box as a } from "@mantine/core";
|
|
5
5
|
import { BaseLoader as U } from "../../Loaders/BaseLoader.js";
|
|
6
6
|
import { ShakaVideoPlayer as E } from "./ShakePlayer/ShakaPlayer.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TRANSFORM_COMPONENT_STYLES as p, ZOOM_CONFIG as s } from "../constants.js";
|
|
8
8
|
import { useGetPreviewUrl as O } from "../hooks/useGetPreviewUrl.js";
|
|
9
9
|
import { usePanning as b } from "../hooks/usePanning.js";
|
|
10
|
-
import { ErrorSection as
|
|
10
|
+
import { ErrorSection as t } from "./ErrorSection.js";
|
|
11
11
|
import { UnsupportedSection as x } from "./UnsupportedSection.js";
|
|
12
12
|
import i from "../styles.module.css.js";
|
|
13
|
-
const
|
|
14
|
-
({ onTransformed: S, attachment: e, isActive:
|
|
13
|
+
const h = P(
|
|
14
|
+
({ onTransformed: S, attachment: e, isActive: n, ref: N }) => {
|
|
15
15
|
const {
|
|
16
|
-
isError:
|
|
16
|
+
isError: m,
|
|
17
17
|
setIsError: g,
|
|
18
18
|
fileUrl: o,
|
|
19
|
-
isFetching:
|
|
20
|
-
isVideo:
|
|
21
|
-
isPdf:
|
|
22
|
-
isAudio:
|
|
23
|
-
isSupported:
|
|
24
|
-
} = O(e), y = b({ isFetching:
|
|
25
|
-
return /* @__PURE__ */ r(
|
|
19
|
+
isFetching: l,
|
|
20
|
+
isVideo: f,
|
|
21
|
+
isPdf: c,
|
|
22
|
+
isAudio: u,
|
|
23
|
+
isSupported: d
|
|
24
|
+
} = O(e), y = b({ isFetching: l, isVideo: f });
|
|
25
|
+
return f && !l && d ? /* @__PURE__ */ r("div", { style: p, children: /* @__PURE__ */ r(a, { className: i.videoContainer, children: /* @__PURE__ */ r(
|
|
26
|
+
E,
|
|
27
|
+
{
|
|
28
|
+
isActive: n,
|
|
29
|
+
autoPlay: n,
|
|
30
|
+
attachmentId: e.id
|
|
31
|
+
}
|
|
32
|
+
) }) }) : /* @__PURE__ */ r(
|
|
26
33
|
F,
|
|
27
34
|
{
|
|
28
35
|
panning: {
|
|
29
36
|
disabled: !0
|
|
30
37
|
},
|
|
31
38
|
onTransformed: S,
|
|
32
|
-
initialScale:
|
|
33
|
-
minScale:
|
|
34
|
-
maxScale:
|
|
39
|
+
initialScale: s.initialScale,
|
|
40
|
+
minScale: s.minScale,
|
|
41
|
+
maxScale: s.maxScale,
|
|
35
42
|
limitToBounds: !0,
|
|
36
|
-
disabled:
|
|
43
|
+
disabled: l || c || u || !d,
|
|
37
44
|
disablePadding: !0,
|
|
38
45
|
centerZoomedOut: !0,
|
|
39
46
|
ref: N,
|
|
40
47
|
wheel: {
|
|
41
48
|
disabled: !1,
|
|
42
|
-
step:
|
|
49
|
+
step: s.wheelStep
|
|
43
50
|
},
|
|
44
51
|
doubleClick: {
|
|
45
52
|
disabled: !0
|
|
@@ -47,35 +54,28 @@ const A = P(
|
|
|
47
54
|
children: /* @__PURE__ */ r(
|
|
48
55
|
T,
|
|
49
56
|
{
|
|
50
|
-
wrapperStyle:
|
|
51
|
-
contentStyle:
|
|
57
|
+
wrapperStyle: p,
|
|
58
|
+
contentStyle: p,
|
|
52
59
|
wrapperProps: y,
|
|
53
|
-
children:
|
|
54
|
-
E,
|
|
55
|
-
{
|
|
56
|
-
isActive: s,
|
|
57
|
-
autoPlay: s,
|
|
58
|
-
attachmentId: e.id
|
|
59
|
-
}
|
|
60
|
-
) }) : t ? n || !(e?.Url || o) ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(l, { className: i.pdfContainer, children: /* @__PURE__ */ r(
|
|
60
|
+
children: d ? l ? /* @__PURE__ */ r(U, {}) : c ? m || !(e?.Url || o) ? /* @__PURE__ */ r(t, {}) : /* @__PURE__ */ r(a, { className: i.pdfContainer, children: /* @__PURE__ */ r(
|
|
61
61
|
"iframe",
|
|
62
62
|
{
|
|
63
63
|
title: e.originalFileName || "pdf",
|
|
64
64
|
src: e?.Url ?? o ?? "",
|
|
65
65
|
className: i.pdfFrame
|
|
66
66
|
}
|
|
67
|
-
) }) :
|
|
68
|
-
/* @__PURE__ */ r(
|
|
67
|
+
) }) : u ? m || !(e?.Url || o) ? /* @__PURE__ */ r(t, {}) : /* @__PURE__ */ C(a, { className: i.audioContainer, children: [
|
|
68
|
+
/* @__PURE__ */ r(a, { className: i.audioName, children: e.originalFileName || "audio" }),
|
|
69
69
|
/* @__PURE__ */ r(
|
|
70
70
|
"audio",
|
|
71
71
|
{
|
|
72
72
|
src: e?.Url ?? o ?? "",
|
|
73
73
|
controls: !0,
|
|
74
|
-
autoPlay:
|
|
74
|
+
autoPlay: n,
|
|
75
75
|
className: i.audioElement
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
|
-
] }) :
|
|
78
|
+
] }) : m ? /* @__PURE__ */ r(t, {}) : /* @__PURE__ */ r(
|
|
79
79
|
"img",
|
|
80
80
|
{
|
|
81
81
|
onError: () => g(!0),
|
|
@@ -97,5 +97,5 @@ const A = P(
|
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
99
|
export {
|
|
100
|
-
|
|
100
|
+
h as GallerySlide
|
|
101
101
|
};
|
|
@@ -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":"AA2BA,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,yVAoEX,CAAC"}
|
|
@@ -1,52 +1,70 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { BaseLoader as
|
|
6
|
-
import { ErrorSection as
|
|
7
|
-
import { useShakePlayer as
|
|
8
|
-
import
|
|
2
|
+
import { useRef as g, useEffect as k } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import S from "shaka-player-react";
|
|
5
|
+
import { BaseLoader as w } from "../../../Loaders/BaseLoader.js";
|
|
6
|
+
import { ErrorSection as R } from "../ErrorSection.js";
|
|
7
|
+
import { useShakePlayer as _ } from "./useShakePlayer.js";
|
|
8
|
+
import n from "./ShakaPlayer.module.css.js";
|
|
9
9
|
const q = ({
|
|
10
|
-
attachmentId:
|
|
11
|
-
autoPlay:
|
|
12
|
-
isActive:
|
|
13
|
-
loader:
|
|
14
|
-
stylesContainer:
|
|
15
|
-
classNameContainer:
|
|
10
|
+
attachmentId: p,
|
|
11
|
+
autoPlay: t,
|
|
12
|
+
isActive: f,
|
|
13
|
+
loader: u,
|
|
14
|
+
stylesContainer: d,
|
|
15
|
+
classNameContainer: y
|
|
16
16
|
}) => {
|
|
17
|
-
const { isError:
|
|
18
|
-
autoPlay:
|
|
19
|
-
isActive:
|
|
20
|
-
attachmentId:
|
|
21
|
-
}),
|
|
22
|
-
return
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
const { fallbackToRawAttachment: e, isError: v, containerRef: E, vodUrl: o, rawUrl: i } = _({
|
|
18
|
+
autoPlay: t,
|
|
19
|
+
isActive: f,
|
|
20
|
+
attachmentId: p
|
|
21
|
+
}), l = g(null);
|
|
22
|
+
return k(() => {
|
|
23
|
+
const a = l.current?.player, c = a?.getNetworkingEngine?.();
|
|
24
|
+
if (!c) return;
|
|
25
|
+
c.registerRequestFilter((N, h) => {
|
|
26
|
+
h.allowCrossSiteCredentials = !0;
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
const m = () => {
|
|
29
|
+
e();
|
|
30
|
+
};
|
|
31
|
+
return a?.addEventListener?.("error", m), () => {
|
|
32
|
+
a?.removeEventListener?.("error", m);
|
|
33
|
+
};
|
|
34
|
+
}, [e, o]), v ? /* @__PURE__ */ r(R, {}) : !o && !i ? u ?? /* @__PURE__ */ r(w, {}) : /* @__PURE__ */ r(
|
|
28
35
|
"div",
|
|
29
36
|
{
|
|
30
|
-
ref:
|
|
31
|
-
style:
|
|
32
|
-
className:
|
|
33
|
-
|
|
37
|
+
ref: E,
|
|
38
|
+
style: d,
|
|
39
|
+
className: s(
|
|
40
|
+
n["vod-player"],
|
|
34
41
|
"shaka-vod-player-wrapper",
|
|
35
|
-
|
|
42
|
+
y
|
|
36
43
|
),
|
|
37
|
-
children: /* @__PURE__ */ r(
|
|
38
|
-
|
|
44
|
+
children: o ? /* @__PURE__ */ r(
|
|
45
|
+
S,
|
|
39
46
|
{
|
|
40
|
-
ref:
|
|
41
|
-
autoPlay:
|
|
42
|
-
className:
|
|
43
|
-
src:
|
|
47
|
+
ref: l,
|
|
48
|
+
autoPlay: t ?? !0,
|
|
49
|
+
className: s(n["vod-player__player"]),
|
|
50
|
+
src: o,
|
|
44
51
|
crossOrigin: "use-credentials",
|
|
45
|
-
controls: !0
|
|
52
|
+
controls: !0,
|
|
53
|
+
onError: e
|
|
54
|
+
}
|
|
55
|
+
) : /* @__PURE__ */ r(
|
|
56
|
+
"video",
|
|
57
|
+
{
|
|
58
|
+
autoPlay: t ?? !0,
|
|
59
|
+
className: s(n["vod-player__player"]),
|
|
60
|
+
src: i ?? void 0,
|
|
61
|
+
crossOrigin: "use-credentials",
|
|
62
|
+
controls: !0,
|
|
63
|
+
onError: e
|
|
46
64
|
}
|
|
47
65
|
)
|
|
48
66
|
}
|
|
49
|
-
)
|
|
67
|
+
);
|
|
50
68
|
};
|
|
51
69
|
export {
|
|
52
70
|
q as ShakaVideoPlayer
|
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 _ = {
|
|
2
|
+
"vod-player": "_vod-player_11682_1",
|
|
3
|
+
"vod-player__player": "_vod-player__player_11682_25"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -4,7 +4,9 @@ export declare const useShakePlayer: ({ attachmentId, isActive, autoPlay, }: {
|
|
|
4
4
|
autoPlay?: boolean;
|
|
5
5
|
}) => {
|
|
6
6
|
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
7
|
+
fallbackToRawAttachment: () => Promise<void>;
|
|
7
8
|
isError: boolean;
|
|
8
9
|
vodUrl: string | null;
|
|
10
|
+
rawUrl: string | null;
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=useShakePlayer.d.ts.map
|
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":"AA4CA,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+KA,CAAC"}
|
|
@@ -1,61 +1,102 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { getEnvConfig as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useState as U, useRef as i, useCallback as A, useEffect as E } from "react";
|
|
2
|
+
import { getEnvConfig as k } from "../../../../config/envConfig.js";
|
|
3
|
+
const m = () => {
|
|
4
|
+
const r = k().apiBaseUrl || "";
|
|
5
|
+
return r.endsWith("/") ? r.slice(0, -1) : r;
|
|
6
|
+
}, T = async (r) => {
|
|
7
|
+
const u = m();
|
|
8
|
+
return (await fetch(`${u}/v1/auth/refresh`, {
|
|
9
|
+
method: "POST",
|
|
10
|
+
credentials: "include",
|
|
11
|
+
signal: r
|
|
12
|
+
})).ok;
|
|
13
|
+
}, $ = async (r, u) => {
|
|
14
|
+
const s = await fetch(r, {
|
|
15
|
+
...u,
|
|
16
|
+
credentials: "include"
|
|
17
|
+
});
|
|
18
|
+
return s.status !== 401 && s.status !== 403 || !await T(u.signal) || u.signal.aborted ? s : fetch(r, {
|
|
19
|
+
...u,
|
|
20
|
+
credentials: "include"
|
|
21
|
+
});
|
|
22
|
+
}, V = ({
|
|
23
|
+
attachmentId: r,
|
|
24
|
+
isActive: u,
|
|
25
|
+
autoPlay: s
|
|
10
26
|
}) => {
|
|
11
|
-
const [
|
|
12
|
-
|
|
27
|
+
const [f, h] = U(null), [b, p] = U(null), [v, w] = U(!1), R = i(null), c = i(!0), o = i(null), t = i(null), l = i(null), d = A(
|
|
28
|
+
(e) => {
|
|
29
|
+
if (!r || l.current || !c.current || e.aborted) return;
|
|
30
|
+
const g = m() || window.location.origin, a = new URL(
|
|
31
|
+
`/v1/attachments/${r}`,
|
|
32
|
+
g
|
|
33
|
+
).toString();
|
|
34
|
+
l.current = a, h(null), p(a);
|
|
35
|
+
},
|
|
36
|
+
[r]
|
|
37
|
+
), C = A(async () => {
|
|
38
|
+
if (!r || l.current) return;
|
|
39
|
+
o.current && (clearTimeout(o.current), o.current = null), t.current && t.current.abort();
|
|
40
|
+
const e = new AbortController();
|
|
41
|
+
t.current = e, w(!1);
|
|
42
|
+
try {
|
|
43
|
+
await T(e.signal), d(e.signal);
|
|
44
|
+
} catch (n) {
|
|
45
|
+
if (n instanceof Error && n.name === "AbortError" || !c.current || e.signal.aborted) return;
|
|
46
|
+
w(!0);
|
|
47
|
+
}
|
|
48
|
+
}, [r, d]), y = async () => {
|
|
49
|
+
if (!r)
|
|
13
50
|
return;
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
51
|
+
t.current && t.current.abort();
|
|
52
|
+
const e = new AbortController();
|
|
53
|
+
t.current = e;
|
|
17
54
|
try {
|
|
18
|
-
const
|
|
19
|
-
`${
|
|
55
|
+
const n = m(), g = await $(
|
|
56
|
+
`${n}/v1/attachments/${r}/vod`,
|
|
20
57
|
{
|
|
21
58
|
method: "GET",
|
|
22
|
-
credentials: "include",
|
|
23
59
|
headers: {
|
|
24
60
|
Accept: "*/*"
|
|
25
61
|
},
|
|
26
|
-
signal:
|
|
62
|
+
signal: e.signal
|
|
27
63
|
}
|
|
28
64
|
);
|
|
29
|
-
if (!
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
if (!g.ok) {
|
|
66
|
+
await d(e.signal);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const a = await g.json();
|
|
70
|
+
if (!c.current || e.signal.aborted) return;
|
|
71
|
+
const B = n || window.location.origin;
|
|
72
|
+
if (a.ready) {
|
|
73
|
+
const S = new URL(a.url, B).toString();
|
|
74
|
+
if (l.current) return;
|
|
75
|
+
p(null), h(S);
|
|
35
76
|
} else
|
|
36
|
-
|
|
37
|
-
|
|
77
|
+
d(e.signal), o.current = setTimeout(() => {
|
|
78
|
+
y();
|
|
38
79
|
}, 3e3);
|
|
39
|
-
} catch (
|
|
40
|
-
if (
|
|
41
|
-
|
|
80
|
+
} catch (n) {
|
|
81
|
+
if (n instanceof Error && n.name === "AbortError" || !c.current || e.signal.aborted) return;
|
|
82
|
+
w(!0);
|
|
42
83
|
}
|
|
43
84
|
};
|
|
44
|
-
return
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
47
|
-
|
|
85
|
+
return E(() => {
|
|
86
|
+
if (c.current = !0, h(null), p(null), w(!1), l.current = null, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), !!r)
|
|
87
|
+
return y(), () => {
|
|
88
|
+
c.current = !1, o.current && (clearTimeout(o.current), o.current = null), t.current && (t.current.abort(), t.current = null), l.current = null;
|
|
48
89
|
};
|
|
49
|
-
}, [
|
|
50
|
-
if (!
|
|
51
|
-
const
|
|
90
|
+
}, [r]), E(() => {
|
|
91
|
+
if (!f && !b || !R.current) return;
|
|
92
|
+
const e = R.current.querySelector(
|
|
52
93
|
"video"
|
|
53
94
|
);
|
|
54
|
-
|
|
55
|
-
console.error("Ошибка при воспроизведении видео:",
|
|
56
|
-
}) :
|
|
57
|
-
}, [
|
|
95
|
+
e && (u ? s !== !1 && e.play().catch((n) => {
|
|
96
|
+
console.error("Ошибка при воспроизведении видео:", n);
|
|
97
|
+
}) : e.pause());
|
|
98
|
+
}, [u, f, b, s]), { containerRef: R, fallbackToRawAttachment: C, isError: v, vodUrl: f, rawUrl: b };
|
|
58
99
|
};
|
|
59
100
|
export {
|
|
60
|
-
|
|
101
|
+
V as useShakePlayer
|
|
61
102
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
container:
|
|
3
|
-
root:
|
|
1
|
+
const n = "_container_nqf56_1", o = "_root_nqf56_13", t = "_carouselRoot_nqf56_27", e = "_carouselViewport_nqf56_35", a = "_carouselSlide_nqf56_43", _ = "_navButton_nqf56_57", r = "_navButtonPrev_nqf56_83", i = "_navButtonNext_nqf56_91", c = "_headerAction_nqf56_99", d = "_modalContent_nqf56_127", s = "_modalBody_nqf56_137", u = "_videoContainer_nqf56_149", f = "_imageContainer_nqf56_159", l = "_pdfContainer_nqf56_173", m = "_pdfFrame_nqf56_189", q = "_audioContainer_nqf56_203", v = "_audioName_nqf56_233", C = "_audioElement_nqf56_249", B = {
|
|
2
|
+
container: n,
|
|
3
|
+
root: o,
|
|
4
4
|
carouselRoot: t,
|
|
5
5
|
carouselViewport: e,
|
|
6
6
|
carouselSlide: a,
|
|
@@ -14,18 +14,18 @@ const o = "_container_17z0f_1", n = "_root_17z0f_7", t = "_carouselRoot_17z0f_14
|
|
|
14
14
|
imageContainer: f,
|
|
15
15
|
pdfContainer: l,
|
|
16
16
|
pdfFrame: m,
|
|
17
|
-
audioContainer:
|
|
17
|
+
audioContainer: q,
|
|
18
18
|
audioName: v,
|
|
19
19
|
audioElement: C
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
q as audioContainer,
|
|
23
23
|
C as audioElement,
|
|
24
24
|
v as audioName,
|
|
25
25
|
t as carouselRoot,
|
|
26
26
|
a as carouselSlide,
|
|
27
27
|
e as carouselViewport,
|
|
28
|
-
|
|
28
|
+
n as container,
|
|
29
29
|
B as default,
|
|
30
30
|
c as headerAction,
|
|
31
31
|
f as imageContainer,
|
|
@@ -36,6 +36,6 @@ export {
|
|
|
36
36
|
r as navButtonPrev,
|
|
37
37
|
l as pdfContainer,
|
|
38
38
|
m as pdfFrame,
|
|
39
|
-
|
|
39
|
+
o as root,
|
|
40
40
|
u as videoContainer
|
|
41
41
|
};
|
|
@@ -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,mDAmNhC,CAAC"}
|