@saooti/octopus-sdk 32.0.0 → 32.0.3

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 (75) hide show
  1. package/README.md +6 -1
  2. package/package.json +1 -1
  3. package/src/App.vue +1 -1
  4. package/src/assets/multiselect.scss +11 -0
  5. package/src/components/display/comments/AddCommentModal.vue +1 -3
  6. package/src/components/display/comments/CommentInput.vue +14 -30
  7. package/src/components/display/comments/CommentItem.vue +10 -13
  8. package/src/components/display/comments/CommentList.vue +7 -14
  9. package/src/components/display/comments/CommentPlayer.vue +1 -4
  10. package/src/components/display/edit/EditCommentBox.vue +1 -1
  11. package/src/components/display/emission/EmissionChooser.vue +4 -18
  12. package/src/components/display/emission/EmissionInlineList.vue +1 -6
  13. package/src/components/display/emission/EmissionItem.vue +3 -10
  14. package/src/components/display/emission/EmissionList.vue +6 -13
  15. package/src/components/display/emission/EmissionPlayerItem.vue +3 -11
  16. package/src/components/display/filter/AdvancedSearch.vue +5 -13
  17. package/src/components/display/filter/RubriqueFilter.vue +1 -3
  18. package/src/components/display/list/ListPaginate.vue +1 -6
  19. package/src/components/display/live/LiveItem.vue +6 -17
  20. package/src/components/display/live/LiveList.vue +12 -16
  21. package/src/components/display/organisation/OrganisationChooser.vue +2 -6
  22. package/src/components/display/organisation/OrganisationChooserLight.vue +1 -5
  23. package/src/components/display/participant/ParticipantItem.vue +4 -9
  24. package/src/components/display/participant/ParticipantList.vue +1 -3
  25. package/src/components/display/playlist/PlaylistItem.vue +6 -16
  26. package/src/components/display/playlist/PlaylistList.vue +2 -5
  27. package/src/components/display/playlist/PodcastList.vue +3 -7
  28. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +2 -9
  29. package/src/components/display/podcasts/AnimatorsItem.vue +1 -1
  30. package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
  31. package/src/components/display/podcasts/PodcastFilterList.vue +1 -1
  32. package/src/components/display/podcasts/PodcastImage.vue +12 -25
  33. package/src/components/display/podcasts/PodcastInlineListClassic.vue +2 -8
  34. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +2 -2
  35. package/src/components/display/podcasts/PodcastItem.vue +2 -5
  36. package/src/components/display/podcasts/PodcastItemInfo.vue +2 -7
  37. package/src/components/display/podcasts/PodcastList.vue +5 -13
  38. package/src/components/display/podcasts/PodcastModuleBox.vue +7 -22
  39. package/src/components/display/podcasts/PodcastPlayBar.vue +3 -4
  40. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -3
  41. package/src/components/display/rubriques/RubriqueChooser.vue +4 -15
  42. package/src/components/display/rubriques/RubriqueList.vue +2 -2
  43. package/src/components/display/sharing/QrCode.vue +1 -1
  44. package/src/components/display/sharing/ShareButtons.vue +4 -0
  45. package/src/components/display/sharing/ShareButtonsIntern.vue +5 -1
  46. package/src/components/display/sharing/ShareDistribution.vue +26 -95
  47. package/src/components/display/sharing/SharePlayer.vue +6 -14
  48. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  49. package/src/components/display/sharing/SubscribeButtons.vue +3 -5
  50. package/src/components/form/ClassicSearch.vue +2 -2
  51. package/src/components/form/ClassicSelect.vue +1 -1
  52. package/src/components/misc/Footer.vue +2 -2
  53. package/src/components/misc/LeftMenu.vue +3 -3
  54. package/src/components/misc/TopBar.vue +7 -11
  55. package/src/components/misc/modal/ClipboardModal.vue +4 -0
  56. package/src/components/misc/modal/MessageModal.vue +6 -0
  57. package/src/components/misc/modal/NewsletterModal.vue +140 -128
  58. package/src/components/misc/modal/QrCodeModal.vue +4 -0
  59. package/src/components/misc/modal/ShareModalPlayer.vue +4 -0
  60. package/src/components/misc/player/Player.vue +1 -1
  61. package/src/components/misc/player/PlayerCompact.vue +1 -1
  62. package/src/components/misc/player/PlayerTimeline.vue +0 -5
  63. package/src/components/pages/Emission.vue +14 -33
  64. package/src/components/pages/Emissions.vue +6 -15
  65. package/src/components/pages/Home.vue +1 -4
  66. package/src/components/pages/Lives.vue +3 -11
  67. package/src/components/pages/PageNotFound.vue +2 -2
  68. package/src/components/pages/Participant.vue +8 -23
  69. package/src/components/pages/Participants.vue +3 -6
  70. package/src/components/pages/Playlist.vue +7 -13
  71. package/src/components/pages/Playlists.vue +4 -5
  72. package/src/components/pages/Podcast.vue +15 -51
  73. package/src/components/pages/Podcasts.vue +7 -16
  74. package/src/components/pages/Search.vue +3 -6
  75. package/public/img/article.png +0 -0
@@ -96,10 +96,7 @@ export default defineComponent({
96
96
  },
97
97
  computed: {
98
98
  titleDisplay(): string{
99
- if(undefined === state.intervenantPage.titlePage){
100
- return this.$t('Animator');
101
- }
102
- return state.intervenantPage.titlePage;
99
+ return state.intervenantPage.titlePage??this.$t('Animator');
103
100
  },
104
101
  pageParameters(){
105
102
  return {
@@ -109,30 +106,18 @@ export default defineComponent({
109
106
  };
110
107
  },
111
108
  rssUrl(): string {
112
- return state.generalParameters.ApiUri + 'rss/participant/' + this.participantId;
109
+ return `${state.generalParameters.ApiUri}rss/participant/${this.participantId}`;
113
110
  },
114
111
  description(): string {
115
- if(!this.participant){return '';}
116
- return this.participant.description || '';
112
+ return this.participant?.description ?? '';
117
113
  },
118
114
  name(): string {
119
- if(!this.participant){return '';}
120
- return (
121
- (this.participant.firstName || '') +
122
- ' ' +
123
- (this.participant.lastName || '')
124
- ).trim();
115
+ return (`${this.participant?.firstName??''} ${this.participant?.lastName??''}`).trim();
125
116
  },
126
117
  editRight(): boolean {
127
- if(!this.participant || !this.participant.orga ){return false;}
128
- if (
129
- (this.authenticated &&
130
- this.myOrganisationId === this.participant.orga.id) ||
131
- state.generalParameters.isAdmin
132
- ){
133
- return true;
134
- }
135
- return false;
118
+ return (true===this.authenticated &&
119
+ this.myOrganisationId === this.participant?.orga?.id) ||
120
+ true===state.generalParameters.isAdmin
136
121
  },
137
122
  },
138
123
  watch: {
@@ -158,7 +143,7 @@ export default defineComponent({
158
143
  this.loaded = false;
159
144
  try {
160
145
  const data = await octopusApi.fetchData<Participant>(0, 'participant/'+this.participantId);
161
- if(data && data.orga && "PUBLIC"!==data.orga.privacy && this.filterOrga!==data.orga.id){
146
+ if("PUBLIC"!==data?.orga?.privacy && this.filterOrga!==data?.orga?.id){
162
147
  this.initError();
163
148
  return;
164
149
  }
@@ -37,20 +37,17 @@ export default defineComponent({
37
37
  return {
38
38
  first: 0 as number,
39
39
  size: 30 as number,
40
- searchPattern: '',
40
+ searchPattern: '' as string,
41
41
  organisationId: undefined as string | undefined,
42
42
  };
43
43
  },
44
44
  computed: {
45
45
  titleDisplay(): string{
46
- if(undefined === state.intervenantsPage.titlePage){
47
- return this.$t('All participants');
48
- }
49
- return state.intervenantsPage.titlePage;
46
+ return state.intervenantsPage.titlePage ?? this.$t('All participants');
50
47
  },
51
48
  },
52
49
  created() {
53
- this.organisationId = this.productor? this.productor : this.filterOrga;
50
+ this.organisationId = this.productor??this.filterOrga;
54
51
  },
55
52
  })
56
53
  </script>
@@ -34,7 +34,7 @@
34
34
  :organisation-id="myOrganisationId"
35
35
  :is-education="isEducation"
36
36
  />
37
- <ShareButtons v-if="pageParameters.isShareButtons" />
37
+ <ShareButtons v-if="pageParameters.isShareButtons" :playlist="playlist" />
38
38
  </div>
39
39
  </div>
40
40
  <PodcastList :playlist="playlist" />
@@ -92,24 +92,19 @@ export default defineComponent({
92
92
  };
93
93
  },
94
94
  name(): string {
95
- return this.playlist ? this.playlist.title : '';
95
+ return this.playlist?.title ??'';
96
96
  },
97
97
  imageUrl(): string {
98
98
  const dummy = new Date().getTime().toString();
99
99
  return this.playlist ? this.playlist.imageUrl + '?dummy=' + dummy : '';
100
100
  },
101
101
  description(): string {
102
- return this.playlist ? this.playlist.description : '';
102
+ return this.playlist?.description ??'';
103
103
  },
104
104
  editRight(): boolean {
105
- if (
106
- (state.generalParameters.isPlaylist && this.playlist &&
107
- this.myOrganisationId === this.playlist.organisation?.id) ||
108
- state.generalParameters.isAdmin
109
- ){
110
- return true;
111
- }
112
- return false;
105
+ return (true===state.generalParameters.isPlaylist &&
106
+ this.myOrganisationId === this.playlist?.organisation?.id) ||
107
+ true ===state.generalParameters.isAdmin
113
108
  },
114
109
  },
115
110
  watch: {
@@ -130,8 +125,7 @@ export default defineComponent({
130
125
  try {
131
126
  this.loaded = false;
132
127
  this.error = false;
133
- const data: Playlist = await octopusApi.fetchData<Playlist>(0, 'playlist/'+this.playlistId);
134
- this.playlist = data;
128
+ this.playlist = await octopusApi.fetchData<Playlist>(0, 'playlist/'+this.playlistId);
135
129
  if("PUBLIC"!==this.playlist.organisation?.privacy && this.filterOrga!==this.playlist.organisation?.id){
136
130
  this.initError();
137
131
  return;
@@ -6,9 +6,9 @@
6
6
  to="/main/priv/edit/playlist"
7
7
  class="d-flex justify-content-center my-3"
8
8
  >
9
- <button class="btn btn-primary">
9
+ <div class="btn btn-primary">
10
10
  {{ $t('Create playlist') }}
11
- </button>
11
+ </div>
12
12
  </router-link>
13
13
  <ProductorSearch
14
14
  v-if="isProductorSearch"
@@ -61,13 +61,12 @@ export default defineComponent({
61
61
  return (state.generalParameters.podcastmaker as boolean);
62
62
  },
63
63
  editRight(): boolean {
64
- if (state.generalParameters.isPlaylist) return true;
65
- return false;
64
+ return state.generalParameters.isPlaylist ? true : false;
66
65
  },
67
66
  },
68
67
 
69
68
  created() {
70
- this.organisationId = this.productor ? this.productor : this.filterOrga;
69
+ this.organisationId = this.productor ??this.filterOrga;
71
70
  },
72
71
  })
73
72
  </script>
@@ -161,15 +161,9 @@ export default defineComponent({
161
161
  },
162
162
  emissionMainCategory(): number {
163
163
  if(!this.podcast){return 0;}
164
- if (
165
- this.podcast.emission.annotations &&
166
- this.podcast.emission.annotations.mainIabId
167
- ) {
164
+ if (this.podcast.emission.annotations?.mainIabId) {
168
165
  return parseInt((this.podcast.emission.annotations.mainIabId as string), 10);
169
- } else if (
170
- this.podcast.emission.iabIds &&
171
- this.podcast.emission.iabIds.length
172
- ) {
166
+ } else if (this.podcast.emission.iabIds?.length) {
173
167
  return this.podcast.emission.iabIds[0];
174
168
  }
175
169
  return 0;
@@ -178,8 +172,7 @@ export default defineComponent({
178
172
  if ('undefined' === typeof this.podcast) return [];
179
173
  return this.$store.state.categories
180
174
  .filter((item: Category) => {
181
- return ( this.podcast &&
182
- this.podcast.emission.iabIds &&
175
+ return ( this.podcast?.emission.iabIds &&
183
176
  -1 !== this.podcast.emission.iabIds.indexOf(item.id)
184
177
  );
185
178
  })
@@ -190,34 +183,19 @@ export default defineComponent({
190
183
  });
191
184
  },
192
185
  editRight(): boolean {
193
- if ( this.podcast &&
194
- (this.authenticated &&
195
- this.myOrganisationId === this.podcast.organisation.id) ||
196
- state.generalParameters.isAdmin
197
- ){
198
- return true;
199
- }
200
- return false;
186
+ return (true ===this.authenticated &&this.myOrganisationId === this.podcast?.organisation.id) ||true===state.generalParameters.isAdmin;
201
187
  },
202
188
  countLink(): number {
189
+ const platformShare = ['amazon','googlePodcasts','applePodcast', 'deezer', 'spotify', 'tunein',
190
+ 'radioline', 'podcastAddict', 'playerFm', 'stitcher', 'pocketCasts'];
203
191
  let count = 0;
204
- if (this.podcast && this.podcast.emission && this.podcast.emission.annotations) {
205
- if (undefined !== this.podcast.emission.annotations.amazon) count++;
206
- if (undefined !== this.podcast.emission.annotations.googlePodcasts) count++;
207
- if (undefined !== this.podcast.emission.annotations.applePodcast)count++;
208
- if (undefined !== this.podcast.emission.annotations.deezer) count++;
209
- if (undefined !== this.podcast.emission.annotations.spotify) count++;
210
- if (undefined !== this.podcast.emission.annotations.tunein) count++;
211
- if (undefined !== this.podcast.emission.annotations.radioline) count++;
212
- if (undefined !== this.podcast.emission.annotations.podcastAddict) count++;
213
- if (undefined !== this.podcast.emission.annotations.playerFm) count++;
214
- if (undefined !== this.podcast.emission.annotations.stitcher) count++;
215
- if (undefined !== this.podcast.emission.annotations.pocketCasts) count++;
192
+ for (let i = 0, len = platformShare.length; i < len; i++) {
193
+ if (undefined !== this.podcast?.emission?.annotations?.[platformShare[i]]) count++;
216
194
  }
217
195
  return count;
218
196
  },
219
197
  isLiveReadyToRecord(): boolean {
220
- return (undefined!==this.podcast && undefined!==this.podcast.conferenceId && 0 !== this.podcast.conferenceId && 'READY_TO_RECORD' === this.podcast.processingStatus);
198
+ return (undefined!==this.podcast?.conferenceId && 0 !== this.podcast?.conferenceId && 'READY_TO_RECORD' === this.podcast?.processingStatus);
221
199
  },
222
200
  isCounter(): boolean {
223
201
  return (
@@ -242,12 +220,10 @@ export default defineComponent({
242
220
  );
243
221
  },
244
222
  titlePage(): string {
245
- if (this.isLiveReadyToRecord) return this.$t('Live episode').toString();
246
- return this.$t('Episode').toString();
223
+ return this.isLiveReadyToRecord ?this.$t('Live episode'): this.$t('Episode');
247
224
  },
248
225
  timeRemaining(): string {
249
- if(!this.podcast){return "";}
250
- return moment(this.podcast.pubDate).diff(moment(), 'seconds').toString();
226
+ return !this.podcast ? "":moment(this.podcast.pubDate).diff(moment(), 'seconds').toString();
251
227
  },
252
228
  },
253
229
  watch: {
@@ -297,26 +273,14 @@ export default defineComponent({
297
273
  },
298
274
  handleAnnotations(){
299
275
  if(!this.podcast){return;}
300
- if (
301
- this.podcast.emission.annotations &&
302
- this.podcast.emission.annotations.exclusive
303
- ) {
304
- this.exclusive =
305
- 'true' === this.podcast.emission.annotations.exclusive
306
- ? true
307
- : false;
276
+ if (this.podcast.emission.annotations?.exclusive) {
277
+ this.exclusive ='true' === this.podcast.emission.annotations.exclusive;
308
278
  this.exclusive =
309
279
  this.exclusive &&
310
280
  this.myOrganisationId !== this.podcast.organisation.id;
311
281
  }
312
- if (
313
- this.podcast.emission.annotations &&
314
- this.podcast.emission.annotations.notExclusive
315
- ) {
316
- this.notExclusive =
317
- 'true' === this.podcast.emission.annotations.notExclusive
318
- ? true
319
- : false;
282
+ if (this.podcast.emission.annotations?.notExclusive) {
283
+ this.notExclusive ='true' === this.podcast.emission.annotations.notExclusive;
320
284
  }
321
285
  },
322
286
  async getPodcastDetails(): Promise<void> {
@@ -110,23 +110,14 @@ export default defineComponent({
110
110
 
111
111
  computed: {
112
112
  titleDisplay(): string{
113
- if(undefined === state.podcastsPage.titlePage){
114
- return this.$t('All podcasts');
115
- }
116
- return state.podcastsPage.titlePage;
113
+ return state.podcastsPage.titlePage ?? this.$t('All podcasts');
117
114
  },
118
115
  organisationRight(): boolean {
119
- if (
120
- (this.authenticated && this.myOrganisationId === this.organisationId) ||
121
- state.generalParameters.isAdmin
122
- )
123
- return true;
124
- return false;
116
+ return (true===this.authenticated && this.myOrganisationId === this.organisationId) ||
117
+ true===state.generalParameters.isAdmin;
125
118
  },
126
119
  organisation(): string|undefined {
127
- if (this.organisationId) return this.organisationId;
128
- if (this.filterOrga) return this.filterOrga;
129
- return undefined;
120
+ return this.organisationId ?? this.filterOrga;
130
121
  },
131
122
  pageParameters(){
132
123
  return {
@@ -142,10 +133,10 @@ export default defineComponent({
142
133
 
143
134
  methods: {
144
135
  initPodcastsPage(){
145
- this.searchPattern = this.searchInit ? this.searchInit : '';
146
- this.organisationId = this.productor ? this.productor : this.filterOrga;
136
+ this.searchPattern = this.searchInit ?? '';
137
+ this.organisationId = this.productor ?? this.filterOrga;
147
138
  this.includeHidden = this.organisation && this.organisationRight ? true : false;
148
- this.iabId = this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined;
139
+ this.iabId =this.$store.state.filter.iab?.id;
149
140
  if(this.$store.state.filter.rubriqueFilter.length){
150
141
  this.updateRubriquageFilter(this.$store.state.filter.rubriqueFilter);
151
142
  }
@@ -43,14 +43,11 @@ export default defineComponent({
43
43
  if(!this.hideBar){
44
44
  return this.$t('Podcast search');
45
45
  }
46
- if(!this.noResult){
47
- return this.$t('Search results', { query: this.rawQuery })
48
- }
49
- return this.$t('Search - no results', { query: this.rawQuery });
46
+ const locale = !this.noResult ? 'Search results' : 'Search - no results';
47
+ return this.$t(locale, { query: this.rawQuery });
50
48
  },
51
49
  query(): string {
52
- if (this.rawQuery && this.rawQuery.length >= 3) return this.rawQuery;
53
- return '';
50
+ return this.rawQuery && this.rawQuery.length >= 3 ? this.rawQuery : '';
54
51
  },
55
52
  hideBar(): boolean {
56
53
  return (state.searchPage.hideBar as boolean);
Binary file