@saooti/octopus-sdk 39.4.1 → 39.4.2

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": "39.4.1",
3
+ "version": "39.4.2",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -84,6 +84,7 @@ export default defineComponent({
84
84
  href: { default: undefined, type: String },
85
85
  buttonText: { default: undefined, type: String },
86
86
  isDescription: { default: false, type: Boolean },
87
+ rubriquesId: { default: [], type: Array<number> },
87
88
  },
88
89
  data() {
89
90
  return {
@@ -110,6 +111,7 @@ export default defineComponent({
110
111
  size: 5,
111
112
  organisationId: this.organisationId,
112
113
  sort: "LAST_PODCAST_DESC",
114
+ rubriqueId: this.rubriquesId
113
115
  },
114
116
  specialTreatement: true,
115
117
  });
@@ -157,8 +157,8 @@ export default defineComponent({
157
157
  text-align: center;
158
158
  background: linear-gradient(
159
159
  to bottom,
160
- var(--octopus-background-full-transparent),
161
- var(--octopus-background-transparent)
160
+ var(--octopus-background-transparent),
161
+ var(--octopus-background),
162
162
  );
163
163
  }
164
164
  }
@@ -160,8 +160,8 @@ export default defineComponent({
160
160
  text-align: center;
161
161
  background: linear-gradient(
162
162
  to bottom,
163
- var(--octopus-background-full-transparent),
164
- var(--octopus-background-transparent)
163
+ var(--octopus-background-transparent),
164
+ var(--octopus-background)
165
165
  );
166
166
  }
167
167
 
@@ -76,7 +76,7 @@ export default defineComponent({
76
76
  return state.emissionsPage.progressBar as boolean;
77
77
  },
78
78
  date(): string {
79
- return dayjs(this.pubDate).format("D MMMM YYYY, HH[h]mm");
79
+ return dayjs(this.pubDate).format("D MMMM YYYY");
80
80
  },
81
81
  editRight(): boolean {
82
82
  return this.isEditRights(this.podcastOrganisationId);
@@ -54,30 +54,9 @@ export default defineComponent({
54
54
  data() {
55
55
  return {
56
56
  emojiIndex: emojiIndex,
57
- /* hasPlaceAboveButton: false as boolean, */
58
57
  isPhone: false as boolean,
59
58
  };
60
59
  },
61
- /* computed: {
62
- isReallyTopPosition(): boolean {
63
- return this.isTopPosition && this.hasPlaceAboveButton;
64
- },
65
- }, */
66
- /* watch:{
67
- isPhone: {
68
- immediate: true,
69
- async handler() {
70
- debugger;
71
- if (!this.isPhone && this.isTopPosition && this.$refs.emojiButton) {
72
- this.hasPlaceAboveButton =
73
- (this.$refs.emojiButton as HTMLButtonElement).getBoundingClientRect()
74
- .top +
75
- window.scrollY >
76
- 450;
77
- }
78
- },
79
- },
80
- }, */
81
60
  });
82
61
  </script>
83
62
 
@@ -177,6 +177,7 @@ export default defineComponent({
177
177
  let parentTop = 0;
178
178
  let parentScrollTop = 0;
179
179
  let parentBottom = 0;
180
+ let parentWidth=0;
180
181
  if (!this.isTopLayerPopover && this.relativeClass) {
181
182
  const modalBody = document.getElementsByClassName(
182
183
  this.relativeClass,
@@ -193,16 +194,31 @@ export default defineComponent({
193
194
  parentTop = modalBodyRect.top;
194
195
  parentScrollTop = modalBody.scrollTop;
195
196
  parentBottom=modalBodyRect.bottom;
197
+ parentWidth = modalBodyRect.width;
196
198
  }
197
199
  const rectElement = (e.target as HTMLElement).getBoundingClientRect();
198
200
  (this.$refs.popover as HTMLElement).style.display = "block";
201
+ const sizePopover = (this.$refs.popover as HTMLElement).clientWidth;
202
+ const sizeAvailable = window.innerWidth -parentWidth;
199
203
  if (this.leftPos) {
200
- this.posX =
204
+ const elementRightRelative = rectElement.right - parentLeft;
205
+ const hasPlaceRightButton = (sizeAvailable - (sizeAvailable - elementRightRelative)) > sizePopover;
206
+ if(hasPlaceRightButton){
207
+ this.posX =
201
208
  rectElement.right -
202
- parentRight -
203
- (this.$refs.popover as HTMLElement).clientWidth;
209
+ parentLeft -
210
+ sizePopover;
211
+ }else{
212
+ this.posX =parentLeft;
213
+ }
204
214
  } else {
205
- this.posX = rectElement.left - parentLeft;
215
+ const elementLeftRelative = rectElement.left - parentLeft;
216
+ const hasPlaceRightButton = (sizeAvailable - elementLeftRelative) > sizePopover;
217
+ if(hasPlaceRightButton){
218
+ this.posX = elementLeftRelative;
219
+ }else{
220
+ this.posX = sizeAvailable - sizePopover + parentLeft;
221
+ }
206
222
  }
207
223
  this.posX = Math.max(0, this.posX);
208
224
  const yPosParent = this.topPos ? rectElement.top : rectElement.bottom;
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  formatDuration(
14
14
  totalSeconds: number | null,
15
- separator = "'",
15
+ separator = ":",
16
16
  isLast = true,
17
17
  ): string {
18
18
  if (null === totalSeconds) {
@@ -354,7 +354,7 @@ router.beforeEach(async (to, from) => {
354
354
  if("/logout" === to.path && "/logout" !== from.path){
355
355
  setTimeout(() => {
356
356
  window.location.reload(true);
357
- }, 10);
357
+ }, 200);
358
358
  }
359
359
  });
360
360
  export default router;
@@ -25,7 +25,6 @@
25
25
  --octopus-secondary-lighter: oklch(from var(--octopus-secondary) calc(l * 1.05) c h);
26
26
  --octopus-text-disabled: oklch(from var(--octopus-secondary) calc(l * 0.60) c h);
27
27
  --octopus-background-transparent: oklch(from var(--octopus-background) l c h / 40%);
28
- --octopus-background-full-transparent: oklch(from var(--octopus-background) l c h / 0%);
29
28
  --octopus-tertiary-really-transparent: oklch(from var(--octopus-tertiary) l c h / 30%);
30
29
 
31
30
  // Size
@@ -211,9 +211,8 @@
211
211
  font-size: 1rem;
212
212
  font-weight: bolder;
213
213
  text-align: center;
214
- background: linear-gradient(to bottom,
215
- var(--octopus-background-full-transparent),
216
- var(--octopus-background-transparent));
214
+ background: linear-gradient(to bottom,var(--octopus-background-transparent),
215
+ var(--octopus-background));
217
216
  }
218
217
  }
219
218
  }