@saooti/octopus-sdk 35.1.7 → 35.2.1

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 (167) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +21 -12
  3. package/src/api/classicCrud.ts +6 -7
  4. package/src/components/display/categories/CategoryChooser.vue +5 -3
  5. package/src/components/display/categories/CategoryFilter.vue +25 -28
  6. package/src/components/display/categories/CategoryList.vue +19 -18
  7. package/src/components/display/comments/AddCommentModal.vue +5 -2
  8. package/src/components/display/comments/CommentBasicView.vue +1 -1
  9. package/src/components/display/comments/CommentInput.vue +17 -12
  10. package/src/components/display/comments/CommentItem.vue +10 -6
  11. package/src/components/display/comments/CommentList.vue +5 -5
  12. package/src/components/display/comments/CommentParentInfo.vue +1 -1
  13. package/src/components/display/comments/CommentPlayer.vue +8 -5
  14. package/src/components/display/comments/CommentSection.vue +10 -7
  15. package/src/components/display/edit/EditBox.vue +1 -1
  16. package/src/components/display/edit/EditCommentBox.vue +1 -1
  17. package/src/components/display/emission/EmissionChooser.vue +1 -1
  18. package/src/components/display/emission/EmissionInlineList.vue +4 -4
  19. package/src/components/display/emission/EmissionItem.vue +5 -5
  20. package/src/components/display/emission/EmissionList.vue +9 -6
  21. package/src/components/display/emission/EmissionPlayerItem.vue +26 -20
  22. package/src/components/display/filter/AdvancedSearch.vue +3 -3
  23. package/src/components/display/filter/CategorySearchFilter.vue +11 -11
  24. package/src/components/display/filter/ProductorSearch.vue +13 -12
  25. package/src/components/display/filter/RubriqueChoice.vue +2 -2
  26. package/src/components/display/filter/RubriqueFilter.vue +15 -17
  27. package/src/components/display/list/ListPaginate.vue +1 -1
  28. package/src/components/display/live/LiveHorizontalList.vue +1 -1
  29. package/src/components/display/live/LiveItem.vue +13 -11
  30. package/src/components/display/live/LiveList.vue +8 -8
  31. package/src/components/display/organisation/OrganisationChooser.vue +6 -4
  32. package/src/components/display/organisation/OrganisationChooserLight.vue +1 -1
  33. package/src/components/display/participant/ParticipantItem.vue +5 -5
  34. package/src/components/display/participant/ParticipantList.vue +5 -2
  35. package/src/components/display/playlist/PlaylistItem.vue +7 -4
  36. package/src/components/display/playlist/PlaylistList.vue +6 -4
  37. package/src/components/display/playlist/PodcastList.vue +3 -3
  38. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +3 -3
  39. package/src/components/display/podcasts/AnimatorsItem.vue +6 -3
  40. package/src/components/display/podcasts/ParticipantDescription.vue +6 -3
  41. package/src/components/display/podcasts/PodcastFilterList.vue +2 -2
  42. package/src/components/display/podcasts/PodcastImage.vue +17 -21
  43. package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
  44. package/src/components/display/podcasts/PodcastInlineListClassic.vue +7 -7
  45. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +17 -13
  46. package/src/components/display/podcasts/PodcastItem.vue +2 -2
  47. package/src/components/display/podcasts/PodcastItemInfo.vue +4 -4
  48. package/src/components/display/podcasts/PodcastList.vue +10 -5
  49. package/src/components/display/podcasts/PodcastModuleBox.vue +5 -5
  50. package/src/components/display/podcasts/PodcastPlayBar.vue +12 -11
  51. package/src/components/display/podcasts/PodcastSwiperList.vue +7 -7
  52. package/src/components/display/rubriques/RubriqueChooser.vue +1 -1
  53. package/src/components/display/rubriques/RubriqueList.vue +16 -18
  54. package/src/components/display/sharing/QrCode.vue +10 -6
  55. package/src/components/display/sharing/ShareButtons.vue +4 -4
  56. package/src/components/display/sharing/ShareButtonsIntern.vue +4 -4
  57. package/src/components/display/sharing/ShareDistribution.vue +2 -2
  58. package/src/components/display/sharing/SharePlayer.vue +9 -6
  59. package/src/components/display/sharing/SharePlayerTypes.vue +6 -6
  60. package/src/components/display/sharing/SubscribeButtons.vue +1 -1
  61. package/src/components/misc/Footer.vue +21 -14
  62. package/src/components/misc/HomeDropdown.vue +7 -4
  63. package/src/components/misc/LeftMenu.vue +21 -22
  64. package/src/components/misc/TopBar.vue +23 -26
  65. package/src/components/misc/modal/ClipboardModal.vue +2 -2
  66. package/src/components/misc/modal/NewsletterModal.vue +12 -9
  67. package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
  68. package/src/components/misc/player/Player.vue +17 -15
  69. package/src/components/misc/player/PlayerCompact.vue +5 -5
  70. package/src/components/misc/player/PlayerLarge.vue +1 -1
  71. package/src/components/misc/player/PlayerProgressBar.vue +9 -9
  72. package/src/components/misc/player/PlayerTimeline.vue +2 -2
  73. package/src/components/mixins/handle403.ts +6 -1
  74. package/src/components/mixins/imageProxy.ts +1 -1
  75. package/src/components/mixins/init.ts +7 -4
  76. package/src/components/mixins/orgaComputed.ts +4 -4
  77. package/src/components/mixins/organisationFilter.ts +8 -5
  78. package/src/components/mixins/player/playerComment.ts +24 -33
  79. package/src/components/mixins/player/playerDisplay.ts +38 -67
  80. package/src/components/mixins/player/playerLive.ts +16 -15
  81. package/src/components/mixins/player/playerLogic.ts +54 -64
  82. package/src/components/mixins/player/playerTranscript.ts +16 -10
  83. package/src/components/pages/Category.vue +8 -10
  84. package/src/components/pages/Emission.vue +3 -3
  85. package/src/components/pages/Emissions.vue +10 -7
  86. package/src/components/pages/Error403Page.vue +5 -2
  87. package/src/components/pages/Home.vue +17 -12
  88. package/src/components/pages/Lives.vue +13 -11
  89. package/src/components/pages/PageNotFound.vue +11 -6
  90. package/src/components/pages/Participant.vue +3 -3
  91. package/src/components/pages/Participants.vue +2 -2
  92. package/src/components/pages/Playlist.vue +3 -3
  93. package/src/components/pages/Playlists.vue +2 -2
  94. package/src/components/pages/Podcast.vue +11 -8
  95. package/src/components/pages/Podcasts.vue +11 -9
  96. package/src/components/pages/Rubrique.vue +1 -1
  97. package/src/components/pages/Search.vue +1 -1
  98. package/src/main.ts +6 -4
  99. package/src/stores/ApiStore.ts +65 -0
  100. package/src/stores/AuthStore.ts +43 -0
  101. package/src/stores/CommentStore.ts +40 -0
  102. package/src/stores/FilterStore.ts +63 -0
  103. package/src/stores/GeneralStore.ts +40 -0
  104. package/src/stores/PlayerStore.ts +134 -0
  105. package/src/{store → stores}/class/general/playlist.ts +1 -1
  106. package/tsconfig.json +0 -1
  107. package/src/store/ApiStore.ts +0 -33
  108. package/src/store/AppStore.ts +0 -76
  109. package/src/store/PlayerStore.ts +0 -87
  110. package/src/store/classStore/typeApiStore.ts +0 -43
  111. package/src/store/classStore/typeAppStore.ts +0 -81
  112. package/src/store/classStore/typeAuthStore.ts +0 -44
  113. package/src/store/classStore/typePlayerStore.ts +0 -15
  114. package/src/vuex-shim.d.ts +0 -8
  115. /package/src/{store/paramStore.ts → stores/ParamSdkStore.ts} +0 -0
  116. /package/src/{store → stores}/class/adserver/adserverConfig.ts +0 -0
  117. /package/src/{store → stores}/class/adserver/adserverOtherEmission.ts +0 -0
  118. /package/src/{store → stores}/class/adserver/adserverTiming.ts +0 -0
  119. /package/src/{store → stores}/class/cartouchier/cartouche.ts +0 -0
  120. /package/src/{store → stores}/class/cartouchier/cartouchier.ts +0 -0
  121. /package/src/{store → stores}/class/conference/conference.ts +0 -0
  122. /package/src/{store → stores}/class/conference/conferenceMessage.ts +0 -0
  123. /package/src/{store → stores}/class/conference/conferenceParticipant.ts +0 -0
  124. /package/src/{store → stores}/class/conference/pad.ts +0 -0
  125. /package/src/{store → stores}/class/conference/studioCall.ts +0 -0
  126. /package/src/{store → stores}/class/contract/contract.ts +0 -0
  127. /package/src/{store → stores}/class/contract/contractOrganisation.ts +0 -0
  128. /package/src/{store → stores}/class/ftp/ftpEmission.ts +0 -0
  129. /package/src/{store → stores}/class/ftp/ftpParam.ts +0 -0
  130. /package/src/{store → stores}/class/ftp/testFtpEmission.ts +0 -0
  131. /package/src/{store → stores}/class/general/audioView.ts +0 -0
  132. /package/src/{store → stores}/class/general/category.ts +0 -0
  133. /package/src/{store → stores}/class/general/classicSelectType.ts +0 -0
  134. /package/src/{store → stores}/class/general/comment.ts +0 -0
  135. /package/src/{store → stores}/class/general/customPlayer.ts +0 -0
  136. /package/src/{store → stores}/class/general/emission.ts +0 -0
  137. /package/src/{store → stores}/class/general/fetchParam.ts +0 -0
  138. /package/src/{store → stores}/class/general/initState.ts +0 -0
  139. /package/src/{store → stores}/class/general/interfacePageable.ts +0 -0
  140. /package/src/{store → stores}/class/general/ituneCategory.ts +0 -0
  141. /package/src/{store → stores}/class/general/listReturn.ts +0 -0
  142. /package/src/{store → stores}/class/general/media.ts +0 -0
  143. /package/src/{store → stores}/class/general/organisation.ts +0 -0
  144. /package/src/{store → stores}/class/general/pageable.ts +0 -0
  145. /package/src/{store → stores}/class/general/participant.ts +0 -0
  146. /package/src/{store → stores}/class/general/player.ts +0 -0
  147. /package/src/{store → stores}/class/general/podcast.ts +0 -0
  148. /package/src/{store → stores}/class/general/sortPageable.ts +0 -0
  149. /package/src/{store → stores}/class/general/soundcastCategory.ts +0 -0
  150. /package/src/{store → stores}/class/ouestFrance/ofTag.ts +0 -0
  151. /package/src/{store → stores}/class/ouestFrance/ofTagInfo.ts +0 -0
  152. /package/src/{store → stores}/class/ouestFrance/ofTagPage.ts +0 -0
  153. /package/src/{store → stores}/class/ouestFrance/ofTagSeo.ts +0 -0
  154. /package/src/{store → stores}/class/ouestFrance/ofTagVente.ts +0 -0
  155. /package/src/{store → stores}/class/ouestFrance/ofTagWithParents.ts +0 -0
  156. /package/src/{store → stores}/class/rss/aggregator.ts +0 -0
  157. /package/src/{store → stores}/class/rss/rssEmission.ts +0 -0
  158. /package/src/{store → stores}/class/rss/rssInfo.ts +0 -0
  159. /package/src/{store → stores}/class/rubrique/rubriquage.ts +0 -0
  160. /package/src/{store → stores}/class/rubrique/rubriquageFilter.ts +0 -0
  161. /package/src/{store → stores}/class/rubrique/rubrique.ts +0 -0
  162. /package/src/{store → stores}/class/stat/statArrayIncome.ts +0 -0
  163. /package/src/{store → stores}/class/stat/statArrayObject.ts +0 -0
  164. /package/src/{store → stores}/class/stat/statGraph.ts +0 -0
  165. /package/src/{store → stores}/class/user/person.ts +0 -0
  166. /package/src/{store → stores}/class/user/profile.ts +0 -0
  167. /package/src/{store → stores}/class/user/userKeycloak.ts +0 -0
@@ -63,7 +63,7 @@
63
63
  name: 'emission',
64
64
  params: { emissionId: podcast.emission.emissionId },
65
65
  query: {
66
- productor: filterOrga,
66
+ productor: filterOrgaId,
67
67
  },
68
68
  }"
69
69
  >
@@ -78,7 +78,7 @@
78
78
  name: 'productor',
79
79
  params: { productorId: podcast.organisation.id },
80
80
  query: {
81
- productor: filterOrga,
81
+ productor: filterOrgaId,
82
82
  },
83
83
  }"
84
84
  >
@@ -134,14 +134,14 @@ import PodcastPlayBar from './PodcastPlayBar.vue';
134
134
  import PodcastImage from './PodcastImage.vue';
135
135
  import ParticipantDescription from './ParticipantDescription.vue';
136
136
  import TagList from './TagList.vue';
137
- import { state } from '../../../store/paramStore';
137
+ import { state } from '../../../stores/ParamSdkStore';
138
138
  import dayjs from 'dayjs';
139
139
  // @ts-ignore
140
140
  import humanizeDuration from 'humanize-duration';
141
141
  import displayMethods from '../../mixins/displayMethods';
142
142
  import { orgaComputed } from '../../mixins/orgaComputed';
143
- import { Podcast } from '@/store/class/general/podcast';
144
- import { Conference } from '@/store/class/conference/conference';
143
+ import { Podcast } from '@/stores/class/general/podcast';
144
+ import { Conference } from '@/stores/class/conference/conference';
145
145
 
146
146
  import { defineComponent, defineAsyncComponent } from 'vue';
147
147
  const ErrorMessage = defineAsyncComponent(() => import('../../misc/ErrorMessage.vue'));
@@ -23,7 +23,9 @@
23
23
  import ProgressBar from '../../misc/ProgressBar.vue';
24
24
  import DurationHelper from '../../../helper/duration';
25
25
  import displayMethods from '../../mixins/displayMethods';
26
- import { state } from '../../../store/paramStore';
26
+ import { state } from '../../../stores/ParamSdkStore';
27
+ import { usePlayerStore } from '@/stores/PlayerStore';
28
+ import { mapState, mapActions } from 'pinia';
27
29
  import { defineComponent } from 'vue'
28
30
  export default defineComponent({
29
31
  name: 'PodcastPlayBar',
@@ -36,21 +38,20 @@ export default defineComponent({
36
38
  duration: { default: 0, type: Number},
37
39
  },
38
40
  computed: {
41
+ ...mapState(usePlayerStore, ['playerPodcast', 'playerElapsed', 'playerTotal']),
39
42
  isProgressBar(): boolean{
40
43
  return (state.emissionsPage.progressBar as boolean);
41
44
  },
42
45
  percentProgress(): number{
43
- if(this.podcastId !== this.$store.state.player.podcast?.podcastId){
46
+ if(this.podcastId !== this.playerPodcast?.podcastId){
44
47
  return 0;
45
48
  }
46
- return !this.$store.state.player.elapsed ? 0 : this.$store.state.player.elapsed * 100;
49
+ return !this.playerElapsed ? 0 : this.playerElapsed * 100;
47
50
  },
48
51
  playedTime(): string{
49
- if(this.podcastId === this.$store.state.player.podcast?.podcastId){
50
- if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0) {
51
- return DurationHelper.formatDuration(
52
- Math.round(this.$store.state.player.elapsed * this.$store.state.player.total)
53
- );
52
+ if(this.podcastId === this.playerPodcast?.podcastId){
53
+ if (this.playerElapsed && this.playerElapsed > 0 && this.playerTotal && this.playerTotal > 0) {
54
+ return DurationHelper.formatDuration(Math.round(this.playerElapsed * this.playerTotal));
54
55
  }
55
56
  }
56
57
  return '00:00';
@@ -60,15 +61,15 @@ export default defineComponent({
60
61
  },
61
62
  },
62
63
  methods: {
64
+ ...mapActions(usePlayerStore, ['playerUpdateSeekTime']),
63
65
  seekTo(event: MouseEvent): void {
64
- if(!this.$store.state.player.podcast || this.podcastId !== this.$store.state.player.podcast.podcastId){return;}
66
+ if(!this.playerPodcast || this.podcastId !== this.playerPodcast.podcastId){return;}
65
67
  const rect = (event.currentTarget as Element).getBoundingClientRect();
66
68
  const barWidth = (event.currentTarget as Element).clientWidth;
67
69
  const x = event.clientX - rect.left;
68
70
  const percentPosition = x / barWidth;
69
71
  if (percentPosition * 100 >= this.percentLiveProgress) return;
70
- const seekTime = this.$store.state.player.total * percentPosition;
71
- this.$store.commit("playerSeekTime", seekTime);
72
+ this.playerUpdateSeekTime(this.playerTotal * percentPosition);
72
73
  }
73
74
  },
74
75
  })
@@ -46,13 +46,15 @@ import PodcastInlineListTemplate from './PodcastInlineListTemplate.vue';
46
46
  import octopusApi from '@saooti/octopus-api';
47
47
  import domHelper from '../../../helper/dom';
48
48
  import PodcastItem from './PodcastItem.vue';
49
- import { state } from '../../../store/paramStore';
49
+ import { state } from '../../../stores/ParamSdkStore';
50
50
  import ClassicLoading from '../../form/ClassicLoading.vue';
51
51
  import { Swiper, SwiperSlide } from "swiper/vue";
52
52
  import { Navigation } from "swiper";
53
53
  import "swiper/css";
54
54
  import "swiper/css/navigation";
55
- import { Podcast } from '@/store/class/general/podcast';
55
+ import { useFilterStore } from '@/stores/FilterStore';
56
+ import { mapState } from 'pinia';
57
+ import { Podcast } from '@/stores/class/general/podcast';
56
58
  import { defineComponent } from 'vue'
57
59
  export default defineComponent({
58
60
  name: 'PodcastSwiperList',
@@ -92,14 +94,12 @@ export default defineComponent({
92
94
  };
93
95
  },
94
96
  computed: {
95
- filterOrga(): string {
96
- return this.$store.state.filter.organisationId;
97
- },
97
+ ...mapState(useFilterStore, ['filterOrgaId']),
98
98
  organisation(): string|undefined {
99
- return this.organisationId ?this.organisationId: this.filterOrga;
99
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
100
100
  },
101
101
  watchVariable():string{
102
- return `${this.emissionId}|${this.organisationId}|${this.filterOrga}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
102
+ return `${this.emissionId}|${this.organisationId}|${this.filterOrgaId}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
103
103
  },
104
104
  sizeItem(): number {
105
105
  return state.generalParameters.podcastItem ? state.generalParameters.podcastItem: 13;
@@ -70,7 +70,7 @@
70
70
  import selenium from '../../mixins/selenium';
71
71
  //@ts-ignore
72
72
  import VueMultiselect from 'vue-multiselect';
73
- import { Rubrique } from '@/store/class/rubrique/rubrique';
73
+ import { Rubrique } from '@/stores/class/rubrique/rubrique';
74
74
  const getDefaultRubrique = (defaultName: string) => {
75
75
  if ('' === defaultName){
76
76
  return undefined;
@@ -58,10 +58,12 @@
58
58
 
59
59
  <script lang="ts">
60
60
  import Popover from '../../misc/Popover.vue';
61
- import { Rubrique } from '@/store/class/rubrique/rubrique';
62
- import { Rubriquage } from '@/store/class/rubrique/rubriquage';
63
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
64
- import { defineComponent } from 'vue'
61
+ import { Rubrique } from '@/stores/class/rubrique/rubrique';
62
+ import { Rubriquage } from '@/stores/class/rubrique/rubriquage';
63
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
64
+ import { useFilterStore } from '@/stores/FilterStore';
65
+ import { mapState, mapActions } from 'pinia';
66
+ import { defineComponent } from 'vue';
65
67
  export default defineComponent({
66
68
  name: 'RubriqueList',
67
69
 
@@ -83,17 +85,12 @@ export default defineComponent({
83
85
  },
84
86
 
85
87
  computed: {
86
- filterOrga(): string {
87
- return this.$store.state.filter.organisationId;
88
- },
89
- rubriqueFilter(): Array<RubriquageFilter>{
90
- return this.$store.state.filter.rubriqueFilter;
91
- },
88
+ ...mapState(useFilterStore, ['filterRubrique', 'filterRubriqueDisplay']),
92
89
  rubriqueDisplay(): Array<Rubrique>{
93
- return this.$store.state.filter.rubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
90
+ return this.filterRubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
94
91
  },
95
92
  rubriquageDisplay(): Array<Rubriquage>{
96
- const elementToNotShow = Array.from(this.rubriqueFilter);
93
+ const elementToNotShow = Array.from(this.filterRubrique);
97
94
  if(elementToNotShow.length){
98
95
  const rubriquageIdToNotShow = elementToNotShow.map(a => a.rubriquageId);
99
96
  return this.rubriquages.filter((element)=>{
@@ -105,7 +102,7 @@ export default defineComponent({
105
102
  },
106
103
  },
107
104
  watch:{
108
- rubriqueFilter:{
105
+ filterRubrique:{
109
106
  deep: true,
110
107
  handler(){
111
108
  this.selectNewRubriquage();
@@ -120,9 +117,10 @@ export default defineComponent({
120
117
  window.removeEventListener('resize', this.resizeWindow);
121
118
  },
122
119
  methods: {
120
+ ...mapActions(useFilterStore, ['filterUpdateRubrique', 'filterUpdateRubriqueDisplay']),
123
121
  initRubriques(): void{
124
122
  if(!this.rubriquage){ return ;}
125
- this.$store.commit('filterRubriqueDisplay', this.rubriquage.rubriques);
123
+ this.filterUpdateRubriqueDisplay(this.rubriquage.rubriques);
126
124
  window.addEventListener('resize', this.resizeWindow);
127
125
  this.$nextTick(() => {
128
126
  this.resizeWindow();
@@ -136,9 +134,9 @@ export default defineComponent({
136
134
  nameRubriquage: this.rubriquage.title,
137
135
  nameRubrique: rubrique.name
138
136
  };
139
- const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
137
+ const newFilter: Array<RubriquageFilter> = Array.from(this.filterRubrique);
140
138
  newFilter.push(filterToAdd);
141
- this.$store.commit('filterRubrique', newFilter);
139
+ this.filterUpdateRubrique(newFilter);
142
140
  const queries = this.$route.query;
143
141
  const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
144
142
  this.$router.replace({ query: { ...queries, ...{ rubriquesId: queryString }} });
@@ -146,11 +144,11 @@ export default defineComponent({
146
144
  },
147
145
  selectNewRubriquage(){
148
146
  const rubriquageLength = this.rubriquages.length;
149
- if(rubriquageLength === this.rubriqueFilter.length){
147
+ if(rubriquageLength === this.filterRubrique.length){
150
148
  return;
151
149
  }
152
150
  let index = 0;
153
- const rubriquageAlreadyFilter = this.rubriqueFilter.map(a => a.rubriquageId);
151
+ const rubriquageAlreadyFilter = this.filterRubrique.map(a => a.rubriquageId);
154
152
  for (index; index < rubriquageLength; index++) {
155
153
  const rubriquageIdIndex = this.rubriquages[index].rubriquageId;
156
154
  if(rubriquageIdIndex && !rubriquageAlreadyFilter.includes(rubriquageIdIndex)){
@@ -30,10 +30,12 @@
30
30
 
31
31
  <script lang="ts">
32
32
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
33
- import { state } from '../../../store/paramStore';
33
+ import { state } from '../../../stores/ParamSdkStore';
34
34
  import octopusApi from '@saooti/octopus-api';
35
35
  import Snackbar from '../../misc/Snackbar.vue';
36
- import QrcodeVue from 'qrcode.vue'
36
+ import QrcodeVue from 'qrcode.vue';
37
+ import { useAuthStore } from '@/stores/AuthStore';
38
+ import { mapState } from 'pinia';
37
39
  import { defineComponent } from 'vue'
38
40
  export default defineComponent({
39
41
  name: 'QrCode',
@@ -46,7 +48,6 @@ export default defineComponent({
46
48
  props: {
47
49
  url: { default: '', type: String},
48
50
  },
49
-
50
51
  data() {
51
52
  return {
52
53
  size: 200 as number,
@@ -55,6 +56,9 @@ export default defineComponent({
55
56
  isNotBlack: false as boolean,
56
57
  };
57
58
  },
59
+ computed:{
60
+ ...mapState(useAuthStore, ['authOrganisation']),
61
+ },
58
62
  watch:{
59
63
  isNotBlack(){
60
64
  this.color = this.isNotBlack ? this.otherColor : "#000000";
@@ -81,13 +85,13 @@ export default defineComponent({
81
85
  }
82
86
  if (!state.generalParameters.authenticated) return;
83
87
  let data;
84
- if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
85
- data = this.$store.state.auth?.organisation.attributes;
88
+ if(""!==this.authOrganisation.id && this.authOrganisation.attributes && Object.keys(this.authOrganisation.attributes).length > 1){
89
+ data = this.authOrganisation.attributes;
86
90
  }else{
87
91
  data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
88
92
  }
89
93
  if (Object.prototype.hasOwnProperty.call(data,'COLOR')) {
90
- this.otherColor = data.COLOR;
94
+ this.otherColor = (data.COLOR as string);
91
95
  }
92
96
  },
93
97
  }
@@ -47,14 +47,14 @@
47
47
  </template>
48
48
 
49
49
  <script lang="ts">
50
- import { Emission } from '@/store/class/general/emission';
51
- import { Podcast } from '@/store/class/general/podcast';
52
- import { state } from '../../../store/paramStore';
50
+ import { Emission } from '@/stores/class/general/emission';
51
+ import { Podcast } from '@/stores/class/general/podcast';
52
+ import { state } from '../../../stores/ParamSdkStore';
53
53
  import displayMethods from '../../mixins/displayMethods';
54
54
  import Popover from '../../misc/Popover.vue';
55
55
  import ShareButtonsIntern from './ShareButtonsIntern.vue';
56
56
  import { defineComponent } from 'vue';
57
- import { Playlist } from '@/store/class/general/playlist';
57
+ import { Playlist } from '@/stores/class/general/playlist';
58
58
  export default defineComponent({
59
59
  components: {
60
60
  ShareButtonsIntern,
@@ -85,13 +85,13 @@
85
85
 
86
86
  <script lang="ts">
87
87
  import octopusApi from '@saooti/octopus-api';
88
- import { Emission } from '@/store/class/general/emission';
89
- import { Podcast } from '@/store/class/general/podcast';
90
- import { state } from '../../../store/paramStore';
88
+ import { Emission } from '@/stores/class/general/emission';
89
+ import { Podcast } from '@/stores/class/general/podcast';
90
+ import { state } from '../../../stores/ParamSdkStore';
91
91
  import Snackbar from '../../misc/Snackbar.vue';
92
92
  import displayMethods from '../../mixins/displayMethods';
93
93
  import { defineComponent, defineAsyncComponent } from 'vue';
94
- import { Playlist } from '@/store/class/general/playlist';
94
+ import { Playlist } from '@/stores/class/general/playlist';
95
95
  const ClipboardModal = defineAsyncComponent(() => import('../../misc/modal/ClipboardModal.vue'));
96
96
  const NewsletterModal = defineAsyncComponent(() => import('../../misc/modal/NewsletterModal.vue'));
97
97
  const QrCodeModal = defineAsyncComponent(() => import('../../misc/modal/QrCodeModal.vue'));
@@ -36,11 +36,11 @@
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';
43
- import { Emission } from '@/store/class/general/emission';
43
+ import { Emission } from '@/stores/class/general/emission';
44
44
 
45
45
  import { defineComponent, defineAsyncComponent } from 'vue';
46
46
  const RssSection = defineAsyncComponent(() => import('@/components/display/aggregator/RssSection.vue'));
@@ -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
- import { Podcast } from '@/store/class/general/podcast';
86
- import { Emission } from '@/store/class/general/emission';
87
- import { Playlist } from '@/store/class/general/playlist';
85
+ import { Podcast } from '@/stores/class/general/podcast';
86
+ import { Emission } from '@/stores/class/general/emission';
87
+ import { Playlist } from '@/stores/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,14 +33,14 @@
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
- import { Podcast } from '@/store/class/general/podcast';
39
- import { CustomPlayer } from '@/store/class/general/customPlayer';
38
+ import { Podcast } from '@/stores/class/general/podcast';
39
+ import { CustomPlayer } from '@/stores/class/general/customPlayer';
40
40
  import { defineComponent } from 'vue';
41
- import { Emission } from '@/store/class/general/emission';
42
- import { Playlist } from '@/store/class/general/playlist';
43
- import { InterfacePageable } from '@/store/class/general/interfacePageable';
41
+ import { Emission } from '@/stores/class/general/emission';
42
+ import { Playlist } from '@/stores/class/general/playlist';
43
+ import { InterfacePageable } from '@/stores/class/general/interfacePageable';
44
44
  export default defineComponent({
45
45
  props: {
46
46
  podcast: { default: undefined, type: Object as ()=> Podcast},
@@ -25,7 +25,7 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- import { Emission } from '@/store/class/general/emission';
28
+ import { Emission } from '@/stores/class/general/emission';
29
29
  import { defineComponent } from 'vue';
30
30
  export default defineComponent({
31
31
  props: {
@@ -62,11 +62,14 @@
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 { Category } from '@/store/class/general/category';
69
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
68
+ import { useFilterStore } from '@/stores/FilterStore';
69
+ import { useGeneralStore } from '@/stores/GeneralStore';
70
+ import { mapState, mapActions } from 'pinia';
71
+ import { Category } from '@/stores/class/general/category';
72
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
70
73
  import { defineComponent } from 'vue'
71
74
  export default defineComponent({
72
75
  name: 'Footer',
@@ -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,10 +86,12 @@
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'
92
- import { Organisation } from '@/store/class/general/organisation';
91
+ import { useAuthStore } from '@/stores/AuthStore';
92
+ import { mapState } from 'pinia';
93
+ import { defineComponent } from 'vue';
94
+ import { Organisation } from '@/stores/class/general/organisation';
93
95
  export default defineComponent({
94
96
  name: 'HomeDropdown',
95
97
  components:{
@@ -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,12 +46,15 @@
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
- import { Category } from '@/store/class/general/category';
52
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
51
+ import { Category } from '@/stores/class/general/category';
52
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
53
53
  import { defineComponent, defineAsyncComponent } from 'vue';
54
- import { Organisation } from '@/store/class/general/organisation';
54
+ import { useFilterStore } from '@/stores/FilterStore';
55
+ import { useGeneralStore } from '@/stores/GeneralStore';
56
+ import { mapState } from 'pinia';
57
+ import { Organisation } from '@/stores/class/general/organisation';
55
58
  const OrganisationChooserLight = defineAsyncComponent(() => import('../display/organisation/OrganisationChooserLight.vue'));
56
59
  export default defineComponent({
57
60
  name: 'LeftMenu',
@@ -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() {