sweetalert2 11.4.25 → 11.4.28

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/README.md CHANGED
@@ -22,7 +22,7 @@ For all questions related to sponsorship please contact me via email limon.monte
22
22
  <table>
23
23
  <tr>
24
24
  <td align="center"><a href="SPONSORS.md#sponsors"><img src="https://sweetalert2.github.io/images/plus.png" width="80"><br>Become a sponsor</a></td>
25
- <td align="center"><a href="https://rushradar.com/"><img src="https://sweetalert2.github.io/images/sponsors/rushradar.png" width="80"><br>RushRadar</a>
25
+ <td align="center"><a href="https://rushradar.com/"><img src="https://sweetalert2.github.io/images/sponsors/rushradar.png" width="80"><br>RushRadar:&nbsp;Articles, <br>Reviews,&nbsp;and&nbsp;Discounts</a>
26
26
  <td align="center"><a href="https://iganony.com/"><img src="https://sweetalert2.github.io/images/sponsors/iganony.png" width="80"><br>IgAnony</a>
27
27
  <td align="center"><a href="https://www.realspyapps.com/"><img src="https://sweetalert2.github.io/images/sponsors/realspyapps.jpeg" width="80"><br>Real Spy Apps</a>
28
28
  <td align="center"><a href="https://www.istartips.com/"><img src="https://sweetalert2.github.io/images/sponsors/istartips.png" width="80"><br>iStarTips</a><td align="center"><a href="https://www.evguru.com.my/"><img src="https://sweetalert2.github.io/images/sponsors/evguru.png" width="80"><br>EvGuru EV Chargers</a></td>
@@ -50,25 +50,51 @@ For all questions related to sponsorship please contact me via email limon.monte
50
50
  NSFW Sponsors
51
51
  -------------
52
52
 
53
- [<img src="https://sweetalert2.github.io/images/plus.png" width="80">](SPONSORS.md#sponsors) | [<img src="https://sweetalert2.github.io/images/sponsors/sexysexdoll.png" width="80">](https://www.sexysexdoll.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/dollnight.jpeg" width="80">](https://www.dollnight.com/cheap-sex-doll) | [<img src="https://sweetalert2.github.io/images/sponsors/sexvibrator.png" width="80">](https://www.sexvibrators.in/) | [<img src="https://sweetalert2.github.io/images/sponsors/viva-awa.png" width="80">](https://www.viva-awa.com/)
54
- -|-|-|-|-
55
- [Become a NSFW sponsor](SPONSORS.md#sponsors) | [Sexy Sex Doll](https://www.sexysexdoll.com/) | [Cheap Sex Doll](https://www.dollnight.com/cheap-sex-doll) | [Sex Vibrators](https://www.sexvibrators.in/) | [Viva Awa](https://www.viva-awa.com/)
56
-
57
- [<img src="https://sweetalert2.github.io/images/sponsors/sensualdolls.png" width="80">](https://www.sensualdolls.com) | [<img src="https://sweetalert2.github.io/images/sponsors/bestrealdoll.jpeg" width="80">](https://www.bestrealdoll.com/collections/us-warehouse) | [<img src="https://sweetalert2.github.io/images/sponsors/sexdolltech.jpeg" width="80">](https://www.sexdolltech.com/product-category/us-warehouse/) | [<img src="https://sweetalert2.github.io/images/sponsors/rosewives.png" width="80">](https://rosewives.com/)
58
- -|-|-|-
59
- [Sensual Dolls](https://www.sensualdolls.com) | [BestRealDoll](https://www.bestrealdoll.com/collections/us-warehouse) | [SexDollTech](https://www.sexdolltech.com/product-category/us-warehouse/) | [Rose Wives](https://rosewives.com/)
60
-
61
- [<img src="https://sweetalert2.github.io/images/sponsors/sexdollsoff.png" width="80">](https://www.sexdollsoff.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/realsexdoll.png" width="80">](https://realsexdoll.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/yourdoll.jpg" width="80">](https://www.yourdoll.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/annies-dollhouse.png" width="80">](https://anniesdollhouse.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/sexdollcenter.png" width="80">](https://sexdollcenter.vip/) |
62
- -|-|-|-|-
63
- [SexDollsOff](https://www.sexdollsoff.com/) | [RealSexDoll](https://realsexdoll.com/) | [Your Doll](https://www.yourdoll.com/) | [Annie's Dollhouse](https://anniesdollhouse.com/) | [Sex Doll Center](https://sexdollcenter.vip/)
64
-
65
- [<img src="https://sweetalert2.github.io/images/sponsors/vsdoll.png" width="80">](https://vsdoll.com/homepage/) | [<img src="https://sweetalert2.github.io/images/sponsors/sexangelbaby.png" width="80">](https://sexangelbaby.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/theadulttoyfinder.png" width="80">](https://theadulttoyfinder.com/?utm_source=sweetalert2&utm_medium=logo)
66
- -|-|-
67
- [VSDoll](https://vsdoll.com/homepage/) | [SexAngelbaby](https://sexangelbaby.com/) | [The Adult Toy Finder](https://theadulttoyfinder.com/?utm_source=sweetalert2&utm_medium=logo)
68
-
69
- [<img src="https://sweetalert2.github.io/images/sponsors/my-sex-toy-guide.jpg" width="80">](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80">](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/sextoycollective.jpg" width="80">](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/doctorclimax.png" width="80">](https://doctorclimax.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/bedbible.png" width="80">](https://bedbible.com/)
70
- -|-|-|-|-
71
- [My Sex Toy Guide](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [Best Blowjob Machines](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [STC](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [DoctorClimax](https://doctorclimax.com/) | [BedBible](https://bedbible.com/)
53
+ <table>
54
+ <tr>
55
+ <td align="center"><a href="SPONSORS.md#sponsors"><img src="https://sweetalert2.github.io/images/plus.png" width="80"><br>Become a NSFW sponsor</a></td>
56
+ <td align="center"><a href="https://cutesexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/cutesexdoll.jpg" width="80"><br>Cute Sex Doll</a></td>
57
+ <td align="center"><a href="https://toyhero.com/"><img src="https://sweetalert2.github.io/images/sponsors/toyhero.png" width="80"><br>Adult Toys</a></td>
58
+ <td align="center"><a href="https://meifoxdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/meifoxdoll.png" width="80"><br>MeiFoxDoll</a></td>
59
+ <td align="center"><a href="https://www.sexysexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexysexdoll.png" width="80"><br>Sexy Sex Doll</a></td>
60
+ <td align="center"><a href="https://www.dollnight.com/cheap-sex-doll"><img src="https://sweetalert2.github.io/images/sponsors/dollnight.jpeg" width="80"><br>Cheap Sex Doll</a></td>
61
+ </tr>
62
+ </table>
63
+ <table>
64
+ <tr>
65
+ <td align="center"><a href="https://www.sexvibrators.in/"><img src="https://sweetalert2.github.io/images/sponsors/sexvibrator.png" width="80"><br>Sex Vibrators</a></td>
66
+ <td align="center"><a href="https://www.viva-awa.com/"><img src="https://sweetalert2.github.io/images/sponsors/viva-awa.png" width="80"><br>Viva Awa</a></td>
67
+ <td align="center"><a href="https://www.sensualdolls.com/"><img src="https://sweetalert2.github.io/images/sponsors/sensualdolls.png" width="80"><br>Sensual Dolls</a></td>
68
+ <td align="center"><a href="https://www.bestrealdoll.com/collections/us-warehouse"><img src="https://sweetalert2.github.io/images/sponsors/bestrealdoll.jpeg" width="80"><br>BestRealDoll</a></td>
69
+ <td align="center"><a href="https://www.sexdolltech.com/product-category/us-warehouse/"><img src="https://sweetalert2.github.io/images/sponsors/sexdolltech.jpeg" width="80"><br>SexDollTech</a></td>
70
+ <td align="center"><a href="https://rosewives.com/"><img src="https://sweetalert2.github.io/images/sponsors/rosewives.png" width="80"><br>Rose Wives</a></td>
71
+ </tr>
72
+ </table>
73
+ <table>
74
+ <tr>
75
+ <td align="center"><a href="https://www.sexdollsoff.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexdollsoff.png" width="80"><br>SexDollsOff</a></td>
76
+ <td align="center"><a href="https://realsexdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/realsexdoll.png" width="80"><br>RealSexDoll</a></td>
77
+ <td align="center"><a href="https://www.yourdoll.com/"><img src="https://sweetalert2.github.io/images/sponsors/yourdoll.jpg" width="80"><br>Your Doll</a></td>
78
+ <td align="center"><a href="https://anniesdollhouse.com/"><img src="https://sweetalert2.github.io/images/sponsors/annies-dollhouse.png" width="80"><br>Annie's Dollhouse</a></td>
79
+ <td align="center"><a href="https://sexdollcenter.vip/"><img src="https://sweetalert2.github.io/images/sponsors/sexdollcenter.png" width="80"><br>Sex Doll Center</a></td>
80
+ </tr>
81
+ </table>
82
+ <table>
83
+ <tr>
84
+ <td align="center"><a href="https://vsdoll.com/homepage/"><img src="https://sweetalert2.github.io/images/sponsors/vsdoll.png" width="80"><br>VSDoll</a></td>
85
+ <td align="center"><a href="https://sexangelbaby.com/"><img src="https://sweetalert2.github.io/images/sponsors/sexangelbaby.png" width="80"><br>SexAngelbaby</a></td>
86
+ <td align="center"><a href="https://theadulttoyfinder.com/"><img src="https://sweetalert2.github.io/images/sponsors/theadulttoyfinder.png" width="80"><br>The Adult Toy Finder</a></td>
87
+ <td align="center"><a href="https://www.mysextoyguide.com/"><img src="https://sweetalert2.github.io/images/sponsors/my-sex-toy-guide.jpg" width="80"><br>My Sex Toy Guide</a></td>
88
+ </tr>
89
+ </table>
90
+ <table>
91
+ <tr>
92
+ <td align="center"><a href="https://www.bestblowjobmachines.com/"><img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80"><br>Best Blowjob Machines</a></td>
93
+ <td align="center"><a href="https://sextoycollective.com/"><img src="https://sweetalert2.github.io/images/sponsors/sextoycollective.jpg" width="80"><br>STC</a></td>
94
+ <td align="center"><a href="https://doctorclimax.com/"><img src="https://sweetalert2.github.io/images/sponsors/doctorclimax.png" width="80"><br>DoctorClimax</a></td>
95
+ <td align="center"><a href="https://bedbible.com/"><img src="https://sweetalert2.github.io/images/sponsors/bedbible.png" width="80"><br>BedBible</a></td>
96
+ </tr>
97
+ </table>
72
98
 
73
99
  Support and Donations
74
100
  ---------------------
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sweetalert2 v11.4.25
2
+ * sweetalert2 v11.4.28
3
3
  * Released under the MIT License.
4
4
  */
5
5
  (function (global, factory) {
@@ -11,7 +11,9 @@
11
11
  const consolePrefix = 'SweetAlert2:';
12
12
  /**
13
13
  * Filter the unique values into a new array
14
- * @param arr
14
+ *
15
+ * @param {Array} arr
16
+ * @returns {Array}
15
17
  */
16
18
 
17
19
  const uniqueArray = arr => {
@@ -27,6 +29,7 @@
27
29
  };
28
30
  /**
29
31
  * Capitalize the first letter of a string
32
+ *
30
33
  * @param {string} str
31
34
  * @returns {string}
32
35
  */
@@ -34,7 +37,8 @@
34
37
  const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);
35
38
  /**
36
39
  * Standardize console warnings
37
- * @param {string | array} message
40
+ *
41
+ * @param {string | Array} message
38
42
  */
39
43
 
40
44
  const warn = message => {
@@ -42,6 +46,7 @@
42
46
  };
43
47
  /**
44
48
  * Standardize console errors
49
+ *
45
50
  * @param {string} message
46
51
  */
47
52
 
@@ -50,6 +55,7 @@
50
55
  };
51
56
  /**
52
57
  * Private global state for `warnOnce`
58
+ *
53
59
  * @type {Array}
54
60
  * @private
55
61
  */
@@ -57,6 +63,7 @@
57
63
  const previousWarnOnceMessages = [];
58
64
  /**
59
65
  * Show a console warning, but only if it hasn't already been shown
66
+ *
60
67
  * @param {string} message
61
68
  */
62
69
 
@@ -68,6 +75,9 @@
68
75
  };
69
76
  /**
70
77
  * Show a one-time console warning about deprecated params/methods
78
+ *
79
+ * @param {string} deprecatedParam
80
+ * @param {string} useInstead
71
81
  */
72
82
 
73
83
  const warnAboutDeprecation = (deprecatedParam, useInstead) => {
@@ -76,13 +86,35 @@
76
86
  /**
77
87
  * If `arg` is a function, call it (with no arguments or context) and return the result.
78
88
  * Otherwise, just pass the value through
79
- * @param arg
89
+ *
90
+ * @param {Function | any} arg
91
+ * @returns {any}
80
92
  */
81
93
 
82
94
  const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;
95
+ /**
96
+ * @param {any} arg
97
+ * @returns {boolean}
98
+ */
99
+
83
100
  const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';
101
+ /**
102
+ * @param {any} arg
103
+ * @returns {Promise}
104
+ */
105
+
84
106
  const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
107
+ /**
108
+ * @param {any} arg
109
+ * @returns {boolean}
110
+ */
111
+
85
112
  const isPromise = arg => arg && Promise.resolve(arg) === arg;
113
+ /**
114
+ * @param {Array} arr
115
+ * @returns {any}
116
+ */
117
+
86
118
  const getRandomElement = arr => arr[Math.floor(Math.random() * arr.length)];
87
119
 
88
120
  const defaultParams = {
@@ -201,11 +233,11 @@
201
233
  * Is deprecated parameter
202
234
  *
203
235
  * @param {string} paramName
204
- * @returns {boolean}
236
+ * @returns {string | undefined}
205
237
  */
206
238
 
207
239
  const isDeprecatedParameter = paramName => {
208
- return !!deprecatedParams[paramName];
240
+ return deprecatedParams[paramName];
209
241
  };
210
242
  /**
211
243
  * @param {string} param
@@ -2267,10 +2299,17 @@
2267
2299
  const lockBodyScroll = () => {
2268
2300
  const container = getContainer();
2269
2301
  let preventTouchMove;
2302
+ /**
2303
+ * @param {TouchEvent} e
2304
+ */
2270
2305
 
2271
2306
  container.ontouchstart = e => {
2272
2307
  preventTouchMove = shouldPreventTouchMove(e);
2273
2308
  };
2309
+ /**
2310
+ * @param {TouchEvent} e
2311
+ */
2312
+
2274
2313
 
2275
2314
  container.ontouchmove = e => {
2276
2315
  if (preventTouchMove) {
@@ -2279,6 +2318,11 @@
2279
2318
  }
2280
2319
  };
2281
2320
  };
2321
+ /**
2322
+ * @param {TouchEvent} event
2323
+ * @returns {boolean}
2324
+ */
2325
+
2282
2326
 
2283
2327
  const shouldPreventTouchMove = event => {
2284
2328
  const target = event.target;
@@ -2292,7 +2336,7 @@
2292
2336
  return true;
2293
2337
  }
2294
2338
 
2295
- if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603
2339
+ if (!isScrollable(container) && target instanceof HTMLElement && target.tagName !== 'INPUT' && // #1603
2296
2340
  target.tagName !== 'TEXTAREA' && // #2266
2297
2341
  !(isScrollable(getHtmlContainer()) && // #1944
2298
2342
  getHtmlContainer().contains(target))) {
@@ -2337,7 +2381,7 @@
2337
2381
  /**
2338
2382
  * Open popup, add necessary classes and styles, fix scrollbar
2339
2383
  *
2340
- * @param params
2384
+ * @param {SweetAlertOptions} params
2341
2385
  */
2342
2386
 
2343
2387
  const openPopup = params => {
@@ -2371,6 +2415,9 @@
2371
2415
 
2372
2416
  removeClass(container, swalClasses['no-transition']);
2373
2417
  };
2418
+ /**
2419
+ * @param {AnimationEvent} event
2420
+ */
2374
2421
 
2375
2422
  const swalOpenAnimationFinished = event => {
2376
2423
  const popup = getPopup();
@@ -2383,6 +2430,11 @@
2383
2430
  popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
2384
2431
  container.style.overflowY = 'auto';
2385
2432
  };
2433
+ /**
2434
+ * @param {HTMLElement} container
2435
+ * @param {HTMLElement} popup
2436
+ */
2437
+
2386
2438
 
2387
2439
  const setScrollingVisibility = (container, popup) => {
2388
2440
  if (animationEndEvent && hasCssAnimation(popup)) {
@@ -2392,6 +2444,12 @@
2392
2444
  container.style.overflowY = 'auto';
2393
2445
  }
2394
2446
  };
2447
+ /**
2448
+ * @param {HTMLElement} container
2449
+ * @param {boolean} scrollbarPadding
2450
+ * @param {string} initialBodyOverflow
2451
+ */
2452
+
2395
2453
 
2396
2454
  const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {
2397
2455
  iOSfix();
@@ -2405,6 +2463,12 @@
2405
2463
  container.scrollTop = 0;
2406
2464
  });
2407
2465
  };
2466
+ /**
2467
+ * @param {HTMLElement} container
2468
+ * @param {HTMLElement} popup
2469
+ * @param {SweetAlertOptions} params
2470
+ */
2471
+
2408
2472
 
2409
2473
  const addClasses$1 = (container, popup, params) => {
2410
2474
  addClass(container, params.showClass.backdrop); // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059
@@ -3998,7 +4062,7 @@
3998
4062
  };
3999
4063
  });
4000
4064
  SweetAlert.DismissReason = DismissReason;
4001
- SweetAlert.version = '11.4.25';
4065
+ SweetAlert.version = '11.4.28';
4002
4066
 
4003
4067
  const Swal = SweetAlert; // @ts-ignore
4004
4068