@saooti/octopus-sdk 38.0.11 → 38.0.13
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.
- package/package.json +1 -1
- package/public/css/fonts/icomoon.woff2 +0 -0
- package/public/css/fonts/style.css +2 -1
- package/src/App.vue +1 -1
- package/src/components/display/categories/CategoryFilter.vue +1 -9
- package/src/components/display/categories/CategoryList.vue +1 -1
- package/src/components/display/emission/EmissionList.vue +0 -1
- package/src/components/display/participant/ParticipantList.vue +0 -1
- package/src/components/display/playlist/PlaylistList.vue +0 -1
- package/src/components/display/playlist/PodcastList.vue +0 -1
- package/src/components/display/podcasts/PodcastItem.vue +11 -1
- package/src/components/display/podcasts/PodcastList.vue +0 -1
- package/src/components/display/rubriques/RubriqueList.vue +1 -1
- package/src/components/misc/ClassicLazy.vue +16 -3
- package/src/components/mixins/debounce.ts +12 -0
- package/src/components/mixins/resizePhone.ts +6 -3
- package/src/components/pages/HomePage.vue +4 -4
- package/src/components/pages/PodcastPage.vue +1 -2
- package/src/stores/ParamSdkStore.ts +20 -20
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'icomoon';
|
|
3
3
|
src: url('/css/fonts/icomoon.eot?bv0n4g');
|
|
4
|
-
src: url('/css/fonts/icomoon.
|
|
4
|
+
src: url('/css/fonts/icomoon.woff2?bv0n4g') format('woff2'),
|
|
5
|
+
url('/css/fonts/icomoon.eot?bv0n4g#iefix') format('embedded-opentype'),
|
|
5
6
|
url('/css/fonts/icomoon.ttf?bv0n4g') format('truetype'),
|
|
6
7
|
url('/css/fonts/icomoon.woff?bv0n4g') format('woff'),
|
|
7
8
|
url('/css/fonts/icomoon.svg?bv0n4g#icomoon') format('svg');
|
package/src/App.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<TopBar :is-education="false" />
|
|
4
4
|
<CategoryFilter v-if="firstDisplayCategoryFilter" />
|
|
5
5
|
<router-view />
|
|
6
|
-
<ClassicLazy v-if="pageFullyLoad" :min-height="125"
|
|
6
|
+
<ClassicLazy v-if="pageFullyLoad" :min-height="125">
|
|
7
7
|
<FooterOctopus />
|
|
8
8
|
</ClassicLazy>
|
|
9
9
|
<PlayerComponent />
|
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
:style="backgroundDisplay"
|
|
6
6
|
>
|
|
7
7
|
<h1>{{ titleDisplay }}</h1>
|
|
8
|
-
<div
|
|
9
|
-
v-if="!isPhone"
|
|
10
|
-
v-show="isDisplay"
|
|
11
|
-
class="d-flex flex-column justify-content-end"
|
|
12
|
-
>
|
|
8
|
+
<div v-show="isDisplay" class="d-flex flex-column justify-content-end">
|
|
13
9
|
<ol
|
|
14
10
|
v-if="filterIab || filterRubrique.length"
|
|
15
11
|
class="octopus-breadcrumb d-flex align-items-center justify-content-center flex-wrap"
|
|
@@ -71,7 +67,6 @@ import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
|
|
|
71
67
|
import { Rubrique } from "@/stores/class/rubrique/rubrique";
|
|
72
68
|
import { useFilterStore } from "@/stores/FilterStore";
|
|
73
69
|
import { state } from "../../../stores/ParamSdkStore";
|
|
74
|
-
import resizePhone from "../../mixins/resizePhone";
|
|
75
70
|
import { mapState, mapActions } from "pinia";
|
|
76
71
|
import { defineComponent, defineAsyncComponent } from "vue";
|
|
77
72
|
const CategoryList = defineAsyncComponent(() => import("./CategoryList.vue"));
|
|
@@ -89,12 +84,9 @@ export default defineComponent({
|
|
|
89
84
|
RubriqueList,
|
|
90
85
|
RubriqueChooser,
|
|
91
86
|
},
|
|
92
|
-
mixins: [resizePhone],
|
|
93
87
|
data() {
|
|
94
88
|
return {
|
|
95
89
|
isCategories: false as boolean,
|
|
96
|
-
isPhone: false as boolean,
|
|
97
|
-
windowWidth: 0 as number,
|
|
98
90
|
};
|
|
99
91
|
},
|
|
100
92
|
computed: {
|
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
<div ref="descriptionPodcast" v-html="description" />
|
|
30
30
|
<!-- eslint-enable -->
|
|
31
31
|
</div>
|
|
32
|
-
<div
|
|
32
|
+
<div
|
|
33
|
+
@mouseenter="debounceShowDescriptionEvent"
|
|
34
|
+
@mouseleave="debounceHideDescriptionEvent"
|
|
35
|
+
>
|
|
33
36
|
<PodcastItemInfo
|
|
34
37
|
:podcast-id="podcast.podcastId"
|
|
35
38
|
:title="podcast.title"
|
|
@@ -44,6 +47,7 @@
|
|
|
44
47
|
</template>
|
|
45
48
|
|
|
46
49
|
<script lang="ts">
|
|
50
|
+
import { debounce } from "../../mixins/debounce";
|
|
47
51
|
import PodcastItemInfo from "./PodcastItemInfo.vue";
|
|
48
52
|
import PodcastImage from "./PodcastImage.vue";
|
|
49
53
|
import { state } from "../../../stores/ParamSdkStore";
|
|
@@ -70,6 +74,8 @@ export default defineComponent({
|
|
|
70
74
|
hoverDesc: false as boolean,
|
|
71
75
|
arrowDirection: "up" as string,
|
|
72
76
|
isDescriptionBig: false as boolean,
|
|
77
|
+
debounceShowDescriptionEvent: undefined as undefined | (() => void),
|
|
78
|
+
debounceHideDescriptionEvent: undefined as undefined | (() => void),
|
|
73
79
|
};
|
|
74
80
|
},
|
|
75
81
|
|
|
@@ -87,6 +93,10 @@ export default defineComponent({
|
|
|
87
93
|
return this.podcast.description ?? "";
|
|
88
94
|
},
|
|
89
95
|
},
|
|
96
|
+
created() {
|
|
97
|
+
this.debounceShowDescriptionEvent = debounce(this.showDescription, 100);
|
|
98
|
+
this.debounceHideDescriptionEvent = debounce(this.hideDescription, 100);
|
|
99
|
+
},
|
|
90
100
|
|
|
91
101
|
methods: {
|
|
92
102
|
initDescription(): void {
|
|
@@ -29,30 +29,43 @@ export default {
|
|
|
29
29
|
type: Number,
|
|
30
30
|
default: 0,
|
|
31
31
|
},
|
|
32
|
+
initRenderDelay: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0,
|
|
35
|
+
},
|
|
32
36
|
unrenderDelay: {
|
|
33
37
|
type: Number,
|
|
34
38
|
default: 10000,
|
|
35
39
|
},
|
|
36
40
|
},
|
|
37
41
|
setup(props) {
|
|
42
|
+
const waitBeforeInit = ref(true);
|
|
38
43
|
const shouldRender = ref(false);
|
|
39
44
|
const targetEl = ref();
|
|
40
45
|
const fixedMinHeight = ref(0);
|
|
41
46
|
let unrenderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
42
47
|
let renderTimer: ReturnType<typeof setTimeout> | undefined;
|
|
43
|
-
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
waitBeforeInit.value = false;
|
|
50
|
+
}, props.initRenderDelay);
|
|
44
51
|
const { stop } = useIntersectionObserver(
|
|
45
52
|
targetEl,
|
|
46
53
|
([{ isIntersecting }]) => {
|
|
54
|
+
if (waitBeforeInit.value) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
47
57
|
if (isIntersecting) {
|
|
48
58
|
// perhaps the user re-scrolled to a component that was set to unrender. In that case stop the unrendering timer
|
|
49
59
|
clearTimeout(unrenderTimer);
|
|
50
60
|
// if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
|
|
61
|
+
|
|
51
62
|
renderTimer = setTimeout(
|
|
52
|
-
() =>
|
|
63
|
+
() => {
|
|
64
|
+
shouldRender.value = true;
|
|
65
|
+
},
|
|
53
66
|
props.unrender ? 200 : 0,
|
|
54
67
|
);
|
|
55
|
-
shouldRender.value = true;
|
|
68
|
+
//shouldRender.value = true;
|
|
56
69
|
if (!props.unrender) {
|
|
57
70
|
stop();
|
|
58
71
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function debounce<Params extends any[]>(
|
|
2
|
+
func: (...args: Params) => any,
|
|
3
|
+
timeout: number,
|
|
4
|
+
): (...args: Params) => void {
|
|
5
|
+
let timer: ReturnType<typeof setTimeout>;
|
|
6
|
+
return (...args: Params) => {
|
|
7
|
+
clearTimeout(timer)
|
|
8
|
+
timer = setTimeout(() => {
|
|
9
|
+
func(...args)
|
|
10
|
+
}, timeout)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
import {debounce} from './debounce';
|
|
2
3
|
import { defineComponent } from 'vue';
|
|
3
4
|
export default defineComponent({
|
|
4
5
|
data() {
|
|
5
6
|
return {
|
|
6
7
|
isPhone: false as boolean,
|
|
7
|
-
windowWidth: 0 as number
|
|
8
|
+
windowWidth: 0 as number,
|
|
9
|
+
debounceResizeEvent: undefined as undefined|((...args: any[]) => void)
|
|
8
10
|
};
|
|
9
11
|
},
|
|
10
12
|
created() {
|
|
11
|
-
|
|
13
|
+
this.debounceResizeEvent = debounce(this.handleResize, 500);
|
|
14
|
+
window.addEventListener('resize', this.debounceResizeEvent);
|
|
12
15
|
this.handleResize();
|
|
13
16
|
},
|
|
14
17
|
unmounted() {
|
|
15
|
-
window.removeEventListener('resize', this.
|
|
18
|
+
window.removeEventListener('resize', this.debounceResizeEvent);
|
|
16
19
|
},
|
|
17
20
|
methods: {
|
|
18
21
|
handleResize(): void {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<div class="page-box">
|
|
3
3
|
<template v-if="0 === rubriquageFilter.length">
|
|
4
4
|
<ClassicLazy
|
|
5
|
-
v-for="c in categories"
|
|
5
|
+
v-for="(c, index) in categories"
|
|
6
6
|
:key="c.id"
|
|
7
7
|
:min-height="0"
|
|
8
|
-
:
|
|
8
|
+
:init-render-delay="3 < index ? 1000 : 0"
|
|
9
9
|
>
|
|
10
10
|
<PodcastInlineList
|
|
11
11
|
:iab-id="c.id"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
<template v-else>
|
|
21
21
|
<ClassicLazy
|
|
22
|
-
v-for="r in rubriqueToShow"
|
|
22
|
+
v-for="(r, index) in rubriqueToShow"
|
|
23
23
|
:key="r.rubriqueId"
|
|
24
24
|
:min-height="0"
|
|
25
|
-
:
|
|
25
|
+
:init-render-delay="3 < index ? 1000 : 0"
|
|
26
26
|
>
|
|
27
27
|
<PodcastInlineList
|
|
28
28
|
:rubrique-id="rubriqueId.concat(r.rubriqueId)"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
:title="$t('More episodes of this emission')"
|
|
47
47
|
:button-text="$t('All podcast emission button')"
|
|
48
48
|
/>
|
|
49
|
-
<ClassicLazy :min-height="550"
|
|
49
|
+
<ClassicLazy :min-height="550">
|
|
50
50
|
<PodcastInlineList
|
|
51
51
|
:podcast-id="podcastId"
|
|
52
52
|
:title="$t('Suggested listening')"
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
v-for="c in categories"
|
|
57
57
|
:key="c.id"
|
|
58
58
|
:min-height="550"
|
|
59
|
-
:unrender="true"
|
|
60
59
|
>
|
|
61
60
|
<PodcastInlineList
|
|
62
61
|
:iab-id="c.id"
|
|
@@ -3,16 +3,16 @@ import { Category } from "./class/general/category";
|
|
|
3
3
|
|
|
4
4
|
const state: ParamStore = {
|
|
5
5
|
generalParameters: {
|
|
6
|
-
organisationId:"ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c"
|
|
7
|
-
authenticated:
|
|
8
|
-
isAdmin:
|
|
9
|
-
isRoleLive:
|
|
10
|
-
isCommments:
|
|
11
|
-
isOrganisation:
|
|
12
|
-
isPlaylist:
|
|
13
|
-
isProduction:
|
|
14
|
-
isContribution:
|
|
15
|
-
ApiUri: "https://api.
|
|
6
|
+
organisationId:undefined/* "ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c" */,
|
|
7
|
+
authenticated: false,
|
|
8
|
+
isAdmin: false,
|
|
9
|
+
isRoleLive: false,
|
|
10
|
+
isCommments: false,
|
|
11
|
+
isOrganisation:false,
|
|
12
|
+
isPlaylist: false,
|
|
13
|
+
isProduction: false,
|
|
14
|
+
isContribution: false,
|
|
15
|
+
ApiUri: "https://api.preprod.saooti.org/",
|
|
16
16
|
podcastmaker: false,
|
|
17
17
|
buttonPlus: true,
|
|
18
18
|
allCategories: [],
|
|
@@ -26,8 +26,8 @@ const state: ParamStore = {
|
|
|
26
26
|
SharePlayer: true,
|
|
27
27
|
ShareButtons: true,
|
|
28
28
|
ShareDistribution: true,
|
|
29
|
-
MiniplayerUri: "https://playerbeta.
|
|
30
|
-
hlsUri: "https://hls.live.
|
|
29
|
+
MiniplayerUri: "https://playerbeta.preprod.saooti.org/",
|
|
30
|
+
hlsUri: "https://hls.live.preprod.saooti.org/",
|
|
31
31
|
mainRubrique: 0,
|
|
32
32
|
resourceUrl: undefined,
|
|
33
33
|
podcastItemShowEmission: false,
|
|
@@ -79,14 +79,14 @@ const state: ParamStore = {
|
|
|
79
79
|
userName: "",
|
|
80
80
|
},
|
|
81
81
|
octopusApi: {
|
|
82
|
-
url: "https://api.
|
|
83
|
-
commentsUrl: "https://comments.
|
|
84
|
-
imageUrl: "https://imageproxy.
|
|
85
|
-
studioUrl: "https://studio.
|
|
86
|
-
playerUrl: "https://playerbeta.
|
|
87
|
-
speechToTextUrl: "https://speech2text.
|
|
88
|
-
radioUrl:"https://radio.
|
|
89
|
-
recoUrl: "https://reco.
|
|
82
|
+
url: "https://api.preprod.saooti.org/",
|
|
83
|
+
commentsUrl: "https://comments.preprod.saooti.org/",
|
|
84
|
+
imageUrl: "https://imageproxy.preprod.saooti.org/",
|
|
85
|
+
studioUrl: "https://studio.preprod.saooti.org/",
|
|
86
|
+
playerUrl: "https://playerbeta.preprod.saooti.org/",
|
|
87
|
+
speechToTextUrl: "https://speech2text.preprod.saooti.org/",
|
|
88
|
+
radioUrl:"https://radio.preprod.saooti.org/",
|
|
89
|
+
recoUrl: "https://reco.preprod.saooti.org/",
|
|
90
90
|
organisationId: undefined,
|
|
91
91
|
rubriqueIdFilter: undefined,
|
|
92
92
|
},
|