@saooti/octopus-sdk 32.0.20 → 32.0.23

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 CHANGED
@@ -638,10 +638,11 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
638
638
  * 31.0.45 Live
639
639
  * 31.0.46 Pb css
640
640
  * 31.0.47 Pétouilles Css multiselect
641
- * 31.0.48 Icones change
641
+ * 31.0.48 Icones change
642
642
  * 31.0.49 Style select
643
643
  * 31.0.50 Améliorations responsive
644
644
  * 31.0.51 Newest
645
+ * 31.0.52 Locale
645
646
 
646
647
  * 32.0.0 Passage en 32
647
648
  * 32.0.1 Navigation clavier
@@ -663,4 +664,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
663
664
  * 32.0.17 AdvancedSearch components
664
665
  * 32.0.18 AdvancedSearch components
665
666
  * 32.0.19 Playlist publique
666
- * 32.0.20 Playlist publique
667
+ * 32.0.20 Playlist publique
668
+ * 32.0.21 Amélioration List Paginate
669
+ * 32.0.22 Popover
670
+ * 32.0.23 Popover encore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "32.0.20",
3
+ "version": "32.0.23",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -30,7 +30,6 @@
30
30
  justify-content: center;
31
31
  &:hover {
32
32
  border: 0;
33
- background: #f3f3f3;
34
33
  }
35
34
  }
36
35
  .icon-caution {
@@ -30,7 +30,7 @@
30
30
  @updateRubriquageFilter="updateRubriquageFilter"
31
31
  />
32
32
  <DateFilter
33
- :isEmission="isEmission"
33
+ :is-emission="isEmission"
34
34
  @updateToDate="updateToDate"
35
35
  @updateFromDate="updateFromDate"
36
36
  />
@@ -63,9 +63,9 @@
63
63
  {{ $t('Sort') }}
64
64
  </div>
65
65
  <SearchOrder
66
- :isEmission="isEmission"
67
- :isSearchBar="isSearchBar"
68
- :sortCriteria="sortCriteria"
66
+ :is-emission="isEmission"
67
+ :is-search-bar="isSearchBar"
68
+ :sort-criteria="sortCriteria"
69
69
  @updateSortCriteria="updateSortCriteria"
70
70
  />
71
71
  </div>
@@ -81,7 +81,6 @@ import DateFilter from './DateFilter.vue';
81
81
  import SearchOrder from './SearchOrder.vue';
82
82
  import RubriqueFilter from './RubriqueFilter.vue';
83
83
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
84
- import ClassicRadio from '../../form/ClassicRadio.vue';
85
84
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
86
85
  import { defineComponent, defineAsyncComponent } from 'vue';
87
86
  const MonetizableFilter = defineAsyncComponent(() => import('./MonetizableFilter.vue'));
@@ -91,7 +90,6 @@ export default defineComponent({
91
90
  CategorySearchFilter,
92
91
  RubriqueFilter,
93
92
  ClassicCheckbox,
94
- ClassicRadio,
95
93
  DateFilter,
96
94
  SearchOrder
97
95
  },
@@ -55,7 +55,6 @@
55
55
  </DatePicker>
56
56
  </div>
57
57
  </div>
58
-
59
58
  </template>
60
59
 
61
60
  <script lang="ts">
@@ -6,7 +6,7 @@
6
6
  {title:$t('Sort last'), value:isEmission?'LAST_PODCAST_DESC':'DATE'},
7
7
  {title:$t('Sort name'), value:'NAME'}]:
8
8
  [{title:$t('Sort last'), value:isEmission?'LAST_PODCAST_DESC':'DATE'},
9
- {title:$t('Sort name'), value:'NAME'}]"
9
+ {title:$t('Sort name'), value:'NAME'}]"
10
10
  />
11
11
  </template>
12
12
 
@@ -8,14 +8,17 @@
8
8
  :error-text="errorText"
9
9
  />
10
10
  <template v-if="!loading">
11
- <div class="paginate-section mb-2 page-box">
11
+ <div
12
+ v-if="!justSizeChosen"
13
+ class="paginate-section mb-2 page-box"
14
+ >
12
15
  <div class="text-secondary">
13
16
  <template v-if="textCount && (windowWidth > 1300 || windowWidth<=960)">
14
17
  {{ textCount }}
15
18
  </template>
16
19
  </div>
17
20
  <Paginate
18
- v-if="!isPhone"
21
+ v-if="!isPhone && !justSizeChosen"
19
22
  :first="first"
20
23
  :rows-per-page="rowsPerPage"
21
24
  :total-count="totalCount"
@@ -27,7 +30,7 @@
27
30
  </template>
28
31
  <slot name="list" />
29
32
  <button
30
- v-show="((first+rowsPerPage) < totalCount) && isPhone"
33
+ v-show="((first+rowsPerPage) < totalCount) && (isPhone || justSizeChosen)"
31
34
  :disabled="loading"
32
35
  class="btn"
33
36
  :class="buttonPlus ? 'btn-primary align-self-center width-fit-content m-4' : 'btn-more'"
@@ -66,7 +69,8 @@ export default defineComponent({
66
69
  loadingText:{ default: undefined, type: String},
67
70
  errorText:{ default: undefined, type: String},
68
71
  loading: { default: false, type:Boolean},
69
- isMobile: { default: false, type: Boolean}
72
+ isMobile: { default: false, type: Boolean},
73
+ justSizeChosen:{default: false, type: Boolean}
70
74
  },
71
75
 
72
76
  emits: ['update:first', 'update:rowsPerPage', 'update:isMobile'],
@@ -9,6 +9,7 @@
9
9
  :loading="loading"
10
10
  :loading-text="loading?$t('Loading podcasts ...'):undefined"
11
11
  :error-text="!loading && !podcasts.length?$t(`No podcast match your query`):undefined"
12
+ :just-size-chosen="justSizeChosen"
12
13
  >
13
14
  <template #list>
14
15
  <ul
@@ -69,6 +70,7 @@ export default defineComponent({
69
70
  rubriqueId: { default: () => [], type: Array as ()=>Array<number> },
70
71
  rubriquageId:{ default: () => [], type: Array as ()=>Array<number> },
71
72
  noRubriquageId: { default: () => [], type: Array as ()=>Array<number> },
73
+ justSizeChosen:{default: false, type: Boolean}
72
74
  },
73
75
  emits: ['fetch', 'emptyList'],
74
76
 
@@ -85,7 +87,7 @@ export default defineComponent({
85
87
 
86
88
  computed: {
87
89
  displayArray(): Array<Podcast>{
88
- if(this.isMobile){
90
+ if(this.isMobile || this.justSizeChosen){
89
91
  return this.podcasts;
90
92
  }
91
93
  return this.podcasts.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
@@ -176,7 +178,7 @@ export default defineComponent({
176
178
  });
177
179
  this.podcasts = this.podcasts.slice(0, this.dfirst).concat(responsePodcasts).concat(this.podcasts.slice(this.dfirst+this.dsize, this.podcasts.length));
178
180
  this.$emit('fetch', this.podcasts);
179
- this.totalCount = data.count;
181
+ this.totalCount = this.justSizeChosen ? this.size : data.count;
180
182
  if (0 === this.podcasts.length) {
181
183
  this.$emit('emptyList');
182
184
  }
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="bg-dark">
3
3
  <div
4
+ v-if="displayFooter"
4
5
  id="footer"
5
6
  ref="footer"
6
7
  class="d-flex-column p-3 secondary-bg border-top"
7
- v-if="displayFooter"
8
8
  >
9
9
  <div class="d-flex flex-column flex-grow-1 align-items-end">
10
10
  <div class="d-flex flex-column">
@@ -107,11 +107,11 @@ export default defineComponent({
107
107
  Player,
108
108
  ClassicSelect
109
109
  },
110
+
111
+ mixins:[cookies],
110
112
  props: {
111
113
  displayFooter: { default: true, type: Boolean},
112
114
  },
113
-
114
- mixins:[cookies],
115
115
  data() {
116
116
  return {
117
117
  language: this.$i18n.locale as string,
@@ -106,13 +106,17 @@ export default defineComponent({
106
106
  })
107
107
  </script>
108
108
  <style lang="scss">
109
- .octopus-app{
110
109
  .popover{
111
110
  max-height: 80vh;
112
- overflow: auto;
111
+ max-width: 50vw !important;
112
+ display: flex !important;
113
+ flex-direction: column;
113
114
  hr{
114
115
  width: 100px;
115
116
  }
116
- }
117
+ .popover-body{
118
+ overflow: auto;
119
+ height: 100%;
120
+ }
117
121
  }
118
122
  </style>
@@ -50,8 +50,8 @@ export const playerLogic = defineComponent({
50
50
  if(this.media || !this.podcast || !this.podcast.availability.visibility ||this.listenError){
51
51
  this.audioUrlToPlay = this.audioUrl;
52
52
  }
53
- if(!this.podcast){return;}
54
- const response = await octopusApi.fetchDataPublic<{location:string, downloadId: number}>(0,"podcast/download/register/"+ this.audioUrl);
53
+ if(!this.podcast || !this.podcast.availability.visibility ||this.listenError){return;}
54
+ const response = await octopusApi.fetchDataPublic<{location:string, downloadId: number}>(0,"podcast/download/register/"+ this.getAudioUrlParameters());
55
55
  this.setDownloadId(response.downloadId.toString());
56
56
  this.audioUrlToPlay = response.location;
57
57
  },
@@ -101,12 +101,8 @@ export const playerLogic = defineComponent({
101
101
  }
102
102
  return domain;
103
103
  },
104
- getAudioUrl(): string{
105
- if (this.media) return this.media.audioUrl? this.media.audioUrl:"";
104
+ getAudioUrlParameters(): string{
106
105
  if (!this.podcast) return '';
107
- if (!this.podcast.availability.visibility)
108
- return this.podcast.audioStorageUrl;
109
- if (this.listenError) return this.podcast.audioStorageUrl;
110
106
  const parameters = [];
111
107
  parameters.push('origin=octopus');
112
108
  parameters.push('listenerId='+this.getListenerId());
@@ -123,6 +119,14 @@ export const playerLogic = defineComponent({
123
119
  }
124
120
  return this.podcast.podcastId + '.mp3?' + parameters.join('&');
125
121
  },
122
+ getAudioUrl(): string{
123
+ if (this.media) return this.media.audioUrl? this.media.audioUrl:"";
124
+ if (!this.podcast) return '';
125
+ if (!this.podcast.availability.visibility)
126
+ return this.podcast.audioStorageUrl;
127
+ if (this.listenError) return this.podcast.audioStorageUrl;
128
+ return this.getAudioUrlParameters();
129
+ },
126
130
  reInitPlayer():void{
127
131
  this.setDownloadId(null);
128
132
  this.listenError = false;
@@ -66,7 +66,7 @@ export default defineComponent({
66
66
  },
67
67
 
68
68
  created() {
69
- this.organisationId = this.productor ?this.productor: this.filterOrga;;
69
+ this.organisationId = this.productor ?this.productor: this.filterOrga;
70
70
  },
71
71
  })
72
72
  </script>
package/src/locale/fr.ts CHANGED
@@ -297,7 +297,7 @@ export default{
297
297
  "Download started": 'Téléchargement lancé',
298
298
  'From RSS': "Issu d'un flux RSS",
299
299
  "User menu":"Menu utilisateur",
300
- 'Podcast tags': "Mot-clé de l'épisode",
300
+ 'Podcast tags': "Mots-clés de l'épisode",
301
301
  "You do not have the right to access this page":"Vous n’avez pas le droit d’accéder à cette page",
302
302
  "Enlarge":"Agrandir",
303
303
  "Reduce":"Réduire",