ng-cw-v12
Version:
Angular UI Component Library
126 lines (125 loc) • 5.3 kB
TypeScript
import { OnDestroy, ElementRef, AfterViewInit, SimpleChanges, OnChanges } from '@angular/core';
import * as i0 from "@angular/core";
export interface NcGalleriaImage {
src: string;
title?: string;
}
export declare type NcObjectFitType = 'contain' | 'cover' | 'fill';
export declare type NcIndicatorsPositionType = 'inside' | 'outside';
export declare type NcNavButtonsDisplayType = 'hover' | 'always';
export declare type NcFullscreenButtonDisplayType = 'hover' | 'always' | 'hidden';
export declare class GalleriaComponent implements OnDestroy, AfterViewInit, OnChanges {
/** 图片数组 */
private _images;
set ncImages(value: string[] | NcGalleriaImage[]);
get ncImages(): NcGalleriaImage[];
/** 组件宽度 */
ncWidth: string;
/** 组件高度 */
ncHeight: string;
/** 缩略图宽度 */
ncThumbnailWidth: number;
/** 缩略图高度 */
ncThumbnailHeight: number;
/** 图片适应方式 */
ncObjectFit: NcObjectFitType;
/** 自动播放 */
private _autoPlay;
set ncAutoPlay(val: boolean | string);
get ncAutoPlay(): boolean;
/** 自动播放间隔 */
ncAutoPlayInterval: number;
/** 显示缩略图 */
private _showThumbnails;
set ncShowThumbnails(val: boolean | string);
get ncShowThumbnails(): boolean;
/** 显示指示器 */
private _showIndicators;
set ncShowIndicators(val: boolean | string);
get ncShowIndicators(): boolean;
/** 指示器显示位置 */
ncIndicatorsPosition: NcIndicatorsPositionType;
/** 显示导航按钮 */
private _showNavButtons;
set ncShowNavButtons(val: boolean | string);
get ncShowNavButtons(): boolean;
/** 导航按钮显示方式 */
ncNavButtonsDisplay: NcNavButtonsDisplayType;
/** 启用全屏预览 */
private _enableFullscreen;
set ncEnableFullscreen(val: boolean | string);
get ncEnableFullscreen(): boolean;
/** 全屏按钮显示方式 */
ncFullscreenButtonDisplay: NcFullscreenButtonDisplayType;
/** 显示图片数目 */
private _showIndex;
set ncShowIndex(val: boolean | string);
get ncShowIndex(): boolean;
/** 显示图片标题 */
private _showTitle;
set ncShowTitle(val: boolean | string);
get ncShowTitle(): boolean;
/** 滚轮缩放 */
private _wheelScale;
set ncWheelScale(val: boolean | string);
get ncWheelScale(): boolean;
currentIndex: number;
thumbnailStartIndex: number;
thumbnailTransform: number;
isFullscreen: boolean;
isFullscreenAutoPlaying: boolean;
private autoPlayTimer;
fullscreenScale: number;
fullscreenTranslateX: number;
fullscreenTranslateY: number;
private minScale;
private maxScale;
private isDragging;
private lastMouseX;
private lastMouseY;
galleriaContainer: ElementRef;
private actualContainerWidth;
private resizeTimeout;
get thumbnailActualWidth(): number;
get actualVisibleThumbnailCount(): number;
get shouldCenterThumbnails(): boolean;
private getMaxThumbnailScroll;
constructor();
ngAfterViewInit(): void;
ngOnChanges(changes: SimpleChanges): void;
startInit(): void;
private updateActualContainerWidth;
init(): void;
ngOnDestroy(): void;
selectImage(index: number): void;
private resetFullscreenZoom;
previousImage(): void;
nextImage(): void;
private updateThumbnailView;
scrollThumbnailsLeft(): void;
scrollThumbnailsRight(): void;
canScrollLeft(): boolean;
canScrollRight(): boolean;
private startAutoPlay;
private stopAutoPlay;
onMouseEnter(): void;
onMouseLeave(): void;
onWindowResize(event: any): void;
onKeyDown(event: KeyboardEvent): void;
onImageError(event: any): void;
onThumbnailError(event: any): void;
private createErrorImageSvg;
openFullscreen(): void;
closeFullscreen(): void;
toggleFullscreenAutoPlay(): void;
onFullscreenKeyDown(event: KeyboardEvent): void;
onFullscreenWheel(event: WheelEvent): void;
onFullscreenMouseDown(event: MouseEvent): void;
onFullscreenMouseMove(event: MouseEvent): void;
onFullscreenMouseUp(event: MouseEvent): void;
private constrainTranslation;
getFullscreenImageTransform(): string;
onFullscreenDoubleClick(event: MouseEvent): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GalleriaComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GalleriaComponent, "nc-galleria", never, { "ncImages": "ncImages"; "ncWidth": "ncWidth"; "ncHeight": "ncHeight"; "ncThumbnailWidth": "ncThumbnailWidth"; "ncThumbnailHeight": "ncThumbnailHeight"; "ncObjectFit": "ncObjectFit"; "ncAutoPlay": "ncAutoPlay"; "ncAutoPlayInterval": "ncAutoPlayInterval"; "ncShowThumbnails": "ncShowThumbnails"; "ncShowIndicators": "ncShowIndicators"; "ncIndicatorsPosition": "ncIndicatorsPosition"; "ncShowNavButtons": "ncShowNavButtons"; "ncNavButtonsDisplay": "ncNavButtonsDisplay"; "ncEnableFullscreen": "ncEnableFullscreen"; "ncFullscreenButtonDisplay": "ncFullscreenButtonDisplay"; "ncShowIndex": "ncShowIndex"; "ncShowTitle": "ncShowTitle"; "ncWheelScale": "ncWheelScale"; }, {}, never, never>;
}