lightgallery 2.3.0 → 2.5.0-beta.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.
Files changed (186) hide show
  1. package/README.md +4 -0
  2. package/angular/10/bundles/lightgallery-angular-10.umd.js +34 -1
  3. package/angular/10/bundles/lightgallery-angular-10.umd.js.map +1 -1
  4. package/angular/10/bundles/lightgallery-angular-10.umd.min.js +1 -1
  5. package/angular/10/bundles/lightgallery-angular-10.umd.min.js.map +1 -1
  6. package/angular/10/esm2015/lib/lightgallery-angular.component.js +35 -2
  7. package/angular/10/fesm2015/lightgallery-angular-10.js +34 -1
  8. package/angular/10/fesm2015/lightgallery-angular-10.js.map +1 -1
  9. package/angular/10/lib/lightgallery-angular.component.d.ts +6 -2
  10. package/angular/10/lib/lightgallery-angular.component.d.ts.map +1 -1
  11. package/angular/11/bundles/lightgallery-angular-11.umd.js +34 -1
  12. package/angular/11/bundles/lightgallery-angular-11.umd.js.map +1 -1
  13. package/angular/11/bundles/lightgallery-angular-11.umd.min.js +1 -1
  14. package/angular/11/bundles/lightgallery-angular-11.umd.min.js.map +1 -1
  15. package/angular/11/esm2015/lib/lightgallery-angular.component.js +35 -2
  16. package/angular/11/fesm2015/lightgallery-angular-11.js +34 -1
  17. package/angular/11/fesm2015/lightgallery-angular-11.js.map +1 -1
  18. package/angular/11/lib/lightgallery-angular.component.d.ts +6 -2
  19. package/angular/11/lib/lightgallery-angular.component.d.ts.map +1 -1
  20. package/angular/9/bundles/lightgallery-angular-9.umd.js +34 -1
  21. package/angular/9/bundles/lightgallery-angular-9.umd.js.map +1 -1
  22. package/angular/9/bundles/lightgallery-angular-9.umd.min.js +1 -1
  23. package/angular/9/bundles/lightgallery-angular-9.umd.min.js.map +1 -1
  24. package/angular/9/esm2015/lib/lightgallery-angular.component.js +35 -2
  25. package/angular/9/esm5/lib/lightgallery-angular.component.js +35 -2
  26. package/angular/9/fesm2015/lightgallery-angular-9.js +34 -1
  27. package/angular/9/fesm2015/lightgallery-angular-9.js.map +1 -1
  28. package/angular/9/fesm5/lightgallery-angular-9.js +34 -1
  29. package/angular/9/fesm5/lightgallery-angular-9.js.map +1 -1
  30. package/angular/9/lib/lightgallery-angular.component.d.ts +6 -2
  31. package/angular/bundles/lightgallery-angular.umd.js +34 -1
  32. package/angular/bundles/lightgallery-angular.umd.js.map +1 -1
  33. package/angular/esm2015/lib/lightgallery-angular.component.js +35 -2
  34. package/angular/fesm2015/lightgallery-angular.js +34 -1
  35. package/angular/fesm2015/lightgallery-angular.js.map +1 -1
  36. package/angular/lib/lightgallery-angular.component.d.ts +6 -2
  37. package/angular/lib/lightgallery-angular.component.d.ts.map +1 -1
  38. package/css/lightgallery-bundle.css +0 -1
  39. package/css/lightgallery-bundle.min.css +1 -1
  40. package/css/lightgallery-core.css +0 -1
  41. package/css/lightgallery.css +0 -1
  42. package/lg-events.d.ts +44 -0
  43. package/lg-settings.d.ts +15 -0
  44. package/lg-utils.d.ts +1 -1
  45. package/lib/lg-events.js +3 -0
  46. package/lib/lg-events.js.map +1 -1
  47. package/lib/lg-settings.js +8 -0
  48. package/lib/lg-settings.js.map +1 -1
  49. package/lib/lg-utils.js +2 -2
  50. package/lib/lg-utils.js.map +1 -1
  51. package/lib/lgQuery.js +4 -2
  52. package/lib/lgQuery.js.map +1 -1
  53. package/lib/lightgallery.js +11 -10
  54. package/lib/lightgallery.js.map +1 -1
  55. package/lib/plugins/autoplay/lg-autoplay-settings.js +3 -0
  56. package/lib/plugins/autoplay/lg-autoplay-settings.js.map +1 -1
  57. package/lib/plugins/autoplay/lg-autoplay.js +20 -11
  58. package/lib/plugins/autoplay/lg-autoplay.js.map +1 -1
  59. package/lib/plugins/comment/lg-comment-settings.js +3 -0
  60. package/lib/plugins/comment/lg-comment-settings.js.map +1 -1
  61. package/lib/plugins/comment/lg-comment.js +1 -1
  62. package/lib/plugins/comment/lg-comment.js.map +1 -1
  63. package/lib/plugins/fullscreen/lg-fullscreen-settings.js +3 -0
  64. package/lib/plugins/fullscreen/lg-fullscreen-settings.js.map +1 -1
  65. package/lib/plugins/fullscreen/lg-fullscreen.js +1 -2
  66. package/lib/plugins/fullscreen/lg-fullscreen.js.map +1 -1
  67. package/lib/plugins/rotate/lg-rotate-settings.js +6 -0
  68. package/lib/plugins/rotate/lg-rotate-settings.js.map +1 -1
  69. package/lib/plugins/rotate/lg-rotate.js +4 -8
  70. package/lib/plugins/rotate/lg-rotate.js.map +1 -1
  71. package/lib/plugins/share/lg-share-settings.js +1 -0
  72. package/lib/plugins/share/lg-share-settings.js.map +1 -1
  73. package/lib/plugins/share/lg-share.js +1 -1
  74. package/lib/plugins/share/lg-share.js.map +1 -1
  75. package/lib/plugins/thumbnail/lg-thumbnail-settings.js +3 -0
  76. package/lib/plugins/thumbnail/lg-thumbnail-settings.js.map +1 -1
  77. package/lib/plugins/thumbnail/lg-thumbnail.js +3 -1
  78. package/lib/plugins/thumbnail/lg-thumbnail.js.map +1 -1
  79. package/lib/plugins/video/lg-video-utils.js +13 -5
  80. package/lib/plugins/video/lg-video-utils.js.map +1 -1
  81. package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js +8 -0
  82. package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js.map +1 -0
  83. package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js +122 -0
  84. package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js.map +1 -0
  85. package/lib/plugins/zoom/lg-zoom-settings.js +5 -0
  86. package/lib/plugins/zoom/lg-zoom-settings.js.map +1 -1
  87. package/lib/plugins/zoom/lg-zoom.js +2 -2
  88. package/lib/plugins/zoom/lg-zoom.js.map +1 -1
  89. package/lightgallery.d.ts +1 -1
  90. package/lightgallery.es5.js +126 -112
  91. package/lightgallery.es5.js.map +1 -1
  92. package/lightgallery.min.js +2 -2
  93. package/lightgallery.umd.js +126 -112
  94. package/lightgallery.umd.js.map +1 -1
  95. package/lit/lightgallery.esm.js +6 -6
  96. package/lit/lightgallery.umd.js +3 -3
  97. package/package.json +1 -1
  98. package/plugins/autoplay/lg-autoplay-settings.d.ts +7 -0
  99. package/plugins/autoplay/lg-autoplay.d.ts +2 -2
  100. package/plugins/autoplay/lg-autoplay.es5.js +27 -12
  101. package/plugins/autoplay/lg-autoplay.es5.js.map +1 -1
  102. package/plugins/autoplay/lg-autoplay.min.js +2 -2
  103. package/plugins/autoplay/lg-autoplay.umd.js +27 -12
  104. package/plugins/autoplay/lg-autoplay.umd.js.map +1 -1
  105. package/plugins/comment/lg-comment-settings.d.ts +7 -0
  106. package/plugins/comment/lg-comment.es5.js +8 -2
  107. package/plugins/comment/lg-comment.es5.js.map +1 -1
  108. package/plugins/comment/lg-comment.min.js +2 -2
  109. package/plugins/comment/lg-comment.umd.js +8 -2
  110. package/plugins/comment/lg-comment.umd.js.map +1 -1
  111. package/plugins/fullscreen/lg-fullscreen-settings.d.ts +7 -0
  112. package/plugins/fullscreen/lg-fullscreen.es5.js +5 -3
  113. package/plugins/fullscreen/lg-fullscreen.es5.js.map +1 -1
  114. package/plugins/fullscreen/lg-fullscreen.min.js +2 -2
  115. package/plugins/fullscreen/lg-fullscreen.umd.js +5 -3
  116. package/plugins/fullscreen/lg-fullscreen.umd.js.map +1 -1
  117. package/plugins/hash/lg-hash.es5.js +4 -1
  118. package/plugins/hash/lg-hash.es5.js.map +1 -1
  119. package/plugins/hash/lg-hash.min.js +1 -1
  120. package/plugins/hash/lg-hash.umd.js +4 -1
  121. package/plugins/hash/lg-hash.umd.js.map +1 -1
  122. package/plugins/mediumZoom/lg-medium-zoom.es5.js +4 -1
  123. package/plugins/mediumZoom/lg-medium-zoom.es5.js.map +1 -1
  124. package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
  125. package/plugins/mediumZoom/lg-medium-zoom.umd.js +4 -1
  126. package/plugins/mediumZoom/lg-medium-zoom.umd.js.map +1 -1
  127. package/plugins/pager/lg-pager.es5.js +4 -1
  128. package/plugins/pager/lg-pager.es5.js.map +1 -1
  129. package/plugins/pager/lg-pager.min.js +1 -1
  130. package/plugins/pager/lg-pager.umd.js +4 -1
  131. package/plugins/pager/lg-pager.umd.js.map +1 -1
  132. package/plugins/relativeCaption/lg-relative-caption.es5.js +4 -1
  133. package/plugins/relativeCaption/lg-relative-caption.es5.js.map +1 -1
  134. package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
  135. package/plugins/relativeCaption/lg-relative-caption.umd.js +4 -1
  136. package/plugins/relativeCaption/lg-relative-caption.umd.js.map +1 -1
  137. package/plugins/rotate/lg-rotate-settings.d.ts +11 -0
  138. package/plugins/rotate/lg-rotate.es5.js +14 -9
  139. package/plugins/rotate/lg-rotate.es5.js.map +1 -1
  140. package/plugins/rotate/lg-rotate.min.js +2 -2
  141. package/plugins/rotate/lg-rotate.umd.js +14 -9
  142. package/plugins/rotate/lg-rotate.umd.js.map +1 -1
  143. package/plugins/share/lg-share-settings.d.ts +8 -0
  144. package/plugins/share/lg-share.es5.js +6 -2
  145. package/plugins/share/lg-share.es5.js.map +1 -1
  146. package/plugins/share/lg-share.min.js +2 -2
  147. package/plugins/share/lg-share.umd.js +6 -2
  148. package/plugins/share/lg-share.umd.js.map +1 -1
  149. package/plugins/thumbnail/lg-thumbnail-settings.d.ts +8 -0
  150. package/plugins/thumbnail/lg-thumbnail.es5.js +10 -2
  151. package/plugins/thumbnail/lg-thumbnail.es5.js.map +1 -1
  152. package/plugins/thumbnail/lg-thumbnail.min.js +2 -2
  153. package/plugins/thumbnail/lg-thumbnail.umd.js +10 -2
  154. package/plugins/thumbnail/lg-thumbnail.umd.js.map +1 -1
  155. package/plugins/video/lg-video.es5.js +17 -6
  156. package/plugins/video/lg-video.es5.js.map +1 -1
  157. package/plugins/video/lg-video.min.js +2 -2
  158. package/plugins/video/lg-video.umd.js +17 -6
  159. package/plugins/video/lg-video.umd.js.map +1 -1
  160. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.d.ts +11 -0
  161. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.d.ts +14 -0
  162. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +182 -0
  163. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js.map +1 -0
  164. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +8 -0
  165. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +190 -0
  166. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js.map +1 -0
  167. package/plugins/vimeoThumbnail/package.json +7 -0
  168. package/plugins/zoom/lg-zoom-settings.d.ts +9 -0
  169. package/plugins/zoom/lg-zoom.es5.js +11 -3
  170. package/plugins/zoom/lg-zoom.es5.js.map +1 -1
  171. package/plugins/zoom/lg-zoom.min.js +2 -2
  172. package/plugins/zoom/lg-zoom.umd.js +11 -3
  173. package/plugins/zoom/lg-zoom.umd.js.map +1 -1
  174. package/react/Lightgallery.d.ts +5 -1
  175. package/react/Lightgallery.es5.js +155 -113
  176. package/react/Lightgallery.es5.js.map +1 -1
  177. package/react/Lightgallery.umd.js +155 -113
  178. package/react/Lightgallery.umd.js.map +1 -1
  179. package/scss/lightgallery-core.scss +0 -1
  180. package/vue/LightGallery.vue.d.ts +5 -1
  181. package/vue/LightGalleryVue.common.js +140 -110
  182. package/vue/LightGalleryVue.common.js.map +1 -1
  183. package/vue/LightGalleryVue.umd.js +140 -110
  184. package/vue/LightGalleryVue.umd.js.map +1 -1
  185. package/vue/LightGalleryVue.umd.min.js +1 -1
  186. package/vue/LightGalleryVue.umd.min.js.map +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.3.0 | October 28th 2021
2
+ * lightgallery | 2.5.0-beta.1 | February 24th 2022
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -39,6 +39,116 @@ function __spreadArrays() {
39
39
  return r;
40
40
  }
41
41
 
42
+ /**
43
+ * List of lightGallery events
44
+ * All events should be documented here
45
+ * Below interfaces are used to build the website documentations
46
+ * */
47
+ var lGEvents = {
48
+ afterAppendSlide: 'lgAfterAppendSlide',
49
+ init: 'lgInit',
50
+ hasVideo: 'lgHasVideo',
51
+ containerResize: 'lgContainerResize',
52
+ updateSlides: 'lgUpdateSlides',
53
+ afterAppendSubHtml: 'lgAfterAppendSubHtml',
54
+ beforeOpen: 'lgBeforeOpen',
55
+ afterOpen: 'lgAfterOpen',
56
+ slideItemLoad: 'lgSlideItemLoad',
57
+ beforeSlide: 'lgBeforeSlide',
58
+ afterSlide: 'lgAfterSlide',
59
+ posterClick: 'lgPosterClick',
60
+ dragStart: 'lgDragStart',
61
+ dragMove: 'lgDragMove',
62
+ dragEnd: 'lgDragEnd',
63
+ beforeNextSlide: 'lgBeforeNextSlide',
64
+ beforePrevSlide: 'lgBeforePrevSlide',
65
+ beforeClose: 'lgBeforeClose',
66
+ afterClose: 'lgAfterClose',
67
+ rotateLeft: 'lgRotateLeft',
68
+ rotateRight: 'lgRotateRight',
69
+ flipHorizontal: 'lgFlipHorizontal',
70
+ flipVertical: 'lgFlipVertical',
71
+ autoplay: 'lgAutoplay',
72
+ autoplayStart: 'lgAutoplayStart',
73
+ autoplayStop: 'lgAutoplayStop',
74
+ };
75
+
76
+ var lightGalleryCoreSettings = {
77
+ mode: 'lg-slide',
78
+ easing: 'ease',
79
+ speed: 400,
80
+ licenseKey: '0000-0000-000-0000',
81
+ height: '100%',
82
+ width: '100%',
83
+ addClass: '',
84
+ startClass: 'lg-start-zoom',
85
+ backdropDuration: 300,
86
+ container: '',
87
+ startAnimationDuration: 400,
88
+ zoomFromOrigin: true,
89
+ hideBarsDelay: 0,
90
+ showBarsAfter: 10000,
91
+ slideDelay: 0,
92
+ supportLegacyBrowser: true,
93
+ allowMediaOverlap: false,
94
+ videoMaxSize: '1280-720',
95
+ loadYouTubePoster: true,
96
+ defaultCaptionHeight: 0,
97
+ ariaLabelledby: '',
98
+ ariaDescribedby: '',
99
+ closable: true,
100
+ swipeToClose: true,
101
+ closeOnTap: true,
102
+ showCloseIcon: true,
103
+ showMaximizeIcon: false,
104
+ loop: true,
105
+ escKey: true,
106
+ keyPress: true,
107
+ controls: true,
108
+ slideEndAnimation: true,
109
+ hideControlOnEnd: false,
110
+ mousewheel: false,
111
+ getCaptionFromTitleOrAlt: true,
112
+ appendSubHtmlTo: '.lg-sub-html',
113
+ subHtmlSelectorRelative: false,
114
+ preload: 2,
115
+ numberOfSlideItemsInDom: 10,
116
+ selector: '',
117
+ selectWithin: '',
118
+ nextHtml: '',
119
+ prevHtml: '',
120
+ index: 0,
121
+ iframeWidth: '100%',
122
+ iframeHeight: '100%',
123
+ iframeMaxWidth: '100%',
124
+ iframeMaxHeight: '100%',
125
+ download: true,
126
+ counter: true,
127
+ appendCounterTo: '.lg-toolbar',
128
+ swipeThreshold: 50,
129
+ enableSwipe: true,
130
+ enableDrag: true,
131
+ dynamic: false,
132
+ dynamicEl: [],
133
+ extraProps: [],
134
+ exThumbImage: '',
135
+ isMobile: undefined,
136
+ mobileSettings: {
137
+ controls: false,
138
+ showCloseIcon: false,
139
+ download: false,
140
+ },
141
+ plugins: [],
142
+ strings: {
143
+ closeGallery: 'Close gallery',
144
+ toggleMaximize: 'Toggle maximize',
145
+ previousSlide: 'Previous slide',
146
+ nextSlide: 'Next slide',
147
+ download: 'Download',
148
+ playVideo: 'Play video',
149
+ },
150
+ };
151
+
42
152
  function initLgPolyfills() {
43
153
  (function () {
44
154
  if (typeof window.CustomEvent === 'function')
@@ -296,8 +406,10 @@ var lgQuery = /** @class */ (function () {
296
406
  // Does not support IE
297
407
  lgQuery.prototype.load = function (url) {
298
408
  var _this = this;
299
- fetch(url).then(function (res) {
300
- _this.selector.innerHTML = res;
409
+ fetch(url)
410
+ .then(function (res) { return res.text(); })
411
+ .then(function (html) {
412
+ _this.selector.innerHTML = html;
301
413
  });
302
414
  return this;
303
415
  };
@@ -595,7 +707,7 @@ var utils = {
595
707
  // No other way of checking: assume it’s ok.
596
708
  return true;
597
709
  },
598
- getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, _isVideo) {
710
+ getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {
599
711
  var videoClass = '';
600
712
  if (_isVideo && _isVideo.youtube) {
601
713
  videoClass = 'lg-has-youtube';
@@ -606,7 +718,7 @@ var utils = {
606
718
  else {
607
719
  videoClass = 'lg-has-html5';
608
720
  }
609
- return "<div class=\"lg-video-cont " + videoClass + "\" style=\"" + videoContStyle + "\">\n <div class=\"lg-video-play-button\">\n <svg\n viewBox=\"0 0 20 20\"\n preserveAspectRatio=\"xMidYMid\"\n focusable=\"false\"\n aria-labelledby=\"Play video\"\n role=\"img\"\n class=\"lg-video-play-icon\"\n >\n <title>Play video</title>\n <polygon class=\"lg-video-play-icon-inner\" points=\"1,0 20,10 1,20\"></polygon>\n </svg>\n <svg class=\"lg-video-play-icon-bg\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle></svg>\n <svg class=\"lg-video-play-icon-circle\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle>\n </svg>\n </div>\n " + (dummyImg || '') + "\n <img class=\"lg-object lg-video-poster\" src=\"" + _poster + "\" />\n </div>";
721
+ return "<div class=\"lg-video-cont " + videoClass + "\" style=\"" + videoContStyle + "\">\n <div class=\"lg-video-play-button\">\n <svg\n viewBox=\"0 0 20 20\"\n preserveAspectRatio=\"xMidYMid\"\n focusable=\"false\"\n aria-labelledby=\"" + playVideoString + "\"\n role=\"img\"\n class=\"lg-video-play-icon\"\n >\n <title>" + playVideoString + "</title>\n <polygon class=\"lg-video-play-icon-inner\" points=\"1,0 20,10 1,20\"></polygon>\n </svg>\n <svg class=\"lg-video-play-icon-bg\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle></svg>\n <svg class=\"lg-video-play-icon-circle\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle>\n </svg>\n </div>\n " + (dummyImg || '') + "\n <img class=\"lg-object lg-video-poster\" src=\"" + _poster + "\" />\n </div>";
610
722
  },
611
723
  /**
612
724
  * @desc Create dynamic elements array from gallery items when dynamic option is false
@@ -694,105 +806,6 @@ var utils = {
694
806
  },
695
807
  };
696
808
 
697
- var lightGalleryCoreSettings = {
698
- mode: 'lg-slide',
699
- easing: 'ease',
700
- speed: 400,
701
- licenseKey: '0000-0000-000-0000',
702
- height: '100%',
703
- width: '100%',
704
- addClass: '',
705
- startClass: 'lg-start-zoom',
706
- backdropDuration: 300,
707
- container: '',
708
- startAnimationDuration: 400,
709
- zoomFromOrigin: true,
710
- hideBarsDelay: 0,
711
- showBarsAfter: 10000,
712
- slideDelay: 0,
713
- supportLegacyBrowser: true,
714
- allowMediaOverlap: false,
715
- videoMaxSize: '1280-720',
716
- loadYouTubePoster: true,
717
- defaultCaptionHeight: 0,
718
- ariaLabelledby: '',
719
- ariaDescribedby: '',
720
- closable: true,
721
- swipeToClose: true,
722
- closeOnTap: true,
723
- showCloseIcon: true,
724
- showMaximizeIcon: false,
725
- loop: true,
726
- escKey: true,
727
- keyPress: true,
728
- controls: true,
729
- slideEndAnimation: true,
730
- hideControlOnEnd: false,
731
- mousewheel: false,
732
- getCaptionFromTitleOrAlt: true,
733
- appendSubHtmlTo: '.lg-sub-html',
734
- subHtmlSelectorRelative: false,
735
- preload: 2,
736
- numberOfSlideItemsInDom: 10,
737
- selector: '',
738
- selectWithin: '',
739
- nextHtml: '',
740
- prevHtml: '',
741
- index: 0,
742
- iframeWidth: '100%',
743
- iframeHeight: '100%',
744
- iframeMaxWidth: '100%',
745
- iframeMaxHeight: '100%',
746
- download: true,
747
- counter: true,
748
- appendCounterTo: '.lg-toolbar',
749
- swipeThreshold: 50,
750
- enableSwipe: true,
751
- enableDrag: true,
752
- dynamic: false,
753
- dynamicEl: [],
754
- extraProps: [],
755
- exThumbImage: '',
756
- isMobile: undefined,
757
- mobileSettings: {
758
- controls: false,
759
- showCloseIcon: false,
760
- download: false,
761
- },
762
- plugins: [],
763
- };
764
-
765
- /**
766
- * List of lightGallery events
767
- * All events should be documented here
768
- * Below interfaces are used to build the website documentations
769
- * */
770
- var lGEvents = {
771
- afterAppendSlide: 'lgAfterAppendSlide',
772
- init: 'lgInit',
773
- hasVideo: 'lgHasVideo',
774
- containerResize: 'lgContainerResize',
775
- updateSlides: 'lgUpdateSlides',
776
- afterAppendSubHtml: 'lgAfterAppendSubHtml',
777
- beforeOpen: 'lgBeforeOpen',
778
- afterOpen: 'lgAfterOpen',
779
- slideItemLoad: 'lgSlideItemLoad',
780
- beforeSlide: 'lgBeforeSlide',
781
- afterSlide: 'lgAfterSlide',
782
- posterClick: 'lgPosterClick',
783
- dragStart: 'lgDragStart',
784
- dragMove: 'lgDragMove',
785
- dragEnd: 'lgDragEnd',
786
- beforeNextSlide: 'lgBeforeNextSlide',
787
- beforePrevSlide: 'lgBeforePrevSlide',
788
- beforeClose: 'lgBeforeClose',
789
- afterClose: 'lgAfterClose',
790
- rotateLeft: 'lgRotateLeft',
791
- rotateRight: 'lgRotateRight',
792
- flipHorizontal: 'lgFlipHorizontal',
793
- flipVertical: 'lgFlipVertical',
794
- };
795
-
796
809
  // @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio
797
810
  // @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html
798
811
  // Unique id for each gallery
@@ -964,7 +977,7 @@ var LightGallery = /** @class */ (function () {
964
977
  var subHtmlCont = '';
965
978
  // Create controls
966
979
  if (this.settings.controls) {
967
- controls = "<button type=\"button\" id=\"" + this.getIdName('lg-prev') + "\" aria-label=\"Previous slide\" class=\"lg-prev lg-icon\"> " + this.settings.prevHtml + " </button>\n <button type=\"button\" id=\"" + this.getIdName('lg-next') + "\" aria-label=\"Next slide\" class=\"lg-next lg-icon\"> " + this.settings.nextHtml + " </button>";
980
+ controls = "<button type=\"button\" id=\"" + this.getIdName('lg-prev') + "\" aria-label=\"" + this.settings.strings['previousSlide'] + "\" class=\"lg-prev lg-icon\"> " + this.settings.prevHtml + " </button>\n <button type=\"button\" id=\"" + this.getIdName('lg-next') + "\" aria-label=\"" + this.settings.strings['nextSlide'] + "\" class=\"lg-next lg-icon\"> " + this.settings.nextHtml + " </button>";
968
981
  }
969
982
  if (this.settings.appendSubHtmlTo !== '.lg-item') {
970
983
  subHtmlCont =
@@ -983,19 +996,20 @@ var LightGallery = /** @class */ (function () {
983
996
  : '';
984
997
  var containerClassName = "lg-container " + this.settings.addClass + " " + (document.body !== this.settings.container ? 'lg-inline' : '');
985
998
  var closeIcon = this.settings.closable && this.settings.showCloseIcon
986
- ? "<button type=\"button\" aria-label=\"Close gallery\" id=\"" + this.getIdName('lg-close') + "\" class=\"lg-close lg-icon\"></button>"
999
+ ? "<button type=\"button\" aria-label=\"" + this.settings.strings['closeGallery'] + "\" id=\"" + this.getIdName('lg-close') + "\" class=\"lg-close lg-icon\"></button>"
987
1000
  : '';
988
1001
  var maximizeIcon = this.settings.showMaximizeIcon
989
- ? "<button type=\"button\" aria-label=\"Toggle maximize\" id=\"" + this.getIdName('lg-maximize') + "\" class=\"lg-maximize lg-icon\"></button>"
1002
+ ? "<button type=\"button\" aria-label=\"" + this.settings.strings['toggleMaximize'] + "\" id=\"" + this.getIdName('lg-maximize') + "\" class=\"lg-maximize lg-icon\"></button>"
990
1003
  : '';
991
1004
  var template = "\n <div class=\"" + containerClassName + "\" id=\"" + this.getIdName('lg-container') + "\" tabindex=\"-1\" aria-modal=\"true\" " + ariaLabelledby + " " + ariaDescribedby + " role=\"dialog\"\n >\n <div id=\"" + this.getIdName('lg-backdrop') + "\" class=\"lg-backdrop\"></div>\n\n <div id=\"" + this.getIdName('lg-outer') + "\" class=\"lg-outer lg-use-css3 lg-css3 lg-hide-items " + addClasses + " \">\n\n <div id=\"" + this.getIdName('lg-content') + "\" class=\"lg-content\">\n <div id=\"" + this.getIdName('lg-inner') + "\" class=\"lg-inner\">\n </div>\n " + controls + "\n </div>\n <div id=\"" + this.getIdName('lg-toolbar') + "\" class=\"lg-toolbar lg-group\">\n " + maximizeIcon + "\n " + closeIcon + "\n </div>\n " + (this.settings.appendSubHtmlTo === '.lg-outer'
992
1005
  ? subHtmlCont
993
1006
  : '') + "\n <div id=\"" + this.getIdName('lg-components') + "\" class=\"lg-components\">\n " + (this.settings.appendSubHtmlTo === '.lg-sub-html'
994
1007
  ? subHtmlCont
995
1008
  : '') + "\n </div>\n </div>\n </div>\n ";
996
- $LG(this.settings.container)
997
- .css('position', 'relative')
998
- .append(template);
1009
+ $LG(this.settings.container).append(template);
1010
+ if (document.body !== this.settings.container) {
1011
+ $LG(this.settings.container).css('position', 'relative');
1012
+ }
999
1013
  this.outer = this.getElementById('lg-outer');
1000
1014
  this.$lgComponents = this.getElementById('lg-components');
1001
1015
  this.$backdrop = this.getElementById('lg-backdrop');
@@ -1013,7 +1027,7 @@ var LightGallery = /** @class */ (function () {
1013
1027
  this.$inner.css('transition-timing-function', this.settings.easing);
1014
1028
  this.$inner.css('transition-duration', this.settings.speed + 'ms');
1015
1029
  if (this.settings.download) {
1016
- this.$toolbar.append("<a id=\"" + this.getIdName('lg-download') + "\" target=\"_blank\" rel=\"noopener\" aria-label=\"Download\" download class=\"lg-download lg-icon\"></a>");
1030
+ this.$toolbar.append("<a id=\"" + this.getIdName('lg-download') + "\" target=\"_blank\" rel=\"noopener\" aria-label=\"" + this.settings.strings['download'] + "\" download class=\"lg-download lg-icon\"></a>");
1017
1031
  }
1018
1032
  this.counter();
1019
1033
  $LG(window).on("resize.lg.global" + this.lgId + " orientationchange.lg.global" + this.lgId, function () {
@@ -1593,7 +1607,7 @@ var LightGallery = /** @class */ (function () {
1593
1607
  if (hasStartAnimation) {
1594
1608
  dummyImg = this.getDummyImageContent($currentSlide, index, '');
1595
1609
  }
1596
- var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, videoInfo);
1610
+ var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);
1597
1611
  $currentSlide.prepend(markup);
1598
1612
  }
1599
1613
  else if (videoInfo) {