@saooti/octopus-sdk 36.0.5 → 36.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/index.ts +1 -2
  2. package/package.json +3 -2
  3. package/src/assets/bootstrap.scss +11 -1
  4. package/src/assets/octopus-library.scss +0 -1
  5. package/src/assets/share.scss +0 -6
  6. package/src/components/display/categories/CategoryChooser.vue +81 -171
  7. package/src/components/display/categories/CategoryFilter.vue +9 -4
  8. package/src/components/display/emission/EmissionPlayerItem.vue +4 -1
  9. package/src/components/display/filter/CategorySearchFilter.vue +1 -1
  10. package/src/components/display/filter/MonetizableFilter.vue +16 -13
  11. package/src/components/display/filter/ProductorSearch.vue +6 -16
  12. package/src/components/display/filter/RubriqueChoice.vue +12 -16
  13. package/src/components/display/filter/RubriqueFilter.vue +2 -1
  14. package/src/components/display/list/Paginate.vue +4 -1
  15. package/src/components/display/organisation/OrganisationChooser.vue +76 -201
  16. package/src/components/display/podcasts/PodcastFilterList.vue +5 -3
  17. package/src/components/display/podcasts/PodcastImage.vue +3 -1
  18. package/src/components/display/podcasts/PodcastModuleBox.vue +17 -5
  19. package/src/components/display/podcasts/TagList.vue +2 -2
  20. package/src/components/display/rubriques/RubriqueChooser.vue +87 -181
  21. package/src/components/display/rubriques/RubriqueList.vue +8 -5
  22. package/src/components/display/sharing/PlayerParameters.vue +3 -1
  23. package/src/components/display/sharing/ShareButtons.vue +5 -3
  24. package/src/components/display/sharing/ShareButtonsIntern.vue +24 -8
  25. package/src/components/display/sharing/ShareDistribution.vue +3 -1
  26. package/src/components/display/sharing/SharePlayer.vue +3 -1
  27. package/src/components/display/sharing/SharePlayerColors.vue +6 -2
  28. package/src/components/form/ClassicCheckbox.vue +1 -1
  29. package/src/components/form/ClassicMultiselect.vue +192 -0
  30. package/src/components/misc/TopBar.vue +8 -4
  31. package/src/components/misc/modal/NewsletterModal.vue +1 -1
  32. package/src/components/pages/Emission.vue +5 -2
  33. package/src/components/pages/Home.vue +3 -3
  34. package/src/components/pages/Playlist.vue +4 -1
  35. package/src/components/pages/Podcast.vue +4 -1
  36. package/src/locale/de.ts +1 -0
  37. package/src/locale/en.ts +1 -0
  38. package/src/locale/es.ts +1 -0
  39. package/src/locale/fr.ts +1 -0
  40. package/src/locale/it.ts +1 -0
  41. package/src/locale/sl.ts +1 -0
  42. package/src/stores/ParamSdkStore.ts +13 -13
  43. package/src/stores/class/general/organisation.ts +8 -0
  44. package/src/assets/multiselect.scss +0 -518
  45. package/src/components/display/emission/EmissionChooser.vue +0 -187
@@ -1,518 +0,0 @@
1
- /* Added styles */
2
- .octopus-app{
3
-
4
- .default-multiselect-width {
5
- width: auto;
6
- font-size: 1rem;
7
- }
8
- .multiselect-transparent{
9
- .multiselect__tags, .multiselect__input, .multiselect__single{
10
- background: transparent !important;
11
- }
12
- .multiselect__tags-wrap{
13
- display: flex;
14
- align-items: center;
15
- flex-wrap: wrap;
16
- }
17
- .multiselect__tags{
18
- border: 0;
19
- padding-left: 0;
20
- padding-top: 0;
21
- display: flex;
22
- align-items: center;
23
- }
24
- .multiselect__tag{
25
- margin-top: 5px;
26
- border: 1px gray solid;
27
- }
28
- }
29
-
30
- .multiselect-octopus-proposition{
31
- display: flex;
32
- align-items: center;
33
- overflow: hidden;
34
- text-overflow: ellipsis;
35
- .option__image {
36
- height: 32px;
37
- width: 32px;
38
- border-radius: 50px;
39
- margin: 0 0.5rem 0 0;
40
- }
41
- .option__title {
42
- padding-left: 0;
43
- overflow: hidden;
44
- text-overflow: ellipsis;
45
- white-space: nowrap;
46
- }
47
- }
48
-
49
- .multiselect-remaining-elements {
50
- text-align: center;
51
- font-weight: 500;
52
- font-size: 0.65rem;
53
- margin: 0.2rem;
54
- }
55
- .octopus-arrow-down-absolute
56
- {
57
- position: absolute;
58
- right: 10px;
59
- top: 0.7rem;
60
- cursor: pointer;
61
- }
62
-
63
-
64
- /************************************************************************/
65
-
66
-
67
- fieldset[disabled] .multiselect {
68
- pointer-events: none;
69
- }
70
-
71
- .multiselect__spinner {
72
- position: absolute;
73
- right: 1px;
74
- top: 1px;
75
- width: 48px;
76
- height: 35px;
77
- display: block;
78
- }
79
-
80
- .multiselect__spinner:after,
81
- .multiselect__spinner:before {
82
- position: absolute;
83
- content: "";
84
- top: 50%;
85
- left: 50%;
86
- margin: -8px 0 0 -8px;
87
- width: 16px;
88
- height: 16px;
89
- border-radius: 100%;
90
- border: 2px solid transparent;
91
- border-top-color: #000000;
92
- box-shadow: 0 0 0 1px transparent;
93
- }
94
-
95
- .multiselect__spinner:before {
96
- animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
97
- animation-iteration-count: infinite;
98
- }
99
-
100
- .multiselect__spinner:after {
101
- animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
102
- animation-iteration-count: infinite;
103
- }
104
-
105
- .multiselect__loading-enter-active,
106
- .multiselect__loading-leave-active {
107
- transition: opacity 0.4s ease-in-out;
108
- opacity: 1;
109
- }
110
-
111
- .multiselect__loading-enter,
112
- .multiselect__loading-leave-active {
113
- opacity: 0;
114
- }
115
-
116
- .multiselect,
117
- .multiselect__input,
118
- .multiselect__single {
119
- font-family: inherit;
120
- font-size: 16px;
121
- -ms-touch-action: manipulation;
122
- touch-action: manipulation;
123
- }
124
-
125
- .multiselect {
126
- box-sizing: content-box;
127
- display: block;
128
- position: relative;
129
- min-height: 40px;
130
- text-align: left;
131
- color: #35495e;
132
- }
133
-
134
- .multiselect-white .multiselect{
135
- color: white !important;
136
- }
137
-
138
-
139
-
140
- .multiselect * {
141
- box-sizing: border-box;
142
- }
143
-
144
- .multiselect--disabled {
145
- background: #ededed;
146
- pointer-events: none;
147
- opacity: 0.6;
148
- }
149
-
150
- .multiselect--active {
151
- z-index: 50;
152
- }
153
-
154
- .multiselect--active .multiselect__select {
155
- transform: rotate(180deg);
156
- }
157
-
158
- .multiselect__input,
159
- .multiselect__single {
160
- position: relative;
161
- display: inline-block;
162
- min-height: 20px;
163
- line-height: 28px;
164
- border: none;
165
- border-radius: $octopus-borderradius;
166
- padding: 0 0 0 5px;
167
- width: 100%;
168
- transition: border 0.1s ease;
169
- box-sizing: border-box;
170
- margin-bottom: 8px;
171
- vertical-align: top;
172
- }
173
-
174
- .multiselect__input:-ms-input-placeholder {
175
- color: #35495e;
176
- }
177
-
178
- .multiselect__input::placeholder {
179
- color: #35495e;
180
- }
181
-
182
- .multiselect__tag~.multiselect__input,
183
- .multiselect__tag~.multiselect__single {
184
- width: auto;
185
- }
186
-
187
- .multiselect__input:hover,
188
- .multiselect__single:hover {
189
- border-color: #cfcfcf;
190
- }
191
-
192
- .multiselect__input:focus,
193
- .multiselect__single:focus {
194
- border-color: #a8a8a8;
195
- }
196
-
197
- .multiselect__single {
198
- padding-left: 5px;
199
- margin-bottom: 0px;
200
- }
201
-
202
- .multiselect__tags-wrap {
203
- display: inline;
204
- }
205
-
206
- .multiselect__tags {
207
- min-height: 45px;
208
- display: flex;
209
- padding-right: 40px;
210
- padding-left: 5px;
211
- align-items: center;
212
- border-radius: $octopus-borderradius;
213
- border: 0.1rem solid #dee2e6;
214
- background: #fff;
215
- font-size: 14px;
216
- @media (max-width: 960px) {
217
- padding: 10px 40px 5px 0;
218
- margin: 0;
219
- }
220
- }
221
-
222
- .multiselect__tag {
223
- position: relative;
224
- display: inline-block;
225
- padding: 4px 26px 4px 10px;
226
- border-radius: $octopus-borderradius;
227
- margin-right: 10px;
228
- color: black;
229
- line-height: 1;
230
- background: #f8f9fa;
231
- margin-bottom: 5px;
232
- white-space: nowrap;
233
- overflow: hidden;
234
- max-width: 100%;
235
- text-overflow: ellipsis;
236
- }
237
-
238
- .multiselect__tag-icon {
239
- cursor: pointer;
240
- margin-left: 7px;
241
- position: absolute;
242
- right: 0;
243
- top: 0;
244
- bottom: 0;
245
- font-weight: 700;
246
- font-style: normal;
247
- width: 22px;
248
- text-align: center;
249
- line-height: 22px;
250
- transition: all 0.2s ease;
251
- border-radius: $octopus-borderradius;
252
- }
253
-
254
- .multiselect__tag-icon:after {
255
- content: "\D7";
256
- color: #266d4d;
257
- font-size: 14px;
258
- }
259
-
260
- .multiselect__tag-icon:focus,
261
- .multiselect__tag-icon:hover {
262
- background:#d33e3d;
263
- }
264
-
265
- .multiselect__tag-icon:focus:after,
266
- .multiselect__tag-icon:hover:after {
267
- color: #fff;
268
- }
269
-
270
- .multiselect__current {
271
- min-height: 40px;
272
- overflow: hidden;
273
- padding: 8px 30px 0 12px;
274
- white-space: nowrap;
275
- border-radius: $octopus-borderradius;
276
- border: 1px solid #e8e8e8;
277
- }
278
-
279
- .multiselect__current,
280
- .multiselect__select {
281
- line-height: 16px;
282
- box-sizing: border-box;
283
- display: block;
284
- margin: 0;
285
- text-decoration: none;
286
- cursor: pointer;
287
- }
288
-
289
- .multiselect__select {
290
- position: absolute;
291
- width: 40px;
292
- height: 40px;
293
- right: 1px;
294
- top: 1px;
295
- padding: 4px 8px;
296
- text-align: center;
297
- transition: transform 0.2s ease;
298
- display: flex;
299
- align-items: center;
300
- justify-content: center;
301
- }
302
-
303
- .multiselect__select:before {
304
- position: relative;
305
- right: 0;
306
- top: 0;
307
- color: #999;
308
- margin-top: 4px;
309
- border-color: #999 transparent transparent;
310
- border-style: solid;
311
- border-width: 5px 5px 0;
312
- content: "";
313
- }
314
-
315
- .multiselect__placeholder {
316
- color: #757575;
317
- display: inline-block;
318
- }
319
-
320
- .multiselect--active .multiselect__placeholder {
321
- display: none;
322
- }
323
-
324
- .multiselect__content-wrapper {
325
- position: absolute;
326
- display: block;
327
- background: #fff;
328
- width: 100%;
329
- max-height: 240px;
330
- overflow: auto;
331
- border: 1px solid #e8e8e8;
332
- border-top: none;
333
- border-bottom-left-radius: 5px;
334
- border-bottom-right-radius: 5px;
335
- z-index: 50;
336
- -webkit-overflow-scrolling: touch;
337
- }
338
- .multiselect-white .multiselect__content-wrapper{
339
- background: black;
340
- }
341
-
342
-
343
- .multiselect__content {
344
- list-style: none;
345
- display: inline-block;
346
- padding: 0;
347
- margin: 0;
348
- width: 100%;
349
- vertical-align: top;
350
- }
351
-
352
- .multiselect--above .multiselect__content-wrapper {
353
- bottom: 100%;
354
- border-bottom-left-radius: 0;
355
- border-bottom-right-radius: 0;
356
- border-top-left-radius: 5px;
357
- border-top-right-radius: 5px;
358
- border-bottom: none;
359
- border-top: 1px solid #e8e8e8;
360
- }
361
-
362
- .multiselect__element {
363
- display: block;
364
- }
365
-
366
- .multiselect__option {
367
- display: block;
368
- padding: 12px;
369
- min-height: 40px;
370
- line-height: 16px;
371
- text-decoration: none;
372
- text-transform: none;
373
- vertical-align: middle;
374
- position: relative;
375
- cursor: pointer;
376
- white-space: nowrap;
377
- }
378
-
379
- .multiselect__option:after {
380
- top: 0;
381
- right: 0;
382
- position: absolute;
383
- line-height: 40px;
384
- padding-right: 12px;
385
- padding-left: 20px;
386
- font-size: 13px;
387
- }
388
-
389
- .multiselect__option--highlight {
390
- background: #f8f9fa;
391
- color: #000;
392
- }
393
-
394
- .multiselect__option--highlight:after {
395
- content: attr(data-select);
396
- background: #f8f9fa;
397
- color: #000;
398
- }
399
-
400
- .multiselect__option--selected {
401
- background: #f3f3f3;
402
- color: #35495e;
403
- font-weight: 700;
404
- }
405
-
406
- .multiselect__option--selected:after {
407
- content: attr(data-selected);
408
- color: silver;
409
- }
410
-
411
- .multiselect__option--selected.multiselect__option--highlight {
412
- background: #ff6a6a;
413
- color: #fff;
414
- }
415
-
416
- .multiselect__option--selected.multiselect__option--highlight:after {
417
- background: #ff6a6a;
418
- content: attr(data-deselect);
419
- color: #fff;
420
- }
421
-
422
- .multiselect--disabled .multiselect__current,
423
- .multiselect--disabled .multiselect__select {
424
- background: #ededed;
425
- color: #a6a6a6;
426
- }
427
-
428
- .multiselect__option--disabled {
429
- background: #ededed !important;
430
- color: #a6a6a6 !important;
431
- cursor: text;
432
- pointer-events: none;
433
- }
434
-
435
- .multiselect__option--group {
436
- background: #ededed;
437
- color: #35495e;
438
- }
439
-
440
- .multiselect__option--group.multiselect__option--highlight {
441
- background: #35495e;
442
- color: #fff;
443
- }
444
-
445
- .multiselect__option--group.multiselect__option--highlight:after {
446
- background: #35495e;
447
- }
448
-
449
- .multiselect__option--disabled.multiselect__option--highlight {
450
- background: #dedede;
451
- }
452
-
453
- .multiselect__option--group-selected.multiselect__option--highlight {
454
- background: #ff6a6a;
455
- color: #fff;
456
- }
457
-
458
- .multiselect__option--group-selected.multiselect__option--highlight:after {
459
- background: #ff6a6a;
460
- content: attr(data-deselect);
461
- color: #fff;
462
- }
463
-
464
- .multiselect-enter-active,
465
- .multiselect-leave-active {
466
- transition: all 0.15s ease;
467
- }
468
-
469
- .multiselect-enter,
470
- .multiselect-leave-active {
471
- opacity: 0;
472
- }
473
-
474
- .multiselect__strong {
475
- margin-bottom: 8px;
476
- line-height: 20px;
477
- display: inline-block;
478
- vertical-align: top;
479
- }
480
-
481
- [dir="rtl"] .multiselect {
482
- text-align: right;
483
- }
484
-
485
- [dir="rtl"] .multiselect__select {
486
- right: auto;
487
- left: 1px;
488
- }
489
-
490
- [dir="rtl"] .multiselect__content {
491
- text-align: right;
492
- }
493
-
494
- [dir="rtl"] .multiselect__option:after {
495
- right: auto;
496
- left: 0;
497
- }
498
-
499
- [dir="rtl"] .multiselect__clear {
500
- right: auto;
501
- left: 12px;
502
- }
503
-
504
- [dir="rtl"] .multiselect__spinner {
505
- right: auto;
506
- left: 1px;
507
- }
508
-
509
- @keyframes spinning {
510
- 0% {
511
- transform: rotate(0);
512
- }
513
-
514
- to {
515
- transform: rotate(2turn);
516
- }
517
- }
518
- }
@@ -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>