@saooti/octopus-sdk 32.0.1 → 32.0.4

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 (72) 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/bootstrap-diff.scss +1 -0
  5. package/src/assets/multiselect.scss +11 -0
  6. package/src/components/display/comments/AddCommentModal.vue +1 -3
  7. package/src/components/display/comments/CommentInput.vue +14 -30
  8. package/src/components/display/comments/CommentItem.vue +5 -12
  9. package/src/components/display/comments/CommentList.vue +7 -14
  10. package/src/components/display/comments/CommentPlayer.vue +1 -4
  11. package/src/components/display/edit/EditCommentBox.vue +1 -1
  12. package/src/components/display/emission/EmissionChooser.vue +4 -18
  13. package/src/components/display/emission/EmissionInlineList.vue +1 -6
  14. package/src/components/display/emission/EmissionItem.vue +3 -10
  15. package/src/components/display/emission/EmissionList.vue +6 -13
  16. package/src/components/display/emission/EmissionPlayerItem.vue +3 -11
  17. package/src/components/display/filter/AdvancedSearch.vue +5 -13
  18. package/src/components/display/filter/RubriqueFilter.vue +1 -3
  19. package/src/components/display/list/ListPaginate.vue +1 -6
  20. package/src/components/display/live/LiveItem.vue +6 -17
  21. package/src/components/display/live/LiveList.vue +12 -16
  22. package/src/components/display/organisation/OrganisationChooser.vue +2 -6
  23. package/src/components/display/organisation/OrganisationChooserLight.vue +1 -5
  24. package/src/components/display/participant/ParticipantItem.vue +4 -9
  25. package/src/components/display/participant/ParticipantList.vue +1 -3
  26. package/src/components/display/playlist/PlaylistItem.vue +6 -16
  27. package/src/components/display/playlist/PlaylistList.vue +2 -5
  28. package/src/components/display/playlist/PodcastList.vue +3 -7
  29. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +2 -9
  30. package/src/components/display/podcasts/AnimatorsItem.vue +1 -1
  31. package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
  32. package/src/components/display/podcasts/PodcastFilterList.vue +1 -1
  33. package/src/components/display/podcasts/PodcastImage.vue +10 -18
  34. package/src/components/display/podcasts/PodcastInlineListClassic.vue +2 -8
  35. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +2 -2
  36. package/src/components/display/podcasts/PodcastItem.vue +2 -5
  37. package/src/components/display/podcasts/PodcastItemInfo.vue +2 -7
  38. package/src/components/display/podcasts/PodcastList.vue +5 -13
  39. package/src/components/display/podcasts/PodcastModuleBox.vue +7 -22
  40. package/src/components/display/podcasts/PodcastPlayBar.vue +3 -4
  41. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -3
  42. package/src/components/display/rubriques/RubriqueChooser.vue +4 -15
  43. package/src/components/display/rubriques/RubriqueList.vue +2 -2
  44. package/src/components/display/sharing/QrCode.vue +1 -1
  45. package/src/components/display/sharing/ShareButtons.vue +4 -0
  46. package/src/components/display/sharing/ShareButtonsIntern.vue +5 -1
  47. package/src/components/display/sharing/ShareDistribution.vue +26 -95
  48. package/src/components/display/sharing/SharePlayer.vue +6 -14
  49. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  50. package/src/components/display/sharing/SubscribeButtons.vue +2 -4
  51. package/src/components/form/ClassicSearch.vue +2 -2
  52. package/src/components/form/ClassicSelect.vue +1 -1
  53. package/src/components/misc/Footer.vue +2 -2
  54. package/src/components/misc/LeftMenu.vue +3 -3
  55. package/src/components/misc/TopBar.vue +7 -11
  56. package/src/components/misc/modal/NewsletterModal.vue +140 -128
  57. package/src/components/misc/player/Player.vue +1 -1
  58. package/src/components/misc/player/PlayerCompact.vue +1 -1
  59. package/src/components/misc/player/PlayerTimeline.vue +0 -5
  60. package/src/components/pages/Emission.vue +14 -33
  61. package/src/components/pages/Emissions.vue +6 -15
  62. package/src/components/pages/Home.vue +1 -4
  63. package/src/components/pages/Lives.vue +3 -11
  64. package/src/components/pages/PageNotFound.vue +2 -2
  65. package/src/components/pages/Participant.vue +8 -23
  66. package/src/components/pages/Participants.vue +3 -6
  67. package/src/components/pages/Playlist.vue +7 -13
  68. package/src/components/pages/Playlists.vue +2 -3
  69. package/src/components/pages/Podcast.vue +15 -51
  70. package/src/components/pages/Podcasts.vue +7 -16
  71. package/src/components/pages/Search.vue +3 -6
  72. package/public/img/article.png +0 -0
@@ -81,13 +81,10 @@ export default defineComponent({
81
81
  return (state.generalParameters.podcastmaker as boolean);
82
82
  },
83
83
  organisation(): string {
84
- if(this.playlist && this.playlist.publisher && this.playlist.publisher.organisation){
85
- return '' + this.playlist.publisher.organisation.name;
86
- }
87
- return '';
84
+ return this.playlist?.publisher?.organisation?.name ??'';
88
85
  },
89
86
  description(): string {
90
- return this.playlist.description || '';
87
+ return this.playlist.description ?? '';
91
88
  },
92
89
  name(): string {
93
90
  return this.playlist.title;
@@ -96,13 +93,9 @@ export default defineComponent({
96
93
  return state.generalParameters.organisationId;
97
94
  },
98
95
  editRight(): boolean {
99
- if (
100
- (state.generalParameters.isPlaylist &&
101
- this.organisationId === this.playlist.organisation?.id) ||
102
- state.generalParameters.isAdmin
103
- )
104
- return true;
105
- return false;
96
+ return (true===state.generalParameters.isPlaylist &&
97
+ this.organisationId === this.playlist.organisation?.id) ||
98
+ true == state.generalParameters.isAdmin;
106
99
  },
107
100
  activePlaylist(): boolean {
108
101
  return 0 !== Object.keys(this.playlist.podcasts).length;
@@ -111,10 +104,7 @@ export default defineComponent({
111
104
  mounted() {
112
105
  const playlistDesc = (this.$refs.descriptionPlaylist as HTMLElement);
113
106
  const playlistDescContainer = (this.$refs.descriptionPlaylistContainer as HTMLElement);
114
- if (
115
- null !== playlistDesc && null !== playlistDescContainer &&
116
- playlistDesc.clientHeight > playlistDescContainer.clientHeight
117
- ) {
107
+ if (playlistDesc?.clientHeight > playlistDescContainer?.clientHeight) {
118
108
  playlistDescContainer.classList.add('after-emission-description');
119
109
  }
120
110
  },
@@ -77,13 +77,10 @@ export default defineComponent({
77
77
  return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
78
78
  },
79
79
  sort(): string {
80
- if (!this.query) return 'NAME';
81
- return 'SCORE';
80
+ return !this.query ?'NAME': 'SCORE';
82
81
  },
83
82
  organisation(): string|undefined {
84
- if (this.organisationId) return this.organisationId;
85
- if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
86
- return undefined;
83
+ return this.organisationId ?? this.$store.state.filter.organisationId;
87
84
  },
88
85
  },
89
86
  watch: {
@@ -94,13 +94,9 @@ export default defineComponent({
94
94
  return this.podcastsQuery.slice(this.first, Math.min(this.first + this.size,this.podcasts.length));
95
95
  },
96
96
  editRight(): boolean {
97
- if (
98
- (this.authenticated &&
99
- this.myOrganisationId === this.playlist.organisation?.id) ||
100
- state.generalParameters.isAdmin
101
- )
102
- return true;
103
- return false;
97
+ return (true===this.authenticated &&
98
+ this.myOrganisationId === this.playlist.organisation?.id) ||
99
+ true ===state.generalParameters.isAdmin
104
100
  },
105
101
  },
106
102
  watch: {
@@ -98,10 +98,7 @@ export default defineComponent({
98
98
  },
99
99
  computed: {
100
100
  title(): string{
101
- if(this.playlist){
102
- return this.playlist.title;
103
- }
104
- return "";
101
+ return this.playlist?.title??"";
105
102
  },
106
103
  podcasts(): Array<Podcast> {
107
104
  return this.allPodcasts.slice(this.index, this.index + this.size);
@@ -159,11 +156,7 @@ export default defineComponent({
159
156
  );
160
157
  });
161
158
  }
162
- if (this.allPodcasts.length <= 3) {
163
- this.alignLeft = true;
164
- } else {
165
- this.alignLeft = false;
166
- }
159
+ this.alignLeft = this.allPodcasts.length <= 3;
167
160
  this.loading = false;
168
161
  },
169
162
  displayPrevious(): void {
@@ -29,7 +29,7 @@ export default defineComponent({
29
29
  },
30
30
  computed:{
31
31
  animatorName(): string{
32
- return (`${this.animator?.firstName||''} ${this.animator?.lastName||''}`).trim();
32
+ return (`${this.animator?.firstName??''} ${this.animator?.lastName??''}`).trim();
33
33
  }
34
34
  }
35
35
  })
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  },
76
76
  methods: {
77
77
  getName(person: Participant): string {
78
- return (`${person.firstName||''} ${person.lastName||''}`).trim();
78
+ return (`${person.firstName??''} ${person.lastName??''}`).trim();
79
79
  },
80
80
  },
81
81
  })
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  },
82
82
  methods: {
83
83
  onCategorySelected(category: Category|undefined): void {
84
- this.iabId = category && category.id ? category.id : undefined;
84
+ this.iabId = category?.id ? category.id : undefined;
85
85
  },
86
86
  fetch(podcasts: Array<Podcast>): void {
87
87
  this.$emit('fetch', podcasts);
@@ -123,11 +123,7 @@ export default defineComponent({
123
123
  },
124
124
  }),
125
125
  mainRubrique(): boolean{
126
- if(this.podcast && this.podcast.rubriqueIds &&state.podcastPage.mainRubrique && this.podcast.rubriqueIds.includes(state.podcastPage.mainRubrique)){
127
- return true;
128
- }else{
129
- return false;
130
- }
126
+ return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && true==this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique);
131
127
  },
132
128
  isPodcastmaker(): boolean {
133
129
  return (state.generalParameters.podcastmaker as boolean);
@@ -181,24 +177,24 @@ export default defineComponent({
181
177
  },
182
178
  textVisible(): string {
183
179
  if (this.isLiveToBeRecorded)
184
- return this.$t('Podcast linked to waiting live').toString();
180
+ return this.$t('Podcast linked to waiting live');
185
181
  if ('READY' === this.podcast.processingStatus || this.fetchConference) {
186
- if (false == this.podcast.valid) return this.$t('Podcast to validate').toString();
182
+ if (false == this.podcast.valid) return this.$t('Podcast to validate');
187
183
  if (
188
184
  !this.podcast.availability.visibility &&
189
185
  this.podcast.availability.date
190
186
  )
191
- return this.$t('Podcast publish in future').toString();
192
- return this.$t('Podcast no visible').toString();
187
+ return this.$t('Podcast publish in future');
188
+ return this.$t('Podcast no visible');
193
189
  }
194
190
  if (
195
191
  'PLANNED' === this.podcast.processingStatus ||
196
192
  'PROCESSING' === this.podcast.processingStatus
197
193
  )
198
- return this.$t('Podcast in process').toString();
194
+ return this.$t('Podcast in process');
199
195
  if ('CANCELED' === this.podcast.processingStatus)
200
- return this.$t('Podcast in cancelled status').toString();
201
- return this.$t('Podcast in error').toString();
196
+ return this.$t('Podcast in cancelled status');
197
+ return this.$t('Podcast in error');
202
198
  },
203
199
  statusText(): string {
204
200
  if (!this.fetchConference) return '';
@@ -253,11 +249,7 @@ export default defineComponent({
253
249
  return;
254
250
  }
255
251
  if(this.playingPodcast){
256
- if("PLAYING"===this.$store.state.player.status){
257
- this.$store.commit('playerPause', true);
258
- }else{
259
- this.$store.commit('playerPause', false);
260
- }
252
+ this.$store.commit('playerPause', "PLAYING"===this.$store.state.player.status);
261
253
  return;
262
254
  }
263
255
  if (!this.recordingLive) {
@@ -267,7 +259,7 @@ export default defineComponent({
267
259
  title: this.podcast.title,
268
260
  audioUrl: this.podcast.audioUrl,
269
261
  duration: this.podcast.duration,
270
- conferenceId: this.fetchConference ? this.fetchConference.conferenceId : undefined,
262
+ conferenceId: this.fetchConference?.conferenceId,
271
263
  livePodcastId: this.podcast.podcastId,
272
264
  organisation: this.podcast.organisation,
273
265
  });
@@ -111,9 +111,7 @@ export default defineComponent({
111
111
  return this.$store.state.filter.organisationId;
112
112
  },
113
113
  organisation(): string|undefined {
114
- if (this.organisationId) return this.organisationId;
115
- if (this.filterOrga) return this.filterOrga;
116
- return undefined;
114
+ return this.organisationId ?? this.filterOrga;
117
115
  },
118
116
  previousAvailable(): boolean {
119
117
  return this.index > 0;
@@ -179,11 +177,7 @@ export default defineComponent({
179
177
  this.allPodcasts = this.allPodcasts.concat(
180
178
  data.result.filter((pod: Podcast|null) => null !== pod)
181
179
  );
182
- if (this.allPodcasts.length <= 3) {
183
- this.alignLeft = true;
184
- } else {
185
- this.alignLeft = false;
186
- }
180
+ this.alignLeft = this.allPodcasts.length <= 3;
187
181
  this.first += this.size;
188
182
  },
189
183
  displayPrevious(): void {
@@ -102,7 +102,7 @@ export default defineComponent({
102
102
 
103
103
  computed: {
104
104
  rubriqueQueryParam(): string|undefined{
105
- if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
105
+ if(this.$store.state.filter?.rubriqueFilter?.length){
106
106
  return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
107
107
  }
108
108
  return undefined;
@@ -119,7 +119,7 @@ export default defineComponent({
119
119
  return {
120
120
  name: 'podcasts',
121
121
  query: { productor: this.$store.state.filter.organisationId,
122
- iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
122
+ iabId:this.$store.state.filter.iab?.id,
123
123
  rubriquesId: this.rubriqueQueryParam },
124
124
  };
125
125
  },
@@ -88,7 +88,7 @@ export default defineComponent({
88
88
  return moment(this.podcast.pubDate).format('X');
89
89
  },
90
90
  description(): string {
91
- return this.podcast.description ? this.podcast.description : '';
91
+ return this.podcast.description ?? '';
92
92
  },
93
93
  },
94
94
 
@@ -96,10 +96,7 @@ export default defineComponent({
96
96
  if(!this.podcastItemDescription){return}
97
97
  const podcastDesc = (this.$refs.descriptionPodcast as HTMLElement);
98
98
  const podcastDescContainer = (this.$refs.descriptionPodcastContainer as HTMLElement);
99
- if (
100
- null !== podcastDesc && null !== podcastDescContainer &&
101
- podcastDesc.clientHeight > podcastDescContainer.clientHeight
102
- ) {
99
+ if (podcastDesc?.clientHeight > podcastDescContainer?.clientHeight) {
103
100
  this.isDescriptionBig = true;
104
101
  }
105
102
  },
@@ -91,13 +91,8 @@ export default defineComponent({
91
91
  return moment(this.pubDate).format('D MMMM YYYY, HH[h]mm');
92
92
  },
93
93
  editRight(): boolean {
94
- if (
95
- (this.authenticated &&
96
- this.myOrganisationId === this.podcastOrganisationId) ||
97
- state.generalParameters.isAdmin
98
- )
99
- return true;
100
- return false;
94
+ return (true===this.authenticated && this.myOrganisationId === this.podcastOrganisationId) ||
95
+ true===state.generalParameters.isAdmin
101
96
  },
102
97
  durationString(): string {
103
98
  if (this.duration <= 1) return '';
@@ -96,14 +96,10 @@ export default defineComponent({
96
96
  ${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.notValid}`;
97
97
  },
98
98
  organisation(): string|undefined {
99
- if (this.organisationId) return this.organisationId;
100
- if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
101
- return undefined;
99
+ return this.organisationId ?? this.$store.state.filter.organisationId;
102
100
  },
103
101
  sort(): string {
104
- if (this.popularSort) return "POPULARITY";
105
- if (this.sortCriteria) return this.sortCriteria;
106
- return 'DATE';
102
+ return this.popularSort? "POPULARITY" : this.sortCriteria??'DATE';
107
103
  },
108
104
  sortText(): string {
109
105
  switch (this.sortCriteria) {
@@ -155,14 +151,10 @@ export default defineComponent({
155
151
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
156
152
  rubriqueId: this.rubriqueId.length ? this.rubriqueId : undefined,
157
153
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
158
- includeHidden: this.includeHidden
154
+ includeHidden: this.includeHidden,
155
+ validity: undefined !== this.notValid?!this.notValid: undefined,
156
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.profile.userId:undefined
159
157
  };
160
- if (undefined !== this.notValid) {
161
- param.validity = !this.notValid;
162
- }
163
- if (this.notValid && !(state.generalParameters.isProduction as boolean)) {
164
- param.publisherId = this.$store.state.profile.userId;
165
- }
166
158
  try {
167
159
  const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
168
160
  this.afterFetching(reset, data);
@@ -167,10 +167,7 @@ export default defineComponent({
167
167
  if('ERROR' === this.podcast?.processingStatus){
168
168
  return this.$t('Podcast in ERROR, please contact Saooti');
169
169
  }
170
- if(this.podcastNotValid){
171
- return this.$t('Podcast not validated');
172
- }
173
- return '';
170
+ return this.podcastNotValid ? this.$t('Podcast not validated') : '';
174
171
  },
175
172
  isPodcastmaker(): boolean {
176
173
  return (state.generalParameters.podcastmaker as boolean);
@@ -197,23 +194,17 @@ export default defineComponent({
197
194
  });
198
195
  },
199
196
  editRight(): boolean {
200
- if ( this.podcast &&
201
- (this.authenticated &&
202
- this.myOrganisationId === this.podcast.organisation.id) ||
203
- state.generalParameters.isAdmin
204
- )
205
- return true;
206
- return false;
197
+ return (true===this.authenticated &&
198
+ this.myOrganisationId === this.podcast?.organisation.id) ||true===state.generalParameters.isAdmin
207
199
  },
208
200
  isLiveReadyToRecord(): boolean {
209
201
  return (undefined!==this.podcast && undefined!==this.podcast.conferenceId && 0 !== this.podcast.conferenceId && 'READY_TO_RECORD' === this.podcast.processingStatus);
210
202
  },
211
203
  isLiveReady(): boolean {
212
204
  return (
213
- undefined!==this.podcast &&
214
- undefined!==this.podcast.conferenceId &&
215
- 0 !== this.podcast.conferenceId &&
216
- 'READY' === this.podcast.processingStatus
205
+ undefined!==this.podcast?.conferenceId &&
206
+ 0 !== this.podcast?.conferenceId &&
207
+ 'READY' === this.podcast?.processingStatus
217
208
  );
218
209
  },
219
210
  isNotRecorded(): boolean {
@@ -231,13 +222,7 @@ export default defineComponent({
231
222
  );
232
223
  },
233
224
  podcastNotValid(): boolean {
234
- if (
235
- this.podcast &&
236
- this.podcast.availability &&
237
- false === this.podcast.valid
238
- )
239
- return true;
240
- return false;
225
+ return undefined!==this.podcast?.availability && false === this.podcast?.valid;
241
226
  },
242
227
  },
243
228
  methods: {
@@ -48,14 +48,13 @@ export default defineComponent({
48
48
  return (state.emissionsPage.progressBar as boolean);
49
49
  },
50
50
  percentProgress(): number{
51
- if(!this.$store.state.player.podcast || this.podcastId !== this.$store.state.player.podcast.podcastId){
51
+ if(this.podcastId !== this.$store.state.player.podcast?.podcastId){
52
52
  return 0;
53
53
  }
54
- if(!this.$store.state.player.elapsed){return 0;}
55
- return this.$store.state.player.elapsed * 100;
54
+ return !this.$store.state.player.elapsed ? 0 : this.$store.state.player.elapsed * 100;
56
55
  },
57
56
  playedTime(): string{
58
- if(this.$store.state.player.podcast && this.podcastId === this.$store.state.player.podcast.podcastId){
57
+ if(this.podcastId === this.$store.state.player.podcast?.podcastId){
59
58
  if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0) {
60
59
  return DurationHelper.formatDuration(
61
60
  Math.round(this.$store.state.player.elapsed * this.$store.state.player.total)
@@ -95,9 +95,7 @@ export default defineComponent({
95
95
  return this.$store.state.filter.organisationId;
96
96
  },
97
97
  organisation(): string|undefined {
98
- if (this.organisationId) return this.organisationId;
99
- if (this.filterOrga) return this.filterOrga;
100
- return undefined;
98
+ return this.organisationId ?? this.filterOrga;
101
99
  },
102
100
  watchVariable():string{
103
101
  return `${this.emissionId}|${this.organisationId}|${this.filterOrga}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
@@ -110,15 +110,11 @@ export default defineComponent({
110
110
  },
111
111
  computed: {
112
112
  id(): string {
113
- if (this.rubriquageId) return 'rubriqueChooser' + this.rubriquageId;
114
- return 'rubriqueChooser';
113
+ return this.rubriquageId? 'rubriqueChooser' + this.rubriquageId : 'rubriqueChooser';
115
114
  },
116
115
  model: {
117
116
  get(): Rubrique| Array<Rubrique>|undefined{
118
- if(false===this.multiple){
119
- return this.rubrique;
120
- }
121
- return this.rubriqueForArray;
117
+ return false===this.multiple ? this.rubrique:this.rubriqueForArray;
122
118
  },
123
119
  set(value: Rubrique| Array<Rubrique>|undefined): void{
124
120
  if(false===this.multiple){
@@ -181,11 +177,8 @@ export default defineComponent({
181
177
  rubriqueDefault,
182
178
  this.withoutItem,
183
179
  ].concat(this.allRubriques);
184
- } else {
185
- return [rubriqueDefault].concat(
186
- this.allRubriques
187
- );
188
180
  }
181
+ return [rubriqueDefault].concat(this.allRubriques);
189
182
  },
190
183
  onOpen(): void {
191
184
  (this.$refs.multiselectRef as VueMultiselect).$refs.search.setAttribute(
@@ -200,11 +193,7 @@ export default defineComponent({
200
193
  this.initRubriqueSelected(this.rubriqueSelected);
201
194
  return;
202
195
  }
203
- if ('' !== this.defaultanswer) {
204
- this.rubrique = getDefaultRubrique(this.defaultanswer);
205
- } else {
206
- this.rubrique = undefined;
207
- }
196
+ this.rubrique ='' !== this.defaultanswer? getDefaultRubrique(this.defaultanswer): undefined;
208
197
  this.onRubriqueSelected(this.rubrique);
209
198
  },
210
199
  onSearchRubrique(query: string): void {
@@ -121,8 +121,8 @@ export default defineComponent({
121
121
  addFilter(rubrique: Rubrique): void{
122
122
  if(!this.rubriquage){ return ;}
123
123
  const filterToAdd = {
124
- rubriquageId: this.rubriquage.rubriquageId?this.rubriquage.rubriquageId: 0,
125
- rubriqueId: rubrique.rubriqueId? rubrique.rubriqueId:0,
124
+ rubriquageId: this.rubriquage.rubriquageId??0,
125
+ rubriqueId: rubrique.rubriqueId??0,
126
126
  nameRubriquage: this.rubriquage.title,
127
127
  nameRubrique: rubrique.name
128
128
  };
@@ -82,7 +82,7 @@ export default defineComponent({
82
82
  }
83
83
  if (!state.generalParameters.authenticated) return;
84
84
  let data;
85
- if(this.$store.state.organisation && this.$store.state.organisation.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
85
+ if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
86
86
  data = this.$store.state.organisation.attributes;
87
87
  }else{
88
88
  data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
@@ -27,6 +27,7 @@
27
27
  <ShareButtonsIntern
28
28
  :podcast="podcast"
29
29
  :emission="emission"
30
+ :playlist="playlist"
30
31
  :participant-id="participantId"
31
32
  :organisation-id="organisationId"
32
33
  :not-exclusive="notExclusive"
@@ -40,6 +41,7 @@
40
41
  <ShareButtonsIntern
41
42
  :podcast="podcast"
42
43
  :emission="emission"
44
+ :playlist="playlist"
43
45
  :participant-id="participantId"
44
46
  :organisation-id="organisationId"
45
47
  :not-exclusive="notExclusive"
@@ -56,6 +58,7 @@ import { displayMethods } from '../../mixins/functions';
56
58
  import Popover from '../../misc/Popover.vue';
57
59
  import ShareButtonsIntern from './ShareButtonsIntern.vue';
58
60
  import { defineComponent } from 'vue';
61
+ import { Playlist } from '@/store/class/general/playlist';
59
62
  export default defineComponent({
60
63
  components: {
61
64
  ShareButtonsIntern,
@@ -65,6 +68,7 @@ export default defineComponent({
65
68
  props: {
66
69
  podcast: { default: undefined, type: Object as ()=> Podcast},
67
70
  emission: { default: undefined, type: Object as ()=> Emission},
71
+ playlist: { default: undefined, type: Object as ()=>Playlist},
68
72
  participantId: { default: undefined, type: Number},
69
73
  organisationId: { default: undefined, type: String},
70
74
  notExclusive: { default: true, type: Boolean},
@@ -50,7 +50,7 @@
50
50
  <div class="saooti-link" />
51
51
  </button>
52
52
  <button
53
- v-if="podcast"
53
+ v-if="podcast || emission ||playlist"
54
54
  :class="getClass()"
55
55
  :title="$t('Share newsletter')"
56
56
  @click="newsletter = true"
@@ -75,6 +75,8 @@
75
75
  v-if="newsletter"
76
76
  :closable="true"
77
77
  :podcast="podcast"
78
+ :emission="emission"
79
+ :playlist="playlist"
78
80
  @close="newsletter = false"
79
81
  />
80
82
  <QrCodeModal
@@ -98,6 +100,7 @@ import Snackbar from '../../misc/Snackbar.vue';
98
100
  import { displayMethods } from '../../mixins/functions';
99
101
  import { defineComponent, defineAsyncComponent } from 'vue';
100
102
  import SnackbarVue from '../../misc/Snackbar.vue';
103
+ import { Playlist } from '@/store/class/general/playlist';
101
104
  const ClipboardModal = defineAsyncComponent(() => import('../../misc/modal/ClipboardModal.vue'));
102
105
  const NewsletterModal = defineAsyncComponent(() => import('../../misc/modal/NewsletterModal.vue'));
103
106
  const QrCodeModal = defineAsyncComponent(() => import('../../misc/modal/QrCodeModal.vue'));
@@ -114,6 +117,7 @@ export default defineComponent({
114
117
  props: {
115
118
  podcast: { default: undefined, type: Object as ()=> Podcast},
116
119
  emission: { default: undefined, type: Object as ()=> Emission},
120
+ playlist: { default: undefined, type: Object as ()=>Playlist},
117
121
  participantId: { default: undefined, type: Number},
118
122
  organisationId: { default: undefined, type: String},
119
123
  notExclusive: { default: true, type: Boolean},