@saooti/octopus-sdk 37.0.5 → 37.0.7
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.html +1 -0
- package/index.ts +21 -21
- package/package.json +26 -20
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +1 -1
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/montserrat/Montserrat-Black.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Bold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Italic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Light.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Medium.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Regular.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Thin.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
- package/public/css/fonts/montserrat/style.css +28 -0
- package/public/css/fonts/style.css +5 -5
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/bootstrap.scss +9 -0
- package/src/assets/general.scss +1 -1
- package/src/assets/share.scss +1 -1
- 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 +122 -110
- 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 +111 -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 -76
- 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 -138
- 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 +63 -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 +25 -27
- package/src/components/display/sharing/ShareButtonsIntern.vue +182 -155
- 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} +94 -109
- package/src/components/misc/AcpmImage.vue +26 -0
- package/src/components/misc/ClassicAccordion.vue +69 -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 +67 -64
- 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 +161 -115
- 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 +66 -62
- 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 +263 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +323 -324
- package/src/locale/es.ts +325 -318
- package/src/locale/fr.ts +330 -324
- package/src/locale/it.ts +332 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +315 -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 +24 -16
- 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 -21
- 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 -10
- 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 -165
- 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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="mt-3 emission-item-container"
|
|
4
|
-
>
|
|
2
|
+
<div class="mt-3 emission-item-container">
|
|
5
3
|
<router-link
|
|
6
4
|
:to="{
|
|
7
5
|
name: 'emission',
|
|
@@ -16,9 +14,9 @@
|
|
|
16
14
|
width="330"
|
|
17
15
|
height="330"
|
|
18
16
|
class="img-box"
|
|
19
|
-
:title="$t('Emission name image', {name:emission.name})"
|
|
20
|
-
:alt="$t('Emission name image', {name:emission.name})"
|
|
21
|
-
|
|
17
|
+
:title="$t('Emission name image', { name: emission.name })"
|
|
18
|
+
:alt="$t('Emission name image', { name: emission.name })"
|
|
19
|
+
/>
|
|
22
20
|
<div class="emission-item-text">
|
|
23
21
|
<div class="d-flex align-items-center emission-name">
|
|
24
22
|
<span
|
|
@@ -35,9 +33,9 @@
|
|
|
35
33
|
<!-- eslint-disable vue/no-v-html -->
|
|
36
34
|
<div
|
|
37
35
|
ref="descriptionEmission"
|
|
38
|
-
v-html="urlify(emission.description|| '')"
|
|
36
|
+
v-html="urlify(emission.description || '')"
|
|
39
37
|
/>
|
|
40
|
-
|
|
38
|
+
<!-- eslint-enable -->
|
|
41
39
|
</div>
|
|
42
40
|
<router-link
|
|
43
41
|
v-if="!isPodcastmaker"
|
|
@@ -56,21 +54,21 @@
|
|
|
56
54
|
</template>
|
|
57
55
|
|
|
58
56
|
<script lang="ts">
|
|
59
|
-
import { orgaComputed } from
|
|
60
|
-
import { Emission } from
|
|
61
|
-
import { state } from
|
|
62
|
-
import octopusApi from
|
|
63
|
-
import imageProxy from
|
|
64
|
-
import displayMethods from
|
|
65
|
-
import { defineComponent } from
|
|
66
|
-
import { Podcast } from
|
|
57
|
+
import { orgaComputed } from "../../mixins/orgaComputed";
|
|
58
|
+
import { Emission } from "@/stores/class/general/emission";
|
|
59
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
60
|
+
import octopusApi from "@saooti/octopus-api";
|
|
61
|
+
import imageProxy from "../../mixins/imageProxy";
|
|
62
|
+
import displayMethods from "../../mixins/displayMethods";
|
|
63
|
+
import { defineComponent } from "vue";
|
|
64
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
67
65
|
export default defineComponent({
|
|
68
|
-
name:
|
|
66
|
+
name: "EmissionItem",
|
|
69
67
|
|
|
70
68
|
mixins: [displayMethods, orgaComputed, imageProxy],
|
|
71
69
|
|
|
72
70
|
props: {
|
|
73
|
-
emission: { default: ()=>({}), type: Object as ()=> Emission},
|
|
71
|
+
emission: { default: () => ({}), type: Object as () => Emission },
|
|
74
72
|
},
|
|
75
73
|
|
|
76
74
|
data() {
|
|
@@ -78,46 +76,60 @@ export default defineComponent({
|
|
|
78
76
|
activeEmission: true as boolean,
|
|
79
77
|
};
|
|
80
78
|
},
|
|
81
|
-
|
|
79
|
+
|
|
82
80
|
computed: {
|
|
83
81
|
isPodcastmaker(): boolean {
|
|
84
|
-
return
|
|
82
|
+
return state.generalParameters.podcastmaker as boolean;
|
|
85
83
|
},
|
|
86
84
|
organisation(): string {
|
|
87
|
-
return this.emission?.publisher?.organisation?.name ??
|
|
85
|
+
return this.emission?.publisher?.organisation?.name ?? "";
|
|
88
86
|
},
|
|
89
87
|
editRight(): boolean {
|
|
90
|
-
return (
|
|
88
|
+
return (
|
|
89
|
+
(true === this.authenticated &&
|
|
90
|
+
this.myOrganisationId === this.emission.orga.id) ||
|
|
91
91
|
true === state.generalParameters.isAdmin
|
|
92
|
+
);
|
|
92
93
|
},
|
|
93
94
|
},
|
|
94
95
|
|
|
95
96
|
created() {
|
|
96
|
-
if(!this.editRight)return;
|
|
97
|
+
if (!this.editRight) return;
|
|
97
98
|
this.hasPodcast();
|
|
98
99
|
},
|
|
99
100
|
mounted() {
|
|
100
|
-
const emissionDesc =
|
|
101
|
-
const emissionDescContainer =
|
|
101
|
+
const emissionDesc = this.$refs.descriptionEmission as HTMLElement;
|
|
102
|
+
const emissionDescContainer = this.$refs
|
|
103
|
+
.descriptionEmissionContainer as HTMLElement;
|
|
102
104
|
if (
|
|
103
|
-
null !== emissionDesc &&
|
|
105
|
+
null !== emissionDesc &&
|
|
106
|
+
null !== emissionDescContainer &&
|
|
104
107
|
emissionDesc.clientHeight > emissionDescContainer.clientHeight
|
|
105
108
|
) {
|
|
106
|
-
emissionDescContainer.classList.add(
|
|
109
|
+
emissionDescContainer.classList.add("after-emission-description");
|
|
107
110
|
}
|
|
108
111
|
},
|
|
109
112
|
methods: {
|
|
110
113
|
async hasPodcast(): Promise<void> {
|
|
111
|
-
const data = await octopusApi.fetchDataWithParams<{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const data = await octopusApi.fetchDataWithParams<{
|
|
115
|
+
count: number;
|
|
116
|
+
result: Array<Podcast>;
|
|
117
|
+
sort: string;
|
|
118
|
+
}>(
|
|
119
|
+
0,
|
|
120
|
+
"podcast/search",
|
|
121
|
+
{
|
|
122
|
+
emissionId: this.emission.emissionId,
|
|
123
|
+
first: 0,
|
|
124
|
+
size: 0,
|
|
125
|
+
includeStatus: ["READY", "PROCESSING"],
|
|
126
|
+
},
|
|
127
|
+
true,
|
|
128
|
+
);
|
|
117
129
|
if (0 === data.count) {
|
|
118
130
|
this.activeEmission = false;
|
|
119
131
|
}
|
|
120
132
|
},
|
|
121
133
|
},
|
|
122
|
-
})
|
|
123
|
-
</script>
|
|
134
|
+
});
|
|
135
|
+
</script>
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
v-model:first="dfirst"
|
|
5
5
|
v-model:rowsPerPage="dsize"
|
|
6
6
|
v-model:isMobile="isMobile"
|
|
7
|
-
:text-count="
|
|
7
|
+
:text-count="
|
|
8
|
+
showCount && emissions.length > 1
|
|
9
|
+
? $t('Number emissions', { nb: displayCount }) + sortText
|
|
10
|
+
: undefined
|
|
11
|
+
"
|
|
8
12
|
:total-count="totalCount"
|
|
9
13
|
:loading="loading"
|
|
10
|
-
:loading-text="loading
|
|
14
|
+
:loading-text="loading ? $t('Loading emissions ...') : undefined"
|
|
11
15
|
>
|
|
12
16
|
<template #list>
|
|
13
17
|
<div
|
|
@@ -15,27 +19,18 @@
|
|
|
15
19
|
class="emission-list"
|
|
16
20
|
:class="smallItems ? 'three-emissions' : 'two-emissions'"
|
|
17
21
|
>
|
|
18
|
-
<template
|
|
19
|
-
v-
|
|
20
|
-
:key="e.emissionId"
|
|
21
|
-
>
|
|
22
|
-
<EmissionItem
|
|
23
|
-
v-if="0!==e.emissionId"
|
|
24
|
-
:emission="e"
|
|
25
|
-
/>
|
|
22
|
+
<template v-for="e in displayArray" :key="e.emissionId">
|
|
23
|
+
<EmissionItem v-if="0 !== e.emissionId" :emission="e" />
|
|
26
24
|
</template>
|
|
27
25
|
</div>
|
|
28
26
|
<div
|
|
29
27
|
v-else
|
|
30
|
-
v-show="(displayRubriquage && rubriques)
|
|
28
|
+
v-show="(displayRubriquage && rubriques) || !displayRubriquage"
|
|
31
29
|
class="d-flex flex-wrap justify-content-around"
|
|
32
30
|
>
|
|
33
|
-
<template
|
|
34
|
-
v-for="e in displayArray"
|
|
35
|
-
:key="e.emissionId"
|
|
36
|
-
>
|
|
31
|
+
<template v-for="e in displayArray" :key="e.emissionId">
|
|
37
32
|
<EmissionPlayerItem
|
|
38
|
-
v-if="0!==e.emissionId"
|
|
33
|
+
v-if="0 !== e.emissionId"
|
|
39
34
|
:emission="e"
|
|
40
35
|
class="m-3 flex-shrink-0"
|
|
41
36
|
:class="mainRubriquage(e)"
|
|
@@ -48,27 +43,29 @@
|
|
|
48
43
|
</template>
|
|
49
44
|
|
|
50
45
|
<script lang="ts">
|
|
51
|
-
import ListPaginate from
|
|
52
|
-
import octopusApi from
|
|
53
|
-
import { handle403 } from
|
|
54
|
-
import { state } from
|
|
55
|
-
import { Emission, emptyEmissionData } from
|
|
56
|
-
import { Rubrique } from
|
|
57
|
-
import { defineComponent, defineAsyncComponent } from
|
|
58
|
-
import { FetchParam } from
|
|
59
|
-
import { AxiosError } from
|
|
60
|
-
import { Rubriquage } from
|
|
61
|
-
import { useFilterStore } from
|
|
62
|
-
import { mapState } from
|
|
63
|
-
const EmissionItem = defineAsyncComponent(() => import(
|
|
64
|
-
const EmissionPlayerItem = defineAsyncComponent(
|
|
46
|
+
import ListPaginate from "../list/ListPaginate.vue";
|
|
47
|
+
import octopusApi from "@saooti/octopus-api";
|
|
48
|
+
import { handle403 } from "../../mixins/handle403";
|
|
49
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
50
|
+
import { Emission, emptyEmissionData } from "@/stores/class/general/emission";
|
|
51
|
+
import { Rubrique } from "@/stores/class/rubrique/rubrique";
|
|
52
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
53
|
+
import { FetchParam } from "@/stores/class/general/fetchParam";
|
|
54
|
+
import { AxiosError } from "axios";
|
|
55
|
+
import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
|
|
56
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
57
|
+
import { mapState } from "pinia";
|
|
58
|
+
const EmissionItem = defineAsyncComponent(() => import("./EmissionItem.vue"));
|
|
59
|
+
const EmissionPlayerItem = defineAsyncComponent(
|
|
60
|
+
() => import("./EmissionPlayerItem.vue"),
|
|
61
|
+
);
|
|
65
62
|
export default defineComponent({
|
|
66
|
-
name:
|
|
63
|
+
name: "EmissionList",
|
|
67
64
|
|
|
68
65
|
components: {
|
|
69
66
|
EmissionItem,
|
|
70
67
|
EmissionPlayerItem,
|
|
71
|
-
ListPaginate
|
|
68
|
+
ListPaginate,
|
|
72
69
|
},
|
|
73
70
|
|
|
74
71
|
mixins: [handle403],
|
|
@@ -76,18 +73,18 @@ export default defineComponent({
|
|
|
76
73
|
props: {
|
|
77
74
|
first: { default: 0, type: Number },
|
|
78
75
|
size: { default: 30, type: Number },
|
|
79
|
-
query: { default: undefined, type: String},
|
|
76
|
+
query: { default: undefined, type: String },
|
|
80
77
|
iabId: { default: undefined, type: Number },
|
|
81
|
-
organisationId: { default: undefined, type: String},
|
|
82
|
-
monetization: { default:
|
|
83
|
-
before: { default: undefined, type: String},
|
|
84
|
-
after: { default: undefined, type: String},
|
|
85
|
-
sort: { default:
|
|
78
|
+
organisationId: { default: undefined, type: String },
|
|
79
|
+
monetization: { default: "UNDEFINED", type: String },
|
|
80
|
+
before: { default: undefined, type: String },
|
|
81
|
+
after: { default: undefined, type: String },
|
|
82
|
+
sort: { default: "DATE", type: String },
|
|
86
83
|
showCount: { default: false, type: Boolean },
|
|
87
84
|
includeHidden: { default: false, type: Boolean },
|
|
88
|
-
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
89
|
-
rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
|
|
90
|
-
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
85
|
+
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
86
|
+
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
87
|
+
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
91
88
|
},
|
|
92
89
|
|
|
93
90
|
data() {
|
|
@@ -98,26 +95,29 @@ export default defineComponent({
|
|
|
98
95
|
totalCount: 0 as number,
|
|
99
96
|
displayCount: 0 as number,
|
|
100
97
|
emissions: [] as Array<Emission>,
|
|
101
|
-
rubriques: undefined as Array<Rubrique
|
|
98
|
+
rubriques: undefined as Array<Rubrique> | undefined,
|
|
102
99
|
isMobile: false as boolean,
|
|
103
100
|
};
|
|
104
101
|
},
|
|
105
102
|
|
|
106
103
|
computed: {
|
|
107
|
-
...mapState(useFilterStore, [
|
|
108
|
-
displayArray(): Array<Emission>{
|
|
109
|
-
if(this.isMobile){
|
|
104
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
105
|
+
displayArray(): Array<Emission> {
|
|
106
|
+
if (this.isMobile) {
|
|
110
107
|
return this.emissions;
|
|
111
108
|
}
|
|
112
|
-
return this.emissions.slice(
|
|
113
|
-
|
|
109
|
+
return this.emissions.slice(
|
|
110
|
+
this.dfirst,
|
|
111
|
+
Math.min(this.dfirst + this.dsize, this.totalCount),
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
114
|
smallItems(): boolean {
|
|
115
|
-
return
|
|
115
|
+
return state.emissionsPage.smallItems as boolean;
|
|
116
116
|
},
|
|
117
117
|
itemPlayer(): boolean {
|
|
118
|
-
return
|
|
118
|
+
return state.emissionsPage.itemPlayer as boolean;
|
|
119
119
|
},
|
|
120
|
-
displayRubriquage(): number|undefined {
|
|
120
|
+
displayRubriquage(): number | undefined {
|
|
121
121
|
return state.emissionsPage.rubriquage;
|
|
122
122
|
},
|
|
123
123
|
changed(): string {
|
|
@@ -126,32 +126,35 @@ export default defineComponent({
|
|
|
126
126
|
},
|
|
127
127
|
sortText(): string {
|
|
128
128
|
switch (this.sort) {
|
|
129
|
-
case
|
|
130
|
-
return " "+this.$t(
|
|
131
|
-
case
|
|
132
|
-
return " "+this.$t(
|
|
133
|
-
case
|
|
134
|
-
return " "+this.$t(
|
|
129
|
+
case "SCORE":
|
|
130
|
+
return " " + this.$t("sort by score");
|
|
131
|
+
case "LAST_PODCAST_DESC":
|
|
132
|
+
return " " + this.$t("sort by date");
|
|
133
|
+
case "NAME":
|
|
134
|
+
return " " + this.$t("sort by alphabetical");
|
|
135
135
|
default:
|
|
136
|
-
return " "+this.$t(
|
|
136
|
+
return " " + this.$t("sort by date");
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
organisation(): string|undefined {
|
|
140
|
-
return this.organisationId ?this.organisationId:this.filterOrgaId;
|
|
139
|
+
organisation(): string | undefined {
|
|
140
|
+
return this.organisationId ? this.organisationId : this.filterOrgaId;
|
|
141
141
|
},
|
|
142
142
|
},
|
|
143
143
|
watch: {
|
|
144
144
|
changed(): void {
|
|
145
145
|
this.reloadList();
|
|
146
146
|
},
|
|
147
|
-
dsize():void{
|
|
147
|
+
dsize(): void {
|
|
148
148
|
this.reloadList();
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
},
|
|
150
|
+
dfirst(): void {
|
|
151
|
+
if (
|
|
152
|
+
!this.emissions[this.dfirst] ||
|
|
153
|
+
0 === this.emissions[this.dfirst].emissionId
|
|
154
|
+
) {
|
|
155
|
+
this.fetchContent(false);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
155
158
|
},
|
|
156
159
|
|
|
157
160
|
mounted() {
|
|
@@ -161,7 +164,7 @@ export default defineComponent({
|
|
|
161
164
|
}
|
|
162
165
|
},
|
|
163
166
|
methods: {
|
|
164
|
-
reloadList(){
|
|
167
|
+
reloadList() {
|
|
165
168
|
this.dfirst = 0;
|
|
166
169
|
this.fetchContent(true);
|
|
167
170
|
},
|
|
@@ -177,46 +180,69 @@ export default defineComponent({
|
|
|
177
180
|
before: this.before,
|
|
178
181
|
after: this.after,
|
|
179
182
|
sort: this.sort,
|
|
180
|
-
noRubriquageId: this.noRubriquageId.length
|
|
183
|
+
noRubriquageId: this.noRubriquageId.length
|
|
184
|
+
? this.noRubriquageId
|
|
185
|
+
: undefined,
|
|
181
186
|
rubriqueId: this.rubriqueId.length ? this.rubriqueId : undefined,
|
|
182
187
|
rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
|
|
183
|
-
includeHidden:this.includeHidden,
|
|
188
|
+
includeHidden: this.includeHidden,
|
|
184
189
|
};
|
|
185
190
|
try {
|
|
186
|
-
const data = await octopusApi.fetchDataWithParams<{
|
|
191
|
+
const data = await octopusApi.fetchDataWithParams<{
|
|
192
|
+
count: number;
|
|
193
|
+
result: Array<Emission>;
|
|
194
|
+
sort: string;
|
|
195
|
+
}>(0, "emission/search", param, true);
|
|
187
196
|
this.afterFetching(reset, data);
|
|
188
197
|
} catch (error) {
|
|
189
|
-
this.handle403(
|
|
198
|
+
this.handle403(error as AxiosError);
|
|
190
199
|
}
|
|
191
200
|
},
|
|
192
|
-
afterFetching(
|
|
201
|
+
afterFetching(
|
|
202
|
+
reset: boolean,
|
|
203
|
+
data: { count: number; result: Array<Emission>; sort: string },
|
|
204
|
+
): void {
|
|
193
205
|
if (reset) {
|
|
194
206
|
this.emissions.length = 0;
|
|
195
207
|
}
|
|
196
|
-
if(this.dfirst > this.emissions.length){
|
|
197
|
-
for (
|
|
208
|
+
if (this.dfirst > this.emissions.length) {
|
|
209
|
+
for (
|
|
210
|
+
let i = this.emissions.length - 1, len = this.dfirst + this.dsize;
|
|
211
|
+
i < len;
|
|
212
|
+
i++
|
|
213
|
+
) {
|
|
198
214
|
this.emissions.push(emptyEmissionData());
|
|
199
215
|
}
|
|
200
216
|
}
|
|
201
217
|
this.displayCount = data.count;
|
|
202
|
-
const responseEmissions = data.result.filter((e: Emission|null) => {
|
|
218
|
+
const responseEmissions = data.result.filter((e: Emission | null) => {
|
|
203
219
|
if (null === e) {
|
|
204
220
|
this.displayCount--;
|
|
205
221
|
}
|
|
206
222
|
return null !== e;
|
|
207
223
|
});
|
|
208
|
-
this.emissions = this.emissions
|
|
224
|
+
this.emissions = this.emissions
|
|
225
|
+
.slice(0, this.dfirst)
|
|
226
|
+
.concat(responseEmissions)
|
|
227
|
+
.concat(
|
|
228
|
+
this.emissions.slice(this.dfirst + this.dsize, this.emissions.length),
|
|
229
|
+
);
|
|
209
230
|
this.totalCount = data.count;
|
|
210
231
|
this.loading = false;
|
|
211
232
|
},
|
|
212
233
|
async fetchRubriques(): Promise<void> {
|
|
213
|
-
const data = await octopusApi.fetchData<Rubriquage>(
|
|
234
|
+
const data = await octopusApi.fetchData<Rubriquage>(
|
|
235
|
+
0,
|
|
236
|
+
"rubriquage/" + this.displayRubriquage,
|
|
237
|
+
);
|
|
214
238
|
this.rubriques = data.rubriques;
|
|
215
239
|
},
|
|
216
240
|
mainRubriquage(emission: Emission): string {
|
|
217
|
-
return emission.rubriqueIds?.[0] === state.emissionsPage.mainRubrique
|
|
241
|
+
return emission.rubriqueIds?.[0] === state.emissionsPage.mainRubrique
|
|
242
|
+
? "partenaireRubrique"
|
|
243
|
+
: "";
|
|
218
244
|
},
|
|
219
|
-
rubriquesId(emission: Emission): string|undefined {
|
|
245
|
+
rubriquesId(emission: Emission): string | undefined {
|
|
220
246
|
if (
|
|
221
247
|
!this.displayRubriquage ||
|
|
222
248
|
!emission.rubriqueIds ||
|
|
@@ -226,11 +252,13 @@ export default defineComponent({
|
|
|
226
252
|
)
|
|
227
253
|
return undefined;
|
|
228
254
|
const rubrique = this.rubriques.find(
|
|
229
|
-
(element: Rubrique) => element.rubriqueId === emission.rubriqueIds[0]
|
|
255
|
+
(element: Rubrique) => element.rubriqueId === emission.rubriqueIds[0],
|
|
230
256
|
);
|
|
231
|
-
if(!rubrique){
|
|
257
|
+
if (!rubrique) {
|
|
258
|
+
return undefined;
|
|
259
|
+
}
|
|
232
260
|
return rubrique.name;
|
|
233
261
|
},
|
|
234
262
|
},
|
|
235
|
-
})
|
|
236
|
-
</script>
|
|
263
|
+
});
|
|
264
|
+
</script>
|