@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
@@ -1,16 +1,22 @@
1
1
  import octopusApi from '@saooti/octopus-api';
2
2
  import { defineComponent } from 'vue';
3
+ import { usePlayerStore } from '@/stores/PlayerStore';
4
+ import { mapState, mapActions } from 'pinia';
3
5
  export const playerTranscript = defineComponent({
6
+ computed: {
7
+ ...mapState(usePlayerStore, ['playerTranscript', 'playerPodcast']),
8
+ },
4
9
  methods: {
10
+ ...mapActions(usePlayerStore, ['playerUpdateTranscript']),
5
11
  async getTranscription(): Promise<void>{
6
- if(!this.podcast){
7
- this.$store.commit('player/transcript',undefined);
12
+ if(!this.playerPodcast){
13
+ this.playerUpdateTranscript(undefined);
8
14
  return;
9
15
  }
10
- const result = await octopusApi.fetchDataPublic<string>(11 , `response/${this.podcast.podcastId}`);
16
+ const result = await octopusApi.fetchDataPublic<string>(11 , `response/${this.playerPodcast.podcastId}`);
11
17
  const arrayTranscript = this.parseSrt(result);
12
18
  const actualText = arrayTranscript?.[0]?.startTime === 0 ? arrayTranscript[0].text : "";
13
- this.$store.commit('player/transcript',{actual: 0,actualText:actualText, value : arrayTranscript});
19
+ this.playerUpdateTranscript({actual: 0,actualText:actualText, value : arrayTranscript});
14
20
  },
15
21
  parseSrt(transcript: string){
16
22
  const pattern = /(\d+)\n([\d:,]+)\s+-{2}\>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;
@@ -37,18 +43,18 @@ export const playerTranscript = defineComponent({
37
43
  return (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+parseFloat(a[2]));
38
44
  },
39
45
  onTimeUpdateTranscript(currentTime:number){
40
- if((this.$store.state.player.transcript?.value[this.$store.state.player.transcript?.actual]?.endTime ?? Infinity) < currentTime){
41
- this.$store.state.player.transcript.actual +=1;
42
- this.$store.state.player.transcript.actualText = this.$store.state.player.transcript?.value[this.$store.state.player.transcript?.actual].text ?? "";
46
+ if(this.playerTranscript && (this.playerTranscript?.value[this.playerTranscript?.actual]?.endTime ?? Infinity) < currentTime){
47
+ this.playerTranscript.actual +=1;
48
+ this.playerTranscript.actualText = this.playerTranscript?.value[this.playerTranscript?.actual].text ?? "";
43
49
  }
44
50
  },
45
51
  onSeekedTranscript(currentTime: number){
46
- if(this.$store.state.player.transcript){
52
+ if(this.playerTranscript){
47
53
  let newActual = 0;
48
- while (currentTime > (this.$store.state.player.transcript.value[newActual]?.endTime ?? Infinity)){
54
+ while (currentTime > (this.playerTranscript.value[newActual]?.endTime ?? Infinity)){
49
55
  newActual +=1;
50
56
  }
51
- this.$store.state.player.transcript.actual = newActual;
57
+ this.playerTranscript.actual = newActual;
52
58
  }
53
59
  }
54
60
  },
@@ -5,14 +5,16 @@
5
5
  :first="0"
6
6
  :size="30"
7
7
  :iab-id="iabId"
8
- :organisation-id="filterOrga"
8
+ :organisation-id="filterOrgaId"
9
9
  />
10
10
  </div>
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
14
  import PodcastList from '../display/podcasts/PodcastList.vue';
15
-
15
+ import { useFilterStore } from '@/stores/FilterStore';
16
+ import { useGeneralStore } from '@/stores/GeneralStore';
17
+ import { mapState } from 'pinia';
16
18
  import { defineComponent } from 'vue'
17
19
  import { Category } from '@/store/class/general/category';
18
20
  export default defineComponent({
@@ -24,14 +26,10 @@ export default defineComponent({
24
26
  },
25
27
 
26
28
  computed: {
27
- categories(): Array<Category> {
28
- return this.$store.state.categories;
29
- },
30
- filterOrga(): string {
31
- return this.$store.state.filter.organisationId;
32
- },
29
+ ...mapState(useGeneralStore, ['storedCategories']),
30
+ ...mapState(useFilterStore, ['filterOrgaId']),
33
31
  title():string{
34
- const matchCategories = this.categories.filter((c: Category) => c.id === this.iabId);
32
+ const matchCategories = this.storedCategories.filter((c: Category) => c.id === this.iabId);
35
33
  if (1 !== matchCategories.length) return "";
36
34
  return matchCategories[0]['name'];
37
35
  }
@@ -83,7 +83,7 @@
83
83
 
84
84
  <script lang="ts">
85
85
  import octopusApi from '@saooti/octopus-api';
86
- import { state } from '../../store/paramStore';
86
+ import { state } from '../../stores/ParamSdkStore';
87
87
  import displayMethods from '../mixins/displayMethods';
88
88
  import imageProxy from '../mixins/imageProxy';
89
89
  import { orgaComputed } from '../mixins/orgaComputed';
@@ -200,7 +200,7 @@ export default defineComponent({
200
200
  this.error = false;
201
201
  try {
202
202
  this.emission = await octopusApi.fetchData<Emission>(0,'emission/'+this.emissionId);
203
- if("PUBLIC"!==this.emission.orga.privacy && this.filterOrga!==this.emission.orga.id){
203
+ if("PUBLIC"!==this.emission.orga.privacy && this.filterOrgaId!==this.emission.orga.id){
204
204
  this.initError();
205
205
  return;
206
206
  }
@@ -46,7 +46,9 @@
46
46
  import { orgaComputed } from '../mixins/orgaComputed';
47
47
  import EmissionList from '../display/emission/EmissionList.vue';
48
48
  import AdvancedSearch from '../display/filter/AdvancedSearch.vue';
49
- import { state } from '../../store/paramStore';
49
+ import { state } from '../../stores/ParamSdkStore';
50
+ import { useFilterStore } from '@/stores/FilterStore';
51
+ import { mapState } from 'pinia';
50
52
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
51
53
  import { defineComponent, defineAsyncComponent } from 'vue';
52
54
  const ProductorSearch = defineAsyncComponent(() => import('../display/filter/ProductorSearch.vue'));
@@ -82,6 +84,7 @@ export default defineComponent({
82
84
  },
83
85
 
84
86
  computed: {
87
+ ...mapState(useFilterStore, ['filterIab', 'filterRubrique']),
85
88
  titleDisplay(): string{
86
89
  return state.emissionsPage.titlePage??this.$t('All emissions');
87
90
  },
@@ -93,7 +96,7 @@ export default defineComponent({
93
96
  true===state.generalParameters.isAdmin
94
97
  },
95
98
  organisation(): string|undefined {
96
- return this.organisationId?this.organisationId:this.filterOrga;
99
+ return this.organisationId?this.organisationId:this.filterOrgaId;
97
100
  },
98
101
  },
99
102
  watch:{
@@ -114,13 +117,13 @@ export default defineComponent({
114
117
  },
115
118
  methods: {
116
119
  initComponent(): void{
117
- this.iabId =this.$store.state.filter.iab?.id;
118
- this.organisationId = this.productor ?this.productor: this.filterOrga;
120
+ this.iabId =this.filterIab?.id;
121
+ this.organisationId = this.productor ?this.productor: this.filterOrgaId;
119
122
  if (this.organisation && this.organisationRight) {
120
123
  this.includeHidden = true;
121
124
  }
122
- if(this.$store.state.filter.rubriqueFilter.length){
123
- this.updateRubriquageFilter(this.$store.state.filter.rubriqueFilter);
125
+ if(this.filterRubrique.length){
126
+ this.updateRubriquageFilter(this.filterRubrique);
124
127
  }
125
128
  this.$nextTick(() => {
126
129
  this.isInit = true;
@@ -28,11 +28,14 @@
28
28
  </template>
29
29
 
30
30
  <script lang="ts">
31
- import { state } from '../../store/paramStore';
31
+ import { state } from '../../stores/ParamSdkStore';
32
+ import { useGeneralStore } from '@/stores/GeneralStore';
33
+ import { mapState } from 'pinia';
32
34
  import { defineComponent } from 'vue';
33
35
  export default defineComponent({
34
36
  name: 'Error403Page',
35
37
  computed: {
38
+ ...mapState(useGeneralStore, ['metaTitle']),
36
39
  authenticated(): boolean {
37
40
  return (state.generalParameters.authenticated as boolean);
38
41
  },
@@ -41,7 +44,7 @@ export default defineComponent({
41
44
  }
42
45
  },
43
46
  mounted() {
44
- document.title = this.$store.state.general.metaTitle;
47
+ document.title = this.metaTitle;
45
48
  },
46
49
  });
47
50
  </script>
@@ -30,11 +30,14 @@
30
30
 
31
31
  <script lang="ts">
32
32
  import PodcastInlineList from '../display/podcasts/PodcastInlineList.vue';
33
- import { state } from '../../store/paramStore';
33
+ import { state } from '../../stores/ParamSdkStore';
34
34
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
35
35
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
36
36
  import { Rubrique } from '@/store/class/rubrique/rubrique';
37
- import { defineComponent } from 'vue'
37
+ import { useFilterStore } from '@/stores/FilterStore';
38
+ import { useGeneralStore } from '@/stores/GeneralStore';
39
+ import { mapState } from 'pinia';
40
+ import { defineComponent } from 'vue';
38
41
  import { Category } from '@/store/class/general/category';
39
42
  export default defineComponent({
40
43
  name: 'Home',
@@ -47,20 +50,22 @@ export default defineComponent({
47
50
  };
48
51
  },
49
52
  computed: {
53
+ ...mapState(useGeneralStore, ['storedCategories']),
54
+ ...mapState(useFilterStore, ['filterRubriquage', 'filterOrgaId', 'filterRubrique', 'filterRubriqueDisplay', 'filterIab']),
50
55
  rubriqueDisplay(): Array<Rubrique>{
51
- return this.$store.state.filter.rubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
56
+ return this.filterRubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
52
57
  },
53
58
  rubriquageFilter(): Array<Rubriquage>{
54
- return this.$store.state.filter.organisationId ? this.$store.state.filter.rubriquageArray :[];
59
+ return this.filterOrgaId? this.filterRubriquage :[];
55
60
  },
56
61
  rubriqueFilter(): Array<RubriquageFilter>{
57
- return this.$store.state.filter.rubriqueFilter;
62
+ return this.filterRubrique;
58
63
  },
59
64
  categories(): Array<Category> {
60
- if(this.$store.state.filter.iab){
61
- return [this.$store.state.filter.iab];
65
+ if(this.filterIab){
66
+ return [this.filterIab];
62
67
  }
63
- return this.$store.state.categories.filter((c: Category) => {
68
+ return this.storedCategories.filter((c: Category) => {
64
69
  if (state.generalParameters.podcastmaker) return c.podcastOrganisationCount;
65
70
  return c.podcastCount;
66
71
  });
@@ -4,7 +4,7 @@
4
4
  <h1>{{ $t('In live') }}</h1>
5
5
  <template v-if="!isPodcastmaker">
6
6
  <router-link
7
- v-if="liveRight && filterOrga"
7
+ v-if="liveRight && filterOrgaId"
8
8
  to="/main/priv/edit/live"
9
9
  >
10
10
  <button class="btn btn-primary">
@@ -23,7 +23,7 @@
23
23
  </template>
24
24
  </div>
25
25
  <LiveList
26
- v-if="filterOrga || organisationId"
26
+ v-if="filterOrgaId || organisationId"
27
27
  :conference-watched="conferenceWatched"
28
28
  :organisation-id="organisationId"
29
29
  @initConferenceIds="initConferenceIds"
@@ -32,10 +32,13 @@
32
32
  </template>
33
33
 
34
34
  <script lang="ts">
35
- import { state } from '../../store/paramStore';
35
+ import { state } from '../../stores/ParamSdkStore';
36
36
  import { Organisation } from '@/store/class/general/organisation';
37
37
  import { defineComponent, defineAsyncComponent } from 'vue';
38
38
  import { Conference } from '@/store/class/conference/conference';
39
+ import { useAuthStore } from '@/stores/AuthStore';
40
+ import { useFilterStore } from '@/stores/FilterStore';
41
+ import { mapState } from 'pinia';
39
42
  const LiveList = defineAsyncComponent(() => import('../display/live/LiveList.vue'));
40
43
  const OrganisationChooser = defineAsyncComponent(() => import('../display/organisation/OrganisationChooser.vue'));
41
44
  export default defineComponent({
@@ -56,12 +59,11 @@ export default defineComponent({
56
59
  },
57
60
 
58
61
  computed: {
62
+ ...mapState(useFilterStore, ['filterOrgaId']),
63
+ ...mapState(useAuthStore, ['authOrganisation']),
59
64
  liveRight(): boolean {
60
65
  return (state.generalParameters.isRoleLive as boolean)&& this.live;
61
66
  },
62
- filterOrga(): string {
63
- return this.$store.state.filter.organisationId;
64
- },
65
67
  isPodcastmaker(): boolean {
66
68
  return (state.generalParameters.podcastmaker as boolean);
67
69
  },
@@ -69,10 +71,10 @@ export default defineComponent({
69
71
  created() {
70
72
  if (this.productor) {
71
73
  this.$emit('update:organisationId',this.productor);
72
- } else if (this.$store.state.filter.organisationId) {
73
- this.$emit('update:organisationId',this.$store.state.filter.organisationId);
74
+ } else if (this.filterOrgaId) {
75
+ this.$emit('update:organisationId',this.filterOrgaId);
74
76
  }
75
- if (!this.$store.state.auth?.organisation?.attributes?.['live.active']) {
77
+ if (!this.authOrganisation.attributes?.['live.active']) {
76
78
  this.live = false;
77
79
  }
78
80
  },
@@ -10,8 +10,8 @@
10
10
  class="btn btn-primary"
11
11
  :to="{
12
12
  name: 'home',
13
- query: { productor: $store.state.filter.organisationId,
14
- iabId:$store.state.filter.iab?.id,
13
+ query: { productor: filterOrgaId,
14
+ iabId:filterIab?.id,
15
15
  rubriquesId: rubriqueQueryParam},
16
16
  }"
17
17
  >
@@ -23,13 +23,18 @@
23
23
 
24
24
  <script lang="ts">
25
25
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
26
+ import { useFilterStore } from '@/stores/FilterStore';
27
+ import { useGeneralStore } from '@/stores/GeneralStore';
28
+ import { mapState } from 'pinia';
26
29
  import { defineComponent } from 'vue';
27
30
  export default defineComponent({
28
31
  name: 'PageNotFound',
29
32
  computed:{
33
+ ...mapState(useGeneralStore, ['metaTitle']),
34
+ ...mapState(useFilterStore, ['filterRubrique', 'filterIab', 'filterOrgaId']),
30
35
  rubriqueQueryParam(): string|undefined{
31
- if(this.$store.state.filter?.rubriqueFilter?.length){
32
- return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
36
+ if(this.filterRubrique?.length){
37
+ return this.filterRubrique.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
33
38
  }
34
39
  return undefined;
35
40
  },
@@ -38,7 +43,7 @@ export default defineComponent({
38
43
  },
39
44
  },
40
45
  mounted() {
41
- document.title = this.$store.state.general.metaTitle;
46
+ document.title = this.metaTitle;
42
47
  },
43
48
  });
44
49
  </script>
@@ -66,7 +66,7 @@
66
66
 
67
67
  <script lang="ts">
68
68
  import octopusApi from '@saooti/octopus-api';
69
- import { state } from '../../store/paramStore';
69
+ import { state } from '../../stores/ParamSdkStore';
70
70
  import displayMethods from '../mixins/displayMethods';
71
71
  import imageProxy from '../mixins/imageProxy';
72
72
  import { orgaComputed } from '../mixins/orgaComputed';
@@ -149,7 +149,7 @@ export default defineComponent({
149
149
  this.loaded = false;
150
150
  try {
151
151
  const data = await octopusApi.fetchData<Participant>(0, 'participant/'+this.participantId);
152
- if("PUBLIC"!==data?.orga?.privacy && this.filterOrga!==data?.orga?.id){
152
+ if("PUBLIC"!==data?.orga?.privacy && this.filterOrgaId!==data?.orga?.id){
153
153
  this.initError();
154
154
  return;
155
155
  }
@@ -20,7 +20,7 @@
20
20
  import { orgaComputed } from '../mixins/orgaComputed';
21
21
  import ParticipantList from '../display/participant/ParticipantList.vue';
22
22
  import ProductorSearch from '../display/filter/ProductorSearch.vue';
23
- import { state } from '../../store/paramStore';
23
+ import { state } from '../../stores/ParamSdkStore';
24
24
  import { defineComponent } from 'vue'
25
25
  export default defineComponent({
26
26
  components: {
@@ -45,7 +45,7 @@ export default defineComponent({
45
45
  },
46
46
  },
47
47
  created() {
48
- this.organisationId = this.productor ?this.productor: this.filterOrga;
48
+ this.organisationId = this.productor ?this.productor: this.filterOrgaId;
49
49
  },
50
50
  })
51
51
  </script>
@@ -57,7 +57,7 @@ import { orgaComputed } from '../mixins/orgaComputed';
57
57
  import ClassicLoading from '../form/ClassicLoading.vue';
58
58
  import PodcastList from '../display/playlist/PodcastList.vue';
59
59
  import octopusApi from '@saooti/octopus-api';
60
- import { state } from '../../store/paramStore';
60
+ import { state } from '../../stores/ParamSdkStore';
61
61
  import displayMethods from '../mixins/displayMethods';
62
62
  import imageProxy from '../mixins/imageProxy';
63
63
  import { handle403 } from '../mixins/handle403';
@@ -132,7 +132,7 @@ export default defineComponent({
132
132
  this.loaded = false;
133
133
  this.error = false;
134
134
  this.playlist = await octopusApi.fetchData<Playlist>(0, 'playlist/'+this.playlistId);
135
- if("PUBLIC"!==this.playlist.organisation?.privacy && this.filterOrga!==this.playlist.organisation?.id){
135
+ if("PUBLIC"!==this.playlist.organisation?.privacy && this.filterOrgaId!==this.playlist.organisation?.id){
136
136
  this.initError();
137
137
  return;
138
138
  }
@@ -29,7 +29,7 @@
29
29
  <script lang="ts">
30
30
  import { orgaComputed } from '../mixins/orgaComputed';
31
31
  import PlaylistList from '../display/playlist/PlaylistList.vue';
32
- import { state } from '../../store/paramStore';
32
+ import { state } from '../../stores/ParamSdkStore';
33
33
  import { defineComponent, defineAsyncComponent } from 'vue';
34
34
  const ProductorSearch = defineAsyncComponent(() => import('../display/filter/ProductorSearch.vue'));
35
35
  export default defineComponent({
@@ -64,7 +64,7 @@ export default defineComponent({
64
64
  },
65
65
 
66
66
  created() {
67
- this.organisationId = this.productor ?this.productor: this.filterOrga;
67
+ this.organisationId = this.productor ?this.productor: this.filterOrgaId;
68
68
  },
69
69
  })
70
70
  </script>
@@ -98,7 +98,7 @@ import PodcastModuleBox from '../display/podcasts/PodcastModuleBox.vue';
98
98
  import ClassicLoading from '../form/ClassicLoading.vue';
99
99
  import octopusApi from '@saooti/octopus-api';
100
100
  import crudApi from '@/api/classicCrud';
101
- import { state } from '../../store/paramStore';
101
+ import { state } from '../../stores/ParamSdkStore';
102
102
  import dayjs from 'dayjs';
103
103
  import { Podcast } from '@/store/class/general/podcast';
104
104
  import { Conference } from '@/store/class/conference/conference';
@@ -107,6 +107,8 @@ import { defineComponent, defineAsyncComponent } from 'vue';
107
107
  import CommentSectionVue from '../display/comments/CommentSection.vue';
108
108
  import { CommentPodcast } from '@/store/class/general/comment';
109
109
  import { Category } from '@/store/class/general/category';
110
+ import { useGeneralStore } from '@/stores/GeneralStore';
111
+ import { mapState } from 'pinia';
110
112
  import { AxiosError } from 'axios';
111
113
  const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
112
114
  const SharePlayer = defineAsyncComponent(() => import('../display/sharing/SharePlayer.vue'));
@@ -153,6 +155,7 @@ export default defineComponent({
153
155
  },
154
156
 
155
157
  computed: {
158
+ ...mapState(useGeneralStore, ['storedCategories']),
156
159
  isPodcastmaker(): boolean {
157
160
  return (state.generalParameters.podcastmaker as boolean);
158
161
  },
@@ -174,7 +177,7 @@ export default defineComponent({
174
177
  },
175
178
  categories(): Array<Category> {
176
179
  if ('undefined' === typeof this.podcast) return [];
177
- return this.$store.state.categories
180
+ return this.storedCategories
178
181
  .filter((item: Category) => {
179
182
  return ( this.podcast?.emission.iabIds &&
180
183
  -1 !== this.podcast.emission.iabIds.indexOf(item.id)
@@ -249,7 +252,7 @@ export default defineComponent({
249
252
  async initConference(){
250
253
  if (!this.podcast || !this.isLiveReadyToRecord) return;
251
254
  if (this.isOctopusAndAnimator && undefined!==this.podcast.conferenceId) {
252
- const data = await crudApi.fetchData<Conference>(this.$store.state,9,'conference/'+this.podcast.conferenceId);
255
+ const data = await crudApi.fetchData<Conference>(9,'conference/'+this.podcast.conferenceId);
253
256
  this.fetchConference = data ? data : {conferenceId:-1, title:''};
254
257
  } else if(undefined!==this.podcast.conferenceId){
255
258
  const data = await octopusApi.fetchData<string>(9, 'conference/realstatus/'+this.podcast.conferenceId);
@@ -292,7 +295,7 @@ export default defineComponent({
292
295
  this.error = false;
293
296
  try {
294
297
  const data : Podcast = await octopusApi.fetchData<Podcast>(0, 'podcast/'+this.podcastId);
295
- if("PUBLIC"!==data.organisation.privacy && this.filterOrga!==data.organisation.id){
298
+ if("PUBLIC"!==data.organisation.privacy && this.filterOrgaId!==data.organisation.id){
296
299
  this.initError();
297
300
  return;
298
301
  }
@@ -63,12 +63,13 @@
63
63
  <script lang="ts">
64
64
  import { orgaComputed } from '../mixins/orgaComputed';
65
65
  import PodcastList from '../display/podcasts/PodcastList.vue';
66
- import { state } from '../../store/paramStore';
66
+ import { state } from '../../stores/ParamSdkStore';
67
67
  import ProductorSearch from '../display/filter/ProductorSearch.vue';
68
68
  import AdvancedSearch from '../display/filter/AdvancedSearch.vue';
69
69
  import { Emission } from '@/store/class/general/emission';
70
70
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
71
-
71
+ import { useFilterStore } from '@/stores/FilterStore';
72
+ import { mapState } from 'pinia';
72
73
  import { defineComponent, defineAsyncComponent } from 'vue';
73
74
  const EmissionChooser = defineAsyncComponent(() => import('../display/emission/EmissionChooser.vue'));
74
75
  export default defineComponent({
@@ -106,6 +107,7 @@ export default defineComponent({
106
107
  },
107
108
 
108
109
  computed: {
110
+ ...mapState(useFilterStore, ['filterRubrique', 'filterIab']),
109
111
  titleDisplay(): string{
110
112
  return state.podcastsPage.titlePage ?? this.$t('All podcasts');
111
113
  },
@@ -114,7 +116,7 @@ export default defineComponent({
114
116
  true===state.generalParameters.isAdmin;
115
117
  },
116
118
  organisation(): string|undefined {
117
- return this.organisationId ?this.organisationId: this.filterOrga;
119
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
118
120
  },
119
121
  pageParameters(){
120
122
  return {
@@ -141,11 +143,11 @@ export default defineComponent({
141
143
  methods: {
142
144
  initPodcastsPage(){
143
145
  this.searchPattern = this.searchInit ?? '';
144
- this.organisationId = this.productor ?this.productor: this.filterOrga;
146
+ this.organisationId = this.productor ?this.productor: this.filterOrgaId;
145
147
  this.includeHidden = this.organisation && this.organisationRight ? true : false;
146
- this.iabId =this.$store.state.filter.iab?.id;
147
- if(this.$store.state.filter.rubriqueFilter.length){
148
- this.updateRubriquageFilter(this.$store.state.filter.rubriqueFilter);
148
+ this.iabId =this.filterIab?.id;
149
+ if(this.filterRubrique.length){
150
+ this.updateRubriquageFilter(this.filterRubrique);
149
151
  }
150
152
  this.$nextTick(() => {
151
153
  this.isInit = true;
@@ -19,7 +19,7 @@
19
19
  </template>
20
20
 
21
21
  <script lang="ts">
22
- import { state } from '../../store/paramStore';
22
+ import { state } from '../../stores/ParamSdkStore';
23
23
  import ClassicSearch from '../form/ClassicSearch.vue';
24
24
  import PodcastList from '../display/podcasts/PodcastList.vue';
25
25
  import { defineComponent } from 'vue';
package/src/main.ts CHANGED
@@ -3,8 +3,8 @@ import VueLazyLoad from 'vue3-lazyload';
3
3
  import App from './App.vue';
4
4
  import {setupI18n} from './i18n';
5
5
  import router from '@/router/router';
6
- import store from '@/store/AppStore';
7
- import paramStore from '@/store/paramStore';
6
+ import { createPinia } from 'pinia';
7
+ import paramStore from '@/stores/ParamSdkStore';
8
8
 
9
9
  const nameEQ = 'octopus-language=';
10
10
  const ca = document.cookie.split(';');
@@ -33,7 +33,7 @@ if(0===language.length){
33
33
  }
34
34
  }
35
35
 
36
- const i18n = setupI18n({locale: language}, store.state.general.education);
36
+ const i18n = setupI18n({locale: language}, false);
37
37
 
38
38
  paramStore.initialize({
39
39
  generalParameters: {},
@@ -50,10 +50,12 @@ paramStore.initialize({
50
50
  octopusApi: {}
51
51
  });
52
52
 
53
+ const pinia = createPinia();
54
+
53
55
  // Initialisation store
54
56
  createApp(App)
55
57
  .use(i18n)
56
- .use(store)
58
+ .use(pinia)
57
59
  .use(router)
58
60
  .use(VueLazyLoad)
59
61
  .mount('#app');
@@ -0,0 +1,65 @@
1
+ import { defineStore } from 'pinia';
2
+ interface ApiState {
3
+ apiUrl: string,
4
+ commentUrl: string,
5
+ frontendUrl: string,
6
+ ftpUrl: string,
7
+ hlsUrl: string,
8
+ imageUrl: string,
9
+ keycloakUrl: string,
10
+ mediaUrl: string,
11
+ miniplayerUrl:string,
12
+ processorUrl: string,
13
+ radioUrl: string,
14
+ recoUrl:string,
15
+ rssUrl: string,
16
+ rtmpUrl: string,
17
+ speechToTextUrl: string,
18
+ studioUrl: string,
19
+ videoMakerUrl: string,
20
+ storageUrl: string,
21
+ }
22
+ export const useAuthStore = defineStore('ApiStore', {
23
+ state: (): ApiState => ({
24
+ apiUrl: "",
25
+ commentUrl: "",
26
+ frontendUrl: "",
27
+ ftpUrl: "",
28
+ hlsUrl: "",
29
+ imageUrl: "",
30
+ keycloakUrl: "",
31
+ mediaUrl: "",
32
+ miniplayerUrl: "",
33
+ processorUrl: "",
34
+ radioUrl: "",
35
+ recoUrl: "",
36
+ rssUrl: "",
37
+ rtmpUrl: "",
38
+ speechToTextUrl: "",
39
+ studioUrl: "",
40
+ videoMakerUrl: "",
41
+ storageUrl: "",
42
+ }),
43
+ actions: {
44
+ initApis(initParam: ApiState) {
45
+ this.apiUrl = initParam.apiUrl;
46
+ this.commentUrl = initParam.commentUrl;
47
+ this.frontendUrl = initParam.frontendUrl;
48
+ this.ftpUrl = initParam.ftpUrl;
49
+ this.hlsUrl = initParam.hlsUrl;
50
+ this.imageUrl = initParam.imageUrl;
51
+ this.keycloakUrl = initParam.keycloakUrl;
52
+ this.mediaUrl = initParam.mediaUrl;
53
+ this.miniplayerUrl = initParam.miniplayerUrl;
54
+ this.processorUrl = initParam.processorUrl;
55
+ this.radioUrl = initParam.radioUrl;
56
+ this.recoUrl = initParam.recoUrl;
57
+ this.rssUrl = initParam.rssUrl;
58
+ this.rtmpUrl = initParam.rtmpUrl;
59
+ this.speechToTextUrl = initParam.speechToTextUrl;
60
+ this.studioUrl = initParam.studioUrl;
61
+ this.videoMakerUrl = initParam.videoMakerUrl;
62
+ this.storageUrl = initParam.storageUrl;
63
+ },
64
+ }
65
+ })
@@ -0,0 +1,43 @@
1
+ import { Organisation } from '@/stores/class/general/organisation';
2
+ import { Profile } from '@/stores/class/user/profile';
3
+ import { defineStore } from 'pinia';
4
+
5
+ interface AuthState{
6
+ authName: string;
7
+ authOrgaId?: string;
8
+ authOrgaName?: string;
9
+ authRole: Array<string>;
10
+ authParam: {
11
+ accessToken?: string;
12
+ refreshToken?: string;
13
+ expiration?: Date;
14
+ };
15
+ authProfile: Profile;
16
+ authOrganisation: Organisation;
17
+ }
18
+ export const useAuthStore = defineStore('AuthStore', {
19
+ state: (): AuthState => ({
20
+ authName: '',
21
+ authRole: [''],
22
+ authParam: {
23
+ accessToken: undefined,
24
+ refreshToken: undefined,
25
+ expiration: undefined,
26
+ },
27
+ authProfile: {
28
+ userId: '',
29
+ },
30
+ authOrganisation: {
31
+ id: '',
32
+ name: '',
33
+ imageUrl: '',
34
+ description: undefined,
35
+ monetisable: undefined,
36
+ location: undefined,
37
+ comments: undefined,
38
+ attributes: {
39
+ RSS_CONTACT: undefined,
40
+ },
41
+ },
42
+ }),
43
+ })