@progress/kendo-pdfviewer-common 0.3.0-dev.202409251459 → 0.3.0-dev.202410100645
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.
- package/dist/es/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es/annotations/annotation-editor-layer.js +780 -0
- package/dist/es/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es/annotations/annotation-layer-builder.js +217 -0
- package/dist/es/annotations/annotation-layer.js +2793 -0
- package/dist/es/annotations/draw-layer-builder.js +65 -0
- package/dist/es/annotations/draw-layer.js +220 -0
- package/dist/es/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es/annotations/editors/free-text-editor.js +783 -0
- package/dist/es/annotations/editors/highlight-editor.js +717 -0
- package/dist/es/annotations/editors/outliner.js +747 -0
- package/dist/es/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es/annotations/helpers/color-manager.js +72 -0
- package/dist/es/annotations/helpers/command-manager.js +133 -0
- package/dist/es/annotations/helpers/id-manager.js +34 -0
- package/dist/es/annotations/helpers/image-manager.js +176 -0
- package/dist/es/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es/annotations/helpers/tools.js +19 -0
- package/dist/es/annotations/shared/display_utils.js +1024 -0
- package/dist/es/annotations/shared/event_utils.js +213 -0
- package/dist/es/annotations/shared/murmurhash3.js +126 -0
- package/dist/es/annotations/shared/scripting_utils.js +90 -0
- package/dist/es/annotations/shared/ui_utils.js +823 -0
- package/dist/es/annotations/shared/utils.js +909 -0
- package/dist/es/common/component.js +33 -0
- package/dist/es/common/core.js +91 -0
- package/dist/es/common/dom.js +11 -0
- package/dist/es/common/main.js +4 -0
- package/dist/es/common/math.js +1 -0
- package/dist/es/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es/links/link-service.js +505 -0
- package/dist/es/main.js +2 -0
- package/dist/es/scroller.js +29 -30
- package/dist/es/text/text-layer-builder.js +288 -0
- package/dist/es/utils.js +5 -5
- package/dist/es/widget/page.js +762 -0
- package/dist/es/widget/pdfviewer.js +1659 -0
- package/dist/es2015/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es2015/annotations/annotation-editor-layer.js +780 -0
- package/dist/es2015/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es2015/annotations/annotation-layer-builder.js +217 -0
- package/dist/es2015/annotations/annotation-layer.js +2793 -0
- package/dist/es2015/annotations/draw-layer-builder.js +65 -0
- package/dist/es2015/annotations/draw-layer.js +220 -0
- package/dist/es2015/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es2015/annotations/editors/free-text-editor.js +783 -0
- package/dist/es2015/annotations/editors/highlight-editor.js +717 -0
- package/dist/es2015/annotations/editors/outliner.js +747 -0
- package/dist/es2015/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es2015/annotations/helpers/color-manager.js +72 -0
- package/dist/es2015/annotations/helpers/command-manager.js +133 -0
- package/dist/es2015/annotations/helpers/id-manager.js +34 -0
- package/dist/es2015/annotations/helpers/image-manager.js +176 -0
- package/dist/es2015/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es2015/annotations/helpers/tools.js +19 -0
- package/dist/es2015/annotations/shared/display_utils.js +1024 -0
- package/dist/es2015/annotations/shared/event_utils.js +213 -0
- package/dist/es2015/annotations/shared/murmurhash3.js +126 -0
- package/dist/es2015/annotations/shared/scripting_utils.js +90 -0
- package/dist/es2015/annotations/shared/ui_utils.js +823 -0
- package/dist/es2015/annotations/shared/utils.js +909 -0
- package/dist/es2015/common/component.js +33 -0
- package/dist/es2015/common/core.js +91 -0
- package/dist/es2015/common/dom.js +11 -0
- package/dist/es2015/common/main.js +4 -0
- package/dist/es2015/common/math.js +1 -0
- package/dist/es2015/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es2015/links/link-service.js +505 -0
- package/dist/es2015/main.js +2 -0
- package/dist/es2015/scroller.js +29 -30
- package/dist/es2015/text/text-layer-builder.js +288 -0
- package/dist/es2015/utils.js +5 -5
- package/dist/es2015/widget/page.js +762 -0
- package/dist/es2015/widget/pdfviewer.js +1659 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.d.ts +39 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.js +142 -0
- package/dist/npm/annotations/annotation-editor-layer.d.ts +196 -0
- package/dist/npm/annotations/annotation-editor-layer.js +783 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.d.ts +281 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.js +1694 -0
- package/dist/npm/annotations/annotation-layer-builder.d.ts +58 -0
- package/dist/npm/annotations/annotation-layer-builder.js +220 -0
- package/dist/npm/annotations/annotation-layer.d.ts +134 -0
- package/dist/npm/annotations/annotation-layer.js +2794 -0
- package/dist/npm/annotations/draw-layer-builder.d.ts +21 -0
- package/dist/npm/annotations/draw-layer-builder.js +68 -0
- package/dist/npm/annotations/draw-layer.d.ts +33 -0
- package/dist/npm/annotations/draw-layer.js +223 -0
- package/dist/npm/annotations/editors/annotation-editor.d.ts +349 -0
- package/dist/npm/annotations/editors/annotation-editor.js +1523 -0
- package/dist/npm/annotations/editors/free-text-editor.d.ts +108 -0
- package/dist/npm/annotations/editors/free-text-editor.js +786 -0
- package/dist/npm/annotations/editors/highlight-editor.d.ts +114 -0
- package/dist/npm/annotations/editors/highlight-editor.js +717 -0
- package/dist/npm/annotations/editors/outliner.d.ts +51 -0
- package/dist/npm/annotations/editors/outliner.js +750 -0
- package/dist/npm/annotations/helpers/annotation-storage.d.ts +98 -0
- package/dist/npm/annotations/helpers/annotation-storage.js +299 -0
- package/dist/npm/annotations/helpers/color-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/color-manager.js +76 -0
- package/dist/npm/annotations/helpers/command-manager.d.ts +42 -0
- package/dist/npm/annotations/helpers/command-manager.js +137 -0
- package/dist/npm/annotations/helpers/id-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/id-manager.js +38 -0
- package/dist/npm/annotations/helpers/image-manager.d.ts +18 -0
- package/dist/npm/annotations/helpers/image-manager.js +180 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.d.ts +36 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.js +215 -0
- package/dist/npm/annotations/helpers/tools.d.ts +1 -0
- package/dist/npm/annotations/helpers/tools.js +23 -0
- package/dist/npm/annotations/shared/display_utils.d.ts +6 -0
- package/dist/npm/annotations/shared/display_utils.js +1030 -0
- package/dist/npm/annotations/shared/event_utils.d.ts +33 -0
- package/dist/npm/annotations/shared/event_utils.js +165 -0
- package/dist/npm/annotations/shared/murmurhash3.d.ts +8 -0
- package/dist/npm/annotations/shared/murmurhash3.js +129 -0
- package/dist/npm/annotations/shared/scripting_utils.d.ts +17 -0
- package/dist/npm/annotations/shared/scripting_utils.js +93 -0
- package/dist/npm/annotations/shared/ui_utils.d.ts +54 -0
- package/dist/npm/annotations/shared/ui_utils.js +250 -0
- package/dist/npm/annotations/shared/utils.d.ts +148 -0
- package/dist/npm/annotations/shared/utils.js +872 -0
- package/dist/npm/common/component.d.ts +9 -0
- package/dist/npm/common/component.js +37 -0
- package/dist/npm/common/core.d.ts +18 -0
- package/dist/npm/common/core.js +112 -0
- package/dist/npm/common/dom.d.ts +3 -0
- package/dist/npm/common/dom.js +17 -0
- package/dist/npm/common/main.d.ts +4 -0
- package/dist/npm/common/main.js +7 -0
- package/dist/npm/common/math.d.ts +1 -0
- package/dist/npm/common/math.js +5 -0
- package/dist/npm/enums/PdfViewerInteractionMode.d.ts +4 -0
- package/dist/npm/enums/PdfViewerInteractionMode.js +9 -0
- package/dist/npm/links/link-service.d.ts +116 -0
- package/dist/npm/links/link-service.js +501 -0
- package/dist/npm/main.d.ts +2 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/scroller.d.ts +7 -3
- package/dist/npm/scroller.js +32 -32
- package/dist/npm/text/text-layer-builder.d.ts +30 -0
- package/dist/npm/text/text-layer-builder.js +291 -0
- package/dist/npm/utils.d.ts +20 -2
- package/dist/npm/utils.js +11 -8
- package/dist/npm/widget/page.d.ts +75 -0
- package/dist/npm/widget/page.js +763 -0
- package/dist/npm/widget/pdfviewer.d.ts +222 -0
- package/dist/npm/widget/pdfviewer.js +1663 -0
- package/package.json +13 -9
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { Component } from "../common/main";
|
|
2
|
+
import { PDFReadParameters } from "../utils";
|
|
3
|
+
import { SearchService } from "../search";
|
|
4
|
+
import { Scroller } from "../scroller";
|
|
5
|
+
import { SaveOptions } from "@progress/kendo-file-saver";
|
|
6
|
+
import { PDFPageProxy } from "pdfjs-dist/legacy/build/pdf.mjs";
|
|
7
|
+
import { DocumentInitParameters, PDFDocumentProxy, TypedArray } from "pdfjs-dist/types/src/display/api";
|
|
8
|
+
import { AnnotationEditorUIManager } from "../annotations/annotation-editor-ui-manager";
|
|
9
|
+
import { EventBus } from '../annotations/shared/event_utils';
|
|
10
|
+
import { Page } from "./page";
|
|
11
|
+
import { AnnotationStorage } from "../annotations/helpers/annotation-storage";
|
|
12
|
+
import { PDFLinkService } from "../links/link-service";
|
|
13
|
+
import { PdfViewerInteractionMode } from "../enums/PdfViewerInteractionMode";
|
|
14
|
+
export declare class PdfViewer extends Component {
|
|
15
|
+
#private;
|
|
16
|
+
options: any;
|
|
17
|
+
interactionMode: PdfViewerInteractionMode;
|
|
18
|
+
printContainer: HTMLElement;
|
|
19
|
+
_scrollMode: number;
|
|
20
|
+
isInPresentationMode: boolean;
|
|
21
|
+
_currentPageNumber: number;
|
|
22
|
+
linkService: PDFLinkService;
|
|
23
|
+
annotationStorage: AnnotationStorage;
|
|
24
|
+
_annotationStorageModified: boolean;
|
|
25
|
+
_hasAnnotationEditors: boolean;
|
|
26
|
+
annotationEditorUIManager: AnnotationEditorUIManager;
|
|
27
|
+
state: any;
|
|
28
|
+
pdfDocument: PDFDocumentProxy;
|
|
29
|
+
pages: Array<Page>;
|
|
30
|
+
wrapper: HTMLElement;
|
|
31
|
+
documentContainer: HTMLDivElement;
|
|
32
|
+
documentScroller: Scroller;
|
|
33
|
+
searchService: SearchService;
|
|
34
|
+
shouldPreventScroll: boolean;
|
|
35
|
+
eventBus: EventBus;
|
|
36
|
+
constructor(element: any, options: any);
|
|
37
|
+
destroy(): void;
|
|
38
|
+
throwIfInvalidOptions(): void;
|
|
39
|
+
set annotationEditorParams({ type, value }: {
|
|
40
|
+
type: any;
|
|
41
|
+
value: any;
|
|
42
|
+
});
|
|
43
|
+
get annotationEditorMode(): number;
|
|
44
|
+
set annotationEditorMode({ mode, editId, isFromKeyboard }: number);
|
|
45
|
+
extendOptions(options: any): void;
|
|
46
|
+
setOptions(options: any): void;
|
|
47
|
+
bindEvents(): void;
|
|
48
|
+
bindPagesWheel(): void;
|
|
49
|
+
unbindEvents(): void;
|
|
50
|
+
unbindPagesWheel(): void;
|
|
51
|
+
setState(newState: any): void;
|
|
52
|
+
resetState(): void;
|
|
53
|
+
initEventBus(): void;
|
|
54
|
+
destroyEventBus(): void;
|
|
55
|
+
initLinkService(): void;
|
|
56
|
+
initAnnotationEditorUIManager(): void;
|
|
57
|
+
setAnnotationEditorUIManagerScale(): void;
|
|
58
|
+
destroyAnnotationEditorUIManager(): void;
|
|
59
|
+
bindEventBusAnnotationsEvents(): void;
|
|
60
|
+
unbindEventBusAnnotationsEvents(): void;
|
|
61
|
+
loadFile(args: any): void;
|
|
62
|
+
loadDocument(options: any): void;
|
|
63
|
+
initDocumentAnnotationStorage(pdfDocument: any): void;
|
|
64
|
+
_initializeAnnotationStorageCallbacks(pdfDocument: any): void;
|
|
65
|
+
drawPagesFromPromisesAsync(pagesPromises: any): Promise<import("pdfjs-dist/types/src/display/api").PDFPageProxy[]>;
|
|
66
|
+
drawPagesAsync(pdfPages: Array<PDFPageProxy>): Array<HTMLElement>;
|
|
67
|
+
createBlankPageElements({ pdfPage, zoom }: {
|
|
68
|
+
pdfPage: any;
|
|
69
|
+
zoom: any;
|
|
70
|
+
}): {
|
|
71
|
+
canvasContext: CanvasRenderingContext2D;
|
|
72
|
+
canvasWrapper: any;
|
|
73
|
+
canvas: HTMLCanvasElement;
|
|
74
|
+
viewport: any;
|
|
75
|
+
scaleNum: number;
|
|
76
|
+
pageElement: HTMLDivElement;
|
|
77
|
+
styles: {
|
|
78
|
+
width: string;
|
|
79
|
+
height: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
getDocumentParameters(options: PDFReadParameters): ArrayBuffer | TypedArray | DocumentInitParameters;
|
|
83
|
+
appendPages(pages: Array<HTMLElement>): void;
|
|
84
|
+
appendPage(page: HTMLElement, pageIndex?: number): void;
|
|
85
|
+
drawPageAsync({ pageIndex }: {
|
|
86
|
+
pageIndex?: number;
|
|
87
|
+
}): Promise<HTMLDivElement>;
|
|
88
|
+
createPageElements({ pdfPage, zoom, }: {
|
|
89
|
+
pdfPage?: any;
|
|
90
|
+
zoom?: number;
|
|
91
|
+
}): {
|
|
92
|
+
canvasContext: CanvasRenderingContext2D;
|
|
93
|
+
canvasWrapper: any;
|
|
94
|
+
canvas: HTMLCanvasElement;
|
|
95
|
+
viewport: any;
|
|
96
|
+
scaleNum: number;
|
|
97
|
+
pageElement: HTMLDivElement;
|
|
98
|
+
styles: {
|
|
99
|
+
width: string;
|
|
100
|
+
height: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
triggerError: (e: any) => void;
|
|
104
|
+
triggerPagesLoad(e: any): void;
|
|
105
|
+
triggerZoomStart(e: any): void;
|
|
106
|
+
triggerZoomEnd(e: any): void;
|
|
107
|
+
triggerDownload(e: any): boolean;
|
|
108
|
+
triggerAnnotationEditorToolBarShow(e: any): void;
|
|
109
|
+
triggerAnnotationEditorToolBarHide(e: any): void;
|
|
110
|
+
triggerPrintEnd: (e: any) => void;
|
|
111
|
+
onPagesLoad: (args: any) => void;
|
|
112
|
+
clearDocument(): void;
|
|
113
|
+
clearDocumentState(): void;
|
|
114
|
+
initPageComponents(pdfPages: any): void;
|
|
115
|
+
destroyPageComponents(): void;
|
|
116
|
+
clearPagesElements(): void;
|
|
117
|
+
initDocumentContainer(): void;
|
|
118
|
+
initDocumentScroller(element: any): void;
|
|
119
|
+
createDocumentScroller(element: any, options: any): Scroller;
|
|
120
|
+
destroyDocumentScroller(): void;
|
|
121
|
+
enableDocumentScrollEventsTracking(): void;
|
|
122
|
+
disableDocumentScrollEventsTracking(): void;
|
|
123
|
+
onDocumentScrollerScroll: (e: any) => void;
|
|
124
|
+
getCurrentPageIndex(): number;
|
|
125
|
+
tryTriggerScroll: (e: any) => void;
|
|
126
|
+
downloadFile({ fileName, saveOptions }: {
|
|
127
|
+
fileName: any;
|
|
128
|
+
saveOptions?: {};
|
|
129
|
+
}): void;
|
|
130
|
+
downloadDocument({ options, fileName, saveOptions, }: {
|
|
131
|
+
options: any;
|
|
132
|
+
fileName?: string;
|
|
133
|
+
saveOptions?: {};
|
|
134
|
+
}): void;
|
|
135
|
+
saveFile(blob: Blob, fileName: string, saveOptions: SaveOptions): boolean;
|
|
136
|
+
hasDocument(): boolean;
|
|
137
|
+
zoom(args: any): void;
|
|
138
|
+
calculateZoomLevel({ zoomLevel, zoomLevelType, currentZoom }: {
|
|
139
|
+
zoomLevel: any;
|
|
140
|
+
zoomLevelType: any;
|
|
141
|
+
currentZoom: any;
|
|
142
|
+
}): number;
|
|
143
|
+
reloadFile(pdfDoc: PDFDocumentProxy): void;
|
|
144
|
+
setHiddenCanvasStyles(): void;
|
|
145
|
+
printFile(): void;
|
|
146
|
+
loadDocumentForPrintAsync({ zoomLevel, force }: {
|
|
147
|
+
zoomLevel?: number;
|
|
148
|
+
force?: boolean;
|
|
149
|
+
}): Promise<any>;
|
|
150
|
+
printDocumentAsync: () => Promise<any>;
|
|
151
|
+
getPagesPrintContentAsync(printContainer: any): any[];
|
|
152
|
+
initPrintContainer(): void;
|
|
153
|
+
openPrintDialog(): void;
|
|
154
|
+
cacheZoomLevelBeforePrint(): void;
|
|
155
|
+
restoreZoomLevelBeforePrint(): void;
|
|
156
|
+
searchText(options?: {
|
|
157
|
+
text: string;
|
|
158
|
+
matchCase: boolean;
|
|
159
|
+
}): {
|
|
160
|
+
startOffset: number;
|
|
161
|
+
endOffset: number;
|
|
162
|
+
}[];
|
|
163
|
+
clearSearch(): void;
|
|
164
|
+
initSearchService(): void;
|
|
165
|
+
destroySearchService(): void;
|
|
166
|
+
getPagesContainer(): HTMLElement;
|
|
167
|
+
getDocumentContainer(): HTMLDivElement;
|
|
168
|
+
getPagesElements(): unknown[];
|
|
169
|
+
goToNextSearchMatch(): void;
|
|
170
|
+
goToPreviousSearchMatch(): void;
|
|
171
|
+
scrollToSearchMatch(matchElement: HTMLElement): void;
|
|
172
|
+
resetInteractionMode(): void;
|
|
173
|
+
setInteractionMode(args: any): void;
|
|
174
|
+
enableScrollerEventsTracking(): void;
|
|
175
|
+
disableScrollerEventsTracking(): void;
|
|
176
|
+
setScaleFactor(scaleFactor: number): void;
|
|
177
|
+
onDocumentWheel: (e: any) => void;
|
|
178
|
+
activatePageNumber(pageNumber: any): void;
|
|
179
|
+
scrollToPage({ pageNumber }: {
|
|
180
|
+
pageNumber: any;
|
|
181
|
+
}): void;
|
|
182
|
+
scrollDocument({ left, top }: {
|
|
183
|
+
left: any;
|
|
184
|
+
top: any;
|
|
185
|
+
}): void;
|
|
186
|
+
getPageNumberScrollOffset(pageNumber: any): {
|
|
187
|
+
left: number;
|
|
188
|
+
top: number;
|
|
189
|
+
};
|
|
190
|
+
getPageScrollOffset(page: Page): number;
|
|
191
|
+
getPageByNumber(pageNumber: any): Page;
|
|
192
|
+
addHighlightAnnotation(): void;
|
|
193
|
+
setHighlightColor(color: any): void;
|
|
194
|
+
deleteAnnotation(): void;
|
|
195
|
+
resetAnnotationEditorMode(): void;
|
|
196
|
+
setAnnotationEditorMode(modeDescriptor: any): void;
|
|
197
|
+
setFreeTextColor(color: any): void;
|
|
198
|
+
setFreeTextFontSize(fontSize: any): void;
|
|
199
|
+
executeAnnotationCommand({ commandType, commandValue }: {
|
|
200
|
+
commandType: any;
|
|
201
|
+
commandValue: any;
|
|
202
|
+
}): void;
|
|
203
|
+
isValidAnnotationEditorMode(mode: any): boolean;
|
|
204
|
+
cleanupSwitchAnnotationEditorMode(): void;
|
|
205
|
+
_getVisiblePages(): Page[];
|
|
206
|
+
get _layerProperties(): any;
|
|
207
|
+
/**
|
|
208
|
+
* Scrolls page into view.
|
|
209
|
+
* @param {ScrollPageIntoViewParameters} params
|
|
210
|
+
*/
|
|
211
|
+
scrollPageIntoView({ pageNumber, destArray, allowNegativeOffset, ignoreDestinationZoom, }: {
|
|
212
|
+
pageNumber: any;
|
|
213
|
+
destArray?: any;
|
|
214
|
+
allowNegativeOffset?: boolean;
|
|
215
|
+
ignoreDestinationZoom?: boolean;
|
|
216
|
+
}): void;
|
|
217
|
+
/**
|
|
218
|
+
* @returns {boolean} Whether the pageNumber is valid (within bounds).
|
|
219
|
+
* @private
|
|
220
|
+
*/
|
|
221
|
+
_setCurrentPageNumber(val: any, resetCurrentPageView?: boolean): boolean;
|
|
222
|
+
}
|