q2-tecton-elements 1.12.1 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere.cjs.entry.js +5 -7
- package/dist/cjs/{icons-9bd0febe.js → icons-08ffe5c9.js} +386 -386
- package/dist/cjs/{index-c2e53804.js → index-7febb200.js} +112 -65
- package/dist/cjs/{index-773c3eec.js → index-dd823ee6.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +43 -0
- package/dist/cjs/q2-btn_2.cjs.entry.js +13 -13
- package/dist/cjs/q2-calendar.cjs.entry.js +42 -59
- package/dist/cjs/q2-card.cjs.entry.js +43 -5
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +5 -5
- package/dist/cjs/q2-carousel.cjs.entry.js +318 -106
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js +8 -11
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +7 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js +9 -18
- package/dist/cjs/q2-editable-field.cjs.entry.js +5 -8
- package/dist/cjs/q2-icon.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js +431 -434
- package/dist/cjs/q2-loading-element.cjs.entry.js +3 -3
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +5 -5
- package/dist/cjs/q2-optgroup.cjs.entry.js +3 -3
- package/dist/cjs/q2-option-list.cjs.entry.js +5 -3
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +6 -8
- package/dist/cjs/q2-pill.cjs.entry.js +9 -9
- package/dist/cjs/q2-radio-group.cjs.entry.js +4 -7
- package/dist/cjs/q2-radio.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +5 -7
- package/dist/cjs/q2-select.cjs.entry.js +17 -29
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +42 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +278 -0
- package/dist/cjs/q2-stepper.cjs.entry.js +10 -12
- package/dist/cjs/q2-tab-container.cjs.entry.js +8 -8
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +4 -4
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +8 -8
- package/dist/cjs/{shapes-086c0365.js → shapes-305746b5.js} +9 -16
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -5
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/click-elsewhere/index.js +4 -6
- package/dist/collection/components/q2-badge/index.js +148 -0
- package/dist/collection/components/q2-badge/styles.css +134 -0
- package/dist/collection/components/q2-btn/index.js +14 -14
- package/dist/collection/components/q2-calendar/helpers.js +16 -20
- package/dist/collection/components/q2-calendar/index.js +21 -36
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-calendar/validation.js +4 -2
- package/dist/collection/components/q2-card/index.js +59 -2
- package/dist/collection/components/q2-card/styles.css +17 -1
- package/dist/collection/components/q2-carousel/index.js +11 -16
- package/dist/collection/components/q2-carousel/styles.css +3 -3
- package/dist/collection/components/q2-carousel-pane/index.js +2 -2
- package/dist/collection/components/q2-carousel-pane/styles.css +8 -3
- package/dist/collection/components/q2-checkbox/index.js +8 -11
- package/dist/collection/components/q2-checkbox/styles.css +1 -1
- package/dist/collection/components/q2-checkbox-group/index.js +1 -1
- package/dist/collection/components/q2-dropdown/index.js +6 -15
- package/dist/collection/components/q2-dropdown/styles.css +3 -3
- package/dist/collection/components/q2-dropdown-item/index.js +5 -5
- package/dist/collection/components/q2-editable-field/index.js +3 -6
- package/dist/collection/components/q2-icon/icons.js +385 -385
- package/dist/collection/components/q2-input/formatting/credit-card.js +15 -13
- package/dist/collection/components/q2-input/formatting/currency.js +162 -162
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js +7 -8
- package/dist/collection/components/q2-input/formatting/number.js +6 -9
- package/dist/collection/components/q2-input/formatting/numeric.js +5 -5
- package/dist/collection/components/q2-input/formatting/phone.js +215 -215
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/index.js +20 -21
- package/dist/collection/components/q2-input/styles.css +19 -6
- package/dist/collection/components/q2-loading/index.js +4 -4
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js +8 -15
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +3 -3
- package/dist/collection/components/q2-optgroup/index.js +1 -1
- package/dist/collection/components/q2-option-list/index.js +4 -2
- package/dist/collection/components/q2-pagination/index.js +4 -6
- package/dist/collection/components/q2-pill/index.js +8 -8
- package/dist/collection/components/q2-pill/styles.css +3 -1
- package/dist/collection/components/q2-radio-group/index.js +3 -6
- package/dist/collection/components/q2-section/index.js +5 -7
- package/dist/collection/components/q2-select/index.js +15 -27
- package/dist/collection/components/q2-select/styles.css +4 -4
- package/dist/collection/components/q2-stepper/index.js +8 -10
- package/dist/collection/components/q2-stepper/styles.css +3 -3
- package/dist/collection/components/q2-stepper-pane/index.js +133 -5
- package/dist/collection/components/q2-stepper-vertical/index.js +346 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +273 -0
- package/dist/collection/components/q2-tab-container/index.js +7 -7
- package/dist/collection/components/q2-tag/index.js +3 -3
- package/dist/collection/components/q2-textarea/index.js +6 -6
- package/dist/collection/components/tecton-tab-pane/index.js +3 -10
- package/dist/collection/utils/index.js +1 -1
- package/dist/esm/click-elsewhere.entry.js +5 -7
- package/dist/esm/{icons-6a143c2f.js → icons-b1e11526.js} +386 -386
- package/dist/esm/{index-fa32f694.js → index-0ff8de52.js} +2 -2
- package/dist/esm/{index-be8376c0.js → index-dbfb3ecc.js} +112 -65
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge.entry.js +39 -0
- package/dist/esm/q2-btn_2.entry.js +13 -13
- package/dist/esm/q2-calendar.entry.js +42 -59
- package/dist/esm/q2-card.entry.js +43 -5
- package/dist/esm/q2-carousel-pane.entry.js +5 -5
- package/dist/esm/q2-carousel.entry.js +318 -106
- package/dist/esm/q2-checkbox-group.entry.js +3 -3
- package/dist/esm/q2-checkbox.entry.js +8 -11
- package/dist/esm/q2-dropdown-item.entry.js +7 -7
- package/dist/esm/q2-dropdown.entry.js +9 -18
- package/dist/esm/q2-editable-field.entry.js +5 -8
- package/dist/esm/q2-icon.entry.js +3 -3
- package/dist/esm/q2-input.entry.js +431 -434
- package/dist/esm/q2-loading-element.entry.js +3 -3
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +5 -5
- package/dist/esm/q2-optgroup.entry.js +3 -3
- package/dist/esm/q2-option-list.entry.js +5 -3
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +6 -8
- package/dist/esm/q2-pill.entry.js +9 -9
- package/dist/esm/q2-radio-group.entry.js +4 -7
- package/dist/esm/q2-radio.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +5 -7
- package/dist/esm/q2-select.entry.js +17 -29
- package/dist/esm/q2-stepper-pane.entry.js +42 -4
- package/dist/esm/q2-stepper-vertical.entry.js +274 -0
- package/dist/esm/q2-stepper.entry.js +10 -12
- package/dist/esm/q2-tab-container.entry.js +8 -8
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +4 -4
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +8 -8
- package/dist/esm/{shapes-81c11dfe.js → shapes-cff4e1f0.js} +9 -16
- package/dist/esm/tecton-tab-pane.entry.js +2 -5
- package/dist/loader/index.d.ts +0 -1
- package/dist/q2-tecton-elements/{p-a0248299.entry.js → p-00e8f782.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-0900bec1.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-f98dc161.entry.js → p-10264ecb.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-0a7cff38.entry.js → p-1305ec5f.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-148391d6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1dfaee64.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-32ad664c.entry.js → p-221abbf6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c90a6016.js → p-255b2b4c.js} +1 -1
- package/dist/q2-tecton-elements/p-27736b6b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2846ab94.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-167a19fd.entry.js → p-2bc1de01.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-8ea2c4f7.entry.js → p-2c15414c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2caa89fd.js +1 -0
- package/dist/q2-tecton-elements/p-327cca41.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-54f0d64e.entry.js → p-3a420dbf.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c460e5ed.entry.js → p-3a64e5ce.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-aca8302b.entry.js → p-3abcb09d.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-08668234.entry.js → p-3fe98e3e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c5199147.entry.js → p-430a979b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fa9e3825.entry.js → p-45eb7739.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-750bcd33.entry.js → p-49b2abc4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d9bc6494.entry.js → p-4ab30466.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5bbf2bfe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6fec9235.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-3c6f73cb.js → p-824aebd9.js} +1 -1
- package/dist/q2-tecton-elements/{p-91dba21f.entry.js → p-a4ae89cc.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d3058002.entry.js → p-a5562aaa.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-5effd81a.entry.js → p-ae130f70.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-b2302cd3.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c20cbb2d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ca7a3380.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-9a3c37ab.entry.js → p-d33e152c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9024859f.entry.js → p-d5218cd6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-54300d2f.entry.js → p-d52b435e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c3d68d5c.js → p-dd02cf8d.js} +1 -1
- package/dist/q2-tecton-elements/{p-30bf5f44.entry.js → p-e0e7ae8b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ede12fc1.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-af202624.entry.js → p-fdfbe75b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ffbded54.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/elements/q2-tag-test.js +6 -6
- package/dist/test/helpers.js +7 -7
- package/dist/types/components/q2-badge/index.d.ts +13 -0
- package/dist/types/components/q2-btn/index.d.ts +3 -3
- package/dist/types/components/q2-calendar/index.d.ts +1 -1
- package/dist/types/components/q2-calendar/validation.d.ts +1 -1
- package/dist/types/components/q2-card/index.d.ts +4 -0
- package/dist/types/components/q2-dropdown/index.d.ts +1 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -1
- package/dist/types/components/q2-input/formatting/credit-card.d.ts +1 -3
- package/dist/types/components/q2-input/index.d.ts +2 -2
- package/dist/types/components/q2-option-list/index.d.ts +1 -1
- package/dist/types/components/q2-pill/index.d.ts +1 -1
- package/dist/types/components/q2-select/index.d.ts +1 -1
- package/dist/types/components/q2-stepper/index.d.ts +1 -1
- package/dist/types/components/q2-stepper-pane/index.d.ts +16 -1
- package/dist/types/components/q2-stepper-vertical/index.d.ts +52 -0
- package/dist/types/components/q2-tab-container/index.d.ts +1 -1
- package/dist/types/components/tecton-tab-pane/index.d.ts +2 -2
- package/dist/types/components.d.ts +63 -13
- package/dist/types/global.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/util.d.ts +2 -10
- package/dist/types/workspace/workspace/{tecton-production_release_1.12.x → tecton-production_release_1.13.x}/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.12.x → tecton-production_release_1.13.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -2
- package/package.json +13 -13
- package/dist/q2-tecton-elements/p-080839ed.js +0 -1
- package/dist/q2-tecton-elements/p-2afdc922.entry.js +0 -1
- package/dist/q2-tecton-elements/p-34415315.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5b906cf1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7ce98c1a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b9c2c1d3.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5e6f7fa.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d65aaed2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-df86f160.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e38080d2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e9d69ba8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fe6407a4.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid, l as loc, h as handleAriaLabel, i as isEventFromElement, o as overrideFocus } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { c as createGuid, l as loc, h as handleAriaLabel, i as isEventFromElement, o as overrideFocus } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SSR Window 4.0.2
|
|
@@ -988,7 +988,11 @@ function deleteProps(obj) {
|
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
-
function nextTick(callback, delay
|
|
991
|
+
function nextTick(callback, delay) {
|
|
992
|
+
if (delay === void 0) {
|
|
993
|
+
delay = 0;
|
|
994
|
+
}
|
|
995
|
+
|
|
992
996
|
return setTimeout(callback, delay);
|
|
993
997
|
}
|
|
994
998
|
|
|
@@ -1015,7 +1019,11 @@ function getComputedStyle$1(el) {
|
|
|
1015
1019
|
return style;
|
|
1016
1020
|
}
|
|
1017
1021
|
|
|
1018
|
-
function getTranslate(el, axis
|
|
1022
|
+
function getTranslate(el, axis) {
|
|
1023
|
+
if (axis === void 0) {
|
|
1024
|
+
axis = 'x';
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1019
1027
|
const window = getWindow();
|
|
1020
1028
|
let matrix;
|
|
1021
1029
|
let curTransform;
|
|
@@ -1067,12 +1075,12 @@ function isNode(node) {
|
|
|
1067
1075
|
return node && (node.nodeType === 1 || node.nodeType === 11);
|
|
1068
1076
|
}
|
|
1069
1077
|
|
|
1070
|
-
function extend(
|
|
1071
|
-
const to = Object(
|
|
1078
|
+
function extend() {
|
|
1079
|
+
const to = Object(arguments.length <= 0 ? undefined : arguments[0]);
|
|
1072
1080
|
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
|
1073
1081
|
|
|
1074
|
-
for (let i = 1; i <
|
|
1075
|
-
const nextSource =
|
|
1082
|
+
for (let i = 1; i < arguments.length; i += 1) {
|
|
1083
|
+
const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];
|
|
1076
1084
|
|
|
1077
1085
|
if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {
|
|
1078
1086
|
const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);
|
|
@@ -1111,11 +1119,12 @@ function setCSSProperty(el, varName, varValue) {
|
|
|
1111
1119
|
el.style.setProperty(varName, varValue);
|
|
1112
1120
|
}
|
|
1113
1121
|
|
|
1114
|
-
function animateCSSModeScroll({
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1122
|
+
function animateCSSModeScroll(_ref) {
|
|
1123
|
+
let {
|
|
1124
|
+
swiper,
|
|
1125
|
+
targetPosition,
|
|
1126
|
+
side
|
|
1127
|
+
} = _ref;
|
|
1119
1128
|
const window = getWindow();
|
|
1120
1129
|
const startPosition = -swiper.translate;
|
|
1121
1130
|
let startTime = null;
|
|
@@ -1208,9 +1217,10 @@ function getSupport() {
|
|
|
1208
1217
|
|
|
1209
1218
|
let deviceCached;
|
|
1210
1219
|
|
|
1211
|
-
function calcDevice({
|
|
1212
|
-
|
|
1213
|
-
|
|
1220
|
+
function calcDevice(_temp) {
|
|
1221
|
+
let {
|
|
1222
|
+
userAgent
|
|
1223
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1214
1224
|
const support = getSupport();
|
|
1215
1225
|
const window = getWindow();
|
|
1216
1226
|
const platform = window.navigator.platform;
|
|
@@ -1252,7 +1262,11 @@ function calcDevice({
|
|
|
1252
1262
|
return device;
|
|
1253
1263
|
}
|
|
1254
1264
|
|
|
1255
|
-
function getDevice(overrides
|
|
1265
|
+
function getDevice(overrides) {
|
|
1266
|
+
if (overrides === void 0) {
|
|
1267
|
+
overrides = {};
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1256
1270
|
if (!deviceCached) {
|
|
1257
1271
|
deviceCached = calcDevice(overrides);
|
|
1258
1272
|
}
|
|
@@ -1284,13 +1298,15 @@ function getBrowser() {
|
|
|
1284
1298
|
return browser;
|
|
1285
1299
|
}
|
|
1286
1300
|
|
|
1287
|
-
function Resize({
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1301
|
+
function Resize(_ref) {
|
|
1302
|
+
let {
|
|
1303
|
+
swiper,
|
|
1304
|
+
on,
|
|
1305
|
+
emit
|
|
1306
|
+
} = _ref;
|
|
1292
1307
|
const window = getWindow();
|
|
1293
1308
|
let observer = null;
|
|
1309
|
+
let animationFrame = null;
|
|
1294
1310
|
|
|
1295
1311
|
const resizeHandler = () => {
|
|
1296
1312
|
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
|
@@ -1301,30 +1317,37 @@ function Resize({
|
|
|
1301
1317
|
const createObserver = () => {
|
|
1302
1318
|
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
|
1303
1319
|
observer = new ResizeObserver(entries => {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1320
|
+
animationFrame = window.requestAnimationFrame(() => {
|
|
1321
|
+
const {
|
|
1322
|
+
width,
|
|
1323
|
+
height
|
|
1324
|
+
} = swiper;
|
|
1325
|
+
let newWidth = width;
|
|
1326
|
+
let newHeight = height;
|
|
1327
|
+
entries.forEach(_ref2 => {
|
|
1328
|
+
let {
|
|
1329
|
+
contentBoxSize,
|
|
1330
|
+
contentRect,
|
|
1331
|
+
target
|
|
1332
|
+
} = _ref2;
|
|
1333
|
+
if (target && target !== swiper.el) return;
|
|
1334
|
+
newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
|
|
1335
|
+
newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
|
|
1336
|
+
});
|
|
1319
1337
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1338
|
+
if (newWidth !== width || newHeight !== height) {
|
|
1339
|
+
resizeHandler();
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1323
1342
|
});
|
|
1324
1343
|
observer.observe(swiper.el);
|
|
1325
1344
|
};
|
|
1326
1345
|
|
|
1327
1346
|
const removeObserver = () => {
|
|
1347
|
+
if (animationFrame) {
|
|
1348
|
+
window.cancelAnimationFrame(animationFrame);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1328
1351
|
if (observer && observer.unobserve && swiper.el) {
|
|
1329
1352
|
observer.unobserve(swiper.el);
|
|
1330
1353
|
observer = null;
|
|
@@ -1352,16 +1375,21 @@ function Resize({
|
|
|
1352
1375
|
});
|
|
1353
1376
|
}
|
|
1354
1377
|
|
|
1355
|
-
function Observer({
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1378
|
+
function Observer(_ref) {
|
|
1379
|
+
let {
|
|
1380
|
+
swiper,
|
|
1381
|
+
extendParams,
|
|
1382
|
+
on,
|
|
1383
|
+
emit
|
|
1384
|
+
} = _ref;
|
|
1361
1385
|
const observers = [];
|
|
1362
1386
|
const window = getWindow();
|
|
1363
1387
|
|
|
1364
|
-
const attach = (target, options
|
|
1388
|
+
const attach = function (target, options) {
|
|
1389
|
+
if (options === void 0) {
|
|
1390
|
+
options = {};
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1365
1393
|
const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
|
|
1366
1394
|
const observer = new ObserverFunc(mutations => {
|
|
1367
1395
|
// The observerUpdate event should only be triggered
|
|
@@ -1431,6 +1459,7 @@ function Observer({
|
|
|
1431
1459
|
const eventsEmitter = {
|
|
1432
1460
|
on(events, handler, priority) {
|
|
1433
1461
|
const self = this;
|
|
1462
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1434
1463
|
if (typeof handler !== 'function') return self;
|
|
1435
1464
|
const method = priority ? 'unshift' : 'push';
|
|
1436
1465
|
events.split(' ').forEach(event => {
|
|
@@ -1442,15 +1471,20 @@ const eventsEmitter = {
|
|
|
1442
1471
|
|
|
1443
1472
|
once(events, handler, priority) {
|
|
1444
1473
|
const self = this;
|
|
1474
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1445
1475
|
if (typeof handler !== 'function') return self;
|
|
1446
1476
|
|
|
1447
|
-
function onceHandler(
|
|
1477
|
+
function onceHandler() {
|
|
1448
1478
|
self.off(events, onceHandler);
|
|
1449
1479
|
|
|
1450
1480
|
if (onceHandler.__emitterProxy) {
|
|
1451
1481
|
delete onceHandler.__emitterProxy;
|
|
1452
1482
|
}
|
|
1453
1483
|
|
|
1484
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1485
|
+
args[_key] = arguments[_key];
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1454
1488
|
handler.apply(self, args);
|
|
1455
1489
|
}
|
|
1456
1490
|
|
|
@@ -1460,6 +1494,7 @@ const eventsEmitter = {
|
|
|
1460
1494
|
|
|
1461
1495
|
onAny(handler, priority) {
|
|
1462
1496
|
const self = this;
|
|
1497
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1463
1498
|
if (typeof handler !== 'function') return self;
|
|
1464
1499
|
const method = priority ? 'unshift' : 'push';
|
|
1465
1500
|
|
|
@@ -1472,6 +1507,7 @@ const eventsEmitter = {
|
|
|
1472
1507
|
|
|
1473
1508
|
offAny(handler) {
|
|
1474
1509
|
const self = this;
|
|
1510
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1475
1511
|
if (!self.eventsAnyListeners) return self;
|
|
1476
1512
|
const index = self.eventsAnyListeners.indexOf(handler);
|
|
1477
1513
|
|
|
@@ -1484,6 +1520,7 @@ const eventsEmitter = {
|
|
|
1484
1520
|
|
|
1485
1521
|
off(events, handler) {
|
|
1486
1522
|
const self = this;
|
|
1523
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1487
1524
|
if (!self.eventsListeners) return self;
|
|
1488
1525
|
events.split(' ').forEach(event => {
|
|
1489
1526
|
if (typeof handler === 'undefined') {
|
|
@@ -1499,13 +1536,18 @@ const eventsEmitter = {
|
|
|
1499
1536
|
return self;
|
|
1500
1537
|
},
|
|
1501
1538
|
|
|
1502
|
-
emit(
|
|
1539
|
+
emit() {
|
|
1503
1540
|
const self = this;
|
|
1541
|
+
if (!self.eventsListeners || self.destroyed) return self;
|
|
1504
1542
|
if (!self.eventsListeners) return self;
|
|
1505
1543
|
let events;
|
|
1506
1544
|
let data;
|
|
1507
1545
|
let context;
|
|
1508
1546
|
|
|
1547
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1548
|
+
args[_key2] = arguments[_key2];
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1509
1551
|
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
1510
1552
|
events = args[0];
|
|
1511
1553
|
data = args.slice(1, args.length);
|
|
@@ -1877,6 +1919,17 @@ function updateSlides() {
|
|
|
1877
1919
|
if (params.watchSlidesProgress) {
|
|
1878
1920
|
swiper.updateSlidesOffset();
|
|
1879
1921
|
}
|
|
1922
|
+
|
|
1923
|
+
if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {
|
|
1924
|
+
const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;
|
|
1925
|
+
const hasClassBackfaceClassAdded = swiper.$el.hasClass(backFaceHiddenClass);
|
|
1926
|
+
|
|
1927
|
+
if (slidesLength <= params.maxBackfaceHiddenSlides) {
|
|
1928
|
+
if (!hasClassBackfaceClassAdded) swiper.$el.addClass(backFaceHiddenClass);
|
|
1929
|
+
} else if (hasClassBackfaceClassAdded) {
|
|
1930
|
+
swiper.$el.removeClass(backFaceHiddenClass);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1880
1933
|
}
|
|
1881
1934
|
|
|
1882
1935
|
function updateAutoHeight(speed) {
|
|
@@ -1938,7 +1991,11 @@ function updateSlidesOffset() {
|
|
|
1938
1991
|
}
|
|
1939
1992
|
}
|
|
1940
1993
|
|
|
1941
|
-
function updateSlidesProgress(translate
|
|
1994
|
+
function updateSlidesProgress(translate) {
|
|
1995
|
+
if (translate === void 0) {
|
|
1996
|
+
translate = this && this.translate || 0;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1942
1999
|
const swiper = this;
|
|
1943
2000
|
const params = swiper.params;
|
|
1944
2001
|
const {
|
|
@@ -2217,7 +2274,11 @@ const update = {
|
|
|
2217
2274
|
updateClickedSlide
|
|
2218
2275
|
};
|
|
2219
2276
|
|
|
2220
|
-
function getSwiperTranslate(axis
|
|
2277
|
+
function getSwiperTranslate(axis) {
|
|
2278
|
+
if (axis === void 0) {
|
|
2279
|
+
axis = this.isHorizontal() ? 'x' : 'y';
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2221
2282
|
const swiper = this;
|
|
2222
2283
|
const {
|
|
2223
2284
|
params,
|
|
@@ -2296,7 +2357,23 @@ function maxTranslate() {
|
|
|
2296
2357
|
return -this.snapGrid[this.snapGrid.length - 1];
|
|
2297
2358
|
}
|
|
2298
2359
|
|
|
2299
|
-
function translateTo(translate
|
|
2360
|
+
function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
|
|
2361
|
+
if (translate === void 0) {
|
|
2362
|
+
translate = 0;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
if (speed === void 0) {
|
|
2366
|
+
speed = this.params.speed;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
if (runCallbacks === void 0) {
|
|
2370
|
+
runCallbacks = true;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
if (translateBounds === void 0) {
|
|
2374
|
+
translateBounds = true;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2300
2377
|
const swiper = this;
|
|
2301
2378
|
const {
|
|
2302
2379
|
params,
|
|
@@ -2399,12 +2476,13 @@ function setTransition(duration, byController) {
|
|
|
2399
2476
|
swiper.emit('setTransition', duration, byController);
|
|
2400
2477
|
}
|
|
2401
2478
|
|
|
2402
|
-
function transitionEmit({
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2479
|
+
function transitionEmit(_ref) {
|
|
2480
|
+
let {
|
|
2481
|
+
swiper,
|
|
2482
|
+
runCallbacks,
|
|
2483
|
+
direction,
|
|
2484
|
+
step
|
|
2485
|
+
} = _ref;
|
|
2408
2486
|
const {
|
|
2409
2487
|
activeIndex,
|
|
2410
2488
|
previousIndex
|
|
@@ -2433,7 +2511,11 @@ function transitionEmit({
|
|
|
2433
2511
|
}
|
|
2434
2512
|
}
|
|
2435
2513
|
|
|
2436
|
-
function transitionStart(runCallbacks
|
|
2514
|
+
function transitionStart(runCallbacks, direction) {
|
|
2515
|
+
if (runCallbacks === void 0) {
|
|
2516
|
+
runCallbacks = true;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2437
2519
|
const swiper = this;
|
|
2438
2520
|
const {
|
|
2439
2521
|
params
|
|
@@ -2452,7 +2534,11 @@ function transitionStart(runCallbacks = true, direction) {
|
|
|
2452
2534
|
});
|
|
2453
2535
|
}
|
|
2454
2536
|
|
|
2455
|
-
function transitionEnd(runCallbacks
|
|
2537
|
+
function transitionEnd(runCallbacks, direction) {
|
|
2538
|
+
if (runCallbacks === void 0) {
|
|
2539
|
+
runCallbacks = true;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2456
2542
|
const swiper = this;
|
|
2457
2543
|
const {
|
|
2458
2544
|
params
|
|
@@ -2474,7 +2560,19 @@ const transition = {
|
|
|
2474
2560
|
transitionEnd
|
|
2475
2561
|
};
|
|
2476
2562
|
|
|
2477
|
-
function slideTo(index
|
|
2563
|
+
function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
2564
|
+
if (index === void 0) {
|
|
2565
|
+
index = 0;
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
if (speed === void 0) {
|
|
2569
|
+
speed = this.params.speed;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
if (runCallbacks === void 0) {
|
|
2573
|
+
runCallbacks = true;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2478
2576
|
if (typeof index !== 'number' && typeof index !== 'string') {
|
|
2479
2577
|
throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);
|
|
2480
2578
|
}
|
|
@@ -2655,7 +2753,19 @@ function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, inte
|
|
|
2655
2753
|
return true;
|
|
2656
2754
|
}
|
|
2657
2755
|
|
|
2658
|
-
function slideToLoop(index
|
|
2756
|
+
function slideToLoop(index, speed, runCallbacks, internal) {
|
|
2757
|
+
if (index === void 0) {
|
|
2758
|
+
index = 0;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2761
|
+
if (speed === void 0) {
|
|
2762
|
+
speed = this.params.speed;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
if (runCallbacks === void 0) {
|
|
2766
|
+
runCallbacks = true;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2659
2769
|
const swiper = this;
|
|
2660
2770
|
let newIndex = index;
|
|
2661
2771
|
|
|
@@ -2667,7 +2777,15 @@ function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true,
|
|
|
2667
2777
|
}
|
|
2668
2778
|
|
|
2669
2779
|
/* eslint no-unused-vars: "off" */
|
|
2670
|
-
function slideNext(speed
|
|
2780
|
+
function slideNext(speed, runCallbacks, internal) {
|
|
2781
|
+
if (speed === void 0) {
|
|
2782
|
+
speed = this.params.speed;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
if (runCallbacks === void 0) {
|
|
2786
|
+
runCallbacks = true;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2671
2789
|
const swiper = this;
|
|
2672
2790
|
const {
|
|
2673
2791
|
animating,
|
|
@@ -2698,7 +2816,15 @@ function slideNext(speed = this.params.speed, runCallbacks = true, internal) {
|
|
|
2698
2816
|
}
|
|
2699
2817
|
|
|
2700
2818
|
/* eslint no-unused-vars: "off" */
|
|
2701
|
-
function slidePrev(speed
|
|
2819
|
+
function slidePrev(speed, runCallbacks, internal) {
|
|
2820
|
+
if (speed === void 0) {
|
|
2821
|
+
speed = this.params.speed;
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
if (runCallbacks === void 0) {
|
|
2825
|
+
runCallbacks = true;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2702
2828
|
const swiper = this;
|
|
2703
2829
|
const {
|
|
2704
2830
|
params,
|
|
@@ -2755,20 +2881,41 @@ function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {
|
|
|
2755
2881
|
}
|
|
2756
2882
|
|
|
2757
2883
|
if (params.rewind && swiper.isBeginning) {
|
|
2758
|
-
|
|
2884
|
+
const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
|
|
2885
|
+
return swiper.slideTo(lastIndex, speed, runCallbacks, internal);
|
|
2759
2886
|
}
|
|
2760
2887
|
|
|
2761
2888
|
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
|
2762
2889
|
}
|
|
2763
2890
|
|
|
2764
2891
|
/* eslint no-unused-vars: "off" */
|
|
2765
|
-
function slideReset(speed
|
|
2892
|
+
function slideReset(speed, runCallbacks, internal) {
|
|
2893
|
+
if (speed === void 0) {
|
|
2894
|
+
speed = this.params.speed;
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
if (runCallbacks === void 0) {
|
|
2898
|
+
runCallbacks = true;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2766
2901
|
const swiper = this;
|
|
2767
2902
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
|
2768
2903
|
}
|
|
2769
2904
|
|
|
2770
2905
|
/* eslint no-unused-vars: "off" */
|
|
2771
|
-
function slideToClosest(speed
|
|
2906
|
+
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
2907
|
+
if (speed === void 0) {
|
|
2908
|
+
speed = this.params.speed;
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
if (runCallbacks === void 0) {
|
|
2912
|
+
runCallbacks = true;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
if (threshold === void 0) {
|
|
2916
|
+
threshold = 0.5;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2772
2919
|
const swiper = this;
|
|
2773
2920
|
let index = swiper.activeIndex;
|
|
2774
2921
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
|
@@ -2970,8 +3117,6 @@ function setGrabCursor(moving) {
|
|
|
2970
3117
|
if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;
|
|
2971
3118
|
const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;
|
|
2972
3119
|
el.style.cursor = 'move';
|
|
2973
|
-
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
|
2974
|
-
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
|
2975
3120
|
el.style.cursor = moving ? 'grabbing' : 'grab';
|
|
2976
3121
|
}
|
|
2977
3122
|
|
|
@@ -2990,7 +3135,11 @@ const grabCursor = {
|
|
|
2990
3135
|
unsetGrabCursor
|
|
2991
3136
|
};
|
|
2992
3137
|
|
|
2993
|
-
function closestElement(selector, base
|
|
3138
|
+
function closestElement(selector, base) {
|
|
3139
|
+
if (base === void 0) {
|
|
3140
|
+
base = this;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
2994
3143
|
function __closestFrom(el) {
|
|
2995
3144
|
if (!el || el === getDocument() || el === getWindow()) return null;
|
|
2996
3145
|
if (el.assignedSlot) el = el.assignedSlot;
|
|
@@ -3085,7 +3234,14 @@ function onTouchStart(event) {
|
|
|
3085
3234
|
|
|
3086
3235
|
if (e.type !== 'touchstart') {
|
|
3087
3236
|
let preventDefault = true;
|
|
3088
|
-
|
|
3237
|
+
|
|
3238
|
+
if ($targetEl.is(data.focusableElements)) {
|
|
3239
|
+
preventDefault = false;
|
|
3240
|
+
|
|
3241
|
+
if ($targetEl[0].nodeName === 'SELECT') {
|
|
3242
|
+
data.isTouched = false;
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3089
3245
|
|
|
3090
3246
|
if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {
|
|
3091
3247
|
document.activeElement.blur();
|
|
@@ -3098,6 +3254,10 @@ function onTouchStart(event) {
|
|
|
3098
3254
|
}
|
|
3099
3255
|
}
|
|
3100
3256
|
|
|
3257
|
+
if (swiper.params.freeMode && swiper.params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {
|
|
3258
|
+
swiper.freeMode.onTouchStart();
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3101
3261
|
swiper.emit('touchStart', e);
|
|
3102
3262
|
}
|
|
3103
3263
|
|
|
@@ -3135,8 +3295,9 @@ function onTouchMove(event) {
|
|
|
3135
3295
|
}
|
|
3136
3296
|
|
|
3137
3297
|
if (!swiper.allowTouchMove) {
|
|
3138
|
-
|
|
3139
|
-
|
|
3298
|
+
if (!$(e.target).is(data.focusableElements)) {
|
|
3299
|
+
swiper.allowClick = false;
|
|
3300
|
+
}
|
|
3140
3301
|
|
|
3141
3302
|
if (data.isTouched) {
|
|
3142
3303
|
Object.assign(touches, {
|
|
@@ -3420,6 +3581,17 @@ function onTouchEnd(event) {
|
|
|
3420
3581
|
stopIndex = i;
|
|
3421
3582
|
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
|
3422
3583
|
}
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
let rewindFirstIndex = null;
|
|
3587
|
+
let rewindLastIndex = null;
|
|
3588
|
+
|
|
3589
|
+
if (params.rewind) {
|
|
3590
|
+
if (swiper.isBeginning) {
|
|
3591
|
+
rewindLastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
|
|
3592
|
+
} else if (swiper.isEnd) {
|
|
3593
|
+
rewindFirstIndex = 0;
|
|
3594
|
+
}
|
|
3423
3595
|
} // Find current slide size
|
|
3424
3596
|
|
|
3425
3597
|
|
|
@@ -3434,11 +3606,17 @@ function onTouchEnd(event) {
|
|
|
3434
3606
|
}
|
|
3435
3607
|
|
|
3436
3608
|
if (swiper.swipeDirection === 'next') {
|
|
3437
|
-
if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);
|
|
3609
|
+
if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);
|
|
3438
3610
|
}
|
|
3439
3611
|
|
|
3440
3612
|
if (swiper.swipeDirection === 'prev') {
|
|
3441
|
-
if (ratio > 1 - params.longSwipesRatio)
|
|
3613
|
+
if (ratio > 1 - params.longSwipesRatio) {
|
|
3614
|
+
swiper.slideTo(stopIndex + increment);
|
|
3615
|
+
} else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {
|
|
3616
|
+
swiper.slideTo(rewindLastIndex);
|
|
3617
|
+
} else {
|
|
3618
|
+
swiper.slideTo(stopIndex);
|
|
3619
|
+
}
|
|
3442
3620
|
}
|
|
3443
3621
|
} else {
|
|
3444
3622
|
// Short swipes
|
|
@@ -3451,11 +3629,11 @@ function onTouchEnd(event) {
|
|
|
3451
3629
|
|
|
3452
3630
|
if (!isNavButtonTarget) {
|
|
3453
3631
|
if (swiper.swipeDirection === 'next') {
|
|
3454
|
-
swiper.slideTo(stopIndex + increment);
|
|
3632
|
+
swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
|
|
3455
3633
|
}
|
|
3456
3634
|
|
|
3457
3635
|
if (swiper.swipeDirection === 'prev') {
|
|
3458
|
-
swiper.slideTo(stopIndex);
|
|
3636
|
+
swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
|
|
3459
3637
|
}
|
|
3460
3638
|
} else if (e.target === swiper.navigation.nextEl) {
|
|
3461
3639
|
swiper.slideTo(stopIndex + increment);
|
|
@@ -3540,7 +3718,7 @@ function onScroll() {
|
|
|
3540
3718
|
} // eslint-disable-next-line
|
|
3541
3719
|
|
|
3542
3720
|
|
|
3543
|
-
if (swiper.translate ===
|
|
3721
|
+
if (swiper.translate === 0) swiper.translate = 0;
|
|
3544
3722
|
swiper.updateActiveIndex();
|
|
3545
3723
|
swiper.updateSlidesClasses();
|
|
3546
3724
|
let newProgress;
|
|
@@ -3721,7 +3899,11 @@ function setBreakpoint() {
|
|
|
3721
3899
|
swiper.emit('breakpoint', breakpointParams);
|
|
3722
3900
|
}
|
|
3723
3901
|
|
|
3724
|
-
function getBreakpoint(breakpoints, base
|
|
3902
|
+
function getBreakpoint(breakpoints, base, containerEl) {
|
|
3903
|
+
if (base === void 0) {
|
|
3904
|
+
base = 'window';
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3725
3907
|
if (!breakpoints || base === 'container' && !containerEl) return undefined;
|
|
3726
3908
|
let breakpoint = false;
|
|
3727
3909
|
const window = getWindow();
|
|
@@ -3813,6 +3995,8 @@ function addClasses() {
|
|
|
3813
3995
|
'css-mode': params.cssMode
|
|
3814
3996
|
}, {
|
|
3815
3997
|
'centered': params.cssMode && params.centeredSlides
|
|
3998
|
+
}, {
|
|
3999
|
+
'watch-progress': params.watchSlidesProgress
|
|
3816
4000
|
}], params.containerModifierClass);
|
|
3817
4001
|
classNames.push(...suffixes);
|
|
3818
4002
|
$el.addClass([...classNames].join(' '));
|
|
@@ -4037,6 +4221,7 @@ const defaults = {
|
|
|
4037
4221
|
noSwipingSelector: null,
|
|
4038
4222
|
// Passive Listeners
|
|
4039
4223
|
passiveListeners: true,
|
|
4224
|
+
maxBackfaceHiddenSlides: 10,
|
|
4040
4225
|
// NS
|
|
4041
4226
|
containerModifierClass: 'swiper-',
|
|
4042
4227
|
// NEW
|
|
@@ -4058,7 +4243,11 @@ const defaults = {
|
|
|
4058
4243
|
};
|
|
4059
4244
|
|
|
4060
4245
|
function moduleExtendParams(params, allModulesParams) {
|
|
4061
|
-
return function extendParams(obj
|
|
4246
|
+
return function extendParams(obj) {
|
|
4247
|
+
if (obj === void 0) {
|
|
4248
|
+
obj = {};
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4062
4251
|
const moduleParamName = Object.keys(obj)[0];
|
|
4063
4252
|
const moduleParams = obj[moduleParamName];
|
|
4064
4253
|
|
|
@@ -4113,10 +4302,14 @@ const prototypes = {
|
|
|
4113
4302
|
const extendedDefaults = {};
|
|
4114
4303
|
|
|
4115
4304
|
class Swiper {
|
|
4116
|
-
constructor(
|
|
4305
|
+
constructor() {
|
|
4117
4306
|
let el;
|
|
4118
4307
|
let params;
|
|
4119
4308
|
|
|
4309
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4310
|
+
args[_key] = arguments[_key];
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4120
4313
|
if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {
|
|
4121
4314
|
params = args[0];
|
|
4122
4315
|
} else {
|
|
@@ -4328,6 +4521,7 @@ class Swiper {
|
|
|
4328
4521
|
|
|
4329
4522
|
getSlideClasses(slideEl) {
|
|
4330
4523
|
const swiper = this;
|
|
4524
|
+
if (swiper.destroyed) return '';
|
|
4331
4525
|
return slideEl.className.split(' ').filter(className => {
|
|
4332
4526
|
return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;
|
|
4333
4527
|
}).join(' ');
|
|
@@ -4348,7 +4542,15 @@ class Swiper {
|
|
|
4348
4542
|
swiper.emit('_slideClasses', updates);
|
|
4349
4543
|
}
|
|
4350
4544
|
|
|
4351
|
-
slidesPerViewDynamic(view
|
|
4545
|
+
slidesPerViewDynamic(view, exact) {
|
|
4546
|
+
if (view === void 0) {
|
|
4547
|
+
view = 'current';
|
|
4548
|
+
}
|
|
4549
|
+
|
|
4550
|
+
if (exact === void 0) {
|
|
4551
|
+
exact = false;
|
|
4552
|
+
}
|
|
4553
|
+
|
|
4352
4554
|
const swiper = this;
|
|
4353
4555
|
const {
|
|
4354
4556
|
params,
|
|
@@ -4456,7 +4658,11 @@ class Swiper {
|
|
|
4456
4658
|
swiper.emit('update');
|
|
4457
4659
|
}
|
|
4458
4660
|
|
|
4459
|
-
changeDirection(newDirection, needUpdate
|
|
4661
|
+
changeDirection(newDirection, needUpdate) {
|
|
4662
|
+
if (needUpdate === void 0) {
|
|
4663
|
+
needUpdate = true;
|
|
4664
|
+
}
|
|
4665
|
+
|
|
4460
4666
|
const swiper = this;
|
|
4461
4667
|
const currentDirection = swiper.params.direction;
|
|
4462
4668
|
|
|
@@ -4594,7 +4800,15 @@ class Swiper {
|
|
|
4594
4800
|
return swiper;
|
|
4595
4801
|
}
|
|
4596
4802
|
|
|
4597
|
-
destroy(deleteInstance
|
|
4803
|
+
destroy(deleteInstance, cleanStyles) {
|
|
4804
|
+
if (deleteInstance === void 0) {
|
|
4805
|
+
deleteInstance = true;
|
|
4806
|
+
}
|
|
4807
|
+
|
|
4808
|
+
if (cleanStyles === void 0) {
|
|
4809
|
+
cleanStyles = true;
|
|
4810
|
+
}
|
|
4811
|
+
|
|
4598
4812
|
const swiper = this;
|
|
4599
4813
|
const {
|
|
4600
4814
|
params,
|
|
@@ -4684,12 +4898,13 @@ Object.keys(prototypes).forEach(prototypeGroup => {
|
|
|
4684
4898
|
Swiper.use([Resize, Observer]);
|
|
4685
4899
|
|
|
4686
4900
|
/* eslint no-underscore-dangle: "off" */
|
|
4687
|
-
function Autoplay({
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4901
|
+
function Autoplay(_ref) {
|
|
4902
|
+
let {
|
|
4903
|
+
swiper,
|
|
4904
|
+
extendParams,
|
|
4905
|
+
on,
|
|
4906
|
+
emit
|
|
4907
|
+
} = _ref;
|
|
4693
4908
|
let timeout;
|
|
4694
4909
|
swiper.autoplay = {
|
|
4695
4910
|
running: false,
|
|
@@ -4824,6 +5039,7 @@ function Autoplay({
|
|
|
4824
5039
|
if (swiper.params.autoplay.disableOnInteraction) {
|
|
4825
5040
|
stop();
|
|
4826
5041
|
} else {
|
|
5042
|
+
emit('autoplayPause');
|
|
4827
5043
|
pause();
|
|
4828
5044
|
}
|
|
4829
5045
|
|
|
@@ -4838,6 +5054,7 @@ function Autoplay({
|
|
|
4838
5054
|
}
|
|
4839
5055
|
|
|
4840
5056
|
swiper.autoplay.paused = false;
|
|
5057
|
+
emit('autoplayResume');
|
|
4841
5058
|
run();
|
|
4842
5059
|
}
|
|
4843
5060
|
|
|
@@ -4902,7 +5119,7 @@ function Autoplay({
|
|
|
4902
5119
|
});
|
|
4903
5120
|
}
|
|
4904
5121
|
|
|
4905
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}button{border:0;background:transparent;transition:all 0.2s;opacity:0.3;cursor:pointer}button:hover{opacity:0.7}q2-carousel{display:flex;flex-direction:column-reverse}.swiper-container{--comp-container-padding:var(--app-scale-1x, 5px) 0 var(--app-scale-2x, 10px);display:block;width:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;padding:var(--tct-carousel-container-padding, var(--t-carousel-container-padding, var(--comp-container-padding, 5px 0 10px)))}.insufficient-pane-feedback{text-align:center;box-shadow:0px 2px 8px 0px rgba(0, 0, 0, 0.25);background-color:var(--tct-carousel-background-color, var(--t-carousel-background-color, var(--tct-white, var(--app-white, #ffffff))));border:var(--tct-carousel-pane-border-width, var(--t-carousel-pane-border-width, 1px)) solid var(--tct-carousel-pane-border-color, var(--t-carousel-pane-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));border-radius:var(--tct-carousel-pane-border-radius, var(--t-carousel-pane-border-radius, 8px));padding:var(--tct-carousel-pane-padding, var(--t-carousel-pane-padding, 0.5rem 0.5rem 0.5rem 0.5rem))
|
|
5122
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}button{border:0;background:transparent;transition:all 0.2s;opacity:0.3;cursor:pointer}button:hover{opacity:0.7}q2-carousel{display:flex;flex-direction:column-reverse}.swiper-container{--comp-container-padding:var(--app-scale-1x, 5px) 0 var(--app-scale-2x, 10px);display:block;width:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;padding:var(--tct-carousel-container-padding, var(--t-carousel-container-padding, var(--comp-container-padding, 5px 0 10px)))}.insufficient-pane-feedback{text-align:center;box-shadow:var(--app-shadow-2, 0px 2px 8px 0px rgba(0, 0, 0, 0.25));background-color:var(--tct-carousel-background-color, var(--t-carousel-background-color, var(--tct-white, var(--app-white, #ffffff))));border:var(--tct-carousel-pane-border-width, var(--t-carousel-pane-border-width, 1px)) solid var(--tct-carousel-pane-border-color, var(--t-carousel-pane-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));border-radius:var(--tct-carousel-pane-border-radius, var(--t-carousel-pane-border-radius, 8px));padding:var(--tct-carousel-pane-padding, var(--t-carousel-pane-padding, 0.5rem 0.5rem 0.5rem 0.5rem))}.insufficient-pane-feedback.content-peek-display{max-width:395px;margin:0 auto}.insufficient-pane-feedback .insufficient-panes-header,.insufficient-pane-feedback .insufficient-panes-body{text-align:center}.insufficient-pane-feedback .insufficient-panes-header strong{font-weight:600}.insufficient-pane-feedback .insufficient-panes-body{margin:0 auto 2rem auto;max-width:75%}.insufficient-pane-feedback .insufficient-panes-icon-wrapper{display:flex;justify-content:center;margin:1rem 0 2rem 0}.insufficient-pane-feedback .insufficient-panes-icon-wrapper q2-icon{width:38px}.q2-carousel-pagination-navigation-wrapper{display:flex;justify-content:center;align-items:center;margin-top:var(--app-scale-2x, 10px);min-height:44px}.q2-carousel-pagination-navigation-wrapper.evenly-space{justify-content:space-between}.q2-carousel-control-center-tray{display:flex;align-items:center}.q2-carousel-swiper-wrapper.compact{overflow:visible}.q2-carousel-swiper-wrapper.compact q2-btn{margin-top:4px}.q2-carousel-pagination{height:12px;display:flex;align-content:center;justify-content:center;gap:0.5rem}.q2-carousel-pagination .q2-carousel-page-indicator{display:inline-block;height:12px;width:12px;border-radius:50%;background-color:var(--tct-carousel-pagination-inactive-color, var(--t-carousel-pagination-inactive-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));padding:0;border:0;transition:all 0.5s;opacity:0.7}.q2-carousel-pagination .q2-carousel-page-indicator:hover{background-color:var(--tct-carousel-pagination-active-color, var(--t-carousel-pagination-active-color, var(--tct-primary, var(--t-primary, #006eb2))));opacity:1}.q2-carousel-pagination .q2-carousel-page-indicator.active-page{display:inline-block;background-color:var(--tct-carousel-pagination-active-color, var(--t-carousel-pagination-active-color, var(--tct-primary, var(--t-primary, #006eb2))))}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator{display:none}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent{display:inline-block;height:10px;width:10px}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent-adjacent{display:inline-block;height:8px;width:8px}.q2-carousel-swiper-container{}.q2-carousel-swiper-container .swiper-wrapper{position:relative;width:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.q2-carousel-swiper-container.content-peek-display .q2-carousel-pane:not(.swiper-slide-active){transform:scale(0.9)}.q2-carousel-swiper-container.full-width-display{--comp-container-padding:var(--app-scale-1x, 5px) var(--app-scale-2x, 10px) var(--app-scale-2x, 10px);padding:var(--tct-carousel-full-width-container-padding, var(--t-carousel-full-width-container-padding, var(--comp-container-padding, 5px 10px 10px)))}";
|
|
4906
5123
|
|
|
4907
5124
|
const carouselBreakpoint = 500; /* width in px of this host element where the layout starts to get unruly */
|
|
4908
5125
|
const Q2Carousel = class {
|
|
@@ -4936,10 +5153,10 @@ const Q2Carousel = class {
|
|
|
4936
5153
|
}
|
|
4937
5154
|
else if (isCarouselFocused)
|
|
4938
5155
|
swiper.slides[swiper.activeIndex].focus({
|
|
4939
|
-
preventScroll: true
|
|
5156
|
+
preventScroll: true,
|
|
4940
5157
|
});
|
|
4941
|
-
}
|
|
4942
|
-
}
|
|
5158
|
+
},
|
|
5159
|
+
},
|
|
4943
5160
|
};
|
|
4944
5161
|
this.fullWidthDisplayOptions = Object.assign({ slidesPerView: 1, spaceBetween: 100 }, this.universalCarouselOptions);
|
|
4945
5162
|
this.activePaneIndex = this.realIndex;
|
|
@@ -4980,7 +5197,7 @@ const Q2Carousel = class {
|
|
|
4980
5197
|
});
|
|
4981
5198
|
};
|
|
4982
5199
|
this.handleAutoPlayPause = () => {
|
|
4983
|
-
const { swiper: { autoplay } } = this;
|
|
5200
|
+
const { swiper: { autoplay }, } = this;
|
|
4984
5201
|
if (!autoplay)
|
|
4985
5202
|
return;
|
|
4986
5203
|
if (autoplay === null || autoplay === void 0 ? void 0 : autoplay.running)
|
|
@@ -5054,25 +5271,20 @@ const Q2Carousel = class {
|
|
|
5054
5271
|
if (this.dynamicPaginationDots)
|
|
5055
5272
|
paginationContainerClasses = [...paginationContainerClasses, 'dynamic'];
|
|
5056
5273
|
return (h("div", { class: paginationContainerClasses.join(' '), role: "tablist", "aria-label": loc('tecton.element.carousel.tabWrapperLabel') }, this.paneArray.map(pane => {
|
|
5057
|
-
let btnClasses = [
|
|
5058
|
-
'q2-carousel-page-indicator',
|
|
5059
|
-
`q2-carousel-page-indicator-${pane.index}`
|
|
5060
|
-
];
|
|
5274
|
+
let btnClasses = ['q2-carousel-page-indicator', `q2-carousel-page-indicator-${pane.index}`];
|
|
5061
5275
|
if (pane.isActivePane)
|
|
5062
5276
|
btnClasses = [...btnClasses, 'active-page'];
|
|
5063
5277
|
if (this.dynamicPaginationDots)
|
|
5064
5278
|
btnClasses = [...btnClasses, 'dynamic'];
|
|
5065
|
-
|
|
5066
|
-
pane.index === this.activePaneIndex - 1;
|
|
5279
|
+
const withinOneOfActive = pane.index === this.activePaneIndex + 1 || pane.index === this.activePaneIndex - 1;
|
|
5067
5280
|
if (withinOneOfActive)
|
|
5068
5281
|
btnClasses = [...btnClasses, 'active-adjacent'];
|
|
5069
|
-
|
|
5070
|
-
pane.index === this.activePaneIndex - 2;
|
|
5282
|
+
const withinTwoOfActive = pane.index === this.activePaneIndex + 2 || pane.index === this.activePaneIndex - 2;
|
|
5071
5283
|
if (withinTwoOfActive)
|
|
5072
5284
|
btnClasses = [...btnClasses, 'active-adjacent-adjacent'];
|
|
5073
5285
|
return (h("button", { type: "button", role: "tab", tabIndex: pane.isActivePane ? undefined : -1, "aria-selected": pane.isActivePane ? 'true' : 'false', class: btnClasses.join(' '), onClick: () => this.handleCarouselNavigationSelection(pane.index, true), onKeyDown: event => this.onPaginationKeyDown(event), "aria-label": loc('tecton.element.carousel.itemDescription', [
|
|
5074
5286
|
(pane.index + 1).toString(),
|
|
5075
|
-
this.paneCount.toString()
|
|
5287
|
+
this.paneCount.toString(),
|
|
5076
5288
|
]) }));
|
|
5077
5289
|
})));
|
|
5078
5290
|
};
|
|
@@ -5092,7 +5304,7 @@ const Q2Carousel = class {
|
|
|
5092
5304
|
this.insufficientPanesDisplay = () => {
|
|
5093
5305
|
let insufficientPanesContainerClasses = [
|
|
5094
5306
|
'insufficient-pane-feedback',
|
|
5095
|
-
this.fullWidthPanes ? 'full-width-display' : 'content-peek-display'
|
|
5307
|
+
this.fullWidthPanes ? 'full-width-display' : 'content-peek-display',
|
|
5096
5308
|
];
|
|
5097
5309
|
if (this.compactMode)
|
|
5098
5310
|
insufficientPanesContainerClasses = [...insufficientPanesContainerClasses, 'compact'];
|
|
@@ -5180,7 +5392,7 @@ const Q2Carousel = class {
|
|
|
5180
5392
|
let carouselContainerClasses = [
|
|
5181
5393
|
'q2-carousel-swiper-container',
|
|
5182
5394
|
'swiper-container',
|
|
5183
|
-
this.fullWidthPanes ? 'full-width-display' : 'content-peek-display'
|
|
5395
|
+
this.fullWidthPanes ? 'full-width-display' : 'content-peek-display',
|
|
5184
5396
|
];
|
|
5185
5397
|
if (this.compactMode)
|
|
5186
5398
|
carouselContainerClasses = [...carouselContainerClasses, 'compact'];
|