@saooti/octopus-sdk 41.5.6 → 41.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 41.5.7 (20/02/2026)
4
+
5
+ **Fix**
6
+
7
+ - Correction affichage composants utilisant `swiper`
8
+
3
9
  ## 41.5.6 (20/02/2026)
4
10
 
5
11
  **Misc**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "41.5.6",
3
+ "version": "41.5.7",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -10,15 +10,17 @@
10
10
  :slides-offset-after="offsetSwiper"
11
11
  :allow-slide-next="loop"
12
12
  :allow-slide-prev="loop"
13
- :navigation="true"
13
+ :navigation="navigationOptions"
14
14
  :modules="modules"
15
15
  @slides-updated="slidesUpdated"
16
16
  @slide-change="slideChange"
17
17
  >
18
- <swiper-slide v-for="(obj, index) in listObject" :key="obj">
18
+ <swiper-slide v-for="(obj, index) in listObject" :key="index">
19
19
  <slot v-if="composableInit" name="octopusSlide" :option="obj" :index="index" />
20
20
  </swiper-slide>
21
21
  </swiper>
22
+ <div :id="prevElId" class="swiper-button-prev" />
23
+ <div :id="nextElId" class="swiper-button-next" />
22
24
  </template>
23
25
  <div v-else-if="composableInit" class="element-list-inline">
24
26
  <div v-for="(obj, index) in listObject" :key="obj" class="element-list-item">
@@ -36,7 +38,7 @@ import { Navigation } from "swiper/modules";
36
38
  import "swiper/css";
37
39
  import "swiper/css/navigation";
38
40
  import {useResizePhone} from "../../composable/useResizePhone";
39
- import { computed, nextTick, onMounted, ref, useTemplateRef, watch } from "vue";
41
+ import { computed, getCurrentInstance, nextTick, onMounted, ref, useTemplateRef, watch } from "vue";
40
42
 
41
43
  //Props
42
44
  const props = defineProps({
@@ -48,7 +50,7 @@ const props = defineProps({
48
50
  //Data
49
51
  const manualReload = ref(0);
50
52
  const numberItem = ref(5);
51
- const offsetSwiper = ref(40);
53
+ const offsetSwiper = ref(0);
52
54
  const widthSwiperUsable = ref(0);
53
55
  const itemSizeWithoutRecalculed = ref(0);
54
56
  const composableInit = ref(false);
@@ -86,6 +88,17 @@ const modules = computed(() => {
86
88
  }
87
89
  });
88
90
 
91
+ const uid = computed((): number => {
92
+ const instance = getCurrentInstance();
93
+ return instance.uid;
94
+ });
95
+ const prevElId = computed((): string => 'swiper-button-prev-' + uid.value);
96
+ const nextElId = computed((): string => 'swiper-button-next-' + uid.value);
97
+ const navigationOptions = computed(() => ({
98
+ prevEl: '#' + prevElId.value,
99
+ nextEl: '#' + nextElId.value
100
+ }));
101
+
89
102
  //Watch
90
103
  watch(windowWidth, () => onWindowResize());
91
104
  watch(()=>props.listObject, () => {
@@ -143,12 +156,11 @@ function slideChange() {
143
156
  (nbTransformItems * itemRecalculizedSize.value + offsetSwiper.value) +
144
157
  "px, 0px, 0px)";
145
158
  }
146
-
147
159
  </script>
148
- <style lang="scss">
149
160
 
161
+ <style lang="scss">
150
162
  :root {
151
- --swiper-navigation-sides-offset: 0;
163
+ --swiper-navigation-sides-offset: -50px;
152
164
  }
153
165
 
154
166
  .swiper {
@@ -159,11 +171,11 @@ function slideChange() {
159
171
  .swiper-button-next,
160
172
  .swiper-button-prev {
161
173
  color: var(--octopus-primary) !important;
162
- height: 100%;
174
+ //height: 100%;
163
175
  inset-block:0;
164
176
  margin: 0;
165
177
  width: 40px;
166
- background: var(--octopus-background);
178
+ //background: var(--octopus-background);
167
179
  }
168
180
 
169
181
  .swiper-button-lock {