@saooti/octopus-sdk 31.0.24 → 31.0.25

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
@@ -600,3 +600,4 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
600
600
  * 31.0.22 Merge 30
601
601
  * 31.0.23 Qr Code option noir
602
602
  * 31.0.24 Amélioration accessibilité
603
+ * 31.0.25 Erreur audioUrl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "31.0.24",
3
+ "version": "31.0.25",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -4,12 +4,12 @@
4
4
  class="d-inline-flex w-100 mb-3 ps-3 pe-3 hide-phone category-list"
5
5
  >
6
6
  <div
7
- id="category-list-container"
7
+ ref="categoryListContainer"
8
8
  class="category-list-container"
9
9
  >
10
10
  <button
11
11
  v-for="category in categories"
12
- :id="'category' + category.id"
12
+ :ref="'category' + category.id"
13
13
  :key="category.id"
14
14
  class="category-item text-dark bg-white"
15
15
  @click="checkIfFilter(category)"
@@ -144,14 +144,14 @@ export default defineComponent({
144
144
  this.$store.commit('filterIab',category);
145
145
  },
146
146
  resizeWindow(): void {
147
- const categoryList = document.getElementById('category-list-container');
147
+ const categoryList = (this.$refs.categoryListContainer as HTMLElement);
148
148
  if(null === categoryList){
149
149
  return;
150
150
  }
151
151
  categoryList.style.justifyContent = 'flex-start';
152
152
  this.hidenCategories.length = 0;
153
153
  this.categories.forEach((element: Category) => {
154
- const el = document.getElementById('category' + element.id);
154
+ const el = (this.$refs['category' + element.id] as Array<HTMLElement>)[0];
155
155
  if (!el) return;
156
156
  const parent = el.parentElement;
157
157
  if (parent && el.offsetLeft + el.clientWidth <= parent.clientWidth - 20) {
@@ -28,12 +28,12 @@
28
28
  >{{ emission.name }}
29
29
  </div>
30
30
  <div
31
- :id="'description-emission-container-' + emission.emissionId"
31
+ ref="descriptionEmissionContainer"
32
32
  class="emission-description htms-wysiwyg-content"
33
33
  >
34
34
  <!-- eslint-disable vue/no-v-html -->
35
35
  <div
36
- :id="'description-emission-' + emission.emissionId"
36
+ ref="descriptionEmission"
37
37
  v-html="urlify(emission.description|| '')"
38
38
  />
39
39
  <!-- eslint-enable -->
@@ -108,12 +108,8 @@ export default defineComponent({
108
108
  this.hasPodcast();
109
109
  },
110
110
  mounted() {
111
- const emissionDesc = document.getElementById(
112
- 'description-emission-' + this.emission.emissionId
113
- );
114
- const emissionDescContainer = document.getElementById(
115
- 'description-emission-container-' + this.emission.emissionId
116
- );
111
+ const emissionDesc = (this.$refs.descriptionEmission as HTMLElement);
112
+ const emissionDescContainer = (this.$refs.descriptionEmissionContainer as HTMLElement);
117
113
  if (
118
114
  null !== emissionDesc && null !== emissionDescContainer &&
119
115
  emissionDesc.clientHeight > emissionDescContainer.clientHeight
@@ -36,12 +36,12 @@
36
36
  {{ emission.name }}
37
37
  </div>
38
38
  <div
39
- :id="'description-emission-container-' + emission.emissionId"
39
+ ref="descriptionEmissionContainer"
40
40
  class="emission-description html-wysiwyg-content"
41
41
  >
42
42
  <!-- eslint-disable vue/no-v-html -->
43
43
  <div
44
- :id="'description-emission-' + emission.emissionId"
44
+ ref="descriptionEmission"
45
45
  v-html="urlify(emission.description)"
46
46
  />
47
47
  <!-- eslint-enable -->
@@ -79,12 +79,12 @@
79
79
  {{ p.title }}
80
80
  </div>
81
81
  <div
82
- :id="'description-podcast-container-' + p.podcastId"
82
+ :ref="'descriptionPodcastContainer'+ p.podcastId"
83
83
  class="emission-description html-wysiwyg-content"
84
84
  >
85
85
  <!-- eslint-disable vue/no-v-html -->
86
86
  <div
87
- :id="'description-podcast-' + p.podcastId"
87
+ :ref="'descriptionPodcast'+ p.podcastId"
88
88
  v-html="urlify(p.description)"
89
89
  />
90
90
  <!-- eslint-enable -->
@@ -195,12 +195,8 @@ export default defineComponent({
195
195
  this.loadPodcasts();
196
196
  },
197
197
  mounted() {
198
- const emissionDesc = document.getElementById(
199
- 'description-emission-' + this.emission.emissionId
200
- );
201
- const emissionDescContainer = document.getElementById(
202
- 'description-emission-container-' + this.emission.emissionId
203
- );
198
+ const emissionDesc = (this.$refs.descriptionEmission as HTMLElement);
199
+ const emissionDescContainer = (this.$refs.descriptionEmissionContainer as HTMLElement);
204
200
  if (
205
201
  null !== emissionDesc && null !== emissionDescContainer &&
206
202
  emissionDesc.clientHeight > emissionDescContainer.clientHeight
@@ -221,12 +217,8 @@ export default defineComponent({
221
217
  this.podcasts = data.result;
222
218
  this.$nextTick(() => {
223
219
  for (let index = 0, len = this.podcasts.length; index < len; index++) {
224
- const podcastDesc = document.getElementById(
225
- 'description-podcast-' + this.podcasts[index].podcastId
226
- );
227
- const podcastDescContainer = document.getElementById(
228
- 'description-podcast-container-' + this.podcasts[index].podcastId
229
- );
220
+ const podcastDesc = (this.$refs['descriptionPodcast'+this.podcasts[index].podcastId] as Array<HTMLElement>)[0];
221
+ const podcastDescContainer = (this.$refs['descriptionPodcastContainer'+this.podcasts[index].podcastId] as Array<HTMLElement>)[0];
230
222
  if (
231
223
  null !== podcastDesc && null !== podcastDescContainer &&
232
224
  podcastDesc.clientHeight > podcastDescContainer.clientHeight
@@ -66,12 +66,12 @@
66
66
  {{ live.emission.name }}
67
67
  </router-link>
68
68
  <div
69
- :id="'description-live-container-' + live.podcastId"
69
+ ref="descriptionLiveContainer"
70
70
  class="live-description-container html-wysiwyg-content"
71
71
  >
72
72
  <!-- eslint-disable vue/no-v-html -->
73
73
  <div
74
- :id="'description-live-' + live.podcastId"
74
+ ref="descriptionLive"
75
75
  v-html="urlify(description)"
76
76
  />
77
77
  <!-- eslint-enable -->
@@ -251,12 +251,8 @@ export default defineComponent({
251
251
  if(!this.live){
252
252
  return;
253
253
  }
254
- const liveDesc = document.getElementById(
255
- 'description-live-' + this.live.podcastId
256
- );
257
- const liveDescContainer = document.getElementById(
258
- 'description-live-container-' + this.live.podcastId
259
- );
254
+ const liveDesc = (this.$refs.descriptionLive as HTMLElement);
255
+ const liveDescContainer = (this.$refs.descriptionLiveContainer as HTMLElement);
260
256
  if (
261
257
  null !== liveDesc && null !== liveDescContainer &&
262
258
  liveDesc.clientHeight > liveDescContainer.clientHeight
@@ -26,12 +26,12 @@
26
26
  >{{ name }}
27
27
  </div>
28
28
  <div
29
- :id="'description-participant-container-' + participant.participantId"
29
+ ref="descriptionParticipantContainer"
30
30
  class="participant-description html-wysiwyg-content"
31
31
  >
32
32
  <!-- eslint-disable vue/no-v-html -->
33
33
  <div
34
- :id="'description-participant-' + participant.participantId"
34
+ ref="descriptionParticipant"
35
35
  v-html="urlify(participant.description|| '')"
36
36
  />
37
37
  <!-- eslint-enable -->
@@ -107,12 +107,8 @@ export default defineComponent({
107
107
  this.hasPodcast();
108
108
  },
109
109
  mounted() {
110
- const participantDesc = document.getElementById(
111
- 'description-participant-' + this.participant.participantId
112
- );
113
- const participantDescContainer = document.getElementById(
114
- 'description-participant-container-' + this.participant.participantId
115
- );
110
+ const participantDesc = (this.$refs.descriptionParticipant as HTMLElement);
111
+ const participantDescContainer = (this.$refs.descriptionParticipantContainer as HTMLElement);
116
112
  if (
117
113
  null !== participantDesc && null !==participantDescContainer &&
118
114
  participantDesc.clientHeight > participantDescContainer.clientHeight
@@ -36,12 +36,12 @@
36
36
  >{{ name }}
37
37
  </div>
38
38
  <div
39
- :id="'description-playlist-container-' + playlist.playlistId"
39
+ ref="descriptionPlaylistContainer"
40
40
  class="emission-description html-wysiwyg-content"
41
41
  >
42
42
  <!-- eslint-disable vue/no-v-html -->
43
43
  <div
44
- :id="'description-playlist-' + playlist.playlistId"
44
+ ref="descriptionPlaylist"
45
45
  v-html="urlify(description)"
46
46
  />
47
47
  <!-- eslint-enable -->
@@ -120,12 +120,8 @@ export default defineComponent({
120
120
 
121
121
 
122
122
  mounted() {
123
- const playlistDesc = document.getElementById(
124
- 'description-playlist-' + this.playlist.playlistId
125
- );
126
- const playlistDescContainer = document.getElementById(
127
- 'description-playlist-container-' + this.playlist.playlistId
128
- );
123
+ const playlistDesc = (this.$refs.descriptionPlaylist as HTMLElement);
124
+ const playlistDescContainer = (this.$refs.descriptionPlaylistContainer as HTMLElement);
129
125
  if (
130
126
  null !== playlistDesc && null !== playlistDescContainer &&
131
127
  playlistDesc.clientHeight > playlistDescContainer.clientHeight
@@ -17,7 +17,7 @@
17
17
  @showDescription="showDescription"
18
18
  />
19
19
  <div
20
- :id="'description-podcast-container-' + podcast.podcastId"
20
+ ref="descriptionPodcastContainer"
21
21
  class="description-podcast-item html-wysiwyg-content"
22
22
  :class="[
23
23
  hover && ''!==description ? 'visible' : 'invisible',
@@ -26,7 +26,7 @@
26
26
  >
27
27
  <!-- eslint-disable vue/no-v-html -->
28
28
  <div
29
- :id="'description-podcast-' + podcast.podcastId"
29
+ ref="descriptionPodcast"
30
30
  v-html="description"
31
31
  />
32
32
  <!-- eslint-enable -->
@@ -89,13 +89,9 @@ export default defineComponent({
89
89
  },
90
90
  },
91
91
 
92
- created() {
93
- const podcastDesc = document.getElementById(
94
- 'description-podcast-' + this.podcast.podcastId
95
- );
96
- const podcastDescContainer = document.getElementById(
97
- 'description-podcast-container-' + this.podcast.podcastId
98
- );
92
+ mounted() {
93
+ const podcastDesc = (this.$refs.descriptionPodcast as HTMLElement);
94
+ const podcastDescContainer = (this.$refs.descriptionPodcastContainer as HTMLElement);
99
95
  if (
100
96
  null !== podcastDesc && null !== podcastDescContainer &&
101
97
  podcastDesc.clientHeight > podcastDescContainer.clientHeight
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="d-inline-flex w-100 mb-3 px-3 hide-phone">
3
3
  <div
4
- id="rubrique-list-container"
4
+ ref="rubriqueListContainer"
5
+ class="rubrique-list-container"
5
6
  >
6
7
  <select
7
8
  v-model="rubriquage"
@@ -18,7 +19,7 @@
18
19
  </select>
19
20
  <button
20
21
  v-for="rubrique in rubriqueDisplay"
21
- :id="'rubrique' + rubrique.rubriqueId"
22
+ :ref="'rubrique' + rubrique.rubriqueId"
22
23
  :key="rubrique.rubriqueId"
23
24
  class="rubrique-item bg-white"
24
25
  @click="addFilter(rubrique)"
@@ -150,12 +151,12 @@ export default defineComponent({
150
151
  this.initRubriques();
151
152
  },
152
153
  resizeWindow(): void {
153
- const rubriqueList = document.getElementById('rubrique-list-container');
154
+ const rubriqueList = (this.$refs.rubriqueListContainer as HTMLElement);
154
155
  if(null === rubriqueList){return}
155
156
  rubriqueList.style.justifyContent = 'flex-start';
156
157
  this.hidenRubriques.length = 0;
157
158
  this.rubriqueDisplay.forEach((element: Rubrique) => {
158
- const el = document.getElementById('rubrique' + element.rubriqueId);
159
+ const el = (this.$refs['rubrique' + element.rubriqueId] as Array<HTMLElement>)[0];
159
160
  if (!el) return;
160
161
  const parent = el.parentElement;
161
162
  if (null !== parent && el.offsetLeft + el.clientWidth <= parent.clientWidth - 20) {
@@ -180,7 +181,7 @@ export default defineComponent({
180
181
 
181
182
  <style lang="scss">
182
183
  .octopus-app{
183
- #rubrique-list-container {
184
+ .rubrique-list-container {
184
185
  display: flex;
185
186
  justify-content: flex-start;
186
187
  align-items: center;
@@ -2,6 +2,7 @@
2
2
  <div class="bg-dark">
3
3
  <div
4
4
  id="footer"
5
+ ref="footer"
5
6
  class="d-flex-column p-3 secondary-bg border-top"
6
7
  >
7
8
  <div class="d-flex flex-column flex-grow-1 align-items-end">
@@ -191,7 +192,7 @@ export default defineComponent({
191
192
 
192
193
  methods: {
193
194
  showBlackBorder(hide: boolean): void {
194
- const footerElement = document.getElementById('footer');
195
+ const footerElement = (this.$refs.footer as HTMLElement);
195
196
  if(null===footerElement){return}
196
197
  if (hide) {
197
198
  footerElement.classList.remove('border-round');
@@ -51,7 +51,7 @@ export const playerLogic = defineComponent({
51
51
  this.audioUrlToPlay = this.audioUrl;
52
52
  }
53
53
  if(!this.podcast){return;}
54
- const response = await octopusApi.fetchPodcastDownloadUrl("podcast/download/register/"+this.podcast.podcastId+".mp3"+ this.audioUrl);
54
+ const response = await octopusApi.fetchPodcastDownloadUrl("podcast/download/register/"+ this.audioUrl);
55
55
  this.setDownloadId(response.downloadId.toString());
56
56
  this.audioUrlToPlay = response.location;
57
57
  },