@saooti/octopus-sdk 38.0.9 → 38.0.11

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.0.9",
3
+ "version": "38.0.11",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/src/App.vue CHANGED
@@ -24,9 +24,6 @@ import { useGeneralStore } from "@/stores/GeneralStore";
24
24
  import { mapState, mapActions } from "pinia";
25
25
  import { defineAsyncComponent, defineComponent } from "vue";
26
26
  import { Category } from "./stores/class/general/category";
27
- const LeftMenu = defineAsyncComponent(
28
- () => import("@/components/misc/LeftMenu.vue"),
29
- );
30
27
  const FooterOctopus = defineAsyncComponent(
31
28
  () => import("@/components/misc/FooterSection.vue"),
32
29
  );
@@ -38,7 +35,6 @@ export default defineComponent({
38
35
 
39
36
  components: {
40
37
  TopBar,
41
- LeftMenu,
42
38
  CategoryFilter,
43
39
  FooterOctopus,
44
40
  PlayerComponent,
@@ -2,6 +2,9 @@
2
2
  .octopus-form-item{
3
3
  min-height: 1.44rem;
4
4
  padding: 0.4rem 0;
5
+ @media (max-width: 960px) {
6
+ padding: 0;
7
+ }
5
8
  }
6
9
  .form-label {
7
10
  display: block;
@@ -5,7 +5,11 @@
5
5
  :style="backgroundDisplay"
6
6
  >
7
7
  <h1>{{ titleDisplay }}</h1>
8
- <div v-show="isDisplay" class="d-flex flex-column justify-content-end">
8
+ <div
9
+ v-if="!isPhone"
10
+ v-show="isDisplay"
11
+ class="d-flex flex-column justify-content-end"
12
+ >
9
13
  <ol
10
14
  v-if="filterIab || filterRubrique.length"
11
15
  class="octopus-breadcrumb d-flex align-items-center justify-content-center flex-wrap"
@@ -67,6 +71,7 @@ import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
67
71
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
68
72
  import { useFilterStore } from "@/stores/FilterStore";
69
73
  import { state } from "../../../stores/ParamSdkStore";
74
+ import resizePhone from "../../mixins/resizePhone";
70
75
  import { mapState, mapActions } from "pinia";
71
76
  import { defineComponent, defineAsyncComponent } from "vue";
72
77
  const CategoryList = defineAsyncComponent(() => import("./CategoryList.vue"));
@@ -84,9 +89,12 @@ export default defineComponent({
84
89
  RubriqueList,
85
90
  RubriqueChooser,
86
91
  },
92
+ mixins: [resizePhone],
87
93
  data() {
88
94
  return {
89
95
  isCategories: false as boolean,
96
+ isPhone: false as boolean,
97
+ windowWidth: 0 as number,
90
98
  };
91
99
  },
92
100
  computed: {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="categories.length"
4
- class="d-inline-flex w-100 mb-3 ps-3 pe-3 hide-phone category-list"
4
+ class="d-inline-flex w-100 mb-3 ps-3 pe-3 category-list"
5
5
  >
6
6
  <div ref="categoryListContainer" class="category-list-container">
7
7
  <button
@@ -2,7 +2,7 @@
2
2
  <div class="d-flex flex-column justify-content-center align-items-center">
3
3
  <button
4
4
  class="d-flex justify-content-center align-items-center mb-3 text-secondary btn-transparent"
5
- @click="showFilters = !showFilters"
5
+ @click="clickShowFilters"
6
6
  >
7
7
  <div>{{ $t("Advanced filters") }}</div>
8
8
  <div
@@ -10,7 +10,11 @@
10
10
  :class="{ 'arrow-transform': showFilters }"
11
11
  />
12
12
  </button>
13
- <div v-show="showFilters" class="advanced-search-container">
13
+ <div
14
+ v-if="firstLoaded"
15
+ v-show="showFilters"
16
+ class="advanced-search-container"
17
+ >
14
18
  <div class="d-flex flex-column">
15
19
  <div class="text-primary mb-2">
16
20
  {{ $t("Filter") }}
@@ -77,16 +81,22 @@
77
81
  <script lang="ts">
78
82
  import { state } from "../../../stores/ParamSdkStore";
79
83
  import { orgaComputed } from "../../mixins/orgaComputed";
80
- import CategorySearchFilter from "./CategorySearchFilter.vue";
81
- import DateFilter from "./DateFilter.vue";
82
- import SearchOrder from "./SearchOrder.vue";
83
- import RubriqueFilter from "./RubriqueFilter.vue";
84
- import ClassicCheckbox from "../../form/ClassicCheckbox.vue";
85
84
  import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
86
85
  import { defineComponent, defineAsyncComponent } from "vue";
87
86
  const MonetizableFilter = defineAsyncComponent(
88
87
  () => import("./MonetizableFilter.vue"),
89
88
  );
89
+ const CategorySearchFilter = defineAsyncComponent(
90
+ () => import("./CategorySearchFilter.vue"),
91
+ );
92
+ const RubriqueFilter = defineAsyncComponent(
93
+ () => import("./RubriqueFilter.vue"),
94
+ );
95
+ const ClassicCheckbox = defineAsyncComponent(
96
+ () => import("../../form/ClassicCheckbox.vue"),
97
+ );
98
+ const DateFilter = defineAsyncComponent(() => import("./DateFilter.vue"));
99
+ const SearchOrder = defineAsyncComponent(() => import("./SearchOrder.vue"));
90
100
  export default defineComponent({
91
101
  components: {
92
102
  MonetizableFilter,
@@ -123,6 +133,7 @@ export default defineComponent({
123
133
  isNotVisible: this.includeHidden,
124
134
  isNotValidate: false as boolean,
125
135
  showFilters: false as boolean,
136
+ firstLoaded: false as boolean,
126
137
  };
127
138
  },
128
139
 
@@ -183,6 +194,12 @@ export default defineComponent({
183
194
  },
184
195
  },
185
196
  methods: {
197
+ clickShowFilters(): void {
198
+ if (!this.firstLoaded) {
199
+ this.firstLoaded = true;
200
+ }
201
+ this.showFilters = !this.showFilters;
202
+ },
186
203
  updateFromDate(value: string): void {
187
204
  this.$emit("updateFromDate", value);
188
205
  },
@@ -28,11 +28,7 @@
28
28
  <div
29
29
  v-for="planningItem in planning[daySelected]"
30
30
  v-else
31
- :key="
32
- planningItem.occurrenceId +
33
- '' +
34
- planningItem.liveId
35
- "
31
+ :key="planningItem.occurrenceId + '' + planningItem.liveId"
36
32
  class="d-flex align-items-center mb-3"
37
33
  >
38
34
  <div class="program-item-date fw-bold flex-shrink-0">
@@ -57,10 +53,14 @@
57
53
  height="150"
58
54
  class="m-2"
59
55
  :title="
60
- $t('Episode name image', { name: planningItem.podcastData.title })
56
+ $t('Episode name image', {
57
+ name: planningItem.podcastData.title,
58
+ })
61
59
  "
62
60
  :alt="
63
- $t('Episode name image', { name: planningItem.podcastData.title })
61
+ $t('Episode name image', {
62
+ name: planningItem.podcastData.title,
63
+ })
64
64
  "
65
65
  />
66
66
  <div class="d-flex flex-column">
@@ -185,7 +185,9 @@ export default defineComponent({
185
185
  return b.startDate > a.startDate ? -1 : 0;
186
186
  });
187
187
  }
188
- this.planning[this.daySelected] = occurrences.filter((oc) => oc.podcastId);
188
+ this.planning[this.daySelected] = occurrences.filter(
189
+ (oc) => oc.podcastId,
190
+ );
189
191
  } catch {
190
192
  this.error = true;
191
193
  }
@@ -207,10 +209,10 @@ export default defineComponent({
207
209
  width: 100px;
208
210
  font-size: 1.1rem;
209
211
  }
210
- .button-date{
212
+ .button-date {
211
213
  border: 1px solid #ddd;
212
214
  padding: 0.5rem 0;
213
- &:hover{
215
+ &:hover {
214
216
  background: #ddd;
215
217
  }
216
218
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="d-inline-flex w-100 mb-3 px-3 hide-phone">
2
+ <div class="d-inline-flex w-100 mb-3 px-3">
3
3
  <div ref="rubriqueListContainer" class="rubrique-list-container">
4
4
  <label for="rubrique-list-select" class="hid">{{ $t("By topic") }}</label>
5
5
  <select
@@ -24,7 +24,7 @@
24
24
  :title="$t('Advanced sharing')"
25
25
  :to="{
26
26
  name: 'advancedShare',
27
- params: { podcastId: podcast.podcastId }
27
+ params: { podcastId: podcast.podcastId },
28
28
  }"
29
29
  />
30
30
  </div>
@@ -215,7 +215,7 @@ export default defineComponent({
215
215
  authenticated(): boolean {
216
216
  return state.generalParameters.authenticated as boolean;
217
217
  },
218
- isProduction() : boolean{
218
+ isProduction(): boolean {
219
219
  return state.generalParameters.isProduction as boolean;
220
220
  },
221
221
  isPodcastmaker(): boolean {
@@ -161,7 +161,10 @@ export default defineComponent({
161
161
  return (
162
162
  undefined !== this.podcast &&
163
163
  undefined !== this.podcast.article &&
164
- 0 !== this.podcast.article.length
164
+ 0 !== this.podcast.article.length &&
165
+ ("default" === this.iFrameModel ||
166
+ "large" === this.iFrameModel ||
167
+ "largeMore" === this.iFrameModel)
165
168
  );
166
169
  },
167
170
  displayTranscriptParam(): boolean {
@@ -355,7 +358,7 @@ export default defineComponent({
355
358
  if (!this.proceedReading) {
356
359
  url.push("&proceed=false");
357
360
  }
358
- if (!this.displayArticle) {
361
+ if (!this.displayArticle && this.displayArticleParam) {
359
362
  url.push("&article=false");
360
363
  }
361
364
  if (!this.displayTranscript) {
@@ -52,18 +52,18 @@ export default defineComponent({
52
52
  undefined !== this.podcast && undefined !== this.podcast.video?.videoId
53
53
  );
54
54
  },
55
- optionsSelectLive(){
55
+ optionsSelectLive() {
56
56
  return [
57
57
  { name: this.$t("Large version"), value: "large", condition: true },
58
58
  {
59
59
  name: this.$t("High version"),
60
60
  value: "videoLive",
61
61
  condition: this.podcast && this.podcast.podcastId,
62
- }
62
+ },
63
63
  ];
64
64
  },
65
65
  optionsSelect() {
66
- if(this.isLive){
66
+ if (this.isLive) {
67
67
  return this.optionsSelectLive;
68
68
  }
69
69
  return [
@@ -114,7 +114,7 @@ export default defineComponent({
114
114
  if (this.isVideoPodcast) {
115
115
  this.$emit("update:iFrameModel", "video");
116
116
  }
117
- if(this.isLive){
117
+ if (this.isLive) {
118
118
  return;
119
119
  }
120
120
  await this.initCustomPlayers();
@@ -106,13 +106,13 @@ export default defineComponent({
106
106
  routerBackoffice() {
107
107
  return [
108
108
  {
109
- title: this.$t('My space'),
109
+ title: this.$t("My space"),
110
110
  class: "octopus-dropdown-item show-small-phone-flex",
111
111
  path: "/main/priv/backoffice",
112
112
  condition: this.isAuthenticatedWithOrga,
113
113
  },
114
114
  {
115
- title: this.$t('Upload'),
115
+ title: this.$t("Upload"),
116
116
  class: "octopus-dropdown-item show-small-phone-flex",
117
117
  path: "/main/priv/upload",
118
118
  condition: this.isAuthenticatedWithOrga && this.isContribution,
@@ -4,8 +4,10 @@
4
4
  id="mobile-menu-dropdown"
5
5
  class="btn-transparent saooti-menu"
6
6
  :title="$t('open left Menu')"
7
+ @click="handleMenuClick"
7
8
  />
8
9
  <ClassicPopover
10
+ v-if="firstLoaded"
9
11
  target="mobile-menu-dropdown"
10
12
  :only-click="true"
11
13
  :is-fixed="true"
@@ -14,7 +16,11 @@
14
16
  <template v-for="link in routerLinkArray" :key="link.routeName">
15
17
  <router-link
16
18
  v-if="link.condition"
17
- :class="'home' === link.routeName ? 'octopus-dropdown-item show-phone-flex' : 'octopus-dropdown-item'"
19
+ :class="
20
+ 'home' === link.routeName
21
+ ? 'octopus-dropdown-item show-phone-flex'
22
+ : 'octopus-dropdown-item'
23
+ "
18
24
  :to="{
19
25
  name: link.routeName,
20
26
  query: getQueriesRouter(link.routeName),
@@ -63,12 +69,14 @@ import { Organisation } from "@/stores/class/general/organisation";
63
69
  const OrganisationChooserLight = defineAsyncComponent(
64
70
  () => import("../display/organisation/OrganisationChooserLight.vue"),
65
71
  );
66
- import ClassicPopover from "../misc/ClassicPopover.vue";
72
+ const ClassicPopover = defineAsyncComponent(
73
+ () => import("../misc/ClassicPopover.vue"),
74
+ );
67
75
  export default defineComponent({
68
76
  name: "MobileMenu",
69
77
  components: {
70
78
  OrganisationChooserLight,
71
- ClassicPopover
79
+ ClassicPopover,
72
80
  },
73
81
  mixins: [orgaFilter],
74
82
  props: {
@@ -78,9 +86,10 @@ export default defineComponent({
78
86
  return {
79
87
  organisationId: undefined as string | undefined,
80
88
  reset: false as boolean,
89
+ firstLoaded: false as boolean,
81
90
  };
82
91
  },
83
- computed:{
92
+ computed: {
84
93
  ...mapState(useGeneralStore, ["storedCategories"]),
85
94
  ...mapState(useFilterStore, [
86
95
  "filterLive",
@@ -122,7 +131,7 @@ export default defineComponent({
122
131
  },
123
132
  ];
124
133
  },
125
- categories(): Array<Category> {
134
+ categories(): Array<Category> {
126
135
  return this.storedCategories.filter((c: Category) => {
127
136
  if (this.isPodcastmaker) return c.podcastOrganisationCount;
128
137
  return c.podcastCount;
@@ -156,6 +165,15 @@ export default defineComponent({
156
165
  },
157
166
  },
158
167
  methods: {
168
+ handleMenuClick() {
169
+ if (this.firstLoaded) {
170
+ return;
171
+ }
172
+ this.firstLoaded = true;
173
+ setTimeout(() => {
174
+ document.getElementById("mobile-menu-dropdown")?.click();
175
+ }, 200);
176
+ },
159
177
  getQueriesRouter(routeName: string) {
160
178
  if (
161
179
  "podcasts" !== routeName &&
@@ -179,6 +197,5 @@ export default defineComponent({
179
197
  this.removeSelectedOrga();
180
198
  },
181
199
  },
182
-
183
200
  });
184
201
  </script>
@@ -27,12 +27,12 @@
27
27
  />
28
28
  </router-link>
29
29
  <OrganisationChooserLight
30
- v-if="!isPodcastmaker && organisationId"
30
+ v-if="!isPodcastmaker && organisationId && !isPhone"
31
31
  page="topBar"
32
32
  width="auto"
33
33
  :defaultanswer="$t('No organisation filter')"
34
34
  :value="organisationId"
35
- class="ms-3 me-2 hide-phone"
35
+ class="ms-3 me-2"
36
36
  :reset="reset"
37
37
  @selected="onOrganisationSelected"
38
38
  />
@@ -50,9 +50,10 @@
50
50
  </router-link>
51
51
  </template>
52
52
  <button
53
+ v-if="!isPhone"
53
54
  id="more-dropdown"
54
55
  :title="$t('More')"
55
- class="d-flex align-items-center hide-phone btn-transparent p-3"
56
+ class="d-flex align-items-center btn-transparent p-3"
56
57
  >
57
58
  <div class="link-hover">
58
59
  {{ $t("More") }}
@@ -81,7 +82,7 @@
81
82
  </div>
82
83
  </ClassicPopover>
83
84
  </div>
84
- <MobileMenu :is-education="isEducation"/>
85
+ <MobileMenu :is-education="isEducation" />
85
86
 
86
87
  <div class="d-flex flex-column">
87
88
  <div class="d-flex justify-content-end flex-nowrap">
@@ -109,22 +110,21 @@ import { useFilterStore } from "@/stores/FilterStore";
109
110
  import { mapState } from "pinia";
110
111
  import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
111
112
  import ClassicPopover from "../misc/ClassicPopover.vue";
113
+ import resizePhone from "../mixins/resizePhone";
112
114
  import { defineComponent, defineAsyncComponent } from "vue";
113
115
  const OrganisationChooserLight = defineAsyncComponent(
114
116
  () => import("../display/organisation/OrganisationChooserLight.vue"),
115
117
  );
116
- const MobileMenu = defineAsyncComponent(
117
- () => import("./MobileMenu.vue"),
118
- );
118
+ const MobileMenu = defineAsyncComponent(() => import("./MobileMenu.vue"));
119
119
  export default defineComponent({
120
120
  name: "TopBar",
121
121
  components: {
122
122
  OrganisationChooserLight,
123
123
  HomeDropdown,
124
124
  ClassicPopover,
125
- MobileMenu
125
+ MobileMenu,
126
126
  },
127
- mixins: [orgaFilter, imageProxy],
127
+ mixins: [orgaFilter, imageProxy, resizePhone],
128
128
  props: {
129
129
  isEducation: { default: false, type: Boolean },
130
130
  },
@@ -135,6 +135,8 @@ export default defineComponent({
135
135
  minScroll: 0 as number,
136
136
  organisationId: undefined as string | undefined,
137
137
  reset: false as boolean,
138
+ isPhone: false as boolean,
139
+ windowWidth: 0 as number,
138
140
  };
139
141
  },
140
142
  computed: {
@@ -20,7 +20,10 @@
20
20
  />
21
21
  <div class="text-uppercase h2 mb-3">{{ name }}</div>
22
22
  <!-- eslint-disable vue/no-v-html -->
23
- <p class="html-wysiwyg-content descriptionText" v-html="urlify(description)" />
23
+ <p
24
+ class="html-wysiwyg-content descriptionText"
25
+ v-html="urlify(description)"
26
+ />
24
27
  <!-- eslint-enable -->
25
28
  </div>
26
29
  </div>