@okam/stack-ui 1.44.1 → 1.44.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.
- package/CHANGELOG.md +56 -0
- package/index145.js +1 -1
- package/index145.mjs +1 -1
- package/index149.js +1 -1
- package/index149.mjs +3 -3
- package/index155.js +1 -1
- package/index155.mjs +1 -1
- package/index157.js +1 -1
- package/index157.mjs +4 -4
- package/index158.js +1 -1
- package/index158.mjs +2 -2
- package/index159.js +1 -1
- package/index159.mjs +1 -1
- package/index160.js +1 -1
- package/index160.mjs +1 -1
- package/index161.js +1 -1
- package/index161.mjs +2 -2
- package/index165.js +1 -1
- package/index165.mjs +2 -2
- package/index166.js +1 -1
- package/index166.mjs +4 -4
- package/index167.js +1 -1
- package/index167.mjs +3 -3
- package/index168.js +1 -1
- package/index168.mjs +9 -9
- package/index169.js +1 -1
- package/index169.mjs +2 -2
- package/index174.js +1 -1
- package/index174.mjs +2 -2
- package/index179.js +1 -1
- package/index179.mjs +4 -4
- package/index180.js +1 -1
- package/index180.mjs +1 -1
- package/index181.js +1 -1
- package/index181.mjs +2 -2
- package/index182.js +1 -1
- package/index182.mjs +3 -3
- package/index185.js +1 -1
- package/index185.mjs +3 -3
- package/index186.js +1 -1
- package/index186.mjs +23 -23
- package/index187.js +1 -1
- package/index187.mjs +12 -12
- package/index188.js +1 -1
- package/index188.mjs +5 -2024
- package/index189.js +2 -1
- package/index189.mjs +48 -58
- package/index190.js +1 -1
- package/index190.mjs +2010 -174
- package/index191.js +1 -1
- package/index191.mjs +56 -200
- package/index192.js +1 -1
- package/index192.mjs +186 -62
- package/index193.js +1 -1
- package/index193.mjs +189 -129
- package/index194.js +1 -1
- package/index194.mjs +55 -115
- package/index195.js +1 -1
- package/index195.mjs +127 -208
- package/index196.js +1 -1
- package/index196.mjs +107 -173
- package/index197.js +1 -1
- package/index197.mjs +215 -60
- package/index198.js +1 -1
- package/index198.mjs +178 -267
- package/index199.js +1 -1
- package/index199.mjs +63 -92
- package/index200.js +1 -1
- package/index200.mjs +254 -163
- package/index201.js +1 -1
- package/index201.mjs +91 -77
- package/index202.js +1 -1
- package/index202.mjs +183 -53
- package/index203.js +1 -1
- package/index203.mjs +72 -114
- package/index204.js +1 -1
- package/index204.mjs +51 -109
- package/index205.js +1 -1
- package/index205.mjs +112 -108
- package/index206.js +1 -1
- package/index206.mjs +109 -65
- package/index207.js +1 -1
- package/index207.mjs +117 -105
- package/index208.js +1 -1
- package/index208.mjs +68 -48
- package/index209.js +1 -1
- package/index209.mjs +108 -91
- package/index210.js +1 -1
- package/index210.mjs +36 -54
- package/index211.js +1 -1
- package/index211.mjs +78 -41
- package/index212.js +1 -1
- package/index212.mjs +52 -81
- package/index213.js +1 -5
- package/index213.mjs +42 -66
- package/index214.js +1 -1
- package/index214.mjs +100 -12
- package/index215.js +5 -1
- package/index215.mjs +80 -5
- package/index216.js +1 -2
- package/index216.mjs +11 -49
- package/index217.js +1 -1
- package/index217.mjs +124 -9
- package/index218.js +1 -1
- package/index218.mjs +132 -56
- package/index219.js +1 -1
- package/index219.mjs +73 -131
- package/index220.js +1 -1
- package/index220.mjs +14 -14
- package/index221.js +1 -1
- package/index221.mjs +85 -33
- package/index222.js +1 -1
- package/index222.mjs +104 -229
- package/index223.js +1 -1
- package/index223.mjs +4 -125
- package/index224.js +1 -1
- package/index224.mjs +3 -72
- package/index225.js +1 -7
- package/index225.mjs +117 -431
- package/index226.js +1 -1
- package/index226.mjs +29 -58
- package/index227.js +1 -1
- package/index227.mjs +51 -54
- package/index228.js +1 -1
- package/index228.mjs +45 -4
- package/index229.js +1 -1
- package/index229.mjs +36 -24
- package/index230.js +1 -1
- package/index230.mjs +106 -40
- package/index231.js +1 -1
- package/index231.mjs +77 -5
- package/index232.js +1 -1
- package/index232.mjs +100 -23
- package/index233.js +1 -1
- package/index233.mjs +98 -13
- package/index234.js +1 -1
- package/index234.mjs +130 -4
- package/index235.js +1 -1
- package/index235.mjs +190 -14
- package/index236.js +1 -1
- package/index236.mjs +4 -43
- package/index237.js +1 -1
- package/index237.mjs +25 -43
- package/index238.js +1 -1
- package/index238.mjs +44 -29
- package/index239.js +1 -1
- package/index239.mjs +4 -30
- package/index240.js +1 -1
- package/index240.mjs +24 -10
- package/index241.js +1 -1
- package/index241.mjs +11 -28
- package/index242.js +1 -1
- package/index242.mjs +4 -15
- package/index243.js +1 -1
- package/index243.mjs +14 -9
- package/index244.js +1 -1
- package/index244.mjs +42 -6
- package/index245.js +1 -1
- package/index245.mjs +58 -5
- package/index246.js +1 -1
- package/index246.mjs +43 -7
- package/index247.js +1 -1
- package/index247.mjs +30 -27
- package/index248.js +1 -1
- package/index248.mjs +29 -15
- package/index249.js +1 -1
- package/index249.mjs +14 -44
- package/index250.js +1 -1
- package/index250.mjs +10 -8
- package/index251.js +1 -1
- package/index251.mjs +27 -14
- package/index252.js +1 -1
- package/index252.mjs +16 -3
- package/index253.js +1 -1
- package/index253.mjs +9 -19
- package/index254.js +1 -1
- package/index254.mjs +6 -34
- package/index255.js +1 -1
- package/index255.mjs +5 -22
- package/index256.js +1 -1
- package/index256.mjs +7 -27
- package/index257.js +1 -1
- package/index257.mjs +27 -128
- package/index258.js +1 -1
- package/index258.mjs +17 -190
- package/index259.js +1 -1
- package/index259.mjs +43 -8
- package/index260.js +1 -1
- package/index260.mjs +8 -3
- package/index261.js +1 -1
- package/index261.mjs +15 -35
- package/index262.js +1 -1
- package/index262.mjs +3 -6
- package/index263.js +1 -1
- package/index263.mjs +19 -29
- package/index264.js +1 -1
- package/index264.mjs +34 -6
- package/index265.js +1 -1
- package/index265.mjs +20 -122
- package/index266.js +1 -1
- package/index266.mjs +8 -133
- package/index267.js +1 -1
- package/index267.mjs +3 -75
- package/index268.js +1 -1
- package/index268.mjs +36 -14
- package/index269.js +1 -1
- package/index269.mjs +5 -95
- package/index270.js +1 -1
- package/index270.mjs +28 -105
- package/index271.js +1 -1
- package/index271.mjs +6 -4
- package/index272.js +1 -1
- package/index272.mjs +9 -3
- package/index273.js +1 -1
- package/index273.mjs +130 -122
- package/index274.js +1 -1
- package/index274.mjs +37 -23
- package/index275.js +1 -1
- package/index275.mjs +231 -51
- package/index276.js +1 -1
- package/index276.mjs +122 -41
- package/index277.js +1 -1
- package/index277.mjs +70 -35
- package/index278.js +7 -1
- package/index278.mjs +429 -103
- package/index279.js +1 -1
- package/index279.mjs +58 -77
- package/index280.js +1 -1
- package/index280.mjs +52 -99
- package/index281.js +1 -1
- package/index281.mjs +27 -97
- package/index282.js +1 -1
- package/index282.mjs +28 -141
- package/index283.js +1 -1
- package/index283.mjs +140 -209
- package/index284.js +1 -1
- package/index284.mjs +213 -22
- package/index285.js +1 -1
- package/index285.mjs +20 -47
- package/index286.js +1 -1
- package/index286.mjs +45 -42
- package/index287.js +1 -6
- package/index287.mjs +41 -108
- package/index288.js +6 -1
- package/index288.mjs +114 -72
- package/index289.js +1 -1
- package/index289.mjs +72 -75
- package/index290.js +1 -1
- package/index290.mjs +74 -7
- package/index291.js +1 -1
- package/index291.mjs +7 -11
- package/index292.js +1 -1
- package/index292.mjs +10 -30
- package/index293.js +1 -1
- package/index293.mjs +4 -3
- package/index294.js +1 -1
- package/index294.mjs +3 -4
- package/index329.js +1 -1
- package/index329.mjs +1 -1
- package/index331.js +1 -1
- package/index331.mjs +4 -4
- package/index332.js +1 -1
- package/index332.mjs +4 -4
- package/index333.js +1 -1
- package/index333.mjs +5 -5
- package/index335.js +1 -1
- package/index335.mjs +2 -2
- package/index336.js +1 -1
- package/index336.mjs +4 -4
- package/index339.js +1 -1
- package/index339.mjs +3 -3
- package/index342.js +1 -1
- package/index342.mjs +1 -1
- package/index345.js +1 -1
- package/index345.mjs +1 -1
- package/logger.d.ts +2 -2
- package/package.json +2 -2
package/index195.mjs
CHANGED
|
@@ -1,227 +1,146 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function N(I) {
|
|
1
|
+
import { a as N } from "./index234.mjs";
|
|
2
|
+
import { d as T, n as P } from "./index235.mjs";
|
|
3
|
+
function q(S) {
|
|
5
4
|
let {
|
|
6
5
|
swiper: e,
|
|
7
|
-
extendParams:
|
|
8
|
-
on:
|
|
9
|
-
emit:
|
|
10
|
-
} =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: "bullets",
|
|
24
|
-
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
25
|
-
dynamicBullets: !1,
|
|
26
|
-
dynamicMainBullets: 1,
|
|
27
|
-
formatFractionCurrent: (a) => a,
|
|
28
|
-
formatFractionTotal: (a) => a,
|
|
29
|
-
bulletClass: `${d}-bullet`,
|
|
30
|
-
bulletActiveClass: `${d}-bullet-active`,
|
|
31
|
-
modifierClass: `${d}-`,
|
|
32
|
-
currentClass: `${d}-current`,
|
|
33
|
-
totalClass: `${d}-total`,
|
|
34
|
-
hiddenClass: `${d}-hidden`,
|
|
35
|
-
progressbarFillClass: `${d}-progressbar-fill`,
|
|
36
|
-
progressbarOppositeClass: `${d}-progressbar-opposite`,
|
|
37
|
-
clickableClass: `${d}-clickable`,
|
|
38
|
-
lockClass: `${d}-lock`,
|
|
39
|
-
horizontalClass: `${d}-horizontal`,
|
|
40
|
-
verticalClass: `${d}-vertical`,
|
|
41
|
-
paginationDisabledClass: `${d}-disabled`
|
|
6
|
+
extendParams: Y,
|
|
7
|
+
on: I,
|
|
8
|
+
emit: g
|
|
9
|
+
} = S;
|
|
10
|
+
const L = N();
|
|
11
|
+
Y({
|
|
12
|
+
mousewheel: {
|
|
13
|
+
enabled: !1,
|
|
14
|
+
releaseOnEdges: !1,
|
|
15
|
+
invert: !1,
|
|
16
|
+
forceToAxis: !1,
|
|
17
|
+
sensitivity: 1,
|
|
18
|
+
eventsTarget: "container",
|
|
19
|
+
thresholdDelta: null,
|
|
20
|
+
thresholdTime: null,
|
|
21
|
+
noMousewheelClass: "swiper-no-mousewheel"
|
|
42
22
|
}
|
|
43
|
-
}), e.
|
|
44
|
-
|
|
45
|
-
bullets: []
|
|
23
|
+
}), e.mousewheel = {
|
|
24
|
+
enabled: !1
|
|
46
25
|
};
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
let c, w = T(), u;
|
|
27
|
+
const i = [];
|
|
28
|
+
function _(t) {
|
|
29
|
+
let o = 0, r = 0, a = 0, l = 0;
|
|
30
|
+
return "detail" in t && (r = t.detail), "wheelDelta" in t && (r = -t.wheelDelta / 120), "wheelDeltaY" in t && (r = -t.wheelDeltaY / 120), "wheelDeltaX" in t && (o = -t.wheelDeltaX / 120), "axis" in t && t.axis === t.HORIZONTAL_AXIS && (o = r, r = 0), a = o * 10, l = r * 10, "deltaY" in t && (l = t.deltaY), "deltaX" in t && (a = t.deltaX), t.shiftKey && !a && (a = l, l = 0), (a || l) && t.deltaMode && (t.deltaMode === 1 ? (a *= 40, l *= 40) : (a *= 800, l *= 800)), a && !o && (o = a < 1 ? -1 : 1), l && !r && (r = l < 1 ? -1 : 1), {
|
|
31
|
+
spinX: o,
|
|
32
|
+
spinY: r,
|
|
33
|
+
pixelX: a,
|
|
34
|
+
pixelY: l
|
|
35
|
+
};
|
|
50
36
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
bulletActiveClass: i
|
|
54
|
-
} = e.params.pagination;
|
|
55
|
-
a && (a = a[`${s === "prev" ? "previous" : "next"}ElementSibling`], a && (a.classList.add(`${i}-${s}`), a = a[`${s === "prev" ? "previous" : "next"}ElementSibling`], a && a.classList.add(`${i}-${s}-${s}`)));
|
|
37
|
+
function G() {
|
|
38
|
+
e.enabled && (e.mouseEntered = !0);
|
|
56
39
|
}
|
|
57
|
-
function O(
|
|
58
|
-
|
|
59
|
-
return "next";
|
|
60
|
-
if (s === a - 1)
|
|
61
|
-
return "previous";
|
|
40
|
+
function O() {
|
|
41
|
+
e.enabled && (e.mouseEntered = !1);
|
|
62
42
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
if (!s)
|
|
66
|
-
return;
|
|
67
|
-
a.preventDefault();
|
|
68
|
-
const i = S(s) * e.params.slidesPerGroup;
|
|
69
|
-
if (e.params.loop) {
|
|
70
|
-
if (e.realIndex === i) return;
|
|
71
|
-
const t = O(e.realIndex, i, e.slides.length);
|
|
72
|
-
t === "next" ? e.slideNext() : t === "previous" ? e.slidePrev() : e.slideToLoop(i);
|
|
73
|
-
} else
|
|
74
|
-
e.slideTo(i);
|
|
43
|
+
function y(t) {
|
|
44
|
+
return e.params.mousewheel.thresholdDelta && t.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && T() - w < e.params.mousewheel.thresholdTime ? !1 : t.delta >= 6 && T() - w < 60 ? !0 : (t.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), g("scroll", t.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), g("scroll", t.raw)), w = new L.Date().getTime(), !1);
|
|
75
45
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
46
|
+
function A(t) {
|
|
47
|
+
const s = e.params.mousewheel;
|
|
48
|
+
if (t.direction < 0) {
|
|
49
|
+
if (e.isEnd && !e.params.loop && s.releaseOnEdges)
|
|
50
|
+
return !0;
|
|
51
|
+
} else if (e.isBeginning && !e.params.loop && s.releaseOnEdges)
|
|
52
|
+
return !0;
|
|
53
|
+
return !1;
|
|
54
|
+
}
|
|
55
|
+
function E(t) {
|
|
56
|
+
let s = t, b = !0;
|
|
57
|
+
if (!e.enabled || t.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
|
|
58
|
+
const f = e.params.mousewheel;
|
|
59
|
+
e.params.cssMode && s.preventDefault();
|
|
60
|
+
let o = e.el;
|
|
61
|
+
e.params.mousewheel.eventsTarget !== "container" && (o = document.querySelector(e.params.mousewheel.eventsTarget));
|
|
62
|
+
const r = o && o.contains(s.target);
|
|
63
|
+
if (!e.mouseEntered && !r && !f.releaseOnEdges) return !0;
|
|
64
|
+
s.originalEvent && (s = s.originalEvent);
|
|
65
|
+
let a = 0;
|
|
66
|
+
const l = e.rtlTranslate ? -1 : 1, d = _(s);
|
|
67
|
+
if (f.forceToAxis)
|
|
68
|
+
if (e.isHorizontal())
|
|
69
|
+
if (Math.abs(d.pixelX) > Math.abs(d.pixelY)) a = -d.pixelX * l;
|
|
70
|
+
else return !0;
|
|
71
|
+
else if (Math.abs(d.pixelY) > Math.abs(d.pixelX)) a = -d.pixelY;
|
|
72
|
+
else return !0;
|
|
73
|
+
else
|
|
74
|
+
a = Math.abs(d.pixelX) > Math.abs(d.pixelY) ? -d.pixelX * l : -d.pixelY;
|
|
75
|
+
if (a === 0) return !0;
|
|
76
|
+
f.invert && (a = -a);
|
|
77
|
+
let h = e.getTranslate() + a * f.sensitivity;
|
|
78
|
+
if (h >= e.minTranslate() && (h = e.minTranslate()), h <= e.maxTranslate() && (h = e.maxTranslate()), b = e.params.loop ? !0 : !(h === e.minTranslate() || h === e.maxTranslate()), b && e.params.nested && s.stopPropagation(), !e.params.freeMode || !e.params.freeMode.enabled) {
|
|
79
|
+
const n = {
|
|
80
|
+
time: T(),
|
|
81
|
+
delta: Math.abs(a),
|
|
82
|
+
direction: Math.sign(a),
|
|
83
|
+
raw: t
|
|
84
|
+
};
|
|
85
|
+
i.length >= 2 && i.shift();
|
|
86
|
+
const m = i.length ? i[i.length - 1] : void 0;
|
|
87
|
+
if (i.push(n), m ? (n.direction !== m.direction || n.delta > m.delta || n.time > m.time + 150) && y(n) : y(n), A(n))
|
|
88
|
+
return !0;
|
|
89
|
+
} else {
|
|
90
|
+
const n = {
|
|
91
|
+
time: T(),
|
|
92
|
+
delta: Math.abs(a),
|
|
93
|
+
direction: Math.sign(a)
|
|
94
|
+
}, m = u && n.time < u.time + 500 && n.delta <= u.delta && n.direction === u.direction;
|
|
95
|
+
if (!m) {
|
|
96
|
+
u = void 0;
|
|
97
|
+
let p = e.getTranslate() + a * f.sensitivity;
|
|
98
|
+
const C = e.isBeginning, B = e.isEnd;
|
|
99
|
+
if (p >= e.minTranslate() && (p = e.minTranslate()), p <= e.maxTranslate() && (p = e.maxTranslate()), e.setTransition(0), e.setTranslate(p), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!C && e.isBeginning || !B && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
|
|
100
|
+
direction: n.direction < 0 ? "next" : "prev",
|
|
101
|
+
byMousewheel: !0
|
|
102
|
+
}), e.params.freeMode.sticky) {
|
|
103
|
+
clearTimeout(c), c = void 0, i.length >= 15 && i.shift();
|
|
104
|
+
const M = i.length ? i[i.length - 1] : void 0, H = i[0];
|
|
105
|
+
if (i.push(n), M && (n.delta > M.delta || n.direction !== M.direction))
|
|
106
|
+
i.splice(0);
|
|
107
|
+
else if (i.length >= 15 && n.time - H.time < 500 && H.delta - n.delta >= 1 && n.delta <= 6) {
|
|
108
|
+
const X = a > 0 ? 0.8 : 0.2;
|
|
109
|
+
u = n, i.splice(0), c = P(() => {
|
|
110
|
+
e.destroyed || !e.params || e.slideToClosest(e.params.speed, !0, void 0, X);
|
|
111
|
+
}, 0);
|
|
112
|
+
}
|
|
113
|
+
c || (c = P(() => {
|
|
114
|
+
if (e.destroyed || !e.params) return;
|
|
115
|
+
const X = 0.5;
|
|
116
|
+
u = n, i.splice(0), e.slideToClosest(e.params.speed, !0, void 0, X);
|
|
117
|
+
}, 500));
|
|
105
118
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const n = Math.min(l.length, s.dynamicMainBullets + 4), r = (b * n - b) / 2 - L * b, o = a ? "right" : "left";
|
|
109
|
-
l.forEach((y) => {
|
|
110
|
-
y.style[e.isHorizontal() ? o : "top"] = `${r}px`;
|
|
111
|
-
});
|
|
119
|
+
if (m || g("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), f.releaseOnEdges && (p === e.minTranslate() || p === e.maxTranslate()))
|
|
120
|
+
return !0;
|
|
112
121
|
}
|
|
113
122
|
}
|
|
114
|
-
|
|
115
|
-
if (s.type === "fraction" && (l.querySelectorAll($(s.currentClass)).forEach((c) => {
|
|
116
|
-
c.textContent = s.formatFractionCurrent(t + 1);
|
|
117
|
-
}), l.querySelectorAll($(s.totalClass)).forEach((c) => {
|
|
118
|
-
c.textContent = s.formatFractionTotal(z);
|
|
119
|
-
})), s.type === "progressbar") {
|
|
120
|
-
let c;
|
|
121
|
-
s.progressbarOpposite ? c = e.isHorizontal() ? "vertical" : "horizontal" : c = e.isHorizontal() ? "horizontal" : "vertical";
|
|
122
|
-
const L = (t + 1) / z;
|
|
123
|
-
let n = 1, r = 1;
|
|
124
|
-
c === "horizontal" ? n = L : r = L, l.querySelectorAll($(s.progressbarFillClass)).forEach((o) => {
|
|
125
|
-
o.style.transform = `translate3d(0,0,0) scaleX(${n}) scaleY(${r})`, o.style.transitionDuration = `${e.params.speed}ms`;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
s.type === "custom" && s.renderCustom ? (l.innerHTML = s.renderCustom(e, t + 1, z), f === 0 && v("paginationRender", l)) : (f === 0 && v("paginationRender", l), v("paginationUpdate", l)), e.params.watchOverflow && e.enabled && l.classList[e.isLocked ? "add" : "remove"](s.lockClass);
|
|
129
|
-
});
|
|
123
|
+
return s.preventDefault ? s.preventDefault() : s.returnValue = !1, !1;
|
|
130
124
|
}
|
|
131
|
-
function
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const s = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
135
|
-
let i = e.pagination.el;
|
|
136
|
-
i = m(i);
|
|
137
|
-
let t = "";
|
|
138
|
-
if (a.type === "bullets") {
|
|
139
|
-
let p = e.params.loop ? Math.ceil(s / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
140
|
-
e.params.freeMode && e.params.freeMode.enabled && p > s && (p = s);
|
|
141
|
-
for (let C = 0; C < p; C += 1)
|
|
142
|
-
a.renderBullet ? t += a.renderBullet.call(e, C, a.bulletClass) : t += `<${a.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${a.bulletClass}"></${a.bulletElement}>`;
|
|
143
|
-
}
|
|
144
|
-
a.type === "fraction" && (a.renderFraction ? t = a.renderFraction.call(e, a.currentClass, a.totalClass) : t = `<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`), a.type === "progressbar" && (a.renderProgressbar ? t = a.renderProgressbar.call(e, a.progressbarFillClass) : t = `<span class="${a.progressbarFillClass}"></span>`), e.pagination.bullets = [], i.forEach((p) => {
|
|
145
|
-
a.type !== "custom" && (p.innerHTML = t || ""), a.type === "bullets" && e.pagination.bullets.push(...p.querySelectorAll($(a.bulletClass)));
|
|
146
|
-
}), a.type !== "custom" && v("paginationRender", i[0]);
|
|
125
|
+
function D(t) {
|
|
126
|
+
let s = e.el;
|
|
127
|
+
e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[t]("mouseenter", G), s[t]("mouseleave", O), s[t]("wheel", E);
|
|
147
128
|
}
|
|
148
|
-
function
|
|
149
|
-
e.params.
|
|
150
|
-
el: "swiper-pagination"
|
|
151
|
-
});
|
|
152
|
-
const a = e.params.pagination;
|
|
153
|
-
if (!a.el) return;
|
|
154
|
-
let s;
|
|
155
|
-
typeof a.el == "string" && e.isElement && (s = e.el.querySelector(a.el)), !s && typeof a.el == "string" && (s = [...document.querySelectorAll(a.el)]), s || (s = a.el), !(!s || s.length === 0) && (e.params.uniqueNavElements && typeof a.el == "string" && Array.isArray(s) && s.length > 1 && (s = [...e.el.querySelectorAll(a.el)], s.length > 1 && (s = s.filter((i) => E(i, ".swiper")[0] === e.el)[0])), Array.isArray(s) && s.length === 1 && (s = s[0]), Object.assign(e.pagination, {
|
|
156
|
-
el: s
|
|
157
|
-
}), s = m(s), s.forEach((i) => {
|
|
158
|
-
a.type === "bullets" && a.clickable && i.classList.add(...(a.clickableClass || "").split(" ")), i.classList.add(a.modifierClass + a.type), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.type === "bullets" && a.dynamicBullets && (i.classList.add(`${a.modifierClass}${a.type}-dynamic`), u = 0, a.dynamicMainBullets < 1 && (a.dynamicMainBullets = 1)), a.type === "progressbar" && a.progressbarOpposite && i.classList.add(a.progressbarOppositeClass), a.clickable && i.addEventListener("click", D), e.enabled || i.classList.add(a.lockClass);
|
|
159
|
-
}));
|
|
129
|
+
function v() {
|
|
130
|
+
return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", E), !0) : e.mousewheel.enabled ? !1 : (D("addEventListener"), e.mousewheel.enabled = !0, !0);
|
|
160
131
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
163
|
-
if (k()) return;
|
|
164
|
-
let s = e.pagination.el;
|
|
165
|
-
s && (s = m(s), s.forEach((i) => {
|
|
166
|
-
i.classList.remove(a.hiddenClass), i.classList.remove(a.modifierClass + a.type), i.classList.remove(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.clickable && (i.classList.remove(...(a.clickableClass || "").split(" ")), i.removeEventListener("click", D));
|
|
167
|
-
})), e.pagination.bullets && e.pagination.bullets.forEach((i) => i.classList.remove(...a.bulletActiveClass.split(" ")));
|
|
132
|
+
function x() {
|
|
133
|
+
return e.params.cssMode ? (e.wrapperEl.addEventListener(event, E), !0) : e.mousewheel.enabled ? (D("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
|
|
168
134
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
i.classList.remove(a.horizontalClass, a.verticalClass), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass);
|
|
177
|
-
});
|
|
178
|
-
}), g("init", () => {
|
|
179
|
-
e.params.pagination.enabled === !1 ? P() : (A(), B(), h());
|
|
180
|
-
}), g("activeIndexChange", () => {
|
|
181
|
-
typeof e.snapIndex > "u" && h();
|
|
182
|
-
}), g("snapIndexChange", () => {
|
|
183
|
-
h();
|
|
184
|
-
}), g("snapGridLengthChange", () => {
|
|
185
|
-
B(), h();
|
|
186
|
-
}), g("destroy", () => {
|
|
187
|
-
M();
|
|
188
|
-
}), g("enable disable", () => {
|
|
189
|
-
let {
|
|
190
|
-
el: a
|
|
191
|
-
} = e.pagination;
|
|
192
|
-
a && (a = m(a), a.forEach((s) => s.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
193
|
-
}), g("lock unlock", () => {
|
|
194
|
-
h();
|
|
195
|
-
}), g("click", (a, s) => {
|
|
196
|
-
const i = s.target, t = m(e.pagination.el);
|
|
197
|
-
if (e.params.pagination.el && e.params.pagination.hideOnClick && t && t.length > 0 && !i.classList.contains(e.params.pagination.bulletClass)) {
|
|
198
|
-
if (e.navigation && (e.navigation.nextEl && i === e.navigation.nextEl || e.navigation.prevEl && i === e.navigation.prevEl)) return;
|
|
199
|
-
const p = t[0].classList.contains(e.params.pagination.hiddenClass);
|
|
200
|
-
v(p === !0 ? "paginationShow" : "paginationHide"), t.forEach((C) => C.classList.toggle(e.params.pagination.hiddenClass));
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
const w = () => {
|
|
204
|
-
e.el.classList.remove(e.params.pagination.paginationDisabledClass);
|
|
205
|
-
let {
|
|
206
|
-
el: a
|
|
207
|
-
} = e.pagination;
|
|
208
|
-
a && (a = m(a), a.forEach((s) => s.classList.remove(e.params.pagination.paginationDisabledClass))), A(), B(), h();
|
|
209
|
-
}, P = () => {
|
|
210
|
-
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
211
|
-
let {
|
|
212
|
-
el: a
|
|
213
|
-
} = e.pagination;
|
|
214
|
-
a && (a = m(a), a.forEach((s) => s.classList.add(e.params.pagination.paginationDisabledClass))), M();
|
|
215
|
-
};
|
|
216
|
-
Object.assign(e.pagination, {
|
|
217
|
-
enable: w,
|
|
218
|
-
disable: P,
|
|
219
|
-
render: B,
|
|
220
|
-
update: h,
|
|
221
|
-
init: A,
|
|
222
|
-
destroy: M
|
|
135
|
+
I("init", () => {
|
|
136
|
+
!e.params.mousewheel.enabled && e.params.cssMode && x(), e.params.mousewheel.enabled && v();
|
|
137
|
+
}), I("destroy", () => {
|
|
138
|
+
e.params.cssMode && v(), e.mousewheel.enabled && x();
|
|
139
|
+
}), Object.assign(e.mousewheel, {
|
|
140
|
+
enable: v,
|
|
141
|
+
disable: x
|
|
223
142
|
});
|
|
224
143
|
}
|
|
225
144
|
export {
|
|
226
|
-
|
|
145
|
+
q as default
|
|
227
146
|
};
|
package/index196.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const w=require("./index266.js"),l=require("./index235.js");function L(x){let{swiper:a,extendParams:C,on:c,emit:g}=x;C({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),a.navigation={nextEl:null,prevEl:null};function u(i){let n;return i&&typeof i=="string"&&a.isElement&&(n=a.el.querySelector(i)||a.hostEl.querySelector(i),n)?n:(i&&(typeof i=="string"&&(n=[...document.querySelectorAll(i)]),a.params.uniqueNavElements&&typeof i=="string"&&n&&n.length>1&&a.el.querySelectorAll(i).length===1?n=a.el.querySelector(i):n&&n.length===1&&(n=n[0])),i&&!n?i:n)}function v(i,n){const t=a.params.navigation;i=l.m(i),i.forEach(e=>{e&&(e.classList[n?"add":"remove"](...t.disabledClass.split(" ")),e.tagName==="BUTTON"&&(e.disabled=n),a.params.watchOverflow&&a.enabled&&e.classList[a.isLocked?"add":"remove"](t.lockClass))})}function d(){const{nextEl:i,prevEl:n}=a.navigation;if(a.params.loop){v(n,!1),v(i,!1);return}v(n,a.isBeginning&&!a.params.rewind),v(i,a.isEnd&&!a.params.rewind)}function E(i){i.preventDefault(),!(a.isBeginning&&!a.params.loop&&!a.params.rewind)&&(a.slidePrev(),g("navigationPrev"))}function h(i){i.preventDefault(),!(a.isEnd&&!a.params.loop&&!a.params.rewind)&&(a.slideNext(),g("navigationNext"))}function f(){const i=a.params.navigation;if(a.params.navigation=w.c(a,a.originalParams.navigation,a.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(i.nextEl||i.prevEl))return;let n=u(i.nextEl),t=u(i.prevEl);Object.assign(a.navigation,{nextEl:n,prevEl:t}),n=l.m(n),t=l.m(t);const e=(s,p)=>{s&&s.addEventListener("click",p==="next"?h:E),!a.enabled&&s&&s.classList.add(...i.lockClass.split(" "))};n.forEach(s=>e(s,"next")),t.forEach(s=>e(s,"prev"))}function m(){let{nextEl:i,prevEl:n}=a.navigation;i=l.m(i),n=l.m(n);const t=(e,s)=>{e.removeEventListener("click",s==="next"?h:E),e.classList.remove(...a.params.navigation.disabledClass.split(" "))};i.forEach(e=>t(e,"next")),n.forEach(e=>t(e,"prev"))}c("init",()=>{a.params.navigation.enabled===!1?b():(f(),d())}),c("toEdge fromEdge lock unlock",()=>{d()}),c("destroy",()=>{m()}),c("enable disable",()=>{let{nextEl:i,prevEl:n}=a.navigation;if(i=l.m(i),n=l.m(n),a.enabled){d();return}[...i,...n].filter(t=>!!t).forEach(t=>t.classList.add(a.params.navigation.lockClass))}),c("click",(i,n)=>{let{nextEl:t,prevEl:e}=a.navigation;t=l.m(t),e=l.m(e);const s=n.target;let p=e.includes(s)||t.includes(s);if(a.isElement&&!p){const r=n.path||n.composedPath&&n.composedPath();r&&(p=r.find(o=>t.includes(o)||e.includes(o)))}if(a.params.navigation.hideOnClick&&!p){if(a.pagination&&a.params.pagination&&a.params.pagination.clickable&&(a.pagination.el===s||a.pagination.el.contains(s)))return;let r;t.length?r=t[0].classList.contains(a.params.navigation.hiddenClass):e.length&&(r=e[0].classList.contains(a.params.navigation.hiddenClass)),g(r===!0?"navigationShow":"navigationHide"),[...t,...e].filter(o=>!!o).forEach(o=>o.classList.toggle(a.params.navigation.hiddenClass))}});const k=()=>{a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")),f(),d()},b=()=>{a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(a.navigation,{enable:k,disable:b,update:d,init:f,destroy:m})}module.exports=L;
|