UNPKG

3 kBTypeScriptView Raw
1export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
2export type EventBus = import("./event_utils").EventBus;
3export type IL10n = import("./interfaces").IL10n;
4export type IPDFLinkService = import("./interfaces").IPDFLinkService;
5export type PDFRenderingQueue = import("./pdf_rendering_queue").PDFRenderingQueue;
6export type PDFThumbnailViewerOptions = {
7 /**
8 * - The container for the thumbnail
9 * elements.
10 */
11 container: HTMLDivElement;
12 /**
13 * - The application event bus.
14 */
15 eventBus: EventBus;
16 /**
17 * - The navigation/linking service.
18 */
19 linkService: IPDFLinkService;
20 /**
21 * - The rendering queue object.
22 */
23 renderingQueue: PDFRenderingQueue;
24 /**
25 * - Localization service.
26 */
27 l10n: IL10n;
28};
29/**
30 * @typedef {Object} PDFThumbnailViewerOptions
31 * @property {HTMLDivElement} container - The container for the thumbnail
32 * elements.
33 * @property {EventBus} eventBus - The application event bus.
34 * @property {IPDFLinkService} linkService - The navigation/linking service.
35 * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.
36 * @property {IL10n} l10n - Localization service.
37 */
38/**
39 * Viewer control to display thumbnails for pages in a PDF document.
40 */
41export class PDFThumbnailViewer {
42 /**
43 * @param {PDFThumbnailViewerOptions} options
44 */
45 constructor({ container, eventBus, linkService, renderingQueue, l10n }: PDFThumbnailViewerOptions);
46 container: HTMLDivElement;
47 linkService: import("./interfaces").IPDFLinkService;
48 renderingQueue: import("./pdf_rendering_queue").PDFRenderingQueue;
49 l10n: import("./interfaces").IL10n;
50 scroll: {
51 right: boolean;
52 down: boolean;
53 lastX: any;
54 lastY: any;
55 _eventHandler: (evt: any) => void;
56 };
57 _setImageDisabled: boolean;
58 /**
59 * @private
60 */
61 private _scrollUpdated;
62 getThumbnail(index: any): any;
63 /**
64 * @private
65 */
66 private _getVisibleThumbs;
67 scrollThumbnailIntoView(pageNumber: any): void;
68 _currentPageNumber: any;
69 set pagesRotation(arg: any);
70 get pagesRotation(): any;
71 _pagesRotation: any;
72 cleanup(): void;
73 /**
74 * @private
75 */
76 private _resetView;
77 _thumbnails: any[] | undefined;
78 _pageLabels: any[] | null | undefined;
79 _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | null | undefined;
80 /**
81 * @param {PDFDocumentProxy} pdfDocument
82 */
83 setDocument(pdfDocument: PDFDocumentProxy): void;
84 pdfDocument: import("../src/display/api").PDFDocumentProxy | undefined;
85 /**
86 * @private
87 */
88 private _cancelRendering;
89 /**
90 * @param {Array|null} labels
91 */
92 setPageLabels(labels: any[] | null): void;
93 forceRendering(): boolean;
94 #private;
95}