@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "35.1.7",
3
+ "version": "35.2.0",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -27,6 +27,7 @@
27
27
  "humanize-duration": "3.27.1",
28
28
  "jest": "^29.4.1",
29
29
  "jquery": "^3.6.3",
30
+ "pinia": "^2.0.30",
30
31
  "qrcode.vue": "^3.3.3",
31
32
  "sass": "^1.58.0",
32
33
  "sonarqube-scanner": "^3.0.0",
@@ -39,8 +40,7 @@
39
40
  "vue-recaptcha": "^2.0.3",
40
41
  "vue-router": "^4.1.6",
41
42
  "vue3-lazyload": "^0.3.6",
42
- "vue3-swatches": "1.0.10",
43
- "vuex": "^4.1.0"
43
+ "vue3-swatches": "1.0.10"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/jquery": "^3.5.16",
package/src/App.vue CHANGED
@@ -25,12 +25,15 @@ import TopBar from '@/components/misc/TopBar.vue';
25
25
  import FooterOctopus from '@/components/misc/Footer.vue';
26
26
  import Player from '@/components/misc/player/Player.vue';
27
27
  import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
28
- import { state } from './store/paramStore';
28
+ import { state } from './stores/ParamSdkStore';
29
29
  import { Rubriquage } from './store/class/rubrique/rubriquage';
30
30
  import { RubriquageFilter } from './store/class/rubrique/rubriquageFilter';
31
31
  import { Rubrique } from './store/class/rubrique/rubrique';
32
32
  import initSDK from './components/mixins/init';
33
- import { defineAsyncComponent, defineComponent } from 'vue'
33
+ import { useFilterStore } from '@/stores/FilterStore';
34
+ import { useGeneralStore } from '@/stores/GeneralStore';
35
+ import { mapState, mapActions } from 'pinia';
36
+ import { defineAsyncComponent, defineComponent } from 'vue';
34
37
  import { Category } from './store/class/general/category';
35
38
  const LeftMenu = defineAsyncComponent(() => import('@/components/misc/LeftMenu.vue'));
36
39
  export default defineComponent({
@@ -54,6 +57,11 @@ export default defineComponent({
54
57
  };
55
58
  },
56
59
 
60
+ computed:{
61
+ ...mapState(useFilterStore, ['filterRubriquage', 'filterOrgaId']),
62
+ ...mapState(useGeneralStore, ['storedCategories']),
63
+ },
64
+
57
65
  watch: {
58
66
  '$i18n.locale'(){
59
67
  this.$forceUpdate();
@@ -64,6 +72,7 @@ export default defineComponent({
64
72
  await this.initApp();
65
73
  },
66
74
  methods:{
75
+ ...mapActions(useFilterStore, ['filterUpdateIab', 'filterUpdateRubrique']),
67
76
  async initApp(){
68
77
  await this.initSdk();
69
78
  await this.handleOrganisationFilter();
@@ -84,21 +93,21 @@ export default defineComponent({
84
93
  await this.selectOrganisation(orgaId);
85
94
  },
86
95
  handleIabIdFilter(){
87
- if(this.$store.state.filter.organisationId){
96
+ if(this.filterOrgaId){
88
97
  return;
89
98
  }
90
99
  if (this.$route.query.iabId && 'string'===typeof this.$route.query.iabId) {
91
100
  const iabId = parseInt(this.$route.query.iabId, 10);
92
- const category = this.$store.state.categories.filter((c: Category) => {
101
+ const category = this.storedCategories.filter((c: Category) => {
93
102
  return c.id === iabId;
94
103
  });
95
104
  if(category.length){
96
- this.$store.commit('filterIab', category[0]);
105
+ this.filterUpdateIab(category[0]);
97
106
  }
98
107
  }
99
108
  },
100
109
  handleRubriquesFilter(){
101
- if(0===this.$store.state.filter.rubriquageArray.length){
110
+ if(0===this.filterRubriquage.length){
102
111
  return;
103
112
  }
104
113
  if (this.$route.query.rubriquesId && 'string'===typeof this.$route.query.rubriquesId) {
@@ -107,7 +116,7 @@ export default defineComponent({
107
116
  const filterLength = arrayFilter.length;
108
117
  for (let index = 0; index < filterLength; index++) {
109
118
  const rubriqueFilter = arrayFilter[index].split(':');
110
- const rubriquage = this.$store.state.filter.rubriquageArray.find((x: Rubriquage) => {
119
+ const rubriquage = this.filterRubriquage.find((x: Rubriquage) => {
111
120
  return x.rubriquageId === parseInt(rubriqueFilter[0]);
112
121
  });
113
122
  if(rubriquage){
@@ -118,7 +127,7 @@ export default defineComponent({
118
127
  }
119
128
  }
120
129
  if(rubriquesFilter.length){
121
- this.$store.commit('filterRubrique', rubriquesFilter);
130
+ this.filterUpdateRubrique(rubriquesFilter);
122
131
  }
123
132
  }
124
133
  }
@@ -1,4 +1,3 @@
1
- import { StoreState } from "@/store/classStore/typeAppStore";
2
1
  import axios from "axios";
3
2
  enum ModuleApi {
4
3
  DEFAULT = 0,
@@ -16,20 +15,20 @@ enum ModuleApi {
16
15
  }
17
16
  /* eslint-disable */
18
17
  export default {
19
- async fetchData<Type>(state: StoreState,moduleName: ModuleApi,wsPath:string, forceRefresh?:boolean): Promise<Type>{
20
- console.log(state,moduleName,wsPath,forceRefresh);
18
+ async fetchData<Type>(moduleName: ModuleApi,wsPath:string, forceRefresh?:boolean): Promise<Type>{
19
+ console.log(moduleName,wsPath,forceRefresh);
21
20
  const response = await axios.get('/mock');
22
21
  return response.data;
23
22
  },
24
- async postData<Type>(state: StoreState,moduleName: ModuleApi,wsPath:string, elementToCreate: unknown): Promise<Type>{
25
- console.log(state,moduleName,wsPath);
23
+ async postData<Type>(moduleName: ModuleApi,wsPath:string, elementToCreate: unknown): Promise<Type>{
24
+ console.log(moduleName,wsPath);
26
25
  const response = await axios.post('/mock', elementToCreate, {
27
26
  headers: {'Content-Type': 'application/json; charset=utf-8' },
28
27
  });
29
28
  return response.data;
30
29
  },
31
- async deleteData(state: StoreState,moduleName: ModuleApi,wsPath:string): Promise<void>{
32
- console.log(state,moduleName,wsPath);
30
+ async deleteData(moduleName: ModuleApi,wsPath:string): Promise<void>{
31
+ console.log(moduleName,wsPath);
33
32
  await axios.delete('/mock');
34
33
  },
35
34
  };
@@ -73,7 +73,8 @@ const getDefaultCategory = (defaultName: string) => {
73
73
  }
74
74
  return { name: defaultName, id: 0 };
75
75
  };
76
-
76
+ import { useGeneralStore } from '@/stores/GeneralStore';
77
+ import { mapState } from 'pinia';
77
78
  import { Category } from '@/store/class/general/category';
78
79
  import { defineComponent } from 'vue'
79
80
  export default defineComponent({
@@ -105,11 +106,12 @@ export default defineComponent({
105
106
 
106
107
 
107
108
  computed: {
109
+ ...mapState(useGeneralStore, ['storedCategories']),
108
110
  categoriesChosen(): Array<Category>{
109
111
  if(this.initCategories){
110
112
  return this.initCategories;
111
113
  }
112
- return this.$store.state.categories;
114
+ return this.storedCategories;
113
115
  },
114
116
  allCategories(): Array<Category> {
115
117
  return [...this.categoriesChosen].sort((a: Category, b: Category) =>
@@ -4,7 +4,7 @@
4
4
  class="mt-3"
5
5
  >
6
6
  <ol
7
- v-if="categoryFilter || rubriqueFilter.length"
7
+ v-if="filterIab || filterRubrique.length"
8
8
  class="octopus-breadcrumb d-flex align-items-center flex-wrap"
9
9
  >
10
10
  <li>
@@ -14,18 +14,18 @@
14
14
  >{{ $t('All') }}</a>
15
15
  </li>
16
16
  <li
17
- v-if="categoryFilter"
17
+ v-if="filterIab"
18
18
  >
19
- {{ categoryFilter.name }}
19
+ {{ filterIab.name }}
20
20
  </li>
21
21
  <li
22
- v-for="(filter, index) in rubriqueFilter"
22
+ v-for="(filter, index) in filterRubrique"
23
23
  :key="filter.rubriqueId"
24
24
  class="d-flex align-items-center"
25
- :class="rubriqueFilter.length-1 === index ? 'active':''"
25
+ :class="filterRubrique.length-1 === index ? 'active':''"
26
26
  >
27
27
  <a
28
- v-if="rubriqueFilter.length - 1 !== index"
28
+ v-if="filterRubrique.length - 1 !== index"
29
29
  href="#"
30
30
  @click="removeFilter(index,$event)"
31
31
  >{{ filter.nameRubriquage }}</a>
@@ -49,13 +49,13 @@
49
49
  </li>
50
50
  </ol>
51
51
  <CategoryList
52
- v-if="!categoryFilter && !rubriquageFilter.length"
52
+ v-if="!filterIab && !rubriquageFilter.length"
53
53
  :is-filter="true"
54
54
  :is-display="isDisplay"
55
55
  @categoriesLength="checkIfCategories"
56
56
  />
57
57
  <RubriqueList
58
- v-else-if="isDisplay && rubriquageFilter.length !== rubriqueFilter.length"
58
+ v-else-if="isDisplay && rubriquageFilter.length !== filterRubrique.length"
59
59
  :rubriquages="rubriquageFilter"
60
60
  />
61
61
  </div>
@@ -66,10 +66,11 @@
66
66
  </template>
67
67
 
68
68
  <script lang="ts">
69
- import { Category } from '@/store/class/general/category';
70
69
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
71
70
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
72
71
  import { Rubrique } from '@/store/class/rubrique/rubrique';
72
+ import { useFilterStore } from '@/stores/FilterStore';
73
+ import { mapState, mapActions } from 'pinia';
73
74
  import { defineComponent, defineAsyncComponent } from 'vue';
74
75
  const CategoryList = defineAsyncComponent(() => import('./CategoryList.vue'));
75
76
  const RubriqueList = defineAsyncComponent(() => import('./../rubriques/RubriqueList.vue'));
@@ -88,55 +89,51 @@ export default defineComponent({
88
89
  };
89
90
  },
90
91
  computed: {
91
- categoryFilter(): Category|undefined{
92
- return this.$store.state.filter.iab;
93
- },
94
- rubriqueFilter(): Array<RubriquageFilter>{
95
- return this.$store.state.filter.rubriqueFilter;
96
- },
92
+ ...mapState(useFilterStore, ['filterIab', 'filterRubrique', 'filterRubriquage', 'filterOrgaId']),
97
93
  isDisplay(): boolean {
98
94
  return ("homePriv" === this.$route.name ||"home" === this.$route.name ||"podcasts" === this.$route.name||"emissions" === this.$route.name)
99
- && (this.isCategories || undefined!==this.categoryFilter || 0!==this.rubriqueFilter.length || 0!==this.rubriquageFilter.length);
95
+ && (this.isCategories || undefined!==this.filterIab || 0!==this.filterRubrique.length || 0!==this.rubriquageFilter.length);
100
96
  },
101
97
  rubriquageFilter(): Array<Rubriquage>{
102
- return this.$store.state.filter.organisationId ? this.$store.state.filter.rubriquageArray : [];
98
+ return this.filterOrgaId ? this.filterRubriquage : [];
103
99
  },
104
100
  },
105
101
  methods:{
102
+ ...mapActions(useFilterStore, ['filterUpdateIab', 'filterUpdateRubrique']),
106
103
  checkIfCategories(length: number): void{
107
104
  this.isCategories = 0!==length;
108
105
  },
109
106
  onRubriqueSelected(index: number, rubrique: Rubrique): void {
110
- if(!rubrique ||this.rubriqueFilter[index].rubriqueId === rubrique.rubriqueId){
107
+ if(!rubrique ||this.filterRubrique[index].rubriqueId === rubrique.rubriqueId){
111
108
  return;
112
109
  }
113
- const filter = Array.from(this.rubriqueFilter);
110
+ const filter = Array.from(this.filterRubrique);
114
111
  filter[index].rubriqueId = rubrique.rubriqueId||0;
115
- this.$store.commit('filterRubrique', filter);
112
+ this.filterUpdateRubrique(filter);
116
113
  const queryString = filter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
117
114
  this.$router.replace({ query: { ...this.$route.query, ...{ rubriquesId: queryString }} });
118
115
  },
119
116
  getRubriques(rubriquageId: number): Array<Rubrique>{
120
- const rubriquage = this.$store.state.filter.rubriquageArray.find((x: Rubriquage) => {
117
+ const rubriquage = this.filterRubriquage.find((x: Rubriquage) => {
121
118
  return x.rubriquageId === rubriquageId;
122
119
  });
123
120
  return rubriquage ? rubriquage.rubriques : [];
124
121
  },
125
122
  removeFilter(index: number, event?: { preventDefault: () => void }): void{
126
- if(this.categoryFilter){
123
+ if(this.filterIab){
127
124
  if (this.$route.query.iabId) {
128
125
  this.$router.replace({ query: {...this.$route.query, ...{iabId: undefined} } });
129
126
  }
130
- this.$store.commit('filterIab', undefined);
127
+ this.filterUpdateIab(undefined);
131
128
  }else{
132
- const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
129
+ const newFilter: Array<RubriquageFilter> = Array.from(this.filterRubrique);
133
130
  newFilter.splice(index + 1);
134
131
  if (this.$route.query.rubriquesId) {
135
132
  const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
136
133
  this.$router.replace({ query: { ...this.$route.query, ...{ rubriquesId:"" !== queryString? queryString : undefined}} });
137
134
  }
138
135
 
139
- this.$store.commit('filterRubrique', newFilter);
136
+ this.filterUpdateRubrique(newFilter);
140
137
  }
141
138
  if(event){
142
139
  event.preventDefault();
@@ -43,10 +43,13 @@
43
43
 
44
44
  <script lang="ts">
45
45
  import octopusApi from '@saooti/octopus-api';
46
- import { state } from '../../../store/paramStore';
46
+ import { state } from '../../../stores/ParamSdkStore';
47
47
  import Popover from '../../misc/Popover.vue';
48
48
  import { Category } from '@/store/class/general/category';
49
- import { defineComponent } from 'vue'
49
+ import { useFilterStore } from '@/stores/FilterStore';
50
+ import { useGeneralStore } from '@/stores/GeneralStore';
51
+ import { mapState, mapActions } from 'pinia';
52
+ import { defineComponent } from 'vue';
50
53
  export default defineComponent({
51
54
  name: 'CategoryList',
52
55
  components:{
@@ -66,20 +69,19 @@ export default defineComponent({
66
69
  },
67
70
 
68
71
  computed: {
72
+ ...mapState(useGeneralStore, ['storedCategories', 'storedCategoriesOrga']),
73
+ ...mapState(useFilterStore, ['filterOrgaId']),
69
74
  isPodcastmaker(): boolean {
70
75
  return (state.generalParameters.podcastmaker as boolean);
71
76
  },
72
- categoriesWatch(): Array<Category>{
73
- return this.$store.state.categories;
74
- },
75
77
  categories(): Array<Category> {
76
78
  let arrayCategories: Array<Category> = [];
77
- if (this.filterOrga) {
78
- arrayCategories = this.$store.state.categoriesOrga.filter((c: Category) => {
79
+ if (this.filterOrgaId) {
80
+ arrayCategories = this.storedCategoriesOrga.filter((c: Category) => {
79
81
  return c.podcastOrganisationCount;
80
82
  });
81
83
  }else{
82
- arrayCategories = this.$store.state.categories.filter((c: Category) => {
84
+ arrayCategories = this.storedCategories.filter((c: Category) => {
83
85
  if (this.isPodcastmaker) return c.podcastOrganisationCount;
84
86
  return c.podcastCount;
85
87
  });
@@ -87,14 +89,11 @@ export default defineComponent({
87
89
  this.$emit('categoriesLength', arrayCategories.length);
88
90
  return arrayCategories;
89
91
  },
90
- filterOrga(): string {
91
- return this.$store.state.filter.organisationId;
92
- },
93
92
  watchVariable(): string{
94
93
  return `${this.isDisplay}|${this.categories}`;
95
94
  },
96
95
  reloadVariable():string{
97
- return `${this.filterOrga}|${this.categoriesWatch}`;
96
+ return `${this.filterOrgaId}|${this.storedCategories}`;
98
97
  }
99
98
  },
100
99
  watch: {
@@ -111,8 +110,8 @@ export default defineComponent({
111
110
  deep: true,
112
111
  immediate:true,
113
112
  handler(){
114
- if (this.filterOrga) {
115
- this.fetchCategories(this.filterOrga);
113
+ if (this.filterOrgaId) {
114
+ this.fetchCategories(this.filterOrgaId);
116
115
  }
117
116
  }
118
117
  }
@@ -125,12 +124,14 @@ export default defineComponent({
125
124
  },
126
125
 
127
126
  methods: {
127
+ ...mapActions(useFilterStore, ['filterUpdateIab']),
128
+ ...mapActions(useGeneralStore, ['storedUpdateCategoriesOrga']),
128
129
  checkIfFilter(category: Category): void{
129
130
  if(!this.isFilter){
130
131
  this.$router.push({
131
132
  name: 'category',
132
133
  params: { iabId: category.id.toString() },
133
- query: { productor: this.filterOrga },
134
+ query: { productor: this.filterOrgaId },
134
135
  });
135
136
  return;
136
137
  }
@@ -138,7 +139,7 @@ export default defineComponent({
138
139
  if(!queries.iabId || ('string'===typeof queries.iabId && parseInt(queries.iabId ,10) !== category.id)) {
139
140
  this.$router.replace({ query: { ...queries, ...{ iabId: category.id.toString() }} });
140
141
  }
141
- this.$store.commit('filterIab',category);
142
+ this.filterUpdateIab(category);
142
143
  },
143
144
  resizeWindow(): void {
144
145
  const categoryList = (this.$refs.categoryListContainer as HTMLElement);
@@ -168,7 +169,7 @@ export default defineComponent({
168
169
  const data = await octopusApi.fetchDataWithParams<Array<Category>>(0, `iab/list/${organisationId}`,{
169
170
  lang: this.$i18n.locale,
170
171
  });
171
- this.$store.commit('categoriesOrgaSet', data);
172
+ this.storedUpdateCategoriesOrga(data);
172
173
  },
173
174
  },
174
175
  })
@@ -62,9 +62,11 @@
62
62
 
63
63
  <script lang="ts">
64
64
  import Constants from '../../../../public/config';
65
- import { state } from '../../../store/paramStore';
65
+ import { state } from '../../../stores/ParamSdkStore';
66
66
  import ClassicModal from '../../misc/modal/ClassicModal.vue';
67
67
  import api from '@/api/initialize';
68
+ import { useAuthStore } from '@/stores/AuthStore';
69
+ import { mapState } from 'pinia';
68
70
  import { VueRecaptcha } from 'vue-recaptcha';
69
71
  import { defineComponent } from 'vue';
70
72
  export default defineComponent({
@@ -87,6 +89,7 @@ export default defineComponent({
87
89
  };
88
90
  },
89
91
  computed: {
92
+ ...mapState(useAuthStore, ['authProfile']),
90
93
  errorText():string {
91
94
  if(this.isCaptchaTest){
92
95
  return this.$t('Recaptcha not active');
@@ -110,7 +113,7 @@ export default defineComponent({
110
113
  methods: {
111
114
  initAuthenticatedName():void{
112
115
  if (!state.generalParameters.authenticated) { return; }
113
- this.name = (`${this.$store.state.auth?.profile.firstname||''} ${this.$store.state.auth?.profile.lastname||''}`).trim();
116
+ this.name = (`${this.authProfile?.firstname||''} ${this.authProfile?.lastname||''}`).trim();
114
117
  this.isVerify = true;
115
118
  },
116
119
  async handleSuccess(token: string) {
@@ -92,11 +92,14 @@
92
92
  import octopusApi from '@saooti/octopus-api';
93
93
  import crudApi from '@/api/classicCrud';
94
94
  import cookies from '../../mixins/cookies';
95
- import { state } from '../../../store/paramStore';
95
+ import { state } from '../../../stores/ParamSdkStore';
96
96
  import { Podcast } from '@/store/class/general/podcast';
97
97
  import { Conference } from '@/store/class/conference/conference';
98
98
  import { CommentPodcast } from '@/store/class/general/comment';
99
99
  import Constants from '../../../../public/config';
100
+ import { usePlayerStore } from '@/stores/PlayerStore';
101
+ import { useAuthStore } from '@/stores/AuthStore';
102
+ import { mapState } from 'pinia';
100
103
  import { defineComponent, defineAsyncComponent } from 'vue';
101
104
  const AddCommentModal = defineAsyncComponent(() => import('./AddCommentModal.vue'));
102
105
  const MessageModal = defineAsyncComponent(() => import('../../misc/modal/MessageModal.vue'));
@@ -132,6 +135,8 @@ export default defineComponent({
132
135
  },
133
136
 
134
137
  computed: {
138
+ ...mapState(usePlayerStore, ['playerPodcast', 'playerLive', 'playerElapsed', 'playerTotal']),
139
+ ...mapState(useAuthStore, ['authProfile']),
135
140
  validName(): boolean{
136
141
  return this.countName <= this.maxName;
137
142
  },
@@ -163,7 +168,7 @@ export default defineComponent({
163
168
  true === state.generalParameters.isAdmin;
164
169
  },
165
170
  userId(): string|undefined {
166
- return state.generalParameters.authenticated ? this.$store.state.auth?.profile.userId : undefined;
171
+ return state.generalParameters.authenticated ? this.authProfile?.userId : undefined;
167
172
  },
168
173
  phase(): string|undefined {
169
174
  if(undefined === this.podcast){
@@ -235,18 +240,18 @@ export default defineComponent({
235
240
  this.$emit('cancelAction');
236
241
  },
237
242
  defineTimelineValue(): number{
238
- let timeline = 0;
243
+ let timeline = 0;
239
244
  if (
240
245
  undefined !== this.podcast &&(
241
- (this.$store.state.player.podcast?.podcastId ===this.podcast.podcastId) ||
242
- (this.$store.state.player.live?.livePodcastId ===this.podcast.podcastId))
246
+ (this.playerPodcast?.podcastId ===this.podcast.podcastId) ||
247
+ (this.playerLive?.livePodcastId ===this.podcast.podcastId))
243
248
  ) {
244
249
  timeline = Math.round(
245
- this.$store.state.player.elapsed * this.$store.state.player.total
250
+ this.playerElapsed * this.playerTotal
246
251
  );
247
- if (this.podcast.duration && this.$store.state.player.podcast) {
252
+ if (this.podcast.duration && this.playerPodcast) {
248
253
  timeline = Math.round(
249
- timeline - (this.$store.state.player.total - this.podcast.duration / 1000)
254
+ timeline - (this.playerTotal - this.podcast.duration / 1000)
250
255
  );
251
256
  }
252
257
  }
@@ -274,7 +279,7 @@ export default defineComponent({
274
279
  let data;
275
280
  if (this.isCertified) {
276
281
  comment.status = 'Valid';
277
- data = await crudApi.postData<CommentPodcast>(this.$store.state,2, 'registeredComment/' + comment.userId, {...comment, ...{userId: undefined}});
282
+ data = await crudApi.postData<CommentPodcast>(2, 'registeredComment/' + comment.userId, {...comment, ...{userId: undefined}});
278
283
  } else {
279
284
  data = await octopusApi.postDataPublic<CommentPodcast>(2,'unregisteredComment',comment);
280
285
  }
@@ -129,7 +129,7 @@
129
129
  </template>
130
130
 
131
131
  <script lang="ts">
132
- import { state } from '../../../store/paramStore';
132
+ import { state } from '../../../stores/ParamSdkStore';
133
133
  import selenium from '../../mixins/selenium';
134
134
  import displayMethods from '../../mixins/displayMethods';
135
135
  import { CommentPodcast } from '@/store/class/general/comment';
@@ -137,6 +137,8 @@ import { Podcast } from '@/store/class/general/podcast';
137
137
  import { Conference } from '@/store/class/conference/conference';
138
138
  import CommentBasicView from './CommentBasicView.vue';
139
139
  import Constants from '../../../../public/config';
140
+ import { useGeneralStore } from '@/stores/GeneralStore';
141
+ import { mapState, mapActions } from 'pinia';
140
142
  import { defineComponent, defineAsyncComponent } from 'vue';
141
143
  const CommentInput = defineAsyncComponent(() => import('./CommentInput.vue'));
142
144
  const CommentParentInfo = defineAsyncComponent(() => import('./CommentParentInfo.vue'));
@@ -177,6 +179,7 @@ export default defineComponent({
177
179
  };
178
180
  },
179
181
  computed: {
182
+ ...mapState(useGeneralStore, ['generalComments']),
180
183
  validName(): boolean{
181
184
  return this.countName <= this.maxName;
182
185
  },
@@ -200,10 +203,10 @@ export default defineComponent({
200
203
  },
201
204
  knownIdentity: {
202
205
  get(): string|null {
203
- return this.$store.state.comments.knownIdentity;
206
+ return this.generalComments.knownIdentity;
204
207
  },
205
208
  set(value: string|null) {
206
- this.$store.commit('setCommentIdentity', value);
209
+ this.setCommentIdentity(value);
207
210
  },
208
211
  },
209
212
  recordingInLive(): boolean {
@@ -215,6 +218,7 @@ export default defineComponent({
215
218
  },
216
219
  },
217
220
  methods: {
221
+ ...mapActions(useGeneralStore, ['setCommentIdentity']),
218
222
  answerComment(): void {
219
223
  this.collapseVisible = true;
220
224
  this.focus = !this.focus;
@@ -35,7 +35,7 @@
35
35
 
36
36
  <script lang="ts">
37
37
  import ClassicLoading from '../../form/ClassicLoading.vue';
38
- import { state } from '../../../store/paramStore';
38
+ import { state } from '../../../stores/ParamSdkStore';
39
39
  import octopusApi from '@saooti/octopus-api';
40
40
  import dayjs from 'dayjs';
41
41
  import { Podcast } from '@/store/class/general/podcast';
@@ -38,6 +38,8 @@
38
38
  <script lang="ts">
39
39
  import { CommentPodcast } from '@/store/class/general/comment';
40
40
  import selenium from '../../mixins/selenium';
41
+ import { usePlayerStore } from '@/stores/PlayerStore';
42
+ import { mapState } from 'pinia';
41
43
  import { defineComponent } from 'vue'
42
44
  export default defineComponent({
43
45
  name: 'CommentPlayer',
@@ -51,13 +53,14 @@ export default defineComponent({
51
53
  displayContent: undefined as CommentPodcast|undefined,
52
54
  };
53
55
  },
56
+ computed: {
57
+ ...mapState(usePlayerStore, ['playerPodcast'])
58
+ },
54
59
  methods: {
55
60
  percentPosition(time: number): number {
56
61
  let realDuration = this.totalTime;
57
- if (this.$store.state.player.podcast?.duration) {
58
- realDuration = Math.round(
59
- this.$store.state.player.podcast.duration / 1000
60
- );
62
+ if (this.playerPodcast?.duration) {
63
+ realDuration = Math.round(this.playerPodcast.duration / 1000);
61
64
  }
62
65
  if (realDuration < this.totalTime) {
63
66
  time = time + (this.totalTime - realDuration);
@@ -40,7 +40,8 @@ import CommentInput from './CommentInput.vue';
40
40
  import cookies from '../../mixins/cookies';
41
41
  import { Podcast } from '@/store/class/general/podcast';
42
42
  import { Conference } from '@/store/class/conference/conference';
43
-
43
+ import { useGeneralStore } from '@/stores/GeneralStore';
44
+ import { mapState, mapActions } from 'pinia';
44
45
  import { defineComponent } from 'vue'
45
46
  import { CommentPodcast } from '@/store/class/general/comment';
46
47
  export default defineComponent({
@@ -62,6 +63,7 @@ export default defineComponent({
62
63
  };
63
64
  },
64
65
  computed: {
66
+ ...mapState(useGeneralStore, ['generalComments']),
65
67
  commentTitle():string{
66
68
  const count = this.loaded && this.totalCount > 0 ? this.$t('()', { nb: this.totalCount }) : '';
67
69
  return this.$t("Podcast's comments")+count;
@@ -89,10 +91,10 @@ export default defineComponent({
89
91
  },
90
92
  knownIdentity: {
91
93
  get(): string|null {
92
- return this.$store.state.comments.knownIdentity;
94
+ return this.generalComments.knownIdentity;
93
95
  },
94
96
  set(value: string|null) {
95
- this.$store.commit('setCommentIdentity', value);
97
+ this.setCommentIdentity(value);
96
98
  },
97
99
  },
98
100
  isLive(): boolean {
@@ -109,9 +111,10 @@ export default defineComponent({
109
111
  this.knownIdentity = this.getCookie('comment-octopus-name');
110
112
  },
111
113
  methods: {
114
+ ...mapActions(useGeneralStore, ['setCommentIdentity', 'setCommentLoaded']),
112
115
  updateFetch(value: { count: number, comments: Array<CommentPodcast> }): void {
113
116
  this.loaded = true;
114
- this.$store.commit('setCommentLoaded', {
117
+ this.setCommentLoaded({
115
118
  ...value,
116
119
  podcastId: this.podcast? this.podcast.podcastId: undefined,
117
120
  });
@@ -60,7 +60,7 @@
60
60
  import octopusApi from '@saooti/octopus-api';
61
61
  import domHelper from '../../../helper/dom';
62
62
  import EmissionPlayerItem from './EmissionPlayerItem.vue';
63
- import { state } from '../../../store/paramStore';
63
+ import { state } from '../../../stores/ParamSdkStore';
64
64
  import { handle403 } from '../../mixins/handle403';
65
65
  const PHONE_WIDTH = 960;
66
66
  import ClassicLoading from '../../form/ClassicLoading.vue';
@@ -6,7 +6,7 @@
6
6
  :to="{
7
7
  name: 'emission',
8
8
  params: { emissionId: emission.emissionId },
9
- query: { productor: filterOrga },
9
+ query: { productor: filterOrgaId },
10
10
  }"
11
11
  :title="$t('Emission')"
12
12
  class="d-flex flex-grow-1 text-dark"
@@ -45,7 +45,7 @@
45
45
  :to="{
46
46
  name: 'productor',
47
47
  params: { productorId: emission.orga.id },
48
- query: { productor: filterOrga },
48
+ query: { productor: filterOrgaId },
49
49
  }"
50
50
  >
51
51
  © {{ emission.orga.name }}
@@ -58,7 +58,7 @@
58
58
  <script lang="ts">
59
59
  import { orgaComputed } from '../../mixins/orgaComputed';
60
60
  import { Emission } from '@/store/class/general/emission';
61
- import { state } from '../../../store/paramStore';
61
+ import { state } from '../../../stores/ParamSdkStore';
62
62
  import octopusApi from '@saooti/octopus-api';
63
63
  import imageProxy from '../../mixins/imageProxy';
64
64
  import displayMethods from '../../mixins/displayMethods';