@saooti/octopus-sdk 35.1.6 → 35.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +17 -8
  3. package/src/api/classicCrud.ts +6 -7
  4. package/src/components/display/categories/CategoryChooser.vue +4 -2
  5. package/src/components/display/categories/CategoryFilter.vue +22 -25
  6. package/src/components/display/categories/CategoryList.vue +18 -17
  7. package/src/components/display/comments/AddCommentModal.vue +5 -2
  8. package/src/components/display/comments/CommentInput.vue +14 -9
  9. package/src/components/display/comments/CommentItem.vue +7 -3
  10. package/src/components/display/comments/CommentList.vue +1 -1
  11. package/src/components/display/comments/CommentPlayer.vue +7 -4
  12. package/src/components/display/comments/CommentSection.vue +7 -4
  13. package/src/components/display/emission/EmissionInlineList.vue +1 -1
  14. package/src/components/display/emission/EmissionItem.vue +3 -3
  15. package/src/components/display/emission/EmissionList.vue +5 -2
  16. package/src/components/display/emission/EmissionPlayerItem.vue +24 -18
  17. package/src/components/display/filter/AdvancedSearch.vue +2 -2
  18. package/src/components/display/filter/CategorySearchFilter.vue +11 -11
  19. package/src/components/display/filter/ProductorSearch.vue +12 -11
  20. package/src/components/display/filter/RubriqueFilter.vue +13 -15
  21. package/src/components/display/list/ListPaginate.vue +1 -1
  22. package/src/components/display/live/LiveItem.vue +11 -9
  23. package/src/components/display/live/LiveList.vue +7 -7
  24. package/src/components/display/organisation/OrganisationChooser.vue +5 -3
  25. package/src/components/display/participant/ParticipantItem.vue +3 -3
  26. package/src/components/display/participant/ParticipantList.vue +4 -1
  27. package/src/components/display/playlist/PlaylistItem.vue +6 -3
  28. package/src/components/display/playlist/PlaylistList.vue +5 -3
  29. package/src/components/display/playlist/PodcastList.vue +1 -1
  30. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
  31. package/src/components/display/podcasts/AnimatorsItem.vue +5 -2
  32. package/src/components/display/podcasts/ParticipantDescription.vue +5 -2
  33. package/src/components/display/podcasts/PodcastImage.vue +15 -19
  34. package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
  35. package/src/components/display/podcasts/PodcastInlineListClassic.vue +6 -6
  36. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +15 -11
  37. package/src/components/display/podcasts/PodcastItem.vue +1 -1
  38. package/src/components/display/podcasts/PodcastItemInfo.vue +3 -3
  39. package/src/components/display/podcasts/PodcastList.vue +8 -3
  40. package/src/components/display/podcasts/PodcastModuleBox.vue +3 -3
  41. package/src/components/display/podcasts/PodcastPlayBar.vue +12 -11
  42. package/src/components/display/podcasts/PodcastSwiperList.vue +6 -6
  43. package/src/components/display/rubriques/RubriqueList.vue +13 -15
  44. package/src/components/display/sharing/QrCode.vue +10 -6
  45. package/src/components/display/sharing/ShareButtons.vue +1 -1
  46. package/src/components/display/sharing/ShareButtonsIntern.vue +1 -1
  47. package/src/components/display/sharing/ShareDistribution.vue +1 -1
  48. package/src/components/display/sharing/SharePlayer.vue +6 -3
  49. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  50. package/src/components/misc/Footer.vue +19 -12
  51. package/src/components/misc/HomeDropdown.vue +6 -3
  52. package/src/components/misc/LeftMenu.vue +18 -19
  53. package/src/components/misc/TopBar.vue +21 -24
  54. package/src/components/misc/modal/ClipboardModal.vue +1 -1
  55. package/src/components/misc/modal/NewsletterModal.vue +8 -5
  56. package/src/components/misc/player/Player.vue +16 -14
  57. package/src/components/misc/player/PlayerCompact.vue +4 -4
  58. package/src/components/misc/player/PlayerProgressBar.vue +8 -8
  59. package/src/components/misc/player/PlayerTimeline.vue +1 -1
  60. package/src/components/mixins/handle403.ts +6 -1
  61. package/src/components/mixins/imageProxy.ts +1 -1
  62. package/src/components/mixins/init.ts +7 -4
  63. package/src/components/mixins/orgaComputed.ts +4 -4
  64. package/src/components/mixins/organisationFilter.ts +8 -5
  65. package/src/components/mixins/player/playerComment.ts +24 -30
  66. package/src/components/mixins/player/playerDisplay.ts +38 -67
  67. package/src/components/mixins/player/playerLive.ts +16 -15
  68. package/src/components/mixins/player/playerLogic.ts +54 -64
  69. package/src/components/mixins/player/playerTranscript.ts +16 -10
  70. package/src/components/pages/Category.vue +7 -9
  71. package/src/components/pages/Emission.vue +3 -3
  72. package/src/components/pages/Emissions.vue +9 -6
  73. package/src/components/pages/Error403Page.vue +5 -2
  74. package/src/components/pages/Home.vue +13 -8
  75. package/src/components/pages/Lives.vue +11 -9
  76. package/src/components/pages/PageNotFound.vue +10 -5
  77. package/src/components/pages/Participant.vue +2 -2
  78. package/src/components/pages/Participants.vue +2 -2
  79. package/src/components/pages/Playlist.vue +2 -2
  80. package/src/components/pages/Playlists.vue +2 -2
  81. package/src/components/pages/Podcast.vue +7 -4
  82. package/src/components/pages/Podcasts.vue +9 -7
  83. package/src/components/pages/Search.vue +1 -1
  84. package/src/main.ts +6 -4
  85. package/src/stores/ApiStore.ts +65 -0
  86. package/src/stores/AuthStore.ts +43 -0
  87. package/src/stores/FilterStore.ts +63 -0
  88. package/src/stores/GeneralStore.ts +57 -0
  89. package/src/stores/PlayerStore.ts +134 -0
  90. package/src/{store → stores}/class/general/playlist.ts +1 -1
  91. package/tsconfig.json +0 -1
  92. package/src/store/ApiStore.ts +0 -33
  93. package/src/store/AppStore.ts +0 -76
  94. package/src/store/PlayerStore.ts +0 -87
  95. package/src/store/classStore/typeApiStore.ts +0 -43
  96. package/src/store/classStore/typeAppStore.ts +0 -81
  97. package/src/store/classStore/typeAuthStore.ts +0 -44
  98. package/src/store/classStore/typePlayerStore.ts +0 -15
  99. package/src/vuex-shim.d.ts +0 -8
  100. /package/src/{store/paramStore.ts → stores/ParamSdkStore.ts} +0 -0
  101. /package/src/{store → stores}/class/adserver/adserverConfig.ts +0 -0
  102. /package/src/{store → stores}/class/adserver/adserverOtherEmission.ts +0 -0
  103. /package/src/{store → stores}/class/adserver/adserverTiming.ts +0 -0
  104. /package/src/{store → stores}/class/cartouchier/cartouche.ts +0 -0
  105. /package/src/{store → stores}/class/cartouchier/cartouchier.ts +0 -0
  106. /package/src/{store → stores}/class/conference/conference.ts +0 -0
  107. /package/src/{store → stores}/class/conference/conferenceMessage.ts +0 -0
  108. /package/src/{store → stores}/class/conference/conferenceParticipant.ts +0 -0
  109. /package/src/{store → stores}/class/conference/pad.ts +0 -0
  110. /package/src/{store → stores}/class/conference/studioCall.ts +0 -0
  111. /package/src/{store → stores}/class/contract/contract.ts +0 -0
  112. /package/src/{store → stores}/class/contract/contractOrganisation.ts +0 -0
  113. /package/src/{store → stores}/class/ftp/ftpEmission.ts +0 -0
  114. /package/src/{store → stores}/class/ftp/ftpParam.ts +0 -0
  115. /package/src/{store → stores}/class/ftp/testFtpEmission.ts +0 -0
  116. /package/src/{store → stores}/class/general/audioView.ts +0 -0
  117. /package/src/{store → stores}/class/general/category.ts +0 -0
  118. /package/src/{store → stores}/class/general/classicSelectType.ts +0 -0
  119. /package/src/{store → stores}/class/general/comment.ts +0 -0
  120. /package/src/{store → stores}/class/general/customPlayer.ts +0 -0
  121. /package/src/{store → stores}/class/general/emission.ts +0 -0
  122. /package/src/{store → stores}/class/general/fetchParam.ts +0 -0
  123. /package/src/{store → stores}/class/general/initState.ts +0 -0
  124. /package/src/{store → stores}/class/general/interfacePageable.ts +0 -0
  125. /package/src/{store → stores}/class/general/ituneCategory.ts +0 -0
  126. /package/src/{store → stores}/class/general/listReturn.ts +0 -0
  127. /package/src/{store → stores}/class/general/media.ts +0 -0
  128. /package/src/{store → stores}/class/general/organisation.ts +0 -0
  129. /package/src/{store → stores}/class/general/pageable.ts +0 -0
  130. /package/src/{store → stores}/class/general/participant.ts +0 -0
  131. /package/src/{store → stores}/class/general/player.ts +0 -0
  132. /package/src/{store → stores}/class/general/podcast.ts +0 -0
  133. /package/src/{store → stores}/class/general/sortPageable.ts +0 -0
  134. /package/src/{store → stores}/class/general/soundcastCategory.ts +0 -0
  135. /package/src/{store → stores}/class/ouestFrance/ofTag.ts +0 -0
  136. /package/src/{store → stores}/class/ouestFrance/ofTagInfo.ts +0 -0
  137. /package/src/{store → stores}/class/ouestFrance/ofTagPage.ts +0 -0
  138. /package/src/{store → stores}/class/ouestFrance/ofTagSeo.ts +0 -0
  139. /package/src/{store → stores}/class/ouestFrance/ofTagVente.ts +0 -0
  140. /package/src/{store → stores}/class/ouestFrance/ofTagWithParents.ts +0 -0
  141. /package/src/{store → stores}/class/rss/aggregator.ts +0 -0
  142. /package/src/{store → stores}/class/rss/rssEmission.ts +0 -0
  143. /package/src/{store → stores}/class/rss/rssInfo.ts +0 -0
  144. /package/src/{store → stores}/class/rubrique/rubriquage.ts +0 -0
  145. /package/src/{store → stores}/class/rubrique/rubriquageFilter.ts +0 -0
  146. /package/src/{store → stores}/class/rubrique/rubrique.ts +0 -0
  147. /package/src/{store → stores}/class/stat/statArrayIncome.ts +0 -0
  148. /package/src/{store → stores}/class/stat/statArrayObject.ts +0 -0
  149. /package/src/{store → stores}/class/stat/statGraph.ts +0 -0
  150. /package/src/{store → stores}/class/user/person.ts +0 -0
  151. /package/src/{store → stores}/class/user/profile.ts +0 -0
  152. /package/src/{store → stores}/class/user/userKeycloak.ts +0 -0
@@ -36,7 +36,7 @@
36
36
  </template>
37
37
 
38
38
  <script lang="ts">
39
- import { state } from '../../../store/paramStore';
39
+ import { state } from '../../../stores/ParamSdkStore';
40
40
  import octopusApi from '@saooti/octopus-api';
41
41
  import Snackbar from '../../misc/Snackbar.vue';
42
42
  import displayMethods from '../../mixins/displayMethods';
@@ -80,11 +80,13 @@
80
80
 
81
81
  <script lang="ts">
82
82
  import { orgaComputed } from '../../mixins/orgaComputed';
83
- import { state } from '../../../store/paramStore';
83
+ import { state } from '../../../stores/ParamSdkStore';
84
84
  import octopusApi from '@saooti/octopus-api';
85
85
  import { Podcast } from '@/store/class/general/podcast';
86
86
  import { Emission } from '@/store/class/general/emission';
87
87
  import { Playlist } from '@/store/class/general/playlist';
88
+ import { useAuthStore } from '@/stores/AuthStore';
89
+ import { mapState } from 'pinia';
88
90
  import { defineComponent, defineAsyncComponent } from 'vue';
89
91
  const ShareModalPlayer = defineAsyncComponent(() => import('../../misc/modal/ShareModalPlayer.vue'));
90
92
  const PlayerParameters = defineAsyncComponent(() => import('./PlayerParameters.vue'));
@@ -128,6 +130,7 @@ export default defineComponent({
128
130
  },
129
131
 
130
132
  computed: {
133
+ ...mapState(useAuthStore, ['authOrganisation']),
131
134
  displayArticleParam():boolean{
132
135
  return undefined!==this.podcast && undefined!==this.podcast.article && 0 !== this.podcast.article.length;
133
136
  },
@@ -299,8 +302,8 @@ export default defineComponent({
299
302
  return url;
300
303
  },
301
304
  async fetchOrgaAttributes(): Promise<void>{
302
- if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
303
- this.orgaAttributes = this.$store.state.auth?.organisation.attributes;
305
+ if(""!==this.authOrganisation.id && this.authOrganisation.attributes && Object.keys(this.authOrganisation.attributes).length > 1){
306
+ this.orgaAttributes = this.authOrganisation.attributes;
304
307
  }else{
305
308
  this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
306
309
  }
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
 
35
35
  <script lang="ts">
36
- import { state } from '../../../store/paramStore';
36
+ import { state } from '../../../stores/ParamSdkStore';
37
37
  import octopusApi from '@saooti/octopus-api';
38
38
  import { Podcast } from '@/store/class/general/podcast';
39
39
  import { CustomPlayer } from '@/store/class/general/customPlayer';
@@ -62,9 +62,12 @@
62
62
  <script lang="ts">
63
63
  import cookies from '../mixins/cookies';
64
64
  import ClassicSelect from '../form/ClassicSelect.vue';
65
- import { state } from '../../store/paramStore';
65
+ import { state } from '../../stores/ParamSdkStore';
66
66
  import {loadLocaleMessages} from '@/i18n';
67
67
  import octopusApi from '@saooti/octopus-api';
68
+ import { useFilterStore } from '@/stores/FilterStore';
69
+ import { useGeneralStore } from '@/stores/GeneralStore';
70
+ import { mapState, mapActions } from 'pinia';
68
71
  import { Category } from '@/store/class/general/category';
69
72
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
70
73
  import { defineComponent } from 'vue'
@@ -81,6 +84,8 @@ export default defineComponent({
81
84
  };
82
85
  },
83
86
  computed: {
87
+ ...mapState(useGeneralStore, ['storedCategories', 'platformEducation']),
88
+ ...mapState(useFilterStore, ['filterRubrique', 'filterOrgaId', 'filterIab']),
84
89
  routerLinkSecondArray(){
85
90
  return [
86
91
  {title : this.$t('Contact'), routeName: '/main/pub/contact'},
@@ -94,8 +99,8 @@ export default defineComponent({
94
99
  return state.footer.contactLink;
95
100
  },
96
101
  rubriqueQueryParam(): string|undefined{
97
- if(this.$store.state.filter?.rubriqueFilter?.length){
98
- return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
102
+ if(this.filterRubrique?.length){
103
+ return this.filterRubrique.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
99
104
  }
100
105
  return undefined;
101
106
  },
@@ -106,25 +111,27 @@ export default defineComponent({
106
111
  }
107
112
  },
108
113
  methods: {
114
+ ...mapActions(useGeneralStore, ['storedUpdateCategories']),
115
+ ...mapActions(useFilterStore, ['filterUpdateIab']),
109
116
  getQueriesRouter(routeName: string){
110
117
  if('podcasts' !== routeName && 'emissions' !== routeName && 'home' !== routeName){
111
- return { productor: this.$store.state.filter.organisationId};
118
+ return { productor: this.filterOrgaId};
112
119
  }
113
- return { productor: this.$store.state.filter.organisationId,
114
- iabId: this.$store.state.filter.iab?.id,
120
+ return { productor: this.filterOrgaId,
121
+ iabId: this.filterIab?.id,
115
122
  rubriquesId: this.rubriqueQueryParam}
116
123
  },
117
124
  changeLanguage(): void{
118
125
  this.setCookie('octopus-language', this.language);
119
- loadLocaleMessages(this.$i18n, this.language, this.$store.state.general.isEducation);
126
+ loadLocaleMessages(this.$i18n, this.language, this.platformEducation);
120
127
  octopusApi.fetchDataWithParams<Array<Category>>(0, `iab/list${state.octopusApi.organisationId? '/'+state.octopusApi.organisationId : ''}`, { lang: this.$i18n.locale }).then((data: Array<Category>) => {
121
- this.$store.commit('categoriesSet', data);
122
- if(this.$store.state.filter.iab){
123
- const category = this.$store.state.categories.filter((c: Category) => {
124
- return c.id === this.$store.state.filter.iab.id;
128
+ this.storedUpdateCategories(data);
129
+ if(this.filterIab){
130
+ const category = this.storedCategories.filter((c: Category) => {
131
+ return c.id === this.filterIab?.id;
125
132
  });
126
133
  if(category.length){
127
- this.$store.commit('filterIab', category[0]);
134
+ this.filterUpdateIab(category[0]);
128
135
  }
129
136
  }
130
137
  });
@@ -86,9 +86,11 @@
86
86
  </template>
87
87
 
88
88
  <script lang="ts">
89
- import { state } from '../../store/paramStore';
89
+ import { state } from '../../stores/ParamSdkStore';
90
90
  import Popover from '../misc/Popover.vue';
91
- import { defineComponent } from 'vue'
91
+ import { useAuthStore } from '@/stores/AuthStore';
92
+ import { mapState } from 'pinia';
93
+ import { defineComponent } from 'vue';
92
94
  import { Organisation } from '@/store/class/general/organisation';
93
95
  export default defineComponent({
94
96
  name: 'HomeDropdown',
@@ -99,8 +101,9 @@ export default defineComponent({
99
101
  isEducation: { default: false, type: Boolean},
100
102
  },
101
103
  computed: {
104
+ ...mapState(useAuthStore, ['authProfile']),
102
105
  organisationsAvailable(): Array<Organisation>{
103
- return this.$store.state.auth?.profile.organisations?? [];
106
+ return this.authProfile.organisations?? [];
104
107
  },
105
108
  helpLinks(){
106
109
  return [
@@ -36,7 +36,7 @@
36
36
  :to="{
37
37
  name: 'category',
38
38
  params: { iabId: category.id },
39
- query: { productor: $store.state.filter.organisationId },
39
+ query: { productor: filterOrgaId },
40
40
  }"
41
41
  @click="onMenuClick"
42
42
  >
@@ -46,11 +46,14 @@
46
46
  </template>
47
47
 
48
48
  <script lang="ts">
49
- import { state } from '../../store/paramStore';
49
+ import { state } from '../../stores/ParamSdkStore';
50
50
  import orgaFilter from '../mixins/organisationFilter';
51
51
  import { Category } from '@/store/class/general/category';
52
52
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
53
53
  import { defineComponent, defineAsyncComponent } from 'vue';
54
+ import { useFilterStore } from '@/stores/FilterStore';
55
+ import { useGeneralStore } from '@/stores/GeneralStore';
56
+ import { mapState } from 'pinia';
54
57
  import { Organisation } from '@/store/class/general/organisation';
55
58
  const OrganisationChooserLight = defineAsyncComponent(() => import('../display/organisation/OrganisationChooserLight.vue'));
56
59
  export default defineComponent({
@@ -70,18 +73,20 @@ export default defineComponent({
70
73
  };
71
74
  },
72
75
  computed: {
76
+ ...mapState(useGeneralStore, ['storedCategories']),
77
+ ...mapState(useFilterStore, ['filterLive', 'filterOrgaId', 'filterIab', 'filterRubrique']),
73
78
  routerLinkArray(){
74
79
  return [
75
80
  {title : this.$t('Home'), routeName: 'home', condition : true},
76
- {title : this.$t('Live'), routeName: 'lives', condition : state.generalParameters.isLiveTab &&((this.filterOrga && this.filterOrgaLive) || !this.filterOrga)},
81
+ {title : this.$t('Live'), routeName: 'lives', condition : state.generalParameters.isLiveTab &&((this.filterOrgaId && this.filterLive) || !this.filterOrgaId)},
77
82
  {title : this.$t('Podcasts'), routeName: 'podcasts', condition : true},
78
83
  {title : this.$t('Emissions'), routeName: 'emissions', condition : true},
79
- {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && (!this.filterOrga || this.isEducation)},
84
+ {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && (!this.filterOrgaId || this.isEducation)},
80
85
  {title : this.$t('Playlists'), routeName: 'playlists', condition : true},
81
86
  {title : this.$t('Speakers'), routeName: 'participants', condition : true},]
82
87
  },
83
88
  categories(): Array<Category> {
84
- return this.$store.state.categories.filter((c: Category) => {
89
+ return this.storedCategories.filter((c: Category) => {
85
90
  if (this.isPodcastmaker) return c.podcastOrganisationCount;
86
91
  return c.podcastCount;
87
92
  });
@@ -89,25 +94,19 @@ export default defineComponent({
89
94
  isPodcastmaker(): boolean {
90
95
  return (state.generalParameters.podcastmaker as boolean);
91
96
  },
92
- filterOrga(): string {
93
- return this.$store.state.filter.organisationId;
94
- },
95
- filterOrgaLive(): string {
96
- return this.$store.state.filter.live;
97
- },
98
97
  rubriqueQueryParam(): string|undefined{
99
- if(this.$store.state.filter?.rubriqueFilter?.length){
100
- return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
98
+ if(this.filterRubrique?.length){
99
+ return this.filterRubrique.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
101
100
  }
102
101
  return undefined;
103
102
  },
104
103
  },
105
104
  watch: {
106
- filterOrga: {
105
+ filterOrgaId: {
107
106
  immediate: true,
108
107
  handler() {
109
- if (this.filterOrga) {
110
- this.organisationId = this.filterOrga;
108
+ if (this.filterOrgaId) {
109
+ this.organisationId = this.filterOrgaId;
111
110
  } else {
112
111
  this.reset = !this.reset;
113
112
  }
@@ -118,10 +117,10 @@ export default defineComponent({
118
117
  methods: {
119
118
  getQueriesRouter(routeName: string){
120
119
  if('podcasts' !== routeName && 'emissions' !== routeName && 'home' !== routeName){
121
- return { productor: this.$store.state.filter.organisationId};
120
+ return { productor: this.filterOrgaId};
122
121
  }
123
- return { productor: this.$store.state.filter.organisationId,
124
- iabId: this.$store.state.filter.iab?.id,
122
+ return { productor: this.filterOrgaId,
123
+ iabId: this.filterIab?.id,
125
124
  rubriquesId: this.rubriqueQueryParam}
126
125
  },
127
126
  onMenuClick() {
@@ -7,15 +7,15 @@
7
7
  class="top-bar-logo"
8
8
  :to="{
9
9
  name: 'home',
10
- query: { productor: $store.state.filter.organisationId,
11
- iabId: $store.state.filter.iab?.id ,
10
+ query: { productor: filterOrgaId,
11
+ iabId: filterIab?.id ,
12
12
  rubriquesId: rubriqueQueryParam},
13
13
  }"
14
14
  @click="onDisplayMenu(true)"
15
15
  >
16
16
  <img
17
- :src="!filterOrga || '' === imgUrl ? logoUrl : proxyImageUrl(imgUrl, '', '50')"
18
- :alt="!filterOrga || '' === imgUrl ? $t('Logo of main page') : $t('Visual', {name: $store.state.filter?.name})"
17
+ :src="!filterOrgaId || '' === imgUrl ? logoUrl : proxyImageUrl(imgUrl, '', '50')"
18
+ :alt="!filterOrgaId || '' === imgUrl ? $t('Logo of main page') : $t('Visual', {name: filterName})"
19
19
  :class="isEducation ? 'educationLogo' : ''"
20
20
  >
21
21
  </router-link>
@@ -61,7 +61,7 @@
61
61
  :title="$t('Search')"
62
62
  :to="{
63
63
  name: 'podcasts',
64
- query: { productor: $store.state.filter.organisationId },
64
+ query: { productor: filterOrgaId },
65
65
  }"
66
66
  class="btn admin-button m-1 saooti-search"
67
67
  />
@@ -71,11 +71,13 @@
71
71
  </template>
72
72
 
73
73
  <script lang="ts">
74
- import { state } from '../../store/paramStore';
74
+ import { state } from '../../stores/ParamSdkStore';
75
75
  import HomeDropdown from './HomeDropdown.vue';
76
76
  import { Organisation } from '@/store/class/general/organisation';
77
77
  import orgaFilter from '../mixins/organisationFilter';
78
78
  import imageProxy from '../mixins/imageProxy';
79
+ import { useFilterStore } from '@/stores/FilterStore';
80
+ import { mapState } from 'pinia';
79
81
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
80
82
  import { defineComponent,defineAsyncComponent } from 'vue';
81
83
  const OrganisationChooserLight = defineAsyncComponent(() => import('../display/organisation/OrganisationChooserLight.vue'));
@@ -101,18 +103,19 @@ export default defineComponent({
101
103
  };
102
104
  },
103
105
  computed: {
106
+ ...mapState(useFilterStore, ['filterLive', 'filterOrgaId', 'filterImgUrl', 'filterIab', 'filterRubrique', 'filterName']),
104
107
  routerLinkArray(){
105
108
  return [
106
- {title : this.$t('Live'), routeName: 'lives', condition : (state.generalParameters.isLiveTab as boolean) &&((this.filterOrga && this.filterOrgaLive) || !this.filterOrga)},
109
+ {title : this.$t('Live'), routeName: 'lives', condition : (state.generalParameters.isLiveTab as boolean) &&((this.filterOrgaId && this.filterLive) || !this.filterOrgaId)},
107
110
  {title : this.$t('Podcasts'), routeName: 'podcasts', condition : true},
108
111
  {title : this.$t('Emissions'), routeName: 'emissions', condition : true},
109
112
  {title : this.$t('Speakers'), routeName: 'participants', condition : true},
110
113
  {title : this.$t('Playlists'), routeName: 'playlists', condition : true},
111
- {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && (!this.filterOrga || this.isEducation)}]
114
+ {title : this.$t('Productors'), routeName: 'productors', condition : !this.isPodcastmaker && (!this.filterOrgaId || this.isEducation)}]
112
115
  },
113
116
  rubriqueQueryParam(): string|undefined{
114
- if(this.$store.state.filter?.rubriqueFilter?.length){
115
- return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
117
+ if(this.filterRubrique?.length){
118
+ return this.filterRubrique.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
116
119
  }
117
120
  return undefined;
118
121
  },
@@ -122,24 +125,18 @@ export default defineComponent({
122
125
  isPodcastmaker(): boolean {
123
126
  return (state.generalParameters.podcastmaker as boolean);
124
127
  },
125
- filterOrga(): string {
126
- return this.$store.state.filter.organisationId;
127
- },
128
- filterOrgaLive(): string {
129
- return this.$store.state.filter.live;
130
- },
131
128
  imgUrl(): string {
132
- if (!this.$store.state.filter.imgUrl?.includes('emptypodcast'))
133
- return `${this.$store.state.filter.imgUrl}`;
129
+ if (!this.filterImgUrl?.includes('emptypodcast'))
130
+ return `${this.filterImgUrl}`;
134
131
  return '';
135
132
  },
136
133
  },
137
134
  watch: {
138
- filterOrga: {
135
+ filterOrgaId: {
139
136
  immediate: true,
140
137
  handler() {
141
- if (this.filterOrga) {
142
- this.organisationId = this.filterOrga;
138
+ if (this.filterOrgaId) {
139
+ this.organisationId = this.filterOrgaId;
143
140
  } else {
144
141
  this.reset = !this.reset;
145
142
  }
@@ -155,10 +152,10 @@ export default defineComponent({
155
152
  methods: {
156
153
  getQueriesRouter(routeName: string){
157
154
  if('podcasts' !== routeName && 'emissions' !== routeName){
158
- return { productor: this.$store.state.filter.organisationId};
155
+ return { productor: this.filterOrgaId};
159
156
  }
160
- return { productor: this.$store.state.filter.organisationId,
161
- iabId: this.$store.state.filter.iab?.id,
157
+ return { productor: this.filterOrgaId,
158
+ iabId: this.filterIab?.id,
162
159
  rubriquesId: this.rubriqueQueryParam}
163
160
  },
164
161
  handleScroll(): void {
@@ -29,7 +29,7 @@ import ClassicModal from '../modal/ClassicModal.vue';
29
29
  import { Emission } from '@/store/class/general/emission';
30
30
  import displayMethods from '../../mixins/displayMethods';
31
31
  import { defineComponent, defineAsyncComponent } from 'vue';
32
- import { state } from '../../../store/paramStore';
32
+ import { state } from '../../../stores/ParamSdkStore';
33
33
  const RssSection = defineAsyncComponent(() => import('@/components/display/aggregator/RssSection.vue'));
34
34
  export default defineComponent({
35
35
  name: 'ClipboardModal',
@@ -99,8 +99,10 @@ import humanizeDuration from 'humanize-duration';
99
99
  import displayMethods from '../../mixins/displayMethods';
100
100
  import { Participant } from '@/store/class/general/participant';
101
101
  import { Podcast } from '@/store/class/general/podcast';
102
- import { state } from '../../../store/paramStore';
103
- import { defineComponent } from 'vue'
102
+ import { state } from '../../../stores/ParamSdkStore';
103
+ import { defineComponent } from 'vue';
104
+ import { useAuthStore } from '@/stores/AuthStore';
105
+ import { mapState } from 'pinia';
104
106
  import octopusApi from '@saooti/octopus-api';
105
107
  import { Emission } from '@/store/class/general/emission';
106
108
  import { Playlist } from '@/store/class/general/playlist';
@@ -135,6 +137,7 @@ export default defineComponent({
135
137
  },
136
138
 
137
139
  computed: {
140
+ ...mapState(useAuthStore, ['authOrganisation']),
138
141
  date(): string {
139
142
  if(!this.podcast || 1970 === dayjs(this.podcast.pubDate).year()){return '';}
140
143
  return dayjs(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
@@ -293,8 +296,8 @@ export default defineComponent({
293
296
  },
294
297
  async initData(): Promise<void> {
295
298
  let attributes;
296
- if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
297
- attributes = this.$store.state.auth?.organisation.attributes;
299
+ if(""!==this.authOrganisation.id && this.authOrganisation.attributes && Object.keys(this.authOrganisation.attributes).length > 1){
300
+ attributes = this.authOrganisation.attributes;
298
301
  }else{
299
302
  attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
300
303
  }
@@ -306,7 +309,7 @@ export default defineComponent({
306
309
  return;
307
310
  }
308
311
  if (Object.prototype.hasOwnProperty.call(attributes,'COLOR')) {
309
- this.color = attributes.COLOR;
312
+ this.color = (attributes.COLOR as string);
310
313
  }
311
314
  },
312
315
  },
@@ -7,7 +7,7 @@
7
7
  <template v-if="display">
8
8
  <audio
9
9
  id="audio-player"
10
- :src="!live && !radio? audioUrlToPlay: undefined"
10
+ :src="!playerLive && !playerRadio? audioUrlToPlay: undefined"
11
11
  autoplay
12
12
  @timeupdate="onTimeUpdate"
13
13
  @ended="onFinished"
@@ -46,12 +46,12 @@
46
46
  </div>
47
47
  </template>
48
48
  <script lang="ts">
49
- import { mapState } from 'vuex';
50
49
  import { CommentPodcast } from '@/store/class/general/comment';
51
50
  import { playerLogic } from '../../mixins/player/playerLogic';
52
- import { StoreState } from '@/store/classStore/typeAppStore';
53
51
  import PlayerCompact from '../player/PlayerCompact.vue';
54
52
  import PlayerLarge from '../player/PlayerLarge.vue';
53
+ import { usePlayerStore } from '@/stores/PlayerStore';
54
+ import { mapState, mapActions } from 'pinia';
55
55
  import { defineComponent } from 'vue';
56
56
  export default defineComponent({
57
57
  name: 'Player',
@@ -82,16 +82,17 @@ export default defineComponent({
82
82
  };
83
83
  },
84
84
  computed: {
85
- ...mapState({
86
- display: (state: StoreState) => 'STOPPED' !== state.player.status,
87
- playerHeight(state: StoreState) {
88
- if ('STOPPED' === state.player.status || this.forceHide) return 0;
89
- if (this.largeVersion) return '27rem';
90
- if (window.innerWidth > 450 && !this.showTimeline) return '5rem';
91
- if (window.innerWidth > 450 && this.showTimeline) return '6rem';
92
- return '3.5rem';
93
- },
94
- }),
85
+ ...mapState(usePlayerStore, ['playerStatus']),
86
+ display(){
87
+ return 'STOPPED' !== this.playerStatus;
88
+ },
89
+ playerHeight() {
90
+ if ('STOPPED' === this.playerStatus || this.forceHide) return 0;
91
+ if (this.largeVersion) return '27rem';
92
+ if (window.innerWidth > 450 && !this.showTimeline) return '5rem';
93
+ if (window.innerWidth > 450 && this.showTimeline) return '6rem';
94
+ return '3.5rem';
95
+ },
95
96
  },
96
97
 
97
98
  watch: {
@@ -101,9 +102,10 @@ export default defineComponent({
101
102
  },
102
103
 
103
104
  methods: {
105
+ ...mapActions(usePlayerStore, ['playerPlay']),
104
106
  onHidden(): void {
105
107
  if (this.forceHide) {
106
- this.$store.commit('player/playPodcast');
108
+ this.playerPlay();
107
109
  this.forceHide = false;
108
110
  }
109
111
  },
@@ -33,7 +33,7 @@
33
33
  <div class="text-light player-grow-content">
34
34
  <div
35
35
  class="d-flex"
36
- :class="!radio?'mb-1':''"
36
+ :class="!radioUrl?'mb-1':''"
37
37
  >
38
38
  <div
39
39
  v-if="playerError"
@@ -45,14 +45,14 @@
45
45
  {{ podcastTitle }}
46
46
  </div>
47
47
  <div
48
- v-if="!playerError && !radio"
48
+ v-if="!playerError && !radioUrl"
49
49
  class="hide-phone"
50
50
  >
51
51
  {{ playedTime }} / {{ totalTime }}
52
52
  </div>
53
53
  </div>
54
54
  <PlayerProgressBar
55
- v-if="!radio"
55
+ v-if="!radioUrl"
56
56
  :hls-ready="hlsReady"
57
57
  :show-timeline="showTimeline"
58
58
  :comments="comments"
@@ -76,7 +76,7 @@
76
76
  @click="stopPlayer"
77
77
  />
78
78
  <PlayerTimeline
79
- v-if="!radio"
79
+ v-if="!radioUrl"
80
80
  v-model:showTimeline="showTimeline"
81
81
  :comments="comments"
82
82
  />
@@ -9,7 +9,7 @@
9
9
  />
10
10
  <CommentPlayer
11
11
  v-if="showTimeline"
12
- :total-time="totalSecondes"
12
+ :total-time="playerTotal"
13
13
  :comments="comments"
14
14
  />
15
15
  </template>
@@ -17,6 +17,8 @@
17
17
  <script lang="ts">
18
18
  import ProgressBar from '../ProgressBar.vue'
19
19
  import { CommentPodcast } from '@/store/class/general/comment';
20
+ import { usePlayerStore } from '@/stores/PlayerStore';
21
+ import { mapState } from 'pinia';
20
22
  import { defineComponent, defineAsyncComponent } from 'vue';
21
23
  const CommentPlayer = defineAsyncComponent(() => import('../../display/comments/CommentPlayer.vue'));
22
24
  export default defineComponent({
@@ -40,12 +42,10 @@ export default defineComponent({
40
42
  emits: ['updateNotListenTime'],
41
43
 
42
44
  computed: {
45
+ ...mapState(usePlayerStore, ['playerElapsed', 'playerTotal', 'playerPodcast', 'playerLive']),
43
46
  percentProgress(): number{
44
- if(!this.$store.state.player.elapsed){return 0;}
45
- return this.$store.state.player.elapsed * 100;
46
- },
47
- totalSecondes(): number{
48
- return this.$store.state.player.total;
47
+ if(!this.playerElapsed){return 0;}
48
+ return this.playerElapsed * 100;
49
49
  },
50
50
  },
51
51
 
@@ -59,11 +59,11 @@ export default defineComponent({
59
59
  const x = event.clientX - rect.left;
60
60
  const percentPosition = x / barWidth;
61
61
  if (percentPosition * 100 >= this.percentLiveProgress) return;
62
- const seekTime = this.$store.state.player.total * percentPosition;
62
+ const seekTime = this.playerTotal * percentPosition;
63
63
  this.isSeekTo(audioPlayer, seekTime);
64
64
  },
65
65
  isSeekTo(audioPlayer: HTMLAudioElement, seekTime: number): void {
66
- if (this.$store.state.player.podcast || this.$store.state.player.live) {
66
+ if (this.playerPodcast || this.playerLive) {
67
67
  this.$emit('updateNotListenTime',seekTime - this.listenTime);
68
68
  }
69
69
  audioPlayer.currentTime = seekTime;
@@ -13,7 +13,7 @@
13
13
  </template>
14
14
 
15
15
  <script lang="ts">
16
- import { state } from '../../../store/paramStore';
16
+ import { state } from '../../../stores/ParamSdkStore';
17
17
  import { defineComponent } from 'vue';
18
18
  import { CommentPodcast } from '@/store/class/general/comment';
19
19
  export default defineComponent({
@@ -1,10 +1,15 @@
1
1
  import { AxiosError } from 'axios';
2
2
  import { defineComponent } from 'vue';
3
+ import { useAuthStore } from '@/stores/AuthStore';
4
+ import { mapState } from 'pinia';
3
5
  export const handle403 = defineComponent({
6
+ computed: {
7
+ ...mapState(useAuthStore, ['authOrgaId']),
8
+ },
4
9
  methods: {
5
10
  handle403(error: AxiosError): void {
6
11
  if (403 === error.response?.status) {
7
- if(undefined===this.$store.state.auth){
12
+ if(undefined===this.authOrgaId){
8
13
  window.location.href = window.location.origin + "/sso/login";
9
14
  }else{
10
15
  this.$router.push({
@@ -1,4 +1,4 @@
1
- import { state } from '../../store/paramStore';
1
+ import { state } from '../../stores/ParamSdkStore';
2
2
  export default {
3
3
  methods: {
4
4
  proxyImageUrl(url:string, width:string, height?:string): string{
@@ -1,19 +1,22 @@
1
1
 
2
- import { Category } from "@/store/class/general/category";
2
+ import { Category } from "@/stores/class/general/category";
3
3
  import orgaFilter from '../mixins/organisationFilter';
4
4
  import octopusApi from '@saooti/octopus-api';
5
- import { state } from '../../store/paramStore';
5
+ import { state } from '../../stores/ParamSdkStore';
6
+ import { useGeneralStore } from '@/stores/GeneralStore';
7
+ import { mapActions } from 'pinia';
6
8
  import { defineComponent } from 'vue';
7
9
  export default defineComponent({
8
10
  mixins: [orgaFilter],
9
11
  methods: {
12
+ ...mapActions(useGeneralStore, ['storedUpdateCategories']),
10
13
  async initSdk() {
11
14
  if (0 === (state.generalParameters.allCategories as Array<Category>).length) {
12
15
  octopusApi.fetchDataWithParams<Array<Category>>(0, `iab/list${state.octopusApi.organisationId? '/'+state.octopusApi.organisationId : ''}`, { lang: this.$i18n.locale }).then((data: Array<Category>) => {
13
- this.$store.commit('categoriesSet', data);
16
+ this.storedUpdateCategories(data);
14
17
  });
15
18
  }else{
16
- this.$store.commit('categoriesSet', (state.generalParameters.allCategories as Array<Category>));
19
+ this.storedUpdateCategories((state.generalParameters.allCategories as Array<Category>));
17
20
  }
18
21
  const captcha = (document.getElementsByClassName('grecaptcha-badge')[0] as HTMLElement);
19
22
  if (captcha) {
@@ -1,15 +1,15 @@
1
- import { state } from '../../store/paramStore';
1
+ import { state } from '../../stores/ParamSdkStore';
2
+ import { useFilterStore } from '@/stores/FilterStore';
3
+ import { mapState } from 'pinia';
2
4
  import { defineComponent } from 'vue';
3
5
  export const orgaComputed = defineComponent({
4
6
  computed: {
7
+ ...mapState(useFilterStore, ['filterOrgaId']),
5
8
  myOrganisationId(): string|undefined {
6
9
  return state.generalParameters.organisationId;
7
10
  },
8
11
  authenticated(): boolean {
9
12
  return (state.generalParameters.authenticated as boolean);
10
- },
11
- filterOrga(): string {
12
- return this.$store.state.filter.organisationId;
13
13
  },
14
14
  },
15
15
  });