framework7 7.0.0-beta.8 → 7.0.2
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/accordion/accordion.lazy.js +1 -1
- 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 +11 -2
- package/components/actions/actions.lazy.js +1 -1
- package/components/actions/actions.less +3 -0
- package/components/app/app-class.js +15 -9
- package/components/area-chart/area-chart-class.js +34 -18
- package/components/area-chart/area-chart.lazy.js +1 -1
- package/components/autocomplete/autocomplete-class.js +5 -1
- package/components/autocomplete/autocomplete.lazy.js +1 -1
- 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 +216 -124
- 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 +6 -1
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/calendar/calendar.less +21 -16
- package/components/card/card.js +23 -3
- package/components/card/card.lazy.js +1 -1
- package/components/color-picker/color-picker-class.js +19 -3
- package/components/color-picker/color-picker.js +5 -1
- package/components/color-picker/color-picker.lazy.js +1 -1
- package/components/data-table/data-table-class.js +5 -1
- package/components/data-table/data-table.lazy.js +1 -1
- package/components/data-table/data-table.less +1 -1
- package/components/dialog/dialog.js +30 -6
- package/components/dialog/dialog.lazy.js +1 -1
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +15 -3
- package/components/fab/fab.lazy.js +1 -1
- package/components/form/form.lazy.js +1 -1
- package/components/gauge/gauge-class.js +10 -2
- package/components/gauge/gauge.d.ts +2 -2
- package/components/gauge/gauge.lazy.js +1 -1
- package/components/input/input.js +5 -1
- package/components/input/input.lazy.js +1 -1
- package/components/list-index/list-index-class.js +5 -1
- package/components/list-index/list-index.d.ts +1 -1
- package/components/list-index/list-index.lazy.js +1 -1
- package/components/login-screen/login-screen.js +10 -2
- package/components/login-screen/login-screen.lazy.js +1 -1
- package/components/menu/menu.js +10 -2
- package/components/menu/menu.lazy.js +1 -1
- package/components/messagebar/messagebar-class.js +25 -5
- package/components/messagebar/messagebar.lazy.js +1 -1
- package/components/messages/messages-class.js +60 -24
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.lazy.js +1 -1
- package/components/modal/modal-class.js +10 -0
- package/components/navbar/navbar.js +26 -2
- package/components/notification/notification.d.ts +4 -4
- package/components/panel/panel-class.js +35 -7
- package/components/panel/panel.js +40 -8
- package/components/panel/panel.lazy.js +1 -1
- package/components/photo-browser/photo-browser-class.js +42 -8
- package/components/photo-browser/photo-browser.lazy.js +1 -1
- package/components/picker/picker-class.js +11 -7
- 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 +5 -6
- package/components/picker/picker.lazy.js +1 -1
- package/components/picker/picker.less +28 -10
- package/components/pie-chart/pie-chart-class.js +16 -7
- package/components/pie-chart/pie-chart.lazy.js +1 -1
- package/components/popover/popover-class.js +20 -3
- 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 +11 -2
- 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 +11 -2
- 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/preloader/preloader.js +10 -2
- package/components/preloader/preloader.lazy.js +1 -1
- 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 +17 -4
- package/components/progressbar/progressbar.lazy.js +1 -1
- package/components/progressbar/progressbar.less +16 -4
- package/components/pull-to-refresh/pull-to-refresh-class.js +5 -1
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
- package/components/range/range.d.ts +23 -5
- package/components/range/range.js +10 -2
- package/components/range/range.lazy.js +1 -1
- package/components/searchbar/searchbar-class.js +6 -2
- package/components/searchbar/searchbar.js +20 -4
- package/components/searchbar/searchbar.lazy.js +1 -1
- package/components/sheet/sheet-class.js +21 -2
- 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 +11 -2
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/sheet/sheet.less +3 -0
- package/components/smart-select/smart-select-class.js +15 -3
- package/components/smart-select/smart-select.lazy.js +1 -1
- package/components/sortable/sortable.d.ts +5 -1
- package/components/sortable/sortable.js +45 -8
- package/components/sortable/sortable.lazy.js +1 -1
- package/components/statusbar/statusbar.d.ts +9 -9
- package/components/statusbar/statusbar.js +5 -1
- package/components/stepper/stepper.js +10 -2
- package/components/stepper/stepper.lazy.js +1 -1
- package/components/swipeout/swipeout.js +16 -3
- package/components/swipeout/swipeout.lazy.js +1 -1
- 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 +14 -7
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/toast/toast.d.ts +2 -2
- package/components/toggle/toggle-class.js +5 -1
- package/components/toggle/toggle.lazy.js +1 -1
- package/components/toolbar/toolbar-aurora.less +0 -13
- package/components/toolbar/toolbar-md.less +0 -13
- package/components/toolbar/toolbar.js +11 -3
- package/components/toolbar/toolbar.less +13 -0
- package/components/tooltip/tooltip-class.js +5 -1
- package/components/tooltip/tooltip.lazy.js +1 -1
- package/components/touch-ripple/touch-ripple.js +5 -1
- package/components/treeview/treeview.lazy.js +1 -1
- package/components/view/view-class.js +13 -2
- package/components/view/view.d.ts +5 -1
- package/components/view/view.js +2 -0
- package/components/virtual-list/virtual-list-class.js +54 -9
- 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 +253 -150
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +238 -134
- package/framework7-bundle.esm.js +5 -4
- package/framework7-bundle.js +2766 -1222
- 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 +11 -7
- package/framework7.esm.js +3 -3
- package/framework7.js +621 -190
- 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/$h.js +5 -1
- package/modules/component/$jsx.js +5 -1
- package/modules/component/component-class.js +35 -22
- package/modules/component/component.d.ts +2 -2
- package/modules/component/component.js +7 -6
- package/modules/component/eventslisteners.js +5 -1
- package/modules/component/snabbdom/h.js +1 -1
- package/modules/component/vdom.js +32 -17
- package/modules/device/device.js +1 -1
- package/modules/router/back.js +16 -6
- package/modules/router/component-loader.js +34 -23
- package/modules/router/modal.js +5 -1
- package/modules/router/navigate.js +19 -3
- package/modules/router/redirect.js +5 -1
- package/modules/router/router-class.js +39 -10
- package/modules/router/swipe-back.js +7 -6
- package/modules/router/tab.js +6 -2
- package/modules/store/create-store.js +10 -2
- package/package.json +12 -6
- package/shared/$jsx.js +6 -1
- package/shared/class.js +33 -5
- package/shared/constructor-methods.js +25 -4
- package/shared/events-class.js +15 -3
- package/shared/get-device.d.ts +0 -2
- package/shared/get-device.js +10 -6
- package/shared/history.js +12 -1
- package/shared/modal-methods.js +10 -2
- package/shared/request.js +45 -7
- package/shared/utils.js +47 -10
package/framework7.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 7.0.
|
|
2
|
+
* Framework7 7.0.2
|
|
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 24, 2022
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
15
15
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
16
16
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Framework7 = factory());
|
|
17
|
-
}(this, (function () { 'use strict';
|
|
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 */
|
|
@@ -33,7 +33,15 @@
|
|
|
33
33
|
return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function extend$1(target
|
|
36
|
+
function extend$1(target, src) {
|
|
37
|
+
if (target === void 0) {
|
|
38
|
+
target = {};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (src === void 0) {
|
|
42
|
+
src = {};
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
Object.keys(src).forEach(key => {
|
|
38
46
|
if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) {
|
|
39
47
|
extend$1(target[key], src[key]);
|
|
@@ -196,15 +204,15 @@
|
|
|
196
204
|
}
|
|
197
205
|
|
|
198
206
|
/**
|
|
199
|
-
* Dom7 4.0.
|
|
207
|
+
* Dom7 4.0.4
|
|
200
208
|
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
|
201
209
|
* https://framework7.io/docs/dom7.html
|
|
202
210
|
*
|
|
203
|
-
* Copyright
|
|
211
|
+
* Copyright 2022, Vladimir Kharlampidi
|
|
204
212
|
*
|
|
205
213
|
* Licensed under MIT
|
|
206
214
|
*
|
|
207
|
-
* Released on:
|
|
215
|
+
* Released on: January 11, 2022
|
|
208
216
|
*/
|
|
209
217
|
/* eslint-disable no-proto */
|
|
210
218
|
|
|
@@ -224,13 +232,21 @@
|
|
|
224
232
|
|
|
225
233
|
class Dom7 extends Array {
|
|
226
234
|
constructor(items) {
|
|
227
|
-
|
|
228
|
-
|
|
235
|
+
if (typeof items === 'number') {
|
|
236
|
+
super(items);
|
|
237
|
+
} else {
|
|
238
|
+
super(...(items || []));
|
|
239
|
+
makeReactive(this);
|
|
240
|
+
}
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
}
|
|
232
244
|
|
|
233
|
-
function arrayFlat(arr
|
|
245
|
+
function arrayFlat(arr) {
|
|
246
|
+
if (arr === void 0) {
|
|
247
|
+
arr = [];
|
|
248
|
+
}
|
|
249
|
+
|
|
234
250
|
const res = [];
|
|
235
251
|
arr.forEach(el => {
|
|
236
252
|
if (Array.isArray(el)) {
|
|
@@ -321,7 +337,11 @@
|
|
|
321
337
|
|
|
322
338
|
$$1.fn = Dom7.prototype; // eslint-disable-next-line
|
|
323
339
|
|
|
324
|
-
function addClass(
|
|
340
|
+
function addClass() {
|
|
341
|
+
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
342
|
+
classes[_key] = arguments[_key];
|
|
343
|
+
}
|
|
344
|
+
|
|
325
345
|
const classNames = arrayFlat(classes.map(c => c.split(' ')));
|
|
326
346
|
this.forEach(el => {
|
|
327
347
|
el.classList.add(...classNames);
|
|
@@ -329,7 +349,11 @@
|
|
|
329
349
|
return this;
|
|
330
350
|
}
|
|
331
351
|
|
|
332
|
-
function removeClass(
|
|
352
|
+
function removeClass() {
|
|
353
|
+
for (var _len2 = arguments.length, classes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
354
|
+
classes[_key2] = arguments[_key2];
|
|
355
|
+
}
|
|
356
|
+
|
|
333
357
|
const classNames = arrayFlat(classes.map(c => c.split(' ')));
|
|
334
358
|
this.forEach(el => {
|
|
335
359
|
el.classList.remove(...classNames);
|
|
@@ -337,7 +361,11 @@
|
|
|
337
361
|
return this;
|
|
338
362
|
}
|
|
339
363
|
|
|
340
|
-
function toggleClass(
|
|
364
|
+
function toggleClass() {
|
|
365
|
+
for (var _len3 = arguments.length, classes = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
366
|
+
classes[_key3] = arguments[_key3];
|
|
367
|
+
}
|
|
368
|
+
|
|
341
369
|
const classNames = arrayFlat(classes.map(c => c.split(' ')));
|
|
342
370
|
this.forEach(el => {
|
|
343
371
|
classNames.forEach(className => {
|
|
@@ -346,7 +374,11 @@
|
|
|
346
374
|
});
|
|
347
375
|
}
|
|
348
376
|
|
|
349
|
-
function hasClass(
|
|
377
|
+
function hasClass() {
|
|
378
|
+
for (var _len4 = arguments.length, classes = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
379
|
+
classes[_key4] = arguments[_key4];
|
|
380
|
+
}
|
|
381
|
+
|
|
350
382
|
const classNames = arrayFlat(classes.map(c => c.split(' ')));
|
|
351
383
|
return arrayFilter(this, el => {
|
|
352
384
|
return classNames.filter(className => el.classList.contains(className)).length > 0;
|
|
@@ -531,7 +563,11 @@
|
|
|
531
563
|
return this;
|
|
532
564
|
}
|
|
533
565
|
|
|
534
|
-
function on(
|
|
566
|
+
function on() {
|
|
567
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
568
|
+
args[_key5] = arguments[_key5];
|
|
569
|
+
}
|
|
570
|
+
|
|
535
571
|
let [eventType, targetSelector, listener, capture] = args;
|
|
536
572
|
|
|
537
573
|
if (typeof args[1] === 'function') {
|
|
@@ -604,7 +640,11 @@
|
|
|
604
640
|
return this;
|
|
605
641
|
}
|
|
606
642
|
|
|
607
|
-
function off(
|
|
643
|
+
function off() {
|
|
644
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
645
|
+
args[_key6] = arguments[_key6];
|
|
646
|
+
}
|
|
647
|
+
|
|
608
648
|
let [eventType, targetSelector, listener, capture] = args;
|
|
609
649
|
|
|
610
650
|
if (typeof args[1] === 'function') {
|
|
@@ -650,8 +690,13 @@
|
|
|
650
690
|
return this;
|
|
651
691
|
}
|
|
652
692
|
|
|
653
|
-
function once(
|
|
693
|
+
function once() {
|
|
654
694
|
const dom = this;
|
|
695
|
+
|
|
696
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
697
|
+
args[_key7] = arguments[_key7];
|
|
698
|
+
}
|
|
699
|
+
|
|
655
700
|
let [eventName, targetSelector, listener, capture] = args;
|
|
656
701
|
|
|
657
702
|
if (typeof args[1] === 'function') {
|
|
@@ -659,7 +704,11 @@
|
|
|
659
704
|
targetSelector = undefined;
|
|
660
705
|
}
|
|
661
706
|
|
|
662
|
-
function onceHandler(
|
|
707
|
+
function onceHandler() {
|
|
708
|
+
for (var _len8 = arguments.length, eventArgs = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
709
|
+
eventArgs[_key8] = arguments[_key8];
|
|
710
|
+
}
|
|
711
|
+
|
|
663
712
|
listener.apply(this, eventArgs);
|
|
664
713
|
dom.off(eventName, targetSelector, onceHandler, capture);
|
|
665
714
|
|
|
@@ -672,8 +721,13 @@
|
|
|
672
721
|
return dom.on(eventName, targetSelector, onceHandler, capture);
|
|
673
722
|
}
|
|
674
723
|
|
|
675
|
-
function trigger(
|
|
724
|
+
function trigger() {
|
|
676
725
|
const window = getWindow();
|
|
726
|
+
|
|
727
|
+
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
728
|
+
args[_key9] = arguments[_key9];
|
|
729
|
+
}
|
|
730
|
+
|
|
677
731
|
const events = args[0].split(' ');
|
|
678
732
|
const eventData = args[1];
|
|
679
733
|
|
|
@@ -984,12 +1038,12 @@
|
|
|
984
1038
|
return $$1([this[index]]);
|
|
985
1039
|
}
|
|
986
1040
|
|
|
987
|
-
function append(
|
|
1041
|
+
function append() {
|
|
988
1042
|
let newChild;
|
|
989
1043
|
const document = getDocument();
|
|
990
1044
|
|
|
991
|
-
for (let k = 0; k <
|
|
992
|
-
newChild =
|
|
1045
|
+
for (let k = 0; k < arguments.length; k += 1) {
|
|
1046
|
+
newChild = k < 0 || arguments.length <= k ? undefined : arguments[k];
|
|
993
1047
|
|
|
994
1048
|
for (let i = 0; i < this.length; i += 1) {
|
|
995
1049
|
if (typeof newChild === 'string') {
|
|
@@ -1243,11 +1297,15 @@
|
|
|
1243
1297
|
return this.remove();
|
|
1244
1298
|
}
|
|
1245
1299
|
|
|
1246
|
-
function add(
|
|
1300
|
+
function add() {
|
|
1247
1301
|
const dom = this;
|
|
1248
1302
|
let i;
|
|
1249
1303
|
let j;
|
|
1250
1304
|
|
|
1305
|
+
for (var _len10 = arguments.length, els = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
1306
|
+
els[_key10] = arguments[_key10];
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1251
1309
|
for (i = 0; i < els.length; i += 1) {
|
|
1252
1310
|
const toAdd = $$1(els[i]);
|
|
1253
1311
|
|
|
@@ -1278,8 +1336,13 @@
|
|
|
1278
1336
|
} // eslint-disable-next-line
|
|
1279
1337
|
|
|
1280
1338
|
|
|
1281
|
-
function scrollTo(
|
|
1339
|
+
function scrollTo() {
|
|
1282
1340
|
const window = getWindow();
|
|
1341
|
+
|
|
1342
|
+
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
1343
|
+
args[_key11] = arguments[_key11];
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1283
1346
|
let [left, top, duration, easing, callback] = args;
|
|
1284
1347
|
|
|
1285
1348
|
if (args.length === 4 && typeof easing === 'function') {
|
|
@@ -1339,7 +1402,11 @@
|
|
|
1339
1402
|
if (animateTop && newTop === currentTop) animateTop = false;
|
|
1340
1403
|
if (animateLeft && newLeft === currentLeft) animateLeft = false;
|
|
1341
1404
|
|
|
1342
|
-
function render(time
|
|
1405
|
+
function render(time) {
|
|
1406
|
+
if (time === void 0) {
|
|
1407
|
+
time = new Date().getTime();
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1343
1410
|
if (startTime === null) {
|
|
1344
1411
|
startTime = time;
|
|
1345
1412
|
}
|
|
@@ -1385,7 +1452,11 @@
|
|
|
1385
1452
|
} // scrollTop(top, duration, easing, callback) {
|
|
1386
1453
|
|
|
1387
1454
|
|
|
1388
|
-
function scrollTop(
|
|
1455
|
+
function scrollTop() {
|
|
1456
|
+
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
|
|
1457
|
+
args[_key12] = arguments[_key12];
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1389
1460
|
let [top, duration, easing, callback] = args;
|
|
1390
1461
|
|
|
1391
1462
|
if (args.length === 3 && typeof easing === 'function') {
|
|
@@ -1402,7 +1473,11 @@
|
|
|
1402
1473
|
return dom.scrollTo(undefined, top, duration, easing, callback);
|
|
1403
1474
|
}
|
|
1404
1475
|
|
|
1405
|
-
function scrollLeft(
|
|
1476
|
+
function scrollLeft() {
|
|
1477
|
+
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
|
|
1478
|
+
args[_key13] = arguments[_key13];
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1406
1481
|
let [left, duration, easing, callback] = args;
|
|
1407
1482
|
|
|
1408
1483
|
if (args.length === 3 && typeof easing === 'function') {
|
|
@@ -1626,7 +1701,11 @@
|
|
|
1626
1701
|
const noTrigger = 'resize scroll'.split(' ');
|
|
1627
1702
|
|
|
1628
1703
|
function shortcut(name) {
|
|
1629
|
-
function eventHandler(
|
|
1704
|
+
function eventHandler() {
|
|
1705
|
+
for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
|
|
1706
|
+
args[_key14] = arguments[_key14];
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1630
1709
|
if (typeof args[0] === 'undefined') {
|
|
1631
1710
|
for (let i = 0; i < this.length; i += 1) {
|
|
1632
1711
|
if (noTrigger.indexOf(name) < 0) {
|
|
@@ -1769,7 +1848,15 @@
|
|
|
1769
1848
|
uniqueNum += 1;
|
|
1770
1849
|
return uniqueNum;
|
|
1771
1850
|
}
|
|
1772
|
-
function id(mask
|
|
1851
|
+
function id(mask, map) {
|
|
1852
|
+
if (mask === void 0) {
|
|
1853
|
+
mask = 'xxxxxxxxxx';
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
if (map === void 0) {
|
|
1857
|
+
map = '0123456789abcdef';
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1773
1860
|
const length = map.length;
|
|
1774
1861
|
return mask.replace(/x/g, () => map[Math.floor(Math.random() * length)]);
|
|
1775
1862
|
}
|
|
@@ -1823,7 +1910,11 @@
|
|
|
1823
1910
|
const window = getWindow();
|
|
1824
1911
|
return window.cancelAnimationFrame(frameId);
|
|
1825
1912
|
}
|
|
1826
|
-
function nextTick(callback, delay
|
|
1913
|
+
function nextTick(callback, delay) {
|
|
1914
|
+
if (delay === void 0) {
|
|
1915
|
+
delay = 0;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1827
1918
|
return setTimeout(callback, delay);
|
|
1828
1919
|
}
|
|
1829
1920
|
function nextFrame$1(callback) {
|
|
@@ -1856,7 +1947,11 @@
|
|
|
1856
1947
|
|
|
1857
1948
|
return query;
|
|
1858
1949
|
}
|
|
1859
|
-
function getTranslate(el, axis
|
|
1950
|
+
function getTranslate(el, axis) {
|
|
1951
|
+
if (axis === void 0) {
|
|
1952
|
+
axis = 'x';
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1860
1955
|
const window = getWindow();
|
|
1861
1956
|
let matrix;
|
|
1862
1957
|
let curTransform;
|
|
@@ -1882,19 +1977,23 @@
|
|
|
1882
1977
|
// Latest Chrome and webkits Fix
|
|
1883
1978
|
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix
|
|
1884
1979
|
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers
|
|
1885
|
-
|
|
1980
|
+
else curTransform = parseFloat(matrix[4]);
|
|
1886
1981
|
}
|
|
1887
1982
|
|
|
1888
1983
|
if (axis === 'y') {
|
|
1889
1984
|
// Latest Chrome and webkits Fix
|
|
1890
1985
|
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix
|
|
1891
1986
|
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers
|
|
1892
|
-
|
|
1987
|
+
else curTransform = parseFloat(matrix[5]);
|
|
1893
1988
|
}
|
|
1894
1989
|
|
|
1895
1990
|
return curTransform || 0;
|
|
1896
1991
|
}
|
|
1897
|
-
function serializeObject(obj, parents
|
|
1992
|
+
function serializeObject(obj, parents) {
|
|
1993
|
+
if (parents === void 0) {
|
|
1994
|
+
parents = [];
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1898
1997
|
if (typeof obj === 'string') return obj;
|
|
1899
1998
|
const resultArray = [];
|
|
1900
1999
|
const separator = '&';
|
|
@@ -1954,7 +2053,11 @@
|
|
|
1954
2053
|
function isObject(o) {
|
|
1955
2054
|
return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
|
|
1956
2055
|
}
|
|
1957
|
-
function merge(
|
|
2056
|
+
function merge() {
|
|
2057
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2058
|
+
args[_key] = arguments[_key];
|
|
2059
|
+
}
|
|
2060
|
+
|
|
1958
2061
|
const to = args[0];
|
|
1959
2062
|
args.splice(0, 1);
|
|
1960
2063
|
const from = args;
|
|
@@ -1978,11 +2081,15 @@
|
|
|
1978
2081
|
|
|
1979
2082
|
return to;
|
|
1980
2083
|
}
|
|
1981
|
-
function extend(
|
|
2084
|
+
function extend() {
|
|
1982
2085
|
let deep = true;
|
|
1983
2086
|
let to;
|
|
1984
2087
|
let from;
|
|
1985
2088
|
|
|
2089
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2090
|
+
args[_key2] = arguments[_key2];
|
|
2091
|
+
}
|
|
2092
|
+
|
|
1986
2093
|
if (typeof args[0] === 'boolean') {
|
|
1987
2094
|
deep = args[0];
|
|
1988
2095
|
to = args[1];
|
|
@@ -2095,10 +2202,14 @@
|
|
|
2095
2202
|
HSB.s = HSL.l > 0 ? 2 * t / HSB.b : HSB.s;
|
|
2096
2203
|
return [HSB.h, HSB.s, HSB.b];
|
|
2097
2204
|
}
|
|
2098
|
-
function colorThemeCSSProperties(
|
|
2205
|
+
function colorThemeCSSProperties() {
|
|
2099
2206
|
let hex;
|
|
2100
2207
|
let rgb;
|
|
2101
2208
|
|
|
2209
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
2210
|
+
args[_key3] = arguments[_key3];
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2102
2213
|
if (args.length === 1) {
|
|
2103
2214
|
hex = args[0];
|
|
2104
2215
|
rgb = colorHexToRgb(hex);
|
|
@@ -2133,8 +2244,13 @@
|
|
|
2133
2244
|
instance[key] = obj[key];
|
|
2134
2245
|
});
|
|
2135
2246
|
}
|
|
2136
|
-
function flattenArray(
|
|
2247
|
+
function flattenArray() {
|
|
2137
2248
|
const arr = [];
|
|
2249
|
+
|
|
2250
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
2251
|
+
args[_key4] = arguments[_key4];
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2138
2254
|
args.forEach(arg => {
|
|
2139
2255
|
if (Array.isArray(arg)) arr.push(...flattenArray(...arg));else arr.push(arg);
|
|
2140
2256
|
});
|
|
@@ -2213,9 +2329,10 @@
|
|
|
2213
2329
|
|
|
2214
2330
|
let deviceCalculated;
|
|
2215
2331
|
|
|
2216
|
-
function calcDevice({
|
|
2217
|
-
|
|
2218
|
-
|
|
2332
|
+
function calcDevice(_temp) {
|
|
2333
|
+
let {
|
|
2334
|
+
userAgent
|
|
2335
|
+
} = _temp === void 0 ? {} : _temp;
|
|
2219
2336
|
const support = getSupport();
|
|
2220
2337
|
const window = getWindow();
|
|
2221
2338
|
const platform = window.navigator.platform;
|
|
@@ -2233,8 +2350,7 @@
|
|
|
2233
2350
|
firefox: false,
|
|
2234
2351
|
macos: false,
|
|
2235
2352
|
windows: false,
|
|
2236
|
-
cordova: !!
|
|
2237
|
-
phonegap: !!(window.cordova || window.phonegap),
|
|
2353
|
+
cordova: !!window.cordova,
|
|
2238
2354
|
electron: false,
|
|
2239
2355
|
capacitor: !!window.Capacitor,
|
|
2240
2356
|
nwjs: false
|
|
@@ -2347,7 +2463,11 @@
|
|
|
2347
2463
|
return device;
|
|
2348
2464
|
}
|
|
2349
2465
|
|
|
2350
|
-
function getDevice(overrides
|
|
2466
|
+
function getDevice(overrides, reset) {
|
|
2467
|
+
if (overrides === void 0) {
|
|
2468
|
+
overrides = {};
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2351
2471
|
if (!deviceCalculated || reset) {
|
|
2352
2472
|
deviceCalculated = calcDevice(overrides);
|
|
2353
2473
|
}
|
|
@@ -2356,7 +2476,11 @@
|
|
|
2356
2476
|
}
|
|
2357
2477
|
|
|
2358
2478
|
class EventsClass {
|
|
2359
|
-
constructor(parents
|
|
2479
|
+
constructor(parents) {
|
|
2480
|
+
if (parents === void 0) {
|
|
2481
|
+
parents = [];
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2360
2484
|
const self = this;
|
|
2361
2485
|
self.eventsParents = parents;
|
|
2362
2486
|
self.eventsListeners = {};
|
|
@@ -2377,13 +2501,17 @@
|
|
|
2377
2501
|
const self = this;
|
|
2378
2502
|
if (typeof handler !== 'function') return self;
|
|
2379
2503
|
|
|
2380
|
-
function onceHandler(
|
|
2504
|
+
function onceHandler() {
|
|
2381
2505
|
self.off(events, onceHandler);
|
|
2382
2506
|
|
|
2383
2507
|
if (onceHandler.f7proxy) {
|
|
2384
2508
|
delete onceHandler.f7proxy;
|
|
2385
2509
|
}
|
|
2386
2510
|
|
|
2511
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2512
|
+
args[_key] = arguments[_key];
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2387
2515
|
handler.apply(self, args);
|
|
2388
2516
|
}
|
|
2389
2517
|
|
|
@@ -2408,7 +2536,7 @@
|
|
|
2408
2536
|
return self;
|
|
2409
2537
|
}
|
|
2410
2538
|
|
|
2411
|
-
emit(
|
|
2539
|
+
emit() {
|
|
2412
2540
|
const self = this;
|
|
2413
2541
|
if (!self.eventsListeners) return self;
|
|
2414
2542
|
let events;
|
|
@@ -2416,6 +2544,10 @@
|
|
|
2416
2544
|
let context;
|
|
2417
2545
|
let eventsParents;
|
|
2418
2546
|
|
|
2547
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2548
|
+
args[_key2] = arguments[_key2];
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2419
2551
|
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
2420
2552
|
events = args[0];
|
|
2421
2553
|
data = args.slice(1, args.length);
|
|
@@ -2455,7 +2587,15 @@
|
|
|
2455
2587
|
}
|
|
2456
2588
|
|
|
2457
2589
|
class Framework7Class extends EventsClass {
|
|
2458
|
-
constructor(params
|
|
2590
|
+
constructor(params, parents) {
|
|
2591
|
+
if (params === void 0) {
|
|
2592
|
+
params = {};
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
if (parents === void 0) {
|
|
2596
|
+
parents = [];
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2459
2599
|
super(parents);
|
|
2460
2600
|
const self = this;
|
|
2461
2601
|
self.params = params;
|
|
@@ -2494,7 +2634,15 @@
|
|
|
2494
2634
|
});
|
|
2495
2635
|
}
|
|
2496
2636
|
|
|
2497
|
-
useModule(moduleName
|
|
2637
|
+
useModule(moduleName, moduleParams) {
|
|
2638
|
+
if (moduleName === void 0) {
|
|
2639
|
+
moduleName = '';
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
if (moduleParams === void 0) {
|
|
2643
|
+
moduleParams = {};
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2498
2646
|
const instance = this;
|
|
2499
2647
|
if (!instance.modules) return;
|
|
2500
2648
|
const module = typeof moduleName === 'string' ? instance.modules[moduleName] : moduleName;
|
|
@@ -2538,7 +2686,11 @@
|
|
|
2538
2686
|
}
|
|
2539
2687
|
}
|
|
2540
2688
|
|
|
2541
|
-
useModules(modulesParams
|
|
2689
|
+
useModules(modulesParams) {
|
|
2690
|
+
if (modulesParams === void 0) {
|
|
2691
|
+
modulesParams = {};
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2542
2694
|
const instance = this;
|
|
2543
2695
|
if (!instance.modules) return;
|
|
2544
2696
|
Object.keys(instance.modules).forEach(moduleName => {
|
|
@@ -2553,7 +2705,7 @@
|
|
|
2553
2705
|
Class.use(components);
|
|
2554
2706
|
}
|
|
2555
2707
|
|
|
2556
|
-
static installModule(module
|
|
2708
|
+
static installModule(module) {
|
|
2557
2709
|
const Class = this;
|
|
2558
2710
|
if (!Class.prototype.modules) Class.prototype.modules = {};
|
|
2559
2711
|
const name = module.name || `${Object.keys(Class.prototype.modules).length}_${now()}`;
|
|
@@ -2574,13 +2726,17 @@
|
|
|
2574
2726
|
|
|
2575
2727
|
|
|
2576
2728
|
if (module.install) {
|
|
2729
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2730
|
+
params[_key - 1] = arguments[_key];
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2577
2733
|
module.install.apply(Class, params);
|
|
2578
2734
|
}
|
|
2579
2735
|
|
|
2580
2736
|
return Class;
|
|
2581
2737
|
}
|
|
2582
2738
|
|
|
2583
|
-
static use(module
|
|
2739
|
+
static use(module) {
|
|
2584
2740
|
const Class = this;
|
|
2585
2741
|
|
|
2586
2742
|
if (Array.isArray(module)) {
|
|
@@ -2588,12 +2744,20 @@
|
|
|
2588
2744
|
return Class;
|
|
2589
2745
|
}
|
|
2590
2746
|
|
|
2747
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2748
|
+
params[_key2 - 1] = arguments[_key2];
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2591
2751
|
return Class.installModule(module, ...params);
|
|
2592
2752
|
}
|
|
2593
2753
|
|
|
2594
2754
|
}
|
|
2595
2755
|
|
|
2596
|
-
function ConstructorMethods(parameters
|
|
2756
|
+
function ConstructorMethods(parameters) {
|
|
2757
|
+
if (parameters === void 0) {
|
|
2758
|
+
parameters = {};
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2597
2761
|
const {
|
|
2598
2762
|
defaultSelector,
|
|
2599
2763
|
constructor: Constructor,
|
|
@@ -2602,12 +2766,20 @@
|
|
|
2602
2766
|
addMethods
|
|
2603
2767
|
} = parameters;
|
|
2604
2768
|
const methods = {
|
|
2605
|
-
create(
|
|
2769
|
+
create() {
|
|
2770
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2771
|
+
args[_key] = arguments[_key];
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2606
2774
|
if (app) return new Constructor(app, ...args);
|
|
2607
2775
|
return new Constructor(...args);
|
|
2608
2776
|
},
|
|
2609
2777
|
|
|
2610
|
-
get(el
|
|
2778
|
+
get(el) {
|
|
2779
|
+
if (el === void 0) {
|
|
2780
|
+
el = defaultSelector;
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2611
2783
|
if (el instanceof Constructor) return el;
|
|
2612
2784
|
const $el = $(el);
|
|
2613
2785
|
if ($el.length === 0) return undefined;
|
|
@@ -2624,8 +2796,17 @@
|
|
|
2624
2796
|
|
|
2625
2797
|
if (addMethods && Array.isArray(addMethods)) {
|
|
2626
2798
|
addMethods.forEach(methodName => {
|
|
2627
|
-
methods[methodName] = (el
|
|
2799
|
+
methods[methodName] = function (el) {
|
|
2800
|
+
if (el === void 0) {
|
|
2801
|
+
el = defaultSelector;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2628
2804
|
const instance = methods.get(el);
|
|
2805
|
+
|
|
2806
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2807
|
+
args[_key2 - 1] = arguments[_key2];
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2629
2810
|
if (instance && instance[methodName]) return instance[methodName](...args);
|
|
2630
2811
|
return undefined;
|
|
2631
2812
|
};
|
|
@@ -2635,7 +2816,11 @@
|
|
|
2635
2816
|
return methods;
|
|
2636
2817
|
}
|
|
2637
2818
|
|
|
2638
|
-
function ModalMethods(parameters
|
|
2819
|
+
function ModalMethods(parameters) {
|
|
2820
|
+
if (parameters === void 0) {
|
|
2821
|
+
parameters = {};
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2639
2824
|
const {
|
|
2640
2825
|
defaultSelector,
|
|
2641
2826
|
constructor: Constructor,
|
|
@@ -2683,7 +2868,11 @@
|
|
|
2683
2868
|
return instance.open(animate);
|
|
2684
2869
|
},
|
|
2685
2870
|
|
|
2686
|
-
close(el
|
|
2871
|
+
close(el, animate, targetEl) {
|
|
2872
|
+
if (el === void 0) {
|
|
2873
|
+
el = defaultSelector;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2687
2876
|
let $el = $(el);
|
|
2688
2877
|
if (!$el.length) return undefined;
|
|
2689
2878
|
|
|
@@ -2866,7 +3055,11 @@
|
|
|
2866
3055
|
/* eslint-disable no-underscore-dangle */
|
|
2867
3056
|
|
|
2868
3057
|
class Framework7 extends Framework7Class {
|
|
2869
|
-
constructor(params
|
|
3058
|
+
constructor(params) {
|
|
3059
|
+
if (params === void 0) {
|
|
3060
|
+
params = {};
|
|
3061
|
+
}
|
|
3062
|
+
|
|
2870
3063
|
super(params); // eslint-disable-next-line
|
|
2871
3064
|
|
|
2872
3065
|
if (Framework7.instance && typeof window !== 'undefined') {
|
|
@@ -2982,10 +3175,12 @@
|
|
|
2982
3175
|
app.mq.light = window.matchMedia(LIGHT);
|
|
2983
3176
|
}
|
|
2984
3177
|
|
|
2985
|
-
app.colorSchemeListener = function colorSchemeListener({
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3178
|
+
app.colorSchemeListener = function colorSchemeListener(_ref) {
|
|
3179
|
+
let {
|
|
3180
|
+
matches,
|
|
3181
|
+
media
|
|
3182
|
+
} = _ref;
|
|
3183
|
+
|
|
2989
3184
|
if (!matches) {
|
|
2990
3185
|
return;
|
|
2991
3186
|
}
|
|
@@ -3127,13 +3322,13 @@
|
|
|
3127
3322
|
} // eslint-disable-next-line
|
|
3128
3323
|
|
|
3129
3324
|
|
|
3130
|
-
loadModule(
|
|
3131
|
-
return Framework7.loadModule(...
|
|
3325
|
+
loadModule() {
|
|
3326
|
+
return Framework7.loadModule(...arguments);
|
|
3132
3327
|
} // eslint-disable-next-line
|
|
3133
3328
|
|
|
3134
3329
|
|
|
3135
|
-
loadModules(
|
|
3136
|
-
return Framework7.loadModules(...
|
|
3330
|
+
loadModules() {
|
|
3331
|
+
return Framework7.loadModules(...arguments);
|
|
3137
3332
|
}
|
|
3138
3333
|
|
|
3139
3334
|
getVnodeHooks(hook, id) {
|
|
@@ -3212,7 +3407,7 @@
|
|
|
3212
3407
|
}
|
|
3213
3408
|
}
|
|
3214
3409
|
|
|
3215
|
-
if (device.cordova
|
|
3410
|
+
if (device.cordova) {
|
|
3216
3411
|
classNames.push('device-cordova');
|
|
3217
3412
|
}
|
|
3218
3413
|
|
|
@@ -3369,7 +3564,7 @@
|
|
|
3369
3564
|
} // Function to run XHR callbacks and events
|
|
3370
3565
|
|
|
3371
3566
|
|
|
3372
|
-
function fireCallback(callbackName
|
|
3567
|
+
function fireCallback(callbackName) {
|
|
3373
3568
|
/*
|
|
3374
3569
|
Callbacks:
|
|
3375
3570
|
beforeCreate (options),
|
|
@@ -3383,6 +3578,10 @@
|
|
|
3383
3578
|
let globalCallbackValue;
|
|
3384
3579
|
let optionCallbackValue;
|
|
3385
3580
|
|
|
3581
|
+
for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3582
|
+
data[_key - 1] = arguments[_key];
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3386
3585
|
if (globals[callbackName]) {
|
|
3387
3586
|
globalCallbackValue = globals[callbackName](...data);
|
|
3388
3587
|
}
|
|
@@ -3712,9 +3911,13 @@
|
|
|
3712
3911
|
xhr.send(postData);
|
|
3713
3912
|
});
|
|
3714
3913
|
|
|
3715
|
-
function requestShortcut(method
|
|
3914
|
+
function requestShortcut(method) {
|
|
3716
3915
|
let [url, data, success, error, dataType] = [];
|
|
3717
3916
|
|
|
3917
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
3918
|
+
args[_key2 - 1] = arguments[_key2];
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3718
3921
|
if (typeof args[1] === 'function') {
|
|
3719
3922
|
[url, success, error, dataType] = args;
|
|
3720
3923
|
} else {
|
|
@@ -3750,11 +3953,41 @@
|
|
|
3750
3953
|
}
|
|
3751
3954
|
|
|
3752
3955
|
Object.assign(request, {
|
|
3753
|
-
get: (
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3956
|
+
get: function () {
|
|
3957
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
3958
|
+
args[_key3] = arguments[_key3];
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
return requestShortcut('get', ...args);
|
|
3962
|
+
},
|
|
3963
|
+
post: function () {
|
|
3964
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
3965
|
+
args[_key4] = arguments[_key4];
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3968
|
+
return requestShortcut('post', ...args);
|
|
3969
|
+
},
|
|
3970
|
+
json: function () {
|
|
3971
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
3972
|
+
args[_key5] = arguments[_key5];
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3975
|
+
return requestShortcut('json', ...args);
|
|
3976
|
+
},
|
|
3977
|
+
getJSON: function () {
|
|
3978
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
3979
|
+
args[_key6] = arguments[_key6];
|
|
3980
|
+
}
|
|
3981
|
+
|
|
3982
|
+
return requestShortcut('json', ...args);
|
|
3983
|
+
},
|
|
3984
|
+
postJSON: function () {
|
|
3985
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
3986
|
+
args[_key7] = arguments[_key7];
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
return requestShortcut('postJSON', ...args);
|
|
3990
|
+
}
|
|
3758
3991
|
});
|
|
3759
3992
|
|
|
3760
3993
|
request.abortController = () => {
|
|
@@ -4936,11 +5169,22 @@
|
|
|
4936
5169
|
|
|
4937
5170
|
push(viewId, viewState, url) {
|
|
4938
5171
|
const window = getWindow();
|
|
5172
|
+
const document = getDocument();
|
|
5173
|
+
/* eslint-disable no-param-reassign */
|
|
4939
5174
|
|
|
4940
5175
|
if (url.substr(-3) === '#!/') {
|
|
4941
|
-
// eslint-disable-next-line
|
|
4942
5176
|
url = url.replace('#!/', '');
|
|
5177
|
+
|
|
5178
|
+
if (url === '') {
|
|
5179
|
+
url = document.location.href;
|
|
5180
|
+
|
|
5181
|
+
if (url.includes('#!/')) {
|
|
5182
|
+
url = document.location.href.split('#!/')[0];
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
4943
5185
|
}
|
|
5186
|
+
/* eslint-enable no-param-reassign */
|
|
5187
|
+
|
|
4944
5188
|
|
|
4945
5189
|
if (!History.allowChange) {
|
|
4946
5190
|
History.queue.push(() => {
|
|
@@ -5299,12 +5543,13 @@
|
|
|
5299
5543
|
return els;
|
|
5300
5544
|
}
|
|
5301
5545
|
|
|
5302
|
-
function setAnimatableNavElements({
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5546
|
+
function setAnimatableNavElements(_temp) {
|
|
5547
|
+
let {
|
|
5548
|
+
progress,
|
|
5549
|
+
reset,
|
|
5550
|
+
transition,
|
|
5551
|
+
reflow
|
|
5552
|
+
} = _temp === void 0 ? {} : _temp;
|
|
5308
5553
|
const styles = ['overflow', 'transform', 'transform-origin', 'opacity'];
|
|
5309
5554
|
|
|
5310
5555
|
if (transition === true || transition === false) {
|
|
@@ -5709,7 +5954,11 @@
|
|
|
5709
5954
|
options.history = true; // eslint-disable-line
|
|
5710
5955
|
}
|
|
5711
5956
|
|
|
5712
|
-
function redirectResolve(redirectUrl, redirectOptions
|
|
5957
|
+
function redirectResolve(redirectUrl, redirectOptions) {
|
|
5958
|
+
if (redirectOptions === void 0) {
|
|
5959
|
+
redirectOptions = {};
|
|
5960
|
+
}
|
|
5961
|
+
|
|
5713
5962
|
router.allowPageChange = true;
|
|
5714
5963
|
router[method](redirectUrl, extend({}, options, redirectOptions));
|
|
5715
5964
|
}
|
|
@@ -5863,7 +6112,11 @@
|
|
|
5863
6112
|
});
|
|
5864
6113
|
}
|
|
5865
6114
|
|
|
5866
|
-
function forward(router, el, forwardOptions
|
|
6115
|
+
function forward(router, el, forwardOptions) {
|
|
6116
|
+
if (forwardOptions === void 0) {
|
|
6117
|
+
forwardOptions = {};
|
|
6118
|
+
}
|
|
6119
|
+
|
|
5867
6120
|
const document = getDocument();
|
|
5868
6121
|
const $el = $(el);
|
|
5869
6122
|
const app = router.app;
|
|
@@ -6462,7 +6715,15 @@
|
|
|
6462
6715
|
return router;
|
|
6463
6716
|
}
|
|
6464
6717
|
|
|
6465
|
-
function load(router, loadParams
|
|
6718
|
+
function load(router, loadParams, loadOptions, ignorePageChange) {
|
|
6719
|
+
if (loadParams === void 0) {
|
|
6720
|
+
loadParams = {};
|
|
6721
|
+
}
|
|
6722
|
+
|
|
6723
|
+
if (loadOptions === void 0) {
|
|
6724
|
+
loadOptions = {};
|
|
6725
|
+
}
|
|
6726
|
+
|
|
6466
6727
|
if (!router.allowPageChange && !ignorePageChange) return router;
|
|
6467
6728
|
const params = loadParams;
|
|
6468
6729
|
const options = loadOptions;
|
|
@@ -6577,7 +6838,11 @@
|
|
|
6577
6838
|
return router;
|
|
6578
6839
|
}
|
|
6579
6840
|
|
|
6580
|
-
function navigate(navigateParams, navigateOptions
|
|
6841
|
+
function navigate(navigateParams, navigateOptions) {
|
|
6842
|
+
if (navigateOptions === void 0) {
|
|
6843
|
+
navigateOptions = {};
|
|
6844
|
+
}
|
|
6845
|
+
|
|
6581
6846
|
const router = this;
|
|
6582
6847
|
if (router.swipeBackActive) return router;
|
|
6583
6848
|
let url;
|
|
@@ -6802,7 +7067,11 @@
|
|
|
6802
7067
|
return router;
|
|
6803
7068
|
}
|
|
6804
7069
|
|
|
6805
|
-
function tabLoad(tabRoute, loadOptions
|
|
7070
|
+
function tabLoad(tabRoute, loadOptions) {
|
|
7071
|
+
if (loadOptions === void 0) {
|
|
7072
|
+
loadOptions = {};
|
|
7073
|
+
}
|
|
7074
|
+
|
|
6806
7075
|
const router = this;
|
|
6807
7076
|
const options = extend({
|
|
6808
7077
|
animate: router.params.animate,
|
|
@@ -6832,7 +7101,7 @@
|
|
|
6832
7101
|
|
|
6833
7102
|
|
|
6834
7103
|
if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
|
|
6835
|
-
History.
|
|
7104
|
+
History[router.params.browserHistoryTabs](router.view.id, {
|
|
6836
7105
|
url: options.route.url
|
|
6837
7106
|
}, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
|
|
6838
7107
|
} // Update Router History
|
|
@@ -7051,7 +7320,11 @@
|
|
|
7051
7320
|
router.removeTabContent($oldTabEl[0], tabRoute);
|
|
7052
7321
|
}
|
|
7053
7322
|
|
|
7054
|
-
function modalLoad(modalType, route, loadOptions
|
|
7323
|
+
function modalLoad(modalType, route, loadOptions, direction) {
|
|
7324
|
+
if (loadOptions === void 0) {
|
|
7325
|
+
loadOptions = {};
|
|
7326
|
+
}
|
|
7327
|
+
|
|
7055
7328
|
const router = this;
|
|
7056
7329
|
const app = router.app;
|
|
7057
7330
|
const isPanel = modalType === 'panel';
|
|
@@ -7298,7 +7571,7 @@
|
|
|
7298
7571
|
const $el = $(el);
|
|
7299
7572
|
const app = router.app;
|
|
7300
7573
|
const view = router.view;
|
|
7301
|
-
const options = extend({
|
|
7574
|
+
const options = extend(false, {
|
|
7302
7575
|
animate: router.params.animate,
|
|
7303
7576
|
browserHistory: true,
|
|
7304
7577
|
replaceState: false
|
|
@@ -7842,7 +8115,7 @@
|
|
|
7842
8115
|
return router;
|
|
7843
8116
|
}
|
|
7844
8117
|
|
|
7845
|
-
function back(
|
|
8118
|
+
function back() {
|
|
7846
8119
|
const router = this;
|
|
7847
8120
|
const device = getDevice();
|
|
7848
8121
|
if (router.swipeBackActive) return router;
|
|
@@ -7850,11 +8123,11 @@
|
|
|
7850
8123
|
let navigateOptions;
|
|
7851
8124
|
let route;
|
|
7852
8125
|
|
|
7853
|
-
if (typeof
|
|
7854
|
-
navigateOptions =
|
|
8126
|
+
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
|
|
8127
|
+
navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};
|
|
7855
8128
|
} else {
|
|
7856
|
-
navigateUrl =
|
|
7857
|
-
navigateOptions =
|
|
8129
|
+
navigateUrl = arguments.length <= 0 ? undefined : arguments[0];
|
|
8130
|
+
navigateOptions = (arguments.length <= 1 ? undefined : arguments[1]) || {};
|
|
7858
8131
|
}
|
|
7859
8132
|
|
|
7860
8133
|
const {
|
|
@@ -8006,6 +8279,16 @@
|
|
|
8006
8279
|
}
|
|
8007
8280
|
|
|
8008
8281
|
const previousPageRoute = $previousPage[0].f7Page.route;
|
|
8282
|
+
|
|
8283
|
+
if (navigateOptions.preload && $previousPage.hasClass('stacked')) {
|
|
8284
|
+
loadBack(router, {
|
|
8285
|
+
el: $previousPage
|
|
8286
|
+
}, extend(navigateOptions, {
|
|
8287
|
+
route: previousPageRoute
|
|
8288
|
+
}));
|
|
8289
|
+
return router;
|
|
8290
|
+
}
|
|
8291
|
+
|
|
8009
8292
|
processRouteQueue.call(router, previousPageRoute, router.currentRoute, () => {
|
|
8010
8293
|
loadBack(router, {
|
|
8011
8294
|
el: $previousPage
|
|
@@ -8249,7 +8532,11 @@
|
|
|
8249
8532
|
enumerable: true,
|
|
8250
8533
|
configurable: true,
|
|
8251
8534
|
|
|
8252
|
-
set(newRoute
|
|
8535
|
+
set(newRoute) {
|
|
8536
|
+
if (newRoute === void 0) {
|
|
8537
|
+
newRoute = {};
|
|
8538
|
+
}
|
|
8539
|
+
|
|
8253
8540
|
previousRoute = extend({}, currentRoute);
|
|
8254
8541
|
currentRoute = newRoute;
|
|
8255
8542
|
if (!currentRoute) return;
|
|
@@ -8654,7 +8941,11 @@
|
|
|
8654
8941
|
return undefined;
|
|
8655
8942
|
}
|
|
8656
8943
|
|
|
8657
|
-
flattenRoutes(routes
|
|
8944
|
+
flattenRoutes(routes) {
|
|
8945
|
+
if (routes === void 0) {
|
|
8946
|
+
routes = this.routes;
|
|
8947
|
+
}
|
|
8948
|
+
|
|
8658
8949
|
const router = this;
|
|
8659
8950
|
let flattenedRoutes = [];
|
|
8660
8951
|
routes.forEach(route => {
|
|
@@ -8722,7 +9013,11 @@
|
|
|
8722
9013
|
};
|
|
8723
9014
|
}
|
|
8724
9015
|
|
|
8725
|
-
generateUrl(parameters
|
|
9016
|
+
generateUrl(parameters) {
|
|
9017
|
+
if (parameters === void 0) {
|
|
9018
|
+
parameters = {};
|
|
9019
|
+
}
|
|
9020
|
+
|
|
8726
9021
|
if (typeof parameters === 'string') {
|
|
8727
9022
|
return parameters;
|
|
8728
9023
|
}
|
|
@@ -8762,10 +9057,11 @@
|
|
|
8762
9057
|
} // eslint-disable-next-line
|
|
8763
9058
|
|
|
8764
9059
|
|
|
8765
|
-
constructRouteUrl(route, {
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
9060
|
+
constructRouteUrl(route, _temp) {
|
|
9061
|
+
let {
|
|
9062
|
+
params,
|
|
9063
|
+
query
|
|
9064
|
+
} = _temp === void 0 ? {} : _temp;
|
|
8769
9065
|
const {
|
|
8770
9066
|
path
|
|
8771
9067
|
} = route;
|
|
@@ -8886,7 +9182,15 @@
|
|
|
8886
9182
|
} // eslint-disable-next-line
|
|
8887
9183
|
|
|
8888
9184
|
|
|
8889
|
-
replaceRequestUrlParams(url
|
|
9185
|
+
replaceRequestUrlParams(url, options) {
|
|
9186
|
+
if (url === void 0) {
|
|
9187
|
+
url = '';
|
|
9188
|
+
}
|
|
9189
|
+
|
|
9190
|
+
if (options === void 0) {
|
|
9191
|
+
options = {};
|
|
9192
|
+
}
|
|
9193
|
+
|
|
8890
9194
|
let compiledUrl = url;
|
|
8891
9195
|
|
|
8892
9196
|
if (typeof compiledUrl === 'string' && compiledUrl.indexOf('{{') >= 0 && options && options.route && options.route.params && Object.keys(options.route.params).length) {
|
|
@@ -9049,7 +9353,11 @@
|
|
|
9049
9353
|
$(el).find(toRemove).remove();
|
|
9050
9354
|
}
|
|
9051
9355
|
|
|
9052
|
-
getPageData(pageEl, navbarEl, from, to, route
|
|
9356
|
+
getPageData(pageEl, navbarEl, from, to, route, pageFromEl) {
|
|
9357
|
+
if (route === void 0) {
|
|
9358
|
+
route = {};
|
|
9359
|
+
}
|
|
9360
|
+
|
|
9053
9361
|
const router = this;
|
|
9054
9362
|
const $pageEl = $(pageEl).eq(0);
|
|
9055
9363
|
const $navbarEl = $(navbarEl).eq(0);
|
|
@@ -9096,7 +9404,11 @@
|
|
|
9096
9404
|
} // Callbacks
|
|
9097
9405
|
|
|
9098
9406
|
|
|
9099
|
-
pageCallback(callback, pageEl, navbarEl, from, to, options
|
|
9407
|
+
pageCallback(callback, pageEl, navbarEl, from, to, options, pageFromEl) {
|
|
9408
|
+
if (options === void 0) {
|
|
9409
|
+
options = {};
|
|
9410
|
+
}
|
|
9411
|
+
|
|
9100
9412
|
if (!pageEl) return;
|
|
9101
9413
|
const router = this;
|
|
9102
9414
|
const $pageEl = $(pageEl);
|
|
@@ -9821,7 +10133,11 @@
|
|
|
9821
10133
|
}
|
|
9822
10134
|
|
|
9823
10135
|
class View$1 extends Framework7Class {
|
|
9824
|
-
constructor(app, el, viewParams
|
|
10136
|
+
constructor(app, el, viewParams) {
|
|
10137
|
+
if (viewParams === void 0) {
|
|
10138
|
+
viewParams = {};
|
|
10139
|
+
}
|
|
10140
|
+
|
|
9825
10141
|
super(viewParams, [app]);
|
|
9826
10142
|
const view = this;
|
|
9827
10143
|
const ssr = view.params.routerId;
|
|
@@ -10023,7 +10339,14 @@
|
|
|
10023
10339
|
view.initMasterDetail();
|
|
10024
10340
|
}
|
|
10025
10341
|
|
|
10026
|
-
view.
|
|
10342
|
+
if (view.params.initRouterOnTabShow && view.$el.hasClass('tab') && !view.$el.hasClass('tab-active')) {
|
|
10343
|
+
view.$el.once('tab:show', () => {
|
|
10344
|
+
view.router.init();
|
|
10345
|
+
});
|
|
10346
|
+
} else {
|
|
10347
|
+
view.router.init();
|
|
10348
|
+
}
|
|
10349
|
+
|
|
10027
10350
|
view.$el.trigger('view:init');
|
|
10028
10351
|
view.emit('local::init viewInit', view);
|
|
10029
10352
|
}
|
|
@@ -10186,7 +10509,11 @@
|
|
|
10186
10509
|
return router.navigate(navigateOptions);
|
|
10187
10510
|
},
|
|
10188
10511
|
|
|
10189
|
-
componentLoader(component, componentUrl, options
|
|
10512
|
+
componentLoader(component, componentUrl, options, resolve, reject) {
|
|
10513
|
+
if (options === void 0) {
|
|
10514
|
+
options = {};
|
|
10515
|
+
}
|
|
10516
|
+
|
|
10190
10517
|
const router = this;
|
|
10191
10518
|
const {
|
|
10192
10519
|
app
|
|
@@ -10269,41 +10596,48 @@
|
|
|
10269
10596
|
}
|
|
10270
10597
|
},
|
|
10271
10598
|
|
|
10272
|
-
modalComponentLoader({
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10599
|
+
modalComponentLoader(_temp) {
|
|
10600
|
+
let {
|
|
10601
|
+
component,
|
|
10602
|
+
componentUrl,
|
|
10603
|
+
options,
|
|
10604
|
+
resolve,
|
|
10605
|
+
reject
|
|
10606
|
+
} = _temp === void 0 ? {} : _temp;
|
|
10279
10607
|
const router = this;
|
|
10280
10608
|
router.componentLoader(component, componentUrl, options, el => {
|
|
10281
10609
|
resolve(el);
|
|
10282
10610
|
}, reject);
|
|
10283
10611
|
},
|
|
10284
10612
|
|
|
10285
|
-
tabComponentLoader({
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10613
|
+
tabComponentLoader(_temp2) {
|
|
10614
|
+
let {
|
|
10615
|
+
component,
|
|
10616
|
+
componentUrl,
|
|
10617
|
+
options,
|
|
10618
|
+
resolve,
|
|
10619
|
+
reject
|
|
10620
|
+
} = _temp2 === void 0 ? {} : _temp2;
|
|
10292
10621
|
const router = this;
|
|
10293
10622
|
router.componentLoader(component, componentUrl, options, el => {
|
|
10294
10623
|
resolve(el);
|
|
10295
10624
|
}, reject);
|
|
10296
10625
|
},
|
|
10297
10626
|
|
|
10298
|
-
pageComponentLoader({
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10627
|
+
pageComponentLoader(_temp3) {
|
|
10628
|
+
let {
|
|
10629
|
+
component,
|
|
10630
|
+
componentUrl,
|
|
10631
|
+
options,
|
|
10632
|
+
resolve,
|
|
10633
|
+
reject
|
|
10634
|
+
} = _temp3 === void 0 ? {} : _temp3;
|
|
10305
10635
|
const router = this;
|
|
10306
|
-
router.componentLoader(component, componentUrl, options, (el, newOptions
|
|
10636
|
+
router.componentLoader(component, componentUrl, options, function (el, newOptions) {
|
|
10637
|
+
if (newOptions === void 0) {
|
|
10638
|
+
newOptions = {};
|
|
10639
|
+
}
|
|
10640
|
+
|
|
10307
10641
|
resolve(el, newOptions);
|
|
10308
10642
|
}, reject);
|
|
10309
10643
|
}
|
|
@@ -10342,7 +10676,11 @@
|
|
|
10342
10676
|
|
|
10343
10677
|
const ignoreChildren = [false, null, '', undefined];
|
|
10344
10678
|
|
|
10345
|
-
const h$1 = (type, props
|
|
10679
|
+
const h$1 = function (type, props) {
|
|
10680
|
+
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
10681
|
+
children[_key - 2] = arguments[_key];
|
|
10682
|
+
}
|
|
10683
|
+
|
|
10346
10684
|
return {
|
|
10347
10685
|
type,
|
|
10348
10686
|
props: props || {},
|
|
@@ -10442,9 +10780,18 @@
|
|
|
10442
10780
|
}).join('');
|
|
10443
10781
|
};
|
|
10444
10782
|
|
|
10445
|
-
const propsFromAttrs = (
|
|
10783
|
+
const propsFromAttrs = function () {
|
|
10446
10784
|
const context = {};
|
|
10447
|
-
|
|
10785
|
+
|
|
10786
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10787
|
+
args[_key] = arguments[_key];
|
|
10788
|
+
}
|
|
10789
|
+
|
|
10790
|
+
args.forEach(function (obj) {
|
|
10791
|
+
if (obj === void 0) {
|
|
10792
|
+
obj = {};
|
|
10793
|
+
}
|
|
10794
|
+
|
|
10448
10795
|
Object.keys(obj).forEach(key => {
|
|
10449
10796
|
context[toCamelCase(key)] = obj[key];
|
|
10450
10797
|
});
|
|
@@ -10452,12 +10799,13 @@
|
|
|
10452
10799
|
return context;
|
|
10453
10800
|
};
|
|
10454
10801
|
|
|
10455
|
-
const createCustomComponent =
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10802
|
+
const createCustomComponent = _ref => {
|
|
10803
|
+
let {
|
|
10804
|
+
f7,
|
|
10805
|
+
treeNode,
|
|
10806
|
+
vnode,
|
|
10807
|
+
data
|
|
10808
|
+
} = _ref;
|
|
10461
10809
|
const component = typeof treeNode.type === 'function' ? treeNode.type : customComponents[treeNode.type];
|
|
10462
10810
|
f7.component.create(component, propsFromAttrs(data.attrs || {}, data.props || {}), {
|
|
10463
10811
|
el: vnode.elm,
|
|
@@ -10601,20 +10949,21 @@
|
|
|
10601
10949
|
return hooks;
|
|
10602
10950
|
}
|
|
10603
10951
|
|
|
10604
|
-
const getEventHandler = (eventHandler, {
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10952
|
+
const getEventHandler = function (eventHandler, _temp) {
|
|
10953
|
+
let {
|
|
10954
|
+
stop,
|
|
10955
|
+
prevent,
|
|
10956
|
+
once
|
|
10957
|
+
} = _temp === void 0 ? {} : _temp;
|
|
10609
10958
|
let fired = false;
|
|
10610
10959
|
|
|
10611
|
-
function handler(
|
|
10612
|
-
const e =
|
|
10960
|
+
function handler() {
|
|
10961
|
+
const e = arguments.length <= 0 ? undefined : arguments[0];
|
|
10613
10962
|
if (once && fired) return;
|
|
10614
10963
|
if (stop) e.stopPropagation();
|
|
10615
10964
|
if (prevent) e.preventDefault();
|
|
10616
10965
|
fired = true;
|
|
10617
|
-
eventHandler(...
|
|
10966
|
+
eventHandler(...arguments);
|
|
10618
10967
|
}
|
|
10619
10968
|
|
|
10620
10969
|
return handler;
|
|
@@ -10780,7 +11129,11 @@
|
|
|
10780
11129
|
return h(getTagName(treeNode), data, children);
|
|
10781
11130
|
};
|
|
10782
11131
|
|
|
10783
|
-
function vdom(tree
|
|
11132
|
+
function vdom(tree, component, initial) {
|
|
11133
|
+
if (tree === void 0) {
|
|
11134
|
+
tree = {};
|
|
11135
|
+
}
|
|
11136
|
+
|
|
10784
11137
|
return treeNodeToVNode(tree, component, component.f7, initial, true);
|
|
10785
11138
|
}
|
|
10786
11139
|
|
|
@@ -11418,7 +11771,11 @@
|
|
|
11418
11771
|
}
|
|
11419
11772
|
|
|
11420
11773
|
function createListener() {
|
|
11421
|
-
return function handler(event
|
|
11774
|
+
return function handler(event) {
|
|
11775
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11776
|
+
args[_key - 1] = arguments[_key];
|
|
11777
|
+
}
|
|
11778
|
+
|
|
11422
11779
|
handleEvent(event, args, handler.vnode);
|
|
11423
11780
|
};
|
|
11424
11781
|
}
|
|
@@ -11484,11 +11841,16 @@
|
|
|
11484
11841
|
/* eslint no-underscore-dangle: "off" */
|
|
11485
11842
|
|
|
11486
11843
|
class Component {
|
|
11487
|
-
constructor(app, component, props
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11844
|
+
constructor(app, component, props, _temp) {
|
|
11845
|
+
if (props === void 0) {
|
|
11846
|
+
props = {};
|
|
11847
|
+
}
|
|
11848
|
+
|
|
11849
|
+
let {
|
|
11850
|
+
el,
|
|
11851
|
+
context,
|
|
11852
|
+
children
|
|
11853
|
+
} = _temp === void 0 ? {} : _temp;
|
|
11492
11854
|
const document = getDocument();
|
|
11493
11855
|
merge(this, {
|
|
11494
11856
|
f7: app,
|
|
@@ -11696,17 +12058,19 @@
|
|
|
11696
12058
|
} = this;
|
|
11697
12059
|
if (!this.__eventHandlers) return;
|
|
11698
12060
|
|
|
11699
|
-
this.__eventHandlers.forEach(
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
12061
|
+
this.__eventHandlers.forEach(_ref => {
|
|
12062
|
+
let {
|
|
12063
|
+
eventName,
|
|
12064
|
+
handler
|
|
12065
|
+
} = _ref;
|
|
11703
12066
|
$el.on(eventNameToColonCase(eventName), handler);
|
|
11704
12067
|
});
|
|
11705
12068
|
|
|
11706
|
-
this.__onceEventHandlers.forEach(
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
12069
|
+
this.__onceEventHandlers.forEach(_ref2 => {
|
|
12070
|
+
let {
|
|
12071
|
+
eventName,
|
|
12072
|
+
handler
|
|
12073
|
+
} = _ref2;
|
|
11710
12074
|
$el.once(eventNameToColonCase(eventName), handler);
|
|
11711
12075
|
});
|
|
11712
12076
|
}
|
|
@@ -11717,17 +12081,19 @@
|
|
|
11717
12081
|
} = this;
|
|
11718
12082
|
if (!this.__eventHandlers) return;
|
|
11719
12083
|
|
|
11720
|
-
this.__eventHandlers.forEach(
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
12084
|
+
this.__eventHandlers.forEach(_ref3 => {
|
|
12085
|
+
let {
|
|
12086
|
+
eventName,
|
|
12087
|
+
handler
|
|
12088
|
+
} = _ref3;
|
|
11724
12089
|
$el.on(eventNameToColonCase(eventName), handler);
|
|
11725
12090
|
});
|
|
11726
12091
|
|
|
11727
|
-
this.__onceEventHandlers.forEach(
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
12092
|
+
this.__onceEventHandlers.forEach(_ref4 => {
|
|
12093
|
+
let {
|
|
12094
|
+
eventName,
|
|
12095
|
+
handler
|
|
12096
|
+
} = _ref4;
|
|
11731
12097
|
$el.once(eventNameToColonCase(eventName), handler);
|
|
11732
12098
|
});
|
|
11733
12099
|
}
|
|
@@ -11847,7 +12213,11 @@
|
|
|
11847
12213
|
this.__destroyed = true;
|
|
11848
12214
|
}
|
|
11849
12215
|
|
|
11850
|
-
hook(name
|
|
12216
|
+
hook(name) {
|
|
12217
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12218
|
+
args[_key - 1] = arguments[_key];
|
|
12219
|
+
}
|
|
12220
|
+
|
|
11851
12221
|
if (this.__destroyed) return;
|
|
11852
12222
|
this[`__${name}`].forEach(handler => {
|
|
11853
12223
|
handler(...args);
|
|
@@ -11956,12 +12326,13 @@
|
|
|
11956
12326
|
return parseComponent(componentString);
|
|
11957
12327
|
},
|
|
11958
12328
|
|
|
11959
|
-
create(component, props, {
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
12329
|
+
create(component, props, _ref) {
|
|
12330
|
+
let {
|
|
12331
|
+
root,
|
|
12332
|
+
el,
|
|
12333
|
+
context,
|
|
12334
|
+
children
|
|
12335
|
+
} = _ref;
|
|
11965
12336
|
return new Component(app, component, props, {
|
|
11966
12337
|
root,
|
|
11967
12338
|
el,
|
|
@@ -12086,7 +12457,11 @@
|
|
|
12086
12457
|
|
|
12087
12458
|
/* eslint-disable no-underscore-dangle */
|
|
12088
12459
|
|
|
12089
|
-
function createStore(storeParams
|
|
12460
|
+
function createStore(storeParams) {
|
|
12461
|
+
if (storeParams === void 0) {
|
|
12462
|
+
storeParams = {};
|
|
12463
|
+
}
|
|
12464
|
+
|
|
12090
12465
|
const store = {
|
|
12091
12466
|
__store: true
|
|
12092
12467
|
};
|
|
@@ -12152,7 +12527,11 @@
|
|
|
12152
12527
|
removeGetterCallback(callback);
|
|
12153
12528
|
};
|
|
12154
12529
|
|
|
12155
|
-
const getterValue = (getterKey, addCallback
|
|
12530
|
+
const getterValue = function (getterKey, addCallback) {
|
|
12531
|
+
if (addCallback === void 0) {
|
|
12532
|
+
addCallback = true;
|
|
12533
|
+
}
|
|
12534
|
+
|
|
12156
12535
|
if (getterKey === 'constructor') return undefined;
|
|
12157
12536
|
propsQueue = [];
|
|
12158
12537
|
const value = getGetterValue(getterKey);
|
|
@@ -12360,7 +12739,11 @@
|
|
|
12360
12739
|
});
|
|
12361
12740
|
},
|
|
12362
12741
|
|
|
12363
|
-
overlaysWebView(overlays
|
|
12742
|
+
overlaysWebView(overlays) {
|
|
12743
|
+
if (overlays === void 0) {
|
|
12744
|
+
overlays = true;
|
|
12745
|
+
}
|
|
12746
|
+
|
|
12364
12747
|
const window = getWindow();
|
|
12365
12748
|
const device = getDevice();
|
|
12366
12749
|
|
|
@@ -12504,6 +12887,7 @@
|
|
|
12504
12887
|
params: {
|
|
12505
12888
|
view: {
|
|
12506
12889
|
init: true,
|
|
12890
|
+
initRouterOnTabShow: false,
|
|
12507
12891
|
name: undefined,
|
|
12508
12892
|
main: false,
|
|
12509
12893
|
router: true,
|
|
@@ -12554,6 +12938,7 @@
|
|
|
12554
12938
|
browserHistoryOnLoad: true,
|
|
12555
12939
|
browserHistoryInitialMatch: false,
|
|
12556
12940
|
browserHistoryStoreHistory: true,
|
|
12941
|
+
browserHistoryTabs: 'replace',
|
|
12557
12942
|
// Animate Pages
|
|
12558
12943
|
animate: true,
|
|
12559
12944
|
// iOS Dynamic Navbar
|
|
@@ -12803,7 +13188,19 @@
|
|
|
12803
13188
|
}
|
|
12804
13189
|
},
|
|
12805
13190
|
|
|
12806
|
-
hide(el, animate
|
|
13191
|
+
hide(el, animate, hideStatusbar, hideOnlyCurrent) {
|
|
13192
|
+
if (animate === void 0) {
|
|
13193
|
+
animate = true;
|
|
13194
|
+
}
|
|
13195
|
+
|
|
13196
|
+
if (hideStatusbar === void 0) {
|
|
13197
|
+
hideStatusbar = false;
|
|
13198
|
+
}
|
|
13199
|
+
|
|
13200
|
+
if (hideOnlyCurrent === void 0) {
|
|
13201
|
+
hideOnlyCurrent = false;
|
|
13202
|
+
}
|
|
13203
|
+
|
|
12807
13204
|
const app = this;
|
|
12808
13205
|
let $el = $(el);
|
|
12809
13206
|
const isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length && !hideOnlyCurrent;
|
|
@@ -12837,7 +13234,19 @@
|
|
|
12837
13234
|
}
|
|
12838
13235
|
},
|
|
12839
13236
|
|
|
12840
|
-
show(el
|
|
13237
|
+
show(el, animate, hideOnlyCurrent) {
|
|
13238
|
+
if (el === void 0) {
|
|
13239
|
+
el = '.navbar-hidden';
|
|
13240
|
+
}
|
|
13241
|
+
|
|
13242
|
+
if (animate === void 0) {
|
|
13243
|
+
animate = true;
|
|
13244
|
+
}
|
|
13245
|
+
|
|
13246
|
+
if (hideOnlyCurrent === void 0) {
|
|
13247
|
+
hideOnlyCurrent = false;
|
|
13248
|
+
}
|
|
13249
|
+
|
|
12841
13250
|
const app = this;
|
|
12842
13251
|
let $el = $(el);
|
|
12843
13252
|
const isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length && !hideOnlyCurrent;
|
|
@@ -13468,8 +13877,8 @@
|
|
|
13468
13877
|
const Toolbar = {
|
|
13469
13878
|
setHighlight(tabbarEl) {
|
|
13470
13879
|
const app = this;
|
|
13471
|
-
if (app.theme === 'ios') return;
|
|
13472
13880
|
const $tabbarEl = $(tabbarEl);
|
|
13881
|
+
if (app.theme === 'ios' && !$tabbarEl.hasClass('tabbar-highlight')) return;
|
|
13473
13882
|
if ($tabbarEl.length === 0 || !($tabbarEl.hasClass('tabbar') || $tabbarEl.hasClass('tabbar-labels'))) return;
|
|
13474
13883
|
let $highlightEl = $tabbarEl.find('.tab-link-highlight');
|
|
13475
13884
|
const tabLinksCount = $tabbarEl.find('.tab-link').length;
|
|
@@ -13509,7 +13918,11 @@
|
|
|
13509
13918
|
app.toolbar.setHighlight(tabbarEl);
|
|
13510
13919
|
},
|
|
13511
13920
|
|
|
13512
|
-
hide(el, animate
|
|
13921
|
+
hide(el, animate) {
|
|
13922
|
+
if (animate === void 0) {
|
|
13923
|
+
animate = true;
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13513
13926
|
const app = this;
|
|
13514
13927
|
const $el = $(el);
|
|
13515
13928
|
if ($el.hasClass('toolbar-hidden')) return;
|
|
@@ -13522,7 +13935,11 @@
|
|
|
13522
13935
|
app.emit('toolbarHide', $el[0]);
|
|
13523
13936
|
},
|
|
13524
13937
|
|
|
13525
|
-
show(el, animate
|
|
13938
|
+
show(el, animate) {
|
|
13939
|
+
if (animate === void 0) {
|
|
13940
|
+
animate = true;
|
|
13941
|
+
}
|
|
13942
|
+
|
|
13526
13943
|
const app = this;
|
|
13527
13944
|
const $el = $(el);
|
|
13528
13945
|
if (!$el.hasClass('toolbar-hidden')) return;
|
|
@@ -13819,7 +14236,11 @@
|
|
|
13819
14236
|
create() {
|
|
13820
14237
|
const app = this;
|
|
13821
14238
|
app.touchRipple = {
|
|
13822
|
-
create(
|
|
14239
|
+
create() {
|
|
14240
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14241
|
+
args[_key] = arguments[_key];
|
|
14242
|
+
}
|
|
14243
|
+
|
|
13823
14244
|
return new TouchRipple$1(...args);
|
|
13824
14245
|
}
|
|
13825
14246
|
|
|
@@ -13885,6 +14306,11 @@
|
|
|
13885
14306
|
if (!modal.type || !modal.$el) return;
|
|
13886
14307
|
modal.$el.removeClass('modal-out');
|
|
13887
14308
|
modal.$el.hide();
|
|
14309
|
+
|
|
14310
|
+
if (modal.params.backdrop && (modal.params.backdropUnique || modal.forceBackdropUnique) && modal.$backdropEl) {
|
|
14311
|
+
modal.$backdropEl.remove();
|
|
14312
|
+
}
|
|
14313
|
+
|
|
13888
14314
|
modal.$el.trigger(`modal:closed ${modal.type.toLowerCase()}:closed`);
|
|
13889
14315
|
modal.emit(`local::closed modalClosed ${modal.type}Closed`, modal);
|
|
13890
14316
|
}
|
|
@@ -13942,8 +14368,13 @@
|
|
|
13942
14368
|
|
|
13943
14369
|
|
|
13944
14370
|
$el.show();
|
|
14371
|
+
|
|
14372
|
+
if (modal.params.backdrop && (modal.params.backdropUnique || modal.forceBackdropUnique) && modal.$backdropEl) {
|
|
14373
|
+
modal.$backdropEl.insertBefore($el);
|
|
14374
|
+
}
|
|
13945
14375
|
/* eslint no-underscore-dangle: ["error", { "allow": ["_clientLeft"] }] */
|
|
13946
14376
|
|
|
14377
|
+
|
|
13947
14378
|
modal._clientLeft = $el[0].clientLeft; // Modal
|
|
13948
14379
|
|
|
13949
14380
|
function transitionEnd() {
|
|
@@ -14179,5 +14610,5 @@
|
|
|
14179
14610
|
|
|
14180
14611
|
return Framework7;
|
|
14181
14612
|
|
|
14182
|
-
}))
|
|
14613
|
+
}));
|
|
14183
14614
|
//# sourceMappingURL=framework7.js.map
|