@wikicasa-dev/components 2.6.6 → 2.6.7-alpha.1
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/dist/assets/SwiperRootPrimitive2.css +1 -1
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +4 -4
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +70 -78
- package/dist/lazyModules/Swiper/Autoplay/index.js +1 -1
- package/dist/lazyModules/Swiper/Controller/index.js +1 -1
- package/dist/lazyModules/Swiper/Keyboard/index.js +1 -1
- package/dist/lazyModules/Swiper/Thumbs/index.js +1 -1
- package/package.json +1 -1
- /package/dist/assets/{swiper-keyboard.css → swiper-thumbs.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiper.uikit-carousel[data-v-
|
|
1
|
+
.swiper.uikit-carousel[data-v-f148fd97]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-f148fd97]{opacity:1}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "./SwiperRootPrimitive.vue.js";
|
|
2
|
-
import { addModuleDescriptorKey as
|
|
2
|
+
import { addModuleDescriptorKey as f, setLazyImagesLoaderKey as s } from "./SwiperRootPrimitive.vue.js";
|
|
3
3
|
import '../../../assets/SwiperRootPrimitive2.css';import '../../../assets/SwiperRootPrimitive.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
6
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f148fd97"]]);
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
f as addModuleDescriptorKey,
|
|
9
9
|
p as default,
|
|
10
|
-
|
|
10
|
+
s as setLazyImagesLoaderKey
|
|
11
11
|
};
|
|
@@ -1,121 +1,113 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createSwiper as
|
|
3
|
-
import { AutoplayModule as
|
|
4
|
-
import { KeyboardModule as
|
|
5
|
-
import { ZoomModule as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as A, shallowRef as y, useTemplateRef as N, onMounted as g, provide as I, openBlock as w, createElementBlock as P, createElementVNode as q, normalizeClass as x, renderSlot as k, createCommentVNode as B } from "vue";
|
|
2
|
+
import { createSwiper as D } from "../../../lazyModules/Swiper/factory.js";
|
|
3
|
+
import { AutoplayModule as K } from "../../../lazyModules/Swiper/Autoplay/factory.js";
|
|
4
|
+
import { KeyboardModule as R } from "../../../lazyModules/Swiper/Keyboard/factory.js";
|
|
5
|
+
import { ZoomModule as U } from "../../../lazyModules/Swiper/Zoom/factory.js";
|
|
6
|
+
const $ = { class: "uikit-relative" }, F = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "uikit-absolute uikit-inset-0"
|
|
9
|
-
},
|
|
9
|
+
}, Z = /* @__PURE__ */ Symbol(), j = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ A({
|
|
10
10
|
__name: "SwiperRootPrimitive",
|
|
11
11
|
props: {
|
|
12
12
|
rootClasses: {},
|
|
13
13
|
swiperOptions: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["moved", "click", "init"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
const
|
|
16
|
+
setup(a, { expose: b, emit: h }) {
|
|
17
|
+
const c = h, i = y(null), u = N("root"), n = y(!1), S = !!a.swiperOptions?.keyboard, T = !!a.swiperOptions?.autoplay, m = [];
|
|
18
|
+
let p = !1;
|
|
19
|
+
const E = (e) => {
|
|
20
20
|
"requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
|
|
21
|
-
},
|
|
22
|
-
...e?.querySelectorAll("img[data-src]") ?? []
|
|
23
|
-
], u = (e) => {
|
|
21
|
+
}, v = (e, t = "img") => Array.from(e?.querySelectorAll(t) ?? []), d = (e) => {
|
|
24
22
|
e.src || (e.src = e.dataset.src || "", e.srcset = e.dataset.srcset || "", e.dataset.src = "", e.dataset.srcset = "", e.removeAttribute("lazy"));
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
-
for (let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
23
|
+
}, f = (e, t) => {
|
|
24
|
+
const o = e.params.lazyPreloadPrevNext ?? 0, r = v(e.slides[t]), l = [];
|
|
25
|
+
for (let s = t - o; s <= t + o; s++)
|
|
26
|
+
s !== t && (!e.params.loop && (s < 0 || s >= e.slides.length) || l.push(
|
|
27
|
+
...v(e.slides[s], "img[data-src]")
|
|
28
|
+
));
|
|
29
|
+
return { visibleImages: r, preloadImages: l };
|
|
30
|
+
}, C = async (e) => {
|
|
31
|
+
const t = e.complete && e.src ? Promise.resolve() : new Promise((o) => {
|
|
32
|
+
e.addEventListener("load", () => o(), { once: !0 }), e.addEventListener("error", () => o(), {
|
|
33
|
+
once: !0
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
d(e), await t, await e.decode?.().catch(() => {
|
|
37
|
+
});
|
|
38
|
+
}, O = () => {
|
|
39
|
+
n.value = !0, c("init");
|
|
40
|
+
}, z = async (e) => {
|
|
41
|
+
i.value = await D(
|
|
34
42
|
e,
|
|
35
43
|
{
|
|
36
44
|
on: {
|
|
37
45
|
init: async (t) => {
|
|
38
|
-
|
|
39
|
-
const { visibleImages: a, preloadImages: l } = I(
|
|
46
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
40
47
|
t,
|
|
41
48
|
t.activeIndex
|
|
42
49
|
);
|
|
43
|
-
let
|
|
44
|
-
const
|
|
45
|
-
(
|
|
46
|
-
),
|
|
47
|
-
|
|
48
|
-
const g = i.complete && i.src ? Promise.resolve() : new Promise((w) => {
|
|
49
|
-
i.addEventListener(
|
|
50
|
-
"load",
|
|
51
|
-
() => w(),
|
|
52
|
-
{ once: !0 }
|
|
53
|
-
), i.addEventListener(
|
|
54
|
-
"error",
|
|
55
|
-
() => w(),
|
|
56
|
-
{
|
|
57
|
-
once: !0
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
});
|
|
61
|
-
return u(i), g;
|
|
62
|
-
})
|
|
50
|
+
let l;
|
|
51
|
+
const s = new Promise(
|
|
52
|
+
(V) => l = setTimeout(V, 6e3)
|
|
53
|
+
), M = Promise.all(
|
|
54
|
+
o.map(C)
|
|
63
55
|
).finally(() => {
|
|
64
|
-
clearTimeout(
|
|
56
|
+
clearTimeout(l);
|
|
65
57
|
});
|
|
66
|
-
await Promise.race([
|
|
67
|
-
|
|
68
|
-
}),
|
|
58
|
+
await Promise.race([M, s]), E(() => {
|
|
59
|
+
r.forEach(d);
|
|
60
|
+
}), O();
|
|
69
61
|
},
|
|
70
62
|
slideChange: (t) => {
|
|
71
|
-
|
|
72
|
-
const { visibleImages:
|
|
63
|
+
c("moved", { activeIndex: t.activeIndex });
|
|
64
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
73
65
|
t,
|
|
74
66
|
t.activeIndex
|
|
75
67
|
);
|
|
76
|
-
[...
|
|
77
|
-
|
|
68
|
+
[...o, ...r].forEach(
|
|
69
|
+
d
|
|
78
70
|
);
|
|
79
71
|
}
|
|
80
72
|
},
|
|
81
|
-
...
|
|
73
|
+
...a.swiperOptions
|
|
82
74
|
},
|
|
83
75
|
[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
...
|
|
76
|
+
U(a.swiperOptions?.zoom),
|
|
77
|
+
S ? R(a.swiperOptions?.keyboard) : void 0,
|
|
78
|
+
T ? K(a.swiperOptions.autoplay) : void 0,
|
|
79
|
+
...m
|
|
88
80
|
].filter(Boolean)
|
|
89
81
|
);
|
|
90
82
|
};
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
g(() => {
|
|
84
|
+
u.value && setTimeout(() => z(u.value));
|
|
93
85
|
});
|
|
94
|
-
const
|
|
95
|
-
!
|
|
86
|
+
const L = (e) => {
|
|
87
|
+
!i.value || i.value.params.slidesPerView === e || (i.value.params.slidesPerView = e, i.value.update());
|
|
96
88
|
};
|
|
97
|
-
return
|
|
98
|
-
e &&
|
|
99
|
-
}),
|
|
100
|
-
e !==
|
|
101
|
-
}),
|
|
102
|
-
swiper:
|
|
103
|
-
updateSlidesPerView:
|
|
104
|
-
}), (e, t) => (
|
|
105
|
-
|
|
89
|
+
return I(j, (e) => {
|
|
90
|
+
e && m.push(e);
|
|
91
|
+
}), I(Z, (e) => {
|
|
92
|
+
e !== p && (p = e);
|
|
93
|
+
}), b({
|
|
94
|
+
swiper: i,
|
|
95
|
+
updateSlidesPerView: L
|
|
96
|
+
}), (e, t) => (w(), P("div", $, [
|
|
97
|
+
q("div", {
|
|
106
98
|
ref: "root",
|
|
107
|
-
class:
|
|
99
|
+
class: x(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
|
|
108
100
|
}, [
|
|
109
|
-
|
|
101
|
+
k(e.$slots, "default", {}, void 0, !0)
|
|
110
102
|
], 2),
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
n.value ? B("", !0) : (w(), P("div", F, [
|
|
104
|
+
k(e.$slots, "placeholder", {}, void 0, !0)
|
|
113
105
|
]))
|
|
114
106
|
]));
|
|
115
107
|
}
|
|
116
108
|
});
|
|
117
109
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
110
|
+
j as addModuleDescriptorKey,
|
|
111
|
+
Y as default,
|
|
112
|
+
Z as setLazyImagesLoaderKey
|
|
121
113
|
};
|
package/package.json
CHANGED
|
File without changes
|