@saooti/octopus-sdk 41.10.4-beta → 41.10.5

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/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 41.10.4 (En cours)
3
+ ## 41.10.5 (26/05/2026)
4
+
5
+ **Features**
6
+
7
+ - Possibilité de désactiver l'affichage des podcasts dans `EmissionPlayerItem`
8
+
9
+ **Fixes**
10
+
11
+ - **14486** - Tri des saisons sur la page d'émission
12
+
13
+ ## 41.10.4 (13/05/2026)
4
14
 
5
15
  **Fixes**
6
16
 
17
+ - **14384** - Correctifs identification des plateformes
18
+ - Envoi de l'organisationId correct quand non connecté
19
+ - Correction taille des `ClassicAvatar`
7
20
  - Imports de stores relatifs dans `EmissionList`
8
21
  - Limitation de la largeur des messages de `ClassicHelpButton`
9
22
 
23
+ **Misc**
24
+
25
+ - Ajout de `ClassicButton`, un bouton intégrant des éléments d'accessibilité
26
+ - Ajustement style boutons désactivés avec `aria-disabled`
27
+
10
28
  ## 41.10.3 (04/05/2026)
11
29
 
12
30
  **Fixes**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "41.10.4-beta",
3
+ "version": "41.10.5",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -1,5 +1,7 @@
1
1
  import ActionButton from "./ActionButton.vue";
2
+ import ClassicButton from "./ClassicButton.vue";
2
3
 
3
4
  export {
4
- ActionButton
5
+ ActionButton,
6
+ ClassicButton
5
7
  };
@@ -13,9 +13,8 @@ import PodbeanIcon from "../../icons/PodbeanIcon.vue";
13
13
  import YoutubeIcon from "vue-material-design-icons/Youtube.vue";
14
14
  import SpotifyIcon from "vue-material-design-icons/Spotify.vue";
15
15
  import { Annotations } from "@/stores/class/general";
16
- import { h, markRaw, onMounted, ref, type Component } from "vue";
16
+ import { h, markRaw, ref, type Component, type Ref } from "vue";
17
17
  import { aggregatorsApi } from "../../../api/aggregatorsApi";
18
- import { useAuthStore } from "../../../stores/AuthStore";
19
18
  import { useNotificationStore } from "../../../stores/NotificationStore";
20
19
  import ClassicAvatar from "../../misc/ClassicAvatar.vue";
21
20
 
@@ -130,18 +129,24 @@ export const useSharePlatforms = () => {
130
129
 
131
130
  const platforms = ref<Array<SharePlatform>>([]);
132
131
 
133
- const { authOrgaId } = useAuthStore();
134
132
  const { addNotification } = useNotificationStore();
135
133
 
136
- onMounted(async (): Promise<void> => {
137
- platforms.value.push(...PREDEFINED_PLATFORMS);
134
+ async function initPlatforms(organisationId: string): Promise<void> {
135
+ // (Re)initialize the platforms
136
+ platforms.value = [...PREDEFINED_PLATFORMS];
137
+
138
138
  try {
139
- const customPlatforms = await aggregatorsApi.getAll(authOrgaId);
139
+ const customPlatforms = await aggregatorsApi.getAll(organisationId);
140
140
  customPlatforms.forEach(platform => {
141
141
  platforms.value.push({
142
142
  name: platform.name,
143
143
  title: platform.name,
144
- icon: markRaw(() => h(ClassicAvatar, { name: platform.name, imageUrl: platform.image })),
144
+ icon: markRaw((props, { attrs }) => h(ClassicAvatar, {
145
+ ...attrs,
146
+ ...props,
147
+ name: platform.name,
148
+ imageUrl: platform.image
149
+ })),
145
150
  color: "white",
146
151
  annotation: `ptfaudio_${platform.name}`
147
152
  });
@@ -152,7 +157,7 @@ export const useSharePlatforms = () => {
152
157
  message: error
153
158
  });
154
159
  }
155
- });
160
+ }
156
161
 
157
162
  /**
158
163
  * Helper to retrieve configuration of a specific platform
@@ -198,6 +203,7 @@ export const useSharePlatforms = () => {
198
203
  }
199
204
 
200
205
  return {
206
+ initPlatforms,
201
207
  getPlatformsWithLinks,
202
208
  getPlatformConfiguration,
203
209
  platforms
@@ -103,6 +103,7 @@ const PodcastPlayBasicButton = defineAsyncComponent(() => import("../podcasts/Po
103
103
  //Props
104
104
  const props = defineProps({
105
105
  emission: { default: () => ({}), type: Object as () => Emission },
106
+ /** Number of podcasts to display (default: 2); if set to 0, no podcasts will be displayed */
106
107
  nbPodcasts: { default: undefined, type: Number },
107
108
  rubriqueName: { default: undefined, type: String },
108
109
  })
@@ -125,6 +126,10 @@ onBeforeMount(()=>loadPodcasts())
125
126
 
126
127
  //Methods
127
128
  async function loadPodcasts(): Promise<void> {
129
+ if (props.nbPodcasts === 0) {
130
+ return;
131
+ }
132
+
128
133
  const nb = props.nbPodcasts ? props.nbPodcasts : 2;
129
134
  const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
130
135
  api: 0,
@@ -41,11 +41,15 @@
41
41
  v-model:active-tab="activeSeasonTab"
42
42
  :tab-number="emission.seasons.length"
43
43
  >
44
- <template v-for="(season, i) in emission.seasons" #[tabNameSlot(i)]>
44
+ <template v-for="(season, i) in seasons" #[tabNameSlot(i)]>
45
45
  {{ $t('Podcast - Season N', { season }) }}
46
46
  </template>
47
47
 
48
- <template v-for="(season, i) in emission.seasons" #[tabContentSlot(i)] :key="season">
48
+ <template
49
+ v-for="(season, i) in seasons"
50
+ #[tabContentSlot(i)]
51
+ :key="season"
52
+ >
49
53
  <PodcastList
50
54
  class="flex-grow-1"
51
55
  :first="dfirst"
@@ -137,6 +141,8 @@ const showSeasons = computed(() => {
137
141
  return props.emission !== undefined && areSeasonsEnabled(props.emission) && (props.emission.seasons?.length ?? 0) > 0;
138
142
  });
139
143
 
144
+ const seasons = computed((): Array<number> => [...props.emission.seasons].sort());
145
+
140
146
  const activeSeasonTab = ref(showSeasons.value ? props.emission.seasons?.indexOf(getMaxSeason(props.emission)) ?? 0 : 0);
141
147
 
142
148
  const sort = computed((): PodcastSort => {
@@ -127,7 +127,7 @@ const subscribeButtonsContainerRef = useTemplateRef('subscribeButtonsContainer')
127
127
  //Composables
128
128
  const { t } = useI18n();
129
129
  const apiStore = useApiStore();
130
- const { getPlatformsWithLinks } = useSharePlatforms();
130
+ const { getPlatformsWithLinks, initPlatforms } = useSharePlatforms();
131
131
 
132
132
  //Computed
133
133
  const subscriptionsDisplay = computed(() => {
@@ -152,7 +152,11 @@ const iconSize = computed((): number => {
152
152
  //Watch
153
153
  watch(()=>props.windowWidth, () =>resizeWindow());
154
154
 
155
- onMounted(()=>resizeWindow());
155
+ onMounted(() => {
156
+ resizeWindow();
157
+ const orga = 'orga' in props.content ? props.content.orga : props.content.organisation;
158
+ initPlatforms(orga.id);
159
+ });
156
160
 
157
161
  //Methods
158
162
  function showAllElements() {
@@ -108,7 +108,7 @@
108
108
  :size="ps"
109
109
  :show-count="true"
110
110
  :emission-id="emissionId"
111
- :emission="emission"
111
+ :emission="{ ...emission, seasons: [7, 3, 5, 1, 2, 4] }"
112
112
  :category-filter="false"
113
113
  :edit-right="editRight"
114
114
  :productor-id="[emission.orga.id]"
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <section v-if="isInit" class="page-box">
3
+ <!-- TODO à intégrer dans frontoffice -->
3
4
  <router-link
4
5
  v-if="isRolePlaylists && !isPodcastmaker"
5
6
  to="/main/priv/edit/playlist"
@@ -108,7 +108,7 @@ import { state } from '../../stores/ParamSdkStore';
108
108
 
109
109
  const { updatePathParams } = useSeoTitleUrl();
110
110
  const { useProxyImageUrl } = useImageProxy();
111
- const { getPlatformsWithLinks } = useSharePlatforms();
111
+ const { getPlatformsWithLinks, initPlatforms } = useSharePlatforms();
112
112
 
113
113
  /** Props used when displaying a playlist */
114
114
  interface PlaylistProps {
@@ -135,8 +135,10 @@ onMounted(async() => {
135
135
  // Retrieve element
136
136
  if (playlistId) {
137
137
  element.value = await playlistApi.get(playlistId);
138
+ initPlatforms(element.value.organisation.id);
138
139
  } else if (emissionId) {
139
140
  element.value = await emissionApi.get(emissionId);
141
+ initPlatforms(element.value.orga.id);
140
142
  } else {
141
143
  console.error('No content defined');
142
144
  }
@@ -14,7 +14,7 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
14
14
  button {
15
15
  cursor: pointer;
16
16
 
17
- &:disabled{
17
+ &:disabled, &[aria-disabled="true"]{
18
18
  cursor: default !important;
19
19
  }
20
20
  }
@@ -106,10 +106,12 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
106
106
  background: var(--octopus-primary-more-transparent);
107
107
  }
108
108
 
109
- &:not(.btn-underline, .btn-primary, .btn-on-dark, .btn-transparent, .admin-button, .share-btn):disabled{
110
- cursor: default;
111
- background-color: var(--octopus-secondary-lighter) !important;
112
- color: var(--octopus-text-disabled) !important;
109
+ &:not(.btn-underline, .btn-primary, .btn-on-dark, .btn-transparent, .admin-button, .share-btn){
110
+ &:disabled, &[aria-disabled="true"] {
111
+ cursor: default;
112
+ background-color: var(--octopus-secondary-lighter) !important;
113
+ color: var(--octopus-text-disabled) !important;
114
+ }
113
115
  }
114
116
 
115
117
  &.btn-underline{
@@ -167,8 +169,8 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
167
169
  border-color: var(--octopus-color-on-primary) !important;
168
170
  }
169
171
 
170
- &:not(.btn-on-dark):disabled,
171
- &.btn-on-dark:disabled{
172
+ &:not(.btn-on-dark):disabled, &:not(.btn-on-dark)[aria-disabled="true"],
173
+ &.btn-on-dark:disabled, &.btn-on-dark[aria-disabled="true"] {
172
174
  background-color: var(--octopus-secondary-darker);
173
175
  border: 1px solid black;
174
176
  cursor: default;
@@ -201,6 +203,17 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
201
203
 
202
204
  }
203
205
 
206
+ // Make disabled state visible
207
+ .btn:disabled, .btn:disabled:hover, .btn[aria-disabled="true"], .btn[aria-disabled="true"]:hover {
208
+ filter: grayscale(100%);
209
+ opacity: 60%;
210
+
211
+ &:not(.btn-transparent) {
212
+ background-color: var(--octopus-secondary);
213
+ }
214
+ }
215
+
216
+
204
217
  .btn-transparent{
205
218
  background: transparent;
206
219
  border: 0;