@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
@@ -17,103 +17,15 @@
17
17
  :emission="emission"
18
18
  />
19
19
  <div class="sharing-distribution-container">
20
- <router-link
21
- :to="'/main/priv/distribution/amazon/' + emissionId"
20
+ <router-link
21
+ v-for="platform in platformShare"
22
+ :key="platform.title"
23
+ :to="platform.url"
22
24
  class="text-dark"
23
25
  >
24
- <span class="saooti-amazon">
25
- <div class="path1" />
26
- <div class="path2" />
27
- <div class="path3" />
28
- </span> Amazon Music | Podcasters
29
- </router-link>
30
- <router-link
31
- :to="'/main/priv/distribution/apple/' + emissionId"
32
- class="text-dark"
33
- >
34
- <span class="saooti-apple" />Apple Podcast / iTunes
35
- </router-link>
36
- <router-link
37
- :to="'/main/priv/distribution/deezer/' + emissionId"
38
- class="text-dark"
39
- >
40
- <span class="saooti-deezer" />Deezer
41
- </router-link>
42
- <router-link
43
- :to="'/main/priv/distribution/googlePodcasts/' + emissionId"
44
- class="text-dark"
45
- >
46
- <span class="saooti-google-podcasts">
47
- <div class="path1" />
48
- <div class="path2" />
49
- <div class="path3" />
50
- <div class="path4" />
51
- <div class="path5" />
52
- <div class="path6" />
53
- <div class="path7" />
54
- </span> Google Podcasts
55
- </router-link>
56
- <router-link
57
- :to="'/main/priv/distribution/PlayerFM/' + emissionId"
58
- class="text-dark"
59
- >
60
- <span class="saooti-playerfm" />PlayerFM
61
- </router-link>
62
- <router-link
63
- :to="'/main/priv/distribution/PocketCasts/' + emissionId"
64
- class="text-dark"
65
- >
66
- <span class="saooti-pocket-casts" />Pocket Casts
67
- </router-link>
68
- <router-link
69
- :to="'/main/priv/distribution/PodcastAddict/' + emissionId"
70
- class="text-dark"
71
- >
72
- <span class="saooti-podcast-addict" />Podcast Addict
73
- </router-link>
74
- <router-link
75
- :to="'/main/priv/distribution/radioline/' + emissionId"
76
- class="text-dark"
77
- >
78
- <span class="saooti-radioline" />Radioline
79
- </router-link>
80
- <router-link
81
- :to="'/main/priv/distribution/spotify/' + emissionId"
82
- class="text-dark"
83
- >
84
- <span class="saooti-spotify" />Spotify
85
- </router-link>
86
-
87
- <router-link
88
- :to="'/main/priv/distribution/Stitcher/' + emissionId"
89
- class="text-dark"
90
- >
91
- <span class="saooti-stitcher-logo">
92
- <div class="path1" />
93
- <div class="path2" />
94
- <div class="path3" />
95
- <div class="path4" />
96
- <div class="path5" />
97
- <div class="path6" />
98
- <div class="path7" />
99
- <div class="path8" />
100
- <div class="path9" />
101
- <div class="path10" />
102
- <div class="path11" />
103
- <div class="path12" />
104
- <div class="path13" />
105
- <div class="path14" />
106
- <div class="path15" />
107
- <div class="path16" />
108
- <div class="path17" />
109
- <div class="path18" /> </span>Stitcher
110
- </router-link>
111
-
112
- <router-link
113
- :to="'/main/priv/distribution/tuneIn/' + emissionId"
114
- class="text-dark"
115
- >
116
- <span class="saooti-tunin" />TuneIn
26
+ <span :class="platform.icon">
27
+ <div v-for="index in platform.path" :key="index" :class="'path'+index" />
28
+ </span>{{platform.title}}
117
29
  </router-link>
118
30
  </div>
119
31
  <Snackbar
@@ -149,6 +61,22 @@ export default defineComponent({
149
61
  rss: '' as string,
150
62
  };
151
63
  },
64
+ computed:{
65
+ platformShare(){
66
+ return [
67
+ {url:this.getUrl('amazon'), icon:'saooti-amazon', title:'Amazon Music | Podcasters', path:3},
68
+ {url:this.getUrl('apple'), icon:'saooti-apple', title:'Apple Podcast / iTunes', path:0},
69
+ {url:this.getUrl('deezer'), icon:'saooti-deezer', title:'Deezer', path:0},
70
+ {url:this.getUrl('googlePodcasts'), icon:'saooti-google-podcasts', title:'Google Podcasts', path:7},
71
+ {url:this.getUrl('PlayerFM'), icon:'saooti-playerfm', title:'PlayerFM', path:0},
72
+ {url:this.getUrl('PocketCasts'), icon:'saooti-pocket-casts', title:'Pocket Casts', path:0},
73
+ {url:this.getUrl('PodcastAddict'), icon:'saooti-podcast-addict', title:'Podcast Addict', path:0},
74
+ {url:this.getUrl('radioline'), icon:'saooti-radioline', title:'Radioline', path:0},
75
+ {url:this.getUrl('spotify'), icon:'saooti-spotify', title:'Spotify', path:0},
76
+ {url:this.getUrl('Stitcher'), icon:'saooti-stitcher-logo', title:'Stitcher', path:18},
77
+ {url:this.getUrl('tuneIn'), icon:'saooti-tunin', title:'TuneIn', path:0}];
78
+ }
79
+ },
152
80
 
153
81
  mounted() {
154
82
  this.getEmissionDetails();
@@ -156,6 +84,9 @@ export default defineComponent({
156
84
  },
157
85
 
158
86
  methods: {
87
+ getUrl(platform: string): string{
88
+ return `/main/priv/distribution/${platform}/${this.emissionId}`;
89
+ },
159
90
  async getEmissionDetails(): Promise<void> {
160
91
  this.emission = await octopusApi.fetchData<Emission>(0,'emission/'+this.emissionId);
161
92
  },
@@ -140,8 +140,7 @@ export default defineComponent({
140
140
  return 'largeSuggestion' === this.iFrameModel;
141
141
  },
142
142
  titleStillAvailable(): string {
143
- if (this.isPodcastNotVisible) return this.$t('Podcast still available').toString();
144
- return this.$t('Podcasts still available').toString();
143
+ return this.isPodcastNotVisible ?this.$t('Podcast still available') : this.$t('Podcasts still available');
145
144
  },
146
145
  isLiveReadyToRecord(): boolean {
147
146
  if (this.podcast)
@@ -153,17 +152,10 @@ export default defineComponent({
153
152
  return false;
154
153
  },
155
154
  noAd(): boolean {
156
- if (
157
- (this.podcast &&
158
- this.podcast.organisation.id !== this.organisationId &&
159
- 'NO' === this.podcast.monetisable) ||
160
- (this.podcast &&
161
- 'UNDEFINED' === this.podcast.monetisable &&
162
- 'NO' === this.podcast.emission.monetisable)
163
- ) {
164
- return true;
165
- }
166
- return false;
155
+ return (this.podcast?.organisation.id !== this.organisationId &&
156
+ 'NO' === this.podcast?.monetisable) ||
157
+ ('UNDEFINED' === this.podcast?.monetisable &&
158
+ 'NO' === this.podcast?.emission.monetisable);
167
159
  },
168
160
  iFrameSrc(): string {
169
161
  const url = [''];
@@ -268,7 +260,7 @@ export default defineComponent({
268
260
  async initColor(): Promise<void> {
269
261
  if (!this.authenticated) return;
270
262
  let data;
271
- if(this.$store.state.organisation && this.$store.state.organisation.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
263
+ if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
272
264
  data = this.$store.state.organisation.attributes;
273
265
  }else{
274
266
  data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
@@ -68,7 +68,7 @@ export default defineComponent({
68
68
  },
69
69
  customPlayersDisplay(): Array<CustomPlayer>{
70
70
  return this.customPlayers.filter((player: CustomPlayer)=>{
71
- return (('EPISODE' === player.typePlayer ||'SUGGESTION' === player.typePlayer) && this.podcast && this.podcast.podcastId) ||
71
+ return (('EPISODE' === player.typePlayer ||'SUGGESTION' === player.typePlayer) &&this.podcast?.podcastId) ||
72
72
  ('EMISSION' === player.typePlayer && this.emission && !this.podcast)|| ('PLAYLIST' === player.typePlayer && this.playlist );
73
73
  });
74
74
  },
@@ -45,7 +45,7 @@ export default defineComponent({
45
45
  {name:'applePodcast', icon:'saooti-apple', url : this.getUrl('applePodcast')},
46
46
  {name:'deezer', icon:'saooti-deezer', url : this.getUrl('deezer')},
47
47
  {name:'googlePodcasts', icon:"saooti-google-podcasts", url : this.getUrl('googlePodcasts')},
48
- {name:'playerFm', icon: 'saooti-saooti-playerfm', url : this.getUrl('playerFm')},
48
+ {name:'playerFm', icon: 'saooti-playerfm', url : this.getUrl('playerFm')},
49
49
  {name:'pocketCasts', icon:'saooti-pocket-casts', url : this.getUrl('pocketCasts')},
50
50
  {name:'podcastAddict', icon: 'saooti-podcast-addict', url : this.getUrl('podcastAddict')},
51
51
  {name:'radioline', icon:'saooti-radioline', url : this.getUrl('radioline')},
@@ -67,14 +67,12 @@ export default defineComponent({
67
67
  }
68
68
  },
69
69
  getUrl(sub: string): string | undefined{
70
- return this.externaliseLinks(this.emission && this.emission.annotations? (this.emission.annotations[sub] as string): undefined);
70
+ return this.externaliseLinks(this.emission?.annotations?.[sub] as string|undefined);
71
71
  },
72
72
  externaliseLinks(link?: string): string|undefined {
73
73
  if (!link) return link;
74
74
  link = link.trim();
75
- if (!link.startsWith('http') && !link.startsWith('//'))
76
- return '//' + link;
77
- return link;
75
+ return !link.startsWith('http') && !link.startsWith('//') ? '//' + link:link;
78
76
  },
79
77
  },
80
78
  })
@@ -19,7 +19,7 @@
19
19
  />
20
20
  <div
21
21
  v-else
22
- class="saooti-cross search-icon-container c-hand"
22
+ class="saooti-remove-bounty search-icon-container c-hand"
23
23
  @click="textValue = ''"
24
24
  />
25
25
  </div>
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  margin: 0 !important;
70
70
  }
71
71
  .saooti-search-bounty,
72
- .saooti-cross {
72
+ .saooti-remove-bounty {
73
73
  font-size: 1rem;
74
74
  }
75
75
  .search-icon-container {
@@ -50,7 +50,7 @@ export default defineComponent({
50
50
  handler() {
51
51
  if(this.textInit !== this.textValue){
52
52
  this.textValue =this.textInit;
53
- }
53
+ }
54
54
  },
55
55
  },
56
56
  }
@@ -136,7 +136,7 @@ export default defineComponent({
136
136
  return state.footer.contactLink;
137
137
  },
138
138
  rubriqueQueryParam(): string|undefined{
139
- if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
139
+ if(this.$store.state.filter?.rubriqueFilter?.length){
140
140
  return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
141
141
  }
142
142
  return undefined;
@@ -153,7 +153,7 @@ export default defineComponent({
153
153
  return { productor: this.$store.state.filter.organisationId};
154
154
  }
155
155
  return { productor: this.$store.state.filter.organisationId,
156
- iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
156
+ iabId: this.$store.state.filter.iab?.id,
157
157
  rubriquesId: this.rubriqueQueryParam}
158
158
  },
159
159
  showBlackBorder(hide: boolean): void {
@@ -97,7 +97,7 @@ export default defineComponent({
97
97
  return this.$store.state.filter.live;
98
98
  },
99
99
  rubriqueQueryParam(): string|undefined{
100
- if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
100
+ if(this.$store.state.filter?.rubriqueFilter?.length){
101
101
  return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
102
102
  }
103
103
  return undefined;
@@ -122,14 +122,14 @@ export default defineComponent({
122
122
  return { productor: this.$store.state.filter.organisationId};
123
123
  }
124
124
  return { productor: this.$store.state.filter.organisationId,
125
- iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
125
+ iabId: this.$store.state.filter.iab?.id,
126
126
  rubriquesId: this.rubriqueQueryParam}
127
127
  },
128
128
  onMenuClick() {
129
129
  this.$emit('update:displayMenu', false);
130
130
  },
131
131
  async onOrganisationSelected(organisation: Organisation|undefined) {
132
- if (organisation && organisation.id) {
132
+ if (organisation?.id) {
133
133
  await this.selectOrganisation(organisation.id);
134
134
  return;
135
135
  }
@@ -8,7 +8,7 @@
8
8
  :to="{
9
9
  name: 'home',
10
10
  query: { productor: $store.state.filter.organisationId,
11
- iabId: $store.state.filter.iab ? $store.state.filter.iab.id : undefined,
11
+ iabId: $store.state.filter.iab?.id ,
12
12
  rubriquesId: rubriqueQueryParam},
13
13
  }"
14
14
  @click="onDisplayMenu(true)"
@@ -111,14 +111,13 @@ export default defineComponent({
111
111
  {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && (!this.filterOrga || this.isEducation)}]
112
112
  },
113
113
  rubriqueQueryParam(): string|undefined{
114
- if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
114
+ if(this.$store.state.filter?.rubriqueFilter?.length){
115
115
  return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
116
116
  }
117
117
  return undefined;
118
118
  },
119
119
  logoUrl(): string {
120
- if (this.isEducation) return '/img/logo_education.png';
121
- return '/img/logo_octopus_final.svg';
120
+ return this.isEducation ?'/img/logo_education.png': '/img/logo_octopus_final.svg';
122
121
  },
123
122
  isPodcastmaker(): boolean {
124
123
  return (state.generalParameters.podcastmaker as boolean);
@@ -130,11 +129,8 @@ export default defineComponent({
130
129
  return this.$store.state.filter.live;
131
130
  },
132
131
  imgUrl(): string {
133
- if (
134
- this.$store.state.filter.imgUrl &&
135
- !this.$store.state.filter.imgUrl.includes('emptypodcast')
136
- )
137
- return this.$store.state.filter.imgUrl + '?dummy=' + this.dummyParam;
132
+ if (!this.$store.state.filter.imgUrl?.includes('emptypodcast'))
133
+ return `${this.$store.state.filter.imgUrl}?dummy=${this.dummyParam}`;
138
134
  return '';
139
135
  },
140
136
  },
@@ -162,7 +158,7 @@ export default defineComponent({
162
158
  return { productor: this.$store.state.filter.organisationId};
163
159
  }
164
160
  return { productor: this.$store.state.filter.organisationId,
165
- iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
161
+ iabId: this.$store.state.filter.iab?.id,
166
162
  rubriquesId: this.rubriqueQueryParam}
167
163
  },
168
164
  handleScroll(): void {
@@ -193,7 +189,7 @@ export default defineComponent({
193
189
  this.$emit('update:displayMenu',param?false:!this.displayMenu);
194
190
  },
195
191
  async onOrganisationSelected(organisation: Organisation | undefined): Promise<void> {
196
- if (organisation && organisation.id) {
192
+ if (organisation?.id) {
197
193
  await this.selectOrganisation(organisation.id);
198
194
  return;
199
195
  }
@@ -8,6 +8,7 @@
8
8
  {{ $t('RSS Link') }}
9
9
  </div>
10
10
  <button
11
+ ref="focusElement"
11
12
  type="button"
12
13
  class="btn-close btn-close-white"
13
14
  title="Close"
@@ -53,6 +54,9 @@ export default defineComponent({
53
54
  emission: { default: undefined, type: Object as ()=> Emission},
54
55
  },
55
56
  emits: ['close', 'copy'],
57
+ mounted(){
58
+ (this.$refs.focusElement as HTMLElement)?.focus();
59
+ },
56
60
 
57
61
  methods: {
58
62
  closePopup(): void {
@@ -12,6 +12,7 @@
12
12
  </h5>
13
13
  <button
14
14
  v-if="closable"
15
+ :ref="closable?'focusElement':''"
15
16
  type="button"
16
17
  class="btn-close btn-close-white"
17
18
  title="Close"
@@ -32,6 +33,7 @@
32
33
  >
33
34
  <button
34
35
  v-if="canceltext"
36
+ :ref="!closable && canceltext?'focusElement':''"
35
37
  class="btn m-1"
36
38
  @click="onCancel"
37
39
  >
@@ -46,6 +48,7 @@
46
48
  </button>
47
49
  <button
48
50
  class="btn btn-primary m-1"
51
+ :ref="!closable && !canceltext?'focusElement':''"
49
52
  @click="onValid"
50
53
  >
51
54
  {{ validatetext }}
@@ -70,6 +73,9 @@ export default defineComponent({
70
73
  thirdText: { default: undefined, type: String},
71
74
  },
72
75
  emits: ['close', 'validate', 'cancel', 'thirdEvent'],
76
+ mounted(){
77
+ (this.$refs.focusElement as HTMLElement)?.focus();
78
+ },
73
79
  methods: {
74
80
  closePopup(): void {
75
81
  this.$emit('close');