@saooti/octopus-sdk 40.1.5 → 40.1.7

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/index.ts CHANGED
@@ -12,6 +12,7 @@ export const getSearch = () => import("./src/components/pages/SearchPage.vue");
12
12
  export const getHome = () => import("./src/components/pages/HomePage.vue");
13
13
  export const getCategory = () => import("./src/components/pages/CategoryPage.vue");
14
14
  export const getRubrique = () => import("./src/components/pages/RubriquePage.vue");
15
+ export const getTag = () => import("./src/components/pages/TagPage.vue");
15
16
  export const getError403Page = () => import("./src/components/pages/Error403Page.vue");
16
17
  export const getRadio = () => import("./src/components/pages/RadioPage.vue");
17
18
  export const getVideo = () => import("./src/components/pages/VideoPage.vue");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "40.1.5",
3
+ "version": "40.1.7",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/plateform.conf CHANGED
@@ -1 +1 @@
1
- preprod.saooti.org
1
+ dev2.saooti.org
@@ -44,3 +44,31 @@ export default defineComponent({
44
44
  },
45
45
  });
46
46
  </script>
47
+ <style lang="scss">
48
+ .octopus-app{
49
+ /** Comma list style */
50
+ .comma {
51
+ display: flex;
52
+ flex-wrap: wrap;
53
+ align-items: center;
54
+ margin: 0.5rem 0;
55
+
56
+ > a{
57
+ text-transform: capitalize;
58
+ }
59
+
60
+ > a, .comma-element {
61
+ &::after {
62
+ content: ", ";
63
+ margin-right: 0.2rem;
64
+ }
65
+
66
+ &:last-child {
67
+ &::after {
68
+ content: "";
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ </style>
@@ -91,6 +91,7 @@ export default defineComponent({
91
91
  noRubriquageId: { default: () => [], type: Array as () => Array<number> },
92
92
  justSizeChosen: { default: false, type: Boolean },
93
93
  withVideo: { default: undefined, type: Boolean },
94
+ includeTag:{ default: () => [], type: Array as () => Array<string> },
94
95
  },
95
96
  emits: ["fetch", "emptyList"],
96
97
 
@@ -129,7 +130,7 @@ export default defineComponent({
129
130
  return `${this.organisation}|${this.emissionId}|${this.sortCriteria}|${this.sort}
130
131
  ${this.iabId}|${this.participantId}|${this.query}|${this.monetisable}|${this.popularSort}|
131
132
  ${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.validity}|
132
- ${this.withVideo}`;
133
+ ${this.withVideo}|${this.includeTag}`;
133
134
  },
134
135
  organisation(): Array<string> {
135
136
  if (this.organisationId) {
@@ -214,6 +215,7 @@ export default defineComponent({
214
215
  : undefined, */
215
216
  includeStatus: ["READY", "PROCESSING"],
216
217
  withVideo: this.withVideo,
218
+ includeTag: this.includeTag.length ? this.includeTag : undefined,
217
219
  };
218
220
  try {
219
221
  const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
@@ -117,6 +117,7 @@
117
117
  <TagList
118
118
  v-if="undefined !== podcast.tags && 0 !== podcast.tags.length"
119
119
  :tag-list="podcast.tags"
120
+ :orga-id="podcast.organisation.id"
120
121
  :podcast-annotations="podcast.annotations"
121
122
  />
122
123
  <PodcastRubriqueList
@@ -1,16 +1,20 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="undefined !== tagList && 0 !== tagList.length"
4
- class="tag-list-component d-flex align-items-center flex-wrap comma mb-3 small-text"
4
+ class="tag-list-component d-flex align-items-center flex-wrap mb-3 small-text"
5
5
  >
6
6
  <div class="fw-bold me-3">
7
7
  {{ $t("Podcast tags") + " : " }}
8
8
  </div>
9
- <div
9
+ <router-link
10
10
  v-for="(tag, index) in tagList"
11
11
  :key="tag"
12
- class="d-flex align-items-center comma-element"
13
- :class="ouestFranceMainTag === tag ? 'main-of-tag' : ''"
12
+ class="d-flex align-items-center border p-1 m-1 text-dark"
13
+ :to="{
14
+ name: 'tag',
15
+ params: { tag: tag},
16
+ query: organisationQuery
17
+ }"
14
18
  >
15
19
  <template v-if="!isOuestFranceTag(tag)">{{ tag }}</template>
16
20
  <template v-else>
@@ -35,7 +39,7 @@
35
39
  :is-fixed="true"
36
40
  />
37
41
  </template>
38
- </div>
42
+ </router-link>
39
43
  </div>
40
44
  </template>
41
45
 
@@ -45,6 +49,8 @@ const ClassicPopover = defineAsyncComponent(
45
49
  () => import("../../misc/ClassicPopover.vue"),
46
50
  );
47
51
  import {useTagOf} from "../../composable/useTagOf";
52
+ import { useFilterStore } from "@/stores/FilterStore";
53
+ import { mapState } from "pinia";
48
54
  export default defineComponent({
49
55
  name: "TagList",
50
56
  components: {
@@ -58,12 +64,20 @@ export default defineComponent({
58
64
  [key: string]: string | number | boolean | undefined;
59
65
  },
60
66
  },
67
+ orgaId: {default: "", type: String,},
61
68
  },
62
69
  setup(){
63
70
  const { isOuestFranceTag, formateOfTag } = useTagOf();
64
71
  return { isOuestFranceTag, formateOfTag }
65
72
  },
66
73
  computed: {
74
+ ...mapState(useFilterStore, ["filterOrgaId"]),
75
+ organisationQuery(){
76
+ if(this.filterOrgaId){
77
+ return undefined;
78
+ }
79
+ return { o: this.orgaId};
80
+ },
67
81
  ouestFranceMainTag(): string | undefined {
68
82
  if (this.podcastAnnotations?.["mainOfTag"]) {
69
83
  for (const key in this.podcastAnnotations) {
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <section class="page-box tag-page">
3
+ <h1>
4
+ {{ $t("Search for keyword", {tag:titleDisplay})}}
5
+ <img
6
+ v-if="isOf"
7
+ width="30"
8
+ height="30"
9
+ class="ouest-france-logo-tag-page"
10
+ role="presentation"
11
+ alt=""
12
+ src="/img/ouest_france_logo.svg"
13
+ />
14
+ </h1>
15
+ <ProductorSearch
16
+ v-model:organisation-id="organisationId"
17
+ v-model:search-pattern="searchPattern"
18
+ />
19
+ <PodcastList
20
+ :first="paginateFirst"
21
+ :size="ps"
22
+ :include-tag="[tag]"
23
+ :organisation-id="orgaArray"
24
+ :query="searchMinSize"
25
+ :sort-criteria="sortOrder ?? 'DATE'"
26
+ />
27
+ </section>
28
+ </template>
29
+
30
+ <script setup lang="ts">
31
+ import { useI18n } from "vue-i18n";
32
+ import { useSeoTitleUrl } from "../composable/route/useSeoTitleUrl";
33
+ import { useSimplePageParam } from "../composable/route/useSimplePageParam";
34
+ import { useTagOf } from "../composable/useTagOf";
35
+ import PodcastList from "../display/podcasts/PodcastList.vue";
36
+ import { computed, defineAsyncComponent, ref, watch } from "vue";
37
+ const ProductorSearch = defineAsyncComponent(
38
+ () => import("../display/filter/ProductorSearch.vue"),
39
+ );
40
+
41
+ const props = defineProps({
42
+ pr: { default: 0, type: Number },
43
+ ps: { default: 30, type: Number },
44
+ tag: { default: undefined, type: String },
45
+ routeOrga: { default: undefined, type: String },
46
+ routeQuery: { default: "", type: String },
47
+ });
48
+
49
+ const {
50
+ searchPattern,
51
+ organisationId,
52
+ searchMinSize,
53
+ paginateFirst,
54
+ } = useSimplePageParam(props);
55
+
56
+ const { isOuestFranceTag, formateOfTag } = useTagOf();
57
+
58
+ const { updatePathParams } = useSeoTitleUrl();
59
+
60
+ const titleDisplay = ref("");
61
+ const isOf = ref(false);
62
+ const {t} = useI18n();
63
+
64
+ const orgaArray = computed(() =>organisationId.value ? [organisationId.value] : []);
65
+ const sortOrder = computed(() =>{
66
+ if(searchMinSize.value.length){
67
+ return "SCORE";
68
+ }
69
+ return undefined;
70
+ });
71
+
72
+
73
+ watch(()=>props.tag, async () => {
74
+ const tagString = props.tag?? "";
75
+ isOf.value = isOuestFranceTag(tagString);
76
+ titleDisplay.value= isOf.value ? formateOfTag(tagString) :tagString;
77
+ updatePathParams(t("Search for keyword", {tag:titleDisplay.value}));
78
+ }, {immediate: true});
79
+
80
+
81
+ </script>
82
+ <style lang="scss">
83
+ .octopus-app .tag-page{
84
+ .ouest-france-logo-tag-page{
85
+ width: 30px;
86
+ height: 30px;
87
+ margin-left: 10px;
88
+ vertical-align: center;
89
+ @media (width <= 500px) {
90
+ width: 20px;
91
+ height: 20px;
92
+ }
93
+ }
94
+ }
95
+ </style>
package/src/locale/de.ts CHANGED
@@ -411,4 +411,5 @@ export default {
411
411
  "Font size":"Schriftgröße",
412
412
  "Preview":"Vorschau",
413
413
  "Save":"Speichern",
414
+ "Search for keyword": "Suche nach Schlüsselwort: {tag}",
414
415
  }
package/src/locale/en.ts CHANGED
@@ -414,4 +414,5 @@ export default {
414
414
  "Font size":"Font size",
415
415
  "Preview":"Preview",
416
416
  "Save":"Save",
417
+ "Search for keyword": "Search for keyword: {tag}",
417
418
  };
package/src/locale/es.ts CHANGED
@@ -412,4 +412,5 @@ export default {
412
412
  "Font size":"Tamaño de fuente",
413
413
  "Preview":"Avance",
414
414
  "Save":"Ahorrar",
415
+ "Search for keyword": "Buscar palabra clave: {etiqueta}",
415
416
  }
package/src/locale/fr.ts CHANGED
@@ -421,4 +421,5 @@ export default {
421
421
  "Font size":"Taille de la police",
422
422
  "Preview":"Aperçu",
423
423
  "Save":"Sauvegarder",
424
+ "Search for keyword": "Recherche pour le mot-clé: {tag}",
424
425
  };
package/src/locale/it.ts CHANGED
@@ -408,4 +408,5 @@ export default{
408
408
  "Font size":"Dimensione del carattere",
409
409
  "Preview":"Anteprima",
410
410
  "Save":"Salva",
411
+ "Search for keyword": "Cerca parola chiave: {tag}",
411
412
  };
package/src/locale/sl.ts CHANGED
@@ -403,4 +403,5 @@ export default {
403
403
  "Font size":"Velikost pisave",
404
404
  "Preview":"Predogled",
405
405
  "Save":"Shrani",
406
+ "Search for keyword": "Iskanje ključne besede: {tag}",
406
407
  }
@@ -24,6 +24,7 @@ const ParticipantPage = () => import("@/components/pages/ParticipantPage.vue");
24
24
  const SearchPage = () => import("@/components/pages/SearchPage.vue");
25
25
  const CategoryPage = () => import("@/components/pages/CategoryPage.vue");
26
26
  const RubriquePage = () => import("@/components/pages/RubriquePage.vue");
27
+ const TagPage = () => import("@/components/pages/TagPage.vue");
27
28
  const LivesPage = () => import("@/components/pages/LivesPage.vue");
28
29
  const PlaylistPage = () => import("@/components/pages/PlaylistPage.vue");
29
30
  const PlaylistsPage = () => import("@/components/pages/PlaylistsPage.vue");
@@ -206,6 +207,21 @@ const routes: Array<RouteRecordRaw> = [
206
207
  title: "",
207
208
  }
208
209
  },
210
+ {
211
+ path: "/main/pub/tag/:tag([^?]*)?:productor?",
212
+ name: "tag",
213
+ component: TagPage,
214
+ props: (route: RouteLocationNormalized) => ({
215
+ pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
216
+ ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
217
+ tag: route.params.tag,
218
+ routeOrga:route.query.o,
219
+ routeQuery: route.query.q ?? "",
220
+ }),
221
+ meta:{
222
+ title: "",
223
+ }
224
+ },
209
225
  {
210
226
  path: "/main/pub/lives/:productor?",
211
227
  name: "lives",
@@ -210,31 +210,6 @@ main, #app{
210
210
  .hid{
211
211
  display: none !important;
212
212
  }
213
-
214
- /** Comma list style */
215
- .comma {
216
- display: flex;
217
- flex-wrap: wrap;
218
- align-items: center;
219
- margin: 0.5rem 0;
220
-
221
- > a{
222
- text-transform: capitalize;
223
- }
224
-
225
- > a, .comma-element {
226
- &::after {
227
- content: ", ";
228
- margin-right: 0.2rem;
229
- }
230
-
231
- &:last-child {
232
- &::after {
233
- content: "";
234
- }
235
- }
236
- }
237
- }
238
213
 
239
214
  /* Line clamp */
240
215
  .basic-line-clamp{