@saooti/octopus-sdk 37.0.6 → 37.0.8

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 (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -4,23 +4,19 @@
4
4
  v-model:first="dfirst"
5
5
  v-model:rowsPerPage="dsize"
6
6
  v-model:isMobile="isMobile"
7
- :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })}`: undefined"
7
+ :text-count="
8
+ displayCount > 1
9
+ ? `${$t('Number playlists', { nb: displayCount })}`
10
+ : undefined
11
+ "
8
12
  :total-count="totalCount"
9
13
  :loading="loading"
10
- :loading-text="loading?$t('Loading content ...'):undefined"
14
+ :loading-text="loading ? $t('Loading content ...') : undefined"
11
15
  >
12
16
  <template #list>
13
- <div
14
- class="emission-list two-emissions"
15
- >
16
- <template
17
- v-for="p in displayArray"
18
- :key="p.playlistId"
19
- >
20
- <PlaylistItem
21
- v-if="0!==p.playlistId"
22
- :playlist="p"
23
- />
17
+ <div class="emission-list two-emissions">
18
+ <template v-for="p in displayArray" :key="p.playlistId">
19
+ <PlaylistItem v-if="0 !== p.playlistId" :playlist="p" />
24
20
  </template>
25
21
  </div>
26
22
  </template>
@@ -28,21 +24,21 @@
28
24
  </template>
29
25
 
30
26
  <script lang="ts">
31
- import ListPaginate from '../list/ListPaginate.vue';
32
- import { handle403 } from '../../mixins/handle403';
33
- import octopusApi from '@saooti/octopus-api';
34
- import PlaylistItem from './PlaylistItem.vue';
35
- import { Playlist, emptyPlaylistData } from '@/stores/class/general/playlist';
36
- import { useFilterStore } from '@/stores/FilterStore';
37
- import { mapState } from 'pinia';
38
- import { defineComponent } from 'vue';
39
- import { AxiosError } from 'axios';
27
+ import ListPaginate from "../list/ListPaginate.vue";
28
+ import { handle403 } from "../../mixins/handle403";
29
+ import octopusApi from "@saooti/octopus-api";
30
+ import PlaylistItem from "./PlaylistItem.vue";
31
+ import { Playlist, emptyPlaylistData } from "@/stores/class/general/playlist";
32
+ import { useFilterStore } from "@/stores/FilterStore";
33
+ import { mapState } from "pinia";
34
+ import { defineComponent } from "vue";
35
+ import { AxiosError } from "axios";
40
36
  export default defineComponent({
41
- name: 'PlaylistList',
37
+ name: "PlaylistList",
42
38
 
43
39
  components: {
44
40
  PlaylistItem,
45
- ListPaginate
41
+ ListPaginate,
46
42
  },
47
43
 
48
44
  mixins: [handle403],
@@ -50,8 +46,8 @@ export default defineComponent({
50
46
  props: {
51
47
  first: { default: 0, type: Number },
52
48
  size: { default: 30, type: Number },
53
- query: { default: undefined, type: String},
54
- organisationId: { default: undefined, type: String},
49
+ query: { default: undefined, type: String },
50
+ organisationId: { default: undefined, type: String },
55
51
  },
56
52
 
57
53
  data() {
@@ -65,44 +61,50 @@ export default defineComponent({
65
61
  isMobile: false as boolean,
66
62
  };
67
63
  },
68
-
64
+
69
65
  computed: {
70
- ...mapState(useFilterStore, ['filterOrgaId']),
71
- displayArray(): Array<Playlist>{
72
- if(this.isMobile){
66
+ ...mapState(useFilterStore, ["filterOrgaId"]),
67
+ displayArray(): Array<Playlist> {
68
+ if (this.isMobile) {
73
69
  return this.playlists;
74
70
  }
75
- return this.playlists.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
76
- },
71
+ return this.playlists.slice(
72
+ this.dfirst,
73
+ Math.min(this.dfirst + this.dsize, this.totalCount),
74
+ );
75
+ },
77
76
  changed(): string {
78
77
  return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
79
78
  },
80
79
  sort(): string {
81
- return !this.query ?'NAME': 'SCORE';
80
+ return !this.query ? "NAME" : "SCORE";
82
81
  },
83
- organisation(): string|undefined {
84
- return this.organisationId ?this.organisationId: this.filterOrgaId;
82
+ organisation(): string | undefined {
83
+ return this.organisationId ? this.organisationId : this.filterOrgaId;
85
84
  },
86
85
  },
87
86
  watch: {
88
87
  changed(): void {
89
88
  this.reloadList();
90
89
  },
91
- dsize():void{
90
+ dsize(): void {
92
91
  this.reloadList();
93
- },
94
- dfirst(): void{
95
- if(!this.playlists[this.dfirst] || 0===this.playlists[this.dfirst].playlistId){
96
- this.fetchContent(false);
97
- }
98
- },
92
+ },
93
+ dfirst(): void {
94
+ if (
95
+ !this.playlists[this.dfirst] ||
96
+ 0 === this.playlists[this.dfirst].playlistId
97
+ ) {
98
+ this.fetchContent(false);
99
+ }
100
+ },
99
101
  },
100
102
 
101
103
  mounted() {
102
104
  this.fetchContent(true);
103
105
  },
104
106
  methods: {
105
- reloadList(){
107
+ reloadList() {
106
108
  this.dfirst = 0;
107
109
  this.fetchContent(true);
108
110
  },
@@ -113,22 +115,33 @@ export default defineComponent({
113
115
  size: this.dsize,
114
116
  query: this.query,
115
117
  organisationId: this.organisation,
116
- type:"NONE",
118
+ type: "NONE",
117
119
  sort: this.sort,
118
120
  };
119
121
  try {
120
- const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Playlist>;sort: string;}>(0, 'playlist/search',param, true);
122
+ const data = await octopusApi.fetchDataWithParams<{
123
+ count: number;
124
+ result: Array<Playlist>;
125
+ sort: string;
126
+ }>(0, "playlist/search", param, true);
121
127
  this.afterFetching(reset, data);
122
128
  } catch (error) {
123
- this.handle403((error as AxiosError));
129
+ this.handle403(error as AxiosError);
124
130
  }
125
131
  },
126
- afterFetching(reset: boolean, data: {count: number, result: Array<Playlist>, sort: string}): void {
132
+ afterFetching(
133
+ reset: boolean,
134
+ data: { count: number; result: Array<Playlist>; sort: string },
135
+ ): void {
127
136
  if (reset) {
128
137
  this.playlists.length = 0;
129
138
  }
130
- if(this.dfirst > this.playlists.length){
131
- for (let i = this.playlists.length-1, len = this.dfirst + this.dsize; i < len; i++) {
139
+ if (this.dfirst > this.playlists.length) {
140
+ for (
141
+ let i = this.playlists.length - 1, len = this.dfirst + this.dsize;
142
+ i < len;
143
+ i++
144
+ ) {
132
145
  this.playlists.push(emptyPlaylistData());
133
146
  }
134
147
  }
@@ -139,7 +152,12 @@ export default defineComponent({
139
152
  }
140
153
  return null !== e;
141
154
  });
142
- this.playlists = this.playlists.slice(0, this.dfirst).concat(responsePlaylists).concat(this.playlists.slice(this.dfirst+this.dsize, this.playlists.length));
155
+ this.playlists = this.playlists
156
+ .slice(0, this.dfirst)
157
+ .concat(responsePlaylists)
158
+ .concat(
159
+ this.playlists.slice(this.dfirst + this.dsize, this.playlists.length),
160
+ );
143
161
  this.totalCount = data.count;
144
162
  this.loading = false;
145
163
  },
@@ -147,5 +165,5 @@ export default defineComponent({
147
165
  this.fetchContent(false);
148
166
  },
149
167
  },
150
- })
151
- </script>
168
+ });
169
+ </script>
@@ -15,24 +15,24 @@
15
15
  v-model:first="first"
16
16
  v-model:rowsPerPage="size"
17
17
  v-model:isMobile="isMobile"
18
- :text-count="podcasts.length > 1 ? `${$t('Number podcasts', { nb: podcasts.length })}` : undefined"
18
+ :text-count="
19
+ podcasts.length > 1
20
+ ? `${$t('Number podcasts', { nb: podcasts.length })}`
21
+ : undefined
22
+ "
19
23
  :total-count="podcasts.length"
20
24
  :loading="loading"
21
- :loading-text="loading?$t('Loading podcasts ...'):undefined"
22
- :error-text="!loading && !podcasts.length && notEmptyPlaylist?$t(`No podcast match your query`):undefined"
25
+ :loading-text="loading ? $t('Loading podcasts ...') : undefined"
26
+ :error-text="
27
+ !loading && !podcasts.length && notEmptyPlaylist
28
+ ? $t(`No podcast match your query`)
29
+ : undefined
30
+ "
23
31
  >
24
32
  <template #list>
25
- <div
26
- class="podcast-list"
27
- >
28
- <template
29
- v-for="p in podcastsDisplay"
30
- :key="p.podcastId"
31
- >
32
- <PodcastItem
33
- v-if="0!==p.podcastId"
34
- :podcast="p"
35
- />
33
+ <div class="podcast-list">
34
+ <template v-for="p in podcastsDisplay" :key="p.podcastId">
35
+ <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
36
36
  </template>
37
37
  </div>
38
38
  </template>
@@ -41,30 +41,30 @@
41
41
  </template>
42
42
 
43
43
  <script lang="ts">
44
- import ListPaginate from '../list/ListPaginate.vue';
45
- import { handle403 } from '../../mixins/handle403';
46
- import { orgaComputed } from '../../mixins/orgaComputed';
47
- import octopusApi from '@saooti/octopus-api';
48
- import PodcastItem from '../podcasts/PodcastItem.vue';
49
- import { state } from '../../../stores/ParamSdkStore';
50
- import ClassicSearch from '../../form/ClassicSearch.vue';
51
- import { Podcast } from '@/stores/class/general/podcast';
52
- import { Playlist } from '@/stores/class/general/playlist';
53
- import { defineComponent } from 'vue'
54
- import { AxiosError } from 'axios';
44
+ import ListPaginate from "../list/ListPaginate.vue";
45
+ import { handle403 } from "../../mixins/handle403";
46
+ import { orgaComputed } from "../../mixins/orgaComputed";
47
+ import octopusApi from "@saooti/octopus-api";
48
+ import PodcastItem from "../podcasts/PodcastItem.vue";
49
+ import { state } from "../../../stores/ParamSdkStore";
50
+ import ClassicSearch from "../../form/ClassicSearch.vue";
51
+ import { Podcast } from "@/stores/class/general/podcast";
52
+ import { Playlist } from "@/stores/class/general/playlist";
53
+ import { defineComponent } from "vue";
54
+ import { AxiosError } from "axios";
55
55
  export default defineComponent({
56
- name: 'PodcastList',
56
+ name: "PodcastList",
57
57
 
58
58
  components: {
59
59
  PodcastItem,
60
60
  ClassicSearch,
61
- ListPaginate
61
+ ListPaginate,
62
62
  },
63
63
 
64
64
  mixins: [handle403, orgaComputed],
65
65
 
66
66
  props: {
67
- playlist: { default: ()=>({}), type: Object as ()=>Playlist},
67
+ playlist: { default: () => ({}), type: Object as () => Playlist },
68
68
  },
69
69
 
70
70
  data() {
@@ -74,34 +74,43 @@ export default defineComponent({
74
74
  podcastsQuery: [] as Array<Podcast>,
75
75
  size: 30 as number,
76
76
  first: 0 as number,
77
- searchPattern: '' as string,
77
+ searchPattern: "" as string,
78
78
  isMobile: false as boolean,
79
79
  };
80
80
  },
81
81
 
82
-
83
82
  computed: {
84
- titleList(): string{
85
- return this.notEmptyPlaylist ? this.$t('Podcasts in the playlist') : this.$t('No podcasts in the playlist');
83
+ titleList(): string {
84
+ return this.notEmptyPlaylist
85
+ ? this.$t("Podcasts in the playlist")
86
+ : this.$t("No podcasts in the playlist");
86
87
  },
87
88
  notEmptyPlaylist(): boolean {
88
- return 0 !== Object.keys(this.playlist.samplingViews??[]).length;
89
+ return 0 !== Object.keys(this.playlist.samplingViews ?? []).length;
89
90
  },
90
- podcastsDisplay(): Array<Podcast>{
91
- if(this.isMobile){
92
- return this.podcastsQuery.slice(0, Math.min(this.first + this.size,this.podcasts.length));
91
+ podcastsDisplay(): Array<Podcast> {
92
+ if (this.isMobile) {
93
+ return this.podcastsQuery.slice(
94
+ 0,
95
+ Math.min(this.first + this.size, this.podcasts.length),
96
+ );
93
97
  }
94
- return this.podcastsQuery.slice(this.first, Math.min(this.first + this.size,this.podcasts.length));
95
- },
98
+ return this.podcastsQuery.slice(
99
+ this.first,
100
+ Math.min(this.first + this.size, this.podcasts.length),
101
+ );
102
+ },
96
103
  editRight(): boolean {
97
- return (true===this.authenticated &&
98
- this.myOrganisationId === this.playlist.organisation?.id) ||
99
- true ===state.generalParameters.isAdmin
104
+ return (
105
+ (true === this.authenticated &&
106
+ this.myOrganisationId === this.playlist.organisation?.id) ||
107
+ true === state.generalParameters.isAdmin
108
+ );
100
109
  },
101
110
  },
102
111
  watch: {
103
112
  searchPattern(): void {
104
- if ('' !== this.searchPattern) {
113
+ if ("" !== this.searchPattern) {
105
114
  this.podcastsQuery = this.podcasts.filter((el: Podcast) => {
106
115
  return el.title
107
116
  .toLowerCase()
@@ -118,13 +127,16 @@ export default defineComponent({
118
127
  },
119
128
  methods: {
120
129
  async fetchContent(): Promise<void> {
121
- if (this.notEmptyPlaylist){
130
+ if (this.notEmptyPlaylist) {
122
131
  this.podcasts.length = 0;
123
132
  this.loading = true;
124
133
  try {
125
- this.podcasts = await octopusApi.fetchData<Array<Podcast>>(0, 'playlist/'+this.playlist.playlistId+'/content');
134
+ this.podcasts = await octopusApi.fetchData<Array<Podcast>>(
135
+ 0,
136
+ "playlist/" + this.playlist.playlistId + "/content",
137
+ );
126
138
  if (!this.editRight) {
127
- this.podcasts = this.podcasts.filter((p: Podcast|null) => {
139
+ this.podcasts = this.podcasts.filter((p: Podcast | null) => {
128
140
  return (
129
141
  null !== p &&
130
142
  (!p.availability || true === p.availability.visibility)
@@ -133,18 +145,17 @@ export default defineComponent({
133
145
  }
134
146
  this.podcastsQuery = this.podcasts;
135
147
  } catch (error) {
136
- this.handle403((error as AxiosError));
148
+ this.handle403(error as AxiosError);
137
149
  }
138
150
  }
139
151
  this.loading = false;
140
152
  },
141
153
  },
142
- })
154
+ });
143
155
  </script>
144
156
 
145
-
146
157
  <style lang="scss">
147
- .octopus-app{
158
+ .octopus-app {
148
159
  .width-600 {
149
160
  width: 600px;
150
161
  @media (max-width: 600px) {
@@ -152,4 +163,4 @@ export default defineComponent({
152
163
  }
153
164
  }
154
165
  }
155
- </style>
166
+ </style>
@@ -4,10 +4,7 @@
4
4
  class="d-flex flex-column p-3 playlist-inline-podcast"
5
5
  >
6
6
  <h2>{{ title }}</h2>
7
- <div
8
- v-if="!overflowScroll"
9
- class="d-flex justify-content-end hide-phone"
10
- >
7
+ <div v-if="!overflowScroll" class="d-flex justify-content-end hide-phone">
11
8
  <button
12
9
  class="btn admin-button m-1 saooti-left"
13
10
  :class="{ disabled: !previousAvailable }"
@@ -22,7 +19,7 @@
22
19
  />
23
20
  </div>
24
21
  <ClassicLoading
25
- :loading-text="loading?$t('Loading podcasts ...'):undefined"
22
+ :loading-text="loading ? $t('Loading podcasts ...') : undefined"
26
23
  />
27
24
  <transition-group
28
25
  :name="transitionName"
@@ -49,34 +46,32 @@
49
46
  params: { playlistId: playlistId.toString() },
50
47
  }"
51
48
  >
52
- {{ $t('See more') }}
53
- <div
54
- class="ms-1 saooti-more"
55
- />
49
+ {{ $t("See more") }}
50
+ <div class="ms-1 saooti-more" />
56
51
  </router-link>
57
52
  </div>
58
53
  </template>
59
54
 
60
55
  <script lang="ts">
61
- import octopusApi from '@saooti/octopus-api';
62
- import domHelper from '../../../helper/dom';
63
- import PodcastItem from '../podcasts/PodcastItem.vue';
64
- import ClassicLoading from '../../form/ClassicLoading.vue';
56
+ import octopusApi from "@saooti/octopus-api";
57
+ import domHelper from "../../../helper/dom";
58
+ import PodcastItem from "../podcasts/PodcastItem.vue";
59
+ import ClassicLoading from "../../form/ClassicLoading.vue";
65
60
  const PHONE_WIDTH = 960;
66
- import { state } from '../../../stores/ParamSdkStore';
67
- import { Podcast } from '@/stores/class/general/podcast';
68
- import { Playlist } from '@/stores/class/general/playlist';
69
- import { defineComponent } from 'vue'
61
+ import { state } from "../../../stores/ParamSdkStore";
62
+ import { Podcast } from "@/stores/class/general/podcast";
63
+ import { Playlist } from "@/stores/class/general/playlist";
64
+ import { defineComponent } from "vue";
70
65
  export default defineComponent({
71
- name: 'PodcastPlaylistInlineList',
72
-
66
+ name: "PodcastPlaylistInlineList",
67
+
73
68
  components: {
74
69
  PodcastItem,
75
- ClassicLoading
70
+ ClassicLoading,
76
71
  },
77
72
 
78
73
  props: {
79
- playlistId: { default: undefined, type: Number},
74
+ playlistId: { default: undefined, type: Number },
80
75
  },
81
76
 
82
77
  data() {
@@ -86,27 +81,29 @@ export default defineComponent({
86
81
  first: 0 as number,
87
82
  size: 5 as number,
88
83
  totalCount: 0 as number,
89
- playlist: undefined as Playlist|undefined,
84
+ playlist: undefined as Playlist | undefined,
90
85
  allPodcasts: [] as Array<Podcast>,
91
86
  direction: 1 as number,
92
87
  alignLeft: false as boolean,
93
88
  };
94
89
  },
95
90
  computed: {
96
- title(): string{
97
- return this.playlist?.title??"";
91
+ title(): string {
92
+ return this.playlist?.title ?? "";
98
93
  },
99
94
  podcasts(): Array<Podcast> {
100
95
  return this.allPodcasts.slice(this.index, this.index + this.size);
101
96
  },
102
97
  sizeItem(): number {
103
- return state.generalParameters.podcastItem ? state.generalParameters.podcastItem: 13;
98
+ return state.generalParameters.podcastItem
99
+ ? state.generalParameters.podcastItem
100
+ : 13;
104
101
  },
105
102
  overflowScroll(): boolean {
106
- return (state.emissionPage.overflowScroll as boolean);
103
+ return state.emissionPage.overflowScroll as boolean;
107
104
  },
108
105
  isInlineAnimation(): boolean {
109
- return (state.generalParameters.isInlineAnimation as boolean);
106
+ return state.generalParameters.isInlineAnimation as boolean;
110
107
  },
111
108
  previousAvailable(): boolean {
112
109
  return this.index > 0;
@@ -115,7 +112,7 @@ export default defineComponent({
115
112
  return this.index + this.size < this.totalCount;
116
113
  },
117
114
  transitionName(): string {
118
- return this.direction > 0 ? 'out-left' : 'out-right';
115
+ return this.direction > 0 ? "out-left" : "out-right";
119
116
  },
120
117
  },
121
118
  watch: {
@@ -124,13 +121,13 @@ export default defineComponent({
124
121
  this.fetchContent();
125
122
  },
126
123
  },
127
-
124
+
128
125
  created() {
129
- window.addEventListener('resize', this.handleResize);
126
+ window.addEventListener("resize", this.handleResize);
130
127
  },
131
128
 
132
129
  unmounted() {
133
- window.removeEventListener('resize', this.handleResize);
130
+ window.removeEventListener("resize", this.handleResize);
134
131
  },
135
132
 
136
133
  mounted() {
@@ -141,11 +138,23 @@ export default defineComponent({
141
138
  async fetchContent(): Promise<void> {
142
139
  this.allPodcasts.length = 0;
143
140
  this.loading = true;
144
- this.playlist = await octopusApi.fetchData<Playlist>(0, 'playlist/'+this.playlistId);
145
- this.allPodcasts = await octopusApi.fetchData<Array<Podcast>>(0, 'playlist/'+this.playlistId+'/content');
146
- if (!((state.generalParameters.authenticated && state.generalParameters.organisationId === this.playlist?.organisation?.id) ||
147
- state.generalParameters.isAdmin)) {
148
- this.allPodcasts = this.allPodcasts.filter((p: Podcast|null) => {
141
+ this.playlist = await octopusApi.fetchData<Playlist>(
142
+ 0,
143
+ "playlist/" + this.playlistId,
144
+ );
145
+ this.allPodcasts = await octopusApi.fetchData<Array<Podcast>>(
146
+ 0,
147
+ "playlist/" + this.playlistId + "/content",
148
+ );
149
+ if (
150
+ !(
151
+ (state.generalParameters.authenticated &&
152
+ state.generalParameters.organisationId ===
153
+ this.playlist?.organisation?.id) ||
154
+ state.generalParameters.isAdmin
155
+ )
156
+ ) {
157
+ this.allPodcasts = this.allPodcasts.filter((p: Podcast | null) => {
149
158
  return (
150
159
  null !== p &&
151
160
  (!p.availability || true === p.availability.visibility)
@@ -187,5 +196,5 @@ export default defineComponent({
187
196
  this.allPodcasts.length = 0;
188
197
  },
189
198
  },
190
- })
191
- </script>
199
+ });
200
+ </script>
@@ -18,31 +18,33 @@
18
18
  </template>
19
19
 
20
20
  <script lang="ts">
21
- import { Participant } from '@/stores/class/general/participant';
22
- import { useFilterStore } from '@/stores/FilterStore';
23
- import { mapState } from 'pinia';
24
- import { defineComponent } from 'vue';
21
+ import { Participant } from "@/stores/class/general/participant";
22
+ import { useFilterStore } from "@/stores/FilterStore";
23
+ import { mapState } from "pinia";
24
+ import { defineComponent } from "vue";
25
25
  export default defineComponent({
26
- name: 'AnimatorsItem',
26
+ name: "AnimatorsItem",
27
27
 
28
28
  props: {
29
- animator: { default: undefined, type: Object as ()=> Participant},
29
+ animator: { default: undefined, type: Object as () => Participant },
30
30
  },
31
- computed:{
32
- ...mapState(useFilterStore, ['filterOrgaId']),
33
- animatorName(): string{
34
- return (`${this.animator?.firstName??''} ${this.animator?.lastName??''}`).trim();
35
- }
36
- }
37
- })
31
+ computed: {
32
+ ...mapState(useFilterStore, ["filterOrgaId"]),
33
+ animatorName(): string {
34
+ return `${this.animator?.firstName ?? ""} ${
35
+ this.animator?.lastName ?? ""
36
+ }`.trim();
37
+ },
38
+ },
39
+ });
38
40
  </script>
39
41
 
40
42
  <style lang="scss">
41
- .octopus-app{
43
+ .octopus-app {
42
44
  .podcast-item-animator {
43
45
  font-size: 0.55rem;
44
46
  font-weight: 300;
45
47
  text-transform: capitalize;
46
48
  }
47
49
  }
48
- </style>
50
+ </style>
@@ -1,8 +1,5 @@
1
1
  <template>
2
- <div
3
- v-if="participants.length"
4
- class="comma"
5
- >
2
+ <div v-if="participants.length" class="comma">
6
3
  {{ title }}
7
4
  <span class="mx-1">:</span>
8
5
  <router-link
@@ -23,34 +20,36 @@
23
20
  </template>
24
21
 
25
22
  <script lang="ts">
26
- import { Participant } from '@/stores/class/general/participant';
27
- import { useFilterStore } from '@/stores/FilterStore';
28
- import { mapState } from 'pinia';
29
- import { defineComponent } from 'vue';
23
+ import { Participant } from "@/stores/class/general/participant";
24
+ import { useFilterStore } from "@/stores/FilterStore";
25
+ import { mapState } from "pinia";
26
+ import { defineComponent } from "vue";
30
27
  export default defineComponent({
31
- name: 'ParticipantDescription',
28
+ name: "ParticipantDescription",
32
29
 
33
- components:{
34
- },
30
+ components: {},
35
31
 
36
32
  props: {
37
- participants: { default: () => [], type: Array as ()=> Array<Participant>},
38
- isGuest: { default: false, type: Boolean},
33
+ participants: {
34
+ default: () => [],
35
+ type: Array as () => Array<Participant>,
36
+ },
37
+ isGuest: { default: false, type: Boolean },
39
38
  },
40
39
 
41
- computed:{
42
- ...mapState(useFilterStore, ['filterOrgaId']),
43
- idPopover(): string{
40
+ computed: {
41
+ ...mapState(useFilterStore, ["filterOrgaId"]),
42
+ idPopover(): string {
44
43
  return this.isGuest ? "popover-guests-help" : "popover-animators-help";
45
44
  },
46
- title(): string{
47
- return this.isGuest ? this.$t('Guests') : this.$t('Animated by');
48
- }
45
+ title(): string {
46
+ return this.isGuest ? this.$t("Guests") : this.$t("Animated by");
47
+ },
49
48
  },
50
49
  methods: {
51
50
  getName(person: Participant): string {
52
- return (`${person.firstName??''} ${person.lastName??''}`).trim();
51
+ return `${person.firstName ?? ""} ${person.lastName ?? ""}`.trim();
53
52
  },
54
53
  },
55
- })
56
- </script>
54
+ });
55
+ </script>