@saooti/octopus-sdk 37.0.60 → 37.1.0

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": "37.0.60",
3
+ "version": "37.1.0",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/src/App.vue CHANGED
@@ -6,7 +6,7 @@
6
6
  :is-education="false"
7
7
  @close="displayMenu = false"
8
8
  />
9
- <CategoryFilter />
9
+ <CategoryFilter v-if="firstDisplayCategoryFilter" />
10
10
  <router-view />
11
11
  <ClassicLazy
12
12
  v-if="pageFullyLoad"
@@ -22,7 +22,6 @@
22
22
  <script lang="ts">
23
23
  import TopBar from "@/components/misc/TopBar.vue";
24
24
  import PlayerComponent from "@/components/misc/player/PlayerComponent.vue";
25
- import CategoryFilter from "@/components/display/categories/CategoryFilter.vue";
26
25
  import ClassicLazy from "@/components/misc/ClassicLazy.vue";
27
26
  import { state } from "./stores/ParamSdkStore";
28
27
  import { Rubriquage } from "./stores/class/rubrique/rubriquage";
@@ -40,6 +39,9 @@ const LeftMenu = defineAsyncComponent(
40
39
  const FooterOctopus = defineAsyncComponent(
41
40
  () => import("@/components/misc/FooterSection.vue"),
42
41
  );
42
+ const CategoryFilter = defineAsyncComponent(
43
+ () => import("@/components/display/categories/CategoryFilter.vue"),
44
+ );
43
45
  export default defineComponent({
44
46
  name: "App",
45
47
 
@@ -59,7 +61,8 @@ export default defineComponent({
59
61
  displayMenu: false as boolean,
60
62
  reload: false as boolean,
61
63
  isInit: false as boolean,
62
- pageFullyLoad: false as boolean
64
+ pageFullyLoad: false as boolean,
65
+ firstDisplayCategoryFilter: false as boolean,
63
66
  };
64
67
  },
65
68
 
@@ -69,6 +72,17 @@ export default defineComponent({
69
72
  },
70
73
 
71
74
  watch: {
75
+ $route: {
76
+ deep: true,
77
+ immediate: true,
78
+ async handler() {
79
+ if(this.firstDisplayCategoryFilter){
80
+ return;
81
+ }
82
+ const namesRouteWithCategoryFilter = ["homePriv", "home", "podcasts", "emissions", "participants", "playlists"];
83
+ this.firstDisplayCategoryFilter = namesRouteWithCategoryFilter.includes(this.$route.name?.toString()?? "");
84
+ },
85
+ },
72
86
  "$i18n.locale"() {
73
87
  this.$forceUpdate();
74
88
  this.reload = !this.reload;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-if="isComments" class="module-box">
2
+ <div class="module-box">
3
3
  <div class="d-flex align-items-center">
4
4
  <h2 class="mb-0 me-2" data-selenium="episode-comment-counter">
5
5
  {{ commentTitle }}
@@ -29,15 +29,19 @@
29
29
  </template>
30
30
 
31
31
  <script lang="ts">
32
- import CommentList from "./CommentList.vue";
33
- import CommentInput from "./CommentInput.vue";
34
32
  import cookies from "../../mixins/cookies";
35
33
  import { Podcast } from "@/stores/class/general/podcast";
36
34
  import { Conference } from "@/stores/class/conference/conference";
37
35
  import { useCommentStore } from "@/stores/CommentStore";
38
36
  import { mapState, mapActions } from "pinia";
39
- import { defineComponent } from "vue";
37
+ import { defineAsyncComponent, defineComponent } from "vue";
40
38
  import { CommentPodcast } from "@/stores/class/general/comment";
39
+ const CommentList = defineAsyncComponent(
40
+ () => import("./CommentList.vue"),
41
+ );
42
+ const CommentInput = defineAsyncComponent(
43
+ () => import("./CommentInput.vue"),
44
+ );
41
45
  export default defineComponent({
42
46
  name: "CommentSection",
43
47
  components: {
@@ -65,27 +69,6 @@ export default defineComponent({
65
69
  : "";
66
70
  return this.$t("Podcast's comments") + count;
67
71
  },
68
- isComments(): boolean {
69
- if (!this.podcast) return true;
70
- let podcastComment = "INHERIT";
71
- if (this.podcast.annotations && this.podcast.annotations.COMMENTS) {
72
- podcastComment = this.podcast.annotations.COMMENTS as string;
73
- }
74
- let organisationComment = "LIVE_ONLY";
75
- if (this.podcast.organisation.comments) {
76
- organisationComment = this.podcast.organisation.comments;
77
- }
78
- return !(
79
- "NO" === podcastComment ||
80
- ("INHERIT" === podcastComment && "NO" === organisationComment) ||
81
- ("LIVE_RECORD" === podcastComment &&
82
- "READY_TO_RECORD" !== this.podcast.processingStatus) ||
83
- ("INHERIT" === podcastComment &&
84
- "LIVE_ONLY" === organisationComment &&
85
- !this.podcast.conferenceId &&
86
- 0 !== this.podcast.conferenceId)
87
- );
88
- },
89
72
  knownIdentity: {
90
73
  get(): string | null {
91
74
  return this.commentKnownIdentity;
@@ -39,9 +39,6 @@ export default defineComponent({
39
39
 
40
40
  computed: {
41
41
  ...mapState(useFilterStore, ["filterOrgaId"]),
42
- idPopover(): string {
43
- return this.isGuest ? "popover-guests-help" : "popover-animators-help";
44
- },
45
42
  title(): string {
46
43
  return this.isGuest ? this.$t("Guests") : this.$t("Animated by");
47
44
  },
@@ -125,14 +125,13 @@
125
125
  :display-studio-access="isDebriefing"
126
126
  @validate-podcast="$emit('updatePodcast', $event)"
127
127
  />
128
- <TagList :tag-list="podcast.tags" />
128
+ <TagList v-if="undefined !== podcast.tags && 0 !== podcast.tags.length" :tag-list="podcast.tags" />
129
129
  </div>
130
130
  </template>
131
131
 
132
132
  <script lang="ts">
133
133
  import PodcastImage from "./PodcastImage.vue";
134
134
  import ParticipantDescription from "./ParticipantDescription.vue";
135
- import TagList from "./TagList.vue";
136
135
  import { state } from "../../../stores/ParamSdkStore";
137
136
  import dayjs from "dayjs";
138
137
  // @ts-ignore
@@ -155,6 +154,9 @@ const EditBox = defineAsyncComponent(
155
154
  const PodcastPlayBar = defineAsyncComponent(
156
155
  () => import("./PodcastPlayBar.vue"),
157
156
  );
157
+ const TagList = defineAsyncComponent(
158
+ () => import("./TagList.vue"),
159
+ );
158
160
  export default defineComponent({
159
161
  name: "PodcastModuleBox",
160
162
  components: {
@@ -35,8 +35,8 @@ export default {
35
35
  const shouldRender = ref(false);
36
36
  const targetEl = ref();
37
37
  const fixedMinHeight = ref(0);
38
- let unrenderTimer;
39
- let renderTimer;
38
+ let unrenderTimer: ReturnType<typeof setTimeout> | undefined;
39
+ let renderTimer: ReturnType<typeof setTimeout> | undefined;
40
40
 
41
41
  const { stop } = useIntersectionObserver(
42
42
  targetEl,
@@ -57,7 +57,7 @@ export default {
57
57
  // if the component was set to render, cancel that
58
58
  clearTimeout(renderTimer);
59
59
  unrenderTimer = setTimeout(() => {
60
- fixedMinHeight.value = targetEl.value.clientHeight;
60
+ fixedMinHeight.value = targetEl.value?.clientHeight ?? 0;
61
61
  shouldRender.value = false;
62
62
  }, props.unrenderDelay);
63
63
  }
@@ -51,12 +51,12 @@
51
51
  <script lang="ts">
52
52
  import { CommentPodcast } from "@/stores/class/general/comment";
53
53
  import { playerLogic } from "../../mixins/player/playerLogic";
54
- import PlayerCompact from "../player/PlayerCompact.vue";
55
- import PlayerLarge from "../player/PlayerLarge.vue";
56
54
  import { usePlayerStore } from "@/stores/PlayerStore";
57
55
  import { mapState, mapActions } from "pinia";
58
56
  import { defineComponent, defineAsyncComponent } from "vue";
59
57
  const PlayerVideo = defineAsyncComponent(() => import("./PlayerVideo.vue"));
58
+ const PlayerCompact = defineAsyncComponent(() => import("../player/PlayerCompact.vue"));
59
+ const PlayerLarge = defineAsyncComponent(() => import("../player/PlayerLarge.vue"));
60
60
  export default defineComponent({
61
61
  name: "PlayerComponent",
62
62
 
@@ -34,7 +34,7 @@
34
34
  :emission="podcast.emission"
35
35
  />
36
36
  <CommentSection
37
- v-if="!isPodcastmaker"
37
+ v-if="!isPodcastmaker && isComments"
38
38
  ref="commentSection"
39
39
  :podcast="podcast"
40
40
  :fetch-conference="fetchConference"
@@ -154,6 +154,27 @@ export default defineComponent({
154
154
 
155
155
  computed: {
156
156
  ...mapState(useGeneralStore, ["storedCategories"]),
157
+ isComments(): boolean {
158
+ if (!this.podcast) return true;
159
+ let podcastComment = "INHERIT";
160
+ if (this.podcast.annotations && this.podcast.annotations.COMMENTS) {
161
+ podcastComment = this.podcast.annotations.COMMENTS as string;
162
+ }
163
+ let organisationComment = "LIVE_ONLY";
164
+ if (this.podcast.organisation.comments) {
165
+ organisationComment = this.podcast.organisation.comments;
166
+ }
167
+ return !(
168
+ "NO" === podcastComment ||
169
+ ("INHERIT" === podcastComment && "NO" === organisationComment) ||
170
+ ("LIVE_RECORD" === podcastComment &&
171
+ "READY_TO_RECORD" !== this.podcast.processingStatus) ||
172
+ ("INHERIT" === podcastComment &&
173
+ "LIVE_ONLY" === organisationComment &&
174
+ !this.podcast.conferenceId &&
175
+ 0 !== this.podcast.conferenceId)
176
+ );
177
+ },
157
178
  backgroundDisplay(): string {
158
179
  if (!this.podcast) {
159
180
  return "";