infinity-forge 2.4.0 → 2.4.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/sites/components/default-pages/blog/components/blog-item/share/index.js +2 -2
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.d.ts +1 -1
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.js +2 -2
- package/dist/system/presentation/components/data/menu/components/menu-item/index.js +3 -3
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/index.js +5 -5
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/styles.js +1 -1
- package/dist/system/presentation/components/data/menu/modes/opened/index.js +3 -3
- package/dist/system/presentation/components/data/menu/modes/opened/styles.js +1 -1
- package/dist/system/presentation/components/data/tab/tab-item/index.d.ts +5 -0
- package/dist/system/presentation/components/data/tab/tab-item/index.js +46 -0
- package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +8 -0
- package/dist/system/presentation/components/layout/header/components/index.d.ts +2 -0
- package/dist/system/presentation/components/layout/header/components/index.js +19 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js +0 -36
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +0 -38
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +0 -42
- package/dist/system/presentation/components/layout/header/components/search-modal/index.js +4 -4
- package/dist/system/presentation/components/layout/header/version-01/index.d.ts +2 -0
- package/dist/system/presentation/components/layout/header/version-01/index.js +45 -0
- package/dist/system/presentation/components/pages/menus/table/columns.d.ts +3 -0
- package/dist/system/presentation/components/pages/menus/table/columns.js +21 -0
- package/dist/system/presentation/components/pages/menus/table/create.d.ts +3 -0
- package/dist/system/presentation/components/pages/menus/table/create.js +72 -0
- package/dist/system/presentation/components/pages/menus/table/delete.js +71 -0
- package/dist/system/presentation/components/pages/menus/table/edit.d.ts +3 -0
- package/dist/system/presentation/components/pages/menus/table/edit.js +78 -0
- package/dist/system/presentation/components/pages/menus/table/icon/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/index.d.ts +4 -0
- package/dist/system/presentation/components/pages/menus/table/index.js +21 -0
- package/dist/system/presentation/components/pages/users/table/columns.d.ts +3 -0
- package/dist/system/presentation/components/pages/users/table/create.d.ts +3 -0
- package/dist/system/presentation/components/pages/users/table/create.js +75 -0
- package/dist/system/presentation/components/pages/users/table/delete.js +74 -0
- package/dist/system/presentation/components/pages/users/table/edit.d.ts +3 -0
- package/dist/system/presentation/components/pages/users/table/edit.js +83 -0
- package/dist/system/presentation/components/pages/users/table/index.d.ts +4 -0
- package/dist/system/presentation/components/pages/users/table/index.js +21 -0
- package/dist/system/presentation/context/auth/components/login/form-login/index.js +2 -2
- package/dist/system/presentation/context/auth/components/login/index.js +38 -0
- package/dist/system/presentation/context/auth/components/private-page/index.d.ts +2 -0
- package/dist/system/presentation/context/auth/components/private-page/index.js +141 -0
- package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/index.js +18 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.js +10 -10
- package/dist/system/presentation/hooks/ui/use-table/components/table/interfaces.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +5 -0
- package/dist/system/presentation/hooks/ui/use-table/query/hook.js +52 -0
- package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/query/index.js +19 -0
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +35 -0
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +7 -0
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +9 -0
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +94 -0
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +7 -0
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +9 -0
- package/dist/ui/components/carousel/carousel-lib/core/events/index.js +77 -0
- package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +14 -0
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +194 -0
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +314 -0
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +154 -0
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +7 -0
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +12 -0
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +9 -0
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +14 -0
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +57 -0
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +230 -0
- package/dist/ui/components/carousel/carousel-lib/core/modules/observer/observer.js +2 -2
- package/dist/ui/components/carousel/carousel-lib/core/modules/resize/resize.js +1 -1
- package/dist/ui/components/carousel/carousel-lib/core/slide/index.d.ts +17 -0
- package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +22 -0
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +160 -0
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +46 -0
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +9 -0
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +14 -0
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +18 -0
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +19 -0
- package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +21 -0
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +13 -0
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +18 -0
- package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +81 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +21 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/index.js +26 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +125 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +45 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +306 -0
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +69 -0
- package/dist/ui/components/form/handler/i18n/capture-i18n-errors/index.d.ts +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.d.ts +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.js +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.d.ts +3 -3
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.js +3 -3
- package/dist/ui/components/form/input-cep/use-cep/providers/index.d.ts +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/index.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/cleanValue.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/cleanValue.js +4 -4
- package/dist/ui/components/form/input-currency/components/utils/formatValue.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/formatValue.js +2 -2
- package/dist/ui/components/form/input-currency/components/utils/getLocaleConfig.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/getSuffix.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/index.d.ts +8 -8
- package/dist/ui/components/form/input-currency/components/utils/index.js +8 -8
- package/dist/ui/components/form/input-currency/components/utils/parseAbbrValue.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/removeInvalidChars.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/removeSeparators.js +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.js +3 -3
- package/dist/ui/components/form/input-date-picker/calendar/days/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/days/index.js +2 -2
- package/dist/ui/components/form/input-date-picker/calendar/months/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/months/index.js +2 -2
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.d.ts +1 -1
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.js +1 -1
- package/dist/ui/components/form/input-file/render-files/file-item/index.d.ts +2 -2
- package/dist/ui/components/form/input-file/render-files/file-item/index.js +3 -3
- package/dist/ui/components/form/input-mask/lib/core/errors/SyntheticChangeError.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.js +2 -2
- package/dist/ui/components/form/input-mask/lib/core/index.d.ts +5 -5
- package/dist/ui/components/form/input-mask/lib/core/index.js +4 -4
- package/dist/ui/components/form/input-mask/lib/core/utils/setInputAttributes.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.js +2 -2
- package/dist/ui/components/form/input-mask/lib/mask/index.d.ts +5 -5
- package/dist/ui/components/form/input-mask/lib/mask/index.js +3 -3
- package/dist/ui/components/form/input-mask/lib/mask/types.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/useMask.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/useMask.js +7 -7
- package/dist/ui/components/form/input-mask/lib/mask/utils/filter.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/format.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToParts.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToReplacementObject.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.js +3 -3
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveSelection.d.ts +0 -18
- package/dist/ui/components/form/input-mask/lib/mask/utils/unformat.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/validate.d.ts +0 -13
- package/dist/ui/components/form/input-mask/lib/mask/utils.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils.js +5 -5
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.js +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/index.d.ts +4 -4
- package/dist/ui/components/form/input-mask/lib/number-format/index.js +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/types.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.js +6 -6
- package/dist/ui/components/form/input-mask/lib/number-format/utils/localizeValues.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.js +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveMinimumFractionDigits.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveOptions.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveSelection.d.ts +0 -24
- package/package.json +1 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
//@ts-nocheck
|
|
15
|
+
var utils_1 = require("../../shared/utils.js");
|
|
16
|
+
function loopFix(_a) {
|
|
17
|
+
var _b = _a === void 0 ? {} : _a, slideRealIndex = _b.slideRealIndex, _c = _b.slideTo, slideTo = _c === void 0 ? true : _c, direction = _b.direction, setTranslate = _b.setTranslate, activeSlideIndex = _b.activeSlideIndex, byController = _b.byController, byMousewheel = _b.byMousewheel;
|
|
18
|
+
var swiper = this;
|
|
19
|
+
if (!swiper.params.loop)
|
|
20
|
+
return;
|
|
21
|
+
swiper.emit('beforeLoopFix');
|
|
22
|
+
var slides = swiper.slides, allowSlidePrev = swiper.allowSlidePrev, allowSlideNext = swiper.allowSlideNext, slidesEl = swiper.slidesEl, params = swiper.params;
|
|
23
|
+
var centeredSlides = params.centeredSlides;
|
|
24
|
+
swiper.allowSlidePrev = true;
|
|
25
|
+
swiper.allowSlideNext = true;
|
|
26
|
+
if (swiper.virtual && params.virtual.enabled) {
|
|
27
|
+
if (slideTo) {
|
|
28
|
+
if (!params.centeredSlides && swiper.snapIndex === 0) {
|
|
29
|
+
swiper.slideTo(swiper.virtual.slides.length, 0, false, true);
|
|
30
|
+
}
|
|
31
|
+
else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {
|
|
32
|
+
swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);
|
|
33
|
+
}
|
|
34
|
+
else if (swiper.snapIndex === swiper.snapGrid.length - 1) {
|
|
35
|
+
swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
swiper.allowSlidePrev = allowSlidePrev;
|
|
39
|
+
swiper.allowSlideNext = allowSlideNext;
|
|
40
|
+
swiper.emit('loopFix');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
var slidesPerView = params.slidesPerView;
|
|
44
|
+
if (slidesPerView === 'auto') {
|
|
45
|
+
slidesPerView = swiper.slidesPerViewDynamic();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));
|
|
49
|
+
if (centeredSlides && slidesPerView % 2 === 0) {
|
|
50
|
+
slidesPerView = slidesPerView + 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;
|
|
54
|
+
var loopedSlides = slidesPerGroup;
|
|
55
|
+
if (loopedSlides % slidesPerGroup !== 0) {
|
|
56
|
+
loopedSlides += slidesPerGroup - (loopedSlides % slidesPerGroup);
|
|
57
|
+
}
|
|
58
|
+
loopedSlides += params.loopAdditionalSlides;
|
|
59
|
+
swiper.loopedSlides = loopedSlides;
|
|
60
|
+
var gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
|
|
61
|
+
if (slides.length < slidesPerView + loopedSlides) {
|
|
62
|
+
(0, utils_1.showWarning)('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');
|
|
63
|
+
}
|
|
64
|
+
else if (gridEnabled && params.grid.fill === 'row') {
|
|
65
|
+
(0, utils_1.showWarning)('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');
|
|
66
|
+
}
|
|
67
|
+
var prependSlidesIndexes = [];
|
|
68
|
+
var appendSlidesIndexes = [];
|
|
69
|
+
var activeIndex = swiper.activeIndex;
|
|
70
|
+
if (typeof activeSlideIndex === 'undefined') {
|
|
71
|
+
activeSlideIndex = swiper.getSlideIndex(slides.filter(function (el) { return el.classList.contains(params.slideActiveClass); })[0]);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
activeIndex = activeSlideIndex;
|
|
75
|
+
}
|
|
76
|
+
var isNext = direction === 'next' || !direction;
|
|
77
|
+
var isPrev = direction === 'prev' || !direction;
|
|
78
|
+
var slidesPrepended = 0;
|
|
79
|
+
var slidesAppended = 0;
|
|
80
|
+
var cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;
|
|
81
|
+
var activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;
|
|
82
|
+
var activeColIndexWithShift = activeColIndex +
|
|
83
|
+
(centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);
|
|
84
|
+
// prepend last slides before start
|
|
85
|
+
if (activeColIndexWithShift < loopedSlides) {
|
|
86
|
+
slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);
|
|
87
|
+
for (var i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {
|
|
88
|
+
var index = i - Math.floor(i / cols) * cols;
|
|
89
|
+
if (gridEnabled) {
|
|
90
|
+
var colIndexToPrepend = cols - index - 1;
|
|
91
|
+
for (var i_1 = slides.length - 1; i_1 >= 0; i_1 -= 1) {
|
|
92
|
+
if (slides[i_1].column === colIndexToPrepend)
|
|
93
|
+
prependSlidesIndexes.push(i_1);
|
|
94
|
+
}
|
|
95
|
+
// slides.forEach((slide, slideIndex) => {
|
|
96
|
+
// if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);
|
|
97
|
+
// });
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
prependSlidesIndexes.push(cols - index - 1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {
|
|
105
|
+
slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);
|
|
106
|
+
var _loop_1 = function (i) {
|
|
107
|
+
var index = i - Math.floor(i / cols) * cols;
|
|
108
|
+
if (gridEnabled) {
|
|
109
|
+
slides.forEach(function (slide, slideIndex) {
|
|
110
|
+
if (slide.column === index)
|
|
111
|
+
appendSlidesIndexes.push(slideIndex);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
appendSlidesIndexes.push(index);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
for (var i = 0; i < slidesAppended; i += 1) {
|
|
119
|
+
_loop_1(i);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
swiper.__preventObserver__ = true;
|
|
123
|
+
requestAnimationFrame(function () {
|
|
124
|
+
swiper.__preventObserver__ = false;
|
|
125
|
+
});
|
|
126
|
+
if (isPrev) {
|
|
127
|
+
prependSlidesIndexes.forEach(function (index) {
|
|
128
|
+
slides[index].swiperLoopMoveDOM = true;
|
|
129
|
+
slidesEl.prepend(slides[index]);
|
|
130
|
+
slides[index].swiperLoopMoveDOM = false;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if (isNext) {
|
|
134
|
+
appendSlidesIndexes.forEach(function (index) {
|
|
135
|
+
slides[index].swiperLoopMoveDOM = true;
|
|
136
|
+
slidesEl.append(slides[index]);
|
|
137
|
+
slides[index].swiperLoopMoveDOM = false;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
swiper.recalcSlides();
|
|
141
|
+
if (params.slidesPerView === 'auto') {
|
|
142
|
+
swiper.updateSlides();
|
|
143
|
+
}
|
|
144
|
+
else if (gridEnabled &&
|
|
145
|
+
((prependSlidesIndexes.length > 0 && isPrev) || (appendSlidesIndexes.length > 0 && isNext))) {
|
|
146
|
+
swiper.slides.forEach(function (slide, slideIndex) {
|
|
147
|
+
swiper.grid.updateSlide(slideIndex, slide, swiper.slides);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (params.watchSlidesProgress) {
|
|
151
|
+
swiper.updateSlidesOffset();
|
|
152
|
+
}
|
|
153
|
+
if (slideTo) {
|
|
154
|
+
if (prependSlidesIndexes.length > 0 && isPrev) {
|
|
155
|
+
if (typeof slideRealIndex === 'undefined') {
|
|
156
|
+
var currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
157
|
+
var newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
|
|
158
|
+
var diff = newSlideTranslate - currentSlideTranslate;
|
|
159
|
+
if (byMousewheel) {
|
|
160
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);
|
|
164
|
+
if (setTranslate) {
|
|
165
|
+
swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
|
|
166
|
+
swiper.touchEventsData.currentTranslate =
|
|
167
|
+
swiper.touchEventsData.currentTranslate - diff;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
if (setTranslate) {
|
|
173
|
+
var shift = gridEnabled
|
|
174
|
+
? prependSlidesIndexes.length / params.grid.rows
|
|
175
|
+
: prependSlidesIndexes.length;
|
|
176
|
+
swiper.slideTo(swiper.activeIndex + shift, 0, false, true);
|
|
177
|
+
swiper.touchEventsData.currentTranslate = swiper.translate;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else if (appendSlidesIndexes.length > 0 && isNext) {
|
|
182
|
+
if (typeof slideRealIndex === 'undefined') {
|
|
183
|
+
var currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
184
|
+
var newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
|
|
185
|
+
var diff = newSlideTranslate - currentSlideTranslate;
|
|
186
|
+
if (byMousewheel) {
|
|
187
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
|
|
191
|
+
if (setTranslate) {
|
|
192
|
+
swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
|
|
193
|
+
swiper.touchEventsData.currentTranslate =
|
|
194
|
+
swiper.touchEventsData.currentTranslate - diff;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
var shift = gridEnabled
|
|
200
|
+
? appendSlidesIndexes.length / params.grid.rows
|
|
201
|
+
: appendSlidesIndexes.length;
|
|
202
|
+
swiper.slideTo(swiper.activeIndex - shift, 0, false, true);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
swiper.allowSlidePrev = allowSlidePrev;
|
|
207
|
+
swiper.allowSlideNext = allowSlideNext;
|
|
208
|
+
if (swiper.controller && swiper.controller.control && !byController) {
|
|
209
|
+
var loopParams_1 = {
|
|
210
|
+
slideRealIndex: slideRealIndex,
|
|
211
|
+
direction: direction,
|
|
212
|
+
setTranslate: setTranslate,
|
|
213
|
+
activeSlideIndex: activeSlideIndex,
|
|
214
|
+
byController: true,
|
|
215
|
+
};
|
|
216
|
+
if (Array.isArray(swiper.controller.control)) {
|
|
217
|
+
swiper.controller.control.forEach(function (c) {
|
|
218
|
+
if (!c.destroyed && c.params.loop)
|
|
219
|
+
c.loopFix(__assign(__assign({}, loopParams_1), { slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false }));
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
else if (swiper.controller.control instanceof swiper.constructor &&
|
|
223
|
+
swiper.controller.control.params.loop) {
|
|
224
|
+
swiper.controller.control.loopFix(__assign(__assign({}, loopParams_1), { slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false }));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
swiper.emit('loopFix');
|
|
228
|
+
}
|
|
229
|
+
exports.default = loopFix;
|
|
230
|
+
//# sourceMappingURL=loopFix.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//@ts-nocheck
|
|
4
|
-
var utils_1 = require("../../../shared/utils");
|
|
5
|
-
var window_1 = require("../../../ssr-window/window");
|
|
4
|
+
var utils_1 = require("../../../shared/utils.js");
|
|
5
|
+
var window_1 = require("../../../ssr-window/window.js");
|
|
6
6
|
function Observer(_a) {
|
|
7
7
|
var swiper = _a.swiper, extendParams = _a.extendParams, on = _a.on, emit = _a.emit;
|
|
8
8
|
var observers = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
//@ts-nocheck
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var window_1 = require("../../../ssr-window/window");
|
|
4
|
+
var window_1 = require("../../../ssr-window/window.js");
|
|
5
5
|
function Resize(_a) {
|
|
6
6
|
var swiper = _a.swiper, on = _a.on, emit = _a.emit;
|
|
7
7
|
var window = (0, window_1.getWindow)();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import slideTo from './slideTo.js';
|
|
2
|
+
import slideToLoop from './slideToLoop.js';
|
|
3
|
+
import slideNext from './slideNext.js';
|
|
4
|
+
import slidePrev from './slidePrev.js';
|
|
5
|
+
import slideReset from './slideReset.js';
|
|
6
|
+
import slideToClosest from './slideToClosest.js';
|
|
7
|
+
import slideToClickedSlide from './slideToClickedSlide.js';
|
|
8
|
+
declare const _default: {
|
|
9
|
+
slideTo: typeof slideTo;
|
|
10
|
+
slideToLoop: typeof slideToLoop;
|
|
11
|
+
slideNext: typeof slideNext;
|
|
12
|
+
slidePrev: typeof slidePrev;
|
|
13
|
+
slideReset: typeof slideReset;
|
|
14
|
+
slideToClosest: typeof slideToClosest;
|
|
15
|
+
slideToClickedSlide: typeof slideToClickedSlide;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var slideTo_1 = __importDefault(require("./slideTo.js"));
|
|
7
|
+
var slideToLoop_1 = __importDefault(require("./slideToLoop.js"));
|
|
8
|
+
var slideNext_1 = __importDefault(require("./slideNext.js"));
|
|
9
|
+
var slidePrev_1 = __importDefault(require("./slidePrev.js"));
|
|
10
|
+
var slideReset_1 = __importDefault(require("./slideReset.js"));
|
|
11
|
+
var slideToClosest_1 = __importDefault(require("./slideToClosest.js"));
|
|
12
|
+
var slideToClickedSlide_1 = __importDefault(require("./slideToClickedSlide.js"));
|
|
13
|
+
exports.default = {
|
|
14
|
+
slideTo: slideTo_1.default,
|
|
15
|
+
slideToLoop: slideToLoop_1.default,
|
|
16
|
+
slideNext: slideNext_1.default,
|
|
17
|
+
slidePrev: slidePrev_1.default,
|
|
18
|
+
slideReset: slideReset_1.default,
|
|
19
|
+
slideToClosest: slideToClosest_1.default,
|
|
20
|
+
slideToClickedSlide: slideToClickedSlide_1.default,
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var utils_1 = require("../../shared/utils.js");
|
|
4
|
+
function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
5
|
+
var _a;
|
|
6
|
+
if (index === void 0) { index = 0; }
|
|
7
|
+
if (runCallbacks === void 0) { runCallbacks = true; }
|
|
8
|
+
if (typeof index === 'string') {
|
|
9
|
+
index = parseInt(index, 10);
|
|
10
|
+
}
|
|
11
|
+
var swiper = this;
|
|
12
|
+
var slideIndex = index;
|
|
13
|
+
if (slideIndex < 0)
|
|
14
|
+
slideIndex = 0;
|
|
15
|
+
var params = swiper.params, snapGrid = swiper.snapGrid, slidesGrid = swiper.slidesGrid, previousIndex = swiper.previousIndex, activeIndex = swiper.activeIndex, rtl = swiper.rtlTranslate, wrapperEl = swiper.wrapperEl, enabled = swiper.enabled;
|
|
16
|
+
if ((!enabled && !internal && !initial) ||
|
|
17
|
+
swiper.destroyed ||
|
|
18
|
+
(swiper.animating && params.preventInteractionOnTransition)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (typeof speed === 'undefined') {
|
|
22
|
+
speed = swiper.params.speed;
|
|
23
|
+
}
|
|
24
|
+
var skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
|
25
|
+
var snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
|
26
|
+
if (snapIndex >= snapGrid.length)
|
|
27
|
+
snapIndex = snapGrid.length - 1;
|
|
28
|
+
var translate = -snapGrid[snapIndex];
|
|
29
|
+
// Normalize slideIndex
|
|
30
|
+
if (params.normalizeSlideIndex) {
|
|
31
|
+
for (var i = 0; i < slidesGrid.length; i += 1) {
|
|
32
|
+
var normalizedTranslate = -Math.floor(translate * 100);
|
|
33
|
+
var normalizedGrid = Math.floor(slidesGrid[i] * 100);
|
|
34
|
+
var normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);
|
|
35
|
+
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
|
36
|
+
if (normalizedTranslate >= normalizedGrid &&
|
|
37
|
+
normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {
|
|
38
|
+
slideIndex = i;
|
|
39
|
+
}
|
|
40
|
+
else if (normalizedTranslate >= normalizedGrid &&
|
|
41
|
+
normalizedTranslate < normalizedGridNext) {
|
|
42
|
+
slideIndex = i + 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (normalizedTranslate >= normalizedGrid) {
|
|
46
|
+
slideIndex = i;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Directions locks
|
|
51
|
+
if (swiper.initialized && slideIndex !== activeIndex) {
|
|
52
|
+
if (!swiper.allowSlideNext &&
|
|
53
|
+
(rtl
|
|
54
|
+
? translate > swiper.translate && translate > swiper.minTranslate()
|
|
55
|
+
: translate < swiper.translate && translate < swiper.minTranslate())) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
if (!swiper.allowSlidePrev &&
|
|
59
|
+
translate > swiper.translate &&
|
|
60
|
+
translate > swiper.maxTranslate()) {
|
|
61
|
+
if ((activeIndex || 0) !== slideIndex) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (slideIndex !== (previousIndex || 0) && runCallbacks) {
|
|
67
|
+
swiper.emit('beforeSlideChangeStart');
|
|
68
|
+
}
|
|
69
|
+
// Update progress
|
|
70
|
+
swiper.updateProgress(translate);
|
|
71
|
+
var direction;
|
|
72
|
+
if (slideIndex > activeIndex)
|
|
73
|
+
direction = 'next';
|
|
74
|
+
else if (slideIndex < activeIndex)
|
|
75
|
+
direction = 'prev';
|
|
76
|
+
else
|
|
77
|
+
direction = 'reset';
|
|
78
|
+
// Update Index
|
|
79
|
+
if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
|
|
80
|
+
swiper.updateActiveIndex(slideIndex);
|
|
81
|
+
// Update Height
|
|
82
|
+
if (params.autoHeight) {
|
|
83
|
+
swiper.updateAutoHeight();
|
|
84
|
+
}
|
|
85
|
+
swiper.updateSlidesClasses();
|
|
86
|
+
if (params.effect !== 'slide') {
|
|
87
|
+
swiper.setTranslate(translate);
|
|
88
|
+
}
|
|
89
|
+
if (direction !== 'reset') {
|
|
90
|
+
swiper.transitionStart(runCallbacks, direction);
|
|
91
|
+
swiper.transitionEnd(runCallbacks, direction);
|
|
92
|
+
}
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
if (params.cssMode) {
|
|
96
|
+
var isH_1 = swiper.isHorizontal();
|
|
97
|
+
var t_1 = rtl ? translate : -translate;
|
|
98
|
+
if (speed === 0) {
|
|
99
|
+
var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
100
|
+
if (isVirtual) {
|
|
101
|
+
swiper.wrapperEl.style.scrollSnapType = 'none';
|
|
102
|
+
swiper._immediateVirtual = true;
|
|
103
|
+
}
|
|
104
|
+
if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {
|
|
105
|
+
swiper._cssModeVirtualInitialSet = true;
|
|
106
|
+
requestAnimationFrame(function () {
|
|
107
|
+
wrapperEl[isH_1 ? 'scrollLeft' : 'scrollTop'] = t_1;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
wrapperEl[isH_1 ? 'scrollLeft' : 'scrollTop'] = t_1;
|
|
112
|
+
}
|
|
113
|
+
if (isVirtual) {
|
|
114
|
+
requestAnimationFrame(function () {
|
|
115
|
+
swiper.wrapperEl.style.scrollSnapType = '';
|
|
116
|
+
swiper._immediateVirtual = false;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
if (!swiper.support.smoothScroll) {
|
|
122
|
+
(0, utils_1.animateCSSModeScroll)({ swiper: swiper, targetPosition: t_1, side: isH_1 ? 'left' : 'top' });
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
wrapperEl.scrollTo((_a = {},
|
|
126
|
+
_a[isH_1 ? 'left' : 'top'] = t_1,
|
|
127
|
+
_a.behavior = 'smooth',
|
|
128
|
+
_a));
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
swiper.setTransition(speed);
|
|
133
|
+
swiper.setTranslate(translate);
|
|
134
|
+
swiper.updateActiveIndex(slideIndex);
|
|
135
|
+
swiper.updateSlidesClasses();
|
|
136
|
+
swiper.emit('beforeTransitionStart', speed, internal);
|
|
137
|
+
swiper.transitionStart(runCallbacks, direction);
|
|
138
|
+
if (speed === 0) {
|
|
139
|
+
swiper.transitionEnd(runCallbacks, direction);
|
|
140
|
+
}
|
|
141
|
+
else if (!swiper.animating) {
|
|
142
|
+
swiper.animating = true;
|
|
143
|
+
if (!swiper.onSlideToWrapperTransitionEnd) {
|
|
144
|
+
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
|
145
|
+
if (!swiper || swiper.destroyed)
|
|
146
|
+
return;
|
|
147
|
+
if (e.target !== this)
|
|
148
|
+
return;
|
|
149
|
+
swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
150
|
+
swiper.onSlideToWrapperTransitionEnd = null;
|
|
151
|
+
delete swiper.onSlideToWrapperTransitionEnd;
|
|
152
|
+
swiper.transitionEnd(runCallbacks, direction);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
exports.default = slideTo;
|
|
160
|
+
//# sourceMappingURL=slideTo.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var utils_1 = require("../../shared/utils.js");
|
|
4
|
+
function slideToClickedSlide() {
|
|
5
|
+
var swiper = this;
|
|
6
|
+
if (swiper.destroyed)
|
|
7
|
+
return;
|
|
8
|
+
var params = swiper.params, slidesEl = swiper.slidesEl;
|
|
9
|
+
var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
|
|
10
|
+
var slideToIndex = swiper.clickedIndex;
|
|
11
|
+
var realIndex;
|
|
12
|
+
var slideSelector = swiper.isElement ? "swiper-slide" : ".".concat(params.slideClass);
|
|
13
|
+
if (params.loop) {
|
|
14
|
+
if (swiper.animating)
|
|
15
|
+
return;
|
|
16
|
+
realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);
|
|
17
|
+
if (params.centeredSlides) {
|
|
18
|
+
if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 ||
|
|
19
|
+
slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {
|
|
20
|
+
swiper.loopFix();
|
|
21
|
+
slideToIndex = swiper.getSlideIndex((0, utils_1.elementChildren)(slidesEl, "".concat(slideSelector, "[data-swiper-slide-index=\"").concat(realIndex, "\"]"))[0]);
|
|
22
|
+
(0, utils_1.nextTick)(function () {
|
|
23
|
+
swiper.slideTo(slideToIndex);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
swiper.slideTo(slideToIndex);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else if (slideToIndex > swiper.slides.length - slidesPerView) {
|
|
31
|
+
swiper.loopFix();
|
|
32
|
+
slideToIndex = swiper.getSlideIndex((0, utils_1.elementChildren)(slidesEl, "".concat(slideSelector, "[data-swiper-slide-index=\"").concat(realIndex, "\"]"))[0]);
|
|
33
|
+
(0, utils_1.nextTick)(function () {
|
|
34
|
+
swiper.slideTo(slideToIndex);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
swiper.slideTo(slideToIndex);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
swiper.slideTo(slideToIndex);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = slideToClickedSlide;
|
|
46
|
+
//# sourceMappingURL=slideToClickedSlide.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import setTransition from './setTransition.js';
|
|
2
|
+
import transitionStart from './transitionStart.js';
|
|
3
|
+
import transitionEnd from './transitionEnd.js';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
setTransition: typeof setTransition;
|
|
6
|
+
transitionStart: typeof transitionStart;
|
|
7
|
+
transitionEnd: typeof transitionEnd;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var setTransition_1 = __importDefault(require("./setTransition.js"));
|
|
7
|
+
var transitionStart_1 = __importDefault(require("./transitionStart.js"));
|
|
8
|
+
var transitionEnd_1 = __importDefault(require("./transitionEnd.js"));
|
|
9
|
+
exports.default = {
|
|
10
|
+
setTransition: setTransition_1.default,
|
|
11
|
+
transitionStart: transitionStart_1.default,
|
|
12
|
+
transitionEnd: transitionEnd_1.default,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var transitionEmit_1 = __importDefault(require("./transitionEmit.js"));
|
|
7
|
+
function transitionEnd(runCallbacks, direction) {
|
|
8
|
+
if (runCallbacks === void 0) { runCallbacks = true; }
|
|
9
|
+
var swiper = this;
|
|
10
|
+
var params = swiper.params;
|
|
11
|
+
swiper.animating = false;
|
|
12
|
+
if (params.cssMode)
|
|
13
|
+
return;
|
|
14
|
+
swiper.setTransition(0);
|
|
15
|
+
(0, transitionEmit_1.default)({ swiper: swiper, runCallbacks: runCallbacks, direction: direction, step: 'End' });
|
|
16
|
+
}
|
|
17
|
+
exports.default = transitionEnd;
|
|
18
|
+
//# sourceMappingURL=transitionEnd.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var transitionEmit_1 = __importDefault(require("./transitionEmit.js"));
|
|
7
|
+
function transitionStart(runCallbacks, direction) {
|
|
8
|
+
if (runCallbacks === void 0) { runCallbacks = true; }
|
|
9
|
+
var swiper = this;
|
|
10
|
+
var params = swiper.params;
|
|
11
|
+
if (params.cssMode)
|
|
12
|
+
return;
|
|
13
|
+
if (params.autoHeight) {
|
|
14
|
+
swiper.updateAutoHeight();
|
|
15
|
+
}
|
|
16
|
+
(0, transitionEmit_1.default)({ swiper: swiper, runCallbacks: runCallbacks, direction: direction, step: 'Start' });
|
|
17
|
+
}
|
|
18
|
+
exports.default = transitionStart;
|
|
19
|
+
//# sourceMappingURL=transitionStart.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var utils_1 = require("../../shared/utils.js");
|
|
4
|
+
function getSwiperTranslate(axis) {
|
|
5
|
+
if (axis === void 0) { axis = this.isHorizontal() ? 'x' : 'y'; }
|
|
6
|
+
var swiper = this;
|
|
7
|
+
var params = swiper.params, rtl = swiper.rtlTranslate, translate = swiper.translate, wrapperEl = swiper.wrapperEl;
|
|
8
|
+
if (params.virtualTranslate) {
|
|
9
|
+
return rtl ? -translate : translate;
|
|
10
|
+
}
|
|
11
|
+
if (params.cssMode) {
|
|
12
|
+
return translate;
|
|
13
|
+
}
|
|
14
|
+
var currentTranslate = (0, utils_1.getTranslate)(wrapperEl, axis);
|
|
15
|
+
currentTranslate += swiper.cssOverflowAdjustment();
|
|
16
|
+
if (rtl)
|
|
17
|
+
currentTranslate = -currentTranslate;
|
|
18
|
+
return currentTranslate || 0;
|
|
19
|
+
}
|
|
20
|
+
exports.default = getSwiperTranslate;
|
|
21
|
+
//# sourceMappingURL=getTranslate.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import getTranslate from './getTranslate.js';
|
|
2
|
+
import setTranslate from './setTranslate.js';
|
|
3
|
+
import minTranslate from './minTranslate.js';
|
|
4
|
+
import maxTranslate from './maxTranslate.js';
|
|
5
|
+
import translateTo from './translateTo.js';
|
|
6
|
+
declare const _default: {
|
|
7
|
+
getTranslate: typeof getTranslate;
|
|
8
|
+
setTranslate: typeof setTranslate;
|
|
9
|
+
minTranslate: typeof minTranslate;
|
|
10
|
+
maxTranslate: typeof maxTranslate;
|
|
11
|
+
translateTo: typeof translateTo;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var getTranslate_1 = __importDefault(require("./getTranslate.js"));
|
|
7
|
+
var setTranslate_1 = __importDefault(require("./setTranslate.js"));
|
|
8
|
+
var minTranslate_1 = __importDefault(require("./minTranslate.js"));
|
|
9
|
+
var maxTranslate_1 = __importDefault(require("./maxTranslate.js"));
|
|
10
|
+
var translateTo_1 = __importDefault(require("./translateTo.js"));
|
|
11
|
+
exports.default = {
|
|
12
|
+
getTranslate: getTranslate_1.default,
|
|
13
|
+
setTranslate: setTranslate_1.default,
|
|
14
|
+
minTranslate: minTranslate_1.default,
|
|
15
|
+
maxTranslate: maxTranslate_1.default,
|
|
16
|
+
translateTo: translateTo_1.default,
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.js.map
|