q2-tecton-elements 1.18.0 → 1.19.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 +1 -1
- package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-eccd5617.js → index-3518c78c.js} +1 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +30 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +102 -63
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +9 -7
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
- package/dist/cjs/q2-pill.cjs.entry.js +25 -7
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +44 -11
- package/dist/cjs/q2-select.cjs.entry.js +26 -17
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +20 -7
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +9 -3
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +349 -322
- package/dist/collection/components/q2-btn/styles.css +7 -7
- package/dist/collection/components/q2-calendar/index.js +578 -552
- package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +291 -270
- package/dist/collection/components/q2-option-list/styles.css +1 -1
- package/dist/collection/components/q2-pagination/index.js +183 -179
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +260 -208
- package/dist/collection/components/q2-pill/styles.css +1 -1
- package/dist/collection/components/q2-popover/index.js +169 -151
- package/dist/collection/components/q2-popover/styles.css +2 -2
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +169 -131
- package/dist/collection/components/q2-section/styles.css +8 -6
- package/dist/collection/components/q2-select/index.js +393 -381
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +168 -116
- package/dist/collection/components/q2-tag/styles.css +1 -1
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +147 -133
- package/dist/collection/components/q2-tooltip/styles.css +1 -1
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +2 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-eac6b89e.js → index-9c591682.js} +1 -1
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +30 -5
- package/dist/esm/q2-calendar.entry.js +102 -63
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +9 -7
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/q2-option-list_2.entry.js +21 -7
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +11 -3
- package/dist/esm/q2-pill.entry.js +25 -7
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +44 -11
- package/dist/esm/q2-select.entry.js +26 -17
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +20 -7
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +9 -3
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-74136b15.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f219fe9d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-pill/index.d.ts +3 -0
- package/dist/types/components/q2-section/index.d.ts +3 -0
- package/dist/types/components/q2-tag/index.d.ts +3 -0
- package/dist/types/components.d.ts +154 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/workspace/workspace/{Tecton_tecton-production_master → tecton-production_release_1.19.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
- package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2061c3fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2e54f9a0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
- package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
- package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
- package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f319549d.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-bb1c8c7f.js';
|
|
2
|
+
import { c as createGuid, l as loc, h as handleAriaLabel, i as isEventFromElement, o as overrideFocus } from './index-9c591682.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SSR Window 4.0.2
|
|
@@ -988,11 +988,7 @@ function deleteProps(obj) {
|
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
-
function nextTick(callback, delay) {
|
|
992
|
-
if (delay === void 0) {
|
|
993
|
-
delay = 0;
|
|
994
|
-
}
|
|
995
|
-
|
|
991
|
+
function nextTick(callback, delay = 0) {
|
|
996
992
|
return setTimeout(callback, delay);
|
|
997
993
|
}
|
|
998
994
|
|
|
@@ -1019,11 +1015,7 @@ function getComputedStyle$1(el) {
|
|
|
1019
1015
|
return style;
|
|
1020
1016
|
}
|
|
1021
1017
|
|
|
1022
|
-
function getTranslate(el, axis) {
|
|
1023
|
-
if (axis === void 0) {
|
|
1024
|
-
axis = 'x';
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1018
|
+
function getTranslate(el, axis = 'x') {
|
|
1027
1019
|
const window = getWindow();
|
|
1028
1020
|
let matrix;
|
|
1029
1021
|
let curTransform;
|
|
@@ -1075,12 +1067,12 @@ function isNode(node) {
|
|
|
1075
1067
|
return node && (node.nodeType === 1 || node.nodeType === 11);
|
|
1076
1068
|
}
|
|
1077
1069
|
|
|
1078
|
-
function extend() {
|
|
1079
|
-
const to = Object(
|
|
1070
|
+
function extend(...args) {
|
|
1071
|
+
const to = Object(args[0]);
|
|
1080
1072
|
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
|
1081
1073
|
|
|
1082
|
-
for (let i = 1; i <
|
|
1083
|
-
const nextSource =
|
|
1074
|
+
for (let i = 1; i < args.length; i += 1) {
|
|
1075
|
+
const nextSource = args[i];
|
|
1084
1076
|
|
|
1085
1077
|
if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {
|
|
1086
1078
|
const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);
|
|
@@ -1119,12 +1111,11 @@ function setCSSProperty(el, varName, varValue) {
|
|
|
1119
1111
|
el.style.setProperty(varName, varValue);
|
|
1120
1112
|
}
|
|
1121
1113
|
|
|
1122
|
-
function animateCSSModeScroll(
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
} = _ref;
|
|
1114
|
+
function animateCSSModeScroll({
|
|
1115
|
+
swiper,
|
|
1116
|
+
targetPosition,
|
|
1117
|
+
side
|
|
1118
|
+
}) {
|
|
1128
1119
|
const window = getWindow();
|
|
1129
1120
|
const startPosition = -swiper.translate;
|
|
1130
1121
|
let startTime = null;
|
|
@@ -1217,10 +1208,9 @@ function getSupport() {
|
|
|
1217
1208
|
|
|
1218
1209
|
let deviceCached;
|
|
1219
1210
|
|
|
1220
|
-
function calcDevice(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
} = _temp === void 0 ? {} : _temp;
|
|
1211
|
+
function calcDevice({
|
|
1212
|
+
userAgent
|
|
1213
|
+
} = {}) {
|
|
1224
1214
|
const support = getSupport();
|
|
1225
1215
|
const window = getWindow();
|
|
1226
1216
|
const platform = window.navigator.platform;
|
|
@@ -1262,11 +1252,7 @@ function calcDevice(_temp) {
|
|
|
1262
1252
|
return device;
|
|
1263
1253
|
}
|
|
1264
1254
|
|
|
1265
|
-
function getDevice(overrides) {
|
|
1266
|
-
if (overrides === void 0) {
|
|
1267
|
-
overrides = {};
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1255
|
+
function getDevice(overrides = {}) {
|
|
1270
1256
|
if (!deviceCached) {
|
|
1271
1257
|
deviceCached = calcDevice(overrides);
|
|
1272
1258
|
}
|
|
@@ -1298,12 +1284,11 @@ function getBrowser() {
|
|
|
1298
1284
|
return browser;
|
|
1299
1285
|
}
|
|
1300
1286
|
|
|
1301
|
-
function Resize(
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
} = _ref;
|
|
1287
|
+
function Resize({
|
|
1288
|
+
swiper,
|
|
1289
|
+
on,
|
|
1290
|
+
emit
|
|
1291
|
+
}) {
|
|
1307
1292
|
const window = getWindow();
|
|
1308
1293
|
let observer = null;
|
|
1309
1294
|
let animationFrame = null;
|
|
@@ -1324,12 +1309,11 @@ function Resize(_ref) {
|
|
|
1324
1309
|
} = swiper;
|
|
1325
1310
|
let newWidth = width;
|
|
1326
1311
|
let newHeight = height;
|
|
1327
|
-
entries.forEach(
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
} = _ref2;
|
|
1312
|
+
entries.forEach(({
|
|
1313
|
+
contentBoxSize,
|
|
1314
|
+
contentRect,
|
|
1315
|
+
target
|
|
1316
|
+
}) => {
|
|
1333
1317
|
if (target && target !== swiper.el) return;
|
|
1334
1318
|
newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
|
|
1335
1319
|
newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
|
|
@@ -1375,21 +1359,16 @@ function Resize(_ref) {
|
|
|
1375
1359
|
});
|
|
1376
1360
|
}
|
|
1377
1361
|
|
|
1378
|
-
function Observer(
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
} = _ref;
|
|
1362
|
+
function Observer({
|
|
1363
|
+
swiper,
|
|
1364
|
+
extendParams,
|
|
1365
|
+
on,
|
|
1366
|
+
emit
|
|
1367
|
+
}) {
|
|
1385
1368
|
const observers = [];
|
|
1386
1369
|
const window = getWindow();
|
|
1387
1370
|
|
|
1388
|
-
const attach =
|
|
1389
|
-
if (options === void 0) {
|
|
1390
|
-
options = {};
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1371
|
+
const attach = (target, options = {}) => {
|
|
1393
1372
|
const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
|
|
1394
1373
|
const observer = new ObserverFunc(mutations => {
|
|
1395
1374
|
// The observerUpdate event should only be triggered
|
|
@@ -1474,17 +1453,13 @@ const eventsEmitter = {
|
|
|
1474
1453
|
if (!self.eventsListeners || self.destroyed) return self;
|
|
1475
1454
|
if (typeof handler !== 'function') return self;
|
|
1476
1455
|
|
|
1477
|
-
function onceHandler() {
|
|
1456
|
+
function onceHandler(...args) {
|
|
1478
1457
|
self.off(events, onceHandler);
|
|
1479
1458
|
|
|
1480
1459
|
if (onceHandler.__emitterProxy) {
|
|
1481
1460
|
delete onceHandler.__emitterProxy;
|
|
1482
1461
|
}
|
|
1483
1462
|
|
|
1484
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1485
|
-
args[_key] = arguments[_key];
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
1463
|
handler.apply(self, args);
|
|
1489
1464
|
}
|
|
1490
1465
|
|
|
@@ -1536,7 +1511,7 @@ const eventsEmitter = {
|
|
|
1536
1511
|
return self;
|
|
1537
1512
|
},
|
|
1538
1513
|
|
|
1539
|
-
emit() {
|
|
1514
|
+
emit(...args) {
|
|
1540
1515
|
const self = this;
|
|
1541
1516
|
if (!self.eventsListeners || self.destroyed) return self;
|
|
1542
1517
|
if (!self.eventsListeners) return self;
|
|
@@ -1544,10 +1519,6 @@ const eventsEmitter = {
|
|
|
1544
1519
|
let data;
|
|
1545
1520
|
let context;
|
|
1546
1521
|
|
|
1547
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1548
|
-
args[_key2] = arguments[_key2];
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
1522
|
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
1552
1523
|
events = args[0];
|
|
1553
1524
|
data = args.slice(1, args.length);
|
|
@@ -1956,7 +1927,7 @@ function updateAutoHeight(speed) {
|
|
|
1956
1927
|
|
|
1957
1928
|
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
|
1958
1929
|
if (swiper.params.centeredSlides) {
|
|
1959
|
-
swiper.visibleSlides.each(slide => {
|
|
1930
|
+
(swiper.visibleSlides || $([])).each(slide => {
|
|
1960
1931
|
activeSlides.push(slide);
|
|
1961
1932
|
});
|
|
1962
1933
|
} else {
|
|
@@ -1991,11 +1962,7 @@ function updateSlidesOffset() {
|
|
|
1991
1962
|
}
|
|
1992
1963
|
}
|
|
1993
1964
|
|
|
1994
|
-
function updateSlidesProgress(translate) {
|
|
1995
|
-
if (translate === void 0) {
|
|
1996
|
-
translate = this && this.translate || 0;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1965
|
+
function updateSlidesProgress(translate = this && this.translate || 0) {
|
|
1999
1966
|
const swiper = this;
|
|
2000
1967
|
const params = swiper.params;
|
|
2001
1968
|
const {
|
|
@@ -2274,11 +2241,7 @@ const update = {
|
|
|
2274
2241
|
updateClickedSlide
|
|
2275
2242
|
};
|
|
2276
2243
|
|
|
2277
|
-
function getSwiperTranslate(axis) {
|
|
2278
|
-
if (axis === void 0) {
|
|
2279
|
-
axis = this.isHorizontal() ? 'x' : 'y';
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2244
|
+
function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {
|
|
2282
2245
|
const swiper = this;
|
|
2283
2246
|
const {
|
|
2284
2247
|
params,
|
|
@@ -2357,23 +2320,7 @@ function maxTranslate() {
|
|
|
2357
2320
|
return -this.snapGrid[this.snapGrid.length - 1];
|
|
2358
2321
|
}
|
|
2359
2322
|
|
|
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
|
-
|
|
2323
|
+
function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {
|
|
2377
2324
|
const swiper = this;
|
|
2378
2325
|
const {
|
|
2379
2326
|
params,
|
|
@@ -2476,13 +2423,12 @@ function setTransition(duration, byController) {
|
|
|
2476
2423
|
swiper.emit('setTransition', duration, byController);
|
|
2477
2424
|
}
|
|
2478
2425
|
|
|
2479
|
-
function transitionEmit(
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
} = _ref;
|
|
2426
|
+
function transitionEmit({
|
|
2427
|
+
swiper,
|
|
2428
|
+
runCallbacks,
|
|
2429
|
+
direction,
|
|
2430
|
+
step
|
|
2431
|
+
}) {
|
|
2486
2432
|
const {
|
|
2487
2433
|
activeIndex,
|
|
2488
2434
|
previousIndex
|
|
@@ -2511,11 +2457,7 @@ function transitionEmit(_ref) {
|
|
|
2511
2457
|
}
|
|
2512
2458
|
}
|
|
2513
2459
|
|
|
2514
|
-
function transitionStart(runCallbacks, direction) {
|
|
2515
|
-
if (runCallbacks === void 0) {
|
|
2516
|
-
runCallbacks = true;
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2460
|
+
function transitionStart(runCallbacks = true, direction) {
|
|
2519
2461
|
const swiper = this;
|
|
2520
2462
|
const {
|
|
2521
2463
|
params
|
|
@@ -2534,11 +2476,7 @@ function transitionStart(runCallbacks, direction) {
|
|
|
2534
2476
|
});
|
|
2535
2477
|
}
|
|
2536
2478
|
|
|
2537
|
-
function transitionEnd(runCallbacks, direction) {
|
|
2538
|
-
if (runCallbacks === void 0) {
|
|
2539
|
-
runCallbacks = true;
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2479
|
+
function transitionEnd(runCallbacks = true, direction) {
|
|
2542
2480
|
const swiper = this;
|
|
2543
2481
|
const {
|
|
2544
2482
|
params
|
|
@@ -2560,19 +2498,7 @@ const transition = {
|
|
|
2560
2498
|
transitionEnd
|
|
2561
2499
|
};
|
|
2562
2500
|
|
|
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
|
-
|
|
2501
|
+
function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {
|
|
2576
2502
|
if (typeof index !== 'number' && typeof index !== 'string') {
|
|
2577
2503
|
throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);
|
|
2578
2504
|
}
|
|
@@ -2621,14 +2547,7 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
2621
2547
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
|
2622
2548
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
|
2623
2549
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
|
2624
|
-
|
|
2625
|
-
if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
|
|
2626
|
-
swiper.emit('beforeSlideChangeStart');
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
const translate = -snapGrid[snapIndex]; // Update progress
|
|
2630
|
-
|
|
2631
|
-
swiper.updateProgress(translate); // Normalize slideIndex
|
|
2550
|
+
const translate = -snapGrid[snapIndex]; // Normalize slideIndex
|
|
2632
2551
|
|
|
2633
2552
|
if (params.normalizeSlideIndex) {
|
|
2634
2553
|
for (let i = 0; i < slidesGrid.length; i += 1) {
|
|
@@ -2659,6 +2578,12 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
2659
2578
|
}
|
|
2660
2579
|
}
|
|
2661
2580
|
|
|
2581
|
+
if (slideIndex !== (previousIndex || 0) && runCallbacks) {
|
|
2582
|
+
swiper.emit('beforeSlideChangeStart');
|
|
2583
|
+
} // Update progress
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
swiper.updateProgress(translate);
|
|
2662
2587
|
let direction;
|
|
2663
2588
|
if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index
|
|
2664
2589
|
|
|
@@ -2753,17 +2678,28 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
2753
2678
|
return true;
|
|
2754
2679
|
}
|
|
2755
2680
|
|
|
2756
|
-
function slideToLoop(index, speed, runCallbacks, internal) {
|
|
2757
|
-
if (index ===
|
|
2758
|
-
|
|
2759
|
-
|
|
2681
|
+
function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
|
2682
|
+
if (typeof index === 'string') {
|
|
2683
|
+
/**
|
|
2684
|
+
* The `index` argument converted from `string` to `number`.
|
|
2685
|
+
* @type {number}
|
|
2686
|
+
*/
|
|
2687
|
+
const indexAsNumber = parseInt(index, 10);
|
|
2688
|
+
/**
|
|
2689
|
+
* Determines whether the `index` argument is a valid `number`
|
|
2690
|
+
* after being converted from the `string` type.
|
|
2691
|
+
* @type {boolean}
|
|
2692
|
+
*/
|
|
2760
2693
|
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2694
|
+
const isValidNumber = isFinite(indexAsNumber);
|
|
2695
|
+
|
|
2696
|
+
if (!isValidNumber) {
|
|
2697
|
+
throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);
|
|
2698
|
+
} // Knowing that the converted `index` is a valid number,
|
|
2699
|
+
// we can update the original argument's value.
|
|
2764
2700
|
|
|
2765
|
-
|
|
2766
|
-
|
|
2701
|
+
|
|
2702
|
+
index = indexAsNumber;
|
|
2767
2703
|
}
|
|
2768
2704
|
|
|
2769
2705
|
const swiper = this;
|
|
@@ -2777,15 +2713,7 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
2777
2713
|
}
|
|
2778
2714
|
|
|
2779
2715
|
/* eslint no-unused-vars: "off" */
|
|
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
|
-
|
|
2716
|
+
function slideNext(speed = this.params.speed, runCallbacks = true, internal) {
|
|
2789
2717
|
const swiper = this;
|
|
2790
2718
|
const {
|
|
2791
2719
|
animating,
|
|
@@ -2816,15 +2744,7 @@ function slideNext(speed, runCallbacks, internal) {
|
|
|
2816
2744
|
}
|
|
2817
2745
|
|
|
2818
2746
|
/* eslint no-unused-vars: "off" */
|
|
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
|
-
|
|
2747
|
+
function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {
|
|
2828
2748
|
const swiper = this;
|
|
2829
2749
|
const {
|
|
2830
2750
|
params,
|
|
@@ -2889,33 +2809,13 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
|
2889
2809
|
}
|
|
2890
2810
|
|
|
2891
2811
|
/* eslint no-unused-vars: "off" */
|
|
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
|
-
|
|
2812
|
+
function slideReset(speed = this.params.speed, runCallbacks = true, internal) {
|
|
2901
2813
|
const swiper = this;
|
|
2902
2814
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
|
2903
2815
|
}
|
|
2904
2816
|
|
|
2905
2817
|
/* eslint no-unused-vars: "off" */
|
|
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
|
-
|
|
2818
|
+
function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {
|
|
2919
2819
|
const swiper = this;
|
|
2920
2820
|
let index = swiper.activeIndex;
|
|
2921
2821
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
|
@@ -3024,7 +2924,7 @@ function loopCreate() {
|
|
|
3024
2924
|
swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));
|
|
3025
2925
|
swiper.loopedSlides += params.loopAdditionalSlides;
|
|
3026
2926
|
|
|
3027
|
-
if (swiper.loopedSlides > slides.length) {
|
|
2927
|
+
if (swiper.loopedSlides > slides.length && swiper.params.loopedSlidesLimit) {
|
|
3028
2928
|
swiper.loopedSlides = slides.length;
|
|
3029
2929
|
}
|
|
3030
2930
|
|
|
@@ -3032,18 +2932,15 @@ function loopCreate() {
|
|
|
3032
2932
|
const appendSlides = [];
|
|
3033
2933
|
slides.each((el, index) => {
|
|
3034
2934
|
const slide = $(el);
|
|
3035
|
-
|
|
3036
|
-
if (index < swiper.loopedSlides) {
|
|
3037
|
-
appendSlides.push(el);
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
if (index < slides.length && index >= slides.length - swiper.loopedSlides) {
|
|
3041
|
-
prependSlides.push(el);
|
|
3042
|
-
}
|
|
3043
|
-
|
|
3044
2935
|
slide.attr('data-swiper-slide-index', index);
|
|
3045
2936
|
});
|
|
3046
2937
|
|
|
2938
|
+
for (let i = 0; i < swiper.loopedSlides; i += 1) {
|
|
2939
|
+
const index = i - Math.floor(i / slides.length) * slides.length;
|
|
2940
|
+
appendSlides.push(slides.eq(index)[0]);
|
|
2941
|
+
prependSlides.unshift(slides.eq(slides.length - index - 1)[0]);
|
|
2942
|
+
}
|
|
2943
|
+
|
|
3047
2944
|
for (let i = 0; i < appendSlides.length; i += 1) {
|
|
3048
2945
|
$selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
|
|
3049
2946
|
}
|
|
@@ -3135,15 +3032,16 @@ const grabCursor = {
|
|
|
3135
3032
|
unsetGrabCursor
|
|
3136
3033
|
};
|
|
3137
3034
|
|
|
3138
|
-
function closestElement(selector, base) {
|
|
3139
|
-
if (base === void 0) {
|
|
3140
|
-
base = this;
|
|
3141
|
-
}
|
|
3142
|
-
|
|
3035
|
+
function closestElement(selector, base = this) {
|
|
3143
3036
|
function __closestFrom(el) {
|
|
3144
3037
|
if (!el || el === getDocument() || el === getWindow()) return null;
|
|
3145
3038
|
if (el.assignedSlot) el = el.assignedSlot;
|
|
3146
3039
|
const found = el.closest(selector);
|
|
3040
|
+
|
|
3041
|
+
if (!found && !el.getRootNode) {
|
|
3042
|
+
return null;
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3147
3045
|
return found || __closestFrom(el.getRootNode().host);
|
|
3148
3046
|
}
|
|
3149
3047
|
|
|
@@ -3183,16 +3081,18 @@ function onTouchStart(event) {
|
|
|
3183
3081
|
if (!data.isTouchEvent && 'button' in e && e.button > 0) return;
|
|
3184
3082
|
if (data.isTouched && data.isMoved) return; // change target el for shadow root component
|
|
3185
3083
|
|
|
3186
|
-
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
|
|
3084
|
+
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; // eslint-disable-next-line
|
|
3187
3085
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3086
|
+
const eventPath = event.composedPath ? event.composedPath() : event.path;
|
|
3087
|
+
|
|
3088
|
+
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
|
|
3089
|
+
$targetEl = $(eventPath[0]);
|
|
3190
3090
|
}
|
|
3191
3091
|
|
|
3192
3092
|
const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
|
|
3193
3093
|
const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
3194
3094
|
|
|
3195
|
-
if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector,
|
|
3095
|
+
if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, $targetEl[0]) : $targetEl.closest(noSwipingSelector)[0])) {
|
|
3196
3096
|
swiper.allowClick = true;
|
|
3197
3097
|
return;
|
|
3198
3098
|
}
|
|
@@ -3863,8 +3763,21 @@ function setBreakpoint() {
|
|
|
3863
3763
|
}
|
|
3864
3764
|
|
|
3865
3765
|
swiper.emitContainerClasses();
|
|
3866
|
-
}
|
|
3766
|
+
} // Toggle navigation, pagination, scrollbar
|
|
3767
|
+
|
|
3768
|
+
|
|
3769
|
+
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
|
3770
|
+
const wasModuleEnabled = params[prop] && params[prop].enabled;
|
|
3771
|
+
const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
|
|
3772
|
+
|
|
3773
|
+
if (wasModuleEnabled && !isModuleEnabled) {
|
|
3774
|
+
swiper[prop].disable();
|
|
3775
|
+
}
|
|
3867
3776
|
|
|
3777
|
+
if (!wasModuleEnabled && isModuleEnabled) {
|
|
3778
|
+
swiper[prop].enable();
|
|
3779
|
+
}
|
|
3780
|
+
});
|
|
3868
3781
|
const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
|
|
3869
3782
|
const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
|
|
3870
3783
|
|
|
@@ -3899,11 +3812,7 @@ function setBreakpoint() {
|
|
|
3899
3812
|
swiper.emit('breakpoint', breakpointParams);
|
|
3900
3813
|
}
|
|
3901
3814
|
|
|
3902
|
-
function getBreakpoint(breakpoints, base, containerEl) {
|
|
3903
|
-
if (base === void 0) {
|
|
3904
|
-
base = 'window';
|
|
3905
|
-
}
|
|
3906
|
-
|
|
3815
|
+
function getBreakpoint(breakpoints, base = 'window', containerEl) {
|
|
3907
3816
|
if (!breakpoints || base === 'container' && !containerEl) return undefined;
|
|
3908
3817
|
let breakpoint = false;
|
|
3909
3818
|
const window = getWindow();
|
|
@@ -4207,6 +4116,7 @@ const defaults = {
|
|
|
4207
4116
|
loop: false,
|
|
4208
4117
|
loopAdditionalSlides: 0,
|
|
4209
4118
|
loopedSlides: null,
|
|
4119
|
+
loopedSlidesLimit: true,
|
|
4210
4120
|
loopFillGroupWithBlank: false,
|
|
4211
4121
|
loopPreventsSlide: true,
|
|
4212
4122
|
// rewind
|
|
@@ -4243,11 +4153,7 @@ const defaults = {
|
|
|
4243
4153
|
};
|
|
4244
4154
|
|
|
4245
4155
|
function moduleExtendParams(params, allModulesParams) {
|
|
4246
|
-
return function extendParams(obj) {
|
|
4247
|
-
if (obj === void 0) {
|
|
4248
|
-
obj = {};
|
|
4249
|
-
}
|
|
4250
|
-
|
|
4156
|
+
return function extendParams(obj = {}) {
|
|
4251
4157
|
const moduleParamName = Object.keys(obj)[0];
|
|
4252
4158
|
const moduleParams = obj[moduleParamName];
|
|
4253
4159
|
|
|
@@ -4302,14 +4208,10 @@ const prototypes = {
|
|
|
4302
4208
|
const extendedDefaults = {};
|
|
4303
4209
|
|
|
4304
4210
|
class Swiper {
|
|
4305
|
-
constructor() {
|
|
4211
|
+
constructor(...args) {
|
|
4306
4212
|
let el;
|
|
4307
4213
|
let params;
|
|
4308
4214
|
|
|
4309
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4310
|
-
args[_key] = arguments[_key];
|
|
4311
|
-
}
|
|
4312
|
-
|
|
4313
4215
|
if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {
|
|
4314
4216
|
params = args[0];
|
|
4315
4217
|
} else {
|
|
@@ -4327,7 +4229,8 @@ class Swiper {
|
|
|
4327
4229
|
el: containerEl
|
|
4328
4230
|
});
|
|
4329
4231
|
swipers.push(new Swiper(newParams));
|
|
4330
|
-
});
|
|
4232
|
+
}); // eslint-disable-next-line no-constructor-return
|
|
4233
|
+
|
|
4331
4234
|
return swipers;
|
|
4332
4235
|
} // Swiper Instance
|
|
4333
4236
|
|
|
@@ -4470,6 +4373,7 @@ class Swiper {
|
|
|
4470
4373
|
if (swiper.params.init) {
|
|
4471
4374
|
swiper.init();
|
|
4472
4375
|
} // Return app instance
|
|
4376
|
+
// eslint-disable-next-line no-constructor-return
|
|
4473
4377
|
|
|
4474
4378
|
|
|
4475
4379
|
return swiper;
|
|
@@ -4542,15 +4446,7 @@ class Swiper {
|
|
|
4542
4446
|
swiper.emit('_slideClasses', updates);
|
|
4543
4447
|
}
|
|
4544
4448
|
|
|
4545
|
-
slidesPerViewDynamic(view, exact) {
|
|
4546
|
-
if (view === void 0) {
|
|
4547
|
-
view = 'current';
|
|
4548
|
-
}
|
|
4549
|
-
|
|
4550
|
-
if (exact === void 0) {
|
|
4551
|
-
exact = false;
|
|
4552
|
-
}
|
|
4553
|
-
|
|
4449
|
+
slidesPerViewDynamic(view = 'current', exact = false) {
|
|
4554
4450
|
const swiper = this;
|
|
4555
4451
|
const {
|
|
4556
4452
|
params,
|
|
@@ -4658,11 +4554,7 @@ class Swiper {
|
|
|
4658
4554
|
swiper.emit('update');
|
|
4659
4555
|
}
|
|
4660
4556
|
|
|
4661
|
-
changeDirection(newDirection, needUpdate) {
|
|
4662
|
-
if (needUpdate === void 0) {
|
|
4663
|
-
needUpdate = true;
|
|
4664
|
-
}
|
|
4665
|
-
|
|
4557
|
+
changeDirection(newDirection, needUpdate = true) {
|
|
4666
4558
|
const swiper = this;
|
|
4667
4559
|
const currentDirection = swiper.params.direction;
|
|
4668
4560
|
|
|
@@ -4690,6 +4582,23 @@ class Swiper {
|
|
|
4690
4582
|
return swiper;
|
|
4691
4583
|
}
|
|
4692
4584
|
|
|
4585
|
+
changeLanguageDirection(direction) {
|
|
4586
|
+
const swiper = this;
|
|
4587
|
+
if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;
|
|
4588
|
+
swiper.rtl = direction === 'rtl';
|
|
4589
|
+
swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;
|
|
4590
|
+
|
|
4591
|
+
if (swiper.rtl) {
|
|
4592
|
+
swiper.$el.addClass(`${swiper.params.containerModifierClass}rtl`);
|
|
4593
|
+
swiper.el.dir = 'rtl';
|
|
4594
|
+
} else {
|
|
4595
|
+
swiper.$el.removeClass(`${swiper.params.containerModifierClass}rtl`);
|
|
4596
|
+
swiper.el.dir = 'ltr';
|
|
4597
|
+
}
|
|
4598
|
+
|
|
4599
|
+
swiper.update();
|
|
4600
|
+
}
|
|
4601
|
+
|
|
4693
4602
|
mount(el) {
|
|
4694
4603
|
const swiper = this;
|
|
4695
4604
|
if (swiper.mounted) return true; // Find el
|
|
@@ -4716,6 +4625,10 @@ class Swiper {
|
|
|
4716
4625
|
return res;
|
|
4717
4626
|
}
|
|
4718
4627
|
|
|
4628
|
+
if (!$el.children) {
|
|
4629
|
+
return $($el).children(getWrapperSelector());
|
|
4630
|
+
}
|
|
4631
|
+
|
|
4719
4632
|
return $el.children(getWrapperSelector());
|
|
4720
4633
|
}; // Find Wrapper
|
|
4721
4634
|
|
|
@@ -4800,15 +4713,7 @@ class Swiper {
|
|
|
4800
4713
|
return swiper;
|
|
4801
4714
|
}
|
|
4802
4715
|
|
|
4803
|
-
destroy(deleteInstance, cleanStyles) {
|
|
4804
|
-
if (deleteInstance === void 0) {
|
|
4805
|
-
deleteInstance = true;
|
|
4806
|
-
}
|
|
4807
|
-
|
|
4808
|
-
if (cleanStyles === void 0) {
|
|
4809
|
-
cleanStyles = true;
|
|
4810
|
-
}
|
|
4811
|
-
|
|
4716
|
+
destroy(deleteInstance = true, cleanStyles = true) {
|
|
4812
4717
|
const swiper = this;
|
|
4813
4718
|
const {
|
|
4814
4719
|
params,
|
|
@@ -4898,13 +4803,12 @@ Object.keys(prototypes).forEach(prototypeGroup => {
|
|
|
4898
4803
|
Swiper.use([Resize, Observer]);
|
|
4899
4804
|
|
|
4900
4805
|
/* eslint no-underscore-dangle: "off" */
|
|
4901
|
-
function Autoplay(
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
} = _ref;
|
|
4806
|
+
function Autoplay({
|
|
4807
|
+
swiper,
|
|
4808
|
+
extendParams,
|
|
4809
|
+
on,
|
|
4810
|
+
emit
|
|
4811
|
+
}) {
|
|
4908
4812
|
let timeout;
|
|
4909
4813
|
swiper.autoplay = {
|
|
4910
4814
|
running: false,
|
|
@@ -4923,6 +4827,12 @@ function Autoplay(_ref) {
|
|
|
4923
4827
|
});
|
|
4924
4828
|
|
|
4925
4829
|
function run() {
|
|
4830
|
+
if (!swiper.size) {
|
|
4831
|
+
swiper.autoplay.running = false;
|
|
4832
|
+
swiper.autoplay.paused = false;
|
|
4833
|
+
return;
|
|
4834
|
+
}
|
|
4835
|
+
|
|
4926
4836
|
const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
|
|
4927
4837
|
let delay = swiper.params.autoplay.delay;
|
|
4928
4838
|
|
|
@@ -5119,7 +5029,7 @@ function Autoplay(_ref) {
|
|
|
5119
5029
|
});
|
|
5120
5030
|
}
|
|
5121
5031
|
|
|
5122
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
5032
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch: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)))}";
|
|
5123
5033
|
|
|
5124
5034
|
const carouselBreakpoint = 500; /* width in px of this host element where the layout starts to get unruly */
|
|
5125
5035
|
const Q2Carousel = class {
|
|
@@ -5127,44 +5037,6 @@ const Q2Carousel = class {
|
|
|
5127
5037
|
registerInstance(this, hostRef);
|
|
5128
5038
|
this.change = createEvent(this, "change", 7);
|
|
5129
5039
|
this.swiper = null;
|
|
5130
|
-
this.autoPlay = false;
|
|
5131
|
-
this.fullWidthPanes = false;
|
|
5132
|
-
this.hidePagination = false;
|
|
5133
|
-
this.showNavigationArrows = false;
|
|
5134
|
-
this.label = 'tecton.element.carousel.ariaLabel';
|
|
5135
|
-
this.index = 1;
|
|
5136
|
-
this.universalCarouselOptions = {
|
|
5137
|
-
centeredSlides: true,
|
|
5138
|
-
focusableElements: 'q2-btn, a, input, select, textarea, button, video, label, option',
|
|
5139
|
-
autoplay: this.autoPlay,
|
|
5140
|
-
modules: [Autoplay],
|
|
5141
|
-
on: {
|
|
5142
|
-
slideChange: () => {
|
|
5143
|
-
var _a, _b;
|
|
5144
|
-
this.handleSlideChange((_b = (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.activeIndex) !== null && _b !== void 0 ? _b : 0); // lazy-load causing this.swiper is null only on ios safari
|
|
5145
|
-
},
|
|
5146
|
-
activeIndexChange: swiper => {
|
|
5147
|
-
this.activePaneIndex = swiper.activeIndex;
|
|
5148
|
-
this.organizePanes();
|
|
5149
|
-
const isPaginationFocused = document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`);
|
|
5150
|
-
const isCarouselFocused = document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`);
|
|
5151
|
-
if (isPaginationFocused) {
|
|
5152
|
-
this.paginationBtns[swiper.activeIndex].focus({ preventScroll: true });
|
|
5153
|
-
}
|
|
5154
|
-
else if (isCarouselFocused)
|
|
5155
|
-
swiper.slides[swiper.activeIndex].focus({
|
|
5156
|
-
preventScroll: true,
|
|
5157
|
-
});
|
|
5158
|
-
},
|
|
5159
|
-
},
|
|
5160
|
-
};
|
|
5161
|
-
this.fullWidthDisplayOptions = Object.assign({ slidesPerView: 1, spaceBetween: 100 }, this.universalCarouselOptions);
|
|
5162
|
-
this.activePaneIndex = this.realIndex;
|
|
5163
|
-
this.applyFocus = false;
|
|
5164
|
-
this.applyPaginationFocus = false;
|
|
5165
|
-
this.autoPlayInProgress = false;
|
|
5166
|
-
this.compactMode = false;
|
|
5167
|
-
this.carouselWrapperWidth = 0;
|
|
5168
5040
|
// COMPUTED //
|
|
5169
5041
|
this.guid = createGuid();
|
|
5170
5042
|
// METHODS //
|
|
@@ -5310,6 +5182,45 @@ const Q2Carousel = class {
|
|
|
5310
5182
|
insufficientPanesContainerClasses = [...insufficientPanesContainerClasses, 'compact'];
|
|
5311
5183
|
return (h("div", { class: insufficientPanesContainerClasses.join(' ') }, h("div", { class: "insufficient-panes-icon-wrapper" }, h("q2-icon", { type: "warning" })), h("p", { class: "insufficient-panes-header" }, h("strong", null, loc('tecton.element.carousel.insufficientPanesMessageHeader'))), h("p", { class: "insufficient-panes-body" }, loc('tecton.element.carousel.insufficientPanesMessageBody'))));
|
|
5312
5184
|
};
|
|
5185
|
+
this.autoPlay = false;
|
|
5186
|
+
this.fullWidthPanes = false;
|
|
5187
|
+
this.hidePagination = false;
|
|
5188
|
+
this.showNavigationArrows = false;
|
|
5189
|
+
this.ariaLabel = undefined;
|
|
5190
|
+
this.label = 'tecton.element.carousel.ariaLabel';
|
|
5191
|
+
this.index = 1;
|
|
5192
|
+
this.universalCarouselOptions = {
|
|
5193
|
+
centeredSlides: true,
|
|
5194
|
+
focusableElements: 'q2-btn, a, input, select, textarea, button, video, label, option',
|
|
5195
|
+
autoplay: this.autoPlay,
|
|
5196
|
+
modules: [Autoplay],
|
|
5197
|
+
on: {
|
|
5198
|
+
slideChange: () => {
|
|
5199
|
+
var _a, _b;
|
|
5200
|
+
this.handleSlideChange((_b = (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.activeIndex) !== null && _b !== void 0 ? _b : 0); // lazy-load causing this.swiper is null only on ios safari
|
|
5201
|
+
},
|
|
5202
|
+
activeIndexChange: swiper => {
|
|
5203
|
+
this.activePaneIndex = swiper.activeIndex;
|
|
5204
|
+
this.organizePanes();
|
|
5205
|
+
const isPaginationFocused = document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`);
|
|
5206
|
+
const isCarouselFocused = document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`);
|
|
5207
|
+
if (isPaginationFocused) {
|
|
5208
|
+
this.paginationBtns[swiper.activeIndex].focus({ preventScroll: true });
|
|
5209
|
+
}
|
|
5210
|
+
else if (isCarouselFocused)
|
|
5211
|
+
swiper.slides[swiper.activeIndex].focus({
|
|
5212
|
+
preventScroll: true,
|
|
5213
|
+
});
|
|
5214
|
+
},
|
|
5215
|
+
},
|
|
5216
|
+
};
|
|
5217
|
+
this.fullWidthDisplayOptions = Object.assign({ slidesPerView: 1, spaceBetween: 100 }, this.universalCarouselOptions);
|
|
5218
|
+
this.activePaneIndex = this.realIndex;
|
|
5219
|
+
this.applyFocus = false;
|
|
5220
|
+
this.applyPaginationFocus = false;
|
|
5221
|
+
this.autoPlayInProgress = false;
|
|
5222
|
+
this.compactMode = false;
|
|
5223
|
+
this.carouselWrapperWidth = 0;
|
|
5313
5224
|
}
|
|
5314
5225
|
ariaLabelObserver() {
|
|
5315
5226
|
handleAriaLabel(this);
|