import { Layout, StzhGalleryItem } from "../../index"; import { StzhGalleryLocalizedText } from "./stzh-gallery.localization"; import "photoswipe/style.css"; /** * @slot - Slot for custom content if `variant="custom"` is used, lightbox will query for stzh-figure (this.itemElement) elements */ export declare class StzhGallery { /** Translation strings */ localization: StzhGalleryLocalizedText; /** Aspect ratio */ ratio: Layout.Ratio; /** Aspect ratio above small breakpoint */ ratioSmall: Layout.Ratio | "inherit"; /** Aspect ratio above medium breakpoint */ ratioMedium: Layout.Ratio | "inherit"; /** Aspect ratio above large breakpoint */ ratioLarge: Layout.Ratio | "inherit"; /** Aspect ratio above ultra breakpoint */ ratioUltra: Layout.Ratio | "inherit"; /** Nr of images shown (only for grid variant) */ showItems: number; private _initialShowItems; /** Whether indicator should be shown */ carouselWithTrack: boolean; /** Nr of items shown when more link is clicked (only for grid variant) */ stepItems: number; /** * Images in gallery. * Array of objects that must at least include `width`, `height` and `src` attribute: * `[{"width": 2522, "height": 1075, "src": "media/images/example.jpg"}, {"width": 2050, "height": 1367, "src": "media/images/example2.jpg"}]` * * Possible other optional properties are: * `alt`: Alternative image description * / `srcLightbox`: `src` for img tag inside lightbox (overwrites `src`) * / `srcsetLightbox`: `srcset` for img tag inside lightbox * / `copyright`: Copyright inside caption * / `heading`: Heading inside caption * / `headingLightbox`: Alternative heading for lightbox (overwrites `heading`) * / `caption`: Caption * / `captionLightbox`: Caption for lightbox (overwrites `caption`) * / `lightboxHtml`: Alternative html content for lightbox caption * / `hideCounter`: Whether to hide counter */ images: StzhGalleryItem[] | string; private _images; private _imagesShown; private _imagesLightboxDataSource; private _showMoreLink; /** * Variant: * `carousel`: every image is displayed inside a carousel (default mode with more than on picture) * / `single`: only one image is shown without carousel functionality (other images only reachable by lightbox) * / `grid`: every image is displayed inside a grid * / `custom`: nothing is rendered, only lightbox will be initialized, `stzh-figure` (`this.itemElement`) can be slotted in */ variant: "carousel" | "single" | "grid" | "custom"; /** Preview item that will be looked up and mapped to images in lightbox. */ itemElement: string; /** Whether carousel is disabled */ carouselDisabled: boolean; /** * Whether autoplay is enabled. * Gets paused, when user has focus inside carousel element or hovers over it. * Also when reduced motion media query is active or carousel is set disabled. * Gets disabled permanently, when user interacts with carousel manually (clicks prev/next, scrolls or drags) */ carouselAutoplay: boolean; /** Timeout delay in milliseconds used for autoplay */ carouselAutoplayTimeout: number; /** * Exclude first image in lightbox images (but still use as preview image). * Only used when `variant=single` is used. */ excludeFirstImage: boolean; element: HTMLStzhGalleryElement; openLightbox(index?: number): Promise; apploadListener(): void; showItemsWatcher(newValue: number): void; imagesWatcher(newValue: StzhGalleryItem[] | string): void; private lightbox; private carouselElement; private carouselActionsElement; private openCurrentCarouselSlide; private handleMoreClick; initLightbox(): void; componentWillLoad(): Promise; componentWillUpdate(): Promise; componentDidRender(): void; disconnectedCallback(): void; private renderFigure; render(): any; }