@saooti/octopus-sdk 1.0.0 → 29.0.2
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 +73 -0
- package/index.d.ts +4 -0
- package/index.ts +12 -0
- package/package.json +61 -39
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +30 -19
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/style.css +48 -5
- package/public/img/ACPM.png +0 -0
- package/public/img/article.png +0 -0
- package/src/App.vue +97 -31
- package/src/api/comments.ts +3 -1
- package/src/api/emissions.ts +5 -2
- package/src/api/initialize.ts +3 -2
- package/src/api/podcasts.ts +5 -2
- package/src/api/profile.ts +4 -2
- package/src/api/studio.ts +12 -1
- package/src/assets/bootstrap-diff.scss +265 -0
- package/src/assets/form.scss +23 -0
- package/src/assets/general.scss +47 -20
- package/src/assets/modal.scss +9 -10
- package/src/assets/multiselect.scss +19 -2
- package/src/assets/octopus-library.scss +16 -4
- package/src/assets/share.scss +343 -0
- package/src/components/display/aggregator/RssSection.vue +4 -4
- package/src/components/display/categories/CategoryChooser.vue +152 -105
- package/src/components/display/categories/CategoryFilter.vue +108 -0
- package/src/components/display/categories/CategoryList.vue +138 -109
- package/src/components/display/comments/AddCommentModal.vue +104 -87
- package/src/components/display/comments/CommentInput.vue +137 -118
- package/src/components/display/comments/CommentItem.vue +155 -137
- package/src/components/display/comments/CommentList.vue +142 -120
- package/src/components/display/comments/CommentParentInfo.vue +39 -35
- package/src/components/display/comments/CommentPlayer.vue +54 -48
- package/src/components/display/comments/CommentSection.vue +57 -58
- package/src/components/display/edit/EditBox.vue +4 -4
- package/src/components/display/edit/EditCommentBox.vue +25 -31
- package/src/components/display/emission/EmissionChooser.vue +82 -80
- package/src/components/display/emission/EmissionInlineList.vue +118 -105
- package/src/components/display/emission/EmissionItem.vue +66 -167
- package/src/components/display/emission/EmissionList.vue +96 -122
- package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
- package/src/components/display/filter/AdvancedSearch.vue +306 -372
- package/src/components/display/filter/CategoryFilter.vue +117 -0
- package/src/components/display/filter/MonetizableFilter.vue +24 -10
- package/src/components/display/filter/ProductorSearch.vue +131 -135
- package/src/components/display/filter/RubriqueChoice.vue +104 -0
- package/src/components/display/filter/RubriqueFilter.vue +235 -0
- package/src/components/display/live/CountDown.vue +30 -29
- package/src/components/display/live/LiveHorizontalList.vue +40 -34
- package/src/components/display/live/LiveItem.vue +146 -158
- package/src/components/display/live/LiveList.vue +167 -154
- package/src/components/display/organisation/OrganisationChooser.vue +125 -124
- package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
- package/src/components/display/participant/ParticipantItem.vue +92 -108
- package/src/components/display/participant/ParticipantList.vue +76 -69
- package/src/components/display/playlist/PlaylistItem.vue +45 -56
- package/src/components/display/playlist/PlaylistList.vue +57 -48
- package/src/components/display/playlist/PodcastList.vue +94 -70
- package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
- package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
- package/src/components/display/podcasts/PodcastImage.vue +244 -208
- package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
- package/src/components/display/podcasts/PodcastItem.vue +150 -132
- package/src/components/display/podcasts/PodcastList.vue +89 -110
- package/src/components/display/podcasts/TagList.vue +23 -16
- package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
- package/src/components/display/rubriques/RubriqueList.vue +227 -0
- package/src/components/display/sharing/PlayerParameters.vue +154 -106
- package/src/components/display/sharing/QrCode.vue +58 -0
- package/src/components/display/sharing/ShareButtons.vue +214 -92
- package/src/components/display/sharing/ShareDistribution.vue +110 -121
- package/src/components/display/sharing/SharePlayer.vue +245 -190
- package/src/components/display/sharing/SubscribeButtons.vue +130 -66
- package/src/components/display/studio/RecordingItemButton.vue +4 -4
- package/src/components/misc/ErrorMessage.vue +21 -16
- package/src/components/misc/Footer.vue +131 -66
- package/src/components/misc/HomeDropdown.vue +166 -123
- package/src/components/misc/LeftMenu.vue +151 -134
- package/src/components/misc/Player.vue +332 -328
- package/src/components/misc/Snackbar.vue +27 -29
- package/src/components/misc/TopBar.vue +204 -174
- package/src/components/misc/modal/ClipboardModal.vue +46 -26
- package/src/components/misc/modal/MessageModal.vue +67 -51
- package/src/components/misc/modal/NewsletterModal.vue +179 -136
- package/src/components/misc/modal/QrCodeModal.vue +83 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/organisationFilter.ts +24 -0
- package/src/components/pages/Category.vue +26 -26
- package/src/components/pages/Emission.vue +120 -92
- package/src/components/pages/Emissions.vue +109 -86
- package/src/components/pages/Home.vue +70 -16
- package/src/components/pages/Lives.vue +57 -47
- package/src/components/pages/Participant.vue +93 -77
- package/src/components/pages/Participants.vue +44 -31
- package/src/components/pages/Playlist.vue +63 -52
- package/src/components/pages/Playlists.vue +41 -39
- package/src/components/pages/Podcast.vue +265 -251
- package/src/components/pages/Podcasts.vue +135 -104
- package/src/components/pages/Rubrique.vue +25 -19
- package/src/components/pages/Search.vue +71 -67
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +299 -1
- package/src/locale/fr.ts +25 -10
- package/src/locale/messages.ts +3 -2
- package/src/main.ts +54 -32
- package/src/router/router.ts +184 -159
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +36 -171
- package/src/store/class/category.ts +8 -0
- package/src/store/class/comment.ts +17 -0
- package/src/store/class/conference.ts +27 -0
- package/src/store/class/customPlayer.ts +8 -0
- package/src/store/class/emission.ts +20 -0
- package/src/store/class/fetchParam.ts +16 -0
- package/src/store/class/media.ts +13 -0
- package/src/store/class/organisation.ts +19 -0
- package/src/store/class/participant.ts +12 -0
- package/src/store/class/person.ts +13 -0
- package/src/store/class/player.ts +12 -0
- package/src/store/class/playlist.ts +15 -0
- package/src/store/class/podcast.ts +37 -0
- package/src/store/class/rubriquage.ts +9 -0
- package/src/store/class/rubriquageFilter.ts +5 -0
- package/src/store/class/rubrique.ts +8 -0
- package/src/store/paramStore.ts +70 -29
- package/src/store/typeAppStore.ts +171 -237
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +14 -0
- package/public/img/ACPM.PNG +0 -0
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -1,78 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column p-3 list-episode">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
v-if="!overflowScroll"
|
|
5
|
+
class="d-flex justify-content-end"
|
|
6
|
+
>
|
|
4
7
|
<div class="hide-phone">
|
|
5
8
|
<button
|
|
6
9
|
class="btn btn-arrow"
|
|
7
|
-
@click="displayPrevious()"
|
|
8
10
|
:class="{ disabled: !previousAvailable }"
|
|
9
11
|
:aria-label="$t('Display previous')"
|
|
12
|
+
@click="displayPrevious()"
|
|
10
13
|
>
|
|
11
|
-
<div class="saooti-arrow-left2"
|
|
14
|
+
<div class="saooti-arrow-left2" />
|
|
12
15
|
</button>
|
|
13
16
|
<button
|
|
14
17
|
class="btn btn-arrow"
|
|
15
|
-
@click="displayNext()"
|
|
16
18
|
:class="{ disabled: !nextAvailable }"
|
|
17
19
|
:aria-label="$t('Display next')"
|
|
20
|
+
@click="displayNext()"
|
|
18
21
|
>
|
|
19
|
-
<div class="saooti-arrow-right2"
|
|
22
|
+
<div class="saooti-arrow-right2" />
|
|
20
23
|
</button>
|
|
21
24
|
</div>
|
|
22
25
|
</div>
|
|
23
|
-
<div
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
<div
|
|
27
|
+
v-if="loading"
|
|
28
|
+
class="d-flex justify-content-center"
|
|
29
|
+
>
|
|
30
|
+
<div class="spinner-border me-3" />
|
|
31
|
+
<h3 class="mt-2">
|
|
32
|
+
{{ $t('Loading emissions ...') }}
|
|
33
|
+
</h3>
|
|
26
34
|
</div>
|
|
27
35
|
<transition-group
|
|
28
|
-
:name="transitionName"
|
|
29
|
-
class="podcast-list-inline"
|
|
30
|
-
tag="ul"
|
|
31
36
|
v-show="
|
|
32
37
|
(displayRubriquage && rubriques) || !(displayRubriquage && loaded)
|
|
33
38
|
"
|
|
39
|
+
:name="transitionName"
|
|
40
|
+
class="podcast-list-inline"
|
|
41
|
+
tag="ul"
|
|
34
42
|
:class="[
|
|
35
43
|
alignLeft ? 'justify-content-start' : '',
|
|
36
44
|
overflowScroll ? 'overflowScroll' : '',
|
|
37
45
|
]"
|
|
38
46
|
>
|
|
39
47
|
<EmissionPlayerItem
|
|
48
|
+
v-for="e in emissions"
|
|
49
|
+
:key="e.emissionId"
|
|
40
50
|
class="flex-shrink item-phone-margin"
|
|
41
51
|
:emission="e"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
:
|
|
45
|
-
:nbPodcasts="nbPodcasts"
|
|
46
|
-
:rubriqueName="rubriquesId(e)"
|
|
52
|
+
:class="[alignLeft ? 'me-3' : '', mainRubriquage(e)]"
|
|
53
|
+
:nb-podcasts="nbPodcasts"
|
|
54
|
+
:rubrique-name="rubriquesId(e)"
|
|
47
55
|
/>
|
|
48
56
|
</transition-group>
|
|
49
|
-
<router-link
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
<router-link
|
|
58
|
+
v-if="!overflowScroll"
|
|
59
|
+
:to="href"
|
|
60
|
+
class="btn btn-link"
|
|
61
|
+
>
|
|
62
|
+
{{
|
|
63
|
+
buttonText
|
|
64
|
+
}}
|
|
65
|
+
</router-link>
|
|
52
66
|
</div>
|
|
53
67
|
</template>
|
|
54
68
|
|
|
55
|
-
<style lang="scss">
|
|
56
|
-
.podcast-list-inline.overflowScroll {
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-wrap: wrap;
|
|
59
|
-
-webkit-overflow-scrolling: touch;
|
|
60
|
-
scroll-behavior: smooth;
|
|
61
|
-
padding-bottom: 1rem;
|
|
62
|
-
width: 100%;
|
|
63
|
-
height: 80vh;
|
|
64
|
-
overflow-y: auto;
|
|
65
|
-
@media (max-width: 960px) {
|
|
66
|
-
overflow-x: hidden;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
flex-wrap: nowrap;
|
|
69
|
-
}
|
|
70
|
-
.item-phone-margin {
|
|
71
|
-
margin: 1rem 0.5rem !important;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
75
|
-
|
|
76
69
|
<script lang="ts">
|
|
77
70
|
const octopusApi = require('@saooti/octopus-api');
|
|
78
71
|
import domHelper from '../../../helper/dom';
|
|
@@ -81,78 +74,80 @@ import { state } from '../../../store/paramStore';
|
|
|
81
74
|
|
|
82
75
|
const PHONE_WIDTH = 960;
|
|
83
76
|
|
|
77
|
+
import { Emission } from '@/store/class/emission';
|
|
78
|
+
import { Rubrique } from '@/store/class/rubrique';
|
|
84
79
|
import { defineComponent } from 'vue'
|
|
85
80
|
export default defineComponent({
|
|
86
81
|
name: 'EmissionInlineList',
|
|
87
82
|
|
|
88
|
-
props: [
|
|
89
|
-
'organisationId',
|
|
90
|
-
'href',
|
|
91
|
-
'buttonText',
|
|
92
|
-
'rubriqueId',
|
|
93
|
-
'rubriquageId',
|
|
94
|
-
'nbPodcasts',
|
|
95
|
-
'itemSize',
|
|
96
|
-
],
|
|
97
|
-
|
|
98
83
|
components: {
|
|
99
84
|
EmissionPlayerItem,
|
|
100
85
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
mounted() {
|
|
111
|
-
this.handleResize();
|
|
112
|
-
this.fetchNext();
|
|
113
|
-
if (this.displayRubriquage) {
|
|
114
|
-
this.fetchRubriques();
|
|
115
|
-
}
|
|
86
|
+
props: {
|
|
87
|
+
organisationId: { default: undefined, type: String},
|
|
88
|
+
href: { default: undefined, type: String},
|
|
89
|
+
buttonText: { default: undefined, type: String},
|
|
90
|
+
rubriqueId: { default: undefined, type: Number },
|
|
91
|
+
rubriquageId: { default: undefined, type: Number },
|
|
92
|
+
nbPodcasts: { default: undefined, type: Number },
|
|
93
|
+
itemSize: { default: undefined, type: Number },
|
|
116
94
|
},
|
|
117
95
|
|
|
118
96
|
data() {
|
|
119
97
|
return {
|
|
120
|
-
loading: true,
|
|
121
|
-
loaded: true,
|
|
122
|
-
index: 0,
|
|
123
|
-
first: 0,
|
|
124
|
-
size: 5,
|
|
125
|
-
totalCount: 0,
|
|
126
|
-
popularSort: true,
|
|
127
|
-
allEmissions: [] as
|
|
128
|
-
direction: 1,
|
|
129
|
-
alignLeft: false,
|
|
130
|
-
rubriques: undefined as
|
|
98
|
+
loading: true as boolean,
|
|
99
|
+
loaded: true as boolean,
|
|
100
|
+
index: 0 as number,
|
|
101
|
+
first: 0 as number,
|
|
102
|
+
size: 5 as number,
|
|
103
|
+
totalCount: 0 as number,
|
|
104
|
+
popularSort: true as boolean,
|
|
105
|
+
allEmissions: [] as Array<Emission>,
|
|
106
|
+
direction: 1 as number,
|
|
107
|
+
alignLeft: false as boolean,
|
|
108
|
+
rubriques: undefined as Array<Rubrique>|undefined,
|
|
131
109
|
};
|
|
132
110
|
},
|
|
133
111
|
|
|
112
|
+
|
|
134
113
|
computed: {
|
|
135
|
-
emissions():
|
|
114
|
+
emissions(): Array<Emission> {
|
|
136
115
|
return this.allEmissions.slice(this.index, this.index + this.size);
|
|
137
116
|
},
|
|
138
|
-
overflowScroll() {
|
|
117
|
+
overflowScroll(): boolean {
|
|
139
118
|
return state.emissionsPage.overflowScroll;
|
|
140
119
|
},
|
|
141
|
-
previousAvailable():boolean {
|
|
120
|
+
previousAvailable(): boolean {
|
|
142
121
|
return this.index > 0;
|
|
143
122
|
},
|
|
144
|
-
nextAvailable():boolean {
|
|
123
|
+
nextAvailable(): boolean {
|
|
145
124
|
return this.index + this.size < this.totalCount;
|
|
146
125
|
},
|
|
147
|
-
displayRubriquage() {
|
|
126
|
+
displayRubriquage(): string {
|
|
148
127
|
return state.emissionsPage.rubriquage;
|
|
149
128
|
},
|
|
150
|
-
transitionName:
|
|
151
|
-
direction > 0 ? 'out-left' : 'out-right'
|
|
129
|
+
transitionName(): string {
|
|
130
|
+
return this.direction > 0 ? 'out-left' : 'out-right';
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
created() {
|
|
135
|
+
window.addEventListener('resize', this.handleResize);
|
|
152
136
|
},
|
|
153
137
|
|
|
138
|
+
unmounted() {
|
|
139
|
+
window.removeEventListener('resize', this.handleResize);
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
mounted() {
|
|
143
|
+
this.handleResize();
|
|
144
|
+
this.fetchNext();
|
|
145
|
+
if (this.displayRubriquage) {
|
|
146
|
+
this.fetchRubriques();
|
|
147
|
+
}
|
|
148
|
+
},
|
|
154
149
|
methods: {
|
|
155
|
-
async fetchNext() {
|
|
150
|
+
async fetchNext(): Promise<void> {
|
|
156
151
|
const data = await octopusApi.fetchEmissions({
|
|
157
152
|
first: this.first,
|
|
158
153
|
size: this.size + 1,
|
|
@@ -174,7 +169,7 @@ export default defineComponent({
|
|
|
174
169
|
});
|
|
175
170
|
} */
|
|
176
171
|
if (this.allEmissions.length + data.result.length < this.totalCount) {
|
|
177
|
-
|
|
172
|
+
const nexEl = data.result.pop();
|
|
178
173
|
this.preloadImage(nexEl.imageUrl);
|
|
179
174
|
}
|
|
180
175
|
this.allEmissions = this.allEmissions.concat(data.result);
|
|
@@ -183,15 +178,13 @@ export default defineComponent({
|
|
|
183
178
|
}
|
|
184
179
|
this.first += this.size;
|
|
185
180
|
},
|
|
186
|
-
|
|
187
|
-
displayPrevious() {
|
|
181
|
+
displayPrevious(): void {
|
|
188
182
|
this.direction = -1;
|
|
189
183
|
if (this.previousAvailable) {
|
|
190
184
|
this.index -= 1;
|
|
191
185
|
}
|
|
192
186
|
},
|
|
193
|
-
|
|
194
|
-
displayNext() {
|
|
187
|
+
displayNext(): void {
|
|
195
188
|
this.direction = 1;
|
|
196
189
|
if (!this.nextAvailable) return;
|
|
197
190
|
if (
|
|
@@ -202,8 +195,7 @@ export default defineComponent({
|
|
|
202
195
|
}
|
|
203
196
|
this.index += 1;
|
|
204
197
|
},
|
|
205
|
-
|
|
206
|
-
handleResize() {
|
|
198
|
+
handleResize(): void {
|
|
207
199
|
if (!this.$el) return;
|
|
208
200
|
if (window.innerWidth <= PHONE_WIDTH) {
|
|
209
201
|
this.size = 10;
|
|
@@ -213,15 +205,14 @@ export default defineComponent({
|
|
|
213
205
|
this.size = 20;
|
|
214
206
|
return;
|
|
215
207
|
}
|
|
216
|
-
const width = this.$el.offsetWidth;
|
|
208
|
+
const width = (this.$el as HTMLElement).offsetWidth;
|
|
217
209
|
let sixteen = domHelper.convertRemToPixels(13.7);
|
|
218
210
|
if (this.itemSize) {
|
|
219
211
|
sixteen = domHelper.convertRemToPixels(this.itemSize + 0.7);
|
|
220
212
|
}
|
|
221
213
|
this.size = Math.floor(width / sixteen);
|
|
222
214
|
},
|
|
223
|
-
|
|
224
|
-
reset() {
|
|
215
|
+
reset(): void {
|
|
225
216
|
this.loading = true;
|
|
226
217
|
this.loaded = true;
|
|
227
218
|
this.index = 0;
|
|
@@ -229,16 +220,15 @@ export default defineComponent({
|
|
|
229
220
|
this.totalCount = 0;
|
|
230
221
|
this.allEmissions.length = 0;
|
|
231
222
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
let img = new Image();
|
|
223
|
+
preloadImage(url: string): void {
|
|
224
|
+
const img = new Image();
|
|
235
225
|
img.src = url;
|
|
236
226
|
},
|
|
237
|
-
async fetchRubriques() {
|
|
227
|
+
async fetchRubriques(): Promise<void> {
|
|
238
228
|
const data = await octopusApi.fetchTopic(this.displayRubriquage);
|
|
239
229
|
this.rubriques = data.rubriques;
|
|
240
230
|
},
|
|
241
|
-
rubriquesId(emission:
|
|
231
|
+
rubriquesId(emission: Emission): string|undefined {
|
|
242
232
|
if (
|
|
243
233
|
!this.displayRubriquage ||
|
|
244
234
|
!emission.rubriqueIds ||
|
|
@@ -247,19 +237,42 @@ export default defineComponent({
|
|
|
247
237
|
!this.rubriques.length
|
|
248
238
|
)
|
|
249
239
|
return undefined;
|
|
250
|
-
|
|
251
|
-
(
|
|
240
|
+
const rubrique = this.rubriques.find(
|
|
241
|
+
(element: Rubrique) => element.rubriqueId && emission.rubriqueIds.includes(element.rubriqueId) && element.rubriquageId === parseInt(this.displayRubriquage)
|
|
252
242
|
);
|
|
253
|
-
|
|
243
|
+
if(rubrique){
|
|
244
|
+
return rubrique.name;
|
|
245
|
+
}
|
|
254
246
|
},
|
|
255
|
-
mainRubriquage(emission:
|
|
247
|
+
mainRubriquage(emission: Emission): string {
|
|
256
248
|
if (
|
|
257
249
|
emission.rubriqueIds &&
|
|
258
|
-
emission.rubriqueIds
|
|
250
|
+
emission.rubriqueIds.includes(state.emissionsPage.mainRubrique)
|
|
259
251
|
)
|
|
260
252
|
return 'partenaireRubrique';
|
|
261
253
|
return '';
|
|
262
254
|
},
|
|
263
255
|
},
|
|
264
|
-
})
|
|
256
|
+
})
|
|
265
257
|
</script>
|
|
258
|
+
|
|
259
|
+
<style lang="scss">
|
|
260
|
+
.podcast-list-inline.overflowScroll {
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-wrap: wrap;
|
|
263
|
+
-webkit-overflow-scrolling: touch;
|
|
264
|
+
scroll-behavior: smooth;
|
|
265
|
+
padding-bottom: 1rem;
|
|
266
|
+
width: 100%;
|
|
267
|
+
height: 80vh;
|
|
268
|
+
overflow-y: auto;
|
|
269
|
+
@media (max-width: 960px) {
|
|
270
|
+
overflow-x: hidden;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
flex-wrap: nowrap;
|
|
273
|
+
}
|
|
274
|
+
.item-phone-margin {
|
|
275
|
+
margin: 1rem 0.5rem !important;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
</style>
|
|
@@ -6,67 +6,77 @@
|
|
|
6
6
|
? 'noList emission-light-max-size'
|
|
7
7
|
: 'emission-item-container shadow-element'
|
|
8
8
|
"
|
|
9
|
-
v-if="activeEmission || editRight"
|
|
10
9
|
>
|
|
11
10
|
<router-link
|
|
12
11
|
:to="{
|
|
13
12
|
name: 'emission',
|
|
14
13
|
params: { emissionId: emission.emissionId },
|
|
15
|
-
query: { productor:
|
|
14
|
+
query: { productor: $store.state.filter.organisationId },
|
|
16
15
|
}"
|
|
17
16
|
:aria-label="$t('Emission')"
|
|
18
17
|
class="text-dark"
|
|
19
18
|
>
|
|
20
19
|
<div
|
|
20
|
+
v-if="!lightItems"
|
|
21
21
|
class="img-box"
|
|
22
22
|
:style="{ 'background-image': 'url(\'' + emission.imageUrl + '\')' }"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
/>
|
|
24
|
+
<div
|
|
25
|
+
v-else
|
|
26
|
+
class="d-flex"
|
|
27
|
+
>
|
|
26
28
|
<div
|
|
27
29
|
class="img-box-light flex-shrink"
|
|
28
30
|
:style="{ 'background-image': 'url(\'' + emission.imageUrl + '\')' }"
|
|
29
|
-
|
|
30
|
-
<div class="emission-light-title">
|
|
31
|
+
/>
|
|
32
|
+
<div class="emission-light-title">
|
|
33
|
+
{{ name }}
|
|
34
|
+
</div>
|
|
31
35
|
</div>
|
|
32
36
|
</router-link>
|
|
33
|
-
<div
|
|
37
|
+
<div
|
|
38
|
+
class="emission-item-text"
|
|
39
|
+
:class="lightItems ? 'p-0' : ''"
|
|
40
|
+
>
|
|
34
41
|
<router-link
|
|
35
42
|
:to="{
|
|
36
43
|
name: 'emission',
|
|
37
44
|
params: { emissionId: emission.emissionId },
|
|
38
|
-
query: { productor:
|
|
45
|
+
query: { productor: $store.state.filter.organisationId },
|
|
39
46
|
}"
|
|
40
47
|
class="text-dark"
|
|
41
48
|
>
|
|
42
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
v-if="!lightItems"
|
|
51
|
+
class="emission-name"
|
|
52
|
+
>
|
|
43
53
|
<img
|
|
54
|
+
v-if="!activeEmission && !isPodcastmaker && editRight"
|
|
44
55
|
class="icon-caution"
|
|
45
56
|
src="/img/caution.png"
|
|
46
|
-
v-if="!activeEmission && !isPodcastmaker && editRight"
|
|
47
57
|
:title="$t('Emission have not podcasts')"
|
|
48
|
-
|
|
58
|
+
>{{ name }}
|
|
49
59
|
</div>
|
|
50
60
|
<div
|
|
51
61
|
:id="'description-emission-container-' + emission.emissionId"
|
|
52
|
-
class="emission-description
|
|
62
|
+
class="emission-description htms-wysiwyg-content"
|
|
53
63
|
:class="lightItems ? 'emission-small-description' : ''"
|
|
54
64
|
>
|
|
55
65
|
<div
|
|
56
66
|
:id="'description-emission-' + emission.emissionId"
|
|
57
67
|
v-html="urlify(description)"
|
|
58
|
-
|
|
68
|
+
/>
|
|
59
69
|
</div>
|
|
60
70
|
</router-link>
|
|
61
|
-
<div class="flex-grow"
|
|
71
|
+
<div class="flex-grow" />
|
|
62
72
|
<router-link
|
|
73
|
+
v-if="!isPodcastmaker"
|
|
63
74
|
:to="{
|
|
64
75
|
name: 'productor',
|
|
65
76
|
params: { productorId: emission.orga.id },
|
|
66
|
-
query: { productor:
|
|
77
|
+
query: { productor: $store.state.filter.organisationId },
|
|
67
78
|
}"
|
|
68
79
|
class="text-dark"
|
|
69
|
-
v-if="!isPodcastmaker"
|
|
70
80
|
>
|
|
71
81
|
<div class="emission-producer primary-color">
|
|
72
82
|
© {{ emission.orga.name }}
|
|
@@ -76,107 +86,8 @@
|
|
|
76
86
|
</li>
|
|
77
87
|
</template>
|
|
78
88
|
|
|
79
|
-
<style lang="scss">
|
|
80
|
-
.emission-item-container {
|
|
81
|
-
list-style: none;
|
|
82
|
-
background: #fff;
|
|
83
|
-
border-radius: 2rem;
|
|
84
|
-
display: flex;
|
|
85
|
-
width: 100%;
|
|
86
|
-
margin: 1rem 0;
|
|
87
|
-
.img-box {
|
|
88
|
-
border-radius: 2rem !important;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
.emission-light-max-size {
|
|
92
|
-
width: 300px;
|
|
93
|
-
border-bottom: 1px solid #ddd;
|
|
94
|
-
}
|
|
95
|
-
.emission-light-title {
|
|
96
|
-
color: #333 !important;
|
|
97
|
-
align-self: flex-end;
|
|
98
|
-
text-transform: none;
|
|
99
|
-
font-size: 1.5em;
|
|
100
|
-
font-weight: normal;
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
overflow: hidden;
|
|
103
|
-
text-overflow: ellipsis;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.emission-item-text {
|
|
107
|
-
padding: 1rem;
|
|
108
|
-
display: flex;
|
|
109
|
-
flex-direction: column;
|
|
110
|
-
max-height: 13rem;
|
|
111
|
-
|
|
112
|
-
.emission-name {
|
|
113
|
-
font-size: 0.9rem;
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
display: -webkit-box;
|
|
117
|
-
-webkit-line-clamp: 2;
|
|
118
|
-
-webkit-box-orient: vertical;
|
|
119
|
-
word-break: break-word;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.emission-description {
|
|
123
|
-
overflow: hidden;
|
|
124
|
-
margin-top: 0.5em;
|
|
125
|
-
word-break: break-word;
|
|
126
|
-
max-height: 7rem;
|
|
127
|
-
position: relative;
|
|
128
|
-
&.after-emission-description:after {
|
|
129
|
-
content: '...';
|
|
130
|
-
position: absolute;
|
|
131
|
-
padding-left: 1rem;
|
|
132
|
-
right: 0;
|
|
133
|
-
bottom: 0;
|
|
134
|
-
width: 100%;
|
|
135
|
-
font-size: 1rem;
|
|
136
|
-
font-weight: bolder;
|
|
137
|
-
text-align: center;
|
|
138
|
-
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.emission-small-description {
|
|
143
|
-
-webkit-line-clamp: 2;
|
|
144
|
-
border-top: 1px solid #ddd;
|
|
145
|
-
word-break: break-word;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.emission-producer {
|
|
149
|
-
font-weight: 300;
|
|
150
|
-
font-size: 0.6rem;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
button.btn.btn-primary.share-btn.m-3 {
|
|
155
|
-
font-size: 1rem;
|
|
156
|
-
width: 2.5rem;
|
|
157
|
-
height: 2.5rem !important;
|
|
158
|
-
margin: 0 0.8rem 0 0 !important;
|
|
159
|
-
}
|
|
160
|
-
/** PHONES*/
|
|
161
|
-
@media (max-width: 680px) {
|
|
162
|
-
.emission-item-container {
|
|
163
|
-
flex-wrap: wrap;
|
|
164
|
-
width: auto;
|
|
165
|
-
margin: 0;
|
|
166
|
-
padding: 1rem;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@media (max-width: 450px) {
|
|
172
|
-
.emission-item-text {
|
|
173
|
-
padding: 0.5rem 0;
|
|
174
|
-
text-align: center;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
</style>
|
|
178
|
-
|
|
179
89
|
<script lang="ts">
|
|
90
|
+
import { Emission } from '@/store/class/emission';
|
|
180
91
|
import { state } from '../../../store/paramStore';
|
|
181
92
|
const octopusApi = require('@saooti/octopus-api');
|
|
182
93
|
import { displayMethods } from '../../mixins/functions';
|
|
@@ -184,71 +95,44 @@ import { defineComponent } from 'vue'
|
|
|
184
95
|
export default defineComponent({
|
|
185
96
|
name: 'EmissionItem',
|
|
186
97
|
|
|
187
|
-
props: ['emission'],
|
|
188
|
-
emits: ['emissionNotVisible'],
|
|
189
|
-
|
|
190
98
|
mixins: [displayMethods],
|
|
191
99
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
mounted() {
|
|
196
|
-
let emissionDesc = document.getElementById(
|
|
197
|
-
'description-emission-' + this.emission.emissionId
|
|
198
|
-
);
|
|
199
|
-
let emissionDescContainer:any = document.getElementById(
|
|
200
|
-
'description-emission-container-' + this.emission.emissionId
|
|
201
|
-
);
|
|
202
|
-
if (
|
|
203
|
-
null !== emissionDesc &&
|
|
204
|
-
emissionDesc.clientHeight > emissionDescContainer.clientHeight
|
|
205
|
-
) {
|
|
206
|
-
emissionDescContainer.classList.add('after-emission-description');
|
|
207
|
-
}
|
|
100
|
+
props: {
|
|
101
|
+
emission: { default: ()=>({}), type: Object as ()=> Emission},
|
|
208
102
|
},
|
|
209
103
|
|
|
210
104
|
data() {
|
|
211
105
|
return {
|
|
212
|
-
activeEmission: true,
|
|
106
|
+
activeEmission: true as boolean,
|
|
213
107
|
};
|
|
214
108
|
},
|
|
215
|
-
|
|
109
|
+
|
|
216
110
|
computed: {
|
|
217
|
-
isPodcastmaker() {
|
|
111
|
+
isPodcastmaker(): boolean {
|
|
218
112
|
return state.generalParameters.podcastmaker;
|
|
219
113
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
114
|
+
organisation(): string {
|
|
115
|
+
if(this.emission && this.emission.publisher && this.emission.publisher.organisation){
|
|
116
|
+
return '' + this.emission.publisher.organisation.name;
|
|
117
|
+
}
|
|
118
|
+
return '';
|
|
223
119
|
},
|
|
224
|
-
|
|
225
|
-
lightItems() {
|
|
120
|
+
lightItems(): boolean {
|
|
226
121
|
return state.emissionsPage.lightItems;
|
|
227
122
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
let description;
|
|
231
|
-
description = this.emission.description || '';
|
|
232
|
-
if (state.generalParameters.isIE11)
|
|
233
|
-
return description.substring(0, 50) + '...';
|
|
234
|
-
return description;
|
|
123
|
+
description(): string {
|
|
124
|
+
return this.emission.description || '';
|
|
235
125
|
},
|
|
236
|
-
|
|
237
|
-
name():string {
|
|
238
|
-
if (state.generalParameters.isIE11)
|
|
239
|
-
return this.emission.name.substring(0, 50) + '...';
|
|
126
|
+
name(): string {
|
|
240
127
|
return this.emission.name;
|
|
241
128
|
},
|
|
242
|
-
|
|
243
|
-
organisationId() {
|
|
129
|
+
organisationId(): string {
|
|
244
130
|
return state.generalParameters.organisationId;
|
|
245
131
|
},
|
|
246
|
-
|
|
247
|
-
authenticated():boolean {
|
|
132
|
+
authenticated(): boolean {
|
|
248
133
|
return state.generalParameters.authenticated;
|
|
249
134
|
},
|
|
250
|
-
|
|
251
|
-
editRight() {
|
|
135
|
+
editRight(): boolean {
|
|
252
136
|
if (
|
|
253
137
|
(this.authenticated && this.organisationId === this.emission.orga.id) ||
|
|
254
138
|
state.generalParameters.isAdmin
|
|
@@ -258,8 +142,26 @@ export default defineComponent({
|
|
|
258
142
|
},
|
|
259
143
|
},
|
|
260
144
|
|
|
145
|
+
created() {
|
|
146
|
+
if(!this.editRight)return;
|
|
147
|
+
this.hasPodcast();
|
|
148
|
+
},
|
|
149
|
+
mounted() {
|
|
150
|
+
const emissionDesc = document.getElementById(
|
|
151
|
+
'description-emission-' + this.emission.emissionId
|
|
152
|
+
);
|
|
153
|
+
const emissionDescContainer = document.getElementById(
|
|
154
|
+
'description-emission-container-' + this.emission.emissionId
|
|
155
|
+
);
|
|
156
|
+
if (
|
|
157
|
+
null !== emissionDesc && null !== emissionDescContainer &&
|
|
158
|
+
emissionDesc.clientHeight > emissionDescContainer.clientHeight
|
|
159
|
+
) {
|
|
160
|
+
emissionDescContainer.classList.add('after-emission-description');
|
|
161
|
+
}
|
|
162
|
+
},
|
|
261
163
|
methods: {
|
|
262
|
-
async hasPodcast() {
|
|
164
|
+
async hasPodcast(): Promise<void> {
|
|
263
165
|
const data = await octopusApi.fetchPodcasts({
|
|
264
166
|
emissionId: this.emission.emissionId,
|
|
265
167
|
first: 0,
|
|
@@ -268,11 +170,8 @@ export default defineComponent({
|
|
|
268
170
|
if (0 === data.count) {
|
|
269
171
|
this.activeEmission = false;
|
|
270
172
|
}
|
|
271
|
-
if (this.editRight || this.activeEmission) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
this.$emit('emissionNotVisible');
|
|
275
173
|
},
|
|
276
174
|
},
|
|
277
|
-
})
|
|
175
|
+
})
|
|
278
176
|
</script>
|
|
177
|
+
<style lang="scss"></style>
|