@saooti/octopus-sdk 35.1.7 → 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 +2 -2
  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
@@ -33,7 +33,9 @@ import { handle403 } from '../../mixins/handle403';
33
33
  import octopusApi from '@saooti/octopus-api';
34
34
  import PlaylistItem from './PlaylistItem.vue';
35
35
  import { Playlist, emptyPlaylistData } from '@/store/class/general/playlist';
36
- import { defineComponent } from 'vue'
36
+ import { useFilterStore } from '@/stores/FilterStore';
37
+ import { mapState } from 'pinia';
38
+ import { defineComponent } from 'vue';
37
39
  import { AxiosError } from 'axios';
38
40
  export default defineComponent({
39
41
  name: 'PlaylistList',
@@ -63,9 +65,9 @@ export default defineComponent({
63
65
  isMobile: false as boolean,
64
66
  };
65
67
  },
66
-
67
68
 
68
69
  computed: {
70
+ ...mapState(useFilterStore, ['filterOrgaId']),
69
71
  displayArray(): Array<Playlist>{
70
72
  if(this.isMobile){
71
73
  return this.playlists;
@@ -79,7 +81,7 @@ export default defineComponent({
79
81
  return !this.query ?'NAME': 'SCORE';
80
82
  },
81
83
  organisation(): string|undefined {
82
- return this.organisationId ?this.organisationId: this.$store.state.filter.organisationId;
84
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
83
85
  },
84
86
  },
85
87
  watch: {
@@ -46,7 +46,7 @@ import { handle403 } from '../../mixins/handle403';
46
46
  import { orgaComputed } from '../../mixins/orgaComputed';
47
47
  import octopusApi from '@saooti/octopus-api';
48
48
  import PodcastItem from '../podcasts/PodcastItem.vue';
49
- import { state } from '../../../store/paramStore';
49
+ import { state } from '../../../stores/ParamSdkStore';
50
50
  import ClassicSearch from '../../form/ClassicSearch.vue';
51
51
  import { Podcast } from '@/store/class/general/podcast';
52
52
  import { Playlist } from '@/store/class/general/playlist';
@@ -63,7 +63,7 @@ import domHelper from '../../../helper/dom';
63
63
  import PodcastItem from '../podcasts/PodcastItem.vue';
64
64
  import ClassicLoading from '../../form/ClassicLoading.vue';
65
65
  const PHONE_WIDTH = 960;
66
- import { state } from '../../../store/paramStore';
66
+ import { state } from '../../../stores/ParamSdkStore';
67
67
  import { Podcast } from '@/store/class/general/podcast';
68
68
  import { Playlist } from '@/store/class/general/playlist';
69
69
  import { defineComponent } from 'vue'
@@ -7,7 +7,7 @@
7
7
  :to="{
8
8
  name: 'participant',
9
9
  params: { participantId: animator.participantId },
10
- query: { productor: $store.state.filter.organisationId },
10
+ query: { productor: filterOrgaId },
11
11
  }"
12
12
  :title="$t('Participant')"
13
13
  class="podcast-item-animator text-dark"
@@ -19,7 +19,9 @@
19
19
 
20
20
  <script lang="ts">
21
21
  import { Participant } from '@/store/class/general/participant';
22
- import { defineComponent } from 'vue'
22
+ import { useFilterStore } from '@/stores/FilterStore';
23
+ import { mapState } from 'pinia';
24
+ import { defineComponent } from 'vue';
23
25
  export default defineComponent({
24
26
  name: 'AnimatorsItem',
25
27
 
@@ -27,6 +29,7 @@ export default defineComponent({
27
29
  animator: { default: undefined, type: Object as ()=> Participant},
28
30
  },
29
31
  computed:{
32
+ ...mapState(useFilterStore, ['filterOrgaId']),
30
33
  animatorName(): string{
31
34
  return (`${this.animator?.firstName??''} ${this.animator?.lastName??''}`).trim();
32
35
  }
@@ -41,7 +41,7 @@
41
41
  name: 'participant',
42
42
  params: { participantId: participant.participantId },
43
43
  query: {
44
- productor: $store.state.filter.organisationId,
44
+ productor: filterOrgaId,
45
45
  },
46
46
  }"
47
47
  >
@@ -53,7 +53,9 @@
53
53
  <script lang="ts">
54
54
  import Popover from '../../misc/Popover.vue';
55
55
  import { Participant } from '@/store/class/general/participant';
56
- import { defineComponent } from 'vue'
56
+ import { useFilterStore } from '@/stores/FilterStore';
57
+ import { mapState } from 'pinia';
58
+ import { defineComponent } from 'vue';
57
59
  export default defineComponent({
58
60
  name: 'ParticipantDescription',
59
61
 
@@ -67,6 +69,7 @@ export default defineComponent({
67
69
  },
68
70
 
69
71
  computed:{
72
+ ...mapState(useFilterStore, ['filterOrgaId']),
70
73
  idPopover(): string{
71
74
  return this.isGuest ? "popover-guests-help" : "popover-animators-help";
72
75
  },
@@ -88,12 +88,12 @@
88
88
  </template>
89
89
 
90
90
  <script lang="ts">
91
- import { mapState } from 'vuex';
92
- import { state } from '../../../store/paramStore';
93
- import {StoreState} from '@/store/classStore/typeAppStore';
91
+ import { state } from '../../../stores/ParamSdkStore';
94
92
  import { Podcast } from '@/store/class/general/podcast';
95
93
  import { Conference } from '@/store/class/conference/conference';
96
94
  import imageProxy from '../../mixins/imageProxy';
95
+ import { usePlayerStore } from '@/stores/PlayerStore';
96
+ import { mapState, mapActions } from 'pinia';
97
97
  import { defineComponent } from 'vue'
98
98
  export default defineComponent({
99
99
  name: 'PodcastImage',
@@ -113,19 +113,14 @@ export default defineComponent({
113
113
  };
114
114
  },
115
115
  computed: {
116
- ...mapState({
117
- playingPodcast(state: StoreState) {
118
- return (
119
- (state.player.podcast &&
120
- state.player.podcast.podcastId === this.podcast.podcastId) ||
121
- (this.fetchConference &&
122
- 'null' !== this.fetchConference &&
123
- state.player.live &&
124
- state.player.live.conferenceId ===
125
- this.fetchConference.conferenceId)
126
- );
127
- },
128
- }),
116
+ ...mapState(usePlayerStore, ['playerPodcast', 'playerLive', 'playerStatus']),
117
+ playingPodcast(){
118
+ return (
119
+ (this.playerPodcast?.podcastId === this.podcast.podcastId) ||
120
+ (this.fetchConference && 'null' !== this.fetchConference.toString() &&
121
+ this.playerLive?.conferenceId ===this.fetchConference.conferenceId)
122
+ );
123
+ },
129
124
  authenticated(): boolean {
130
125
  return (state.generalParameters.authenticated as boolean);
131
126
  },
@@ -252,18 +247,19 @@ export default defineComponent({
252
247
  },
253
248
 
254
249
  methods: {
250
+ ...mapActions(usePlayerStore, ['playerChangeStatus', 'playerPlay']),
255
251
  play(): void {
256
252
  if (this.isLiveToBeRecorded) {
257
253
  return;
258
254
  }
259
255
  if(this.playingPodcast){
260
- this.$store.commit('player/pause', "PLAYING"===this.$store.state.player.status);
256
+ this.playerChangeStatus("PLAYING"===this.playerStatus);
261
257
  return;
262
258
  }
263
259
  if (!this.recordingLive) {
264
- this.$store.commit('player/playPodcast', this.podcast);
260
+ this.playerPlay(this.podcast);
265
261
  }else{
266
- this.$store.commit('player/playPodcast', {
262
+ this.playerPlay({
267
263
  title: this.podcast.title,
268
264
  audioUrl: this.podcast.audioUrl,
269
265
  duration: this.podcast.duration,
@@ -37,7 +37,7 @@
37
37
  </template>
38
38
 
39
39
  <script lang="ts">
40
- import { state } from '../../../store/paramStore';
40
+ import { state } from '../../../stores/ParamSdkStore';
41
41
  import { defineAsyncComponent, defineComponent } from 'vue';
42
42
  const PodcastInlineListClassic = defineAsyncComponent(() => import('./PodcastInlineListClassic.vue'));
43
43
  const PodcastSwiperList = defineAsyncComponent(() => import('./PodcastSwiperList.vue'));
@@ -53,7 +53,9 @@ import domHelper from '../../../helper/dom';
53
53
  import PodcastItem from './PodcastItem.vue';
54
54
  import ClassicLoading from '../../form/ClassicLoading.vue';
55
55
  const PHONE_WIDTH = 960;
56
- import { state } from '../../../store/paramStore';
56
+ import { useFilterStore } from '@/stores/FilterStore';
57
+ import { mapState } from 'pinia';
58
+ import { state } from '../../../stores/ParamSdkStore';
57
59
  import { Podcast } from '@/store/class/general/podcast';
58
60
  import imageProxy from '../../mixins/imageProxy';
59
61
  import { defineComponent } from 'vue'
@@ -98,6 +100,7 @@ export default defineComponent({
98
100
  };
99
101
  },
100
102
  computed: {
103
+ ...mapState(useFilterStore, ['filterOrgaId']),
101
104
  podcasts(): Array<Podcast> {
102
105
  return this.allPodcasts.slice(this.index, this.index + this.size);
103
106
  },
@@ -110,11 +113,8 @@ export default defineComponent({
110
113
  isInlineAnimation(): boolean {
111
114
  return (state.generalParameters.isInlineAnimation as boolean);
112
115
  },
113
- filterOrga(): string {
114
- return this.$store.state.filter.organisationId;
115
- },
116
116
  organisation(): string|undefined {
117
- return this.organisationId ?this.organisationId: this.filterOrga;
117
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
118
118
  },
119
119
  previousAvailable(): boolean {
120
120
  return this.index > 0;
@@ -126,7 +126,7 @@ export default defineComponent({
126
126
  return this.direction > 0 ? 'out-left' : 'out-right';
127
127
  },
128
128
  watchVariable():string{
129
- return `${this.emissionId}|${this.organisationId}|${this.filterOrga}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
129
+ return `${this.emissionId}|${this.organisationId}|${this.filterOrgaId}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
130
130
  }
131
131
  },
132
132
  watch: {
@@ -75,6 +75,8 @@
75
75
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
76
76
  import { defineComponent } from 'vue'
77
77
  import { RouteLocationRaw } from 'vue-router';
78
+ import { useFilterStore } from '@/stores/FilterStore';
79
+ import { mapState, mapActions } from 'pinia';
78
80
  import { Rubrique } from '@/store/class/rubrique/rubrique';
79
81
  export default defineComponent({
80
82
  name: 'PodcastInlineListTemplate',
@@ -104,9 +106,10 @@ export default defineComponent({
104
106
  },
105
107
 
106
108
  computed: {
109
+ ...mapState(useFilterStore, ['filterOrgaId', 'filterRubrique', 'filterIab', 'filterRubriquage']),
107
110
  rubriqueQueryParam(): string|undefined{
108
- if(this.$store.state.filter?.rubriqueFilter?.length){
109
- return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
111
+ if(this.filterRubrique?.length){
112
+ return this.filterRubrique.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
110
113
  }
111
114
  return undefined;
112
115
  },
@@ -116,19 +119,20 @@ export default defineComponent({
116
119
  return {
117
120
  name: 'category',
118
121
  params:{ 'iabId': this.iabId },
119
- query: { productor: this.$store.state.filter.organisationId },
122
+ query: { productor: this.filterOrgaId },
120
123
  };
121
124
  }
122
125
  return {
123
126
  name: 'podcasts',
124
- query: { productor: this.$store.state.filter.organisationId,
125
- iabId:this.$store.state.filter.iab?.id,
127
+ query: { productor: this.filterOrgaId,
128
+ iabId:this.filterIab?.id,
126
129
  rubriquesId: this.rubriqueQueryParam },
127
130
  };
128
131
  },
129
132
  },
130
133
 
131
134
  methods: {
135
+ ...mapActions(useFilterStore, ['filterUpdateRubrique']),
132
136
  sortChrono():void{
133
137
  this.$emit('sortChrono');
134
138
  },
@@ -153,18 +157,18 @@ export default defineComponent({
153
157
  nameRubriquage: '',
154
158
  nameRubrique: ''
155
159
  };
156
- if(this.$store.state.filter.rubriquageArray.length){
157
- const rubriqueChosen = this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
160
+ if(this.filterRubriquage.length){
161
+ const rubriqueChosen = this.filterRubriquage[this.rubriqueId.length - 1].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
158
162
  filterToAdd = {
159
- rubriquageId: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriquageId,
163
+ rubriquageId: this.filterRubriquage[this.rubriqueId.length - 1].rubriquageId,
160
164
  rubriqueId: rubriqueChosenId,
161
- nameRubriquage: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].title,
165
+ nameRubriquage: this.filterRubriquage[this.rubriqueId.length - 1].title,
162
166
  nameRubrique: rubriqueChosen.name
163
167
  };
164
168
  }
165
- const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
169
+ const newFilter: Array<RubriquageFilter> = Array.from(this.filterRubrique);
166
170
  newFilter.push(filterToAdd);
167
- this.$store.commit('filterRubrique', newFilter);
171
+ this.filterUpdateRubrique(newFilter);
168
172
  const queries = this.$route.query;
169
173
  const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
170
174
  this.$router.push({ name: 'podcasts',query: { ...queries, ...{ rubriquesId: queryString }} });
@@ -52,7 +52,7 @@
52
52
  <script lang="ts">
53
53
  import PodcastItemInfo from './PodcastItemInfo.vue';
54
54
  import PodcastImage from './PodcastImage.vue';
55
- import { state } from '../../../store/paramStore';
55
+ import { state } from '../../../stores/ParamSdkStore';
56
56
  import dayjs from 'dayjs';
57
57
  import { Podcast } from '@/store/class/general/podcast';
58
58
  import { defineComponent } from 'vue'
@@ -18,7 +18,7 @@
18
18
  :to="{
19
19
  name: 'podcast',
20
20
  params: { podcastId: podcastId },
21
- query: { productor: filterOrga },
21
+ query: { productor: filterOrgaId },
22
22
  }"
23
23
  class="text-dark flex-grow-1 title-podcast-item"
24
24
  >
@@ -39,7 +39,7 @@
39
39
  :to="{
40
40
  name: 'productor',
41
41
  params: { productorId: podcastOrganisationId },
42
- query: { productor: filterOrga },
42
+ query: { productor: filterOrgaId },
43
43
  }"
44
44
  class="text-dark producer-podcast-item"
45
45
  >
@@ -50,7 +50,7 @@
50
50
 
51
51
  <script lang="ts">
52
52
  import AnimatorsItem from './AnimatorsItem.vue';
53
- import { state } from '../../../store/paramStore';
53
+ import { state } from '../../../stores/ParamSdkStore';
54
54
  import { orgaComputed } from '../../mixins/orgaComputed';
55
55
  import dayjs from 'dayjs';
56
56
  // @ts-ignore
@@ -34,7 +34,10 @@ import ListPaginate from '../list/ListPaginate.vue';
34
34
  import { handle403 } from '../../mixins/handle403';
35
35
  import octopusApi from '@saooti/octopus-api';
36
36
  import PodcastItem from './PodcastItem.vue';
37
- import { state } from '../../../store/paramStore';
37
+ import { state } from '../../../stores/ParamSdkStore';
38
+ import { useAuthStore } from '@/stores/AuthStore';
39
+ import { useFilterStore } from '@/stores/FilterStore';
40
+ import { mapState } from 'pinia';
38
41
  import { Podcast, emptyPodcastData } from '@/store/class/general/podcast';
39
42
  import { defineComponent } from 'vue'
40
43
  import { FetchParam } from '@/store/class/general/fetchParam';
@@ -86,6 +89,8 @@ export default defineComponent({
86
89
  },
87
90
 
88
91
  computed: {
92
+ ...mapState(useFilterStore, ['filterOrgaId']),
93
+ ...mapState(useAuthStore, ['authProfile']),
89
94
  displayArray(): Array<Podcast>{
90
95
  if(this.isMobile || this.justSizeChosen){
91
96
  return this.podcasts;
@@ -98,7 +103,7 @@ export default defineComponent({
98
103
  ${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.notValid}`;
99
104
  },
100
105
  organisation(): string|undefined {
101
- return this.organisationId ?this.organisationId: this.$store.state.filter.organisationId;
106
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
102
107
  },
103
108
  sort(): string {
104
109
  return this.popularSort? "POPULARITY" : this.sortCriteria??'DATE';
@@ -158,7 +163,7 @@ export default defineComponent({
158
163
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
159
164
  includeHidden: this.includeHidden,
160
165
  validity: undefined !== this.notValid?!this.notValid: undefined,
161
- publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined,
166
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.authProfile.userId:undefined,
162
167
  includeStatus:["READY","PROCESSING"]
163
168
  };
164
169
  try {
@@ -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,7 +134,7 @@ 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';
@@ -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,12 +46,14 @@ 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 { useFilterStore } from '@/stores/FilterStore';
56
+ import { mapState } from 'pinia';
55
57
  import { Podcast } from '@/store/class/general/podcast';
56
58
  import { defineComponent } from 'vue'
57
59
  export default defineComponent({
@@ -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;
@@ -61,7 +61,9 @@ import Popover from '../../misc/Popover.vue';
61
61
  import { Rubrique } from '@/store/class/rubrique/rubrique';
62
62
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
63
63
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
64
- import { defineComponent } from 'vue'
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
  }
@@ -49,7 +49,7 @@
49
49
  <script lang="ts">
50
50
  import { Emission } from '@/store/class/general/emission';
51
51
  import { Podcast } from '@/store/class/general/podcast';
52
- import { state } from '../../../store/paramStore';
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';
@@ -87,7 +87,7 @@
87
87
  import octopusApi from '@saooti/octopus-api';
88
88
  import { Emission } from '@/store/class/general/emission';
89
89
  import { Podcast } from '@/store/class/general/podcast';
90
- import { state } from '../../../store/paramStore';
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';