@saooti/octopus-sdk 39.0.35 → 39.0.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "39.0.35",
3
+ "version": "39.0.37",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -15,38 +15,38 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@popperjs/core": "^2.11.8",
18
- "@saooti/octopus-api": "^0.39.0",
19
- "@tiptap/extension-link": "^2.2.4",
20
- "@tiptap/extension-underline": "^2.2.4",
21
- "@tiptap/pm": "^2.2.4",
22
- "@tiptap/starter-kit": "^2.2.4",
23
- "@tiptap/vue-3": "^2.2.4",
18
+ "@saooti/octopus-api": "^0.39.1",
19
+ "@tiptap/extension-link": "^2.4.0",
20
+ "@tiptap/extension-underline": "^2.4.0",
21
+ "@tiptap/pm": "^2.4.0",
22
+ "@tiptap/starter-kit": "^2.4.0",
23
+ "@tiptap/vue-3": "^2.4.0",
24
24
  "@vue/cli": "^5.0.8",
25
- "@vue/compat": "^3.4.21",
26
- "@vuepic/vue-datepicker": "^8.2.0",
27
- "@vueuse/core": "^10.9.0",
28
- "autoprefixer": "^10.4.18",
29
- "axios": "^1.6.7",
30
- "dayjs": "^1.11.10",
25
+ "@vue/compat": "^3.4.30",
26
+ "@vuepic/vue-datepicker": "^8.8.0",
27
+ "@vueuse/core": "^10.11.0",
28
+ "autoprefixer": "^10.4.19",
29
+ "axios": "^1.7.2",
30
+ "dayjs": "^1.11.11",
31
31
  "eslint-config-prettier": "^9.1.0",
32
32
  "eslint-plugin-prettier": "^5.1.3",
33
- "express": "^4.18.3",
34
- "hls.js": "^1.5.7",
35
- "humanize-duration": "^3.31.0",
33
+ "express": "^4.19.2",
34
+ "hls.js": "^1.5.11",
35
+ "humanize-duration": "^3.32.1",
36
36
  "jest": "^29.7.0",
37
37
  "pinia": "^2.1.7",
38
38
  "qrcode.vue": "^3.4.1",
39
- "sass": "^1.71.1",
39
+ "sass": "^1.77.6",
40
40
  "sonarqube-scanner": "^3.3.0",
41
- "swiper": "^11.0.7",
42
- "video.js": "^8.10.0",
43
- "videojs-contrib-quality-levels": "^4.0.0",
44
- "videojs-hls-quality-selector": "^1.1.4",
45
- "vite": "^5.1.5",
46
- "vue": "^3.4.21",
47
- "vue-i18n": "^9.10.1",
41
+ "swiper": "^11.1.4",
42
+ "video.js": "^8.12.0",
43
+ "videojs-contrib-quality-levels": "^4.1.0",
44
+ "videojs-hls-quality-selector": "^2.0.0",
45
+ "vite": "^5.3.1",
46
+ "vue": "^3.4.30",
47
+ "vue-i18n": "^9.13.1",
48
48
  "vue-recaptcha": "^2.0.3",
49
- "vue-router": "^4.3.0",
49
+ "vue-router": "^4.4.0",
50
50
  "vue-select": "^4.0.0-beta.6",
51
51
  "vue3-lazyload": "^0.3.8",
52
52
  "vue3-swatches": "^1.2.4"
@@ -55,14 +55,14 @@
55
55
  "@types/videojs-contrib-quality-levels": "^2.0.4",
56
56
  "@types/videojs-hls-quality-selector": "^1.1.3",
57
57
  "@types/vue-select": "^3.16.8",
58
- "@typescript-eslint/eslint-plugin": "^7.1.1",
59
- "@typescript-eslint/parser": "^7.1.1",
60
- "@vitejs/plugin-vue": "^5.0.4",
61
- "@vue/compiler-sfc": "^3.4.21",
62
- "@vue/eslint-config-typescript": "^12.0.0",
58
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
59
+ "@typescript-eslint/parser": "^7.14.1",
60
+ "@vitejs/plugin-vue": "^5.0.5",
61
+ "@vue/compiler-sfc": "^3.4.30",
62
+ "@vue/eslint-config-typescript": "^13.0.0",
63
63
  "eslint": "^8.57.0",
64
- "eslint-plugin-vue": "^9.22.0",
65
- "typescript": "^5.3.3"
64
+ "eslint-plugin-vue": "^9.26.0",
65
+ "typescript": "^5.5.2"
66
66
  },
67
67
  "eslintConfig": {
68
68
  "root": true,
@@ -1,12 +1,6 @@
1
1
  <template>
2
2
  <div class="position-relative w-100">
3
3
  <template v-if="!isPhone">
4
- <!-- <button
5
- v-show="isLoop"
6
- :title="$t('Display previous')"
7
- class="btn-transparent swiper-button-prev"
8
- @click="slidePrevButton()"
9
- ></button> -->
10
4
  <swiper
11
5
  :slides-per-view="numberItem"
12
6
  :space-between="0"
@@ -16,20 +16,19 @@
16
16
  <span>{{ day.title }}</span>
17
17
  </button>
18
18
  </div>
19
- <div class="d-flex align-items-center justify-content-center border-bottom">
19
+ <div
20
+ class="d-flex align-items-center justify-content-center border-bottom"
21
+ >
20
22
  <button
21
23
  v-for="period in periodOfDay"
22
24
  :key="period.id"
23
25
  class="btn btn-underline mb-2"
24
- @click="scrollToElement('planning-period-'+period.id)"
26
+ @click="scrollToElement('planning-period-' + period.id)"
25
27
  >
26
- {{period.title}}
28
+ {{ period.title }}
27
29
  </button>
28
- <button
29
- class="btn btn-underline mb-2"
30
- @click="changePeriodNow"
31
- >
32
- {{$t('Now')}}
30
+ <button class="btn btn-underline mb-2" @click="changePeriodNow">
31
+ {{ $t("Now") }}
33
32
  </button>
34
33
  </div>
35
34
 
@@ -42,20 +41,23 @@
42
41
  <div v-if="!planningLength[daySelected]" class="text-center">
43
42
  {{ $t("No programming") }}
44
43
  </div>
45
- <div
46
- v-else
47
- v-for="period in periodOfDay"
48
- :key="period.id"
49
- >
44
+ <div v-for="period in periodOfDay" v-else :key="period.id">
50
45
  <template v-if="planning[daySelected][period.id].length">
51
- <div
52
- :id="'planning-period-'+period.id"
46
+ <div
47
+ :id="'planning-period-' + period.id"
53
48
  class="fw-bold my-3 pb-2 border-bottom border-primary text-primary"
54
- >{{period.title}}</div>
49
+ >
50
+ {{ period.title }}
51
+ </div>
55
52
  <div
56
53
  v-for="planningItem in planning[daySelected][period.id]"
54
+ :id="
55
+ 'planning-occurrence-' +
56
+ planningItem.occurrenceId +
57
+ '' +
58
+ planningItem.liveId
59
+ "
57
60
  :key="planningItem.occurrenceId + '' + planningItem.liveId"
58
- :id="'planning-occurrence-'+planningItem.occurrenceId + '' + planningItem.liveId"
59
61
  class="d-flex align-items-center mb-3"
60
62
  >
61
63
  <div class="program-item-date fw-bold flex-shrink-0">
@@ -70,7 +72,9 @@
70
72
  }"
71
73
  >
72
74
  <img
73
- v-lazy="proxyImageUrl(planningItem.podcastData.imageUrl, '150')"
75
+ v-lazy="
76
+ proxyImageUrl(planningItem.podcastData.imageUrl, '150')
77
+ "
74
78
  width="150"
75
79
  height="150"
76
80
  class="m-2"
@@ -79,6 +83,11 @@
79
83
  name: planningItem.podcastData.title,
80
84
  })
81
85
  "
86
+ :alt="
87
+ $t('Episode name image', {
88
+ name: planningItem.podcastData.title,
89
+ })
90
+ "
82
91
  />
83
92
  <div class="d-flex flex-column">
84
93
  <div class="d-flex align-items-center mb-2">
@@ -133,12 +142,12 @@ export default defineComponent({
133
142
  return {
134
143
  planning: {} as {
135
144
  [key: number]: {
136
- morning:Array<PlanningOccurrence | PlanningLive>,
137
- afternoon:Array<PlanningOccurrence | PlanningLive>,
138
- evening:Array<PlanningOccurrence | PlanningLive>
145
+ morning: Array<PlanningOccurrence | PlanningLive>;
146
+ afternoon: Array<PlanningOccurrence | PlanningLive>;
147
+ evening: Array<PlanningOccurrence | PlanningLive>;
139
148
  };
140
149
  },
141
- planningLength: {} as {[key:number]: number},
150
+ planningLength: {} as { [key: number]: number },
142
151
  daySelected: dayjs().valueOf(),
143
152
  arrayDays: [] as Array<{
144
153
  title: string;
@@ -158,12 +167,32 @@ export default defineComponent({
158
167
  endOfDay(): string {
159
168
  return dayjs(this.daySelected).endOf("date").toISOString();
160
169
  },
161
- periodOfDay(){
170
+ periodOfDay() {
162
171
  return [
163
- {id:"morning", title: this.$t('Morning'), end: dayjs(this.daySelected).hour(14).minute(0).second(0).millisecond(0)},
164
- {id:"afternoon", title: this.$t('Afternoon'), end: dayjs(this.daySelected).hour(19).minute(0).second(0).millisecond(0)},
165
- {id:"evening", title: this.$t('Evening'), end: dayjs(this.daySelected).endOf("date")},
166
- ]
172
+ {
173
+ id: "morning",
174
+ title: this.$t("Morning"),
175
+ end: dayjs(this.daySelected)
176
+ .hour(14)
177
+ .minute(0)
178
+ .second(0)
179
+ .millisecond(0),
180
+ },
181
+ {
182
+ id: "afternoon",
183
+ title: this.$t("Afternoon"),
184
+ end: dayjs(this.daySelected)
185
+ .hour(19)
186
+ .minute(0)
187
+ .second(0)
188
+ .millisecond(0),
189
+ },
190
+ {
191
+ id: "evening",
192
+ title: this.$t("Evening"),
193
+ end: dayjs(this.daySelected).endOf("date"),
194
+ },
195
+ ];
167
196
  },
168
197
  },
169
198
 
@@ -173,30 +202,40 @@ export default defineComponent({
173
202
  },
174
203
 
175
204
  methods: {
176
- scrollToElement(id: string){
205
+ scrollToElement(id: string) {
177
206
  const element = document.getElementById(id);
178
- if(element){
179
- const yOffset = -110;
180
- const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset;
181
- window.scrollTo({top: y, behavior: 'smooth'});
207
+ if (element) {
208
+ const yOffset = -110;
209
+ const y =
210
+ element.getBoundingClientRect().top + window.scrollY + yOffset;
211
+ window.scrollTo({ top: y, behavior: "smooth" });
182
212
  }
183
213
  },
184
- changePeriodNow(){
214
+ changePeriodNow() {
185
215
  const now = dayjs();
186
- if(!dayjs(this.daySelected).isSame(now, 'day')){
216
+ if (!dayjs(this.daySelected).isSame(now, "day")) {
187
217
  this.changeDate(this.arrayDays[7].date);
188
218
  }
189
219
  this.$nextTick(() => {
190
- if(!this.planningLength[this.daySelected]){return;}
191
- const arrayOccurrences = Object.values(this.planning[this.daySelected]).reduce((r,c) => r.concat(c), [])
220
+ if (!this.planningLength[this.daySelected]) {
221
+ return;
222
+ }
223
+ const arrayOccurrences = Object.values(
224
+ this.planning[this.daySelected],
225
+ ).reduce((r, c) => r.concat(c), []);
192
226
  let selectedOccurrence = arrayOccurrences[0];
193
- for (let index = 0; index < arrayOccurrences.length; index++) {
194
- selectedOccurrence = arrayOccurrences[index];
195
- if(dayjs(arrayOccurrences[index].endDate).isAfter(now)){
227
+ for (let occ of arrayOccurrences) {
228
+ selectedOccurrence = occ;
229
+ if (dayjs(occ.endDate).isAfter(now)) {
196
230
  break;
197
231
  }
198
232
  }
199
- this.scrollToElement('planning-occurrence-'+selectedOccurrence.occurrenceId + '' + selectedOccurrence.liveId);
233
+ this.scrollToElement(
234
+ "planning-occurrence-" +
235
+ selectedOccurrence.occurrenceId +
236
+ "" +
237
+ selectedOccurrence.liveId,
238
+ );
200
239
  });
201
240
  },
202
241
  createArrayDays() {
@@ -212,51 +251,72 @@ export default defineComponent({
212
251
  });
213
252
  }
214
253
  },
254
+ async fetchOccurrencesAndLives(): Promise<
255
+ Array<PlanningOccurrence | PlanningLive>
256
+ > {
257
+ const params = {
258
+ canalId: this.radio?.id,
259
+ from: this.startOfDay,
260
+ to: this.endOfDay,
261
+ };
262
+ let occurrences: Array<PlanningOccurrence | PlanningLive> =
263
+ await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>(
264
+ 14,
265
+ "planning/occurrence/list",
266
+ params,
267
+ );
268
+ const lives = await octopusApi.fetchDataWithParams<
269
+ Array<PlanningOccurrence>
270
+ >(14, "live/list", params);
271
+ if (lives.length) {
272
+ occurrences = occurrences.concat(lives);
273
+ occurrences.sort((a, b) => {
274
+ if (a.startDate > b.startDate) {
275
+ return 1;
276
+ }
277
+ return b.startDate > a.startDate ? -1 : 0;
278
+ });
279
+ }
280
+ return occurrences;
281
+ },
215
282
  async fetchOccurrences(): Promise<void> {
216
283
  if (this.planning[this.daySelected]) {
217
284
  return;
218
285
  }
219
- this.planning[this.daySelected] = {morning:[], afternoon:[], evening: []};
286
+ this.planning[this.daySelected] = {
287
+ morning: [],
288
+ afternoon: [],
289
+ evening: [],
290
+ };
220
291
  this.planningLength[this.daySelected] = 0;
221
292
  this.loading = true;
222
293
  this.error = false;
223
294
  try {
224
- const params = {
225
- canalId: this.radio?.id,
226
- from: this.startOfDay,
227
- to: this.endOfDay,
228
- };
229
- let occurrences: Array<PlanningOccurrence | PlanningLive> =
230
- await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>(
231
- 14,
232
- "planning/occurrence/list",
233
- params,
234
- );
235
- const lives = await octopusApi.fetchDataWithParams<
236
- Array<PlanningOccurrence>
237
- >(14, "live/list", params);
238
- if (lives.length) {
239
- occurrences = occurrences.concat(lives);
240
- occurrences.sort((a, b) => {
241
- if (a.startDate > b.startDate) {
242
- return 1;
243
- }
244
- return b.startDate > a.startDate ? -1 : 0;
245
- });
246
- }
295
+ let occurrences = await this.fetchOccurrencesAndLives();
247
296
  let periodDayIndex = 0;
248
- for (let index = 0; index < occurrences.length; index++) {
249
- if(!occurrences[index].podcastId){continue;}
250
- if(!dayjs(occurrences[index].startDate).isBefore(this.periodOfDay[periodDayIndex].end)){
251
- periodDayIndex+=1;
297
+ for (let occ of occurrences) {
298
+ if (!occ.podcastId) {
299
+ continue;
300
+ }
301
+ if (
302
+ !dayjs(occ.startDate).isBefore(this.periodOfDay[periodDayIndex].end)
303
+ ) {
304
+ periodDayIndex += 1;
252
305
  }
253
306
  switch (this.periodOfDay[periodDayIndex].id) {
254
- case "morning": this.planning[this.daySelected].morning.push(occurrences[index]); break;
255
- case "afternoon": this.planning[this.daySelected].afternoon.push(occurrences[index]); break;
256
- case "evening": this.planning[this.daySelected].evening.push(occurrences[index]); break;
257
- default:break;
307
+ case "morning":
308
+ this.planning[this.daySelected].morning.push(occ);
309
+ break;
310
+ case "afternoon":
311
+ this.planning[this.daySelected].afternoon.push(occ);
312
+ break;
313
+ case "evening":
314
+ this.planning[this.daySelected].evening.push(occ);
315
+ break;
316
+ default:
317
+ break;
258
318
  }
259
- this.planningLength[this.daySelected]+=1;
319
+ this.planningLength[this.daySelected] += 1;
260
320
  }
261
321
  } catch {
262
322
  this.error = true;
@@ -5,8 +5,8 @@
5
5
  :button-text="$t('See more')"
6
6
  :button-plus="true"
7
7
  :title="playlist?.title ?? ''"
8
- :href="'/main/pub/playlist/'+playlistId"
9
- :podcastId="playlistId"
8
+ :href="'/main/pub/playlist/' + playlistId"
9
+ :podcast-id="playlistId"
10
10
  >
11
11
  <template #list-inline>
12
12
  <ClassicLoading
@@ -42,7 +42,7 @@ export default defineComponent({
42
42
  PodcastItem,
43
43
  ClassicLoading,
44
44
  PodcastInlineListTemplate,
45
- SwiperList
45
+ SwiperList,
46
46
  },
47
47
 
48
48
  props: {
@@ -57,8 +57,7 @@ export default defineComponent({
57
57
  allPodcasts: [] as Array<Podcast>,
58
58
  };
59
59
  },
60
- computed: {
61
- },
60
+ computed: {},
62
61
  watch: {
63
62
  playlistId(): void {
64
63
  this.reset();
@@ -10,9 +10,8 @@
10
10
  :src="iFrameSrc"
11
11
  width="100%"
12
12
  height="140px"
13
- scrolling="no"
13
+ style="overflow: hidden"
14
14
  allow="clipboard-read; clipboard-write; autoplay"
15
- frameborder="0"
16
15
  class="max-iframe mx-3 flex-grow-1"
17
16
  />
18
17
  <div class="d-flex flex-column">
@@ -192,24 +192,7 @@ export default defineComponent({
192
192
  ? "//" + link
193
193
  : link;
194
194
  },
195
- resizeWindow() {
196
- if (this.windowWidth > 420 && this.lastWindowWidth > 420) {
197
- this.lastWindowWidth = this.windowWidth;
198
- return;
199
- }
200
- const subscribeList = this.$refs.subscribeButtonsContainer as HTMLElement;
201
- if (
202
- null === subscribeList ||
203
- !subscribeList ||
204
- "none" === subscribeList?.parentElement?.style.display
205
- ) {
206
- return;
207
- }
208
- this.lastWindowWidth = this.windowWidth;
209
- subscribeList.style.justifyContent = "flex-start";
210
- subscribeList.style.flexGrow = "1";
211
- this.hiddenLinks.length = 0;
212
- let parentWidth = 0;
195
+ showAllElements() {
213
196
  this.subscriptionsDisplay.forEach((element: Link) => {
214
197
  const el = (
215
198
  this.$refs["subLink" + element.name] as Array<HTMLElement>
@@ -219,6 +202,9 @@ export default defineComponent({
219
202
  el.classList.remove("hid");
220
203
  }
221
204
  });
205
+ },
206
+ hideOnlyNecessaryElements() {
207
+ let parentWidth = 0;
222
208
  this.subscriptionsDisplay.forEach((element: Link) => {
223
209
  const el = (
224
210
  this.$refs["subLink" + element.name] as Array<HTMLElement>
@@ -239,6 +225,26 @@ export default defineComponent({
239
225
  el.className += " hid";
240
226
  }
241
227
  });
228
+ },
229
+ resizeWindow() {
230
+ if (this.windowWidth > 420 && this.lastWindowWidth > 420) {
231
+ this.lastWindowWidth = this.windowWidth;
232
+ return;
233
+ }
234
+ const subscribeList = this.$refs.subscribeButtonsContainer as HTMLElement;
235
+ if (
236
+ null === subscribeList ||
237
+ !subscribeList ||
238
+ "none" === subscribeList?.parentElement?.style.display
239
+ ) {
240
+ return;
241
+ }
242
+ this.lastWindowWidth = this.windowWidth;
243
+ subscribeList.style.justifyContent = "flex-start";
244
+ subscribeList.style.flexGrow = "1";
245
+ this.hiddenLinks.length = 0;
246
+ this.showAllElements();
247
+ this.hideOnlyNecessaryElements();
242
248
  if (!this.hiddenLinks.length && this.justifyCenter) {
243
249
  subscribeList.style.justifyContent = "center";
244
250
  }
@@ -1,33 +1,33 @@
1
1
  <template>
2
2
  <div ref="divContainer" tabindex="0">
3
- <VueDatePicker
4
- :model-value="modelVal"
5
- :time-picker="isTimePicker"
6
- :input-class-name="templateClass"
7
- :clearable="false"
8
- :text-input="true"
9
- :readonly="readonly"
10
- :teleport="useTeleport"
11
- :locale="formatLocale"
12
- :format="format"
13
- :auto-apply="true"
14
- :enable-seconds="displaySeconds"
15
- :max-date="isMaxDate && !isTimePicker ? now : undefined"
16
- :min-date="isMinDate && !isTimePicker ? now : undefined"
17
- :range="undefined !== range"
18
- :multi-calendars="columnNumber > 1 ? columnNumber : false"
19
- :inline="isInline"
20
- :enable-time-picker="!isTimePicker ? displayTimePicker : undefined"
21
- :aria-labels="ariaLabels"
22
- :max-time="maxTime"
23
- :month-picker="monthPicker"
24
- :alt-position="customPosition"
25
- @update:model-value="updateValue($event)"
26
- >
27
- <template v-if="time" #input-icon>
28
- <div class="ms-2 saooti-clock" />
29
- </template>
30
- </VueDatePicker>
3
+ <VueDatePicker
4
+ :model-value="modelVal"
5
+ :time-picker="isTimePicker"
6
+ :input-class-name="templateClass"
7
+ :clearable="false"
8
+ :text-input="true"
9
+ :readonly="readonly"
10
+ :teleport="useTeleport"
11
+ :locale="formatLocale"
12
+ :format="format"
13
+ :auto-apply="true"
14
+ :enable-seconds="displaySeconds"
15
+ :max-date="isMaxDate && !isTimePicker ? now : undefined"
16
+ :min-date="isMinDate && !isTimePicker ? now : undefined"
17
+ :range="undefined !== range"
18
+ :multi-calendars="columnNumber > 1 ? columnNumber : false"
19
+ :inline="isInline"
20
+ :enable-time-picker="!isTimePicker ? displayTimePicker : undefined"
21
+ :aria-labels="ariaLabels"
22
+ :max-time="maxTime"
23
+ :month-picker="monthPicker"
24
+ :alt-position="customPosition"
25
+ @update:model-value="updateValue($event)"
26
+ >
27
+ <template v-if="time" #input-icon>
28
+ <div class="ms-2 saooti-clock" />
29
+ </template>
30
+ </VueDatePicker>
31
31
  </div>
32
32
  </template>
33
33
 
@@ -102,7 +102,7 @@ export default defineComponent({
102
102
  return this.$i18n.locale;
103
103
  },
104
104
  format() {
105
- if(this.forceFormat){
105
+ if (this.forceFormat) {
106
106
  return this.forceFormat;
107
107
  }
108
108
  if (this.monthPicker) {
@@ -128,11 +128,11 @@ export default defineComponent({
128
128
  },
129
129
  },
130
130
  methods: {
131
- updateValue(date: Date){
132
- if(!this.isInline){
131
+ updateValue(date: Date) {
132
+ if (!this.isInline) {
133
133
  this.$refs.divContainer?.focus();
134
134
  }
135
- this.$emit('updateDate', date);
135
+ this.$emit("updateDate", date);
136
136
  },
137
137
  formatDate(value: Date): string {
138
138
  const realMonth = value.getMonth() + 1;
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div
3
- class="d-flex flex-column classic-input-text"
4
- :class="{'form-margin':displayLabel}"
2
+ <div
3
+ class="d-flex flex-column classic-input-text"
4
+ :class="{ 'form-margin': displayLabel }"
5
5
  >
6
6
  <div class="d-flex">
7
7
  <label
@@ -3,7 +3,7 @@
3
3
  :class="{
4
4
  'multiselect-in-modal': inModal,
5
5
  'multiselect-no-deselect': noDeselect,
6
- 'form-margin':displayLabel
6
+ 'form-margin': displayLabel,
7
7
  }"
8
8
  :style="{ width: width }"
9
9
  >
@@ -58,7 +58,7 @@
58
58
  </div>
59
59
  </template>
60
60
  <template #open-indicator="{ attributes }">
61
- <span v-bind="attributes" class="saooti-down"/>
61
+ <span v-bind="attributes" class="saooti-down" />
62
62
  </template>
63
63
  </vSelect>
64
64
  </div>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="classic-select" :class="{'form-margin':displayLabel}">
2
+ <div class="classic-select" :class="{ 'form-margin': displayLabel }">
3
3
  <label
4
4
  :for="idSelect"
5
5
  class="form-label"
@@ -55,19 +55,18 @@ export default defineComponent({
55
55
  this.$emit("open");
56
56
  },
57
57
  },
58
- created(){
59
- this.isOpen= this.initOpen;
60
- }
58
+ created() {
59
+ this.isOpen = this.initOpen;
60
+ },
61
61
  });
62
62
  </script>
63
63
  <style lang="scss">
64
64
  @import "@scss/_variables.scss";
65
65
  .octopus-accordion {
66
66
  > button {
67
- background: white;
68
67
  min-height: 50px;
69
68
  color: $octopus-primary-color;
70
- font-size:0.9rem;
69
+ font-size: 0.9rem;
71
70
  border: 1px solid transparent;
72
71
  border-bottom-color: #b8b8b8;
73
72
  font-weight: bold;
@@ -75,6 +74,12 @@ export default defineComponent({
75
74
  border-bottom-color: #535353;
76
75
  }
77
76
  }
77
+ &:not(.octopus-accordion-open) > button {
78
+ background: transparent;
79
+ }
80
+ .body {
81
+ background: white;
82
+ }
78
83
  &.octopus-accordion-open {
79
84
  border-radius: $octopus-borderradius;
80
85
  border: 1px solid #e0e0e0;
@@ -1,8 +1,5 @@
1
1
  <template>
2
- <div
3
- ref="targetEl"
4
- :style="`min-height:${minHeight}px`"
5
- >
2
+ <div ref="targetEl" :style="`min-height:${minHeight}px`">
6
3
  <slot v-if="shouldRender" />
7
4
  <slot v-else name="preview" />
8
5
  </div>
@@ -38,12 +35,11 @@ export default {
38
35
  default: 10000,
39
36
  },
40
37
  },
41
- emits:['isRender'],
38
+ emits: ["isRender"],
42
39
  setup(props, context) {
43
40
  const waitBeforeInit = ref(true);
44
41
  const shouldRender = ref(false);
45
42
  const targetEl = ref();
46
- //const fixedMinHeight = ref(0);
47
43
  let unrenderTimer: ReturnType<typeof setTimeout> | undefined;
48
44
  let renderTimer: ReturnType<typeof setTimeout> | undefined;
49
45
  setTimeout(() => {
@@ -63,7 +59,7 @@ export default {
63
59
  renderTimer = setTimeout(
64
60
  () => {
65
61
  shouldRender.value = true;
66
- context.emit('isRender', true);
62
+ context.emit("isRender", true);
67
63
  },
68
64
  props.unrender ? 200 : 0,
69
65
  );
@@ -74,9 +70,8 @@ export default {
74
70
  // if the component was set to render, cancel that
75
71
  clearTimeout(renderTimer);
76
72
  unrenderTimer = setTimeout(() => {
77
- //fixedMinHeight.value = targetEl.value?.clientHeight ?? 0;
78
73
  shouldRender.value = false;
79
- context.emit('isRender', false);
74
+ context.emit("isRender", false);
80
75
  }, props.unrenderDelay);
81
76
  }
82
77
  },
@@ -88,24 +83,27 @@ export default {
88
83
  if (props.renderOnIdle) {
89
84
  onIdle(() => {
90
85
  shouldRender.value = true;
91
- context.emit('isRender', true);
86
+ context.emit("isRender", true);
92
87
  if (!props.unrender) {
93
88
  pause();
94
89
  }
95
90
  });
96
91
  }
97
- watch(() => props.unrender, (newValue, oldValue) => {
98
- if (newValue) {
99
- clearTimeout(renderTimer);
100
- unrenderTimer = setTimeout(() => {
101
- shouldRender.value = false;
102
- context.emit('isRender', false);
103
- resume();
104
- }, props.unrenderDelay);
105
- }
106
- });
92
+ watch(
93
+ () => props.unrender,
94
+ (newValue, _) => {
95
+ if (newValue) {
96
+ clearTimeout(renderTimer);
97
+ unrenderTimer = setTimeout(() => {
98
+ shouldRender.value = false;
99
+ context.emit("isRender", false);
100
+ resume();
101
+ }, props.unrenderDelay);
102
+ }
103
+ },
104
+ );
107
105
 
108
- return { targetEl, shouldRender/* , fixedMinHeight */};
106
+ return { targetEl, shouldRender };
109
107
  },
110
108
  };
111
109
  </script>
@@ -59,10 +59,10 @@ export default defineComponent({
59
59
  return `left: ${this.posX}px; top: ${this.posY}px;`;
60
60
  },
61
61
  },
62
- watch:{
63
- show(){
64
- this.$emit('updateVisibility', this.show);
65
- }
62
+ watch: {
63
+ show() {
64
+ this.$emit("updateVisibility", this.show);
65
+ },
66
66
  },
67
67
  mounted() {
68
68
  this.init();
@@ -105,7 +105,7 @@ export default defineComponent({
105
105
  if (!this.onlyMouse) {
106
106
  this.targetElement.removeEventListener("click", this.setPopoverData);
107
107
  }
108
- this.targetElement.addEventListener("focusout", this.clearDataBlur);
108
+ this.targetElement.removeEventListener("focusout", this.clearDataBlur);
109
109
  }
110
110
  },
111
111
  setPopoverData(e: MouseEvent | PointerEvent) {
@@ -163,7 +163,7 @@ export default defineComponent({
163
163
  (this.isFixed ? 0 : window.scrollY) +
164
164
  yGap;
165
165
  },
166
- async clearDataBlur(e: FocusEvent) {
166
+ clearDataBlur(e: FocusEvent) {
167
167
  if (!e.relatedTarget) {
168
168
  return this.clearClick();
169
169
  }
@@ -187,7 +187,7 @@ export default defineComponent({
187
187
  if ("true" === myElement.getAttribute("reallink")) {
188
188
  myElement.click();
189
189
  } else {
190
- await this.$router.push((myElement as HTMLAnchorElement).pathname);
190
+ this.$router.push((myElement as HTMLAnchorElement).pathname);
191
191
  }
192
192
  this.$nextTick(() => {
193
193
  this.isClick = false;
@@ -223,10 +223,9 @@ export default defineComponent({
223
223
  border: 1px solid #ccc;
224
224
  border-radius: $octopus-borderradius;
225
225
  position: absolute;
226
- /* z-index: 9999; */
227
226
  max-height: 80vh;
228
227
  overflow: auto;
229
- &.popover-z-index{
228
+ &.popover-z-index {
230
229
  z-index: 9999;
231
230
  }
232
231
  &.octopus-dropdown {
@@ -32,7 +32,12 @@
32
32
  {{ link.title }}
33
33
  </router-link>
34
34
  </template>
35
- <a v-if="!isAuthenticatedWithOrga" class="octopus-dropdown-item" href="/sso/login" realLink="true">
35
+ <a
36
+ v-if="!isAuthenticatedWithOrga"
37
+ class="octopus-dropdown-item"
38
+ href="/sso/login"
39
+ realLink="true"
40
+ >
36
41
  {{ $t("Login") }}
37
42
  </a>
38
43
  <a v-else class="octopus-dropdown-item" @click="logoutFunction">
@@ -286,7 +286,7 @@ export default defineComponent({
286
286
  text-underline-offset: 8px;
287
287
  }
288
288
  }
289
- .client-logo{
289
+ .client-logo {
290
290
  border-radius: $octopus-borderradius;
291
291
  }
292
292
  .top-bar-logo img {
@@ -300,7 +300,7 @@ export default defineComponent({
300
300
  max-height: 2rem;
301
301
  }
302
302
  }
303
- .octopusLogo{
303
+ .octopusLogo {
304
304
  @media (max-width: 960px) {
305
305
  max-width: 30px !important;
306
306
  }
@@ -55,20 +55,20 @@ export default defineComponent({
55
55
  this.$t("Podcast play error"),
56
56
  );
57
57
  }
58
- if(!this.isVideoFullscreen){
58
+ if (!this.isVideoFullscreen) {
59
59
  return;
60
60
  }
61
61
  this.$nextTick(() => {
62
62
  this.goFullScreen();
63
63
  });
64
64
  },
65
- methods:{
65
+ methods: {
66
66
  goFullScreen() {
67
67
  if ("" === this.srcVideo) {
68
68
  return;
69
69
  }
70
70
  (this.$refs.iframeVideo as Element).requestFullscreen();
71
- },
72
- }
71
+ },
72
+ },
73
73
  });
74
74
  </script>
@@ -180,7 +180,7 @@ export const playerStitching = defineComponent({
180
180
  async getVastUrl(tag: string): Promise<string>{
181
181
  let baseUrl = "https://api.soundcast.io/v1/vast/"+tag;
182
182
  let keywords: Array<string> = [];
183
- if(this.playerPodcast && this.playerPodcast?.tags?.length){
183
+ if(this.playerPodcast?.tags?.length){
184
184
  const attributes = await this.getOrgaAttributes(this.playerPodcast.organisation.id);
185
185
  if ("true"===attributes["AD_CONFIG_PODCAST_TAG"]) {
186
186
  keywords = this.playerPodcast.tags.map((e) => {
@@ -27,7 +27,6 @@ export const playerTranscript = defineComponent({
27
27
  }else if(0===doubletsLength || 1=== doubletsLength && "post" === adserverConfig.config.doublets[0].timing.insertion){
28
28
  return;
29
29
  }else{
30
- // todo remove chaptering
31
30
  this.playerUpdateChaptering();
32
31
  this.playerUpdateTranscript();
33
32
  }
@@ -30,11 +30,6 @@ export const fetchRadioData = defineComponent({
30
30
  "player/playing/" + canalId,
31
31
  );
32
32
  if(callbackAdvertising){
33
- //TODO remove mock
34
- /* callbackAdvertising({
35
- startDate: "2024-03-25T08:21:00Z",
36
- tag: "5e385e1b51c86"
37
- }); */
38
33
  callbackAdvertising(metadata.nextAdvertising);
39
34
  }
40
35
  const arrayMetadata = metadata.previously;
@@ -44,23 +39,30 @@ export const fetchRadioData = defineComponent({
44
39
  dayjs().valueOf() - 18000 >
45
40
  dayjs(arrayMetadata[index].startDate).valueOf()
46
41
  ) {
47
- if (previousTitle !== arrayMetadata[index].title) {
48
- const historyIndex = index + 1 < len ? index + 1 : index;
49
- const history = arrayMetadata.slice(historyIndex, len);
50
- if (arrayMetadata[index].podcastId) {
51
- const data: Podcast = await octopusApi.fetchData<Podcast>(
52
- 0,
53
- "podcast/" + arrayMetadata[index].podcastId,
54
- );
55
- callbackMetadata(arrayMetadata[index], data, history);
56
- } else {
57
- callbackMetadata(arrayMetadata[index], undefined, history);
58
- }
59
- }
42
+ await this.useCallbackIfNewMetadata(previousTitle, arrayMetadata, index, len,callbackMetadata);
60
43
  return;
61
44
  }
62
45
  }
63
46
  },
47
+ async useCallbackIfNewMetadata(previousTitle: string, arrayMetadata: Array<MediaRadio>, index:number, len: number, callbackMetadata: (
48
+ metadata: MediaRadio,
49
+ podcast: Podcast | undefined,
50
+ history: Array<MediaRadio>
51
+ ) => void){
52
+ if (previousTitle !== arrayMetadata[index].title) {
53
+ const historyIndex = index + 1 < len ? index + 1 : index;
54
+ const history = arrayMetadata.slice(historyIndex, len);
55
+ if (arrayMetadata[index].podcastId) {
56
+ const data: Podcast = await octopusApi.fetchData<Podcast>(
57
+ 0,
58
+ "podcast/" + arrayMetadata[index].podcastId,
59
+ );
60
+ callbackMetadata(arrayMetadata[index], data, history);
61
+ } else {
62
+ callbackMetadata(arrayMetadata[index], undefined, history);
63
+ }
64
+ }
65
+ },
64
66
  displayTitle(metadata: MediaRadio): string {
65
67
  let title = "";
66
68
  if (metadata.title) {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="page-box">
3
- <slot name="new-emission"/>
3
+ <slot name="new-emission" />
4
4
  <ProductorSearch
5
5
  v-model:organisationId="organisationId"
6
6
  v-model:search-pattern="searchPattern"
@@ -41,7 +41,7 @@
41
41
  :participant-id="participantId"
42
42
  :name="name"
43
43
  :category-filter="true"
44
- :productorId="['']"
44
+ :productor-id="['']"
45
45
  :reload="reload"
46
46
  :show-count="true"
47
47
  />
@@ -162,7 +162,7 @@ export default defineComponent({
162
162
  );
163
163
  if (
164
164
  "PUBLIC" !== data?.orga?.privacy &&
165
- this.filterOrgaId !== data?.orga?.id&&
165
+ this.filterOrgaId !== data?.orga?.id &&
166
166
  this.$route.query.productor !== data?.orga?.id
167
167
  ) {
168
168
  this.initError();
@@ -165,8 +165,8 @@ export default defineComponent({
165
165
  if (
166
166
  (!this.editRight && this.playlistRadio) ||
167
167
  ("PUBLIC" !== this.playlist.organisation?.privacy &&
168
- this.filterOrgaId !== this.playlist.organisation?.id &&
169
- this.$route.query.productor !== this.playlist.organisation?.id)
168
+ this.filterOrgaId !== this.playlist.organisation?.id &&
169
+ this.$route.query.productor !== this.playlist.organisation?.id)
170
170
  ) {
171
171
  this.initError();
172
172
  return;
package/src/main.ts CHANGED
@@ -71,5 +71,4 @@ router.isReady().then(() => {
71
71
  },
72
72
  }); */
73
73
  app.mount('#app');
74
- })
75
- //app.mount("#app");
74
+ })