@saooti/octopus-sdk 42.4.0-beta3 → 42.4.0-beta4

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 (332) hide show
  1. package/dist/{AccessibilityModal-CBIb3UQS.mjs → AccessibilityModal-CHUSDO1F.mjs} +39 -36
  2. package/dist/{AdvancedSearch-B91oao4i.mjs → AdvancedSearch-S-OMg1XH.mjs} +5 -5
  3. package/dist/{AuthStore-DicEfgQW.mjs → AuthStore-BdiVUQBK.mjs} +14 -14
  4. package/dist/{CategoryChooser-fAUMJNHu.mjs → CategoryChooser-Cg_gq6L_.mjs} +1 -1
  5. package/dist/{CategoryFilter-BEUYdg8x.mjs → CategoryFilter-CI5PfekR.mjs} +3 -3
  6. package/dist/{CategoryList-CXlZwPx_.mjs → CategoryList-B0hCDa0Q.mjs} +2 -2
  7. package/dist/{CategoryPage-8ASmoXs-.mjs → CategoryPage-j1c3a9Ti.mjs} +2 -2
  8. package/dist/{CategorySearchFilter-Cce5zxZB.mjs → CategorySearchFilter-eRcZcX0o.mjs} +1 -1
  9. package/dist/{CheckIdentityModal-axczuxN_.mjs → CheckIdentityModal-DTA9VPdd.mjs} +3 -3
  10. package/dist/{ClassicAlert-DATLZ8J1.mjs → ClassicAlert-fZ4qLB-c.mjs} +1 -1
  11. package/dist/{ClassicBigChip-BK8v_P0z.mjs → ClassicBigChip-D0pRqFwb.mjs} +1 -1
  12. package/dist/ClassicColorPicker-DcjFDaZ8.mjs +79 -0
  13. package/dist/{ClassicDatePicker-RsK4smk2.mjs → ClassicDatePicker-DlNlvjA0.mjs} +1 -1
  14. package/dist/{ClassicEmojiPicker-C0gm-DA2.mjs → ClassicEmojiPicker-Cc4UZRvZ.mjs} +1 -1
  15. package/dist/{ClassicHelpButton-BnRLmYuh.mjs → ClassicHelpButton-CDz_GcaZ.mjs} +1 -1
  16. package/dist/{ClassicInputText-YsntJkHk.mjs → ClassicInputText-4bPGD_kV.mjs} +1 -1
  17. package/dist/{ClassicLoading-CXfMjpyl.mjs → ClassicLoading-ydEDL7-R.mjs} +1 -1
  18. package/dist/{ClassicMultiselect-C0yzVQ8Y.mjs → ClassicMultiselect-CEJF_Uo5.mjs} +1 -1
  19. package/dist/{ClassicNotifications-vaUjCTEc.mjs → ClassicNotifications-olXwz4qY.mjs} +2 -2
  20. package/dist/ClassicPopover-BpFChUHf.mjs +203 -0
  21. package/dist/ClassicSelect-Bj9BkTkd.mjs +121 -0
  22. package/dist/{ClassicSpinner-DFRDD51g.mjs → ClassicSpinner-P6q1es8G.mjs} +4 -1
  23. package/dist/{ClipboardModal-B49yYTXK.mjs → ClipboardModal-D40ImhpB.mjs} +1 -1
  24. package/dist/{CommentInput-C8KtLKTd.mjs → CommentInput-BGAQHUZh.mjs} +5 -5
  25. package/dist/CommentItem-CBtedADn.mjs +233 -0
  26. package/dist/CommentList-BqY6dXMt.mjs +203 -0
  27. package/dist/{CommentMoreActions-vmx-I-Iq.mjs → CommentMoreActions-BPDPuoeI.mjs} +6 -5
  28. package/dist/{CommentName-DfGeg6K5.mjs → CommentName-DiN2v6zm.mjs} +3 -3
  29. package/dist/{CommentParentInfo-4UblopkM.mjs → CommentParentInfo-DIyzK-2k.mjs} +3 -3
  30. package/dist/CommentSection-BUQsGQcN.mjs +119 -0
  31. package/dist/{CommentStore-CV6hsdbD.mjs → CommentStore-D-2Q49xZ.mjs} +76 -88
  32. package/dist/{ContractPreviewModal-CpLWz649.mjs → ContractPreviewModal-Duf8yY-7.mjs} +1 -1
  33. package/dist/{DateFilter-C7fBCqX8.mjs → DateFilter-Drn-Thgy.mjs} +1 -1
  34. package/dist/{DownloadPodcastButton-D9qdK3Vs.mjs → DownloadPodcastButton-BFZI5jmS.mjs} +2 -2
  35. package/dist/{EditCommentModal-CQBWEzRy.mjs → EditCommentModal-CVihXEGS.mjs} +2 -2
  36. package/dist/{EmissionGroupChooser-CsY37yhE.mjs → EmissionGroupChooser-BaorNk90.mjs} +2 -2
  37. package/dist/{EmissionInlineList-BTm-vKT_.mjs → EmissionInlineList-DuzgE8hS.mjs} +36 -26
  38. package/dist/EmissionItem-R8ugPYq7.mjs +123 -0
  39. package/dist/EmissionList-Dk8Xtmm1.mjs +230 -0
  40. package/dist/EmissionPage-DE_T-aNF.mjs +191 -0
  41. package/dist/{EmissionPlayerItem-i9qBw7qg.mjs → EmissionPlayerItem-w3F7l_dL.mjs} +9 -9
  42. package/dist/{EmissionPresentationItem-kwkl6gGi.mjs → EmissionPresentationItem-VwylQjvv.mjs} +7 -4
  43. package/dist/{EmissionPresentationList-DoiPDE0Q.mjs → EmissionPresentationList-Xu3G_Ozt.mjs} +8 -6
  44. package/dist/EmissionsPage--rvX0YYh.mjs +117 -0
  45. package/dist/{Error403Page-CIXtXR8O.mjs → Error403Page-Cb0LAznd.mjs} +1 -1
  46. package/dist/ExternalLink-Xd1yTR71.mjs +35 -0
  47. package/dist/{FooterGarSection-D4cHh_7u.mjs → FooterGarSection-CnjLLyXU.mjs} +3 -3
  48. package/dist/{FooterSection-DPiDNA4L.mjs → FooterSection-0e6Z_wff.mjs} +13 -13
  49. package/dist/{HomeDropdown-COrDmwgz.mjs → HomeDropdown-5JO7NDSl.mjs} +3 -3
  50. package/dist/{HomePage-C1M09x-n.mjs → HomePage-Bze7mTbZ.mjs} +3 -3
  51. package/dist/InlineRubriqueList-MYnSX_eZ.mjs +48 -0
  52. package/dist/LikeButton-CnMZOm9N.mjs +46 -0
  53. package/dist/{LikeSection-BPKNsu_2.mjs → LikeSection-BFh6c0_F.mjs} +11 -17
  54. package/dist/ListPaginate-DMir5lKe.mjs +191 -0
  55. package/dist/{LiveHorizontalList-BxDJY4Ga.mjs → LiveHorizontalList-DpfoJMa8.mjs} +6 -6
  56. package/dist/{LiveList-Dd9Ek190.mjs → LiveList-BXcxoWAn.mjs} +12 -11
  57. package/dist/{LivesPage-BvScVnlj.mjs → LivesPage-X_Cuj5RC.mjs} +2 -2
  58. package/dist/{MapPage-Daq-G22-.mjs → MapPage-DR7057o0.mjs} +1 -1
  59. package/dist/{MessageModal-BcqS77v6.mjs → MessageModal-DyD3HZy0.mjs} +1 -1
  60. package/dist/{MobileMenu-N_uqqPXy.mjs → MobileMenu-CaFQBVFA.mjs} +3 -3
  61. package/dist/{MonetizableFilter-B7NHzXEY.mjs → MonetizableFilter-BeBVeGSW.mjs} +1 -1
  62. package/dist/{NewsletterModal-B3l0QC-e.mjs → NewsletterModal-CaaLFdAc.mjs} +1 -1
  63. package/dist/{OctopusMultiselect-noQPQMZQ.mjs → OctopusMultiselect-B_VBxbac.mjs} +19 -19
  64. package/dist/OrganisationChooser-BSJWSByJ.mjs +134 -0
  65. package/dist/{OrganisationChooserLight-p-BVMwyG.mjs → OrganisationChooserLight-BpqeFaQP.mjs} +2 -2
  66. package/dist/{PageNotFound-DHY46Syf.mjs → PageNotFound-BB2Der8l.mjs} +2 -2
  67. package/dist/PaginateParams-BKSnsVZH.mjs +54 -0
  68. package/dist/{ParticipantInlineList-D8i3AIzH.mjs → ParticipantInlineList-DBlnlk8x.mjs} +24 -19
  69. package/dist/ParticipantItem-1fs3gVfe.mjs +93 -0
  70. package/dist/ParticipantPage-BaWObZn8.mjs +127 -0
  71. package/dist/{ParticipantsPage-B1H5qiE5.mjs → ParticipantsPage-QsAeLeb5.mjs} +16 -16
  72. package/dist/{PlayerAnonymousModal-B6ySHibo.mjs → PlayerAnonymousModal-B9fZFffi.mjs} +2 -2
  73. package/dist/PlaylistPage-Blu1HnPY.mjs +130 -0
  74. package/dist/{PlaylistsPage-yz5J_dXY.mjs → PlaylistsPage-DLNnZSJT.mjs} +88 -77
  75. package/dist/{PodcastFilterList-BcENzPoH.mjs → PodcastFilterList-DrZA5iQa.mjs} +4 -3
  76. package/dist/PodcastInlineList-C-ICxCWh.mjs +186 -0
  77. package/dist/{PodcastInlineListTemplate-jy0vmJx-.mjs → PodcastInlineListTemplate-CDigJ7BJ.mjs} +58 -56
  78. package/dist/PodcastItem-m3k-Kix9.mjs +305 -0
  79. package/dist/{PodcastList-Dm3usBYI.mjs → PodcastList-Cww-0Swl.mjs} +12 -12
  80. package/dist/{PodcastList-Dyl543Bp.mjs → PodcastList-s4gxQjq5.mjs} +26 -24
  81. package/dist/PodcastPage-DE5gGN-2.mjs +595 -0
  82. package/dist/PodcastPlayButton-Df0Z63M0.mjs +127 -0
  83. package/dist/PodcastPlaylistInlineList-D6FMozVy.mjs +69 -0
  84. package/dist/{PodcastPresentationList-BQq63Hw8.mjs → PodcastPresentationList-SouqGyw9.mjs} +9 -7
  85. package/dist/{PodcastmakerHeader-CL_tjvMk.mjs → PodcastmakerHeader-DJXLJTF6.mjs} +1 -1
  86. package/dist/PodcastsPage-BXBARaTK.mjs +133 -0
  87. package/dist/{ProductorSearch-CPzNgX7W.mjs → ProductorSearch-hTTU45pI.mjs} +3 -3
  88. package/dist/QrCode-OEI1du8P.mjs +116 -0
  89. package/dist/{QrCodeModal-3A2UoPSF.mjs → QrCodeModal-DmzFi0FH.mjs} +1 -1
  90. package/dist/{RadioCurrently-BjYJdFaU.mjs → RadioCurrently-CrRnrOIT.mjs} +20 -20
  91. package/dist/{RadioImage-C3P-UQoy.mjs → RadioImage-DmMQTUjw.mjs} +1 -1
  92. package/dist/RadioList-Bj_bfSqy.mjs +79 -0
  93. package/dist/{RadioPage-CpdnsZ9i.mjs → RadioPage-BHAxW4eG.mjs} +5 -5
  94. package/dist/{RadioPlanning-mOBlcxk9.mjs → RadioPlanning-Cg47XjD9.mjs} +3 -3
  95. package/dist/{RecaptchaModal-MQuwH4X4.mjs → RecaptchaModal-DLMoPxPf.mjs} +2 -2
  96. package/dist/{ReportAbuseModal-D0XeDyYW.mjs → ReportAbuseModal-CIiBTSpw.mjs} +4 -4
  97. package/dist/{RightsIndicator-DzAceGoE.mjs → RightsIndicator-Dr75KTRE.mjs} +4 -4
  98. package/dist/{RightsWrapper-hjzM-Sqr.mjs → RightsWrapper-C6zNaunR.mjs} +41 -42
  99. package/dist/{RubriqueChoice-C-S-veJJ.mjs → RubriqueChoice-Ci23lZBD.mjs} +2 -2
  100. package/dist/{RubriqueChooser-CNGn8LcP.mjs → RubriqueChooser-C5QLRe-b.mjs} +1 -1
  101. package/dist/{RubriqueFilter-UdXMkAQI.mjs → RubriqueFilter-B_lwmZ8m.mjs} +3 -3
  102. package/dist/{RubriqueList-DRZ0ETu2.mjs → RubriqueList-DNwhze-d.mjs} +4 -4
  103. package/dist/{RubriquePage-C4PvUVhz.mjs → RubriquePage-Bh59Y29D.mjs} +6 -5
  104. package/dist/{SearchPage-mxM-OqW1.mjs → SearchPage-DfsoWBQU.mjs} +2 -2
  105. package/dist/ShareAnonymous-QT4t2_n7.mjs +210 -0
  106. package/dist/{ShareModalPlayer-B1g9YiSI.mjs → ShareModalPlayer-D0NzOzX0.mjs} +1 -1
  107. package/dist/{ShareNewsletter-CCahfetv.mjs → ShareNewsletter-DT893L87.mjs} +41 -44
  108. package/dist/{SharePlayer-BtArvP3g.mjs → SharePlayer-Ctivrvmn.mjs} +2 -2
  109. package/dist/SharePlayerColors-CfrkwpdM.mjs +50 -0
  110. package/dist/{SharePlayerRadio-BdXEBctc.mjs → SharePlayerRadio-Gvc5Gc0f.mjs} +2 -2
  111. package/dist/{SharePlayerTypes-BCxXdkz-.mjs → SharePlayerTypes-B3OKl3HO.mjs} +1 -1
  112. package/dist/ShareSocialsButtons-MbK7ivGa.mjs +103 -0
  113. package/dist/SmartLinkPage-BKihppLi.mjs +143 -0
  114. package/dist/SubscribeButtons-DKylNvPo.mjs +126 -0
  115. package/dist/SwiperList-CqElRAFt.mjs +179 -0
  116. package/dist/{TagList-CvZonJ_a.mjs → TagList-CFgCrA_i.mjs} +5 -5
  117. package/dist/{TagPage-w4FxxLXT.mjs → TagPage-CWGLni8k.mjs} +3 -3
  118. package/dist/TopBar-CmZSpIiz.mjs +427 -0
  119. package/dist/UserButtonContent-CvVebdKv.mjs +129 -0
  120. package/dist/{buttons-BkfxHdGj.mjs → buttons-s19oovgO.mjs} +1 -1
  121. package/dist/{downloadHelper-9GxSNVWh.mjs → downloadHelper-B7bFMASS.mjs} +1 -1
  122. package/dist/index.css +1 -1
  123. package/dist/index.d.ts +4 -2
  124. package/dist/index.mjs +235 -232
  125. package/dist/{messages-DlxMAMOa.mjs → messages-DJAarMHp.mjs} +108 -6
  126. package/dist/src/components/display/comments/like/LikeButton.vue.d.ts +9 -33
  127. package/dist/src/components/display/comments/like/LikeSection.vue.d.ts +11 -33
  128. package/dist/src/components/display/emission/EmissionInlineList.vue.d.ts +4 -4
  129. package/dist/src/components/display/emission/EmissionItem.vue.d.ts +5 -1
  130. package/dist/src/components/display/emission/EmissionPresentationItem.vue.d.ts +2 -0
  131. package/dist/src/components/display/emission/EmissionPresentationList.vue.d.ts +1 -1
  132. package/dist/src/components/display/list/SwiperList.vue.d.ts +7 -4
  133. package/dist/src/components/display/live/RadioItem.vue.d.ts +11 -0
  134. package/dist/src/components/display/participant/ParticipantInlineList.vue.d.ts +1 -1
  135. package/dist/src/components/display/playlist/PlaylistItem.vue.d.ts +11 -0
  136. package/dist/src/components/display/podcasts/PodcastFilterList.vue.d.ts +3 -3
  137. package/dist/src/components/display/podcasts/PodcastImage.vue.d.ts +29 -9
  138. package/dist/src/components/display/podcasts/PodcastInlineList.vue.d.ts +45 -4
  139. package/dist/src/components/display/podcasts/PodcastInlineListTemplate.vue.d.ts +1 -1
  140. package/dist/src/components/display/podcasts/PodcastItem.vue.d.ts +7 -1
  141. package/dist/src/components/display/podcasts/PodcastItemInfo.vue.d.ts +10 -12
  142. package/dist/src/components/display/podcasts/PodcastList.vue.d.ts +2 -0
  143. package/dist/src/components/display/sharing/FormatSwitch.vue.d.ts +12 -17
  144. package/dist/src/components/form/ClassicColorPicker.vue.d.ts +26 -0
  145. package/dist/src/components/form/ClassicContentEditable.vue.d.ts +1 -1
  146. package/dist/src/components/form/ClassicInputText.vue.d.ts +1 -1
  147. package/dist/src/components/form/ClassicMultiselect.vue.d.ts +4 -4
  148. package/dist/src/components/form/index.d.ts +2 -1
  149. package/dist/src/components/layouts/PresentationItem.vue.d.ts +7 -3
  150. package/dist/src/components/misc/ClassicPopover.vue.d.ts +2 -0
  151. package/dist/src/components/misc/ExternalLink.vue.d.ts +27 -0
  152. package/dist/src/components/misc/LoadingOverlay.vue.d.ts +19 -0
  153. package/dist/src/components/misc/SkipToContent.vue.d.ts +7 -0
  154. package/dist/src/locale/messages.d.ts +102 -0
  155. package/dist/src/stores/CommentStore.d.ts +3 -1
  156. package/dist/src/stores/ParamSdkStore.d.ts +30 -32
  157. package/dist/src/websocket/commentWebsocket.d.ts +3 -2
  158. package/dist/src/websocket/wss.d.ts +35 -32
  159. package/dist/tests-mocks.mjs +3 -2
  160. package/dist/tests.mjs +3 -2
  161. package/dist/{useAdvancedParamInit-BfHuaeW7.mjs → useAdvancedParamInit-CdXta4Fd.mjs} +5 -5
  162. package/dist/{useAppleVideo-BwcLJ1Vj.mjs → useAppleVideo-C0gGIXRR.mjs} +1 -1
  163. package/dist/{useDayjs-BnrPJRlV.mjs → useDayjs-B6txyR3X.mjs} +1 -1
  164. package/dist/{useErrorHandler-DnNlEM3z.mjs → useErrorHandler-BPwwQKrG.mjs} +1 -1
  165. package/dist/{useImageProxy-B5iVux4E.mjs → useImageProxy-XMMC_IC2.mjs} +1 -1
  166. package/dist/{useOrgaComputed-Cmrkk-ZP.mjs → useOrgaComputed-B0wJ-ALx.mjs} +1 -1
  167. package/dist/usePresentationItem-D6mrQ7Zp.mjs +104 -0
  168. package/dist/{useRights-cTVIlBye.mjs → useRights-B-RH3q3n.mjs} +1 -1
  169. package/dist/{useRubriquesFilterComputed-BrJfTJ4L.mjs → useRubriquesFilterComputed-Bp6L2o9-.mjs} +1 -1
  170. package/dist/{useRubriquesFilterParam-DMnwILFD.mjs → useRubriquesFilterParam-B05QATg9.mjs} +1 -1
  171. package/dist/{useSharePlatforms-C0JjDxsf.mjs → useSharePlatforms-CbcKb6yZ.mjs} +26 -26
  172. package/dist/{useSimplePageParam-X73IKtOi.mjs → useSimplePageParam-DaoVpYoG.mjs} +1 -1
  173. package/eslint-config.mjs +10 -0
  174. package/package.json +4 -2
  175. package/src/api/rubriquesApi.ts +4 -4
  176. package/src/components/display/RightsIndicator.vue +0 -13
  177. package/src/components/display/RightsWrapper.vue +1 -16
  178. package/src/components/display/accessibility/AccessibilityModal.vue +7 -12
  179. package/src/components/display/comments/CommentInput.vue +2 -1
  180. package/src/components/display/comments/CommentList.vue +189 -176
  181. package/src/components/display/comments/CommentSection.vue +160 -73
  182. package/src/components/display/comments/item/CommentItem.vue +186 -135
  183. package/src/components/display/comments/item/CommentMoreActions.vue +195 -194
  184. package/src/components/display/comments/like/LikeButton.vue +47 -45
  185. package/src/components/display/comments/like/LikeSection.vue +122 -115
  186. package/src/components/display/emission/EmissionInlineList.vue +118 -116
  187. package/src/components/display/emission/EmissionItem.vue +35 -28
  188. package/src/components/display/emission/EmissionList.vue +41 -24
  189. package/src/components/display/emission/EmissionPresentationItem.vue +3 -0
  190. package/src/components/display/emission/EmissionPresentationList.vue +1 -0
  191. package/src/components/display/filter/ProductorSearch.vue +83 -80
  192. package/src/components/display/list/ListPaginate.vue +51 -37
  193. package/src/components/display/list/PaginateParams.vue +28 -32
  194. package/src/components/display/list/PaginateSection.vue +145 -138
  195. package/src/components/display/list/SwiperList.vue +113 -10
  196. package/src/components/display/live/LiveList.vue +111 -106
  197. package/src/components/display/live/RadioItem.vue +17 -12
  198. package/src/components/display/organisation/OrganisationChooser.vue +2 -1
  199. package/src/components/display/participant/ParticipantInlineList.vue +52 -49
  200. package/src/components/display/participant/ParticipantItem.vue +2 -1
  201. package/src/components/display/playlist/PlaylistItem.vue +19 -15
  202. package/src/components/display/playlist/PlaylistList.vue +16 -10
  203. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +68 -61
  204. package/src/components/display/podcasts/AnimatorsItem.vue +2 -0
  205. package/src/components/display/podcasts/PodcastFilterList.vue +107 -106
  206. package/src/components/display/podcasts/PodcastImage.vue +110 -126
  207. package/src/components/display/podcasts/PodcastInlineList.vue +133 -25
  208. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +2 -0
  209. package/src/components/display/podcasts/PodcastItem.vue +111 -64
  210. package/src/components/display/podcasts/PodcastItemInfo.vue +48 -18
  211. package/src/components/display/podcasts/PodcastList.vue +198 -194
  212. package/src/components/display/podcasts/PodcastModuleBox.vue +1 -0
  213. package/src/components/display/podcasts/PodcastPlayButton.vue +23 -6
  214. package/src/components/display/podcasts/PodcastPresentationList.vue +1 -0
  215. package/src/components/display/rubriques/InlineRubriqueList.vue +35 -16
  216. package/src/components/display/sharing/FormatSwitch.vue +90 -101
  217. package/src/components/display/sharing/QrCode.vue +4 -8
  218. package/src/components/display/sharing/ShareAnonymous.vue +207 -205
  219. package/src/components/display/sharing/ShareNewsletter.vue +3 -7
  220. package/src/components/display/sharing/SharePlayerColors.vue +5 -12
  221. package/src/components/display/sharing/ShareSocialsButtons.vue +67 -60
  222. package/src/components/display/sharing/SubscribeButtons.vue +47 -35
  223. package/src/components/form/ClassicColorPicker.vue +110 -0
  224. package/src/components/form/ClassicMultiselect.vue +205 -197
  225. package/src/components/form/ClassicSelect.vue +100 -80
  226. package/src/components/form/index.ts +2 -0
  227. package/src/components/layouts/PresentationItem.vue +18 -12
  228. package/src/components/misc/ClassicDataTable.vue +3 -3
  229. package/src/components/misc/ClassicPopover.vue +95 -1
  230. package/src/components/misc/ClassicSpinner.vue +16 -2
  231. package/src/components/misc/ExternalLink.vue +51 -0
  232. package/src/components/misc/LoadingOverlay.vue +86 -0
  233. package/src/components/misc/RightsScopeMenu.vue +1 -1
  234. package/src/components/misc/SkipToContent.vue +16 -0
  235. package/src/components/misc/TopBarMainContent.vue +6 -9
  236. package/src/components/misc/UserButtonContent.vue +4 -7
  237. package/src/components/pages/EmissionPage.vue +3 -2
  238. package/src/components/pages/EmissionsPage.vue +4 -0
  239. package/src/components/pages/ParticipantPage.vue +2 -1
  240. package/src/components/pages/PlaylistPage.vue +115 -110
  241. package/src/components/pages/PodcastPage.vue +3 -0
  242. package/src/components/pages/PodcastsPage.vue +4 -0
  243. package/src/components/pages/RubriquePage.vue +1 -0
  244. package/src/components/pages/SmartLinkPage.vue +10 -7
  245. package/src/layouts/FullLayout.vue +29 -23
  246. package/src/locale/de.json +18 -1
  247. package/src/locale/en.json +18 -1
  248. package/src/locale/es.json +18 -1
  249. package/src/locale/fr.json +22 -1
  250. package/src/locale/it.json +18 -1
  251. package/src/locale/sl.json +18 -1
  252. package/src/stores/CommentStore.ts +280 -263
  253. package/src/stores/ParamSdkStore.ts +39 -37
  254. package/src/style/_variables.scss +18 -0
  255. package/src/style/bootstrap.scss +40 -1
  256. package/src/style/general.scss +3 -3
  257. package/src/style/share.scss +26 -1
  258. package/src/websocket/commentWebsocket.ts +56 -54
  259. package/src/websocket/wss.ts +136 -163
  260. package/tests/components/display/comments/CommentList.spec.ts +45 -0
  261. package/tests/components/display/emission/EmissionItem.spec.ts +35 -0
  262. package/tests/components/display/emission/EmissionPresentationItem.spec.ts +6 -0
  263. package/tests/components/display/filter/ProductorSearch.spec.ts +20 -0
  264. package/tests/components/display/list/ListPaginate.spec.ts +67 -0
  265. package/tests/components/display/list/SwiperList.spec.ts +101 -2
  266. package/tests/components/display/live/RadioItem.spec.ts +41 -0
  267. package/tests/components/display/playlist/PlaylistItem.spec.ts +53 -0
  268. package/tests/components/display/podcasts/AnimatorsItem.spec.ts +18 -0
  269. package/tests/components/display/podcasts/PodcastInlineList.spec.ts +139 -0
  270. package/tests/components/display/podcasts/PodcastInlineListTemplate.spec.ts +16 -0
  271. package/tests/components/display/podcasts/PodcastItem.spec.ts +77 -0
  272. package/tests/components/display/podcasts/PodcastItemInfo.spec.ts +15 -2
  273. package/tests/components/display/podcasts/PodcastPlayButton.spec.ts +67 -0
  274. package/tests/components/display/sharing/FormatSwitch.spec.ts +26 -0
  275. package/tests/components/display/sharing/ShareAnonymous.spec.ts +61 -0
  276. package/tests/components/display/sharing/SubscribeButtons.spec.ts +73 -0
  277. package/tests/components/form/ClassicColorPicker.spec.ts +71 -0
  278. package/tests/components/form/ClassicSelect.spec.ts +38 -0
  279. package/tests/components/layouts/PresentationItem.spec.ts +34 -0
  280. package/tests/components/misc/ClassicPopover.spec.ts +112 -0
  281. package/tests/components/misc/ExternalLink.spec.ts +49 -0
  282. package/tests/components/misc/LoadingOverlay.spec.ts +27 -0
  283. package/tests/components/misc/SkipToContent.spec.ts +19 -0
  284. package/tests/components/pages/EmissionPage.spec.ts +9 -0
  285. package/tests/components/pages/EmissionsPage.spec.ts +13 -2
  286. package/tests/components/pages/PlaylistPage.spec.ts +11 -0
  287. package/tests/components/pages/PodcastsPage.spec.ts +13 -2
  288. package/tests/components/pages/SmartLinkPage.spec.ts +13 -0
  289. package/tests/helper/language.spec.ts +7 -3
  290. package/tests/mocks/useAdvancedParamInit.ts +2 -1
  291. package/tests/setup.ts +7 -0
  292. package/tests/stores/CommentStore.spec.ts +19 -0
  293. package/tests/utils.ts +5 -2
  294. package/tests/websocket/wss.spec.ts +153 -0
  295. package/dist/ClassicPopover-BUb-1WMB.mjs +0 -172
  296. package/dist/ClassicSelect-BpA0jKN6.mjs +0 -111
  297. package/dist/CommentItem-DvOTEIy-.mjs +0 -226
  298. package/dist/CommentList-BbLPCvLW.mjs +0 -201
  299. package/dist/CommentSection-C9XzY3qd.mjs +0 -79
  300. package/dist/EmissionItem-BF01x9Av.mjs +0 -116
  301. package/dist/EmissionList-sDV1AQ-W.mjs +0 -229
  302. package/dist/EmissionPage-DigMi9wA.mjs +0 -192
  303. package/dist/EmissionsPage-BUKEieK-.mjs +0 -116
  304. package/dist/InlineRubriqueList-Cpkf_s1d.mjs +0 -48
  305. package/dist/LikeButton-Cu8jAJHx.mjs +0 -40
  306. package/dist/ListPaginate-BnLG7-CH.mjs +0 -153
  307. package/dist/OrganisationChooser-DNRrjTTk.mjs +0 -135
  308. package/dist/PaginateParams-Bjz3ZI-5.mjs +0 -75
  309. package/dist/ParticipantItem-DiHsXYRA.mjs +0 -91
  310. package/dist/ParticipantPage-B_-BdfWS.mjs +0 -128
  311. package/dist/PlaylistPage-Dte2m3kv.mjs +0 -132
  312. package/dist/PodcastImage-C3SZgUEd.mjs +0 -115
  313. package/dist/PodcastInlineList-DonkcsVN.mjs +0 -123
  314. package/dist/PodcastItem-fuqcoepp.mjs +0 -151
  315. package/dist/PodcastPage-BlFm87X1.mjs +0 -591
  316. package/dist/PodcastPlayButton-Dmxh2zu8.mjs +0 -111
  317. package/dist/PodcastPlaylistInlineList-1hteCxOy.mjs +0 -63
  318. package/dist/PodcastSwiperList-MVm_zu3R.mjs +0 -170
  319. package/dist/PodcastsPage-_dkn-SRQ.mjs +0 -132
  320. package/dist/QrCode-os6HcLad.mjs +0 -109
  321. package/dist/RadioList-Dqrw26Hd.mjs +0 -70
  322. package/dist/ShareAnonymous-CciJmB9R.mjs +0 -199
  323. package/dist/SharePlayerColors-BpdifsHh.mjs +0 -49
  324. package/dist/ShareSocialsButtons-D1RLmhei.mjs +0 -102
  325. package/dist/SmartLinkPage-7DAeNotv.mjs +0 -136
  326. package/dist/SubscribeButtons-CBJMC8gO.mjs +0 -121
  327. package/dist/SwiperList-Cv3jJ7Uk.mjs +0 -117
  328. package/dist/TopBar-CFAgxhT_.mjs +0 -427
  329. package/dist/UserButtonContent--3-UrgO7.mjs +0 -131
  330. package/dist/usePresentationItem-bTGZOsYf.mjs +0 -100
  331. package/src/components/display/podcasts/PodcastSwiperList.vue +0 -160
  332. package/src/helper/featureHelper.ts +0 -24
@@ -4,8 +4,10 @@ import relativeTime from "dayjs/plugin/relativeTime";
4
4
  dayjs.extend(relativeTime);
5
5
 
6
6
  import { defineStore } from "pinia";
7
+ import { markRaw } from "vue";
7
8
  import cookiesHelper from "../helper/cookiesHelper";
8
9
  import WebSocketEngine from "../websocket/commentWebsocket";
10
+ import { WssStatus } from "../websocket/wss";
9
11
  import { CommentPodcast } from "./class/general/comment";
10
12
  import { useAuthStore } from "./AuthStore";
11
13
  import { useApiStore } from "./ApiStore";
@@ -14,289 +16,304 @@ import { CommentMessage, CommentsConfig } from "./class/config/commentsConfig";
14
16
  import classicApi from "../api/classicApi";
15
17
  import { Podcast } from "./class/general/podcast";
16
18
  import { ListClassicReturn } from "./class/general/listReturn";
19
+ export { WssStatus };
20
+
17
21
  function errorCommentsConfig(): CommentsConfig {
18
- return {
19
- inherited: false,
20
- abuse: {
21
- authRequired: true,
22
- },
23
- commentLikes: {
24
- authRequired: true,
25
- dislikeEnabled: false,
26
- likeEnabled: false,
27
- },
28
- comments: {
29
- authRequired: true,
30
- commentAllowed: "NONE",
31
- defaultState: "PENDING",
32
- depth: 2,
33
- },
34
- podcastLikes: {
35
- authRequired: true,
36
- dislikeEnabled: false,
37
- likeEnabled: false,
38
- },
39
- };
22
+ return {
23
+ inherited: false,
24
+ abuse: {
25
+ authRequired: true,
26
+ },
27
+ commentLikes: {
28
+ authRequired: true,
29
+ dislikeEnabled: false,
30
+ likeEnabled: false,
31
+ },
32
+ comments: {
33
+ authRequired: true,
34
+ commentAllowed: "NONE",
35
+ defaultState: "PENDING",
36
+ depth: 2,
37
+ },
38
+ podcastLikes: {
39
+ authRequired: true,
40
+ dislikeEnabled: false,
41
+ likeEnabled: false,
42
+ },
43
+ };
40
44
  }
41
45
 
42
46
 
43
47
  export interface CommentUser {
44
- name: string | null;
45
- uuid: string | null;
46
- uuidHash: string | null;
48
+ name: string | null;
49
+ uuid: string | null;
50
+ uuidHash: string | null;
47
51
  }
48
52
  interface CommentState {
49
- commentInitialized: boolean;
50
- commentWebsocketengine: WebSocketEngine | undefined;
51
- commentPodcastId?: number;
52
- commentQueueName?: string;
53
- commentEventToHandle: Array<CommentMessage>;
54
- commentUser?: CommentUser;
55
- commentsForPlayer: { [key: number]: Array<CommentPodcast> };
56
- podcastsCommentsConfig: { [key: number]: CommentsConfig };
53
+ commentInitialized: boolean;
54
+ commentWebsocketengine: WebSocketEngine | undefined;
55
+ commentConnectionStatus: WssStatus;
56
+ commentPodcastId?: number;
57
+ commentQueueName?: string;
58
+ commentEventToHandle: Array<CommentMessage>;
59
+ commentUser?: CommentUser;
60
+ commentsForPlayer: { [key: number]: Array<CommentPodcast> };
61
+ podcastsCommentsConfig: { [key: number]: CommentsConfig };
57
62
  }
58
63
  export const useCommentStore = defineStore("CommentStore", {
59
- state: (): CommentState => ({
60
- commentInitialized: false,
61
- commentWebsocketengine: undefined,
62
- commentPodcastId: undefined,
63
- commentQueueName: undefined,
64
- commentEventToHandle: [],
65
- commentsForPlayer: {},
66
- podcastsCommentsConfig: {},
67
- }),
68
- actions: {
69
- async fetchCommentsForPlayer(podcastId: number) {
70
- if (!this.commentsForPlayer[podcastId]) {
71
- this.commentsForPlayer[podcastId] = [];
72
- const size = 50;
73
- let first = 0;
74
- let keepFetching = true;
75
- while (keepFetching) {
76
- const data = await classicApi.fetchData<ListClassicReturn<CommentPodcast>>({
77
- api:2,
78
- path:"comment/list",
79
- parameters:{
80
- first: first,
81
- size: size,
82
- podcastId: podcastId,
83
- sort: "DATE_DESC",
84
- hideAnswers: true,
85
- state: "VALIDATED",
86
- },
87
- isNotAuth:true
88
- });
89
- first += size;
90
- this.commentsForPlayer[podcastId] = this.commentsForPlayer[
91
- podcastId
92
- ].concat(data.result);
93
- keepFetching =
94
- data.count !== this.commentsForPlayer[podcastId].length;
95
- }
96
- }
97
- return this.commentsForPlayer[podcastId];
98
- },
99
- async digest(message: string) {
100
- return Array.from(
101
- new Uint8Array(
102
- await crypto.subtle.digest(
103
- "SHA-1",
104
- new TextEncoder().encode(message),
105
- ),
106
- ),
107
- (byte) => byte.toString(16).padStart(2, "0"),
108
- ).join("");
109
- },
110
- async initCommentUser() {
111
- if (this.commentUser) {
112
- return;
113
- }
114
- const authStore = useAuthStore();
115
- if (authStore.authProfile) {
116
- this.commentUser = {
117
- name: authStore.authName,
118
- uuid: authStore.authProfile.userId,
119
- };
120
- return;
121
- }
122
- let uuid = cookiesHelper.getCookie("comment-octopus-uuid");
123
- if (null === uuid) {
124
- uuid = stringHelper.uuidv4();
125
- cookiesHelper.setCookie("comment-octopus-uuid", uuid);
126
- }
127
- const hash = await this.digest(uuid);
128
- this.commentUser = {
129
- name: cookiesHelper.getCookie("comment-octopus-name"),
130
- uuid: uuid,
131
- uuidHash: hash,
132
- };
133
- if ("#miniplayer" === this.commentUser?.name) {
134
- this.commentUser.name = null;
135
- }
136
- },
137
- setCommentUser(name: string) {
138
- const authStore = useAuthStore();
139
- if (authStore.authProfile || !this.commentUser) {
140
- return;
141
- }
142
- cookiesHelper.setCookie("comment-octopus-name", name);
143
- this.commentUser.name = name;
144
- },
145
- async getCommentsConfig(podcast: Podcast): Promise<CommentsConfig> {
146
- if (this.podcastsCommentsConfig[podcast.podcastId]) {
147
- return this.podcastsCommentsConfig[podcast.podcastId];
148
- }
149
- try {
150
- this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
151
- api: 2,
152
- path:"config/podcast/" + podcast.podcastId,
153
- });
154
- } catch {
155
- try {
156
- this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
157
- api: 2,
158
- path: "config/emission/" + podcast.emission.emissionId,
159
- });
160
- } catch {
161
- this.podcastsCommentsConfig[podcast.podcastId] = errorCommentsConfig();
162
- }
163
- }
164
- return this.podcastsCommentsConfig[podcast.podcastId];
165
- },
166
- resetPodcastsConfig() {
167
- this.podcastsCommentsConfig = {};
168
- },
169
- updatePodcastsConfig(podcastId: number, config: CommentsConfig) {
170
- this.podcastsCommentsConfig[podcastId] = config;
171
- },
172
- getCanPostCommentAllowed(
173
- config: CommentsConfig,
174
- podcast: Podcast,
175
- ): boolean {
176
- if ("NONE" === config.comments.commentAllowed) {
177
- return false;
178
- }
179
- const rightsLiveOnly =
180
- "LIVE_ONLY" === config.comments.commentAllowed &&
64
+ state: (): CommentState => ({
65
+ commentInitialized: false,
66
+ commentWebsocketengine: undefined,
67
+ commentConnectionStatus: WssStatus.INACTIVE,
68
+ commentPodcastId: undefined,
69
+ commentQueueName: undefined,
70
+ commentEventToHandle: [],
71
+ commentsForPlayer: {},
72
+ podcastsCommentsConfig: {},
73
+ }),
74
+ actions: {
75
+ async fetchCommentsForPlayer(podcastId: number) {
76
+ if (!this.commentsForPlayer[podcastId]) {
77
+ this.commentsForPlayer[podcastId] = [];
78
+ const size = 50;
79
+ let first = 0;
80
+ let keepFetching = true;
81
+ while (keepFetching) {
82
+ const data = await classicApi.fetchData<ListClassicReturn<CommentPodcast>>({
83
+ api:2,
84
+ path:"comment/list",
85
+ parameters:{
86
+ first: first,
87
+ size: size,
88
+ podcastId: podcastId,
89
+ sort: "DATE_DESC",
90
+ hideAnswers: true,
91
+ state: "VALIDATED",
92
+ },
93
+ isNotAuth:true
94
+ });
95
+ first += size;
96
+ this.commentsForPlayer[podcastId] = this.commentsForPlayer[
97
+ podcastId
98
+ ].concat(data.result);
99
+ keepFetching =
100
+ data.count !== this.commentsForPlayer[podcastId].length;
101
+ }
102
+ }
103
+ return this.commentsForPlayer[podcastId];
104
+ },
105
+ async digest(message: string) {
106
+ return Array.from(
107
+ new Uint8Array(
108
+ await crypto.subtle.digest(
109
+ "SHA-1",
110
+ new TextEncoder().encode(message),
111
+ ),
112
+ ),
113
+ (byte) => byte.toString(16).padStart(2, "0"),
114
+ ).join("");
115
+ },
116
+ async initCommentUser() {
117
+ if (this.commentUser) {
118
+ return;
119
+ }
120
+ const authStore = useAuthStore();
121
+ if (authStore.authProfile) {
122
+ this.commentUser = {
123
+ name: authStore.authName,
124
+ uuid: authStore.authProfile.userId,
125
+ };
126
+ return;
127
+ }
128
+ let uuid = cookiesHelper.getCookie("comment-octopus-uuid");
129
+ if (null === uuid) {
130
+ uuid = stringHelper.uuidv4();
131
+ cookiesHelper.setCookie("comment-octopus-uuid", uuid);
132
+ }
133
+ const hash = await this.digest(uuid);
134
+ this.commentUser = {
135
+ name: cookiesHelper.getCookie("comment-octopus-name"),
136
+ uuid: uuid,
137
+ uuidHash: hash,
138
+ };
139
+ if ("#miniplayer" === this.commentUser?.name) {
140
+ this.commentUser.name = null;
141
+ }
142
+ },
143
+ setCommentUser(name: string) {
144
+ const authStore = useAuthStore();
145
+ if (authStore.authProfile || !this.commentUser) {
146
+ return;
147
+ }
148
+ cookiesHelper.setCookie("comment-octopus-name", name);
149
+ this.commentUser.name = name;
150
+ },
151
+ async getCommentsConfig(podcast: Podcast): Promise<CommentsConfig> {
152
+ if (this.podcastsCommentsConfig[podcast.podcastId]) {
153
+ return this.podcastsCommentsConfig[podcast.podcastId];
154
+ }
155
+ try {
156
+ this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
157
+ api: 2,
158
+ path:"config/podcast/" + podcast.podcastId,
159
+ });
160
+ } catch {
161
+ try {
162
+ this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
163
+ api: 2,
164
+ path: "config/emission/" + podcast.emission.emissionId,
165
+ });
166
+ } catch {
167
+ this.podcastsCommentsConfig[podcast.podcastId] = errorCommentsConfig();
168
+ }
169
+ }
170
+ return this.podcastsCommentsConfig[podcast.podcastId];
171
+ },
172
+ resetPodcastsConfig() {
173
+ this.podcastsCommentsConfig = {};
174
+ },
175
+ updatePodcastsConfig(podcastId: number, config: CommentsConfig) {
176
+ this.podcastsCommentsConfig[podcastId] = config;
177
+ },
178
+ getCanPostCommentAllowed(
179
+ config: CommentsConfig,
180
+ podcast: Podcast,
181
+ ): boolean {
182
+ if ("NONE" === config.comments.commentAllowed) {
183
+ return false;
184
+ }
185
+ const rightsLiveOnly =
186
+ "LIVE_ONLY" === config.comments.commentAllowed &&
181
187
  undefined !== podcast.conferenceId &&
182
188
  "READY_TO_RECORD" === podcast.processingStatus;
183
- const rightsLiveRecord =
184
- "LIVE_AND_REPLAY" === config.comments.commentAllowed &&
189
+ const rightsLiveRecord =
190
+ "LIVE_AND_REPLAY" === config.comments.commentAllowed &&
185
191
  undefined !== podcast.conferenceId;
186
- return (
187
- "ALL" === config.comments.commentAllowed ||
192
+ return (
193
+ "ALL" === config.comments.commentAllowed ||
188
194
  rightsLiveOnly ||
189
195
  rightsLiveRecord
190
- );
191
- },
192
- getCanPostComment(
193
- config: CommentsConfig | undefined,
194
- podcast: Podcast | undefined,
195
- isAuth: boolean,
196
- ): boolean {
197
- if (!config || !podcast) {
198
- return false;
199
- }
200
- return (
201
- this.getCanPostCommentAllowed(config, podcast) &&
196
+ );
197
+ },
198
+ getCanPostComment(
199
+ config: CommentsConfig | undefined,
200
+ podcast: Podcast | undefined,
201
+ isAuth: boolean,
202
+ ): boolean {
203
+ if (!config || !podcast) {
204
+ return false;
205
+ }
206
+ return (
207
+ this.getCanPostCommentAllowed(config, podcast) &&
202
208
  (!config.comments.authRequired ||
203
209
  (config.comments.authRequired && isAuth))
204
- );
205
- },
206
- getCanReportAbuse(
207
- config: CommentsConfig | undefined,
208
- isAuth: boolean,
209
- ): boolean {
210
- if (!config) {
211
- return false;
212
- }
213
- return (
214
- !config.abuse.authRequired || (config.abuse.authRequired && isAuth)
215
- );
216
- },
210
+ );
211
+ },
212
+ getCanReportAbuse(
213
+ config: CommentsConfig | undefined,
214
+ isAuth: boolean,
215
+ ): boolean {
216
+ if (!config) {
217
+ return false;
218
+ }
219
+ return (
220
+ !config.abuse.authRequired || (config.abuse.authRequired && isAuth)
221
+ );
222
+ },
217
223
 
218
- /*--------------------------------------------------------------------------------------------------------------
219
- | |
220
- | Initializing state |
221
- | |
222
- --------------------------------------------------------------------------------------------------------------*/
223
- async initialize() {
224
- const apiStore = useApiStore();
225
- const commentUrl = apiStore.commentUrl?? "https://comments.dev2.saooti.org/";
226
- const url = stringHelper.trimChar(commentUrl.replace("https://", ""),"/");
227
- const engine = new WebSocketEngine(url);
228
- await engine.initialize();
229
- this.commentWebsocketengine = engine;
230
- this.commentInitialized = true;
231
- },
224
+ /*--------------------------------------------------------------------------------------------------------------
225
+ | |
226
+ | Initializing state |
227
+ | |
228
+ --------------------------------------------------------------------------------------------------------------*/
229
+ async initialize() {
230
+ if (this.commentInitialized) {
231
+ return;
232
+ }
233
+ const apiStore = useApiStore();
234
+ const commentUrl = apiStore.commentUrl?? "https://comments.dev2.saooti.org/";
235
+ const url = stringHelper.trimChar(commentUrl.replace("https://", ""),"/");
236
+ const engine = markRaw(new WebSocketEngine(url, (status) => {
237
+ this.commentConnectionStatus = status;
238
+ }));
239
+ // Set before awaiting so that concurrent calls do not create a second engine
240
+ this.commentInitialized = true;
241
+ this.commentWebsocketengine = engine;
242
+ try {
243
+ await engine.initialize();
244
+ } catch (e) {
245
+ this.commentInitialized = false;
246
+ this.commentWebsocketengine = undefined;
247
+ throw e;
248
+ }
249
+ },
232
250
 
233
- /*--------------------------------------------------------------------------------------------------------------
234
- | |
235
- | Comments management methods |
236
- | |
237
- --------------------------------------------------------------------------------------------------------------*/
238
- unsubscribeToEvent() {
239
- if (!this.commentWebsocketengine) {
240
- return;
241
- }
242
- if (
243
- this.commentPodcastId &&
244
- this.commentQueueName &&
245
- this.commentWebsocketengine.isPodcastCommentEventConnected(
246
- this.commentPodcastId,
247
- )
248
- ) {
249
- this.commentWebsocketengine.unsubscribeToPodcastCommentEventBus(
250
- this.commentPodcastId,
251
- this.commentQueueName,
252
- );
253
- }
254
- },
251
+ /*--------------------------------------------------------------------------------------------------------------
252
+ | |
253
+ | Comments management methods |
254
+ | |
255
+ --------------------------------------------------------------------------------------------------------------*/
256
+ unsubscribeToEvent() {
257
+ if (!this.commentWebsocketengine) {
258
+ return;
259
+ }
260
+ if (
261
+ this.commentPodcastId &&
262
+ this.commentQueueName &&
263
+ this.commentWebsocketengine.isPodcastCommentEventConnected(this.commentPodcastId)
264
+ ) {
265
+ this.commentWebsocketengine.unsubscribeToPodcastCommentEventBus(
266
+ this.commentPodcastId,
267
+ this.commentQueueName,
268
+ );
269
+ }
270
+ },
255
271
 
256
- subscribeToEvents() {
257
- if (!this.commentWebsocketengine) {
258
- return;
259
- }
260
- if (this.commentPodcastId && this.commentQueueName) {
261
- this.commentWebsocketengine.subscribeToPodcastCommentEventBus(
262
- this.commentPodcastId,
263
- this.commentQueueName,
264
- (message) => {
265
- this.commentEventToHandleUpdate(message);
266
- },
267
- );
268
- }
269
- },
272
+ subscribeToEvents() {
273
+ if (!this.commentWebsocketengine) {
274
+ return;
275
+ }
276
+ if (this.commentPodcastId && this.commentQueueName) {
277
+ this.commentWebsocketengine.subscribeToPodcastCommentEventBus(
278
+ this.commentPodcastId,
279
+ this.commentQueueName,
280
+ (message) => {
281
+ this.commentEventToHandleUpdate(message);
282
+ },
283
+ );
284
+ }
285
+ },
270
286
 
271
- async initComments(podcastId: number, organisationId: string) {
272
- this.unsubscribeToEvent();
273
- this.commentQueueName =
274
- "/topic/comment." + organisationId + "." + podcastId;
275
- this.commentPodcastId = podcastId;
276
- this.subscribeToEvents();
277
- },
278
- async unsubscribeComments() {
279
- this.unsubscribeComments();
280
- this.commentPodcastId = undefined;
281
- },
287
+ async initComments(podcastId: number, organisationId: string) {
288
+ this.unsubscribeToEvent();
289
+ this.commentQueueName =
290
+ "/topic/comment." + organisationId + "." + podcastId;
291
+ this.commentPodcastId = podcastId;
292
+ this.subscribeToEvents();
293
+ },
294
+ async unsubscribeComments() {
295
+ this.unsubscribeToEvent();
296
+ this.commentPodcastId = undefined;
297
+ this.commentQueueName = undefined;
298
+ },
282
299
 
283
- /*--------------------------------------------------------------------------------------------------------------
284
- | |
285
- | Managing conference WebSocket Event Received |
286
- | |
287
- --------------------------------------------------------------------------------------------------------------*/
288
- commentEventHandled() {
289
- this.commentEventToHandle.shift();
290
- },
291
- commentEventToHandleUpdate(eventToHandle: {
292
- comment: CommentPodcast;
293
- type: string;
294
- }) {
295
- if (eventToHandle) {
296
- this.commentEventToHandle.push(eventToHandle);
297
- } else {
298
- this.commentEventToHandle.splice(0, this.commentEventToHandle.length);
299
- }
300
+ /*--------------------------------------------------------------------------------------------------------------
301
+ | |
302
+ | Managing conference WebSocket Event Received |
303
+ | |
304
+ --------------------------------------------------------------------------------------------------------------*/
305
+ commentEventHandled() {
306
+ this.commentEventToHandle.shift();
307
+ },
308
+ commentEventToHandleUpdate(eventToHandle: {
309
+ comment: CommentPodcast;
310
+ type: string;
311
+ }) {
312
+ if (eventToHandle) {
313
+ this.commentEventToHandle.push(eventToHandle);
314
+ } else {
315
+ this.commentEventToHandle.splice(0, this.commentEventToHandle.length);
316
+ }
317
+ },
300
318
  },
301
- },
302
319
  });