@baloise/ds-core 17.2.2 → 17.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/array.js +1 -1856
- package/components/bal-app.js +1 -1
- package/components/bal-carousel-item.js +5 -5
- package/components/bal-carousel.js +5 -10
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-footer.js +44 -41
- package/components/bal-stage-image.js +4 -4
- package/components/bal-tabs2.js +3 -2
- package/components/index.js +1 -1
- package/components/index4.js +1642 -342
- package/components/index5.js +558 -0
- package/components/swiper.util.js +25 -5
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-d42f0351.system.js → p-0400a0cd.system.js} +1 -1
- package/dist/baloise-design-system/{p-04ecae6997.system.entry.js → p-0c28f0a46f.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-0e323fe0.system.js +1 -1
- package/dist/baloise-design-system/{p-3928dcab54.entry.js → p-18ce5177f9.entry.js} +1 -1
- package/dist/baloise-design-system/p-288461e687.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-699a918f.js → p-2abbd888.js} +1 -1
- package/dist/baloise-design-system/p-349d1c26c6.entry.js +1 -0
- package/dist/baloise-design-system/{p-29b008f003.entry.js → p-37f892f6dc.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7d1e18d645.system.entry.js → p-39dba60e75.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-589e41e466.entry.js → p-46b7cb48d1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-aa26b71b.system.js → p-47d7e166.system.js} +1 -1
- package/dist/baloise-design-system/{p-83ccf6e2e2.system.entry.js → p-47de946676.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3a93f5710e.system.entry.js → p-498c20ac2a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d12639bf.js → p-54ce8c3c.js} +1 -1
- package/dist/baloise-design-system/p-5622c208.system.js +1 -0
- package/dist/baloise-design-system/{p-71a30669ba.system.entry.js → p-657a3eb3ee.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-70f7b546.system.js +1 -1
- package/dist/baloise-design-system/p-73bec757.js +1 -0
- package/dist/baloise-design-system/{p-99a5ad67c2.entry.js → p-78ba217818.entry.js} +1 -1
- package/dist/baloise-design-system/{p-35115c32f2.system.entry.js → p-7b6c84c359.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3921f381.system.js → p-7cb2ead5.system.js} +1 -1
- package/dist/baloise-design-system/{p-48bb3dae67.system.entry.js → p-85479ae3cf.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fbb3f0576d.system.entry.js → p-87b8b65bf6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bcf4265372.system.entry.js → p-953cc30ae9.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-96122c3e5b.entry.js +1 -0
- package/dist/baloise-design-system/p-9ad648deea.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3ab7fdddee.entry.js → p-af0f549439.entry.js} +1 -1
- package/dist/baloise-design-system/{p-251565c4.js → p-b0a4d40a.js} +1 -1
- package/dist/baloise-design-system/p-b3e4339305.entry.js +1 -0
- package/dist/baloise-design-system/{p-1b281c808f.entry.js → p-ba4c1ed8a8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-08b52f4a0b.system.entry.js → p-bcbc8278e2.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-c0e04c2072.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-5071d817.system.js → p-c13b1376.system.js} +1 -1
- package/dist/baloise-design-system/{p-552a2c2dbe.entry.js → p-c3877f26cd.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9bba4874f6.entry.js → p-d0e23ec9f1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fea450f617.entry.js → p-dbc7c601d3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-379b877373.entry.js → p-dc6d33fc89.entry.js} +1 -1
- package/dist/baloise-design-system/p-e53217f8.js +1 -1
- package/dist/baloise-design-system/{p-b0cdf73dcc.system.entry.js → p-ef436fd645.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8805022d10.entry.js → p-f67047f5ce.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e393d63f5a.system.entry.js → p-f7cbcbdbfa.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f7f06d0340.entry.js +1 -0
- package/dist/cjs/bal-app.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +17 -20
- package/dist/cjs/bal-footer.cjs.entry.js +37 -10
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +3 -3
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +7 -6
- package/dist/cjs/baloise-design-system.cjs.js +1 -1
- package/dist/cjs/{breakpoints.decorator-fb08c6d2.js → breakpoints.decorator-e22cc15e.js} +1 -1
- package/dist/cjs/{breakpoints.subject-0db232c6.js → breakpoints.subject-5f803b3c.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-367b85e5.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{swiper.util-2c1a9dd3.js → swiper.util-abdf50f1.js} +25 -5
- package/dist/cjs/{tokens.esm-5afdc559.js → tokens.esm-e91514ff.js} +1 -1
- package/dist/cjs/{window-resize.decorator-46199538.js → window-resize.decorator-17c9b489.js} +1 -1
- package/dist/collection/components/bal-app/bal-app.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel-item/bal-carousel-item.js +5 -5
- package/dist/collection/components/bal-carousel/bal-carousel.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +4 -9
- package/dist/collection/components/bal-footer/bal-footer.css +1 -1
- package/dist/collection/components/bal-footer/bal-footer.i18n.js +32 -0
- package/dist/collection/components/bal-footer/bal-footer.js +4 -9
- package/dist/collection/components/bal-stage/bal-stage-image/bal-stage-image.js +4 -4
- package/dist/collection/components/bal-tabs/bal-tabs.js +3 -2
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/swiper/swiper.util.js +25 -5
- package/dist/esm/bal-app.entry.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +17 -20
- package/dist/esm/bal-footer.entry.js +37 -10
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +3 -3
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +7 -6
- package/dist/esm/baloise-design-system.js +1 -1
- package/dist/esm/{breakpoints.decorator-ba81f8bc.js → breakpoints.decorator-01f6809e.js} +1 -1
- package/dist/esm/{breakpoints.subject-fe3d9635.js → breakpoints.subject-cc740608.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-22c1bebc.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{swiper.util-3e090584.js → swiper.util-0589b550.js} +25 -5
- package/dist/esm/{tokens.esm-7af7e766.js → tokens.esm-ddf14bd4.js} +1 -1
- package/dist/esm/{window-resize.decorator-e4edf10d.js → window-resize.decorator-b9d3c86c.js} +1 -1
- package/dist/esm-es5/bal-app.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-stage_6.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-01f6809e.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-fe3d9635.js → breakpoints.subject-cc740608.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-22c1bebc.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/swiper.util-0589b550.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-e4edf10d.js → window-resize.decorator-b9d3c86c.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel-item/bal-carousel-item.d.ts +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +1 -2
- package/dist/types/components/bal-footer/bal-footer.d.ts +0 -1
- package/dist/types/components/bal-footer/bal-footer.i18n.d.ts +5 -0
- package/dist/types/components/bal-stage/bal-stage-image/bal-stage-image.d.ts +1 -1
- package/dist/types/utils/swiper/swiper.util.d.ts +2 -1
- package/package.json +7 -7
- package/dist/baloise-design-system/p-05986dc964.entry.js +0 -1
- package/dist/baloise-design-system/p-1050501432.entry.js +0 -1
- package/dist/baloise-design-system/p-26ee09df4f.entry.js +0 -1
- package/dist/baloise-design-system/p-2ee0b73b2a.system.entry.js +0 -1
- package/dist/baloise-design-system/p-345ec2f4.system.js +0 -1
- package/dist/baloise-design-system/p-4d67c12e48.system.entry.js +0 -1
- package/dist/baloise-design-system/p-68e05bd5.js +0 -1
- package/dist/baloise-design-system/p-b7f9f79521.system.entry.js +0 -1
- package/dist/baloise-design-system/p-bfde7642ba.entry.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-ba81f8bc.js +0 -1
- package/dist/esm-es5/swiper.util-3e090584.js +0 -1
- /package/dist/baloise-design-system/{p-c69b8ae2.js → p-1837eab3.js} +0 -0
- /package/dist/baloise-design-system/{p-376e5378.system.js → p-c9bb496a.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-7af7e766.js → tokens.esm-ddf14bd4.js} +0 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { c as commonjsGlobal } from './_commonjsHelpers.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
5
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
6
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
7
|
+
* Released under MIT license <https://lodash.com/license>
|
|
8
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
9
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Used as references for various `Number` constants. */
|
|
13
|
+
var INFINITY = 1 / 0,
|
|
14
|
+
MAX_SAFE_INTEGER = 9007199254740991,
|
|
15
|
+
MAX_INTEGER = 1.7976931348623157e+308,
|
|
16
|
+
NAN = 0 / 0;
|
|
17
|
+
|
|
18
|
+
/** `Object#toString` result references. */
|
|
19
|
+
var symbolTag = '[object Symbol]';
|
|
20
|
+
|
|
21
|
+
/** Used to match leading and trailing whitespace. */
|
|
22
|
+
var reTrim = /^\s+|\s+$/g;
|
|
23
|
+
|
|
24
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
25
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
26
|
+
|
|
27
|
+
/** Used to detect binary string values. */
|
|
28
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
29
|
+
|
|
30
|
+
/** Used to detect octal string values. */
|
|
31
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
32
|
+
|
|
33
|
+
/** Used to compose unicode character classes. */
|
|
34
|
+
var rsAstralRange = '\\ud800-\\udfff',
|
|
35
|
+
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
|
36
|
+
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
|
37
|
+
rsVarRange = '\\ufe0e\\ufe0f';
|
|
38
|
+
|
|
39
|
+
/** Used to compose unicode capture groups. */
|
|
40
|
+
var rsAstral = '[' + rsAstralRange + ']',
|
|
41
|
+
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
|
42
|
+
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
43
|
+
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
44
|
+
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
45
|
+
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
46
|
+
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
47
|
+
rsZWJ = '\\u200d';
|
|
48
|
+
|
|
49
|
+
/** Used to compose unicode regexes. */
|
|
50
|
+
var reOptMod = rsModifier + '?',
|
|
51
|
+
rsOptVar = '[' + rsVarRange + ']?',
|
|
52
|
+
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
53
|
+
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
54
|
+
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
55
|
+
|
|
56
|
+
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
57
|
+
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
58
|
+
|
|
59
|
+
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
60
|
+
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
|
61
|
+
|
|
62
|
+
/** Built-in method references without a dependency on `root`. */
|
|
63
|
+
var freeParseInt = parseInt;
|
|
64
|
+
|
|
65
|
+
/** Detect free variable `global` from Node.js. */
|
|
66
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
67
|
+
|
|
68
|
+
/** Detect free variable `self`. */
|
|
69
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
70
|
+
|
|
71
|
+
/** Used as a reference to the global object. */
|
|
72
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Gets the size of an ASCII `string`.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
* @param {string} string The string inspect.
|
|
79
|
+
* @returns {number} Returns the string size.
|
|
80
|
+
*/
|
|
81
|
+
var asciiSize = baseProperty('length');
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Converts an ASCII `string` to an array.
|
|
85
|
+
*
|
|
86
|
+
* @private
|
|
87
|
+
* @param {string} string The string to convert.
|
|
88
|
+
* @returns {Array} Returns the converted array.
|
|
89
|
+
*/
|
|
90
|
+
function asciiToArray(string) {
|
|
91
|
+
return string.split('');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The base implementation of `_.property` without support for deep paths.
|
|
96
|
+
*
|
|
97
|
+
* @private
|
|
98
|
+
* @param {string} key The key of the property to get.
|
|
99
|
+
* @returns {Function} Returns the new accessor function.
|
|
100
|
+
*/
|
|
101
|
+
function baseProperty(key) {
|
|
102
|
+
return function(object) {
|
|
103
|
+
return object == null ? undefined : object[key];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Checks if `string` contains Unicode symbols.
|
|
109
|
+
*
|
|
110
|
+
* @private
|
|
111
|
+
* @param {string} string The string to inspect.
|
|
112
|
+
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
113
|
+
*/
|
|
114
|
+
function hasUnicode(string) {
|
|
115
|
+
return reHasUnicode.test(string);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Gets the number of symbols in `string`.
|
|
120
|
+
*
|
|
121
|
+
* @private
|
|
122
|
+
* @param {string} string The string to inspect.
|
|
123
|
+
* @returns {number} Returns the string size.
|
|
124
|
+
*/
|
|
125
|
+
function stringSize(string) {
|
|
126
|
+
return hasUnicode(string)
|
|
127
|
+
? unicodeSize(string)
|
|
128
|
+
: asciiSize(string);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Converts `string` to an array.
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
* @param {string} string The string to convert.
|
|
136
|
+
* @returns {Array} Returns the converted array.
|
|
137
|
+
*/
|
|
138
|
+
function stringToArray(string) {
|
|
139
|
+
return hasUnicode(string)
|
|
140
|
+
? unicodeToArray(string)
|
|
141
|
+
: asciiToArray(string);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Gets the size of a Unicode `string`.
|
|
146
|
+
*
|
|
147
|
+
* @private
|
|
148
|
+
* @param {string} string The string inspect.
|
|
149
|
+
* @returns {number} Returns the string size.
|
|
150
|
+
*/
|
|
151
|
+
function unicodeSize(string) {
|
|
152
|
+
var result = reUnicode.lastIndex = 0;
|
|
153
|
+
while (reUnicode.test(string)) {
|
|
154
|
+
result++;
|
|
155
|
+
}
|
|
156
|
+
return result;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Converts a Unicode `string` to an array.
|
|
161
|
+
*
|
|
162
|
+
* @private
|
|
163
|
+
* @param {string} string The string to convert.
|
|
164
|
+
* @returns {Array} Returns the converted array.
|
|
165
|
+
*/
|
|
166
|
+
function unicodeToArray(string) {
|
|
167
|
+
return string.match(reUnicode) || [];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Used for built-in method references. */
|
|
171
|
+
var objectProto = Object.prototype;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Used to resolve the
|
|
175
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
176
|
+
* of values.
|
|
177
|
+
*/
|
|
178
|
+
var objectToString = objectProto.toString;
|
|
179
|
+
|
|
180
|
+
/** Built-in value references. */
|
|
181
|
+
var Symbol = root.Symbol;
|
|
182
|
+
|
|
183
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
184
|
+
var nativeCeil = Math.ceil,
|
|
185
|
+
nativeFloor = Math.floor;
|
|
186
|
+
|
|
187
|
+
/** Used to convert symbols to primitives and strings. */
|
|
188
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
189
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The base implementation of `_.repeat` which doesn't coerce arguments.
|
|
193
|
+
*
|
|
194
|
+
* @private
|
|
195
|
+
* @param {string} string The string to repeat.
|
|
196
|
+
* @param {number} n The number of times to repeat the string.
|
|
197
|
+
* @returns {string} Returns the repeated string.
|
|
198
|
+
*/
|
|
199
|
+
function baseRepeat(string, n) {
|
|
200
|
+
var result = '';
|
|
201
|
+
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
|
205
|
+
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
|
|
206
|
+
do {
|
|
207
|
+
if (n % 2) {
|
|
208
|
+
result += string;
|
|
209
|
+
}
|
|
210
|
+
n = nativeFloor(n / 2);
|
|
211
|
+
if (n) {
|
|
212
|
+
string += string;
|
|
213
|
+
}
|
|
214
|
+
} while (n);
|
|
215
|
+
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
221
|
+
*
|
|
222
|
+
* @private
|
|
223
|
+
* @param {Array} array The array to slice.
|
|
224
|
+
* @param {number} [start=0] The start position.
|
|
225
|
+
* @param {number} [end=array.length] The end position.
|
|
226
|
+
* @returns {Array} Returns the slice of `array`.
|
|
227
|
+
*/
|
|
228
|
+
function baseSlice(array, start, end) {
|
|
229
|
+
var index = -1,
|
|
230
|
+
length = array.length;
|
|
231
|
+
|
|
232
|
+
if (start < 0) {
|
|
233
|
+
start = -start > length ? 0 : (length + start);
|
|
234
|
+
}
|
|
235
|
+
end = end > length ? length : end;
|
|
236
|
+
if (end < 0) {
|
|
237
|
+
end += length;
|
|
238
|
+
}
|
|
239
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
240
|
+
start >>>= 0;
|
|
241
|
+
|
|
242
|
+
var result = Array(length);
|
|
243
|
+
while (++index < length) {
|
|
244
|
+
result[index] = array[index + start];
|
|
245
|
+
}
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
251
|
+
* values to empty strings.
|
|
252
|
+
*
|
|
253
|
+
* @private
|
|
254
|
+
* @param {*} value The value to process.
|
|
255
|
+
* @returns {string} Returns the string.
|
|
256
|
+
*/
|
|
257
|
+
function baseToString(value) {
|
|
258
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
259
|
+
if (typeof value == 'string') {
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
262
|
+
if (isSymbol(value)) {
|
|
263
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
264
|
+
}
|
|
265
|
+
var result = (value + '');
|
|
266
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Casts `array` to a slice if it's needed.
|
|
271
|
+
*
|
|
272
|
+
* @private
|
|
273
|
+
* @param {Array} array The array to inspect.
|
|
274
|
+
* @param {number} start The start position.
|
|
275
|
+
* @param {number} [end=array.length] The end position.
|
|
276
|
+
* @returns {Array} Returns the cast slice.
|
|
277
|
+
*/
|
|
278
|
+
function castSlice(array, start, end) {
|
|
279
|
+
var length = array.length;
|
|
280
|
+
end = end === undefined ? length : end;
|
|
281
|
+
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Creates the padding for `string` based on `length`. The `chars` string
|
|
286
|
+
* is truncated if the number of characters exceeds `length`.
|
|
287
|
+
*
|
|
288
|
+
* @private
|
|
289
|
+
* @param {number} length The padding length.
|
|
290
|
+
* @param {string} [chars=' '] The string used as padding.
|
|
291
|
+
* @returns {string} Returns the padding for `string`.
|
|
292
|
+
*/
|
|
293
|
+
function createPadding(length, chars) {
|
|
294
|
+
chars = chars === undefined ? ' ' : baseToString(chars);
|
|
295
|
+
|
|
296
|
+
var charsLength = chars.length;
|
|
297
|
+
if (charsLength < 2) {
|
|
298
|
+
return charsLength ? baseRepeat(chars, length) : chars;
|
|
299
|
+
}
|
|
300
|
+
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
|
301
|
+
return hasUnicode(chars)
|
|
302
|
+
? castSlice(stringToArray(result), 0, length).join('')
|
|
303
|
+
: result.slice(0, length);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Checks if `value` is the
|
|
308
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
309
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
310
|
+
*
|
|
311
|
+
* @static
|
|
312
|
+
* @memberOf _
|
|
313
|
+
* @since 0.1.0
|
|
314
|
+
* @category Lang
|
|
315
|
+
* @param {*} value The value to check.
|
|
316
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
317
|
+
* @example
|
|
318
|
+
*
|
|
319
|
+
* _.isObject({});
|
|
320
|
+
* // => true
|
|
321
|
+
*
|
|
322
|
+
* _.isObject([1, 2, 3]);
|
|
323
|
+
* // => true
|
|
324
|
+
*
|
|
325
|
+
* _.isObject(_.noop);
|
|
326
|
+
* // => true
|
|
327
|
+
*
|
|
328
|
+
* _.isObject(null);
|
|
329
|
+
* // => false
|
|
330
|
+
*/
|
|
331
|
+
function isObject(value) {
|
|
332
|
+
var type = typeof value;
|
|
333
|
+
return !!value && (type == 'object' || type == 'function');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
338
|
+
* and has a `typeof` result of "object".
|
|
339
|
+
*
|
|
340
|
+
* @static
|
|
341
|
+
* @memberOf _
|
|
342
|
+
* @since 4.0.0
|
|
343
|
+
* @category Lang
|
|
344
|
+
* @param {*} value The value to check.
|
|
345
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
346
|
+
* @example
|
|
347
|
+
*
|
|
348
|
+
* _.isObjectLike({});
|
|
349
|
+
* // => true
|
|
350
|
+
*
|
|
351
|
+
* _.isObjectLike([1, 2, 3]);
|
|
352
|
+
* // => true
|
|
353
|
+
*
|
|
354
|
+
* _.isObjectLike(_.noop);
|
|
355
|
+
* // => false
|
|
356
|
+
*
|
|
357
|
+
* _.isObjectLike(null);
|
|
358
|
+
* // => false
|
|
359
|
+
*/
|
|
360
|
+
function isObjectLike(value) {
|
|
361
|
+
return !!value && typeof value == 'object';
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
366
|
+
*
|
|
367
|
+
* @static
|
|
368
|
+
* @memberOf _
|
|
369
|
+
* @since 4.0.0
|
|
370
|
+
* @category Lang
|
|
371
|
+
* @param {*} value The value to check.
|
|
372
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
373
|
+
* @example
|
|
374
|
+
*
|
|
375
|
+
* _.isSymbol(Symbol.iterator);
|
|
376
|
+
* // => true
|
|
377
|
+
*
|
|
378
|
+
* _.isSymbol('abc');
|
|
379
|
+
* // => false
|
|
380
|
+
*/
|
|
381
|
+
function isSymbol(value) {
|
|
382
|
+
return typeof value == 'symbol' ||
|
|
383
|
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Converts `value` to a finite number.
|
|
388
|
+
*
|
|
389
|
+
* @static
|
|
390
|
+
* @memberOf _
|
|
391
|
+
* @since 4.12.0
|
|
392
|
+
* @category Lang
|
|
393
|
+
* @param {*} value The value to convert.
|
|
394
|
+
* @returns {number} Returns the converted number.
|
|
395
|
+
* @example
|
|
396
|
+
*
|
|
397
|
+
* _.toFinite(3.2);
|
|
398
|
+
* // => 3.2
|
|
399
|
+
*
|
|
400
|
+
* _.toFinite(Number.MIN_VALUE);
|
|
401
|
+
* // => 5e-324
|
|
402
|
+
*
|
|
403
|
+
* _.toFinite(Infinity);
|
|
404
|
+
* // => 1.7976931348623157e+308
|
|
405
|
+
*
|
|
406
|
+
* _.toFinite('3.2');
|
|
407
|
+
* // => 3.2
|
|
408
|
+
*/
|
|
409
|
+
function toFinite(value) {
|
|
410
|
+
if (!value) {
|
|
411
|
+
return value === 0 ? value : 0;
|
|
412
|
+
}
|
|
413
|
+
value = toNumber(value);
|
|
414
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
415
|
+
var sign = (value < 0 ? -1 : 1);
|
|
416
|
+
return sign * MAX_INTEGER;
|
|
417
|
+
}
|
|
418
|
+
return value === value ? value : 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Converts `value` to an integer.
|
|
423
|
+
*
|
|
424
|
+
* **Note:** This method is loosely based on
|
|
425
|
+
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
426
|
+
*
|
|
427
|
+
* @static
|
|
428
|
+
* @memberOf _
|
|
429
|
+
* @since 4.0.0
|
|
430
|
+
* @category Lang
|
|
431
|
+
* @param {*} value The value to convert.
|
|
432
|
+
* @returns {number} Returns the converted integer.
|
|
433
|
+
* @example
|
|
434
|
+
*
|
|
435
|
+
* _.toInteger(3.2);
|
|
436
|
+
* // => 3
|
|
437
|
+
*
|
|
438
|
+
* _.toInteger(Number.MIN_VALUE);
|
|
439
|
+
* // => 0
|
|
440
|
+
*
|
|
441
|
+
* _.toInteger(Infinity);
|
|
442
|
+
* // => 1.7976931348623157e+308
|
|
443
|
+
*
|
|
444
|
+
* _.toInteger('3.2');
|
|
445
|
+
* // => 3
|
|
446
|
+
*/
|
|
447
|
+
function toInteger(value) {
|
|
448
|
+
var result = toFinite(value),
|
|
449
|
+
remainder = result % 1;
|
|
450
|
+
|
|
451
|
+
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Converts `value` to a number.
|
|
456
|
+
*
|
|
457
|
+
* @static
|
|
458
|
+
* @memberOf _
|
|
459
|
+
* @since 4.0.0
|
|
460
|
+
* @category Lang
|
|
461
|
+
* @param {*} value The value to process.
|
|
462
|
+
* @returns {number} Returns the number.
|
|
463
|
+
* @example
|
|
464
|
+
*
|
|
465
|
+
* _.toNumber(3.2);
|
|
466
|
+
* // => 3.2
|
|
467
|
+
*
|
|
468
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
469
|
+
* // => 5e-324
|
|
470
|
+
*
|
|
471
|
+
* _.toNumber(Infinity);
|
|
472
|
+
* // => Infinity
|
|
473
|
+
*
|
|
474
|
+
* _.toNumber('3.2');
|
|
475
|
+
* // => 3.2
|
|
476
|
+
*/
|
|
477
|
+
function toNumber(value) {
|
|
478
|
+
if (typeof value == 'number') {
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
if (isSymbol(value)) {
|
|
482
|
+
return NAN;
|
|
483
|
+
}
|
|
484
|
+
if (isObject(value)) {
|
|
485
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
486
|
+
value = isObject(other) ? (other + '') : other;
|
|
487
|
+
}
|
|
488
|
+
if (typeof value != 'string') {
|
|
489
|
+
return value === 0 ? value : +value;
|
|
490
|
+
}
|
|
491
|
+
value = value.replace(reTrim, '');
|
|
492
|
+
var isBinary = reIsBinary.test(value);
|
|
493
|
+
return (isBinary || reIsOctal.test(value))
|
|
494
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
495
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
500
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
501
|
+
*
|
|
502
|
+
* @static
|
|
503
|
+
* @memberOf _
|
|
504
|
+
* @since 4.0.0
|
|
505
|
+
* @category Lang
|
|
506
|
+
* @param {*} value The value to process.
|
|
507
|
+
* @returns {string} Returns the string.
|
|
508
|
+
* @example
|
|
509
|
+
*
|
|
510
|
+
* _.toString(null);
|
|
511
|
+
* // => ''
|
|
512
|
+
*
|
|
513
|
+
* _.toString(-0);
|
|
514
|
+
* // => '-0'
|
|
515
|
+
*
|
|
516
|
+
* _.toString([1, 2, 3]);
|
|
517
|
+
* // => '1,2,3'
|
|
518
|
+
*/
|
|
519
|
+
function toString(value) {
|
|
520
|
+
return value == null ? '' : baseToString(value);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Pads `string` on the left side if it's shorter than `length`. Padding
|
|
525
|
+
* characters are truncated if they exceed `length`.
|
|
526
|
+
*
|
|
527
|
+
* @static
|
|
528
|
+
* @memberOf _
|
|
529
|
+
* @since 4.0.0
|
|
530
|
+
* @category String
|
|
531
|
+
* @param {string} [string=''] The string to pad.
|
|
532
|
+
* @param {number} [length=0] The padding length.
|
|
533
|
+
* @param {string} [chars=' '] The string used as padding.
|
|
534
|
+
* @returns {string} Returns the padded string.
|
|
535
|
+
* @example
|
|
536
|
+
*
|
|
537
|
+
* _.padStart('abc', 6);
|
|
538
|
+
* // => ' abc'
|
|
539
|
+
*
|
|
540
|
+
* _.padStart('abc', 6, '_-');
|
|
541
|
+
* // => '_-_abc'
|
|
542
|
+
*
|
|
543
|
+
* _.padStart('abc', 3);
|
|
544
|
+
* // => 'abc'
|
|
545
|
+
*/
|
|
546
|
+
function padStart(string, length, chars) {
|
|
547
|
+
string = toString(string);
|
|
548
|
+
length = toInteger(length);
|
|
549
|
+
|
|
550
|
+
var strLength = length ? stringSize(string) : 0;
|
|
551
|
+
return (length && strLength < length)
|
|
552
|
+
? (createPadding(length - strLength, chars) + string)
|
|
553
|
+
: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
var lodash_padstart = padStart;
|
|
557
|
+
|
|
558
|
+
export { lodash_padstart as l };
|
|
@@ -127,7 +127,7 @@ class SwiperUtil {
|
|
|
127
127
|
this.index = 0;
|
|
128
128
|
this.gapSize = 0;
|
|
129
129
|
this.steps = 1;
|
|
130
|
-
this.
|
|
130
|
+
this.noNeedForControls = true;
|
|
131
131
|
this.isLastSlideVisible = false;
|
|
132
132
|
this.itemsPerView = 1;
|
|
133
133
|
this.controls = 'none';
|
|
@@ -224,6 +224,23 @@ class SwiperUtil {
|
|
|
224
224
|
addEventListener(window, 'touchstart', this.pointerDown);
|
|
225
225
|
addEventListener(window, 'mousedown', this.pointerDown);
|
|
226
226
|
}
|
|
227
|
+
componentDidLoad() {
|
|
228
|
+
const observer = new IntersectionObserver(entries => {
|
|
229
|
+
entries.forEach(entry => {
|
|
230
|
+
if (entry.isIntersecting) {
|
|
231
|
+
this.notifyChange();
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}, {
|
|
235
|
+
root: null, // Use the viewport as the container
|
|
236
|
+
threshold: 0.5, // Trigger when 50% of the element is visible
|
|
237
|
+
});
|
|
238
|
+
// Target the element you want to observe
|
|
239
|
+
const targetElement = this.component.el;
|
|
240
|
+
if (targetElement) {
|
|
241
|
+
observer.observe(targetElement);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
227
244
|
disconnectedCallback() {
|
|
228
245
|
removeEventListener(window, 'keydown', this.listenToKeyDown);
|
|
229
246
|
removeEventListener(this.component.el, 'focusin', this.updateFocus);
|
|
@@ -317,7 +334,7 @@ class SwiperUtil {
|
|
|
317
334
|
}
|
|
318
335
|
}
|
|
319
336
|
renderControls() {
|
|
320
|
-
if (!this.active || this.
|
|
337
|
+
if (!this.active || this.noNeedForControls || !this.component.hasAnimated) {
|
|
321
338
|
return '';
|
|
322
339
|
}
|
|
323
340
|
const leftControlTitle = i18nSwiperControlLabel[this.component.language].left;
|
|
@@ -388,6 +405,9 @@ class SwiperUtil {
|
|
|
388
405
|
if (lastSlide) {
|
|
389
406
|
const totalWidth = lastSlide.transformNext || 0;
|
|
390
407
|
const overflowWindowWidth = this.innerEl.clientWidth || 0;
|
|
408
|
+
if (totalWidth === 0 || overflowWindowWidth === 0) {
|
|
409
|
+
return resolve(false);
|
|
410
|
+
}
|
|
391
411
|
// get max amount of pixel to move the items container to the left or right
|
|
392
412
|
let maxAmountOfPixel = totalWidth - overflowWindowWidth;
|
|
393
413
|
// -1 one is needed for example when we use items per view 3 with 33.333%
|
|
@@ -402,10 +422,10 @@ class SwiperUtil {
|
|
|
402
422
|
}
|
|
403
423
|
const hasSmallControls = this.controls === 'small';
|
|
404
424
|
const hasLargeControls = this.controls === 'large';
|
|
405
|
-
this.
|
|
406
|
-
let transformValue = this.
|
|
425
|
+
this.noNeedForControls = totalWidth <= overflowWindowWidth;
|
|
426
|
+
let transformValue = this.noNeedForControls ? 0 : isLastSlideVisible ? maxAmountOfPixel : pixels;
|
|
407
427
|
if (!isFirst &&
|
|
408
|
-
!this.
|
|
428
|
+
!this.noNeedForControls &&
|
|
409
429
|
(hasSmallControls || (hasLargeControls && !this.component.isMobile))) {
|
|
410
430
|
transformValue = transformValue - (isLastSlideVisible ? 0 : hasLargeControls ? 56 : 48);
|
|
411
431
|
}
|