UNPKG

42.3 kBSource Map (JSON)View Raw
1{"version":3,"file":"lg-thumbnail.es5.js","sources":["../../../src/plugins/thumbnail/lg-thumbnail-settings.ts","../../../src/lg-events.ts","../../../src/plugins/thumbnail/lg-thumbnail.ts"],"sourcesContent":["interface ThumbnailStrings {\n toggleThumbnails: string;\n}\n\nexport interface ThumbnailsSettings {\n /**\n * Enable thumbnails for the gallery\n */\n thumbnail: boolean;\n\n /*\n * Enable thumbnail animation.\n */\n animateThumb: boolean;\n\n /**\n * Position of selected thumbnail.\n */\n currentPagerPosition: 'left' | 'middle' | 'right';\n\n /**\n * Position of thumbnails when the width of all thumbnails combined is less than the gallery's width.\n *\n */\n alignThumbnails: 'left' | 'middle' | 'right';\n\n /**\n * Width of each thumbnails.\n */\n thumbWidth: number;\n\n /**\n * Height of each thumbnails.\n */\n thumbHeight: string;\n\n /**\n * Spacing between each thumbnails\n */\n thumbMargin: number;\n\n /**\n * control where the thumbnails should be appended.\n * By default, thumbnails are appended to '.lg-components' which has inbuilt open close transitions\n * If you don't want initial thumbnails transitions, or want to do more customization,\n * you can append thumbnails to the lightGalley outer div -\n * <a href=\"/demos/thumbnails/#static-thumbnails\">Demo</a>\n */\n appendThumbnailsTo: '.lg-outer' | '.lg-components';\n\n /**\n * Enable toggle captions and thumbnails.\n * @description not applicable if allowMediaOverlap is false\n */\n toggleThumb: boolean;\n\n /**\n * Enables desktop mouse drag support for thumbnails.\n */\n enableThumbDrag: boolean;\n\n /**\n * Enables thumbnail touch/swipe support for touch devices\n */\n enableThumbSwipe: boolean;\n\n /**\n * By setting the thumbnailSwipeThreshold (in px) you can set how far the user must swipe for the next/prev slide.\n */\n thumbnailSwipeThreshold: number;\n\n /**\n * You can automatically load thumbnails for YouTube videos from YouTube by setting loadYouTubeThumbnail true\n */\n loadYouTubeThumbnail: boolean;\n\n /**\n * You can specify the thumbnail size by setting respective number.\n */\n //@todo add demo\n youTubeThumbSize: number;\n\n /**\n * Custom translation strings for aria-labels\n */\n thumbnailPluginStrings: ThumbnailStrings;\n}\n\nexport const thumbnailsSettings: ThumbnailsSettings = {\n thumbnail: true,\n\n animateThumb: true,\n currentPagerPosition: 'middle',\n alignThumbnails: 'middle',\n\n thumbWidth: 100,\n thumbHeight: '80px',\n thumbMargin: 5,\n\n appendThumbnailsTo: '.lg-components',\n toggleThumb: false,\n\n enableThumbDrag: true,\n enableThumbSwipe: true,\n thumbnailSwipeThreshold: 10,\n\n loadYouTubeThumbnail: true,\n youTubeThumbSize: 1,\n\n thumbnailPluginStrings: {\n toggleThumbnails: 'Toggle thumbnails',\n } as ThumbnailStrings,\n};\n","import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see <a href=\"/docs/methods\">Methods<a>\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n * <p>\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n * </p>\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","import {\n ThumbnailsSettings,\n thumbnailsSettings,\n} from './lg-thumbnail-settings';\nimport { LgQuery, lgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { GalleryItem } from '../../lg-utils';\nimport { lGEvents } from '../../lg-events';\n\ninterface ThumbDragUtils {\n cords: {\n startX: number;\n endX: number;\n };\n isMoved: boolean;\n newTranslateX: number;\n startTime: Date;\n endTime: Date;\n touchMoveTime: number;\n}\ninterface ThumbnailGalleryItem extends GalleryItem {\n thumb: string;\n}\nexport default class Thumbnail {\n private core: LightGallery;\n private $thumbOuter!: lgQuery;\n private $lgThumb!: lgQuery;\n private thumbOuterWidth = 0;\n private thumbTotalWidth = 0;\n private translateX = 0;\n private thumbClickable = false;\n private settings!: ThumbnailsSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n return this;\n }\n\n init(): void {\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...thumbnailsSettings,\n ...this.core.settings,\n };\n this.thumbOuterWidth = 0;\n this.thumbTotalWidth =\n this.core.galleryItems.length *\n (this.settings.thumbWidth + this.settings.thumbMargin);\n\n // Thumbnail animation value\n this.translateX = 0;\n\n this.setAnimateThumbStyles();\n\n if (!this.core.settings.allowMediaOverlap) {\n this.settings.toggleThumb = false;\n }\n\n if (this.settings.thumbnail) {\n this.build();\n if (this.settings.animateThumb) {\n if (this.settings.enableThumbDrag) {\n this.enableThumbDrag();\n }\n\n if (this.settings.enableThumbSwipe) {\n this.enableThumbSwipe();\n }\n\n this.thumbClickable = false;\n } else {\n this.thumbClickable = true;\n }\n\n this.toggleThumbBar();\n this.thumbKeyPress();\n }\n }\n\n build(): void {\n this.setThumbMarkup();\n this.manageActiveClassOnSlideChange();\n this.$lgThumb.first().on('click.lg touchend.lg', (e: CustomEvent) => {\n const $target = this.$LG(e.target);\n if (!$target.hasAttribute('data-lg-item-id')) {\n return;\n }\n setTimeout(() => {\n // In IE9 and bellow touch does not support\n // Go to slide if browser does not support css transitions\n if (this.thumbClickable && !this.core.lgBusy) {\n const index = parseInt($target.attr('data-lg-item-id'));\n this.core.slide(index, false, true, false);\n }\n }, 50);\n });\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.thumb`, (event) => {\n const { index } = event.detail;\n this.animateThumb(index);\n });\n this.core.LGel.on(`${lGEvents.beforeOpen}.thumb`, () => {\n this.thumbOuterWidth = this.core.outer.get().offsetWidth;\n });\n\n this.core.LGel.on(`${lGEvents.updateSlides}.thumb`, () => {\n this.rebuildThumbnails();\n });\n this.core.LGel.on(`${lGEvents.containerResize}.thumb`, () => {\n if (!this.core.lgOpened) return;\n setTimeout(() => {\n this.thumbOuterWidth = this.core.outer.get().offsetWidth;\n this.animateThumb(this.core.index);\n this.thumbOuterWidth = this.core.outer.get().offsetWidth;\n }, 50);\n });\n }\n\n setThumbMarkup(): void {\n let thumbOuterClassNames = 'lg-thumb-outer ';\n\n if (this.settings.alignThumbnails) {\n thumbOuterClassNames += `lg-thumb-align-${this.settings.alignThumbnails}`;\n }\n\n const html = `<div class=\"${thumbOuterClassNames}\">\n <div class=\"lg-thumb lg-group\">\n </div>\n </div>`;\n\n this.core.outer.addClass('lg-has-thumb');\n\n if (this.settings.appendThumbnailsTo === '.lg-components') {\n this.core.$lgComponents.append(html);\n } else {\n this.core.outer.append(html);\n }\n\n this.$thumbOuter = this.core.outer.find('.lg-thumb-outer').first();\n this.$lgThumb = this.core.outer.find('.lg-thumb').first();\n\n if (this.settings.animateThumb) {\n this.core.outer\n .find('.lg-thumb')\n .css('transition-duration', this.core.settings.speed + 'ms')\n .css('width', this.thumbTotalWidth + 'px')\n .css('position', 'relative');\n }\n\n this.setThumbItemHtml(\n (this.core.galleryItems as unknown) as ThumbnailGalleryItem[],\n );\n }\n\n enableThumbDrag(): void {\n let thumbDragUtils: ThumbDragUtils = {\n cords: {\n startX: 0,\n endX: 0,\n },\n isMoved: false,\n newTranslateX: 0,\n startTime: new Date(),\n endTime: new Date(),\n touchMoveTime: 0,\n };\n\n let isDragging = false;\n\n this.$thumbOuter.addClass('lg-grab');\n\n this.core.outer\n .find('.lg-thumb')\n .first()\n .on('mousedown.lg.thumb', (e) => {\n if (this.thumbTotalWidth > this.thumbOuterWidth) {\n // execute only on .lg-object\n e.preventDefault();\n thumbDragUtils.cords.startX = e.pageX;\n\n thumbDragUtils.startTime = new Date();\n this.thumbClickable = false;\n\n isDragging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n this.core.outer.get().scrollLeft += 1;\n this.core.outer.get().scrollLeft -= 1;\n\n // *\n this.$thumbOuter\n .removeClass('lg-grab')\n .addClass('lg-grabbing');\n }\n });\n\n this.$LG(window).on(\n `mousemove.lg.thumb.global${this.core.lgId}`,\n (e) => {\n if (!this.core.lgOpened) return;\n if (isDragging) {\n thumbDragUtils.cords.endX = e.pageX;\n\n thumbDragUtils = this.onThumbTouchMove(thumbDragUtils);\n }\n },\n );\n\n this.$LG(window).on(`mouseup.lg.thumb.global${this.core.lgId}`, () => {\n if (!this.core.lgOpened) return;\n if (thumbDragUtils.isMoved) {\n thumbDragUtils = this.onThumbTouchEnd(thumbDragUtils);\n } else {\n this.thumbClickable = true;\n }\n\n if (isDragging) {\n isDragging = false;\n this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');\n }\n });\n }\n\n enableThumbSwipe(): void {\n let thumbDragUtils: ThumbDragUtils = {\n cords: {\n startX: 0,\n endX: 0,\n },\n isMoved: false,\n newTranslateX: 0,\n startTime: new Date(),\n endTime: new Date(),\n touchMoveTime: 0,\n };\n\n this.$lgThumb.on('touchstart.lg', (e: TouchEvent) => {\n if (this.thumbTotalWidth > this.thumbOuterWidth) {\n e.preventDefault();\n thumbDragUtils.cords.startX = e.targetTouches[0].pageX;\n this.thumbClickable = false;\n thumbDragUtils.startTime = new Date();\n }\n });\n\n this.$lgThumb.on('touchmove.lg', (e: TouchEvent) => {\n if (this.thumbTotalWidth > this.thumbOuterWidth) {\n e.preventDefault();\n thumbDragUtils.cords.endX = e.targetTouches[0].pageX;\n thumbDragUtils = this.onThumbTouchMove(thumbDragUtils);\n }\n });\n\n this.$lgThumb.on('touchend.lg', () => {\n if (thumbDragUtils.isMoved) {\n thumbDragUtils = this.onThumbTouchEnd(thumbDragUtils);\n } else {\n this.thumbClickable = true;\n }\n });\n }\n\n // Rebuild thumbnails\n rebuildThumbnails(): void {\n // Remove transitions\n this.$thumbOuter.addClass('lg-rebuilding-thumbnails');\n setTimeout(() => {\n this.thumbTotalWidth =\n this.core.galleryItems.length *\n (this.settings.thumbWidth + this.settings.thumbMargin);\n this.$lgThumb.css('width', this.thumbTotalWidth + 'px');\n this.$lgThumb.empty();\n this.setThumbItemHtml(\n (this.core.galleryItems as unknown) as ThumbnailGalleryItem[],\n );\n this.animateThumb(this.core.index);\n }, 50);\n setTimeout(() => {\n this.$thumbOuter.removeClass('lg-rebuilding-thumbnails');\n }, 200);\n }\n\n // @ts-check\n\n setTranslate(value: number): void {\n this.$lgThumb.css(\n 'transform',\n 'translate3d(-' + value + 'px, 0px, 0px)',\n );\n }\n\n getPossibleTransformX(left: number): number {\n if (left > this.thumbTotalWidth - this.thumbOuterWidth) {\n left = this.thumbTotalWidth - this.thumbOuterWidth;\n }\n\n if (left < 0) {\n left = 0;\n }\n return left;\n }\n\n animateThumb(index: number): void {\n this.$lgThumb.css(\n 'transition-duration',\n this.core.settings.speed + 'ms',\n );\n if (this.settings.animateThumb) {\n let position = 0;\n switch (this.settings.currentPagerPosition) {\n case 'left':\n position = 0;\n break;\n case 'middle':\n position =\n this.thumbOuterWidth / 2 - this.settings.thumbWidth / 2;\n break;\n case 'right':\n position = this.thumbOuterWidth - this.settings.thumbWidth;\n }\n this.translateX =\n (this.settings.thumbWidth + this.settings.thumbMargin) * index -\n 1 -\n position;\n if (this.translateX > this.thumbTotalWidth - this.thumbOuterWidth) {\n this.translateX = this.thumbTotalWidth - this.thumbOuterWidth;\n }\n\n if (this.translateX < 0) {\n this.translateX = 0;\n }\n\n this.setTranslate(this.translateX);\n }\n }\n\n onThumbTouchMove(thumbDragUtils: ThumbDragUtils): ThumbDragUtils {\n thumbDragUtils.newTranslateX = this.translateX;\n thumbDragUtils.isMoved = true;\n\n thumbDragUtils.touchMoveTime = new Date().valueOf();\n\n thumbDragUtils.newTranslateX -=\n thumbDragUtils.cords.endX - thumbDragUtils.cords.startX;\n\n thumbDragUtils.newTranslateX = this.getPossibleTransformX(\n thumbDragUtils.newTranslateX,\n );\n\n // move current slide\n this.setTranslate(thumbDragUtils.newTranslateX);\n this.$thumbOuter.addClass('lg-dragging');\n\n return thumbDragUtils;\n }\n\n onThumbTouchEnd(thumbDragUtils: ThumbDragUtils): ThumbDragUtils {\n thumbDragUtils.isMoved = false;\n thumbDragUtils.endTime = new Date();\n this.$thumbOuter.removeClass('lg-dragging');\n\n const touchDuration =\n thumbDragUtils.endTime.valueOf() -\n thumbDragUtils.startTime.valueOf();\n let distanceXnew =\n thumbDragUtils.cords.endX - thumbDragUtils.cords.startX;\n let speedX = Math.abs(distanceXnew) / touchDuration;\n // Some magical numbers\n // Can be improved\n if (\n speedX > 0.15 &&\n thumbDragUtils.endTime.valueOf() - thumbDragUtils.touchMoveTime < 30\n ) {\n speedX += 1;\n\n if (speedX > 2) {\n speedX += 1;\n }\n speedX =\n speedX +\n speedX * (Math.abs(distanceXnew) / this.thumbOuterWidth);\n this.$lgThumb.css(\n 'transition-duration',\n Math.min(speedX - 1, 2) + 'settings',\n );\n\n distanceXnew = distanceXnew * speedX;\n\n this.translateX = this.getPossibleTransformX(\n this.translateX - distanceXnew,\n );\n this.setTranslate(this.translateX);\n } else {\n this.translateX = thumbDragUtils.newTranslateX;\n }\n if (\n Math.abs(thumbDragUtils.cords.endX - thumbDragUtils.cords.startX) <\n this.settings.thumbnailSwipeThreshold\n ) {\n this.thumbClickable = true;\n }\n\n return thumbDragUtils;\n }\n\n getThumbHtml(thumb: string, index: number): string {\n const slideVideoInfo =\n this.core.galleryItems[index].__slideVideoInfo || {};\n let thumbImg;\n\n if (slideVideoInfo.youtube) {\n if (this.settings.loadYouTubeThumbnail) {\n thumbImg =\n '//img.youtube.com/vi/' +\n slideVideoInfo.youtube[1] +\n '/' +\n this.settings.youTubeThumbSize +\n '.jpg';\n } else {\n thumbImg = thumb;\n }\n } else {\n thumbImg = thumb;\n }\n\n return `<div data-lg-item-id=\"${index}\" class=\"lg-thumb-item ${\n index === this.core.index ? ' active' : ''\n }\" \n style=\"width:${this.settings.thumbWidth}px; height: ${\n this.settings.thumbHeight\n };\n margin-right: ${this.settings.thumbMargin}px;\">\n <img data-lg-item-id=\"${index}\" src=\"${thumbImg}\" />\n </div>`;\n }\n\n getThumbItemHtml(items: ThumbnailGalleryItem[]): string {\n let thumbList = '';\n for (let i = 0; i < items.length; i++) {\n thumbList += this.getThumbHtml(items[i].thumb, i);\n }\n\n return thumbList;\n }\n\n setThumbItemHtml(items: ThumbnailGalleryItem[]): void {\n const thumbList = this.getThumbItemHtml(items);\n this.$lgThumb.html(thumbList);\n }\n\n setAnimateThumbStyles(): void {\n if (this.settings.animateThumb) {\n this.core.outer.addClass('lg-animate-thumb');\n }\n }\n\n // Manage thumbnail active calss\n manageActiveClassOnSlideChange(): void {\n // manage active class for thumbnail\n this.core.LGel.on(\n `${lGEvents.beforeSlide}.thumb`,\n (event: CustomEvent) => {\n const $thumb = this.core.outer.find('.lg-thumb-item');\n const { index } = event.detail;\n $thumb.removeClass('active');\n $thumb.eq(index).addClass('active');\n },\n );\n }\n\n // Toggle thumbnail bar\n toggleThumbBar(): void {\n if (this.settings.toggleThumb) {\n this.core.outer.addClass('lg-can-toggle');\n this.core.$toolbar.append(\n '<button type=\"button\" aria-label=\"' +\n this.settings.thumbnailPluginStrings['toggleThumbnails'] +\n '\" class=\"lg-toggle-thumb lg-icon\"></button>',\n );\n this.core.outer\n .find('.lg-toggle-thumb')\n .first()\n .on('click.lg', () => {\n this.core.outer.toggleClass('lg-components-open');\n });\n }\n }\n\n thumbKeyPress(): void {\n this.$LG(window).on(`keydown.lg.thumb.global${this.core.lgId}`, (e) => {\n if (!this.core.lgOpened || !this.settings.toggleThumb) return;\n\n if (e.keyCode === 38) {\n e.preventDefault();\n this.core.outer.addClass('lg-components-open');\n } else if (e.keyCode === 40) {\n e.preventDefault();\n this.core.outer.removeClass('lg-components-open');\n }\n });\n }\n\n destroy(): void {\n if (this.settings.thumbnail) {\n this.$LG(window).off(`.lg.thumb.global${this.core.lgId}`);\n this.core.LGel.off('.lg.thumb');\n this.core.LGel.off('.thumb');\n this.$thumbOuter.remove();\n this.core.outer.removeClass('lg-has-thumb');\n }\n }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