framework7 7.0.0-beta.10 → 7.0.0-beta.15
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/components/actions/actions-class.js +6 -1
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -0
- package/components/actions/actions.js +1 -0
- package/components/actions/actions.lazy.js +1 -1
- package/components/actions/actions.less +3 -0
- package/components/breadcrumbs/breadcrumbs-aurora.less +2 -0
- package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
- package/components/breadcrumbs/breadcrumbs-md.less +2 -0
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
- package/components/breadcrumbs/breadcrumbs-vars.less +36 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +13 -0
- package/components/breadcrumbs/breadcrumbs.lazy.js +1 -0
- package/components/breadcrumbs/breadcrumbs.less +100 -0
- package/components/calendar/calendar-class.js +206 -122
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +6 -10
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.d.ts +2 -0
- package/components/calendar/calendar.js +1 -0
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/calendar/calendar.less +20 -16
- package/components/list-index/list-index.d.ts +1 -1
- package/components/modal/modal-class.js +10 -0
- package/components/notification/notification.d.ts +4 -4
- package/components/picker/picker-class.js +6 -6
- package/components/picker/picker-column.js +34 -270
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.d.ts +2 -13
- package/components/picker/picker.js +0 -5
- package/components/picker/picker.lazy.js +1 -1
- package/components/picker/picker.less +28 -10
- package/components/popover/popover-class.js +15 -2
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +1 -0
- package/components/popover/popover.lazy.js +1 -1
- package/components/popover/popover.less +3 -0
- package/components/popup/popup-class.js +6 -1
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.d.ts +4 -0
- package/components/popup/popup.js +1 -0
- package/components/popup/popup.lazy.js +1 -1
- package/components/popup/popup.less +4 -0
- package/components/preloader/preloader-ios.less +3 -0
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.d.ts +4 -0
- package/components/progressbar/progressbar-aurora.less +32 -13
- package/components/progressbar/progressbar-ios.less +19 -7
- package/components/progressbar/progressbar-md.less +64 -28
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +1 -1
- package/components/progressbar/progressbar.lazy.js +1 -1
- package/components/progressbar/progressbar.less +16 -4
- package/components/range/range.d.ts +23 -5
- package/components/sheet/sheet-class.js +6 -1
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.d.ts +2 -0
- package/components/sheet/sheet.js +1 -0
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/sheet/sheet.less +3 -0
- package/components/sortable/sortable.d.ts +5 -1
- package/components/sortable/sortable.js +15 -2
- package/components/sortable/sortable.lazy.js +1 -1
- package/components/statusbar/statusbar.d.ts +9 -9
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.lazy.js +1 -1
- package/components/tabs/tabs.js +4 -5
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/toast/toast.d.ts +2 -2
- package/components/toolbar/toolbar-aurora.less +0 -13
- package/components/toolbar/toolbar-md.less +0 -13
- package/components/toolbar/toolbar.js +1 -1
- package/components/toolbar/toolbar.less +13 -0
- package/components/view/view-class.js +8 -1
- package/components/view/view.d.ts +5 -1
- package/components/view/view.js +2 -0
- package/components/virtual-list/virtual-list-class.js +44 -7
- package/components/virtual-list/virtual-list.d.ts +2 -2
- package/components/virtual-list/virtual-list.lazy.js +1 -1
- package/framework7-bundle-rtl.css +252 -150
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +237 -134
- package/framework7-bundle.esm.js +5 -4
- package/framework7-bundle.js +982 -724
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +4 -3
- package/framework7-bundle.min.css +4 -4
- package/framework7-bundle.min.js +4 -4
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +5 -4
- package/framework7-lite.esm.js +3 -3
- package/framework7-rtl.css +12 -21
- package/framework7-rtl.min.css +4 -4
- package/framework7-types.d.ts +5 -1
- package/framework7.css +11 -19
- package/framework7.d.ts +4 -0
- package/framework7.esm.js +3 -3
- package/framework7.js +49 -17
- package/framework7.js.map +1 -1
- package/framework7.less +3 -3
- package/framework7.min.css +4 -4
- package/framework7.min.js +4 -4
- package/framework7.min.js.map +1 -1
- package/modules/component/component.d.ts +2 -2
- package/modules/device/device.js +1 -1
- package/modules/router/back.js +11 -1
- package/modules/router/tab.js +1 -1
- package/package.json +10 -5
- package/shared/get-device.d.ts +0 -2
- package/shared/get-device.js +1 -2
package/framework7-bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 7.0.0-beta.
|
|
2
|
+
* Framework7 7.0.0-beta.15
|
|
3
3
|
* Full featured mobile HTML framework for building iOS & Android apps
|
|
4
4
|
* https://framework7.io/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2022 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: April 11, 2022
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
(function (global, factory) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}(this, (function () { 'use strict';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* SSR Window 4.0.
|
|
20
|
+
* SSR Window 4.0.2
|
|
21
21
|
* Better handling for window object in SSR environment
|
|
22
22
|
* https://github.com/nolimits4web/ssr-window
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Licensed under MIT
|
|
27
27
|
*
|
|
28
|
-
* Released on:
|
|
28
|
+
* Released on: December 13, 2021
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/* eslint-disable no-param-reassign */
|
|
@@ -196,15 +196,15 @@
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
|
-
* Dom7 4.0.
|
|
199
|
+
* Dom7 4.0.4
|
|
200
200
|
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
|
201
201
|
* https://framework7.io/docs/dom7.html
|
|
202
202
|
*
|
|
203
|
-
* Copyright
|
|
203
|
+
* Copyright 2022, Vladimir Kharlampidi
|
|
204
204
|
*
|
|
205
205
|
* Licensed under MIT
|
|
206
206
|
*
|
|
207
|
-
* Released on:
|
|
207
|
+
* Released on: January 11, 2022
|
|
208
208
|
*/
|
|
209
209
|
/* eslint-disable no-proto */
|
|
210
210
|
|
|
@@ -224,8 +224,12 @@
|
|
|
224
224
|
|
|
225
225
|
class Dom7 extends Array {
|
|
226
226
|
constructor(items) {
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
if (typeof items === 'number') {
|
|
228
|
+
super(items);
|
|
229
|
+
} else {
|
|
230
|
+
super(...(items || []));
|
|
231
|
+
makeReactive(this);
|
|
232
|
+
}
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
}
|
|
@@ -1819,7 +1823,7 @@
|
|
|
1819
1823
|
const window = getWindow();
|
|
1820
1824
|
return window.requestAnimationFrame(callback);
|
|
1821
1825
|
}
|
|
1822
|
-
function cancelAnimationFrame
|
|
1826
|
+
function cancelAnimationFrame(frameId) {
|
|
1823
1827
|
const window = getWindow();
|
|
1824
1828
|
return window.cancelAnimationFrame(frameId);
|
|
1825
1829
|
}
|
|
@@ -2151,7 +2155,7 @@
|
|
|
2151
2155
|
eventNameToColonCase: eventNameToColonCase,
|
|
2152
2156
|
deleteProps: deleteProps$1,
|
|
2153
2157
|
requestAnimationFrame: requestAnimationFrame$1,
|
|
2154
|
-
cancelAnimationFrame: cancelAnimationFrame
|
|
2158
|
+
cancelAnimationFrame: cancelAnimationFrame,
|
|
2155
2159
|
nextTick: nextTick$1,
|
|
2156
2160
|
nextFrame: nextFrame$1,
|
|
2157
2161
|
now: now$1,
|
|
@@ -2233,8 +2237,7 @@
|
|
|
2233
2237
|
firefox: false,
|
|
2234
2238
|
macos: false,
|
|
2235
2239
|
windows: false,
|
|
2236
|
-
cordova: !!
|
|
2237
|
-
phonegap: !!(window.cordova || window.phonegap),
|
|
2240
|
+
cordova: !!window.cordova,
|
|
2238
2241
|
electron: false,
|
|
2239
2242
|
capacitor: !!window.Capacitor,
|
|
2240
2243
|
nwjs: false
|
|
@@ -3212,7 +3215,7 @@
|
|
|
3212
3215
|
}
|
|
3213
3216
|
}
|
|
3214
3217
|
|
|
3215
|
-
if (device.cordova
|
|
3218
|
+
if (device.cordova) {
|
|
3216
3219
|
classNames.push('device-cordova');
|
|
3217
3220
|
}
|
|
3218
3221
|
|
|
@@ -6886,7 +6889,7 @@
|
|
|
6886
6889
|
|
|
6887
6890
|
|
|
6888
6891
|
if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
|
|
6889
|
-
History$1.
|
|
6892
|
+
History$1[router.params.browserHistoryTabs](router.view.id, {
|
|
6890
6893
|
url: options.route.url
|
|
6891
6894
|
}, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
|
|
6892
6895
|
} // Update Router History
|
|
@@ -7352,7 +7355,7 @@
|
|
|
7352
7355
|
const $el = $(el);
|
|
7353
7356
|
const app = router.app;
|
|
7354
7357
|
const view = router.view;
|
|
7355
|
-
const options = extend$1({
|
|
7358
|
+
const options = extend$1(false, {
|
|
7356
7359
|
animate: router.params.animate,
|
|
7357
7360
|
browserHistory: true,
|
|
7358
7361
|
replaceState: false
|
|
@@ -8060,6 +8063,16 @@
|
|
|
8060
8063
|
}
|
|
8061
8064
|
|
|
8062
8065
|
const previousPageRoute = $previousPage[0].f7Page.route;
|
|
8066
|
+
|
|
8067
|
+
if (navigateOptions.preload && $previousPage.hasClass('stacked')) {
|
|
8068
|
+
loadBack(router, {
|
|
8069
|
+
el: $previousPage
|
|
8070
|
+
}, extend$1(navigateOptions, {
|
|
8071
|
+
route: previousPageRoute
|
|
8072
|
+
}));
|
|
8073
|
+
return router;
|
|
8074
|
+
}
|
|
8075
|
+
|
|
8063
8076
|
processRouteQueue.call(router, previousPageRoute, router.currentRoute, () => {
|
|
8064
8077
|
loadBack(router, {
|
|
8065
8078
|
el: $previousPage
|
|
@@ -10077,7 +10090,14 @@
|
|
|
10077
10090
|
view.initMasterDetail();
|
|
10078
10091
|
}
|
|
10079
10092
|
|
|
10080
|
-
view.
|
|
10093
|
+
if (view.params.initRouterOnTabShow && view.$el.hasClass('tab') && !view.$el.hasClass('tab-active')) {
|
|
10094
|
+
view.$el.once('tab:show', () => {
|
|
10095
|
+
view.router.init();
|
|
10096
|
+
});
|
|
10097
|
+
} else {
|
|
10098
|
+
view.router.init();
|
|
10099
|
+
}
|
|
10100
|
+
|
|
10081
10101
|
view.$el.trigger('view:init');
|
|
10082
10102
|
view.emit('local::init viewInit', view);
|
|
10083
10103
|
}
|
|
@@ -12632,6 +12652,7 @@
|
|
|
12632
12652
|
params: {
|
|
12633
12653
|
view: {
|
|
12634
12654
|
init: true,
|
|
12655
|
+
initRouterOnTabShow: false,
|
|
12635
12656
|
name: undefined,
|
|
12636
12657
|
main: false,
|
|
12637
12658
|
router: true,
|
|
@@ -12682,6 +12703,7 @@
|
|
|
12682
12703
|
browserHistoryOnLoad: true,
|
|
12683
12704
|
browserHistoryInitialMatch: false,
|
|
12684
12705
|
browserHistoryStoreHistory: true,
|
|
12706
|
+
browserHistoryTabs: 'replace',
|
|
12685
12707
|
// Animate Pages
|
|
12686
12708
|
animate: true,
|
|
12687
12709
|
// iOS Dynamic Navbar
|
|
@@ -13596,8 +13618,8 @@
|
|
|
13596
13618
|
const Toolbar = {
|
|
13597
13619
|
setHighlight(tabbarEl) {
|
|
13598
13620
|
const app = this;
|
|
13599
|
-
if (app.theme === 'ios') return;
|
|
13600
13621
|
const $tabbarEl = $(tabbarEl);
|
|
13622
|
+
if (app.theme === 'ios' && !$tabbarEl.hasClass('tabbar-highlight')) return;
|
|
13601
13623
|
if ($tabbarEl.length === 0 || !($tabbarEl.hasClass('tabbar') || $tabbarEl.hasClass('tabbar-labels'))) return;
|
|
13602
13624
|
let $highlightEl = $tabbarEl.find('.tab-link-highlight');
|
|
13603
13625
|
const tabLinksCount = $tabbarEl.find('.tab-link').length;
|
|
@@ -14013,6 +14035,11 @@
|
|
|
14013
14035
|
if (!modal.type || !modal.$el) return;
|
|
14014
14036
|
modal.$el.removeClass('modal-out');
|
|
14015
14037
|
modal.$el.hide();
|
|
14038
|
+
|
|
14039
|
+
if (modal.params.backdrop && (modal.params.backdropUnique || modal.forceBackdropUnique) && modal.$backdropEl) {
|
|
14040
|
+
modal.$backdropEl.remove();
|
|
14041
|
+
}
|
|
14042
|
+
|
|
14016
14043
|
modal.$el.trigger(`modal:closed ${modal.type.toLowerCase()}:closed`);
|
|
14017
14044
|
modal.emit(`local::closed modalClosed ${modal.type}Closed`, modal);
|
|
14018
14045
|
}
|
|
@@ -14070,8 +14097,13 @@
|
|
|
14070
14097
|
|
|
14071
14098
|
|
|
14072
14099
|
$el.show();
|
|
14100
|
+
|
|
14101
|
+
if (modal.params.backdrop && (modal.params.backdropUnique || modal.forceBackdropUnique) && modal.$backdropEl) {
|
|
14102
|
+
modal.$backdropEl.insertBefore($el);
|
|
14103
|
+
}
|
|
14073
14104
|
/* eslint no-underscore-dangle: ["error", { "allow": ["_clientLeft"] }] */
|
|
14074
14105
|
|
|
14106
|
+
|
|
14075
14107
|
modal._clientLeft = $el[0].clientLeft; // Modal
|
|
14076
14108
|
|
|
14077
14109
|
function transitionEnd() {
|
|
@@ -14828,7 +14860,12 @@
|
|
|
14828
14860
|
if (popup.params.backdrop && popup.params.backdropEl) {
|
|
14829
14861
|
$backdropEl = $(popup.params.backdropEl);
|
|
14830
14862
|
} else if (popup.params.backdrop) {
|
|
14831
|
-
|
|
14863
|
+
if (popup.params.backdropUnique) {
|
|
14864
|
+
$backdropEl = $('<div class="popup-backdrop popup-backdrop-unique"></div>');
|
|
14865
|
+
popup.$containerEl.append($backdropEl);
|
|
14866
|
+
} else {
|
|
14867
|
+
$backdropEl = popup.$containerEl.children('.popup-backdrop');
|
|
14868
|
+
}
|
|
14832
14869
|
|
|
14833
14870
|
if ($backdropEl.length === 0) {
|
|
14834
14871
|
$backdropEl = $('<div class="popup-backdrop"></div>');
|
|
@@ -15179,6 +15216,7 @@
|
|
|
15179
15216
|
popup: {
|
|
15180
15217
|
backdrop: true,
|
|
15181
15218
|
backdropEl: undefined,
|
|
15219
|
+
backdropUnique: false,
|
|
15182
15220
|
closeByBackdropClick: true,
|
|
15183
15221
|
closeOnEscape: false,
|
|
15184
15222
|
swipeToClose: false,
|
|
@@ -15312,11 +15350,18 @@
|
|
|
15312
15350
|
|
|
15313
15351
|
|
|
15314
15352
|
let $backdropEl;
|
|
15353
|
+
const forceBackdropUnique = popover.params.backdrop && app.$el.find('.popover.modal-in').filter(anotherPopoverEl => anotherPopoverEl !== $el[0]).length > 0;
|
|
15315
15354
|
|
|
15316
15355
|
if (popover.params.backdrop && popover.params.backdropEl) {
|
|
15317
15356
|
$backdropEl = $(popover.params.backdropEl);
|
|
15318
15357
|
} else if (popover.params.backdrop) {
|
|
15319
|
-
|
|
15358
|
+
if (popover.params.backdropUnique || forceBackdropUnique) {
|
|
15359
|
+
$backdropEl = $('<div class="popover-backdrop popover-backdrop-unique"></div>');
|
|
15360
|
+
$backdropEl[0].f7PopoverRef = popover;
|
|
15361
|
+
popover.$containerEl.append($backdropEl);
|
|
15362
|
+
} else {
|
|
15363
|
+
$backdropEl = popover.$containerEl.children('.popover-backdrop');
|
|
15364
|
+
}
|
|
15320
15365
|
|
|
15321
15366
|
if ($backdropEl.length === 0) {
|
|
15322
15367
|
$backdropEl = $('<div class="popover-backdrop"></div>');
|
|
@@ -15347,6 +15392,7 @@
|
|
|
15347
15392
|
$backdropEl,
|
|
15348
15393
|
backdropEl: $backdropEl && $backdropEl[0],
|
|
15349
15394
|
type: 'popover',
|
|
15395
|
+
forceBackdropUnique,
|
|
15350
15396
|
|
|
15351
15397
|
open(...args) {
|
|
15352
15398
|
let [targetEl, animate] = args;
|
|
@@ -15391,7 +15437,12 @@
|
|
|
15391
15437
|
if (popover.params.closeByBackdropClick && popover.params.backdrop && popover.backdropEl && popover.backdropEl === target && touchStartTarget === target) {
|
|
15392
15438
|
popover.close();
|
|
15393
15439
|
} else if (popover.params.closeByOutsideClick && touchStartTarget === target) {
|
|
15394
|
-
popover.
|
|
15440
|
+
const isAnotherPopoverBackdrop = $target.hasClass('popover-backdrop-unique') && target.f7PopoverRef !== popover || $target.hasClass('popover-backdrop') && target !== popover.backdropEl;
|
|
15441
|
+
const isAnotherPopoverTarget = target.closest('.popover') && target.closest('.popover') !== popover.$el[0];
|
|
15442
|
+
|
|
15443
|
+
if (!isAnotherPopoverBackdrop && !isAnotherPopoverTarget) {
|
|
15444
|
+
popover.close();
|
|
15445
|
+
}
|
|
15395
15446
|
}
|
|
15396
15447
|
}
|
|
15397
15448
|
}
|
|
@@ -15605,6 +15656,7 @@
|
|
|
15605
15656
|
popover: {
|
|
15606
15657
|
backdrop: true,
|
|
15607
15658
|
backdropEl: undefined,
|
|
15659
|
+
backdropUnique: false,
|
|
15608
15660
|
closeByBackdropClick: true,
|
|
15609
15661
|
closeByOutsideClick: true,
|
|
15610
15662
|
closeOnEscape: false,
|
|
@@ -15724,7 +15776,12 @@
|
|
|
15724
15776
|
if (actions.params.backdrop && actions.params.backdropEl) {
|
|
15725
15777
|
$backdropEl = $(actions.params.backdropEl);
|
|
15726
15778
|
} else if (actions.params.backdrop) {
|
|
15727
|
-
|
|
15779
|
+
if (actions.params.backdropUnique) {
|
|
15780
|
+
$backdropEl = $('<div class="popup-backdrop popup-backdrop-unique"></div>');
|
|
15781
|
+
actions.$containerEl.append($backdropEl);
|
|
15782
|
+
} else {
|
|
15783
|
+
$backdropEl = actions.$containerEl.children('.actions-backdrop');
|
|
15784
|
+
}
|
|
15728
15785
|
|
|
15729
15786
|
if ($backdropEl.length === 0) {
|
|
15730
15787
|
$backdropEl = $('<div class="actions-backdrop"></div>');
|
|
@@ -16036,6 +16093,7 @@
|
|
|
16036
16093
|
forceToPopover: false,
|
|
16037
16094
|
backdrop: true,
|
|
16038
16095
|
backdropEl: undefined,
|
|
16096
|
+
backdropUnique: false,
|
|
16039
16097
|
cssClass: null,
|
|
16040
16098
|
closeByBackdropClick: true,
|
|
16041
16099
|
closeOnEscape: false,
|
|
@@ -16109,7 +16167,12 @@
|
|
|
16109
16167
|
if (sheet.params.backdrop && sheet.params.backdropEl) {
|
|
16110
16168
|
$backdropEl = $(sheet.params.backdropEl);
|
|
16111
16169
|
} else if (sheet.params.backdrop) {
|
|
16112
|
-
|
|
16170
|
+
if (sheet.params.backdropUnique) {
|
|
16171
|
+
$backdropEl = $('<div class="sheet-backdrop sheet-backdrop-unique"></div>');
|
|
16172
|
+
sheet.$containerEl.append($backdropEl);
|
|
16173
|
+
} else {
|
|
16174
|
+
$backdropEl = sheet.$containerEl.children('.sheet-backdrop');
|
|
16175
|
+
}
|
|
16113
16176
|
|
|
16114
16177
|
if ($backdropEl.length === 0) {
|
|
16115
16178
|
$backdropEl = $('<div class="sheet-backdrop"></div>');
|
|
@@ -16629,6 +16692,7 @@
|
|
|
16629
16692
|
push: false,
|
|
16630
16693
|
backdrop: undefined,
|
|
16631
16694
|
backdropEl: undefined,
|
|
16695
|
+
backdropUnique: false,
|
|
16632
16696
|
closeByBackdropClick: true,
|
|
16633
16697
|
closeByOutsideClick: false,
|
|
16634
16698
|
closeOnEscape: false,
|
|
@@ -16987,7 +17051,7 @@
|
|
|
16987
17051
|
$progressbarEl.append($progressbarLine);
|
|
16988
17052
|
}
|
|
16989
17053
|
|
|
16990
|
-
$progressbarLine.transition(typeof duration !== 'undefined' ? duration : '').transform(`translate3d(${-100 + progressNormalized}%,0,0)`);
|
|
17054
|
+
$progressbarLine.transition(typeof duration !== 'undefined' ? duration : '').transform(`translate3d(${(-100 + progressNormalized) * (app.rtl ? -1 : 1)}%,0,0)`);
|
|
16991
17055
|
return $progressbarEl[0];
|
|
16992
17056
|
},
|
|
16993
17057
|
|
|
@@ -17233,18 +17297,31 @@
|
|
|
17233
17297
|
const currentElOffset = $currentEl[0].offsetTop;
|
|
17234
17298
|
const currentElHeight = $currentEl.height();
|
|
17235
17299
|
const sortingElOffset = sortingElOffsetLocal + translate;
|
|
17300
|
+
let currentTranslate;
|
|
17301
|
+
const prevTranslate = $currentEl[0].f7Translate;
|
|
17236
17302
|
|
|
17237
17303
|
if (sortingElOffset >= currentElOffset - currentElHeight / 2 && $sortingEl.index() < $currentEl.index()) {
|
|
17238
|
-
|
|
17304
|
+
currentTranslate = -sortingElHeight;
|
|
17305
|
+
$currentEl.transform(`translate3d(0, ${currentTranslate}px,0)`);
|
|
17239
17306
|
$insertAfterEl = $currentEl;
|
|
17240
17307
|
$insertBeforeEl = undefined;
|
|
17241
17308
|
} else if (sortingElOffset <= currentElOffset + currentElHeight / 2 && $sortingEl.index() > $currentEl.index()) {
|
|
17242
|
-
|
|
17309
|
+
currentTranslate = sortingElHeight;
|
|
17310
|
+
$currentEl[0].f7Translate = currentTranslate;
|
|
17311
|
+
$currentEl.transform(`translate3d(0, ${currentTranslate}px,0)`);
|
|
17243
17312
|
$insertAfterEl = undefined;
|
|
17244
17313
|
if (!$insertBeforeEl) $insertBeforeEl = $currentEl;
|
|
17245
17314
|
} else {
|
|
17315
|
+
currentTranslate = undefined;
|
|
17246
17316
|
$currentEl.transform('translate3d(0, 0%,0)');
|
|
17247
17317
|
}
|
|
17318
|
+
|
|
17319
|
+
if (prevTranslate !== currentTranslate) {
|
|
17320
|
+
$currentEl.trigger('sortable:move');
|
|
17321
|
+
app.emit('sortableMove', $currentEl[0], $sortableContainer[0]);
|
|
17322
|
+
}
|
|
17323
|
+
|
|
17324
|
+
$currentEl[0].f7Translate = currentTranslate;
|
|
17248
17325
|
});
|
|
17249
17326
|
}
|
|
17250
17327
|
|
|
@@ -18254,7 +18331,8 @@
|
|
|
18254
18331
|
rowsToRender: undefined,
|
|
18255
18332
|
maxBufferHeight: 0,
|
|
18256
18333
|
listHeight: undefined,
|
|
18257
|
-
dynamicHeight: typeof vl.params.height === 'function'
|
|
18334
|
+
dynamicHeight: typeof vl.params.height === 'function',
|
|
18335
|
+
autoHeight: vl.params.height === 'auto'
|
|
18258
18336
|
}); // Install Modules
|
|
18259
18337
|
|
|
18260
18338
|
vl.useModules(); // Attach events
|
|
@@ -18295,10 +18373,13 @@
|
|
|
18295
18373
|
return vl;
|
|
18296
18374
|
}
|
|
18297
18375
|
|
|
18298
|
-
setListSize() {
|
|
18376
|
+
setListSize(autoHeightRerender) {
|
|
18299
18377
|
const vl = this;
|
|
18300
18378
|
const items = vl.filteredItems || vl.items;
|
|
18301
|
-
|
|
18379
|
+
|
|
18380
|
+
if (!autoHeightRerender) {
|
|
18381
|
+
vl.pageHeight = vl.$scrollableParentEl[0].offsetHeight;
|
|
18382
|
+
}
|
|
18302
18383
|
|
|
18303
18384
|
if (vl.dynamicHeight) {
|
|
18304
18385
|
vl.listHeight = 0;
|
|
@@ -18309,6 +18390,31 @@
|
|
|
18309
18390
|
vl.listHeight += itemHeight;
|
|
18310
18391
|
vl.heights.push(itemHeight);
|
|
18311
18392
|
}
|
|
18393
|
+
} else if (vl.autoHeight) {
|
|
18394
|
+
vl.listHeight = 0;
|
|
18395
|
+
if (!vl.heights) vl.heights = [];
|
|
18396
|
+
if (!vl.heightsCalculated) vl.heightsCalculated = [];
|
|
18397
|
+
const renderedItems = {};
|
|
18398
|
+
vl.$itemsWrapEl.find(`[data-virtual-list-index]`).forEach(el => {
|
|
18399
|
+
renderedItems[parseInt(el.getAttribute('data-virtual-list-index'), 10)] = el;
|
|
18400
|
+
});
|
|
18401
|
+
|
|
18402
|
+
for (let i = 0; i < items.length; i += 1) {
|
|
18403
|
+
const renderedItem = renderedItems[i];
|
|
18404
|
+
|
|
18405
|
+
if (renderedItem) {
|
|
18406
|
+
if (!vl.heightsCalculated.includes(i)) {
|
|
18407
|
+
vl.heights[i] = renderedItem.offsetHeight;
|
|
18408
|
+
vl.heightsCalculated.push(i);
|
|
18409
|
+
}
|
|
18410
|
+
}
|
|
18411
|
+
|
|
18412
|
+
if (typeof vl.heights[i] === 'undefined') {
|
|
18413
|
+
vl.heights[i] = 40;
|
|
18414
|
+
}
|
|
18415
|
+
|
|
18416
|
+
vl.listHeight += vl.heights[i];
|
|
18417
|
+
}
|
|
18312
18418
|
} else {
|
|
18313
18419
|
vl.listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height;
|
|
18314
18420
|
vl.rowsPerScreen = Math.ceil(vl.pageHeight / vl.params.height);
|
|
@@ -18343,7 +18449,7 @@
|
|
|
18343
18449
|
let heightBeforeFirstItem = 0;
|
|
18344
18450
|
let heightBeforeLastItem = 0;
|
|
18345
18451
|
|
|
18346
|
-
if (vl.dynamicHeight) {
|
|
18452
|
+
if (vl.dynamicHeight || vl.autoHeight) {
|
|
18347
18453
|
let itemTop = 0;
|
|
18348
18454
|
let itemHeight;
|
|
18349
18455
|
vl.maxBufferHeight = vl.pageHeight;
|
|
@@ -18410,7 +18516,7 @@
|
|
|
18410
18516
|
|
|
18411
18517
|
|
|
18412
18518
|
if (i === fromIndex) {
|
|
18413
|
-
if (vl.dynamicHeight) {
|
|
18519
|
+
if (vl.dynamicHeight || vl.autoHeight) {
|
|
18414
18520
|
topPosition = heightBeforeFirstItem;
|
|
18415
18521
|
} else {
|
|
18416
18522
|
topPosition = i * vl.params.height / vl.params.cols;
|
|
@@ -18428,7 +18534,7 @@
|
|
|
18428
18534
|
|
|
18429
18535
|
|
|
18430
18536
|
if (!vl.updatableScroll) {
|
|
18431
|
-
if (vl.dynamicHeight) {
|
|
18537
|
+
if (vl.dynamicHeight || vl.autoHeight) {
|
|
18432
18538
|
vl.itemsWrapEl.style.height = `${heightBeforeLastItem}px`;
|
|
18433
18539
|
} else {
|
|
18434
18540
|
vl.itemsWrapEl.style.height = `${i * vl.params.height / vl.params.cols}px`;
|
|
@@ -18468,6 +18574,12 @@
|
|
|
18468
18574
|
items: renderExternalItems
|
|
18469
18575
|
});
|
|
18470
18576
|
}
|
|
18577
|
+
|
|
18578
|
+
if (vl.autoHeight) {
|
|
18579
|
+
requestAnimationFrame(() => {
|
|
18580
|
+
vl.setListSize(true);
|
|
18581
|
+
});
|
|
18582
|
+
}
|
|
18471
18583
|
} // Filter
|
|
18472
18584
|
|
|
18473
18585
|
|
|
@@ -18504,7 +18616,7 @@
|
|
|
18504
18616
|
if (index > vl.items.length) return false;
|
|
18505
18617
|
let itemTop = 0;
|
|
18506
18618
|
|
|
18507
|
-
if (vl.dynamicHeight) {
|
|
18619
|
+
if (vl.dynamicHeight || vl.autoHeight) {
|
|
18508
18620
|
for (let i = 0; i < index; i += 1) {
|
|
18509
18621
|
itemTop += vl.heights[i];
|
|
18510
18622
|
}
|
|
@@ -18532,6 +18644,7 @@
|
|
|
18532
18644
|
const vl = this;
|
|
18533
18645
|
|
|
18534
18646
|
if (vl.isVisible()) {
|
|
18647
|
+
vl.heightsCalculated = [];
|
|
18535
18648
|
vl.setListSize();
|
|
18536
18649
|
vl.render(true);
|
|
18537
18650
|
}
|
|
@@ -18732,6 +18845,7 @@
|
|
|
18732
18845
|
vl.domCache = {};
|
|
18733
18846
|
}
|
|
18734
18847
|
|
|
18848
|
+
vl.heightsCalculated = [];
|
|
18735
18849
|
vl.setListSize();
|
|
18736
18850
|
vl.render(true);
|
|
18737
18851
|
}
|
|
@@ -19437,12 +19551,11 @@
|
|
|
19437
19551
|
if ($tabLinkEl && $tabLinkEl.length > 0) {
|
|
19438
19552
|
$tabLinkEl.addClass('tab-link-active'); // Material Highlight
|
|
19439
19553
|
|
|
19440
|
-
|
|
19441
|
-
|
|
19554
|
+
const $tabbarEl = $tabLinkEl.parents('.tabbar, .tabbar-labels');
|
|
19555
|
+
const hasHighlight = app.toolbar && $tabbarEl.length > 0 && ($tabbarEl.hasClass('tabbar-highlight') || app.theme !== 'ios');
|
|
19442
19556
|
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
}
|
|
19557
|
+
if (hasHighlight) {
|
|
19558
|
+
app.toolbar.setHighlight($tabbarEl);
|
|
19446
19559
|
}
|
|
19447
19560
|
}
|
|
19448
19561
|
}
|
|
@@ -25079,17 +25192,34 @@
|
|
|
25079
25192
|
allowTouchMove: true,
|
|
25080
25193
|
hasTimePicker: calendar.params.timePicker && !calendar.params.rangePicker && !calendar.params.multiple
|
|
25081
25194
|
});
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
|
|
25088
|
-
|
|
25089
|
-
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
|
|
25195
|
+
|
|
25196
|
+
calendar.dayFormatter = date => {
|
|
25197
|
+
const formatter = new Intl.DateTimeFormat(calendar.params.locale, {
|
|
25198
|
+
day: 'numeric'
|
|
25199
|
+
});
|
|
25200
|
+
return formatter.format(date).replace(/日/, '');
|
|
25201
|
+
};
|
|
25202
|
+
|
|
25203
|
+
calendar.monthFormatter = date => {
|
|
25204
|
+
const formatter = new Intl.DateTimeFormat(calendar.params.locale, {
|
|
25205
|
+
month: 'long'
|
|
25206
|
+
});
|
|
25207
|
+
return formatter.format(date);
|
|
25208
|
+
};
|
|
25209
|
+
|
|
25210
|
+
calendar.yearFormatter = date => {
|
|
25211
|
+
const formatter = new Intl.DateTimeFormat(calendar.params.locale, {
|
|
25212
|
+
year: 'numeric'
|
|
25213
|
+
});
|
|
25214
|
+
return formatter.format(date);
|
|
25215
|
+
};
|
|
25216
|
+
|
|
25217
|
+
calendar.timeSelectorFormatter = date => {
|
|
25218
|
+
const formatter = new Intl.DateTimeFormat(calendar.params.locale, calendar.params.timePickerFormat);
|
|
25219
|
+
return formatter.format(date);
|
|
25220
|
+
};
|
|
25221
|
+
|
|
25222
|
+
const timeFormatCheckDate = calendar.timeSelectorFormatter(new Date()).toLowerCase();
|
|
25093
25223
|
calendar.is12HoursFormat = timeFormatCheckDate.indexOf('pm') >= 0 || timeFormatCheckDate.indexOf('am') >= 0; // Auto names
|
|
25094
25224
|
|
|
25095
25225
|
let {
|
|
@@ -25137,6 +25267,7 @@
|
|
|
25137
25267
|
if (calendar.isPopover()) return;
|
|
25138
25268
|
if (!calendar.opened || calendar.closing) return;
|
|
25139
25269
|
if ($targetEl.closest('[class*="backdrop"]').length) return;
|
|
25270
|
+
if (calendar.monthPickerPopover || calendar.yearPickerPopover || calendar.timePickerPopover) return;
|
|
25140
25271
|
|
|
25141
25272
|
if ($inputEl && $inputEl.length > 0) {
|
|
25142
25273
|
if ($targetEl[0] !== $inputEl[0] && $targetEl.closest('.sheet-modal, .calendar-modal').length === 0) {
|
|
@@ -25351,61 +25482,17 @@
|
|
|
25351
25482
|
}
|
|
25352
25483
|
|
|
25353
25484
|
function onMonthSelectorClick() {
|
|
25354
|
-
|
|
25355
|
-
}
|
|
25356
|
-
|
|
25357
|
-
function onMonthSelectorItemClick() {
|
|
25358
|
-
const $clickedEl = $(this);
|
|
25359
|
-
|
|
25360
|
-
if ($clickedEl.hasClass('calendar-month-picker-item-current')) {
|
|
25361
|
-
$el.find('.calendar-month-picker').remove();
|
|
25362
|
-
return;
|
|
25363
|
-
}
|
|
25364
|
-
|
|
25365
|
-
$el.find('.calendar-month-picker-item-current').add($clickedEl).toggleClass('calendar-month-picker-item-current');
|
|
25366
|
-
const index = $clickedEl.index();
|
|
25367
|
-
const localeMonthIndex = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);
|
|
25368
|
-
const monthIndex = calendar.currentMonth;
|
|
25369
|
-
const diff = localeMonthIndex - monthIndex;
|
|
25370
|
-
const diffIndex = index - diff;
|
|
25371
|
-
calendar.setYearMonth(calendar.currentYear, diffIndex, 0);
|
|
25372
|
-
setTimeout(() => {
|
|
25373
|
-
$el.find('.calendar-month-picker').remove();
|
|
25374
|
-
}, 200);
|
|
25485
|
+
calendar.openMonthPicker();
|
|
25375
25486
|
}
|
|
25376
25487
|
|
|
25377
25488
|
function onYearSelectorClick() {
|
|
25378
|
-
|
|
25379
|
-
const $currentEl = $el.find('.calendar-year-picker-item-current');
|
|
25380
|
-
const $yearPickerEl = $el.find('.calendar-year-picker');
|
|
25381
|
-
if (!$currentEl || !$currentEl.length) return;
|
|
25382
|
-
$yearPickerEl.scrollTop($currentEl[0].offsetTop - $yearPickerEl[0].offsetHeight / 2 + $currentEl[0].offsetHeight / 2);
|
|
25383
|
-
}
|
|
25384
|
-
|
|
25385
|
-
function onYearSelectorItemClick() {
|
|
25386
|
-
const $clickedEl = $(this);
|
|
25387
|
-
|
|
25388
|
-
if ($clickedEl.hasClass('calendar-year-picker-item-current')) {
|
|
25389
|
-
$el.find('.calendar-year-picker').remove();
|
|
25390
|
-
return;
|
|
25391
|
-
}
|
|
25392
|
-
|
|
25393
|
-
$el.find('.calendar-year-picker-item-current').add($clickedEl).toggleClass('calendar-year-picker-item-current');
|
|
25394
|
-
const year = parseInt($clickedEl.attr('data-year'), 10);
|
|
25395
|
-
calendar.setYearMonth(year, undefined, 0);
|
|
25396
|
-
setTimeout(() => {
|
|
25397
|
-
$el.find('.calendar-year-picker').remove();
|
|
25398
|
-
}, 200);
|
|
25489
|
+
calendar.openYearPicker();
|
|
25399
25490
|
}
|
|
25400
25491
|
|
|
25401
25492
|
function onTimeSelectorClick() {
|
|
25402
25493
|
calendar.openTimePicker();
|
|
25403
25494
|
}
|
|
25404
25495
|
|
|
25405
|
-
function onTimePickerCloseClick() {
|
|
25406
|
-
calendar.closeTimePicker();
|
|
25407
|
-
}
|
|
25408
|
-
|
|
25409
25496
|
const passiveListener = app.touchEvents.start === 'touchstart' && getSupport$1().passiveListener ? {
|
|
25410
25497
|
passive: true,
|
|
25411
25498
|
capture: false
|
|
@@ -25418,17 +25505,14 @@
|
|
|
25418
25505
|
|
|
25419
25506
|
if (calendar.params.monthPicker) {
|
|
25420
25507
|
$el.find('.current-month-value').on('click', onMonthSelectorClick);
|
|
25421
|
-
$el.on('click', '.calendar-month-picker-item', onMonthSelectorItemClick);
|
|
25422
25508
|
}
|
|
25423
25509
|
|
|
25424
25510
|
if (calendar.params.yearPicker) {
|
|
25425
25511
|
$el.find('.current-year-value').on('click', onYearSelectorClick);
|
|
25426
|
-
$el.on('click', '.calendar-year-picker-item', onYearSelectorItemClick);
|
|
25427
25512
|
}
|
|
25428
25513
|
|
|
25429
25514
|
if (calendar.hasTimePicker) {
|
|
25430
25515
|
$el.find('.calendar-time-selector a').on('click', onTimeSelectorClick);
|
|
25431
|
-
$el.on('click', '.calendar-time-picker-close', onTimePickerCloseClick);
|
|
25432
25516
|
} // Day clicks
|
|
25433
25517
|
|
|
25434
25518
|
|
|
@@ -25448,17 +25532,14 @@
|
|
|
25448
25532
|
|
|
25449
25533
|
if (calendar.params.monthPicker) {
|
|
25450
25534
|
$el.find('.current-month-value').off('click', onMonthSelectorClick);
|
|
25451
|
-
$el.off('click', '.calendar-month-picker-item', onMonthSelectorItemClick);
|
|
25452
25535
|
}
|
|
25453
25536
|
|
|
25454
25537
|
if (calendar.params.yearPicker) {
|
|
25455
25538
|
$el.find('.current-year-value').off('click', onYearSelectorClick);
|
|
25456
|
-
$el.off('click', '.calendar-year-picker-item', onYearSelectorItemClick);
|
|
25457
25539
|
}
|
|
25458
25540
|
|
|
25459
25541
|
if (calendar.hasTimePicker) {
|
|
25460
25542
|
$el.find('.calendar-time-selector a').off('click', onTimeSelectorClick);
|
|
25461
|
-
$el.off('click', '.calendar-time-picker-close', onTimePickerCloseClick);
|
|
25462
25543
|
}
|
|
25463
25544
|
|
|
25464
25545
|
$wrapperEl.off('click', handleDayClick);
|
|
@@ -25518,7 +25599,7 @@
|
|
|
25518
25599
|
|
|
25519
25600
|
for (let i = 0; i < 24; i += 1) {
|
|
25520
25601
|
const date = new Date().setMonth(i, 1);
|
|
25521
|
-
const currentYear = calendar.yearFormatter
|
|
25602
|
+
const currentYear = calendar.yearFormatter(date);
|
|
25522
25603
|
|
|
25523
25604
|
if (year && currentYear !== year) {
|
|
25524
25605
|
if (yearStarted) yearEnded = true;
|
|
@@ -25818,7 +25899,7 @@
|
|
|
25818
25899
|
}
|
|
25819
25900
|
|
|
25820
25901
|
if ($el && $el.length > 0 && calendar.hasTimePicker) {
|
|
25821
|
-
$el.find('.calendar-time-selector a').text(value && value.length ? calendar.timeSelectorFormatter
|
|
25902
|
+
$el.find('.calendar-time-selector a').text(value && value.length ? calendar.timeSelectorFormatter(value[0]) : calendar.params.timePickerPlaceholder);
|
|
25822
25903
|
}
|
|
25823
25904
|
|
|
25824
25905
|
if ($inputEl && $inputEl.length || params.header) {
|
|
@@ -26265,9 +26346,9 @@
|
|
|
26265
26346
|
let date = new Date(d);
|
|
26266
26347
|
let year = date.getFullYear();
|
|
26267
26348
|
let month = date.getMonth();
|
|
26268
|
-
let localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter
|
|
26349
|
+
let localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter(date));
|
|
26269
26350
|
if (localeMonth < 0) localeMonth = month;
|
|
26270
|
-
let localeYear = calendar.yearFormatter
|
|
26351
|
+
let localeYear = calendar.yearFormatter(date);
|
|
26271
26352
|
|
|
26272
26353
|
if (offset === 'next') {
|
|
26273
26354
|
if (month === 11) date = new Date(year + 1, 0);else date = new Date(year, month + 1, 1);
|
|
@@ -26280,9 +26361,9 @@
|
|
|
26280
26361
|
if (offset === 'next' || offset === 'prev') {
|
|
26281
26362
|
month = date.getMonth();
|
|
26282
26363
|
year = date.getFullYear();
|
|
26283
|
-
localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter
|
|
26364
|
+
localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter(date));
|
|
26284
26365
|
if (localeMonth < 0) localeMonth = month;
|
|
26285
|
-
localeYear = calendar.yearFormatter
|
|
26366
|
+
localeYear = calendar.yearFormatter(date);
|
|
26286
26367
|
}
|
|
26287
26368
|
|
|
26288
26369
|
const currentValues = [];
|
|
@@ -26435,7 +26516,7 @@
|
|
|
26435
26516
|
dayDate = new Date(dayDate);
|
|
26436
26517
|
const dayYear = dayDate.getFullYear();
|
|
26437
26518
|
const dayMonth = dayDate.getMonth();
|
|
26438
|
-
const dayNumberDisplay = calendar.dayFormatter
|
|
26519
|
+
const dayNumberDisplay = calendar.dayFormatter(dayDate); // prettier-ignore
|
|
26439
26520
|
|
|
26440
26521
|
rowHtml += `
|
|
26441
26522
|
<div data-year="${dayYear}" data-month="${dayMonth}" data-day="${dayNumber}" class="calendar-day${addClass}" data-date="${dayYear}-${dayMonth}-${dayNumber}">
|
|
@@ -26497,16 +26578,6 @@
|
|
|
26497
26578
|
})));
|
|
26498
26579
|
}
|
|
26499
26580
|
|
|
26500
|
-
renderMonthPicker() {
|
|
26501
|
-
const calendar = this;
|
|
26502
|
-
const localeMonth = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);
|
|
26503
|
-
return $jsx("div", {
|
|
26504
|
-
class: "calendar-month-picker"
|
|
26505
|
-
}, calendar.monthNames.map((m, index) => $jsx("div", {
|
|
26506
|
-
class: `calendar-month-picker-item ${localeMonth === index ? 'calendar-month-picker-item-current' : ''}`
|
|
26507
|
-
}, $jsx("span", null, m))));
|
|
26508
|
-
}
|
|
26509
|
-
|
|
26510
26581
|
renderYearSelector() {
|
|
26511
26582
|
const calendar = this;
|
|
26512
26583
|
|
|
@@ -26529,35 +26600,6 @@
|
|
|
26529
26600
|
}, $jsx("i", {
|
|
26530
26601
|
class: "icon icon-next"
|
|
26531
26602
|
})));
|
|
26532
|
-
}
|
|
26533
|
-
|
|
26534
|
-
renderYearPicker() {
|
|
26535
|
-
const calendar = this;
|
|
26536
|
-
const currentYear = calendar.currentYear;
|
|
26537
|
-
let yearMin = calendar.params.yearPickerMin || new Date().getFullYear() - 100;
|
|
26538
|
-
|
|
26539
|
-
if (calendar.params.minDate) {
|
|
26540
|
-
yearMin = Math.max(yearMin, new Date(calendar.params.minDate).getFullYear());
|
|
26541
|
-
}
|
|
26542
|
-
|
|
26543
|
-
let yearMax = calendar.params.yearPickerMax || new Date().getFullYear() + 100;
|
|
26544
|
-
|
|
26545
|
-
if (calendar.params.maxDate) {
|
|
26546
|
-
yearMax = Math.min(yearMax, new Date(calendar.params.maxDate).getFullYear());
|
|
26547
|
-
}
|
|
26548
|
-
|
|
26549
|
-
const years = [];
|
|
26550
|
-
|
|
26551
|
-
for (let i = yearMin; i <= yearMax; i += 1) {
|
|
26552
|
-
years.push(i);
|
|
26553
|
-
}
|
|
26554
|
-
|
|
26555
|
-
return $jsx("div", {
|
|
26556
|
-
class: "calendar-year-picker"
|
|
26557
|
-
}, years.map(year => $jsx("div", {
|
|
26558
|
-
"data-year": year,
|
|
26559
|
-
class: `calendar-year-picker-item ${year === currentYear ? 'calendar-year-picker-item-current' : ''}`
|
|
26560
|
-
}, $jsx("span", null, calendar.yearFormatter.format(new Date().setFullYear(year))))));
|
|
26561
26603
|
} // eslint-disable-next-line
|
|
26562
26604
|
|
|
26563
26605
|
|
|
@@ -26565,10 +26607,10 @@
|
|
|
26565
26607
|
const calendar = this;
|
|
26566
26608
|
const value = calendar.value && calendar.value[0];
|
|
26567
26609
|
let timeString;
|
|
26568
|
-
if (value) timeString = calendar.timeSelectorFormatter
|
|
26610
|
+
if (value) timeString = calendar.timeSelectorFormatter(value);
|
|
26569
26611
|
return $jsx("div", {
|
|
26570
26612
|
class: "calendar-time-selector"
|
|
26571
|
-
}, $jsx("a", {
|
|
26613
|
+
}, $jsx("span", null, calendar.params.timePickerLabel), $jsx("a", {
|
|
26572
26614
|
class: "link"
|
|
26573
26615
|
}, timeString || calendar.params.timePickerPlaceholder));
|
|
26574
26616
|
}
|
|
@@ -26728,6 +26770,142 @@
|
|
|
26728
26770
|
return calendar.renderInline();
|
|
26729
26771
|
}
|
|
26730
26772
|
|
|
26773
|
+
openMonthPicker() {
|
|
26774
|
+
const calendar = this;
|
|
26775
|
+
const {
|
|
26776
|
+
$el,
|
|
26777
|
+
app
|
|
26778
|
+
} = calendar;
|
|
26779
|
+
if (!$el || !$el.length) return;
|
|
26780
|
+
$el.append('<div class="popover calendar-popover calendar-month-picker-popover"><div class="popover-inner"><div class="calendar-month-picker"></div></div></div>');
|
|
26781
|
+
calendar.monthPickerPopover = app.popover.create({
|
|
26782
|
+
el: $el.find('.calendar-month-picker-popover'),
|
|
26783
|
+
targetEl: $el.find('.calendar-month-selector'),
|
|
26784
|
+
backdrop: true,
|
|
26785
|
+
backdropUnique: true,
|
|
26786
|
+
on: {
|
|
26787
|
+
close() {
|
|
26788
|
+
calendar.closeMonthPicker();
|
|
26789
|
+
},
|
|
26790
|
+
|
|
26791
|
+
closed() {
|
|
26792
|
+
if (calendar.monthPickerPopover.$el) calendar.monthPickerPopover.$el.remove();
|
|
26793
|
+
calendar.monthPickerPopover.destroy();
|
|
26794
|
+
|
|
26795
|
+
if (calendar.monthPickerInstance) {
|
|
26796
|
+
calendar.monthPickerInstance.close();
|
|
26797
|
+
calendar.monthPickerInstance.destroy();
|
|
26798
|
+
}
|
|
26799
|
+
|
|
26800
|
+
delete calendar.monthPickerInstance;
|
|
26801
|
+
delete calendar.monthPickerPopover;
|
|
26802
|
+
}
|
|
26803
|
+
|
|
26804
|
+
}
|
|
26805
|
+
});
|
|
26806
|
+
calendar.monthPickerPopover.open();
|
|
26807
|
+
const localeMonth = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);
|
|
26808
|
+
const values = [];
|
|
26809
|
+
const displayValues = [];
|
|
26810
|
+
calendar.monthNames.forEach((m, index) => {
|
|
26811
|
+
values.push(index);
|
|
26812
|
+
displayValues.push(m);
|
|
26813
|
+
});
|
|
26814
|
+
calendar.monthPickerInstance = app.picker.create({
|
|
26815
|
+
containerEl: calendar.monthPickerPopover.$el.find('.calendar-month-picker'),
|
|
26816
|
+
value: [localeMonth],
|
|
26817
|
+
toolbar: false,
|
|
26818
|
+
rotateEffect: false,
|
|
26819
|
+
toolbarCloseText: calendar.params.toolbarCloseText,
|
|
26820
|
+
cols: [{
|
|
26821
|
+
values,
|
|
26822
|
+
displayValues
|
|
26823
|
+
}]
|
|
26824
|
+
});
|
|
26825
|
+
}
|
|
26826
|
+
|
|
26827
|
+
closeMonthPicker() {
|
|
26828
|
+
const calendar = this;
|
|
26829
|
+
if (calendar.monthPickerPopover && calendar.monthPickerPopover.opened) calendar.monthPickerPopover.close();
|
|
26830
|
+
const index = calendar.monthPickerInstance.value[0];
|
|
26831
|
+
const localeMonthIndex = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);
|
|
26832
|
+
const monthIndex = calendar.currentMonth;
|
|
26833
|
+
const diff = localeMonthIndex - monthIndex;
|
|
26834
|
+
const diffIndex = index - diff;
|
|
26835
|
+
calendar.setYearMonth(calendar.currentYear, diffIndex, 0);
|
|
26836
|
+
}
|
|
26837
|
+
|
|
26838
|
+
openYearPicker() {
|
|
26839
|
+
const calendar = this;
|
|
26840
|
+
const {
|
|
26841
|
+
$el,
|
|
26842
|
+
app
|
|
26843
|
+
} = calendar;
|
|
26844
|
+
if (!$el || !$el.length) return;
|
|
26845
|
+
$el.append('<div class="popover calendar-popover calendar-year-picker-popover"><div class="popover-inner"><div class="calendar-year-picker"></div></div></div>');
|
|
26846
|
+
calendar.yearPickerPopover = app.popover.create({
|
|
26847
|
+
el: $el.find('.calendar-year-picker-popover'),
|
|
26848
|
+
targetEl: $el.find('.calendar-year-selector'),
|
|
26849
|
+
backdrop: true,
|
|
26850
|
+
backdropUnique: true,
|
|
26851
|
+
on: {
|
|
26852
|
+
close() {
|
|
26853
|
+
calendar.closeYearPicker();
|
|
26854
|
+
},
|
|
26855
|
+
|
|
26856
|
+
closed() {
|
|
26857
|
+
if (calendar.yearPickerPopover.$el) calendar.yearPickerPopover.$el.remove();
|
|
26858
|
+
calendar.yearPickerPopover.destroy();
|
|
26859
|
+
|
|
26860
|
+
if (calendar.yearPickerInstance) {
|
|
26861
|
+
calendar.yearPickerInstance.close();
|
|
26862
|
+
calendar.yearPickerInstance.destroy();
|
|
26863
|
+
}
|
|
26864
|
+
|
|
26865
|
+
delete calendar.yearPickerInstance;
|
|
26866
|
+
delete calendar.yearPickerPopover;
|
|
26867
|
+
}
|
|
26868
|
+
|
|
26869
|
+
}
|
|
26870
|
+
});
|
|
26871
|
+
calendar.yearPickerPopover.open();
|
|
26872
|
+
const currentYear = calendar.currentYear;
|
|
26873
|
+
let yearMin = calendar.params.yearPickerMin || new Date().getFullYear() - 100;
|
|
26874
|
+
|
|
26875
|
+
if (calendar.params.minDate) {
|
|
26876
|
+
yearMin = Math.max(yearMin, new Date(calendar.params.minDate).getFullYear());
|
|
26877
|
+
}
|
|
26878
|
+
|
|
26879
|
+
let yearMax = calendar.params.yearPickerMax || new Date().getFullYear() + 100;
|
|
26880
|
+
|
|
26881
|
+
if (calendar.params.maxDate) {
|
|
26882
|
+
yearMax = Math.min(yearMax, new Date(calendar.params.maxDate).getFullYear());
|
|
26883
|
+
}
|
|
26884
|
+
|
|
26885
|
+
const years = [];
|
|
26886
|
+
|
|
26887
|
+
for (let i = yearMin; i <= yearMax; i += 1) {
|
|
26888
|
+
years.push(i);
|
|
26889
|
+
}
|
|
26890
|
+
|
|
26891
|
+
calendar.yearPickerInstance = app.picker.create({
|
|
26892
|
+
containerEl: calendar.yearPickerPopover.$el.find('.calendar-year-picker'),
|
|
26893
|
+
value: [currentYear],
|
|
26894
|
+
toolbar: false,
|
|
26895
|
+
rotateEffect: false,
|
|
26896
|
+
toolbarCloseText: calendar.params.toolbarCloseText,
|
|
26897
|
+
cols: [{
|
|
26898
|
+
values: years
|
|
26899
|
+
}]
|
|
26900
|
+
});
|
|
26901
|
+
}
|
|
26902
|
+
|
|
26903
|
+
closeYearPicker() {
|
|
26904
|
+
const calendar = this;
|
|
26905
|
+
if (calendar.yearPickerPopover && calendar.yearPickerPopover.opened) calendar.yearPickerPopover.close();
|
|
26906
|
+
calendar.setYearMonth(calendar.yearPickerInstance.value[0], undefined, 0);
|
|
26907
|
+
}
|
|
26908
|
+
|
|
26731
26909
|
openTimePicker() {
|
|
26732
26910
|
const calendar = this;
|
|
26733
26911
|
const {
|
|
@@ -26736,7 +26914,7 @@
|
|
|
26736
26914
|
is12HoursFormat
|
|
26737
26915
|
} = calendar;
|
|
26738
26916
|
if (!$el || !$el.length) return;
|
|
26739
|
-
$el.append('<div class="calendar-time-picker"></div>');
|
|
26917
|
+
$el.append('<div class="popover calendar-popover calendar-time-picker-popover"><div class="popover-inner"><div class="calendar-time-picker"></div></div></div>');
|
|
26740
26918
|
const hoursArr = [];
|
|
26741
26919
|
const minutesArr = [];
|
|
26742
26920
|
const hoursMin = is12HoursFormat ? 1 : 0;
|
|
@@ -26764,10 +26942,36 @@
|
|
|
26764
26942
|
if (value[0] === 0) value[0] = 12;
|
|
26765
26943
|
}
|
|
26766
26944
|
|
|
26945
|
+
calendar.timePickerPopover = app.popover.create({
|
|
26946
|
+
el: $el.find('.calendar-time-picker-popover'),
|
|
26947
|
+
targetEl: $el.find('.calendar-time-selector .link'),
|
|
26948
|
+
backdrop: true,
|
|
26949
|
+
backdropUnique: true,
|
|
26950
|
+
on: {
|
|
26951
|
+
close() {
|
|
26952
|
+
calendar.closeTimePicker();
|
|
26953
|
+
},
|
|
26954
|
+
|
|
26955
|
+
closed() {
|
|
26956
|
+
if (calendar.timePickerPopover.$el) calendar.timePickerPopover.$el.remove();
|
|
26957
|
+
calendar.timePickerPopover.destroy();
|
|
26958
|
+
|
|
26959
|
+
if (calendar.timePickerInstance) {
|
|
26960
|
+
calendar.timePickerInstance.close();
|
|
26961
|
+
calendar.timePickerInstance.destroy();
|
|
26962
|
+
}
|
|
26963
|
+
|
|
26964
|
+
delete calendar.timePickerInstance;
|
|
26965
|
+
delete calendar.timePickerPopover;
|
|
26966
|
+
}
|
|
26967
|
+
|
|
26968
|
+
}
|
|
26969
|
+
});
|
|
26970
|
+
calendar.timePickerPopover.open();
|
|
26767
26971
|
calendar.timePickerInstance = app.picker.create({
|
|
26768
|
-
containerEl:
|
|
26972
|
+
containerEl: calendar.timePickerPopover.$el.find('.calendar-time-picker'),
|
|
26769
26973
|
value,
|
|
26770
|
-
toolbar:
|
|
26974
|
+
toolbar: false,
|
|
26771
26975
|
rotateEffect: false,
|
|
26772
26976
|
toolbarCloseText: calendar.params.toolbarCloseText,
|
|
26773
26977
|
cols: [{
|
|
@@ -26782,7 +26986,6 @@
|
|
|
26782
26986
|
values: ['AM', 'PM']
|
|
26783
26987
|
}] : [])]
|
|
26784
26988
|
});
|
|
26785
|
-
calendar.timePickerInstance.$el.find('.toolbar a').removeClass('sheet-close popover-close').addClass('calendar-time-picker-close');
|
|
26786
26989
|
}
|
|
26787
26990
|
|
|
26788
26991
|
closeTimePicker() {
|
|
@@ -26816,13 +27019,7 @@
|
|
|
26816
27019
|
}
|
|
26817
27020
|
|
|
26818
27021
|
calendar.setValue([value]);
|
|
26819
|
-
calendar.
|
|
26820
|
-
calendar.timePickerInstance.destroy();
|
|
26821
|
-
delete calendar.timePickerInstance;
|
|
26822
|
-
}
|
|
26823
|
-
|
|
26824
|
-
if (calendar.$el && calendar.$el.length) {
|
|
26825
|
-
calendar.$el.find('.calendar-time-picker').remove();
|
|
27022
|
+
if (calendar.timePickerPopover && calendar.timePickerPopover.opened) calendar.timePickerPopover.close();
|
|
26826
27023
|
}
|
|
26827
27024
|
}
|
|
26828
27025
|
|
|
@@ -27191,6 +27388,7 @@
|
|
|
27191
27388
|
yearPickerMin: undefined,
|
|
27192
27389
|
yearPickerMax: undefined,
|
|
27193
27390
|
timePicker: false,
|
|
27391
|
+
timePickerLabel: 'Time',
|
|
27194
27392
|
timePickerFormat: {
|
|
27195
27393
|
hour: 'numeric',
|
|
27196
27394
|
minute: 'numeric'
|
|
@@ -27238,8 +27436,8 @@
|
|
|
27238
27436
|
};
|
|
27239
27437
|
|
|
27240
27438
|
function pickerColumn(colEl, updateItems) {
|
|
27241
|
-
const picker = this;
|
|
27242
|
-
|
|
27439
|
+
const picker = this; // const app = picker.app;
|
|
27440
|
+
|
|
27243
27441
|
const $colEl = $(colEl);
|
|
27244
27442
|
const colIndex = $colEl.index();
|
|
27245
27443
|
const col = picker.cols[colIndex];
|
|
@@ -27249,17 +27447,7 @@
|
|
|
27249
27447
|
col.$itemsEl = col.$el.find('.picker-items');
|
|
27250
27448
|
col.items = col.$itemsEl.find('.picker-item');
|
|
27251
27449
|
let itemHeight;
|
|
27252
|
-
let
|
|
27253
|
-
let minTranslate;
|
|
27254
|
-
let maxTranslate;
|
|
27255
|
-
let animationFrameId;
|
|
27256
|
-
|
|
27257
|
-
function updateDuringScroll() {
|
|
27258
|
-
animationFrameId = requestAnimationFrame$1(() => {
|
|
27259
|
-
col.updateItems(undefined, undefined, 0);
|
|
27260
|
-
updateDuringScroll();
|
|
27261
|
-
});
|
|
27262
|
-
}
|
|
27450
|
+
let colHeight;
|
|
27263
27451
|
|
|
27264
27452
|
col.replaceValues = function replaceColValues(values, displayValues) {
|
|
27265
27453
|
col.detachEvents();
|
|
@@ -27268,99 +27456,63 @@
|
|
|
27268
27456
|
col.$itemsEl.html(picker.renderColumn(col, true));
|
|
27269
27457
|
col.items = col.$itemsEl.find('.picker-item');
|
|
27270
27458
|
col.calcSize();
|
|
27271
|
-
col.setValue(col.values[0],
|
|
27459
|
+
col.setValue(col.values[0], true);
|
|
27272
27460
|
col.attachEvents();
|
|
27273
27461
|
};
|
|
27274
27462
|
|
|
27275
27463
|
col.calcSize = function calcColSize() {
|
|
27276
|
-
|
|
27277
|
-
col.$el.removeClass('picker-column-absolute');
|
|
27278
|
-
if (!col.width) col.$el.css({
|
|
27279
|
-
width: ''
|
|
27280
|
-
});
|
|
27281
|
-
}
|
|
27282
|
-
|
|
27283
|
-
let colWidth = 0;
|
|
27284
|
-
const colHeight = col.$el[0].offsetHeight;
|
|
27464
|
+
colHeight = col.$el[0].offsetHeight;
|
|
27285
27465
|
itemHeight = col.items[0].offsetHeight;
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
maxTranslate = colHeight / 2 - itemHeight / 2;
|
|
27289
|
-
|
|
27290
|
-
if (col.width) {
|
|
27291
|
-
colWidth = col.width;
|
|
27292
|
-
if (parseInt(colWidth, 10) === colWidth) colWidth += 'px';
|
|
27293
|
-
col.$el.css({
|
|
27294
|
-
width: colWidth
|
|
27295
|
-
});
|
|
27296
|
-
}
|
|
27297
|
-
|
|
27298
|
-
if (picker.params.rotateEffect) {
|
|
27299
|
-
if (!col.width) {
|
|
27300
|
-
col.items.each(itemEl => {
|
|
27301
|
-
const item = $(itemEl).children('span');
|
|
27302
|
-
colWidth = Math.max(colWidth, item[0].offsetWidth);
|
|
27303
|
-
});
|
|
27304
|
-
col.$el.css({
|
|
27305
|
-
width: `${colWidth + 2}px`
|
|
27306
|
-
});
|
|
27307
|
-
}
|
|
27466
|
+
const hadPadding = col.el.style.getPropertyValue('--f7-picker-scroll-padding');
|
|
27467
|
+
col.el.style.setProperty('--f7-picker-scroll-padding', `${(colHeight - itemHeight) / 2}px`);
|
|
27308
27468
|
|
|
27309
|
-
|
|
27469
|
+
if (!hadPadding) {
|
|
27470
|
+
col.$itemsEl[0].scrollTop = 0;
|
|
27310
27471
|
}
|
|
27311
27472
|
};
|
|
27312
27473
|
|
|
27313
|
-
col.setValue = function setColValue(newValue,
|
|
27474
|
+
col.setValue = function setColValue(newValue, valueCallbacks) {
|
|
27314
27475
|
const newActiveIndex = col.$itemsEl.find(`.picker-item[data-picker-value="${newValue}"]`).index();
|
|
27315
27476
|
|
|
27316
27477
|
if (typeof newActiveIndex === 'undefined' || newActiveIndex === -1) {
|
|
27317
27478
|
return;
|
|
27318
27479
|
}
|
|
27319
27480
|
|
|
27320
|
-
const
|
|
27321
|
-
|
|
27322
|
-
col.$itemsEl.transition(transition);
|
|
27323
|
-
col.$itemsEl.transform(`translate3d(0,${newTranslate}px,0)`); // Watch items
|
|
27324
|
-
|
|
27325
|
-
if (picker.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex) {
|
|
27326
|
-
cancelAnimationFrame(animationFrameId);
|
|
27327
|
-
col.$itemsEl.transitionEnd(() => {
|
|
27328
|
-
cancelAnimationFrame(animationFrameId);
|
|
27329
|
-
});
|
|
27330
|
-
updateDuringScroll();
|
|
27331
|
-
} // Update items
|
|
27332
|
-
|
|
27481
|
+
const newScrollTop = newActiveIndex * itemHeight;
|
|
27482
|
+
col.$itemsEl[0].scrollTop = newScrollTop; // Update items
|
|
27333
27483
|
|
|
27334
|
-
col.updateItems(newActiveIndex,
|
|
27484
|
+
col.updateItems(newActiveIndex, newScrollTop, valueCallbacks);
|
|
27335
27485
|
};
|
|
27336
27486
|
|
|
27337
|
-
col.updateItems = function updateColItems(activeIndex,
|
|
27338
|
-
if (typeof
|
|
27487
|
+
col.updateItems = function updateColItems(activeIndex, scrollTop, valueCallbacks) {
|
|
27488
|
+
if (typeof scrollTop === 'undefined') {
|
|
27339
27489
|
// eslint-disable-next-line
|
|
27340
|
-
|
|
27490
|
+
scrollTop = col.$itemsEl[0].scrollTop;
|
|
27341
27491
|
}
|
|
27492
|
+
/* eslint-disable no-param-reassign */
|
|
27342
27493
|
|
|
27343
|
-
if (typeof activeIndex === 'undefined') // eslint-disable-next-line
|
|
27344
|
-
activeIndex = -Math.round((translate - maxTranslate) / itemHeight); // eslint-disable-next-line
|
|
27345
27494
|
|
|
27346
|
-
if (activeIndex
|
|
27495
|
+
if (typeof activeIndex === 'undefined') {
|
|
27496
|
+
activeIndex = Math.round(scrollTop / itemHeight);
|
|
27497
|
+
}
|
|
27347
27498
|
|
|
27499
|
+
if (activeIndex < 0) activeIndex = 0;
|
|
27348
27500
|
if (activeIndex >= col.items.length) activeIndex = col.items.length - 1;
|
|
27501
|
+
/* eslint-enable no-param-reassign */
|
|
27502
|
+
|
|
27349
27503
|
const previousActiveIndex = col.activeIndex;
|
|
27350
27504
|
col.activeIndex = activeIndex;
|
|
27351
27505
|
col.$itemsEl.find('.picker-item-selected').removeClass('picker-item-selected');
|
|
27352
|
-
col.items.
|
|
27353
|
-
|
|
27506
|
+
const selectedItem = col.items.eq(activeIndex);
|
|
27507
|
+
selectedItem.addClass('picker-item-selected').children().transform(''); // Set 3D rotate effect
|
|
27354
27508
|
|
|
27355
27509
|
if (picker.params.rotateEffect) {
|
|
27356
27510
|
col.items.each(itemEl => {
|
|
27357
27511
|
const $itemEl = $(itemEl);
|
|
27358
|
-
const
|
|
27359
|
-
const translateOffset = maxTranslate - translate;
|
|
27360
|
-
const itemOffset = itemOffsetTop - translateOffset;
|
|
27512
|
+
const itemOffset = itemEl.offsetTop - (colHeight - itemHeight) / 2 - scrollTop;
|
|
27361
27513
|
const percentage = itemOffset / itemHeight;
|
|
27362
27514
|
const itemsFit = Math.ceil(col.height / itemHeight / 2) + 1;
|
|
27363
|
-
let angle = -
|
|
27515
|
+
let angle = -24 * percentage;
|
|
27364
27516
|
if (angle > 180) angle = 180;
|
|
27365
27517
|
if (angle < -180) angle = -180;
|
|
27366
27518
|
|
|
@@ -27370,7 +27522,7 @@
|
|
|
27370
27522
|
$itemEl.removeClass('picker-item-far');
|
|
27371
27523
|
}
|
|
27372
27524
|
|
|
27373
|
-
$itemEl.transform(`translate3d(0, ${-
|
|
27525
|
+
$itemEl.children('span').transform(`translate3d(0, ${-percentage * itemHeight}px, -100px) rotateX(${angle}deg)`);
|
|
27374
27526
|
});
|
|
27375
27527
|
}
|
|
27376
27528
|
|
|
@@ -27389,219 +27541,31 @@
|
|
|
27389
27541
|
}
|
|
27390
27542
|
};
|
|
27391
27543
|
|
|
27392
|
-
|
|
27393
|
-
|
|
27394
|
-
let isMoved;
|
|
27395
|
-
let touchStartY;
|
|
27396
|
-
let touchCurrentY;
|
|
27397
|
-
let touchStartTime;
|
|
27398
|
-
let touchEndTime;
|
|
27399
|
-
let startTranslate;
|
|
27400
|
-
let returnTo;
|
|
27401
|
-
let currentTranslate;
|
|
27402
|
-
let prevTranslate;
|
|
27403
|
-
let velocityTranslate;
|
|
27404
|
-
|
|
27405
|
-
function handleTouchStart(e) {
|
|
27406
|
-
if (isMoved || isTouched) return;
|
|
27407
|
-
e.preventDefault();
|
|
27408
|
-
isTouched = true;
|
|
27409
|
-
touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
|
27410
|
-
touchCurrentY = touchStartY;
|
|
27411
|
-
touchStartTime = new Date().getTime();
|
|
27412
|
-
allowItemClick = true;
|
|
27413
|
-
startTranslate = getTranslate$1(col.$itemsEl[0], 'y');
|
|
27414
|
-
currentTranslate = startTranslate;
|
|
27415
|
-
}
|
|
27416
|
-
|
|
27417
|
-
function handleTouchMove(e) {
|
|
27418
|
-
if (!isTouched) return;
|
|
27419
|
-
e.preventDefault();
|
|
27420
|
-
allowItemClick = false;
|
|
27421
|
-
touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
|
27422
|
-
|
|
27423
|
-
if (!isMoved) {
|
|
27424
|
-
// First move
|
|
27425
|
-
cancelAnimationFrame(animationFrameId);
|
|
27426
|
-
isMoved = true;
|
|
27427
|
-
startTranslate = getTranslate$1(col.$itemsEl[0], 'y');
|
|
27428
|
-
currentTranslate = startTranslate;
|
|
27429
|
-
col.$itemsEl.transition(0);
|
|
27430
|
-
}
|
|
27431
|
-
|
|
27432
|
-
const diff = touchCurrentY - touchStartY;
|
|
27433
|
-
currentTranslate = startTranslate + diff;
|
|
27434
|
-
returnTo = undefined; // Normalize translate
|
|
27435
|
-
|
|
27436
|
-
if (currentTranslate < minTranslate) {
|
|
27437
|
-
currentTranslate = minTranslate - (minTranslate - currentTranslate) ** 0.8;
|
|
27438
|
-
returnTo = 'min';
|
|
27439
|
-
}
|
|
27440
|
-
|
|
27441
|
-
if (currentTranslate > maxTranslate) {
|
|
27442
|
-
currentTranslate = maxTranslate + (currentTranslate - maxTranslate) ** 0.8;
|
|
27443
|
-
returnTo = 'max';
|
|
27444
|
-
} // Transform wrapper
|
|
27445
|
-
|
|
27446
|
-
|
|
27447
|
-
col.$itemsEl.transform(`translate3d(0,${currentTranslate}px,0)`); // Update items
|
|
27448
|
-
|
|
27449
|
-
col.updateItems(undefined, currentTranslate, 0, picker.params.updateValuesOnTouchmove); // Calc velocity
|
|
27450
|
-
|
|
27451
|
-
velocityTranslate = currentTranslate - prevTranslate || currentTranslate;
|
|
27452
|
-
prevTranslate = currentTranslate;
|
|
27453
|
-
}
|
|
27454
|
-
|
|
27455
|
-
function handleTouchEnd() {
|
|
27456
|
-
if (!isTouched || !isMoved) {
|
|
27457
|
-
isTouched = false;
|
|
27458
|
-
isMoved = false;
|
|
27459
|
-
return;
|
|
27460
|
-
}
|
|
27461
|
-
|
|
27462
|
-
isTouched = false;
|
|
27463
|
-
isMoved = false;
|
|
27464
|
-
col.$itemsEl.transition('');
|
|
27465
|
-
|
|
27466
|
-
if (returnTo) {
|
|
27467
|
-
if (returnTo === 'min') {
|
|
27468
|
-
col.$itemsEl.transform(`translate3d(0,${minTranslate}px,0)`);
|
|
27469
|
-
} else {
|
|
27470
|
-
col.$itemsEl.transform(`translate3d(0,${maxTranslate}px,0)`);
|
|
27471
|
-
}
|
|
27472
|
-
}
|
|
27473
|
-
|
|
27474
|
-
touchEndTime = new Date().getTime();
|
|
27475
|
-
let newTranslate;
|
|
27476
|
-
|
|
27477
|
-
if (touchEndTime - touchStartTime > 300) {
|
|
27478
|
-
newTranslate = currentTranslate;
|
|
27479
|
-
} else {
|
|
27480
|
-
newTranslate = currentTranslate + velocityTranslate * picker.params.momentumRatio;
|
|
27481
|
-
}
|
|
27482
|
-
|
|
27483
|
-
newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate); // Active Index
|
|
27484
|
-
|
|
27485
|
-
const activeIndex = Math.round(Math.abs((newTranslate - maxTranslate) / itemHeight)); // Normalize translate
|
|
27486
|
-
|
|
27487
|
-
if (!picker.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate; // Transform wrapper
|
|
27488
|
-
|
|
27489
|
-
col.$itemsEl.transform(`translate3d(0,${parseInt(newTranslate, 10)}px,0)`); // Update items
|
|
27490
|
-
|
|
27491
|
-
col.updateItems(activeIndex, newTranslate, '', true); // Watch items
|
|
27492
|
-
|
|
27493
|
-
if (picker.params.updateValuesOnMomentum) {
|
|
27494
|
-
updateDuringScroll();
|
|
27495
|
-
col.$itemsEl.transitionEnd(() => {
|
|
27496
|
-
cancelAnimationFrame(animationFrameId);
|
|
27497
|
-
});
|
|
27498
|
-
} // Allow click
|
|
27499
|
-
|
|
27500
|
-
|
|
27501
|
-
setTimeout(() => {
|
|
27502
|
-
allowItemClick = true;
|
|
27503
|
-
}, 100);
|
|
27504
|
-
}
|
|
27505
|
-
|
|
27506
|
-
let mousewheelTimeout;
|
|
27507
|
-
|
|
27508
|
-
function handleMouseWheel(e) {
|
|
27509
|
-
const {
|
|
27510
|
-
deltaX,
|
|
27511
|
-
deltaY
|
|
27512
|
-
} = e;
|
|
27513
|
-
if (Math.abs(deltaX) > Math.abs(deltaY)) return;
|
|
27514
|
-
clearTimeout(mousewheelTimeout);
|
|
27515
|
-
e.preventDefault();
|
|
27516
|
-
cancelAnimationFrame(animationFrameId);
|
|
27517
|
-
startTranslate = getTranslate$1(col.$itemsEl[0], 'y');
|
|
27518
|
-
col.$itemsEl.transition(0);
|
|
27519
|
-
currentTranslate = startTranslate - deltaY;
|
|
27520
|
-
returnTo = undefined; // Normalize translate
|
|
27521
|
-
|
|
27522
|
-
if (currentTranslate < minTranslate) {
|
|
27523
|
-
currentTranslate = minTranslate;
|
|
27524
|
-
returnTo = 'min';
|
|
27525
|
-
}
|
|
27526
|
-
|
|
27527
|
-
if (currentTranslate > maxTranslate) {
|
|
27528
|
-
currentTranslate = maxTranslate;
|
|
27529
|
-
returnTo = 'max';
|
|
27530
|
-
} // Transform wrapper
|
|
27531
|
-
|
|
27532
|
-
|
|
27533
|
-
col.$itemsEl.transform(`translate3d(0,${currentTranslate}px,0)`); // Update items
|
|
27534
|
-
|
|
27535
|
-
col.updateItems(undefined, currentTranslate, 0, picker.params.updateValuesOnMousewheel); // On end
|
|
27536
|
-
|
|
27537
|
-
mousewheelTimeout = setTimeout(() => {
|
|
27538
|
-
col.$itemsEl.transition('');
|
|
27539
|
-
|
|
27540
|
-
if (returnTo) {
|
|
27541
|
-
if (returnTo === 'min') {
|
|
27542
|
-
col.$itemsEl.transform(`translate3d(0,${minTranslate}px,0)`);
|
|
27543
|
-
} else {
|
|
27544
|
-
col.$itemsEl.transform(`translate3d(0,${maxTranslate}px,0)`);
|
|
27545
|
-
}
|
|
27546
|
-
}
|
|
27547
|
-
|
|
27548
|
-
touchEndTime = new Date().getTime();
|
|
27549
|
-
let newTranslate = currentTranslate;
|
|
27550
|
-
newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate); // Active Index
|
|
27551
|
-
|
|
27552
|
-
const activeIndex = Math.round(Math.abs((newTranslate - maxTranslate) / itemHeight)); // Normalize translate
|
|
27553
|
-
|
|
27554
|
-
if (!picker.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate; // Transform wrapper
|
|
27555
|
-
|
|
27556
|
-
col.$itemsEl.transform(`translate3d(0,${parseInt(newTranslate, 10)}px,0)`); // Update items
|
|
27557
|
-
|
|
27558
|
-
col.updateItems(activeIndex, newTranslate, '', true);
|
|
27559
|
-
}, 200);
|
|
27544
|
+
function handleScroll() {
|
|
27545
|
+
col.updateItems();
|
|
27560
27546
|
}
|
|
27561
27547
|
|
|
27562
27548
|
function handleClick() {
|
|
27563
|
-
if (!allowItemClick) return;
|
|
27564
|
-
cancelAnimationFrame(animationFrameId);
|
|
27565
27549
|
const value = $(this).attr('data-picker-value');
|
|
27566
27550
|
col.setValue(value);
|
|
27567
27551
|
}
|
|
27568
27552
|
|
|
27569
|
-
const activeListener = getSupport$1().passiveListener ? {
|
|
27570
|
-
passive: false,
|
|
27571
|
-
capture: false
|
|
27572
|
-
} : false;
|
|
27573
|
-
|
|
27574
27553
|
col.attachEvents = function attachColEvents() {
|
|
27575
|
-
col.$
|
|
27576
|
-
app.on('touchmove:active', handleTouchMove);
|
|
27577
|
-
app.on('touchend:passive', handleTouchEnd);
|
|
27578
|
-
|
|
27579
|
-
if (picker.params.mousewheel) {
|
|
27580
|
-
col.$el.on('wheel', handleMouseWheel);
|
|
27581
|
-
}
|
|
27582
|
-
|
|
27554
|
+
col.$itemsEl.on('scroll', handleScroll);
|
|
27583
27555
|
col.items.on('click', handleClick);
|
|
27584
27556
|
};
|
|
27585
27557
|
|
|
27586
27558
|
col.detachEvents = function detachColEvents() {
|
|
27587
|
-
col.$el.off(app.touchEvents.start, handleTouchStart, activeListener);
|
|
27588
|
-
app.off('touchmove:active', handleTouchMove);
|
|
27589
|
-
app.off('touchend:passive', handleTouchEnd);
|
|
27590
|
-
|
|
27591
|
-
if (picker.params.mousewheel) {
|
|
27592
|
-
col.$el.off('wheel', handleMouseWheel);
|
|
27593
|
-
}
|
|
27594
|
-
|
|
27595
27559
|
col.items.off('click', handleClick);
|
|
27596
27560
|
};
|
|
27597
27561
|
|
|
27598
27562
|
col.init = function initCol() {
|
|
27599
27563
|
col.calcSize();
|
|
27600
|
-
col.$itemsEl.transform(`translate3d(0,${maxTranslate}px,0)`).transition(0);
|
|
27601
27564
|
if (colIndex === 0) col.$el.addClass('picker-column-first');
|
|
27602
|
-
if (colIndex === picker.cols.length - 1) col.$el.addClass('picker-column-last');
|
|
27565
|
+
if (colIndex === picker.cols.length - 1) col.$el.addClass('picker-column-last');
|
|
27566
|
+
if (picker.params.freeMode) col.$el.addClass('picker-column-free-mode'); // Update items on init
|
|
27603
27567
|
|
|
27604
|
-
if (updateItems) col.updateItems(0
|
|
27568
|
+
if (updateItems) col.updateItems(0);
|
|
27605
27569
|
col.attachEvents();
|
|
27606
27570
|
};
|
|
27607
27571
|
|
|
@@ -27771,7 +27735,7 @@
|
|
|
27771
27735
|
for (let i = 0; i < picker.cols.length; i += 1) {
|
|
27772
27736
|
if (!picker.cols[i].divider) {
|
|
27773
27737
|
picker.cols[i].calcSize();
|
|
27774
|
-
picker.cols[i].setValue(picker.cols[i].value,
|
|
27738
|
+
picker.cols[i].setValue(picker.cols[i].value, false);
|
|
27775
27739
|
}
|
|
27776
27740
|
}
|
|
27777
27741
|
}
|
|
@@ -27820,7 +27784,7 @@
|
|
|
27820
27784
|
return value.join(' ');
|
|
27821
27785
|
}
|
|
27822
27786
|
|
|
27823
|
-
setValue(values
|
|
27787
|
+
setValue(values) {
|
|
27824
27788
|
const picker = this;
|
|
27825
27789
|
let valueIndex = 0;
|
|
27826
27790
|
|
|
@@ -27832,7 +27796,7 @@
|
|
|
27832
27796
|
|
|
27833
27797
|
for (let i = 0; i < picker.cols.length; i += 1) {
|
|
27834
27798
|
if (picker.cols[i] && !picker.cols[i].divider) {
|
|
27835
|
-
picker.cols[i].setValue(values[valueIndex]
|
|
27799
|
+
picker.cols[i].setValue(values[valueIndex]);
|
|
27836
27800
|
valueIndex += 1;
|
|
27837
27801
|
}
|
|
27838
27802
|
}
|
|
@@ -28040,11 +28004,11 @@
|
|
|
28040
28004
|
}); // Set value
|
|
28041
28005
|
|
|
28042
28006
|
if (!initialized) {
|
|
28043
|
-
if (value) picker.setValue(value
|
|
28044
|
-
picker.setValue(params.value
|
|
28007
|
+
if (value) picker.setValue(value);else if (params.value) {
|
|
28008
|
+
picker.setValue(params.value);
|
|
28045
28009
|
}
|
|
28046
28010
|
} else if (value) {
|
|
28047
|
-
picker.setValue(value
|
|
28011
|
+
picker.setValue(value);
|
|
28048
28012
|
} // Extra focus
|
|
28049
28013
|
|
|
28050
28014
|
|
|
@@ -28319,12 +28283,7 @@
|
|
|
28319
28283
|
params: {
|
|
28320
28284
|
picker: {
|
|
28321
28285
|
// Picker settings
|
|
28322
|
-
updateValuesOnMomentum: false,
|
|
28323
|
-
updateValuesOnTouchmove: true,
|
|
28324
|
-
updateValuesOnMousewheel: true,
|
|
28325
|
-
mousewheel: true,
|
|
28326
28286
|
rotateEffect: false,
|
|
28327
|
-
momentumRatio: 7,
|
|
28328
28287
|
freeMode: false,
|
|
28329
28288
|
cols: [],
|
|
28330
28289
|
// Common opener settings
|
|
@@ -33697,7 +33656,11 @@
|
|
|
33697
33656
|
});
|
|
33698
33657
|
}
|
|
33699
33658
|
|
|
33700
|
-
function nextTick(callback, delay
|
|
33659
|
+
function nextTick(callback, delay) {
|
|
33660
|
+
if (delay === void 0) {
|
|
33661
|
+
delay = 0;
|
|
33662
|
+
}
|
|
33663
|
+
|
|
33701
33664
|
return setTimeout(callback, delay);
|
|
33702
33665
|
}
|
|
33703
33666
|
|
|
@@ -33724,7 +33687,11 @@
|
|
|
33724
33687
|
return style;
|
|
33725
33688
|
}
|
|
33726
33689
|
|
|
33727
|
-
function getTranslate(el, axis
|
|
33690
|
+
function getTranslate(el, axis) {
|
|
33691
|
+
if (axis === void 0) {
|
|
33692
|
+
axis = 'x';
|
|
33693
|
+
}
|
|
33694
|
+
|
|
33728
33695
|
const window = getWindow();
|
|
33729
33696
|
let matrix;
|
|
33730
33697
|
let curTransform;
|
|
@@ -33776,12 +33743,12 @@
|
|
|
33776
33743
|
return node && (node.nodeType === 1 || node.nodeType === 11);
|
|
33777
33744
|
}
|
|
33778
33745
|
|
|
33779
|
-
function extend(
|
|
33780
|
-
const to = Object(
|
|
33746
|
+
function extend() {
|
|
33747
|
+
const to = Object(arguments.length <= 0 ? undefined : arguments[0]);
|
|
33781
33748
|
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
|
33782
33749
|
|
|
33783
|
-
for (let i = 1; i <
|
|
33784
|
-
const nextSource =
|
|
33750
|
+
for (let i = 1; i < arguments.length; i += 1) {
|
|
33751
|
+
const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];
|
|
33785
33752
|
|
|
33786
33753
|
if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {
|
|
33787
33754
|
const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);
|
|
@@ -33820,11 +33787,12 @@
|
|
|
33820
33787
|
el.style.setProperty(varName, varValue);
|
|
33821
33788
|
}
|
|
33822
33789
|
|
|
33823
|
-
function animateCSSModeScroll({
|
|
33824
|
-
|
|
33825
|
-
|
|
33826
|
-
|
|
33827
|
-
|
|
33790
|
+
function animateCSSModeScroll(_ref) {
|
|
33791
|
+
let {
|
|
33792
|
+
swiper,
|
|
33793
|
+
targetPosition,
|
|
33794
|
+
side
|
|
33795
|
+
} = _ref;
|
|
33828
33796
|
const window = getWindow();
|
|
33829
33797
|
const startPosition = -swiper.translate;
|
|
33830
33798
|
let startTime = null;
|
|
@@ -33917,9 +33885,10 @@
|
|
|
33917
33885
|
|
|
33918
33886
|
let deviceCached;
|
|
33919
33887
|
|
|
33920
|
-
function calcDevice({
|
|
33921
|
-
|
|
33922
|
-
|
|
33888
|
+
function calcDevice(_temp) {
|
|
33889
|
+
let {
|
|
33890
|
+
userAgent
|
|
33891
|
+
} = _temp === void 0 ? {} : _temp;
|
|
33923
33892
|
const support = getSupport();
|
|
33924
33893
|
const window = getWindow();
|
|
33925
33894
|
const platform = window.navigator.platform;
|
|
@@ -33961,7 +33930,11 @@
|
|
|
33961
33930
|
return device;
|
|
33962
33931
|
}
|
|
33963
33932
|
|
|
33964
|
-
function getDevice(overrides
|
|
33933
|
+
function getDevice(overrides) {
|
|
33934
|
+
if (overrides === void 0) {
|
|
33935
|
+
overrides = {};
|
|
33936
|
+
}
|
|
33937
|
+
|
|
33965
33938
|
if (!deviceCached) {
|
|
33966
33939
|
deviceCached = calcDevice(overrides);
|
|
33967
33940
|
}
|
|
@@ -33993,13 +33966,15 @@
|
|
|
33993
33966
|
return browser;
|
|
33994
33967
|
}
|
|
33995
33968
|
|
|
33996
|
-
function Resize({
|
|
33997
|
-
|
|
33998
|
-
|
|
33999
|
-
|
|
34000
|
-
|
|
33969
|
+
function Resize(_ref) {
|
|
33970
|
+
let {
|
|
33971
|
+
swiper,
|
|
33972
|
+
on,
|
|
33973
|
+
emit
|
|
33974
|
+
} = _ref;
|
|
34001
33975
|
const window = getWindow();
|
|
34002
33976
|
let observer = null;
|
|
33977
|
+
let animationFrame = null;
|
|
34003
33978
|
|
|
34004
33979
|
const resizeHandler = () => {
|
|
34005
33980
|
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
|
@@ -34010,30 +33985,37 @@
|
|
|
34010
33985
|
const createObserver = () => {
|
|
34011
33986
|
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
|
34012
33987
|
observer = new ResizeObserver(entries => {
|
|
34013
|
-
|
|
34014
|
-
|
|
34015
|
-
|
|
34016
|
-
|
|
34017
|
-
|
|
34018
|
-
|
|
34019
|
-
|
|
34020
|
-
|
|
34021
|
-
|
|
34022
|
-
|
|
34023
|
-
|
|
34024
|
-
|
|
34025
|
-
|
|
34026
|
-
|
|
34027
|
-
|
|
33988
|
+
animationFrame = window.requestAnimationFrame(() => {
|
|
33989
|
+
const {
|
|
33990
|
+
width,
|
|
33991
|
+
height
|
|
33992
|
+
} = swiper;
|
|
33993
|
+
let newWidth = width;
|
|
33994
|
+
let newHeight = height;
|
|
33995
|
+
entries.forEach(_ref2 => {
|
|
33996
|
+
let {
|
|
33997
|
+
contentBoxSize,
|
|
33998
|
+
contentRect,
|
|
33999
|
+
target
|
|
34000
|
+
} = _ref2;
|
|
34001
|
+
if (target && target !== swiper.el) return;
|
|
34002
|
+
newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
|
|
34003
|
+
newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
|
|
34004
|
+
});
|
|
34028
34005
|
|
|
34029
|
-
|
|
34030
|
-
|
|
34031
|
-
|
|
34006
|
+
if (newWidth !== width || newHeight !== height) {
|
|
34007
|
+
resizeHandler();
|
|
34008
|
+
}
|
|
34009
|
+
});
|
|
34032
34010
|
});
|
|
34033
34011
|
observer.observe(swiper.el);
|
|
34034
34012
|
};
|
|
34035
34013
|
|
|
34036
34014
|
const removeObserver = () => {
|
|
34015
|
+
if (animationFrame) {
|
|
34016
|
+
window.cancelAnimationFrame(animationFrame);
|
|
34017
|
+
}
|
|
34018
|
+
|
|
34037
34019
|
if (observer && observer.unobserve && swiper.el) {
|
|
34038
34020
|
observer.unobserve(swiper.el);
|
|
34039
34021
|
observer = null;
|
|
@@ -34061,16 +34043,21 @@
|
|
|
34061
34043
|
});
|
|
34062
34044
|
}
|
|
34063
34045
|
|
|
34064
|
-
function Observer({
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34046
|
+
function Observer(_ref) {
|
|
34047
|
+
let {
|
|
34048
|
+
swiper,
|
|
34049
|
+
extendParams,
|
|
34050
|
+
on,
|
|
34051
|
+
emit
|
|
34052
|
+
} = _ref;
|
|
34070
34053
|
const observers = [];
|
|
34071
34054
|
const window = getWindow();
|
|
34072
34055
|
|
|
34073
|
-
const attach = (target, options
|
|
34056
|
+
const attach = function (target, options) {
|
|
34057
|
+
if (options === void 0) {
|
|
34058
|
+
options = {};
|
|
34059
|
+
}
|
|
34060
|
+
|
|
34074
34061
|
const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
|
|
34075
34062
|
const observer = new ObserverFunc(mutations => {
|
|
34076
34063
|
// The observerUpdate event should only be triggered
|
|
@@ -34153,13 +34140,17 @@
|
|
|
34153
34140
|
const self = this;
|
|
34154
34141
|
if (typeof handler !== 'function') return self;
|
|
34155
34142
|
|
|
34156
|
-
function onceHandler(
|
|
34143
|
+
function onceHandler() {
|
|
34157
34144
|
self.off(events, onceHandler);
|
|
34158
34145
|
|
|
34159
34146
|
if (onceHandler.__emitterProxy) {
|
|
34160
34147
|
delete onceHandler.__emitterProxy;
|
|
34161
34148
|
}
|
|
34162
34149
|
|
|
34150
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34151
|
+
args[_key] = arguments[_key];
|
|
34152
|
+
}
|
|
34153
|
+
|
|
34163
34154
|
handler.apply(self, args);
|
|
34164
34155
|
}
|
|
34165
34156
|
|
|
@@ -34208,13 +34199,17 @@
|
|
|
34208
34199
|
return self;
|
|
34209
34200
|
},
|
|
34210
34201
|
|
|
34211
|
-
emit(
|
|
34202
|
+
emit() {
|
|
34212
34203
|
const self = this;
|
|
34213
34204
|
if (!self.eventsListeners) return self;
|
|
34214
34205
|
let events;
|
|
34215
34206
|
let data;
|
|
34216
34207
|
let context;
|
|
34217
34208
|
|
|
34209
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
34210
|
+
args[_key2] = arguments[_key2];
|
|
34211
|
+
}
|
|
34212
|
+
|
|
34218
34213
|
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
34219
34214
|
events = args[0];
|
|
34220
34215
|
data = args.slice(1, args.length);
|
|
@@ -34586,6 +34581,17 @@
|
|
|
34586
34581
|
if (params.watchSlidesProgress) {
|
|
34587
34582
|
swiper.updateSlidesOffset();
|
|
34588
34583
|
}
|
|
34584
|
+
|
|
34585
|
+
if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {
|
|
34586
|
+
const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;
|
|
34587
|
+
const hasClassBackfaceClassAdded = swiper.$el.hasClass(backFaceHiddenClass);
|
|
34588
|
+
|
|
34589
|
+
if (slidesLength <= params.maxBackfaceHiddenSlides) {
|
|
34590
|
+
if (!hasClassBackfaceClassAdded) swiper.$el.addClass(backFaceHiddenClass);
|
|
34591
|
+
} else if (hasClassBackfaceClassAdded) {
|
|
34592
|
+
swiper.$el.removeClass(backFaceHiddenClass);
|
|
34593
|
+
}
|
|
34594
|
+
}
|
|
34589
34595
|
}
|
|
34590
34596
|
|
|
34591
34597
|
function updateAutoHeight(speed) {
|
|
@@ -34635,7 +34641,7 @@
|
|
|
34635
34641
|
} // Update Height
|
|
34636
34642
|
|
|
34637
34643
|
|
|
34638
|
-
if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
|
34644
|
+
if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
|
34639
34645
|
}
|
|
34640
34646
|
|
|
34641
34647
|
function updateSlidesOffset() {
|
|
@@ -34647,7 +34653,11 @@
|
|
|
34647
34653
|
}
|
|
34648
34654
|
}
|
|
34649
34655
|
|
|
34650
|
-
function updateSlidesProgress(translate
|
|
34656
|
+
function updateSlidesProgress(translate) {
|
|
34657
|
+
if (translate === void 0) {
|
|
34658
|
+
translate = this && this.translate || 0;
|
|
34659
|
+
}
|
|
34660
|
+
|
|
34651
34661
|
const swiper = this;
|
|
34652
34662
|
const params = swiper.params;
|
|
34653
34663
|
const {
|
|
@@ -34881,7 +34891,7 @@
|
|
|
34881
34891
|
function updateClickedSlide(e) {
|
|
34882
34892
|
const swiper = this;
|
|
34883
34893
|
const params = swiper.params;
|
|
34884
|
-
const slide = $$1(e
|
|
34894
|
+
const slide = $$1(e).closest(`.${params.slideClass}`)[0];
|
|
34885
34895
|
let slideFound = false;
|
|
34886
34896
|
let slideIndex;
|
|
34887
34897
|
|
|
@@ -34926,7 +34936,11 @@
|
|
|
34926
34936
|
updateClickedSlide
|
|
34927
34937
|
};
|
|
34928
34938
|
|
|
34929
|
-
function getSwiperTranslate(axis
|
|
34939
|
+
function getSwiperTranslate(axis) {
|
|
34940
|
+
if (axis === void 0) {
|
|
34941
|
+
axis = this.isHorizontal() ? 'x' : 'y';
|
|
34942
|
+
}
|
|
34943
|
+
|
|
34930
34944
|
const swiper = this;
|
|
34931
34945
|
const {
|
|
34932
34946
|
params,
|
|
@@ -35005,7 +35019,23 @@
|
|
|
35005
35019
|
return -this.snapGrid[this.snapGrid.length - 1];
|
|
35006
35020
|
}
|
|
35007
35021
|
|
|
35008
|
-
function translateTo(translate
|
|
35022
|
+
function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
|
|
35023
|
+
if (translate === void 0) {
|
|
35024
|
+
translate = 0;
|
|
35025
|
+
}
|
|
35026
|
+
|
|
35027
|
+
if (speed === void 0) {
|
|
35028
|
+
speed = this.params.speed;
|
|
35029
|
+
}
|
|
35030
|
+
|
|
35031
|
+
if (runCallbacks === void 0) {
|
|
35032
|
+
runCallbacks = true;
|
|
35033
|
+
}
|
|
35034
|
+
|
|
35035
|
+
if (translateBounds === void 0) {
|
|
35036
|
+
translateBounds = true;
|
|
35037
|
+
}
|
|
35038
|
+
|
|
35009
35039
|
const swiper = this;
|
|
35010
35040
|
const {
|
|
35011
35041
|
params,
|
|
@@ -35108,12 +35138,13 @@
|
|
|
35108
35138
|
swiper.emit('setTransition', duration, byController);
|
|
35109
35139
|
}
|
|
35110
35140
|
|
|
35111
|
-
function transitionEmit({
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
|
|
35115
|
-
|
|
35116
|
-
|
|
35141
|
+
function transitionEmit(_ref) {
|
|
35142
|
+
let {
|
|
35143
|
+
swiper,
|
|
35144
|
+
runCallbacks,
|
|
35145
|
+
direction,
|
|
35146
|
+
step
|
|
35147
|
+
} = _ref;
|
|
35117
35148
|
const {
|
|
35118
35149
|
activeIndex,
|
|
35119
35150
|
previousIndex
|
|
@@ -35142,7 +35173,11 @@
|
|
|
35142
35173
|
}
|
|
35143
35174
|
}
|
|
35144
35175
|
|
|
35145
|
-
function transitionStart(runCallbacks
|
|
35176
|
+
function transitionStart(runCallbacks, direction) {
|
|
35177
|
+
if (runCallbacks === void 0) {
|
|
35178
|
+
runCallbacks = true;
|
|
35179
|
+
}
|
|
35180
|
+
|
|
35146
35181
|
const swiper = this;
|
|
35147
35182
|
const {
|
|
35148
35183
|
params
|
|
@@ -35161,7 +35196,11 @@
|
|
|
35161
35196
|
});
|
|
35162
35197
|
}
|
|
35163
35198
|
|
|
35164
|
-
function transitionEnd(runCallbacks
|
|
35199
|
+
function transitionEnd(runCallbacks, direction) {
|
|
35200
|
+
if (runCallbacks === void 0) {
|
|
35201
|
+
runCallbacks = true;
|
|
35202
|
+
}
|
|
35203
|
+
|
|
35165
35204
|
const swiper = this;
|
|
35166
35205
|
const {
|
|
35167
35206
|
params
|
|
@@ -35183,7 +35222,19 @@
|
|
|
35183
35222
|
transitionEnd
|
|
35184
35223
|
};
|
|
35185
35224
|
|
|
35186
|
-
function slideTo(index
|
|
35225
|
+
function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
35226
|
+
if (index === void 0) {
|
|
35227
|
+
index = 0;
|
|
35228
|
+
}
|
|
35229
|
+
|
|
35230
|
+
if (speed === void 0) {
|
|
35231
|
+
speed = this.params.speed;
|
|
35232
|
+
}
|
|
35233
|
+
|
|
35234
|
+
if (runCallbacks === void 0) {
|
|
35235
|
+
runCallbacks = true;
|
|
35236
|
+
}
|
|
35237
|
+
|
|
35187
35238
|
if (typeof index !== 'number' && typeof index !== 'string') {
|
|
35188
35239
|
throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);
|
|
35189
35240
|
}
|
|
@@ -35333,46 +35384,50 @@
|
|
|
35333
35384
|
return true;
|
|
35334
35385
|
}
|
|
35335
35386
|
|
|
35387
|
+
swiper.setTransition(speed);
|
|
35388
|
+
swiper.setTranslate(translate);
|
|
35389
|
+
swiper.updateActiveIndex(slideIndex);
|
|
35390
|
+
swiper.updateSlidesClasses();
|
|
35391
|
+
swiper.emit('beforeTransitionStart', speed, internal);
|
|
35392
|
+
swiper.transitionStart(runCallbacks, direction);
|
|
35393
|
+
|
|
35336
35394
|
if (speed === 0) {
|
|
35337
|
-
swiper.setTransition(0);
|
|
35338
|
-
swiper.setTranslate(translate);
|
|
35339
|
-
swiper.updateActiveIndex(slideIndex);
|
|
35340
|
-
swiper.updateSlidesClasses();
|
|
35341
|
-
swiper.emit('beforeTransitionStart', speed, internal);
|
|
35342
|
-
swiper.transitionStart(runCallbacks, direction);
|
|
35343
35395
|
swiper.transitionEnd(runCallbacks, direction);
|
|
35344
|
-
} else {
|
|
35345
|
-
swiper.
|
|
35346
|
-
|
|
35347
|
-
swiper.
|
|
35348
|
-
|
|
35349
|
-
|
|
35350
|
-
|
|
35351
|
-
|
|
35352
|
-
|
|
35353
|
-
|
|
35354
|
-
|
|
35355
|
-
|
|
35356
|
-
|
|
35357
|
-
if (!swiper || swiper.destroyed) return;
|
|
35358
|
-
if (e.target !== this) return;
|
|
35359
|
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
35360
|
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
35361
|
-
swiper.onSlideToWrapperTransitionEnd = null;
|
|
35362
|
-
delete swiper.onSlideToWrapperTransitionEnd;
|
|
35363
|
-
swiper.transitionEnd(runCallbacks, direction);
|
|
35364
|
-
};
|
|
35365
|
-
}
|
|
35366
|
-
|
|
35367
|
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
35368
|
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
35396
|
+
} else if (!swiper.animating) {
|
|
35397
|
+
swiper.animating = true;
|
|
35398
|
+
|
|
35399
|
+
if (!swiper.onSlideToWrapperTransitionEnd) {
|
|
35400
|
+
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
|
35401
|
+
if (!swiper || swiper.destroyed) return;
|
|
35402
|
+
if (e.target !== this) return;
|
|
35403
|
+
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
35404
|
+
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
35405
|
+
swiper.onSlideToWrapperTransitionEnd = null;
|
|
35406
|
+
delete swiper.onSlideToWrapperTransitionEnd;
|
|
35407
|
+
swiper.transitionEnd(runCallbacks, direction);
|
|
35408
|
+
};
|
|
35369
35409
|
}
|
|
35410
|
+
|
|
35411
|
+
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
35412
|
+
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
35370
35413
|
}
|
|
35371
35414
|
|
|
35372
35415
|
return true;
|
|
35373
35416
|
}
|
|
35374
35417
|
|
|
35375
|
-
function slideToLoop(index
|
|
35418
|
+
function slideToLoop(index, speed, runCallbacks, internal) {
|
|
35419
|
+
if (index === void 0) {
|
|
35420
|
+
index = 0;
|
|
35421
|
+
}
|
|
35422
|
+
|
|
35423
|
+
if (speed === void 0) {
|
|
35424
|
+
speed = this.params.speed;
|
|
35425
|
+
}
|
|
35426
|
+
|
|
35427
|
+
if (runCallbacks === void 0) {
|
|
35428
|
+
runCallbacks = true;
|
|
35429
|
+
}
|
|
35430
|
+
|
|
35376
35431
|
const swiper = this;
|
|
35377
35432
|
let newIndex = index;
|
|
35378
35433
|
|
|
@@ -35384,7 +35439,15 @@
|
|
|
35384
35439
|
}
|
|
35385
35440
|
|
|
35386
35441
|
/* eslint no-unused-vars: "off" */
|
|
35387
|
-
function slideNext(speed
|
|
35442
|
+
function slideNext(speed, runCallbacks, internal) {
|
|
35443
|
+
if (speed === void 0) {
|
|
35444
|
+
speed = this.params.speed;
|
|
35445
|
+
}
|
|
35446
|
+
|
|
35447
|
+
if (runCallbacks === void 0) {
|
|
35448
|
+
runCallbacks = true;
|
|
35449
|
+
}
|
|
35450
|
+
|
|
35388
35451
|
const swiper = this;
|
|
35389
35452
|
const {
|
|
35390
35453
|
animating,
|
|
@@ -35407,11 +35470,23 @@
|
|
|
35407
35470
|
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
|
35408
35471
|
}
|
|
35409
35472
|
|
|
35473
|
+
if (params.rewind && swiper.isEnd) {
|
|
35474
|
+
return swiper.slideTo(0, speed, runCallbacks, internal);
|
|
35475
|
+
}
|
|
35476
|
+
|
|
35410
35477
|
return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
|
|
35411
35478
|
}
|
|
35412
35479
|
|
|
35413
35480
|
/* eslint no-unused-vars: "off" */
|
|
35414
|
-
function slidePrev(speed
|
|
35481
|
+
function slidePrev(speed, runCallbacks, internal) {
|
|
35482
|
+
if (speed === void 0) {
|
|
35483
|
+
speed = this.params.speed;
|
|
35484
|
+
}
|
|
35485
|
+
|
|
35486
|
+
if (runCallbacks === void 0) {
|
|
35487
|
+
runCallbacks = true;
|
|
35488
|
+
}
|
|
35489
|
+
|
|
35415
35490
|
const swiper = this;
|
|
35416
35491
|
const {
|
|
35417
35492
|
params,
|
|
@@ -35467,17 +35542,42 @@
|
|
|
35467
35542
|
}
|
|
35468
35543
|
}
|
|
35469
35544
|
|
|
35545
|
+
if (params.rewind && swiper.isBeginning) {
|
|
35546
|
+
const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
|
|
35547
|
+
return swiper.slideTo(lastIndex, speed, runCallbacks, internal);
|
|
35548
|
+
}
|
|
35549
|
+
|
|
35470
35550
|
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
|
35471
35551
|
}
|
|
35472
35552
|
|
|
35473
35553
|
/* eslint no-unused-vars: "off" */
|
|
35474
|
-
function slideReset(speed
|
|
35554
|
+
function slideReset(speed, runCallbacks, internal) {
|
|
35555
|
+
if (speed === void 0) {
|
|
35556
|
+
speed = this.params.speed;
|
|
35557
|
+
}
|
|
35558
|
+
|
|
35559
|
+
if (runCallbacks === void 0) {
|
|
35560
|
+
runCallbacks = true;
|
|
35561
|
+
}
|
|
35562
|
+
|
|
35475
35563
|
const swiper = this;
|
|
35476
35564
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
|
35477
35565
|
}
|
|
35478
35566
|
|
|
35479
35567
|
/* eslint no-unused-vars: "off" */
|
|
35480
|
-
function slideToClosest(speed
|
|
35568
|
+
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
35569
|
+
if (speed === void 0) {
|
|
35570
|
+
speed = this.params.speed;
|
|
35571
|
+
}
|
|
35572
|
+
|
|
35573
|
+
if (runCallbacks === void 0) {
|
|
35574
|
+
runCallbacks = true;
|
|
35575
|
+
}
|
|
35576
|
+
|
|
35577
|
+
if (threshold === void 0) {
|
|
35578
|
+
threshold = 0.5;
|
|
35579
|
+
}
|
|
35580
|
+
|
|
35481
35581
|
const swiper = this;
|
|
35482
35582
|
let index = swiper.activeIndex;
|
|
35483
35583
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
|
@@ -35565,7 +35665,7 @@
|
|
|
35565
35665
|
$wrapperEl
|
|
35566
35666
|
} = swiper; // Remove duplicated slides
|
|
35567
35667
|
|
|
35568
|
-
const $selector = $$1($wrapperEl.children()[0].parentNode);
|
|
35668
|
+
const $selector = $wrapperEl.children().length > 0 ? $$1($wrapperEl.children()[0].parentNode) : $wrapperEl;
|
|
35569
35669
|
$selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
|
|
35570
35670
|
let slides = $selector.children(`.${params.slideClass}`);
|
|
35571
35671
|
|
|
@@ -35699,7 +35799,11 @@
|
|
|
35699
35799
|
unsetGrabCursor
|
|
35700
35800
|
};
|
|
35701
35801
|
|
|
35702
|
-
function closestElement(selector, base
|
|
35802
|
+
function closestElement(selector, base) {
|
|
35803
|
+
if (base === void 0) {
|
|
35804
|
+
base = this;
|
|
35805
|
+
}
|
|
35806
|
+
|
|
35703
35807
|
function __closestFrom(el) {
|
|
35704
35808
|
if (!el || el === getDocument() || el === getWindow()) return null;
|
|
35705
35809
|
if (el.assignedSlot) el = el.assignedSlot;
|
|
@@ -35794,7 +35898,14 @@
|
|
|
35794
35898
|
|
|
35795
35899
|
if (e.type !== 'touchstart') {
|
|
35796
35900
|
let preventDefault = true;
|
|
35797
|
-
|
|
35901
|
+
|
|
35902
|
+
if ($targetEl.is(data.focusableElements)) {
|
|
35903
|
+
preventDefault = false;
|
|
35904
|
+
|
|
35905
|
+
if ($targetEl[0].nodeName === 'SELECT') {
|
|
35906
|
+
data.isTouched = false;
|
|
35907
|
+
}
|
|
35908
|
+
}
|
|
35798
35909
|
|
|
35799
35910
|
if (document.activeElement && $$1(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {
|
|
35800
35911
|
document.activeElement.blur();
|
|
@@ -35807,6 +35918,10 @@
|
|
|
35807
35918
|
}
|
|
35808
35919
|
}
|
|
35809
35920
|
|
|
35921
|
+
if (swiper.params.freeMode && swiper.params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {
|
|
35922
|
+
swiper.freeMode.onTouchStart();
|
|
35923
|
+
}
|
|
35924
|
+
|
|
35810
35925
|
swiper.emit('touchStart', e);
|
|
35811
35926
|
}
|
|
35812
35927
|
|
|
@@ -35844,8 +35959,9 @@
|
|
|
35844
35959
|
}
|
|
35845
35960
|
|
|
35846
35961
|
if (!swiper.allowTouchMove) {
|
|
35847
|
-
|
|
35848
|
-
|
|
35962
|
+
if (!$$1(e.target).is(data.focusableElements)) {
|
|
35963
|
+
swiper.allowClick = false;
|
|
35964
|
+
}
|
|
35849
35965
|
|
|
35850
35966
|
if (data.isTouched) {
|
|
35851
35967
|
Object.assign(touches, {
|
|
@@ -36070,7 +36186,8 @@
|
|
|
36070
36186
|
const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click
|
|
36071
36187
|
|
|
36072
36188
|
if (swiper.allowClick) {
|
|
36073
|
-
|
|
36189
|
+
const pathTree = e.path || e.composedPath && e.composedPath();
|
|
36190
|
+
swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);
|
|
36074
36191
|
swiper.emit('tap click', e);
|
|
36075
36192
|
|
|
36076
36193
|
if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {
|
|
@@ -36128,6 +36245,17 @@
|
|
|
36128
36245
|
stopIndex = i;
|
|
36129
36246
|
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
|
36130
36247
|
}
|
|
36248
|
+
}
|
|
36249
|
+
|
|
36250
|
+
let rewindFirstIndex = null;
|
|
36251
|
+
let rewindLastIndex = null;
|
|
36252
|
+
|
|
36253
|
+
if (params.rewind) {
|
|
36254
|
+
if (swiper.isBeginning) {
|
|
36255
|
+
rewindLastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
|
|
36256
|
+
} else if (swiper.isEnd) {
|
|
36257
|
+
rewindFirstIndex = 0;
|
|
36258
|
+
}
|
|
36131
36259
|
} // Find current slide size
|
|
36132
36260
|
|
|
36133
36261
|
|
|
@@ -36142,11 +36270,17 @@
|
|
|
36142
36270
|
}
|
|
36143
36271
|
|
|
36144
36272
|
if (swiper.swipeDirection === 'next') {
|
|
36145
|
-
if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);
|
|
36273
|
+
if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);
|
|
36146
36274
|
}
|
|
36147
36275
|
|
|
36148
36276
|
if (swiper.swipeDirection === 'prev') {
|
|
36149
|
-
if (ratio > 1 - params.longSwipesRatio)
|
|
36277
|
+
if (ratio > 1 - params.longSwipesRatio) {
|
|
36278
|
+
swiper.slideTo(stopIndex + increment);
|
|
36279
|
+
} else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {
|
|
36280
|
+
swiper.slideTo(rewindLastIndex);
|
|
36281
|
+
} else {
|
|
36282
|
+
swiper.slideTo(stopIndex);
|
|
36283
|
+
}
|
|
36150
36284
|
}
|
|
36151
36285
|
} else {
|
|
36152
36286
|
// Short swipes
|
|
@@ -36159,11 +36293,11 @@
|
|
|
36159
36293
|
|
|
36160
36294
|
if (!isNavButtonTarget) {
|
|
36161
36295
|
if (swiper.swipeDirection === 'next') {
|
|
36162
|
-
swiper.slideTo(stopIndex + increment);
|
|
36296
|
+
swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
|
|
36163
36297
|
}
|
|
36164
36298
|
|
|
36165
36299
|
if (swiper.swipeDirection === 'prev') {
|
|
36166
|
-
swiper.slideTo(stopIndex);
|
|
36300
|
+
swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
|
|
36167
36301
|
}
|
|
36168
36302
|
} else if (e.target === swiper.navigation.nextEl) {
|
|
36169
36303
|
swiper.slideTo(stopIndex + increment);
|
|
@@ -36429,7 +36563,11 @@
|
|
|
36429
36563
|
swiper.emit('breakpoint', breakpointParams);
|
|
36430
36564
|
}
|
|
36431
36565
|
|
|
36432
|
-
function getBreakpoint(breakpoints, base
|
|
36566
|
+
function getBreakpoint(breakpoints, base, containerEl) {
|
|
36567
|
+
if (base === void 0) {
|
|
36568
|
+
base = 'window';
|
|
36569
|
+
}
|
|
36570
|
+
|
|
36433
36571
|
if (!breakpoints || base === 'container' && !containerEl) return undefined;
|
|
36434
36572
|
let breakpoint = false;
|
|
36435
36573
|
const window = getWindow();
|
|
@@ -36733,6 +36871,8 @@
|
|
|
36733
36871
|
loopedSlides: null,
|
|
36734
36872
|
loopFillGroupWithBlank: false,
|
|
36735
36873
|
loopPreventsSlide: true,
|
|
36874
|
+
// rewind
|
|
36875
|
+
rewind: false,
|
|
36736
36876
|
// Swiping/no swiping
|
|
36737
36877
|
allowSlidePrev: true,
|
|
36738
36878
|
allowSlideNext: true,
|
|
@@ -36743,6 +36883,7 @@
|
|
|
36743
36883
|
noSwipingSelector: null,
|
|
36744
36884
|
// Passive Listeners
|
|
36745
36885
|
passiveListeners: true,
|
|
36886
|
+
maxBackfaceHiddenSlides: 10,
|
|
36746
36887
|
// NS
|
|
36747
36888
|
containerModifierClass: 'swiper-',
|
|
36748
36889
|
// NEW
|
|
@@ -36764,7 +36905,11 @@
|
|
|
36764
36905
|
};
|
|
36765
36906
|
|
|
36766
36907
|
function moduleExtendParams(params, allModulesParams) {
|
|
36767
|
-
return function extendParams(obj
|
|
36908
|
+
return function extendParams(obj) {
|
|
36909
|
+
if (obj === void 0) {
|
|
36910
|
+
obj = {};
|
|
36911
|
+
}
|
|
36912
|
+
|
|
36768
36913
|
const moduleParamName = Object.keys(obj)[0];
|
|
36769
36914
|
const moduleParams = obj[moduleParamName];
|
|
36770
36915
|
|
|
@@ -36819,10 +36964,14 @@
|
|
|
36819
36964
|
const extendedDefaults = {};
|
|
36820
36965
|
|
|
36821
36966
|
class Swiper$1 {
|
|
36822
|
-
constructor(
|
|
36967
|
+
constructor() {
|
|
36823
36968
|
let el;
|
|
36824
36969
|
let params;
|
|
36825
36970
|
|
|
36971
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36972
|
+
args[_key] = arguments[_key];
|
|
36973
|
+
}
|
|
36974
|
+
|
|
36826
36975
|
if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {
|
|
36827
36976
|
params = args[0];
|
|
36828
36977
|
} else {
|
|
@@ -37054,7 +37203,15 @@
|
|
|
37054
37203
|
swiper.emit('_slideClasses', updates);
|
|
37055
37204
|
}
|
|
37056
37205
|
|
|
37057
|
-
slidesPerViewDynamic(view
|
|
37206
|
+
slidesPerViewDynamic(view, exact) {
|
|
37207
|
+
if (view === void 0) {
|
|
37208
|
+
view = 'current';
|
|
37209
|
+
}
|
|
37210
|
+
|
|
37211
|
+
if (exact === void 0) {
|
|
37212
|
+
exact = false;
|
|
37213
|
+
}
|
|
37214
|
+
|
|
37058
37215
|
const swiper = this;
|
|
37059
37216
|
const {
|
|
37060
37217
|
params,
|
|
@@ -37162,7 +37319,11 @@
|
|
|
37162
37319
|
swiper.emit('update');
|
|
37163
37320
|
}
|
|
37164
37321
|
|
|
37165
|
-
changeDirection(newDirection, needUpdate
|
|
37322
|
+
changeDirection(newDirection, needUpdate) {
|
|
37323
|
+
if (needUpdate === void 0) {
|
|
37324
|
+
needUpdate = true;
|
|
37325
|
+
}
|
|
37326
|
+
|
|
37166
37327
|
const swiper = this;
|
|
37167
37328
|
const currentDirection = swiper.params.direction;
|
|
37168
37329
|
|
|
@@ -37300,7 +37461,15 @@
|
|
|
37300
37461
|
return swiper;
|
|
37301
37462
|
}
|
|
37302
37463
|
|
|
37303
|
-
destroy(deleteInstance
|
|
37464
|
+
destroy(deleteInstance, cleanStyles) {
|
|
37465
|
+
if (deleteInstance === void 0) {
|
|
37466
|
+
deleteInstance = true;
|
|
37467
|
+
}
|
|
37468
|
+
|
|
37469
|
+
if (cleanStyles === void 0) {
|
|
37470
|
+
cleanStyles = true;
|
|
37471
|
+
}
|
|
37472
|
+
|
|
37304
37473
|
const swiper = this;
|
|
37305
37474
|
const {
|
|
37306
37475
|
params,
|
|
@@ -37389,11 +37558,12 @@
|
|
|
37389
37558
|
});
|
|
37390
37559
|
Swiper$1.use([Resize, Observer]);
|
|
37391
37560
|
|
|
37392
|
-
function Virtual({
|
|
37393
|
-
|
|
37394
|
-
|
|
37395
|
-
|
|
37396
|
-
|
|
37561
|
+
function Virtual(_ref) {
|
|
37562
|
+
let {
|
|
37563
|
+
swiper,
|
|
37564
|
+
extendParams,
|
|
37565
|
+
on
|
|
37566
|
+
} = _ref;
|
|
37397
37567
|
extendParams({
|
|
37398
37568
|
virtual: {
|
|
37399
37569
|
enabled: false,
|
|
@@ -37680,12 +37850,13 @@
|
|
|
37680
37850
|
}
|
|
37681
37851
|
|
|
37682
37852
|
/* eslint-disable consistent-return */
|
|
37683
|
-
function Keyboard({
|
|
37684
|
-
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
|
|
37853
|
+
function Keyboard(_ref) {
|
|
37854
|
+
let {
|
|
37855
|
+
swiper,
|
|
37856
|
+
extendParams,
|
|
37857
|
+
on,
|
|
37858
|
+
emit
|
|
37859
|
+
} = _ref;
|
|
37689
37860
|
const document = getDocument();
|
|
37690
37861
|
const window = getWindow();
|
|
37691
37862
|
swiper.keyboard = {
|
|
@@ -37810,12 +37981,13 @@
|
|
|
37810
37981
|
}
|
|
37811
37982
|
|
|
37812
37983
|
/* eslint-disable consistent-return */
|
|
37813
|
-
function Mousewheel({
|
|
37814
|
-
|
|
37815
|
-
|
|
37816
|
-
|
|
37817
|
-
|
|
37818
|
-
|
|
37984
|
+
function Mousewheel(_ref) {
|
|
37985
|
+
let {
|
|
37986
|
+
swiper,
|
|
37987
|
+
extendParams,
|
|
37988
|
+
on,
|
|
37989
|
+
emit
|
|
37990
|
+
} = _ref;
|
|
37819
37991
|
const window = getWindow();
|
|
37820
37992
|
extendParams({
|
|
37821
37993
|
mousewheel: {
|
|
@@ -38252,12 +38424,13 @@
|
|
|
38252
38424
|
return params;
|
|
38253
38425
|
}
|
|
38254
38426
|
|
|
38255
|
-
function Navigation({
|
|
38256
|
-
|
|
38257
|
-
|
|
38258
|
-
|
|
38259
|
-
|
|
38260
|
-
|
|
38427
|
+
function Navigation(_ref) {
|
|
38428
|
+
let {
|
|
38429
|
+
swiper,
|
|
38430
|
+
extendParams,
|
|
38431
|
+
on,
|
|
38432
|
+
emit
|
|
38433
|
+
} = _ref;
|
|
38261
38434
|
extendParams({
|
|
38262
38435
|
navigation: {
|
|
38263
38436
|
nextEl: null,
|
|
@@ -38309,19 +38482,19 @@
|
|
|
38309
38482
|
$nextEl,
|
|
38310
38483
|
$prevEl
|
|
38311
38484
|
} = swiper.navigation;
|
|
38312
|
-
toggleEl($prevEl, swiper.isBeginning);
|
|
38313
|
-
toggleEl($nextEl, swiper.isEnd);
|
|
38485
|
+
toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);
|
|
38486
|
+
toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);
|
|
38314
38487
|
}
|
|
38315
38488
|
|
|
38316
38489
|
function onPrevClick(e) {
|
|
38317
38490
|
e.preventDefault();
|
|
38318
|
-
if (swiper.isBeginning && !swiper.params.loop) return;
|
|
38491
|
+
if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;
|
|
38319
38492
|
swiper.slidePrev();
|
|
38320
38493
|
}
|
|
38321
38494
|
|
|
38322
38495
|
function onNextClick(e) {
|
|
38323
38496
|
e.preventDefault();
|
|
38324
|
-
if (swiper.isEnd && !swiper.params.loop) return;
|
|
38497
|
+
if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;
|
|
38325
38498
|
swiper.slideNext();
|
|
38326
38499
|
}
|
|
38327
38500
|
|
|
@@ -38436,17 +38609,22 @@
|
|
|
38436
38609
|
});
|
|
38437
38610
|
}
|
|
38438
38611
|
|
|
38439
|
-
function classesToSelector(classes
|
|
38612
|
+
function classesToSelector(classes) {
|
|
38613
|
+
if (classes === void 0) {
|
|
38614
|
+
classes = '';
|
|
38615
|
+
}
|
|
38616
|
+
|
|
38440
38617
|
return `.${classes.trim().replace(/([\.:!\/])/g, '\\$1') // eslint-disable-line
|
|
38441
38618
|
.replace(/ /g, '.')}`;
|
|
38442
38619
|
}
|
|
38443
38620
|
|
|
38444
|
-
function Pagination({
|
|
38445
|
-
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38621
|
+
function Pagination(_ref) {
|
|
38622
|
+
let {
|
|
38623
|
+
swiper,
|
|
38624
|
+
extendParams,
|
|
38625
|
+
on,
|
|
38626
|
+
emit
|
|
38627
|
+
} = _ref;
|
|
38450
38628
|
const pfx = 'swiper-pagination';
|
|
38451
38629
|
extendParams({
|
|
38452
38630
|
pagination: {
|
|
@@ -38536,7 +38714,7 @@
|
|
|
38536
38714
|
$el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);
|
|
38537
38715
|
|
|
38538
38716
|
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
|
38539
|
-
dynamicBulletIndex += current - swiper.previousIndex;
|
|
38717
|
+
dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);
|
|
38540
38718
|
|
|
38541
38719
|
if (dynamicBulletIndex > params.dynamicMainBullets - 1) {
|
|
38542
38720
|
dynamicBulletIndex = params.dynamicMainBullets - 1;
|
|
@@ -38545,7 +38723,7 @@
|
|
|
38545
38723
|
}
|
|
38546
38724
|
}
|
|
38547
38725
|
|
|
38548
|
-
firstIndex = current - dynamicBulletIndex;
|
|
38726
|
+
firstIndex = Math.max(current - dynamicBulletIndex, 0);
|
|
38549
38727
|
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
|
38550
38728
|
midIndex = (lastIndex + firstIndex) / 2;
|
|
38551
38729
|
}
|
|
@@ -38589,7 +38767,7 @@
|
|
|
38589
38767
|
}
|
|
38590
38768
|
|
|
38591
38769
|
if (swiper.params.loop) {
|
|
38592
|
-
if (bulletIndex >= bullets.length
|
|
38770
|
+
if (bulletIndex >= bullets.length) {
|
|
38593
38771
|
for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {
|
|
38594
38772
|
bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);
|
|
38595
38773
|
}
|
|
@@ -38849,12 +39027,13 @@
|
|
|
38849
39027
|
});
|
|
38850
39028
|
}
|
|
38851
39029
|
|
|
38852
|
-
function Scrollbar({
|
|
38853
|
-
|
|
38854
|
-
|
|
38855
|
-
|
|
38856
|
-
|
|
38857
|
-
|
|
39030
|
+
function Scrollbar(_ref) {
|
|
39031
|
+
let {
|
|
39032
|
+
swiper,
|
|
39033
|
+
extendParams,
|
|
39034
|
+
on,
|
|
39035
|
+
emit
|
|
39036
|
+
} = _ref;
|
|
38858
39037
|
const document = getDocument();
|
|
38859
39038
|
let isTouched = false;
|
|
38860
39039
|
let timeout = null;
|
|
@@ -39207,11 +39386,12 @@
|
|
|
39207
39386
|
});
|
|
39208
39387
|
}
|
|
39209
39388
|
|
|
39210
|
-
function Parallax({
|
|
39211
|
-
|
|
39212
|
-
|
|
39213
|
-
|
|
39214
|
-
|
|
39389
|
+
function Parallax(_ref) {
|
|
39390
|
+
let {
|
|
39391
|
+
swiper,
|
|
39392
|
+
extendParams,
|
|
39393
|
+
on
|
|
39394
|
+
} = _ref;
|
|
39215
39395
|
extendParams({
|
|
39216
39396
|
parallax: {
|
|
39217
39397
|
enabled: false
|
|
@@ -39290,7 +39470,11 @@
|
|
|
39290
39470
|
});
|
|
39291
39471
|
};
|
|
39292
39472
|
|
|
39293
|
-
const setTransition = (duration
|
|
39473
|
+
const setTransition = function (duration) {
|
|
39474
|
+
if (duration === void 0) {
|
|
39475
|
+
duration = swiper.params.speed;
|
|
39476
|
+
}
|
|
39477
|
+
|
|
39294
39478
|
const {
|
|
39295
39479
|
$el
|
|
39296
39480
|
} = swiper;
|
|
@@ -39321,12 +39505,13 @@
|
|
|
39321
39505
|
});
|
|
39322
39506
|
}
|
|
39323
39507
|
|
|
39324
|
-
function Zoom({
|
|
39325
|
-
|
|
39326
|
-
|
|
39327
|
-
|
|
39328
|
-
|
|
39329
|
-
|
|
39508
|
+
function Zoom(_ref) {
|
|
39509
|
+
let {
|
|
39510
|
+
swiper,
|
|
39511
|
+
extendParams,
|
|
39512
|
+
on,
|
|
39513
|
+
emit
|
|
39514
|
+
} = _ref;
|
|
39330
39515
|
const window = getWindow();
|
|
39331
39516
|
extendParams({
|
|
39332
39517
|
zoom: {
|
|
@@ -39424,7 +39609,7 @@
|
|
|
39424
39609
|
if (!gesture.$slideEl || !gesture.$slideEl.length) {
|
|
39425
39610
|
gesture.$slideEl = $$1(e.target).closest(`.${swiper.params.slideClass}`);
|
|
39426
39611
|
if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
|
|
39427
|
-
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('img, svg, canvas,
|
|
39612
|
+
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);
|
|
39428
39613
|
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
|
39429
39614
|
gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
|
39430
39615
|
|
|
@@ -39665,7 +39850,7 @@
|
|
|
39665
39850
|
}
|
|
39666
39851
|
}
|
|
39667
39852
|
|
|
39668
|
-
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('img, svg, canvas,
|
|
39853
|
+
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);
|
|
39669
39854
|
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
|
39670
39855
|
}
|
|
39671
39856
|
|
|
@@ -39760,7 +39945,7 @@
|
|
|
39760
39945
|
gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
|
|
39761
39946
|
}
|
|
39762
39947
|
|
|
39763
|
-
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('img, svg, canvas,
|
|
39948
|
+
gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);
|
|
39764
39949
|
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
|
39765
39950
|
}
|
|
39766
39951
|
|
|
@@ -39931,12 +40116,13 @@
|
|
|
39931
40116
|
});
|
|
39932
40117
|
}
|
|
39933
40118
|
|
|
39934
|
-
function Lazy({
|
|
39935
|
-
|
|
39936
|
-
|
|
39937
|
-
|
|
39938
|
-
|
|
39939
|
-
|
|
40119
|
+
function Lazy(_ref) {
|
|
40120
|
+
let {
|
|
40121
|
+
swiper,
|
|
40122
|
+
extendParams,
|
|
40123
|
+
on,
|
|
40124
|
+
emit
|
|
40125
|
+
} = _ref;
|
|
39940
40126
|
extendParams({
|
|
39941
40127
|
lazy: {
|
|
39942
40128
|
checkInView: false,
|
|
@@ -39955,7 +40141,11 @@
|
|
|
39955
40141
|
let scrollHandlerAttached = false;
|
|
39956
40142
|
let initialImageLoaded = false;
|
|
39957
40143
|
|
|
39958
|
-
function loadInSlide(index, loadInDuplicate
|
|
40144
|
+
function loadInSlide(index, loadInDuplicate) {
|
|
40145
|
+
if (loadInDuplicate === void 0) {
|
|
40146
|
+
loadInDuplicate = true;
|
|
40147
|
+
}
|
|
40148
|
+
|
|
39959
40149
|
const params = swiper.params.lazy;
|
|
39960
40150
|
if (typeof index === 'undefined') return;
|
|
39961
40151
|
if (swiper.slides.length === 0) return;
|
|
@@ -40214,11 +40404,12 @@
|
|
|
40214
40404
|
}
|
|
40215
40405
|
|
|
40216
40406
|
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
|
40217
|
-
function Controller({
|
|
40218
|
-
|
|
40219
|
-
|
|
40220
|
-
|
|
40221
|
-
|
|
40407
|
+
function Controller(_ref) {
|
|
40408
|
+
let {
|
|
40409
|
+
swiper,
|
|
40410
|
+
extendParams,
|
|
40411
|
+
on
|
|
40412
|
+
} = _ref;
|
|
40222
40413
|
extendParams({
|
|
40223
40414
|
controller: {
|
|
40224
40415
|
control: undefined,
|
|
@@ -40404,11 +40595,12 @@
|
|
|
40404
40595
|
});
|
|
40405
40596
|
}
|
|
40406
40597
|
|
|
40407
|
-
function A11y({
|
|
40408
|
-
|
|
40409
|
-
|
|
40410
|
-
|
|
40411
|
-
|
|
40598
|
+
function A11y(_ref) {
|
|
40599
|
+
let {
|
|
40600
|
+
swiper,
|
|
40601
|
+
extendParams,
|
|
40602
|
+
on
|
|
40603
|
+
} = _ref;
|
|
40412
40604
|
extendParams({
|
|
40413
40605
|
a11y: {
|
|
40414
40606
|
enabled: true,
|
|
@@ -40434,7 +40626,11 @@
|
|
|
40434
40626
|
notification.html(message);
|
|
40435
40627
|
}
|
|
40436
40628
|
|
|
40437
|
-
function getRandomNumber(size
|
|
40629
|
+
function getRandomNumber(size) {
|
|
40630
|
+
if (size === void 0) {
|
|
40631
|
+
size = 16;
|
|
40632
|
+
}
|
|
40633
|
+
|
|
40438
40634
|
const randomChar = () => Math.round(16 * Math.random()).toString(16);
|
|
40439
40635
|
|
|
40440
40636
|
return 'x'.repeat(size).replace(/x/g, randomChar);
|
|
@@ -40515,7 +40711,7 @@
|
|
|
40515
40711
|
}
|
|
40516
40712
|
|
|
40517
40713
|
function updateNavigation() {
|
|
40518
|
-
if (swiper.params.loop || !swiper.navigation) return;
|
|
40714
|
+
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
|
|
40519
40715
|
const {
|
|
40520
40716
|
$nextEl,
|
|
40521
40717
|
$prevEl
|
|
@@ -40543,23 +40739,34 @@
|
|
|
40543
40739
|
}
|
|
40544
40740
|
|
|
40545
40741
|
function hasPagination() {
|
|
40546
|
-
return swiper.pagination && swiper.
|
|
40742
|
+
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
|
40743
|
+
}
|
|
40744
|
+
|
|
40745
|
+
function hasClickablePagination() {
|
|
40746
|
+
return hasPagination() && swiper.params.pagination.clickable;
|
|
40547
40747
|
}
|
|
40548
40748
|
|
|
40549
40749
|
function updatePagination() {
|
|
40550
40750
|
const params = swiper.params.a11y;
|
|
40751
|
+
if (!hasPagination()) return;
|
|
40752
|
+
swiper.pagination.bullets.each(bulletEl => {
|
|
40753
|
+
const $bulletEl = $$1(bulletEl);
|
|
40551
40754
|
|
|
40552
|
-
|
|
40553
|
-
swiper.pagination.bullets.each(bulletEl => {
|
|
40554
|
-
const $bulletEl = $$1(bulletEl);
|
|
40755
|
+
if (swiper.params.pagination.clickable) {
|
|
40555
40756
|
makeElFocusable($bulletEl);
|
|
40556
40757
|
|
|
40557
40758
|
if (!swiper.params.pagination.renderBullet) {
|
|
40558
40759
|
addElRole($bulletEl, 'button');
|
|
40559
40760
|
addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
|
|
40560
40761
|
}
|
|
40561
|
-
}
|
|
40562
|
-
|
|
40762
|
+
}
|
|
40763
|
+
|
|
40764
|
+
if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {
|
|
40765
|
+
$bulletEl.attr('aria-current', 'true');
|
|
40766
|
+
} else {
|
|
40767
|
+
$bulletEl.removeAttr('aria-current');
|
|
40768
|
+
}
|
|
40769
|
+
});
|
|
40563
40770
|
}
|
|
40564
40771
|
|
|
40565
40772
|
const initNavEl = ($el, wrapperId, message) => {
|
|
@@ -40574,6 +40781,15 @@
|
|
|
40574
40781
|
addElControls($el, wrapperId);
|
|
40575
40782
|
};
|
|
40576
40783
|
|
|
40784
|
+
const handleFocus = e => {
|
|
40785
|
+
const slideEl = e.target.closest(`.${swiper.params.slideClass}`);
|
|
40786
|
+
if (!slideEl || !swiper.slides.includes(slideEl)) return;
|
|
40787
|
+
const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex;
|
|
40788
|
+
const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
|
|
40789
|
+
if (isActive || isVisible) return;
|
|
40790
|
+
swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
|
|
40791
|
+
};
|
|
40792
|
+
|
|
40577
40793
|
function init() {
|
|
40578
40794
|
const params = swiper.params.a11y;
|
|
40579
40795
|
swiper.$el.append(liveRegion); // Container
|
|
@@ -40628,9 +40844,12 @@
|
|
|
40628
40844
|
} // Pagination
|
|
40629
40845
|
|
|
40630
40846
|
|
|
40631
|
-
if (
|
|
40847
|
+
if (hasClickablePagination()) {
|
|
40632
40848
|
swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
|
40633
|
-
}
|
|
40849
|
+
} // Tab focus
|
|
40850
|
+
|
|
40851
|
+
|
|
40852
|
+
swiper.$el.on('focus', handleFocus, true);
|
|
40634
40853
|
}
|
|
40635
40854
|
|
|
40636
40855
|
function destroy() {
|
|
@@ -40655,9 +40874,12 @@
|
|
|
40655
40874
|
} // Pagination
|
|
40656
40875
|
|
|
40657
40876
|
|
|
40658
|
-
if (
|
|
40877
|
+
if (hasClickablePagination()) {
|
|
40659
40878
|
swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
|
40660
|
-
}
|
|
40879
|
+
} // Tab focus
|
|
40880
|
+
|
|
40881
|
+
|
|
40882
|
+
swiper.$el.off('focus', handleFocus, true);
|
|
40661
40883
|
}
|
|
40662
40884
|
|
|
40663
40885
|
on('beforeInit', () => {
|
|
@@ -40666,13 +40888,8 @@
|
|
|
40666
40888
|
on('afterInit', () => {
|
|
40667
40889
|
if (!swiper.params.a11y.enabled) return;
|
|
40668
40890
|
init();
|
|
40669
|
-
updateNavigation();
|
|
40670
|
-
});
|
|
40671
|
-
on('toEdge', () => {
|
|
40672
|
-
if (!swiper.params.a11y.enabled) return;
|
|
40673
|
-
updateNavigation();
|
|
40674
40891
|
});
|
|
40675
|
-
on('fromEdge', () => {
|
|
40892
|
+
on('fromEdge toEdge afterInit lock unlock', () => {
|
|
40676
40893
|
if (!swiper.params.a11y.enabled) return;
|
|
40677
40894
|
updateNavigation();
|
|
40678
40895
|
});
|
|
@@ -40686,11 +40903,12 @@
|
|
|
40686
40903
|
});
|
|
40687
40904
|
}
|
|
40688
40905
|
|
|
40689
|
-
function History({
|
|
40690
|
-
|
|
40691
|
-
|
|
40692
|
-
|
|
40693
|
-
|
|
40906
|
+
function History(_ref) {
|
|
40907
|
+
let {
|
|
40908
|
+
swiper,
|
|
40909
|
+
extendParams,
|
|
40910
|
+
on
|
|
40911
|
+
} = _ref;
|
|
40694
40912
|
extendParams({
|
|
40695
40913
|
history: {
|
|
40696
40914
|
enabled: false,
|
|
@@ -40836,12 +41054,13 @@
|
|
|
40836
41054
|
});
|
|
40837
41055
|
}
|
|
40838
41056
|
|
|
40839
|
-
function HashNavigation({
|
|
40840
|
-
|
|
40841
|
-
|
|
40842
|
-
|
|
40843
|
-
|
|
40844
|
-
|
|
41057
|
+
function HashNavigation(_ref) {
|
|
41058
|
+
let {
|
|
41059
|
+
swiper,
|
|
41060
|
+
extendParams,
|
|
41061
|
+
emit,
|
|
41062
|
+
on
|
|
41063
|
+
} = _ref;
|
|
40845
41064
|
let initialized = false;
|
|
40846
41065
|
const document = getDocument();
|
|
40847
41066
|
const window = getWindow();
|
|
@@ -40932,12 +41151,13 @@
|
|
|
40932
41151
|
}
|
|
40933
41152
|
|
|
40934
41153
|
/* eslint no-underscore-dangle: "off" */
|
|
40935
|
-
function Autoplay({
|
|
40936
|
-
|
|
40937
|
-
|
|
40938
|
-
|
|
40939
|
-
|
|
40940
|
-
|
|
41154
|
+
function Autoplay(_ref) {
|
|
41155
|
+
let {
|
|
41156
|
+
swiper,
|
|
41157
|
+
extendParams,
|
|
41158
|
+
on,
|
|
41159
|
+
emit
|
|
41160
|
+
} = _ref;
|
|
40941
41161
|
let timeout;
|
|
40942
41162
|
swiper.autoplay = {
|
|
40943
41163
|
running: false,
|
|
@@ -41072,6 +41292,7 @@
|
|
|
41072
41292
|
if (swiper.params.autoplay.disableOnInteraction) {
|
|
41073
41293
|
stop();
|
|
41074
41294
|
} else {
|
|
41295
|
+
emit('autoplayPause');
|
|
41075
41296
|
pause();
|
|
41076
41297
|
}
|
|
41077
41298
|
|
|
@@ -41086,6 +41307,7 @@
|
|
|
41086
41307
|
}
|
|
41087
41308
|
|
|
41088
41309
|
swiper.autoplay.paused = false;
|
|
41310
|
+
emit('autoplayResume');
|
|
41089
41311
|
run();
|
|
41090
41312
|
}
|
|
41091
41313
|
|
|
@@ -41150,11 +41372,12 @@
|
|
|
41150
41372
|
});
|
|
41151
41373
|
}
|
|
41152
41374
|
|
|
41153
|
-
function Thumb({
|
|
41154
|
-
|
|
41155
|
-
|
|
41156
|
-
|
|
41157
|
-
|
|
41375
|
+
function Thumb(_ref) {
|
|
41376
|
+
let {
|
|
41377
|
+
swiper,
|
|
41378
|
+
extendParams,
|
|
41379
|
+
on
|
|
41380
|
+
} = _ref;
|
|
41158
41381
|
extendParams({
|
|
41159
41382
|
thumbs: {
|
|
41160
41383
|
swiper: null,
|
|
@@ -41353,12 +41576,13 @@
|
|
|
41353
41576
|
});
|
|
41354
41577
|
}
|
|
41355
41578
|
|
|
41356
|
-
function freeMode({
|
|
41357
|
-
|
|
41358
|
-
|
|
41359
|
-
|
|
41360
|
-
|
|
41361
|
-
|
|
41579
|
+
function freeMode(_ref) {
|
|
41580
|
+
let {
|
|
41581
|
+
swiper,
|
|
41582
|
+
extendParams,
|
|
41583
|
+
emit,
|
|
41584
|
+
once
|
|
41585
|
+
} = _ref;
|
|
41362
41586
|
extendParams({
|
|
41363
41587
|
freeMode: {
|
|
41364
41588
|
enabled: false,
|
|
@@ -41372,6 +41596,16 @@
|
|
|
41372
41596
|
}
|
|
41373
41597
|
});
|
|
41374
41598
|
|
|
41599
|
+
function onTouchStart() {
|
|
41600
|
+
const translate = swiper.getTranslate();
|
|
41601
|
+
swiper.setTranslate(translate);
|
|
41602
|
+
swiper.setTransition(0);
|
|
41603
|
+
swiper.touchEventsData.velocities.length = 0;
|
|
41604
|
+
swiper.freeMode.onTouchEnd({
|
|
41605
|
+
currentPos: swiper.rtl ? swiper.translate : -swiper.translate
|
|
41606
|
+
});
|
|
41607
|
+
}
|
|
41608
|
+
|
|
41375
41609
|
function onTouchMove() {
|
|
41376
41610
|
const {
|
|
41377
41611
|
touchEventsData: data,
|
|
@@ -41391,9 +41625,10 @@
|
|
|
41391
41625
|
});
|
|
41392
41626
|
}
|
|
41393
41627
|
|
|
41394
|
-
function onTouchEnd({
|
|
41395
|
-
|
|
41396
|
-
|
|
41628
|
+
function onTouchEnd(_ref2) {
|
|
41629
|
+
let {
|
|
41630
|
+
currentPos
|
|
41631
|
+
} = _ref2;
|
|
41397
41632
|
const {
|
|
41398
41633
|
params,
|
|
41399
41634
|
$wrapperEl,
|
|
@@ -41592,16 +41827,18 @@
|
|
|
41592
41827
|
|
|
41593
41828
|
Object.assign(swiper, {
|
|
41594
41829
|
freeMode: {
|
|
41830
|
+
onTouchStart,
|
|
41595
41831
|
onTouchMove,
|
|
41596
41832
|
onTouchEnd
|
|
41597
41833
|
}
|
|
41598
41834
|
});
|
|
41599
41835
|
}
|
|
41600
41836
|
|
|
41601
|
-
function Grid({
|
|
41602
|
-
|
|
41603
|
-
|
|
41604
|
-
|
|
41837
|
+
function Grid(_ref) {
|
|
41838
|
+
let {
|
|
41839
|
+
swiper,
|
|
41840
|
+
extendParams
|
|
41841
|
+
} = _ref;
|
|
41605
41842
|
extendParams({
|
|
41606
41843
|
grid: {
|
|
41607
41844
|
rows: 1,
|
|
@@ -41902,9 +42139,10 @@
|
|
|
41902
42139
|
swiper.removeSlide(slidesIndexes);
|
|
41903
42140
|
}
|
|
41904
42141
|
|
|
41905
|
-
function Manipulation({
|
|
41906
|
-
|
|
41907
|
-
|
|
42142
|
+
function Manipulation(_ref) {
|
|
42143
|
+
let {
|
|
42144
|
+
swiper
|
|
42145
|
+
} = _ref;
|
|
41908
42146
|
Object.assign(swiper, {
|
|
41909
42147
|
appendSlide: appendSlide.bind(swiper),
|
|
41910
42148
|
prependSlide: prependSlide.bind(swiper),
|
|
@@ -41957,12 +42195,13 @@
|
|
|
41957
42195
|
return $slideEl;
|
|
41958
42196
|
}
|
|
41959
42197
|
|
|
41960
|
-
function effectVirtualTransitionEnd({
|
|
41961
|
-
|
|
41962
|
-
|
|
41963
|
-
|
|
41964
|
-
|
|
41965
|
-
|
|
42198
|
+
function effectVirtualTransitionEnd(_ref) {
|
|
42199
|
+
let {
|
|
42200
|
+
swiper,
|
|
42201
|
+
duration,
|
|
42202
|
+
transformEl,
|
|
42203
|
+
allSlides
|
|
42204
|
+
} = _ref;
|
|
41966
42205
|
const {
|
|
41967
42206
|
slides,
|
|
41968
42207
|
activeIndex,
|
|
@@ -41993,11 +42232,12 @@
|
|
|
41993
42232
|
}
|
|
41994
42233
|
}
|
|
41995
42234
|
|
|
41996
|
-
function EffectFade({
|
|
41997
|
-
|
|
41998
|
-
|
|
41999
|
-
|
|
42000
|
-
|
|
42235
|
+
function EffectFade(_ref) {
|
|
42236
|
+
let {
|
|
42237
|
+
swiper,
|
|
42238
|
+
extendParams,
|
|
42239
|
+
on
|
|
42240
|
+
} = _ref;
|
|
42001
42241
|
extendParams({
|
|
42002
42242
|
fadeEffect: {
|
|
42003
42243
|
crossFade: false,
|
|
@@ -42061,11 +42301,12 @@
|
|
|
42061
42301
|
});
|
|
42062
42302
|
}
|
|
42063
42303
|
|
|
42064
|
-
function EffectCube({
|
|
42065
|
-
|
|
42066
|
-
|
|
42067
|
-
|
|
42068
|
-
|
|
42304
|
+
function EffectCube(_ref) {
|
|
42305
|
+
let {
|
|
42306
|
+
swiper,
|
|
42307
|
+
extendParams,
|
|
42308
|
+
on
|
|
42309
|
+
} = _ref;
|
|
42069
42310
|
extendParams({
|
|
42070
42311
|
cubeEffect: {
|
|
42071
42312
|
slideShadows: true,
|
|
@@ -42253,11 +42494,12 @@
|
|
|
42253
42494
|
return $shadowEl;
|
|
42254
42495
|
}
|
|
42255
42496
|
|
|
42256
|
-
function EffectFlip({
|
|
42257
|
-
|
|
42258
|
-
|
|
42259
|
-
|
|
42260
|
-
|
|
42497
|
+
function EffectFlip(_ref) {
|
|
42498
|
+
let {
|
|
42499
|
+
swiper,
|
|
42500
|
+
extendParams,
|
|
42501
|
+
on
|
|
42502
|
+
} = _ref;
|
|
42261
42503
|
extendParams({
|
|
42262
42504
|
flipEffect: {
|
|
42263
42505
|
slideShadows: true,
|
|
@@ -42352,11 +42594,12 @@
|
|
|
42352
42594
|
});
|
|
42353
42595
|
}
|
|
42354
42596
|
|
|
42355
|
-
function EffectCoverflow({
|
|
42356
|
-
|
|
42357
|
-
|
|
42358
|
-
|
|
42359
|
-
|
|
42597
|
+
function EffectCoverflow(_ref) {
|
|
42598
|
+
let {
|
|
42599
|
+
swiper,
|
|
42600
|
+
extendParams,
|
|
42601
|
+
on
|
|
42602
|
+
} = _ref;
|
|
42360
42603
|
extendParams({
|
|
42361
42604
|
coverflowEffect: {
|
|
42362
42605
|
rotate: 50,
|
|
@@ -42453,11 +42696,12 @@
|
|
|
42453
42696
|
});
|
|
42454
42697
|
}
|
|
42455
42698
|
|
|
42456
|
-
function EffectCreative({
|
|
42457
|
-
|
|
42458
|
-
|
|
42459
|
-
|
|
42460
|
-
|
|
42699
|
+
function EffectCreative(_ref) {
|
|
42700
|
+
let {
|
|
42701
|
+
swiper,
|
|
42702
|
+
extendParams,
|
|
42703
|
+
on
|
|
42704
|
+
} = _ref;
|
|
42461
42705
|
extendParams({
|
|
42462
42706
|
creativeEffect: {
|
|
42463
42707
|
transformEl: null,
|
|
@@ -42604,11 +42848,12 @@
|
|
|
42604
42848
|
});
|
|
42605
42849
|
}
|
|
42606
42850
|
|
|
42607
|
-
function EffectCards({
|
|
42608
|
-
|
|
42609
|
-
|
|
42610
|
-
|
|
42611
|
-
|
|
42851
|
+
function EffectCards(_ref) {
|
|
42852
|
+
let {
|
|
42853
|
+
swiper,
|
|
42854
|
+
extendParams,
|
|
42855
|
+
on
|
|
42856
|
+
} = _ref;
|
|
42612
42857
|
extendParams({
|
|
42613
42858
|
cardsEffect: {
|
|
42614
42859
|
slideShadows: true,
|
|
@@ -42727,15 +42972,15 @@
|
|
|
42727
42972
|
}
|
|
42728
42973
|
|
|
42729
42974
|
/**
|
|
42730
|
-
* Swiper
|
|
42975
|
+
* Swiper 8.0.6
|
|
42731
42976
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
42732
42977
|
* https://swiperjs.com
|
|
42733
42978
|
*
|
|
42734
|
-
* Copyright 2014-
|
|
42979
|
+
* Copyright 2014-2022 Vladimir Kharlampidi
|
|
42735
42980
|
*
|
|
42736
42981
|
* Released under the MIT License
|
|
42737
42982
|
*
|
|
42738
|
-
* Released on:
|
|
42983
|
+
* Released on: February 14, 2022
|
|
42739
42984
|
*/
|
|
42740
42985
|
|
|
42741
42986
|
const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Lazy, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards];
|
|
@@ -50229,6 +50474,19 @@
|
|
|
50229
50474
|
|
|
50230
50475
|
};
|
|
50231
50476
|
|
|
50477
|
+
const Breadcrumbs = {};
|
|
50478
|
+
var Breadcrumbs$1 = {
|
|
50479
|
+
name: 'breadrumbs',
|
|
50480
|
+
|
|
50481
|
+
create() {
|
|
50482
|
+
const app = this;
|
|
50483
|
+
bindMethods(app, {
|
|
50484
|
+
breadrumbs: Breadcrumbs
|
|
50485
|
+
});
|
|
50486
|
+
}
|
|
50487
|
+
|
|
50488
|
+
};
|
|
50489
|
+
|
|
50232
50490
|
var Elevation = {
|
|
50233
50491
|
name: 'elevation'
|
|
50234
50492
|
};
|
|
@@ -50244,7 +50502,7 @@
|
|
|
50244
50502
|
|
|
50245
50503
|
|
|
50246
50504
|
Router.use([RouterComponentLoaderModule]);
|
|
50247
|
-
Framework7.use([DeviceModule, SupportModule, UtilsModule, ResizeModule, RequestModule, TouchModule, ClicksModule, RouterModule, HistoryModule, ComponentModule, ServiceWorkerModule, StoreModule, Statusbar$1, View, Navbar$1, Toolbar$1, Subnavbar, TouchRipple, Modal, Appbar, Dialog, Popup, LoginScreen, Popover, Actions, Sheet, Toast, Preloader$1, Progressbar$1, Sortable$1, Swipeout$1, Accordion$1, ContactsList, VirtualList, ListIndex, Timeline, Tabs, Panel, Card, Chip, Form, Input$1, Checkbox, Radio, Toggle, Range, Stepper, SmartSelect, Grid$2, Calendar, Picker, InfiniteScroll$1, PullToRefresh, Lazy$2, DataTable, Fab$1, Searchbar, Messages, Messagebar, Swiper, PhotoBrowser, Notification, Autocomplete, Tooltip, Gauge, Skeleton, Menu$1, ColorPicker, Treeview$1, TextEditor, PieChart, AreaChart, Elevation, Typography]);
|
|
50505
|
+
Framework7.use([DeviceModule, SupportModule, UtilsModule, ResizeModule, RequestModule, TouchModule, ClicksModule, RouterModule, HistoryModule, ComponentModule, ServiceWorkerModule, StoreModule, Statusbar$1, View, Navbar$1, Toolbar$1, Subnavbar, TouchRipple, Modal, Appbar, Dialog, Popup, LoginScreen, Popover, Actions, Sheet, Toast, Preloader$1, Progressbar$1, Sortable$1, Swipeout$1, Accordion$1, ContactsList, VirtualList, ListIndex, Timeline, Tabs, Panel, Card, Chip, Form, Input$1, Checkbox, Radio, Toggle, Range, Stepper, SmartSelect, Grid$2, Calendar, Picker, InfiniteScroll$1, PullToRefresh, Lazy$2, DataTable, Fab$1, Searchbar, Messages, Messagebar, Swiper, PhotoBrowser, Notification, Autocomplete, Tooltip, Gauge, Skeleton, Menu$1, ColorPicker, Treeview$1, TextEditor, PieChart, AreaChart, Breadcrumbs$1, Elevation, Typography]);
|
|
50248
50506
|
|
|
50249
50507
|
return Framework7;
|
|
50250
50508
|
|