lightgallery 2.3.0-beta.3 → 2.3.0-beta.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.
Files changed (61) hide show
  1. package/lg-settings.d.ts +2 -1
  2. package/lib/lg-settings.js +1 -1
  3. package/lib/lg-settings.js.map +1 -1
  4. package/lib/lgQuery.js +25 -18
  5. package/lib/lgQuery.js.map +1 -1
  6. package/lib/lightgallery.js +5 -4
  7. package/lib/lightgallery.js.map +1 -1
  8. package/lightgallery.es5.js +32 -24
  9. package/lightgallery.es5.js.map +1 -1
  10. package/lightgallery.min.js +2 -2
  11. package/lightgallery.umd.js +32 -24
  12. package/lightgallery.umd.js.map +1 -1
  13. package/lit/lightgallery.esm.js +2 -2
  14. package/lit/lightgallery.umd.js +2 -2
  15. package/package.json +1 -1
  16. package/plugins/autoplay/lg-autoplay.es5.js +1 -1
  17. package/plugins/autoplay/lg-autoplay.min.js +1 -1
  18. package/plugins/autoplay/lg-autoplay.umd.js +1 -1
  19. package/plugins/comment/lg-comment.es5.js +1 -1
  20. package/plugins/comment/lg-comment.min.js +1 -1
  21. package/plugins/comment/lg-comment.umd.js +1 -1
  22. package/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
  23. package/plugins/fullscreen/lg-fullscreen.min.js +1 -1
  24. package/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
  25. package/plugins/hash/lg-hash.es5.js +1 -1
  26. package/plugins/hash/lg-hash.min.js +1 -1
  27. package/plugins/hash/lg-hash.umd.js +1 -1
  28. package/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
  29. package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
  30. package/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
  31. package/plugins/pager/lg-pager.es5.js +1 -1
  32. package/plugins/pager/lg-pager.min.js +1 -1
  33. package/plugins/pager/lg-pager.umd.js +1 -1
  34. package/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
  35. package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
  36. package/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
  37. package/plugins/rotate/lg-rotate.es5.js +1 -1
  38. package/plugins/rotate/lg-rotate.min.js +1 -1
  39. package/plugins/rotate/lg-rotate.umd.js +1 -1
  40. package/plugins/share/lg-share.es5.js +1 -1
  41. package/plugins/share/lg-share.min.js +1 -1
  42. package/plugins/share/lg-share.umd.js +1 -1
  43. package/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
  44. package/plugins/thumbnail/lg-thumbnail.min.js +1 -1
  45. package/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
  46. package/plugins/video/lg-video.es5.js +1 -1
  47. package/plugins/video/lg-video.min.js +1 -1
  48. package/plugins/video/lg-video.umd.js +1 -1
  49. package/plugins/zoom/lg-zoom.es5.js +1 -1
  50. package/plugins/zoom/lg-zoom.min.js +1 -1
  51. package/plugins/zoom/lg-zoom.umd.js +1 -1
  52. package/react/Lightgallery.es5.js +32 -24
  53. package/react/Lightgallery.es5.js.map +1 -1
  54. package/react/Lightgallery.umd.js +32 -24
  55. package/react/Lightgallery.umd.js.map +1 -1
  56. package/vue/LightGalleryVue.common.js +30 -25
  57. package/vue/LightGalleryVue.common.js.map +1 -1
  58. package/vue/LightGalleryVue.umd.js +30 -25
  59. package/vue/LightGalleryVue.umd.js.map +1 -1
  60. package/vue/LightGalleryVue.umd.min.js +2 -2
  61. package/vue/LightGalleryVue.umd.min.js.map +1 -1
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  /*!
35
- * lightgallery | 2.3.0-beta.3 | October 9th 2021
35
+ * lightgallery | 2.3.0-beta.4 | October 11th 2021
36
36
  * http://www.lightgalleryjs.com/
37
37
  * Copyright (c) 2020 Sachin Neravath;
38
38
  * @license GPLv3
@@ -72,24 +72,30 @@
72
72
  return r;
73
73
  }
74
74
 
75
- (function () {
76
- if (typeof window.CustomEvent === 'function')
77
- return false;
78
- function CustomEvent(event, params) {
79
- params = params || { bubbles: false, cancelable: false, detail: null };
80
- var evt = document.createEvent('CustomEvent');
81
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
82
- return evt;
83
- }
84
- window.CustomEvent = CustomEvent;
85
- })();
86
- (function () {
87
- if (!Element.prototype.matches) {
88
- Element.prototype.matches =
89
- Element.prototype.msMatchesSelector ||
90
- Element.prototype.webkitMatchesSelector;
91
- }
92
- })();
75
+ function initLgPolyfills() {
76
+ (function () {
77
+ if (typeof window.CustomEvent === 'function')
78
+ return false;
79
+ function CustomEvent(event, params) {
80
+ params = params || {
81
+ bubbles: false,
82
+ cancelable: false,
83
+ detail: null,
84
+ };
85
+ var evt = document.createEvent('CustomEvent');
86
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
87
+ return evt;
88
+ }
89
+ window.CustomEvent = CustomEvent;
90
+ })();
91
+ (function () {
92
+ if (!Element.prototype.matches) {
93
+ Element.prototype.matches =
94
+ Element.prototype.msMatchesSelector ||
95
+ Element.prototype.webkitMatchesSelector;
96
+ }
97
+ })();
98
+ }
93
99
  var lgQuery = /** @class */ (function () {
94
100
  function lgQuery(selector) {
95
101
  this.cssVenderPrefixes = [
@@ -435,6 +441,7 @@
435
441
  return lgQuery;
436
442
  }());
437
443
  function $LG(selector) {
444
+ initLgPolyfills();
438
445
  return new lgQuery(selector);
439
446
  }
440
447
 
@@ -730,7 +737,7 @@
730
737
  addClass: '',
731
738
  startClass: 'lg-start-zoom',
732
739
  backdropDuration: 300,
733
- container: document.body,
740
+ container: '',
734
741
  startAnimationDuration: 400,
735
742
  zoomFromOrigin: true,
736
743
  hideBarsDelay: 0,
@@ -2397,12 +2404,13 @@
2397
2404
  return;
2398
2405
  }
2399
2406
  if (e.deltaY > 0) {
2400
- _this.goToPrevSlide();
2401
- }
2402
- else {
2403
2407
  _this.goToNextSlide();
2408
+ e.preventDefault();
2409
+ }
2410
+ else if (e.deltaY < 0) {
2411
+ _this.goToPrevSlide();
2412
+ e.preventDefault();
2404
2413
  }
2405
- e.preventDefault();
2406
2414
  });
2407
2415
  };
2408
2416
  LightGallery.prototype.isSlideElement = function (target) {