infinity-forge 0.54.3 → 0.54.5
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/ui/components/carousel/swiper/components-shared/get-changed-params.d.ts +2 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-changed-params.js +51 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-changed-params.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-element-params.d.ts +5 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-element-params.js +148 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-element-params.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-params.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-params.js +61 -0
- package/dist/ui/components/carousel/swiper/components-shared/get-params.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/mount-swiper.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/components-shared/mount-swiper.js +24 -0
- package/dist/ui/components/carousel/swiper/components-shared/mount-swiper.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/params-list.d.ts +2 -0
- package/dist/ui/components/carousel/swiper/components-shared/params-list.js +125 -0
- package/dist/ui/components/carousel/swiper/components-shared/params-list.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-on-virtual-data.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-on-virtual-data.js +18 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-on-virtual-data.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-swiper.d.ts +11 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-swiper.js +208 -0
- package/dist/ui/components/carousel/swiper/components-shared/update-swiper.js.map +1 -0
- package/dist/ui/components/carousel/swiper/components-shared/utils.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/components-shared/utils.js +77 -0
- package/dist/ui/components/carousel/swiper/components-shared/utils.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/getBreakpoint.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/getBreakpoint.js +35 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/getBreakpoint.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/index.d.ts +7 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/index.js +9 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/setBreakpoint.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/setBreakpoint.js +94 -0
- package/dist/ui/components/carousel/swiper/core/breakpoints/setBreakpoint.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/check-overflow/index.d.ts +5 -0
- package/dist/ui/components/carousel/swiper/core/check-overflow/index.js +31 -0
- package/dist/ui/components/carousel/swiper/core/check-overflow/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/classes/addClasses.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/classes/addClasses.js +43 -0
- package/dist/ui/components/carousel/swiper/core/classes/addClasses.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/classes/index.d.ts +7 -0
- package/dist/ui/components/carousel/swiper/core/classes/index.js +9 -0
- package/dist/ui/components/carousel/swiper/core/classes/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/classes/removeClasses.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/classes/removeClasses.js +13 -0
- package/dist/ui/components/carousel/swiper/core/classes/removeClasses.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/core.js +12 -12
- package/dist/ui/components/carousel/swiper/core/events/index.d.ts +7 -0
- package/dist/ui/components/carousel/swiper/core/events/index.js +77 -0
- package/dist/ui/components/carousel/swiper/core/events/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onClick.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onClick.js +17 -0
- package/dist/ui/components/carousel/swiper/core/events/onClick.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onDocumentTouchStart.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onDocumentTouchStart.js +13 -0
- package/dist/ui/components/carousel/swiper/core/events/onDocumentTouchStart.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onLoad.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onLoad.js +14 -0
- package/dist/ui/components/carousel/swiper/core/events/onLoad.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onResize.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onResize.js +53 -0
- package/dist/ui/components/carousel/swiper/core/events/onResize.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onScroll.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onScroll.js +34 -0
- package/dist/ui/components/carousel/swiper/core/events/onScroll.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchEnd.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchEnd.js +194 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchEnd.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchMove.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchMove.js +314 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchMove.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchStart.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchStart.js +153 -0
- package/dist/ui/components/carousel/swiper/core/events/onTouchStart.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/index.d.ts +7 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/index.js +12 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/setGrabCursor.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/setGrabCursor.js +22 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/setGrabCursor.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/unsetGrabCursor.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/unsetGrabCursor.js +19 -0
- package/dist/ui/components/carousel/swiper/core/grab-cursor/unsetGrabCursor.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/index.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/core/loop/index.js +14 -0
- package/dist/ui/components/carousel/swiper/core/loop/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopCreate.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopCreate.js +57 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopCreate.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopDestroy.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopDestroy.js +26 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopDestroy.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopFix.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopFix.js +230 -0
- package/dist/ui/components/carousel/swiper/core/loop/loopFix.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/modules/observer/observer.d.ts +6 -0
- package/dist/ui/components/carousel/swiper/core/modules/observer/observer.js +71 -0
- package/dist/ui/components/carousel/swiper/core/modules/observer/observer.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/modules/resize/resize.d.ts +5 -0
- package/dist/ui/components/carousel/swiper/core/modules/resize/resize.js +71 -0
- package/dist/ui/components/carousel/swiper/core/modules/resize/resize.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/index.d.ts +17 -0
- package/dist/ui/components/carousel/swiper/core/slide/index.js +22 -0
- package/dist/ui/components/carousel/swiper/core/slide/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideNext.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideNext.js +38 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideNext.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slidePrev.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slidePrev.js +69 -0
- package/dist/ui/components/carousel/swiper/core/slide/slidePrev.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideReset.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideReset.js +15 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideReset.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideTo.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideTo.js +160 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideTo.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClickedSlide.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClickedSlide.js +46 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClickedSlide.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClosest.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClosest.js +40 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToClosest.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToLoop.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToLoop.js +84 -0
- package/dist/ui/components/carousel/swiper/core/slide/slideToLoop.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/index.d.ts +9 -0
- package/dist/ui/components/carousel/swiper/core/transition/index.js +14 -0
- package/dist/ui/components/carousel/swiper/core/transition/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/setTransition.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/setTransition.js +12 -0
- package/dist/ui/components/carousel/swiper/core/transition/setTransition.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEmit.d.ts +6 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEmit.js +31 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEmit.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEnd.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEnd.js +18 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionEnd.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionStart.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionStart.js +19 -0
- package/dist/ui/components/carousel/swiper/core/transition/transitionStart.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/getTranslate.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/getTranslate.js +21 -0
- package/dist/ui/components/carousel/swiper/core/translate/getTranslate.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/index.d.ts +13 -0
- package/dist/ui/components/carousel/swiper/core/translate/index.js +18 -0
- package/dist/ui/components/carousel/swiper/core/translate/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/maxTranslate.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/maxTranslate.js +7 -0
- package/dist/ui/components/carousel/swiper/core/translate/maxTranslate.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/minTranslate.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/minTranslate.js +7 -0
- package/dist/ui/components/carousel/swiper/core/translate/minTranslate.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/setTranslate.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/setTranslate.js +48 -0
- package/dist/ui/components/carousel/swiper/core/translate/setTranslate.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/translateTo.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/translate/translateTo.js +81 -0
- package/dist/ui/components/carousel/swiper/core/translate/translateTo.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/index.d.ts +21 -0
- package/dist/ui/components/carousel/swiper/core/update/index.js +26 -0
- package/dist/ui/components/carousel/swiper/core/update/index.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateActiveIndex.d.ts +2 -0
- package/dist/ui/components/carousel/swiper/core/update/updateActiveIndex.js +125 -0
- package/dist/ui/components/carousel/swiper/core/update/updateActiveIndex.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateAutoHeight.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateAutoHeight.js +52 -0
- package/dist/ui/components/carousel/swiper/core/update/updateAutoHeight.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateClickedSlide.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateClickedSlide.js +55 -0
- package/dist/ui/components/carousel/swiper/core/update/updateClickedSlide.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateProgress.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateProgress.js +67 -0
- package/dist/ui/components/carousel/swiper/core/update/updateProgress.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSize.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSize.js +45 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSize.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlides.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlides.js +306 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlides.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesClasses.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesClasses.js +69 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesClasses.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesOffset.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesOffset.js +20 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesOffset.js.map +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesProgress.d.ts +1 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesProgress.js +62 -0
- package/dist/ui/components/carousel/swiper/core/update/updateSlidesProgress.js.map +1 -0
- package/dist/ui/components/carousel/swiper/react/swiper-slide.js +1 -1
- package/dist/ui/components/carousel/swiper/react/swiper.js +6 -6
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"getTranslate.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/getTranslate.tsx"],"names":[],"mappings":";;AAAA,4CAAkD;AAElD,SAAwB,kBAAkB,CAAC,IAAsC;IAAtC,qBAAA,EAAA,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;IAC/E,IAAM,MAAM,GAAG,IAAI,CAAC;IAEZ,IAAA,MAAM,GAA8C,MAAM,OAApD,EAAgB,GAAG,GAA2B,MAAM,aAAjC,EAAE,SAAS,GAAgB,MAAM,UAAtB,EAAE,SAAS,GAAK,MAAM,UAAX,CAAY;IAEnE,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACtC,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,gBAAgB,GAAG,IAAA,oBAAY,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACrD,gBAAgB,IAAI,MAAM,CAAC,qBAAqB,EAAE,CAAC;IACnD,IAAI,GAAG;QAAE,gBAAgB,GAAG,CAAC,gBAAgB,CAAC;IAE9C,OAAO,gBAAgB,IAAI,CAAC,CAAC;AAC/B,CAAC;AAjBD,qCAiBC"}
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/index.tsx"],"names":[],"mappings":";;;;;AAAA,gEAA0C;AAC1C,gEAA0C;AAC1C,gEAA0C;AAC1C,gEAA0C;AAC1C,8DAAwC;AAExC,kBAAe;IACb,YAAY,wBAAA;IACZ,YAAY,wBAAA;IACZ,YAAY,wBAAA;IACZ,YAAY,wBAAA;IACZ,WAAW,uBAAA;CACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function maxTranslate(): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxTranslate.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/maxTranslate.tsx"],"names":[],"mappings":";;AAAA,SAAwB,YAAY;IAClC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC;AAFD,+BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function minTranslate(): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minTranslate.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/minTranslate.tsx"],"names":[],"mappings":";;AAAA,SAAwB,YAAY;IAClC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAFD,+BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function setTranslate(translate: any, byController: any): void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function setTranslate(translate, byController) {
|
|
4
|
+
var swiper = this;
|
|
5
|
+
var rtl = swiper.rtlTranslate, params = swiper.params, wrapperEl = swiper.wrapperEl, progress = swiper.progress;
|
|
6
|
+
var x = 0;
|
|
7
|
+
var y = 0;
|
|
8
|
+
var z = 0;
|
|
9
|
+
if (swiper.isHorizontal()) {
|
|
10
|
+
x = rtl ? -translate : translate;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
y = translate;
|
|
14
|
+
}
|
|
15
|
+
if (params.roundLengths) {
|
|
16
|
+
x = Math.floor(x);
|
|
17
|
+
y = Math.floor(y);
|
|
18
|
+
}
|
|
19
|
+
swiper.previousTranslate = swiper.translate;
|
|
20
|
+
swiper.translate = swiper.isHorizontal() ? x : y;
|
|
21
|
+
if (params.cssMode) {
|
|
22
|
+
wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;
|
|
23
|
+
}
|
|
24
|
+
else if (!params.virtualTranslate) {
|
|
25
|
+
if (swiper.isHorizontal()) {
|
|
26
|
+
x -= swiper.cssOverflowAdjustment();
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
y -= swiper.cssOverflowAdjustment();
|
|
30
|
+
}
|
|
31
|
+
wrapperEl.style.transform = "translate3d(".concat(x, "px, ").concat(y, "px, ").concat(z, "px)");
|
|
32
|
+
}
|
|
33
|
+
// Check if we need to update progress
|
|
34
|
+
var newProgress;
|
|
35
|
+
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
|
36
|
+
if (translatesDiff === 0) {
|
|
37
|
+
newProgress = 0;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
newProgress = (translate - swiper.minTranslate()) / translatesDiff;
|
|
41
|
+
}
|
|
42
|
+
if (newProgress !== progress) {
|
|
43
|
+
swiper.updateProgress(translate);
|
|
44
|
+
}
|
|
45
|
+
swiper.emit('setTranslate', swiper.translate, byController);
|
|
46
|
+
}
|
|
47
|
+
exports.default = setTranslate;
|
|
48
|
+
//# sourceMappingURL=setTranslate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setTranslate.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/setTranslate.tsx"],"names":[],"mappings":";;AAAA,SAAwB,YAAY,CAAC,SAAS,EAAE,YAAY;IAC1D,IAAM,MAAM,GAAG,IAAI,CAAC;IACZ,IAAc,GAAG,GAAkC,MAAM,aAAxC,EAAE,MAAM,GAA0B,MAAM,OAAhC,EAAE,SAAS,GAAe,MAAM,UAArB,EAAE,QAAQ,GAAK,MAAM,SAAX,CAAY;IAClE,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAM,CAAC,GAAG,CAAC,CAAC;IAEZ,IAAI,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC;QAC1B,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,CAAC,GAAG,SAAS,CAAC;IAChB,CAAC;IAED,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAA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AAM,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC9D,CAAC;AA7CD,+BA6CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function translateTo(translate: number, speed: any, runCallbacks: boolean, translateBounds: boolean, internal: any): boolean;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var utils_1 = require("../../shared/utils.js");
|
|
4
|
+
function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
|
|
5
|
+
var _a;
|
|
6
|
+
if (translate === void 0) { translate = 0; }
|
|
7
|
+
if (speed === void 0) { speed = this.params.speed; }
|
|
8
|
+
if (runCallbacks === void 0) { runCallbacks = true; }
|
|
9
|
+
if (translateBounds === void 0) { translateBounds = true; }
|
|
10
|
+
var swiper = this;
|
|
11
|
+
var params = swiper.params, wrapperEl = swiper.wrapperEl;
|
|
12
|
+
if (swiper.animating && params.preventInteractionOnTransition) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
var minTranslate = swiper.minTranslate();
|
|
16
|
+
var maxTranslate = swiper.maxTranslate();
|
|
17
|
+
var newTranslate;
|
|
18
|
+
if (translateBounds && translate > minTranslate)
|
|
19
|
+
newTranslate = minTranslate;
|
|
20
|
+
else if (translateBounds && translate < maxTranslate)
|
|
21
|
+
newTranslate = maxTranslate;
|
|
22
|
+
else
|
|
23
|
+
newTranslate = translate;
|
|
24
|
+
// Update progress
|
|
25
|
+
swiper.updateProgress(newTranslate);
|
|
26
|
+
if (params.cssMode) {
|
|
27
|
+
var isH = swiper.isHorizontal();
|
|
28
|
+
if (speed === 0) {
|
|
29
|
+
wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (!swiper.support.smoothScroll) {
|
|
33
|
+
(0, utils_1.animateCSSModeScroll)({ swiper: swiper, targetPosition: -newTranslate, side: isH ? 'left' : 'top' });
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
wrapperEl.scrollTo((_a = {},
|
|
37
|
+
_a[isH ? 'left' : 'top'] = -newTranslate,
|
|
38
|
+
_a.behavior = 'smooth',
|
|
39
|
+
_a));
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if (speed === 0) {
|
|
44
|
+
swiper.setTransition(0);
|
|
45
|
+
swiper.setTranslate(newTranslate);
|
|
46
|
+
if (runCallbacks) {
|
|
47
|
+
swiper.emit('beforeTransitionStart', speed, internal);
|
|
48
|
+
swiper.emit('transitionEnd');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
swiper.setTransition(speed);
|
|
53
|
+
swiper.setTranslate(newTranslate);
|
|
54
|
+
if (runCallbacks) {
|
|
55
|
+
swiper.emit('beforeTransitionStart', speed, internal);
|
|
56
|
+
swiper.emit('transitionStart');
|
|
57
|
+
}
|
|
58
|
+
if (!swiper.animating) {
|
|
59
|
+
swiper.animating = true;
|
|
60
|
+
if (!swiper.onTranslateToWrapperTransitionEnd) {
|
|
61
|
+
swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
|
|
62
|
+
if (!swiper || swiper.destroyed)
|
|
63
|
+
return;
|
|
64
|
+
if (e.target !== this)
|
|
65
|
+
return;
|
|
66
|
+
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
67
|
+
swiper.onTranslateToWrapperTransitionEnd = null;
|
|
68
|
+
delete swiper.onTranslateToWrapperTransitionEnd;
|
|
69
|
+
swiper.animating = false;
|
|
70
|
+
if (runCallbacks) {
|
|
71
|
+
swiper.emit('transitionEnd');
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
exports.default = translateTo;
|
|
81
|
+
//# sourceMappingURL=translateTo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translateTo.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/translate/translateTo.tsx"],"names":[],"mappings":";;AAAA,4CAA0D;AAE1D,SAAwB,WAAW,CACjC,SAAa,EACb,KAAyB,EACzB,YAAmB,EACnB,eAAsB,EACtB,QAAQ;;IAJR,0BAAA,EAAA,aAAa;IACb,sBAAA,EAAA,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK;IACzB,6BAAA,EAAA,mBAAmB;IACnB,gCAAA,EAAA,sBAAsB;IAGtB,IAAM,MAAM,GAAG,IAAI,CAAC;IAEZ,IAAA,MAAM,GAAgB,MAAM,OAAtB,EAAE,SAAS,GAAK,MAAM,UAAX,CAAY;IAErC,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,8BAA8B,EAAE,CAAC;QAC9D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IAC3C,IAAI,YAAY,CAAC;IACjB,IAAI,eAAe,IAAI,SAAS,GAAG,YAAY;QAAE,YAAY,GAAG,YAAY,CAAC;SACxE,IAAI,eAAe,IAAI,SAAS,GAAG,YAAY;QAAE,YAAY,GAAG,YAAY,CAAC;;QAC7E,YAAY,GAAG,SAAS,CAAC;IAE9B,kBAAkB;IAClB,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAEpC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,IAAM,GAAG,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;QAClC,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,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AC,iCAAiC,EAAE,CAAC;gBAC9C,MAAM,CAAC,iCAAiC,GAAG,SAAS,aAAa,CAAC,CAAC;oBACjE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS;wBAAE,OAAO;oBACxC,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;wBAAE,OAAO;oBAC9B,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAClC,eAAe,EACf,MAAM,CAAC,iCAAiC,CACzC,CAAC;oBACF,MAAM,CAAC,iCAAiC,GAAG,IAAI,CAAC;oBAChD,OAAO,MAAM,CAAC,iCAAiC,CAAC;oBAChD,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC;oBACzB,IAAI,YAAY,EAAE,CAAC;wBACjB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBAC/B,CAAC;gBACH,CAAC,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,iCAAiC,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AA/ED,8BA+EC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import updateSize from './updateSize.js';
|
|
2
|
+
import updateSlides from './updateSlides.js';
|
|
3
|
+
import updateAutoHeight from './updateAutoHeight.js';
|
|
4
|
+
import updateSlidesOffset from './updateSlidesOffset.js';
|
|
5
|
+
import updateSlidesProgress from './updateSlidesProgress.js';
|
|
6
|
+
import updateProgress from './updateProgress.js';
|
|
7
|
+
import updateSlidesClasses from './updateSlidesClasses.js';
|
|
8
|
+
import updateActiveIndex from './updateActiveIndex.js';
|
|
9
|
+
import updateClickedSlide from './updateClickedSlide.js';
|
|
10
|
+
declare const _default: {
|
|
11
|
+
updateSize: typeof updateSize;
|
|
12
|
+
updateSlides: typeof updateSlides;
|
|
13
|
+
updateAutoHeight: typeof updateAutoHeight;
|
|
14
|
+
updateSlidesOffset: typeof updateSlidesOffset;
|
|
15
|
+
updateSlidesProgress: typeof updateSlidesProgress;
|
|
16
|
+
updateProgress: typeof updateProgress;
|
|
17
|
+
updateSlidesClasses: typeof updateSlidesClasses;
|
|
18
|
+
updateActiveIndex: typeof updateActiveIndex;
|
|
19
|
+
updateClickedSlide: typeof updateClickedSlide;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 updateSize_1 = __importDefault(require("./updateSize.js"));
|
|
7
|
+
var updateSlides_1 = __importDefault(require("./updateSlides.js"));
|
|
8
|
+
var updateAutoHeight_1 = __importDefault(require("./updateAutoHeight.js"));
|
|
9
|
+
var updateSlidesOffset_1 = __importDefault(require("./updateSlidesOffset.js"));
|
|
10
|
+
var updateSlidesProgress_1 = __importDefault(require("./updateSlidesProgress.js"));
|
|
11
|
+
var updateProgress_1 = __importDefault(require("./updateProgress.js"));
|
|
12
|
+
var updateSlidesClasses_1 = __importDefault(require("./updateSlidesClasses.js"));
|
|
13
|
+
var updateActiveIndex_1 = __importDefault(require("./updateActiveIndex.js"));
|
|
14
|
+
var updateClickedSlide_1 = __importDefault(require("./updateClickedSlide.js"));
|
|
15
|
+
exports.default = {
|
|
16
|
+
updateSize: updateSize_1.default,
|
|
17
|
+
updateSlides: updateSlides_1.default,
|
|
18
|
+
updateAutoHeight: updateAutoHeight_1.default,
|
|
19
|
+
updateSlidesOffset: updateSlidesOffset_1.default,
|
|
20
|
+
updateSlidesProgress: updateSlidesProgress_1.default,
|
|
21
|
+
updateProgress: updateProgress_1.default,
|
|
22
|
+
updateSlidesClasses: updateSlidesClasses_1.default,
|
|
23
|
+
updateActiveIndex: updateActiveIndex_1.default,
|
|
24
|
+
updateClickedSlide: updateClickedSlide_1.default,
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/update/index.tsx"],"names":[],"mappings":";;;;;AAAA,4DAAsC;AACtC,gEAA0C;AAC1C,wEAAkD;AAClD,4EAAsD;AACtD,gFAA0D;AAC1D,oEAA8C;AAC9C,8EAAwD;AACxD,0EAAoD;AACpD,4EAAsD;AAEtD,kBAAe;IACb,UAAU,sBAAA;IACV,YAAY,wBAAA;IACZ,gBAAgB,4BAAA;IAChB,kBAAkB,8BAAA;IAClB,oBAAoB,gCAAA;IACpB,cAAc,0BAAA;IACd,mBAAmB,+BAAA;IACnB,iBAAiB,6BAAA;IACjB,kBAAkB,8BAAA;CACnB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getActiveIndexByTranslate = void 0;
|
|
4
|
+
var process_lazy_preloader_1 = require("../../shared/process-lazy-preloader.js");
|
|
5
|
+
function getActiveIndexByTranslate(swiper) {
|
|
6
|
+
var slidesGrid = swiper.slidesGrid, params = swiper.params;
|
|
7
|
+
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
|
8
|
+
var activeIndex;
|
|
9
|
+
for (var i = 0; i < slidesGrid.length; i += 1) {
|
|
10
|
+
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
|
11
|
+
if (translate >= slidesGrid[i] &&
|
|
12
|
+
translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {
|
|
13
|
+
activeIndex = i;
|
|
14
|
+
}
|
|
15
|
+
else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
|
|
16
|
+
activeIndex = i + 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
else if (translate >= slidesGrid[i]) {
|
|
20
|
+
activeIndex = i;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// Normalize slideIndex
|
|
24
|
+
if (params.normalizeSlideIndex) {
|
|
25
|
+
if (activeIndex < 0 || typeof activeIndex === 'undefined')
|
|
26
|
+
activeIndex = 0;
|
|
27
|
+
}
|
|
28
|
+
return activeIndex;
|
|
29
|
+
}
|
|
30
|
+
exports.getActiveIndexByTranslate = getActiveIndexByTranslate;
|
|
31
|
+
function updateActiveIndex(newActiveIndex) {
|
|
32
|
+
var swiper = this;
|
|
33
|
+
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
|
34
|
+
var snapGrid = swiper.snapGrid, params = swiper.params, previousIndex = swiper.activeIndex, previousRealIndex = swiper.realIndex, previousSnapIndex = swiper.snapIndex;
|
|
35
|
+
var activeIndex = newActiveIndex;
|
|
36
|
+
var snapIndex;
|
|
37
|
+
var getVirtualRealIndex = function (aIndex) {
|
|
38
|
+
var realIndex = aIndex - swiper.virtual.slidesBefore;
|
|
39
|
+
if (realIndex < 0) {
|
|
40
|
+
realIndex = swiper.virtual.slides.length + realIndex;
|
|
41
|
+
}
|
|
42
|
+
if (realIndex >= swiper.virtual.slides.length) {
|
|
43
|
+
realIndex -= swiper.virtual.slides.length;
|
|
44
|
+
}
|
|
45
|
+
return realIndex;
|
|
46
|
+
};
|
|
47
|
+
if (typeof activeIndex === 'undefined') {
|
|
48
|
+
activeIndex = getActiveIndexByTranslate(swiper);
|
|
49
|
+
}
|
|
50
|
+
if (snapGrid.indexOf(translate) >= 0) {
|
|
51
|
+
snapIndex = snapGrid.indexOf(translate);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
var skip = Math.min(params.slidesPerGroupSkip, activeIndex);
|
|
55
|
+
snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
|
|
56
|
+
}
|
|
57
|
+
if (snapIndex >= snapGrid.length)
|
|
58
|
+
snapIndex = snapGrid.length - 1;
|
|
59
|
+
if (activeIndex === previousIndex && !swiper.params.loop) {
|
|
60
|
+
if (snapIndex !== previousSnapIndex) {
|
|
61
|
+
swiper.snapIndex = snapIndex;
|
|
62
|
+
swiper.emit('snapIndexChange');
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (activeIndex === previousIndex &&
|
|
67
|
+
swiper.params.loop &&
|
|
68
|
+
swiper.virtual &&
|
|
69
|
+
swiper.params.virtual.enabled) {
|
|
70
|
+
swiper.realIndex = getVirtualRealIndex(activeIndex);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
var gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
|
|
74
|
+
var normalizeSlideIndexToColumn = function (index) {
|
|
75
|
+
if (!gridEnabled)
|
|
76
|
+
return index;
|
|
77
|
+
return Math.floor(index / params.grid.rows);
|
|
78
|
+
};
|
|
79
|
+
// Get real index
|
|
80
|
+
var realIndex;
|
|
81
|
+
if (swiper.virtual && params.virtual.enabled && params.loop) {
|
|
82
|
+
realIndex = getVirtualRealIndex(activeIndex);
|
|
83
|
+
}
|
|
84
|
+
else if (gridEnabled) {
|
|
85
|
+
var firstSlideInColumn = swiper.slides.filter(function (slideEl) { return slideEl.column === activeIndex; })[0];
|
|
86
|
+
var activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);
|
|
87
|
+
if (Number.isNaN(activeSlideIndex)) {
|
|
88
|
+
activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);
|
|
89
|
+
}
|
|
90
|
+
realIndex = Math.floor(activeSlideIndex / params.grid.rows);
|
|
91
|
+
}
|
|
92
|
+
else if (swiper.slides[activeIndex]) {
|
|
93
|
+
var slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');
|
|
94
|
+
if (slideIndex) {
|
|
95
|
+
realIndex = parseInt(slideIndex, 10);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
realIndex = activeIndex;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
realIndex = activeIndex;
|
|
103
|
+
}
|
|
104
|
+
Object.assign(swiper, {
|
|
105
|
+
previousSnapIndex: previousSnapIndex,
|
|
106
|
+
snapIndex: snapIndex,
|
|
107
|
+
previousRealIndex: previousRealIndex,
|
|
108
|
+
realIndex: realIndex,
|
|
109
|
+
previousIndex: previousIndex,
|
|
110
|
+
activeIndex: activeIndex,
|
|
111
|
+
});
|
|
112
|
+
if (swiper.initialized) {
|
|
113
|
+
(0, process_lazy_preloader_1.preload)(swiper);
|
|
114
|
+
}
|
|
115
|
+
swiper.emit('activeIndexChange');
|
|
116
|
+
swiper.emit('snapIndexChange');
|
|
117
|
+
if (swiper.initialized || swiper.params.runCallbacksOnInit) {
|
|
118
|
+
if (previousRealIndex !== realIndex) {
|
|
119
|
+
swiper.emit('realIndexChange');
|
|
120
|
+
}
|
|
121
|
+
swiper.emit('slideChange');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.default = updateActiveIndex;
|
|
125
|
+
//# sourceMappingURL=updateActiveIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateActiveIndex.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/update/updateActiveIndex.tsx"],"names":[],"mappings":";;;AAAA,8EAA8D;AAE9D,SAAgB,yBAAyB,CAAC,MAAM;IACtC,IAAA,UAAU,GAAa,MAAM,WAAnB,EAAE,MAAM,GAAK,MAAM,OAAX,CAAY;IACtC,IAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;IAC7E,IAAI,WAAW,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,I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C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function updateAutoHeight(speed: any): void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function updateAutoHeight(speed) {
|
|
4
|
+
var swiper = this;
|
|
5
|
+
var activeSlides = [];
|
|
6
|
+
var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
7
|
+
var newHeight = 0;
|
|
8
|
+
var i;
|
|
9
|
+
if (typeof speed === 'number') {
|
|
10
|
+
swiper.setTransition(speed);
|
|
11
|
+
}
|
|
12
|
+
else if (speed === true) {
|
|
13
|
+
swiper.setTransition(swiper.params.speed);
|
|
14
|
+
}
|
|
15
|
+
var getSlideByIndex = function (index) {
|
|
16
|
+
if (isVirtual) {
|
|
17
|
+
return swiper.slides[swiper.getSlideIndexByData(index)];
|
|
18
|
+
}
|
|
19
|
+
return swiper.slides[index];
|
|
20
|
+
};
|
|
21
|
+
// Find slides currently in view
|
|
22
|
+
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
|
23
|
+
if (swiper.params.centeredSlides) {
|
|
24
|
+
(swiper.visibleSlides || []).forEach(function (slide) {
|
|
25
|
+
activeSlides.push(slide);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
|
|
30
|
+
var index = swiper.activeIndex + i;
|
|
31
|
+
if (index > swiper.slides.length && !isVirtual)
|
|
32
|
+
break;
|
|
33
|
+
activeSlides.push(getSlideByIndex(index));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
activeSlides.push(getSlideByIndex(swiper.activeIndex));
|
|
39
|
+
}
|
|
40
|
+
// Find new height from highest slide in view
|
|
41
|
+
for (i = 0; i < activeSlides.length; i += 1) {
|
|
42
|
+
if (typeof activeSlides[i] !== 'undefined') {
|
|
43
|
+
var height = activeSlides[i].offsetHeight;
|
|
44
|
+
newHeight = height > newHeight ? height : newHeight;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Update Height
|
|
48
|
+
if (newHeight || newHeight === 0)
|
|
49
|
+
swiper.wrapperEl.style.height = "".concat(newHeight, "px");
|
|
50
|
+
}
|
|
51
|
+
exports.default = updateAutoHeight;
|
|
52
|
+
//# sourceMappingURL=updateAutoHeight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAutoHeight.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/update/updateAutoHeight.tsx"],"names":[],"mappings":";;AAAA,SAAwB,gBAAgB,CAAC,KAAK;IAC5C,IAAM,MAAM,GAAG,IAAI,CAAC;IACpB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,SAAS,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;IAClE,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,CAAC,CAAC;IACN,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;SAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,IAAM,eAAe,GAAG,UAAC,KAAK;QAC5B,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC;IACF,gCAAgC;IAChC,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa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,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,UAAG,SAAS,OAAI,CAAC;AACrF,CAAC;AA7CD,mCA6CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function updateClickedSlide(el: any, path: any): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
function updateClickedSlide(el, path) {
|
|
13
|
+
var swiper = this;
|
|
14
|
+
var params = swiper.params;
|
|
15
|
+
var slide = el.closest(".".concat(params.slideClass, ", swiper-slide"));
|
|
16
|
+
if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {
|
|
17
|
+
__spreadArray([], path.slice(path.indexOf(el) + 1, path.length), true).forEach(function (pathEl) {
|
|
18
|
+
if (!slide && pathEl.matches && pathEl.matches(".".concat(params.slideClass, ", swiper-slide"))) {
|
|
19
|
+
slide = pathEl;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
var slideFound = false;
|
|
24
|
+
var slideIndex;
|
|
25
|
+
if (slide) {
|
|
26
|
+
for (var i = 0; i < swiper.slides.length; i += 1) {
|
|
27
|
+
if (swiper.slides[i] === slide) {
|
|
28
|
+
slideFound = true;
|
|
29
|
+
slideIndex = i;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (slide && slideFound) {
|
|
35
|
+
swiper.clickedSlide = slide;
|
|
36
|
+
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
37
|
+
swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
swiper.clickedIndex = slideIndex;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
swiper.clickedSlide = undefined;
|
|
45
|
+
swiper.clickedIndex = undefined;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (params.slideToClickedSlide &&
|
|
49
|
+
swiper.clickedIndex !== undefined &&
|
|
50
|
+
swiper.clickedIndex !== swiper.activeIndex) {
|
|
51
|
+
swiper.slideToClickedSlide();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.default = updateClickedSlide;
|
|
55
|
+
//# sourceMappingURL=updateClickedSlide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateClickedSlide.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/carousel/swiper/core/update/updateClickedSlide.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAAwB,kBAAkB,CAAC,EAAE,EAAE,IAAI;IACjD,IAAM,MAAM,GAAG,IAAI,CAAC;IACpB,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,IAAI,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC,WAAI,MAAM,CAAC,UAAU,mBAAgB,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QAC/E,kBAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAE,OAAO,CAAC,UAAC,MAAM;YAChE,IAAI,CAAC,KAAK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AAC;AACH,CAAC;AA3CD,qCA2CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function updateProgress(translate: any): void;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function updateProgress(translate) {
|
|
4
|
+
var swiper = this;
|
|
5
|
+
if (typeof translate === 'undefined') {
|
|
6
|
+
var multiplier = swiper.rtlTranslate ? -1 : 1;
|
|
7
|
+
// eslint-disable-next-line
|
|
8
|
+
translate = (swiper && swiper.translate && swiper.translate * multiplier) || 0;
|
|
9
|
+
}
|
|
10
|
+
var params = swiper.params;
|
|
11
|
+
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
|
12
|
+
var progress = swiper.progress, isBeginning = swiper.isBeginning, isEnd = swiper.isEnd, progressLoop = swiper.progressLoop;
|
|
13
|
+
var wasBeginning = isBeginning;
|
|
14
|
+
var wasEnd = isEnd;
|
|
15
|
+
if (translatesDiff === 0) {
|
|
16
|
+
progress = 0;
|
|
17
|
+
isBeginning = true;
|
|
18
|
+
isEnd = true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
progress = (translate - swiper.minTranslate()) / translatesDiff;
|
|
22
|
+
var isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;
|
|
23
|
+
var isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;
|
|
24
|
+
isBeginning = isBeginningRounded || progress <= 0;
|
|
25
|
+
isEnd = isEndRounded || progress >= 1;
|
|
26
|
+
if (isBeginningRounded)
|
|
27
|
+
progress = 0;
|
|
28
|
+
if (isEndRounded)
|
|
29
|
+
progress = 1;
|
|
30
|
+
}
|
|
31
|
+
if (params.loop) {
|
|
32
|
+
var firstSlideIndex = swiper.getSlideIndexByData(0);
|
|
33
|
+
var lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);
|
|
34
|
+
var firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];
|
|
35
|
+
var lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];
|
|
36
|
+
var translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];
|
|
37
|
+
var translateAbs = Math.abs(translate);
|
|
38
|
+
if (translateAbs >= firstSlideTranslate) {
|
|
39
|
+
progressLoop = (translateAbs - firstSlideTranslate) / translateMax;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;
|
|
43
|
+
}
|
|
44
|
+
if (progressLoop > 1)
|
|
45
|
+
progressLoop -= 1;
|
|
46
|
+
}
|
|
47
|
+
Object.assign(swiper, {
|
|
48
|
+
progress: progress,
|
|
49
|
+
progressLoop: progressLoop,
|
|
50
|
+
isBeginning: isBeginning,
|
|
51
|
+
isEnd: isEnd,
|
|
52
|
+
});
|
|
53
|
+
if (params.watchSlidesProgress || (params.centeredSlides && params.autoHeight))
|
|
54
|
+
swiper.updateSlidesProgress(translate);
|
|
55
|
+
if (isBeginning && !wasBeginning) {
|
|
56
|
+
swiper.emit('reachBeginning toEdge');
|
|
57
|
+
}
|
|
58
|
+
if (isEnd && !wasEnd) {
|
|
59
|
+
swiper.emit('reachEnd toEdge');
|
|
60
|
+
}
|
|
61
|
+
if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
|
|
62
|
+
swiper.emit('fromEdge');
|
|
63
|
+
}
|
|
64
|
+
swiper.emit('progress', progress);
|
|
65
|
+
}
|
|
66
|
+
exports.default = updateProgress;
|
|
67
|
+
//# sourceMappingURL=updateProgress.js.map
|