@saooti/octopus-sdk 36.0.33 → 36.0.35
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 +14 -14
- package/src/components/display/live/RadioPlanning.vue +6 -1
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +6 -7
- package/src/components/display/rubriques/RubriqueList.vue +0 -8
- package/src/components/form/ClassicMultiselect.vue +4 -4
- package/src/components/mixins/player/playerDisplay.ts +1 -3
- package/src/components/mixins/player/playerLogic.ts +0 -9
- package/src/components/mixins/radio/fetchRadioData.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "36.0.
|
|
3
|
+
"version": "36.0.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"test": "jest --coverage"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@popperjs/core": "^2.11.
|
|
19
|
+
"@popperjs/core": "^2.11.8",
|
|
20
20
|
"@saooti/octopus-api": "^0.34.3",
|
|
21
21
|
"@tiptap/extension-link": "^2.0.3",
|
|
22
22
|
"@tiptap/pm": "^2.0.3",
|
|
@@ -24,37 +24,37 @@
|
|
|
24
24
|
"@tiptap/starter-kit": "^2.0.3",
|
|
25
25
|
"@tiptap/vue-3": "^2.0.3",
|
|
26
26
|
"@vue/cli": "^5.0.8",
|
|
27
|
-
"@vue/compat": "^3.3.
|
|
27
|
+
"@vue/compat": "^3.3.4",
|
|
28
28
|
"autoprefixer": "^10.4.14",
|
|
29
29
|
"axios": "^1.4.0",
|
|
30
|
-
"dayjs": "^1.11.
|
|
30
|
+
"dayjs": "^1.11.8",
|
|
31
31
|
"express": "^4.18.2",
|
|
32
|
-
"hls.js": "^1.4.
|
|
32
|
+
"hls.js": "^1.4.6",
|
|
33
33
|
"humanize-duration": "^3.28.0",
|
|
34
34
|
"jest": "^29.5.0",
|
|
35
|
-
"pinia": "^2.1.
|
|
35
|
+
"pinia": "^2.1.4",
|
|
36
36
|
"qrcode.vue": "^3.4.0",
|
|
37
|
-
"sass": "^1.
|
|
37
|
+
"sass": "^1.63.4",
|
|
38
38
|
"sonarqube-scanner": "^3.0.0",
|
|
39
39
|
"swiper": "^9.3.2",
|
|
40
40
|
"v-calendar": "^3.0.3",
|
|
41
|
-
"vite": "^3.2.
|
|
42
|
-
"vue": "^3.3.
|
|
41
|
+
"vite": "^3.2.7",
|
|
42
|
+
"vue": "^3.3.4",
|
|
43
43
|
"vue-i18n": "^9.2.2",
|
|
44
44
|
"vue-recaptcha": "^2.0.3",
|
|
45
|
-
"vue-router": "^4.2.
|
|
45
|
+
"vue-router": "^4.2.2",
|
|
46
46
|
"vue-select": "^4.0.0-beta.6",
|
|
47
47
|
"vue3-lazyload": "^0.3.6",
|
|
48
48
|
"vue3-swatches": "^1.2.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/vue-select": "^3.16.2",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
53
|
-
"@typescript-eslint/parser": "^5.59.
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
53
|
+
"@typescript-eslint/parser": "^5.59.11",
|
|
54
54
|
"@vitejs/plugin-vue": "^3.2.0",
|
|
55
|
-
"@vue/compiler-sfc": "^3.3.
|
|
55
|
+
"@vue/compiler-sfc": "^3.3.4",
|
|
56
56
|
"@vue/eslint-config-typescript": "^8.0.0",
|
|
57
|
-
"eslint": "^8.
|
|
57
|
+
"eslint": "^8.42.0",
|
|
58
58
|
"eslint-plugin-vue": "^7.17.0",
|
|
59
59
|
"typescript": "^4.9.5"
|
|
60
60
|
},
|
|
@@ -157,7 +157,12 @@ export default defineComponent({
|
|
|
157
157
|
const lives = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'live/list',params);
|
|
158
158
|
if(lives.length){
|
|
159
159
|
occurrences = occurrences.concat(lives);
|
|
160
|
-
occurrences.sort((a,b) =>
|
|
160
|
+
occurrences.sort((a,b) => {
|
|
161
|
+
if(a.startDate > b.startDate){
|
|
162
|
+
return 1;
|
|
163
|
+
}
|
|
164
|
+
return (b.startDate > a.startDate) ? -1 : 0;
|
|
165
|
+
});
|
|
161
166
|
}
|
|
162
167
|
this.planning[this.daySelected] = [];
|
|
163
168
|
for (let oc of occurrences) {
|
|
@@ -71,7 +71,6 @@ import { RouteLocationRaw } from 'vue-router';
|
|
|
71
71
|
import { useFilterStore } from '@/stores/FilterStore';
|
|
72
72
|
import { mapState, mapActions } from 'pinia';
|
|
73
73
|
import { Rubrique } from '@/stores/class/rubrique/rubrique';
|
|
74
|
-
import { Rubriquage } from '@/stores/class/rubrique/rubriquage';
|
|
75
74
|
export default defineComponent({
|
|
76
75
|
name: 'PodcastInlineListTemplate',
|
|
77
76
|
|
|
@@ -151,18 +150,18 @@ export default defineComponent({
|
|
|
151
150
|
nameRubrique: ''
|
|
152
151
|
};
|
|
153
152
|
if(this.filterRubriquage.length){
|
|
154
|
-
this.filterRubriquage.
|
|
155
|
-
const rubriqueChosen =
|
|
153
|
+
for (let i = 0, len = this.filterRubriquage.length; i < len; i++) {
|
|
154
|
+
const rubriqueChosen = this.filterRubriquage[i].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
|
|
156
155
|
if(rubriqueChosen){
|
|
157
156
|
filterToAdd = {
|
|
158
|
-
rubriquageId:
|
|
157
|
+
rubriquageId: this.filterRubriquage[i].rubriquageId??0,
|
|
159
158
|
rubriqueId: rubriqueChosenId,
|
|
160
|
-
nameRubriquage:
|
|
159
|
+
nameRubriquage: this.filterRubriquage[i].title,
|
|
161
160
|
nameRubrique: rubriqueChosen.name
|
|
162
161
|
};
|
|
163
|
-
|
|
162
|
+
break;
|
|
164
163
|
}
|
|
165
|
-
}
|
|
164
|
+
}
|
|
166
165
|
}
|
|
167
166
|
const newFilter: Array<RubriquageFilter> = Array.from(this.filterRubrique);
|
|
168
167
|
newFilter.push(filterToAdd);
|
|
@@ -53,14 +53,6 @@
|
|
|
53
53
|
width="auto"
|
|
54
54
|
@selected="addFilterFromPopover($event)"
|
|
55
55
|
/>
|
|
56
|
-
<!-- <button
|
|
57
|
-
v-for="rubrique in hidenRubriques"
|
|
58
|
-
:key="rubrique.rubriqueId"
|
|
59
|
-
class="me-3 octopus-dropdown-item"
|
|
60
|
-
@mousedown="addFilter(rubrique)"
|
|
61
|
-
>
|
|
62
|
-
{{ rubrique.name }}
|
|
63
|
-
</button> -->
|
|
64
56
|
</Popover>
|
|
65
57
|
</div>
|
|
66
58
|
</template>
|
|
@@ -48,24 +48,24 @@
|
|
|
48
48
|
<span v-else>{{ $t('List is empty') }}</span>
|
|
49
49
|
</template>
|
|
50
50
|
<template #list-footer>
|
|
51
|
-
<
|
|
51
|
+
<div
|
|
52
52
|
v-if="remainingElements"
|
|
53
53
|
class="vs__dropdown-option"
|
|
54
54
|
>
|
|
55
55
|
{{
|
|
56
56
|
$t('Count more elements matched your query, please make a more specific search.',{ count: remainingElements })
|
|
57
57
|
}}
|
|
58
|
-
</
|
|
58
|
+
</div>
|
|
59
59
|
</template>
|
|
60
60
|
<template #list-header>
|
|
61
|
-
<
|
|
61
|
+
<div
|
|
62
62
|
v-if="maxOptionsSelected"
|
|
63
63
|
class="vs__dropdown-option"
|
|
64
64
|
>
|
|
65
65
|
{{
|
|
66
66
|
$t('Multiselect max options', {max:maxOptions})
|
|
67
67
|
}}
|
|
68
|
-
</
|
|
68
|
+
</div>
|
|
69
69
|
</template>
|
|
70
70
|
</vSelect>
|
|
71
71
|
</div>
|
|
@@ -2,12 +2,10 @@ import { state } from '../../../stores/ParamSdkStore';
|
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
3
|
import { RouteLocationRaw } from 'vue-router';
|
|
4
4
|
import {fetchRadioData} from '../../mixins/radio/fetchRadioData';
|
|
5
|
-
import { MediaRadio
|
|
5
|
+
import { MediaRadio } from '@/stores/class/general/player';
|
|
6
6
|
import { usePlayerStore } from '@/stores/PlayerStore';
|
|
7
7
|
import { useFilterStore } from '@/stores/FilterStore';
|
|
8
8
|
import { mapState, mapActions } from 'pinia';
|
|
9
|
-
import octopusApi from '@saooti/octopus-api';
|
|
10
|
-
import dayjs from 'dayjs';
|
|
11
9
|
import { Podcast } from '@/stores/class/general/podcast';
|
|
12
10
|
export const playerDisplay = defineComponent({
|
|
13
11
|
props: {
|
|
@@ -142,7 +142,6 @@ export const playerLogic = defineComponent({
|
|
|
142
142
|
if (!this.playerPodcast) return '';
|
|
143
143
|
const parameters = [];
|
|
144
144
|
parameters.push('origin=octopus');
|
|
145
|
-
parameters.push('listenerId='+this.getListenerId());
|
|
146
145
|
if (this.authOrgaId) {
|
|
147
146
|
parameters.push(
|
|
148
147
|
'distributorId=' + this.authOrgaId
|
|
@@ -176,14 +175,6 @@ export const playerLogic = defineComponent({
|
|
|
176
175
|
stopPlayer(): void {
|
|
177
176
|
this.playerPlay();
|
|
178
177
|
},
|
|
179
|
-
getListenerId(): string{
|
|
180
|
-
let listenerId = this.getCookie("octopus_listenerId");
|
|
181
|
-
if(!listenerId){
|
|
182
|
-
listenerId = new Date().valueOf().toString() + Math.random();
|
|
183
|
-
this.setCookie("octopus_listenerId", listenerId, ';domain='+this.getDomain());
|
|
184
|
-
}
|
|
185
|
-
return listenerId;
|
|
186
|
-
},
|
|
187
178
|
onError(): void {
|
|
188
179
|
if (this.playerPodcast && ""!==this.audioUrlToPlay && !this.listenError) {
|
|
189
180
|
this.listenError = true;
|
|
@@ -17,14 +17,14 @@ export const fetchRadioData = defineComponent({
|
|
|
17
17
|
const metadata = await octopusApi.fetchData<MetadataRadio>(14, 'player/playing/'+canalId);
|
|
18
18
|
const arrayMetadata = metadata.previously;
|
|
19
19
|
arrayMetadata.unshift(metadata.currently);
|
|
20
|
-
for(let
|
|
21
|
-
if(dayjs().valueOf()-29000 > dayjs(
|
|
22
|
-
if(previousTitle !==
|
|
23
|
-
if(
|
|
24
|
-
const data : Podcast = await octopusApi.fetchData<Podcast>(0, 'podcast/'+
|
|
25
|
-
callbackMetadata(
|
|
20
|
+
for (let el of arrayMetadata) {
|
|
21
|
+
if(dayjs().valueOf()-29000 > dayjs(el.startDate).valueOf()){
|
|
22
|
+
if(previousTitle !== el.title){
|
|
23
|
+
if(el.podcastId){
|
|
24
|
+
const data : Podcast = await octopusApi.fetchData<Podcast>(0, 'podcast/'+el.podcastId);
|
|
25
|
+
callbackMetadata(el, data);
|
|
26
26
|
}else{
|
|
27
|
-
callbackMetadata(
|
|
27
|
+
callbackMetadata(el);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
return;
|