infinity-forge 2.3.9 → 2.4.0
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/data/use-cases/menu/remote-get-menu.d.ts +2 -1
- package/dist/system/data/use-cases/menu/remote-get-menu.js +1 -1
- package/dist/system/data/use-cases/notifications/remote-notifications.d.ts +2 -1
- package/dist/system/data/use-cases/notifications/remote-notifications.js +1 -1
- package/dist/system/data/use-cases/users/remote-load-user-admin.d.ts +2 -1
- package/dist/system/data/use-cases/users/remote-load-user-admin.js +1 -1
- package/dist/system/data/use-cases/users/remote-users.d.ts +2 -1
- package/dist/system/data/use-cases/users/remote-users.js +1 -1
- package/dist/system/domain/use-cases/dynamic-section/dynamic-section.d.ts +2 -1
- package/dist/system/domain/use-cases/menu/detail.d.ts +2 -1
- package/dist/system/domain/use-cases/menu/load-all.d.ts +2 -1
- package/dist/system/domain/use-cases/users/load-all-users.d.ts +2 -1
- package/dist/system/domain/use-cases/users/load-user-admin.d.ts +2 -1
- 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 +0 -5
- package/dist/system/presentation/components/data/tab/tab-item/index.js +0 -46
- package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +0 -8
- package/dist/system/presentation/components/layout/header/components/index.d.ts +0 -2
- package/dist/system/presentation/components/layout/header/components/index.js +0 -19
- 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 +36 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +38 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +42 -0
- 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 +0 -2
- package/dist/system/presentation/components/layout/header/version-01/index.js +0 -45
- package/dist/system/presentation/components/pages/menus/table/columns.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/columns.js +0 -21
- package/dist/system/presentation/components/pages/menus/table/create.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/create.js +0 -72
- package/dist/system/presentation/components/pages/menus/table/delete.js +0 -71
- package/dist/system/presentation/components/pages/menus/table/edit.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/edit.js +0 -78
- package/dist/system/presentation/components/pages/menus/table/icon/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/index.d.ts +0 -4
- package/dist/system/presentation/components/pages/menus/table/index.js +0 -21
- package/dist/system/presentation/components/pages/users/table/columns.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/create.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/create.js +0 -75
- package/dist/system/presentation/components/pages/users/table/delete.js +0 -74
- package/dist/system/presentation/components/pages/users/table/edit.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/edit.js +0 -83
- package/dist/system/presentation/components/pages/users/table/index.d.ts +0 -4
- package/dist/system/presentation/components/pages/users/table/index.js +0 -21
- package/dist/system/presentation/context/auth/components/login/form-login/index.js +2 -2
- package/dist/system/presentation/context/auth/components/login/index.js +0 -38
- package/dist/system/presentation/context/auth/components/private-page/index.d.ts +0 -2
- package/dist/system/presentation/context/auth/components/private-page/index.js +0 -141
- package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +0 -1
- package/dist/system/presentation/hooks/ui/use-table/components/index.js +0 -18
- 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 +0 -2
- package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +0 -5
- package/dist/system/presentation/hooks/ui/use-table/query/hook.js +0 -52
- package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/query/index.js +0 -19
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +0 -35
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +0 -94
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/events/index.js +0 -77
- package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +0 -194
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +0 -314
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +0 -154
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +0 -12
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +0 -57
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +0 -230
- 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 +0 -17
- package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +0 -22
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +0 -160
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +0 -46
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +0 -18
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +0 -19
- package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +0 -21
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +0 -13
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +0 -18
- package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +0 -81
- package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +0 -21
- package/dist/ui/components/carousel/carousel-lib/core/update/index.js +0 -26
- package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +0 -125
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +0 -45
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +0 -306
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +0 -69
- 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 +2 -2
- 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 +1 -1
- 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 +24 -0
- package/package.json +75 -75
|
@@ -1,194 +0,0 @@
|
|
|
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
|
-
var utils_1 = require("../../shared/utils.js");
|
|
13
|
-
function onTouchEnd(event) {
|
|
14
|
-
var swiper = this;
|
|
15
|
-
var data = swiper.touchEventsData;
|
|
16
|
-
var e = event;
|
|
17
|
-
if (e.originalEvent)
|
|
18
|
-
e = e.originalEvent;
|
|
19
|
-
var targetTouch;
|
|
20
|
-
var isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';
|
|
21
|
-
if (!isTouchEvent) {
|
|
22
|
-
if (data.touchId !== null)
|
|
23
|
-
return; // return from pointer if we use touch
|
|
24
|
-
if (e.pointerId !== data.pointerId)
|
|
25
|
-
return;
|
|
26
|
-
targetTouch = e;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
targetTouch = __spreadArray([], e.changedTouches, true).filter(function (t) { return t.identifier === data.touchId; })[0];
|
|
30
|
-
if (!targetTouch || targetTouch.identifier !== data.touchId)
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {
|
|
34
|
-
var proceed = ['pointercancel', 'contextmenu'].includes(e.type) &&
|
|
35
|
-
(swiper.browser.isSafari || swiper.browser.isWebView);
|
|
36
|
-
if (!proceed) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
data.pointerId = null;
|
|
41
|
-
data.touchId = null;
|
|
42
|
-
var params = swiper.params, touches = swiper.touches, rtl = swiper.rtlTranslate, slidesGrid = swiper.slidesGrid, enabled = swiper.enabled;
|
|
43
|
-
if (!enabled)
|
|
44
|
-
return;
|
|
45
|
-
if (!params.simulateTouch && e.pointerType === 'mouse')
|
|
46
|
-
return;
|
|
47
|
-
if (data.allowTouchCallbacks) {
|
|
48
|
-
swiper.emit('touchEnd', e);
|
|
49
|
-
}
|
|
50
|
-
data.allowTouchCallbacks = false;
|
|
51
|
-
if (!data.isTouched) {
|
|
52
|
-
if (data.isMoved && params.grabCursor) {
|
|
53
|
-
swiper.setGrabCursor(false);
|
|
54
|
-
}
|
|
55
|
-
data.isMoved = false;
|
|
56
|
-
data.startMoving = false;
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
// Return Grab Cursor
|
|
60
|
-
if (params.grabCursor &&
|
|
61
|
-
data.isMoved &&
|
|
62
|
-
data.isTouched &&
|
|
63
|
-
(swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
64
|
-
swiper.setGrabCursor(false);
|
|
65
|
-
}
|
|
66
|
-
// Time diff
|
|
67
|
-
var touchEndTime = (0, utils_1.now)();
|
|
68
|
-
var timeDiff = touchEndTime - data.touchStartTime;
|
|
69
|
-
// Tap, doubleTap, Click
|
|
70
|
-
if (swiper.allowClick) {
|
|
71
|
-
var pathTree = e.path || (e.composedPath && e.composedPath());
|
|
72
|
-
swiper.updateClickedSlide((pathTree && pathTree[0]) || e.target, pathTree);
|
|
73
|
-
swiper.emit('tap click', e);
|
|
74
|
-
if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {
|
|
75
|
-
swiper.emit('doubleTap doubleClick', e);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
data.lastClickTime = (0, utils_1.now)();
|
|
79
|
-
(0, utils_1.nextTick)(function () {
|
|
80
|
-
if (!swiper.destroyed)
|
|
81
|
-
swiper.allowClick = true;
|
|
82
|
-
});
|
|
83
|
-
if (!data.isTouched ||
|
|
84
|
-
!data.isMoved ||
|
|
85
|
-
!swiper.swipeDirection ||
|
|
86
|
-
(touches.diff === 0 && !data.loopSwapReset) ||
|
|
87
|
-
(data.currentTranslate === data.startTranslate && !data.loopSwapReset)) {
|
|
88
|
-
data.isTouched = false;
|
|
89
|
-
data.isMoved = false;
|
|
90
|
-
data.startMoving = false;
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
data.isTouched = false;
|
|
94
|
-
data.isMoved = false;
|
|
95
|
-
data.startMoving = false;
|
|
96
|
-
var currentPos;
|
|
97
|
-
if (params.followFinger) {
|
|
98
|
-
currentPos = rtl ? swiper.translate : -swiper.translate;
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
currentPos = -data.currentTranslate;
|
|
102
|
-
}
|
|
103
|
-
if (params.cssMode) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
if (params.freeMode && params.freeMode.enabled) {
|
|
107
|
-
swiper.freeMode.onTouchEnd({ currentPos: currentPos });
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
// Find current slide
|
|
111
|
-
var swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;
|
|
112
|
-
var stopIndex = 0;
|
|
113
|
-
var groupSize = swiper.slidesSizesGrid[0];
|
|
114
|
-
for (var i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
|
|
115
|
-
var increment_1 = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
|
|
116
|
-
if (typeof slidesGrid[i + increment_1] !== 'undefined') {
|
|
117
|
-
if (swipeToLast || (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment_1])) {
|
|
118
|
-
stopIndex = i;
|
|
119
|
-
groupSize = slidesGrid[i + increment_1] - slidesGrid[i];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else if (swipeToLast || currentPos >= slidesGrid[i]) {
|
|
123
|
-
stopIndex = i;
|
|
124
|
-
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
var rewindFirstIndex = null;
|
|
128
|
-
var rewindLastIndex = null;
|
|
129
|
-
if (params.rewind) {
|
|
130
|
-
if (swiper.isBeginning) {
|
|
131
|
-
rewindLastIndex =
|
|
132
|
-
params.virtual && params.virtual.enabled && swiper.virtual
|
|
133
|
-
? swiper.virtual.slides.length - 1
|
|
134
|
-
: swiper.slides.length - 1;
|
|
135
|
-
}
|
|
136
|
-
else if (swiper.isEnd) {
|
|
137
|
-
rewindFirstIndex = 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// Find current slide size
|
|
141
|
-
var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
|
142
|
-
var increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
|
|
143
|
-
if (timeDiff > params.longSwipesMs) {
|
|
144
|
-
// Long touches
|
|
145
|
-
if (!params.longSwipes) {
|
|
146
|
-
swiper.slideTo(swiper.activeIndex);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (swiper.swipeDirection === 'next') {
|
|
150
|
-
if (ratio >= params.longSwipesRatio)
|
|
151
|
-
swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);
|
|
152
|
-
else
|
|
153
|
-
swiper.slideTo(stopIndex);
|
|
154
|
-
}
|
|
155
|
-
if (swiper.swipeDirection === 'prev') {
|
|
156
|
-
if (ratio > 1 - params.longSwipesRatio) {
|
|
157
|
-
swiper.slideTo(stopIndex + increment);
|
|
158
|
-
}
|
|
159
|
-
else if (rewindLastIndex !== null &&
|
|
160
|
-
ratio < 0 &&
|
|
161
|
-
Math.abs(ratio) > params.longSwipesRatio) {
|
|
162
|
-
swiper.slideTo(rewindLastIndex);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
swiper.slideTo(stopIndex);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
// Short swipes
|
|
171
|
-
if (!params.shortSwipes) {
|
|
172
|
-
swiper.slideTo(swiper.activeIndex);
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
var isNavButtonTarget = swiper.navigation &&
|
|
176
|
-
(e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
|
|
177
|
-
if (!isNavButtonTarget) {
|
|
178
|
-
if (swiper.swipeDirection === 'next') {
|
|
179
|
-
swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
|
|
180
|
-
}
|
|
181
|
-
if (swiper.swipeDirection === 'prev') {
|
|
182
|
-
swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else if (e.target === swiper.navigation.nextEl) {
|
|
186
|
-
swiper.slideTo(stopIndex + increment);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
swiper.slideTo(stopIndex);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
exports.default = onTouchEnd;
|
|
194
|
-
//# sourceMappingURL=onTouchEnd.js.map
|
|
@@ -1,314 +0,0 @@
|
|
|
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
|
-
//@ts-nocheck
|
|
13
|
-
var utils_1 = require("../../shared/utils.js");
|
|
14
|
-
var document_1 = require("../../ssr-window/document.js");
|
|
15
|
-
function onTouchMove(event) {
|
|
16
|
-
var document = (0, document_1.getDocument)();
|
|
17
|
-
var swiper = this;
|
|
18
|
-
var data = swiper.touchEventsData;
|
|
19
|
-
var params = swiper.params, touches = swiper.touches, rtl = swiper.rtlTranslate, enabled = swiper.enabled;
|
|
20
|
-
if (!enabled)
|
|
21
|
-
return;
|
|
22
|
-
if (!params.simulateTouch && event.pointerType === 'mouse')
|
|
23
|
-
return;
|
|
24
|
-
var e = event;
|
|
25
|
-
if (e.originalEvent)
|
|
26
|
-
e = e.originalEvent;
|
|
27
|
-
if (e.type === 'pointermove') {
|
|
28
|
-
if (data.touchId !== null)
|
|
29
|
-
return; // return from pointer if we use touch
|
|
30
|
-
var id = e.pointerId;
|
|
31
|
-
if (id !== data.pointerId)
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
var targetTouch;
|
|
35
|
-
if (e.type === 'touchmove') {
|
|
36
|
-
targetTouch = __spreadArray([], e.changedTouches, true).filter(function (t) { return t.identifier === data.touchId; })[0];
|
|
37
|
-
if (!targetTouch || targetTouch.identifier !== data.touchId)
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
targetTouch = e;
|
|
42
|
-
}
|
|
43
|
-
if (!data.isTouched) {
|
|
44
|
-
if (data.startMoving && data.isScrolling) {
|
|
45
|
-
swiper.emit('touchMoveOpposite', e);
|
|
46
|
-
}
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
var pageX = targetTouch.pageX;
|
|
50
|
-
var pageY = targetTouch.pageY;
|
|
51
|
-
if (e.preventedByNestedSwiper) {
|
|
52
|
-
touches.startX = pageX;
|
|
53
|
-
touches.startY = pageY;
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (!swiper.allowTouchMove) {
|
|
57
|
-
if (!e.target.matches(data.focusableElements)) {
|
|
58
|
-
swiper.allowClick = false;
|
|
59
|
-
}
|
|
60
|
-
if (data.isTouched) {
|
|
61
|
-
Object.assign(touches, {
|
|
62
|
-
startX: pageX,
|
|
63
|
-
startY: pageY,
|
|
64
|
-
currentX: pageX,
|
|
65
|
-
currentY: pageY,
|
|
66
|
-
});
|
|
67
|
-
data.touchStartTime = (0, utils_1.now)();
|
|
68
|
-
}
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (params.touchReleaseOnEdges && !params.loop) {
|
|
72
|
-
if (swiper.isVertical()) {
|
|
73
|
-
// Vertical
|
|
74
|
-
if ((pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) ||
|
|
75
|
-
(pageY > touches.startY && swiper.translate >= swiper.minTranslate())) {
|
|
76
|
-
data.isTouched = false;
|
|
77
|
-
data.isMoved = false;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else if ((pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) ||
|
|
82
|
-
(pageX > touches.startX && swiper.translate >= swiper.minTranslate())) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (document.activeElement) {
|
|
87
|
-
if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {
|
|
88
|
-
data.isMoved = true;
|
|
89
|
-
swiper.allowClick = false;
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (data.allowTouchCallbacks) {
|
|
94
|
-
swiper.emit('touchMove', e);
|
|
95
|
-
}
|
|
96
|
-
touches.previousX = touches.currentX;
|
|
97
|
-
touches.previousY = touches.currentY;
|
|
98
|
-
touches.currentX = pageX;
|
|
99
|
-
touches.currentY = pageY;
|
|
100
|
-
var diffX = touches.currentX - touches.startX;
|
|
101
|
-
var diffY = touches.currentY - touches.startY;
|
|
102
|
-
if (swiper.params.threshold && Math.sqrt(Math.pow(diffX, 2) + Math.pow(diffY, 2)) < swiper.params.threshold)
|
|
103
|
-
return;
|
|
104
|
-
if (typeof data.isScrolling === 'undefined') {
|
|
105
|
-
var touchAngle = void 0;
|
|
106
|
-
if ((swiper.isHorizontal() && touches.currentY === touches.startY) ||
|
|
107
|
-
(swiper.isVertical() && touches.currentX === touches.startX)) {
|
|
108
|
-
data.isScrolling = false;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
// eslint-disable-next-line
|
|
112
|
-
if (diffX * diffX + diffY * diffY >= 25) {
|
|
113
|
-
touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
|
|
114
|
-
data.isScrolling = swiper.isHorizontal()
|
|
115
|
-
? touchAngle > params.touchAngle
|
|
116
|
-
: 90 - touchAngle > params.touchAngle;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (data.isScrolling) {
|
|
121
|
-
swiper.emit('touchMoveOpposite', e);
|
|
122
|
-
}
|
|
123
|
-
if (typeof data.startMoving === 'undefined') {
|
|
124
|
-
if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
|
|
125
|
-
data.startMoving = true;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
if (data.isScrolling || (e.type === 'touchmove' && data.preventTouchMoveFromPointerMove)) {
|
|
129
|
-
data.isTouched = false;
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (!data.startMoving) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
swiper.allowClick = false;
|
|
136
|
-
if (!params.cssMode && e.cancelable) {
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
}
|
|
139
|
-
if (params.touchMoveStopPropagation && !params.nested) {
|
|
140
|
-
e.stopPropagation();
|
|
141
|
-
}
|
|
142
|
-
var diff = swiper.isHorizontal() ? diffX : diffY;
|
|
143
|
-
var touchesDiff = swiper.isHorizontal()
|
|
144
|
-
? touches.currentX - touches.previousX
|
|
145
|
-
: touches.currentY - touches.previousY;
|
|
146
|
-
if (params.oneWayMovement) {
|
|
147
|
-
diff = Math.abs(diff) * (rtl ? 1 : -1);
|
|
148
|
-
touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
|
|
149
|
-
}
|
|
150
|
-
touches.diff = diff;
|
|
151
|
-
diff *= params.touchRatio;
|
|
152
|
-
if (rtl) {
|
|
153
|
-
diff = -diff;
|
|
154
|
-
touchesDiff = -touchesDiff;
|
|
155
|
-
}
|
|
156
|
-
var prevTouchesDirection = swiper.touchesDirection;
|
|
157
|
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
|
158
|
-
swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';
|
|
159
|
-
var isLoop = swiper.params.loop && !params.cssMode;
|
|
160
|
-
var allowLoopFix = (swiper.touchesDirection === 'next' && swiper.allowSlideNext) ||
|
|
161
|
-
(swiper.touchesDirection === 'prev' && swiper.allowSlidePrev);
|
|
162
|
-
if (!data.isMoved) {
|
|
163
|
-
if (isLoop && allowLoopFix) {
|
|
164
|
-
swiper.loopFix({ direction: swiper.swipeDirection });
|
|
165
|
-
}
|
|
166
|
-
data.startTranslate = swiper.getTranslate();
|
|
167
|
-
swiper.setTransition(0);
|
|
168
|
-
if (swiper.animating) {
|
|
169
|
-
var evt = new window.CustomEvent('transitionend', {
|
|
170
|
-
bubbles: true,
|
|
171
|
-
cancelable: true,
|
|
172
|
-
detail: {
|
|
173
|
-
bySwiperTouchMove: true,
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
swiper.wrapperEl.dispatchEvent(evt);
|
|
177
|
-
}
|
|
178
|
-
data.allowMomentumBounce = false;
|
|
179
|
-
// Grab Cursor
|
|
180
|
-
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
181
|
-
swiper.setGrabCursor(true);
|
|
182
|
-
}
|
|
183
|
-
swiper.emit('sliderFirstMove', e);
|
|
184
|
-
}
|
|
185
|
-
var loopFixed;
|
|
186
|
-
var time = new Date().getTime();
|
|
187
|
-
if (data.isMoved &&
|
|
188
|
-
data.allowThresholdMove &&
|
|
189
|
-
prevTouchesDirection !== swiper.touchesDirection &&
|
|
190
|
-
isLoop &&
|
|
191
|
-
allowLoopFix &&
|
|
192
|
-
Math.abs(diff) >= 1) {
|
|
193
|
-
Object.assign(touches, {
|
|
194
|
-
startX: pageX,
|
|
195
|
-
startY: pageY,
|
|
196
|
-
currentX: pageX,
|
|
197
|
-
currentY: pageY,
|
|
198
|
-
startTranslate: data.currentTranslate,
|
|
199
|
-
});
|
|
200
|
-
data.loopSwapReset = true;
|
|
201
|
-
data.startTranslate = data.currentTranslate;
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
swiper.emit('sliderMove', e);
|
|
205
|
-
data.isMoved = true;
|
|
206
|
-
data.currentTranslate = diff + data.startTranslate;
|
|
207
|
-
var disableParentSwiper = true;
|
|
208
|
-
var resistanceRatio = params.resistanceRatio;
|
|
209
|
-
if (params.touchReleaseOnEdges) {
|
|
210
|
-
resistanceRatio = 0;
|
|
211
|
-
}
|
|
212
|
-
if (diff > 0) {
|
|
213
|
-
if (isLoop &&
|
|
214
|
-
allowLoopFix &&
|
|
215
|
-
!loopFixed &&
|
|
216
|
-
data.allowThresholdMove &&
|
|
217
|
-
data.currentTranslate >
|
|
218
|
-
(params.centeredSlides
|
|
219
|
-
? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1]
|
|
220
|
-
: swiper.minTranslate())) {
|
|
221
|
-
swiper.loopFix({ direction: 'prev', setTranslate: true, activeSlideIndex: 0 });
|
|
222
|
-
}
|
|
223
|
-
if (data.currentTranslate > swiper.minTranslate()) {
|
|
224
|
-
disableParentSwiper = false;
|
|
225
|
-
if (params.resistance) {
|
|
226
|
-
data.currentTranslate =
|
|
227
|
-
swiper.minTranslate() -
|
|
228
|
-
1 +
|
|
229
|
-
Math.pow((-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
else if (diff < 0) {
|
|
234
|
-
if (isLoop &&
|
|
235
|
-
allowLoopFix &&
|
|
236
|
-
!loopFixed &&
|
|
237
|
-
data.allowThresholdMove &&
|
|
238
|
-
data.currentTranslate <
|
|
239
|
-
(params.centeredSlides
|
|
240
|
-
? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1]
|
|
241
|
-
: swiper.maxTranslate())) {
|
|
242
|
-
swiper.loopFix({
|
|
243
|
-
direction: 'next',
|
|
244
|
-
setTranslate: true,
|
|
245
|
-
activeSlideIndex: swiper.slides.length -
|
|
246
|
-
(params.slidesPerView === 'auto'
|
|
247
|
-
? swiper.slidesPerViewDynamic()
|
|
248
|
-
: Math.ceil(parseFloat(params.slidesPerView, 10))),
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
if (data.currentTranslate < swiper.maxTranslate()) {
|
|
252
|
-
disableParentSwiper = false;
|
|
253
|
-
if (params.resistance) {
|
|
254
|
-
data.currentTranslate =
|
|
255
|
-
swiper.maxTranslate() +
|
|
256
|
-
1 -
|
|
257
|
-
Math.pow((swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
if (disableParentSwiper) {
|
|
262
|
-
e.preventedByNestedSwiper = true;
|
|
263
|
-
}
|
|
264
|
-
// Directions locks
|
|
265
|
-
if (!swiper.allowSlideNext &&
|
|
266
|
-
swiper.swipeDirection === 'next' &&
|
|
267
|
-
data.currentTranslate < data.startTranslate) {
|
|
268
|
-
data.currentTranslate = data.startTranslate;
|
|
269
|
-
}
|
|
270
|
-
if (!swiper.allowSlidePrev &&
|
|
271
|
-
swiper.swipeDirection === 'prev' &&
|
|
272
|
-
data.currentTranslate > data.startTranslate) {
|
|
273
|
-
data.currentTranslate = data.startTranslate;
|
|
274
|
-
}
|
|
275
|
-
if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
|
|
276
|
-
data.currentTranslate = data.startTranslate;
|
|
277
|
-
}
|
|
278
|
-
// Threshold
|
|
279
|
-
if (params.threshold > 0) {
|
|
280
|
-
if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
|
|
281
|
-
if (!data.allowThresholdMove) {
|
|
282
|
-
data.allowThresholdMove = true;
|
|
283
|
-
touches.startX = touches.currentX;
|
|
284
|
-
touches.startY = touches.currentY;
|
|
285
|
-
data.currentTranslate = data.startTranslate;
|
|
286
|
-
touches.diff = swiper.isHorizontal()
|
|
287
|
-
? touches.currentX - touches.startX
|
|
288
|
-
: touches.currentY - touches.startY;
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
data.currentTranslate = data.startTranslate;
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
if (!params.followFinger || params.cssMode)
|
|
298
|
-
return;
|
|
299
|
-
// Update active index in free mode
|
|
300
|
-
if ((params.freeMode && params.freeMode.enabled && swiper.freeMode) ||
|
|
301
|
-
params.watchSlidesProgress) {
|
|
302
|
-
swiper.updateActiveIndex();
|
|
303
|
-
swiper.updateSlidesClasses();
|
|
304
|
-
}
|
|
305
|
-
if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {
|
|
306
|
-
swiper.freeMode.onTouchMove();
|
|
307
|
-
}
|
|
308
|
-
// Update progress
|
|
309
|
-
swiper.updateProgress(data.currentTranslate);
|
|
310
|
-
// Update translate
|
|
311
|
-
swiper.setTranslate(data.currentTranslate);
|
|
312
|
-
}
|
|
313
|
-
exports.default = onTouchMove;
|
|
314
|
-
//# sourceMappingURL=onTouchMove.js.map
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//@ts-nocheck
|
|
4
|
-
var utils_1 = require("../../shared/utils.js");
|
|
5
|
-
var document_1 = require("../../ssr-window/document.js");
|
|
6
|
-
var window_1 = require("../../ssr-window/window.js");
|
|
7
|
-
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
8
|
-
function closestElement(selector, base) {
|
|
9
|
-
if (base === void 0) { base = this; }
|
|
10
|
-
function __closestFrom(el) {
|
|
11
|
-
if (!el || el === (0, document_1.getDocument)() || el === (0, window_1.getWindow)())
|
|
12
|
-
return null;
|
|
13
|
-
if (el.assignedSlot)
|
|
14
|
-
el = el.assignedSlot;
|
|
15
|
-
var found = el.closest(selector);
|
|
16
|
-
if (!found && !el.getRootNode) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return found || __closestFrom(el.getRootNode().host);
|
|
20
|
-
}
|
|
21
|
-
return __closestFrom(base);
|
|
22
|
-
}
|
|
23
|
-
function preventEdgeSwipe(swiper, event, startX) {
|
|
24
|
-
var window = (0, window_1.getWindow)();
|
|
25
|
-
var params = swiper.params;
|
|
26
|
-
var edgeSwipeDetection = params.edgeSwipeDetection;
|
|
27
|
-
var edgeSwipeThreshold = params.edgeSwipeThreshold;
|
|
28
|
-
if (edgeSwipeDetection &&
|
|
29
|
-
(startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {
|
|
30
|
-
if (edgeSwipeDetection === 'prevent') {
|
|
31
|
-
event.preventDefault();
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
function onTouchStart(event) {
|
|
39
|
-
var swiper = this;
|
|
40
|
-
var document = (0, document_1.getDocument)();
|
|
41
|
-
var e = event;
|
|
42
|
-
if (e.originalEvent)
|
|
43
|
-
e = e.originalEvent;
|
|
44
|
-
var data = swiper.touchEventsData;
|
|
45
|
-
if (e.type === 'pointerdown') {
|
|
46
|
-
if (data.pointerId !== null && data.pointerId !== e.pointerId) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
data.pointerId = e.pointerId;
|
|
50
|
-
}
|
|
51
|
-
else if (e.type === 'touchstart' && e.targetTouches.length === 1) {
|
|
52
|
-
data.touchId = e.targetTouches[0].identifier;
|
|
53
|
-
}
|
|
54
|
-
if (e.type === 'touchstart') {
|
|
55
|
-
// don't proceed touch event
|
|
56
|
-
preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
var params = swiper.params, touches = swiper.touches, enabled = swiper.enabled;
|
|
60
|
-
if (!enabled)
|
|
61
|
-
return;
|
|
62
|
-
if (!params.simulateTouch && e.pointerType === 'mouse')
|
|
63
|
-
return;
|
|
64
|
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (!swiper.animating && params.cssMode && params.loop) {
|
|
68
|
-
swiper.loopFix();
|
|
69
|
-
}
|
|
70
|
-
var targetEl = e.target;
|
|
71
|
-
if (params.touchEventsTarget === 'wrapper') {
|
|
72
|
-
if (!swiper.wrapperEl.contains(targetEl))
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if ('which' in e && e.which === 3)
|
|
76
|
-
return;
|
|
77
|
-
if ('button' in e && e.button > 0)
|
|
78
|
-
return;
|
|
79
|
-
if (data.isTouched && data.isMoved)
|
|
80
|
-
return;
|
|
81
|
-
// change target el for shadow root component
|
|
82
|
-
var swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
|
|
83
|
-
// eslint-disable-next-line
|
|
84
|
-
var eventPath = e.composedPath ? e.composedPath() : e.path;
|
|
85
|
-
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
|
|
86
|
-
targetEl = eventPath[0];
|
|
87
|
-
}
|
|
88
|
-
var noSwipingSelector = params.noSwipingSelector
|
|
89
|
-
? params.noSwipingSelector
|
|
90
|
-
: ".".concat(params.noSwipingClass);
|
|
91
|
-
var isTargetShadow = !!(e.target && e.target.shadowRoot);
|
|
92
|
-
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
93
|
-
if (params.noSwiping &&
|
|
94
|
-
(isTargetShadow
|
|
95
|
-
? closestElement(noSwipingSelector, targetEl)
|
|
96
|
-
: targetEl.closest(noSwipingSelector))) {
|
|
97
|
-
swiper.allowClick = true;
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (params.swipeHandler) {
|
|
101
|
-
if (!targetEl.closest(params.swipeHandler))
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
touches.currentX = e.pageX;
|
|
105
|
-
touches.currentY = e.pageY;
|
|
106
|
-
var startX = touches.currentX;
|
|
107
|
-
var startY = touches.currentY;
|
|
108
|
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
109
|
-
if (!preventEdgeSwipe(swiper, e, startX)) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
Object.assign(data, {
|
|
113
|
-
isTouched: true,
|
|
114
|
-
isMoved: false,
|
|
115
|
-
allowTouchCallbacks: true,
|
|
116
|
-
isScrolling: undefined,
|
|
117
|
-
startMoving: undefined,
|
|
118
|
-
});
|
|
119
|
-
touches.startX = startX;
|
|
120
|
-
touches.startY = startY;
|
|
121
|
-
data.touchStartTime = (0, utils_1.now)();
|
|
122
|
-
swiper.allowClick = true;
|
|
123
|
-
swiper.updateSize();
|
|
124
|
-
swiper.swipeDirection = undefined;
|
|
125
|
-
if (params.threshold > 0)
|
|
126
|
-
data.allowThresholdMove = false;
|
|
127
|
-
var preventDefault = true;
|
|
128
|
-
if (targetEl.matches(data.focusableElements)) {
|
|
129
|
-
preventDefault = false;
|
|
130
|
-
if (targetEl.nodeName === 'SELECT') {
|
|
131
|
-
data.isTouched = false;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (document.activeElement &&
|
|
135
|
-
document.activeElement.matches(data.focusableElements) &&
|
|
136
|
-
document.activeElement !== targetEl) {
|
|
137
|
-
document.activeElement.blur();
|
|
138
|
-
}
|
|
139
|
-
var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
|
|
140
|
-
if ((params.touchStartForcePreventDefault || shouldPreventDefault) &&
|
|
141
|
-
!targetEl.isContentEditable) {
|
|
142
|
-
e.preventDefault();
|
|
143
|
-
}
|
|
144
|
-
if (params.freeMode &&
|
|
145
|
-
params.freeMode.enabled &&
|
|
146
|
-
swiper.freeMode &&
|
|
147
|
-
swiper.animating &&
|
|
148
|
-
!params.cssMode) {
|
|
149
|
-
swiper.freeMode.onTouchStart();
|
|
150
|
-
}
|
|
151
|
-
swiper.emit('touchStart', e);
|
|
152
|
-
}
|
|
153
|
-
exports.default = onTouchStart;
|
|
154
|
-
//# sourceMappingURL=onTouchStart.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
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 setGrabCursor_1 = __importDefault(require("./setGrabCursor.js"));
|
|
7
|
-
var unsetGrabCursor_1 = __importDefault(require("./unsetGrabCursor.js"));
|
|
8
|
-
exports.default = {
|
|
9
|
-
setGrabCursor: setGrabCursor_1.default,
|
|
10
|
-
unsetGrabCursor: unsetGrabCursor_1.default,
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import loopCreate from './loopCreate.js';
|
|
2
|
-
import loopFix from './loopFix.js';
|
|
3
|
-
import loopDestroy from './loopDestroy.js';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
loopCreate: typeof loopCreate;
|
|
6
|
-
loopFix: typeof loopFix;
|
|
7
|
-
loopDestroy: typeof loopDestroy;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|