@saooti/octopus-sdk 40.2.19 → 41.0.0

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 (214) hide show
  1. package/index.ts +2 -1
  2. package/package.json +4 -3
  3. package/src/App.vue +71 -95
  4. package/src/components/composable/player/usePlayerLive.ts +13 -4
  5. package/src/components/composable/player/usePlayerLogic.ts +6 -6
  6. package/src/components/composable/player/usePlayerVast.ts +7 -7
  7. package/src/components/composable/podcasts/usePodcastView.ts +3 -3
  8. package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
  9. package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
  10. package/src/components/composable/route/useSimplePageParam.ts +15 -8
  11. package/src/components/composable/useInit.ts +2 -2
  12. package/src/components/composable/useMetaTitleWatch.ts +2 -2
  13. package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
  14. package/src/components/display/categories/CategoryChooser.vue +144 -145
  15. package/src/components/display/categories/CategoryFilter.vue +172 -198
  16. package/src/components/display/categories/CategoryList.vue +122 -147
  17. package/src/components/display/comments/CommentInput.vue +100 -122
  18. package/src/components/display/comments/CommentList.vue +169 -191
  19. package/src/components/display/comments/CommentName.vue +35 -45
  20. package/src/components/display/comments/CommentParentInfo.vue +28 -34
  21. package/src/components/display/comments/CommentPlayer.vue +38 -50
  22. package/src/components/display/comments/CommentSection.vue +85 -103
  23. package/src/components/display/comments/item/CommentBasicView.vue +48 -61
  24. package/src/components/display/comments/item/CommentItem.vue +104 -115
  25. package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
  26. package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
  27. package/src/components/display/comments/like/LikeButton.vue +36 -41
  28. package/src/components/display/comments/like/LikeSection.vue +128 -136
  29. package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
  30. package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
  31. package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
  32. package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
  33. package/src/components/display/edit/EditBox.vue +9 -8
  34. package/src/components/display/edit/EditBoxRadio.vue +1 -5
  35. package/src/components/display/emission/EmissionInlineList.vue +82 -97
  36. package/src/components/display/emission/EmissionItem.vue +57 -69
  37. package/src/components/display/emission/EmissionList.vue +189 -218
  38. package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
  39. package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
  40. package/src/components/display/emission/EmissionPresentationList.vue +51 -61
  41. package/src/components/display/filter/AdvancedSearch.vue +151 -176
  42. package/src/components/display/filter/CategorySearchFilter.vue +43 -46
  43. package/src/components/display/filter/DateFilter.vue +76 -91
  44. package/src/components/display/filter/MonetizableFilter.vue +27 -30
  45. package/src/components/display/filter/ProductorSearch.vue +87 -90
  46. package/src/components/display/filter/RubriqueChoice.vue +58 -63
  47. package/src/components/display/filter/RubriqueFilter.vue +154 -169
  48. package/src/components/display/filter/SearchOrder.vue +35 -35
  49. package/src/components/display/list/ListPaginate.vue +72 -93
  50. package/src/components/display/list/PaginateParams.vue +36 -40
  51. package/src/components/display/list/PaginateSection.vue +113 -124
  52. package/src/components/display/list/SwiperList.vue +97 -109
  53. package/src/components/display/live/CountDown.vue +15 -9
  54. package/src/components/display/live/CountdownOctopus.vue +16 -10
  55. package/src/components/display/live/LiveHorizontalList.vue +95 -103
  56. package/src/components/display/live/LiveItem.vue +64 -73
  57. package/src/components/display/live/LiveList.vue +125 -137
  58. package/src/components/display/live/RadioCurrently.vue +66 -73
  59. package/src/components/display/live/RadioImage.vue +39 -50
  60. package/src/components/display/live/RadioItem.vue +9 -14
  61. package/src/components/display/live/RadioList.vue +39 -53
  62. package/src/components/display/live/RadioPlanning.vue +210 -222
  63. package/src/components/display/organisation/OrganisationChooser.vue +116 -122
  64. package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
  65. package/src/components/display/participant/ParticipantInlineList.vue +42 -58
  66. package/src/components/display/participant/ParticipantItem.vue +66 -74
  67. package/src/components/display/participant/ParticipantList.vue +116 -141
  68. package/src/components/display/playlist/PlaylistItem.vue +33 -46
  69. package/src/components/display/playlist/PlaylistList.vue +115 -144
  70. package/src/components/display/playlist/PodcastList.vue +90 -103
  71. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
  72. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
  73. package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
  74. package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
  75. package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
  76. package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
  77. package/src/components/display/podcasts/PodcastImage.vue +96 -99
  78. package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
  79. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
  80. package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
  81. package/src/components/display/podcasts/PodcastItem.vue +48 -63
  82. package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
  83. package/src/components/display/podcasts/PodcastList.vue +182 -206
  84. package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
  85. package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
  86. package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
  87. package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
  88. package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
  89. package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
  90. package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
  91. package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
  92. package/src/components/display/podcasts/TagList.vue +48 -50
  93. package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
  94. package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
  95. package/src/components/display/rubriques/RubriqueList.vue +140 -160
  96. package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
  97. package/src/components/display/sharing/FormatSwitch.vue +16 -11
  98. package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
  99. package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
  100. package/src/components/display/sharing/PlayerParameters.vue +69 -71
  101. package/src/components/display/sharing/QrCode.vue +55 -67
  102. package/src/components/display/sharing/ShareAnonymous.vue +160 -178
  103. package/src/components/display/sharing/ShareDistribution.vue +103 -117
  104. package/src/components/display/sharing/ShareNewsletter.vue +154 -161
  105. package/src/components/display/sharing/SharePlayer.vue +273 -295
  106. package/src/components/display/sharing/SharePlayerColors.vue +25 -16
  107. package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
  108. package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
  109. package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
  110. package/src/components/display/sharing/SubscribeButtons.vue +184 -207
  111. package/src/components/display/studio/RecordingItemButton.vue +1 -4
  112. package/src/components/form/ClassicCheckbox.vue +26 -30
  113. package/src/components/form/ClassicContentEditable.vue +37 -33
  114. package/src/components/form/ClassicCopyButton.vue +40 -44
  115. package/src/components/form/ClassicDatePicker.vue +114 -114
  116. package/src/components/form/ClassicEmojiPicker.vue +20 -28
  117. package/src/components/form/ClassicInputText.vue +116 -120
  118. package/src/components/form/ClassicLoading.vue +7 -12
  119. package/src/components/form/ClassicMultiselect.vue +115 -117
  120. package/src/components/form/ClassicRadio.vue +21 -16
  121. package/src/components/form/ClassicRadioLabel.vue +23 -22
  122. package/src/components/form/ClassicSearch.vue +24 -19
  123. package/src/components/form/ClassicSelect.vue +47 -38
  124. package/src/components/form/ClassicWysiwyg.vue +116 -123
  125. package/src/components/icons/AmazonMusicIcon.vue +7 -10
  126. package/src/components/icons/ApplePodcastIcon.vue +7 -11
  127. package/src/components/icons/BlueSkyIcon.vue +8 -11
  128. package/src/components/icons/DeezerIcon.vue +8 -11
  129. package/src/components/icons/EditFtpIcon.vue +8 -11
  130. package/src/components/icons/IHeartIcon.vue +8 -11
  131. package/src/components/icons/PlayVideoIcon.vue +7 -10
  132. package/src/components/icons/PlayerFmIcon.vue +7 -10
  133. package/src/components/icons/PocketCastIcon.vue +8 -11
  134. package/src/components/icons/PodcastAddictIcon.vue +7 -10
  135. package/src/components/icons/RadiolineIcon.vue +8 -11
  136. package/src/components/icons/TuninIcon.vue +8 -11
  137. package/src/components/icons/XIcon.vue +7 -10
  138. package/src/components/misc/AcpmImage.vue +6 -7
  139. package/src/components/misc/ClassicAccordion.vue +26 -31
  140. package/src/components/misc/ClassicLazy.vue +86 -90
  141. package/src/components/misc/ClassicNav.vue +16 -20
  142. package/src/components/misc/ClassicPopover.vue +271 -282
  143. package/src/components/misc/ClassicSpinner.vue +5 -27
  144. package/src/components/misc/ErrorMessage.vue +11 -12
  145. package/src/components/misc/FooterGarSection.vue +33 -41
  146. package/src/components/misc/FooterSection.vue +94 -131
  147. package/src/components/misc/HomeDropdown.vue +83 -105
  148. package/src/components/misc/MobileMenu.vue +101 -111
  149. package/src/components/misc/ProgressBar.vue +53 -62
  150. package/src/components/misc/TopBar.vue +98 -120
  151. package/src/components/misc/TopBarMainContent.vue +114 -133
  152. package/src/components/misc/modal/ClassicModal.vue +40 -33
  153. package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
  154. package/src/components/misc/modal/ClipboardModal.vue +27 -30
  155. package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
  156. package/src/components/misc/modal/MessageModal.vue +50 -47
  157. package/src/components/misc/modal/NewsletterModal.vue +30 -31
  158. package/src/components/misc/modal/QrCodeModal.vue +21 -21
  159. package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
  160. package/src/components/misc/player/PlayerCompact.vue +6 -4
  161. package/src/components/misc/player/PlayerComponent.vue +8 -9
  162. package/src/components/misc/player/PlayerLarge.vue +9 -8
  163. package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
  164. package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
  165. package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
  166. package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
  167. package/src/components/misc/player/elements/PlayerImage.vue +51 -57
  168. package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
  169. package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
  170. package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
  171. package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
  172. package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
  173. package/src/components/misc/player/radio/RadioHistory.vue +80 -99
  174. package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
  175. package/src/components/misc/player/video/PlayerVideo.vue +27 -40
  176. package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
  177. package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
  178. package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
  179. package/src/components/pages/CategoryPage.vue +28 -33
  180. package/src/components/pages/EmissionPage.vue +113 -132
  181. package/src/components/pages/EmissionsPage.vue +2 -0
  182. package/src/components/pages/Error403Page.vue +21 -20
  183. package/src/components/pages/HomePage.vue +91 -100
  184. package/src/components/pages/LivesPage.vue +35 -37
  185. package/src/components/pages/MapPage.vue +209 -241
  186. package/src/components/pages/PageLogout.vue +8 -11
  187. package/src/components/pages/PageNotFound.vue +9 -5
  188. package/src/components/pages/ParticipantPage.vue +96 -110
  189. package/src/components/pages/ParticipantsPage.vue +3 -0
  190. package/src/components/pages/PlaylistPage.vue +112 -117
  191. package/src/components/pages/PlaylistsPage.vue +9 -2
  192. package/src/components/pages/PodcastPage.vue +224 -238
  193. package/src/components/pages/PodcastsPage.vue +9 -2
  194. package/src/components/pages/RadioPage.vue +56 -70
  195. package/src/components/pages/RubriquePage.vue +7 -3
  196. package/src/components/pages/SearchPage.vue +31 -36
  197. package/src/components/pages/TagPage.vue +11 -9
  198. package/src/components/pages/VideoPage.vue +14 -11
  199. package/src/helper/displayHelper.ts +1 -1
  200. package/src/helper/loadScript.ts +4 -4
  201. package/src/i18n.ts +2 -2
  202. package/src/main.ts +1 -1
  203. package/src/router/router.ts +17 -4
  204. package/src/stores/AuthStore.ts +12 -12
  205. package/src/stores/FilterStore.ts +1 -1
  206. package/src/stores/VastStore.ts +2 -2
  207. package/src/stores/class/general/player.ts +1 -0
  208. package/public/css/fonts/icomoon.eot +0 -0
  209. package/public/css/fonts/icomoon.svg +0 -113
  210. package/public/css/fonts/icomoon.ttf +0 -0
  211. package/public/css/fonts/icomoon.woff +0 -0
  212. package/public/css/fonts/icomoon.woff2 +0 -0
  213. package/public/css/fonts/style.css +0 -352
  214. package/sonarqube-scanner.js +0 -10
@@ -15,41 +15,43 @@
15
15
  :query="query"
16
16
  :last-three-months="lastThreeMonths"
17
17
  :title-tag="titleTag"
18
- @update:is-arrow="$emit('update:isArrow', $event)"
18
+ @update:is-arrow="updateArrow($event)"
19
19
  />
20
20
  </template>
21
21
 
22
- <script lang="ts">
23
- import { defineAsyncComponent, defineComponent } from "vue";
22
+ <script setup lang="ts">
23
+ import { defineAsyncComponent } from "vue";
24
24
  const PodcastSwiperList = defineAsyncComponent(
25
25
  () => import("./PodcastSwiperList.vue"),
26
26
  );
27
- export default defineComponent({
28
- name: "PodcastInlineList",
29
27
 
30
- components: {
31
- PodcastSwiperList,
32
- },
33
- props: {
34
- organisationId: { default: () => [], type: Array as () => Array<string> },
35
- emissionId: { default: undefined, type: Number },
36
- iabId: { default: undefined, type: Number },
37
- title: { default: "", type: String },
38
- href: { default: undefined, type: String },
39
- buttonText: { default: undefined, type: String },
40
- isArrow: { default: false, type: Boolean },
41
- requirePopularSort: { default: undefined, type: Boolean },
42
- buttonPlus: { default: false, type: Boolean },
43
- rubriqueId: { default: () => [], type: Array as () => Array<number> },
44
- rubriquageId: { default: () => [], type: Array as () => Array<number> },
45
- noRubriquageId: { default: () => [], type: Array as () => Array<number> },
46
- query: { default: undefined, type: String },
47
- podcastId: { default: undefined, type: Number },
48
- lastThreeMonths: { default: false, type: Boolean },
49
- titleTag: { default: "h2", type: String },
50
- },
51
- emits: ["update:isArrow"],
52
- });
28
+ //Props
29
+ defineProps({
30
+ organisationId: { default: () => [], type: Array as () => Array<string> },
31
+ emissionId: { default: undefined, type: Number },
32
+ iabId: { default: undefined, type: Number },
33
+ title: { default: "", type: String },
34
+ href: { default: undefined, type: String },
35
+ buttonText: { default: undefined, type: String },
36
+ isArrow: { default: false, type: Boolean },
37
+ requirePopularSort: { default: undefined, type: Boolean },
38
+ buttonPlus: { default: false, type: Boolean },
39
+ rubriqueId: { default: () => [], type: Array as () => Array<number> },
40
+ rubriquageId: { default: () => [], type: Array as () => Array<number> },
41
+ noRubriquageId: { default: () => [], type: Array as () => Array<number> },
42
+ query: { default: undefined, type: String },
43
+ podcastId: { default: undefined, type: Number },
44
+ lastThreeMonths: { default: false, type: Boolean },
45
+ titleTag: { default: "h2", type: String },
46
+ })
47
+
48
+ //Emits
49
+ const emit = defineEmits(["update:isArrow"]);
50
+
51
+ //Methods
52
+ function updateArrow(value: boolean){
53
+ emit("update:isArrow", value);
54
+ }
53
55
  </script>
54
56
  <style lang="scss">
55
57
  .octopus-app .loading-size {
@@ -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