@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
@@ -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,12 +71,14 @@
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
- import { Organisation } from '@/store/class/general/organisation';
76
+ import { Organisation } from '@/stores/class/general/organisation';
77
77
  import orgaFilter from '../mixins/organisationFilter';
78
78
  import imageProxy from '../mixins/imageProxy';
79
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
79
+ import { useFilterStore } from '@/stores/FilterStore';
80
+ import { mapState } from 'pinia';
81
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
80
82
  import { defineComponent,defineAsyncComponent } from 'vue';
81
83
  const OrganisationChooserLight = defineAsyncComponent(() => import('../display/organisation/OrganisationChooserLight.vue'));
82
84
  export default defineComponent({
@@ -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 {
@@ -26,10 +26,10 @@
26
26
 
27
27
  <script lang="ts">
28
28
  import ClassicModal from '../modal/ClassicModal.vue';
29
- import { Emission } from '@/store/class/general/emission';
29
+ import { Emission } from '@/stores/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',
@@ -97,13 +97,15 @@ import VSwatches from 'vue3-swatches';
97
97
  // @ts-ignore
98
98
  import humanizeDuration from 'humanize-duration';
99
99
  import displayMethods from '../../mixins/displayMethods';
100
- import { Participant } from '@/store/class/general/participant';
101
- import { Podcast } from '@/store/class/general/podcast';
102
- import { state } from '../../../store/paramStore';
103
- import { defineComponent } from 'vue'
100
+ import { Participant } from '@/stores/class/general/participant';
101
+ import { Podcast } from '@/stores/class/general/podcast';
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
- import { Emission } from '@/store/class/general/emission';
106
- import { Playlist } from '@/store/class/general/playlist';
107
+ import { Emission } from '@/stores/class/general/emission';
108
+ import { Playlist } from '@/stores/class/general/playlist';
107
109
  export default defineComponent({
108
110
  name: 'NewsletterModal',
109
111
 
@@ -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
  },
@@ -72,7 +72,7 @@ import ClassicModal from '../modal/ClassicModal.vue';
72
72
  import Nav from '../Nav.vue';
73
73
  import QrCode from '../../display/sharing/QrCode.vue';
74
74
  import { defineComponent } from 'vue'
75
- import { Podcast } from '@/store/class/general/podcast';
75
+ import { Podcast } from '@/stores/class/general/podcast';
76
76
  export default defineComponent({
77
77
  name: 'ShareModalPlayer',
78
78
 
@@ -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
- import { CommentPodcast } from '@/store/class/general/comment';
49
+ import { CommentPodcast } from '@/stores/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,14 +76,14 @@
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
  />
83
83
  </div>
84
84
  </template>
85
85
  <script lang="ts">
86
- import { CommentPodcast } from '@/store/class/general/comment';
86
+ import { CommentPodcast } from '@/stores/class/general/comment';
87
87
  import { playerDisplay } from '../../mixins/player/playerDisplay';
88
88
  import imageProxy from '../../mixins/imageProxy';
89
89
  import Spinner from '../Spinner.vue';
@@ -95,7 +95,7 @@ import imageProxy from '../../mixins/imageProxy';
95
95
  import PlayerProgressBar from './PlayerProgressBar.vue';
96
96
  import PlayerTimeline from './PlayerTimeline.vue';
97
97
  import { defineComponent } from 'vue';
98
- import { CommentPodcast } from '@/store/class/general/comment';
98
+ import { CommentPodcast } from '@/stores/class/general/comment';
99
99
  export default defineComponent({
100
100
  name: 'PlayerLarge',
101
101
 
@@ -9,14 +9,16 @@
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>
16
16
 
17
17
  <script lang="ts">
18
18
  import ProgressBar from '../ProgressBar.vue'
19
- import { CommentPodcast } from '@/store/class/general/comment';
19
+ import { CommentPodcast } from '@/stores/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,9 +13,9 @@
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
- import { CommentPodcast } from '@/store/class/general/comment';
18
+ import { CommentPodcast } from '@/stores/class/general/comment';
19
19
  export default defineComponent({
20
20
  name: 'PlayerTimeline',
21
21
 
@@ -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
  });
@@ -1,13 +1,16 @@
1
1
 
2
2
  import { handle403 } from '../mixins/handle403';
3
- import { Rubriquage } from "@/store/class/rubrique/rubriquage";
3
+ import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
4
4
  import octopusApi from '@saooti/octopus-api';
5
- import { defineComponent } from 'vue'
5
+ import { useFilterStore } from '@/stores/FilterStore';
6
+ import { mapActions } from 'pinia';
7
+ import { defineComponent } from 'vue';
6
8
  import { AxiosError } from 'axios';
7
- import { Organisation } from '@/store/class/general/organisation';
9
+ import { Organisation } from '@/stores/class/general/organisation';
8
10
  export default defineComponent({
9
11
  mixins: [handle403],
10
12
  methods: {
13
+ ...mapActions(useFilterStore, ['filterUpdateOrga']),
11
14
  async selectOrganisation(organisationId: string): Promise<void> {
12
15
  try {
13
16
  const response = await octopusApi.fetchData<Organisation>(0,`organisation/${organisationId}`);
@@ -16,7 +19,7 @@ export default defineComponent({
16
19
  homePageOrder: true
17
20
  }, true);
18
21
  const isLive = await octopusApi.fetchData<boolean>(0, 'organisation/liveEnabled/'+organisationId);
19
- this.$store.commit('filterOrga', {
22
+ this.filterUpdateOrga({
20
23
  orgaId: organisationId,
21
24
  imgUrl: response.imageUrl,
22
25
  name: response.name,
@@ -35,7 +38,7 @@ export default defineComponent({
35
38
  if (this.$route.query.productor) {
36
39
  this.$router.push({ query: {...this.$route.query, ...{productor: undefined} } });
37
40
  }
38
- this.$store.commit('filterOrga', { orgaId: undefined });
41
+ this.filterUpdateOrga({ orgaId: undefined });
39
42
  }
40
43
  },
41
44
  });
@@ -1,12 +1,12 @@
1
-
2
- import { mapState } from 'vuex';
3
- import { state } from '../../../store/paramStore';
1
+ import { state } from '../../../stores/ParamSdkStore';
4
2
  import octopusApi from '@saooti/octopus-api';
5
- import { CommentPodcast } from '@/store/class/general/comment';
6
- import { StoreState } from '@/store/classStore/typeAppStore';
3
+ import { CommentPodcast } from '@/stores/class/general/comment';
7
4
  import { defineComponent } from 'vue';
8
- import { FetchParam } from '@/store/class/general/fetchParam';
9
- import { InterfacePageable } from '@/store/class/general/interfacePageable';
5
+ import { usePlayerStore } from '@/stores/PlayerStore';
6
+ import { useCommentStore } from '@/stores/CommentStore';
7
+ import { mapState } from 'pinia';
8
+ import { FetchParam } from '@/stores/class/general/fetchParam';
9
+ import { InterfacePageable } from '@/stores/class/general/interfacePageable';
10
10
  export const playerComment = defineComponent({
11
11
  data() {
12
12
  return {
@@ -14,42 +14,33 @@ export const playerComment = defineComponent({
14
14
  };
15
15
  },
16
16
  computed: {
17
- ...mapState({
18
- commentsLoaded(state: StoreState){ return state.comments.loadedComments},
19
- live(state: StoreState) { return state.player.live},
20
- podcast(state: StoreState) { return state.player.podcast}
21
- }),
17
+ ...mapState(useCommentStore, ['commentActualPodcastId', 'commentTotalCount', 'commentLoaded']),
18
+ ...mapState(usePlayerStore, ['playerPodcast', 'playerLive']),
22
19
  organisationId(): string|undefined {
23
20
  return state.generalParameters.organisationId;
24
21
  },
25
22
  },
26
23
 
27
24
  watch: {
28
- commentsLoaded(): void {
25
+ commentLoaded(): void {
29
26
  this.initComments(true);
30
27
  },
31
28
  },
32
29
  methods: {
33
30
  editRight(organisation: string): boolean {
34
- if (
35
- (state.generalParameters.isCommments &&
36
- this.organisationId === organisation) ||
37
- state.generalParameters.isAdmin
38
- )
39
- return true;
40
- return false;
31
+ return (true===state.generalParameters.isCommments && this.organisationId === organisation) || true===state.generalParameters.isAdmin;
41
32
  },
42
33
  initCommentCurrentPodcast(podcastId?: number): Array<number>{
43
34
  if (
44
35
  podcastId &&
45
- this.$store.state.comments.actualPodcastId === podcastId
36
+ this.commentActualPodcastId === podcastId
46
37
  ) {
47
- this.comments = this.commentsLoaded;
38
+ this.comments = this.commentLoaded;
48
39
  if (
49
- this.commentsLoaded &&
50
- this.commentsLoaded.length < this.$store.state.comments.totalCount
40
+ this.commentLoaded &&
41
+ this.commentLoaded.length < this.commentTotalCount
51
42
  ) {
52
- return [this.commentsLoaded.length, this.$store.state.comments.totalCount];
43
+ return [this.commentLoaded.length, this.commentTotalCount];
53
44
  }
54
45
  }
55
46
  return [0, 0];
@@ -75,17 +66,17 @@ export const playerComment = defineComponent({
75
66
  },
76
67
  async initComments(refresh = false): Promise<void> {
77
68
  let podcastId, organisation;
78
- if (this.podcast) {
79
- podcastId = this.podcast.podcastId;
80
- organisation = this.podcast.organisation.id;
81
- } else if (this.live) {
82
- podcastId = this.live.livePodcastId;
83
- organisation = this.live.organisation.id;
69
+ if (this.playerPodcast) {
70
+ podcastId = this.playerPodcast.podcastId;
71
+ organisation = this.playerPodcast.organisation.id;
72
+ } else if (this.playerLive) {
73
+ podcastId = this.playerLive.livePodcastId;
74
+ organisation = this.playerLive.organisation.id;
84
75
  }
85
76
  if (
86
77
  refresh &&
87
78
  podcastId &&
88
- this.$store.state.comments.actualPodcastId !== podcastId
79
+ this.commentActualPodcastId !== podcastId
89
80
  ) {
90
81
  return;
91
82
  }
@@ -94,7 +85,7 @@ export const playerComment = defineComponent({
94
85
  let count = param[1];
95
86
  if (
96
87
  (!podcastId ||
97
- this.$store.state.comments.actualPodcastId === podcastId) &&
88
+ this.commentActualPodcastId === podcastId) &&
98
89
  0 === first
99
90
  ){
100
91
  return;