@saooti/octopus-sdk 38.3.8 → 38.3.9

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": "38.3.8",
3
+ "version": "38.3.9",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -10,11 +10,8 @@
10
10
  class="d-flex flex-grow-1 text-dark"
11
11
  >
12
12
  <div class="emission-item-text">
13
- <div
14
- v-if="!activePlaylist"
15
- class="sticker-empty-ressource"
16
- >
17
- {{ $t('Empty playlist') }}
13
+ <div v-if="!activePlaylist" class="sticker-empty-ressource">
14
+ {{ $t("Empty playlist") }}
18
15
  </div>
19
16
  <div class="d-flex align-items-center emission-name">
20
17
  {{ name }}
@@ -303,7 +303,7 @@ export default defineComponent({
303
303
  if (this.isLiveReadyToRecord) {
304
304
  this.iFrameModel = "large";
305
305
  }
306
- if("true"===this.podcast?.annotations?.["fromTTS"]){
306
+ if ("true" === this.podcast?.annotations?.["fromTTS"]) {
307
307
  this.displayTranscript = false;
308
308
  }
309
309
  },
@@ -70,8 +70,9 @@ export default defineComponent({
70
70
  computed: {
71
71
  ...mapState(useAuthStore, ["authOrganisation"]),
72
72
  iFrameSrc(): string {
73
- return `${state.podcastPage.MiniplayerUri}miniplayer/radio/${this.canal
74
- ?.id}?distributorId=${this.organisationId}&color=${this.color.substring(
73
+ return `${state.podcastPage.MiniplayerUri}miniplayer/radio/${
74
+ this.canal?.id
75
+ }?distributorId=${this.organisationId}&color=${this.color.substring(
75
76
  1,
76
77
  )}&theme=${this.theme.substring(1)}`;
77
78
  },
@@ -187,15 +187,9 @@ export default defineComponent({
187
187
  this.platformEducation,
188
188
  );
189
189
  octopusApi
190
- .fetchDataWithParams<Array<Category>>(
191
- 0,
192
- `iab/list${
193
- state.octopusApi.organisationId
194
- ? "/" + state.octopusApi.organisationId
195
- : ""
196
- }`,
197
- { lang: this.$i18n.locale },
198
- )
190
+ .fetchDataWithParams<
191
+ Array<Category>
192
+ >(0, `iab/list${state.octopusApi.organisationId ? "/" + state.octopusApi.organisationId : ""}`, { lang: this.$i18n.locale })
199
193
  .then((data: Array<Category>) => {
200
194
  this.storedUpdateCategories(data);
201
195
  if (this.filterIab) {
@@ -19,57 +19,60 @@
19
19
  :title="$t('User menu')"
20
20
  />
21
21
  <teleport to=".octopus-app" :disabled="scrolled">
22
- <ClassicPopover
23
- target="home-dropdown"
24
- :only-click="true"
25
- :is-fixed="true"
26
- :left-pos="true"
27
- >
28
- <template v-if="!isAuthenticated">
29
- <a class="octopus-dropdown-item" href="/sso/login" realLink="true">
30
- {{ $t("Login") }}
31
- </a>
32
- <router-link
33
- v-if="!isPodcastmaker"
34
- class="octopus-dropdown-item"
35
- to="/main/pub/create"
36
- >
37
- {{ $t("Create an account") }}
38
- </router-link>
39
- </template>
40
- <template v-else>
41
- <template v-for="routerBack in routerBackoffice" :key="routerBack.path">
22
+ <ClassicPopover
23
+ target="home-dropdown"
24
+ :only-click="true"
25
+ :is-fixed="true"
26
+ :left-pos="true"
27
+ >
28
+ <template v-if="!isAuthenticated">
29
+ <a class="octopus-dropdown-item" href="/sso/login" realLink="true">
30
+ {{ $t("Login") }}
31
+ </a>
42
32
  <router-link
43
- v-if="!isPodcastmaker && routerBack.condition"
44
- :class="routerBack.class"
45
- :to="routerBack.path"
33
+ v-if="!isPodcastmaker"
34
+ class="octopus-dropdown-item"
35
+ to="/main/pub/create"
46
36
  >
47
- {{ routerBack.title }}
37
+ {{ $t("Create an account") }}
48
38
  </router-link>
49
39
  </template>
50
- <template v-if="helpLinks.length">
51
- <hr />
52
- <template v-for="helpLink in helpLinks" :key="helpLink.title">
53
- <a
54
- :href="helpLink.href"
55
- class="octopus-dropdown-item"
56
- rel="noopener"
57
- target="_blank"
58
- realLink="true"
40
+ <template v-else>
41
+ <template
42
+ v-for="routerBack in routerBackoffice"
43
+ :key="routerBack.path"
44
+ >
45
+ <router-link
46
+ v-if="!isPodcastmaker && routerBack.condition"
47
+ :class="routerBack.class"
48
+ :to="routerBack.path"
59
49
  >
60
- {{ helpLink.title }}
61
- </a>
50
+ {{ routerBack.title }}
51
+ </router-link>
62
52
  </template>
53
+ <template v-if="helpLinks.length">
54
+ <hr />
55
+ <template v-for="helpLink in helpLinks" :key="helpLink.title">
56
+ <a
57
+ :href="helpLink.href"
58
+ class="octopus-dropdown-item"
59
+ rel="noopener"
60
+ target="_blank"
61
+ realLink="true"
62
+ >
63
+ {{ helpLink.title }}
64
+ </a>
65
+ </template>
66
+ </template>
67
+ <hr />
68
+ <a class="octopus-dropdown-item c-hand" @click="logoutFunction">
69
+ {{ $t("Logout") }}
70
+ </a>
63
71
  </template>
64
- <hr />
65
- <a class="octopus-dropdown-item c-hand" @click="logoutFunction">
66
- {{ $t("Logout") }}
67
- </a>
68
- </template>
69
- <router-link class="octopus-dropdown-item" to="/main/pub/contact">
70
- {{ $t("Contact") }}
71
- </router-link>
72
- </ClassicPopover>
72
+ <router-link class="octopus-dropdown-item" to="/main/pub/contact">
73
+ {{ $t("Contact") }}
74
+ </router-link>
75
+ </ClassicPopover>
73
76
  </teleport>
74
77
  </div>
75
78
  </template>
@@ -60,7 +60,12 @@ export default defineComponent({
60
60
  computed: {
61
61
  ...mapState(useGeneralStore, ["contentToDisplay"]),
62
62
  isContentToDisplay(): boolean {
63
- return "podcast" === this.$route.name || "emission" === this.$route.name || "playlist" === this.$route.name|| "radio" === this.$route.name;
63
+ return (
64
+ "podcast" === this.$route.name ||
65
+ "emission" === this.$route.name ||
66
+ "playlist" === this.$route.name ||
67
+ "radio" === this.$route.name
68
+ );
64
69
  },
65
70
  backgroundDisplay(): string {
66
71
  if (!this.contentToDisplay) {
@@ -12,7 +12,7 @@
12
12
  <h4 class="mb-3">
13
13
  {{ $t("Configure your Newsletter tile") }}
14
14
  </h4>
15
- <div
15
+ <div
16
16
  v-for="colors in arrayColors"
17
17
  :key="colors.mainText"
18
18
  class="d-flex align-items-center mb-3"
@@ -28,11 +28,13 @@
28
28
  />
29
29
  <div class="d-flex flex-column">
30
30
  <div class="fw-bold">{{ colors.mainText }}</div>
31
- <div v-if="colors.secondText" class="descriptionText">{{ colors.secondText }}</div>
31
+ <div v-if="colors.secondText" class="descriptionText">
32
+ {{ colors.secondText }}
33
+ </div>
32
34
  </div>
33
35
  </div>
34
36
  </div>
35
- <!-- eslint-disable vue/no-v-html -->
37
+ <!-- eslint-disable vue/no-v-html -->
36
38
  <div v-html="newsletterHtml" />
37
39
  <!-- eslint-enable -->
38
40
  </div>
@@ -40,7 +42,7 @@
40
42
  class="btn flex-grow-1 mt-3 fw-bold"
41
43
  @click="onCopyCode(newsletterHtml, afterCopy)"
42
44
  >
43
- <span class="saooti-copy me-2"/>
45
+ <span class="saooti-copy me-2" />
44
46
  {{ $t("Copy and embed the HTML code into your email tool") }}
45
47
  </button>
46
48
  <SnackBar ref="snackbar" position="bottom-left" />
@@ -91,9 +93,14 @@ export default defineComponent({
91
93
  data() {
92
94
  return {
93
95
  arrayColors: [
94
- {color:"#40a372", mainText: this.$t('Choose main color'),secondText: this.$t('Newsletter elements') },
95
- {color:"#000000", mainText: this.$t('Choose text color') },
96
- {color:"#FFFFFF", mainText: this.$t('Choose background color') }],
96
+ {
97
+ color: "#40a372",
98
+ mainText: this.$t("Choose main color"),
99
+ secondText: this.$t("Newsletter elements"),
100
+ },
101
+ { color: "#000000", mainText: this.$t("Choose text color") },
102
+ { color: "#FFFFFF", mainText: this.$t("Choose background color") },
103
+ ],
97
104
  shareUrl: window.location.href,
98
105
  };
99
106
  },
@@ -106,7 +113,7 @@ export default defineComponent({
106
113
  imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
107
114
  "Podcast image",
108
115
  )}`,
109
- title:this.podcast.title,
116
+ title: this.podcast.title,
110
117
  description: this.podcast.description ?? "",
111
118
  shareText: this.$t("Listen this episode"),
112
119
  emissionHtml: `<tr><td style="padding:5px 0;">
@@ -206,11 +213,14 @@ export default defineComponent({
206
213
  "" !== this.authOrganisation.id
207
214
  ? this.authOrganisation.id
208
215
  : state.generalParameters.organisationId;
209
- if(!orgaId ||orgaId?.length){
216
+ if (!orgaId || orgaId?.length) {
210
217
  return;
211
218
  }
212
219
  const attributes = await this.getOrgaAttributes(orgaId ?? "");
213
- if (Object.hasOwn(attributes, "podcastmakerUrl") && (attributes.podcastmakerUrl as string|undefined|null)?.length) {
220
+ if (
221
+ Object.hasOwn(attributes, "podcastmakerUrl") &&
222
+ (attributes.podcastmakerUrl as string | undefined | null)?.length
223
+ ) {
214
224
  this.shareUrl =
215
225
  attributes.podcastmakerUrl +
216
226
  window.location.pathname +
@@ -234,9 +244,9 @@ export default defineComponent({
234
244
  <style lang="scss">
235
245
  .octopus-app {
236
246
  #newsletter-modal {
237
- .octopus-modal-body{
247
+ .octopus-modal-body {
238
248
  overflow-x: inherit;
239
- @media (max-width: 500px){
249
+ @media (max-width: 500px) {
240
250
  overflow-x: auto;
241
251
  }
242
252
  }
@@ -44,22 +44,24 @@
44
44
  :podcast="podcast"
45
45
  :organisation-id="podcast.organisation.id"
46
46
  />
47
- <ClassicLazy :min-height="550">
48
- <PodcastInlineList
49
- class="mt-4"
50
- :podcast-id="podcastId"
51
- :title="$t('Suggested listening')"
52
- />
53
- </ClassicLazy>
54
- <ClassicLazy v-for="c in categories" :key="c.id" :min-height="550">
55
- <PodcastInlineList
56
- class="mt-4"
57
- :iab-id="c.id"
58
- :href="'/main/pub/category/' + c.id"
59
- :title="$t('More episodes of this category : ', { name: c.name })"
60
- :button-text="$t('All podcast button', { name: c.name })"
61
- />
62
- </ClassicLazy>
47
+ <template v-if="!hideSuggestions">
48
+ <ClassicLazy :min-height="550">
49
+ <PodcastInlineList
50
+ class="mt-4"
51
+ :podcast-id="podcastId"
52
+ :title="$t('Suggested listening')"
53
+ />
54
+ </ClassicLazy>
55
+ <ClassicLazy v-for="c in categories" :key="c.id" :min-height="550">
56
+ <PodcastInlineList
57
+ class="mt-4"
58
+ :iab-id="c.id"
59
+ :href="'/main/pub/category/' + c.id"
60
+ :title="$t('More episodes of this category : ', { name: c.name })"
61
+ :button-text="$t('All podcast button', { name: c.name })"
62
+ />
63
+ </ClassicLazy>
64
+ </template>
63
65
  </div>
64
66
  </template>
65
67
  <ClassicLoading
@@ -144,6 +146,14 @@ export default defineComponent({
144
146
 
145
147
  computed: {
146
148
  ...mapState(useGeneralStore, ["storedCategories"]),
149
+ hideSuggestions(): boolean {
150
+ return (
151
+ "true" ===
152
+ (this.podcast?.emission?.annotations?.["HIDE_SUGGESTIONS"] as
153
+ | string
154
+ | undefined)
155
+ );
156
+ },
147
157
  isComments(): boolean {
148
158
  if (!this.podcast) return true;
149
159
  let podcastComment = "INHERIT";