@saooti/octopus-sdk 36.0.5 → 36.0.6
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/index.ts +1 -2
- package/package.json +3 -2
- package/src/assets/bootstrap.scss +11 -1
- package/src/components/display/categories/CategoryChooser.vue +79 -171
- package/src/components/display/categories/CategoryFilter.vue +10 -4
- package/src/components/display/emission/EmissionPlayerItem.vue +4 -1
- package/src/components/display/filter/CategorySearchFilter.vue +1 -1
- package/src/components/display/filter/ProductorSearch.vue +6 -16
- package/src/components/display/filter/RubriqueChoice.vue +1 -1
- package/src/components/display/filter/RubriqueFilter.vue +2 -1
- package/src/components/display/list/Paginate.vue +4 -1
- package/src/components/display/organisation/OrganisationChooser.vue +72 -200
- package/src/components/display/podcasts/PodcastFilterList.vue +5 -3
- package/src/components/display/podcasts/PodcastImage.vue +3 -1
- package/src/components/display/podcasts/PodcastModuleBox.vue +17 -5
- package/src/components/display/podcasts/TagList.vue +2 -2
- package/src/components/display/rubriques/RubriqueChooser.vue +87 -181
- package/src/components/display/rubriques/RubriqueList.vue +8 -5
- package/src/components/display/sharing/PlayerParameters.vue +3 -1
- package/src/components/display/sharing/ShareButtons.vue +5 -3
- package/src/components/display/sharing/ShareButtonsIntern.vue +24 -8
- package/src/components/display/sharing/ShareDistribution.vue +3 -1
- package/src/components/display/sharing/SharePlayer.vue +3 -1
- package/src/components/display/sharing/SharePlayerColors.vue +6 -2
- package/src/components/form/ClassicCheckbox.vue +1 -1
- package/src/components/form/ClassicMultiselect.vue +155 -0
- package/src/components/misc/TopBar.vue +8 -4
- package/src/components/misc/modal/NewsletterModal.vue +1 -1
- package/src/components/pages/Emission.vue +5 -2
- package/src/components/pages/Home.vue +3 -3
- package/src/components/pages/Playlist.vue +4 -1
- package/src/components/pages/Podcast.vue +4 -1
- package/src/stores/ParamSdkStore.ts +13 -13
- package/src/stores/class/general/organisation.ts +8 -0
- package/src/assets/multiselect.scss +0 -518
- package/src/components/display/emission/EmissionChooser.vue +0 -187
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="default-multiselect-width"
|
|
4
|
-
:style="{ width: width }"
|
|
5
|
-
>
|
|
6
|
-
<label
|
|
7
|
-
for="emissionChooser"
|
|
8
|
-
class="d-inline"
|
|
9
|
-
title="select emission"
|
|
10
|
-
/>
|
|
11
|
-
<VueMultiselect
|
|
12
|
-
id="emissionChooser"
|
|
13
|
-
ref="multiselectRef"
|
|
14
|
-
v-model="emission"
|
|
15
|
-
label="name"
|
|
16
|
-
track-by="emissionId"
|
|
17
|
-
:aria-expanded="false"
|
|
18
|
-
:placeholder="$t('Type string to filter by emission')"
|
|
19
|
-
:options="emissions"
|
|
20
|
-
:multiple="false"
|
|
21
|
-
:searchable="true"
|
|
22
|
-
:loading="isLoading"
|
|
23
|
-
:internal-search="false"
|
|
24
|
-
:clear-on-select="false"
|
|
25
|
-
:close-on-select="true"
|
|
26
|
-
:options-limit="200"
|
|
27
|
-
:max-height="600"
|
|
28
|
-
:show-no-results="true"
|
|
29
|
-
:hide-selected="true"
|
|
30
|
-
:show-labels="false"
|
|
31
|
-
@search-change="onSearchEmission"
|
|
32
|
-
@open="onOpen"
|
|
33
|
-
@select="onEmissionSelected"
|
|
34
|
-
>
|
|
35
|
-
<template #clear="{ props }">
|
|
36
|
-
<div
|
|
37
|
-
v-if="emission"
|
|
38
|
-
class="multiselect__clear"
|
|
39
|
-
@mousedown.prevent.stop="clearAll(props.search)"
|
|
40
|
-
/>
|
|
41
|
-
</template>
|
|
42
|
-
<template #singleLabel="{ option }">
|
|
43
|
-
<div class="multiselect-octopus-proposition">
|
|
44
|
-
<span class="option__title">{{ option.name }}</span>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
<template #option="{ option }">
|
|
48
|
-
<div class="multiselect-octopus-proposition">
|
|
49
|
-
<span class="option__title">{{ option.name }}</span>
|
|
50
|
-
</div>
|
|
51
|
-
</template>
|
|
52
|
-
<template #noResult="">
|
|
53
|
-
<span>{{ $t('No elements found. Consider changing the search query.') }}</span>
|
|
54
|
-
</template>
|
|
55
|
-
<template #afterList="">
|
|
56
|
-
<div
|
|
57
|
-
v-if="remainingElements"
|
|
58
|
-
class="multiselect-remaining-elements"
|
|
59
|
-
>
|
|
60
|
-
{{
|
|
61
|
-
$t(
|
|
62
|
-
'Count more elements matched your query, please make a more specific search.',
|
|
63
|
-
{ count: remainingElements }
|
|
64
|
-
)
|
|
65
|
-
}}
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
68
|
-
<template #noOptions="">
|
|
69
|
-
{{ $t('List is empty') }}
|
|
70
|
-
</template>
|
|
71
|
-
<template #caret="">
|
|
72
|
-
<div class="position-relative">
|
|
73
|
-
<span
|
|
74
|
-
class="saooti-down octopus-arrow-down-absolute"
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
</template>
|
|
78
|
-
</VueMultiselect>
|
|
79
|
-
</div>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script lang="ts">
|
|
83
|
-
//@ts-ignore
|
|
84
|
-
import VueMultiselect from 'vue-multiselect';
|
|
85
|
-
import octopusApi from '@saooti/octopus-api';
|
|
86
|
-
|
|
87
|
-
const ELEMENTS_COUNT = 50;
|
|
88
|
-
const DEFAULT_EMISSION_ID = 0;
|
|
89
|
-
|
|
90
|
-
const getDefaultEmission = (defaultName: string): Emission|undefined => {
|
|
91
|
-
if(''=== defaultName){
|
|
92
|
-
return undefined;
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
name: defaultName,
|
|
96
|
-
emissionId: DEFAULT_EMISSION_ID,
|
|
97
|
-
imageUrl:'',
|
|
98
|
-
description:'',
|
|
99
|
-
monetisable:'UNDEFINED',
|
|
100
|
-
orga :{
|
|
101
|
-
id:'',
|
|
102
|
-
imageUrl:'',
|
|
103
|
-
name:''
|
|
104
|
-
},
|
|
105
|
-
rubriqueIds:[],
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
import { Emission } from '@/stores/class/general/emission';
|
|
110
|
-
import { defineComponent } from 'vue'
|
|
111
|
-
export default defineComponent({
|
|
112
|
-
components: {
|
|
113
|
-
VueMultiselect
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
props: {
|
|
117
|
-
width: { default: '100%', type: String },
|
|
118
|
-
defaultanswer: { default: '', type: String },
|
|
119
|
-
organisationId: { default: undefined, type: String},
|
|
120
|
-
emissionChosen: { default: undefined, type: Object as ()=>Emission},
|
|
121
|
-
distributedBy: { default: undefined, type: String},
|
|
122
|
-
organisationDistributedBy: { default: undefined, type: String},
|
|
123
|
-
reset: { default: false, type: Boolean },
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
emits: ['selected'],
|
|
127
|
-
|
|
128
|
-
data() {
|
|
129
|
-
return{
|
|
130
|
-
emission: getDefaultEmission(this.defaultanswer),
|
|
131
|
-
emissions: [] as Array<Emission>,
|
|
132
|
-
remainingElements: 0 as number,
|
|
133
|
-
isLoading: false as boolean,
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
|
-
watch: {
|
|
137
|
-
emissionChosen: {
|
|
138
|
-
deep: true,
|
|
139
|
-
handler(){
|
|
140
|
-
this.emission = this.emissionChosen;
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
reset(): void {
|
|
144
|
-
this.emission = getDefaultEmission(this.defaultanswer);
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
methods: {
|
|
149
|
-
onOpen(): void {
|
|
150
|
-
(this.$refs.multiselectRef as VueMultiselect).$refs.search.setAttribute(
|
|
151
|
-
'autocomplete',
|
|
152
|
-
'off'
|
|
153
|
-
);
|
|
154
|
-
this.onSearchEmission();
|
|
155
|
-
},
|
|
156
|
-
onEmissionSelected(emission: Emission): void {
|
|
157
|
-
this.$emit('selected', emission);
|
|
158
|
-
},
|
|
159
|
-
async onSearchEmission(query?: string): Promise<void> {
|
|
160
|
-
this.isLoading = true;
|
|
161
|
-
const response = await octopusApi.fetchDataWithParams<{count: number;result:Array<Emission>;sort: string;}>(0, 'emission/search',{
|
|
162
|
-
query: query,
|
|
163
|
-
first: 0,
|
|
164
|
-
size: ELEMENTS_COUNT,
|
|
165
|
-
distributedBy: this.distributedBy??this.organisationDistributedBy,
|
|
166
|
-
organisationId:this.distributedBy? undefined: this.organisationId
|
|
167
|
-
}, true);
|
|
168
|
-
if (this.defaultanswer) {
|
|
169
|
-
const emissionDefault = getDefaultEmission(this.defaultanswer);
|
|
170
|
-
if(emissionDefault){
|
|
171
|
-
this.emissions = [emissionDefault].concat(
|
|
172
|
-
response.result
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
} else {
|
|
176
|
-
this.emissions = response.result.concat();
|
|
177
|
-
}
|
|
178
|
-
this.isLoading = false;
|
|
179
|
-
this.remainingElements = Math.max(0, response.count - ELEMENTS_COUNT);
|
|
180
|
-
},
|
|
181
|
-
clearAll(): void {
|
|
182
|
-
this.emission = undefined;
|
|
183
|
-
this.emissions.length = 0;
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
})
|
|
187
|
-
</script>
|