GULP DIST
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Swiper 7.3.1
|
||||
* Swiper 7.4.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
@@ -7,11 +7,11 @@
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: November 24, 2021
|
||||
* Released on: December 24, 2021
|
||||
*/
|
||||
|
||||
/**
|
||||
* SSR Window 4.0.1
|
||||
* SSR Window 4.0.2
|
||||
* Better handling for window object in SSR environment
|
||||
* https://github.com/nolimits4web/ssr-window
|
||||
*
|
||||
@@ -19,7 +19,7 @@
|
||||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: October 27, 2021
|
||||
* Released on: December 13, 2021
|
||||
*/
|
||||
|
||||
/* eslint-disable no-param-reassign */
|
||||
@@ -190,7 +190,7 @@ function getWindow() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Dom7 4.0.1
|
||||
* Dom7 4.0.2
|
||||
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
||||
* https://framework7.io/docs/dom7.html
|
||||
*
|
||||
@@ -198,7 +198,7 @@ function getWindow() {
|
||||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: October 27, 2021
|
||||
* Released on: December 13, 2021
|
||||
*/
|
||||
/* eslint-disable no-proto */
|
||||
|
||||
@@ -1962,7 +1962,7 @@ function updateAutoHeight(speed) {
|
||||
} // Update Height
|
||||
|
||||
|
||||
if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
||||
if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
||||
}
|
||||
|
||||
function updateSlidesOffset() {
|
||||
@@ -2660,40 +2660,32 @@ function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, inte
|
||||
return true;
|
||||
}
|
||||
|
||||
swiper.setTransition(speed);
|
||||
swiper.setTranslate(translate);
|
||||
swiper.updateActiveIndex(slideIndex);
|
||||
swiper.updateSlidesClasses();
|
||||
swiper.emit('beforeTransitionStart', speed, internal);
|
||||
swiper.transitionStart(runCallbacks, direction);
|
||||
|
||||
if (speed === 0) {
|
||||
swiper.setTransition(0);
|
||||
swiper.setTranslate(translate);
|
||||
swiper.updateActiveIndex(slideIndex);
|
||||
swiper.updateSlidesClasses();
|
||||
swiper.emit('beforeTransitionStart', speed, internal);
|
||||
swiper.transitionStart(runCallbacks, direction);
|
||||
swiper.transitionEnd(runCallbacks, direction);
|
||||
} else {
|
||||
swiper.setTransition(speed);
|
||||
swiper.setTranslate(translate);
|
||||
swiper.updateActiveIndex(slideIndex);
|
||||
swiper.updateSlidesClasses();
|
||||
swiper.emit('beforeTransitionStart', speed, internal);
|
||||
swiper.transitionStart(runCallbacks, direction);
|
||||
} else if (!swiper.animating) {
|
||||
swiper.animating = true;
|
||||
|
||||
if (!swiper.animating) {
|
||||
swiper.animating = true;
|
||||
|
||||
if (!swiper.onSlideToWrapperTransitionEnd) {
|
||||
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
||||
if (!swiper || swiper.destroyed) return;
|
||||
if (e.target !== this) return;
|
||||
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.onSlideToWrapperTransitionEnd = null;
|
||||
delete swiper.onSlideToWrapperTransitionEnd;
|
||||
swiper.transitionEnd(runCallbacks, direction);
|
||||
};
|
||||
}
|
||||
|
||||
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
||||
if (!swiper.onSlideToWrapperTransitionEnd) {
|
||||
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
||||
if (!swiper || swiper.destroyed) return;
|
||||
if (e.target !== this) return;
|
||||
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.onSlideToWrapperTransitionEnd = null;
|
||||
delete swiper.onSlideToWrapperTransitionEnd;
|
||||
swiper.transitionEnd(runCallbacks, direction);
|
||||
};
|
||||
}
|
||||
|
||||
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
||||
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2734,6 +2726,10 @@ function slideNext(speed = this.params.speed, runCallbacks = true, internal) {
|
||||
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
||||
}
|
||||
|
||||
if (params.rewind && swiper.isEnd) {
|
||||
return swiper.slideTo(0, speed, runCallbacks, internal);
|
||||
}
|
||||
|
||||
return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
|
||||
}
|
||||
|
||||
@@ -2794,6 +2790,10 @@ function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.rewind && swiper.isBeginning) {
|
||||
return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal);
|
||||
}
|
||||
|
||||
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
||||
}
|
||||
|
||||
@@ -4061,6 +4061,8 @@ var defaults = {
|
||||
loopedSlides: null,
|
||||
loopFillGroupWithBlank: false,
|
||||
loopPreventsSlide: true,
|
||||
// rewind
|
||||
rewind: false,
|
||||
// Swiping/no swiping
|
||||
allowSlidePrev: true,
|
||||
allowSlideNext: true,
|
||||
@@ -5637,19 +5639,19 @@ function Navigation({
|
||||
$nextEl,
|
||||
$prevEl
|
||||
} = swiper.navigation;
|
||||
toggleEl($prevEl, swiper.isBeginning);
|
||||
toggleEl($nextEl, swiper.isEnd);
|
||||
toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);
|
||||
toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);
|
||||
}
|
||||
|
||||
function onPrevClick(e) {
|
||||
e.preventDefault();
|
||||
if (swiper.isBeginning && !swiper.params.loop) return;
|
||||
if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;
|
||||
swiper.slidePrev();
|
||||
}
|
||||
|
||||
function onNextClick(e) {
|
||||
e.preventDefault();
|
||||
if (swiper.isEnd && !swiper.params.loop) return;
|
||||
if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;
|
||||
swiper.slideNext();
|
||||
}
|
||||
|
||||
@@ -5864,7 +5866,7 @@ function Pagination({
|
||||
$el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);
|
||||
|
||||
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
||||
dynamicBulletIndex += current - swiper.previousIndex;
|
||||
dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);
|
||||
|
||||
if (dynamicBulletIndex > params.dynamicMainBullets - 1) {
|
||||
dynamicBulletIndex = params.dynamicMainBullets - 1;
|
||||
@@ -5873,7 +5875,7 @@ function Pagination({
|
||||
}
|
||||
}
|
||||
|
||||
firstIndex = current - dynamicBulletIndex;
|
||||
firstIndex = Math.max(current - dynamicBulletIndex, 0);
|
||||
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
||||
midIndex = (lastIndex + firstIndex) / 2;
|
||||
}
|
||||
@@ -5917,7 +5919,7 @@ function Pagination({
|
||||
}
|
||||
|
||||
if (swiper.params.loop) {
|
||||
if (bulletIndex >= bullets.length - params.dynamicMainBullets) {
|
||||
if (bulletIndex >= bullets.length) {
|
||||
for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {
|
||||
bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);
|
||||
}
|
||||
@@ -7843,7 +7845,7 @@ function A11y({
|
||||
}
|
||||
|
||||
function updateNavigation() {
|
||||
if (swiper.params.loop || !swiper.navigation) return;
|
||||
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
|
||||
const {
|
||||
$nextEl,
|
||||
$prevEl
|
||||
@@ -7871,23 +7873,34 @@ function A11y({
|
||||
}
|
||||
|
||||
function hasPagination() {
|
||||
return swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
||||
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
||||
}
|
||||
|
||||
function hasClickablePagination() {
|
||||
return hasPagination() && swiper.params.pagination.clickable;
|
||||
}
|
||||
|
||||
function updatePagination() {
|
||||
const params = swiper.params.a11y;
|
||||
if (!hasPagination()) return;
|
||||
swiper.pagination.bullets.each(bulletEl => {
|
||||
const $bulletEl = $(bulletEl);
|
||||
|
||||
if (hasPagination()) {
|
||||
swiper.pagination.bullets.each(bulletEl => {
|
||||
const $bulletEl = $(bulletEl);
|
||||
if (swiper.params.pagination.clickable) {
|
||||
makeElFocusable($bulletEl);
|
||||
|
||||
if (!swiper.params.pagination.renderBullet) {
|
||||
addElRole($bulletEl, 'button');
|
||||
addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {
|
||||
$bulletEl.attr('aria-current', 'true');
|
||||
} else {
|
||||
$bulletEl.removeAttr('aria-current');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const initNavEl = ($el, wrapperId, message) => {
|
||||
@@ -7956,7 +7969,7 @@ function A11y({
|
||||
} // Pagination
|
||||
|
||||
|
||||
if (hasPagination()) {
|
||||
if (hasClickablePagination()) {
|
||||
swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
||||
}
|
||||
}
|
||||
@@ -7983,7 +7996,7 @@ function A11y({
|
||||
} // Pagination
|
||||
|
||||
|
||||
if (hasPagination()) {
|
||||
if (hasClickablePagination()) {
|
||||
swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user