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
@@ -5924,28 +5924,30 @@ var es_regexp_to_string = __webpack_require__("25f0");
5924
5924
 
5925
5925
 
5926
5926
 
5927
- (function () {
5928
- if (typeof window.CustomEvent === 'function') return false;
5929
-
5930
- function CustomEvent(event, params) {
5931
- params = params || {
5932
- bubbles: false,
5933
- cancelable: false,
5934
- detail: null
5935
- };
5936
- var evt = document.createEvent('CustomEvent');
5937
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
5938
- return evt;
5939
- }
5927
+ function initLgPolyfills() {
5928
+ (function () {
5929
+ if (typeof window.CustomEvent === 'function') return false;
5930
+
5931
+ function CustomEvent(event, params) {
5932
+ params = params || {
5933
+ bubbles: false,
5934
+ cancelable: false,
5935
+ detail: null
5936
+ };
5937
+ var evt = document.createEvent('CustomEvent');
5938
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
5939
+ return evt;
5940
+ }
5940
5941
 
5941
- window.CustomEvent = CustomEvent;
5942
- })();
5942
+ window.CustomEvent = CustomEvent;
5943
+ })();
5943
5944
 
5944
- (function () {
5945
- if (!Element.prototype.matches) {
5946
- Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
5947
- }
5948
- })();
5945
+ (function () {
5946
+ if (!Element.prototype.matches) {
5947
+ Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
5948
+ }
5949
+ })();
5950
+ }
5949
5951
 
5950
5952
  var lgQuery_lgQuery = /*#__PURE__*/function () {
5951
5953
  function lgQuery(selector) {
@@ -6386,6 +6388,7 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
6386
6388
  }();
6387
6389
  lgQuery_lgQuery.eventListeners = {};
6388
6390
  function $LG(selector) {
6391
+ initLgPolyfills();
6389
6392
  return new lgQuery_lgQuery(selector);
6390
6393
  }
6391
6394
  // CONCATENATED MODULE: ../src/lg-utils.ts
@@ -6683,7 +6686,7 @@ var lightGalleryCoreSettings = {
6683
6686
  addClass: '',
6684
6687
  startClass: 'lg-start-zoom',
6685
6688
  backdropDuration: 300,
6686
- container: document.body,
6689
+ container: '',
6687
6690
  startAnimationDuration: 400,
6688
6691
  zoomFromOrigin: true,
6689
6692
  hideBarsDelay: 0,
@@ -8563,12 +8566,14 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
8563
8566
  }
8564
8567
 
8565
8568
  if (e.deltaY > 0) {
8566
- _this23.goToPrevSlide();
8567
- } else {
8568
8569
  _this23.goToNextSlide();
8569
- }
8570
8570
 
8571
- e.preventDefault();
8571
+ e.preventDefault();
8572
+ } else if (e.deltaY < 0) {
8573
+ _this23.goToPrevSlide();
8574
+
8575
+ e.preventDefault();
8576
+ }
8572
8577
  });
8573
8578
  }
8574
8579
  }, {