@sysvale/cuida 3.65.2 → 3.65.3

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.
@@ -30557,23 +30557,26 @@ const Rre = {
30557
30557
  this.$emit("update:modelValue", t);
30558
30558
  },
30559
30559
  modelValue(t) {
30560
- this.isActive = t;
30560
+ this.isActive = t, this.handleEventAnimation();
30561
30561
  }
30562
30562
  },
30563
30563
  mounted() {
30564
- this.id = `floating-assistant$-${this._uid}`, this.pulsarId = `floating-assistant-pulsar$-${this._uid}`, this.containerId = `floating-assistant-container$-${this._uid}`, this.startOnScroll ? window.addEventListener("scroll", this.startAnimation) : window.addEventListener("load", this.startAnimation);
30564
+ this.handleEventAnimation();
30565
30565
  },
30566
30566
  methods: {
30567
+ handleEventAnimation() {
30568
+ this.id = `floating-assistant$-${this._uid}`, this.pulsarId = `floating-assistant-pulsar$-${this._uid}`, this.containerId = `floating-assistant-container$-${this._uid}`, this.startOnScroll ? window.addEventListener("scroll", this.startAnimation) : this.startAnimation();
30569
+ },
30567
30570
  startAnimation() {
30568
- this.startOnScroll && !this.isScrolledIntoView() || (setTimeout(() => {
30571
+ this.startOnScroll ? this.isScrolledIntoView() && setTimeout(() => {
30572
+ document.getElementById(this.id).classList.add("animation"), window.removeEventListener("scroll", this.startAnimation);
30573
+ }, 1e3) : setTimeout(() => {
30569
30574
  document.getElementById(this.id).classList.add("animation");
30570
- }, 1e3), this.startOnScroll && window.removeEventListener("scroll", this.startAnimation));
30575
+ }, 1e3);
30571
30576
  },
30572
30577
  isScrolledIntoView() {
30573
- const t = window.scrollY, e = t + window.innerHeight, n = document.getElementById(this.id).getBoundingClientRect();
30574
- this.boxTop || (this.boxTop = n.top);
30575
- const i = this.boxTop;
30576
- return i + 18 <= e && i >= t;
30578
+ const { top: t, bottom: e } = document.getElementById(this.id).getBoundingClientRect();
30579
+ return t >= 0 && e <= window.innerHeight;
30577
30580
  },
30578
30581
  expand() {
30579
30582
  this.waitingConfirmation || (this.isExpanded = !0);
@@ -30669,7 +30672,7 @@ function Zre(t, e, n, i, s, r) {
30669
30672
  ])
30670
30673
  ], 10, Nre);
30671
30674
  }
30672
- const Xre = /* @__PURE__ */ he(Rre, [["render", Zre], ["__scopeId", "data-v-6b0e1964"]]);
30675
+ const Xre = /* @__PURE__ */ he(Rre, [["render", Zre], ["__scopeId", "data-v-e2010fa8"]]);
30673
30676
  const Yp = {
30674
30677
  directives: {
30675
30678
  "on-click-outside": vr.directive