@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
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="isProgressBar"
|
|
4
|
-
class="d-flex align-items-center podcast-play-bar"
|
|
5
|
-
>
|
|
2
|
+
<div v-if="isProgressBar" class="d-flex align-items-center podcast-play-bar">
|
|
6
3
|
<div class="me-2">
|
|
7
4
|
{{ playedTime }}
|
|
8
5
|
</div>
|
|
@@ -20,57 +17,73 @@
|
|
|
20
17
|
</template>
|
|
21
18
|
|
|
22
19
|
<script lang="ts">
|
|
23
|
-
import ProgressBar from
|
|
24
|
-
import DurationHelper from
|
|
25
|
-
import displayMethods from
|
|
26
|
-
import { state } from
|
|
27
|
-
import { usePlayerStore } from
|
|
28
|
-
import { mapState, mapActions } from
|
|
29
|
-
import { defineComponent } from
|
|
20
|
+
import ProgressBar from "../../misc/ProgressBar.vue";
|
|
21
|
+
import DurationHelper from "../../../helper/duration";
|
|
22
|
+
import displayMethods from "../../mixins/displayMethods";
|
|
23
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
24
|
+
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
25
|
+
import { mapState, mapActions } from "pinia";
|
|
26
|
+
import { defineComponent } from "vue";
|
|
30
27
|
export default defineComponent({
|
|
31
|
-
name:
|
|
32
|
-
components:{
|
|
33
|
-
ProgressBar
|
|
28
|
+
name: "PodcastPlayBar",
|
|
29
|
+
components: {
|
|
30
|
+
ProgressBar,
|
|
34
31
|
},
|
|
35
32
|
mixins: [displayMethods],
|
|
36
33
|
props: {
|
|
37
|
-
podcastId: { default: undefined, type: Number},
|
|
38
|
-
duration: { default: 0, type: Number},
|
|
34
|
+
podcastId: { default: undefined, type: Number },
|
|
35
|
+
duration: { default: 0, type: Number },
|
|
39
36
|
},
|
|
40
37
|
computed: {
|
|
41
|
-
...mapState(usePlayerStore, [
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
...mapState(usePlayerStore, [
|
|
39
|
+
"playerPodcast",
|
|
40
|
+
"playerElapsed",
|
|
41
|
+
"playerTotal",
|
|
42
|
+
]),
|
|
43
|
+
isProgressBar(): boolean {
|
|
44
|
+
return state.emissionsPage.progressBar as boolean;
|
|
44
45
|
},
|
|
45
|
-
percentProgress(): number{
|
|
46
|
-
if(this.podcastId !== this.playerPodcast?.podcastId){
|
|
46
|
+
percentProgress(): number {
|
|
47
|
+
if (this.podcastId !== this.playerPodcast?.podcastId) {
|
|
47
48
|
return 0;
|
|
48
49
|
}
|
|
49
50
|
return !this.playerElapsed ? 0 : this.playerElapsed * 100;
|
|
50
51
|
},
|
|
51
|
-
playedTime(): string{
|
|
52
|
-
if(this.podcastId === this.playerPodcast?.podcastId){
|
|
53
|
-
if (
|
|
54
|
-
|
|
52
|
+
playedTime(): string {
|
|
53
|
+
if (this.podcastId === this.playerPodcast?.podcastId) {
|
|
54
|
+
if (
|
|
55
|
+
this.playerElapsed &&
|
|
56
|
+
this.playerElapsed > 0 &&
|
|
57
|
+
this.playerTotal &&
|
|
58
|
+
this.playerTotal > 0
|
|
59
|
+
) {
|
|
60
|
+
return DurationHelper.formatDuration(
|
|
61
|
+
Math.round(this.playerElapsed * this.playerTotal),
|
|
62
|
+
);
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
|
-
return
|
|
65
|
+
return "00:00";
|
|
58
66
|
},
|
|
59
67
|
totalTime(): string {
|
|
60
|
-
return DurationHelper.formatDuration(Math.round(this.duration/1000));
|
|
68
|
+
return DurationHelper.formatDuration(Math.round(this.duration / 1000));
|
|
61
69
|
},
|
|
62
70
|
},
|
|
63
71
|
methods: {
|
|
64
|
-
...mapActions(usePlayerStore, [
|
|
72
|
+
...mapActions(usePlayerStore, ["playerUpdateSeekTime"]),
|
|
65
73
|
seekTo(event: MouseEvent): void {
|
|
66
|
-
if(
|
|
74
|
+
if (
|
|
75
|
+
!this.playerPodcast ||
|
|
76
|
+
this.podcastId !== this.playerPodcast.podcastId
|
|
77
|
+
) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
67
80
|
const rect = (event.currentTarget as Element).getBoundingClientRect();
|
|
68
81
|
const barWidth = (event.currentTarget as Element).clientWidth;
|
|
69
82
|
const x = event.clientX - rect.left;
|
|
70
83
|
const percentPosition = x / barWidth;
|
|
71
84
|
if (percentPosition * 100 >= this.percentLiveProgress) return;
|
|
72
85
|
this.playerUpdateSeekTime(this.playerTotal * percentPosition);
|
|
73
|
-
}
|
|
86
|
+
},
|
|
74
87
|
},
|
|
75
|
-
})
|
|
76
|
-
</script>
|
|
88
|
+
});
|
|
89
|
+
</script>
|
|
@@ -10,19 +10,16 @@
|
|
|
10
10
|
:iab-id="iabId"
|
|
11
11
|
:rubrique-id="rubriqueId"
|
|
12
12
|
:no-rubriquage-id="noRubriquageId"
|
|
13
|
-
@
|
|
14
|
-
@
|
|
13
|
+
@sort-chrono="sortChrono"
|
|
14
|
+
@sort-popular="sortPopular"
|
|
15
15
|
>
|
|
16
16
|
<template #list-inline>
|
|
17
17
|
<ClassicLoading
|
|
18
18
|
class="loading-size"
|
|
19
|
-
:loading-text="loading
|
|
19
|
+
:loading-text="loading ? $t('Loading podcasts ...') : undefined"
|
|
20
20
|
/>
|
|
21
|
-
<SwiperList
|
|
22
|
-
|
|
23
|
-
:list-object="allPodcasts"
|
|
24
|
-
>
|
|
25
|
-
<template #octopusSlide="{option}">
|
|
21
|
+
<SwiperList v-if="!loading" :list-object="allPodcasts">
|
|
22
|
+
<template #octopusSlide="{ option }">
|
|
26
23
|
<PodcastItem
|
|
27
24
|
class="flex-shrink-0 item-phone-margin"
|
|
28
25
|
:podcast="option"
|
|
@@ -34,41 +31,41 @@
|
|
|
34
31
|
</template>
|
|
35
32
|
|
|
36
33
|
<script lang="ts">
|
|
37
|
-
import PodcastInlineListTemplate from
|
|
38
|
-
import octopusApi from
|
|
39
|
-
import PodcastItem from
|
|
40
|
-
import ClassicLoading from
|
|
41
|
-
import SwiperList from
|
|
42
|
-
import { useFilterStore } from
|
|
43
|
-
import { mapState } from
|
|
44
|
-
import { Podcast } from
|
|
45
|
-
import { defineComponent } from
|
|
34
|
+
import PodcastInlineListTemplate from "./PodcastInlineListTemplate.vue";
|
|
35
|
+
import octopusApi from "@saooti/octopus-api";
|
|
36
|
+
import PodcastItem from "./PodcastItem.vue";
|
|
37
|
+
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
38
|
+
import SwiperList from "../list/SwiperList.vue";
|
|
39
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
40
|
+
import { mapState } from "pinia";
|
|
41
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
42
|
+
import { defineComponent } from "vue";
|
|
46
43
|
export default defineComponent({
|
|
47
|
-
name:
|
|
48
|
-
|
|
44
|
+
name: "PodcastSwiperList",
|
|
45
|
+
|
|
49
46
|
components: {
|
|
50
47
|
PodcastInlineListTemplate,
|
|
51
48
|
PodcastItem,
|
|
52
49
|
ClassicLoading,
|
|
53
|
-
SwiperList
|
|
50
|
+
SwiperList,
|
|
54
51
|
},
|
|
55
52
|
|
|
56
53
|
props: {
|
|
57
|
-
organisationId: { default: () => [], type: Array as ()=> Array<string>},
|
|
58
|
-
emissionId: { default: undefined, type: Number},
|
|
59
|
-
iabId: { default: undefined, type: Number},
|
|
60
|
-
title: { default:
|
|
61
|
-
href: { default: undefined, type: String},
|
|
62
|
-
buttonText: { default: undefined, type: String},
|
|
63
|
-
isArrow: { default: false, type: Boolean},
|
|
64
|
-
requirePopularSort: { default:undefined, type: Boolean},
|
|
65
|
-
buttonPlus: { default:false, type: Boolean},
|
|
66
|
-
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
67
|
-
rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
|
|
68
|
-
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
69
|
-
query: { default: undefined, type: String},
|
|
54
|
+
organisationId: { default: () => [], type: Array as () => Array<string> },
|
|
55
|
+
emissionId: { default: undefined, type: Number },
|
|
56
|
+
iabId: { default: undefined, type: Number },
|
|
57
|
+
title: { default: "", type: String },
|
|
58
|
+
href: { default: undefined, type: String },
|
|
59
|
+
buttonText: { default: undefined, type: String },
|
|
60
|
+
isArrow: { default: false, type: Boolean },
|
|
61
|
+
requirePopularSort: { default: undefined, type: Boolean },
|
|
62
|
+
buttonPlus: { default: false, type: Boolean },
|
|
63
|
+
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
64
|
+
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
65
|
+
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
66
|
+
query: { default: undefined, type: String },
|
|
70
67
|
},
|
|
71
|
-
emits: [
|
|
68
|
+
emits: ["update:isArrow"],
|
|
72
69
|
|
|
73
70
|
data() {
|
|
74
71
|
return {
|
|
@@ -78,14 +75,14 @@ export default defineComponent({
|
|
|
78
75
|
};
|
|
79
76
|
},
|
|
80
77
|
computed: {
|
|
81
|
-
...mapState(useFilterStore, [
|
|
78
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
82
79
|
organisation(): Array<string> {
|
|
83
|
-
if(this.organisationId.length){
|
|
80
|
+
if (this.organisationId.length) {
|
|
84
81
|
return this.organisationId;
|
|
85
82
|
}
|
|
86
83
|
return this.filterOrgaId ? [this.filterOrgaId] : [];
|
|
87
84
|
},
|
|
88
|
-
watchVariable():string{
|
|
85
|
+
watchVariable(): string {
|
|
89
86
|
return `${this.emissionId}|${this.organisationId}|${this.filterOrgaId}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
|
|
90
87
|
},
|
|
91
88
|
},
|
|
@@ -95,13 +92,13 @@ export default defineComponent({
|
|
|
95
92
|
this.fetchNext();
|
|
96
93
|
},
|
|
97
94
|
},
|
|
98
|
-
|
|
95
|
+
|
|
99
96
|
created() {
|
|
100
97
|
if (undefined !== this.requirePopularSort) {
|
|
101
98
|
this.popularSort = this.requirePopularSort;
|
|
102
99
|
}
|
|
103
100
|
if (undefined !== this.isArrow) {
|
|
104
|
-
this.$emit(
|
|
101
|
+
this.$emit("update:isArrow", true);
|
|
105
102
|
}
|
|
106
103
|
},
|
|
107
104
|
mounted() {
|
|
@@ -109,21 +106,34 @@ export default defineComponent({
|
|
|
109
106
|
},
|
|
110
107
|
methods: {
|
|
111
108
|
async fetchNext(): Promise<void> {
|
|
112
|
-
const data = await octopusApi.fetchDataWithParams<{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
const data = await octopusApi.fetchDataWithParams<{
|
|
110
|
+
count: number;
|
|
111
|
+
result: Array<Podcast>;
|
|
112
|
+
sort: string;
|
|
113
|
+
}>(
|
|
114
|
+
0,
|
|
115
|
+
"podcast/search",
|
|
116
|
+
{
|
|
117
|
+
first: 0,
|
|
118
|
+
size: 10,
|
|
119
|
+
organisationId: this.organisation,
|
|
120
|
+
emissionId: this.emissionId,
|
|
121
|
+
iabId: this.iabId,
|
|
122
|
+
rubriqueId: this.rubriqueId.length ? this.rubriqueId : undefined,
|
|
123
|
+
rubriquageId: this.rubriquageId.length
|
|
124
|
+
? this.rubriquageId
|
|
125
|
+
: undefined,
|
|
126
|
+
noRubriquageId: this.noRubriquageId.length
|
|
127
|
+
? this.noRubriquageId
|
|
128
|
+
: undefined,
|
|
129
|
+
sort: this.popularSort ? "POPULARITY" : "DATE",
|
|
130
|
+
query: this.query,
|
|
131
|
+
includeStatus: ["READY", "PROCESSING"],
|
|
132
|
+
},
|
|
133
|
+
true,
|
|
134
|
+
);
|
|
125
135
|
this.allPodcasts = this.allPodcasts.concat(
|
|
126
|
-
data.result.filter((pod: Podcast|null) => null !== pod)
|
|
136
|
+
data.result.filter((pod: Podcast | null) => null !== pod),
|
|
127
137
|
);
|
|
128
138
|
this.loading = false;
|
|
129
139
|
},
|
|
@@ -144,5 +154,5 @@ export default defineComponent({
|
|
|
144
154
|
this.allPodcasts.length = 0;
|
|
145
155
|
},
|
|
146
156
|
},
|
|
147
|
-
})
|
|
148
|
-
</script>
|
|
157
|
+
});
|
|
158
|
+
</script>
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-if="undefined !== tagList && 0!==tagList.length"
|
|
3
|
+
v-if="undefined !== tagList && 0 !== tagList.length"
|
|
4
4
|
class="tag-list-component d-flex align-items-center flex-wrap"
|
|
5
5
|
>
|
|
6
6
|
<div>
|
|
7
|
-
{{ $t(
|
|
7
|
+
{{ $t("Podcast tags") + ": " }}
|
|
8
8
|
</div>
|
|
9
|
-
<div
|
|
10
|
-
v-for="(tag, index) in tagList"
|
|
11
|
-
:key="tag"
|
|
12
|
-
class="tag-list-element"
|
|
13
|
-
>
|
|
9
|
+
<div v-for="(tag, index) in tagList" :key="tag" class="tag-list-element">
|
|
14
10
|
<div
|
|
15
|
-
:id="'tag-list-from-podcast-page'+index"
|
|
11
|
+
:id="'tag-list-from-podcast-page' + index"
|
|
16
12
|
role="button"
|
|
17
13
|
class="d-flex align-items-center"
|
|
18
14
|
>
|
|
@@ -23,13 +19,13 @@
|
|
|
23
19
|
class="ouest-france-logo"
|
|
24
20
|
alt="Ouest France Logo"
|
|
25
21
|
src="/img/ouest_france_logo.svg"
|
|
26
|
-
|
|
22
|
+
/>
|
|
27
23
|
{{ formateOfTag(tag) }}
|
|
28
24
|
</div>
|
|
29
|
-
<
|
|
25
|
+
<ClassicPopover
|
|
30
26
|
v-if="isOuestFranceTag(tag)"
|
|
31
|
-
:target="'tag-list-from-podcast-page'+index"
|
|
32
|
-
:content="tag.substring(4,tag.length)"
|
|
27
|
+
:target="'tag-list-from-podcast-page' + index"
|
|
28
|
+
:content="tag.substring(4, tag.length)"
|
|
33
29
|
relative-class="page-element"
|
|
34
30
|
:is-fixed="true"
|
|
35
31
|
/>
|
|
@@ -38,38 +34,38 @@
|
|
|
38
34
|
</template>
|
|
39
35
|
|
|
40
36
|
<script lang="ts">
|
|
41
|
-
import
|
|
42
|
-
import tagOfMixins from
|
|
43
|
-
import { defineComponent } from
|
|
37
|
+
import ClassicPopover from "../../misc/ClassicPopover.vue";
|
|
38
|
+
import tagOfMixins from "../../mixins/tagOfMixins";
|
|
39
|
+
import { defineComponent } from "vue";
|
|
44
40
|
export default defineComponent({
|
|
45
|
-
name:
|
|
41
|
+
name: "TagList",
|
|
46
42
|
components: {
|
|
47
|
-
|
|
43
|
+
ClassicPopover,
|
|
48
44
|
},
|
|
49
|
-
mixins:[tagOfMixins],
|
|
45
|
+
mixins: [tagOfMixins],
|
|
50
46
|
props: {
|
|
51
|
-
tagList: { default: () => [], type: Array as ()=>Array<string>},
|
|
47
|
+
tagList: { default: () => [], type: Array as () => Array<string> },
|
|
52
48
|
},
|
|
53
|
-
})
|
|
49
|
+
});
|
|
54
50
|
</script>
|
|
55
51
|
|
|
56
52
|
<style lang="scss">
|
|
57
|
-
@import
|
|
58
|
-
.octopus-app{
|
|
59
|
-
.tag-list-component{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
@import "@scss/_variables.scss";
|
|
54
|
+
.octopus-app {
|
|
55
|
+
.tag-list-component {
|
|
56
|
+
.ouest-france-logo {
|
|
57
|
+
width: 20px;
|
|
58
|
+
height: 20px;
|
|
59
|
+
margin-right: 5px;
|
|
60
|
+
}
|
|
61
|
+
.tag-list-element {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
margin: 0.4rem;
|
|
65
|
+
padding: 0.2rem;
|
|
66
|
+
border: 1px solid #999;
|
|
67
|
+
border-radius: $octopus-borderradius;
|
|
68
|
+
}
|
|
64
69
|
}
|
|
65
|
-
.tag-list-element {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
margin: 0.4rem;
|
|
69
|
-
padding: 0.2rem;
|
|
70
|
-
border: 1px solid #999;
|
|
71
|
-
border-radius: $octopus-borderradius;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
70
|
}
|
|
75
|
-
</style>
|
|
71
|
+
</style>
|
|
@@ -13,57 +13,69 @@
|
|
|
13
13
|
:in-modal="inModal"
|
|
14
14
|
:is-disabled="isDisabled"
|
|
15
15
|
:no-deselect="noDeselect"
|
|
16
|
-
@
|
|
16
|
+
@on-search="onSearchRubrique"
|
|
17
17
|
@selected="onRubriqueSelected"
|
|
18
18
|
/>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import selenium from
|
|
23
|
-
import { Rubrique } from
|
|
24
|
-
import ClassicMultiselect from
|
|
25
|
-
import { defineComponent } from
|
|
22
|
+
import selenium from "../../mixins/selenium";
|
|
23
|
+
import { Rubrique } from "@/stores/class/rubrique/rubrique";
|
|
24
|
+
import ClassicMultiselect from "../../form/ClassicMultiselect.vue";
|
|
25
|
+
import { defineComponent } from "vue";
|
|
26
26
|
export default defineComponent({
|
|
27
27
|
components: {
|
|
28
28
|
ClassicMultiselect,
|
|
29
29
|
},
|
|
30
|
-
mixins:[selenium],
|
|
30
|
+
mixins: [selenium],
|
|
31
31
|
props: {
|
|
32
|
-
defaultanswer: { default:
|
|
33
|
-
width: { default:
|
|
32
|
+
defaultanswer: { default: "", type: String },
|
|
33
|
+
width: { default: "100%", type: String },
|
|
34
34
|
multiple: { default: false, type: Boolean },
|
|
35
35
|
reset: { default: false, type: Boolean },
|
|
36
|
-
allRubriques: { default: () => [], type: Array as ()=> Array<Rubrique> },
|
|
36
|
+
allRubriques: { default: () => [], type: Array as () => Array<Rubrique> },
|
|
37
37
|
rubriqueSelected: { default: undefined, type: Number },
|
|
38
|
-
rubriqueSelectedArray: {
|
|
38
|
+
rubriqueSelectedArray: {
|
|
39
|
+
default: undefined,
|
|
40
|
+
type: Object as () => Array<number>,
|
|
41
|
+
},
|
|
39
42
|
rubriquageId: { default: undefined, type: Number },
|
|
40
43
|
withoutRubrique: { default: false, type: Boolean },
|
|
41
44
|
isDisabled: { default: false, type: Boolean },
|
|
42
|
-
noDeselect: {default: true, type: Boolean},
|
|
43
|
-
inModal:{default: false, type: Boolean},
|
|
45
|
+
noDeselect: { default: true, type: Boolean },
|
|
46
|
+
inModal: { default: false, type: Boolean },
|
|
44
47
|
},
|
|
45
|
-
emits: [
|
|
48
|
+
emits: [
|
|
49
|
+
"update:rubriqueSelected",
|
|
50
|
+
"update:rubriqueSelectedArray",
|
|
51
|
+
"selected",
|
|
52
|
+
],
|
|
46
53
|
|
|
47
54
|
data() {
|
|
48
55
|
return {
|
|
49
56
|
maxElement: 250 as number,
|
|
50
|
-
rubrique: undefined as Rubrique|undefined,
|
|
51
|
-
rubriqueForArray: [] as Array<Rubrique
|
|
52
|
-
withoutItem: { name: this.$t(
|
|
57
|
+
rubrique: undefined as Rubrique | undefined,
|
|
58
|
+
rubriqueForArray: [] as Array<Rubrique> | undefined,
|
|
59
|
+
withoutItem: { name: this.$t("Without rubric"), rubriqueId: -1 } as {
|
|
60
|
+
name: string;
|
|
61
|
+
rubriqueId: number;
|
|
62
|
+
},
|
|
53
63
|
};
|
|
54
64
|
},
|
|
55
65
|
computed: {
|
|
56
66
|
idClassicMultiselect(): string {
|
|
57
|
-
return this.rubriquageId
|
|
67
|
+
return this.rubriquageId
|
|
68
|
+
? "rubriqueChooser" + this.rubriquageId
|
|
69
|
+
: "rubriqueChooser";
|
|
58
70
|
},
|
|
59
|
-
getDefaultRubrique(): Rubrique|undefined{
|
|
60
|
-
if(
|
|
71
|
+
getDefaultRubrique(): Rubrique | undefined {
|
|
72
|
+
if ("" === this.defaultanswer) {
|
|
61
73
|
return undefined;
|
|
62
74
|
}
|
|
63
75
|
return { name: this.defaultanswer, rubriqueId: 0 };
|
|
64
76
|
},
|
|
65
|
-
rubriques(): Array<Rubrique>{
|
|
66
|
-
let rubriques = this.allRubriques;
|
|
77
|
+
rubriques(): Array<Rubrique> {
|
|
78
|
+
let rubriques = this.allRubriques;
|
|
67
79
|
if (!this.getDefaultRubrique) {
|
|
68
80
|
return rubriques;
|
|
69
81
|
}
|
|
@@ -71,37 +83,36 @@ export default defineComponent({
|
|
|
71
83
|
rubriques.unshift(this.withoutItem);
|
|
72
84
|
}
|
|
73
85
|
rubriques.unshift(this.getDefaultRubrique);
|
|
74
|
-
|
|
86
|
+
|
|
75
87
|
return rubriques;
|
|
76
88
|
},
|
|
77
89
|
model: {
|
|
78
|
-
get(): Rubrique| Array<Rubrique
|
|
79
|
-
return !this.multiple ? this.rubrique:this.rubriqueForArray;
|
|
90
|
+
get(): Rubrique | Array<Rubrique> | undefined {
|
|
91
|
+
return !this.multiple ? this.rubrique : this.rubriqueForArray;
|
|
80
92
|
},
|
|
81
|
-
set(value: Rubrique| Array<Rubrique
|
|
82
|
-
if(!this.multiple){
|
|
83
|
-
this.rubrique =
|
|
93
|
+
set(value: Rubrique | Array<Rubrique> | undefined): void {
|
|
94
|
+
if (!this.multiple) {
|
|
95
|
+
this.rubrique = value as Rubrique | undefined;
|
|
84
96
|
return;
|
|
85
97
|
}
|
|
86
|
-
this.rubriqueForArray =
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
}
|
|
98
|
+
this.rubriqueForArray = value as Array<Rubrique>;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
90
101
|
},
|
|
91
102
|
watch: {
|
|
92
103
|
rubriqueSelected: {
|
|
93
|
-
immediate:true,
|
|
94
|
-
handler(){
|
|
104
|
+
immediate: true,
|
|
105
|
+
handler() {
|
|
95
106
|
if (this.rubriqueSelected) {
|
|
96
107
|
this.initRubriqueSelected();
|
|
97
|
-
}else{
|
|
108
|
+
} else {
|
|
98
109
|
this.rubrique = this.getDefaultRubrique;
|
|
99
110
|
}
|
|
100
|
-
}
|
|
111
|
+
},
|
|
101
112
|
},
|
|
102
113
|
reset(): void {
|
|
103
114
|
this.rubrique = this.getDefaultRubrique;
|
|
104
|
-
}
|
|
115
|
+
},
|
|
105
116
|
},
|
|
106
117
|
mounted() {
|
|
107
118
|
this.initRubriqueArray();
|
|
@@ -109,44 +120,52 @@ export default defineComponent({
|
|
|
109
120
|
methods: {
|
|
110
121
|
onSearchRubrique(query: string): void {
|
|
111
122
|
let rubriques = this.rubriques;
|
|
112
|
-
if(query){
|
|
123
|
+
if (query) {
|
|
113
124
|
rubriques = rubriques.filter((item: Rubrique) => {
|
|
114
125
|
return item.name.toUpperCase().includes(query.toUpperCase());
|
|
115
126
|
});
|
|
116
127
|
}
|
|
117
|
-
(
|
|
128
|
+
(
|
|
129
|
+
this.$refs.selectRubrique as InstanceType<typeof ClassicMultiselect>
|
|
130
|
+
).afterSearch(rubriques, rubriques.length);
|
|
118
131
|
},
|
|
119
|
-
onRubriqueSelected(rubrique: Rubrique| Array<Rubrique>): void {
|
|
132
|
+
onRubriqueSelected(rubrique: Rubrique | Array<Rubrique>): void {
|
|
120
133
|
if (undefined !== this.rubriqueSelected) {
|
|
121
|
-
this.$emit(
|
|
134
|
+
this.$emit(
|
|
135
|
+
"update:rubriqueSelected",
|
|
136
|
+
(rubrique as Rubrique).rubriqueId,
|
|
137
|
+
);
|
|
122
138
|
} else if (undefined !== this.rubriqueSelectedArray) {
|
|
123
139
|
const idsArray: Array<number> = [];
|
|
124
140
|
(rubrique as Array<Rubrique>).forEach((el: Rubrique) => {
|
|
125
|
-
idsArray.push(el.rubriqueId??0);
|
|
141
|
+
idsArray.push(el.rubriqueId ?? 0);
|
|
126
142
|
});
|
|
127
|
-
this.$emit(
|
|
128
|
-
}else{
|
|
129
|
-
this.$emit(
|
|
143
|
+
this.$emit("update:rubriqueSelectedArray", idsArray);
|
|
144
|
+
} else {
|
|
145
|
+
this.$emit("selected", rubrique);
|
|
130
146
|
}
|
|
131
147
|
},
|
|
132
148
|
initRubriqueSelected(): void {
|
|
133
|
-
this.rubrique =
|
|
134
|
-
|
|
135
|
-
|
|
149
|
+
this.rubrique =
|
|
150
|
+
this.rubriques.find((el: Rubrique) => {
|
|
151
|
+
return el.rubriqueId === this.rubriqueSelected;
|
|
152
|
+
}) ?? this.getDefaultRubrique;
|
|
136
153
|
},
|
|
137
154
|
|
|
138
155
|
initRubriqueArray(): void {
|
|
139
|
-
if(!this.rubriqueForArray || !this.rubriqueSelectedArray){
|
|
156
|
+
if (!this.rubriqueForArray || !this.rubriqueSelectedArray) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
140
159
|
this.rubriqueForArray.length = 0;
|
|
141
160
|
this.rubriqueSelectedArray.forEach((element: number) => {
|
|
142
161
|
const item = this.rubriques.find((el: Rubrique) => {
|
|
143
162
|
return el.rubriqueId === element;
|
|
144
163
|
});
|
|
145
|
-
if(this.rubriqueForArray && item){
|
|
164
|
+
if (this.rubriqueForArray && item) {
|
|
146
165
|
this.rubriqueForArray.push(item);
|
|
147
166
|
}
|
|
148
167
|
});
|
|
149
168
|
},
|
|
150
169
|
},
|
|
151
|
-
})
|
|
152
|
-
</script>
|
|
170
|
+
});
|
|
171
|
+
</script>
|