@saooti/octopus-sdk 40.0.2 → 40.1.0-SNAPSHOT

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 (163) hide show
  1. package/index.ts +29 -31
  2. package/package.json +1 -1
  3. package/plateform.conf +1 -1
  4. package/src/App.vue +9 -3
  5. package/src/api/classicApi.ts +1 -1
  6. package/src/components/composable/player/usePlayerDisplayTime.ts +33 -0
  7. package/src/components/composable/player/usePlayerLive.ts +150 -0
  8. package/src/components/composable/player/usePlayerLogic.ts +265 -0
  9. package/src/components/composable/player/usePlayerLogicProgress.ts +135 -0
  10. package/src/components/composable/player/usePlayerStitching.ts +213 -0
  11. package/src/components/composable/player/usePlayerTranscript.ts +120 -0
  12. package/src/components/composable/player/usePlayerVast.ts +207 -0
  13. package/src/components/composable/podcasts/useCountdown.ts +53 -0
  14. package/src/components/composable/podcasts/usePodcastView.ts +85 -0
  15. package/src/components/{mixins/radio/fetchRadioData.ts → composable/radio/usefetchRadioData.ts} +79 -0
  16. package/src/components/composable/route/useAdvancedParamInit.ts +165 -0
  17. package/src/components/composable/route/useRouteUpdateParams.ts +48 -0
  18. package/src/components/composable/route/useRubriquesFilterComputed.ts +24 -0
  19. package/src/components/composable/route/useRubriquesFilterParam.ts +32 -0
  20. package/src/components/composable/route/useSeoTitleUrl.ts +30 -0
  21. package/src/components/composable/route/useSimplePageParam.ts +50 -0
  22. package/src/components/composable/useErrorHandler.ts +25 -0
  23. package/src/components/composable/useImageProxy.ts +28 -0
  24. package/src/components/composable/useInit.ts +38 -0
  25. package/src/components/composable/useMetaTitle.ts +19 -0
  26. package/src/components/composable/useMetaTitleWatch.ts +14 -0
  27. package/src/components/composable/useOrgaComputed.ts +23 -0
  28. package/src/components/composable/useOrganisationFilter.ts +65 -0
  29. package/src/components/composable/useResizePhone.ts +27 -0
  30. package/src/components/composable/useSelenium.ts +10 -0
  31. package/src/components/composable/useTagOf.ts +21 -0
  32. package/src/components/display/aggregator/RssSection.vue +1 -4
  33. package/src/components/display/categories/CategoryChooser.vue +1 -1
  34. package/src/components/display/categories/CategoryFilter.vue +7 -3
  35. package/src/components/display/categories/CategoryList.vue +5 -2
  36. package/src/components/display/comments/CommentInput.vue +0 -3
  37. package/src/components/display/comments/CommentList.vue +6 -2
  38. package/src/components/display/comments/CommentPlayer.vue +5 -2
  39. package/src/components/display/comments/CommentSection.vue +0 -2
  40. package/src/components/display/comments/item/CommentBasicView.vue +4 -4
  41. package/src/components/display/comments/item/CommentItem.vue +0 -4
  42. package/src/components/display/comments/item/CommentMoreActions.vue +6 -2
  43. package/src/components/display/emission/EmissionInlineList.vue +6 -6
  44. package/src/components/display/emission/EmissionItem.vue +13 -6
  45. package/src/components/display/emission/EmissionList.vue +5 -2
  46. package/src/components/display/emission/EmissionPlayerItem.vue +8 -5
  47. package/src/components/display/emission/EmissionPresentationItem.vue +16 -7
  48. package/src/components/display/emission/EmissionPresentationList.vue +9 -7
  49. package/src/components/display/filter/AdvancedSearch.vue +9 -6
  50. package/src/components/display/filter/CategorySearchFilter.vue +0 -2
  51. package/src/components/display/filter/ProductorSearch.vue +8 -3
  52. package/src/components/display/filter/RubriqueFilter.vue +6 -2
  53. package/src/components/display/list/ListPaginate.vue +9 -6
  54. package/src/components/display/list/SwiperList.vue +6 -5
  55. package/src/components/display/live/CountDown.vue +7 -15
  56. package/src/components/display/live/CountdownOctopus.vue +10 -30
  57. package/src/components/display/live/LiveItem.vue +0 -2
  58. package/src/components/display/live/LiveList.vue +9 -4
  59. package/src/components/display/live/RadioCurrently.vue +9 -5
  60. package/src/components/display/live/RadioImage.vue +6 -4
  61. package/src/components/display/live/RadioItem.vue +1 -2
  62. package/src/components/display/live/RadioList.vue +5 -3
  63. package/src/components/display/live/RadioPlanning.vue +10 -7
  64. package/src/components/display/organisation/OrganisationChooser.vue +8 -4
  65. package/src/components/display/participant/ParticipantInlineList.vue +5 -5
  66. package/src/components/display/participant/ParticipantItem.vue +13 -5
  67. package/src/components/display/participant/ParticipantList.vue +6 -3
  68. package/src/components/display/playlist/PlaylistItem.vue +12 -5
  69. package/src/components/display/playlist/PlaylistList.vue +6 -3
  70. package/src/components/display/playlist/PodcastList.vue +8 -4
  71. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +6 -3
  72. package/src/components/display/podcasts/DownloadPodcastButton.vue +2 -4
  73. package/src/components/display/podcasts/PodcastImage.vue +6 -3
  74. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +7 -4
  75. package/src/components/display/podcasts/PodcastItem.vue +1 -1
  76. package/src/components/display/podcasts/PodcastItemInfo.vue +6 -3
  77. package/src/components/display/podcasts/PodcastList.vue +6 -3
  78. package/src/components/display/podcasts/PodcastModuleBox.vue +31 -11
  79. package/src/components/display/podcasts/PodcastPlayBar.vue +1 -3
  80. package/src/components/display/podcasts/PodcastPlayButton.vue +1 -3
  81. package/src/components/display/podcasts/PodcastRubriqueList.vue +4 -3
  82. package/src/components/display/podcasts/TagList.vue +5 -2
  83. package/src/components/display/podcasts/VideoModuleBox.vue +6 -3
  84. package/src/components/display/rubriques/RubriqueChooser.vue +0 -2
  85. package/src/components/display/rubriques/RubriqueList.vue +7 -5
  86. package/src/components/display/sharing/ShareButtons.vue +4 -2
  87. package/src/components/display/sharing/ShareDistribution.vue +4 -2
  88. package/src/components/form/ClassicEmojiPicker.vue +5 -3
  89. package/src/components/misc/ClassicLazy.vue +2 -2
  90. package/src/components/misc/FooterGarSection.vue +2 -3
  91. package/src/components/misc/FooterSection.vue +9 -5
  92. package/src/components/misc/MobileMenu.vue +5 -3
  93. package/src/components/misc/TopBar.vue +8 -6
  94. package/src/components/misc/TopBarMainContent.vue +8 -4
  95. package/src/components/misc/modal/ClipboardModal.vue +4 -3
  96. package/src/components/misc/modal/NewsletterModal.vue +4 -3
  97. package/src/components/misc/modal/ShareModalPlayer.vue +4 -2
  98. package/src/components/misc/player/PlayerCompact.vue +30 -41
  99. package/src/components/misc/player/PlayerComponent.vue +69 -84
  100. package/src/components/misc/player/PlayerLarge.vue +43 -58
  101. package/src/components/misc/player/elements/PlayerImage.vue +6 -3
  102. package/src/components/misc/player/elements/PlayerTitle.vue +6 -2
  103. package/src/components/misc/player/radio/RadioHistory.vue +2 -4
  104. package/src/components/misc/player/video/PlayerVideoHls.vue +6 -7
  105. package/src/components/pages/EmissionPage.vue +19 -7
  106. package/src/components/pages/EmissionsPage.vue +31 -23
  107. package/src/components/pages/HomePage.vue +5 -2
  108. package/src/components/pages/PageLogout.vue +0 -2
  109. package/src/components/pages/PageNotFound.vue +11 -15
  110. package/src/components/pages/ParticipantPage.vue +18 -7
  111. package/src/components/pages/ParticipantsPage.vue +16 -21
  112. package/src/components/pages/PlaylistPage.vue +18 -7
  113. package/src/components/pages/PlaylistsPage.vue +20 -29
  114. package/src/components/pages/PodcastPage.vue +12 -6
  115. package/src/components/pages/PodcastsPage.vue +46 -48
  116. package/src/components/pages/RadioPage.vue +9 -6
  117. package/src/components/pages/RubriquePage.vue +41 -52
  118. package/src/components/pages/VideoPage.vue +152 -166
  119. package/src/helper/cookiesHelper.ts +20 -0
  120. package/src/helper/displayHelper.ts +15 -0
  121. package/src/helper/downloadHelper.ts +30 -0
  122. package/src/helper/{fetch.ts → fetchHelper.ts} +0 -1
  123. package/src/helper/loadScript.ts +22 -0
  124. package/src/helper/radio/radioHelper.ts +15 -0
  125. package/src/helper/{string.ts → stringHelper.ts} +5 -0
  126. package/src/stores/AuthStore.ts +1 -2
  127. package/src/stores/CommentStore.ts +8 -8
  128. package/src/stores/PlayerStore.ts +1 -1
  129. package/src/components/mixins/cookies.ts +0 -22
  130. package/src/components/mixins/displayMethods.ts +0 -17
  131. package/src/components/mixins/download.ts +0 -33
  132. package/src/components/mixins/fetchParameters.ts +0 -16
  133. package/src/components/mixins/handle403.ts +0 -22
  134. package/src/components/mixins/imageProxy.ts +0 -28
  135. package/src/components/mixins/init.ts +0 -34
  136. package/src/components/mixins/loadScript.ts +0 -25
  137. package/src/components/mixins/metaTitle.ts +0 -15
  138. package/src/components/mixins/metaTitleWatch.ts +0 -26
  139. package/src/components/mixins/orgaComputed.ts +0 -23
  140. package/src/components/mixins/organisationFilter.ts +0 -56
  141. package/src/components/mixins/player/playerDisplayTime.ts +0 -35
  142. package/src/components/mixins/player/playerLive.ts +0 -144
  143. package/src/components/mixins/player/playerLogic.ts +0 -275
  144. package/src/components/mixins/player/playerLogicProgress.ts +0 -135
  145. package/src/components/mixins/player/playerStitching.ts +0 -202
  146. package/src/components/mixins/player/playerTranscript.ts +0 -113
  147. package/src/components/mixins/player/playerVast.ts +0 -198
  148. package/src/components/mixins/podcast/countdown.ts +0 -45
  149. package/src/components/mixins/podcast/podcastView.ts +0 -63
  150. package/src/components/mixins/resizePhone.ts +0 -26
  151. package/src/components/mixins/routeParam/advancedParamInit.ts +0 -202
  152. package/src/components/mixins/routeParam/paginateParamInit.ts +0 -43
  153. package/src/components/mixins/routeParam/routeParams.ts +0 -33
  154. package/src/components/mixins/routeParam/rubriquesFilterComputed.ts +0 -22
  155. package/src/components/mixins/routeParam/rubriquesFilterParam.ts +0 -29
  156. package/src/components/mixins/selenium.ts +0 -7
  157. package/src/components/mixins/seoTitleUrl.ts +0 -26
  158. package/src/components/mixins/tagOfMixins.ts +0 -19
  159. package/src/helper/uuidGenerator.ts +0 -7
  160. /package/src/{helper → components/composable}/useEventListener.ts +0 -0
  161. /package/src/{components/mixins/debounce.ts → helper/debounceHelper.ts} +0 -0
  162. /package/src/helper/{dom.ts → domHelper.ts} +0 -0
  163. /package/src/helper/{duration.ts → durationHelper.ts} +0 -0
@@ -0,0 +1,14 @@
1
+ import { useRoute } from "vue-router";
2
+ import { useMetaTitle } from "./useMetaTitle";
3
+ import { watch } from "vue";
4
+ import { useI18n } from "vue-i18n";
5
+
6
+ export const useMetaTitleWatch = ()=>{
7
+ const { updateMetaTitle } = useMetaTitle();
8
+
9
+ const route = useRoute();
10
+ const i18n = useI18n();
11
+
12
+ watch(route, () => updateMetaTitle(), {immediate:true});
13
+ watch(()=>i18n.locale, () => updateMetaTitle());
14
+ }
@@ -0,0 +1,23 @@
1
+ import { computed } from "vue";
2
+ import { useAuthStore } from "../../stores/AuthStore";
3
+ import { state } from "../../stores/ParamSdkStore";
4
+ export const useOrgaComputed = ()=>{
5
+
6
+ const authStore = useAuthStore();
7
+
8
+ const isPodcastmaker = computed(() =>state.generalParameters.podcastmaker as boolean);
9
+
10
+ function isEditRights(orgaId?: string, condition = true){
11
+ return (
12
+ (condition && undefined!==authStore.authOrgaId&&
13
+ authStore.authOrgaId === orgaId) ||
14
+ authStore.isRoleAdmin
15
+ );
16
+ }
17
+
18
+ return {
19
+ isPodcastmaker,
20
+ isEditRights,
21
+ authOrgaId: authStore.authOrgaId
22
+ }
23
+ }
@@ -0,0 +1,65 @@
1
+ import {useErrorHandler} from "./useErrorHandler";
2
+ import { useFilterStore } from "../../stores/FilterStore";
3
+ import { useSaveFetchStore } from "../../stores/SaveFetchStore";
4
+ import { state } from "../../stores/ParamSdkStore";
5
+ import classicApi from "@/api/classicApi";
6
+ import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
7
+ import { useRoute, useRouter } from "vue-router";
8
+ import { AxiosError } from "axios";
9
+ export const useOrganisationFilter= ()=>{
10
+
11
+ const {handle403} = useErrorHandler();
12
+
13
+ const filterStore = useFilterStore();
14
+ const saveFetchStore = useSaveFetchStore();
15
+
16
+ const route = useRoute();
17
+ const router = useRouter();
18
+
19
+ async function selectOrganisation(organisationId: string): Promise<void> {
20
+ try {
21
+ const response = await saveFetchStore.getOrgaData(organisationId);
22
+ const data = await classicApi.fetchData<Array<Rubriquage>>({
23
+ api: 0,
24
+ path:"rubriquage/find/" + organisationId,
25
+ parameters:{
26
+ sort: "HOMEPAGEORDER",
27
+ homePageOrder: true,
28
+ },
29
+ specialTreatement:true
30
+ });
31
+ const isLive = await saveFetchStore.getOrgaLiveEnabled(organisationId);
32
+ filterStore.filterUpdateOrga({
33
+ orgaId: organisationId,
34
+ imgUrl: response.imageUrl,
35
+ name: response.name,
36
+ rubriquageArray: data.filter((element: Rubriquage) => {
37
+ return element.rubriques.length;
38
+ }),
39
+ isLive: isLive,
40
+ });
41
+ if(!state.generalParameters.podcastmaker){
42
+ const queries = route.query;
43
+ router.push({
44
+ query: { ...queries, ...{ productor: organisationId, o:undefined } },
45
+ });
46
+ }
47
+ } catch (error) {
48
+ handle403(error as AxiosError);
49
+ }
50
+ }
51
+
52
+ function removeSelectedOrga(): void {
53
+ if (route.query.productor) {
54
+ router.push({
55
+ query: { ...route.query, ...{ productor: undefined } },
56
+ });
57
+ }
58
+ filterStore.filterUpdateOrga({ orgaId: undefined });
59
+ }
60
+
61
+ return {
62
+ selectOrganisation,
63
+ removeSelectedOrga
64
+ }
65
+ }
@@ -0,0 +1,27 @@
1
+ import debounce from '../../helper/debounceHelper';
2
+ import {computed, onBeforeUnmount, onMounted, Ref, ref} from 'vue';
3
+ export const useResizePhone = ()=>{
4
+ const windowWidth = ref(0);
5
+ const debounceResizeEvent : Ref<undefined|((...args: any[]) => void)> =ref(undefined);
6
+
7
+ const isPhone = computed(() => windowWidth.value < 960);
8
+
9
+ function handleResize() {
10
+ windowWidth.value = window.innerWidth;
11
+ }
12
+ onMounted(() => {
13
+ debounceResizeEvent.value = debounce(handleResize, 500);
14
+ window.addEventListener('resize', debounceResizeEvent.value);
15
+ handleResize();
16
+ })
17
+
18
+ onBeforeUnmount(() => {
19
+ window.removeEventListener('resize', debounceResizeEvent.value);
20
+ })
21
+
22
+ return {
23
+ isPhone,
24
+ windowWidth,
25
+ }
26
+ }
27
+
@@ -0,0 +1,10 @@
1
+ export const useSelenium = ()=>{
2
+
3
+ function seleniumFormat(string: string): string {
4
+ return string.toLowerCase().replace(/\s/g, "");
5
+ }
6
+
7
+ return {
8
+ seleniumFormat
9
+ }
10
+ }
@@ -0,0 +1,21 @@
1
+ export const useTagOf = ()=>{
2
+
3
+ function isOuestFranceTag(tag: string): boolean {
4
+ return "[of]" === tag.substring(0, 4);
5
+ }
6
+ function formateOfTag(tag: string): string {
7
+ if (!isOuestFranceTag(tag)) {
8
+ return tag;
9
+ }
10
+ const lastSlash = tag.lastIndexOf("/");
11
+ if (-1 !== lastSlash) {
12
+ return tag.substring(lastSlash + 1, tag.length);
13
+ }
14
+ return tag.substring(4, tag.length);
15
+ }
16
+
17
+ return {
18
+ isOuestFranceTag,
19
+ formateOfTag
20
+ }
21
+ }
@@ -2,7 +2,4 @@
2
2
  <div />
3
3
  </template>
4
4
 
5
- <script lang="ts">
6
- import { defineComponent } from "vue";
7
- export default defineComponent({});
8
- </script>
5
+ <script setup lang="ts"></script>
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  return this.storedCategories;
76
76
  },
77
77
  categoriesOrdered(): Array<Category> {
78
- let allCategoriesOrdered = [...this.categoriesChosen].sort(
78
+ let allCategoriesOrdered = this.categoriesChosen.toSorted(
79
79
  (a: Category, b: Category) => (a.name > b.name ? 1 : -1),
80
80
  );
81
81
  if (!this.displayAllCategories) {
@@ -67,8 +67,8 @@
67
67
  </template>
68
68
 
69
69
  <script lang="ts">
70
- import { rubriquesFilterParam } from "../../mixins/routeParam/rubriquesFilterParam";
71
- import { routeParams } from "../../mixins/routeParam/routeParams";
70
+ import { useRubriquesFilterParam } from "../../composable/route/useRubriquesFilterParam";
71
+ import { useRouteUpdateParams } from "../../composable/route/useRouteUpdateParams";
72
72
  import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
73
73
  import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
74
74
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
@@ -91,7 +91,11 @@ export default defineComponent({
91
91
  RubriqueList,
92
92
  RubriqueChooser,
93
93
  },
94
- mixins: [routeParams, rubriquesFilterParam],
94
+ setup(){
95
+ const { updateFiltersParam } = useRouteUpdateParams();
96
+ const { modifyRubriquesFilter } = useRubriquesFilterParam();
97
+ return {updateFiltersParam, modifyRubriquesFilter }
98
+ },
95
99
  data() {
96
100
  return {
97
101
  isCategories: false as boolean,
@@ -42,7 +42,7 @@
42
42
 
43
43
  <script lang="ts">
44
44
  import PlusIcon from "vue-material-design-icons/Plus.vue";
45
- import { routeParams } from "../../mixins/routeParam/routeParams";
45
+ import { useRouteUpdateParams } from "../../composable/route/useRouteUpdateParams";
46
46
  import classicApi from "../../../api/classicApi";
47
47
  import { state } from "../../../stores/ParamSdkStore";
48
48
  import ClassicPopover from "../../misc/ClassicPopover.vue";
@@ -57,13 +57,16 @@ export default defineComponent({
57
57
  ClassicPopover,
58
58
  PlusIcon,
59
59
  },
60
- mixins: [routeParams],
61
60
 
62
61
  props: {
63
62
  isFilter: { default: false, type: Boolean },
64
63
  isDisplay: { default: false, type: Boolean },
65
64
  },
66
65
  emits: ["categoriesLength"],
66
+ setup(){
67
+ const { updateFiltersParam } = useRouteUpdateParams();
68
+ return {updateFiltersParam }
69
+ },
67
70
 
68
71
  data() {
69
72
  return {
@@ -51,7 +51,6 @@
51
51
 
52
52
  <script lang="ts">
53
53
  import classicApi from "../../../api/classicApi";
54
- import cookies from "../../mixins/cookies";
55
54
  import { Podcast } from "@/stores/class/general/podcast";
56
55
  import { CommentCreate, CommentPodcast } from "@/stores/class/general/comment";
57
56
  import Constants from "../../../../public/config";
@@ -82,8 +81,6 @@ export default defineComponent({
82
81
  ClassicContentEditable,
83
82
  CommentName,
84
83
  },
85
- mixins: [cookies],
86
-
87
84
  props: {
88
85
  podcast: { default: undefined, type: Object as () => Podcast },
89
86
  focus: { default: false, type: Boolean },
@@ -64,7 +64,7 @@
64
64
  import SortVariantIcon from "vue-material-design-icons/SortVariant.vue";
65
65
  import PlusIcon from "vue-material-design-icons/Plus.vue";
66
66
  import ClassicLoading from "../../form/ClassicLoading.vue";
67
- import { handle403 } from "../../mixins/handle403";
67
+ import {useErrorHandler} from "../../composable/useErrorHandler";
68
68
  import classicApi from "../../../api/classicApi";
69
69
  import { defineAsyncComponent, defineComponent } from "vue";
70
70
  import { AxiosError } from "axios";
@@ -91,7 +91,6 @@ export default defineComponent({
91
91
  PlusIcon,
92
92
  SortVariantIcon,
93
93
  },
94
- mixins: [handle403],
95
94
 
96
95
  props: {
97
96
  size: { default: 10, type: Number },
@@ -107,6 +106,11 @@ export default defineComponent({
107
106
  },
108
107
  emits: ["update:nbComments", "commentDeleted"],
109
108
 
109
+ setup(){
110
+ const {handle403} = useErrorHandler();
111
+ return { handle403 }
112
+ },
113
+
110
114
  data() {
111
115
  return {
112
116
  loading: false as boolean,
@@ -34,14 +34,17 @@
34
34
 
35
35
  <script lang="ts">
36
36
  import { CommentPodcast } from "@/stores/class/general/comment";
37
- import selenium from "../../mixins/selenium";
37
+ import {useSelenium} from "../../composable/useSelenium";
38
38
  import { usePlayerStore } from "../../../stores/PlayerStore";
39
39
  import { mapActions, mapState } from "pinia";
40
40
  import { defineComponent } from "vue";
41
41
  import { useCommentStore } from "../../../stores/CommentStore";
42
42
  export default defineComponent({
43
43
  name: "CommentPlayer",
44
- mixins: [selenium],
44
+ setup(){
45
+ const { seleniumFormat } = useSelenium();
46
+ return { seleniumFormat }
47
+ },
45
48
  data() {
46
49
  return {
47
50
  displayContent: undefined as CommentPodcast | undefined,
@@ -28,7 +28,6 @@
28
28
 
29
29
  <script lang="ts">
30
30
  import RefreshIcon from "vue-material-design-icons/Refresh.vue";
31
- import cookies from "../../mixins/cookies";
32
31
  import { Podcast } from "@/stores/class/general/podcast";
33
32
  import { defineAsyncComponent, defineComponent } from "vue";
34
33
  import { mapActions, mapState } from "pinia";
@@ -48,7 +47,6 @@ export default defineComponent({
48
47
  CommentInput,
49
48
  RefreshIcon,
50
49
  },
51
- mixins: [cookies],
52
50
  props: {
53
51
  podcast: { default: undefined, type: Object as () => Podcast },
54
52
  },
@@ -40,8 +40,7 @@ import AlertIcon from "vue-material-design-icons/Alert.vue";
40
40
  import dayjs from "dayjs";
41
41
  import relativeTime from "dayjs/plugin/relativeTime";
42
42
  dayjs.extend(relativeTime);
43
- import selenium from "../../../mixins/selenium";
44
- import displayMethods from "../../../mixins/displayMethods";
43
+ import displayHelper from "../../../../helper/displayHelper";
45
44
  import { CommentPodcast } from "@/stores/class/general/comment";
46
45
  import ClassicPopover from "../../../misc/ClassicPopover.vue";
47
46
  import { defineComponent } from "vue";
@@ -53,8 +52,6 @@ export default defineComponent({
53
52
  AlertIcon,
54
53
  },
55
54
 
56
- mixins: [displayMethods, selenium],
57
-
58
55
  props: {
59
56
  comment: { default: () => ({}), type: Object as () => CommentPodcast },
60
57
  editRight: { default: false, type: Boolean },
@@ -96,6 +93,9 @@ export default defineComponent({
96
93
  clearInterval(this.dateInterval as unknown as number);
97
94
  },
98
95
  methods: {
96
+ urlify(text:string|undefined){
97
+ return displayHelper.urlify(text);
98
+ },
99
99
  defineDateFromNow() {
100
100
  if (!this.comment.date) {
101
101
  this.date = "";
@@ -79,8 +79,6 @@
79
79
 
80
80
  <script lang="ts">
81
81
  import ChevronDownIcon from "vue-material-design-icons/ChevronDown.vue";
82
- import selenium from "../../../mixins/selenium";
83
- import displayMethods from "../../../mixins/displayMethods";
84
82
  import { CommentPodcast } from "@/stores/class/general/comment";
85
83
  import { Podcast } from "../../../../stores/class/general/podcast";
86
84
  import CommentBasicView from "./CommentBasicView.vue";
@@ -116,8 +114,6 @@ export default defineComponent({
116
114
  ChevronDownIcon,
117
115
  },
118
116
 
119
- mixins: [displayMethods, selenium],
120
-
121
117
  props: {
122
118
  comment: { default: () => ({}), type: Object as () => CommentPodcast },
123
119
  podcast: { default: undefined, type: Object as () => Podcast },
@@ -59,7 +59,7 @@
59
59
 
60
60
  <script lang="ts">
61
61
  import DotsVerticalIcon from "vue-material-design-icons/DotsVertical.vue";
62
- import selenium from "../../../mixins/selenium";
62
+ import {useSelenium} from "../../../composable/useSelenium";
63
63
  import classicApi from "../../../../api/classicApi";
64
64
  import CommentMoreActionsAdmin from "@/components/display/comments/item/CommentMoreActionsAdmin.vue";
65
65
  import { useAuthStore } from "../../../../stores/AuthStore";
@@ -92,7 +92,6 @@ export default defineComponent({
92
92
  MessageModal,
93
93
  DotsVerticalIcon,
94
94
  },
95
- mixins: [selenium],
96
95
 
97
96
  props: {
98
97
  comment: { default: () => ({}), type: Object as () => CommentPodcast },
@@ -102,6 +101,11 @@ export default defineComponent({
102
101
  },
103
102
 
104
103
  emits: ["update:comment", "deleteComment"],
104
+
105
+ setup(){
106
+ const { seleniumFormat } = useSelenium();
107
+ return { seleniumFormat }
108
+ },
105
109
  data() {
106
110
  return {
107
111
  isEdit: false as boolean,
@@ -32,14 +32,12 @@ import SwiperList from "../list/SwiperList.vue";
32
32
  import classicApi from "../../../api/classicApi";
33
33
  import EmissionPlayerItem from "./EmissionPlayerItem.vue";
34
34
  import { state } from "../../../stores/ParamSdkStore";
35
- import { handle403 } from "../../mixins/handle403";
35
+ import {useErrorHandler} from "../../composable/useErrorHandler";
36
36
  import ClassicLoading from "../../form/ClassicLoading.vue";
37
37
  import { Emission } from "@/stores/class/general/emission";
38
38
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
39
39
  import { defineComponent } from "vue";
40
40
  import { AxiosError } from "axios";
41
- import imageProxy from "../../mixins/imageProxy";
42
- import resizePhone from "../../mixins/resizePhone";
43
41
  import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
44
42
  import { ListClassicReturn } from "@/stores/class/general/listReturn";
45
43
  export default defineComponent({
@@ -50,9 +48,6 @@ export default defineComponent({
50
48
  ClassicLoading,
51
49
  SwiperList,
52
50
  },
53
-
54
- mixins: [handle403, imageProxy, resizePhone],
55
-
56
51
  props: {
57
52
  organisationId: { default: undefined, type: String },
58
53
  href: { default: undefined, type: String },
@@ -63,6 +58,11 @@ export default defineComponent({
63
58
  itemSize: { default: undefined, type: Number },
64
59
  },
65
60
 
61
+ setup(){
62
+ const {handle403} = useErrorHandler();
63
+ return { handle403 }
64
+ },
65
+
66
66
  data() {
67
67
  return {
68
68
  loading: true as boolean,
@@ -9,7 +9,7 @@
9
9
  class="d-flex flex-grow-1 text-dark"
10
10
  >
11
11
  <img
12
- v-lazy="proxyImageUrl(emission.imageUrl, '250')"
12
+ v-lazy="useProxyImageUrl(emission.imageUrl, '250')"
13
13
  width="250"
14
14
  height="250"
15
15
  class="img-box"
@@ -55,11 +55,11 @@
55
55
 
56
56
  <script lang="ts">
57
57
  import AlertIcon from "vue-material-design-icons/Alert.vue";
58
- import { orgaComputed } from "../../mixins/orgaComputed";
58
+ import {useOrgaComputed} from "../../composable/useOrgaComputed";
59
59
  import { Emission } from "@/stores/class/general/emission";
60
60
  import classicApi from "../../../api/classicApi";
61
- import imageProxy from "../../mixins/imageProxy";
62
- import displayMethods from "../../mixins/displayMethods";
61
+ import {useImageProxy} from "../../composable/useImageProxy";
62
+ import displayHelper from "../../../helper/displayHelper";
63
63
  import { defineComponent } from "vue";
64
64
  import { Podcast } from "@/stores/class/general/podcast";
65
65
  import { ListClassicReturn } from "@/stores/class/general/listReturn";
@@ -69,12 +69,16 @@ export default defineComponent({
69
69
  AlertIcon,
70
70
  },
71
71
 
72
- mixins: [displayMethods, orgaComputed, imageProxy],
73
-
74
72
  props: {
75
73
  emission: { default: () => ({}), type: Object as () => Emission },
76
74
  },
77
75
 
76
+ setup(){
77
+ const { useProxyImageUrl } = useImageProxy();
78
+ const { isPodcastmaker, isEditRights } = useOrgaComputed();
79
+ return { useProxyImageUrl, isPodcastmaker, isEditRights }
80
+ },
81
+
78
82
  data() {
79
83
  return {
80
84
  activeEmission: true as boolean,
@@ -107,6 +111,9 @@ export default defineComponent({
107
111
  }
108
112
  },
109
113
  methods: {
114
+ urlify(text:string|undefined){
115
+ return displayHelper.urlify(text);
116
+ },
110
117
  async hasPodcast(): Promise<void> {
111
118
  const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
112
119
  api: 0,
@@ -60,7 +60,7 @@
60
60
  import ListPaginate from "../list/ListPaginate.vue";
61
61
  import classicApi from "../../../api/classicApi";
62
62
  import ClassicLazy from "../../misc/ClassicLazy.vue";
63
- import { handle403 } from "../../mixins/handle403";
63
+ import {useErrorHandler} from "../../composable/useErrorHandler";
64
64
  import { state } from "../../../stores/ParamSdkStore";
65
65
  import { Emission, emptyEmissionData } from "@/stores/class/general/emission";
66
66
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
@@ -85,7 +85,6 @@ export default defineComponent({
85
85
  ClassicLazy,
86
86
  },
87
87
 
88
- mixins: [handle403],
89
88
 
90
89
  props: {
91
90
  first: { default: 0, type: Number },
@@ -104,6 +103,10 @@ export default defineComponent({
104
103
  noRubriquageId: { default: () => [], type: Array as () => Array<number> },
105
104
  nbPodcasts: { default: undefined, type: Number },
106
105
  },
106
+ setup(){
107
+ const {handle403} = useErrorHandler();
108
+ return { handle403 }
109
+ },
107
110
 
108
111
  data() {
109
112
  return {
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  <div class="img-box">
15
15
  <img
16
- v-lazy="proxyImageUrl(emission.imageUrl, '330')"
16
+ v-lazy="useProxyImageUrl(emission.imageUrl, '330')"
17
17
  width="330"
18
18
  height="330"
19
19
  role="presentation"
@@ -102,9 +102,8 @@ import classicApi from "../../../api/classicApi";
102
102
  import { Emission } from "@/stores/class/general/emission";
103
103
  import { Podcast } from "@/stores/class/general/podcast";
104
104
  import { state } from "../../../stores/ParamSdkStore";
105
- import imageProxy from "../../mixins/imageProxy";
106
- import { orgaComputed } from "../../mixins/orgaComputed";
107
- import displayMethods from "../../mixins/displayMethods";
105
+ import {useImageProxy} from "../../composable/useImageProxy";
106
+ import {useOrgaComputed} from "../../composable/useOrgaComputed";
108
107
  import { usePlayerStore } from "../../../stores/PlayerStore";
109
108
  import { mapState, mapActions } from "pinia";
110
109
  import { defineAsyncComponent, defineComponent } from "vue";
@@ -120,12 +119,16 @@ export default defineComponent({
120
119
  PlayIcon,
121
120
  PauseIcon,
122
121
  },
123
- mixins: [displayMethods, imageProxy, orgaComputed],
124
122
  props: {
125
123
  emission: { default: () => ({}), type: Object as () => Emission },
126
124
  nbPodcasts: { default: undefined, type: Number },
127
125
  rubriqueName: { default: undefined, type: String },
128
126
  },
127
+ setup(){
128
+ const { useProxyImageUrl } = useImageProxy();
129
+ const { isEditRights } = useOrgaComputed();
130
+ return { useProxyImageUrl, isEditRights }
131
+ },
129
132
 
130
133
  data() {
131
134
  return {
@@ -13,7 +13,7 @@
13
13
  :class="isVertical ? 'flex-column' : ''"
14
14
  >
15
15
  <img
16
- v-lazy="proxyImageUrl(emission.imageUrl, isVertical ? '400' : '250')"
16
+ v-lazy="useProxyImageUrl(emission.imageUrl, isVertical ? '400' : '250')"
17
17
  :width="isVertical ? '400' : '250'"
18
18
  :height="isVertical ? '400' : '250'"
19
19
  :class="isVertical ? 'img-box-bigger' : ''"
@@ -45,25 +45,29 @@
45
45
 
46
46
  <script lang="ts">
47
47
  import { useFilterStore } from "../../../stores/FilterStore";
48
- import resizePhone from "../../mixins/resizePhone";
48
+ import {useResizePhone} from "../../composable/useResizePhone";
49
49
  import { Emission } from "@/stores/class/general/emission";
50
- import imageProxy from "../../mixins/imageProxy";
51
- import displayMethods from "../../mixins/displayMethods";
50
+ import {useImageProxy} from "../../composable/useImageProxy";
51
+ import displayHelper from "../../../helper/displayHelper";
52
52
  import { defineComponent } from "vue";
53
53
  import { mapState } from "pinia";
54
54
  export default defineComponent({
55
55
  name: "EmissionItem",
56
56
 
57
- mixins: [displayMethods, imageProxy, resizePhone],
58
-
59
57
  props: {
60
58
  emission: { default: () => ({}), type: Object as () => Emission },
61
59
  isVertical: { default: false, type: Boolean },
62
60
  isDescription: { default: false, type: Boolean },
63
61
  },
62
+ setup(){
63
+ const { isPhone } = useResizePhone();
64
+ const { useProxyImageUrl } = useImageProxy();
65
+ return { isPhone, useProxyImageUrl }
66
+ },
67
+
68
+
64
69
  data() {
65
70
  return {
66
- isPhone: false as boolean,
67
71
  };
68
72
  },
69
73
  computed: {
@@ -91,6 +95,11 @@ export default defineComponent({
91
95
  },
92
96
  },
93
97
  },
98
+ methods:{
99
+ urlify(text:string|undefined){
100
+ return displayHelper.urlify(text);
101
+ },
102
+ }
94
103
  });
95
104
  </script>
96
105
  <style lang="scss">
@@ -58,13 +58,12 @@
58
58
 
59
59
  <script lang="ts">
60
60
  import classicApi from "../../../api/classicApi";
61
- import { handle403 } from "../../mixins/handle403";
61
+ import {useErrorHandler} from "../../composable/useErrorHandler";
62
62
  import ClassicLoading from "../../form/ClassicLoading.vue";
63
63
  import { Emission } from "@/stores/class/general/emission";
64
64
  import { defineAsyncComponent, defineComponent } from "vue";
65
65
  import { AxiosError } from "axios";
66
- import imageProxy from "../../mixins/imageProxy";
67
- import resizePhone from "../../mixins/resizePhone";
66
+ import {useResizePhone} from "../../composable/useResizePhone";
68
67
  import { ListClassicReturn } from "@/stores/class/general/listReturn";
69
68
  const EmissionItemPresentation = defineAsyncComponent(
70
69
  () => import("./EmissionPresentationItem.vue"),
@@ -76,8 +75,6 @@ export default defineComponent({
76
75
  EmissionItemPresentation,
77
76
  },
78
77
 
79
- mixins: [handle403, imageProxy, resizePhone],
80
-
81
78
  props: {
82
79
  organisationId: { default: undefined, type: String },
83
80
  title: { default: "", type: String },
@@ -86,13 +83,18 @@ export default defineComponent({
86
83
  isDescription: { default: false, type: Boolean },
87
84
  rubriquesId: { default: [], type: Array<number> },
88
85
  },
86
+
87
+ setup(){
88
+ const { isPhone } = useResizePhone();
89
+ const {handle403} = useErrorHandler();
90
+ return { isPhone, handle403 }
91
+ },
92
+
89
93
  data() {
90
94
  return {
91
95
  loading: true as boolean,
92
96
  error: false as boolean,
93
97
  allEmissions: [] as Array<Emission>,
94
- isPhone: false as boolean,
95
- windowWidth: 0 as number,
96
98
  };
97
99
  },
98
100