@wikicasa-dev/components 2.5.3-alpha.12 → 2.5.3-alpha.13

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.
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-thumbs.css';/* empty css */
2
2
  import { Autoplay as p } from "swiper/modules";
3
3
  export {
4
4
  p as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-thumbs.css';/* empty css */
2
2
  import { Controller as e } from "swiper/modules";
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-thumbs.css';/* empty css */
2
2
  import { Keyboard as e } from "swiper/modules";
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-thumbs.css';/* empty css */
2
2
  import { Thumbs as t } from "swiper/modules";
3
3
  export {
4
4
  t as default
@@ -1 +1 @@
1
- .swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}
1
+ .no-transition[data-v-f8f3d52a]{transition-duration:0ms!important}.disable-select[data-v-f8f3d52a]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-f8f3d52a]{pointer-events:auto!important}
@@ -0,0 +1 @@
1
+ .swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}
@@ -1,5 +1,5 @@
1
1
  import o from "../../../packages/components/lib/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js";
2
- import '../../../assets/SwiperCarousel.css';/* empty css */
2
+ import '../../../assets/SwiperPaginationPrimitive.css';/* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import o from "../../packages/components/lib/components/carousel/SwiperCarousel.vue.js";
2
- import '../../assets/SwiperCarousel2.css';import '../../assets/SwiperCarousel.css';/* empty css */
2
+ import '../../assets/SwiperCarousel.css';import '../../assets/SwiperPaginationPrimitive.css';/* empty css */
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f8f3d52a"]]);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { default as S } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
2
2
  import { default as g } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
3
- import './assets/SwiperCarousel.css';import './assets/SwiperRootPrimitive.css';import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseCard.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/BaseTabsIndicator.css';import './assets/BaseTabs.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
3
+ import './assets/SwiperPaginationPrimitive.css';import './assets/SwiperRootPrimitive.css';import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseCard.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/BaseTabsIndicator.css';import './assets/BaseTabs.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
4
4
  import { default as C } from "./packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js";
5
5
  import { default as I } from "./packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js";
6
6
  import { default as A } from "./packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js";
@@ -1,95 +1,102 @@
1
- import { defineComponent as k, useAttrs as O, shallowRef as p, useTemplateRef as E, onMounted as L, provide as v, createElementBlock as b, openBlock as M, Fragment as V, withDirectives as x, renderSlot as f, createCommentVNode as z, createElementVNode as A, mergeProps as N, unref as C, vShow as B, nextTick as D } from "vue";
2
- import { createSwiper as K } from "../../../../../../Swiper/factory.js";
3
- import { AutoplayModule as R } from "../../../../../../Swiper/Autoplay/factory.js";
4
- import { KeyboardModule as U } from "../../../../../../Swiper/Keyboard/factory.js";
1
+ import { defineComponent as O, useAttrs as k, shallowRef as v, useTemplateRef as L, onMounted as b, provide as f, createElementBlock as M, openBlock as z, Fragment as V, withDirectives as x, renderSlot as y, createCommentVNode as A, createElementVNode as B, mergeProps as D, unref as U, vShow as N, nextTick as C } from "vue";
2
+ import { createSwiper as G } from "../../../../../../Swiper/factory.js";
3
+ import { AutoplayModule as K } from "../../../../../../Swiper/Autoplay/factory.js";
4
+ import { KeyboardModule as R } from "../../../../../../Swiper/Keyboard/factory.js";
5
5
  import { ZoomModule as $ } from "../../../../../../Swiper/Zoom/factory.js";
6
- const q = /* @__PURE__ */ Symbol(), F = /* @__PURE__ */ Symbol(), W = /* @__PURE__ */ k({
6
+ const q = /* @__PURE__ */ Symbol(), F = /* @__PURE__ */ Symbol(), X = /* @__PURE__ */ O({
7
7
  inheritAttrs: !1,
8
8
  __name: "SwiperRootPrimitive",
9
9
  props: {
10
10
  swiperOptions: {}
11
11
  },
12
12
  emits: ["moved", "click", "init"],
13
- setup(s, { expose: y, emit: w }) {
14
- const l = w, P = O(), a = p(null), c = E("root"), n = p(!1), I = !!s.swiperOptions?.keyboard, T = !!s.swiperOptions?.autoplay, u = [];
13
+ setup(s, { expose: w, emit: T }) {
14
+ const n = T, g = k(), a = v(null), c = L("root"), l = v(!1), I = !!s.swiperOptions?.keyboard, P = !!s.swiperOptions?.autoplay, u = [];
15
15
  let d = !1;
16
- const S = (e) => {
17
- const t = [
16
+ const h = (e) => {
17
+ const o = [
18
18
  ...e?.querySelectorAll("img[data-src]") ?? []
19
19
  ];
20
- return t.forEach((o) => {
21
- o.src = o.dataset.src || "", o.srcset = o.dataset.srcset || "", o.dataset.src = "", o.dataset.srcset = "", o.removeAttribute("lazy");
22
- }), t;
23
- }, m = (e, t) => {
24
- const o = [];
25
- if (!d) return o;
26
- const r = e.params.lazyPreloadPrevNext ?? 0;
27
- for (let i = t - r; i <= t + r; i++)
28
- o.push(...S(e.slides[i]));
29
- return o;
30
- }, h = async (e) => {
31
- a.value = await K(
20
+ return o.forEach((t) => {
21
+ t.src = t.dataset.src || "", t.srcset = t.dataset.srcset || "", t.dataset.src = "", t.dataset.srcset = "", t.removeAttribute("lazy");
22
+ }), o;
23
+ }, m = (e, o) => {
24
+ const t = [];
25
+ if (!d) return t;
26
+ const i = e.params.lazyPreloadPrevNext ?? 0;
27
+ for (let r = o - i; r <= o + i; r++)
28
+ t.push(...h(e.slides[r]));
29
+ return t;
30
+ }, E = async (e) => {
31
+ a.value = await G(
32
32
  e,
33
33
  {
34
34
  on: {
35
- init: (t) => {
36
- D(async () => {
37
- const o = m(t, t.activeIndex);
38
- if (!o.length) {
39
- n.value = !0, l("init");
35
+ init: (o) => {
36
+ C(async () => {
37
+ const t = m(o, o.activeIndex);
38
+ if (console.log("DEBUG:imagesToLoad", t), !t.length) {
39
+ l.value = !0, n("init");
40
40
  return;
41
41
  }
42
42
  await Promise.race([
43
- Promise.all(
44
- o.map(
45
- (r) => r.complete ? Promise.resolve() : new Promise((i) => {
46
- r.addEventListener("load", i, { once: !0 }), r.addEventListener("error", i, { once: !0 });
47
- })
48
- )
49
- ),
50
- new Promise((r) => setTimeout(r, 3e3))
51
- ]), n.value = !0, l("init");
43
+ async () => {
44
+ const i = await Promise.all(
45
+ t.map(
46
+ (r) => r.complete ? Promise.resolve() : new Promise((p) => {
47
+ r.addEventListener("load", p, { once: !0 }), r.addEventListener("error", p, { once: !0 });
48
+ })
49
+ )
50
+ );
51
+ return console.log("DEBUG:all visible lazy images loaded"), i;
52
+ },
53
+ new Promise(
54
+ (i) => setTimeout(() => {
55
+ console.log("DEBUG:not all images have loaded => TIMEOUT!"), i("");
56
+ }, 3e3)
57
+ )
58
+ ]), l.value = !0, n("init");
52
59
  });
53
60
  },
54
- slideChange: (t) => {
55
- l("moved", { activeIndex: t.activeIndex }), m(t, t.activeIndex);
61
+ slideChange: (o) => {
62
+ n("moved", { activeIndex: o.activeIndex }), m(o, o.activeIndex);
56
63
  }
57
64
  },
58
65
  ...s.swiperOptions
59
66
  },
60
67
  [
61
68
  $(s.swiperOptions?.zoom),
62
- I ? U(s.swiperOptions?.keyboard) : void 0,
63
- T ? R(s.swiperOptions.autoplay) : void 0,
69
+ I ? R(s.swiperOptions?.keyboard) : void 0,
70
+ P ? K(s.swiperOptions.autoplay) : void 0,
64
71
  ...u
65
72
  ].filter(Boolean)
66
73
  );
67
74
  };
68
- L(() => {
69
- c.value && setTimeout(() => h(c.value));
75
+ b(() => {
76
+ c.value && setTimeout(() => E(c.value));
70
77
  });
71
- const g = (e) => {
78
+ const S = (e) => {
72
79
  !a.value || a.value.params.slidesPerView === e || (a.value.params.slidesPerView = e, a.value.update());
73
80
  };
74
- return v(F, (e) => {
81
+ return f(F, (e) => {
75
82
  e && u.push(e);
76
- }), v(q, (e) => {
83
+ }), f(q, (e) => {
77
84
  e !== d && (d = e);
78
- }), y({
85
+ }), w({
79
86
  swiper: a,
80
- updateSlidesPerView: g
81
- }), (e, t) => (M(), b(V, null, [
82
- x(A("div", N({ ref: "root" }, C(P), { class: "swiper uikit-carousel" }), [
83
- f(e.$slots, "default")
87
+ updateSlidesPerView: S
88
+ }), (e, o) => (z(), M(V, null, [
89
+ x(B("div", D({ ref: "root" }, U(g), { class: "swiper uikit-carousel" }), [
90
+ y(e.$slots, "default")
84
91
  ], 16), [
85
- [B, n.value]
92
+ [N, l.value]
86
93
  ]),
87
- n.value ? z("", !0) : f(e.$slots, "placeholder", { key: 0 })
94
+ l.value ? A("", !0) : y(e.$slots, "placeholder", { key: 0 })
88
95
  ], 64));
89
96
  }
90
97
  });
91
98
  export {
92
99
  F as addModuleDescriptorKey,
93
- W as default,
100
+ X as default,
94
101
  q as setLazyImagesLoaderKey
95
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.5.3-alpha.12",
3
+ "version": "2.5.3-alpha.13",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- .no-transition[data-v-f8f3d52a]{transition-duration:0ms!important}.disable-select[data-v-f8f3d52a]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-f8f3d52a]{pointer-events:auto!important}