@saooti/octopus-sdk 40.2.18 → 41.0.0-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 +38 -39
  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 +56 -69
  32. package/src/components/display/emission/EmissionList.vue +192 -218
  33. package/src/components/display/emission/EmissionPlayerItem.vue +48 -65
  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 +40 -51
  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 +211 -223
  58. package/src/components/display/organisation/OrganisationChooser.vue +117 -123
  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 +49 -51
  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 +185 -209
  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 +27 -32
  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 +85 -108
  143. package/src/components/misc/MobileMenu.vue +102 -113
  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 +116 -135
  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 +98 -131
  176. package/src/components/pages/EmissionsPage.vue +2 -0
  177. package/src/components/pages/Error403Page.vue +22 -21
  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 +83 -111
  184. package/src/components/pages/ParticipantsPage.vue +3 -0
  185. package/src/components/pages/PlaylistPage.vue +98 -116
  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
@@ -12,21 +12,21 @@
12
12
  :class="{ active: !popularSort }"
13
13
  @click="sortChrono()"
14
14
  >
15
- {{ $t("Last added") }}
15
+ {{ t("Last added") }}
16
16
  </button>
17
17
  <button
18
18
  class="btn btn-underline"
19
19
  :class="{ active: popularSort }"
20
20
  @click="sortPopular()"
21
21
  >
22
- {{ $t("Most popular") }}
22
+ {{ t("Most popular") }}
23
23
  </button>
24
24
  </div>
25
25
  <div v-if="displayArrow" class="hide-phone">
26
26
  <button
27
27
  class="btn admin-button m-1"
28
28
  :class="{ disabled: !previousAvailable }"
29
- :title="$t('Display previous')"
29
+ :title="t('Display previous')"
30
30
  @click="displayPrevious()"
31
31
  >
32
32
  <ChevronLeftIcon :size="30" />
@@ -34,7 +34,7 @@
34
34
  <button
35
35
  class="btn admin-button m-1"
36
36
  :class="{ disabled: !nextAvailable }"
37
- :title="$t('Display next')"
37
+ :title="t('Display next')"
38
38
  @click="displayNext()"
39
39
  >
40
40
  <ChevronRightIcon :size="30" />
@@ -54,129 +54,122 @@
54
54
  </div>
55
55
  </template>
56
56
 
57
- <script lang="ts">
57
+ <script setup lang="ts">
58
58
  import PlusIcon from "vue-material-design-icons/Plus.vue";
59
59
  import ChevronLeftIcon from "vue-material-design-icons/ChevronLeft.vue";
60
60
  import ChevronRightIcon from "vue-material-design-icons/ChevronRight.vue";
61
61
  import { useRubriquesFilterComputed } from "../../composable/route/useRubriquesFilterComputed";
62
62
  import { useRubriquesFilterParam } from "../../composable/route/useRubriquesFilterParam";
63
63
  import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
64
- import { defineComponent } from "vue";
65
- import { RouteLocationRaw } from "vue-router";
64
+ import { computed } from "vue";
65
+ import { useRoute, useRouter } from "vue-router";
66
66
  import { useFilterStore } from "../../../stores/FilterStore";
67
- import { mapState } from "pinia";
68
67
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
69
- export default defineComponent({
70
- name: "PodcastInlineListTemplate",
71
- components: {
72
- ChevronLeftIcon,
73
- ChevronRightIcon,
74
- PlusIcon,
75
- },
68
+ import { useI18n } from "vue-i18n";
76
69
 
77
- props: {
78
- displayArrow: { default: true, type: Boolean },
79
- previousAvailable: { default: false, type: Boolean },
80
- nextAvailable: { default: false, type: Boolean },
81
- popularSort: { default: false, type: Boolean },
82
- buttonText: { default: undefined, type: String },
83
- buttonPlus: { default: false, type: Boolean },
84
- title: { default: "", type: String },
85
- href: { default: undefined, type: String },
86
- iabId: { default: undefined, type: Number },
87
- rubriqueId: { default: () => [], type: Array as () => Array<number> },
88
- noRubriquageId: { default: () => [], type: Array as () => Array<number> },
89
- podcastId: { default: undefined, type: Number },
90
- titleTag: { default: "h2", type: String },
91
- },
92
- emits: ["sortChrono", "sortPopular", "displayPrevious", "displayNext"],
93
- setup(){
94
- const { returnRubriquesFilter } = useRubriquesFilterParam();
95
- const { rubriqueQueryParam } = useRubriquesFilterComputed();
96
- return { returnRubriquesFilter, rubriqueQueryParam }
97
- },
98
- data() {
99
- return {};
100
- },
70
+ //Props
71
+ const props = defineProps({
72
+ displayArrow: { default: true, type: Boolean },
73
+ previousAvailable: { default: false, type: Boolean },
74
+ nextAvailable: { default: false, type: Boolean },
75
+ popularSort: { default: false, type: Boolean },
76
+ buttonText: { default: undefined, type: String },
77
+ buttonPlus: { default: false, type: Boolean },
78
+ title: { default: "", type: String },
79
+ href: { default: undefined, type: String },
80
+ iabId: { default: undefined, type: Number },
81
+ rubriqueId: { default: () => [], type: Array as () => Array<number> },
82
+ noRubriquageId: { default: () => [], type: Array as () => Array<number> },
83
+ podcastId: { default: undefined, type: Number },
84
+ titleTag: { default: "h2", type: String },
85
+ })
101
86
 
102
- computed: {
103
- ...mapState(useFilterStore, ["filterIab", "filterRubriquage", "filterOrgaId"]),
104
- refTo(): string | RouteLocationRaw {
105
- if (this.href) return this.href;
106
- if (this.iabId) {
107
- return {
108
- name: "category",
109
- params: { iabId: this.iabId },
110
- };
111
- }
112
- return {
113
- name: "podcasts",
114
- query: {
115
- iabId: this.filterIab?.id,
116
- rubriquesId: this.rubriqueQueryParam,
117
- productor: this.filterOrgaId
118
- },
119
- };
120
- },
121
- },
87
+ //Emits
88
+ const emit = defineEmits(["sortChrono", "sortPopular", "displayPrevious", "displayNext"]);
122
89
 
123
- methods: {
124
- sortChrono(): void {
125
- this.$emit("sortChrono");
126
- },
127
- sortPopular(): void {
128
- this.$emit("sortPopular");
129
- },
130
- displayPrevious(): void {
131
- this.$emit("displayPrevious");
132
- },
133
- displayNext(): void {
134
- this.$emit("displayNext");
135
- },
136
- handleSeeMoreButton(event: { preventDefault: () => void }) {
137
- if (this.href ||
138
- !this.rubriqueId ||
139
- 0 === this.rubriqueId.length ||
140
- this.noRubriquageId.length
141
- ) {
142
- return;
143
- }
144
- event.preventDefault();
145
- const rubriqueChosenId = this.rubriqueId.at(-1);
146
- let filterToAdd: RubriquageFilter|undefined;
147
- if (this.filterRubriquage.length) {
148
- for (let i = 0, len = this.filterRubriquage.length; i < len; i++) {
149
- const rubriqueChosen = this.filterRubriquage[i].rubriques.find(
150
- (element: Rubrique) => element.rubriqueId === rubriqueChosenId,
151
- );
152
- if (rubriqueChosen) {
153
- filterToAdd = {
154
- rubriquageId: this.filterRubriquage[i].rubriquageId ?? 0,
155
- rubriqueId: rubriqueChosenId,
156
- nameRubriquage: this.filterRubriquage[i].title,
157
- nameRubrique: rubriqueChosen.name,
158
- };
159
- break;
160
- }
161
- }
162
- }
163
- if(!filterToAdd){return;}
164
- const queries = this.returnRubriquesFilter((a) => {
165
- const indexRubriquage = a.findIndex(filter => filter.rubriquageId === filterToAdd.rubriquageId);
166
- if (indexRubriquage === -1) {
167
- a.push(filterToAdd);
168
- } else {
169
- a[indexRubriquage] = filterToAdd;
170
- }
171
- return a;
172
- })
173
- this.$router.push({
174
- name: "podcasts",
175
- query: {...this.$route.query, ...queries}
176
- });
90
+ //Composables
91
+ const { t } = useI18n();
92
+ const { returnRubriquesFilter } = useRubriquesFilterParam();
93
+ const { rubriqueQueryParam } = useRubriquesFilterComputed();
94
+ const filterStore = useFilterStore();
95
+ const router = useRouter();
96
+ const route = useRoute();
97
+
98
+
99
+ //Computed
100
+ const refTo = computed(() => {
101
+ if (props.href) return props.href;
102
+ if (props.iabId) {
103
+ return {
104
+ name: "category",
105
+ params: { iabId: props.iabId },
106
+ };
107
+ }
108
+ return {
109
+ name: "podcasts",
110
+ query: {
111
+ iabId: filterStore.filterIab?.id,
112
+ rubriquesId: rubriqueQueryParam.value,
113
+ productor: filterStore.filterOrgaId
177
114
  },
178
- },
115
+ };
179
116
  });
117
+
118
+ //Methods
119
+ function sortChrono(): void {
120
+ emit("sortChrono");
121
+ }
122
+ function sortPopular(): void {
123
+ emit("sortPopular");
124
+ }
125
+ function displayPrevious(): void {
126
+ emit("displayPrevious");
127
+ }
128
+ function displayNext(): void {
129
+ emit("displayNext");
130
+ }
131
+ function handleSeeMoreButton(event: { preventDefault: () => void }) {
132
+ if (props.href ||
133
+ !props.rubriqueId ||
134
+ 0 === props.rubriqueId.length ||
135
+ props.noRubriquageId.length
136
+ ) {
137
+ return;
138
+ }
139
+ event.preventDefault();
140
+ const rubriqueChosenId = props.rubriqueId.at(-1);
141
+ let filterToAdd: RubriquageFilter|undefined;
142
+ if (filterStore.filterRubriquage.length) {
143
+ for (let i = 0, len = filterStore.filterRubriquage.length; i < len; i++) {
144
+ const rubriqueChosen = filterStore.filterRubriquage[i].rubriques.find(
145
+ (element: Rubrique) => element.rubriqueId === rubriqueChosenId,
146
+ );
147
+ if (rubriqueChosen) {
148
+ filterToAdd = {
149
+ rubriquageId: filterStore.filterRubriquage[i].rubriquageId ?? 0,
150
+ rubriqueId: rubriqueChosenId,
151
+ nameRubriquage: filterStore.filterRubriquage[i].title,
152
+ nameRubrique: rubriqueChosen.name,
153
+ };
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ if(!filterToAdd){return;}
159
+ const queries = returnRubriquesFilter((a) => {
160
+ const indexRubriquage = a.findIndex(filter => filter.rubriquageId === filterToAdd.rubriquageId);
161
+ if (indexRubriquage === -1) {
162
+ a.push(filterToAdd);
163
+ } else {
164
+ a[indexRubriquage] = filterToAdd;
165
+ }
166
+ return a;
167
+ })
168
+ router.push({
169
+ name: "podcasts",
170
+ query: {...route.query, ...queries}
171
+ });
172
+ }
180
173
  </script>
181
174
  <style lang="scss">
182
175
  .octopus-app .podcast-inline-container {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- :class="'PLAYING' === playerStatus ? 'play-animation' : ''"
3
+ :class="'PLAYING' === playerStore.playerStatus ? 'play-animation' : ''"
4
4
  class="bloc-paddle mx-1"
5
5
  >
6
6
  <span class="paddle1" />
@@ -9,16 +9,8 @@
9
9
  </div>
10
10
  </template>
11
11
 
12
- <script lang="ts">
12
+ <script setup lang="ts">
13
13
  import { usePlayerStore } from "../../../stores/PlayerStore";
14
- import { mapState } from "pinia";
15
- import { defineComponent } from "vue";
16
- export default defineComponent({
17
- name: "PodcastIsPlaying",
18
- computed: {
19
- ...mapState(usePlayerStore, [
20
- "playerStatus",
21
- ])
22
- },
23
- });
14
+
15
+ const playerStore = usePlayerStore();
24
16
  </script>
@@ -37,80 +37,65 @@
37
37
  </article>
38
38
  </template>
39
39
 
40
- <script lang="ts">
40
+ <script setup lang="ts">
41
41
  import debounce from '../../../helper/debounceHelper';
42
42
  import PodcastItemInfo from "./PodcastItemInfo.vue";
43
43
  import PodcastImage from "./PodcastImage.vue";
44
44
  import dayjs from "dayjs";
45
45
  import { Podcast } from "@/stores/class/general/podcast";
46
- import { defineComponent } from "vue";
46
+ import { computed, nextTick, onBeforeMount, ref, Ref, useTemplateRef } from "vue";
47
47
  import { Conference } from "@/stores/class/conference/conference";
48
- export default defineComponent({
49
- name: "PodcastItem",
50
48
 
51
- components: {
52
- PodcastItemInfo,
53
- PodcastImage,
54
- },
49
+ //Props
50
+ const props = defineProps({
51
+ podcast: { default: () => ({}), type: Object as () => Podcast },
52
+ fetchConference: { default: undefined, type: Object as () => Conference },
53
+ })
55
54
 
56
- props: {
57
- podcast: { default: () => ({}), type: Object as () => Podcast },
58
- fetchConference: { default: undefined, type: Object as () => Conference },
59
- },
55
+ //Data
56
+ const isMobile = ref(false);
57
+ const firstDisplayDesc = ref(false);
58
+ const hoverDesc = ref(false);
59
+ const arrowDirection = ref("up");
60
+ const isDescriptionBig = ref(false);
61
+ const debounceShowDescriptionEvent: Ref< undefined | (() => void)> = ref(undefined);
62
+ const debounceHideDescriptionEvent: Ref< undefined | (() => void)> = ref(undefined);
63
+ const descriptionPodcastRef = useTemplateRef('descriptionPodcast');
64
+ const descriptionPodcastContainerRef = useTemplateRef('descriptionPodcastContainer');
60
65
 
61
- data() {
62
- return {
63
- firstDisplayDesc: false as boolean,
64
- hoverDesc: false as boolean,
65
- arrowDirection: "up" as string,
66
- isDescriptionBig: false as boolean,
67
- debounceShowDescriptionEvent: undefined as undefined | (() => void),
68
- debounceHideDescriptionEvent: undefined as undefined | (() => void),
69
- };
70
- },
66
+ //Computed
67
+ const displayDate = computed(() => dayjs(props.podcast.pubDate).format());
68
+ const description = computed(() => props.podcast.description ?? "");
71
69
 
72
- computed: {
73
- displayDate(): string {
74
- return dayjs(this.podcast.pubDate).format();
75
- },
76
- description(): string {
77
- return this.podcast.description ?? "";
78
- },
79
- isMobile(): boolean {
80
- return window.matchMedia("(hover: none)").matches;
81
- },
82
- },
83
- created() {
84
- this.debounceShowDescriptionEvent = debounce(this.showDescription, 100);
85
- this.debounceHideDescriptionEvent = debounce(this.hideDescription, 100);
86
- },
70
+ onBeforeMount(()=>{
71
+ isMobile.value = window.matchMedia("(hover: none)").matches;
72
+ debounceShowDescriptionEvent.value = debounce(showDescription, 100);
73
+ debounceHideDescriptionEvent.value = debounce(hideDescription, 100);
74
+ })
87
75
 
88
- methods: {
89
- initDescription(): void {
90
- if (this.firstDisplayDesc /* || this.isMobile */) {
91
- return;
92
- }
93
- const podcastDesc = this.$refs.descriptionPodcast as HTMLElement;
94
- const podcastDescContainer = this.$refs
95
- .descriptionPodcastContainer as HTMLElement;
96
- if (podcastDesc?.clientHeight > podcastDescContainer?.clientHeight) {
97
- this.isDescriptionBig = true;
98
- }
99
- this.firstDisplayDesc = true;
100
- },
101
- showDescription(): void {
102
- this.arrowDirection = "down";
103
- this.hoverDesc = true;
104
- this.$nextTick(() => {
105
- this.initDescription();
106
- });
107
- },
108
- hideDescription(): void {
109
- this.arrowDirection = "up";
110
- this.hoverDesc = false;
111
- },
112
- },
113
- });
76
+ //Methods
77
+ function initDescription(): void {
78
+ if (firstDisplayDesc.value) {
79
+ return;
80
+ }
81
+ const podcastDesc = descriptionPodcastRef?.value as HTMLElement;
82
+ const podcastDescContainer = descriptionPodcastContainerRef?.value as HTMLElement;
83
+ if (podcastDesc?.clientHeight > podcastDescContainer?.clientHeight) {
84
+ isDescriptionBig.value = true;
85
+ }
86
+ firstDisplayDesc.value = true;
87
+ }
88
+ function showDescription(): void {
89
+ arrowDirection.value = "down";
90
+ hoverDesc.value = true;
91
+ nextTick(() => {
92
+ initDescription();
93
+ });
94
+ }
95
+ function hideDescription(): void {
96
+ arrowDirection.value = "up";
97
+ hoverDesc.value = false;
98
+ }
114
99
  </script>
115
100
 
116
101
  <style lang="scss">
@@ -11,12 +11,12 @@
11
11
  params: { podcastId: podcast.podcastId },
12
12
  }"
13
13
  class="text-dark flex-grow-1 title-podcast-item basic-line-clamp three-line"
14
- :title="$t('Episode name page', { name: podcast.title })"
14
+ :title="t('Episode name page', { name: podcast.title })"
15
15
  >
16
16
  {{ podcast.title }}
17
17
  </router-link>
18
18
  <PodcastPlayBar
19
- v-if="isProgressBar"
19
+ v-if="state.emissionsPage.progressBar"
20
20
  :display-buton-play="true"
21
21
  :podcast="podcast"
22
22
  class="me-2"
@@ -43,50 +43,34 @@
43
43
  </div>
44
44
  </template>
45
45
 
46
- <script lang="ts">
46
+ <script setup lang="ts">
47
47
  import AnimatorsItem from "./AnimatorsItem.vue";
48
48
  import {useOrgaComputed} from "../../composable/useOrgaComputed";
49
49
  import dayjs from "dayjs";
50
- import { defineAsyncComponent, defineComponent } from "vue";
50
+ import { computed, defineAsyncComponent } from "vue";
51
51
  import { Podcast } from "@/stores/class/general/podcast";
52
52
  import { state } from "../../../stores/ParamSdkStore";
53
+ import { useI18n } from "vue-i18n";
53
54
  const PodcastPlayBar = defineAsyncComponent(
54
55
  () => import("./PodcastPlayBar.vue"),
55
56
  );
56
- export default defineComponent({
57
- name: "PodcastItemInfo",
58
57
 
59
- components: {
60
- AnimatorsItem,
61
- PodcastPlayBar,
62
- },
58
+ //Props
59
+ const props = defineProps({
60
+ podcast: { default: () => ({}), type: Object as () => Podcast },
61
+ })
63
62
 
64
- props: {
65
- podcast: { default: () => ({}), type: Object as () => Podcast },
66
- },
63
+ //Composables
64
+ const { t } = useI18n();
65
+ const { isPodcastmaker } = useOrgaComputed();
67
66
 
68
- setup(){
69
- const { isPodcastmaker, isEditRights } = useOrgaComputed();
70
- return { isPodcastmaker, isEditRights }
71
- },
72
-
73
- computed: {
74
- isProgressBar(): boolean {
75
- return state.emissionsPage.progressBar as boolean;
76
- },
77
- date(): string {
78
- return dayjs(this.podcast.pubDate).format("D MMMM YYYY");
79
- },
80
- editRight(): boolean {
81
- return this.isEditRights(this.podcast.organisation.id);
82
- },
83
- orgaNameDisplay(): string {
84
- if (this.podcast.organisation.name.length > 30) {
85
- return this.podcast.organisation.name.substring(0, 30) + "...";
86
- }
87
- return this.podcast.organisation.name;
88
- },
89
- },
67
+ //Computed
68
+ const date = computed(() => dayjs(props.podcast.pubDate).format("D MMMM YYYY"));
69
+ const orgaNameDisplay = computed(() =>{
70
+ if (props.podcast.organisation.name.length > 30) {
71
+ return props.podcast.organisation.name.substring(0, 30) + "...";
72
+ }
73
+ return props.podcast.organisation.name;
90
74
  });
91
75
  </script>
92
76