@saooti/octopus-sdk 40.2.19 → 41.0.1-SNAPSHOT

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 (204) hide show
  1. package/package.json +2 -3
  2. package/src/App.vue +68 -88
  3. package/src/components/composable/player/usePlayerLive.ts +12 -3
  4. package/src/components/composable/player/usePlayerLogic.ts +6 -6
  5. package/src/components/composable/podcasts/usePodcastView.ts +3 -3
  6. package/src/components/composable/useInit.ts +2 -2
  7. package/src/components/composable/useMetaTitleWatch.ts +2 -2
  8. package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
  9. package/src/components/display/categories/CategoryChooser.vue +142 -145
  10. package/src/components/display/categories/CategoryFilter.vue +172 -198
  11. package/src/components/display/categories/CategoryList.vue +122 -147
  12. package/src/components/display/comments/CommentInput.vue +100 -122
  13. package/src/components/display/comments/CommentList.vue +169 -191
  14. package/src/components/display/comments/CommentName.vue +35 -45
  15. package/src/components/display/comments/CommentParentInfo.vue +28 -34
  16. package/src/components/display/comments/CommentPlayer.vue +38 -50
  17. package/src/components/display/comments/CommentSection.vue +85 -103
  18. package/src/components/display/comments/item/CommentBasicView.vue +48 -61
  19. package/src/components/display/comments/item/CommentItem.vue +101 -116
  20. package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
  21. package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
  22. package/src/components/display/comments/like/LikeButton.vue +36 -41
  23. package/src/components/display/comments/like/LikeSection.vue +128 -136
  24. package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
  25. package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
  26. package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
  27. package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
  28. package/src/components/display/edit/EditBox.vue +6 -9
  29. package/src/components/display/edit/EditBoxRadio.vue +1 -5
  30. package/src/components/display/emission/EmissionInlineList.vue +82 -97
  31. package/src/components/display/emission/EmissionItem.vue +57 -69
  32. package/src/components/display/emission/EmissionList.vue +192 -218
  33. package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
  34. package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
  35. package/src/components/display/emission/EmissionPresentationList.vue +51 -61
  36. package/src/components/display/filter/AdvancedSearch.vue +154 -176
  37. package/src/components/display/filter/CategorySearchFilter.vue +43 -46
  38. package/src/components/display/filter/DateFilter.vue +76 -91
  39. package/src/components/display/filter/MonetizableFilter.vue +27 -30
  40. package/src/components/display/filter/ProductorSearch.vue +87 -90
  41. package/src/components/display/filter/RubriqueChoice.vue +58 -63
  42. package/src/components/display/filter/RubriqueFilter.vue +154 -169
  43. package/src/components/display/filter/SearchOrder.vue +35 -35
  44. package/src/components/display/list/ListPaginate.vue +80 -93
  45. package/src/components/display/list/PaginateParams.vue +36 -40
  46. package/src/components/display/list/PaginateSection.vue +113 -124
  47. package/src/components/display/list/SwiperList.vue +97 -109
  48. package/src/components/display/live/CountDown.vue +15 -9
  49. package/src/components/display/live/CountdownOctopus.vue +16 -10
  50. package/src/components/display/live/LiveHorizontalList.vue +95 -103
  51. package/src/components/display/live/LiveItem.vue +65 -73
  52. package/src/components/display/live/LiveList.vue +125 -137
  53. package/src/components/display/live/RadioCurrently.vue +66 -73
  54. package/src/components/display/live/RadioImage.vue +39 -50
  55. package/src/components/display/live/RadioItem.vue +9 -14
  56. package/src/components/display/live/RadioList.vue +39 -53
  57. package/src/components/display/live/RadioPlanning.vue +210 -222
  58. package/src/components/display/organisation/OrganisationChooser.vue +116 -122
  59. package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
  60. package/src/components/display/participant/ParticipantInlineList.vue +42 -58
  61. package/src/components/display/participant/ParticipantItem.vue +66 -74
  62. package/src/components/display/participant/ParticipantList.vue +119 -141
  63. package/src/components/display/playlist/PlaylistItem.vue +33 -46
  64. package/src/components/display/playlist/PlaylistList.vue +118 -144
  65. package/src/components/display/playlist/PodcastList.vue +79 -101
  66. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
  67. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
  68. package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
  69. package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
  70. package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
  71. package/src/components/display/podcasts/PodcastFilterList.vue +48 -53
  72. package/src/components/display/podcasts/PodcastImage.vue +96 -99
  73. package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
  74. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
  75. package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
  76. package/src/components/display/podcasts/PodcastItem.vue +48 -63
  77. package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
  78. package/src/components/display/podcasts/PodcastList.vue +183 -206
  79. package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
  80. package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
  81. package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
  82. package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
  83. package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
  84. package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
  85. package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
  86. package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
  87. package/src/components/display/podcasts/TagList.vue +48 -50
  88. package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
  89. package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
  90. package/src/components/display/rubriques/RubriqueList.vue +140 -160
  91. package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
  92. package/src/components/display/sharing/FormatSwitch.vue +16 -11
  93. package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
  94. package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
  95. package/src/components/display/sharing/PlayerParameters.vue +69 -71
  96. package/src/components/display/sharing/QrCode.vue +55 -67
  97. package/src/components/display/sharing/ShareAnonymous.vue +160 -178
  98. package/src/components/display/sharing/ShareDistribution.vue +103 -117
  99. package/src/components/display/sharing/ShareNewsletter.vue +154 -161
  100. package/src/components/display/sharing/SharePlayer.vue +273 -295
  101. package/src/components/display/sharing/SharePlayerColors.vue +25 -16
  102. package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
  103. package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
  104. package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
  105. package/src/components/display/sharing/SubscribeButtons.vue +184 -207
  106. package/src/components/display/studio/RecordingItemButton.vue +1 -4
  107. package/src/components/form/ClassicCheckbox.vue +26 -30
  108. package/src/components/form/ClassicContentEditable.vue +37 -33
  109. package/src/components/form/ClassicCopyButton.vue +40 -44
  110. package/src/components/form/ClassicDatePicker.vue +114 -114
  111. package/src/components/form/ClassicEmojiPicker.vue +20 -28
  112. package/src/components/form/ClassicInputText.vue +116 -120
  113. package/src/components/form/ClassicLoading.vue +7 -12
  114. package/src/components/form/ClassicMultiselect.vue +106 -116
  115. package/src/components/form/ClassicRadio.vue +21 -16
  116. package/src/components/form/ClassicRadioLabel.vue +23 -22
  117. package/src/components/form/ClassicSearch.vue +24 -19
  118. package/src/components/form/ClassicSelect.vue +47 -38
  119. package/src/components/form/ClassicWysiwyg.vue +116 -123
  120. package/src/components/icons/AmazonMusicIcon.vue +7 -10
  121. package/src/components/icons/ApplePodcastIcon.vue +7 -11
  122. package/src/components/icons/BlueSkyIcon.vue +8 -11
  123. package/src/components/icons/DeezerIcon.vue +8 -11
  124. package/src/components/icons/EditFtpIcon.vue +8 -11
  125. package/src/components/icons/IHeartIcon.vue +8 -11
  126. package/src/components/icons/PlayVideoIcon.vue +7 -10
  127. package/src/components/icons/PlayerFmIcon.vue +7 -10
  128. package/src/components/icons/PocketCastIcon.vue +8 -11
  129. package/src/components/icons/PodcastAddictIcon.vue +7 -10
  130. package/src/components/icons/RadiolineIcon.vue +8 -11
  131. package/src/components/icons/TuninIcon.vue +8 -11
  132. package/src/components/icons/XIcon.vue +7 -10
  133. package/src/components/misc/AcpmImage.vue +6 -7
  134. package/src/components/misc/ClassicAccordion.vue +26 -31
  135. package/src/components/misc/ClassicLazy.vue +86 -90
  136. package/src/components/misc/ClassicNav.vue +16 -20
  137. package/src/components/misc/ClassicPopover.vue +266 -282
  138. package/src/components/misc/ClassicSpinner.vue +5 -27
  139. package/src/components/misc/ErrorMessage.vue +11 -12
  140. package/src/components/misc/FooterGarSection.vue +33 -41
  141. package/src/components/misc/FooterSection.vue +109 -130
  142. package/src/components/misc/HomeDropdown.vue +83 -105
  143. package/src/components/misc/MobileMenu.vue +101 -111
  144. package/src/components/misc/ProgressBar.vue +53 -62
  145. package/src/components/misc/TopBar.vue +97 -120
  146. package/src/components/misc/TopBarMainContent.vue +114 -133
  147. package/src/components/misc/modal/ClassicModal.vue +40 -33
  148. package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
  149. package/src/components/misc/modal/ClipboardModal.vue +27 -30
  150. package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
  151. package/src/components/misc/modal/MessageModal.vue +50 -47
  152. package/src/components/misc/modal/NewsletterModal.vue +30 -31
  153. package/src/components/misc/modal/QrCodeModal.vue +21 -21
  154. package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
  155. package/src/components/misc/player/PlayerCompact.vue +6 -4
  156. package/src/components/misc/player/PlayerComponent.vue +8 -9
  157. package/src/components/misc/player/PlayerLarge.vue +9 -8
  158. package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
  159. package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
  160. package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
  161. package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
  162. package/src/components/misc/player/elements/PlayerImage.vue +51 -57
  163. package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
  164. package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
  165. package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
  166. package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
  167. package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
  168. package/src/components/misc/player/radio/RadioHistory.vue +80 -99
  169. package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
  170. package/src/components/misc/player/video/PlayerVideo.vue +27 -40
  171. package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
  172. package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
  173. package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
  174. package/src/components/pages/CategoryPage.vue +28 -33
  175. package/src/components/pages/EmissionPage.vue +99 -132
  176. package/src/components/pages/EmissionsPage.vue +2 -0
  177. package/src/components/pages/Error403Page.vue +21 -20
  178. package/src/components/pages/HomePage.vue +91 -100
  179. package/src/components/pages/LivesPage.vue +35 -37
  180. package/src/components/pages/MapPage.vue +209 -241
  181. package/src/components/pages/PageLogout.vue +8 -11
  182. package/src/components/pages/PageNotFound.vue +9 -5
  183. package/src/components/pages/ParticipantPage.vue +82 -110
  184. package/src/components/pages/ParticipantsPage.vue +3 -0
  185. package/src/components/pages/PlaylistPage.vue +97 -115
  186. package/src/components/pages/PlaylistsPage.vue +9 -2
  187. package/src/components/pages/PodcastPage.vue +223 -238
  188. package/src/components/pages/PodcastsPage.vue +9 -2
  189. package/src/components/pages/RadioPage.vue +56 -70
  190. package/src/components/pages/RubriquePage.vue +7 -3
  191. package/src/components/pages/SearchPage.vue +31 -36
  192. package/src/components/pages/TagPage.vue +11 -9
  193. package/src/components/pages/VideoPage.vue +14 -11
  194. package/src/helper/displayHelper.ts +1 -1
  195. package/src/i18n.ts +2 -2
  196. package/src/main.ts +1 -1
  197. package/src/stores/class/general/player.ts +1 -0
  198. package/public/css/fonts/icomoon.eot +0 -0
  199. package/public/css/fonts/icomoon.svg +0 -113
  200. package/public/css/fonts/icomoon.ttf +0 -0
  201. package/public/css/fonts/icomoon.woff +0 -0
  202. package/public/css/fonts/icomoon.woff2 +0 -0
  203. package/public/css/fonts/style.css +0 -352
  204. package/sonarqube-scanner.js +0 -10
@@ -7,28 +7,28 @@
7
7
  <template v-if="!isLiveToBeRecorded">
8
8
  <button
9
9
  class="d-flex"
10
- :title="playingPodcast? $t('Pause') : $t('Play')"
10
+ :title="playingPodcast? t('Pause') : t('Play')"
11
11
  @mouseenter="hoverType = 'audio'"
12
12
  @mouseleave="hoverType = ''"
13
13
  @click="play(false)"
14
14
  >
15
15
  <PlayIcon
16
- v-if="!playingPodcast || (playingPodcast && playerVideo)"
16
+ v-if="!playingPodcast || (playingPodcast && playerStore.playerVideo)"
17
17
  :size="'audio' === hoverType ? 50 : 40"
18
18
  />
19
- <PodcastIsPlaying v-if="playingPodcast && !playerVideo"/>
19
+ <PodcastIsPlaying v-if="playingPodcast && !playerStore.playerVideo"/>
20
20
  <time v-if="!isVideoPodcast" class="ms-1" :datetime="durationIso">{{ durationString }}</time>
21
21
  </button>
22
22
  <button
23
23
  v-if="isVideoPodcast"
24
- :title="$t('Video')"
25
- :disabled="playerVideo"
24
+ :title="t('Video')"
25
+ :disabled="playerStore.playerVideo"
26
26
  @click="play(true)"
27
27
  @mouseenter="hoverType = 'video'"
28
28
  @mouseleave="hoverType = ''"
29
29
  >
30
- <PlayVideoIcon v-if="!playerVideo" :size="'video' === hoverType ? 50 : 40" />
31
- <PodcastIsPlaying v-if="playingPodcast && playerVideo"/>
30
+ <PlayVideoIcon v-if="!playerStore.playerVideo" :size="'video' === hoverType ? 50 : 40" />
31
+ <PodcastIsPlaying v-if="playingPodcast && playerStore.playerVideo"/>
32
32
  <time class="ms-2" :datetime="durationIso">{{ durationString }}</time>
33
33
  </button>
34
34
  <div v-if="!classicPodcastPlay" class="special-icon-play-button">
@@ -40,7 +40,7 @@
40
40
  </div>
41
41
  </template>
42
42
 
43
- <script lang="ts">
43
+ <script setup lang="ts">
44
44
  import PlayVideoIcon from "../../icons/PlayVideoIcon.vue";
45
45
  import PlayIcon from "vue-material-design-icons/Play.vue";
46
46
  import ClockOutlineIcon from "vue-material-design-icons/ClockOutline.vue";
@@ -55,179 +55,168 @@ import { Podcast } from "@/stores/class/general/podcast";
55
55
  import { Conference } from "@/stores/class/conference/conference";
56
56
  import { useAuthStore } from "../../../stores/AuthStore";
57
57
  import { usePlayerStore } from "../../../stores/PlayerStore";
58
- import { mapState, mapActions } from "pinia";
59
- import { defineAsyncComponent, defineComponent } from "vue";
58
+ import { computed, defineAsyncComponent, ref } from "vue";
60
59
  import dayjs from "dayjs";
61
60
  import duration from "dayjs/plugin/duration";
61
+ import { useI18n } from "vue-i18n";
62
+ import { useRouter } from "vue-router";
62
63
  dayjs.extend(duration);
63
64
  const PodcastIsPlaying = defineAsyncComponent(() => import("./PodcastIsPlaying.vue"));
64
- export default defineComponent({
65
- name: "PodcastPlayButton",
66
- components: {
67
- AlertIcon,
68
- ClockOutlineIcon,
69
- CheckIcon,
70
- TimerSandEmptyIcon,
71
- EyeOffOutlineIcon,
72
- CancelIcon,
73
- PlayIcon,
74
- PlayVideoIcon,
75
- PodcastIsPlaying
76
- },
77
- props: {
78
- podcast: { default: () => ({}), type: Object as () => Podcast },
79
- hidePlay: { default: false, type: Boolean },
80
- fetchConference: { default: undefined, type: Object as () => Conference },
81
- justButtons: { default: false, type: Boolean },
82
- },
83
- data() {
84
- return {
85
- hoverType: "" as string,
86
- };
87
- },
88
- computed: {
89
- ...mapState(useAuthStore, ["authOrgaId"]),
90
- ...mapState(usePlayerStore, [
91
- "playerPodcast",
92
- "playerLive",
93
- "playerStatus",
94
- "playerVideo",
95
- ]),
96
- isVideoPodcast(): boolean {
97
- return (
98
- (this.fetchConference?.videoProfile?.includes("video_") &&
99
- "READY_TO_RECORD" === this.podcast.processingStatus) ||
100
- undefined !== this.podcast.video?.videoId
101
- );
102
- },
103
- playingLive(): boolean {
104
- return (
105
- undefined !== this.fetchConference &&
106
- "null" !== this.fetchConference.toString() &&
107
- this.playerLive?.conferenceId === this.fetchConference.conferenceId
108
- );
109
- },
110
- playingPodcast() {
111
- return (
112
- this.playerPodcast?.podcastId === this.podcast.podcastId ||
113
- this.playingLive
114
- );
115
- },
116
- isLiveToBeRecorded(): boolean {
117
- return undefined === this.fetchConference && this.isLiveReadyToRecord;
118
- },
119
- isLiveReadyToRecord(): boolean {
120
- return (
121
- undefined !== this.podcast?.conferenceId &&
122
- 0 !== this.podcast.conferenceId &&
123
- "READY_TO_RECORD" === this.podcast.processingStatus
124
- );
125
- },
126
- isLiveValidAndVisible(): boolean {
127
- return (
128
- undefined !== this.podcast &&
129
- false !== this.podcast.valid &&
130
- undefined !== this.podcast.availability.visibility &&
131
- this.podcast.availability.visibility
132
- );
133
- },
134
- classicPodcastPlay(): boolean {
135
- return (
136
- this.isLiveValidAndVisible &&
137
- !this.isLiveToBeRecorded &&
138
- ("READY_TO_RECORD" === this.podcast.processingStatus ||
139
- "READY" === this.podcast.processingStatus ||
140
- ("PROCESSING" === this.podcast.processingStatus &&
141
- undefined === this.authOrgaId))
142
- );
143
- },
144
- iconName(): string {
145
- if (this.isLiveToBeRecorded) return "ClockOutlineIcon";
146
- if ("READY" === this.podcast.processingStatus || this.fetchConference) {
147
- if (!this.podcast.valid) return "CheckIcon";
148
- if (
149
- !this.podcast.availability.visibility &&
150
- this.podcast.availability.date
151
- )
152
- return "ClockOutlineIcon";
153
- return "EyeOffOutlineIcon";
154
- }
155
- if (
156
- "PLANNED" === this.podcast.processingStatus ||
157
- "PROCESSING" === this.podcast.processingStatus
158
- )
159
- return "TimerSandEmptyIcon";
160
- if ("CANCELED" === this.podcast.processingStatus) return "CancelIcon";
161
- return "AlertIcon";
162
- },
163
- textVisible(): string {
164
- if (this.isLiveToBeRecorded)
165
- return this.$t("Podcast linked to waiting live");
166
- if ("READY" === this.podcast.processingStatus || this.fetchConference) {
167
- if (!this.podcast.valid) return this.$t("Podcast to validate");
168
- if (
169
- !this.podcast.availability.visibility &&
170
- this.podcast.availability.date
171
- )
172
- return this.$t("Podcast publish in future");
173
- return this.$t("Podcast no visible");
174
- }
175
- if (
176
- "PLANNED" === this.podcast.processingStatus ||
177
- "PROCESSING" === this.podcast.processingStatus
178
- )
179
- return this.$t("Podcast in process");
180
- if ("CANCELED" === this.podcast.processingStatus)
181
- return this.$t("Podcast in cancelled status");
182
- return this.$t("Podcast in error");
183
- },
184
- recordingLive(): boolean {
185
- return (
186
- undefined !== this.fetchConference &&
187
- -1 !== this.fetchConference.conferenceId &&
188
- ("RECORDING" === this.fetchConference.status ||
189
- "PENDING" === this.fetchConference.status)
190
- );
191
- },
192
- durationString(): string {
193
- return DurationHelper.formatDuration(
194
- Math.round(this.podcast.duration / 1000),
195
- );
196
- },
197
- durationIso(): string {
198
- if (!this.podcast || this.podcast.duration <= 1) return "";
199
- return dayjs.duration({ milliseconds: this.podcast.duration }).toISOString();
200
- },
201
- },
202
65
 
203
- methods: {
204
- ...mapActions(usePlayerStore, ["playerChangeStatus", "playerPlay"]),
205
- play(isVideo: boolean): void {
206
- if (this.isLiveToBeRecorded) {
207
- return;
208
- }
209
- if (this.playingPodcast && isVideo === this.playerVideo) {
210
- this.playerChangeStatus("PLAYING" === this.playerStatus);
211
- return;
212
- }
213
- if (isVideo && state.player.isVideoPage) {
214
- this.$router.push("/main/pub/video/" + this.podcast.podcastId);
215
- return;
216
- }
217
- if (!this.recordingLive) {
218
- this.playerPlay(this.podcast, isVideo);
219
- } else {
220
- this.playerPlay(
221
- {
222
- ...this.podcast,
223
- ...{ conferenceId: this.fetchConference?.conferenceId },
224
- },
225
- isVideo,
226
- );
227
- }
228
- },
229
- },
66
+
67
+ //Props
68
+ const props = defineProps({
69
+ podcast: { default: () => ({}), type: Object as () => Podcast },
70
+ hidePlay: { default: false, type: Boolean },
71
+ fetchConference: { default: undefined, type: Object as () => Conference },
72
+ justButtons: { default: false, type: Boolean },
73
+ })
74
+
75
+
76
+ //Data
77
+ const hoverType = ref("");
78
+
79
+ //Composables
80
+ const { t } = useI18n();
81
+ const authStore = useAuthStore();
82
+ const playerStore = usePlayerStore();
83
+ const router = useRouter();
84
+
85
+ //Computed
86
+ const isVideoPodcast = computed(() => {
87
+ return (
88
+ (props.fetchConference?.videoProfile?.includes("video_") &&
89
+ "READY_TO_RECORD" === props.podcast.processingStatus) ||
90
+ undefined !== props.podcast.video?.videoId
91
+ );
92
+ });
93
+ const playingLive = computed(() => {
94
+ return (
95
+ undefined !== props.fetchConference &&
96
+ "null" !== props.fetchConference.toString() &&
97
+ playerStore.playerLive?.conferenceId === props.fetchConference.conferenceId
98
+ );
99
+ });
100
+ const playingPodcast = computed(() => {
101
+ return (
102
+ playerStore.playerPodcast?.podcastId === props.podcast.podcastId ||
103
+ playingLive.value
104
+ );
230
105
  });
106
+ const isLiveToBeRecorded = computed(() => undefined === props.fetchConference && isLiveReadyToRecord.value);
107
+ const isLiveReadyToRecord = computed(() => {
108
+ return (
109
+ undefined !== props.podcast?.conferenceId &&
110
+ 0 !== props.podcast.conferenceId &&
111
+ "READY_TO_RECORD" === props.podcast.processingStatus
112
+ );
113
+ });
114
+ const isLiveValidAndVisible = computed(() => {
115
+ return (
116
+ undefined !== props.podcast &&
117
+ false !== props.podcast.valid &&
118
+ undefined !== props.podcast.availability.visibility &&
119
+ props.podcast.availability.visibility
120
+ );
121
+ });
122
+ const classicPodcastPlay = computed(() => {
123
+ return (
124
+ isLiveValidAndVisible.value &&
125
+ !isLiveToBeRecorded.value &&
126
+ ("READY_TO_RECORD" === props.podcast.processingStatus ||
127
+ "READY" === props.podcast.processingStatus ||
128
+ ("PROCESSING" === props.podcast.processingStatus &&
129
+ undefined === authStore.authOrgaId))
130
+ );
131
+ });
132
+ const iconName = computed(() => {
133
+ if (isLiveToBeRecorded.value) return ClockOutlineIcon;
134
+ if ("READY" === props.podcast.processingStatus || props.fetchConference) {
135
+ if (!props.podcast.valid) return CheckIcon;
136
+ if (
137
+ !props.podcast.availability.visibility &&
138
+ props.podcast.availability.date
139
+ )
140
+ return ClockOutlineIcon;
141
+ return EyeOffOutlineIcon;
142
+ }
143
+ if (
144
+ "PLANNED" === props.podcast.processingStatus ||
145
+ "PROCESSING" === props.podcast.processingStatus
146
+ )
147
+ return TimerSandEmptyIcon;
148
+ if ("CANCELED" === props.podcast.processingStatus) return CancelIcon;
149
+ return AlertIcon;
150
+ });
151
+ const textVisible = computed(() => {
152
+ if (isLiveToBeRecorded.value){
153
+ return t("Podcast linked to waiting live");
154
+ }
155
+
156
+ if ("READY" === props.podcast.processingStatus || props.fetchConference) {
157
+ if (!props.podcast.valid) return t("Podcast to validate");
158
+ if (
159
+ !props.podcast.availability.visibility &&
160
+ props.podcast.availability.date
161
+ ){
162
+ return t("Podcast publish in future");
163
+ }
164
+ return t("Podcast no visible");
165
+ }
166
+ if (
167
+ "PLANNED" === props.podcast.processingStatus ||
168
+ "PROCESSING" === props.podcast.processingStatus
169
+ ){
170
+ return t("Podcast in process");
171
+ }
172
+ if ("CANCELED" === props.podcast.processingStatus){
173
+ return t("Podcast in cancelled status");
174
+ }
175
+ return t("Podcast in error");
176
+ });
177
+ const recordingLive = computed(() => {
178
+ return (
179
+ undefined !== props.fetchConference &&
180
+ -1 !== props.fetchConference.conferenceId &&
181
+ ("RECORDING" === props.fetchConference.status ||
182
+ "PENDING" === props.fetchConference.status)
183
+ );
184
+ });
185
+ const durationString = computed(() => {
186
+ return DurationHelper.formatDuration(
187
+ Math.round(props.podcast.duration / 1000),
188
+ );
189
+ });
190
+ const durationIso = computed(() => {
191
+ if (!props.podcast || props.podcast.duration <= 1) return "";
192
+ return dayjs.duration({ milliseconds: props.podcast.duration }).toISOString();
193
+ });
194
+
195
+ //Methods
196
+ function play(isVideo: boolean): void {
197
+ if (isLiveToBeRecorded.value) {
198
+ return;
199
+ }
200
+ if (playingPodcast.value && isVideo === playerStore.playerVideo) {
201
+ playerStore.playerChangeStatus("PLAYING" === playerStore.playerStatus);
202
+ return;
203
+ }
204
+ if (isVideo && state.player.isVideoPage) {
205
+ router.push("/main/pub/video/" + props.podcast.podcastId);
206
+ return;
207
+ }
208
+ if (!recordingLive.value) {
209
+ playerStore.playerPlay(props.podcast, isVideo);
210
+ } else {
211
+ playerStore.playerPlay(
212
+ {
213
+ ...props.podcast,
214
+ ...{ conferenceId: props.fetchConference?.conferenceId },
215
+ },
216
+ isVideo,
217
+ );
218
+ }
219
+ }
231
220
  </script>
232
221
 
233
222
  <style lang="scss">
@@ -7,7 +7,7 @@
7
7
  />
8
8
  <div class="transcription-section-buttons">
9
9
  <button v-if="isOpen" class="btn btn-primary m-0" @click="isAccessibilityModal = true">
10
- <EyeOutlineIcon class="me-1"/> {{ $t('Transcript Accessibility') }}
10
+ <EyeOutlineIcon class="me-1"/> {{ t('Transcript Accessibility') }}
11
11
  </button>
12
12
  <button
13
13
  class="btn btn-transcript"
@@ -19,108 +19,97 @@
19
19
  </div>
20
20
  <div v-if="isOpen" class="transcription-body">
21
21
  <ClassicLoading
22
- :loading-text="!firstLoaded ? $t('Loading content ...') : undefined"
22
+ :loading-text="!firstLoaded ? t('Loading content ...') : undefined"
23
23
  />
24
24
  <div class="transcription-text">
25
25
  <template v-if="firstLoaded && transcript?.length">{{
26
26
  transcript
27
27
  }}</template>
28
28
  <template v-if="firstLoaded && !transcript?.length">{{
29
- $t("Transcript does not yet exist for this episode")
29
+ t("Transcript does not yet exist for this episode")
30
30
  }}</template>
31
31
  </div>
32
32
  </div>
33
33
  </div>
34
34
  </template>
35
35
 
36
- <script lang="ts">
36
+ <script setup lang="ts">
37
37
  import cookiesHelper from "../../../helper/cookiesHelper";
38
38
  import EyeOutlineIcon from "vue-material-design-icons/EyeOutline.vue";
39
39
  import classicApi from "../../../api/classicApi";
40
40
  import ClassicLoading from "../../form/ClassicLoading.vue";
41
- import { defineAsyncComponent, defineComponent } from "vue";
41
+ import { computed, defineAsyncComponent, Ref, ref, watch } from "vue";
42
+ import { useI18n } from "vue-i18n";
42
43
  const AccessibilityModal = defineAsyncComponent(
43
44
  () => import("../accessibility/AccessibilityModal.vue"),
44
45
  );
45
- export default defineComponent({
46
- name: "PodcastRawTranscript",
47
46
 
48
- components: {
49
- ClassicLoading,
50
- EyeOutlineIcon,
51
- AccessibilityModal
52
- },
47
+ //Props
48
+ const props = defineProps({
49
+ podcastId: { default: undefined, type: Number },
50
+ })
53
51
 
54
- props: {
55
- podcastId: { default: undefined, type: Number },
56
- },
57
- data() {
58
- return {
59
- isOpen: false as boolean,
60
- firstLoaded: false as boolean,
61
- transcript: undefined as string | undefined,
62
- isAccessibilityModal : false as boolean,
63
- };
64
- },
52
+ //Data
53
+ const isOpen = ref(false);
54
+ const firstLoaded = ref(false);
55
+ const isAccessibilityModal = ref(false);
56
+ const transcript: Ref<string | undefined> = ref(undefined);
65
57
 
66
- computed: {
67
- buttonText() {
68
- return this.isOpen
69
- ? this.$t("Hide transcript")
70
- : this.$t("View transcript");
71
- },
72
- },
73
- watch: {
74
- async isOpen() {
75
- if (this.isOpen && !this.firstLoaded) {
76
- this.fetchTranscript();
77
- this.getAccessibility();
78
- }
79
- },
80
- },
81
- methods: {
82
- getAccessibility(){
83
- const fontSize = cookiesHelper.getCookie("octopus-font-size");
84
- if (null !== fontSize) {
85
- this.setCssProperty('--octopus-accessibility-font-size', fontSize);
86
- }
87
- const background = cookiesHelper.getCookie("octopus-background");
88
- if (null !== background) {
89
- this.setCssProperty('--octopus-accessibility-background', background);
90
- }
91
- const color = cookiesHelper.getCookie("octopus-color");
92
- if (null !== color) {
93
- this.setCssProperty('--octopus-accessibility-color', color);
94
- }
95
- },
96
- setCssProperty(name: string, value: string){
97
- document.documentElement.style.setProperty(name,value);
98
- },
99
- saveAccessibility(accessibility: {fontSize: number,background: string,color: string}){
100
- this.setCssProperty('--octopus-accessibility-font-size', accessibility.fontSize+'px');
101
- cookiesHelper.setCookie("octopus-font-size", accessibility.fontSize+'px');
102
- this.setCssProperty('--octopus-accessibility-background', accessibility.background);
103
- cookiesHelper.setCookie("octopus-background",accessibility.background);
104
- this.setCssProperty('--octopus-accessibility-color', accessibility.color);
105
- cookiesHelper.setCookie("octopus-color",accessibility.color);
106
- this.isAccessibilityModal = false;
107
- },
108
- async fetchTranscript() {
109
- if (!this.podcastId) {
110
- return;
111
- }
112
- try {
113
- this.transcript = await classicApi.fetchData({
114
- api: 11,
115
- path: `transcription/text/${this.podcastId}`,
116
- });
117
- } catch {
118
- //Do nothing
119
- }
120
- this.firstLoaded = true;
121
- },
122
- },
58
+ //Composables
59
+ const { t } = useI18n();
60
+
61
+ //Computed
62
+ const buttonText = computed(() => isOpen.value? t("Hide transcript"): t("View transcript"));
63
+
64
+ //Watch
65
+ watch(isOpen, () => {
66
+ if (isOpen.value && !firstLoaded.value) {
67
+ fetchTranscript();
68
+ getAccessibility();
69
+ }
123
70
  });
71
+
72
+ //Methods
73
+ function getAccessibility(){
74
+ const fontSize = cookiesHelper.getCookie("octopus-font-size");
75
+ if (null !== fontSize) {
76
+ setCssProperty('--octopus-accessibility-font-size', fontSize);
77
+ }
78
+ const background = cookiesHelper.getCookie("octopus-background");
79
+ if (null !== background) {
80
+ setCssProperty('--octopus-accessibility-background', background);
81
+ }
82
+ const color = cookiesHelper.getCookie("octopus-color");
83
+ if (null !== color) {
84
+ setCssProperty('--octopus-accessibility-color', color);
85
+ }
86
+ }
87
+ function setCssProperty(name: string, value: string){
88
+ document.documentElement.style.setProperty(name,value);
89
+ }
90
+ function saveAccessibility(accessibility: {fontSize: number,background: string,color: string}){
91
+ setCssProperty('--octopus-accessibility-font-size', accessibility.fontSize+'px');
92
+ cookiesHelper.setCookie("octopus-font-size", accessibility.fontSize+'px');
93
+ setCssProperty('--octopus-accessibility-background', accessibility.background);
94
+ cookiesHelper.setCookie("octopus-background",accessibility.background);
95
+ setCssProperty('--octopus-accessibility-color', accessibility.color);
96
+ cookiesHelper.setCookie("octopus-color",accessibility.color);
97
+ isAccessibilityModal.value = false;
98
+ }
99
+ async function fetchTranscript() {
100
+ if (!props.podcastId) {
101
+ return;
102
+ }
103
+ try {
104
+ transcript.value = await classicApi.fetchData({
105
+ api: 11,
106
+ path: `transcription/text/${props.podcastId}`,
107
+ });
108
+ } catch {
109
+ //Do nothing
110
+ }
111
+ firstLoaded.value = true;
112
+ }
124
113
  </script>
125
114
  <style lang="scss">
126
115
  :root {
@@ -4,7 +4,7 @@
4
4
  class="rubrique-list-component d-flex align-items-center flex-wrap mb-3 small-text"
5
5
  >
6
6
  <div class="fw-bold me-3">
7
- {{ $t("Rubrics") + " : " }}
7
+ {{ t("Rubrics") + " : " }}
8
8
  </div>
9
9
  <router-link
10
10
  v-for="rubriqueId in rubriqueIds"
@@ -21,47 +21,44 @@
21
21
  </div>
22
22
  </template>
23
23
 
24
- <script lang="ts">
25
- import { mapActions, mapState } from "pinia";
24
+ <script setup lang="ts">
26
25
  import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
27
- import {defineComponent } from "vue";
28
26
  import { Rubrique } from "../../../stores/class/rubrique/rubrique";
29
27
  import { useFilterStore } from "../../../stores/FilterStore";
30
- export default defineComponent({
31
- name: "TagList",
32
- components: {
33
- },
34
- props: {
35
- rubriqueIds: { default: () => [], type: Array as () => Array<number> },
36
- orgaId: {default: "", type: String,},
37
- },
38
- data() {
39
- return {
40
- rubriquagesOrga: {} as {[key:number]:Rubrique},
41
- init: false as boolean,
42
- };
43
- },
28
+ import { useI18n } from "vue-i18n";
29
+ import { computed, onBeforeMount, Ref, ref } from "vue";
44
30
 
45
- computed:{
46
- ...mapState(useFilterStore, ["filterOrgaId"]),
47
- organisationQuery(){
48
- if(this.filterOrgaId){
49
- return undefined;
50
- }
51
- return { o: this.orgaId};
52
- }
53
- },
54
- created() {
55
- this.fetchRubriquages();
56
- },
57
- methods:{
58
- ...mapActions(useSaveFetchStore, ["getOrgaRubriques"]),
59
- async fetchRubriquages(){
60
- const rubriquagesOrga = await this.getOrgaRubriques(this.orgaId);
61
- const rubriquesArray= rubriquagesOrga.flatMap((rub) =>rub.rubriques);
62
- this.rubriquagesOrga= rubriquesArray.reduce((results, u)=> {results[u.rubriqueId??0] = u; return results}, {} as {[key:number]:Rubrique});
63
- this.init = true;
64
- },
31
+ //Props
32
+ const props = defineProps({
33
+ rubriqueIds: { default: () => [], type: Array as () => Array<number> },
34
+ orgaId: {default: "", type: String,},
35
+ })
36
+
37
+ //Data
38
+ const init = ref(false);
39
+ const rubriquagesOrga: Ref<{[key:number]:Rubrique}> = ref({});
40
+
41
+ //Composables
42
+ const { t } = useI18n();
43
+ const filterStore = useFilterStore();
44
+ const SaveFetchStore = useSaveFetchStore();
45
+
46
+ //Computed
47
+ const organisationQuery = computed(() => {
48
+ if(filterStore.filterOrgaId){
49
+ return undefined;
65
50
  }
51
+ return { o: props.orgaId};
66
52
  });
53
+
54
+ onBeforeMount(()=>fetchRubriquages())
55
+
56
+
57
+ //Methods
58
+ async function fetchRubriquages(){
59
+ const tempRubriquagesOrga = await SaveFetchStore.getOrgaRubriques(props.orgaId);
60
+ const rubriquesArray= tempRubriquagesOrga.flatMap((rub) =>rub.rubriques);
61
+ rubriquagesOrga.value= rubriquesArray.reduce((results, u)=> {results[u.rubriqueId??0] = u; return results}, {} as {[key:number]:Rubrique});
62
+ init.value = true;
63
+ }
67
64
  </script>