@saooti/octopus-sdk 37.0.6 → 37.0.8
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/README.md +2 -2
- package/index.ts +22 -22
- package/package.json +26 -22
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/transition.scss +34 -22
- package/src/components/display/aggregator/RssSection.vue +3 -3
- package/src/components/display/categories/CategoryChooser.vue +73 -60
- package/src/components/display/categories/CategoryFilter.vue +134 -90
- package/src/components/display/categories/CategoryList.vue +76 -62
- package/src/components/display/comments/AddCommentModal.vue +44 -44
- package/src/components/display/comments/CommentBasicView.vue +38 -30
- package/src/components/display/comments/CommentInput.vue +121 -106
- package/src/components/display/comments/CommentItem.vue +144 -102
- package/src/components/display/comments/CommentList.vue +117 -85
- package/src/components/display/comments/CommentParentInfo.vue +18 -15
- package/src/components/display/comments/CommentPlayer.vue +39 -41
- package/src/components/display/comments/CommentSection.vue +68 -53
- package/src/components/display/edit/EditBox.vue +7 -7
- package/src/components/display/edit/EditBoxRadio.vue +3 -4
- package/src/components/display/edit/EditCommentBox.vue +34 -36
- package/src/components/display/emission/EmissionInlineList.vue +75 -63
- package/src/components/display/emission/EmissionItem.vue +47 -35
- package/src/components/display/emission/EmissionList.vue +118 -83
- package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
- package/src/components/display/filter/AdvancedSearch.vue +81 -73
- package/src/components/display/filter/CategorySearchFilter.vue +27 -25
- package/src/components/display/filter/DateFilter.vue +38 -38
- package/src/components/display/filter/MonetizableFilter.vue +16 -14
- package/src/components/display/filter/ProductorSearch.vue +55 -47
- package/src/components/display/filter/RubriqueChoice.vue +42 -27
- package/src/components/display/filter/RubriqueFilter.vue +130 -85
- package/src/components/display/filter/SearchOrder.vue +16 -11
- package/src/components/display/list/ListPaginate.vue +72 -70
- package/src/components/display/list/PaginateParams.vue +29 -30
- package/src/components/display/list/PaginateSection.vue +210 -0
- package/src/components/display/list/SwiperList.vue +28 -32
- package/src/components/display/live/CountDown.vue +12 -14
- package/src/components/display/live/LiveHorizontalList.vue +60 -50
- package/src/components/display/live/LiveItem.vue +42 -26
- package/src/components/display/live/LiveList.vue +92 -65
- package/src/components/display/live/RadioCurrently.vue +47 -42
- package/src/components/display/live/RadioImage.vue +40 -42
- package/src/components/display/live/RadioItem.vue +15 -22
- package/src/components/display/live/RadioList.vue +24 -21
- package/src/components/display/live/RadioPlanning.vue +105 -68
- package/src/components/display/organisation/OrganisationChooser.vue +58 -42
- package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
- package/src/components/display/participant/ParticipantItem.vue +89 -77
- package/src/components/display/participant/ParticipantList.vue +90 -60
- package/src/components/display/playlist/PlaylistItem.vue +32 -35
- package/src/components/display/playlist/PlaylistList.vue +70 -52
- package/src/components/display/playlist/PodcastList.vue +61 -50
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
- package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
- package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
- package/src/components/display/podcasts/PodcastImage.vue +129 -131
- package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
- package/src/components/display/podcasts/PodcastItem.vue +96 -90
- package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
- package/src/components/display/podcasts/PodcastList.vue +115 -84
- package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
- package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
- package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
- package/src/components/display/podcasts/TagList.vue +33 -37
- package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
- package/src/components/display/rubriques/RubriqueList.vue +117 -89
- package/src/components/display/sharing/PlayerParameters.vue +45 -42
- package/src/components/display/sharing/QrCode.vue +52 -46
- package/src/components/display/sharing/ShareButtons.vue +18 -18
- package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
- package/src/components/display/sharing/ShareDistribution.vue +101 -67
- package/src/components/display/sharing/SharePlayer.vue +207 -127
- package/src/components/display/sharing/SharePlayerColors.vue +15 -15
- package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
- package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
- package/src/components/display/sharing/SubscribeButtons.vue +83 -32
- package/src/components/display/studio/RecordingItemButton.vue +3 -3
- package/src/components/form/ClassicCheckbox.vue +32 -31
- package/src/components/form/ClassicDatePicker.vue +47 -49
- package/src/components/form/ClassicInputText.vue +99 -98
- package/src/components/form/ClassicLoading.vue +11 -14
- package/src/components/form/ClassicMultiselect.vue +125 -126
- package/src/components/form/ClassicRadio.vue +15 -18
- package/src/components/form/ClassicSearch.vue +17 -23
- package/src/components/form/ClassicSelect.vue +35 -27
- package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
- package/src/components/misc/AcpmImage.vue +6 -6
- package/src/components/misc/ClassicAccordion.vue +73 -0
- package/src/components/misc/ClassicNav.vue +117 -0
- package/src/components/misc/ClassicPopover.vue +212 -0
- package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
- package/src/components/misc/ErrorMessage.vue +9 -17
- package/src/components/misc/FooterSection.vue +198 -0
- package/src/components/misc/HomeDropdown.vue +60 -60
- package/src/components/misc/LeftMenu.vue +115 -79
- package/src/components/misc/ProgressBar.vue +36 -32
- package/src/components/misc/SnackBar.vue +169 -0
- package/src/components/misc/TopBar.vue +162 -116
- package/src/components/misc/modal/ClassicModal.vue +99 -103
- package/src/components/misc/modal/ClipboardModal.vue +21 -23
- package/src/components/misc/modal/MessageModal.vue +22 -28
- package/src/components/misc/modal/NewsletterModal.vue +139 -113
- package/src/components/misc/modal/QrCodeModal.vue +14 -17
- package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
- package/src/components/misc/player/PlayerCompact.vue +47 -62
- package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
- package/src/components/misc/player/PlayerLarge.vue +62 -61
- package/src/components/misc/player/PlayerProgressBar.vue +40 -30
- package/src/components/misc/player/PlayerTimeline.vue +32 -36
- package/src/components/misc/player/radio/RadioHistory.vue +62 -59
- package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
- package/src/components/mixins/cookies.ts +11 -10
- package/src/components/mixins/displayMethods.ts +5 -4
- package/src/components/mixins/handle403.ts +9 -9
- package/src/components/mixins/imageProxy.ts +14 -7
- package/src/components/mixins/init.ts +31 -16
- package/src/components/mixins/orgaComputed.ts +7 -7
- package/src/components/mixins/organisationFilter.ts +36 -22
- package/src/components/mixins/player/playerComment.ts +46 -37
- package/src/components/mixins/player/playerDisplay.ts +122 -87
- package/src/components/mixins/player/playerLive.ts +65 -43
- package/src/components/mixins/player/playerLogic.ts +133 -88
- package/src/components/mixins/player/playerTranscript.ts +48 -30
- package/src/components/mixins/radio/fetchRadioData.ts +40 -23
- package/src/components/mixins/selenium.ts +2 -2
- package/src/components/mixins/tagOfMixins.ts +11 -11
- package/src/components/pages/CategoryPage.vue +43 -0
- package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
- package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
- package/src/components/pages/Error403Page.vue +20 -19
- package/src/components/pages/HomePage.vue +144 -0
- package/src/components/pages/LivesPage.vue +66 -0
- package/src/components/pages/PageNotFound.vue +33 -22
- package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
- package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
- package/src/components/pages/PlaylistPage.vue +175 -0
- package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
- package/src/components/pages/PodcastPage.vue +365 -0
- package/src/components/pages/PodcastsPage.vue +152 -0
- package/src/components/pages/RadioPage.vue +131 -0
- package/src/components/pages/RubriquePage.vue +45 -0
- package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +10 -4
- package/src/helper/useEventListener.ts +7 -8
- package/src/i18n.ts +31 -30
- package/src/locale/de.ts +272 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +332 -324
- package/src/locale/es.ts +334 -318
- package/src/locale/fr.ts +339 -324
- package/src/locale/it.ts +341 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +324 -319
- package/src/main.ts +28 -31
- package/src/router/router.ts +218 -198
- package/src/shims-tsx.d.ts +1 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/stores/ApiStore.ts +44 -44
- package/src/stores/AuthStore.ts +21 -15
- package/src/stores/CommentStore.ts +13 -11
- package/src/stores/FilterStore.ts +25 -15
- package/src/stores/GeneralStore.ts +15 -15
- package/src/stores/ParamSdkStore.ts +179 -137
- package/src/stores/PlayerStore.ts +139 -125
- package/src/stores/class/adserver/adserverConfig.ts +1 -1
- package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
- package/src/stores/class/cartouchier/cartouche.ts +4 -4
- package/src/stores/class/cartouchier/cartouchier.ts +2 -2
- package/src/stores/class/conference/conference.ts +10 -9
- package/src/stores/class/conference/conferenceMessage.ts +2 -2
- package/src/stores/class/conference/conferenceParticipant.ts +1 -1
- package/src/stores/class/conference/studioCall.ts +6 -6
- package/src/stores/class/contract/contractOrganisation.ts +5 -5
- package/src/stores/class/ftp/ftpEmission.ts +9 -9
- package/src/stores/class/ftp/testFtpEmission.ts +4 -4
- package/src/stores/class/general/audioView.ts +19 -19
- package/src/stores/class/general/category.ts +1 -1
- package/src/stores/class/general/classicSelectType.ts +2 -3
- package/src/stores/class/general/customPlayer.ts +8 -8
- package/src/stores/class/general/emission.ts +20 -20
- package/src/stores/class/general/fetchParam.ts +8 -2
- package/src/stores/class/general/initState.ts +31 -31
- package/src/stores/class/general/interfacePageable.ts +13 -13
- package/src/stores/class/general/ituneCategory.ts +4 -4
- package/src/stores/class/general/listReturn.ts +12 -12
- package/src/stores/class/general/media.ts +7 -7
- package/src/stores/class/general/organisation.ts +9 -9
- package/src/stores/class/general/pageable.ts +10 -10
- package/src/stores/class/general/participant.ts +7 -7
- package/src/stores/class/general/player.ts +30 -28
- package/src/stores/class/general/playlist.ts +17 -19
- package/src/stores/class/general/podcast.ts +19 -19
- package/src/stores/class/general/sortPageable.ts +4 -4
- package/src/stores/class/general/soundcastCategory.ts +7 -7
- package/src/stores/class/ouestFrance/ofTag.ts +34 -34
- package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
- package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
- package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +6 -6
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +54 -54
- package/src/stores/class/rss/rssEmission.ts +13 -13
- package/src/stores/class/rss/rssInfo.ts +7 -7
- package/src/stores/class/rubrique/rubriquage.ts +2 -2
- package/src/stores/class/rubrique/rubrique.ts +1 -1
- package/src/stores/class/stat/statArrayIncome.ts +5 -5
- package/src/stores/class/stat/statArrayObject.ts +26 -26
- package/src/stores/class/stat/statGraph.ts +6 -6
- package/src/stores/class/user/person.ts +4 -2
- package/src/stores/class/user/profile.ts +4 -2
- package/src/stores/class/user/userKeycloak.ts +4 -5
- package/src/components/display/list/Paginate.vue +0 -181
- package/src/components/misc/Accordion.vue +0 -78
- package/src/components/misc/Footer.vue +0 -169
- package/src/components/misc/Nav.vue +0 -119
- package/src/components/misc/Popover.vue +0 -193
- package/src/components/misc/Snackbar.vue +0 -168
- package/src/components/pages/Category.vue +0 -41
- package/src/components/pages/Home.vue +0 -125
- package/src/components/pages/Lives.vue +0 -64
- package/src/components/pages/Playlist.vue +0 -164
- package/src/components/pages/Podcast.vue +0 -307
- package/src/components/pages/Podcasts.vue +0 -146
- package/src/components/pages/Radio.vue +0 -122
- package/src/components/pages/Rubrique.vue +0 -42
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
:next-available="nextAvailable"
|
|
14
14
|
:no-rubriquage-id="noRubriquageId"
|
|
15
15
|
:podcast-id="podcastId"
|
|
16
|
-
@
|
|
17
|
-
@
|
|
18
|
-
@
|
|
19
|
-
@
|
|
16
|
+
@sort-chrono="sortChrono"
|
|
17
|
+
@sort-popular="sortPopular"
|
|
18
|
+
@display-previous="displayPrevious"
|
|
19
|
+
@display-next="displayNext"
|
|
20
20
|
>
|
|
21
21
|
<template #list-inline>
|
|
22
22
|
<ClassicLoading
|
|
23
23
|
class="loading-size"
|
|
24
|
-
:loading-text="loading
|
|
24
|
+
:loading-text="loading ? $t('Loading podcasts ...') : undefined"
|
|
25
25
|
/>
|
|
26
26
|
<transition-group
|
|
27
27
|
v-show="!loading"
|
|
@@ -47,44 +47,44 @@
|
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<script lang="ts">
|
|
50
|
-
import PodcastInlineListTemplate from
|
|
51
|
-
import octopusApi from
|
|
52
|
-
import domHelper from
|
|
53
|
-
import PodcastItem from
|
|
54
|
-
import ClassicLoading from
|
|
50
|
+
import PodcastInlineListTemplate from "./PodcastInlineListTemplate.vue";
|
|
51
|
+
import octopusApi from "@saooti/octopus-api";
|
|
52
|
+
import domHelper from "../../../helper/dom";
|
|
53
|
+
import PodcastItem from "./PodcastItem.vue";
|
|
54
|
+
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
55
55
|
const PHONE_WIDTH = 960;
|
|
56
|
-
import { useFilterStore } from
|
|
57
|
-
import { mapState } from
|
|
58
|
-
import { state } from
|
|
59
|
-
import { Podcast } from
|
|
60
|
-
import imageProxy from
|
|
61
|
-
import { defineComponent } from
|
|
56
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
57
|
+
import { mapState } from "pinia";
|
|
58
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
59
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
60
|
+
import imageProxy from "../../mixins/imageProxy";
|
|
61
|
+
import { defineComponent } from "vue";
|
|
62
62
|
export default defineComponent({
|
|
63
|
-
name:
|
|
64
|
-
|
|
63
|
+
name: "PodcastInlineListClassic",
|
|
64
|
+
|
|
65
65
|
components: {
|
|
66
66
|
PodcastItem,
|
|
67
67
|
ClassicLoading,
|
|
68
|
-
PodcastInlineListTemplate
|
|
68
|
+
PodcastInlineListTemplate,
|
|
69
69
|
},
|
|
70
|
-
mixins:[imageProxy],
|
|
70
|
+
mixins: [imageProxy],
|
|
71
71
|
props: {
|
|
72
|
-
organisationId: { default:
|
|
73
|
-
emissionId: { default: undefined, type: Number},
|
|
74
|
-
iabId: { default: undefined, type: Number},
|
|
75
|
-
title: { default:
|
|
76
|
-
href: { default: undefined, type: String},
|
|
77
|
-
buttonText: { default: undefined, type: String},
|
|
78
|
-
isArrow: { default: false, type: Boolean},
|
|
79
|
-
requirePopularSort: { default:undefined, type: Boolean},
|
|
80
|
-
buttonPlus: { default:false, type: Boolean},
|
|
81
|
-
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
82
|
-
rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
|
|
83
|
-
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
84
|
-
query: { default: undefined, type: String},
|
|
85
|
-
podcastId: { default: undefined, type: Number},
|
|
72
|
+
organisationId: { default: () => [], type: Array as () => Array<string> },
|
|
73
|
+
emissionId: { default: undefined, type: Number },
|
|
74
|
+
iabId: { default: undefined, type: Number },
|
|
75
|
+
title: { default: "", type: String },
|
|
76
|
+
href: { default: undefined, type: String },
|
|
77
|
+
buttonText: { default: undefined, type: String },
|
|
78
|
+
isArrow: { default: false, type: Boolean },
|
|
79
|
+
requirePopularSort: { default: undefined, type: Boolean },
|
|
80
|
+
buttonPlus: { default: false, type: Boolean },
|
|
81
|
+
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
82
|
+
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
83
|
+
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
84
|
+
query: { default: undefined, type: String },
|
|
85
|
+
podcastId: { default: undefined, type: Number },
|
|
86
86
|
},
|
|
87
|
-
emits: [
|
|
87
|
+
emits: ["update:isArrow"],
|
|
88
88
|
|
|
89
89
|
data() {
|
|
90
90
|
return {
|
|
@@ -100,21 +100,23 @@ export default defineComponent({
|
|
|
100
100
|
};
|
|
101
101
|
},
|
|
102
102
|
computed: {
|
|
103
|
-
...mapState(useFilterStore, [
|
|
103
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
104
104
|
podcasts(): Array<Podcast> {
|
|
105
105
|
return this.allPodcasts.slice(this.index, this.index + this.size);
|
|
106
106
|
},
|
|
107
107
|
sizeItem(): number {
|
|
108
|
-
return state.generalParameters.podcastItem
|
|
108
|
+
return state.generalParameters.podcastItem
|
|
109
|
+
? state.generalParameters.podcastItem
|
|
110
|
+
: 13;
|
|
109
111
|
},
|
|
110
112
|
overflowScroll(): boolean {
|
|
111
|
-
return
|
|
113
|
+
return state.emissionPage.overflowScroll as boolean;
|
|
112
114
|
},
|
|
113
115
|
isInlineAnimation(): boolean {
|
|
114
|
-
return
|
|
116
|
+
return state.generalParameters.isInlineAnimation as boolean;
|
|
115
117
|
},
|
|
116
118
|
organisation(): Array<string> {
|
|
117
|
-
if(this.organisationId){
|
|
119
|
+
if (this.organisationId) {
|
|
118
120
|
return this.organisationId;
|
|
119
121
|
}
|
|
120
122
|
return this.filterOrgaId ? [this.filterOrgaId] : [];
|
|
@@ -126,11 +128,11 @@ export default defineComponent({
|
|
|
126
128
|
return this.index + this.size < this.totalCount;
|
|
127
129
|
},
|
|
128
130
|
transitionName(): string {
|
|
129
|
-
return this.direction > 0 ?
|
|
131
|
+
return this.direction > 0 ? "out-left" : "out-right";
|
|
130
132
|
},
|
|
131
|
-
watchVariable():string{
|
|
133
|
+
watchVariable(): string {
|
|
132
134
|
return `${this.emissionId}|${this.organisationId}|${this.filterOrgaId}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
|
|
133
|
-
}
|
|
135
|
+
},
|
|
134
136
|
},
|
|
135
137
|
watch: {
|
|
136
138
|
watchVariable(): void {
|
|
@@ -138,19 +140,19 @@ export default defineComponent({
|
|
|
138
140
|
this.fetchNext();
|
|
139
141
|
},
|
|
140
142
|
},
|
|
141
|
-
|
|
143
|
+
|
|
142
144
|
created() {
|
|
143
145
|
if (undefined !== this.requirePopularSort) {
|
|
144
146
|
this.popularSort = this.requirePopularSort;
|
|
145
147
|
}
|
|
146
148
|
if (undefined !== this.isArrow) {
|
|
147
|
-
this.$emit(
|
|
149
|
+
this.$emit("update:isArrow", true);
|
|
148
150
|
}
|
|
149
|
-
window.addEventListener(
|
|
151
|
+
window.addEventListener("resize", this.handleResize);
|
|
150
152
|
},
|
|
151
153
|
|
|
152
154
|
unmounted() {
|
|
153
|
-
window.removeEventListener(
|
|
155
|
+
window.removeEventListener("resize", this.handleResize);
|
|
154
156
|
},
|
|
155
157
|
|
|
156
158
|
mounted() {
|
|
@@ -158,15 +160,20 @@ export default defineComponent({
|
|
|
158
160
|
this.fetchNext();
|
|
159
161
|
},
|
|
160
162
|
methods: {
|
|
161
|
-
async fetchRecommendations(): Promise<void>{
|
|
163
|
+
async fetchRecommendations(): Promise<void> {
|
|
162
164
|
try {
|
|
163
|
-
const podcastIdsArray = await octopusApi.fetchDataPublicWithParams<
|
|
165
|
+
const podcastIdsArray = await octopusApi.fetchDataPublicWithParams<
|
|
166
|
+
Array<number>
|
|
167
|
+
>(13, "get_predicts", {
|
|
164
168
|
reco: this.podcastId,
|
|
165
169
|
n_neightbors: 5,
|
|
166
|
-
});
|
|
170
|
+
});
|
|
167
171
|
for (let podcastIdReco of podcastIdsArray) {
|
|
168
172
|
try {
|
|
169
|
-
const entirePodcast = await octopusApi.fetchData<Podcast>(
|
|
173
|
+
const entirePodcast = await octopusApi.fetchData<Podcast>(
|
|
174
|
+
0,
|
|
175
|
+
"podcast/" + podcastIdReco,
|
|
176
|
+
);
|
|
170
177
|
this.allPodcasts.push(entirePodcast);
|
|
171
178
|
} catch {
|
|
172
179
|
//If doesn't exist, do nothing
|
|
@@ -175,38 +182,51 @@ export default defineComponent({
|
|
|
175
182
|
this.totalCount = podcastIdsArray.length;
|
|
176
183
|
this.loading = false;
|
|
177
184
|
} catch {
|
|
178
|
-
this.allPodcasts=[];
|
|
185
|
+
this.allPodcasts = [];
|
|
179
186
|
this.totalCount = 0;
|
|
180
187
|
}
|
|
181
188
|
this.loading = false;
|
|
182
189
|
},
|
|
183
190
|
async fetchNext(): Promise<void> {
|
|
184
|
-
if(this.podcastId){
|
|
191
|
+
if (this.podcastId) {
|
|
185
192
|
return this.fetchRecommendations();
|
|
186
193
|
}
|
|
187
|
-
const data =
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
const data = await octopusApi.fetchDataWithParams<{
|
|
195
|
+
count: number;
|
|
196
|
+
result: Array<Podcast>;
|
|
197
|
+
sort: string;
|
|
198
|
+
}>(
|
|
199
|
+
0,
|
|
200
|
+
"podcast/search",
|
|
201
|
+
{
|
|
202
|
+
first: this.first,
|
|
203
|
+
size: this.size + 1,
|
|
204
|
+
organisationId: this.organisation,
|
|
205
|
+
emissionId: this.emissionId,
|
|
206
|
+
iabId: this.iabId,
|
|
207
|
+
rubriqueId: this.rubriqueId.length ? this.rubriqueId : undefined,
|
|
208
|
+
rubriquageId: this.rubriquageId.length
|
|
209
|
+
? this.rubriquageId
|
|
210
|
+
: undefined,
|
|
211
|
+
noRubriquageId: this.noRubriquageId.length
|
|
212
|
+
? this.noRubriquageId
|
|
213
|
+
: undefined,
|
|
214
|
+
sort: this.popularSort ? "POPULARITY" : "DATE",
|
|
215
|
+
query: this.query,
|
|
216
|
+
includeStatus: ["READY", "PROCESSING"],
|
|
217
|
+
},
|
|
218
|
+
true,
|
|
219
|
+
);
|
|
200
220
|
this.loading = false;
|
|
201
221
|
this.totalCount = data.count;
|
|
202
222
|
if (this.allPodcasts.length + data.result.length < this.totalCount) {
|
|
203
223
|
const nexEl = data.result.pop() as Podcast;
|
|
204
|
-
if(nexEl){
|
|
205
|
-
this.preloadImage(nexEl.imageUrl?nexEl.imageUrl:
|
|
224
|
+
if (nexEl) {
|
|
225
|
+
this.preloadImage(nexEl.imageUrl ? nexEl.imageUrl : "");
|
|
206
226
|
}
|
|
207
227
|
}
|
|
208
228
|
this.allPodcasts = this.allPodcasts.concat(
|
|
209
|
-
data.result.filter((pod: Podcast|null) => null !== pod)
|
|
229
|
+
data.result.filter((pod: Podcast | null) => null !== pod),
|
|
210
230
|
);
|
|
211
231
|
this.alignLeft = this.allPodcasts.length <= 3;
|
|
212
232
|
this.first += this.size;
|
|
@@ -263,8 +283,8 @@ export default defineComponent({
|
|
|
263
283
|
},
|
|
264
284
|
preloadImage(url: string): void {
|
|
265
285
|
const img = new Image();
|
|
266
|
-
img.src = this.proxyImageUrl(url,
|
|
286
|
+
img.src = this.proxyImageUrl(url, "330");
|
|
267
287
|
},
|
|
268
288
|
},
|
|
269
|
-
})
|
|
289
|
+
});
|
|
270
290
|
</script>
|
|
@@ -1,39 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="
|
|
4
|
-
>
|
|
5
|
-
<div
|
|
6
|
-
class="d-flex align-items-center"
|
|
7
|
-
:class="podcastId?'mb-4':'mb-2'"
|
|
8
|
-
>
|
|
2
|
+
<div class="podcast-inline-container">
|
|
3
|
+
<div class="d-flex align-items-center" :class="podcastId ? 'mb-4' : 'mb-2'">
|
|
9
4
|
<h2 class="mb-0 big-h2">
|
|
10
5
|
{{ title }}
|
|
11
6
|
</h2>
|
|
12
7
|
</div>
|
|
13
|
-
<div
|
|
14
|
-
v-if="!podcastId"
|
|
15
|
-
class="d-flex justify-content-between"
|
|
16
|
-
>
|
|
8
|
+
<div v-if="!podcastId" class="d-flex justify-content-between">
|
|
17
9
|
<div class="d-flex">
|
|
18
10
|
<button
|
|
19
11
|
class="btn btn-underline"
|
|
20
12
|
:class="{ active: !popularSort }"
|
|
21
13
|
@click="sortChrono()"
|
|
22
14
|
>
|
|
23
|
-
{{ $t(
|
|
15
|
+
{{ $t("Last added") }}
|
|
24
16
|
</button>
|
|
25
17
|
<button
|
|
26
18
|
class="btn btn-underline"
|
|
27
19
|
:class="{ active: popularSort }"
|
|
28
20
|
@click="sortPopular()"
|
|
29
21
|
>
|
|
30
|
-
{{ $t(
|
|
22
|
+
{{ $t("Most popular") }}
|
|
31
23
|
</button>
|
|
32
24
|
</div>
|
|
33
|
-
<div
|
|
34
|
-
v-if="displayArrow"
|
|
35
|
-
class="hide-phone"
|
|
36
|
-
>
|
|
25
|
+
<div v-if="displayArrow" class="hide-phone">
|
|
37
26
|
<button
|
|
38
27
|
class="btn admin-button m-1 saooti-left"
|
|
39
28
|
:class="{ disabled: !previousAvailable }"
|
|
@@ -56,122 +45,142 @@
|
|
|
56
45
|
@click="handleSeeMoreButton"
|
|
57
46
|
>
|
|
58
47
|
{{ buttonText }}
|
|
59
|
-
<div
|
|
60
|
-
v-if="buttonPlus"
|
|
61
|
-
class="ms-1 saooti-more"
|
|
62
|
-
/>
|
|
48
|
+
<div v-if="buttonPlus" class="ms-1 saooti-more" />
|
|
63
49
|
</router-link>
|
|
64
50
|
</div>
|
|
65
51
|
</template>
|
|
66
52
|
|
|
67
53
|
<script lang="ts">
|
|
68
|
-
import { RubriquageFilter } from
|
|
69
|
-
import { defineComponent } from
|
|
70
|
-
import { RouteLocationRaw } from
|
|
71
|
-
import { useFilterStore } from
|
|
72
|
-
import { mapState, mapActions } from
|
|
73
|
-
import { Rubrique } from
|
|
54
|
+
import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
|
|
55
|
+
import { defineComponent } from "vue";
|
|
56
|
+
import { RouteLocationRaw } from "vue-router";
|
|
57
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
58
|
+
import { mapState, mapActions } from "pinia";
|
|
59
|
+
import { Rubrique } from "@/stores/class/rubrique/rubrique";
|
|
74
60
|
export default defineComponent({
|
|
75
|
-
name:
|
|
76
|
-
|
|
77
|
-
components: {
|
|
78
|
-
},
|
|
61
|
+
name: "PodcastInlineListTemplate",
|
|
62
|
+
|
|
63
|
+
components: {},
|
|
79
64
|
|
|
80
65
|
props: {
|
|
81
|
-
displayArrow: { default: true, type: Boolean},
|
|
82
|
-
previousAvailable: { default: false, type: Boolean},
|
|
83
|
-
nextAvailable: { default: false, type: Boolean},
|
|
84
|
-
popularSort: { default: false, type: Boolean},
|
|
85
|
-
buttonText: { default: undefined, type: String},
|
|
86
|
-
buttonPlus: { default:false, type: Boolean},
|
|
87
|
-
title: { default:
|
|
88
|
-
href: { default: undefined, type: String},
|
|
89
|
-
iabId: { default: undefined, type: Number},
|
|
90
|
-
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
91
|
-
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
92
|
-
podcastId: { default: undefined, type: Number},
|
|
66
|
+
displayArrow: { default: true, type: Boolean },
|
|
67
|
+
previousAvailable: { default: false, type: Boolean },
|
|
68
|
+
nextAvailable: { default: false, type: Boolean },
|
|
69
|
+
popularSort: { default: false, type: Boolean },
|
|
70
|
+
buttonText: { default: undefined, type: String },
|
|
71
|
+
buttonPlus: { default: false, type: Boolean },
|
|
72
|
+
title: { default: "", type: String },
|
|
73
|
+
href: { default: undefined, type: String },
|
|
74
|
+
iabId: { default: undefined, type: Number },
|
|
75
|
+
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
76
|
+
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
77
|
+
podcastId: { default: undefined, type: Number },
|
|
93
78
|
},
|
|
94
|
-
emits:[
|
|
79
|
+
emits: ["sortChrono", "sortPopular", "displayPrevious", "displayNext"],
|
|
95
80
|
data() {
|
|
96
|
-
return {
|
|
97
|
-
};
|
|
81
|
+
return {};
|
|
98
82
|
},
|
|
99
83
|
|
|
100
84
|
computed: {
|
|
101
|
-
...mapState(useFilterStore, [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
...mapState(useFilterStore, [
|
|
86
|
+
"filterOrgaId",
|
|
87
|
+
"filterRubrique",
|
|
88
|
+
"filterIab",
|
|
89
|
+
"filterRubriquage",
|
|
90
|
+
]),
|
|
91
|
+
rubriqueQueryParam(): string | undefined {
|
|
92
|
+
if (this.filterRubrique?.length) {
|
|
93
|
+
return this.filterRubrique
|
|
94
|
+
.map(
|
|
95
|
+
(value: RubriquageFilter) =>
|
|
96
|
+
value.rubriquageId + ":" + value.rubriqueId,
|
|
97
|
+
)
|
|
98
|
+
.join();
|
|
105
99
|
}
|
|
106
100
|
return undefined;
|
|
107
101
|
},
|
|
108
102
|
refTo(): string | RouteLocationRaw {
|
|
109
103
|
if (this.href) return this.href;
|
|
110
|
-
if(this.iabId){
|
|
104
|
+
if (this.iabId) {
|
|
111
105
|
return {
|
|
112
|
-
name:
|
|
113
|
-
params:{
|
|
106
|
+
name: "category",
|
|
107
|
+
params: { iabId: this.iabId },
|
|
114
108
|
query: { productor: this.filterOrgaId },
|
|
115
109
|
};
|
|
116
110
|
}
|
|
117
111
|
return {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
name: "podcasts",
|
|
113
|
+
query: {
|
|
114
|
+
productor: this.filterOrgaId,
|
|
115
|
+
iabId: this.filterIab?.id,
|
|
116
|
+
rubriquesId: this.rubriqueQueryParam,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
123
119
|
},
|
|
124
120
|
},
|
|
125
121
|
|
|
126
122
|
methods: {
|
|
127
|
-
...mapActions(useFilterStore, [
|
|
128
|
-
sortChrono():void{
|
|
129
|
-
this.$emit(
|
|
123
|
+
...mapActions(useFilterStore, ["filterUpdateRubrique"]),
|
|
124
|
+
sortChrono(): void {
|
|
125
|
+
this.$emit("sortChrono");
|
|
130
126
|
},
|
|
131
|
-
sortPopular():void{
|
|
132
|
-
this.$emit(
|
|
127
|
+
sortPopular(): void {
|
|
128
|
+
this.$emit("sortPopular");
|
|
133
129
|
},
|
|
134
|
-
displayPrevious():void{
|
|
135
|
-
this.$emit(
|
|
130
|
+
displayPrevious(): void {
|
|
131
|
+
this.$emit("displayPrevious");
|
|
136
132
|
},
|
|
137
|
-
displayNext():void{
|
|
138
|
-
this.$emit(
|
|
133
|
+
displayNext(): void {
|
|
134
|
+
this.$emit("displayNext");
|
|
139
135
|
},
|
|
140
|
-
handleSeeMoreButton(event: { preventDefault: () => void
|
|
141
|
-
if(
|
|
136
|
+
handleSeeMoreButton(event: { preventDefault: () => void }) {
|
|
137
|
+
if (
|
|
138
|
+
!this.rubriqueId ||
|
|
139
|
+
0 === this.rubriqueId.length ||
|
|
140
|
+
this.noRubriquageId.length
|
|
141
|
+
) {
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
event.preventDefault();
|
|
145
145
|
const rubriqueChosenId = this.rubriqueId[this.rubriqueId.length - 1];
|
|
146
146
|
let filterToAdd: RubriquageFilter = {
|
|
147
|
-
rubriquageId: 0,
|
|
148
|
-
rubriqueId: rubriqueChosenId,
|
|
149
|
-
nameRubriquage:
|
|
150
|
-
nameRubrique:
|
|
147
|
+
rubriquageId: 0,
|
|
148
|
+
rubriqueId: rubriqueChosenId,
|
|
149
|
+
nameRubriquage: "",
|
|
150
|
+
nameRubrique: "",
|
|
151
151
|
};
|
|
152
|
-
if(this.filterRubriquage.length){
|
|
152
|
+
if (this.filterRubriquage.length) {
|
|
153
153
|
for (let i = 0, len = this.filterRubriquage.length; i < len; i++) {
|
|
154
|
-
const rubriqueChosen =
|
|
155
|
-
|
|
154
|
+
const rubriqueChosen = this.filterRubriquage[i].rubriques.find(
|
|
155
|
+
(element: Rubrique) => element.rubriqueId === rubriqueChosenId,
|
|
156
|
+
);
|
|
157
|
+
if (rubriqueChosen) {
|
|
156
158
|
filterToAdd = {
|
|
157
|
-
rubriquageId: this.filterRubriquage[i].rubriquageId??0,
|
|
158
|
-
rubriqueId: rubriqueChosenId,
|
|
159
|
-
nameRubriquage:
|
|
160
|
-
nameRubrique: rubriqueChosen.name
|
|
159
|
+
rubriquageId: this.filterRubriquage[i].rubriquageId ?? 0,
|
|
160
|
+
rubriqueId: rubriqueChosenId,
|
|
161
|
+
nameRubriquage: this.filterRubriquage[i].title,
|
|
162
|
+
nameRubrique: rubriqueChosen.name,
|
|
161
163
|
};
|
|
162
164
|
break;
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
|
-
const newFilter: Array<RubriquageFilter> = Array.from(
|
|
168
|
+
const newFilter: Array<RubriquageFilter> = Array.from(
|
|
169
|
+
this.filterRubrique,
|
|
170
|
+
);
|
|
167
171
|
newFilter.push(filterToAdd);
|
|
168
172
|
this.filterUpdateRubrique(newFilter);
|
|
169
173
|
const queries = this.$route.query;
|
|
170
|
-
const queryString = newFilter
|
|
171
|
-
|
|
174
|
+
const queryString = newFilter
|
|
175
|
+
.map((value) => value.rubriquageId + ":" + value.rubriqueId)
|
|
176
|
+
.join();
|
|
177
|
+
this.$router.push({
|
|
178
|
+
name: "podcasts",
|
|
179
|
+
query: { ...queries, ...{ rubriquesId: queryString } },
|
|
180
|
+
});
|
|
172
181
|
},
|
|
173
182
|
},
|
|
174
|
-
})
|
|
183
|
+
});
|
|
175
184
|
</script>
|
|
176
185
|
<style lang="scss">
|
|
177
186
|
.octopus-app .podcast-inline-container {
|
|
@@ -182,4 +191,4 @@ export default defineComponent({
|
|
|
182
191
|
padding: 1rem 0;
|
|
183
192
|
}
|
|
184
193
|
}
|
|
185
|
-
</style>
|
|
194
|
+
</style>
|