@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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex mt-3 align-items-center">
|
|
3
|
+
<div class="flex-shrink me-2">
|
|
4
|
+
<input
|
|
5
|
+
id="search-category-checkbox"
|
|
6
|
+
v-model="isCategory"
|
|
7
|
+
type="checkbox"
|
|
8
|
+
class="form-check-input"
|
|
9
|
+
>
|
|
10
|
+
<label
|
|
11
|
+
class="form-check-label"
|
|
12
|
+
for="search-category-checkbox"
|
|
13
|
+
>{{ $t('By category') }}</label>
|
|
14
|
+
</div>
|
|
15
|
+
<CategoryChooser
|
|
16
|
+
v-model:categorySelected="iabId"
|
|
17
|
+
width="auto"
|
|
18
|
+
:defaultanswer="$t('No category filter')"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import CategoryChooser from '../categories/CategoryChooser.vue';
|
|
25
|
+
import { Category } from '@/store/class/category';
|
|
26
|
+
import { defineComponent } from 'vue'
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
components: {
|
|
29
|
+
CategoryChooser
|
|
30
|
+
},
|
|
31
|
+
emits: ['updateCategory'],
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
isCategory: false as boolean,
|
|
35
|
+
iabId: 0 as number,
|
|
36
|
+
isInternChanged: false as boolean,
|
|
37
|
+
isInit: true as boolean,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
categoryFilter(): Category|undefined{
|
|
42
|
+
return this.$store.state.filter.iab;
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
isCategory(): void {
|
|
47
|
+
if(this.isInternChanged ||this.isInit){
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.isInternChanged = true;
|
|
51
|
+
if (this.isCategory) {
|
|
52
|
+
this.$emit('updateCategory', this.iabId);
|
|
53
|
+
} else {
|
|
54
|
+
this.$emit('updateCategory', 0);
|
|
55
|
+
}
|
|
56
|
+
this.resetCategoryFilter();
|
|
57
|
+
this.$nextTick(() => {
|
|
58
|
+
this.isInternChanged = false;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
iabId(): void {
|
|
62
|
+
if(this.isInternChanged ||this.isInit){
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.isInternChanged = true;
|
|
66
|
+
this.resetCategoryFilter();
|
|
67
|
+
if(this.isCategory){
|
|
68
|
+
this.$emit('updateCategory', this.iabId);
|
|
69
|
+
}
|
|
70
|
+
this.$nextTick(() => {
|
|
71
|
+
this.isInternChanged = false;
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
categoryFilter(): void{
|
|
75
|
+
if(this.isInternChanged){
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.isInternChanged = true;
|
|
79
|
+
if(this.categoryFilter){
|
|
80
|
+
this.iabId = this.categoryFilter.id;
|
|
81
|
+
this.isCategory = true;
|
|
82
|
+
}else{
|
|
83
|
+
this.iabId = 0;
|
|
84
|
+
this.isCategory = false;
|
|
85
|
+
}
|
|
86
|
+
this.$emit('updateCategory', this.iabId);
|
|
87
|
+
this.$nextTick(() => {
|
|
88
|
+
this.isInternChanged = false;
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
created() {
|
|
94
|
+
if(this.categoryFilter){
|
|
95
|
+
this.iabId = this.categoryFilter.id;
|
|
96
|
+
this.isCategory = true;
|
|
97
|
+
}
|
|
98
|
+
this.$nextTick(() => {
|
|
99
|
+
this.isInit = false;
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
resetCategoryFilter(): void{
|
|
104
|
+
if(!this.categoryFilter || this.isInit){
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const queries = this.$route.query;
|
|
108
|
+
if (queries.iabId) {
|
|
109
|
+
this.$router.push({ query: {...queries, ...{iabId: undefined} } });
|
|
110
|
+
}
|
|
111
|
+
this.$store.commit('filterIab', undefined);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<style lang="scss"></style>
|
|
@@ -1,41 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
v-if="!isEducation"
|
|
4
|
+
class="d-flex align-items-center"
|
|
5
|
+
>
|
|
3
6
|
<div>{{ $t('Advertising') + ' :' }}</div>
|
|
4
7
|
<label class="wrap">
|
|
5
8
|
<select
|
|
6
9
|
ref="select"
|
|
7
|
-
class="basic-select ml-2 mb-0 border c-hand"
|
|
8
10
|
v-model="monetization"
|
|
11
|
+
class="basic-select ms-2 mb-0 border c-hand"
|
|
9
12
|
@change="onChange"
|
|
10
13
|
>
|
|
11
|
-
<option
|
|
14
|
+
<option
|
|
15
|
+
v-if="isEmission"
|
|
16
|
+
value="UNDEFINED"
|
|
17
|
+
>{{
|
|
12
18
|
$t('All emissions')
|
|
13
19
|
}}</option>
|
|
14
|
-
<option
|
|
20
|
+
<option
|
|
21
|
+
v-else
|
|
22
|
+
value="UNDEFINED"
|
|
23
|
+
>{{ $t('All podcasts') }}</option>
|
|
15
24
|
<option value="YES">{{ $t('Authorized advertising') }}</option>
|
|
16
25
|
<option value="NO">{{ $t('Prohibited advertising') }}</option>
|
|
17
26
|
</select>
|
|
18
|
-
<div class="saooti-arrow_down octopus-arrow-down-2 classic-select"
|
|
27
|
+
<div class="saooti-arrow_down octopus-arrow-down-2 classic-select" />
|
|
19
28
|
</label>
|
|
20
29
|
</div>
|
|
21
30
|
</template>
|
|
22
|
-
|
|
31
|
+
|
|
23
32
|
<script lang="ts">
|
|
24
33
|
import { defineComponent } from 'vue'
|
|
25
34
|
export default defineComponent({
|
|
26
|
-
props:
|
|
35
|
+
props: {
|
|
36
|
+
isEmission: { default: false, type: Boolean},
|
|
37
|
+
isEducation: { default: false, type: Boolean},
|
|
38
|
+
},
|
|
27
39
|
emits: ['updateMonetization'],
|
|
28
40
|
|
|
29
41
|
data() {
|
|
30
42
|
return {
|
|
31
|
-
monetization: 'UNDEFINED',
|
|
43
|
+
monetization: 'UNDEFINED' as string,
|
|
32
44
|
};
|
|
33
45
|
},
|
|
34
46
|
|
|
35
47
|
methods: {
|
|
36
|
-
onChange() {
|
|
48
|
+
onChange(): void {
|
|
37
49
|
this.$emit('updateMonetization', this.monetization);
|
|
38
50
|
},
|
|
39
51
|
},
|
|
40
|
-
})
|
|
52
|
+
})
|
|
41
53
|
</script>
|
|
54
|
+
|
|
55
|
+
<style lang="scss"></style>
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex align-items-center">
|
|
3
3
|
<div
|
|
4
|
-
class="filter-organisation-chooser"
|
|
5
4
|
v-if="!isPodcastmaker && !filterOrga"
|
|
5
|
+
class="filter-organisation-chooser"
|
|
6
6
|
>
|
|
7
7
|
<OrganisationChooser
|
|
8
8
|
:defaultanswer="$t('No organisation filter')"
|
|
9
|
-
@selected="onOrganisationSelected"
|
|
10
9
|
:value="organisationId"
|
|
11
10
|
:all="true"
|
|
11
|
+
@selected="onOrganisationSelected"
|
|
12
12
|
/>
|
|
13
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
v-if="!!organisationId"
|
|
15
|
+
class="m-3"
|
|
16
|
+
>
|
|
14
17
|
<input
|
|
15
|
-
type="checkbox"
|
|
16
|
-
class="custom-control-input"
|
|
17
18
|
id="orgaCheck"
|
|
18
19
|
v-model="keepOrganisation"
|
|
20
|
+
type="checkbox"
|
|
21
|
+
class="form-check-input"
|
|
19
22
|
@click="onKeepOrganisation"
|
|
23
|
+
>
|
|
24
|
+
<label
|
|
25
|
+
class="form-check-label"
|
|
26
|
+
for="orgaCheck"
|
|
20
27
|
/>
|
|
21
|
-
<label class="custom-control-label" for="orgaCheck"></label>
|
|
22
28
|
</div>
|
|
23
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
v-if="showBubble"
|
|
31
|
+
class="filter-speech-bubble"
|
|
32
|
+
>
|
|
24
33
|
{{
|
|
25
34
|
$t(
|
|
26
35
|
'check this box if you want to keep this filter for the rest of your visit'
|
|
@@ -29,20 +38,129 @@
|
|
|
29
38
|
</div>
|
|
30
39
|
</div>
|
|
31
40
|
<div class="d-flex align-items-center flex-grow">
|
|
32
|
-
<label
|
|
41
|
+
<label
|
|
42
|
+
for="search"
|
|
43
|
+
class="d-inline"
|
|
44
|
+
:aria-label="$t('Search')"
|
|
45
|
+
/>
|
|
33
46
|
<input
|
|
34
47
|
id="search"
|
|
48
|
+
ref="search"
|
|
35
49
|
class="filter-search-input input-no-outline"
|
|
36
50
|
:placeholder="searchText"
|
|
37
51
|
:value="searchPattern"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
event =>
|
|
52
|
+
:readonly="notInitFocus"
|
|
53
|
+
@input="
|
|
54
|
+
event => $emit('updateSearchPattern', event.target.value)
|
|
41
55
|
"
|
|
42
|
-
|
|
56
|
+
>
|
|
43
57
|
</div>
|
|
44
58
|
</div>
|
|
45
59
|
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts">
|
|
62
|
+
import { state } from '../../../store/paramStore';
|
|
63
|
+
import { orgaFilter } from '../../mixins/organisationFilter';
|
|
64
|
+
import { Organisation } from '@/store/class/organisation';
|
|
65
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
66
|
+
const OrganisationChooser = defineAsyncComponent(() => import('../organisation/OrganisationChooser.vue'));
|
|
67
|
+
export default defineComponent({
|
|
68
|
+
components: {
|
|
69
|
+
OrganisationChooser,
|
|
70
|
+
},
|
|
71
|
+
mixins:[orgaFilter],
|
|
72
|
+
|
|
73
|
+
props: {
|
|
74
|
+
organisationId: { default: undefined, type: String},
|
|
75
|
+
searchPattern: { default: '', type: String },
|
|
76
|
+
type: { default: 'podcast', type: String },
|
|
77
|
+
},
|
|
78
|
+
emits: ['updateOrganisationId', 'updateSearchPattern'],
|
|
79
|
+
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
keepOrganisation: false as boolean,
|
|
83
|
+
showBubble: false as boolean,
|
|
84
|
+
imgUrl: '' as string,
|
|
85
|
+
notInitFocus: true as boolean
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
computed: {
|
|
90
|
+
isPodcastmaker(): boolean {
|
|
91
|
+
return state.generalParameters.podcastmaker;
|
|
92
|
+
},
|
|
93
|
+
searchText(): string {
|
|
94
|
+
if ('emission' === this.type) return this.$t('Look for emission name').toString();
|
|
95
|
+
if ('participant' === this.type)
|
|
96
|
+
return this.$t('Look for participant name').toString();
|
|
97
|
+
if ('playlist' === this.type) return this.$t('Look for playlist name').toString();
|
|
98
|
+
return this.$t('Look for podcast name').toString();
|
|
99
|
+
},
|
|
100
|
+
filterOrga(): string {
|
|
101
|
+
return this.$store.state.filter.organisationId;
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
filterOrga(): void {
|
|
106
|
+
if (this.filterOrga) {
|
|
107
|
+
this.keepOrganisation = true;
|
|
108
|
+
this.$emit('updateOrganisationId', this.filterOrga);
|
|
109
|
+
} else {
|
|
110
|
+
this.keepOrganisation = false;
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
async created() {
|
|
115
|
+
if (!this.organisationId) return;
|
|
116
|
+
if(this.$store.state.filter.organisationId === this.organisationId){
|
|
117
|
+
this.keepOrganisation = true;
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
mounted() {
|
|
121
|
+
if (this.$refs.search) {
|
|
122
|
+
(this.$refs.search as HTMLElement).focus();
|
|
123
|
+
this.notInitFocus = false;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
methods: {
|
|
127
|
+
onOrganisationSelected(organisation: Organisation): void {
|
|
128
|
+
if (this.$route.query.productor) {
|
|
129
|
+
this.$router.push({ query: { productor: undefined } });
|
|
130
|
+
}
|
|
131
|
+
this.imgUrl = organisation.imageUrl;
|
|
132
|
+
this.$store.commit('filterOrga', {
|
|
133
|
+
orgaId: undefined,
|
|
134
|
+
});
|
|
135
|
+
this.keepOrganisation = false;
|
|
136
|
+
if (organisation && organisation.id) {
|
|
137
|
+
this.showBubble = true;
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
this.showBubble = false;
|
|
140
|
+
}, 6000);
|
|
141
|
+
this.$emit('updateOrganisationId', organisation.id);
|
|
142
|
+
} else {
|
|
143
|
+
this.$emit('updateOrganisationId', undefined);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
async onKeepOrganisation(): Promise<void> {
|
|
147
|
+
if(!this.organisationId){return}
|
|
148
|
+
if (!this.keepOrganisation) {
|
|
149
|
+
if (this.$route.query.productor !== this.organisationId) {
|
|
150
|
+
this.$router.push({ query: { productor: this.organisationId } });
|
|
151
|
+
}
|
|
152
|
+
await this.selectOrganisation(this.organisationId);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (this.$route.query.productor) {
|
|
156
|
+
this.$router.push({ query: { productor: undefined } });
|
|
157
|
+
}
|
|
158
|
+
this.$store.commit('filterOrga', { orgaId: undefined });
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
})
|
|
162
|
+
</script>
|
|
163
|
+
|
|
46
164
|
<style lang="scss">
|
|
47
165
|
@import '../../../sass/_variables.scss';
|
|
48
166
|
|
|
@@ -110,126 +228,4 @@
|
|
|
110
228
|
margin-right: 0;
|
|
111
229
|
}
|
|
112
230
|
}
|
|
113
|
-
</style>
|
|
114
|
-
<script lang="ts">
|
|
115
|
-
// @ is an alias to /src
|
|
116
|
-
import OrganisationChooser from '../organisation/OrganisationChooser.vue';
|
|
117
|
-
import { state } from '../../../store/paramStore';
|
|
118
|
-
const octopusApi = require('@saooti/octopus-api');
|
|
119
|
-
|
|
120
|
-
import { defineComponent, ref } from 'vue'
|
|
121
|
-
export default defineComponent({
|
|
122
|
-
components: {
|
|
123
|
-
OrganisationChooser,
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
props: {
|
|
127
|
-
organisationId: { default: undefined as any },
|
|
128
|
-
searchPattern: { default: '' },
|
|
129
|
-
type: { default: 'podcast' },
|
|
130
|
-
},
|
|
131
|
-
emits: ['updateOrganisationId', 'updateSearchPattern'],
|
|
132
|
-
setup() {
|
|
133
|
-
const search : any = ref(null);
|
|
134
|
-
return {
|
|
135
|
-
search,
|
|
136
|
-
};
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
async created() {
|
|
140
|
-
if (!this.organisationId) return;
|
|
141
|
-
this.$store.commit('filterOrga', { orgaId: this.organisationId });
|
|
142
|
-
const isLive = await octopusApi.liveEnabledOrganisation(
|
|
143
|
-
this.organisationId
|
|
144
|
-
);
|
|
145
|
-
this.$store.commit('filterOrgaLive', isLive);
|
|
146
|
-
this.keepOrganisation = true;
|
|
147
|
-
if (!this.$route.query.productor) {
|
|
148
|
-
this.$router.replace({ query: { productor: this.organisationId } });
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
mounted() {
|
|
153
|
-
if (this.search) {
|
|
154
|
-
this.search.focus();
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
data() {
|
|
159
|
-
return {
|
|
160
|
-
keepOrganisation: false,
|
|
161
|
-
showBubble: false,
|
|
162
|
-
imgUrl: undefined as any,
|
|
163
|
-
};
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
computed: {
|
|
167
|
-
isPodcastmaker() {
|
|
168
|
-
return state.generalParameters.podcastmaker;
|
|
169
|
-
},
|
|
170
|
-
searchText():string {
|
|
171
|
-
if ('emission' === this.type) return this.$t('Look for emission name');
|
|
172
|
-
if ('participant' === this.type)
|
|
173
|
-
return this.$t('Look for participant name');
|
|
174
|
-
if ('playlist' === this.type) return this.$t('Look for playlist name');
|
|
175
|
-
return this.$t('Look for podcast name');
|
|
176
|
-
},
|
|
177
|
-
filterOrga():any {
|
|
178
|
-
return this.$store.state.filter.organisationId;
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
methods: {
|
|
183
|
-
onOrganisationSelected(organisation: any) {
|
|
184
|
-
if (this.$route.query.productor) {
|
|
185
|
-
this.$router.push({ query: { productor: undefined } });
|
|
186
|
-
}
|
|
187
|
-
this.imgUrl = organisation.imageUrl;
|
|
188
|
-
this.$store.commit('filterOrga', {
|
|
189
|
-
orgaId: undefined as any,
|
|
190
|
-
imgUrl: this.imgUrl,
|
|
191
|
-
});
|
|
192
|
-
this.keepOrganisation = false;
|
|
193
|
-
if (organisation && organisation.id) {
|
|
194
|
-
this.showBubble = true;
|
|
195
|
-
setTimeout(() => {
|
|
196
|
-
this.showBubble = false;
|
|
197
|
-
}, 6000);
|
|
198
|
-
this.$emit('updateOrganisationId', organisation.id);
|
|
199
|
-
} else {
|
|
200
|
-
this.$emit('updateOrganisationId', undefined);
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
async onKeepOrganisation() {
|
|
204
|
-
if (!this.keepOrganisation) {
|
|
205
|
-
if (this.$route.query.productor !== this.organisationId) {
|
|
206
|
-
this.$router.push({ query: { productor: this.organisationId } });
|
|
207
|
-
}
|
|
208
|
-
this.$store.commit('filterOrga', {
|
|
209
|
-
orgaId: this.organisationId,
|
|
210
|
-
imgUrl: this.imgUrl,
|
|
211
|
-
});
|
|
212
|
-
const isLive = await octopusApi.liveEnabledOrganisation(
|
|
213
|
-
this.organisationId
|
|
214
|
-
);
|
|
215
|
-
this.$store.commit('filterOrgaLive', isLive);
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
if (this.$route.query.productor) {
|
|
219
|
-
this.$router.push({ query: { productor: undefined } });
|
|
220
|
-
}
|
|
221
|
-
this.$store.commit('filterOrga', { orgaId: undefined });
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
watch: {
|
|
225
|
-
filterOrga():any {
|
|
226
|
-
if (this.filterOrga) {
|
|
227
|
-
this.keepOrganisation = true;
|
|
228
|
-
this.$emit('updateOrganisationId', this.filterOrga);
|
|
229
|
-
} else {
|
|
230
|
-
this.keepOrganisation = false;
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
});
|
|
235
|
-
</script>
|
|
231
|
+
</style>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex align-items-center">
|
|
3
|
+
<label class="wrap">
|
|
4
|
+
<select
|
|
5
|
+
v-model="rubriquageId"
|
|
6
|
+
class="basic-select ms-2 mb-0 border c-hand"
|
|
7
|
+
@change="onRubriquageSelected"
|
|
8
|
+
>
|
|
9
|
+
<option
|
|
10
|
+
v-for="rubriquage in rubriquageDisplay"
|
|
11
|
+
:key="rubriquage.rubriquageId"
|
|
12
|
+
:value="rubriquage.rubriquageId"
|
|
13
|
+
>{{ rubriquage.title }}</option>
|
|
14
|
+
</select>
|
|
15
|
+
<div
|
|
16
|
+
class="saooti-arrow_down octopus-arrow-down-2 classic-select"
|
|
17
|
+
/>
|
|
18
|
+
</label>
|
|
19
|
+
<template v-if="rubriquageId">
|
|
20
|
+
<div class="ms-3 flex-shrink">
|
|
21
|
+
{{ $t('By rubric') }}
|
|
22
|
+
</div>
|
|
23
|
+
<RubriqueChooser
|
|
24
|
+
v-if="getRubriques(rubriquageId).length"
|
|
25
|
+
class="ms-2"
|
|
26
|
+
:multiple="false"
|
|
27
|
+
:rubriquage-id="rubriquageId"
|
|
28
|
+
:rubrique-selected="0 < rubriqueIdSelected? rubriqueIdSelected : undefined"
|
|
29
|
+
:all-rubriques="getRubriques(rubriquageId)"
|
|
30
|
+
:defaultanswer="$t('No rubric filter')"
|
|
31
|
+
:reset="reset"
|
|
32
|
+
:without-rubrique="true"
|
|
33
|
+
width="auto"
|
|
34
|
+
@selected="onRubriqueSelected"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
<button
|
|
38
|
+
v-if="index"
|
|
39
|
+
class="btn btn-circle primary-color ms-1"
|
|
40
|
+
aria-label="delete"
|
|
41
|
+
@click="deleteRubriquage"
|
|
42
|
+
>
|
|
43
|
+
<span class="saooti-bin" />
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts">
|
|
49
|
+
import { Rubriquage } from '@/store/class/rubriquage';
|
|
50
|
+
import { Rubrique } from '@/store/class/rubrique';
|
|
51
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
52
|
+
const RubriqueChooser = defineAsyncComponent(() => import('../rubriques/RubriqueChooser.vue'));
|
|
53
|
+
export default defineComponent({
|
|
54
|
+
components: {
|
|
55
|
+
RubriqueChooser,
|
|
56
|
+
},
|
|
57
|
+
props: {
|
|
58
|
+
rubriquageDisplay: { default: () => [], type: Array as ()=>Array<Rubriquage>},
|
|
59
|
+
rubriquageIdSelected:{default: 0, type: Number},
|
|
60
|
+
rubriqueIdSelected: { default: 0, type: Number},
|
|
61
|
+
index: { default: 0, type: Number},
|
|
62
|
+
},
|
|
63
|
+
emits: ['deleteRubriqueChoice', 'updateRubrique', 'updateRubriquage'],
|
|
64
|
+
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
rubriquageId: undefined as number|undefined,
|
|
68
|
+
rubriqueId: undefined as number|undefined,
|
|
69
|
+
reset: false as boolean,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
created(){
|
|
74
|
+
this.rubriquageId = this.rubriquageIdSelected;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
methods: {
|
|
78
|
+
deleteRubriquage(){
|
|
79
|
+
this.$emit('deleteRubriqueChoice');
|
|
80
|
+
},
|
|
81
|
+
getRubriques(rubriquageId: number): Array<Rubrique> {
|
|
82
|
+
const topicIndex = this.rubriquageDisplay.findIndex(
|
|
83
|
+
( element: Rubriquage) => element.rubriquageId === rubriquageId
|
|
84
|
+
);
|
|
85
|
+
if(-1 !== topicIndex){
|
|
86
|
+
return this.rubriquageDisplay[topicIndex].rubriques;
|
|
87
|
+
}
|
|
88
|
+
return [];
|
|
89
|
+
},
|
|
90
|
+
onRubriqueSelected(rubrique: Rubrique): void {
|
|
91
|
+
if (rubrique.rubriqueId === this.rubriqueId) return;
|
|
92
|
+
this.rubriqueId = rubrique.rubriqueId;
|
|
93
|
+
this.$emit('updateRubrique', {rubriqueId : rubrique.rubriqueId, index: this.index});
|
|
94
|
+
},
|
|
95
|
+
onRubriquageSelected(): void {
|
|
96
|
+
this.reset = !this.reset;
|
|
97
|
+
this.rubriqueId = 0;
|
|
98
|
+
this.$emit('updateRubriquage', {rubriquageId : this.rubriquageId, index: this.index});
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
})
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style lang="scss"></style>
|