@saooti/octopus-sdk 41.0.8-SNAPSHOT → 41.0.10-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.
- package/index.ts +2 -1
- package/package.json +1 -1
- package/src/components/composable/player/usePlayerLive.ts +1 -1
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +6 -5
- package/src/components/display/categories/CategoryChooser.vue +2 -0
- package/src/components/display/list/ListPaginate.vue +4 -14
- package/src/components/display/playlist/PodcastList.vue +16 -7
- package/src/components/display/podcasts/PodcastFilterList.vue +16 -7
- package/src/components/display/podcasts/PodcastList.vue +2 -0
- package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
- package/src/components/form/ClassicMultiselect.vue +4 -1
- package/src/components/misc/ClassicPopover.vue +1 -1
- package/src/components/misc/FooterSection.vue +0 -16
- package/src/components/pages/EmissionPage.vue +14 -0
- package/src/components/pages/ParticipantPage.vue +14 -0
- package/src/components/pages/PlaylistPage.vue +17 -4
- package/src/helper/loadScript.ts +4 -4
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/VastStore.ts +2 -2
package/index.ts
CHANGED
|
@@ -108,7 +108,7 @@ import {useMetaTitleWatch} from "./src/components/composable/useMetaTitleWatch.t
|
|
|
108
108
|
import {useOrganisationFilter} from "./src/components/composable/useOrganisationFilter.ts";
|
|
109
109
|
import {useInit} from "./src/components/composable/useInit.ts";
|
|
110
110
|
import {useErrorHandler} from "./src/components/composable/useErrorHandler.ts";
|
|
111
|
-
|
|
111
|
+
import { useSimplePageParam } from "./src/components/composable/route/useSimplePageParam";
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
//helper
|
|
@@ -157,6 +157,7 @@ export {
|
|
|
157
157
|
useOrganisationFilter,
|
|
158
158
|
useInit,
|
|
159
159
|
useErrorHandler,
|
|
160
|
+
useSimplePageParam,
|
|
160
161
|
debounce,
|
|
161
162
|
useVastStore,
|
|
162
163
|
useSaveFetchStore,
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
16
16
|
const audioElement: Ref<HTMLAudioElement | null>= ref(null);
|
|
17
17
|
const hls: Ref<any>= ref(null);
|
|
18
18
|
const hlsRetryTimeout: Ref<ReturnType<typeof setTimeout> | undefined>= ref(undefined);
|
|
19
|
-
const playPromise: Ref<
|
|
19
|
+
const playPromise: Ref<Promise<void>|undefined>= ref(undefined);
|
|
20
20
|
const errorHls= ref(false);
|
|
21
21
|
|
|
22
22
|
|
|
@@ -3,10 +3,10 @@ import { useVastStore } from "../../../stores/VastStore";
|
|
|
3
3
|
import { loadScript } from "../../../helper/loadScript";
|
|
4
4
|
import {nextTick, Ref, ref, watch} from 'vue';
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
|
-
let adsLoader:
|
|
7
|
-
let adsManager:
|
|
8
|
-
let adDisplayContainer:
|
|
9
|
-
let adsRequest:
|
|
6
|
+
let adsLoader: google.ima.AdsLoader;
|
|
7
|
+
let adsManager:google.ima.AdsManager;
|
|
8
|
+
let adDisplayContainer:google.ima.AdDisplayContainer;
|
|
9
|
+
let adsRequest: google.ima.AdsRequest;
|
|
10
10
|
export const usePlayerVast = ()=>{
|
|
11
11
|
const imaLoaded = ref(false);
|
|
12
12
|
const isContentFinished = ref(false);
|
|
@@ -83,7 +83,7 @@ export const usePlayerVast = ()=>{
|
|
|
83
83
|
adsRequest.adTagUrl = vastUrl;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function onAdsManagerLoaded(adsManagerLoadedEvent:
|
|
86
|
+
function onAdsManagerLoaded(adsManagerLoadedEvent: google.ima.AdsManagerLoadedEvent) {
|
|
87
87
|
const adsRenderingSettings = new google.ima.AdsRenderingSettings();
|
|
88
88
|
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;
|
|
89
89
|
adsManager = adsManagerLoadedEvent.getAdsManager(audioContainer.value, adsRenderingSettings);
|
|
@@ -117,7 +117,7 @@ export const usePlayerVast = ()=>{
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
function onAdError(adErrorEvent:
|
|
120
|
+
function onAdError(adErrorEvent: google.ima.AdErrorEvent) {
|
|
121
121
|
console.log(adErrorEvent.getError());
|
|
122
122
|
destroyAdManager();
|
|
123
123
|
}
|
|
@@ -132,7 +132,7 @@ export const usePlayerVast = ()=>{
|
|
|
132
132
|
isAdRequested.value = false;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
function onAdEvent(adEvent:
|
|
135
|
+
function onAdEvent(adEvent: google.ima.AdEvent) {
|
|
136
136
|
const ad = adEvent.getAd();
|
|
137
137
|
if(ad){
|
|
138
138
|
vastStore.updateCurrentAd(ad);
|
|
@@ -12,14 +12,14 @@ export const useRouteUpdateParams = ()=>{
|
|
|
12
12
|
return ['podcasts', 'emissions'].includes(route.name?.toString()??"");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function updatePaginateSize(ps:number){
|
|
16
|
-
if(checkPage()){
|
|
15
|
+
function updatePaginateSize(ps:number, force= false){
|
|
16
|
+
if(force ||checkPage()){
|
|
17
17
|
router.push({query: {...route.query, ...{ps:ps, pr:1}}});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function updateRouteParam(update: {[key:string]: string|undefined}){
|
|
22
|
-
if(checkPage()){
|
|
21
|
+
function updateRouteParam(update: {[key:string]: string|undefined}, force= false){
|
|
22
|
+
if(force || checkPage()){
|
|
23
23
|
router.push({query: {...route.query, ...update}});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -2,7 +2,7 @@ import { useFilterStore } from '../../../stores/FilterStore';
|
|
|
2
2
|
import { useRouteUpdateParams } from './useRouteUpdateParams';
|
|
3
3
|
import { computed, onMounted, Ref, ref, watch } from "vue";
|
|
4
4
|
|
|
5
|
-
export const useSimplePageParam = (props:
|
|
5
|
+
export const useSimplePageParam = (props: {readonly [key:string]: string|number}, force=false)=>{
|
|
6
6
|
|
|
7
7
|
const { updateRouteParam } = useRouteUpdateParams();
|
|
8
8
|
|
|
@@ -17,13 +17,13 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
17
17
|
if(!props.pr){
|
|
18
18
|
return 0;
|
|
19
19
|
}
|
|
20
|
-
return Math.max((props.pr - 1 ) * props.ps, 0);
|
|
20
|
+
return Math.max(((props.pr as number) - 1 ) * (props.ps as number), 0);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
watch(searchPattern, () => {
|
|
24
24
|
updateRouteParam({
|
|
25
25
|
q: searchMinSize.value.length ? searchMinSize.value : undefined,
|
|
26
|
-
});
|
|
26
|
+
}, force);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
onMounted(() => {
|
|
@@ -33,10 +33,10 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
function initSearchPattern(){
|
|
36
|
-
searchPattern.value = props.routeQuery ?? "";
|
|
36
|
+
searchPattern.value = (props.routeQuery as string) ?? "";
|
|
37
37
|
}
|
|
38
38
|
function initOrga(){
|
|
39
|
-
organisationId.value = filterStore.filterOrgaId ?? props.routeOrga;
|
|
39
|
+
organisationId.value = filterStore.filterOrgaId ?? (props.routeOrga as string);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
@@ -47,6 +47,7 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
47
47
|
paginateFirst,
|
|
48
48
|
initSearchPattern,
|
|
49
49
|
initOrga,
|
|
50
|
+
updateRouteParam,
|
|
50
51
|
isInit
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:multiple="multiple"
|
|
14
14
|
:min-search-length="1"
|
|
15
15
|
:width="width"
|
|
16
|
+
:height="height"
|
|
16
17
|
:is-disabled="isDisabled"
|
|
17
18
|
:no-deselect="noDeselect"
|
|
18
19
|
:display-required="displayRequired"
|
|
@@ -32,6 +33,7 @@ import { useI18n } from "vue-i18n";
|
|
|
32
33
|
const props = defineProps({
|
|
33
34
|
defaultanswer: { default: "", type: String },
|
|
34
35
|
width: { default: "100%", type: String },
|
|
36
|
+
height: { default: undefined, type: String },
|
|
35
37
|
multiple: { default: false, type: Boolean },
|
|
36
38
|
isDisabled: { default: false, type: Boolean },
|
|
37
39
|
initCategories: {
|
|
@@ -54,7 +54,7 @@ import PaginateParams from "./PaginateParams.vue";
|
|
|
54
54
|
import PaginateSection from "./PaginateSection.vue";
|
|
55
55
|
import {useResizePhone} from "../../composable/useResizePhone";
|
|
56
56
|
import { useRouteUpdateParams } from "../../composable/route/useRouteUpdateParams";
|
|
57
|
-
import { computed,
|
|
57
|
+
import { computed, watch } from "vue";
|
|
58
58
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
59
59
|
import { useI18n } from "vue-i18n";
|
|
60
60
|
|
|
@@ -72,13 +72,12 @@ const props = defineProps({
|
|
|
72
72
|
isMobile: { default: false, type: Boolean },
|
|
73
73
|
justSizeChosen: { default: false, type: Boolean },
|
|
74
74
|
playerResponsive: { default: false, type: Boolean },
|
|
75
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
75
76
|
})
|
|
76
77
|
|
|
77
78
|
//Emits
|
|
78
79
|
const emit = defineEmits(["update:first", "update:rowsPerPage", "update:isMobile"]);
|
|
79
80
|
|
|
80
|
-
//Data
|
|
81
|
-
const internSizeChange = ref(false);
|
|
82
81
|
|
|
83
82
|
//Composables
|
|
84
83
|
const { t } = useI18n();
|
|
@@ -99,13 +98,6 @@ const rangeSize = computed(() => {
|
|
|
99
98
|
|
|
100
99
|
//Watch
|
|
101
100
|
watch(isPhone, () => {emit("update:isMobile", isPhone.value);}, {immediate: true});
|
|
102
|
-
watch(()=>props.first, () => {
|
|
103
|
-
if (internSizeChange.value) {
|
|
104
|
-
internSizeChange.value = false;
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
updateRouteParam({pr:(Math.floor(props.first / props.rowsPerPage) + 1).toString()});
|
|
108
|
-
});
|
|
109
101
|
|
|
110
102
|
//Methods
|
|
111
103
|
function fetchMore() {
|
|
@@ -114,14 +106,12 @@ function fetchMore() {
|
|
|
114
106
|
function changeFirst(firstValue: number) {
|
|
115
107
|
scrollToTop();
|
|
116
108
|
emit("update:first", firstValue);
|
|
109
|
+
updateRouteParam({pr:(Math.floor(firstValue/ props.rowsPerPage) + 1).toString()}, props.forceUpdateParameters);
|
|
117
110
|
}
|
|
118
111
|
function changeSize(sizeValue: number) {
|
|
119
112
|
scrollToTop();
|
|
120
|
-
if (0 !== props.first) {
|
|
121
|
-
internSizeChange.value = true;
|
|
122
|
-
}
|
|
123
113
|
emit("update:rowsPerPage", sizeValue);
|
|
124
|
-
updatePaginateSize(sizeValue);
|
|
114
|
+
updatePaginateSize(sizeValue, props.forceUpdateParameters);
|
|
125
115
|
}
|
|
126
116
|
function scrollToTop() {
|
|
127
117
|
const element = document.getElementById(props.id);
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
/>
|
|
13
13
|
<ListPaginate
|
|
14
14
|
id="podcastPlaylistListPaginate"
|
|
15
|
-
v-model:first="
|
|
16
|
-
v-model:rows-per-page="
|
|
15
|
+
v-model:first="dfirst"
|
|
16
|
+
v-model:rows-per-page="dsize"
|
|
17
17
|
v-model:is-mobile="isMobile"
|
|
18
18
|
:text-count="
|
|
19
19
|
podcasts.length > 1
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
: undefined
|
|
30
30
|
"
|
|
31
31
|
:player-responsive="true"
|
|
32
|
+
:force-update-parameters="true"
|
|
32
33
|
>
|
|
33
34
|
<template #list>
|
|
34
35
|
<div class="octopus-element-list">
|
|
@@ -73,14 +74,20 @@ import { useI18n } from "vue-i18n";
|
|
|
73
74
|
//Props
|
|
74
75
|
const props = defineProps({
|
|
75
76
|
playlist: { default: () => ({}), type: Object as () => Playlist },
|
|
77
|
+
first: { default: 0, type: Number },
|
|
78
|
+
size: { default: 30, type: Number },
|
|
79
|
+
query: { default: undefined, type: String },
|
|
76
80
|
})
|
|
77
81
|
|
|
82
|
+
//Emits
|
|
83
|
+
const emit = defineEmits(["update:query"]);
|
|
84
|
+
|
|
78
85
|
//Data
|
|
79
86
|
const loading = ref(true);
|
|
80
87
|
const podcasts: Ref<Array<Podcast>> = ref([]);
|
|
81
88
|
const podcastsQuery: Ref<Array<Podcast>> = ref([]);
|
|
82
|
-
const
|
|
83
|
-
const
|
|
89
|
+
const dfirst = ref(props.first);
|
|
90
|
+
const dsize = ref(props.size);
|
|
84
91
|
const searchPattern = ref("");
|
|
85
92
|
const isMobile = ref(false);
|
|
86
93
|
|
|
@@ -96,18 +103,19 @@ const podcastsDisplay = computed(() => {
|
|
|
96
103
|
if (isMobile.value) {
|
|
97
104
|
return podcastsQuery.value.slice(
|
|
98
105
|
0,
|
|
99
|
-
Math.min(
|
|
106
|
+
Math.min(dfirst.value + dsize.value, podcasts.value.length),
|
|
100
107
|
);
|
|
101
108
|
}
|
|
102
109
|
return podcastsQuery.value.slice(
|
|
103
|
-
|
|
104
|
-
Math.min(
|
|
110
|
+
dfirst.value,
|
|
111
|
+
Math.min(dfirst.value + dsize.value, podcasts.value.length),
|
|
105
112
|
);
|
|
106
113
|
});
|
|
107
114
|
const editRight = computed(() =>isEditRights(props.playlist.organisation?.id));
|
|
108
115
|
|
|
109
116
|
//Watch
|
|
110
117
|
watch(searchPattern,() => {
|
|
118
|
+
emit('update:query', searchPattern.value);
|
|
111
119
|
if ("" !== searchPattern.value) {
|
|
112
120
|
podcastsQuery.value = podcasts.value.filter((el: Podcast) => {
|
|
113
121
|
return el.title
|
|
@@ -141,6 +149,7 @@ async function fetchContent(): Promise<void> {
|
|
|
141
149
|
});
|
|
142
150
|
}
|
|
143
151
|
podcastsQuery.value = podcasts.value;
|
|
152
|
+
searchPattern.value = props.query ?? "";
|
|
144
153
|
} catch (error) {
|
|
145
154
|
handle403(error as AxiosError);
|
|
146
155
|
}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<h3 class="mb-2">
|
|
4
4
|
{{ titleFilter }}
|
|
5
5
|
</h3>
|
|
6
|
-
<div class="d-flex align-items-
|
|
6
|
+
<div class="d-flex align-items-stretch flex-wrap mb-2">
|
|
7
7
|
<div id="podcast-filter-list-category-chooser" class="w-50-responsive pe-3">
|
|
8
8
|
<CategoryChooser
|
|
9
|
+
height="100%"
|
|
9
10
|
:defaultanswer="t('No category filter')"
|
|
10
11
|
@selected="onCategorySelected"
|
|
11
12
|
/>
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
/>
|
|
19
20
|
</div>
|
|
20
21
|
<PodcastList
|
|
21
|
-
:first="
|
|
22
|
-
:size="
|
|
22
|
+
:first="dfirst"
|
|
23
|
+
:size="dsize"
|
|
23
24
|
:iab-id="iabId"
|
|
24
25
|
:query="query"
|
|
25
26
|
:participant-id="participantId"
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
:include-hidden="editRight"
|
|
30
31
|
:show-count="showCount"
|
|
31
32
|
:display-sort-text="false"
|
|
33
|
+
:force-update-parameters="forceUpdateParameters"
|
|
32
34
|
@fetch="fetch"
|
|
33
35
|
/>
|
|
34
36
|
</section>
|
|
@@ -47,6 +49,9 @@ const CategoryChooser = defineAsyncComponent(
|
|
|
47
49
|
|
|
48
50
|
//Props
|
|
49
51
|
const props = defineProps({
|
|
52
|
+
first: { default: 0, type: Number },
|
|
53
|
+
size: { default: 30, type: Number },
|
|
54
|
+
query: { default: undefined, type: String },
|
|
50
55
|
participantId: { default: undefined, type: Number },
|
|
51
56
|
name: { default: undefined, type: String },
|
|
52
57
|
emissionId: { default: undefined, type: Number },
|
|
@@ -55,15 +60,16 @@ const props = defineProps({
|
|
|
55
60
|
editRight: { default: false, type: Boolean },
|
|
56
61
|
productorId: { default: () => [], type: Array as () => Array<string> },
|
|
57
62
|
showCount: { default: false, type: Boolean },
|
|
63
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
58
64
|
})
|
|
59
65
|
|
|
60
66
|
//Emits
|
|
61
|
-
const emit = defineEmits(["fetch"]);
|
|
67
|
+
const emit = defineEmits(["fetch", "update:query"]);
|
|
62
68
|
|
|
63
69
|
//Data
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const searchPattern = ref("");
|
|
70
|
+
const dfirst = ref(props.first);
|
|
71
|
+
const dsize = ref(props.size);
|
|
72
|
+
const searchPattern = ref(props.query ?? "");
|
|
67
73
|
const reloadList = ref(false);
|
|
68
74
|
const iabId : Ref<number | undefined>= ref(undefined);
|
|
69
75
|
|
|
@@ -82,6 +88,9 @@ const query = computed(() => searchPattern.value.length >= 3 ? searchPattern.val
|
|
|
82
88
|
watch(()=>props.reload, () => {
|
|
83
89
|
reloadList.value = !reloadList.value;
|
|
84
90
|
});
|
|
91
|
+
watch(searchPattern, () => {
|
|
92
|
+
emit('update:query', searchPattern.value);
|
|
93
|
+
});
|
|
85
94
|
|
|
86
95
|
//Methods
|
|
87
96
|
function onCategorySelected(category: Category | undefined): void {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"
|
|
20
20
|
:just-size-chosen="justSizeChosen"
|
|
21
21
|
:player-responsive="true"
|
|
22
|
+
:force-update-parameters="forceUpdateParameters"
|
|
22
23
|
>
|
|
23
24
|
<template #list>
|
|
24
25
|
<div class="octopus-element-list">
|
|
@@ -85,6 +86,7 @@ const props = defineProps({
|
|
|
85
86
|
justSizeChosen: { default: false, type: Boolean },
|
|
86
87
|
withVideo: { default: undefined, type: Boolean },
|
|
87
88
|
includeTag:{ default: () => [], type: Array as () => Array<string> },
|
|
89
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
88
90
|
})
|
|
89
91
|
|
|
90
92
|
//Emits
|
|
@@ -137,7 +137,7 @@ onMounted(()=>{
|
|
|
137
137
|
function isNumeric(value: string): boolean {
|
|
138
138
|
return /^-?\d+$/.test(value);
|
|
139
139
|
}
|
|
140
|
-
function selectChange($event:
|
|
140
|
+
function selectChange($event: Event) {
|
|
141
141
|
const val = $event.target.value;
|
|
142
142
|
if (!val) {
|
|
143
143
|
return;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
'multiselect-no-deselect': noDeselect,
|
|
6
6
|
'form-margin': displayLabel,
|
|
7
7
|
}"
|
|
8
|
-
:style="{ width: width }"
|
|
8
|
+
:style="{ width: width, height: height }"
|
|
9
9
|
>
|
|
10
10
|
<label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
|
|
11
11
|
label
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"
|
|
29
29
|
:filter="fakeSearch"
|
|
30
30
|
:selectable="() => !maxOptionsSelected"
|
|
31
|
+
class="h-100"
|
|
31
32
|
:class="{ 'border border-danger': textDanger?.length }"
|
|
32
33
|
@open="onSearch"
|
|
33
34
|
@search="onSearch"
|
|
@@ -93,6 +94,7 @@ const props = defineProps({
|
|
|
93
94
|
multiple: { default: false, type: Boolean },
|
|
94
95
|
isDisabled: { default: false, type: Boolean },
|
|
95
96
|
width: { default: "100%", type: String },
|
|
97
|
+
height: { default: undefined, type: String },
|
|
96
98
|
maxElement: { default: 50, type: Number },
|
|
97
99
|
minSearchLength: { default: 3, type: Number },
|
|
98
100
|
optionChosen: { default: undefined, type: Object as () => unknown },
|
|
@@ -209,6 +211,7 @@ defineExpose({
|
|
|
209
211
|
|
|
210
212
|
.vs__dropdown-toggle {
|
|
211
213
|
padding: 0;
|
|
214
|
+
height: 100%;
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
.vs__search:focus {
|
|
@@ -72,7 +72,7 @@ const router= useRouter();
|
|
|
72
72
|
const popoverId = computed(() => "popover" + props.target);
|
|
73
73
|
const positionInlineStyle = computed(() => `left: ${posX.value}px; top: ${posY.value}px;max-height:${maxHeight.value}`);
|
|
74
74
|
const displayPopover = computed(() => show.value && !props.disable);
|
|
75
|
-
const isTopLayerPopover = computed(() => (props.isTopLayer || "octopus-modal"===props.relativeClass) && HTMLElement.prototype
|
|
75
|
+
const isTopLayerPopover = computed(() => (props.isTopLayer || "octopus-modal"===props.relativeClass) && Object.hasOwn(HTMLElement.prototype, "popover"));
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
//Watch
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
|
|
75
75
|
<script setup lang="ts">
|
|
76
76
|
import cookiesHelper from "../../helper/cookiesHelper";
|
|
77
|
-
import { useRubriquesFilterComputed } from "../composable/route/useRubriquesFilterComputed";
|
|
78
77
|
import ClassicSelect from "../form/ClassicSelect.vue";
|
|
79
78
|
import AcpmImage from "./AcpmImage.vue";
|
|
80
79
|
import { state } from "../../stores/ParamSdkStore";
|
|
@@ -103,7 +102,6 @@ const reset = ref(false);
|
|
|
103
102
|
const organisationId: Ref<string | undefined> = ref(undefined);
|
|
104
103
|
|
|
105
104
|
//Composables
|
|
106
|
-
const { rubriqueQueryParam } = useRubriquesFilterComputed();
|
|
107
105
|
const generalStore = useGeneralStore();
|
|
108
106
|
const filterStore = useFilterStore();
|
|
109
107
|
const authStore = useAuthStore();
|
|
@@ -140,20 +138,6 @@ watch(()=>filterStore.filterOrgaId, () => {
|
|
|
140
138
|
|
|
141
139
|
|
|
142
140
|
//Methods
|
|
143
|
-
function getQueriesRouter(routeName: string) {
|
|
144
|
-
if (
|
|
145
|
-
"podcasts" !== routeName &&
|
|
146
|
-
"emissions" !== routeName &&
|
|
147
|
-
"home" !== routeName
|
|
148
|
-
) {
|
|
149
|
-
return { productor: filterStore.filterOrgaId };
|
|
150
|
-
}
|
|
151
|
-
return {
|
|
152
|
-
productor: filterStore.filterOrgaId,
|
|
153
|
-
iabId: filterStore.filterIab?.id,
|
|
154
|
-
rubriquesId: rubriqueQueryParam.value,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
141
|
function changeLanguage(): void {
|
|
158
142
|
cookiesHelper.setCookie("octopus-language", language.value);
|
|
159
143
|
loadLocaleMessages(
|
|
@@ -70,12 +70,17 @@
|
|
|
70
70
|
:emission-id="emissionId"
|
|
71
71
|
/>
|
|
72
72
|
<PodcastFilterList
|
|
73
|
+
v-if="isInit"
|
|
74
|
+
v-model:query="searchPattern"
|
|
73
75
|
class="mx-2"
|
|
76
|
+
:first="paginateFirst"
|
|
77
|
+
:size="ps"
|
|
74
78
|
:show-count="true"
|
|
75
79
|
:emission-id="emissionId"
|
|
76
80
|
:category-filter="false"
|
|
77
81
|
:edit-right="editRight"
|
|
78
82
|
:productor-id="[emission.orga.id]"
|
|
83
|
+
:force-update-parameters="true"
|
|
79
84
|
@fetch="podcastsFetched"
|
|
80
85
|
/>
|
|
81
86
|
</section>
|
|
@@ -110,6 +115,7 @@ import { useFilterStore } from "../../stores/FilterStore";
|
|
|
110
115
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
111
116
|
import { useI18n } from "vue-i18n";
|
|
112
117
|
import { useRoute } from "vue-router";
|
|
118
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
113
119
|
const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
|
|
114
120
|
const PodcastFilterList = defineAsyncComponent(
|
|
115
121
|
() => import("../display/podcasts/PodcastFilterList.vue"),
|
|
@@ -143,6 +149,9 @@ const PodcastmakerHeader = defineAsyncComponent(
|
|
|
143
149
|
//Props
|
|
144
150
|
const props = defineProps({
|
|
145
151
|
emissionId: { default: undefined, type: Number },
|
|
152
|
+
pr: { default: 0, type: Number },
|
|
153
|
+
ps: { default: 30, type: Number },
|
|
154
|
+
routeQuery: { default: "", type: String },
|
|
146
155
|
})
|
|
147
156
|
|
|
148
157
|
|
|
@@ -163,6 +172,11 @@ const authStore = useAuthStore();
|
|
|
163
172
|
const filterStore = useFilterStore();
|
|
164
173
|
const generalStore= useGeneralStore();
|
|
165
174
|
const route= useRoute();
|
|
175
|
+
const {
|
|
176
|
+
searchPattern,
|
|
177
|
+
paginateFirst,
|
|
178
|
+
isInit
|
|
179
|
+
} = useSimplePageParam(props, true);
|
|
166
180
|
|
|
167
181
|
|
|
168
182
|
//Computed
|
|
@@ -47,12 +47,17 @@
|
|
|
47
47
|
</section>
|
|
48
48
|
<!-- productorId define to avoid overwrite #12817 -->
|
|
49
49
|
<PodcastFilterList
|
|
50
|
+
v-if="isInit"
|
|
51
|
+
v-model:query="searchPattern"
|
|
52
|
+
:first="paginateFirst"
|
|
53
|
+
:size="ps"
|
|
50
54
|
:participant-id="participantId"
|
|
51
55
|
:name="name"
|
|
52
56
|
:category-filter="true"
|
|
53
57
|
:productor-id="['']"
|
|
54
58
|
:reload="reload"
|
|
55
59
|
:show-count="true"
|
|
60
|
+
:force-update-parameters="true"
|
|
56
61
|
/>
|
|
57
62
|
</template>
|
|
58
63
|
<ClassicLoading
|
|
@@ -77,6 +82,7 @@ import { computed, defineAsyncComponent, ref, Ref, watch } from "vue";
|
|
|
77
82
|
import { AxiosError } from "axios";
|
|
78
83
|
import { useI18n } from "vue-i18n";
|
|
79
84
|
import { useRoute } from "vue-router";
|
|
85
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
80
86
|
const ShareSocialsButtons = defineAsyncComponent(
|
|
81
87
|
() => import("../display/sharing/ShareSocialsButtons.vue"),
|
|
82
88
|
);
|
|
@@ -92,6 +98,9 @@ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/Sha
|
|
|
92
98
|
//Props
|
|
93
99
|
const props = defineProps({
|
|
94
100
|
participantId: { default: undefined, type: Number },
|
|
101
|
+
pr: { default: 0, type: Number },
|
|
102
|
+
ps: { default: 30, type: Number },
|
|
103
|
+
routeQuery: { default: "", type: String },
|
|
95
104
|
});
|
|
96
105
|
|
|
97
106
|
|
|
@@ -110,6 +119,11 @@ const { isEditRights } = useOrgaComputed();
|
|
|
110
119
|
const { updatePathParams } = useSeoTitleUrl();
|
|
111
120
|
const {handle403} = useErrorHandler();
|
|
112
121
|
const filterStore = useFilterStore();
|
|
122
|
+
const {
|
|
123
|
+
searchPattern,
|
|
124
|
+
paginateFirst,
|
|
125
|
+
isInit
|
|
126
|
+
} = useSimplePageParam(props, true);
|
|
113
127
|
|
|
114
128
|
|
|
115
129
|
//Computed
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
width="250"
|
|
19
19
|
height="250"
|
|
20
20
|
aria-hidden="true"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
alt=""
|
|
23
22
|
:title="t('Playlist name image', { name: name })"
|
|
24
23
|
class="img-box float-start me-3 mb-3"
|
|
25
24
|
/>
|
|
@@ -42,7 +41,13 @@
|
|
|
42
41
|
:organisation-id="playlist.organisation.id"
|
|
43
42
|
/>
|
|
44
43
|
<section class="module-box">
|
|
45
|
-
<PodcastList
|
|
44
|
+
<PodcastList
|
|
45
|
+
v-if="isInit"
|
|
46
|
+
v-model:query="searchPattern"
|
|
47
|
+
:first="paginateFirst"
|
|
48
|
+
:size="ps"
|
|
49
|
+
:playlist="playlist"
|
|
50
|
+
/>
|
|
46
51
|
</section>
|
|
47
52
|
</div>
|
|
48
53
|
</template>
|
|
@@ -71,6 +76,7 @@ import {defineAsyncComponent, ref, Ref, computed, watch, onBeforeUnmount } from
|
|
|
71
76
|
import { AxiosError } from "axios";
|
|
72
77
|
import { useI18n } from "vue-i18n";
|
|
73
78
|
import { useRoute } from "vue-router";
|
|
79
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
74
80
|
const ShareSocialsButtons = defineAsyncComponent(
|
|
75
81
|
() => import("../display/sharing/ShareSocialsButtons.vue"),
|
|
76
82
|
);
|
|
@@ -89,6 +95,9 @@ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/Sha
|
|
|
89
95
|
//Props
|
|
90
96
|
const props = defineProps({
|
|
91
97
|
playlistId: { default: undefined, type: Number },
|
|
98
|
+
pr: { default: 0, type: Number },
|
|
99
|
+
ps: { default: 30, type: Number },
|
|
100
|
+
routeQuery: { default: "", type: String },
|
|
92
101
|
});
|
|
93
102
|
|
|
94
103
|
|
|
@@ -108,7 +117,11 @@ const {handle403} = useErrorHandler();
|
|
|
108
117
|
const authStore = useAuthStore();
|
|
109
118
|
const filterStore = useFilterStore();
|
|
110
119
|
const generalStore = useGeneralStore();
|
|
111
|
-
|
|
120
|
+
const {
|
|
121
|
+
searchPattern,
|
|
122
|
+
paginateFirst,
|
|
123
|
+
isInit
|
|
124
|
+
} = useSimplePageParam(props, true);
|
|
112
125
|
|
|
113
126
|
|
|
114
127
|
//Computed
|
package/src/helper/loadScript.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function loadScript(src: string, async:boolean, callback:
|
|
1
|
+
function loadScript(src: string, async:boolean, callback: (isLoaded:boolean) => void) {
|
|
2
2
|
const firstElement = document.getElementsByTagName('head')[0] || document.documentElement,
|
|
3
3
|
scriptElement = document.createElement('script');
|
|
4
4
|
scriptElement.type = 'text/javascript';
|
|
@@ -6,13 +6,13 @@ function loadScript(src: string, async:boolean, callback: any) {
|
|
|
6
6
|
scriptElement.async = async;
|
|
7
7
|
scriptElement.addEventListener('load', function() {
|
|
8
8
|
if(callback && typeof callback === 'function') {
|
|
9
|
-
callback(true
|
|
9
|
+
callback(true);
|
|
10
10
|
}
|
|
11
11
|
}, false);
|
|
12
|
-
scriptElement.addEventListener('error', function(
|
|
12
|
+
scriptElement.addEventListener('error', function() {
|
|
13
13
|
firstElement.removeChild(scriptElement);
|
|
14
14
|
if(callback && typeof callback === 'function') {
|
|
15
|
-
callback(false
|
|
15
|
+
callback(false);
|
|
16
16
|
}
|
|
17
17
|
}, false);
|
|
18
18
|
firstElement.insertBefore(scriptElement, firstElement.firstChild);
|
package/src/router/router.ts
CHANGED
|
@@ -144,9 +144,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
144
144
|
component: EmissionPage,
|
|
145
145
|
props: (route: RouteLocationNormalized) => ({
|
|
146
146
|
emissionId: parseInt(route.params.emissionId.toString(), 10),
|
|
147
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
148
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
149
|
+
routeQuery: route.query.q ?? "",
|
|
147
150
|
}),
|
|
148
151
|
meta:{
|
|
149
|
-
title: ""
|
|
152
|
+
title: "",
|
|
153
|
+
noScroll:true
|
|
150
154
|
}
|
|
151
155
|
},
|
|
152
156
|
{
|
|
@@ -177,9 +181,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
177
181
|
component: ParticipantPage,
|
|
178
182
|
props: (route: RouteLocationNormalized) => ({
|
|
179
183
|
participantId: parseInt(route.params.participantId.toString(), 10),
|
|
184
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
185
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
186
|
+
routeQuery: route.query.q ?? "",
|
|
180
187
|
}),
|
|
181
188
|
meta:{
|
|
182
|
-
title: ""
|
|
189
|
+
title: "",
|
|
190
|
+
noScroll:true
|
|
183
191
|
}
|
|
184
192
|
},
|
|
185
193
|
{
|
|
@@ -266,9 +274,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
266
274
|
component: PlaylistPage,
|
|
267
275
|
props: (route: RouteLocationNormalized) => ({
|
|
268
276
|
playlistId: parseInt(route.params.playlistId.toString(), 10),
|
|
277
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
278
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
279
|
+
routeQuery: route.query.q ?? "",
|
|
269
280
|
}),
|
|
270
281
|
meta:{
|
|
271
|
-
title: ""
|
|
282
|
+
title: "",
|
|
283
|
+
noScroll:true
|
|
272
284
|
}
|
|
273
285
|
},
|
|
274
286
|
//Fake route to avoid errors
|
|
@@ -321,7 +333,8 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
321
333
|
const router = createRouter({
|
|
322
334
|
history: createWebHistory(),
|
|
323
335
|
routes: routes,
|
|
324
|
-
scrollBehavior()
|
|
336
|
+
scrollBehavior(to, from) {
|
|
337
|
+
if (to.name === from.name && to.meta.noScroll) return false;
|
|
325
338
|
return { left: 0, top: 0 };
|
|
326
339
|
},
|
|
327
340
|
});
|
package/src/stores/AuthStore.ts
CHANGED
|
@@ -5,19 +5,19 @@ import { defineStore } from "pinia";
|
|
|
5
5
|
import { KeycloakInfo } from "@/stores/class/user/person";
|
|
6
6
|
import { VideoConfig } from "@/stores/class/config/videoConfig";
|
|
7
7
|
import classicApi from "../api/classicApi";
|
|
8
|
-
|
|
8
|
+
interface AuthParam{
|
|
9
|
+
accessToken?: string;
|
|
10
|
+
refreshToken?: string;
|
|
11
|
+
expiration?: Date|string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
}
|
|
9
14
|
interface AuthState {
|
|
10
15
|
authReload: number;
|
|
11
16
|
authName: string;
|
|
12
17
|
authOrgaId?: string;
|
|
13
18
|
authOrgaName?: string;
|
|
14
19
|
authRole: Array<string>;
|
|
15
|
-
authParam:
|
|
16
|
-
accessToken?: string;
|
|
17
|
-
refreshToken?: string;
|
|
18
|
-
expiration?: Date;
|
|
19
|
-
clientId?: string;
|
|
20
|
-
};
|
|
20
|
+
authParam:AuthParam;
|
|
21
21
|
authProfile?: Profile;
|
|
22
22
|
authOrganisation: Organisation;
|
|
23
23
|
authVideoConfig: VideoConfig;
|
|
@@ -115,25 +115,25 @@ export const useAuthStore = defineStore("AuthStore", {
|
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
actions: {
|
|
118
|
-
authUpdate(authentication:
|
|
118
|
+
authUpdate(authentication: {name?:string, organisationId?:string,organisationName?:string, role?:Array<string>}) {
|
|
119
119
|
this.authName = authentication.name ?? this.authName;
|
|
120
120
|
this.authOrgaId = authentication.organisationId ?? this.authOrgaId;
|
|
121
121
|
this.authOrgaName = authentication.organisationName ?? this.authOrgaName;
|
|
122
122
|
this.authRole = authentication.role ?? this.authRole;
|
|
123
123
|
},
|
|
124
|
-
authUpdateParam(oAuthParam:
|
|
124
|
+
authUpdateParam(oAuthParam: AuthParam) {
|
|
125
125
|
this.authParam = oAuthParam;
|
|
126
126
|
},
|
|
127
|
-
authUpdateProfile(profile:
|
|
127
|
+
authUpdateProfile(profile: Profile) {
|
|
128
128
|
this.authProfile = profile;
|
|
129
129
|
this.authName = profile.firstname + " " + profile.lastname;
|
|
130
130
|
},
|
|
131
|
-
authUpdateOrganisation(organisation:
|
|
131
|
+
authUpdateOrganisation(organisation: Organisation) {
|
|
132
132
|
this.authOrganisation = organisation;
|
|
133
133
|
const saveFetchStore = useSaveFetchStore();
|
|
134
134
|
saveFetchStore.forceUpdateAttributes(
|
|
135
135
|
organisation.id,
|
|
136
|
-
organisation.attributes
|
|
136
|
+
organisation.attributes??{}
|
|
137
137
|
);
|
|
138
138
|
saveFetchStore.forceUpdateData(organisation.id, organisation);
|
|
139
139
|
},
|
package/src/stores/VastStore.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
|
|
2
2
|
import { AdPosition } from "./class/adserver/adPosition";
|
|
3
3
|
|
|
4
4
|
interface VastState {
|
|
5
|
-
currentAd:
|
|
5
|
+
currentAd: google.ima.Ad|undefined;
|
|
6
6
|
isAdPlaying: boolean;
|
|
7
7
|
isAdPaused: boolean;
|
|
8
8
|
isAdSkippable: boolean;
|
|
@@ -79,7 +79,7 @@ export const useVastStore = defineStore("VastStore", {
|
|
|
79
79
|
) {
|
|
80
80
|
this.adPositionsPodcasts[podcastId] = adPositions;
|
|
81
81
|
},
|
|
82
|
-
updateCurrentAd(currentAd:
|
|
82
|
+
updateCurrentAd(currentAd: google.ima.Ad) {
|
|
83
83
|
this.currentAd = currentAd;
|
|
84
84
|
this.isAdSkipped = false;
|
|
85
85
|
},
|