@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
@@ -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,12 +30,15 @@
30
30
 
31
31
  <script lang="ts">
32
32
  import PodcastInlineList from '../display/podcasts/PodcastInlineList.vue';
33
- import { state } from '../../store/paramStore';
34
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
35
- import { Rubriquage } from '@/store/class/rubrique/rubriquage';
36
- import { Rubrique } from '@/store/class/rubrique/rubrique';
37
- import { defineComponent } from 'vue'
38
- import { Category } from '@/store/class/general/category';
33
+ import { state } from '../../stores/ParamSdkStore';
34
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
35
+ import { Rubriquage } from '@/stores/class/rubrique/rubriquage';
36
+ import { Rubrique } from '@/stores/class/rubrique/rubrique';
37
+ import { useFilterStore } from '@/stores/FilterStore';
38
+ import { useGeneralStore } from '@/stores/GeneralStore';
39
+ import { mapState } from 'pinia';
40
+ import { defineComponent } from 'vue';
41
+ import { Category } from '@/stores/class/general/category';
39
42
  export default defineComponent({
40
43
  name: 'Home',
41
44
  components: {
@@ -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';
36
- import { Organisation } from '@/store/class/general/organisation';
35
+ import { state } from '../../stores/ParamSdkStore';
36
+ import { Organisation } from '@/stores/class/general/organisation';
37
37
  import { defineComponent, defineAsyncComponent } from 'vue';
38
- import { Conference } from '@/store/class/conference/conference';
38
+ import { Conference } from '@/stores/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
  >
@@ -22,14 +22,19 @@
22
22
  </template>
23
23
 
24
24
  <script lang="ts">
25
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
25
+ import { RubriquageFilter } from '@/stores/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,12 +66,12 @@
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';
73
73
  import { handle403 } from '../mixins/handle403';
74
- import { Participant } from '@/store/class/general/participant';
74
+ import { Participant } from '@/stores/class/general/participant';
75
75
  import ClassicLoading from '../form/ClassicLoading.vue';
76
76
  import { defineComponent, defineAsyncComponent } from 'vue';
77
77
  import { AxiosError } from 'axios';
@@ -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,11 +57,11 @@ 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';
64
- import { Playlist } from '@/store/class/general/playlist';
64
+ import { Playlist } from '@/stores/class/general/playlist';
65
65
  import { defineComponent, defineAsyncComponent } from 'vue';
66
66
  import { AxiosError } from 'axios';
67
67
  const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
@@ -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,15 +98,17 @@ 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
- import { Podcast } from '@/store/class/general/podcast';
104
- import { Conference } from '@/store/class/conference/conference';
103
+ import { Podcast } from '@/stores/class/general/podcast';
104
+ import { Conference } from '@/stores/class/conference/conference';
105
105
  import { handle403 } from '../mixins/handle403';
106
106
  import { defineComponent, defineAsyncComponent } from 'vue';
107
107
  import CommentSectionVue from '../display/comments/CommentSection.vue';
108
- import { CommentPodcast } from '@/store/class/general/comment';
109
- import { Category } from '@/store/class/general/category';
108
+ import { CommentPodcast } from '@/stores/class/general/comment';
109
+ import { Category } from '@/stores/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
- import { Emission } from '@/store/class/general/emission';
70
- import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
71
-
69
+ import { Emission } from '@/stores/class/general/emission';
70
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
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;
@@ -13,7 +13,7 @@
13
13
  import octopusApi from '@saooti/octopus-api';
14
14
  import PodcastList from '../display/podcasts/PodcastList.vue';
15
15
  import { defineComponent } from 'vue'
16
- import { Rubrique } from '@/store/class/rubrique/rubrique';
16
+ import { Rubrique } from '@/stores/class/rubrique/rubrique';
17
17
  export default defineComponent({
18
18
  name:"Rubrique",
19
19
  components: {
@@ -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 useApiStore = 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
+ })
@@ -0,0 +1,40 @@
1
+ import { defineStore } from 'pinia';
2
+ import { CommentPodcast } from './class/general/comment';
3
+ interface CommentState {
4
+ commentInitialized: boolean;
5
+ commentWebsocketengine: undefined;
6
+ commentPodcastId?: number;
7
+ commentOrgaId?: string;
8
+ commentEventToHandle: Array<{
9
+ comment: CommentPodcast
10
+ type: string;
11
+ }>;
12
+ commentKnownIdentity: string | null;
13
+ commentActualPodcastId?: number;
14
+ commentLoaded: Array<CommentPodcast>;
15
+ commentTotalCount: number;
16
+ }
17
+ export const useCommentStore = defineStore('CommentStore', {
18
+ state: (): CommentState => ({
19
+ commentInitialized: false,
20
+ commentWebsocketengine: undefined,
21
+ commentPodcastId: undefined,
22
+ commentOrgaId: undefined,
23
+ commentEventToHandle: [],
24
+ commentKnownIdentity: null,
25
+ commentActualPodcastId: 0,
26
+ commentLoaded: [],
27
+ commentTotalCount: 0,
28
+ }),
29
+ getters:{
30
+ },
31
+ actions: {
32
+ setCommentIdentity(identity:string|null) {
33
+ this.commentKnownIdentity = identity;
34
+ },
35
+ setCommentLoaded(data: {podcastId?: number, comments:Array<CommentPodcast>}) {
36
+ this.commentActualPodcastId = data.podcastId;
37
+ this.commentLoaded = data.comments;
38
+ },
39
+ }
40
+ })
@@ -0,0 +1,63 @@
1
+ import { Category } from '@/stores/class/general/category';
2
+ import { Rubriquage } from '@/stores/class/rubrique/rubriquage';
3
+ import { RubriquageFilter } from '@/stores/class/rubrique/rubriquageFilter';
4
+ import { Rubrique } from '@/stores/class/rubrique/rubrique';
5
+ import { defineStore } from 'pinia';
6
+
7
+ interface FilterState{
8
+ filterOrgaId?: string;
9
+ filterImgUrl?: string;
10
+ filterName?: string;
11
+ filterRubriquage: Array<Rubriquage>;
12
+ filterRubrique: Array<RubriquageFilter>;
13
+ filterRubriqueDisplay: Array<Rubrique>;
14
+ filterTypeMedia?: string;
15
+ filterSortOrder?: string;
16
+ filterSortField?: string;
17
+ filterLive?: boolean;
18
+ filterIab?: Category;
19
+ }
20
+ export const useFilterStore = defineStore('FilterStore', {
21
+ state: (): FilterState => ({
22
+ filterRubriquage: [],
23
+ filterRubrique: [],
24
+ filterRubriqueDisplay: [],
25
+ filterLive: false,
26
+ }),
27
+ actions : {
28
+ filterUpdateOrga(filter: {orgaId?:string,imgUrl?:string,name?:string,rubriquageArray?:Array<Rubriquage>, isLive?:boolean }) {
29
+ this.filterOrgaId = filter.orgaId;
30
+ if (filter.imgUrl || !filter.orgaId) {
31
+ this.filterImgUrl = filter.imgUrl;
32
+ }
33
+ if (filter.name || !filter.orgaId) {
34
+ this.filterName = filter.name;
35
+ }
36
+ if(filter.rubriquageArray){
37
+ this.filterRubriquage = filter.rubriquageArray;
38
+ }
39
+ this.filterLive = filter.isLive;
40
+ this.filterIab = undefined;
41
+ },
42
+ filterUpdateIab(iab?:Category) {
43
+ this.filterIab = iab;
44
+ },
45
+ filterUpdateRubrique(rubriqueFilter: Array<RubriquageFilter>) {
46
+ this.filterRubrique = rubriqueFilter;
47
+ },
48
+ filterUpdateRubriqueDisplay(rubriques: Array<Rubrique>) {
49
+ this.filterRubriqueDisplay = rubriques;
50
+ },
51
+ filterUpdateMedia(filter: {type?:string, order?:string, field?:string}) {
52
+ if (filter.type) {
53
+ this.filterTypeMedia = filter.type;
54
+ }
55
+ if (filter.order) {
56
+ this.filterSortOrder = filter.order;
57
+ }
58
+ if (filter.field) {
59
+ this.filterSortField = filter.field;
60
+ }
61
+ },
62
+ }
63
+ })