@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.
Files changed (176) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  3. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  4. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  5. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  6. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  7. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  8. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  9. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  10. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  11. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  12. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  13. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  14. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
  15. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +7 -7
  16. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  17. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
  18. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
  19. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
  20. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  21. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  22. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  23. package/dist/components/Chat/CallMessage/index.js +49 -0
  24. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  25. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  26. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  27. package/dist/components/Chat/ChatBubble/index.js +32 -0
  28. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  29. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  30. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  31. package/dist/components/Chat/ChatHeader/index.js +78 -0
  32. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
  33. package/dist/components/Chat/ChatInput/index.d.ts +46 -0
  34. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  35. package/dist/components/Chat/ChatInput/index.js +228 -0
  36. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  37. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  38. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  39. package/dist/components/Chat/ChatLayout/index.js +43 -0
  40. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  41. package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
  42. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  43. package/dist/components/Chat/ChatMessage/index.js +188 -0
  44. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  45. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  46. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  47. package/dist/components/Chat/ChatPill/index.js +21 -0
  48. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  49. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  50. package/dist/components/Chat/DayMeta/index.js +9 -0
  51. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  52. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  53. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  54. package/dist/components/Chat/DialogItem/index.js +107 -0
  55. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  56. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  57. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  58. package/dist/components/Chat/DialogList/index.js +19 -0
  59. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  60. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  61. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  62. package/dist/components/Chat/MediaDocument/index.js +73 -0
  63. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  64. package/dist/components/Chat/MessageActions/index.d.ts +16 -0
  65. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  66. package/dist/components/Chat/MessageActions/index.js +65 -0
  67. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  68. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  69. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  70. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  71. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  72. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  73. package/dist/components/Chat/MessageForward/index.js +30 -0
  74. package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
  75. package/dist/components/Chat/MessageList/index.d.ts +12 -0
  76. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  77. package/dist/components/Chat/MessageList/index.js +71 -0
  78. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  79. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  80. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  81. package/dist/components/Chat/MessageMeta/index.js +33 -0
  82. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  83. package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
  84. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  85. package/dist/components/Chat/MessageReactions/index.js +40 -0
  86. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  87. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  88. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  89. package/dist/components/Chat/MessageReply/index.js +40 -0
  90. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
  91. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  92. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  93. package/dist/components/Chat/MessageStatus/index.js +53 -0
  94. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  95. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  96. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  97. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  98. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  99. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  100. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  101. package/dist/components/Chat/colors.d.ts +7 -0
  102. package/dist/components/Chat/colors.d.ts.map +1 -0
  103. package/dist/components/Chat/colors.js +30 -0
  104. package/dist/components/Chat/icons.d.ts +9 -0
  105. package/dist/components/Chat/icons.d.ts.map +1 -0
  106. package/dist/components/Chat/icons.js +49 -0
  107. package/dist/components/Chat/index.d.ts +24 -0
  108. package/dist/components/Chat/index.d.ts.map +1 -0
  109. package/dist/components/Chat/mock-data.d.ts +32 -0
  110. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  111. package/dist/components/Chat/types.d.ts +159 -0
  112. package/dist/components/Chat/types.d.ts.map +1 -0
  113. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  114. package/dist/components/ColorPicker/ColorPicker.module.css.js +24 -24
  115. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  116. package/dist/components/CommentComposer/types.js +9 -0
  117. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  118. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  119. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  120. package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
  121. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  122. package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
  123. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  124. package/dist/components/EntityIcon.d.ts.map +1 -1
  125. package/dist/components/EntityIcon.js +36 -27
  126. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  127. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  128. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  129. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  130. package/dist/components/FilePicker/FilePicker.js +135 -161
  131. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  132. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  133. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  134. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  135. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  136. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  137. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  138. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  139. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  140. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  141. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  142. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  143. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  144. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  145. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  146. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  147. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  148. package/dist/components/Loaders/styles.module.css.js +6 -6
  149. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  150. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  151. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  152. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  153. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  154. package/dist/components/Notification/Notification.module.css.js +1 -1
  155. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  156. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  157. package/dist/components/PillTabs/PillTabs.js +50 -0
  158. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  159. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  160. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  161. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  162. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  163. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  164. package/dist/components/table/FrontTable.d.ts.map +1 -1
  165. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  166. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  167. package/dist/helpers/showNotifications.module.css.js +1 -1
  168. package/dist/index.css +1 -1
  169. package/dist/index.d.ts +3 -0
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +573 -522
  172. package/dist/lang/locales/ui_en.json.js +5 -5
  173. package/dist/lang/locales/ui_es.json.js +1 -1
  174. package/dist/lang/locales/ui_ru.json.js +1 -1
  175. package/docs/README.md +499 -499
  176. package/package.json +78 -75
@@ -1,11 +1,11 @@
1
- const e = "_page_q8c84_3", g = "_figureContainer_q8c84_16", _ = "_figure_q8c84_16", a = "_figureA_q8c84_29", r = "_figureB_q8c84_33", c = "_grainOverlay_q8c84_115", n = "_badgeWrap_q8c84_127", i = "_badge0_q8c84_155", t = "_badge1_q8c84_160", d = "_badge2_q8c84_169", o = "_badge3_q8c84_178", b = {
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: g,
4
- figure: _,
5
- figureA: a,
6
- figureB: r,
7
- grainOverlay: c,
8
- badgeWrap: n,
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
- n as badgeWrap,
19
+ r as badgeWrap,
20
20
  b as default,
21
- _ as figure,
22
- a as figureA,
23
- r as figureB,
24
- g as figureContainer,
25
- c as grainOverlay,
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 = "_toolTitleInput_103nq_19", n = "_appSidebarButton_103nq_34", o = "_slideContainer_103nq_55", e = "_slideContent_103nq_61", i = "_main_103nq_76", l = "_floatingMeetSlot_103nq_85", a = {
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":"AASA,eAAO,MAAM,mBAAmB,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,mDAkBrE,CAAC"}
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 { SidebarLeft01Icon as i, SidebarRight01Icon as n } from "@hugeicons/core-free-icons";
3
- import { HugeiconsIcon as c } from "@hugeicons/react";
4
- import { ActionIcon as a } from "@mantine/core";
5
- import { appContainerStore as t } from "../hooks/useAppContainerStore.js";
6
- const g = ({ forOpen: e }) => {
7
- const { showToolbar: o } = t.useStore();
8
- return e && o ? null : /* @__PURE__ */ r(
9
- a,
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
- variant: "subtle",
12
- size: "md",
13
- color: "gray",
14
- onClick: t.api.toggleToolbar,
12
+ label: t(o ? "hideSidebar" : "showSidebar"),
13
+ withArrow: !0,
14
+ openDelay: 400,
15
15
  children: /* @__PURE__ */ r(
16
- c,
16
+ m,
17
17
  {
18
- icon: o ? i : n,
19
- size: 20
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
- g as SidebarToggleButton
35
+ h as SidebarToggleButton
27
36
  };
@@ -1,4 +1,4 @@
1
- const t = "_dot_h8jhb_1", o = "_line_h8jhb_9", e = {
1
+ const t = "_dot_w7tk6_1", o = "_line_w7tk6_17", e = {
2
2
  dot: t,
3
3
  line: o
4
4
  };
@@ -1,6 +1,6 @@
1
- const e = "_root_9zlef_1", t = "_header_9zlef_9", o = "_section_9zlef_20", _ = "_leftSidebar_9zlef_28", n = "_rightSidebar_9zlef_36", r = "_main_9zlef_44", i = "_workContent_9zlef_52", a = {
2
- root: e,
3
- header: t,
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
- t as header,
12
+ e as header,
13
13
  _ as leftSidebar,
14
14
  r as main,
15
15
  n as rightSidebar,
16
- e as root,
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,6CAoGtD,CAAC"}
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 l } from "@mantine/core";
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 { ZOOM_CONFIG as a, TRANSFORM_COMPONENT_STYLES as u } from "../constants.js";
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 p } from "./ErrorSection.js";
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 A = P(
14
- ({ onTransformed: S, attachment: e, isActive: s, ref: N }) => {
13
+ const h = P(
14
+ ({ onTransformed: S, attachment: e, isActive: n, ref: N }) => {
15
15
  const {
16
- isError: n,
16
+ isError: m,
17
17
  setIsError: g,
18
18
  fileUrl: o,
19
- isFetching: m,
20
- isVideo: d,
21
- isPdf: t,
22
- isAudio: f,
23
- isSupported: c
24
- } = O(e), y = b({ isFetching: m, isVideo: d });
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: a.initialScale,
33
- minScale: a.minScale,
34
- maxScale: a.maxScale,
39
+ initialScale: s.initialScale,
40
+ minScale: s.minScale,
41
+ maxScale: s.maxScale,
35
42
  limitToBounds: !0,
36
- disabled: m || d || t || f || !c,
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: a.wheelStep
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: u,
51
- contentStyle: u,
57
+ wrapperStyle: p,
58
+ contentStyle: p,
52
59
  wrapperProps: y,
53
- children: c ? m ? /* @__PURE__ */ r(U, {}) : d ? /* @__PURE__ */ r(l, { className: i.videoContainer, children: /* @__PURE__ */ r(
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
- ) }) : f ? n || !(e?.Url || o) ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ C(l, { className: i.audioContainer, children: [
68
- /* @__PURE__ */ r(l, { className: i.audioName, children: e.originalFileName || "audio" }),
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: s,
74
+ autoPlay: n,
75
75
  className: i.audioElement
76
76
  }
77
77
  )
78
- ] }) : n ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(
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
- A as GallerySlide
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":"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
+ {"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 d, useEffect as g } from "react";
3
- import a from "clsx";
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";
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: l,
11
- autoPlay: o,
12
- isActive: n,
13
- loader: f,
14
- stylesContainer: m,
15
- classNameContainer: p
10
+ attachmentId: p,
11
+ autoPlay: t,
12
+ isActive: f,
13
+ loader: u,
14
+ stylesContainer: d,
15
+ classNameContainer: y
16
16
  }) => {
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;
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
- }, [e]), c ? /* @__PURE__ */ r(v, {}) : e ? /* @__PURE__ */ r(
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: u,
31
- style: m,
32
- className: a(
33
- i["vod-player"],
37
+ ref: E,
38
+ style: d,
39
+ className: s(
40
+ n["vod-player"],
34
41
  "shaka-vod-player-wrapper",
35
- p
42
+ y
36
43
  ),
37
- children: /* @__PURE__ */ r(
38
- h,
44
+ children: o ? /* @__PURE__ */ r(
45
+ S,
39
46
  {
40
- ref: t,
41
- autoPlay: o ?? !0,
42
- className: a(i["vod-player__player"]),
43
- src: e,
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
- ) : f ?? /* @__PURE__ */ r(k, {});
67
+ );
50
68
  };
51
69
  export {
52
70
  q as ShakaVideoPlayer
@@ -1,7 +1,7 @@
1
- const e = {
2
- "vod-player": "_vod-player_be6om_1",
3
- "vod-player__player": "_vod-player__player_be6om_13"
1
+ const _ = {
2
+ "vod-player": "_vod-player_11682_1",
3
+ "vod-player__player": "_vod-player__player_11682_25"
4
4
  };
5
5
  export {
6
- e as default
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
@@ -1 +1 @@
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
+ {"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 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,
8
- isActive: i,
9
- autoPlay: a
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 [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)
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
- r.current && r.current.abort();
15
- const t = new AbortController();
16
- r.current = t;
51
+ t.current && t.current.abort();
52
+ const e = new AbortController();
53
+ t.current = e;
17
54
  try {
18
- const o = R(), p = await fetch(
19
- `${o}/v1/attachments/${e}/vod`,
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: t.signal
62
+ signal: e.signal
27
63
  }
28
64
  );
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);
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
- n.current = setTimeout(() => {
37
- g();
77
+ d(e.signal), o.current = setTimeout(() => {
78
+ y();
38
79
  }, 3e3);
39
- } catch (o) {
40
- if (o instanceof Error && o.name === "AbortError" || !u.current || t.signal.aborted) return;
41
- d(!0);
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 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);
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
- }, [e]), m(() => {
50
- if (!l || !s.current) return;
51
- const t = s.current.querySelector(
90
+ }, [r]), E(() => {
91
+ if (!f && !b || !R.current) return;
92
+ const e = R.current.querySelector(
52
93
  "video"
53
94
  );
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 };
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
- C as useShakePlayer
101
+ V as useShakePlayer
61
102
  };
@@ -1,6 +1,6 @@
1
- const o = "_container_17z0f_1", n = "_root_17z0f_7", t = "_carouselRoot_17z0f_14", e = "_carouselViewport_17z0f_18", a = "_carouselSlide_17z0f_22", _ = "_navButton_17z0f_29", r = "_navButtonPrev_17z0f_42", i = "_navButtonNext_17z0f_46", c = "_headerAction_17z0f_50", d = "_modalContent_17z0f_64", s = "_modalBody_17z0f_69", u = "_videoContainer_17z0f_75", f = "_imageContainer_17z0f_80", l = "_pdfContainer_17z0f_87", m = "_pdfFrame_17z0f_95", z = "_audioContainer_17z0f_102", v = "_audioName_17z0f_117", C = "_audioElement_17z0f_125", B = {
2
- container: o,
3
- root: n,
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: z,
17
+ audioContainer: q,
18
18
  audioName: v,
19
19
  audioElement: C
20
20
  };
21
21
  export {
22
- z as audioContainer,
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
- o as container,
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
- n as root,
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,mDAoNhC,CAAC"}
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"}